:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif;
  color: #eff5ef;
  background: #101713;
  --muted: #afbeb3;
  --line: #36463b;
  --accent: #c6f286;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 17.5rem; }
p { margin: 0; }
button, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.page-width { width: min(100% - 3rem, 59rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid #29362e; }
.brand { display: flex; gap: .7rem; align-items: center; min-height: 4.25rem; font-size: .95rem; font-weight: 650; }
.brand-icon { width: 1.15rem; height: 1.15rem; border: 1px solid var(--accent); border-radius: .25rem; position: relative; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; width: .48rem; height: 1px; background: var(--accent); top: .47rem; left: .26rem; }
.brand-icon::after { transform: rotate(90deg); }

.hero { padding: clamp(3.75rem, 9vw, 7rem) 0 2rem; }
h1 { margin: 0 0 .8rem; font-size: clamp(2rem, 6vw, 4rem); line-height: 1.15; letter-spacing: -.055em; }
.hero p { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.2rem); line-height: 1.65; }

.converter {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: #17211b;
}

.file-panel, .output-panel { padding: clamp(1.1rem, 4vw, 2rem); }
.file-panel { border-right: 1px solid var(--line); }
.field-label { display: block; font-size: .95rem; font-weight: 650; margin-bottom: .7rem; }
.drop-zone {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .55rem;
  min-height: 12rem;
  padding: 1rem;
  text-align: center;
  border: 1px dashed #5b7763;
  border-radius: .75rem;
  background: #1c2a21;
  overflow-wrap: anywhere;
}
.drop-zone:hover, .drop-zone:focus-within, .drop-zone[data-dragging] { border-color: var(--accent); background: #243529; }
.drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone input:disabled { cursor: wait; }
.drop-zone strong { font-size: 1.03rem; }
.drop-zone #file-detail { color: var(--muted); font-size: .875rem; }
.file-icon { position: relative; width: 2rem; height: 1.6rem; border: 1.5px solid var(--accent); border-radius: .25rem; margin-bottom: .3rem; }
.file-icon::before { content: ""; position: absolute; width: .27rem; height: .27rem; border-radius: 50%; background: var(--accent); top: .26rem; right: .29rem; }
.file-icon::after { content: ""; position: absolute; width: .7rem; height: .7rem; border: solid var(--accent); border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); bottom: -.15rem; left: .41rem; }

.note { margin-top: .7rem; font-size: .875rem; color: var(--muted); line-height: 1.55; }
.file-list { max-height: 8rem; overflow: auto; overflow-wrap: anywhere; margin: .7rem 0 0; padding-inline-start: 1.35rem; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.file-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.output-panel { display: flex; flex-direction: column; gap: .85rem; }
.output-panel .note { margin: 0; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; pointer-events: none; position: absolute; right: 1rem; top: 42%; width: .45rem; height: .45rem; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
select { display: block; width: 100%; appearance: none; color: inherit; padding: .7rem 2.4rem .7rem .85rem; min-height: 2.9rem; background: #101a14; border: 1px solid #4b6051; border-radius: .55rem; cursor: pointer; }
button, .download { display: inline-flex; justify-content: center; align-items: center; min-height: 2.9rem; padding: .65rem .95rem; border-radius: .55rem; background: var(--accent); border: 1px solid transparent; color: #182313; font-weight: 750; text-decoration: none; cursor: pointer; }
button { width: 100%; margin-top: auto; }
button:disabled { color: #b3c0b5; background: #29372e; border-color: #3d5043; cursor: default; }
button:not(:disabled):hover, .download:hover { background: #ddffa9; }
.clear, .clear:not(:disabled):hover { min-height: 2rem; width: auto; margin: 0; padding: 0; color: var(--accent); background: transparent; font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2rem; }
.clear:disabled { background: transparent; border-color: transparent; color: var(--muted); }
.feedback { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem; border-top: 1px solid var(--line); padding: 1rem clamp(1.1rem, 4vw, 2rem); }
#status { overflow-wrap: anywhere; line-height: 1.5; }
.feedback[data-error] #status { color: #ffb7ab; }
.failed-files { flex-basis: 100%; margin: 0; color: #ffb7ab; }
.privacy { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .9rem; margin: 1.15rem 0 3rem; }
.privacy-icon { position: relative; width: .82rem; height: .62rem; flex: 0 0 auto; border: 1px solid var(--muted); border-radius: .15rem; }
.privacy-icon::before { content: ""; position: absolute; width: .38rem; height: .36rem; border: 1px solid var(--muted); border-bottom: 0; border-radius: .25rem .25rem 0 0; left: .15rem; bottom: 100%; }

@media (max-width: 40rem) {
  .page-width { width: calc(100% - 2rem); }
  .hero { padding-bottom: 1.4rem; }
  .converter { grid-template-columns: minmax(0, 1fr); }
  .file-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .drop-zone { min-height: 10rem; }
  button { margin-top: .25rem; }
}
