/* The drop page (drop.html). The palette is the receive page's (index.html);
   the layout is the app's signed-out window (docs/ANON-CARD-STATES.md): the
   square, one action row, and the limits in the foot. */
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/PlusJakartaSans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/PlusJakartaSans-latin.woff2") format('woff2');
  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;
}
:root {
  --bg: #17171a; --card: #1e1e23; --card2: #26262c; --text: #f0f0f3;
  --muted: #a5a5ad; --accent: #c6851a; --ok: #3ecf8e; --err: #ff5c5c;
  --line: #2a2a31; --line2: #3a3a43; --link: #e0a957; --link-hover: #eec27f;
  --accent-soft: rgba(198,133,26,.16);
}
:root[data-theme="light"] {
  --bg: #ffffff; --card: #ffffff; --card2: #f6f6f8; --text: #17171a;
  --muted: #6e6e76; --accent: #c6851a; --ok: #12a150; --err: #d92d20;
  --line: #ececee; --line2: #d9d9de; --link: #a66e14; --link-hover: #7a4f0e;
  --accent-soft: rgba(198,133,26,.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #ffffff; --card: #ffffff; --card2: #f6f6f8; --text: #17171a;
    --muted: #6e6e76; --accent: #c6851a; --ok: #12a150; --err: #d92d20;
    --line: #ececee; --line2: #d9d9de; --link: #a66e14; --link-hover: #7a4f0e;
    --accent-soft: rgba(198,133,26,.12);
  }
}
* { box-sizing: border-box; margin: 0; }
html { min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 'Plus Jakarta Sans', -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh; display: flex; flex-direction: column; gap: 14px;
  padding: 14px 20px 20px;
}
.hidden { display: none !important; }
.speed { font-variant-numeric: tabular-nums; }
a { color: var(--link); }

/* the title bar */
.top { display: flex; align-items: center; justify-content: space-between; flex: none; width: 100%; max-width: 640px; margin: 0 auto; }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
h1 .dot { color: var(--accent); }
h1 .home { color: inherit; text-decoration: none; }
.beta {
  font-size: 11px; font-weight: 800; letter-spacing: .04em; vertical-align: middle;
  padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.tools { display: flex; gap: 8px; }
.theme-toggle {
  width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: var(--card2); color: var(--muted); border: 1px solid var(--line); border-radius: 10px;
}
.theme-toggle:hover { background: var(--card2); color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.lang-toggle { width: auto; padding: 0 10px; font-weight: 800; font-size: 12px; }
.btn.connect { height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; font-size: 13px; }

button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  padding: 10px 20px; font-family: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; text-align: center;
}
button:hover, .btn:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; }
button.ghost, .btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line2); }
button.ghost:hover, .btn.ghost:hover { background: var(--card2); border-color: var(--muted); color: var(--text); }

/* one centred column; the square stays square-ish on any screen */
.shell { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-start; gap: 22px; }
.win { display: flex; flex-direction: column; gap: 12px; }
.square {
  aspect-ratio: 5 / 4; max-height: 62vh; min-height: 320px; display: grid; place-items: center; text-align: center;
  padding: 24px; border-radius: 22px; border: 2px dashed var(--line2);
  transition: border-color .15s, background-color .15s;
}
#dropCard.over .square { border-color: var(--accent); background: var(--accent-soft); }
#dropCard:not([data-state="idle"]) .square { border: 1px solid var(--line); background: var(--card2); }

/* empty: the round amber + */
.zone { display: flex; flex-direction: column; align-items: center; max-width: 600px; text-wrap: balance; }
.disc {
  width: clamp(72px, 14vmin, 104px); aspect-ratio: 1; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 4px 9px color-mix(in srgb, var(--accent) 35%, transparent);
}
.disc:hover { background: color-mix(in srgb, var(--accent) 92%, #fff); }
.disc svg { width: 44%; height: 44%; }
.zone-title { font-size: clamp(20px, 3.4vmin, 28px); font-weight: 800; letter-spacing: -.02em; margin-top: 22px; }
.zone-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* a dropped file: the card */
.live { display: none; flex-direction: column; align-items: center; max-width: 480px; min-width: 0; }
#dropCard:not([data-state="idle"]) .zone { display: none; }
#dropCard:not([data-state="idle"]) .live { display: flex; }
.ring { width: clamp(88px, 20vmin, 168px); aspect-ratio: 1; }
.ring circle, .ring path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ring circle { stroke-width: 4; }
.ring .track { stroke: var(--line2); }
.ring .arc {
  stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 22px 22px; transition: stroke-dashoffset .2s, stroke .35s;
}
.ring .tick, .ring .alert { stroke-width: 3; opacity: 0; transition: opacity .3s; }
.ring .tick { stroke: var(--ok); }
.ring .alert { stroke: var(--err); }
#dropCard[data-state="connecting"] .arc { stroke-dashoffset: 72; animation: sweep 1s linear infinite; }
#dropCard[data-state="paused"] .arc { stroke: var(--muted); }
#dropCard[data-state="done"] .arc { stroke: var(--ok); }
#dropCard[data-state="done"] .tick,
#dropCard[data-state="blocked"] .alert,
#dropCard[data-state="dead"] .alert { opacity: 1; }
#dropCard[data-state="blocked"] .arc,
#dropCard[data-state="dead"] .arc { display: none; }
#dropCard[data-state="blocked"] .track,
#dropCard[data-state="dead"] .track { stroke: var(--err); }
@keyframes sweep { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }

/* waiting: the QR code takes the ring's place */
.qr { display: none; width: clamp(150px, 30vmin, 240px); padding: 10px; background: #fff; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
#dropCard[data-state="waiting"] .qr { display: block; }
#dropCard[data-state="waiting"] .ring { display: none; }

.fline { display: flex; gap: 6px; max-width: 100%; margin-top: 18px; font-size: 14px; }
.fname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmeta { color: var(--muted); white-space: nowrap; }
.fmeta:not(:empty)::before { content: "· "; }
.head { font-size: clamp(19px, 3vmin, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin-top: 8px; }
.sub { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 6px; white-space: pre-line; }
.status { display: flex; gap: 14px; justify-content: center; min-height: 20px; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* the action row: one height, what the state offers */
.acts { display: flex; gap: 10px; min-height: 52px; }
.acts > * { display: none; flex: 1; min-width: 0; align-items: center; justify-content: center; }
.acts input {
  flex: 3; background: var(--card2); border: 1px solid var(--line2); border-radius: 12px;
  color: var(--text); padding: 10px 14px; font-family: inherit; font-size: 14px;
}
#dropCard[data-state="idle"] #dPickFile,
#dropCard[data-state="idle"] #dPickFolder,
#dropCard[data-state="waiting"] #dLink,
#dropCard[data-state="waiting"] #dCopy,
#dropCard[data-state="blocked"] #dRetry,
#dropCard[data-state="blocked"] #dApp,
#dropCard[data-state="done"] #dAgain,
#dropCard[data-state="done"] #dNew,
#dropCard[data-state="dead"] #dNew,
#dropCard:not([data-state="idle"], [data-state="done"], [data-state="dead"]) #dCancel { display: flex; }
#dropCard[data-state="waiting"] #dCancel { flex: none; }
.err { color: var(--err); font-size: 13px; text-align: center; }

/* the foot: three things to know, then the app */
.limits { flex: none; display: flex; flex-direction: column; gap: 14px; }
.limits-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.limits ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.limits li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.limits li b { display: block; color: var(--text); font-weight: 700; font-size: 14px; }
.tip-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tip-ic svg { width: 17px; height: 17px; }
.app-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card2); font-size: 13px; color: var(--muted); }
.limits .foot { flex: none; border-radius: 999px; padding: 7px 18px; font-size: 13px; }

@media (max-width: 600px) {
  body { padding: 12px 16px 20px; }
  .square { aspect-ratio: auto; min-height: 300px; }
  .acts { flex-wrap: wrap; }
  .acts input { flex: 1 1 100%; }
  #dropCard[data-state="waiting"] #dCancel { flex: 1; }
  .app-line { flex-direction: column; align-items: stretch; text-align: center; }
}

/* peeza.app's footer line */
.site-foot { width: 100%; max-width: 640px; margin: 8px auto 0; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 18px; font-size: 12.5px; color: var(--muted); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
  max-width: min(360px, calc(100vw - 32px)); text-align: center;
  background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; line-height: 1.5;
  padding: 9px 14px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
