/* app.css 0.1.1 — KangaFile / KangHop / HopKang. One engine, two skins, light first.
 * Layout: one screen. Header, a stage split in two by a seam (send | receive) with Hop at the seam, footer.
 * Brand = [data-brand] on <html>. Dark = [data-hop-theme="dark"] on <html>, set only by the page's own switch. */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

/* ---------- tokens: KangaFile, light. Colours measured from the supplied Hop tile and brand sheet of 2026-11-23:
   road-sign yellow and the kangaroo's own ink. ---------- */
:root {
  color-scheme: light;
  --tile: #FFD308;                 /* the tile behind Hop */
  --ink: #0D1326; --ink-2: #3F4660; --ink-3: #636C85;
  --paper: #FFFFFF; --paper-2: #F4F5F8; --line: #DDE0E8; --line-2: #BFC5D4;
  --send: #FFD308; --send-ink: #0D1326;
  --recv: #0D1326; --recv-ink: #FFD308;
  --accent: #0D1326;               /* links, second half of the wordmark */
  --focus: #0D1326; --trail: #0D1326;
  --ok: #1E7F4F; --warn: #8A5A00; --bad: #B3261E; --ok-soft: #E6F4EC; --bad-soft: #FBECEB;
  /* the two panes */
  --send-bg: #FFD308; --send-fg: #0D1326; --send-fg-2: rgba(13, 19, 38, .72); --send-card: #FFFFFF; --send-card-ink: #0D1326; --send-glow: rgba(255, 255, 255, .36);
  --recv-bg: #0D1326; --recv-fg: #FFFFFF; --recv-fg-2: rgba(255, 255, 255, .78); --recv-box: rgba(255, 255, 255, .08); --recv-box-line: rgba(255, 255, 255, .5);
  --recv-btn: #FFD308; --recv-btn-ink: #0D1326; --recv-glow: rgba(255, 211, 8, .12);
  --shade: 13, 19, 38;
  --font: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --word-weight: 800; --word-track: -.03em;
  --r-xl: 32px; --r-lg: 24px; --r-md: 16px; --r-sm: 10px;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
}
/* ---------- KangHop / HopKang, light: the same yellow with the brand's purple ---------- */
:root[data-brand="kanghop"], :root[data-brand="hopkang"] {
  --recv: #5B38D9; --recv-ink: #FFFFFF;
  --accent: #5B38D9;
  --recv-bg: #5B38D9; --recv-box: rgba(255, 255, 255, .13); --recv-box-line: rgba(255, 255, 255, .55);
  --recv-btn: #FFFFFF; --recv-btn-ink: #5B38D9; --recv-glow: rgba(255, 255, 255, .12);
  --font: "Fredoka", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --word-weight: 600; --word-track: -.01em;
}
/* ---------- dark ("Night" on the brand sheet): deep grounds, the yellow moves onto the controls ---------- */
:root[data-hop-theme="dark"] {
  color-scheme: dark;
  --ink: #EEF0F6; --ink-2: #C2C7D6; --ink-3: #949BB0;
  --paper: #141A30; --paper-2: #0B1020; --line: #283052; --line-2: #3D4770;
  --recv: #283052; --recv-ink: #FFD308;
  --accent: #FFD308; --focus: #FFD308; --trail: #FFD308;
  --ok: #4FD1A1; --warn: #F0B455; --bad: #F08A80; --ok-soft: rgba(79, 209, 161, .14); --bad-soft: rgba(240, 138, 128, .14);
  --send-bg: #1A1943; --send-fg: #EEF0F6; --send-fg-2: rgba(238, 240, 246, .74); --send-card: #FFD308; --send-card-ink: #0D1326; --send-glow: rgba(255, 211, 8, .10);
  --recv-bg: #0B1020; --recv-fg: #EEF0F6; --recv-fg-2: rgba(238, 240, 246, .78); --recv-box: rgba(255, 211, 8, .07); --recv-box-line: rgba(255, 211, 8, .5);
  --recv-btn: #FFD308; --recv-btn-ink: #0D1326; --recv-glow: rgba(255, 211, 8, .07);
  --shade: 0, 0, 0;
}
:root[data-hop-theme="dark"][data-brand="kanghop"], :root[data-hop-theme="dark"][data-brand="hopkang"] {
  --recv: #5B38D9; --recv-ink: #FFFFFF;
  --accent: #B7A4FF; --focus: #B7A4FF;
  --recv-bg: #241A5C; --recv-box: rgba(183, 164, 255, .10); --recv-box-line: rgba(183, 164, 255, .55);
  --recv-btn: #B7A4FF; --recv-btn-ink: #0D1326; --recv-glow: rgba(183, 164, 255, .08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 16px; line-height: 1.45; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.pane-recv :focus-visible, .view-hop .node-dst :focus-visible { outline-color: var(--recv-btn); }
.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.grow { flex: 1; }

/* ---------- frame ---------- */
.app { min-height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 8px var(--gr) 8px var(--gl); background: var(--ink); color: var(--paper); font-size: 13px; }
.preview-note b { font-weight: 700; margin-right: 6px; }
.seg { display: inline-flex; border: 1px solid rgba(127, 127, 127, .55); border-radius: 999px; padding: 2px; }
.seg-btn { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: inherit; }
.seg-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.top { grid-row: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gr) 10px var(--gl); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.mark { width: 44px; height: 44px; flex: none; border-radius: 22%; overflow: hidden; background: var(--tile); }
.mark img { display: block; width: 100%; height: 100%; }
.wm { display: grid; line-height: 1.05; min-width: 0; }
.wm-name { font-size: 23px; font-weight: var(--word-weight); letter-spacing: var(--word-track); white-space: nowrap; }
.wm-name b { font-weight: inherit; }
.wm-name i { font-style: normal; color: var(--accent); }
.wm-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; margin-top: 3px; }
.top-r { display: flex; align-items: center; gap: 4px; flex: none; }
.text-btn { padding: 9px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.text-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; color: var(--ink-2); border: 1px solid var(--line); background: var(--paper); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.stage { grid-row: 3; display: grid; min-height: 0; }
.view { min-width: 0; }
.foot { grid-row: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 10px var(--gr) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gl); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); background: var(--paper); }
.foot a { color: inherit; font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-facts { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.foot-facts span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--send); margin-right: 7px; vertical-align: 2px; }

/* ---------- 1. home ---------- */
.view-home { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.pane { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 44px var(--gr) 44px var(--gl); min-height: 300px; }
.pane::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; filter: blur(8px); }
.pane-send { background: var(--send-bg); color: var(--send-fg); }
.pane-send::before { right: -18%; top: -22%; background: radial-gradient(closest-side, var(--send-glow), transparent); }
.pane-recv { background: var(--recv-bg); color: var(--recv-fg); }
.pane-recv::before { left: -20%; bottom: -26%; background: radial-gradient(closest-side, var(--recv-glow), transparent); }
.pane > * { position: relative; }
.big-word { font-size: clamp(34px, 4.4vw, 46px); font-weight: var(--word-weight); letter-spacing: var(--word-track); line-height: 1; }
.big-send { width: clamp(176px, 21vw, 224px); aspect-ratio: 1; border-radius: var(--r-xl); background: var(--send-card); color: var(--send-card-ink); display: grid; place-items: center; align-content: center; gap: 14px; box-shadow: 0 2px 0 rgba(var(--shade), .10), 0 18px 40px -12px rgba(var(--shade), .42); transition: transform .16s ease, box-shadow .16s ease; }
.big-send .ic { font-size: clamp(56px, 6vw, 72px); stroke-width: 2; }
.big-send:hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(var(--shade), .10), 0 26px 48px -14px rgba(var(--shade), .5); }
.big-send:active { transform: translateY(1px) scale(.985); }
.pane-hint { font-size: 17px; font-weight: 500; color: inherit; opacity: .86; }
.pane-note { font-size: 13.5px; color: var(--recv-fg-2); max-width: 300px; }
.pane-note:empty { display: none; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 9px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: inherit; border: 1.5px solid currentColor; opacity: .82; }
.ghost-btn:hover { opacity: 1; background: rgba(var(--shade), .06); }
.recv-head { display: grid; justify-items: center; gap: 10px; }
.recv-head .ic { font-size: clamp(54px, 6vw, 70px); stroke-width: 2; }
.code-row { display: flex; gap: 10px; margin-top: 4px; }
.code-box { width: clamp(54px, 15vw, 66px); height: clamp(66px, 18vw, 80px); border-radius: var(--r-md); border: 2px solid var(--recv-box-line); background: var(--recv-box); color: var(--recv-fg); font-family: var(--mono); font-weight: 700; font-size: clamp(28px, 7.4vw, 36px); text-align: center; text-transform: uppercase; caret-color: currentColor; padding: 0; }
.code-box::placeholder { color: var(--recv-fg-2); }
.code-box:focus { outline: none; border-color: var(--recv-fg); background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.code-row.shake { animation: shake .32s; }
.recv-btn { margin-top: 6px; min-width: 176px; padding: 15px 30px; border-radius: var(--r-md); background: var(--recv-btn); color: var(--recv-btn-ink); font-size: 19px; font-weight: 700; transition: transform .14s ease, opacity .14s ease; }
.recv-btn:disabled { opacity: .45; cursor: default; }
.recv-btn:not(:disabled):hover { transform: translateY(-2px); }
.seam { position: absolute; left: 50%; top: 50%; z-index: 2; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 10px 26px -8px rgba(var(--shade), .5); }
.seam img { width: 64px; height: 64px; border-radius: 22%; display: block; }
:root[data-hop-theme="dark"] .seam { box-shadow: 0 0 0 2px var(--line-2), 0 10px 26px -8px rgba(0, 0, 0, .7); }

/* ---------- 2. share ---------- */
.view-share { background: var(--send-bg); color: var(--send-fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px var(--gr) 32px var(--gl); }
.share { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 22px 56px; width: min(100%, 860px); }
.share.no-qr { grid-template-columns: auto; }
.share-main { grid-column: 1; grid-row: 1; }
.share-qr { grid-column: 2; grid-row: 1 / span 2; }
.share-cancel { grid-column: 1; grid-row: 2; justify-self: center; margin-top: 0; }
.share-main { display: grid; justify-items: center; gap: 14px; text-align: center; min-width: 0; max-width: 100%; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
.code-big { display: flex; gap: 10px; }
.code-big span { width: clamp(60px, 17vw, 84px); height: clamp(74px, 21vw, 102px); display: grid; place-items: center; border-radius: var(--r-lg); background: var(--send-card); color: var(--send-card-ink); font-family: var(--mono); font-weight: 700; font-size: clamp(36px, 10vw, 54px); box-shadow: 0 2px 0 rgba(var(--shade), .10), 0 14px 30px -12px rgba(var(--shade), .45); }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-size: 15.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .14s ease, background .14s ease; }
.btn:active { transform: scale(.97); }
.btn .ic { font-size: 18px; }
.btn-solid { background: var(--ink); color: var(--paper); }
.view-share .btn-solid { background: var(--send-fg); color: var(--send-bg); }
.btn-line { border: 1.5px solid currentColor; color: inherit; }
.btn-line:hover { background: rgba(var(--shade), .07); }
.btn-sm { padding: 8px 13px; font-size: 14px; }
.btn-ok { background: var(--send); color: var(--send-ink); }
.share-wait { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 4px; }
.share-ttl { font-family: var(--mono); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--send-fg-2); }
.share-qr { display: grid; justify-items: center; gap: 8px; }
.qr-box { width: 188px; height: 188px; padding: 12px; border-radius: var(--r-lg); background: #FFFFFF; box-shadow: 0 14px 30px -12px rgba(var(--shade), .45); }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-cap { font-size: 13.5px; color: var(--send-fg-2); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }

/* ---------- 3. the hop ---------- */
.view-hop { background: var(--paper-2); display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 18px var(--gr) 30px var(--gl); }
.view-hop > * { width: min(100%, 760px); }
.hop-bar { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.hop-state { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ok); min-width: 0; }
.hop-state span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hop-state .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.hop-state.is-off { color: var(--ink-3); } .hop-state.is-off .dot { box-shadow: none; }
.hop-banner { padding: 11px 14px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line-2); font-weight: 600; }
.hop-banner.is-bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.trail { display: flex; align-items: flex-end; gap: 8px; padding: 6px 0 0; }
.node { flex: none; width: 76px; display: grid; justify-items: center; gap: 7px; }
.node-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; transition: transform .25s ease, box-shadow .25s ease; }
.node-src .node-ic { background: var(--send); color: var(--send-ink); }
.node-dst .node-ic { background: var(--recv); color: var(--recv-ink); }
.node-lb { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.node.is-you .node-lb { color: var(--ink); font-weight: 800; }
.node.is-you .node-ic { box-shadow: 0 0 0 4px var(--paper-2), 0 0 0 6px var(--ink); }
.node.caught .node-ic { animation: caught .7s ease; }
.track { position: relative; flex: 1; min-width: 0; height: 104px; margin: 0 20px 26px; }
.track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-base { fill: none; stroke: var(--line-2); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: .1 10; }
.arc-done { fill: none; stroke: var(--trail); stroke-width: 4; stroke-linecap: round; }
.hopper { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 22%; overflow: hidden; background: var(--tile); box-shadow: 0 6px 14px -4px rgba(var(--shade), .55); will-change: transform; }
.hopper img { display: block; width: 100%; height: 100%; }
.hop-stats { text-align: center; font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: -8px; min-height: 20px; }
.hop-stats b { color: var(--ink); font-weight: 700; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; box-shadow: 0 1px 0 rgba(var(--shade), .04), 0 16px 34px -22px rgba(var(--shade), .35); }
.drop { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 30px 16px; border: 2px dashed var(--line-2); border-radius: var(--r-md); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.drop { background: color-mix(in srgb, var(--send) 9%, var(--paper)); }
.drop:hover, .drop.is-over { background: color-mix(in srgb, var(--send) 18%, var(--paper)); border-color: var(--ink); }
.drop.is-small { padding: 12px 16px; }
.drop.is-small .drop-hint { display: none; }
.drop-hint { font-size: 14.5px; color: var(--ink-3); }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 12px; font-weight: 600; color: var(--ink-2); }
.files:not(:empty) + .waiting { padding: 8px 12px 4px; font-size: 14.5px; color: var(--ink-3); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files:empty { display: none; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.file-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--paper-2); color: var(--ink-2); }
.file.is-done .file-ic { background: var(--ok-soft); color: var(--ok); }
.file-body { min-width: 0; display: grid; }
.file-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.file.is-done .file-meta { color: var(--ok); font-weight: 600; }
.file.is-off .file-name { color: var(--ink-3); text-decoration: line-through; }
.file-act { display: flex; gap: 6px; }
.file-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: var(--ink-3); border: 1px solid var(--line); }
.file-x:hover { color: var(--bad); border-color: var(--bad); }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; width: 100%; height: 100%; transform-origin: left center; transform: scaleX(0); background: var(--trail); border-radius: 3px; }
.trust { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); text-align: center; }

/* ---------- overlay sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gr) calc(16px + env(safe-area-inset-bottom, 0px)) var(--gl); background: rgba(8, 11, 24, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .16s ease; }
.sheet { width: min(100%, 440px); max-height: 100%; overflow: auto; background: var(--paper); color: var(--ink); border-radius: var(--r-xl); padding: 28px 24px 24px; display: grid; justify-items: center; gap: 12px; text-align: center; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6); animation: rise .2s ease; }
.sheet:focus { outline: none; }
.sheet-title { font-size: 23px; font-weight: var(--word-weight); letter-spacing: var(--word-track); line-height: 1.15; text-wrap: balance; }
.sheet-text { font-size: 16px; color: var(--ink-2); max-width: 340px; text-wrap: pretty; }
.sheet-text b { color: var(--ink); }
.sheet-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; }
.sheet-ic.is-bad { background: var(--bad-soft); color: var(--bad); }
.sheet-ic.is-ok { background: var(--ok-soft); color: var(--ok); }
.sheet-ic.is-hop { background: var(--tile); overflow: hidden; border-radius: 22%; }
.sheet-ic.is-hop img { width: 100%; height: 100%; display: block; }
.sheet .btn { margin-top: 6px; }
.sheet-link { font-size: 14px; color: var(--ink-3); text-decoration: underline; padding: 6px; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.pic-big { font-size: 84px; line-height: 1.05; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pic-name { font-size: 26px; font-weight: var(--word-weight); letter-spacing: var(--word-track); }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.pick { display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--paper); transition: transform .12s ease, border-color .12s ease; }
.pick:hover { border-color: var(--ink); background: color-mix(in srgb, var(--send) 14%, var(--paper)); transform: translateY(-2px); }
.pick-emoji { font-size: 46px; line-height: 1.1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pick-name { font-size: 14.5px; font-weight: 700; }
.wait-line { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-3); }
.wait-line .spin { width: 18px; height: 18px; border-width: 3px; }

/* ---------- how it works ---------- */
.how-back { position: fixed; inset: 0; z-index: 20; background: rgba(8, 11, 24, .5); animation: fade .16s ease; }
.how { position: fixed; z-index: 21; top: 0; right: 0; bottom: 0; width: min(100%, 430px); overflow: auto; background: var(--paper); color: var(--ink); padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gr) calc(26px + env(safe-area-inset-bottom, 0px)) 22px; display: grid; align-content: start; gap: 20px; box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .55); animation: slide .22s ease; }
.how-head { display: flex; align-items: center; justify-content: space-between; }
.how-head h2 { font-size: 24px; font-weight: var(--word-weight); letter-spacing: var(--word-track); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.how-steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.how-n { width: 32px; height: 32px; border-radius: 50%; background: var(--send); color: var(--send-ink); display: grid; place-items: center; font-weight: 800; }
.how-steps h3 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.how-steps p { font-size: 15px; color: var(--ink-2); }
.mono-chip { font-family: var(--mono); font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); }
.how-facts { list-style: none; margin: 0; padding: 14px; display: grid; gap: 12px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line); }
.how-facts li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--ink-2); }
.how-facts .ic { font-size: 20px; color: var(--ok); margin-top: 2px; }
.how-facts b { display: block; color: var(--ink); font-size: 15px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 40; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 9px; max-width: min(100%, 460px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); animation: rise .2s ease; pointer-events: auto; }
.toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .ic { font-size: 18px; }
.toast.is-ok .ic { color: #6EE7B7; } .toast.is-bad .ic { color: #FFA69E; }
:root[data-hop-theme="dark"] .toast.is-ok .ic { color: #0B7A52; } :root[data-hop-theme="dark"] .toast.is-bad .ic { color: #B3261E; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }

.noscript { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--paper); font-weight: 600; text-align: center; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .view-home { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .pane { min-height: 0; padding: 20px var(--gr) 20px var(--gl); gap: 8px; }
  .pane-send { padding-bottom: 44px; } .pane-recv { padding-top: 44px; }
  .big-send { width: 148px; border-radius: 28px; gap: 8px; } .big-send .ic { font-size: 50px; } .big-word { font-size: 31px; }
  .code-box { height: 62px; } .btn { padding: 11px 15px; font-size: 15px; }
  .recv-head { grid-auto-flow: column; align-items: center; gap: 12px; } .recv-head .ic { font-size: 38px; }
  .pane-hint { font-size: 15.5px; }
  .recv-btn { padding: 13px 26px; font-size: 18px; }
  .seam { width: 68px; height: 68px; margin: -34px 0 0 -34px; } .seam img { width: 48px; height: 48px; }
  .wm-name { font-size: 21px; } .text-btn { padding: 9px 8px; font-size: 14px; }
  .node { width: 58px; } .node-ic { width: 52px; height: 52px; font-size: 23px; } .track { height: 84px; margin-left: 17px; margin-right: 17px; }
  .file.has-btn .file-act { grid-column: 1 / -1; } .file.has-btn .file-act .btn { width: 100%; }
  .file-meta { white-space: normal; }
  .hopper { width: 34px; height: 34px; }
  .view-share { justify-content: flex-start; padding-top: 26px; }
  .share { grid-template-columns: minmax(0, 1fr); } .share-main, .share-qr, .share-cancel { grid-column: 1; grid-row: auto; }
  .qr-box { width: 156px; height: 156px; padding: 10px; }
  .how { top: auto; left: 0; width: 100%; max-height: 88%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-left: var(--gl); animation: rise .22s ease; }
}
@media (max-width: 380px) { .wm-sub { display: none; } .code-row { gap: 8px; } }
@media (max-height: 560px) and (min-width: 721px) { .pane { padding-top: 20px; padding-bottom: 20px; } .big-send { width: 150px; } }

/* ---------- motion ---------- */
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes caught { 30% { transform: scale(1.16); } 60% { transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; } }
