/* =====================================================================================================
   Nagi theme
   Morning mist, deep-sea ink, tide teal for what's blocked, coral for locks
   you've locked, and a low sun for warmth. Bootstrap is kept only for its grid/utilities (Identity
   pages); every component is re-skinned here.
   ===================================================================================================== */

/* ---- Fonts (self-hosted, SIL OFL — see fonts/README.md) ------------------------------------------- */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-wght-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---- Tokens -------------------------------------------------------------------------------------- */
:root {
    color-scheme: light dark;

    --mist: #f2f5f0;
    --mist-deep: #e6ece6;
    --surface: #ffffff;
    --surface-sunk: #f6f8f4;
    --ink: #10292a;
    --ink-soft: #33504f;
    --muted: #5e7573;
    --faint: #93a5a2;
    --line: #dfe7e2;
    --line-strong: #c9d5cf;

    --tide: #12756e;
    --tide-strong: #0a5651;
    --tide-soft: #dcefea;
    --tide-glow: rgba(18, 117, 110, .13);

    --coral: #c4512f;
    --coral-strong: #9b3b1f;
    --coral-soft: #fde8de;

    --sun: #996500;
    --sun-soft: #fcf0d2;

    --rose: #b8373a;
    --rose-soft: #fce4e3;

    --sky: #2a6690;
    --sky-soft: #e0edf6;

    /* Decorative light: the sun in the mark and the dawn behind every page. */
    --sun-bright: #f6b73c;
    --coral-bright: #f07a4f;
    --dawn: rgba(255, 196, 150, .55);
    --highlight: rgba(246, 183, 60, .36);

    --solid: #0f4f4b;
    --solid-hover: #0a3b38;
    --on-solid: #f4fbf8;

    --ring: rgba(18, 117, 110, .25);
    --grain-opacity: .03;

    --shadow-xs: 0 1px 0 rgba(16, 41, 42, .04);
    --shadow-sm: 0 1px 2px rgba(16, 41, 42, .05), 0 2px 6px rgba(16, 41, 42, .04);
    --shadow-md: 0 1px 2px rgba(16, 41, 42, .05), 0 14px 34px -16px rgba(16, 41, 42, .22);
    --shadow-lg: 0 2px 4px rgba(16, 41, 42, .04), 0 34px 70px -28px rgba(16, 41, 42, .34);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --content: 1140px;

    /* Bootstrap bridge: anything Bootstrap still draws uses our palette. */
    --bs-body-font-family: var(--font-sans);
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.55;
    --bs-body-bg: var(--mist);
    --bs-body-color: var(--ink);
    --bs-emphasis-color: var(--ink);
    --bs-heading-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-color: var(--faint);
    --bs-secondary-bg: var(--mist-deep);
    --bs-tertiary-bg: var(--surface-sunk);
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-sm: var(--radius-xs);
    --bs-border-radius-lg: var(--radius);
    --bs-code-color: var(--coral-strong);
    --bs-link-color: var(--tide);
    --bs-link-hover-color: var(--tide-strong);
    --bs-link-color-rgb: 18, 117, 110;
    --bs-link-hover-color-rgb: 10, 86, 81;
    --bs-danger-rgb: 184, 55, 58;
    --bs-success-rgb: 18, 117, 110;
    --bs-secondary-rgb: 94, 117, 115;
    --bs-info-rgb: 42, 102, 144;
    --bs-focus-ring-color: var(--ring);
    --bs-form-valid-color: var(--tide);
    --bs-form-valid-border-color: var(--tide);
    --bs-form-invalid-color: var(--rose);
    --bs-form-invalid-border-color: var(--rose);
}

@media (prefers-color-scheme: dark) {
    :root {
        --mist: #0b1718;
        --mist-deep: #081112;
        --surface: #112324;
        --surface-sunk: #0d1c1d;
        --ink: #e4f0ec;
        --ink-soft: #bcd1cb;
        --muted: #84a09a;
        --faint: #587470;
        --line: #1d3435;
        --line-strong: #2b4747;

        --tide: #6fd3c4;
        --tide-strong: #9fe6da;
        --tide-soft: #123634;
        --tide-glow: rgba(111, 211, 196, .10);

        --coral: #f49c7b;
        --coral-strong: #fbbaa0;
        --coral-soft: #3b211a;

        --sun: #f1c35d;
        --sun-soft: #33280f;

        --rose: #f1928b;
        --rose-soft: #3d1d1d;

        --sky: #8cc2e8;
        --sky-soft: #12283a;

        --sun-bright: #f6bd4a;
        --coral-bright: #f28a62;
        --dawn: rgba(242, 138, 98, .10);
        --highlight: rgba(246, 189, 74, .22);

        --solid: #7fdccd;
        --solid-hover: #a6eadf;
        --on-solid: #052322;

        --ring: rgba(111, 211, 196, .30);
        --grain-opacity: .05;

        --shadow-xs: 0 1px 0 rgba(0, 0, 0, .2);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
        --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px -18px rgba(0, 0, 0, .65);
        --shadow-lg: 0 34px 70px -28px rgba(0, 0, 0, .75);

        --bs-link-color-rgb: 111, 211, 196;
        --bs-link-hover-color-rgb: 159, 230, 218;
        --bs-danger-rgb: 241, 146, 139;
        --bs-success-rgb: 111, 211, 196;
        --bs-secondary-rgb: 132, 160, 154;
        --bs-info-rgb: 140, 194, 232;
    }
}

/* ---- Base ---------------------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--mist);
    /* Dawn: warm light from the top right, a cool tide glow from the left. */
    background-image:
        radial-gradient(1200px 560px at 86% -16%, var(--dawn), transparent 62%),
        radial-gradient(900px 480px at -10% -8%, var(--tide-glow), transparent 60%);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* A whisper of grain so flat colour feels like air, not plastic. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--tide-soft); color: var(--ink); }

h1, h2, h3, h4, h5, h6 { color: var(--ink); margin-top: 0; }

h1, h2, .display {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-stretch: 94%;
    letter-spacing: -.022em;
    font-weight: 640;
}

h1 { font-size: clamp(1.95rem, 1.35rem + 1.8vw, 2.75rem); line-height: 1.04; margin-bottom: .5rem; letter-spacing: -.032em; font-weight: 680; }
h2 { font-size: 1.32rem; line-height: 1.2; margin-bottom: .6rem; }
h3 { font-size: 1.05rem; font-weight: 680; letter-spacing: -.005em; margin-bottom: .5rem; }

/* Emphasis in headlines: a sunlit highlighter stroke instead of italics. */
h1 em, h2 em, .display em {
    font-style: normal;
    color: inherit;
    background: linear-gradient(transparent 62%, var(--highlight) 62% 92%, transparent 92%);
    padding: 0 .08em;
    margin: 0 -.04em;
    border-radius: .12em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
h4, h5, h6 { font-size: .95rem; font-weight: 620; }
h1:focus { outline: none; }

p { margin-top: 0; }

a { color: var(--tide); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--tide-strong); }

hr { border: 0; border-top: 1px solid var(--line); opacity: 1; margin: 1.5rem 0; }

code, kbd, pre { font-family: var(--font-mono); }
code {
    font-size: .84em;
    color: var(--coral-strong);
    background: var(--coral-soft);
    padding: .14em .42em;
    border-radius: 6px;
    word-break: break-word;
}

strong, b { font-weight: 640; }

small, .small { font-size: .86rem; }
.text-muted { color: var(--muted) !important; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tide);
}

.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 62ch; }

.num, .countdown { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

details > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 560;
    color: var(--ink-soft);
    user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: "";
    width: .42rem;
    height: .42rem;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .2s var(--ease-out);
}
details[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
details > summary:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--tide); outline-offset: 2px; border-radius: 4px; }

/* ---- Shell --------------------------------------------------------------------------------------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--mist) 80%, transparent);
    backdrop-filter: saturate(1.5) blur(14px);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.topbar-inner {
    position: relative;
    max-width: var(--content);
    margin: 0 auto;
    padding: .7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
/* The mark: a low sun at the calm hour (nagi), with the last of the breeze settling below it. */
.brand-mark { width: 32px; height: 32px; color: var(--ink); overflow: visible; }
.brand-mark .bm-sun { transform-origin: 13.5px 14px; animation: glow 7s ease-in-out infinite; }
.brand-mark .bm-breeze { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .bm-breeze.second { animation: drift 7s ease-in-out infinite; }
.wordmark {
    font-family: var(--font-display);
    font-weight: 720;
    font-stretch: 92%;
    font-size: 1.45rem;
    letter-spacing: -.045em;
    line-height: 1;
    padding-bottom: .08em;
}

.nav-panel { display: flex; align-items: center; gap: 1rem; flex: 1; }
.nav-links { display: flex; align-items: center; gap: .15rem; flex: 1; }
.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .48rem .85rem;
    border-radius: 999px;
    color: var(--ink-soft);
    font-weight: 520;
    font-size: .93rem;
    text-decoration: none;
    transition: background .2s, color .2s, box-shadow .2s;
}
.nav-links a .icon { width: 17px; height: 17px; opacity: .75; }
.nav-links a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-links a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav-links a.active .icon { opacity: 1; color: var(--tide); }

.nav-user { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.nav-user form { margin: 0; }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--tide-soft);
    color: var(--tide-strong);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tide) 28%, transparent);
    transition: transform .2s var(--ease-out), box-shadow .2s;
}
.avatar:hover { color: var(--tide-strong); transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--tide), 0 0 0 4px var(--tide-glow); }

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.icon-btn .icon { width: 18px; height: 18px; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; margin-left: auto; }

@media (max-width: 860px) {
    .topbar-inner { gap: 1rem; }
    .nav-burger { display: inline-grid; }
    .nav-panel {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        padding: .75rem 1rem 1rem;
        background: var(--mist);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        display: none;
    }
    .nav-toggle:checked ~ .nav-panel { display: flex; animation: drop-in .25s var(--ease-out); }
    .nav-links { flex-direction: column; align-items: stretch; }
    .nav-links a { border-radius: var(--radius-sm); padding: .7rem .9rem; }
    .nav-user { margin: 0; padding-top: .75rem; border-top: 1px solid var(--line); }
}

.main {
    flex: 1;
    width: 100%;
    max-width: var(--content);
    margin: 0 auto;
    padding: 2.4rem 1.5rem 4.5rem;
    animation: rise .5s var(--ease-out) both;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .84rem;
}
.footer-inner {
    max-width: var(--content);
    margin: 0 auto;
    padding: 1.25rem 1.5rem 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .wordmark { font-size: 1rem; color: var(--ink-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }

/* ---- Page head ----------------------------------------------------------------------------------- */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}
.page-head h1 { margin: .35rem 0 0; }
.page-head .lede { margin: .55rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---- Buttons ------------------------------------------------------------------------------------- */
.btn {
    --bs-btn-padding-x: 1.2rem;
    --bs-btn-padding-y: .6rem;
    --bs-btn-font-family: var(--font-sans);
    --bs-btn-font-size: .94rem;
    --bs-btn-font-weight: 620;
    --bs-btn-line-height: 1.2;
    --bs-btn-border-radius: 999px;
    --bs-btn-border-width: 1px;
    --bs-btn-focus-box-shadow: 0 0 0 4px var(--ring);
    --bs-btn-disabled-opacity: .42;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    letter-spacing: -.005em;
    transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s var(--ease-out);
}
.btn:not(:disabled):not(.btn-link):active { transform: translateY(1px) scale(.99); }
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-sm { --bs-btn-padding-x: .85rem; --bs-btn-padding-y: .4rem; --bs-btn-font-size: .85rem; --bs-btn-border-radius: 999px; }
.btn-lg { --bs-btn-padding-x: 1.55rem; --bs-btn-padding-y: .85rem; --bs-btn-font-size: 1.02rem; --bs-btn-border-radius: 999px; }

.btn-primary, .btn-dark {
    --bs-btn-color: var(--on-solid);
    --bs-btn-bg: var(--solid);
    --bs-btn-border-color: var(--solid);
    --bs-btn-hover-color: var(--on-solid);
    --bs-btn-hover-bg: var(--solid-hover);
    --bs-btn-hover-border-color: var(--solid-hover);
    --bs-btn-active-color: var(--on-solid);
    --bs-btn-active-bg: var(--solid-hover);
    --bs-btn-active-border-color: var(--solid-hover);
    --bs-btn-disabled-color: var(--on-solid);
    --bs-btn-disabled-bg: var(--solid);
    --bs-btn-disabled-border-color: var(--solid);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 6px 16px -8px color-mix(in srgb, var(--solid) 70%, transparent);
}

.btn-accent {
    --bs-btn-color: var(--surface);
    --bs-btn-bg: var(--tide);
    --bs-btn-border-color: var(--tide);
    --bs-btn-hover-color: var(--surface);
    --bs-btn-hover-bg: var(--tide-strong);
    --bs-btn-hover-border-color: var(--tide-strong);
    --bs-btn-active-color: var(--surface);
    --bs-btn-active-bg: var(--tide-strong);
    --bs-btn-active-border-color: var(--tide-strong);
}

.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-secondary, .btn-ghost {
    --bs-btn-color: var(--ink);
    --bs-btn-bg: var(--surface);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--surface-sunk);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--ink) 35%, var(--line-strong));
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-bg: var(--mist-deep);
    --bs-btn-active-border-color: var(--ink);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: var(--surface);
    --bs-btn-disabled-border-color: var(--line);
    box-shadow: var(--shadow-xs);
}
.btn-ghost { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; box-shadow: none; }

.btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rose);
    --bs-btn-border-color: var(--rose);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: color-mix(in srgb, var(--rose) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--rose) 85%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--rose) 80%, #000);
    --bs-btn-disabled-bg: var(--rose);
    --bs-btn-disabled-border-color: var(--rose);
}
@media (prefers-color-scheme: dark) { .btn-danger { --bs-btn-color: var(--mist); --bs-btn-hover-color: var(--mist); } }

.btn-outline-danger {
    --bs-btn-color: var(--rose);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: color-mix(in srgb, var(--rose) 35%, transparent);
    --bs-btn-hover-color: var(--rose);
    --bs-btn-hover-bg: var(--rose-soft);
    --bs-btn-hover-border-color: var(--rose);
    --bs-btn-active-color: var(--rose);
    --bs-btn-active-bg: var(--rose-soft);
    --bs-btn-active-border-color: var(--rose);
    --bs-btn-disabled-color: var(--rose);
    --bs-btn-disabled-border-color: color-mix(in srgb, var(--rose) 25%, transparent);
}

.btn-outline-success {
    --bs-btn-color: var(--tide);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: color-mix(in srgb, var(--tide) 40%, transparent);
    --bs-btn-hover-color: var(--tide-strong);
    --bs-btn-hover-bg: var(--tide-soft);
    --bs-btn-hover-border-color: var(--tide);
    --bs-btn-active-bg: var(--tide-soft);
    --bs-btn-active-color: var(--tide-strong);
    --bs-btn-active-border-color: var(--tide);
}

.btn-warning {
    --bs-btn-color: #2a1c02;
    --bs-btn-bg: var(--sun);
    --bs-btn-border-color: var(--sun);
    --bs-btn-hover-bg: color-mix(in srgb, var(--sun) 88%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--sun) 88%, #000);
    --bs-btn-hover-color: #2a1c02;
}

.btn-link {
    --bs-btn-color: var(--tide);
    --bs-btn-hover-color: var(--tide-strong);
    --bs-btn-active-color: var(--tide-strong);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-focus-shadow-rgb: 47, 107, 86;
    text-decoration: none;
    font-weight: 560;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-link.text-danger { color: var(--rose) !important; }

/* Pills used for quick choices (durations, categories, presets). */
.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .8rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 540;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s, transform .18s var(--ease-out);
}
.chip-btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.chip-btn.on { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.chip-btn .icon { width: 14px; height: 14px; }

/* ---- Forms --------------------------------------------------------------------------------------- */
.form-control, .form-select {
    background-color: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: .62rem .85rem;
    font-size: .97rem;
    line-height: 1.4;
    box-shadow: var(--shadow-xs);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control::placeholder { color: var(--faint); opacity: 1; }
.form-control:hover, .form-select:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line-strong)); }
.form-control:focus, .form-select:focus {
    background-color: var(--surface);
    color: var(--ink);
    border-color: var(--tide);
    box-shadow: 0 0 0 4px var(--ring);
    outline: 0;
}
.form-control:disabled, .form-select:disabled { background-color: var(--surface-sunk); color: var(--muted); }
.form-control-sm, .form-select-sm { padding: .4rem .65rem; font-size: .88rem; border-radius: 9px; }
.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238d9a94' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m3 6 5 5 5-5'/%3e%3c/svg%3e");
    padding-right: 2.4rem;
}
input[type="time"], input[type="datetime-local"] { font-family: var(--font-mono); font-size: .9rem; }
textarea.form-control { line-height: 1.6; }

.form-label { font-weight: 580; font-size: .88rem; color: var(--ink-soft); margin-bottom: .4rem; }
.form-text { color: var(--muted); font-size: .83rem; margin-top: .4rem; }

.form-floating > .form-control,
.form-floating > .form-control-plaintext { height: 3.65rem; min-height: 3.65rem; padding: 1.6rem .95rem .5rem; }
.form-floating > label { color: var(--muted); padding: 1.1rem .95rem; font-size: .95rem; }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--muted); transform: scale(.8) translateY(-.62rem) translateX(.18rem); }
.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after { background-color: transparent; }
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder { color: transparent; }

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: .18em;
    background-color: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: .38em;
    cursor: pointer;
}
.form-check-input:checked { background-color: var(--tide); border-color: var(--tide); }
.form-check-input:focus { border-color: var(--tide); box-shadow: 0 0 0 4px var(--ring); }

.validation-message, .text-danger { color: var(--rose) !important; font-size: .86rem; }
.validation-errors { padding-left: 1.1rem; }
.valid.modified:not([type=checkbox]) { outline: none; border-color: color-mix(in srgb, var(--tide) 60%, var(--line-strong)); }
.invalid { outline: none; border-color: var(--rose) !important; }
.invalid:focus { box-shadow: 0 0 0 4px var(--rose-soft) !important; }

.search-field { position: relative; }
.search-field > .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--faint); width: 17px; height: 17px; pointer-events: none; }
.search-field > .form-control { padding-left: 2.5rem; }

/* ---- Surfaces ------------------------------------------------------------------------------------ */
.card {
    --bs-card-bg: var(--surface);
    --bs-card-border-color: var(--line);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.card.section { padding: 1.6rem 1.7rem; margin-bottom: 1.25rem; }
.card.section > h2 { font-size: 1.3rem; margin-bottom: 1rem; }

.section-head { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1.15rem; }
.section-head .step {
    flex: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    color: var(--tide-strong);
    background: var(--tide-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tide) 22%, transparent);
}
.section-head h2 { margin: 0; font-size: 1.3rem; }
.section-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }

.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    background:
        radial-gradient(420px 220px at 50% 0%, var(--tide-glow), transparent 70%),
        var(--surface);
}
.empty-state .empty-art { width: 108px; height: 108px; color: var(--tide); margin-bottom: .75rem; }
.empty-state h2 { font-size: 1.55rem; }
.empty-state p { max-width: 46ch; color: var(--muted); margin: 0 auto 1rem; }

/* ---- Alerts -------------------------------------------------------------------------------------- */
.alert {
    --bs-alert-padding-x: 1.05rem;
    --bs-alert-padding-y: .85rem;
    --bs-alert-margin-bottom: 1.25rem;
    --bs-alert-border-radius: var(--radius);
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .94rem;
    border: 1px solid transparent;
}
.alert > .icon { width: 19px; height: 19px; margin-top: .08rem; }
.alert > div { flex: 1; min-width: 0; }
.alert a { color: inherit; font-weight: 620; text-decoration: underline; text-underline-offset: 3px; }
.alert ul { padding-left: 1.1rem; }
.alert-danger { background: var(--rose-soft); color: color-mix(in srgb, var(--rose) 72%, var(--ink)); border-color: color-mix(in srgb, var(--rose) 22%, transparent); }
.alert-warning { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 60%, var(--ink)); border-color: color-mix(in srgb, var(--sun) 25%, transparent); }
.alert-info { background: var(--sky-soft); color: color-mix(in srgb, var(--sky) 72%, var(--ink)); border-color: color-mix(in srgb, var(--sky) 20%, transparent); }
.alert-success { background: var(--tide-soft); color: color-mix(in srgb, var(--tide) 72%, var(--ink)); border-color: color-mix(in srgb, var(--tide) 22%, transparent); }

/* ---- Badges & status ----------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .34rem .66rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: .74rem;
    font-weight: 620;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
    color: var(--ink-soft);
    background: var(--surface-sunk);
    box-shadow: inset 0 0 0 1px var(--line);
}
.badge .icon { width: 12px; height: 12px; }
.badge .countdown { font-weight: 500; }
.badge-locked { background: var(--coral-soft); color: var(--coral-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--coral) 25%, transparent); }
.badge-pending { background: var(--sun-soft); color: var(--sun); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sun) 25%, transparent); }
.badge-open, .badge-ok { background: var(--tide-soft); color: var(--tide-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tide) 25%, transparent); }
.badge-unlocked { background: var(--surface-sunk); color: var(--muted); }
.badge-warning { background: var(--sun-soft); color: var(--sun); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sun) 25%, transparent); }
.badge-danger { background: var(--rose-soft); color: var(--rose); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rose) 25%, transparent); }

.status-dot { position: relative; width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.status-dot.on { background: var(--tide); }
.status-dot.on::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--tide);
    opacity: 0;
    animation: ping 2.4s var(--ease-out) infinite;
}
.status-dot.idle { background: var(--line-strong); }
.status-dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.status-dot.warn { background: var(--sun); }
.status-dot.bad { background: var(--rose); }

/* ---- App monograms ------------------------------------------------------------------------------- */
.mono {
    --h: 150;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    flex: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    background: hsl(var(--h) 34% 89%);
    color: hsl(var(--h) 42% 27%);
    box-shadow: inset 0 0 0 1px hsl(var(--h) 30% 80% / .6);
}
.mono-sm { width: 24px; height: 24px; border-radius: 7px; font-size: .78rem; }
.mono-lg { width: 46px; height: 46px; border-radius: 13px; font-size: 1.25rem; }
@media (prefers-color-scheme: dark) {
    .mono { background: hsl(var(--h) 20% 21%); color: hsl(var(--h) 46% 78%); box-shadow: inset 0 0 0 1px hsl(var(--h) 25% 30% / .7); }
}

.app-stack { display: flex; align-items: center; }
.app-stack .mono { box-shadow: 0 0 0 2px var(--surface); }
.app-stack .mono + .mono { margin-left: -7px; }
.app-stack .more { margin-left: .45rem; font-size: .8rem; color: var(--muted); font-weight: 560; }

/* ---- Radio cards --------------------------------------------------------------------------------- */
.choice-row, .lock-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: .75rem; }

.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-out), background-color .2s;
}
.choice:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:focus-within { box-shadow: 0 0 0 4px var(--ring); }
.choice-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    margin-bottom: .45rem;
    background: var(--surface-sunk);
    color: var(--ink-soft);
    box-shadow: inset 0 0 0 1px var(--line);
    transition: background .2s, color .2s;
}
.choice-icon .icon { width: 18px; height: 18px; }
.choice strong { font-weight: 640; font-size: .98rem; }
.choice span { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.choice::after {
    content: "";
    position: absolute;
    top: 1.05rem;
    right: 1.05rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    transition: border .2s var(--ease-out);
}
.choice.on { border-color: var(--tide); background: color-mix(in srgb, var(--tide-soft) 50%, var(--surface)); box-shadow: 0 0 0 3px var(--tide-glow); }
.choice.on::after { border: 5.5px solid var(--tide); }
.choice.on .choice-icon { background: var(--tide); color: var(--surface); box-shadow: none; }

.lock-options .choice.on { border-color: var(--coral); background: color-mix(in srgb, var(--coral-soft) 55%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 14%, transparent); }
.lock-options .choice.on::after { border-color: var(--coral); }
.lock-options .choice.on .choice-icon { background: var(--coral); }

.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); gap: 1rem 1.25rem; margin-top: 1.25rem; }
.quick-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: 1.2rem; }
.quick-row .label { color: var(--muted); font-size: .84rem; margin-right: .2rem; }

/* ---- App picker ---------------------------------------------------------------------------------- */
.selected-apps { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 2.6rem; margin-bottom: 1.2rem; padding: .6rem; border-radius: var(--radius); background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--line); }
.selected-apps .placeholder-text { color: var(--muted); font-size: .9rem; padding: .25rem .35rem; }
.app-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .26rem .3rem .26rem .28rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    font-size: .9rem;
    animation: pop .32s var(--ease-out);
}
.app-chip strong { font-weight: 600; }
.app-chip .mono { border-radius: 50%; }
.app-chip.locked { background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 28%, transparent); }
.platform-tag { font-size: .66rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.chip-remove, .chip-lock {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
}
.chip-remove { cursor: pointer; transition: background .15s, color .15s; }
.chip-remove:hover { background: var(--rose-soft); color: var(--rose); }
.chip-lock { color: var(--coral); }
.chip-remove .icon, .chip-lock .icon { width: 13px; height: 13px; }

.picker-tools { display: grid; gap: .75rem; margin-bottom: 1rem; }
.category-filter { display: flex; flex-wrap: wrap; gap: .35rem; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.catalog-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s var(--ease-out);
}
.catalog-item:hover { border-color: var(--tide); box-shadow: 0 0 0 3px var(--tide-glow); transform: translateY(-1px); }
.catalog-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.catalog-name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-meta { font-size: .73rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-add { color: var(--faint); transition: color .18s, transform .18s var(--ease-out); }
.catalog-item:hover .catalog-add { color: var(--tide); transform: rotate(90deg); }
.picker-subhead { display: flex; align-items: center; gap: .5rem; margin: 1.4rem 0 .65rem; font-size: .8rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.picker-subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- Schedule ------------------------------------------------------------------------------------ */
.schedule-rule {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem 1.25rem;
    align-items: center;
    padding: .85rem 1rem;
    margin-bottom: .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-sunk);
}
.day-toggles { display: flex; gap: .3rem; flex-wrap: wrap; }
.day-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 650;
    cursor: pointer;
    transition: all .18s var(--ease-out);
}
.day-toggle:hover { border-color: var(--ink); }
.day-toggle.on { background: var(--tide); border-color: var(--tide); color: var(--surface); box-shadow: 0 4px 12px -6px var(--tide); }
.time-range { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .88rem; }
.time-range input { width: 8rem; }

.week-strip { display: grid; gap: .35rem; margin: .5rem 0 1.1rem; padding: 1rem 1.1rem .8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.week-row { display: grid; grid-template-columns: 2.4rem 1fr; align-items: center; gap: .6rem; }
.week-day { font-size: .74rem; font-weight: 650; color: var(--muted); letter-spacing: .04em; }
.week-track { position: relative; height: 12px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--surface-sunk) 0 calc(100% / 24 - 1px), var(--line) calc(100% / 24 - 1px) calc(100% / 24)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.week-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--tide), color-mix(in srgb, var(--tide) 75%, var(--sky))); }
.week-scale { display: grid; grid-template-columns: 2.4rem 1fr; gap: .6rem; font-family: var(--font-mono); font-size: .66rem; color: var(--faint); }
.week-scale div { display: flex; justify-content: space-between; }

/* ---- Lock panel ---------------------------------------------------------------------------------- */
.lock-panel {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.3rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.lock-glyph { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-sunk); color: var(--ink-soft); }
.lock-glyph .icon { width: 20px; height: 20px; }
.lock-body { flex: 1; min-width: 0; }
.lock-body h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 .2rem; }
.lock-body p { margin: 0; color: var(--ink-soft); }
.lock-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .85rem; }
.lock-panel.locked { background: linear-gradient(180deg, var(--coral-soft), color-mix(in srgb, var(--coral-soft) 35%, var(--surface))); border-color: color-mix(in srgb, var(--coral) 25%, transparent); }
.lock-panel.locked .lock-glyph { background: var(--coral); color: var(--surface); box-shadow: 0 8px 18px -10px var(--coral); }
.lock-panel.pending { background: linear-gradient(180deg, var(--sun-soft), color-mix(in srgb, var(--sun-soft) 35%, var(--surface))); border-color: color-mix(in srgb, var(--sun) 25%, transparent); }
.lock-panel.pending .lock-glyph { background: var(--sun); color: var(--surface); }
.lock-panel.open { background: linear-gradient(180deg, var(--tide-soft), color-mix(in srgb, var(--tide-soft) 35%, var(--surface))); border-color: color-mix(in srgb, var(--tide) 25%, transparent); }
.lock-panel.open .lock-glyph { background: var(--tide); color: var(--surface); }
.challenge {
    margin: .9rem 0 .6rem;
    padding: .95rem 1.05rem;
    border-radius: var(--radius);
    border: 1px dashed color-mix(in srgb, var(--coral) 50%, transparent);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: .95rem;
    line-height: 1.75;
    letter-spacing: .07em;
    word-break: break-all;
    user-select: none;
    -webkit-user-select: none;
}
.challenge-input { font-family: var(--font-mono); letter-spacing: .05em; }

/* ---- Sticky action bar --------------------------------------------------------------------------- */
.form-actions {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 1.75rem 0 0;
    padding: .7rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: var(--shadow-md);
}
.form-actions .spacer { flex: 1; }
.form-actions.plain { position: static; background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; }
.confirm-inline { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--rose); font-weight: 560; }

/* ---- Blocks -------------------------------------------------------------------------------------- */
.block-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.block-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.3rem 1.35rem 1.1rem;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.block-card:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.block-card.active::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tide); }
.block-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.block-card-head h2 { margin: 0; font-size: 1.3rem; }
.block-card-status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-soft); }
.block-card-status .countdown { color: var(--ink); }
.block-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .85rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .82rem; }
.block-card-foot .icon { width: 14px; height: 14px; }
.meta-line { display: inline-flex; align-items: center; gap: .4rem; }

/* ---- Devices ------------------------------------------------------------------------------------- */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.device-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem 1.3rem; color: inherit; text-decoration: none; transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s; }
.device-card:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.device-card-head { display: flex; align-items: center; gap: .85rem; }
.device-card-head h2 { flex: 1; margin: 0; font-size: 1.15rem; }
.device-card-meta { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); }
.platform-glyph {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: var(--surface-sunk);
    box-shadow: inset 0 0 0 1px var(--line);
}
.platform-glyph .icon { width: 22px; height: 22px; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.detail-grid > .card.section { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; font-size: .92rem; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; color: var(--ink); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .grow { flex: 1; min-width: 0; }
.list-plain code { font-size: .74rem; }

/* ---- Enrollment ---------------------------------------------------------------------------------- */
.enroll-layout { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: start; }
.enroll-qr { text-align: center; }
.qr-frame {
    position: relative;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}
.qr-frame img { display: block; width: 236px; height: 236px; image-rendering: pixelated; }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--tide); }
.qr-frame::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.qr-frame::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.qr-caption { margin-top: 1rem; font-size: .84rem; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.enroll-steps h2 { font-size: 1.55rem; }
.enroll-code { display: inline-block; margin-top: .4rem; padding: .45rem .8rem; font-size: 1.05rem; letter-spacing: .08em; background: var(--tide-soft); color: var(--tide-strong); }
.copy-line code { display: block; padding: .6rem .8rem; background: var(--surface-sunk); color: var(--ink-soft); border: 1px solid var(--line); word-break: break-all; }
.waiting { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.25rem; color: var(--muted); font-size: .88rem; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.75rem; margin-bottom: 1rem; color: var(--ink-soft); }
.steps li strong { color: var(--ink); }
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -.15rem;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .9rem;
    color: var(--tide-strong);
    background: var(--tide-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tide) 22%, transparent);
}

/* ---- Dashboard ----------------------------------------------------------------------------------- */
.now-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.25rem;
    align-items: center;
    padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    background:
        radial-gradient(520px 320px at 0% 0%, var(--tide-glow), transparent 70%),
        var(--surface);
}
.now-hero h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: .35rem 0 .5rem; }
.now-hero p { color: var(--muted); margin: 0; max-width: 52ch; }
.now-apps { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.now-apps .app-chip { padding-right: .7rem; animation: none; }

.zone-ring { position: relative; flex: none; }
.zone-ring svg { display: block; transform: rotate(-90deg); }
.ring-tick { stroke: var(--line-strong); stroke-width: 1.2; }
.ring-tick.major { stroke: var(--faint); stroke-width: 1.6; }
.ring-track { fill: none; stroke: var(--surface-sunk); }
.ring-value { fill: none; stroke: var(--tide); stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 4px 10px var(--tide-glow)); }
.zone-ring.locked .ring-value { stroke: var(--coral); }
.zone-ring.idle .ring-value { stroke: var(--line-strong); }
.zone-ring.endless .ring-value { animation: breathe-ring 5s ease-in-out infinite; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .15rem; }
.ring-time { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.ring-label { font-size: .68rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ring-center .icon { width: 30px; height: 30px; margin: 0 auto; color: var(--tide); transform: none; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { padding: 1.15rem 1.3rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 720; font-stretch: 88%; line-height: 1; letter-spacing: -.045em; }
.stat-label { color: var(--muted); font-size: .84rem; display: inline-flex; align-items: center; gap: .4rem; }
.stat-label .icon { width: 14px; height: 14px; }

.running-block { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.running-block:last-child { border-bottom: 0; }
.running-block:hover { color: inherit; }
.running-block:hover strong { color: var(--tide); }
.running-block .countdown-big { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 500; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: .5rem; bottom: .5rem; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; font-size: .9rem; color: var(--ink-soft); }
.timeline li::before { content: ""; position: absolute; left: 0; top: .42rem; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li.kind-warning::before { border-color: var(--sun); }
.timeline li.kind-tamper::before { border-color: var(--rose); background: var(--rose); }
.timeline li.kind-tamper { color: var(--rose); font-weight: 560; }
.timeline time { display: block; font-family: var(--font-mono); font-size: .72rem; color: var(--faint); margin-bottom: .1rem; }

/* ---- Sun art (decorative: halo, low sun, breeze) ------------------------------------------------- */
.sun-art { display: block; overflow: visible; }
.sun-art .sa-halo { fill: var(--sun-bright); opacity: .09; }
.sun-art .sa-halo.inner { opacity: .14; }
.sun-art .sa-sun { transform-origin: 100px 92px; animation: glow 9s ease-in-out infinite; }
.sun-art .sa-breeze { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.sun-art .sa-breeze.second { animation: drift 9s ease-in-out infinite; }

/* ---- Landing ------------------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 2rem 0 4.5rem; }
.hero h1 {
    font-size: clamp(3rem, 1.7rem + 4.4vw, 5.25rem);
    font-weight: 740;
    font-stretch: 92%;
    line-height: .98;
    letter-spacing: -.038em;
    margin: 1.1rem 0 1.4rem;
}
.hero h1 em { color: var(--tide); }
.hero .lede { font-size: 1.18rem; margin-bottom: 2rem; max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hero-note { margin-top: 1.25rem; font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }

.phone-stage { position: relative; display: grid; place-items: center; padding: 1rem 0 2rem; }
/* The sun rises from behind the phone's upper-left edge; the breeze passes behind it. */
.phone-stage > .sun-art { position: absolute; top: 50%; left: 50%; width: 540px; height: 540px; transform: translate(-75%, -70%); color: color-mix(in srgb, var(--tide) 55%, transparent); pointer-events: none; }
.phone-stage > .sun-art .sa-breeze { stroke-width: 2.4; }
.phone {
    position: relative;
    width: 262px;
    aspect-ratio: 9 / 18.6;
    padding: 11px;
    border-radius: 46px;
    background: linear-gradient(145deg, #1f4a47, #0a2322);
    box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .09);
    transform: rotate(4deg);
}
.phone-screen {
    position: relative;
    height: 100%;
    border-radius: 36px;
    padding: 2.7rem 1.05rem 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: start;
    gap: 1rem .55rem;
    background: linear-gradient(180deg, #ffe4cf 0%, #f8efe5 40%, #e1f0ea 100%);
    overflow: hidden;
}
@media (prefers-color-scheme: dark) { .phone-screen { background: linear-gradient(180deg, #2e2420 0%, #17221f 42%, #0f2525 100%); } }
.phone-notch { position: absolute; top: 20px; left: 50%; width: 76px; height: 21px; transform: translateX(-50%); border-radius: 999px; background: #06191a; }
.phone-time { position: absolute; top: 19px; left: 30px; font-family: var(--font-mono); font-size: .68rem; font-weight: 600; color: var(--ink); }
.phone-app { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .54rem; color: var(--ink-soft); font-weight: 600; }
.phone-app .mono { width: 44px; height: 44px; border-radius: 14px; font-size: 1.15rem; }
/* A blocked app vanishes from the home screen; the mockup draws only the empty slot it left. */
.phone-app.gone .mono {
    background: transparent;
    color: transparent;
    box-shadow: none;
    outline: 1.5px dashed color-mix(in srgb, var(--ink) 24%, transparent);
    outline-offset: -1.5px;
}
.phone-app.gone span { opacity: .4; text-decoration: line-through; }
.phone-dock {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    display: flex;
    justify-content: space-around;
    padding: 10px 8px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
}
.phone-dock .mono { width: 42px; height: 42px; border-radius: 14px; font-size: 1.05rem; }

.float-card {
    position: absolute;
    left: -2.5rem;
    bottom: 3.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem 1.1rem .8rem .8rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    animation: float 7s ease-in-out infinite;
}
.float-card .lock-glyph { width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: #fff; }
.float-card strong { display: block; font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.float-card span { font-size: .8rem; color: var(--muted); }
.float-card.top { left: auto; right: -3rem; top: -.75rem; bottom: auto; animation-delay: -3.5s; }
.float-card.top .lock-glyph { background: var(--tide); color: var(--surface); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 4rem; }
.feature { padding: 1.6rem 1.5rem 1.5rem; }
.feature .feature-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem; background: var(--tide-soft); color: var(--tide-strong); }
.feature:nth-child(2) .feature-icon { background: var(--sun-soft); color: var(--sun); }
.feature:nth-child(3) .feature-icon { background: var(--coral-soft); color: var(--coral-strong); }
.feature:nth-child(4) .feature-icon { background: var(--sky-soft); color: var(--sky); }
.feature .feature-icon .icon { width: 21px; height: 21px; }
.feature h2 { font-size: 1.25rem; margin-bottom: .45rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; line-height: 1.6; }

.band { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; padding: 3.25rem 0; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 720; font-stretch: 94%; letter-spacing: -.028em; line-height: 1.04; }
.how-list { counter-reset: how; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.how-list li { counter-increment: how; display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; }
.how-list li::before { content: counter(how, decimal-leading-zero); font-family: var(--font-display); font-weight: 760; font-stretch: 86%; font-size: 2.1rem; line-height: 1; letter-spacing: -.04em; color: var(--tide); }
.how-list strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: .2rem; }
.how-list p { margin: 0; color: var(--muted); font-size: .95rem; }

.ratchet { display: grid; gap: .6rem; }
.ratchet-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.05rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; }
.ratchet-row .icon { width: 18px; height: 18px; }
.ratchet-row.yes .icon { color: var(--tide); }
.ratchet-row.no { color: var(--muted); background: transparent; border-style: dashed; }
.ratchet-row.no .icon { color: var(--coral); }

.meaning {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 2.75rem;
    align-items: center;
    padding: 2.75rem 3rem;
    margin: .5rem 0 3.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    background:
        radial-gradient(560px 320px at 0% 0%, var(--dawn), transparent 70%),
        radial-gradient(560px 340px at 100% 100%, var(--tide-glow), transparent 70%),
        var(--surface);
}
.meaning-word { font-family: var(--font-display); font-size: clamp(3.4rem, 2rem + 4.4vw, 5.4rem); font-weight: 760; font-stretch: 90%; letter-spacing: -.045em; line-height: .9; margin: .6rem 0 1.25rem; color: var(--ink); }
.word-parts { display: flex; flex-wrap: wrap; gap: .5rem; }
.word-part { display: inline-flex; align-items: baseline; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .9rem; color: var(--ink-soft); }
.word-part b { font-family: var(--font-display); font-weight: 720; color: var(--tide-strong); }
.meaning-text p { color: var(--ink-soft); font-size: 1.06rem; line-height: 1.7; margin: 0 0 .9rem; }
.meaning-text p:last-child { margin-bottom: 0; }

.closing { text-align: center; padding: 3.5rem 1rem 1rem; border-top: 1px solid var(--line); }
.closing .sun-art { width: 112px; height: 112px; margin: 0 auto .75rem; color: var(--tide); }
.closing h2 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3.1rem); font-weight: 740; font-stretch: 92%; letter-spacing: -.035em; line-height: 1; margin-bottom: 1.5rem; }

/* ---- Prose (help) -------------------------------------------------------------------------------- */
.prose { max-width: 76ch; }
.prose > p, .prose > ul { color: var(--ink-soft); line-height: 1.7; }
.prose h2 { font-size: 1.55rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.1rem; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.4rem; margin-bottom: .55rem; }
.prose ul li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--tide); }
.prose .detail-grid { margin-top: 1rem; }
.prose .card.section ul li { color: var(--ink-soft); }
.prose > .legal-meta { color: var(--muted); font-size: .88rem; }

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: var(--surface-sunk);
    --bs-table-hover-bg: var(--surface-sunk);
    font-size: .92rem;
}
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); margin: 1rem 0; }
.table-wrap .table { margin: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; }
.table thead th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--surface-sunk); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table td:first-child { font-weight: 580; }

/* ---- Account area -------------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    color: #e6f3ef;
    overflow: hidden;
    background:
        radial-gradient(640px 460px at 88% 12%, rgba(246, 183, 60, .22), transparent 65%),
        radial-gradient(560px 400px at 8% 96%, rgba(111, 211, 196, .16), transparent 65%),
        linear-gradient(165deg, #12423e 0%, #0a2624 60%, #071b1a 100%);
}
.auth-aside .brand, .auth-aside .brand:hover { color: #f4fbf8; }
.auth-aside .brand-mark { color: #f4fbf8; }
.auth-aside > .sun-art { position: absolute; right: -200px; top: 34%; width: 520px; height: 520px; transform: translateY(-50%); color: rgba(244, 251, 248, .32); pointer-events: none; }
.auth-aside > .sun-art .sa-breeze { stroke-width: 2.6; }
.auth-aside > .sun-art .sa-halo { opacity: .07; }
.auth-quote { position: relative; max-width: 26rem; }
.auth-quote p { font-family: var(--font-display); font-size: clamp(2.2rem, 1.4rem + 2.2vw, 3.4rem); line-height: .98; letter-spacing: -.035em; font-weight: 740; font-stretch: 92%; margin: 0 0 1rem; color: #f4fbf8; }
.auth-quote p em { font-style: normal; color: #ffd27f; }
.auth-quote span { font-size: .95rem; color: rgba(230, 243, 239, .7); }
.auth-aside small { position: relative; color: rgba(230, 243, 239, .5); }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3rem 1.5rem; }
.auth-card { width: 100%; max-width: 430px; animation: rise .5s var(--ease-out) both; }
.auth-card h1 { font-size: 2.2rem; margin-bottom: .35rem; }
.auth-card h2 { font-family: var(--font-sans); font-size: 1rem; font-weight: 450; color: var(--muted); letter-spacing: 0; margin-bottom: 1.25rem; }
.auth-card h3 { font-size: 1rem; }
.auth-card .row { --bs-gutter-x: 0; margin: 0; }
.auth-card .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; margin-left: 0; }
.auth-card hr { margin: 1.25rem 0; }
.auth-card .btn-lg { width: 100%; }
.auth-sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.35rem 0; color: var(--faint); font-size: .76rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1.25rem; font-size: .88rem; }
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--ink); text-decoration: underline; }
.auth-switch { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .93rem; color: var(--muted); text-align: center; }
.auth-switch a { font-weight: 620; }
.auth-legal { margin: 1rem 0 0; font-size: .84rem; color: var(--muted); }
.form-check-row { display: flex; align-items: center; gap: .55rem; font-size: .92rem; color: var(--ink-soft); margin-bottom: 1.25rem; cursor: pointer; }
.form-check-row .form-check-input { margin: 0; }
.auth-card .form-floating { margin-bottom: .85rem; }
.auth-card .text-danger { display: block; margin-top: .35rem; }

@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; }
    .auth-aside { padding: 1.25rem 1.5rem; min-height: auto; }
    .auth-aside .auth-quote, .auth-aside small, .auth-aside > .sun-art { display: none; }
    .auth-main { justify-content: flex-start; padding-top: 2.5rem; }
}

.manage { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.manage-body { padding: 1.75rem 1.9rem; }
.manage-body h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 560; margin-bottom: 1rem; }
.manage-body .row > [class*="col-"] { flex: 1 1 100%; max-width: 560px; }
.nav-pills { gap: .15rem; }
.nav-pills .nav-link {
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
    padding: .55rem .85rem;
    font-weight: 520;
    font-size: .93rem;
    transition: background .18s, color .18s;
}
.nav-pills .nav-link:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.nav-pills .nav-link.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
@media (max-width: 760px) {
    .manage { grid-template-columns: 1fr; }
    .nav-pills { flex-direction: row !important; flex-wrap: wrap; }
}

/* ---- Utility pages ------------------------------------------------------------------------------- */
.lost-page { min-height: 55vh; display: grid; place-content: center; text-align: center; gap: .5rem; }
.lost-page .empty-art { width: 140px; height: 140px; margin: 0 auto 1rem; color: var(--tide); }
.lost-page h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); }
.lost-page p { color: var(--muted); max-width: 44ch; margin: 0 auto 1.25rem; }

/* Blazor plumbing */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 1000;
    transform: translateX(-50%);
    width: min(92vw, 520px);
    padding: .9rem 2.75rem .9rem 1.1rem;
    border-radius: var(--radius);
    background: var(--solid);
    color: var(--on-solid);
    box-shadow: var(--shadow-lg);
    font-size: .92rem;
}
#blazor-error-ui .reload { color: inherit; font-weight: 650; margin-left: .35rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .85rem; opacity: .7; }

.blazor-error-boundary {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--rose-soft);
    color: var(--rose);
    border: 1px solid color-mix(in srgb, var(--rose) 25%, transparent);
}
.blazor-error-boundary::after { content: "Something went wrong here. Reload the page to try again."; }

/* ---- Motion -------------------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { opacity: .7; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(.93); } }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }
@keyframes breathe-ring { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- Responsive ---------------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2.5rem; }
    .phone-stage { padding-top: 2rem; }
    .band { grid-template-columns: 1fr; gap: 1.5rem; }
    .meaning { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 720px) {
    .main { padding: 1.6rem 1rem 3.5rem; }
    .topbar-inner { padding: .65rem 1rem; }
    .card.section { padding: 1.25rem 1.15rem; }
    .now-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1.75rem 1.25rem; }
    .now-hero p { margin: 0 auto; }
    .now-apps { justify-content: center; }
    .enroll-layout { grid-template-columns: 1fr; justify-items: center; }
    .float-card { left: -1rem; }
    .float-card.top { right: -.5rem; }
    .phone-stage > .sun-art { width: 380px; height: 380px; }
    .form-actions { bottom: .6rem; }
    .meaning { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.75rem 1.4rem; }
}

/* ---- Additions ----------------------------------------------------------------------------------- */
.page-head .eyebrow a { color: inherit; }
.page-head .eyebrow a:hover { color: var(--tide-strong); }
.page-head h1 .btn-ghost { color: var(--muted); vertical-align: middle; }
.section-head .platform-glyph { width: 40px; height: 40px; border-radius: 12px; }
.section-head .platform-glyph .icon { width: 19px; height: 19px; }
.form-text .icon { width: 13px; height: 13px; vertical-align: -.15em; }
.text-end .badge { margin-top: .35rem; }
a.chip-btn { text-decoration: none; }
.ring-time { font-size: 1.18rem; }
