/* The Box - the page for someone without the app (spec 18). The look is the Phase 2
   mockup's "Nate's phone" panel (design/the-box-phase2-mockup.html). Light and dark
   follow the visitor's device. No framework, no build step. */
:root {
  --page: #f6f7fa; --surface: #ffffff; --surface-2: #f6f7fa; --line: #e3e6ec; --line-2: #d5d9e1;
  --ink: #151821; --ink-2: #4b5262; --ink-3: #7c8494;
  --accent: #4f46e5; --accent-soft: #eef0ff; --accent-line: #c9ccfb;
  --secret: #b45309; --secret-soft: #fff6e8; --ok: #16a34a; --danger: #dc2626;
  --link-bg: #e8f4ff; --link-fg: #0b6bcb; --file-bg: #eefaf1; --file-fg: #15803d; --pic-bg: #fdf0f7; --pic-fg: #be185d;
  --shadow: 0 1px 2px rgba(20,24,33,.06), 0 8px 28px rgba(20,24,33,.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #12141b; --surface: #1b1e27; --surface-2: #232734; --line: #2b3040; --line-2: #3a4050;
    --ink: #eceef3; --ink-2: #b7bcc8; --ink-3: #8a91a0;
    --accent: #8b85ff; --accent-soft: #24264a; --accent-line: #4a47a0;
    --secret: #f2a54a; --secret-soft: #3a2a14;
    --link-bg: #1b2a3c; --link-fg: #6fb3f2; --file-bg: #1b2e22; --file-fg: #5fcb7f; --pic-bg: #34202c; --pic-fg: #f08bbe;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.top .logo { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.top .logo svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top .name { font-weight: 700; font-size: 17px; letter-spacing: -.02em; flex: 1; }
.top .getapp { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 5px 11px; text-decoration: none; white-space: nowrap; }
main { max-width: 520px; margin: 0 auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.center { text-align: center; }
.muted { color: var(--ink-3); font-size: 13px; }
p { margin: 0; }
h1 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lead { color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }
.lead b { color: var(--ink); }

/* the code */
input.code { width: 100%; font: 600 26px/1 "JetBrains Mono", ui-monospace, Consolas, monospace; letter-spacing: 8px; text-align: center;
  border: 2px solid var(--accent-line); border-radius: 12px; padding: 12px; outline: none; background: var(--surface); color: var(--ink); }
input.code:focus { border-color: var(--accent); }
input.code:disabled { opacity: .5; }
.err { color: var(--danger); font-weight: 600; font-size: 12.5px; min-height: 18px; margin: 8px 0; text-align: center; }
.err.ok { color: var(--ok); }
button.go { appearance: none; border: 0; width: 100%; height: 44px; border-radius: 11px; background: var(--accent); color: #fff;
  font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.go:disabled { opacity: .5; cursor: default; }
button.text { appearance: none; border: 0; background: none; color: var(--accent); font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; padding: 10px; width: 100%; }
.rules { color: var(--ink-3); font-size: 11.5px; line-height: 1.5; margin-top: 10px; }

/* who */
.who { display: flex; align-items: center; gap: 10px; padding: 4px 2px 2px; }
.who .av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who b { display: block; font-size: 14px; }
.who small { color: var(--ink-3); font-size: 11.5px; }

/* items, as the app's cards */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 11px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 9px 12px; }
.item .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.item .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.k-link .ic { background: var(--link-bg); color: var(--link-fg); }
.k-file .ic, .k-folder .ic { background: var(--file-bg); color: var(--file-fg); }
.k-picture .ic { background: var(--pic-bg); color: var(--pic-fg); }
.k-secret .ic { background: var(--secret-soft); color: var(--secret); }
.item .body { flex: 1; min-width: 0; }
.content { cursor: pointer; overflow-wrap: anywhere; }
.txt { white-space: pre-wrap; }
.txt.capped { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ttl { font-weight: 600; }
.sub { color: var(--ink-3); font-size: 12.5px; }
.thumb { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; margin: 2px 0 4px; }
.dots { letter-spacing: 3px; font-weight: 700; color: var(--secret); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; color: var(--ink-3); font-size: 11.5px; }
.meta .exp { color: var(--ink-3); }
.meta .exp.soon { color: var(--secret); font-weight: 600; }
.meta .burn { color: var(--secret); font-weight: 600; }
.acts { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.ab { appearance: none; border: 0; border-radius: 8px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); color: var(--ink);
  font: 600 12.5px Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ab svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab.small { padding: 4px 8px; font-size: 11.5px; }
.empty { color: var(--ink-3); text-align: center; padding: 18px 10px; font-size: 13px; }
.gone { color: var(--ink-3); text-align: center; font-size: 12.5px; padding: 6px; }

/* get the app */
.get { background: var(--surface); border: 1px solid var(--accent-line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.get .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.get .logo svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.get b { display: block; font-size: 13px; }
.get small { display: block; color: var(--ink-2); font-size: 11.5px; }
.get .ab { margin-left: auto; background: var(--accent); color: #fff; }
.note { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 0 12px; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 8px); background: #1d2130; color: #fff; font-size: 12.5px; font-weight: 500;
  padding: 7px 13px; border-radius: 9px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; z-index: 9; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
