/*
 * Koi Server's front end: one plain stylesheet, no build step (Ricky, 10 November 2026). Ported from the prototype's
 * version 24, whose rules hold here:
 *   - Inter for words and figures, figures lined up (tabular);
 *   - orange (--ks) is Koi Server's AI speaking or recommending, and nothing else;
 *   - indigo (--hd) is navigation or "where you are": back buttons, links beside section titles, header icons;
 *   - a white page, soft blue-tinted boxes, and a deep blue bar along the foot in light view;
 *   - headers in title case, never a bare number beside one; anything that navigates or cancels is a button with an edge.
 * Colours are named once, here, as tokens: use the token, never the colour itself.
 */

:root {
    color-scheme: light;
    --bg: #ffffff; --surface: #f3f7fb; --well: #e7eef5;
    --ink: #1d2122; --ink-2: #4b5254; --ink-3: #66707a; --line: #dde5ee; --line-2: #c4d0dd;
    --accent: #1f6aa8; --accent-soft: #d9e8f6; --on-accent: #ffffff;
    --green: #2f7d45; --green-soft: #dff0e3; --red: #b3261e; --red-soft: #fbe4e2; --amber: #8a5d00; --amber-soft: #fbefd0;
    --ks: #c95508; --ks-soft: #fdebd9; --on-ks: #ffffff;
    --hd: #4f46e5; --on-hd: #ffffff;
    /* Each kind of sale has its colour (the prototype's): auction blue, fixed price purple; grey for a koi no longer priced */
    --k-auction: #1f6aa8; --k-fixed: #8a4fb0; --k-none: #8a949c;
    --nav-bg: #14324f; --nav-ink: rgba(255, 255, 255, .72); --nav-on: #ffffff; --nav-sel: rgba(255, 255, 255, .14);
    --staging: #0369a1;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --assistant-width: 440px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #121516; --surface: #1b1f20; --well: #232829;
        --ink: #eef1ec; --ink-2: #c3c9c5; --ink-3: #9aa29f; --line: #2f3536; --line-2: #3d4445;
        --accent: #6db3ee; --accent-soft: rgba(109, 179, 238, .15); --on-accent: #0d1a24;
        --green: #7cc286; --green-soft: rgba(124, 194, 134, .15); --red: #f2877f; --red-soft: rgba(242, 135, 127, .15); --amber: #f5b82e; --amber-soft: rgba(245, 184, 46, .14);
        --ks: #ff9a52; --ks-soft: rgba(255, 154, 82, .16); --on-ks: #241303;
        --hd: #a5b4fc; --on-hd: #14163a;
        --k-auction: #6db3ee; --k-fixed: #c9a2ea; --k-none: #7d878f;
        --nav-bg: color-mix(in srgb, var(--surface) 92%, transparent); --nav-ink: var(--ink-3); --nav-on: var(--accent); --nav-sel: var(--accent-soft);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121516; --surface: #1b1f20; --well: #232829;
    --ink: #eef1ec; --ink-2: #c3c9c5; --ink-3: #9aa29f; --line: #2f3536; --line-2: #3d4445;
    --accent: #6db3ee; --accent-soft: rgba(109, 179, 238, .15); --on-accent: #0d1a24;
    --green: #7cc286; --green-soft: rgba(124, 194, 134, .15); --red: #f2877f; --red-soft: rgba(242, 135, 127, .15); --amber: #f5b82e; --amber-soft: rgba(245, 184, 46, .14);
    --ks: #ff9a52; --ks-soft: rgba(255, 154, 82, .16); --on-ks: #241303;
    --hd: #a5b4fc; --on-hd: #14163a;
    --k-auction: #6db3ee; --k-fixed: #c9a2ea; --k-none: #7d878f;
    --nav-bg: color-mix(in srgb, var(--surface) 92%, transparent); --nav-ink: var(--ink-3); --nav-on: var(--accent); --nav-sel: var(--accent-soft);
}

/* The page */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
/* The bar along the foot: 54px of its own, and under it only part of the iPhone's home-indicator strip (Ricky, 17 November
   2026: "The bottom nav bar can loose a little bit of height, there is a lot of space under it") */
:root { --bar-under: max(6px, calc(env(safe-area-inset-bottom, 0px) - 12px)); }
body.has-tabs { padding-bottom: calc(66px + var(--bar-under)); }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.022em; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; padding: 8px 12px; background: var(--surface); border-radius: 10px; }
/* Words for a screen reader alone, where the page says it by colour (a sale's kind) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.staging { background: var(--staging); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: calc(5px + env(safe-area-inset-top, 0px)) 12px 5px; }

.app {
    max-width: 720px; margin: 0 auto; padding-block: 20px 32px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.page { display: grid; gap: 18px; }
.ptitle { display: grid; gap: 6px; }
.ptitle .sub, .note { color: var(--ink-2); font-size: 14px; }
.note.warn { color: var(--amber); }
.eyebrow { font: 700 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hsec { display: grid; gap: 10px; scroll-margin-top: 72px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.sec-title h2 { display: flex; align-items: center; gap: 10px; }
.h-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--hd); color: var(--on-hd); box-shadow: 0 2px 6px color-mix(in srgb, var(--hd) 30%, transparent); }
.h-ic .ic { width: 18px; height: 18px; }
.box { display: grid; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.warn { color: var(--amber); font-weight: 650; }

/* The bar across the top */
.topbar {
    position: sticky; top: 0; z-index: 15; padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.tb-inner {
    max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 6px; min-height: 58px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand b { display: block; font-size: 16px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
.brand small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--ink-2); cursor: pointer; }
.tb-btn:hover, .tb-btn[aria-expanded="true"] { background: var(--well); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 750 15px var(--font); flex: none; }

/* The person's menu */
.menu-scrim { position: fixed; inset: 0; z-index: 28; }
.menu {
    position: fixed; z-index: 29; top: calc(env(safe-area-inset-top, 0px) + 62px); right: max(12px, calc(50vw - 356px));
    width: min(330px, calc(100vw - 24px)); display: grid; gap: 14px; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.me-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.me-row b { display: block; }
.me-row span span { display: block; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.mgroup { display: grid; gap: 6px; }
.label { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--well); }
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 6px 10px; min-height: 40px; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
/* A choice made with a thumb (the order of the koi to choose from): as tall as the search box beside it */
.seg.big { padding: 4px; border-radius: 14px; }
.seg.big button { min-height: 44px; border-radius: 10px; font-size: 15px; }
.menu-set { display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--bg); color: var(--ink); text-decoration: none; }
.menu-set:hover { border-color: var(--ink-3); }

/* Buttons. Navigation (back) is indigo; actions keep their own looks: primary black, others outlined. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink);
    font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.quiet { background: none; color: var(--ink-2); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .back:focus-visible, .switch:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, .add-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.back {
    justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 12px;
    border: 1.5px solid var(--hd); border-radius: 12px; background: var(--hd); color: var(--on-hd);
    font: 650 15px var(--font); text-decoration: none; cursor: pointer;
}
.back:hover { filter: brightness(1.08); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font: 700 11px var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* Lists of rows: settings, people, permissions */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.set-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 64px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.set-row:hover { background: var(--well); }
.set-row b { display: block; font-weight: 700; }
.set-row.with-btn { grid-template-columns: 36px minmax(0, 1fr) auto; }
.set-row span span { display: block; font-size: 13px; color: var(--ink-3); }
.set-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--well); color: var(--ink-2); }
.chev { width: 16px; height: 16px; color: var(--ink-3); }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px; }
.prow .avatar { grid-row: 1 / 3; align-self: start; }
.pname { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pname b { font-weight: 700; }
.prow .meta { grid-column: 2 / 4; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.prow select { max-width: 176px; }
.change { padding: 12px 16px; font-size: 14px; overflow-wrap: anywhere; }
.change span { display: block; font-size: 13px; color: var(--ink-3); }
.join { display: grid; gap: 4px; margin-top: 8px; font-weight: 650; color: var(--ink-2); }
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"], input[type="number"] {
    min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--bg); color: var(--ink); padding: 0 12px; max-width: 100%;
}
input { font-size: 16px; } /* 16 px or more, or an iPhone zooms in on the field */
/* A drop-down in Koi Server's own look, not the system's (Ricky, 17 November 2026): as tall as a button, rounded, its own
   arrow drawn in the page's colours, the words large enough to read and tap. */
select {
    appearance: none; -webkit-appearance: none; min-height: 48px; border-radius: 12px; padding: 0 40px 0 14px; font: 600 16px var(--font); cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
    background-position: calc(100% - 21px) 52%, calc(100% - 15px) 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
select:disabled { cursor: default; opacity: .6; }
/* An iPhone draws a date or time box as a menu button, sizes it to the widest date it could show and adds its padding
   outside the width, so it stuck out of its box (Ricky, 16 November 2026). Drawn plainly, it keeps to the width it is given;
   tapping it still opens the phone's own date and time picker. */
input[type="date"], input[type="datetime-local"], input[type="time"] { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; text-align: left; }
input::-webkit-date-and-time-value { margin: 0; text-align: left; min-height: 1lh; }
select:disabled { opacity: .7; }
.field { display: grid; gap: 4px; min-width: 0; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field input, .field select { width: 100%; font-weight: 400; }
.err { font-size: 14px; color: var(--red); font-weight: 600; }
/* The wording on the platform a send would replace, read before it goes: as words, its lines kept. */
.said-there { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line-2); background: var(--bg); border-radius: 0 10px 10px 0; color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.addp { display: grid; gap: 12px; padding: 14px 16px; }
.addp.added { background: var(--green-soft); }
.add-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; background: none; color: var(--accent); font-weight: 650; cursor: pointer; text-align: left; }
.add-row:hover { background: var(--well); }
.key { font: 650 15px var(--font); letter-spacing: .04em; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line-2); overflow-wrap: anywhere; user-select: all; }
.rn { display: grid; gap: 10px; }
.perm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; }
.pt b { display: block; font-weight: 650; }
.pt small { display: block; font-size: 13px; color: var(--ink-3); }
.switch { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.switch .track { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: var(--line-2); transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .track::after { transform: translateX(18px); }
.switch:disabled { cursor: default; opacity: .55; }

/* The bar along the foot: deep blue in light view, so it stands apart from the white page and the tinted boxes */
.navbar {
    position: fixed; z-index: 16; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--nav-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    /* 14px in from each side, so the box round the tab shown at either end stays clear of an iPhone's rounded corners now
       that it sits lower */
    padding: 4px max(14px, env(safe-area-inset-right, 0px)) var(--bar-under) max(14px, env(safe-area-inset-left, 0px));
}
.navbar .inner { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); width: 100%; max-width: 720px; gap: 4px; }
.navbar a { display: grid; justify-items: center; align-content: end; gap: 2px; min-height: 50px; padding: 5px 4px; border-radius: 14px; color: var(--nav-ink); font: 650 12px var(--font); text-decoration: none; white-space: nowrap; }
.navbar a .ic { width: 22px; height: 22px; }
.navbar a[aria-current="page"] { color: var(--nav-on); background: var(--nav-sel); }
/* Sell, the raised blue circle in the middle of the bar (the prototype's), in a ring of the bar's own blue, with its count */
.navbar a.main { position: relative; padding-top: 0; background: none; }
.navbar a.main .main-ic { position: relative; display: grid; place-items: center; width: 54px; height: 54px; margin-top: -22px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--nav-bg), 0 6px 16px rgba(0, 0, 0, .25); }
.navbar a.main .main-ic .ic { width: 26px; height: 26px; }
.navbar a.main[aria-current="page"] .main-ic { background: color-mix(in srgb, var(--accent) 80%, #fff); }
.nav-n { position: absolute; top: -4px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--nav-bg); font: 750 12px/22px var(--font); text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
/* Sell's stages along the top, as the prototype's: the one shown in indigo */
.stages { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.stages button, .stages a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 76px; padding: 6px 4px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.stages b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stages span { font-size: 13px; font-weight: 650; line-height: 1.2; }
.stages small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.stages [aria-pressed="true"] { background: var(--hd); color: var(--on-hd); }
.stages [aria-pressed="true"] small { color: var(--on-hd); }
.stages a:hover, .stages button:hover:not([aria-pressed="true"]) { background: var(--well); }
.stage-arrow { color: var(--ink-3); text-align: center; }

/* What an action did, or why not, for a moment: a box of the page's own, a green tick for done, red where refused */
/* Centred by its margins, not a transform, so that its slide in never moves it off the middle. */
.said, .update {
    position: fixed; z-index: 40; left: 0; right: 0; margin: 0 auto; width: min(560px, calc(100vw - 32px));
    display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--ink);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}
/* At the top of the screen, just under the top bar, as an iPhone's own notices come (Ricky, 17 November 2026, "Top of
   screen"): at the foot it covered Sell's raised circle, and could cover a screen's own foot (Add Koi's Save, Plan Them). */
.said { top: calc(env(safe-area-inset-top, 0px) + 68px); font-size: 15px; font-weight: 600; cursor: pointer; animation: said-in .2s cubic-bezier(.2, .8, .2, 1); }
/* Under the week's target too, where it is part of the top bar (Sell, the Schedule and the rest, for whoever sells) */
body:has(.topbar .tstrip) .said { top: calc(env(safe-area-inset-top, 0px) + 125px); }
@keyframes said-in { from { transform: translateY(-10px); opacity: 0; } }
/* Something asked is under way (public/js/said.js): a thin indigo bar runs across the very top of the screen */
body.busy::before {
    content: ""; position: fixed; z-index: 60; top: env(safe-area-inset-top, 0px); left: 0; width: 40%; height: 3px; border-radius: 0 3px 3px 0;
    background: var(--hd); animation: busy-run 1.1s ease-in-out infinite;
}
@keyframes busy-run { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { body.busy::before { width: 100%; animation: none; opacity: .6; } }
/* A button whose asking is under way says so, with a small turning ring, and cannot be pressed twice */
.busy-words { display: inline-flex; align-items: center; gap: 8px; }
.busy-words::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: busy-turn .7s linear infinite; }
@keyframes busy-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy-words::before { animation: none; } }
@media (prefers-reduced-motion: reduce) { .said { animation: none; } }
/* Inside a sheet over the page, its own box, over the sheet's head (in the sheet, so that a tap on it is its own) */
.sheet .said { z-index: 5; }
.said-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.said-ic .ic { display: block; }
.said.refused { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.said.refused .said-ic { background: var(--red); color: #fff; }

/* A newer deploy of Koi Server: under the bar across the top, until Refresh or Later */
.update { top: calc(env(safe-area-inset-top, 0px) + 68px); z-index: 30; grid-template-columns: 36px minmax(0, 1fr) auto; background: var(--bg); border-color: var(--line-2); }
.update .said-ic { background: var(--accent-soft); color: var(--accent); }
.update-text b { display: block; font-weight: 700; }
.update-text span { display: block; font-size: 13px; color: var(--ink-2); }
.update-acts { display: flex; gap: 8px; }
@media (max-width: 520px) {
    .update { grid-template-columns: 36px minmax(0, 1fr); }
    .update-acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
    .update-acts .btn { min-height: 44px; }
}

/* Asking before an action: a sheet from the foot on a phone, a box in the middle on a computer, with buttons a thumb can't miss */
.ask {
    position: fixed; inset: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 90dvh; padding: 0; overflow: auto;
    border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
}
.ask[open] { animation: ask-up .2s cubic-bezier(.2, .8, .2, 1); }
.ask::backdrop { background: rgba(8, 18, 28, .45); }
.ask-in { display: grid; gap: 20px; max-width: 520px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.ask-in::before { content: ""; justify-self: center; width: 40px; height: 5px; margin-top: -12px; border-radius: 3px; background: var(--line-2); }
.ask-text { font-size: 17px; font-weight: 650; line-height: 1.45; }
.ask-acts { display: grid; gap: 10px; }
.ask-acts [data-ask="yes"] { order: -1; }
.ask-acts .btn { min-height: 54px; font-size: 16px; border-radius: 14px; }
@media (min-width: 700px) {
    .ask { margin: auto; width: min(460px, calc(100vw - 32px)); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
    .ask-in { padding: 24px; }
    .ask-in::before { display: none; }
    .ask-acts { grid-template-columns: 1fr 1fr; }
    .ask-acts [data-ask="yes"] { order: 0; }
    .ask-acts .btn { min-height: 48px; }
}
@keyframes ask-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ask[open] { animation: none; } }
body:has(.ask[open]) { overflow: hidden; }

/* A sheet over the page (the prototype's sale sheet, step 2 of the rebuild): up from the foot on a phone, as tall as it needs
   up to most of the screen, scrolling inside; a box in the middle on a computer. Its head stays in view as it scrolls. */
.sheet {
    position: fixed; inset: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; padding: 0; overflow: auto; overscroll-behavior: contain;
    border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--ink); box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
}
.sheet[open] { animation: ask-up .22s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(8, 18, 28, .45); }
.sheet-in { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 18px max(16px, env(safe-area-inset-left, 0px)) 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.sheet-head .sub { margin: 0; }
.eyebrow.kinded { display: inline-flex; align-items: center; gap: 6px; color: var(--t, var(--ink-3)); }
.eyebrow.kinded i { width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
@media (min-width: 700px) {
    .sheet { margin: auto; width: min(640px, calc(100vw - 32px)); max-height: 88dvh; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
}
/* Choosing koi fills the screen, as the prototype's Add Fish did */
.sheet.full { height: 100dvh; max-height: 100dvh; border-radius: 0; }
@media (min-width: 700px) { .sheet.full { width: min(960px, calc(100vw - 32px)); height: 92dvh; max-height: 92dvh; border-radius: 20px; } .sheet.full .sheet-in { max-width: 920px; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
body:has(.sheet[open]) { overflow: hidden; }


/*
 * Room for the RS11 Assistant (hub rule 6): beside the page on a computer, as a sheet from the foot on a phone. It is the
 * hub's own window (a frame from the hub's address, never the hub's code in this page), and it is empty and hidden until
 * the hub exists. When it is open, `body.assistant-open` moves the page aside on a computer so both stay in view.
 */
.assistant { position: fixed; z-index: 21; background: var(--bg); }
@media (min-width: 1101px) {
    .assistant { top: 0; right: 0; bottom: 0; width: min(var(--assistant-width), 100vw); border-left: 1px solid var(--line); }
    body.assistant-open .app, body.assistant-open .tb-inner { margin-left: max(16px, calc(50vw - 360px - var(--assistant-width) / 2)); margin-right: max(16px, calc(50vw - 360px + var(--assistant-width) / 2)); }
    body.assistant-open .navbar { padding-right: calc(var(--assistant-width) + 8px); }
}
@media (max-width: 1100px) {
    .assistant { left: 0; right: 0; bottom: 0; height: 88vh; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .2); padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* Signing in */
.si-page { min-height: 100vh; min-height: 100dvh; display: grid; align-content: start; justify-items: center; gap: 20px; padding: calc(40px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
.si-brand { display: grid; justify-items: center; gap: 4px; text-align: center; }
.si-brand b { font-size: 20px; font-weight: 750; letter-spacing: -.01em; margin-top: 6px; }
.si-brand small { color: var(--ink-3); font-size: 13px; }
.si-card, .si-steps { width: 100%; max-width: 400px; display: grid; gap: 14px; }
.si-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.si-steps { max-width: none; }
.si-card h1 { font-size: 22px; }
.si-card p { color: var(--ink-2); font-size: 14px; }
.code-in { font-size: 24px !important; letter-spacing: .3em; text-align: center; }
.qr { justify-self: center; width: 200px; height: 200px; padding: 8px; border-radius: 12px; background: #fff; }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.codes { margin: 0; padding: 12px 12px 12px 36px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line-2); display: grid; gap: 4px; font-weight: 650; letter-spacing: .03em; user-select: all; }
details.fold summary { cursor: pointer; font-size: 14px; font-weight: 650; color: var(--accent); min-height: 32px; display: flex; align-items: center; }
details.fold .key { margin-top: 6px; }

/* Smaller buttons on a row, such as New Password, and the room under a row's details for them */
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.row-acts { margin-top: 8px; }
.prow .addp { margin: 10px 0 0; padding: 12px; border-radius: 12px; color: var(--ink); }

/* The Fish tab: every koi once, with ticks for its picture and video (green in place, red missing) */
.fish-tools { display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink-3); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 16px; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 650; cursor: pointer; }
.chips button .n { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.chips button[aria-pressed="true"] { background: var(--hd); border-color: var(--hd); color: var(--on-hd); }
.chips button[aria-pressed="true"] .n { color: var(--on-hd); opacity: .85; }
/* One line that scrolls sideways (the Fish tab's filters), running to the screen's edges so that what is off it shows */
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); scroll-padding-inline: 16px; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll button { flex: none; white-space: nowrap; }
.fl-head, .fl-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px 36px; gap: 12px; align-items: center; padding: 10px 16px; }
.fl-head { grid-template-columns: minmax(0, 1fr) 36px 36px; padding-block: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.mk-h { display: grid; place-items: center; color: var(--ink-3); }
.fl-row { color: var(--ink); text-decoration: none; }
.fl-row:hover { background: var(--well); }
.fl-pic { width: 48px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--well); }
.fl-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fl-text { display: grid; gap: 1px; min-width: 0; }
.fl-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-3); }
.fl-chip { font-size: 20px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.mk { display: grid; place-items: center; }
.mk .ic { width: 26px; height: 26px; }
.mk.yes { color: var(--green); }
.mk.no { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A koi's own page */
.fish-title { font-size: 40px; letter-spacing: .01em; }
.go { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--hd); color: var(--on-hd); font-weight: 650; text-decoration: none; }
.go:hover { filter: brightness(1.08); }
.media { display: grid; gap: 12px; }
@media (min-width: 640px) { .media { grid-template-columns: 1fr 1fr; align-items: start; } }
.media figure { display: grid; gap: 6px; margin: 0; }
.media figcaption { font-size: 13px; color: var(--ink-3); }
.pic-btn { display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--well); cursor: zoom-in; }
.pic-btn img { display: block; width: 100%; height: auto; }
.media video { display: block; width: 100%; max-height: 70vh; border-radius: 16px; background: #000; }
.media-none { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 180px; border: 1.5px dashed var(--line-2); border-radius: 16px; color: var(--ink-3); font-weight: 600; }
.media-none .ic { width: 28px; height: 28px; }
.lightbox { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; align-content: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(0, 0, 0, .92); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; }
.marks-line { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.marks-line .mk { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.marks-line .mk .ic { width: 22px; height: 22px; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 12px 16px; }
.facts dt { font-size: 14px; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fl-text .fl-when { white-space: normal; }

/* Describing: three ticks to a row (picture, video, description), amber while a description waits for approval */
.fl-head, .fl-row { grid-template-columns: 48px minmax(0, 1fr) 30px 30px 30px; gap: 8px; }
.fl-head { grid-template-columns: minmax(0, 1fr) 30px 30px 30px; }
.mk .ic { width: 24px; height: 24px; }
.mk.wait { color: var(--amber); }
.desc-box { width: 100%; min-height: 220px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); resize: vertical; }
.desc-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.desc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.desc-text.small { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.waiting-box { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.final-box { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.final-box .btn { justify-self: start; }
.versions { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 12px; }

/* The knowledge base: notes on each item, each with its switch for whether Koi Server uses it */
.kn-note { display: grid; gap: 6px; padding: 14px 16px; }
.kn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.switch .sw-label { margin-left: 10px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.desc-box.short { min-height: 96px; }
.note.pad { padding: 14px 16px; }

/* Combination notes (Kohaku from Kansuke): indigo-edged, with the others they are on */
.kn-note.combo { background: color-mix(in srgb, var(--hd) 6%, var(--surface)); }
.kn-combo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pill.combo { background: var(--hd); color: var(--on-hd); text-transform: none; letter-spacing: 0; font-size: 12px; }
.also { font-size: 13px; font-weight: 650; color: var(--hd); text-decoration: none; }

/* Add Knowledge (step 5): Koi Server's own work is orange, which nothing else uses; its suggestions are cards to keep or
   leave out, and what its tidy changed is marked */
.btn.ks { background: var(--ks); border-color: var(--ks); color: var(--on-ks); }
.ks-box { background: var(--ks-soft); border-color: color-mix(in srgb, var(--ks) 35%, transparent); }
.ks-eyebrow { font: 700 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ks); }
.ks-box .btn.small { justify-self: start; background: var(--bg); }
.fail-box { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.tidy-wrap { display: grid; gap: 10px; }
.tidy-box { padding: 10px 12px; border-radius: 10px; background: var(--bg); }
mark.tidy { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 2px; }
del.tidy { color: var(--ink-3); text-decoration-thickness: 1px; }
.kn-sug { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--ks) 40%, transparent); border-radius: 16px; background: var(--bg); }
.kn-sug.out { border-color: var(--line); background: var(--surface); }
.kn-sug.out .desc-text { color: var(--ink-3); }
.kn-sug, .ks-box { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.kn-sug select { order: -1; flex: 1 1 100%; min-width: 0; max-width: 100%; }
.pill.place { text-transform: none; letter-spacing: 0; font-size: 12px; }
.pill.topic { text-transform: none; letter-spacing: 0; font-size: 12px; background: var(--well); color: var(--ink-2); }
.pill.new { text-transform: none; letter-spacing: 0; font-size: 12px; background: var(--amber-soft); color: var(--amber); }
.kn-from { font-size: 13px; font-weight: 650; color: var(--hd); text-decoration: none; }

/* Add Knowledge spoken aloud: the Record button, its red dot (glowing while it records) and the clock */
.rec { display: grid; gap: 8px; }
.rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; }
.rec-btn { gap: 10px; }
.rec-dot { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--red); }
.rec-dot.on { animation: rec-glow 1.2s ease-in-out infinite; }
.rec-live { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.rec-panel { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.rec-panel.sending { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.rec-panel.busy { background: var(--ks-soft); border-color: color-mix(in srgb, var(--ks) 35%, transparent); }
.rec-head { display: flex; align-items: center; gap: 10px; }
.rec-clock { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-meter { display: block; width: 100%; height: 56px; color: var(--red); }
.rec-quiet { font-size: 14px; font-weight: 650; color: var(--amber); }
.rec-progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.rec-progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.rec-panel.busy .spin, .rec-panel.busy b { color: var(--ks); }
.rec-panel.sending .spin { color: var(--accent); }
.note.heard { color: var(--green); font-weight: 650; }
.desc-box.glow { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); transition: box-shadow .3s, border-color .3s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rec-glow { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot.on, .spin { animation: none; } }

/* Who a new note is about: every koi this item is, or only some of them, narrowed by one drop-down for each kind */
.who { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.who legend { padding: 0; margin-bottom: 4px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--hd); }
.who-pick { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--hd) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--hd) 25%, transparent); min-width: 0; }
.who-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.who-row select { width: 100%; min-width: 0; min-height: 40px; }
.who-says { font-weight: 650; color: var(--hd); }

/* Koi Server's draft of a description (step 5), in its own orange, and the practice facts it can be tried with */
.draft-ask { display: grid; gap: 8px; justify-items: start; }
.draft-box { display: grid; gap: 8px; min-width: 0; }
.draft-points { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.draft-facts dd .note { font-size: 13px; }
.practice-form { display: grid; gap: 12px; min-width: 0; }
.practice-form .pill { justify-self: start; }

/* How I Work: his Tone of Voice Guide to read, and the way to what Koi Server recommends */
.rec-link { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.rec-was { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.guide { display: grid; gap: 10px; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.guide h2 { font-size: 17px; margin: 12px 0 0; }
.guide ul, .guide ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.guide p { margin: 0; }
.guide table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.guide th, .guide td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

/* Match to the Platform: each koi waiting in two columns, Koi Server's fish on the left, staying in view, and the pieces it most likely is on the right, each picture large (Ricky, 15 November 2026) */
.match-cards { display: grid; gap: 14px; }
.match-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); min-width: 0; }
.mc-side { display: grid; gap: 4px; align-content: start; min-width: 0; }
.mc-fact { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.mc-side .eyebrow { font-size: 11px; padding: 0 2px 2px; }
.mc-koi { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 70px); color: var(--ink); text-decoration: none; }
.mc-pic { display: block; width: 100%; max-width: 300px; aspect-ratio: 2 / 3; margin-bottom: 4px; border-radius: 12px; overflow: hidden; background: var(--well); }
.mc-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mc-koi .mc-pic img { object-fit: cover; }
.mc-strong { font-size: 14px; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.mc-piece { display: grid; gap: 4px; align-content: start; min-width: 0; }
.mc-piece + .mc-piece { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.mc-name { font-size: 16px; font-weight: 800; }
.match-why { font-size: 13px; font-weight: 650; color: var(--hd); }
.pill.chip { justify-self: start; text-transform: none; letter-spacing: 0; font-size: 12px; background: var(--green-soft); color: var(--green); }
.mc-acts { display: grid; gap: 6px; margin-top: 6px; }
.mc-acts .btn { width: 100%; justify-content: center; }
.mc-number { display: grid; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.mc-number input { width: 100%; min-width: 0; }


/* Koi Server's tidy of a description said aloud: each change a button, put back to the words as said, or taken again */
.tidy-review { gap: 10px; }
.tidy-change { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; cursor: pointer; }
.tidy-change:disabled { cursor: default; }
.tidy-change mark.tidy { background: var(--ks-soft); color: var(--ks); }
.tidy-change.back { border-bottom: 1.5px dashed var(--ks); }

/* A red pen over a description (the prototype's "Show what you changed"): what was taken out struck through, what was put in, both red */
.pen-wrap { display: grid; gap: 8px; justify-items: start; }
.pen-text { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); justify-self: stretch; }
del.pen { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
ins.pen { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pen-fold { margin-top: 6px; }

/* A red pen over a description (the prototype's "Show what you changed"): what was taken out struck through, what was put in, both red */
.pen-wrap { display: grid; gap: 8px; justify-items: start; }
.pen-text { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); justify-self: stretch; }
del.pen { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
ins.pen { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pen-fold { margin-top: 6px; }

/* Saving a koi's finished picture and video from its page, and copying its final description */
.media figure > .btn { justify-self: start; }
.copy-wrap { display: grid; gap: 6px; justify-items: start; }

/* The Fish tab's Pictures view (Ricky, 15 November 2026: "Seeing the fish image is important"): each koi's picture large, its details beside it */
.title-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.title-line .seg button { display: inline-flex; align-items: center; gap: 6px; }
.title-line .seg .ic { width: 18px; height: 18px; }
.koi-cards { display: grid; gap: 12px; }
@media (min-width: 640px) { .koi-cards { grid-template-columns: 1fr 1fr; } }
.koi-card { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.koi-card:hover { background: var(--well); }
.kc-pic { display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--well); }
.kc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kc-none { display: grid; place-items: center; align-content: center; gap: 6px; height: 100%; color: var(--ink-3); font-size: 13px; font-weight: 600; text-align: center; }
.kc-none .ic { width: 28px; height: 28px; }
.kc-text { display: grid; gap: 3px; min-width: 0; align-content: start; padding-top: 2px; }
.kc-text > span { font-size: 14px; color: var(--ink-3); overflow-wrap: anywhere; }
.kc-text > .kc-variety { font-size: 15px; font-weight: 650; color: var(--ink); }
/* How a koi stands on the platform, beside its chip: Listed in the accent, Sold in green, Deceased or Failed in grey */
.kc-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pill.sale.sold { background: var(--green-soft); color: var(--green); }
.pill.sale.deceased, .pill.sale.failed, .pill.sale.unavailable, .pill.sale.unknown { background: var(--well); color: var(--ink-2); }
.fish-title .pill.sale { margin-left: 12px; vertical-align: middle; font-size: 13px; }
.kc-marks { display: grid; gap: 6px; margin-top: 10px; }
.kc-marks .mk { display: inline-flex; align-items: center; justify-content: start; gap: 6px; font-size: 14px; font-weight: 650; }
.kc-marks .mk .ic { width: 22px; height: 22px; }

/* The appraisal (step 5): the grade large, a bar beside it, strengths and faults in lists; corrected on a phone with a sliding scale and a half point either way */
.appr { gap: 12px; }
.grade-show { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.grade-big { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.grade-big b { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.grade-big small { font-size: 15px; font-weight: 650; color: var(--ink-3); }
.grade-bar { display: block; height: 10px; border-radius: 5px; background: var(--well); overflow: hidden; }
.grade-bar > span { display: block; height: 100%; border-radius: 5px; background: var(--ink-2); }
.ks-box .grade-bar > span { background: var(--ks); }
.appr-lists { display: grid; gap: 12px; }
@media (min-width: 640px) { .appr-lists { grid-template-columns: 1fr 1fr; } }
.appr-lists h3, .lines-edit h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; }
.appr-lines { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.appr-acts .btn { flex: 1 1 auto; }
.appr-history { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.appr-edit { gap: 16px; }
.grade-edit { display: grid; gap: 6px; }
.grade-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; }
.grade-step { min-height: 52px; padding: 0; justify-content: center; }
.grade-step .ic { width: 24px; height: 24px; }
.grade-slider { width: 100%; height: 44px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.grade-slider::-webkit-slider-thumb { width: 30px; height: 30px; }
.grade-ends { display: flex; justify-content: space-between; padding: 0 62px; font-size: 12px; color: var(--ink-3); }
.lines-edit { display: grid; gap: 8px; }
.line-edit { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: start; }
.line-edit textarea { width: 100%; min-height: 48px; field-sizing: content; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); resize: vertical; }
.line-edit textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.line-x { min-height: 48px; padding: 0; justify-content: center; color: var(--red); }
.add-line { justify-self: start; }

/* What the edit missed (step 5's look, part two): each fault's box drawn on the picture, answered Agree, Fix It or Not a Fault */
.miss-list { display: grid; gap: 10px; }
.miss { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.miss.agreed { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.miss.dismissed { opacity: .75; }
.miss-frame { position: relative; display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--well); cursor: zoom-in; }
.miss-frame img { display: block; width: 100%; height: auto; }
.miss-frame.big { display: inline-block; border-radius: 0; cursor: auto; }
.miss-frame.big img { width: auto; max-width: 100%; max-height: calc(100dvh - 120px); }
.miss-box { position: absolute; min-width: 14px; min-height: 14px; border: 2.5px solid var(--ks); border-radius: 4px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.miss-text { display: grid; gap: 6px; min-width: 0; }
.miss-text p { margin: 0; overflow-wrap: anywhere; }
.miss-word { justify-self: start; text-transform: none; letter-spacing: 0; font-size: 12px; background: var(--ks-soft); color: var(--ks); }
.miss-acts { display: grid; gap: 6px; }
.miss-acts .btn { width: 100%; justify-content: center; }
.miss-why { display: grid; gap: 6px; }
.miss-why textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); field-sizing: content; min-height: 64px; }
.agree-box p { margin: 0; }
.agree-n { font-size: 22px; font-weight: 800; margin-right: 4px; font-variant-numeric: tabular-nums; }

/* Back to the top, once a page has been scrolled two screens down (Ricky, 16 November 2026): a round button with an edge, indigo as navigation is, just above the bar along the foot */
.to-top { position: fixed; z-index: 15; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--bg); color: var(--hd); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); cursor: pointer; }
.navbar ~ .to-top { bottom: calc(70px + var(--bar-under)); }
.to-top[hidden] { display: none; }
.to-top .ic { width: 24px; height: 24px; }

/* Home, as the prototype has it: Next Up large, After That under it, The Fish Today in four figures, and the folds */
.next-up { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.next-up h2 { font-size: 21px; line-height: 1.25; }
.next-up p { margin: 0; color: var(--ink-2); }
.next-up .acts { margin-top: 4px; align-items: center; }
.next-up details.fold .list { margin-top: 8px; }
.next-up.ks { background: var(--ks-soft); border-color: color-mix(in srgb, var(--ks) 35%, transparent); }
.set-ic.ks { background: var(--ks-soft); color: var(--ks); }
.today-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .today-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fig { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.fig:hover { background: var(--well); }
.fig.still { border-color: var(--line); background: var(--well); }
.fig b { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fig span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.home-folds { display: grid; gap: 10px; }
.home-fold { padding: 4px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.home-fold > summary { min-height: 48px; gap: 10px; color: var(--ink); font-size: 15px; }
.fold-sub { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.fold-sub.warn { color: var(--amber); }
.fold-sub.bad { color: var(--red); }
.fold-body { display: grid; gap: 10px; padding: 4px 0 14px; }
.fold-body > p { margin: 0; }
.fold-body > .btn.small { justify-self: start; }
.set-row.rig { min-height: 56px; }
.light { justify-self: center; width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); }
.light.on { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.wants { display: grid; gap: 8px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--well); }
.wants p { margin: 0; }
.wants .btn.small { justify-self: start; }
.wants.danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.wants.warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }

/* Selling (stage 1): money boxes with the £ inside them (Ricky, 16 November 2026), the start bids each in a row. The box is
   the span; its input has no edge of its own, and no width, so it never pushes a phone's page wider than the screen. */
.money { display: flex; align-items: center; gap: 3px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--bg); font-size: 16px; font-weight: 500; color: var(--ink-3); cursor: text; }
.money:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.money input { flex: 1; width: 0; min-width: 0; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: none; font-variant-numeric: tabular-nums; }
.money input:focus-visible { outline: none; }
.bid-rows { display: grid; gap: 8px; }
.bid-row { display: grid; grid-template-columns: minmax(0, 7fr) auto minmax(0, 7fr) auto; gap: 8px; align-items: center; }
.bid-row .rise { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.bid-row input { width: 100%; }
.price-koi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .price-koi { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .price-koi .media-pic { position: sticky; top: 76px; } }
/* A koi's picture is given the whole width it has (Ricky, 17 November 2026): the browser's own margins on a figure, 40px
   either side, had squeezed it wherever it stood outside .media (Price It, a planned koi's sheet). */
.media-pic, .media-vid { margin: 0; min-width: 0; }
/* Finishing a fish on Koi Server, under its picture (21 November 2026) */
.finish-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.finish-line .note { margin: 0; }
.note.finishing { display: inline-flex; align-items: center; gap: 8px; }
.price-side { display: grid; gap: 12px; min-width: 0; }
.price-form .now { margin: 0; }
.desc-short { margin: 0; color: var(--ink-2); white-space: pre-line; }
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
/* Every start bid the same height, its increment on one line under it (Ricky: "avoid all the different heights"). */
.rung { display: grid; align-content: center; justify-items: center; gap: 1px; min-height: 56px; padding: 6px 8px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); text-align: center; cursor: pointer; }
.rung b { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rung span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-3); }
.rung[aria-pressed="true"] span { color: var(--accent); }
.rung[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .btn { min-width: 44px; min-height: 44px; font-size: 22px; padding: 0; justify-content: center; }
.stepper.wide .money { flex: 1; }
.terms { font-weight: 650; color: var(--ink-3); }
.terms.set { color: var(--ink); }
.field .note { font-weight: 400; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
/* An auction's bidding: max bidding and anti-sniping switched on and off, and boxes of minutes stepped with − and + */
.bidding { display: grid; gap: 6px; }
.bidding .list, .snipe.boxed { background: var(--bg); }
.snipe { display: grid; gap: 12px; padding: 10px 16px 14px; }
.snipe.boxed { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.snipe-part { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.snipe-part input { width: 56px; padding: 0 4px; text-align: center; font-variant-numeric: tabular-nums; }
.snipe-part .min { font-size: 13px; font-weight: 500; color: var(--ink-3); }
/* Quick buttons beside an end time: 24 hours, 48 hours, 3 days, 7 days */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quick .no-end { grid-column: 1 / -1; }
.quick button { min-height: 40px; padding: 0 4px; white-space: nowrap; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink-2); font: 600 14px var(--font); cursor: pointer; }
.quick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ends > .note { font-weight: 400; }
.ends label .note { display: block; }

/* The Schedule (the prototype's version 12 onwards): a month of weeks folded, a line a day, a day as a timeline */
.target-box { gap: 8px; }
.target-line { margin: 0; font-size: 15px; }
.target-line b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tgt-bar { display: block; height: 10px; border-radius: 999px; background: var(--well); overflow: hidden; }
.tgt-bar i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.month-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.month-head h1 .year { color: var(--ink-3); font-weight: 650; }
.day-h { margin: 0; font-size: 24px; }
.pager { display: flex; gap: 8px; flex: none; }
.btn.nav { width: 48px; min-height: 48px; padding: 0; justify-content: center; font-size: 22px; background: var(--hd); border-color: var(--hd); color: var(--on-hd); text-decoration: none; }
.linkish { margin-left: 4px; padding: 0; border: 0; background: none; color: var(--hd); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
.weeks { display: grid; gap: 10px; }
.wk { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.wk.now { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.wk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 8px 12px; align-items: center; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wk-head:hover { background: var(--well); }
.wk-head .chev { color: var(--ink-3); transition: transform .2s; }
.wk-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.wk-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.wk-when b { font-size: 16px; font-weight: 700; }
.now-pill { font-size: 10px; }
.wk-val { font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.wk-bar { grid-column: 1 / 3; position: relative; display: flex; height: 6px; border-radius: 3px; background: var(--well); }
.wk-bar i { display: block; height: 100%; border-radius: 3px; }
.wk-bar .planned { background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.wk-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -2px; border-radius: 1px; background: var(--ink); }
.wk-sub { grid-column: 1 / 3; font-size: 13px; color: var(--ink-2); }
.wk-sub .off { color: var(--amber); font-weight: 650; }
.wk-sub .ok { color: var(--green); font-weight: 650; }
.wk.past .wk-head { padding: 11px 16px; gap: 2px 12px; }
.wk.past .wk-when b, .wk.past .wk-val { color: var(--ink-2); font-size: 15px; }
.wk-days { border-top: 1px solid var(--line); }
.dline { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 52px; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dline:first-child { border-top: 0; }
.dline:hover { background: var(--well); }
.dname { display: grid; line-height: 1.25; }
.dname b { font-weight: 700; }
.dname small { font: 700 10px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.dline.past .dname b, .dline.past .mom { color: var(--ink-3); }
.moms { display: flex; flex-wrap: wrap; gap: 3px 12px; min-width: 0; }
.mom { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--ink-2); }
.mom i { width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.mom b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.mom.quiet { color: var(--ink-3); }
.dval { font-weight: 650; font-size: 13px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dval small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.by-kind { display: grid; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.kind-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--well); }
.kind-bar i { display: block; height: 100%; background: var(--t); }
.kind-keys { display: flex; flex-wrap: wrap; gap: 4px 14px; }
a.row-link { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
a.row-link b { display: block; }
a.row-link small { display: block; font-size: 13px; color: var(--ink-3); }
a.row-link:hover { background: var(--well); }
/* A day: the week along the top, then the timeline */
.wstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.wstrip a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 4px 0; border-radius: 12px; background: var(--well); color: var(--ink); text-decoration: none; }
.wstrip a:hover { background: color-mix(in srgb, var(--ink) 8%, var(--well)); }
.wstrip small { font: 650 11px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.wstrip b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wstrip .past b { color: var(--ink-3); }
.wstrip .today b { color: var(--accent); }
.wstrip .dots { display: flex; gap: 3px; height: 6px; }
.wstrip .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--t); }
.wstrip a[aria-current="page"] { background: var(--hd); }
.wstrip a[aria-current="page"] small, .wstrip a[aria-current="page"] b { color: var(--on-hd); }
.wstrip a[aria-current="page"] .dots i { box-shadow: 0 0 0 1.5px var(--hd); }
.dsum { margin: 0; font-size: 14px; color: var(--ink-2); }
.tl { display: grid; padding: 14px 12px 14px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.tl-win { position: relative; margin: 6px 0; }
.tl-hour { position: absolute; left: 0; width: 50px; padding-right: 8px; text-align: right; transform: translateY(-50%); font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-line { position: absolute; left: 54px; right: 0; height: 1px; background: var(--line); }
.tl-lanes { position: absolute; top: 0; bottom: 0; left: 58px; right: 0; }
.tl-ev { position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--t) 40%, transparent); background: color-mix(in srgb, var(--t) 12%, var(--surface)); color: var(--ink); text-decoration: none; overflow: hidden; }
.tl-ev > * { flex: none; }
a.tl-ev:hover { background: color-mix(in srgb, var(--t) 19%, var(--surface)); }
.tl-ev.held { border-color: color-mix(in srgb, var(--amber) 60%, transparent); }
.tl-ev .k { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-ev .k i { width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex: none; }
.tl-ev .tm { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-ev .fg { font-size: 13px; color: var(--ink-2); }
.tl-ev .fg b { font-weight: 650; color: var(--ink); }
.tl-ev .warn { font-size: 12px; }
.tl-koi { display: flex; gap: 6px; min-height: 19px; font-size: 13px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-koi:hover { text-decoration: underline; }
.tl-koi b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-gap { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; padding-left: 58px; font-size: 13px; color: var(--ink-3); }
.tl-gap::before, .tl-gap::after { content: ""; flex: 1 1 0; border-top: 1.5px dotted var(--line-2); }
.tl-gap::before { flex: 0 0 12px; }
.tl-now { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding-left: 8px; font-size: 12px; font-weight: 650; color: var(--red); }
.tl-now::after { content: ""; flex: 1 1 auto; height: 2px; background: var(--red); border-radius: 1px; }
.tl-nowline { position: absolute; left: 46px; right: 0; height: 2px; background: var(--red); z-index: 2; }
.tl-nowline em { position: absolute; left: -46px; top: -8px; font-size: 11px; font-weight: 650; font-style: normal; color: var(--red); background: var(--surface); }
.tl-empty { margin: 0; padding: 24px 16px 24px 28px; color: var(--ink-3); }
.add-on { display: grid; gap: 10px; padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: 18px; }
.add-on-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.add-on-acts .btn { justify-content: center; gap: 4px; padding: 0 4px; white-space: nowrap; }
/* This week against the target, under the top bar on every page but Home */
.tstrip { display: block; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tstrip-in { display: grid; gap: 6px; max-width: 720px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.tstrip-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.tstrip-k { white-space: nowrap; }
.tstrip-v { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tstrip-v b { font-size: 15px; color: var(--ink); }
.tstrip-gap { margin-left: auto; font-weight: 650; white-space: nowrap; }
.tstrip-gap.off { color: var(--amber); }
.tstrip-gap.ok { color: var(--green); }
.tstrip .chev { width: 16px; height: 16px; color: var(--ink-3); }
.strip-bar { position: relative; display: flex; height: 8px; border-radius: 4px; background: var(--well); }
.strip-bar i { display: block; height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.strip-bar b { position: absolute; right: 0; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--ink); }
button.koi-card { width: 100%; font: inherit; text-align: left; cursor: pointer; }
button.koi-card:disabled { cursor: default; }
.times { display: grid; gap: 10px; }
@media (min-width: 640px) { .times { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.times input { width: 100%; }
.big-pic { display: block; width: 100%; height: auto; border-radius: 16px; }

/* Choosing koi (the prototype's Add Fish, step 3 of the rebuild): found and ordered, pictures large with a + each, the koi
   chosen in a row along the foot. In a sheet the foot keeps to the foot of the sheet; on a page, just above the bar. */
.pk-find { display: grid; gap: 8px; }
@media (min-width: 560px) { .pk-find { grid-template-columns: minmax(0, 1fr) minmax(280px, auto); } }
.pk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .pk-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.pk { display: grid; gap: 6px; align-content: start; padding: 6px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pk.in { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.pk-pic { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--well); }
.pk-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pk-mark { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(20, 30, 40, .78); color: #fff; }
.pk.in .pk-mark { background: var(--accent); }
.pk-mark .ic { width: 20px; height: 20px; }
.pk-text { display: grid; gap: 1px; padding: 0 4px 4px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.pk-text b { font-size: 15px; color: var(--ink); }
.pk-foot { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 10px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 12px max(16px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .08); }
.page > .pk-foot { bottom: calc(58px + var(--bar-under)); }
.sheet-in.picking { padding-bottom: 0; }
/* Full screen, the koi chosen keep to the very foot however few koi there are to choose from */
.sheet.full .sheet-in { display: flex; flex-direction: column; min-height: 100%; }
.sheet.full .pk-foot { margin-top: auto; }
.sheet.full .sheet-head { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
.pk-foot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pk-row { display: flex; gap: 8px; overflow-x: auto; padding-top: 6px; scrollbar-width: none; }
.pk-row::-webkit-scrollbar { display: none; }
.pk-mini { position: relative; display: grid; gap: 2px; flex: none; width: 64px; text-align: center; font-size: 11px; color: var(--ink-2); }
.pk-mini-pic { display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--well); }
.pk-mini-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pk-x { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 2px solid var(--bg); border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; }
.pk-x .ic { width: 16px; height: 16px; }
.pk-row.big .pk-mini { width: 120px; font-size: 13px; }

/* Sales events (the selling's stage 2, step 2): its koi in order on its page */
.lots .lot { display: grid; grid-template-columns: 22px 112px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 14px; }
.lots .lot + .lot { border-top: 1px solid var(--line); }
.lot.held { background: var(--amber-soft); }
.lot-n { font-weight: 800; color: var(--ink-3); padding-top: 4px; }
.lot-pic { display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--well); }
.lot-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lot-text { display: grid; gap: 2px; min-width: 0; font-size: 14px; color: var(--ink-3); }
.lot-text .pill { justify-self: start; }
.lot-acts { grid-column: 2 / -1; display: flex; gap: 6px; }
label.koi-card.pick { cursor: pointer; }
.pick-line { display: flex; align-items: center; gap: 10px; }
.pick-line input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.notes-box { width: 100%; min-height: 96px; field-sizing: content; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); resize: vertical; }
/* The selling on Home: this week against the target, and Coming Up */
a.home-target { color: var(--ink); text-decoration: none; }
a.home-target:hover { background: var(--well); }
.tgt-pc { margin-left: 6px; font-weight: 700; color: var(--ink-3); }
.set-row.coming { grid-template-columns: 64px minmax(0, 1fr) 16px; }
.coming-at { display: grid; gap: 0; text-align: center; }
.coming-at b { font-size: 18px; font-variant-numeric: tabular-nums; }
.coming-at span { font-size: 12px; color: var(--ink-3); }

/* The interest shown in each koi on the shop (step 2 of the interest in each koi): six figures, three a row on a computer, and
   one line on a card. */
.interest-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .interest-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.interest-figs .fig b { font-size: 26px; }
.interest .sub, .interest .note { margin: 0; }
.interest-line { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.interest-line .ic { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.interest-line small { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* The listing a koi is in on the shop (the selling's stage 4). */
.on-shop p { margin: 0 0 8px; }

/* What koi like this one sold for, beside its price (the selling's stage 5). */
.past-sales summary { cursor: pointer; flex-wrap: wrap; gap: 2px 0; padding-block: 2px; }
.past-sales summary b { white-space: nowrap; }
.past-sales summary .note { flex-basis: 100%; font-weight: 500; }
.past-sales .past-cards { grid-template-columns: 1fr; margin-top: 12px; }
/* When an auction is shown on the shop: four choices, each on one line at phone width (stage 3). */
.shown-when + .seg button { white-space: nowrap; padding-inline: 4px; font-size: 14px; }
/* The Rig, from a phone (RigPage, 18 November 2026): each rig at work, and the shot its alarm offers, green as the Mac
   marks it, with two big buttons a wet thumb can find. */
.rig-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 12px; }
.rig-head { display: flex; align-items: center; gap: 10px; }
.rig-head .light { justify-self: auto; flex: none; }
.rig-head > .rig-name { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.rig-head > .rig-name span { color: var(--ink-3); font-size: 13px; }
/* Alerts from this rig to whoever is signed in: a bell to turn on and off, green while it alerts them. */
.rig-bell { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rig-bell .ic { width: 18px; height: 18px; }
.rig-bell.on { border-color: var(--green); background: var(--green-soft); color: var(--green); }
/* Alerts on this phone: what this phone can do, said by its own browser (alerts.js). */
.rig-alerts { margin: 0 0 14px; }
.rig-alerts p { margin: 0 0 8px; }
.rig-alerts p:last-child { margin-bottom: 0; }
.rig-alerts .btn { margin-top: 2px; }
.rig-alert-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.rig-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.rig-line { margin: 8px 0 0; }
.rig-video, .rig-quiet, .rig-why { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }
.rig-none { color: var(--amber); }
.rig-offer { margin-top: 12px; }
.rig-shot { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: var(--well); border-radius: 10px; }
.rig-offer.waiting .rig-shot { box-shadow: 0 0 0 3px var(--green); }
.rig-of { margin: 8px 0 0; }
.rig-said { margin: 10px 0 0; font-weight: 600; }
.rig-buttons { display: grid; gap: 8px; margin-top: 12px; }
.rig-buttons.two { grid-template-columns: 1fr 1fr; }
.rig-buttons .btn { min-height: 52px; font-size: 17px; justify-content: center; }
/* why it was turned down, after Turn Down: the rig's reasons, one tap each, two to a row (GivenAReason) */
.rig-reasons { margin-top: 10px; }
.rig-reason-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.rig-reason-buttons .btn { min-height: 44px; justify-content: center; text-align: center; white-space: normal; }
.rig-ask { margin-top: 12px; display: grid; gap: 8px; }
.rig-ask p { margin: 0; }
.rig-waiting { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); color: var(--ink); text-decoration: none; border: 1px solid var(--green); }
.rig-waiting > span { display: flex; flex-direction: column; margin-right: auto; }
.rig-waiting > span span { font-size: 13px; color: var(--ink-2); }
.rig-waiting .ic { flex: none; color: var(--green); }
/* While a shot waits, Accept and Turn Down stay in reach at the foot of the screen, over the tall shot, until the card has
   scrolled past: on a phone the shot alone is taller than the screen. */
.rig-offer.waiting .rig-buttons.two { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 8px; margin: 12px -8px 0; border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.has-tabs .rig-offer.waiting .rig-buttons.two { bottom: calc(86px + var(--bar-under)); }
/* Every shot of the offered fish, best first, as the Mac's strip (RigShot): a card that opens on a tap, three across
   inside, the offered one edged green. */
.rig-shots { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rig-shots-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 12px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.rig-shots-head > span { display: flex; flex-direction: column; margin-right: auto; }
.rig-shots-head > span span { font-size: 13px; color: var(--ink-3); }
.rig-shots-head .ic { flex: none; width: 20px; height: 20px; color: var(--ink-3); }
.rig-shots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 10px 10px; }
.rig-thumb { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.rig-thumb img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--well); border-radius: 8px; }
.rig-thumb span { font-size: 12px; color: var(--ink-3); }
.rig-thumb.offered img { box-shadow: 0 0 0 3px var(--green); }
.rig-thumb.down img { opacity: .45; }
/* The shots large, over the whole page, to browse with ‹ › or a swipe, Accept This One and Turn Down at the foot. */
.rig-look { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg, #fff); touch-action: pan-y; }
.rig-look-top { display: flex; align-items: center; gap: 10px; }
.rig-look-top > span { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.rig-look-top > span span { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rig-look-frame { position: relative; flex: 1; min-height: 0; display: flex; }
.rig-look-pic { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: var(--well); border-radius: 10px; }
.rig-look-wait { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--amber); white-space: nowrap; }
.rig-look-step { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; display: grid; place-items: center; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink); cursor: pointer; }
.rig-look-step.back { left: 4px; }
.rig-look-step.on { right: 4px; }
.rig-look-step:disabled { opacity: .3; }
.rig-look-step .ic { width: 26px; height: 26px; }
.rig-look .rig-buttons { margin-top: 0; }
/* What has stopped a rig (the flash not firing), in red where it cannot be missed. */
.rig-trouble { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-weight: 600; font-size: 14px; }
.rig-trouble .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }
/* The video of the fish last accepted (RigVideo): how it goes, green once ready; amber where the rig waits for an answer. */
.rig-vid { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.rig-vid > .ic { flex: none; width: 20px; height: 20px; color: var(--ink-3); }
.rig-vid > span { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.rig-vid > span span { font-size: 13px; color: var(--ink-2); }
.rig-vid.rig-vid-asking { border-color: var(--amber); background: var(--amber-soft); }
.rig-vid.rig-vid-asking > .ic { color: var(--amber); }
.rig-vid.rig-vid-ready { border-color: var(--green); background: var(--green-soft); }
.rig-vid.rig-vid-ready > .ic { color: var(--green); }
.rig-vid-ask { display: grid; gap: 8px; margin-top: 8px; }
.rig-vid-ask p { margin: 0; font-size: 13px; color: var(--ink-2); }
.rig-vid-ask .btn { min-height: 48px; justify-content: center; }

/* Services offered with a koi (19 November 2026): the one to apply by itself, under its switch. */
.services-offered .perm.service-auto { padding-top: 0; padding-left: 28px; border-top: 0; }
/* A section of How I Work (19 November 2026): its heading, then its words. */
.kn-note .kn-head, .kn-sug .kn-head { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
/* How It Sold (22 November 2026): a week of sales as they ended, each koi with its picture; Koi Server words in its own orange. */
.lots.results .lot { grid-template-columns: 132px minmax(0, 1fr); }
.lots.results .lot-acts { grid-column: auto; flex-wrap: wrap; margin-top: 4px; }
.pill.sale.unsold { background: var(--amber-soft); color: var(--amber); }
.ks-line { color: var(--ks); font-weight: 600; }
.ks-line b { font-weight: 800; }
.ks-box .btn.ks.small { background: var(--ks); color: var(--on-ks); border-color: var(--ks); }
.sale-read .sr-reason, .sale-read .sr-next { margin-top: 8px; }
/* Koi Server Suggests the Week (22 November 2026): a koi left out of it is dimmed; its way in from the Schedule is in Koi Server orange. */
.lots.results .lot.left-out .lot-pic, .lots.results .lot.left-out .lot-text > :not(.lot-acts) { opacity: .45; }
.go.ks-go { color: var(--ks); }
