:root {
    --bg: #f3e6c9;
    --bg-alt: #ead7b2;
    --surface: rgba(255, 251, 243, 0.9);
    --surface-strong: #fffaf2;
    --surface-soft: rgba(255, 255, 255, 0.75);
    --surface-dark: #131d28;
    --text: #1f2a33;
    --muted: rgba(31, 42, 51, 0.68);
    --muted-strong: rgba(31, 42, 51, 0.82);
    --border: rgba(31, 42, 51, 0.1);
    --shadow: 0 12px 30px rgba(31, 42, 51, 0.08);
    --shadow-lg: 0 26px 80px rgba(31, 42, 51, 0.14);
    --primary: #2563eb;
    --secondary: #14b8a6;
    --accent: #f29d7e;
    --success: #7cc6a3;
    --warning: #ffb347;
    --danger: #d1675b;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::selection {
    background: rgba(37, 99, 235, 0.18);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

code {
    font-family: 'Space Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
}

/* Buttons ----------------------------------------------------------------- */

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.75rem 1.05rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.btn:hover,
button.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
button.btn:focus-visible,
.form-control:focus-visible,
.sidebar-toggle:focus-visible,
.sidebar-link:focus-visible,
.landing-links a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.btn-light {
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border);
    box-shadow: 0 10px 24px rgba(31, 42, 51, 0.06);
}

.btn-light:hover {
    border-color: rgba(37, 99, 235, 0.2);
    color: #1e40af;
}

.btn-danger {
    color: #a3251b;
    background: rgba(242, 157, 126, 0.16);
    border-color: rgba(242, 157, 126, 0.24);
}

.btn-danger:hover {
    background: rgba(242, 157, 126, 0.22);
}

.retro-btn {
    border-radius: 999px;
    padding-inline: 1.25rem;
}

/* Alerts ------------------------------------------------------------------ */

.alert {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}

.alert-success {
    color: #154b31;
    background: rgba(124, 198, 163, 0.16);
    border-color: rgba(124, 198, 163, 0.24);
}

.alert-error {
    color: #8a2d1f;
    background: rgba(242, 157, 126, 0.16);
    border-color: rgba(242, 157, 126, 0.24);
}

.alert ul {
    margin: 0;
    padding-left: 1.2rem;
}

.alert li + li {
    margin-top: 0.35rem;
}

/* Forms ------------------------------------------------------------------- */

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 42, 51, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.form-control::placeholder {
    color: rgba(31, 42, 51, 0.44);
}

.form-control:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.checkbox-row input {
    width: 1rem;
    height: 1rem;
}

/* Public shell ------------------------------------------------------------ */

body.public-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 28%),
        radial-gradient(circle at top right, rgba(242, 157, 126, 0.1), transparent 26%),
        linear-gradient(180deg, #f6f0e4 0%, #eedfbe 100%);
    color: var(--text);
    overflow-x: hidden;
}

body.public-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.5), transparent 24%),
        radial-gradient(circle at 82% 84%, rgba(124, 198, 163, 0.16), transparent 26%),
        radial-gradient(circle at 20% 85%, rgba(242, 157, 126, 0.1), transparent 22%);
    opacity: 0.8;
}

body.public-shell .public-flash-wrap {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 50;
    width: min(720px, calc(100% - 24px));
    display: grid;
    gap: 10px;
    transform: translateX(-50%);
}

body.public-shell .public-flash {
    margin: 0;
}

/* Landing page ------------------------------------------------------------ */

.landing-page {
    width: 100%;
    min-height: 100vh;
    padding: 24px 24px 28px;
}

.landing-frame {
    position: relative;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 24px;
    border-radius: 36px;
    border: 1px solid rgba(31, 42, 51, 0.08);
    background: linear-gradient(180deg, rgba(255, 251, 243, 0.92), rgba(247, 237, 218, 0.96));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.landing-frame::before,
.landing-frame::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.landing-frame::before {
    top: -130px;
    right: -130px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 157, 126, 0.18), rgba(242, 157, 126, 0) 70%);
}

.landing-frame::after {
    left: -120px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 198, 163, 0.18), rgba(124, 198, 163, 0) 70%);
}

.landing-header,
.landing-hero,
.landing-strip {
    position: relative;
    z-index: 1;
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.landing-logo {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.landing-brand-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    max-width: 34rem;
}

.brand-kicker {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(31, 42, 51, 0.52);
}

.landing-brand-copy strong {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.landing-brand-copy span {
    color: rgba(31, 42, 51, 0.66);
    line-height: 1.5;
}

.landing-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.landing-links a {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 42, 51, 0.1);
    background: rgba(255, 255, 255, 0.58);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.landing-links a:hover,
.landing-links a.is-active {
    transform: translateY(-1px);
    background: rgba(255, 248, 236, 0.92);
    border-color: rgba(58, 42, 31, 0.16);
    color: #20343a;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
    gap: 26px;
    align-items: stretch;
    margin-top: 28px;
}

.landing-copy {
    display: grid;
    align-content: start;
    gap: 24px;
    padding: 10px 4px 6px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(242, 157, 126, 0.14);
    border: 1px solid rgba(242, 157, 126, 0.22);
    color: #8a412c;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.landing-copy-text {
    display: grid;
    gap: 18px;
}

.landing-copy h1 {
    margin: 0;
    max-width: 9ch;
    font-size: clamp(3.6rem, 7.4vw, 7rem);
    line-height: 0.9;
    letter-spacing: -0.09em;
    color: #1a2430;
}

.landing-copy p {
    margin: 0;
    max-width: 46ch;
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(31, 42, 51, 0.74);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(31, 42, 51, 0.58);
}

.hero-note code {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(31, 42, 51, 0.08);
    color: #1f2a33;
    letter-spacing: 0.02em;
}

.landing-visual {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 16px;
    min-width: 0;
    min-height: 580px;
}

.visual-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(31, 42, 51, 0.08);
    box-shadow: 0 18px 40px rgba(31, 42, 51, 0.1);
}

.visual-card::before,
.visual-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.visual-card-main {
    min-height: 100%;
    padding: 24px;
    display: grid;
    align-content: space-between;
    color: #f4ecd8;
    background: linear-gradient(160deg, rgba(14, 20, 28, 0.98), rgba(27, 39, 55, 0.96));
}

.visual-card-main::before {
    inset: 18px 18px auto 18px;
    height: 22px;
    border-radius: 999px;
    opacity: 0.58;
    background:
        linear-gradient(
            90deg,
            rgba(244, 236, 216, 0.9) 0 12%,
            transparent 12% 24%,
            rgba(244, 236, 216, 0.9) 24% 36%,
            transparent 36% 48%,
            rgba(244, 236, 216, 0.9) 48% 60%,
            transparent 60% 72%,
            rgba(244, 236, 216, 0.9) 72% 84%,
            transparent 84% 100%
        );
}

.visual-card-main::after {
    right: -100px;
    bottom: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 157, 126, 0.26), rgba(242, 157, 126, 0) 68%);
}

.visual-card-head {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    max-width: 17rem;
}

.visual-card-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 236, 216, 0.58);
}

.visual-card-head strong {
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.visual-bib {
    position: relative;
    z-index: 1;
    width: min(100%, 260px);
    padding: 18px 18px 16px;
    border-radius: 24px;
    background: rgba(255, 251, 243, 0.96);
    color: #1f2a33;
    display: grid;
    gap: 8px;
    box-shadow: inset 0 0 0 1px rgba(31, 42, 51, 0.06);
}

.visual-bib::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background:
        linear-gradient(
            90deg,
            rgba(242, 157, 126, 0.12) 0 25%,
            rgba(124, 198, 163, 0.12) 25% 50%,
            rgba(242, 157, 126, 0.12) 50% 75%,
            rgba(124, 198, 163, 0.12) 75% 100%
        );
    mix-blend-mode: multiply;
    opacity: 0.28;
}

.visual-bib > * {
    position: relative;
    z-index: 1;
}

.visual-bib-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(31, 42, 51, 0.56);
}

.visual-bib strong {
    font-size: 4.4rem;
    line-height: 0.9;
    letter-spacing: -0.1em;
}

.visual-bib span {
    color: rgba(31, 42, 51, 0.68);
}

.visual-stack {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.visual-card-photo {
    padding: 18px;
    color: #f4ecd8;
    display: grid;
    align-content: end;
    min-height: 0;
}

.visual-card-photo strong {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    line-height: 1.1;
    max-width: 8ch;
}

.visual-mini-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: start;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 236, 216, 0.64);
}

.visual-card-photo-a {
    background: linear-gradient(160deg, rgba(242, 157, 126, 0.95), rgba(196, 93, 63, 0.92));
}

.visual-card-photo-a::before {
    top: 14px;
    right: 14px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 68%);
}

.visual-card-photo-a::after {
    right: -20px;
    bottom: -22px;
    width: 150px;
    height: 58px;
    background:
        linear-gradient(
            135deg,
            transparent 0 20%,
            rgba(255, 255, 255, 0.18) 20% 40%,
            transparent 40% 60%,
            rgba(255, 255, 255, 0.18) 60% 80%,
            transparent 80% 100%
        );
    transform: rotate(-12deg);
}

.visual-card-photo-b {
    background: linear-gradient(160deg, rgba(18, 28, 38, 0.95), rgba(42, 57, 77, 0.94));
}

.visual-card-photo-b::before {
    top: 16px;
    left: 16px;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(124, 198, 163, 0.8), rgba(124, 198, 163, 0.2));
    box-shadow: 0 0 0 10px rgba(124, 198, 163, 0.12);
}

.visual-card-photo-b::after {
    right: 18px;
    bottom: 18px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 236, 216, 0.2), rgba(244, 236, 216, 0) 66%);
}

.visual-card-photo-c {
    min-height: 136px;
    color: #1f2a33;
    background: linear-gradient(160deg, rgba(244, 236, 216, 0.96), rgba(227, 213, 184, 0.96));
}

.visual-card-photo-c::before {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(31, 42, 51, 0.05), rgba(31, 42, 51, 0) 24%),
        linear-gradient(
            90deg,
            rgba(242, 157, 126, 0.16) 0 18%,
            transparent 18% 36%,
            rgba(124, 198, 163, 0.16) 36% 54%,
            transparent 54% 72%,
            rgba(242, 157, 126, 0.16) 72% 90%,
            transparent 90% 100%
        );
    opacity: 0.7;
}

.visual-card-photo-c strong {
    color: #1f2a33;
}

.landing-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.strip-item {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 18px 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(31, 42, 51, 0.08);
    box-shadow: 0 12px 30px rgba(31, 42, 51, 0.06);
    overflow: hidden;
}

.strip-item::after {
    content: '';
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 157, 126, 0.12), rgba(242, 157, 126, 0) 68%);
}

.strip-index {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(31, 42, 51, 0.5);
}

.strip-item strong {
    font-size: 1.05rem;
    line-height: 1.35;
    color: #1f2a33;
}

.strip-item span:last-child {
    color: rgba(31, 42, 51, 0.7);
    line-height: 1.55;
}

/* Auth pages -------------------------------------------------------------- */

body.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 30%),
        linear-gradient(180deg, #f5ecd8 0%, #ebd7b3 100%);
    color: var(--text);
}

main.auth-shell {
    min-height: 100vh;
    padding: 24px;
}

.auth-grid {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
    gap: 20px;
    align-items: stretch;
}

.auth-hero,
.auth-card {
    position: relative;
    border-radius: 30px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(31, 42, 51, 0.08);
}

.auth-hero {
    display: grid;
    gap: 20px;
    align-content: start;
    overflow: hidden;
    color: #f4ecd8;
    background: linear-gradient(165deg, #111b26, #1b2a39);
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: auto -120px -100px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 157, 126, 0.22), rgba(242, 157, 126, 0) 68%);
}

.auth-hero::after {
    content: '';
    position: absolute;
    inset: -110px auto auto -130px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 198, 163, 0.18), rgba(124, 198, 163, 0) 68%);
}

.auth-hero > * {
    position: relative;
    z-index: 1;
}

.auth-card {
    display: grid;
    gap: 18px;
    align-content: start;
    background: rgba(255, 255, 255, 0.88);
}

.auth-hero h1 {
    margin: 0;
    max-width: 9ch;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.auth-hero p {
    margin: 0;
    max-width: 50ch;
    color: rgba(244, 236, 216, 0.74);
    line-height: 1.75;
}

.auth-card h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.auth-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.brand-mark {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.14em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.brand-mark.small {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 0.95rem;
}

.eyebrow {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow-retro {
    color: rgba(244, 236, 216, 0.68);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.retro-metric strong {
    display: block;
    font-size: 1.5rem;
    color: #fff;
}

.retro-metric span {
    color: rgba(244, 236, 216, 0.7);
}

.notice-card {
    display: grid;
    gap: 0.35rem;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-card strong {
    color: #fff;
}

.notice-card span {
    color: rgba(244, 236, 216, 0.74);
}

.notice-card code,
.landing-teaser code,
.hero-note code {
    font-size: 0.92em;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-teaser {
    display: grid;
    gap: 12px;
    margin-top: 4px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.landing-teaser strong {
    font-size: 1rem;
}

.landing-teaser p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.footer-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* App shell --------------------------------------------------------------- */

body.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.86), transparent 28%),
        linear-gradient(180deg, #eef3f7 0%, #e6ecf2 100%);
    color: var(--text);
    overflow-x: hidden;
}

.app-frame {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 24px;
    min-height: 100vh;
    padding: 26px 22px;
    overflow: auto;
    color: #f4ecd8;
    background: linear-gradient(180deg, #111b26, #0d141d);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy strong {
    display: block;
    font-size: 1.02rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-copy span {
    color: rgba(244, 236, 216, 0.64);
    line-height: 1.5;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-label {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 236, 216, 0.52);
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(244, 236, 216, 0.82);
    text-decoration: none;
    border: 1px solid transparent;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.sidebar-link .icon {
    width: 24px;
    text-align: center;
    color: var(--accent);
}

.sidebar-link:hover,
.sidebar-link.active {
    transform: translateX(2px);
    background: rgba(124, 198, 163, 0.14);
    border-color: rgba(124, 198, 163, 0.18);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 4px;
}

.caption {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 236, 216, 0.52);
}

.value {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.small-muted {
    color: rgba(244, 236, 216, 0.64);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sidebar-meta {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.64);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 0;
    background: linear-gradient(180deg, rgba(238, 243, 247, 0.96), rgba(238, 243, 247, 0.76));
    backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(31, 42, 51, 0.1);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.topbar-title h1 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.topbar-title span {
    color: var(--muted);
    font-size: 0.95rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(31, 42, 51, 0.1);
    box-shadow: var(--shadow);
    color: var(--muted);
}

.search-box input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--muted);
    outline: none;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 42, 51, 0.08);
    box-shadow: var(--shadow);
}

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.profile-chip strong {
    display: block;
    font-size: 0.95rem;
}

.profile-chip span {
    color: var(--muted);
    font-size: 0.85rem;
}

.content {
    padding: 24px 28px 34px;
    display: grid;
    gap: 22px;
}

.hidden-mobile {
    display: block;
}

/* Dashboard / workspace --------------------------------------------------- */

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 28px;
    border-radius: 28px;
    color: #f4ecd8;
    background: linear-gradient(135deg, #111b26, #1d2c3d);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
}

.hero-card h2 {
    margin: 10px 0 10px;
    max-width: 14ch;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-card p {
    margin: 0;
    max-width: 60ch;
    color: rgba(244, 236, 216, 0.74);
    line-height: 1.7;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 160px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(31, 42, 51, 0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0) 68%);
}

.stat-card.primary::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0) 68%);
}

.stat-card.success::after {
    background: radial-gradient(circle, rgba(124, 198, 163, 0.18), rgba(124, 198, 163, 0) 68%);
}

.stat-card.warning::after {
    background: radial-gradient(circle, rgba(255, 183, 77, 0.18), rgba(255, 183, 77, 0) 68%);
}

.stat-card.danger::after {
    background: radial-gradient(circle, rgba(242, 157, 126, 0.18), rgba(242, 157, 126, 0) 68%);
}

.stat-card.info::after {
    background: radial-gradient(circle, rgba(89, 145, 255, 0.16), rgba(89, 145, 255, 0) 68%);
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.15rem;
    background: rgba(31, 42, 51, 0.08);
}

.stat-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.stat-footnote {
    color: var(--muted);
    line-height: 1.5;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.panel {
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(31, 42, 51, 0.08);
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-header-spaced {
    margin-top: 22px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.panel-header p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-soft-primary {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.14);
}

.badge-soft-success {
    color: #12603b;
    background: rgba(124, 198, 163, 0.16);
    border-color: rgba(124, 198, 163, 0.18);
}

.badge-soft-danger {
    color: #9a3e2d;
    background: rgba(242, 157, 126, 0.16);
    border-color: rgba(242, 157, 126, 0.18);
}

.badge-soft-warning {
    color: #9a5b00;
    background: rgba(255, 183, 77, 0.16);
    border-color: rgba(255, 183, 77, 0.18);
}

.progress-stack {
    display: grid;
    gap: 14px;
}

.progress-item {
    display: grid;
    gap: 8px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.label-row span {
    color: var(--muted);
}

.label-row strong {
    font-size: 1rem;
}

.progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(31, 42, 51, 0.08);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.progress-meter {
    width: 100%;
    height: 12px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(31, 42, 51, 0.08);
}

.progress-meter::-webkit-progress-bar {
    background: rgba(31, 42, 51, 0.08);
    border-radius: 999px;
}

.progress-meter::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.progress-meter::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.progress-bar.success {
    background: linear-gradient(135deg, #58a27b, #7cc6a3);
}

.progress-bar.warning {
    background: linear-gradient(135deg, #ffb347, #f29d7e);
}

.progress-bar.danger {
    background: linear-gradient(135deg, #f29d7e, #d1675b);
}

.progress-meter.success::-webkit-progress-value,
.progress-meter.success::-moz-progress-bar {
    background: linear-gradient(135deg, #58a27b, #7cc6a3);
}

.progress-meter.warning::-webkit-progress-value,
.progress-meter.warning::-moz-progress-bar {
    background: linear-gradient(135deg, #ffb347, #f29d7e);
}

.progress-meter.danger::-webkit-progress-value,
.progress-meter.danger::-moz-progress-bar {
    background: linear-gradient(135deg, #f29d7e, #d1675b);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(31, 42, 51, 0.08);
    background: rgba(255, 255, 255, 0.74);
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(31, 42, 51, 0.08);
    background: rgba(31, 42, 51, 0.04);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: left;
}

.data-table tbody td {
    padding: 16px;
    border-bottom: 1px solid rgba(31, 42, 51, 0.06);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.task-row,
.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-avatar,
.member-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.task-meta,
.member-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.task-meta strong,
.member-meta strong {
    font-size: 1rem;
}

.task-meta span,
.member-meta span {
    color: var(--muted);
    line-height: 1.45;
}

.kpi-list {
    display: grid;
    gap: 12px;
}

.kpi-item {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(31, 42, 51, 0.04);
    border: 1px solid rgba(31, 42, 51, 0.06);
}

.kpi-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.02rem;
}

.kpi-item span {
    color: var(--muted);
    line-height: 1.55;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    margin-top: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.12);
}

.timeline-dot.success {
    background: #7cc6a3;
    box-shadow: 0 0 0 6px rgba(124, 198, 163, 0.14);
}

.timeline-dot.warning {
    background: #f29d7e;
    box-shadow: 0 0 0 6px rgba(242, 157, 126, 0.14);
}

.timeline-copy strong {
    display: block;
    margin-bottom: 4px;
}

.timeline-copy span {
    color: var(--muted);
    line-height: 1.55;
}

.status-badge,
.priority-badge,
.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-open,
.role-admin,
.priority-high {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.14);
}

.status-in_progress,
.role-manager,
.priority-medium {
    color: #9a5b00;
    background: rgba(255, 183, 77, 0.16);
    border-color: rgba(255, 183, 77, 0.18);
}

.status-blocked,
.priority-low {
    color: #9a3e2d;
    background: rgba(242, 157, 126, 0.16);
    border-color: rgba(242, 157, 126, 0.18);
}

.status-done,
.role-analyst {
    color: #12603b;
    background: rgba(124, 198, 163, 0.16);
    border-color: rgba(124, 198, 163, 0.18);
}

.status-neutral,
.role-viewer,
.priority-neutral {
    color: var(--text);
    background: rgba(31, 42, 51, 0.08);
    border-color: rgba(31, 42, 51, 0.1);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
    width: min(1440px, 100%);
    margin: 18px auto 0;
    padding: 18px 22px;
    border-radius: 26px;
    color: rgba(244, 236, 216, 0.9);
    background: linear-gradient(180deg, rgba(16, 22, 31, 0.98), rgba(22, 31, 43, 0.98));
    box-shadow: var(--shadow-lg);
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.footer-brand-copy {
    display: grid;
    gap: 4px;
}

.footer-brand-copy strong {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-brand-copy span,
.footer-copy span {
    color: rgba(244, 236, 216, 0.64);
    line-height: 1.5;
}

.footer-copy {
    display: grid;
    gap: 4px;
    text-align: right;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1200px) {
    .landing-hero,
    .two-column {
        grid-template-columns: 1fr;
    }

    .landing-copy h1 {
        max-width: 12ch;
    }

    .grid-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .app-frame {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
        width: min(300px, calc(100vw - 56px));
        transform: translateX(-102%);
        transition: transform 0.28s ease;
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.36);
    }

    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 15;
        background: rgba(7, 13, 20, 0.38);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .topbar {
        padding-inline: 18px;
    }

    .content {
        padding-inline: 18px;
    }
}

@media (max-width: 920px) {
    .landing-page {
        padding: 14px 14px 18px;
    }

    .landing-frame {
        padding: 18px;
        border-radius: 0;
    }

    .landing-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-links {
        justify-content: flex-start;
    }

    .landing-strip,
    .metric-row,
    .grid-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-shell {
        padding: 16px;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .hidden-mobile {
        display: none;
    }

    .hero-card {
        padding: 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-card h2 {
        max-width: 100%;
    }

    .content {
        padding-inline: 14px;
    }

    .grid-stats,
    .landing-strip {
        grid-template-columns: 1fr;
    }

    .landing-copy h1 {
        font-size: clamp(2.8rem, 12vw, 4rem);
    }

    .landing-logo {
        width: 58px;
        height: 58px;
    }

    .footer-copy {
        text-align: left;
    }
}

@media (max-width: 620px) {
    .landing-frame,
    .auth-hero,
    .auth-card,
    .panel,
    .hero-card,
    .site-footer {
        border-radius: 22px;
    }

    .landing-frame {
        padding: 14px;
        border-radius: 0;
    }

    .landing-copy {
        gap: 18px;
    }

    .landing-copy h1 {
        font-size: clamp(2.5rem, 13vw, 3.4rem);
    }

    .landing-visual {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .visual-card-main {
        min-height: 320px;
    }

    .visual-stack {
        grid-template-rows: none;
    }

    .visual-card-photo {
        min-height: 124px;
    }

    .metric-row {
        grid-template-columns: 1fr;
    }

    .form-actions,
    .hero-actions,
    .landing-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    button.btn {
        width: 100%;
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }

    .topbar-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .profile-chip {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Scrapbook landing override --------------------------------------------- */

body.public-shell {
    background:
        linear-gradient(180deg, rgba(255, 249, 239, 0.88), rgba(239, 224, 190, 0.98)),
        url('../images/bg_1.png') center top / 100% 100% no-repeat;
}

body.public-shell::before {
    display: none;
    content: none;
}

.landing-page {
    padding: 18px;
}

.landing-frame {
    width: min(1536px, 100%);
    min-height: calc(100vh - 36px);
    margin: 0 auto;
    padding: 22px 22px 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 251, 243, 0.94), rgba(246, 235, 214, 0.98));
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
}

.landing-frame::before {
    display: none;
    content: none;
}

.landing-frame::after {
    display: none;
    content: none;
}

.landing-header {
    padding: 4px 2px 0;
}

.landing-brand {
    min-height: 64px;
}

.landing-wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: clamp(2rem, 2vw, 2.35rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #20343a;
}

.landing-wordmark .wordmark-tag {
    color: #20343a;
}

.landing-wordmark .wordmark-my {
    color: #c45f3b;
}

.landing-wordmark .wordmark-race {
    color: #426f69;
}

.landing-wordmark sup {
    top: -0.25em;
    margin-left: 0.12rem;
    font-size: 0.48em;
    color: #20343a;
}

.landing-links a {
    min-width: 104px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 10px;
    background: rgba(255, 250, 242, 0.7);
    border-color: rgba(58, 42, 31, 0.14);
}

.landing-links a.is-active {
    color: #fff;
    background: #c45f3b;
    border-color: rgba(196, 95, 59, 0.18);
}

.landing-hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    gap: 18px;
    align-items: end;
    margin-top: 20px;
    flex: 1 1 auto;
}

.landing-copy {
    padding: 12px 0 18px;
    gap: 18px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-family: 'Patrick Hand', 'Inter', sans-serif;
    font-size: 1.4rem;
    line-height: 1;
    color: #b9472f;
    transform: rotate(-1deg);
}

.landing-copy h1 {
    max-width: 8ch;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: clamp(4rem, 6.8vw, 6.9rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
    color: #1d3132;
}

.hero-lede {
    max-width: 24ch;
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(29, 49, 50, 0.84);
}

.hero-actions {
    gap: 12px;
}

.hero-note {
    margin-top: -6px;
    font-family: 'Patrick Hand', 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(58, 42, 31, 0.84);
}

.landing-scene {
    position: relative;
    min-height: 610px;
    display: grid;
    align-content: start;
}

.scene-card {
    position: absolute;
    border-radius: 18px;
    border: 1px solid rgba(58, 42, 31, 0.12);
    box-shadow: 0 18px 34px rgba(58, 42, 31, 0.16);
}

.scene-photo {
    top: 10px;
    right: 28px;
    width: min(100%, 420px);
    height: 320px;
    transform: rotate(3deg);
    background:
        linear-gradient(180deg, rgba(36, 57, 77, 0.18), rgba(36, 57, 77, 0) 34%),
        linear-gradient(135deg, #6a7f8b 0%, #22313b 42%, #1a2024 100%);
    overflow: hidden;
}

.scene-photo::before {
    content: '';
    position: absolute;
    inset: 18px 16px 16px 16px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 52% 22%, rgba(245, 234, 208, 0.95) 0 12%, rgba(245, 234, 208, 0) 13%),
        linear-gradient(180deg, rgba(178, 208, 233, 0.92), rgba(112, 146, 171, 0.54) 42%, rgba(58, 72, 86, 0.92) 100%);
}

.scene-sky {
    position: absolute;
    inset: 18px 16px auto 16px;
    height: 126px;
    border-radius: 14px 14px 0 0;
    background:
        radial-gradient(circle at 26% 26%, rgba(255, 255, 255, 0.92) 0 14%, rgba(255, 255, 255, 0) 15%),
        radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.92) 0 10%, rgba(255, 255, 255, 0) 11%),
        linear-gradient(180deg, #d7eef8, #b0d0e5 60%, rgba(0, 0, 0, 0));
}

.scene-finish {
    position: absolute;
    top: 112px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(18, 28, 34, 0.96);
    color: #f5eed7;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.scene-runner {
    position: absolute;
    left: 50%;
    bottom: 54px;
    width: 110px;
    height: 92px;
    transform: translateX(-50%);
}

.scene-runner::before {
    content: '';
    position: absolute;
    left: 45px;
    top: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2f1f18;
    box-shadow:
        -8px 20px 0 -2px #2f1f18,
        8px 20px 0 -2px #2f1f18;
}

.scene-runner::after {
    content: '';
    position: absolute;
    left: 36px;
    top: 20px;
    width: 38px;
    height: 42px;
    border-radius: 16px 16px 12px 12px;
    background: linear-gradient(180deg, #2e7d7a, #1f5b58);
    box-shadow:
        -24px 12px 0 -11px #2f1f18,
        28px 18px 0 -11px #2f1f18,
        -8px 42px 0 -12px #b9472f,
        12px 42px 0 -12px #b9472f;
}

.scene-tape {
    position: absolute;
    width: 92px;
    height: 20px;
    background: rgba(218, 198, 167, 0.82);
    box-shadow: 0 8px 12px rgba(58, 42, 31, 0.08);
}

.scene-tape-left {
    top: -8px;
    left: 12px;
    transform: rotate(-8deg);
}

.scene-tape-right {
    top: -8px;
    right: 14px;
    transform: rotate(8deg);
}

.scene-bib {
    left: 18px;
    bottom: 86px;
    width: 230px;
    padding: 0;
    overflow: hidden;
    transform: rotate(-5deg);
    background: #f6ebd4;
}

.scene-bib::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, #c94f32 0 22%, rgba(201, 79, 50, 0.96) 22% 24%, rgba(0, 0, 0, 0) 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 28%);
}

.bib-top,
.bib-number,
.bib-date {
    position: relative;
    z-index: 1;
    text-align: center;
}

.bib-top {
    padding: 12px 10px 4px;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: 1.3rem;
    color: #fff8eb;
    letter-spacing: 0.08em;
}

.bib-number {
    padding: 8px 10px 2px;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: 4.4rem;
    line-height: 0.95;
    color: #18252b;
}

.bib-date {
    padding: 0 10px 12px;
    font-size: 0.94rem;
    font-weight: 800;
    color: #1a2528;
    letter-spacing: 0.08em;
}

.scene-medal {
    right: 8px;
    bottom: 42px;
    width: 174px;
    height: 222px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(36, 68, 60, 0.96), rgba(57, 93, 83, 0.94));
    transform: rotate(2deg);
}

.medal-ribbon {
    position: absolute;
    top: -8px;
    left: 52px;
    width: 66px;
    height: 132px;
    background:
        linear-gradient(180deg, #2e7d7a 0 100%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 6px, rgba(255, 255, 255, 0) 6px 14px);
    clip-path: polygon(12% 0, 88% 0, 100% 80%, 50% 100%, 0 80%);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.18);
}

.medal-disc {
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 116px;
    height: 116px;
    transform: translateX(-50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 245, 217, 0.28), rgba(255, 245, 217, 0) 46%),
        linear-gradient(180deg, #d8a13b, #8c5f18);
    box-shadow: inset 0 0 0 5px rgba(245, 226, 180, 0.44), 0 14px 22px rgba(0, 0, 0, 0.25);
}

.medal-disc::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 2px solid rgba(245, 226, 180, 0.72);
}

.medal-disc span {
    position: relative;
    z-index: 1;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: 2.35rem;
    color: #fff2c7;
    letter-spacing: 0.06em;
}

.scene-stamp {
    right: 18px;
    bottom: 10px;
    width: 126px;
    height: 126px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 3px solid rgba(39, 59, 55, 0.9);
    color: rgba(39, 59, 55, 0.92);
    background: rgba(255, 248, 233, 0.74);
    transform: rotate(-12deg);
    text-align: center;
    box-shadow: inset 0 0 0 3px rgba(255, 248, 233, 0.7);
}

.scene-stamp span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.scene-stamp strong {
    display: block;
    margin-top: -4px;
    font-family: 'Bree Serif', Georgia, serif;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.landing-tear {
    display: block;
    width: calc(100% + 44px);
    height: 280px;
    margin: -14px -22px -6px;
    object-fit: cover;
    object-position: center 84%;
    border-radius: 0;
}

.landing-collage {
    position: relative;
    min-height: 560px;
}

.photo-frame {
    position: absolute;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(58, 42, 31, 0.14);
    background: rgba(255, 250, 241, 0.96);
    box-shadow: 0 14px 28px rgba(58, 42, 31, 0.14);
}

.photo-frame::before {
    display: none;
    content: none;
}

.photo-frame::after {
    display: none;
    content: none;
}

.photo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-image-main {
    object-position: center center;
}

.photo-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    text-align: center;
    font-family: 'Patrick Hand', 'Inter', sans-serif;
    font-size: 1.15rem;
    color: rgba(58, 42, 31, 0.8);
    background: #f8f1e3;
}

.photo-frame-main {
    top: 12px;
    right: 12px;
    width: min(100%, 440px);
    height: 330px;
    transform: rotate(3deg);
}

.photo-frame-bib {
    left: 18px;
    bottom: 76px;
    width: 238px;
    height: 180px;
    transform: rotate(-6deg);
}

.photo-frame-medal {
    right: 10px;
    bottom: 28px;
    width: 176px;
    height: 222px;
    transform: rotate(2deg);
}

@media (max-width: 1100px) {
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-scene {
        min-height: 640px;
    }

    .landing-collage {
        min-height: 620px;
    }
}

@media (max-width: 760px) {
    .landing-page {
        padding: 12px;
    }

    .landing-frame {
        padding: 16px 16px 0;
        border-radius: 0;
    }

    .landing-links {
        width: 100%;
        justify-content: space-between;
    }

    .landing-links a {
        min-width: 0;
        flex: 1 1 0;
    }

    .landing-copy h1 {
        max-width: 100%;
        font-size: clamp(3.4rem, 15vw, 5rem);
    }

    .hero-lede {
        max-width: 100%;
    }

    .landing-scene {
        min-height: 600px;
        transform: scale(0.96);
        transform-origin: top center;
    }

    .landing-collage {
        min-height: 590px;
        transform: scale(0.96);
        transform-origin: top center;
    }

    .photo-frame-main {
        right: 4px;
        width: calc(100% - 40px);
    }

    .photo-frame-bib {
        left: 0;
    }

    .photo-frame-medal {
        right: 0;
    }

    .landing-tear {
        height: 210px;
        width: calc(100% + 32px);
        margin: -10px -16px -2px;
    }
}

/* Landing cleanup: mobile-first, responsive, and self-contained ------------ */

body.public-shell {
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(255, 251, 243, 0.88), rgba(239, 224, 190, 0.98)),
        url('../images/bg_1.png') center top / cover no-repeat;
}

body.public-shell::before {
    display: none;
    content: none;
}

body.public-shell .landing-page {
    width: 100%;
    min-height: 100dvh;
    padding: clamp(10px, 1.6vw, 20px);
    position: relative;
    z-index: 1;
}

body.public-shell .landing-frame {
    width: min(1560px, 100%);
    margin: 0 auto;
    padding: 0;
    display: grid;
    gap: clamp(10px, 1.4vw, 18px);
    align-content: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

body.public-shell .landing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    text-align: center;
}

body.public-shell .landing-brand {
    min-height: 0;
}

body.public-shell .landing-links {
    width: 100%;
    justify-content: center;
}

body.public-shell .landing-links a {
    min-width: 0;
    flex: 1 1 0;
    max-width: 180px;
    border-color: rgba(58, 42, 31, 0.14);
}

body.public-shell .landing-links a:hover,
body.public-shell .landing-links a.is-active {
    background: rgba(255, 248, 236, 0.92);
    border-color: rgba(58, 42, 31, 0.16);
    color: #20343a;
}

body.public-shell .landing-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(12px, 1.8vw, 18px);
    align-items: start;
    margin-top: 0;
}

body.public-shell .landing-copy {
    display: grid;
    gap: 8px;
    padding: 0;
    align-items: center;
    justify-items: center;
    text-align: center;
}

body.public-shell .landing-copy h1 {
    max-width: 100%;
    font-size: clamp(2.8rem, 12vw, 5rem);
}

body.public-shell .hero-kicker {
    letter-spacing: 0.16em;
}

body.public-shell .hero-lede {
    max-width: 28ch;
    margin-inline: auto;
}

body.public-shell .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
}

body.public-shell .landing-collage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.86fr);
    gap: 8px;
    width: min(100%, 560px);
    margin: 0 auto;
    min-height: 0;
    align-items: end;
    transform: none;
}

body.public-shell .photo-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    transform: none;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

body.public-shell .photo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.public-shell .photo-image-main {
    object-fit: cover;
    object-position: center center;
}

body.public-shell .photo-frame-main {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 5;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    filter: drop-shadow(0 14px 28px rgba(58, 42, 31, 0.16));
}

body.public-shell .photo-frame-bib {
    aspect-ratio: 500 / 398;
    align-self: end;
    justify-self: end;
    margin-top: -14px;
    margin-right: -4px;
    z-index: 2;
    filter: drop-shadow(0 12px 18px rgba(58, 42, 31, 0.14));
}

body.public-shell .photo-frame-medal {
    aspect-ratio: 417 / 599;
    align-self: start;
    justify-self: start;
    margin-top: 12px;
    margin-left: -4px;
    z-index: 1;
    filter: drop-shadow(0 12px 18px rgba(58, 42, 31, 0.14));
}

body.public-shell .photo-frame-bib,
body.public-shell .photo-frame-medal {
    background: transparent;
}

body.public-shell .landing-tear {
    display: none !important;
}

body.public-shell .landing-footer {
    margin-top: clamp(4px, 0.8vw, 10px);
    padding: 12px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 1px solid rgba(58, 42, 31, 0.12);
    color: rgba(58, 42, 31, 0.78);
}

body.public-shell .landing-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

body.public-shell .landing-footer-brand strong {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #20343a;
}

body.public-shell .landing-footer-brand span,
body.public-shell .landing-footer-copy span {
    color: rgba(58, 42, 31, 0.7);
    line-height: 1.5;
}

body.public-shell .landing-footer-copy {
    display: grid;
    gap: 4px;
    font-size: 0.95rem;
}

@media (min-width: 960px) {
    body.public-shell .landing-page {
        padding: 16px;
    }

    body.public-shell .landing-frame {
        gap: clamp(12px, 1.6vw, 20px);
    }

    body.public-shell .landing-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 18px;
        text-align: left;
    }

    body.public-shell .landing-links {
        width: auto;
        justify-content: flex-end;
    }

    body.public-shell .landing-links a {
        min-width: 104px;
        max-width: none;
        flex: 0 0 auto;
    }

    body.public-shell .landing-hero {
        grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
        align-items: end;
        gap: clamp(16px, 2vw, 28px);
    }

    body.public-shell .landing-copy {
        align-items: flex-start;
        justify-items: start;
        text-align: left;
        gap: 10px;
        padding-top: 6px;
    }

    body.public-shell .landing-copy h1 {
        max-width: 8ch;
    }

    body.public-shell .hero-lede {
        max-width: 24ch;
        margin-inline: 0;
    }

    body.public-shell .hero-actions {
        justify-content: flex-start;
    }

    body.public-shell .landing-collage {
        display: block;
        width: 100%;
        min-height: 590px;
        margin: 0;
        justify-self: end;
    }

    body.public-shell .photo-frame {
        position: absolute;
    }

    body.public-shell .photo-frame-main {
        top: 12px;
        right: 12px;
        width: min(100%, 540px);
        aspect-ratio: 4 / 5;
        transform: rotate(2.5deg);
    }

    body.public-shell .photo-frame-bib {
        left: 18px;
        bottom: 82px;
        width: 250px;
        height: 198px;
        aspect-ratio: auto;
        transform: rotate(-6deg);
    }

    body.public-shell .photo-frame-medal {
        right: 12px;
        bottom: 20px;
        width: 196px;
        height: 244px;
        aspect-ratio: auto;
        transform: rotate(2deg);
    }

    body.public-shell .landing-footer {
        padding-inline: 12px;
    }
}

@media (min-width: 1280px) {
    body.public-shell .landing-copy h1 {
        font-size: clamp(4rem, 6.4vw, 7rem);
    }

    body.public-shell .landing-collage {
        min-height: 640px;
    }

    body.public-shell .photo-frame-main {
        width: min(100%, 580px);
    }

    body.public-shell .photo-frame-bib {
        left: 24px;
        width: 262px;
        height: 208px;
    }

    body.public-shell .photo-frame-medal {
        right: 18px;
        width: 208px;
        height: 258px;
    }
}
