/* Drop – Kobaltblau, Papier und eine orange Taste. Alles fühlt sich an wie Tasten zum Drücken. */

@font-face {
  font-family: 'Instrument';
  src: url(/fonts/instrument-latin.woff2) format('woff2-variations');
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument';
  src: url(/fonts/instrument-latin-ext.woff2) format('woff2-variations');
  font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JBMono';
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2-variations');
  font-weight: 100 800; font-display: swap;
}

:root {
  --cobalt: #1C3DDB;
  --cobalt-deep: #12288F;
  --paper: #F3F5FF;
  --ink: #0A1446;
  --orange: #FF6A1F;
  --orange-deep: #B8430B;
  --sky: #B4C5FF;
  --mint: #19C37D;
  --red: #C2261B;

  --sans: 'Instrument', system-ui, sans-serif;
  --mono: 'JBMono', ui-monospace, monospace;
  --r-card: 22px;
  --r-tile: 12px;
  --press: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 1rem; line-height: 1.5;
  color: var(--paper);
  background: var(--cobalt);
  min-height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
html[lang=de] [data-only=en], html[lang=en] [data-only=de] { display: none; }

/* ─── Kopf ─── */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(16px, 4vw, 40px) 0; max-width: 1080px; width: 100%; margin: 0 auto; }
.wordmark { font-weight: 700; font-stretch: 80%; font-size: 2.25rem; letter-spacing: -.04em; color: var(--paper); text-decoration: none; line-height: 1; }
.wordmark span { color: var(--orange); }
.lang { color: var(--sky); font-weight: 600; padding: 8px 4px; text-decoration: underline; text-underline-offset: 4px; }

.wrap { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px; }
.lede {
  font-size: clamp(1.75rem, 4.6vw, 3rem);
  font-weight: 650; font-stretch: 82%;
  line-height: 1.05; letter-spacing: -.02em;
  max-width: 20ch; margin-bottom: 32px;
}

/* ─── Karten ─── */
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 860px) { .pair { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.card {
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 10px 0 var(--cobalt-deep);
  display: flex; flex-direction: column; gap: 16px;
}
.card h2 { font-size: 1.625rem; font-weight: 700; font-stretch: 85%; letter-spacing: -.01em; line-height: 1.1; }
.card-wide { max-width: 860px; margin: 0 auto; }
.hint { color: #47507F; }

/* ─── Ablagefläche ─── */
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 168px; padding: 24px; text-align: center;
  border: 3px dashed #9AA8E8; border-radius: 18px;
  background: #E6EBFF;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone:hover, .dropzone.over { border-color: var(--cobalt); background: #DCE3FF; }
.dropzone:focus-within { outline: 3px solid var(--orange); outline-offset: 3px; }
.dz-big { font-size: 1.25rem; font-weight: 700; font-stretch: 88%; }
.dz-small { color: #47507F; }

.filelist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.filelist li, .downloads li {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2px solid #D5DBF7; border-radius: 14px;
  padding: 10px 12px;
}
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fsize { color: #47507F; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9375rem; }
.fremove { width: 32px; height: 32px; border-radius: 50%; color: #47507F; font-size: 20px; line-height: 1; flex-shrink: 0; }
.fremove:hover { background: #E6EBFF; color: var(--ink); }
.filelist.locked .fremove { visibility: hidden; }
.sum { font-weight: 600; }
.sum.too-much { color: var(--red); }

/* ─── Formular ─── */
.send-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-weight: 600; font-size: .9375rem; }
.field input {
  min-height: 50px; padding: 0 14px;
  background: #fff; color: var(--ink);
  border: 2px solid #C5CDF2; border-radius: 14px;
  outline: none;
}
.field input:focus { border-color: var(--cobalt); }
.check { display: flex; align-items: center; gap: 10px; color: #47507F; font-size: .9375rem; }
.check input { width: 20px; height: 20px; accent-color: var(--cobalt); }
.error { color: var(--red); font-weight: 600; font-size: .9375rem; }
.error:empty { display: none; }

/* ─── Tasten mit festem Schatten, die sich eindrücken ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 1.4em;
  border-radius: 999px;
  font-weight: 700; font-size: 1.0625rem;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn-go { background: var(--orange); color: #2A0E00; box-shadow: 0 var(--press) 0 var(--orange-deep); }
.btn-paper { background: #fff; color: var(--ink); box-shadow: 0 var(--press) 0 #C5CDF2; border: 2px solid #C5CDF2; }
.btn-quiet { background: #E6EBFF; color: var(--ink); }
.btn-danger { background: transparent; color: var(--red); text-decoration: underline; text-underline-offset: 4px; padding: 0 .6em; }
.btn-go:active:not(:disabled), .btn-paper:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--orange-deep); }
.btn-paper:active:not(:disabled) { box-shadow: 0 2px 0 #C5CDF2; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ─── Der Code als Tasten ─── */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(6px, 1.5vw, 12px); }
.tiles input, .tiles span {
  width: 100%; aspect-ratio: 4 / 5;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  text-align: center; text-transform: uppercase;
  color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-radius: var(--r-tile);
  box-shadow: 0 5px 0 var(--ink);
  caret-color: var(--orange);
}
.tiles input { outline: none; padding: 0; transition: transform .08s, box-shadow .08s, border-color .15s; }
.tiles input:focus { border-color: var(--orange); box-shadow: 0 5px 0 var(--orange-deep); }
.tiles input.filled { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tiles-show { max-width: 640px; }
.tiles-show span { display: grid; place-items: center; font-size: clamp(2.25rem, 9vw, 4rem); }
.code-form { display: flex; flex-direction: column; gap: 12px; }

/* ─── Fortschritt ─── */
.progress { display: flex; flex-direction: column; gap: 10px; }
.bar { height: 18px; border-radius: 999px; background: #E6EBFF; border: 2px solid var(--ink); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.progress-text { font-variant-numeric: tabular-nums; font-weight: 600; }
.progress .btn { align-self: flex-start; }

/* ─── Ergebnis ─── */
.sent-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 700px) { .sent-grid { grid-template-columns: 200px 1fr; } }
.qr { width: 200px; height: 200px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.sent-info { display: flex; flex-direction: column; gap: 14px; }
.link-line a { color: var(--cobalt); font-weight: 600; overflow-wrap: anywhere; }
.expires { color: #47507F; font-weight: 600; }

/* ─── Abholen ─── */
.pick-head { display: flex; flex-direction: column; gap: 4px; }
.code-inline { font-family: var(--mono); letter-spacing: .08em; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 0 .3em; }
.downloads { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.downloads li { flex-wrap: wrap; row-gap: 8px; }
.downloads .fname { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; }
.downloads .btn { min-height: 42px; font-size: .9375rem; --press: 4px; flex-shrink: 0; margin-left: auto; }
@media (min-width: 600px) {
  .downloads li { flex-wrap: nowrap; }
  .downloads .fname { flex: 1; white-space: nowrap; }
}

.space { margin-top: 28px; color: var(--sky); font-weight: 600; }

/* ─── Fuß und Hinweise ─── */
.foot { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.link { color: var(--sky); text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 999px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px); text-align: center; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog { border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(10, 20, 70, .65); }
.doc { margin: auto; width: min(100% - 24px, 680px); max-height: min(100dvh - 24px, 900px); background: var(--paper); border-radius: var(--r-card); padding: 0; }
.doc article { padding: 32px 24px 36px; }
.doc h1 { font-size: 2rem; font-weight: 700; font-stretch: 82%; line-height: 1.05; margin-bottom: 18px; padding-right: 44px; }
.doc h2 { font-size: 1.0625rem; font-weight: 700; margin: 20px 0 6px; }
.doc p, .doc li { line-height: 1.6; max-width: 68ch; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc a { color: var(--cobalt); }
.doc-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 26px; line-height: 1; }
.noscript { padding: 40px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
