/* packages/design/tokens.css */
/* The design tokens of att: the one place a colour, a font, a size or a shape is written.
   components.css uses var(--…) from this file and no literal colour, so a second app that loads both files
   gets the same library and player in its own look by changing this file alone.

   The look is B, Waking Up's, which the owner picked in round 2 of ATT-2 (2026-11-05, decision 4: "B").
   Its values are copied from GitHub/bama/wakingup1/app/src/tokens.css, which is only read: near-black,
   grey surfaces, green for play and progress, the system sans, rounded cards, round white play buttons. */

:root {
  color-scheme: dark;

  /* ---- colour: the page and its surfaces ---- */
  --color-bg: #0f0f0f;
  --color-surface: #141414;           /* a row, a card */
  --color-surface-2: #1a1a1a;         /* a meter's track, a pressed control */
  --color-bar-bg: #1c1c1c;            /* the player bar */
  --color-line: #1f1f1f;
  --color-line-strong: #2a2a2a;

  /* ---- colour: text ---- */
  --color-text-strong: #ffffff;
  --color-text: #e8e8e8;
  --color-text-muted: #8a8a8a;
  --color-text-faint: #5c5c5c;

  /* ---- colour: the accent, play, progress and listened ---- */
  --color-accent: #5bc95b;
  --color-accent-ink: #0b1a0e;        /* text on a solid accent */
  --color-accent-bg: #15251a;         /* a listened row's tint, the playing row */
  --color-accent-line: #2b5a36;
  --color-track: #2a2a2a;
  --color-danger: #e57a5f;

  /* ---- type ---- */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-body: 15px;
  --text-title: 28px;
  --text-h2: 18px;
  --text-h3: 16px;
  --text-row: 16px;
  --text-meta: 12.5px;
  --text-label: 11px;
  --weight-strong: 600;

  /* ---- space and size ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --page-max: 760px;                  /* the library's column on a wide screen */
  --bar-max: 1180px;                  /* the player bar's content on a wide screen */
  --tap: 44px;                        /* the least a finger can hit */
  --play-row: 44px;                   /* the least a finger can hit (ATT-2-D2, the coordinator's call) */
  --play-bar: 52px;
  --mark: 28px;                       /* the listened mark at a row's start */

  /* ---- shape ---- */
  --radius-row: 12px;
  --radius-card: 12px;
  --radius-bar: 14px;
  --radius-round: 999px;
  --bar-outer: 8px;                   /* the bar floats as a card above the page's foot */
  --bar-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);

  /* ---- review pictures only: the dashed ring round what to look at ---- */
  --ring: #e0389b;
}

/* packages/design/components.css */
/* The components of att's library and player, in the look tokens.css gives them. Every colour, font and
   shape here is a var(--…) of tokens.css. A wide screen is anything from 720px; below that is a phone.

   top        the app's name and the size of the library
   continue   the card at the top with the exercise to play next (P10)
   channel    one channel's heading, then its levels
   level      a level's heading with "4 of 18" (P9), open or closed (P8), and its rows
   row        an exercise: whether you listened to it, short name, length, how far you got, play (P6),
              opening to its details (P7)
   pbar       the player bar at the bottom while something plays (P11-P13, P17, P31)

   No row, card or bar shows a picture: the owner dropped them in round 2 as taking too much space.

   ended      the bar once an exercise has ended: "Listened" and the next one as a button (P15)
   failed     the bar when the audio cannot be played: "Unable to load this audio file." (P18)
   signin     the sign-in page with the one password (P1)

   A row is .is-new (not started), .is-part (started, not finished) or .is-done (listened to, P21), read apart
   by the mark at its start: an empty ring, a ring filled as far as you got, a filled green check. The owner
   picked this way in round 3 of ATT-2. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.icon { width: 22px; height: 22px; display: block; fill: currentColor; }
h1, h2, h3 { font-weight: var(--weight-strong); color: var(--color-text-strong); margin: 0; line-height: 1.2; }
h1 { font-size: var(--text-title); margin-bottom: 16px; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
.label { font-size: var(--text-label); font-weight: var(--weight-strong); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }

/* ---- the page ---- */
.page { max-width: var(--page-max); margin: 0 auto; padding: 16px 16px 200px; }
.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.top .mark-name { font-size: 17px; font-weight: var(--weight-strong); color: var(--color-text-strong); }
.top .mark-name b { color: var(--color-accent); font-weight: inherit; }
.top .size { font-size: var(--text-meta); color: var(--color-text-muted); }

/* ---- a meter: how far, as a thin line ---- */
.meter { height: 4px; border-radius: 2px; background: var(--color-track); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--color-accent); }

/* ---- continue ---- */
.continue {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-line-strong); border-radius: var(--radius-card);
  padding: 14px 14px 14px 16px; margin-bottom: 24px;
}
.continue h2 { margin: 2px 0 0; }
.continue .meta { font-size: var(--text-meta); color: var(--color-text-muted); }
.continue .meter { grid-column: 1 / -1; margin-top: 6px; }
.continue .play { width: var(--play-bar); height: var(--play-bar); grid-row: 1 / 2; grid-column: 2; }

/* ---- channel and level ---- */
.channel { margin-top: 22px; }
.channel > .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.channel > .head .meta { font-size: var(--text-meta); color: var(--color-text-muted); white-space: nowrap; }
.level > .head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: var(--tap); padding: 6px 2px;
  border-bottom: 1px solid var(--color-line);
}
.level > .head .count { display: flex; align-items: center; gap: 8px; font-size: var(--text-meta); color: var(--color-text-muted); white-space: nowrap; }
.level > .head .count .meter { width: 54px; }
.level > .head .chev { width: 18px; height: 18px; fill: var(--color-text-muted); }
.level.open > .head .chev { transform: rotate(180deg); }
.rows { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 6px; }

/* ---- row ---- */
.row {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: var(--mark) 1fr auto; gap: 12px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-row);
  padding: 8px 8px 8px 12px; min-height: 58px;
}
.row .name { font-size: var(--text-row); font-weight: var(--weight-strong); color: var(--color-text-strong); line-height: 1.25; }
.row .meta { font-size: var(--text-meta); color: var(--color-text-muted); margin-top: 1px; }
.row .meta .part { color: var(--color-accent); }
.row .meta .done { color: var(--color-accent); font-weight: var(--weight-strong); }
.row.playing { border-color: var(--color-accent); background: var(--color-accent-bg); }
.row.playing .name { color: var(--color-accent); }

/* the mark at a row's start: an empty ring, a ring filled as far as you got, a filled check */
.mark { width: var(--mark); height: var(--mark); border-radius: 50%; display: grid; place-items: center; }
.is-new .mark { border: 2px solid var(--color-line-strong); }
.is-part .mark {
  background:
    radial-gradient(closest-side, var(--color-surface) 72%, transparent 74%),
    conic-gradient(var(--color-accent) var(--got), var(--color-track) 0);
}
.row.playing.is-part .mark {
  background:
    radial-gradient(closest-side, var(--color-accent-bg) 72%, transparent 74%),
    conic-gradient(var(--color-accent) var(--got), var(--color-track) 0);
}
.is-done .mark { background: var(--color-accent); color: var(--color-accent-ink); }
.is-done .mark .icon { width: 18px; height: 18px; }

.play {
  width: var(--play-row); height: var(--play-row); display: grid; place-items: center; flex: none;
  background: var(--color-text-strong); color: var(--color-bg); border-radius: var(--radius-round);
}
.play .icon { width: 18px; height: 18px; }
.play.on { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---- a row opened (P7) ---- */
.more { grid-column: 1 / -1; padding: 4px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.more .full { flex-basis: 100%; font-size: 14px; color: var(--color-text); margin: 0; }
.more .when { font-size: var(--text-meta); color: var(--color-text-muted); margin: 0; }
.more .yt {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px;
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-round);
  font-size: 13px; color: var(--color-text-strong); text-decoration: none;
}
.more .yt .icon { width: 16px; height: 16px; }

/* ---- player bar ---- */
.pbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 0 var(--bar-outer) var(--bar-outer);
  background: linear-gradient(to bottom, transparent, var(--color-bg) 24px);
}
.pbar .in {
  max-width: var(--bar-max); margin: 0 auto;
  background: var(--color-bar-bg); border-top: 1px solid var(--color-line-strong); border-radius: var(--radius-bar);
  box-shadow: var(--bar-shadow); padding: 10px 12px 8px 16px;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "now x" "seek seek" "ctl ctl"; gap: 4px 10px; align-items: center;
}
.pbar .now { grid-area: now; min-width: 0; }
.pbar .pname { font-size: 16px; font-weight: var(--weight-strong); color: var(--color-text-strong); line-height: 1.2; }
.pbar .pch { font-size: var(--text-meta); color: var(--color-text-muted); }
.pbar .x { grid-area: x; width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--color-text-muted); }
.pbar .seek { grid-area: seek; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 11.5px; color: var(--color-text-muted); }
.pbar .track { position: relative; height: 4px; border-radius: 2px; background: var(--color-track); }
.pbar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--color-accent); }
.pbar .track b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--color-text-strong); }
.pbar .ctl { grid-area: ctl; display: flex; justify-content: center; align-items: center; gap: 18px; }
.pbar .ctl button { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--color-text-strong); }
.pbar .ctl .pp { width: var(--play-bar); height: var(--play-bar); border-radius: var(--radius-round); background: var(--color-text-strong); color: var(--color-bg); }
.pbar .ctl .icon { width: 26px; height: 26px; }
.pbar .ctl .pp .icon { width: 24px; height: 24px; }

/* ---- the bar once an exercise has ended (P15): it says so and offers the next, which does not start by itself ---- */
.pbar .ended { grid-area: seek / seek / ctl / ctl; display: flex; align-items: center; gap: 12px; padding: 6px 0 4px; }
.pbar .ended .mark { flex: none; background: var(--color-accent); color: var(--color-accent-ink); }
.pbar .ended .mark .icon { width: 18px; height: 18px; }
.pbar .ended p { margin: 0; flex: 1; font-size: 14px; color: var(--color-text); }
.pbar .ended p b { color: var(--color-accent); font-weight: var(--weight-strong); }
.next {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px 0 14px; flex: none;
  background: var(--color-text-strong); color: var(--color-bg); border-radius: var(--radius-round);
  font-size: 14px; font-weight: var(--weight-strong);
}
.next .icon { width: 18px; height: 18px; }

/* ---- the bar when the audio cannot be played (P18) ---- */
.pbar .failed { grid-area: seek / seek / ctl / ctl; display: flex; align-items: center; gap: 12px; padding: 6px 0 4px; }
.pbar .failed p { margin: 0; flex: 1; font-size: 14px; color: var(--color-danger); }

/* ---- the sign-in page (P1) ---- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin form { width: 100%; max-width: 360px; display: grid; gap: 10px; }
.signin .mark-name { font-size: 17px; font-weight: var(--weight-strong); color: var(--color-text-strong); margin: 0; }
.signin .mark-name b { color: var(--color-accent); font-weight: inherit; }
.signin h1 { margin: 6px 0 14px; }
.signin label { font-size: var(--text-meta); color: var(--color-text-muted); }
.signin input {
  font: inherit; font-size: 16px; color: var(--color-text-strong); min-height: var(--tap); padding: 0 14px;
  background: var(--color-surface); border: 1px solid var(--color-line-strong); border-radius: var(--radius-row);
}
.signin input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: transparent; }
.signin button[type="submit"] {
  min-height: var(--play-bar); margin-top: 6px; border-radius: var(--radius-round);
  background: var(--color-text-strong); color: var(--color-bg); font-size: 16px; font-weight: var(--weight-strong);
}
.signin .err { min-height: 1.4em; margin: 0; font-size: 14px; color: var(--color-danger); }

/* ---- a wide screen ---- */
@media (min-width: 720px) {
  .page { padding: 28px 24px 160px; }
  .pbar { padding: 0 calc(var(--bar-outer) * 2) calc(var(--bar-outer) * 2); }
  .pbar .in {
    grid-template-columns: 260px 1fr 260px; grid-template-areas: "now ctl x" "now seek x";
    padding: 12px 18px 12px 22px; gap: 2px 24px;
  }
  .pbar .x { justify-self: end; }
  .pbar .seek { max-width: 560px; width: 100%; justify-self: center; }
  .pbar .ctl { gap: 14px; }
  .pbar .ended, .pbar .failed { grid-area: ctl / ctl / seek / seek; max-width: 560px; width: 100%; justify-self: center; }
}

/* apps/share/web/share.css */
/* Share's own look, after the design base (packages/design tokens.css and components.css), as drawn in
   apps/share/design/. Phone first; from 720px wide the wide layouts of the *-1280 screens.
   Share's additions to the tokens: a danger tint and line, the amber of "soon" and "unfinished", the monospace
   font of plain text, and two radius names. */

:root {
  --danger-bg: #24130e;
  --danger-line: #5a2c20;
  --warn: #e5b45f;
  --warn-bg: #17150f;
  --warn-line: #3d3524;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --round: 999px;
}

html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; }
h1 { margin: 0; font-size: 28px; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 22px; height: 22px; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.s { width: 18px; height: 18px; }
.meta { font-size: 12.5px; color: var(--color-text-muted); }
.muted { color: var(--color-text-muted); }
.wrap { max-width: var(--max, 760px); margin: 0 auto; padding: 0 16px; }
.wrap.wide { --max: 1120px; }
.wrap.mid { --max: 960px; }
.wrap.narrow { --max: 440px; }
.wrap.pw { --max: 420px; }
main.wrap { padding-top: 8px; padding-bottom: 40px; }

/* ---- header: home mark + app name, a chip on the right ---- */
.hd { height: 56px; display: flex; align-items: center; gap: 6px; }
.hd .home { width: 44px; height: 44px; display: grid; place-items: center; color: var(--color-text-muted); margin-left: -10px; }
.hd .name { font-size: 22px; font-weight: 700; color: var(--color-text-strong); letter-spacing: -0.01em; text-decoration: none; }
.hd .mk { width: 30px; height: 30px; border-radius: 8px; margin-right: 6px; display: block; }
.hd .sp { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px; border-radius: var(--round); background: var(--color-surface-2); color: var(--color-text-strong); font-weight: 600; font-size: 15px; text-decoration: none; }
.chip .ic { color: var(--color-accent); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--round); font-weight: 600; font-size: 15px; white-space: nowrap; border: 1px solid transparent; text-decoration: none; color: var(--color-text-strong); cursor: pointer; }
.btn.pri { background: #fff; color: #0f0f0f; }
.btn.sec { border-color: var(--color-line-strong); background: var(--color-surface); }
.btn.dan { border-color: var(--danger-line); color: var(--color-danger); background: transparent; }
.btn.danfill { background: var(--color-danger); color: #1c0a05; }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.btn:disabled, .btn.off { opacity: 0.38; }
.btn.sm { padding: 0 14px; font-size: 14px; }
.link { color: var(--color-accent); text-decoration: none; font-weight: 600; }
.tap { min-height: 44px; display: inline-flex; align-items: center; }
.btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---- cards and rows ---- */
.card { background: var(--color-surface); border: 1px solid var(--color-line-strong); border-radius: var(--radius); padding: 16px; }
.stack { display: grid; gap: 8px; }
.frow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 8px 6px 8px 10px; min-height: 62px; }
.frow.two { grid-template-columns: 40px minmax(0, 1fr); }
.frow.bad { border-color: var(--danger-line); background: var(--danger-bg); }
.frow .n { font-weight: 600; color: var(--color-text-strong); font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.frow .m { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }
.frow .meter { margin-top: 7px; }
.frow .btn.sm { margin-top: 8px; }
.tile { width: 40px; height: 40px; border-radius: 10px; background: var(--color-surface-2); border: 1px solid var(--color-line-strong); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--color-text-muted); }
.tile.g { color: var(--color-accent); background: var(--color-accent-bg); border-color: var(--color-accent-line); }
.tile.r { color: var(--color-danger); background: var(--danger-bg); border-color: var(--danger-line); }
.tile.w { color: var(--warn); border-color: var(--warn-line); }
.x { width: 44px; height: 44px; display: grid; place-items: center; color: var(--color-text-muted); }
.meter { height: 6px; border-radius: 3px; background: var(--color-track); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--color-accent); border-radius: 3px; transition: width 0.2s; }
.meter.thin { height: 4px; }
.meter.big { height: 8px; margin: 12px 0 8px; }
.meter.paused i { background: #6f6f6f; }
.meter.warn i { background: var(--warn); }

/* ---- segmented control ---- */
.seg { display: flex; background: var(--color-surface-2); border: 1px solid var(--color-line); border-radius: var(--round); padding: 3px; max-width: 360px; }
.seg button { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--round); color: var(--color-text-muted); font-weight: 600; font-size: 15px; padding: 0 16px; }
.seg button[aria-pressed="true"] { background: var(--color-line-strong); color: var(--color-text-strong); }
.seg.inline { display: inline-flex; margin-bottom: 10px; }
.seg.inline button { flex: none; }

/* ---- options ---- */
.opts { padding: 12px 16px 14px; }
.opt { padding: 14px 0; border-top: 1px solid var(--color-line); }
.opt:first-child { border-top: 0; padding-top: 4px; }
.opt .t { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.opt .t b { font-weight: 600; color: var(--color-text-strong); }
.opt .t small { display: block; font-size: 12.5px; color: var(--color-text-muted); font-weight: 400; }
.pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.pills button { min-height: 44px; display: grid; place-items: center; border-radius: var(--round); border: 1px solid var(--color-line-strong); font-weight: 600; font-size: 14px; color: var(--color-text); }
.pills button[aria-pressed="true"] { background: var(--color-accent-bg); border-color: var(--color-accent); color: var(--color-accent); }
.sw { width: 51px; height: 31px; border-radius: 16px; background: var(--color-track); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #bdbdbd; transition: left 0.15s; }
.sw[aria-checked="true"] { background: var(--color-accent); }
.sw[aria-checked="true"]::after { left: 23px; background: #fff; }
/* the switch's own box is 31px high: a 44px target round it */
.sw { margin: 6px 0; outline-offset: 4px; }
.sw::before { content: ""; position: absolute; inset: -7px -4px; }
.step { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.step .b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-line-strong); display: grid; place-items: center; color: var(--color-text-strong); font-size: 20px; }
.step input { width: 64px; height: 44px; border-radius: var(--radius); background: var(--color-bg); border: 1px solid var(--color-line-strong); text-align: center; font-size: 17px; font-weight: 600; color: var(--color-text-strong); -moz-appearance: textfield; }
.step input::-webkit-inner-spin-button, .step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.in { min-height: 48px; display: flex; align-items: center; gap: 10px; background: var(--color-bg); border: 1px solid var(--color-line-strong); border-radius: var(--radius); padding: 0 6px 0 14px; font-size: 16px; color: var(--color-text-strong); }
.in:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.in.bad, .in.bad:focus-within { border-color: var(--color-danger); box-shadow: 0 0 0 1px var(--color-danger); }
.in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; color: var(--color-text-strong); padding: 0; min-height: 46px; }
.in input::placeholder { color: var(--color-text-faint); }
.in .grow { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.in.pad { margin-top: 10px; }
.err { color: var(--color-danger); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.err.warn { color: var(--warn); }
.err.slot { min-height: 24px; margin: 8px 0 6px; }
.banner { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--danger-bg); border: 1px solid var(--danger-line); margin-bottom: 16px; }
.banner .ic { color: var(--color-danger); margin-top: 1px; }
.banner b { display: block; color: var(--color-text-strong); font-weight: 600; }
.banner p { font-size: 14px; color: var(--color-text); margin-top: 2px; }
.note { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--color-text-muted); margin-top: 16px; }
.free { display: flex; gap: 6px; align-items: center; margin-top: 14px; }
.label.lead { margin-bottom: 10px; }
.label.gap { margin: 24px 0 10px; }
.label.faint { color: var(--color-text-faint); margin: 26px 0 10px; }

/* ---- the upload page ---- */
.title { margin-bottom: 16px; }
.drop { border: 1.5px dashed #3a3a3a; border-radius: 16px; background: var(--color-surface); display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 20px; margin-top: 16px; }
.drop .bub { width: 56px; height: 56px; border-radius: 50%; background: var(--color-accent-bg); color: var(--color-accent); display: grid; place-items: center; margin-bottom: 6px; }
.drop .bub .ic { width: 26px; height: 26px; }
.drop .btn { margin-top: 12px; }
.drop.over { border-color: var(--color-accent); background: var(--color-accent-bg); border-style: solid; }
.drop.over .bub { background: var(--color-accent); color: var(--color-accent-ink); }
.drop.over .btn { visibility: hidden; }
.drop.over p { font-size: 14px; color: var(--color-text); }
.drop .wide-only, .wide-free { display: none; }
.picked { margin-top: 20px; }
.addmore { margin-top: 10px; width: 100%; }
.split > aside { margin-top: 24px; }
.go { margin-top: 18px; }
.overall .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.overall .pct { font-size: 20px; font-weight: 700; color: var(--color-text-strong); }
.overall .label + .row1 { margin-top: 6px; }
.upfiles { margin-top: 12px; }
.cancelnote { margin-top: 10px; text-align: center; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: var(--round); background: var(--color-surface-2); font-size: 13.5px; color: var(--color-text); }
.fact .ic { color: var(--color-text-muted); }
.unf { border-color: var(--warn-line); background: var(--warn-bg); }
.unf .label { color: var(--warn); }
.unf h2 { margin: 6px 0 4px; }
.unf .meter { margin: 12px 0; }
.unf .lines { display: grid; gap: 6px; font-size: 14px; }
.unf .lines div { display: flex; justify-content: space-between; gap: 12px; }
.unf .lines span:first-child { color: var(--color-text-strong); overflow-wrap: anywhere; }
.unf .lines span:last-child { color: var(--color-text-muted); white-space: nowrap; }
.unf .two { display: flex; gap: 8px; margin-top: 16px; }
.unf .two .btn { flex: 1; }
.unf + .seg, .unfs + .seg { margin-top: 24px; }
.titlebar + .unfs { margin-bottom: 20px; }
.unfs { display: grid; gap: 12px; }

/* text mode */
.textbox { padding: 0; overflow: hidden; }
.textbox.bad { border-color: var(--color-danger); }
.textbox textarea { display: block; width: 100%; min-height: 280px; resize: vertical; background: none; border: 0; outline: 0; padding: 14px 16px; font-family: var(--mono); font-size: 14px; line-height: 1.55; color: var(--color-text); }
.textbox .foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--color-line); }
.textbox .foot .over { color: var(--color-danger); font-weight: 600; }
.textmode .err { margin-top: 10px; }

/* ---- done ---- */
.donehead { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.donehead h1 { font-size: 26px; }
.donehead .meta { font-size: 14px; margin-top: 4px; }
.bigic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface-2); color: var(--color-text-muted); margin-bottom: 18px; }
.bigic .ic { width: 30px; height: 30px; }
.bigic.g { background: var(--color-accent-bg); color: var(--color-accent); }
.bigic.r { background: var(--danger-bg); color: var(--color-danger); }
.bigic.sm { width: 52px; height: 52px; margin: 0; }
.bigic.sm.r { margin-bottom: 14px; }
.codecard { padding: 22px 16px; }
.codeblock { display: grid; justify-items: center; gap: 14px; text-align: center; }
.code { font-size: 46px; font-weight: 700; letter-spacing: 0.08em; color: var(--color-text-strong); line-height: 1; font-variant-numeric: tabular-nums; }
.code em { font-style: normal; display: inline-block; width: 0.35em; }
.qr { background: #fff; border-radius: 14px; padding: 12px; display: inline-block; line-height: 0; margin-top: 6px; }
.qr svg { display: block; width: var(--qr, 190px); height: var(--qr, 190px); }
.linkrow { display: flex; gap: 8px; align-items: center; }
.linkrow .in { flex: 1; min-width: 0; padding-right: 14px; }
.linkrow .in .ic { color: var(--color-text-muted); }
.linkbox { margin-top: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; margin-top: 18px; }
.kv div { padding: 11px 0; border-top: 1px solid var(--color-line); font-size: 14.5px; }
.kv div:nth-child(-n+2) { border-top: 0; }
.kv .k { color: var(--color-text-muted); padding-right: 16px; }
.kv .v { color: var(--color-text-strong); text-align: right; }
.donebtns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---- manage ---- */
.summary { font-size: 14px; margin: 4px 0 18px; }
.srow { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 12px 12px 10px; }
.srow .top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: 0; }
.srow .n { font-weight: 600; color: var(--color-text-strong); font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.srow .n span { color: var(--color-text-muted); font-weight: 400; }
.srow .m { font-size: 12.5px; color: var(--color-text-muted); margin-top: 3px; }
.srow .left { text-align: right; font-size: 14px; color: var(--color-text-strong); font-weight: 600; white-space: nowrap; }
.srow .left small { display: block; font-size: 12px; color: var(--color-text-muted); font-weight: 400; }
.srow .left.soon { color: var(--warn); }
.srow.unf { background: var(--warn-bg); border-color: var(--warn-line); }
.srow.unf .top { grid-template-columns: 40px minmax(0, 1fr); }
.srow.unf .n { margin-top: 2px; }
.srow.unf .meter { margin-top: 8px; }
.acts { display: flex; gap: 6px; margin-top: 10px; }
.acts .btn { min-height: 44px; padding: 0 8px; font-size: 13.5px; gap: 6px; flex: 1 1 0; min-width: 0; background: var(--color-surface-2); border-color: var(--color-line-strong); }
.acts .btn:first-child { flex-grow: 1.45; }
.acts .btn.dan { background: transparent; border-color: var(--danger-line); }
.acts .btn.pri { background: #fff; color: #0f0f0f; border-color: #fff; }

/* overlays: a sheet from the bottom on the phone, a dialog in the middle on a wide screen */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); z-index: 10; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; background: #181818; border-top: 1px solid var(--color-line-strong); border-radius: 20px 20px 0 0; padding: 8px 16px calc(28px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #3a3a3a; margin: 0 auto 14px; }
.sheet .head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.sheet .head .x { margin: -8px -10px 0 0; }
.sheet .codeblock { padding: 12px 0 18px; }
.sheet .end p { margin: 8px 0 18px; color: var(--color-text); }
.sheet .end h2 { font-size: 20px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--color-text-strong); color: var(--color-bg); font-weight: 600; padding: 10px 18px; border-radius: var(--round); z-index: 20; font-size: 14px; }

/* ---- centred pages: empty manage, ended, password, pickup ---- */
/* a centred page is the window less the header: its main adds no padding round it */
main.wrap:has(> .center) { padding-top: 0; padding-bottom: 0; }
.center { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); display: grid; align-content: center; justify-items: center; text-align: center; padding-bottom: 56px; }
.center.form { justify-items: stretch; text-align: left; }
.center.form .bigic { justify-self: center; }
.center.form h1, .center.form > p.muted { text-align: center; }
.center h1 { font-size: 24px; margin-bottom: 8px; }
.center h1.ended { line-height: 1.3; margin-bottom: 0; }
.center h1 + .muted { margin-bottom: 22px; }
.center .link.tap { margin-top: 22px; }
.center .meta.lbl { margin-bottom: 6px; }
.center.form .pickup-signin { text-align: center; margin-top: 28px; }
.center.form .pickup-signin a { font-size: 14px; color: var(--color-text-muted); font-weight: 500; }
.empty .muted { margin-bottom: 20px; }

/* the six code cells, with the one real field over them */
.cells { position: relative; display: grid; grid-template-columns: repeat(3, 1fr) 10px repeat(3, 1fr); gap: 8px; }
.cells span { height: 60px; border-radius: var(--radius); background: var(--color-surface); border: 1px solid var(--color-line-strong); display: grid; place-items: center; font-size: 28px; font-weight: 700; color: var(--color-text-strong); }
.cells span.cur { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.cells.bad span { border-color: var(--color-danger); }
.cells.off span { color: var(--color-text-faint); background: var(--color-bg); }
.cells input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; }
.cells.off input { pointer-events: none; }

/* ---- the share page ---- */
.recv { padding-top: 12px; }
.recv h1 { margin-top: 6px; }
.recv .sub { font-size: 14px; margin-top: 4px; }
.recv .facts { margin: 14px 0 20px; }
.recv .after { margin-top: 16px; }
.textacts { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
pre.txt { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--color-text); }
.mdcard { padding: 18px 18px 8px; overflow-x: auto; }
.md { font-size: 15.5px; line-height: 1.6; color: var(--color-text); overflow-wrap: anywhere; }
.md h1, .md h2 { font-size: 21px; margin: 0 0 10px; }
.md h3, .md h4, .md h5, .md h6 { font-size: 16px; margin: 18px 0 8px; }
.md p, .md pre, .md blockquote { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md ul.task { list-style: none; padding-left: 0; }
.md li.task { display: flex; gap: 10px; align-items: center; }
.md .cb { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #5a5a5a; display: grid; place-items: center; flex: none; }
.md .cb.on { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.md .cb .ic { width: 13px; height: 13px; stroke-width: 3; }
.md a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.md code { font-family: var(--mono); font-size: 13.5px; background: var(--color-surface-2); border: 1px solid var(--color-line-strong); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--color-surface-2); border: 1px solid var(--color-line-strong); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.md pre code { border: 0; padding: 0; background: none; }
.md blockquote { border-left: 3px solid var(--color-line-strong); padding-left: 12px; color: var(--color-text-muted); }
.md del, .md s { color: var(--color-text-muted); }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 0 0 12px; }
.md th, .md td { border: 1px solid var(--color-line-strong); padding: 7px 10px; text-align: left; }
.md th { background: var(--color-surface-2); color: var(--color-text-strong); font-weight: 600; }
.md hr { border: 0; border-top: 1px solid var(--color-line-strong); margin: 16px 0; }

/* ---- a wide screen: the *-1280 screens ---- */
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  header.line { border-bottom: 1px solid var(--color-line); }
  .hd { height: 64px; }
  main.wrap { padding-top: 36px; }
  .center { min-height: calc(100vh - 65px); } /* the header and its 1px line */
  .drop { padding: 64px 20px; }
  .drop .wide-only { display: block; }
  .drop .phone-only, .phone-free { display: none; }
  .wide-free { display: block; }
  .unf + .drop, .unfs ~ .drop { padding: 32px 20px; }
  .titlebar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
  .titlebar .title { margin: 0; }
  .titlebar .seg { width: 300px; }
  .split { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
  .split > aside { margin-top: 0; }
  .split .picked { margin-top: 0; }
  .split .go { margin-top: 16px; }
  .addmore { width: auto; }
  .btns, .donebtns { flex-direction: row; }
  .btns .btn.big, .donebtns .btn.big { width: auto; flex: 1; }
  .textbox textarea { min-height: 360px; }
  .donehead { margin-bottom: 28px; }
  main.done { padding-top: 40px; }
  .donegrid { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
  .donegrid .codecard { padding: 28px 16px; }
  .donegrid .linkbox { margin-top: 0; }
  .srow:not(.unf) { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px auto; gap: 16px; align-items: center; padding: 12px 12px 12px 14px; }
  .srow:not(.unf) .top { display: contents; }
  .srow:not(.unf) .left { text-align: left; }
  .srow:not(.unf) .acts { margin: 0; width: 400px; }
  .srow.unf .acts { justify-content: flex-end; }
  .srow.unf .acts .btn { flex: none; width: 140px; }
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: 440px; border: 1px solid var(--color-line-strong); border-radius: 18px; padding: 24px; }
  .sheet .grab { display: none; }
  .sheet .btns { margin-top: 0; }
  .recv { padding-top: 40px; }
}
