:root {
    --red: #E73038;
    --red-deep: #C41B28;
    --red-soft: #FFE8EA;
    --yellow: #F4C01D;
    --yellow-deep: #D4A40F;
    --cream: #F2EDE4;
    --cream-2: #FFF6D6;
    --sky: #D2E1F0;
    --purple: #5A1851;
    --ink: #111111;
    --navy: #5A1851;
    --navy-2: #E73038;
    --line: #E8D9A8;
    --muted: #6B6B6B;
    --soft: #F2EDE4;
    --green: #F4C01D;
    --green-text: #111111;
    --danger: #E73038;
    --card: #FFFFFF;
    --shadow: 0 24px 50px rgba(90, 24, 81, 0.16);
    --radius: 28px;
    --font: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    --display: "Fraunces", Georgia, serif;
    --tap: 48px;
    --theme-bg: url("../images/theme-bg.jpg");
}

* { box-sizing: border-box; }
html, body {
    height: 100%;
    min-height: 100dvh;
}
body {
    margin: 0;
    font-family: var(--font);
    background-color: #E6242E;
    background-image: var(--theme-bg);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    color: var(--ink);
}

.kiosk-body {
    min-height: 100dvh;
}

.stage {
    position: relative;
    isolation: isolate;
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background-color: #E6242E;
    background-image: var(--theme-bg);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}
.stage > * {
    position: relative;
    z-index: 1;
}

.phone {
    width: min(640px, 100%);
    height: min(920px, 100%);
    max-height: 100%;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--yellow);
    margin: 0 auto;
    transition: max-width 0.25s ease, width 0.25s ease;
}

/* On Prompts and Mode screens, allow phone to expand wider on large screens only */
.stage:has(#screen-prompts.active) .phone,
.stage--prompts .phone,
.stage:has(#screen-mode.active) .phone,
.stage--mode-pick .phone {
    width: min(960px, 96vw);
    max-width: 960px;
}
@media (max-width: 680px) {
    .stage:has(#screen-prompts.active) .phone,
    .stage--prompts .phone,
    .stage:has(#screen-mode.active) .phone,
    .stage--mode-pick .phone {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
        border-width: 0;
        box-shadow: none;
    }
}

/* Landing: use the full stage */
.stage:has(#screen-landing.active),
.stage--landing {
    align-items: stretch;
    justify-content: stretch;
    padding: 10px;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.stage:has(#screen-landing.active) .phone,
.stage--landing .phone {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
}

/* Voice Booth: use full stage width (no narrow centered card) */
#voice-stage {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
#voice-stage .phone {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border-width: 0;
    box-shadow: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--red) 78%);
    color: #fff;
    flex-shrink: 0;
    border-bottom: 3px solid var(--yellow);
}
.brand-back {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 2px solid var(--yellow);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}
.brand-back span {
    transform: translateY(-1px);
}
.brand-back:hover {
    background: rgba(255, 255, 255, 0.24);
}
.brand-back[hidden] {
    display: none !important;
}
.brand-copy {
    min-width: 0;
    flex: 1;
}
.brand-mark {
    height: 56px;
    width: auto;
    max-width: 220px;
    border-radius: 8px;
    background: transparent;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}
.brand-name {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.brand-signal {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--yellow);
}
.brand-tag {
    margin: 1px 0 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--yellow);
    line-height: 1.3;
}

.stage--landing .topbar,
.phone:has(#screen-landing.active) .topbar {
    display: none;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 18px 0;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-queue {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--red-deep);
}
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 4px rgba(255, 195, 0, 0.28);
}
.icon-btn {
    border: 0; background: transparent; color: var(--red); cursor: pointer;
    width: 40px; height: 40px; border-radius: 999px;
    touch-action: manipulation;
}
.icon-btn:hover { background: var(--cream-2); }

.screen {
    display: none;
    flex: 1;
    min-height: 0;
    padding: 4px 18px 10px;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #fff;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.94) 100%),
        url("assets/kiosk-story-pattern.jpg");
    background-size: auto, 240px;
}
.screen.active { display: flex; }
#screen-landing,
#screen-welcome,
#screen-form,
#screen-enter,
#screen-prompts {
    padding-top: 0;
}
#screen-landing {
    overflow: hidden;
}
#screen-prompts {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#screen-prompts .landing-intro {
    flex-shrink: 0;
    margin-bottom: 2px;
}
#screen-prompts .landing-intro-logo {
    height: 40px;
    max-width: 140px;
}
#screen-prompts .landing-welcome-title {
    font-size: 0.9rem;
}
#screen-prompts .landing-welcome-subtitle {
    font-size: 0.62rem;
    margin-bottom: 0;
}
#screen-prompts .promptoo-howto {
    padding-top: 4px;
    padding-bottom: 0;
}
#screen-prompts .promptoo-bar {
    padding-top: 8px;
    padding-bottom: 8px;
}
#screen-prompts .promptoo-coauthor-wrap {
    flex-shrink: 0;
}
#screen-prompts .promptoo-foot {
    flex-shrink: 0;
    background: #fff;
}
#screen-welcome .hero,
#screen-form,
#screen-vvip,
#screen-otp,
#screen-success .grow,
#screen-already .grow {
    max-width: none;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 4px;
    padding-right: 4px;
}
.grow { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: 0 4px 12px; }
.story-art {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    margin: 0 0 14px;
    border: 3px solid var(--yellow);
    box-shadow: 0 10px 22px rgba(237, 48, 59, 0.18);
    flex-shrink: 0;
    background: #fff;
}
.story-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-art-hero,
#screen-enter .story-art-banner {
    flex: 1 1 auto;
    height: auto;
    min-height: 220px;
    margin-top: 0;
}
.story-art-hero {
    min-height: 180px;
}
.story-art-banner {
    height: 92px;
}
/* Form: slightly shorter hero (less scroll with name/phone fields) */
#screen-form .story-art-hero {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: min(31vh, 250px);
    min-height: 0;
    max-height: min(31vh, 250px);
    margin: 0 0 8px;
}
/* Queue: compact hero so page fits without scroll (keeps logo stable). */
#screen-enter-queue .story-art-hero {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: min(24vh, 200px);
    min-height: 0;
    max-height: min(24vh, 200px);
    margin: 0 0 6px;
}
/* Welcome (New Author Registration): full-width hero */
#screen-welcome .story-art-hero {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: min(43vh, 370px);
    min-height: 0;
    max-height: min(43vh, 370px);
    margin: 0 0 8px;
}
#screen-welcome .story-art-hero img,
#screen-form .story-art-hero img,
#screen-enter-queue .story-art-hero img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    display: block;
}
.story-art-wide {
    height: 110px;
}
h1 {
    margin: 0 0 10px;
    width: 100%;
    font-family: var(--display);
    font-size: clamp(1.55rem, 7.4vw, 2.05rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--red-deep);
}
.lead { margin: 0 0 12px; color: var(--muted); line-height: 1.4; font-size: 0.9rem; }

.landing {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 6px 8px 8px;
    overflow: hidden;
}
.landing-fx {
    display: none;
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.landing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.28;
    animation: landing-float 7s ease-in-out infinite;
}
.landing-orb--1 {
    width: 140px;
    height: 140px;
    left: -30px;
    top: 10%;
    background: radial-gradient(circle, rgba(244, 192, 29, 0.45), rgba(244, 192, 29, 0));
}
.landing-orb--2 {
    width: 160px;
    height: 160px;
    right: -36px;
    bottom: 10%;
    background: radial-gradient(circle, rgba(231, 48, 56, 0.2), rgba(231, 48, 56, 0));
    animation-delay: -2.4s;
}
.landing-spark {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 6px rgba(244, 192, 29, 0.22);
    animation: landing-spark 3.6s ease-in-out infinite;
}
.landing-spark--1 { left: 18%; top: 10%; animation-delay: 0s; }
.landing-spark--2 { right: 22%; top: 22%; animation-delay: -1.2s; }
.landing-spark--3 { left: 46%; bottom: 16%; animation-delay: -2.1s; }
@keyframes landing-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(16px, -18px, 0) scale(1.08); }
}
@keyframes landing-spark {
    0%, 100% { transform: scale(0.7); opacity: 0.35; }
    50% { transform: scale(1.15); opacity: 1; }
}
@keyframes landing-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.landing-grid {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
    height: 100%;
}
.landing-copy {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: landing-rise 0.55s ease both;
}
.landing-copy h1 {
    font-size: clamp(1.35rem, 3.2vw, 1.9rem);
    margin-bottom: 4px;
    flex-shrink: 0;
}
.landing-copy .lead {
    font-size: 0.82rem;
    max-width: 42rem;
    margin-bottom: 8px;
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.landing-copy .kicker {
    flex-shrink: 0;
    margin-bottom: 2px;
}

.landing-copy .kicker,
.landing-copy h1,
.landing-copy .lead {
    text-align: center;
}
.landing-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    margin: 0 0 6px;
    flex-shrink: 0;
    animation: landing-rise 0.55s ease both;
}
.landing-intro-logo {
    width: auto;
    height: 64px;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 2px;
    opacity: 0.96;
}
.landing-welcome-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
}
.landing-welcome-title .lw-line1 {
    color: var(--purple);
    font-weight: 600;
}
.landing-welcome-title .lw-highlight {
    font-weight: 800;
    background: linear-gradient(90deg, var(--red) 0%, var(--red-deep) 55%, var(--yellow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--red);
}
.landing-welcome-subtitle {
    font-family: var(--font);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--red);
    margin: 2px 0 0;
    max-width: 22rem;
    position: relative;
    padding-top: 6px;
}
.landing-welcome-subtitle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--yellow);
}
@media (min-width: 900px) and (min-height: 700px) {
    .landing-intro-logo { height: 72px; max-width: 240px; }
    .landing-welcome-title { font-size: 1.28rem; }
    .landing-welcome-subtitle { font-size: 0.7rem; }
}
.landing-slider {
    position: relative;
    width: 100%;
    margin: 0 auto 6px;
    background: transparent;
    flex: 1 1 auto;
    min-height: min(48vh, 360px);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    border: 0;
    overflow: visible;
}
.landing-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #f6ead0;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--yellow);
    box-shadow: 0 10px 22px rgba(237, 48, 59, 0.18);
}
.landing-viewport::before {
    content: "";
    position: absolute;
    inset: -18px;
    z-index: 0;
    background: var(--slide-bg, none) center / cover no-repeat;
    filter: blur(22px) saturate(1.15);
    opacity: 0.55;
    transform: scale(1.12);
}
.landing-slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.landing-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.landing-slide.is-on {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.landing-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}
.landing-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}
.landing-slider-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 28px 48px 10px;
    background: linear-gradient(180deg, rgba(255, 248, 235, 0) 0%, rgba(255, 248, 235, 0.92) 42%, rgba(255, 248, 235, 0.97) 100%);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    min-height: 0;
    max-width: none;
}
.landing-slider-nav {
    position: absolute;
    top: 46%;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--red-deep);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-50%);
}
.landing-slider-prev { left: 8px; }
.landing-slider-next { right: 8px; }
.landing-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 44px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.landing-dot {
    pointer-events: auto;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}
.landing-dot.is-on {
    background: var(--red);
    transform: scale(1.2);
}
.landing-hero {
    position: relative;
    min-height: 180px;
    max-height: 240px;
    height: auto;
    margin-bottom: 0;
    animation: landing-rise 0.7s ease both;
}
.landing-safe-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: #166534;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 8px 12px;
    box-shadow: 0 6px 14px rgba(22, 101, 52, 0.28);
    animation: landing-badge 2.4s ease-in-out infinite;
}
@keyframes landing-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.landing-points {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}
.landing-points li {
    position: relative;
    padding: 12px 14px 12px 38px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    animation: landing-rise 0.55s ease both;
}
.landing-points li:nth-child(1) { animation-delay: 0.08s; }
.landing-points li:nth-child(2) { animation-delay: 0.16s; }
.landing-points li:nth-child(3) { animation-delay: 0.24s; }
.landing-points li:nth-child(4) { animation-delay: 0.32s; }
.landing-points li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 12px;
    color: var(--red);
    font-weight: 800;
}
.landing-ai-credit {
    margin: 0 0 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(90, 24, 81, 0.06);
    border: 1px dashed rgba(90, 24, 81, 0.22);
    color: var(--purple);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    animation: landing-rise 0.55s ease 0.4s both;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.landing-gemini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 800;
}
.landing-gemini-logo {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}
.landing-powered {
    color: var(--red-deep);
    font-weight: 800;
    font-size: 0.78rem;
}
.landing-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    position: static;
    width: 100%;
    background: transparent;
}
.landing-actions .btn {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.form-legal {
    margin: 10px 0 0;
    font-size: 0.74rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}
.form-legal a {
    color: var(--purple);
    font-weight: 700;
    text-decoration: underline;
}
/* Desk VVIP: no visible button — open via double-click on #welcome-vi-logo only */
#welcome-vi-logo {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}
.vvip-desk-btn {
    display: none !important;
}
#screen-vvip .sticky-actions {
    margin-top: 12px;
    position: static;
    background: transparent;
}

/* Registration-desk VIP shortcut — hidden for now; re-enable later when needed. */
.vip-bypass {
    display: none !important;
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    z-index: 20;
    pointer-events: none;
}

/* Compact branding on inner screens so content fits without scroll */
#screen-welcome .landing-intro,
#screen-form .landing-intro,
#screen-otp .landing-intro,
#screen-success .landing-intro,
#screen-already .landing-intro,
#screen-enter-queue .landing-intro,
#screen-prompts .landing-intro,
#screen-mode .landing-intro {
    margin: 0 0 6px;
    gap: 2px;
}
#screen-welcome .landing-intro-logo,
#screen-form .landing-intro-logo,
#screen-otp .landing-intro-logo,
#screen-success .landing-intro-logo,
#screen-already .landing-intro-logo,
#screen-enter-queue .landing-intro-logo,
#screen-prompts .landing-intro-logo,
#screen-mode .landing-intro-logo {
    height: 56px;
    max-width: 180px;
    margin-bottom: 0;
}
#screen-welcome .landing-welcome-title,
#screen-form .landing-welcome-title,
#screen-otp .landing-welcome-title,
#screen-success .landing-welcome-title,
#screen-already .landing-welcome-title,
#screen-enter-queue .landing-welcome-title,
#screen-prompts .landing-welcome-title,
#screen-mode .landing-welcome-title {
    font-size: 0.92rem;
}
#screen-welcome .landing-welcome-subtitle,
#screen-form .landing-welcome-subtitle,
#screen-otp .landing-welcome-subtitle,
#screen-success .landing-welcome-subtitle,
#screen-already .landing-welcome-subtitle,
#screen-enter-queue .landing-welcome-subtitle,
#screen-prompts .landing-welcome-subtitle,
#screen-mode .landing-welcome-subtitle {
    font-size: 0.55rem;
    padding-top: 3px;
    letter-spacing: 0.03em;
}
#screen-welcome .landing-welcome-subtitle::before,
#screen-form .landing-welcome-subtitle::before,
#screen-otp .landing-welcome-subtitle::before,
#screen-success .landing-welcome-subtitle::before,
#screen-already .landing-welcome-subtitle::before,
#screen-enter-queue .landing-welcome-subtitle::before,
#screen-prompts .landing-welcome-subtitle::before,
#screen-mode .landing-welcome-subtitle::before {
    width: 18px;
    height: 1.5px;
}
#screen-welcome,
#screen-form,
#screen-vvip,
#screen-otp,
#screen-enter-queue,
#screen-success,
#screen-already {
    overflow-x: hidden;
    overflow-y: auto;
}
#screen-welcome .hero {
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 10px;
    padding-left: 4px;
    padding-right: 4px;
    height: 100%;
    min-height: 0;
}
#screen-welcome h1 {
    flex-shrink: 0;
    margin-bottom: 2px;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    font-size: clamp(1.25rem, 5.5vw, 1.55rem);
}
#screen-welcome .lead {
    flex-shrink: 0;
    margin-bottom: 4px;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    font-size: 0.84rem;
}
#screen-welcome .welcome-cta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 0 12px;
    box-sizing: border-box;
}
#screen-welcome .welcome-cta .btn {
    width: 100%;
    min-height: 48px;
    margin: 0;
}
#screen-form .landing-intro {
    margin-bottom: 4px;
}
#screen-form .landing-intro-logo {
    height: 52px;
    max-width: 170px;
}
#screen-form .keypad {
    margin-top: 4px;
    margin-bottom: 4px;
}
#screen-form .landing-welcome-title {
    font-size: 0.85rem;
}
#screen-form .kicker {
    display: none !important;
}
#screen-form .section-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
}
#screen-form label.field {
    margin: 6px 0 4px;
}
#screen-form .input {
    padding: 12px 12px;
}
#screen-form .form-legal {
    margin-top: 6px;
    font-size: 0.72rem;
}
#screen-form .btn-row.sticky-actions {
    margin-top: 8px;
    position: static;
    background: transparent;
}
#screen-form .landing-welcome-subtitle {
    display: none;
}
#screen-enter-queue .btn-row.sticky-actions {
    position: static;
    background: transparent;
    margin-top: 8px !important;
    flex-shrink: 0;
}
#screen-enter-queue .landing-welcome-subtitle {
    display: none;
}
#screen-enter-queue {
    overflow: hidden !important; /* no page scroll — stops logo/layout shift */
    padding-top: 0;
    padding-bottom: 8px;
}
#screen-enter-queue .desk-enter-wrap {
    padding: 0 !important;
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#screen-enter-queue .desk-enter-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}
#screen-enter-queue .landing-intro {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin: 0 0 4px;
    background: #fff;
}
#screen-enter-queue .landing-intro-logo {
    height: 44px;
    max-width: 150px;
}
#screen-enter-queue .landing-welcome-title {
    font-size: 0.95rem;
}
#screen-enter-queue .desk-enter-art {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-bottom: 6px;
}
#screen-enter-queue .kicker {
    margin: 0 0 2px;
    font-size: 0.72rem;
    flex-shrink: 0;
}
#screen-enter-queue .section-title {
    margin: 0 0 4px;
    font-size: 1.2rem;
    flex-shrink: 0;
}
#screen-enter-queue .desk-howto {
    margin: 0 0 6px;
    padding: 6px 10px;
    flex-shrink: 0;
}
#screen-enter-queue label.field {
    margin: 4px 0 4px;
    flex-shrink: 0;
}
#screen-enter-queue .input {
    flex-shrink: 0;
    padding: 12px;
}
#screen-enter-queue .err {
    flex-shrink: 0;
}
#screen-welcome h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.55rem);
    margin-bottom: 4px;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}
#screen-welcome .lead {
    margin-bottom: 0;
    font-size: 0.84rem;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}
#screen-welcome .welcome-cta .btn {
    min-height: 48px;
}
@media (max-height: 780px) {
    #screen-welcome .landing-intro,
    #screen-form .landing-intro,
    #screen-enter-queue .landing-intro {
        margin-bottom: 4px;
    }
    #screen-welcome .landing-intro-logo,
    #screen-form .landing-intro-logo,
    #screen-enter-queue .landing-intro-logo {
        height: 48px;
        max-width: 160px;
    }
    #screen-welcome .landing-welcome-subtitle,
    #screen-form .landing-welcome-subtitle,
    #screen-enter-queue .landing-welcome-subtitle {
        display: none;
    }
}
@media (min-width: 900px) and (min-height: 700px) {
    #screen-landing { padding: 10px 22px 16px; }
    .landing-copy { max-width: none; margin: 0 auto; width: 100%; }
    .landing-actions {
        align-items: center;
        margin-top: 10px;
    }
    .landing-actions .btn {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 899px), (max-height: 699px) {
    .landing {
        overflow: hidden;
        padding: 4px 2px 8px;
    }
    .landing-fx { display: none; }
    .landing-grid { gap: 8px; }
    .landing-hero {
        min-height: 96px;
        max-height: min(28vh, 180px);
    }
    .landing-copy h1 {
        font-size: clamp(1.2rem, 5.6vw, 1.55rem);
        margin-bottom: 2px;
    }
    .landing-copy .lead {
        display: none;
    }
    .landing-slider {
        width: 100%;
        margin-bottom: 4px;
        flex: 0 1 auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        max-height: min(46vh, 300px);
    }
    .landing-viewport {
        width: 100%;
        height: 100%;
    }
    .landing-slider-caption {
        font-size: 0.74rem;
        padding: 20px 40px 8px;
    }
    .landing-slider-nav {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    .landing-slider-dots { bottom: 36px; }
    .landing-ai-credit {
        font-size: 0.72rem;
        padding: 6px 10px;
        margin-bottom: 4px;
    }
    .landing-actions {
        margin-top: 8px;
        align-items: center;
    }
    .landing-safe-badge {
        font-size: 0.62rem;
        padding: 5px 8px;
        left: 8px;
        bottom: 8px;
    }
    .dpdp-overlay { padding: 8px; align-items: stretch; }
    .dpdp-panel {
        width: 100%;
        max-height: 100%;
        border-radius: 16px;
    }
}
/* Phone only: fill white space with taller phone-cropped slides (desktop stays as before). */
@media (max-width: 899px) {
    #screen-landing .landing {
        padding: 6px 6px max(10px, env(safe-area-inset-bottom));
    }
    #screen-landing .landing-grid {
        gap: 0;
        height: 100%;
    }
    #screen-landing .landing-copy {
        justify-content: space-between;
        gap: clamp(10px, 2.2vh, 22px);
        height: 100%;
    }
    #screen-landing .landing-intro {
        margin: 0;
        gap: clamp(4px, 1vh, 10px);
        padding-top: clamp(2px, 0.8vh, 8px);
    }
    #screen-landing .landing-intro-logo {
        height: clamp(56px, 9vh, 72px);
        max-width: min(240px, 62vw);
    }
    #screen-landing .landing-slider {
        width: 100%;
        flex: 1 1 auto;
        align-self: stretch;
        margin: 0;
        min-height: min(42vh, 300px);
        max-height: none;
        aspect-ratio: auto;
    }
    #screen-landing .landing-viewport {
        width: 100%;
        height: 100%;
        min-height: inherit;
        border-radius: 18px;
    }
    /* Phone crops are already portrait — cover fills without stretching the art. */
    #screen-landing .landing-slide img {
        object-fit: cover;
        object-position: center top;
    }
    #screen-landing .landing-actions {
        margin-top: 0;
        margin-bottom: clamp(4px, 1.2vh, 12px);
        align-items: center;
        gap: clamp(6px, 1vh, 10px);
    }
    #screen-landing .landing-actions .btn {
        min-height: 48px;
    }
}
@media (max-width: 360px), (max-height: 620px) {
    .landing-slider { width: 100%; }
    .brand-mark { height: 40px; max-width: 150px; }
    .brand-name { font-size: 0.8rem; }
    .btn { min-height: 44px; font-size: 0.92rem; }
}
@media (max-width: 360px) {
    #screen-landing .landing-slider {
        min-height: min(38vh, 260px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .landing-orb,
    .landing-spark,
    .landing-safe-badge,
    .landing-copy,
    .landing-hero,
    .landing-slider,
    .landing-ai-credit {
        animation: none;
    }
}
.landing-legal {
    margin-top: 4px;
    padding-top: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 700;
}
.landing-legal a {
    color: var(--purple);
    text-decoration: underline;
}
.landing-legal span { color: var(--muted); }

.dpdp-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(17, 17, 17, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dpdp-overlay[hidden] { display: none; }
.dpdp-panel {
    width: min(560px, 100%);
    max-height: min(86vh, 760px);
    background: #fff;
    border-radius: 22px;
    border: 3px solid var(--yellow);
    box-shadow: var(--shadow);
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.dpdp-panel .section-title { margin-bottom: 8px; }
.dpdp-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.45;
}
.dpdp-scroll h3 {
    margin: 12px 0 6px;
    font-size: 0.88rem;
    color: var(--red-deep);
}
.dpdp-scroll p { margin: 0 0 8px; }
.dpdp-scroll a { color: var(--purple); font-weight: 700; }
.dpdp-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 8px;
}
.dpdp-check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.dpdp-check a { color: var(--purple); }

.terms-page .phone {
    height: min(920px, 96vh);
}
.terms-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px 18px 18px;
    background: #fff;
}
.terms-body h1 {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    margin-bottom: 4px;
}
.terms-body h2 {
    margin: 18px 0 8px;
    font-size: 1.05rem;
    color: var(--red-deep);
}
.terms-body h3 {
    margin: 12px 0 6px;
    font-size: 0.92rem;
}
.terms-body p,
.terms-body li {
    color: #374151;
    font-size: 0.86rem;
    line-height: 1.5;
}
.terms-body ul {
    margin: 0 0 10px;
    padding-left: 18px;
}
.terms-meta {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.terms-back {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--purple);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    min-height: var(--tap);
    font-weight: 800;
    font-size: 0.98rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
a.btn {
    text-decoration: none;
    box-sizing: border-box;
}
.btn-dark {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(231, 48, 56, 0.28);
}
.btn-dark:hover { filter: brightness(1.06); }
.btn-dark:disabled { opacity: 0.5; cursor: wait; }
.btn-ghost {
    background: #fff;
    color: var(--red-deep);
    border: 2px solid var(--yellow);
    margin-top: 12px;
}
.btn-soft { background: var(--cream-2); color: var(--red-deep); }
.btn-row { display: flex; gap: 10px; margin-top: auto; padding-top: 12px; }
.btn-row .btn { width: auto; flex: 1; }
.mode-pick {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}
.mode-pick .btn-ghost { margin-top: 0; }
.mode-pick .linkish { margin-top: 4px; }

/* ——— Voice mode pick (mobile-first) ——— */
.screen-mode {
    padding: 6px 14px 10px;
    gap: 10px;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
.mode-hello {
    margin: 0;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--red-deep);
    text-align: right;
    max-width: min(56vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mode-guide {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px;
    background:
        radial-gradient(circle at 18% 30%, rgba(255, 211, 0, 0.35), transparent 55%),
        linear-gradient(135deg, #FFF8D6 0%, #fff 62%);
    border: 3px solid var(--yellow);
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(237, 48, 59, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 0;
    flex: 0 0 auto;
    isolation: isolate;
}
.mode-guide-art {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 72px;
    flex: 0 0 72px;
}
.mode-guide-kid {
    width: 72px;
    height: auto;
    max-height: 88px;
    display: block;
    object-fit: contain;
    transform-origin: 55% 90%;
    filter: drop-shadow(0 6px 8px rgba(90, 24, 81, 0.16));
    background: transparent;
}
.mode-guide-play .mode-guide-kid {
    animation: modeKidBounce 1.8s ease-in-out infinite;
}
.mode-guide-bubble {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 2px solid var(--red);
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: 0 6px 12px rgba(237, 48, 59, 0.1);
    z-index: 1;
}
.mode-guide-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 40%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(45deg);
}
.mode-guide-ask {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(0.88rem, 3.8vw, 1.05rem);
    font-weight: 700;
    color: var(--red-deep);
    line-height: 1.25;
}
.mode-guide-hint {
    margin: 4px 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.3;
}
.mode-guide-play .mode-guide-bubble {
    animation: modeBubbleIn 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.mode-guide-spark {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--yellow);
    opacity: 0;
    pointer-events: none;
}
.mode-guide-spark--1 { top: 12%; left: 10%; }
.mode-guide-spark--2 { top: 18%; right: 6%; background: var(--red); }
.mode-guide-spark--3 { bottom: 24%; left: 6%; background: var(--purple); }
.mode-guide-play .mode-guide-spark--1 { animation: modeSpark 1.6s ease-in-out 0.1s infinite; }
.mode-guide-play .mode-guide-spark--2 { animation: modeSpark 1.7s ease-in-out 0.35s infinite; }
.mode-guide-play .mode-guide-spark--3 { animation: modeSpark 1.5s ease-in-out 0.55s infinite; }
@keyframes modeKidBounce {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}
@keyframes modeBubbleIn {
    0% { opacity: 0; transform: translateX(8px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes modeSpark {
    0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
    40% { opacity: 1; transform: scale(1.15) rotate(18deg); }
    70% { opacity: 0.55; transform: scale(0.85) rotate(-8deg); }
}
@media (prefers-reduced-motion: reduce) {
    .mode-guide-play .mode-guide-kid,
    .mode-guide-play .mode-guide-bubble,
    .mode-guide-play .mode-guide-spark--1,
    .mode-guide-play .mode-guide-spark--2,
    .mode-guide-play .mode-guide-spark--3,
    .mode-guide-play .mode-guide,
    .mode-guide-play .mode-card--quick,
    .mode-guide-play .mode-card--standard,
    .mode-guide-play .mode-card-badge,
    .mode-guide-play .mode-notes,
    .mode-guide-play .screen-mode .linkish,
    .stage--mode-pick.mode-guide-play .mode-side-kid,
    .stage--mode-pick.mode-guide-play .mode-side-bubble,
    .stage--mode-pick.mode-guide-play .mode-side-mascot .mode-guide-spark {
        animation: none !important;
    }
    .mode-card:hover { transform: none; }
}

/* Mobile default: stacked mode cards (no side-by-side squeeze) */
.mode-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}
.mode-cards--single {
    grid-template-columns: 1fr !important;
    max-width: min(560px, 100%);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-items: stretch;
}
.mode-cards--single + .mode-notes,
.screen-mode:has(.mode-cards--single) .mode-guide {
    max-width: min(560px, 100%);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
/* Keep Vi logo + welcome line full-width centered (like before Pro was removed). */
#screen-mode:has(.mode-cards--single) .landing-intro {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
    align-items: center;
    text-align: center;
}
#screen-mode:has(.mode-cards--single) .landing-intro-logo {
    margin-left: auto;
    margin-right: auto;
}
.mode-card {
    width: 100%;
    text-align: left;
    border: 3px solid var(--yellow);
    border-radius: 16px;
    padding: 10px 12px 9px;
    min-height: 0;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(237, 48, 59, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.mode-card--quick {
    background: linear-gradient(180deg, #FFF8D6 0%, #fff 58%);
    border-color: var(--yellow-deep);
}
.mode-card--standard {
    background: #fff;
}
.mode-card:hover {
    filter: none;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(237, 48, 59, 0.18);
}
.mode-card--quick:hover { border-color: var(--red); }
.mode-card--standard:hover { border-color: var(--purple); }
.mode-card:active { transform: scale(0.985) translateY(0); }
.mode-card:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.mode-card--locked,
.mode-card--locked:hover,
.mode-card--locked:active {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
    filter: grayscale(0.2);
}
.mode-card-badge {
    display: inline-flex;
    align-items: center;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 999px;
    margin-bottom: 1px;
}
.mode-card-badge--alt {
    background: var(--purple);
}
.mode-card-title {
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--red-deep);
    line-height: 1.15;
}
.mode-card-special {
    margin: 4px 0 2px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--red-deep);
    opacity: 0.92;
}
.mode-card--standard .mode-card-special {
    color: var(--purple);
}
.mode-card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
}
.mode-card-list {
    margin: 2px 0 0;
    padding: 0 0 0 1rem;
    width: 100%;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}
.mode-card-list li { margin: 0 0 2px; }

/* Mode pick entrance animations */
.mode-guide-play .mode-guide {
    animation: modeGuidePop 0.5s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}
.mode-guide-play .mode-card--quick {
    animation: modeCardIn 0.55s cubic-bezier(0.2, 1.15, 0.4, 1) 0.12s both;
}
.mode-guide-play .mode-card--standard {
    animation: modeCardIn 0.55s cubic-bezier(0.2, 1.15, 0.4, 1) 0.24s both;
}
.mode-guide-play .mode-card-badge {
    animation: modeBadgePulse 1.8s ease-in-out 0.4s infinite;
}
.mode-guide-play .mode-notes {
    animation: modeFadeUp 0.45s ease 0.36s both;
}
.mode-guide-play .screen-mode .linkish {
    animation: modeFadeUp 0.45s ease 0.45s both;
}
@keyframes modeGuidePop {
    0% { opacity: 0; transform: translateY(-10px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modeCardIn {
    0% { opacity: 0; transform: translateY(18px) scale(0.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modeBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes modeFadeUp {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.mode-notes {
    background: var(--cream-2);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 8px 12px;
    margin: 0;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}
.mode-notes-title {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red-deep);
    cursor: pointer;
    list-style: none;
}
.mode-notes-title::-webkit-details-marker { display: none; }
.mode-notes[open] .mode-notes-title { margin-bottom: 6px; }
.mode-notes-list {
    margin: 0;
    padding: 0 0 0 1.05rem;
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.4;
}
.mode-notes-list li { margin: 0 0 5px; }
.mode-notes-list li:last-child { margin-bottom: 0; }
.screen-mode .linkish {
    align-self: center;
    min-height: 40px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.screen-mode #mode-error:empty {
    display: none;
}
.mode-side-mascot {
    display: none;
}

/* Wider phones / small tablets: two columns again (unless only Quick Mode) */
@media (min-width: 520px) {
    .mode-cards {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .mode-cards--single {
        grid-template-columns: 1fr !important;
    }
    .mode-card {
        height: 100%;
    }
    .mode-card-list {
        flex: 1 1 auto;
    }
    .mode-guide-art {
        width: 84px;
        flex-basis: 84px;
    }
    .mode-guide-kid {
        width: 84px;
        max-height: 100px;
    }
}

/* Desktop: full-width phone; mascot floats over the left edge */
@media (min-width: 980px) {
    .stage--mode-pick {
        position: relative;
        gap: 0;
        justify-content: stretch;
        align-items: stretch;
    }
    .stage--mode-pick .mode-side-mascot {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        width: min(180px, 16vw);
        position: absolute;
        left: max(10px, env(safe-area-inset-left));
        bottom: max(72px, 8vh);
        z-index: 6;
        pointer-events: none;
    }
    .stage--mode-pick .mode-side-kid {
        width: min(160px, 14vw);
        height: auto;
        display: block;
        background: transparent;
        filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
        transform-origin: 55% 90%;
    }
    .stage--mode-pick.mode-guide-play .mode-side-kid {
        animation: modeKidBounce 1.8s ease-in-out infinite;
    }
    .stage--mode-pick .mode-side-bubble {
        position: relative;
        background: #fff;
        border: 3px solid var(--yellow);
        border-radius: 18px;
        padding: 10px 14px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
        max-width: 100%;
    }
    .stage--mode-pick .mode-side-bubble::after {
        content: '';
        position: absolute;
        top: -10px;
        left: 50%;
        width: 16px;
        height: 16px;
        background: #fff;
        border-top: 3px solid var(--yellow);
        border-left: 3px solid var(--yellow);
        transform: translateX(-50%) rotate(45deg);
    }
    .stage--mode-pick.mode-guide-play .mode-side-bubble {
        animation: modeBubbleIn 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both;
    }
    .stage--mode-pick .mode-side-ask {
        margin: 0;
        font-family: var(--display);
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--red-deep);
        text-align: center;
        line-height: 1.25;
    }
    .stage--mode-pick .mode-side-mascot .mode-guide-spark { opacity: 0; }
    .stage--mode-pick.mode-guide-play .mode-side-mascot .mode-guide-spark--1 {
        animation: modeSpark 1.6s ease-in-out 0.1s infinite;
    }
    .stage--mode-pick.mode-guide-play .mode-side-mascot .mode-guide-spark--2 {
        animation: modeSpark 1.7s ease-in-out 0.35s infinite;
    }
    .stage--mode-pick.mode-guide-play .mode-side-mascot .mode-guide-spark--3 {
        animation: modeSpark 1.5s ease-in-out 0.55s infinite;
    }
    .stage--mode-pick .phone {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
    }
    .stage--mode-pick .mode-guide-art { display: none; }
    .stage--mode-pick .mode-guide-bubble::before { display: none; }
    .screen-mode {
        padding: 12px clamp(18px, 4vw, 48px) 14px;
        gap: 14px;
        max-width: 1100px;
        width: 100%;
        margin: 0 auto;
    }
    .mode-cards { flex: 1 1 auto; }
    .mode-card-title { font-size: 1.22rem; }
    .mode-card-special { font-size: 0.84rem; }
    .mode-card-list { font-size: 0.86rem; }
}

/* Very short phones: keep mode pick scannable */
@media (max-height: 700px) {
    .screen-mode { padding-top: 4px; gap: 8px; }
    .mode-guide { padding: 6px; }
    .mode-guide-art { width: 60px; flex-basis: 60px; }
    .mode-guide-kid { width: 60px; max-height: 72px; }
    .mode-guide-ask { font-size: 0.86rem; }
    .mode-guide-hint { display: none; }
    .mode-card { padding: 8px 10px; }
    .mode-card-list { font-size: 0.72rem; }
    .mode-card-list li:nth-child(n+4) { display: none; }
    .mode-card-special { font-size: 0.7rem; }
    .brand { padding: 6px 12px; }
    .brand-mark { height: 44px; }
    .brand-tag { display: none; }
}
.sticky-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 28%);
    padding-bottom: 4px;
    z-index: 3;
}

.bottom-nav {
    display: flex;
    gap: 8px;
    padding: 6px 12px 8px;
    flex-shrink: 0;
    background: #fff;
}
.nav-pill {
    flex: 1;
    border: 0;
    background: #fff;
    color: var(--muted);
    border-radius: 14px;
    padding: 8px 4px;
    min-height: 40px;
    font-weight: 800;
    font-size: 0.68rem;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    border: 1px solid var(--line);
}
.nav-pill.active {
    background: var(--yellow);
    color: var(--red-deep);
    border-color: var(--yellow-deep);
}

.kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 800;
    margin-bottom: 6px;
}
.section-title {
    display: block;
    width: 100%;
    font-family: var(--display);
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: var(--red-deep);
}

label.field {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--red-deep);
    margin: 10px 0 6px;
}
label.field[hidden],
.input[hidden] {
    display: none !important;
}
.input {
    width: 100%;
    border: 2px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 14px 14px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    color: var(--ink);
}
.input:focus, .input.is-focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.35);
    background: #fff;
}

.keypad {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0 4px;
    flex-shrink: 0;
}
.keypad.is-open {
    display: grid;
}
#otp-keypad,
#keypad,
#queue-keypad {
    display: none !important;
}
.key {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    min-height: 52px;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    color: var(--red-deep);
}
.key:active { background: var(--yellow); }
.key.ghost { background: transparent; border-color: transparent; color: var(--muted); }

.alert-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--yellow);
    color: var(--red-deep);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; margin: 24px auto 18px;
}
.center { text-align: center; }
.muted { color: var(--muted); }

.otp-wrap {
    position: relative;
    margin: 8px 0 10px;
}
.otp-slots {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    pointer-events: none;
}
.otp-slot {
    height: 52px;
    border: 2px solid var(--line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    background: #fff;
    color: var(--red-deep);
}
.otp-slot.is-filled {
    background: var(--cream-2);
    border-color: var(--yellow-deep);
}
.otp-slot.is-active {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.4);
    background: #fff;
}
.otp-real {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.02;
    color: transparent;
    caret-color: transparent;
    background: transparent;
    border: 0;
    font-size: 16px;
    letter-spacing: 0;
}

.queue-card {
    margin: 20px 0;
    background: linear-gradient(135deg, var(--purple) 0%, var(--red) 72%);
    color: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    border: 3px solid var(--yellow);
}
.queue-card small { color: var(--yellow); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.queue-card strong { display: block; font-size: clamp(2.6rem, 12vw, 4rem); letter-spacing: -0.06em; margin-top: 6px; color: #fff; }
.dev-otp {
    margin: 4px 0 8px;
    background: #FFF8D6;
    border: 1px solid var(--yellow-deep);
    color: #6B5300;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.dev-otp button {
    border: 0;
    background: var(--red);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    min-height: 40px;
    touch-action: manipulation;
}
.err {
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 1.2em;
    margin-top: 4px;
}
.linkish {
    background: none; border: 0; color: var(--red);
    font-weight: 800;
    font-family: inherit; cursor: pointer; margin-top: 8px;
    min-height: 40px;
    touch-action: manipulation;
}
.hidden { display: none !important; }

.phone-wide { width: min(480px, 100%); }

.prompt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0 12px;
}

.desk {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
    background-color: #E6242E;
    background-image: var(--theme-bg);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}
.desk > * {
    position: relative;
    z-index: 1;
}
.desk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
}
.desk-brand-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--yellow);
    font-size: 0.82rem;
    font-weight: 800;
}
.idea-timer {
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid var(--yellow);
    color: #fff;
    flex-shrink: 0;
}
.idea-timer[hidden] { display: none !important; }
.idea-timer-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--yellow);
}
.idea-timer-clock {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    min-width: 2.6em;
    text-align: center;
    color: #fff;
}
.idea-timer.is-urgent {
    background: rgba(255, 211, 0, 0.22);
    border-color: #fff;
    animation: ideaTimerPulse 0.9s ease-in-out infinite;
}
.idea-timer.is-urgent .idea-timer-clock,
.idea-timer.is-urgent .idea-timer-label {
    color: var(--yellow);
}
.idea-timer.is-ended {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    animation: none;
}
@keyframes ideaTimerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.idea-time-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(90, 24, 81, 0.55);
}
.idea-time-modal[hidden] { display: none !important; }
.idea-time-panel {
    width: min(420px, 100%);
    background: #fff;
    border: 3px solid var(--yellow);
    border-radius: 22px;
    padding: 22px 20px 18px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    text-align: center;
    animation: modeCardIn 0.45s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}
.idea-time-eyebrow {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
}
.idea-time-title {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: clamp(1.4rem, 5vw, 1.75rem);
    font-weight: 700;
    color: var(--red-deep);
}
.idea-time-lead {
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}
.idea-time-panel .btn {
    width: 100%;
    margin: 0;
}
body.idea-time-open {
    overflow: hidden;
}
.kiosk-desk.desk-prompts .idea-timer {
    margin-left: auto;
}
.desk-enter-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: transparent;
}
.desk-enter-card {
    width: min(520px, 100%);
    background: #fff;
    border: 3px solid var(--yellow);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 18px 20px 22px;
}
.desk-enter-art {
    flex: none;
    margin-bottom: 8px;
}
.desk-enter-card .btn {
    margin-top: 16px;
}
.desk-howto {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #FFF8D6 0%, #fff 100%);
    border: 2px solid var(--yellow);
    border-radius: 14px;
}
.desk-howto p {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink);
}
.desk-howto p + p {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
}
.promptoo-howto {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 20px 0;
    background: #fff;
}
.promptoo-howto p {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}
.promptoo-howto p + p {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 600;
}
.promptoo-howto strong {
    color: var(--red-deep);
}

.promptoo-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 3px solid var(--yellow);
}
.prompt-pack-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex-shrink: 0;
}
.prompt-pack-label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
}
.prompt-pack-select {
    appearance: none;
    -webkit-appearance: none;
    min-height: 42px;
    padding: 8px 36px 8px 12px;
    border: 2px solid #e0d7c5;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    cursor: pointer;
}
.prompt-pack-select:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    background-color: #f6f1e6;
}
.prompt-pack-wrap.is-locked .prompt-pack-select {
    border-color: var(--red);
}
.prompt-pack-note {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--red-deep);
}
.promptoo-who {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.promptoo-queue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 56px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--yellow);
    color: var(--red-deep);
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.promptoo-kicker {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 800;
}
.promptoo-hello {
    margin: 2px 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}
.btn-generate {
    border: 0;
    border-radius: 16px;
    min-height: 54px;
    padding: 12px 22px;
    background: var(--yellow);
    color: var(--red-deep);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(255, 211, 0, 0.38);
    flex-shrink: 0;
    touch-action: manipulation;
}
.btn-generate:hover { filter: brightness(1.04); }
.btn-generate:disabled { opacity: 0.7; cursor: wait; }
.btn-generate:disabled:not(.is-busy) { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-generate.is-busy .gen-icon { animation: gen-spin 0.7s linear infinite; }
.gen-icon { font-size: 1.15rem; }
@keyframes gen-spin { to { transform: rotate(180deg); } }

.promptoo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 14px 20px 12px;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    align-content: start;
    align-items: start;
    justify-items: stretch;
    grid-auto-rows: max-content;
    overflow: visible;
    background:
        linear-gradient(180deg, rgba(255, 248, 214, 0.55) 0%, rgba(255, 255, 255, 0.92) 100%),
        url("assets/kiosk-story-pattern.jpg");
    background-size: auto, 240px;
}
.promptoo-card {
    margin: 0;
    border: 3px solid var(--yellow);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 22px rgba(237, 48, 59, 0.14);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto;
    position: relative;
    z-index: 0;
    transform: none;
}
.promptoo-card:hover {
    box-shadow: 0 14px 28px rgba(237, 48, 59, 0.2);
}
/* Category already printed on card art */
.promptoo-cat {
    display: none;
}
.promptoo-art {
    flex: 0 0 auto;
    width: 100%;
    line-height: 0;
    background: #fff;
}
.promptoo-art img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}
.promptoo-card figcaption {
    padding: 8px 8px 10px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--red-deep);
    text-align: center;
    flex-shrink: 0;
    background: #fff;
    border-top: 2px solid var(--cream-2);
}
.promptoo-card.is-flip {
    animation: card-pop 0.45s ease both;
}
@keyframes card-pop {
    0% { opacity: 0.35; }
    100% { opacity: 1; }
}

.promptoo-foot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 24px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 28%);
}
.promptoo-foot .btn-story {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    min-height: 54px;
    margin: 0;
    border: 0;
    border-radius: 16px;
    background: var(--red);
    color: #fff;
    font-size: 1.08rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(231, 48, 56, 0.28);
}
.promptoo-foot .btn-story:hover {
    filter: brightness(1.06);
}
.promptoo-foot .btn-story.is-ready {
    background: var(--red);
    color: #fff;
}
.promptoo-foot .muted {
    margin: 0;
    flex: 1;
}
.promptoo-foot .linkish { margin: 0; font-size: 0.95rem; }
.desk-nav {
    padding: 6px 20px max(10px, env(safe-area-inset-bottom));
}

.kiosk-desk .desk {
    height: 100dvh;
}
.kiosk-desk #screen-enter,
.kiosk-desk #screen-prompts {
    padding: 0;
    overflow: hidden;
    background: transparent;
}
.kiosk-desk #screen-enter { overflow: auto; }
.kiosk-desk #prompt-error { padding: 0 20px; }
.kiosk-desk #prompt-error:empty { display: none; }
.kiosk-desk.desk-prompts .desk-brand-right { display: none; }

@media (max-width: 680px) {
    .promptoo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 8px 12px 12px;
        overflow: visible;
        align-content: start;
        align-items: start;
        grid-auto-rows: max-content;
        flex: 0 0 auto;
        height: auto;
    }
    .promptoo-card {
        min-height: 0;
        transform: none;
    }
    .promptoo-cat {
        display: none;
    }
    .promptoo-art {
        flex: 0 0 auto;
    }
    .promptoo-art img {
        width: 100%;
        height: auto;
    }
    .promptoo-card figcaption {
        font-size: 0.82rem;
        padding: 6px 4px 8px;
    }
    #screen-prompts .landing-intro {
        display: none;
    }
    .promptoo-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 12px;
    }
    .prompt-pack-wrap { width: 100%; min-width: 0; }
    .prompt-pack-select { width: 100%; }
    .promptoo-who { width: 100%; }
    .promptoo-hello { font-size: 0.85rem; }
    .promptoo-queue {
        min-width: 56px;
        height: 44px;
        font-size: 1.15rem;
        border-radius: 12px;
    }
    .btn-generate { width: 100%; min-height: 46px; padding: 10px 16px; font-size: 0.95rem; }
    .promptoo-howto { padding: 6px 12px 0; }
    .promptoo-howto p { font-size: 0.76rem; }
    .promptoo-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 6px 12px 4px;
    }
    .promptoo-foot .btn-story {
        width: 100%;
        max-width: none;
        min-width: 0;
        min-height: 50px;
        font-size: 1rem;
    }
    .promptoo-foot .muted {
        flex: none;
        order: -1;
        font-size: 0.74rem;
        line-height: 1.3;
    }
    .desk-brand {
        padding: 8px 12px;
        gap: 8px;
    }
    .desk-brand .brand-mark {
        height: 44px;
        max-width: 160px;
    }
    .desk-brand-right {
        font-size: 0.66rem;
        max-width: 40%;
        text-align: right;
        line-height: 1.2;
    }
    .desk-enter-wrap {
        padding: 12px;
        align-items: flex-start;
    }
    .desk-enter-card {
        width: 100%;
        max-width: 100%;
        border-radius: 22px;
        padding: 14px 14px 16px;
    }
    .desk-enter-art {
        /* square hero rules apply; don't force landscape max-height */
        max-height: none;
    }
    .desk-howto {
        margin-bottom: 12px;
        padding: 9px 10px;
    }
    .desk-howto p { font-size: 0.82rem; }
    .kiosk-desk #prompt-error { padding: 0 12px; }
    .desk-nav { padding: 6px 12px max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
    .promptoo-queue {
        min-width: 50px;
        height: 40px;
        font-size: 1.02rem;
        padding: 0 8px;
    }
    .promptoo-card figcaption { font-size: 0.72rem; }
}
@media (max-height: 760px) and (max-width: 900px) {
    .promptoo-howto p + p { display: none; }
    .promptoo-kicker { font-size: 0.62rem; }
    .promptoo-hello { font-size: 0.74rem; }
}
.prompt-card {
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 12px 10px;
    text-align: left;
    background: #fff;
    min-height: 118px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.prompt-card small {
    display: block;
    color: var(--red);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.prompt-card strong {
    display: block;
    margin-top: 4px;
    font-size: 0.92rem;
    color: var(--red-deep);
}
.prompt-card p {
    margin: 6px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--muted);
}
.prompt-card.is-on {
    border-color: var(--red);
    background: #FFF8D6;
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.45);
}
.btn-story {
    background: #fff;
    color: var(--red-deep);
    border: 2px dashed var(--yellow-deep);
    margin-top: 8px;
    gap: 8px;
}
.btn-story .tick { font-size: 1.2rem; }
.btn-story.is-done {
    background: var(--yellow);
    border-style: solid;
    border-color: var(--yellow-deep);
    color: var(--red-deep);
}

.activity {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.activity-pills {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 12px;
}
.activity-item,
.activity-pill {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--red-deep);
}
.activity-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--yellow);
    border: 1px solid var(--yellow-deep);
    box-shadow: 0 4px 10px rgba(244, 192, 29, 0.28);
    white-space: nowrap;
    max-width: 100%;
}
.activity-pill.muted {
    background: var(--cream);
    border-color: var(--line);
    box-shadow: none;
    color: var(--muted);
}
.activity-item span,
.activity-pill span {
    color: var(--muted);
    font-weight: 600;
    margin-left: 2px;
}
.cell-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.cell-stack small {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1.3;
}

.dash-wrap {
    width: min(1160px, 100%);
    background: var(--card);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.96)),
        url("assets/kiosk-story-pattern.jpg");
    background-size: auto, 240px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 0 22px 22px;
    min-height: 70vh;
    overflow: hidden;
    border: 3px solid var(--yellow);
}
.dash-wrap .brand { margin: 0 -22px 18px; }
.brand-page-title {
    margin-left: auto;
    text-align: right;
    min-width: 0;
}
.brand-page-kicker {
    margin: 0 0 2px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--yellow);
}
.brand-page-title h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.05rem, 2.4vw, 1.45rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
}
@media (max-width: 640px) {
    .brand-page-kicker { display: none; }
    .brand-page-title h1 { font-size: 0.98rem; }
}
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.6rem; margin: 0; font-family: var(--display); color: var(--red-deep); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
th { color: var(--red); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}
.badge-ok { background: var(--yellow); color: var(--red-deep); }
.badge-wait { background: var(--red-soft); color: var(--red); }
.q-pill {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--red);
}
.empty { text-align: center; color: var(--muted); padding: 48px 12px; }

@media (max-width: 720px) {
    .stage {
        padding: 0;
        background-color: #E6242E;
        background-image: var(--theme-bg);
        background-repeat: no-repeat;
        background-position: center bottom;
        background-size: cover;
        align-items: stretch;
    }
    .phone {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: none;
        border-width: 0;
    }
    .story-art-hero { min-height: 160px; height: auto; }
    .story-art-banner { height: 76px; }
    #screen-form .story-art-hero {
        width: 100%;
        height: min(31vh, 250px);
        max-height: min(31vh, 250px);
    }
    #screen-enter-queue .story-art-hero {
        width: 100%;
        height: min(22vh, 170px);
        max-height: min(22vh, 170px);
    }
    #screen-welcome .story-art-hero {
        width: 100%;
        height: min(43vh, 370px);
        max-height: min(43vh, 370px);
    }
    .bottom-nav { padding: 6px 12px 8px; }
    .key { min-height: 48px; }
    .otp-slot { height: 48px; font-size: 1.25rem; }
    .dash-wrap { border-radius: 0; min-height: 100dvh; border-width: 0; }
    .brand-name { font-size: 0.88rem; }
    .brand-tag { font-size: 0.55rem; letter-spacing: 0.03em; }
    .brand > div { min-width: 0; }
    .brand-name, .brand-tag {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .screen { padding-left: 14px; padding-right: 14px; }
    .screen-mode {
        padding-left: 12px;
        padding-right: 12px;
    }
    .topbar {
        padding-left: 12px;
        padding-right: 12px;
    }
    /* Never show desktop side mascot on phone widths */
    .mode-side-mascot,
    .stage--mode-pick .mode-side-mascot {
        display: none !important;
    }
}

@media (max-height: 740px) {
    .key { min-height: 44px; font-size: 1.1rem; }
    .otp-slot { height: 46px; }
    .section-title { margin-bottom: 8px; }
    .lead { margin-bottom: 12px; }
    .story-art-hero { min-height: 140px; height: auto; }
    .story-art-banner { height: 64px; }
    #screen-form .story-art-hero {
        width: 100%;
        height: min(31vh, 250px);
        max-height: min(31vh, 250px);
    }
    #screen-enter-queue .story-art-hero {
        width: 100%;
        height: min(22vh, 170px);
        max-height: min(22vh, 170px);
    }
    #screen-welcome .story-art-hero {
        width: 100%;
        height: min(43vh, 370px);
        max-height: min(43vh, 370px);
    }
    .story-art { margin-bottom: 8px; }
    .brand { padding: 6px 12px; }
    .brand-mark { height: 48px; max-width: 190px; }
}

@media (min-width: 900px) {
    .phone {
        width: 580px;
        height: min(900px, 100%);
    }
    .phone-wide {
        width: 620px;
    }
    .kiosk-desk .phone-desk {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
    }
    .otp-slot { height: 58px; font-size: 1.55rem; }
    .key { min-height: 56px; }
}

.story-dash-page .stage,
.queue-dash-page .stage { padding: 12px; align-items: stretch; }
.dash-wrap-wide { width: min(1320px, 100%); margin: 0 auto; }
.dash-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.dash-btn {
    width: auto !important;
    min-height: 42px;
    padding: 8px 14px !important;
    margin: 0 !important;
}
.story-legend {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.story-legend summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--red-deep);
    list-style: none;
}
.story-legend summary::-webkit-details-marker { display: none; }
.story-legend summary::after {
    content: " ▾";
    color: var(--red);
    font-weight: 700;
}
.story-legend[open] summary::after { content: " ▴"; }
.story-legend ol {
    margin: 10px 0 4px;
    padding-left: 18px;
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.45;
}
.story-legend li { margin: 0 0 6px; }
.story-legend em { font-style: normal; font-weight: 800; color: var(--red); }
.story-dash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.story-dash-search {
    width: min(320px, 100%) !important;
    margin: 0;
    padding: 10px 12px;
    min-height: 42px;
}
.story-dash-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.story-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}
.story-stat small {
    display: block;
    color: var(--red);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.story-stat strong {
    font-size: 1.2rem;
    color: var(--red-deep);
}
.story-table-wrap { overflow: auto; }
.story-table { min-width: 860px; }
.story-table th,
.story-table td { padding: 10px 8px; }
.story-table th { white-space: nowrap; }
.story-table td { vertical-align: top; }
.author-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.author-cell strong { color: var(--red-deep); }
.story-prompts {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}
.story-prompts span { display: block; }
.time-cell strong {
    display: block;
    color: var(--red-deep);
    font-size: 0.92rem;
}
.time-cell small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1.3;
}
.dash-empty { color: var(--muted); font-weight: 600; }
.story-open-link {
    color: var(--red-deep);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.story-open-link:hover { color: var(--red); }
@media (max-width: 720px) {
    .story-dash-stats { grid-template-columns: 1fr 1fr; }
}

/* Partner footer removed — reclaim full viewport for kiosk content */
.evidya-partners {
    display: none !important;
}
body.kiosk-body,
body.leaderboard-page,
body.story-dash-page,
body.queue-dash-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}
body.kiosk-body .stage,
body.leaderboard-page .stage,
body.story-dash-page .stage,
body.queue-dash-page .stage,
body.kiosk-body .desk {
    flex: 1 1 auto;
    min-height: 0;
}
body.has-partners {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}
body.has-partners .stage,
body.has-partners .desk {
    flex: 1 1 auto;
    min-height: 0;
}
body.kiosk-body.has-partners .stage {
    min-height: 0;
}
/* Queue + Story dashboards: scroll on .dash-wrap (do not require .has-partners) */
body.story-dash-page,
body.queue-dash-page {
    height: 100dvh;
    overflow: hidden;
}
body.story-dash-page .stage,
body.queue-dash-page .stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}
body.story-dash-page .dash-wrap,
body.queue-dash-page .dash-wrap {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
}
body.story-dash-page .dash-wrap > .brand,
body.queue-dash-page .dash-wrap > .brand {
    position: sticky;
    top: 0;
    z-index: 25;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(90, 24, 81, 0.18);
}
body.story-dash-page .dash-head,
body.story-dash-page .story-legend,
body.story-dash-page .story-dash-toolbar,
body.story-dash-page .story-dash-stats {
    flex-shrink: 0;
}
body.queue-dash-page .dash-head,
body.queue-dash-page .activity,
body.queue-dash-page #dash-meta,
body.queue-dash-page .story-art {
    flex-shrink: 0;
}
body.queue-dash-page .story-art {
    max-height: 160px;
}
body.story-dash-page .story-table-wrap {
    flex: 0 0 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
}
body.queue-dash-page .dash-table-wrap {
    flex: 0 0 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
}
.evidya-partners-legacy {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #ececec;
    padding: 4px 12px 5px;
    padding-bottom: max(5px, env(safe-area-inset-bottom, 0px));
    z-index: 40;
    isolation: isolate;
}
.partners-legal {
    margin: 4px 0 2px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.partners-legal a {
    color: #6b6b6b;
    text-decoration: none;
}
.partners-legal a:hover {
    color: var(--red-deep);
    text-decoration: underline;
}
.partners-legal span {
    color: #c4c4c4;
}
.evidya-partners-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 0 28px;
}
.evidya-partner {
    text-align: center;
    min-width: 0;
    flex: 1 1 0;
}
.evidya-partner-kicker {
    margin: 0 0 2px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #6b6b6b;
}
.evidya-logo {
    display: block;
    margin: 0 auto;
    width: auto;
    object-fit: contain;
}
.evidya-logo-vi { height: 48px; }
.evidya-logo-vois {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #111;
    line-height: 1;
}
.evidya-logo-moinee { height: 34px; }
.evidya-partner-name {
    margin: 1px 0 0;
    font-size: 0.58rem;
    font-weight: 700;
    color: #ed303b;
}
@media (max-width: 640px) {
    .evidya-partners-inner { gap: 12px; padding: 0 10px; }
    .evidya-logo-vi { height: 38px; }
    .evidya-logo-vois { font-size: 1.15rem; }
    .evidya-logo-moinee { height: 28px; }
    .evidya-partner-kicker { font-size: 0.5rem; }
}

body.leaderboard-page.has-partners {
    height: 100dvh;
    overflow: hidden;
}
body.leaderboard-page.has-partners .stage {
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    padding: 10px;
}
body.leaderboard-page.has-partners .lb-wrap {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.96);
    border: 3px solid var(--yellow);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 10px 12px 8px;
}
body.leaderboard-page .dash-wrap {
    min-height: 0;
}
body.leaderboard-page .brand {
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}
body.leaderboard-page .lb-stats {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
body.leaderboard-page .lb-stats .story-stat {
    min-width: 78px;
    padding: 6px 10px;
}
.lb-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.lb-empty {
    margin: auto;
    text-align: center;
    font-weight: 700;
    color: var(--purple);
    font-size: 1.05rem;
    padding: 24px;
}
.lb-empty[hidden],
.lb-main[hidden],
.lb-ticker[hidden] {
    display: none !important;
}
.lb-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.lb-feature {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: center;
    background: linear-gradient(135deg, #5A1851 0%, #E73038 78%);
    color: #fff;
    border-radius: 20px;
    padding: 24px 32px;
    border: 3px solid var(--yellow);
    min-height: 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
}
.lb-cover-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
    border-radius: 0;
    flex-shrink: 0;
    background: transparent;
}
.lb-cover {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-height: min(400px, 52vh);
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    border: 3px solid #F4C01D;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    background: #2a0c28;
}
.lb-cover-fallback {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 240px;
    border-radius: 14px;
    border: 3px solid #F4C01D;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    background: linear-gradient(160deg, #F4C01D, #fff6d6);
    color: #5A1851;
    font-family: var(--display);
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 700;
}
.lb-cover-fallback[hidden],
.lb-cover[hidden] { display: none; }
.lb-rank {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #F4C01D;
    color: #5A1851;
    font-weight: 800;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.95rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.lb-kicker {
    margin: 0 0 4px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 800;
    color: #F4C01D;
}
.lb-title {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    line-height: 1.18;
}
.lb-author {
    margin: 0 0 16px;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    font-weight: 700;
    color: #F4C01D;
    letter-spacing: 0.02em;
}
.lb-author[hidden] { display: none; }
.lb-qr-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.lb-qr-block[hidden] { display: none; }
.lb-qr {
    width: 148px;
    height: 148px;
    padding: 8px;
    background: #fff;
    border-radius: 14px;
    border: 3px solid #F4C01D;
    box-sizing: border-box;
    image-rendering: pixelated;
}
.lb-qr-hint {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    color: #F4C01D;
}
.lb-rail {
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 18px;
    padding: 10px 8px 8px;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.lb-rail-kicker {
    margin: 0 8px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
}
.lb-rail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    min-height: 0;
}
.lb-rail-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
}
.lb-rail-item.is-on {
    background: #FFE8EA;
    border: 1px solid #F4C01D;
}
.lb-rail-rank {
    flex: 0 0 42px;
    font-weight: 800;
    color: var(--purple);
}
.lb-rail-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.lb-rail-copy strong {
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-rail-copy small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-ticker {
    flex: 0 0 auto;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.lb-ticker-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: lbTickerMove 28s linear infinite;
}
.lb-ticker:hover .lb-ticker-track { animation-play-state: paused; }
@keyframes lbTickerMove {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.lb-mini {
    flex: 0 0 118px;
    width: 118px;
    border: 2px solid var(--yellow);
    background: #fff;
    border-radius: 14px;
    padding: 6px;
    cursor: pointer;
    text-align: left;
    position: relative;
}
.lb-mini.is-on { box-shadow: 0 0 0 3px #E73038; }
.lb-mini img,
.lb-mini-fallback {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    background: #f4ede4;
}
.lb-mini-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    color: var(--purple);
    font-size: 1.4rem;
}
.lb-mini-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #F4C01D;
    color: #5A1851;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 6px;
}
.lb-mini-name {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--purple);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .lb-feature {
        grid-template-columns: minmax(220px, 1fr) minmax(0, 1.1fr);
        padding: 16px;
        gap: 16px;
    }
    .lb-cover-wrap {
        max-width: 360px;
    }
    .lb-cover {
        max-height: 260px;
    }
    .lb-cover-fallback {
        height: 200px;
    }
}
@media (max-width: 640px) {
    body.leaderboard-page .lb-stats { display: none; }
    .lb-feature { grid-template-columns: 1fr; text-align: left; padding: 14px; gap: 14px; }
    .lb-cover-wrap { max-width: 100%; }
    .lb-cover { max-height: 220px; }
    .lb-cover-fallback { height: 160px; }
}

body.mine-stories-page.has-partners .stage {
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: center;
}
body.mine-stories-page .mine-stories-phone {
    width: min(720px, 100%);
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}
.mine-stories {
    flex: 1;
    min-height: 0;
    padding: 8px 18px 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.mine-back {
    display: block;
    margin-top: 14px;
    text-align: center;
    color: var(--red-deep);
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
}
.mine-stories h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 8px;
}
.mine-stories h2 {
    margin: 0 0 4px;
    font-family: var(--display);
    color: var(--red-deep);
    font-size: 1.35rem;
}
.mine-switch {
    display: block;
    margin: 4px 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--red-deep);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
}
.mine-phone-wrap { margin-bottom: 8px; }
.mine-error {
    margin: 0 0 10px;
    color: var(--danger);
    font-weight: 700;
    font-size: 0.86rem;
}
#mine-form .btn { width: 100%; margin-top: 8px; }
.mine-results-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.mine-again {
    flex-shrink: 0;
    min-height: 44px !important;
    padding: 8px 14px !important;
}
.mine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.mine-card {
    border: 2px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.mine-cover {
    height: 140px;
    background: #f6ead0;
    overflow: hidden;
}
.mine-cover img,
.mine-cover-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mine-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}
.mine-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.mine-kind {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--purple);
}
.mine-card-body h3 {
    margin: 0;
    font-size: 1.02rem;
    color: var(--red-deep);
    line-height: 1.25;
}
.mine-when {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--muted);
}
.mine-open {
    margin-top: auto;
    min-height: 44px !important;
    text-align: center;
    text-decoration: none;
}
.mine-missing {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 700;
}
.mine-empty {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 600;
}
@media (max-width: 640px) {
    .mine-results-head { flex-direction: column; }
    .mine-again { width: 100%; }
}
