:root {
  color-scheme: light;
  --ink: #172544;
  --muted: #516078;
  --blue: #234ac4;
  --blue-dark: #163593;
  --blue-wash: #edf2ff;
  --line: #d9e0ec;
  font-family: Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: #f4f6fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.topbar { max-width: 61rem; min-height: 4.25rem; padding: .65rem 1.5rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.13rem; font-weight: 780; color: var(--ink); text-decoration: none; letter-spacing: -.04em; }
.brand-mark { background: var(--blue); border-radius: .46rem; display: inline-block; position: relative; width: 1.75rem; height: 1.75rem; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: .55rem; height: .74rem; border-radius: 2px; border: 1.5px solid white; }
.brand-mark::before { top: .34rem; left: .42rem; }
.brand-mark::after { bottom: .31rem; right: .42rem; background: var(--blue); }
nav { display: flex; gap: .2rem; }
nav a { padding: .55rem .9rem; border-radius: .48rem; font-weight: 660; color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { background: var(--blue-wash); color: var(--blue-dark); }
nav a:hover { background: #f0f3fa; }
main { width: min(100%, 37rem); margin: clamp(2rem, 8vh, 5rem) auto 3rem; padding: 0 1rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 1.15rem; box-shadow: 0 .5rem 2rem #1c315109; padding: clamp(1.35rem, 5vw, 2.6rem); }
h1 { font-size: clamp(1.85rem, 5vw, 2.4rem); line-height: 1.2; margin: 0; font-weight: 780; letter-spacing: -.055em; }
p { line-height: 1.6; margin: .7rem 0; word-break: keep-all; overflow-wrap: anywhere; }
.lead { color: var(--muted); margin: .65rem 0 1.95rem; }
.label, dt { display: block; margin: 0 0 .48rem; font-size: .88rem; font-weight: 730; }
input, button { font: inherit; }
input { min-width: 0; accent-color: var(--blue); }
input[type="text"], input[readonly] { border: 1px solid #9caac2; border-radius: .55rem; background: #fff; color: var(--ink); width: 100%; }
.code-input { padding: .8rem 1rem; font-size: clamp(1.55rem,6vw,2rem); letter-spacing: .12em; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
.code-input::placeholder { color: #818b9e; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.8rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .55rem; font-weight: 680; line-height: 1.3; cursor: pointer; text-decoration: none; }
.button:disabled { opacity: .52; cursor: default; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); }
.button.secondary { color: var(--blue-dark); background: white; border-color: var(--line); }
.button.secondary:hover:not(:disabled) { background: var(--blue-wash); }
.wide { width: 100%; margin-top: 1rem; }
:focus-visible { outline: 3px solid #456bd9; outline-offset: 3px; }
.message { margin: .75rem 0 0; color: var(--muted); font-size: .93rem; }
.message:empty, .fineprint:empty, .file-list:empty { display: none; }
.error { color: #a22335; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.drop-zone { position: relative; min-height: 8.7rem; padding: 1.1rem .7rem; border: 1.5px dashed #9badde; border-radius: .7rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; background: #f8faff; color: var(--blue-dark); }
.drop-zone:focus-within, .drop-zone.dragging { background: var(--blue-wash); outline: 2px solid var(--blue); outline-offset: 2px; }
.drop-zone input { position: absolute; inset: 0; width:100%; height:100%; opacity: 0; cursor: pointer; }
.upload-symbol { font-size: 1.45rem; font-weight: 700; line-height: 1; }
.fineprint, .drop-help, .file-size { color: var(--muted); font-size: .83rem; }
.file-list { list-style: none; margin: 1rem 0; padding: 0; border-top: 1px solid var(--line); }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--line); padding: .65rem 0; min-width: 0; }
.file-info { min-width: 0; overflow-wrap: anywhere; }
.file-name { display: block; line-height: 1.45; font-weight: 650; }
.file-size { display: block; margin-top: .2rem; }
.file-list .button { min-height: 2.5rem; padding: .5rem .7rem; font-size: .9rem; flex: none; }
progress { display: block; width: 100%; height: .55rem; margin-top: 1rem; accent-color: var(--blue); }
.recent { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.recent summary { cursor: pointer; color: var(--ink); font-weight: 700; padding: .35rem 0; }
.recent .file-list { margin: .6rem 0 0; }
.recent .file-list li { align-items: flex-start; }
.recent-name { font-size: .91rem; }
.recent-code { display: block; font-size: .93rem; margin: .3rem 0 .1rem; font-variant-numeric: tabular-nums; }
.receipt { padding: 1rem 1.2rem; background: var(--blue-wash); border-radius: .7rem; margin: 0; }
.receipt dt { color: var(--muted); margin-bottom: .25rem; }
.receipt dt:not(:first-child) { margin-top: 1.1rem; }
dd { margin: 0; overflow-wrap: anywhere; }
dd a { color: var(--blue-dark); }
.result-code { font-size: clamp(1.9rem,7vw,2.55rem); letter-spacing: .07em; font-variant-numeric: tabular-nums; }
#sent .label { margin-top: 1.5rem; }
.link-field { display: flex; gap: .4rem; }
.link-field input { flex: 1; font-size: 1rem; padding: .55rem; }
.link-field button { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 32rem) {
  .topbar { padding: .6rem 1rem; min-height: 3.65rem; }
  main { margin-top: 1.5rem; }
  .drop-help { display: none; }
  .card { border-radius: .9rem; }
}
