/* ==========================================================================
   Record flow, desktop (>= 1024px)
   Loaded with media="(min-width: 1024px)", so phones and tablets never see it.
   Covers the Tell a story recorder, Story Builder, the Read-a-story teller,
   the sent screen and the guest name gate. Same language as the homepage:
   sky backdrop, wordmark left, theme toggle right, cream cards, yellow lip
   buttons, two columns inside a 1040px frame.
   ========================================================================== */

@media (min-width: 1024px) {

/* ── Frame tokens ────────────────────────────────────────────────────── */
html body.record-path-own,
html body.record-path-teller,
html body.teller-open,
html body.room-sent {
    --rd-frame: min(1040px, calc(100vw - 64px));
    --rd-gutter: max(12px, calc((100vw - 1160px) / 2));
    --rd-back-shift: calc(var(--rd-gutter) - (100vw - var(--rd-frame)) / 2);
    --rd-card: #FFF8EC;
    --rd-ink: #1B2A4A;
    --rd-ink-soft: #51607D;
    --rd-card-shadow: 0 24px 64px rgba(27, 42, 74, 0.16), 0 4px 16px rgba(27, 42, 74, 0.08);
    --rd-yellow: #FFD65C;
    --rd-yellow-lip: #D9A91F;
}
html[data-daypart="night"] body.record-path-own,
html[data-daypart="night"] body.record-path-teller,
html[data-daypart="night"] body.teller-open,
html[data-daypart="night"] body.room-sent {
    --rd-card: #243656;
    --rd-ink-soft: rgba(255, 248, 236, 0.74);
    --rd-card-shadow: 0 28px 72px rgba(4, 10, 24, 0.52), 0 0 0 1px rgba(255, 248, 236, 0.12);
}

/* ── Sky backdrop: the same three skies as the homepage ──────────────── */
html[data-daypart="morning"] body.record-path-own:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="morning"] body.record-path-teller:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="morning"] body.teller-open:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv) {
    background-color: #F6D2C4 !important;
    background-image: linear-gradient(180deg, #F8C9B4 0%, #F6D5E6 46%, #C9D4F6 100%) !important;
    background-attachment: fixed !important;
    color: #1B2A4A !important;
}
html[data-daypart="day"] body.record-path-own:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="day"] body.record-path-teller:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="day"] body.teller-open:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv) {
    background-color: #B9DFFB !important;
    background-image: linear-gradient(180deg, #8ECAF8 0%, #C5E6FF 48%, #EAF6FF 100%) !important;
    background-attachment: fixed !important;
    color: #1B2A4A !important;
}
html[data-daypart="night"] body.record-path-own:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="night"] body.record-path-teller:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv),
html[data-daypart="night"] body.teller-open:not(.zz):not(.zy):not(.zx):not(.zw):not(.zv) {
    background-color: #1A2C4E !important;
    background-image: radial-gradient(ellipse at 78% 12%, rgba(255, 214, 92, 0.14), transparent 28%),
        linear-gradient(180deg, #243860 0%, #1A2C4E 55%, #14243F 100%) !important;
    background-attachment: fixed !important;
    color: #FFF8EC !important;
}

/* ── Page shell: scrolls like the homepage instead of a locked phone ─── */
html:has(body.record-path-own),
html:has(body.record-path-teller) {
    height: auto !important;
    overflow: visible !important;
}
html body.record-path-own,
html body.record-path-own.has-nav,
html body.record-path-teller,
html body.record-path-teller.has-nav {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    display: block !important;
    padding: 76px 32px 48px !important;
}
html body.record-path-own .app,
html body.record-path-teller .app,
html body.record-path-own #main,
html body.record-path-teller #main {
    width: var(--rd-frame) !important;
    max-width: 1040px !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

/* ── Toolbar: wordmark left, theme toggle right, nothing else ────────── */
html body.record-path-own #main > .top-bar,
html body.record-path-teller #main > .top-bar,
html body.teller-open #main > .top-bar,
html body.room-sent #main > .top-bar {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    position: fixed !important;
    inset: 0 0 auto 0;
    width: 100% !important;
    z-index: 240 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom-color: transparent !important;
    padding: 8px var(--rd-gutter) 8px !important;
    box-sizing: border-box;
}
html body.record-path-own #main > .top-bar .credits-pill,
html body.record-path-own #main > .top-bar .tonie-avatar-btn,
html body.record-path-own #main > .top-bar .app-update-btn,
html body.record-path-teller #main > .top-bar .credits-pill,
html body.record-path-teller #main > .top-bar .tonie-avatar-btn,
html body.record-path-teller #main > .top-bar .app-update-btn,
html body.teller-open #main > .top-bar .credits-pill,
html body.teller-open #main > .top-bar .tonie-avatar-btn,
html body.teller-open #main > .top-bar .app-update-btn,
html body.room-sent #main > .top-bar .credits-pill,
html body.room-sent #main > .top-bar .tonie-avatar-btn,
html body.room-sent #main > .top-bar .app-update-btn,
html body.room-sent #main > .top-bar .desktop-top-nav {
    display: none !important;
}
html[data-daypart="night"] body.record-path-own #main > .top-bar .logo span,
html[data-daypart="night"] body.record-path-teller #main > .top-bar .logo span,
html[data-daypart="night"] body.teller-open #main > .top-bar .logo span,
html[data-daypart="night"] body.room-sent #main > .top-bar .logo span {
    color: #FFF8EC;
}


html body.record-path-own #main > .top-bar .top-bar-right,
html body.record-path-teller #main > .top-bar .top-bar-right,
html body.teller-open #main > .top-bar .top-bar-right,
html body.room-sent #main > .top-bar .top-bar-right {
    grid-column: 3;
    justify-self: end;
}
html body.record-path-own #main > .top-bar .top-bar-left,
html body.record-path-teller #main > .top-bar .top-bar-left,
html body.teller-open #main > .top-bar .top-bar-left,
html body.room-sent #main > .top-bar .top-bar-left {
    grid-column: 1;
}

/* ══ Tell a story (own voice) ═════════════════════════════════════════
   One grid on #sound-board. #sound-board-stage is display:contents, so the
   recorder panel and the soundboard tray become grid items beside the hero.
   ══════════════════════════════════════════════════════════════════════ */
html body.record-path-own #main > [data-tab="record"],
html body.record-path-own #record-form,
html body.record-path-own #recording-motivation {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #sound-board {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr);
    grid-template-areas:
        "back  back  back"
        ".     .     ."
        ".     hero  ."
        ".     panel ."
        ".     words ."
        ".     .     .";
    grid-template-rows: auto minmax(0, 0.7fr) auto auto auto minmax(0, 1fr);
    align-content: start;
    justify-items: stretch;
    column-gap: 2.5rem;
    row-gap: 0.9rem;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: calc(100dvh - 124px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #sound-board-stage {
    display: contents !important;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back { grid-area: back; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-hero { grid-area: hero; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #sound-board-stage > #recorder-panel { grid-area: panel; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-words { grid-area: words; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #reminder-idea-card { grid-area: idea; }

/* Back: the quiet "‹ Back" the gift page uses, not a phone bar */
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back {
    justify-self: start;
    width: auto !important;
    min-height: 44px;
    margin: 0 0 0 calc(var(--rd-back-shift) - 0.55rem) !important;
    padding: 0.35rem 1rem 0.35rem 0.55rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--rd-ink) !important;
    cursor: pointer;
    transition: background 0.15s ease;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back:hover { background: rgba(27, 42, 74, 0.08) !important; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back .sound-board-back-title { display: none !important; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back .sound-board-back-left,
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back .sound-board-back-left svg {
    color: var(--rd-ink) !important;
    -webkit-text-fill-color: var(--rd-ink) !important;
    stroke: currentColor;
}
html[data-daypart="night"] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back,
html[data-daypart="night"] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back .sound-board-back-left,
html[data-daypart="night"] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back .sound-board-back-left svg {
    color: #FFF8EC !important;
    -webkit-text-fill-color: #FFF8EC !important;
}
html[data-daypart="night"] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-back:hover {
    background: rgba(255, 248, 236, 0.1) !important;
}

/* Hero: the Story Cloud, bigger */
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-hero {
    align-self: center;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    margin: clamp(0.25rem, 3vh, 2rem) 0 0 !important;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-hero-rig,
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-hero-rig .brand-logo-wrap,
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-hero-rig .brand-logo {
    width: 260px !important;
}
/* The cover line repeats the button, so the desktop hero lets the cloud lead */
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .sound-board-cover-prompt { display: none !important; }

/* Recorder button + the quiet link under it */
html body.record-path-own.sound-board-mode:not(.listening-room) #sound-board-stage > #recorder-panel {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    justify-self: stretch;
}
html body.record-path-own.sound-board-mode:not(.listening-room) #recorder-panel .recorder-panel-inner {
    min-height: 72px;
    border-radius: 22px;
}
html body.record-path-own.sound-board-mode:not(.listening-room) .recorder-idle-mark { font-size: 1.15rem; }
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) .room-words {
    justify-self: center;
    margin: 0.4rem 0 0 !important;
    font-size: 1rem;
}

/* ── A prompt from tonight's reminder: story words + sticker, second column ── */
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #sound-board:has(#reminder-idea-card:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "back  back"
        ".     ."
        "hero  idea"
        "panel idea"
        "words idea"
        ".     .";
    column-gap: 4rem;
}
html[data-daypart] body.record-path-own.sound-board-mode:not(.listening-room) #reminder-idea-card:not(.hidden) {
    align-self: center;
    padding: 2rem 2.25rem 2rem;
    border-radius: 30px;
    background: var(--rd-card);
    box-shadow: var(--rd-card-shadow);
}

/* ── Rolling: the recorder is the hero (left), the soundboard sits beside it ── */
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) #sound-board {
    min-height: 0 !important;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas:
        "back  back"
        "panel tray"
        "idea  tray";
    grid-template-rows: auto auto 1fr;
    column-gap: 2.5rem;
}
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) #sound-board-stage > #recorder-panel {
    position: sticky !important;
    top: 92px !important;
    align-self: start;
    box-sizing: border-box;
    padding: 2.25rem 2.25rem 2rem !important;
    border-radius: 30px !important;
    background-color: var(--rd-card) !important;
    box-shadow: var(--rd-card-shadow) !important;
}
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) #sound-board-stage > #sound-board-tray {
    grid-area: tray;
    position: relative !important;
    inset: auto !important;
    align-self: start;
    box-sizing: border-box;
    max-height: calc(100dvh - 176px);
    padding: 1.75rem 1.5rem 1.5rem !important;
    border-radius: 30px;
    background: var(--rd-card);
    box-shadow: var(--rd-card-shadow);
    overflow-x: hidden;
    overflow-y: auto;
}
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .sound-board-tray-head { margin: 0 0 1rem 0.25rem; }
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .sound-board-tray-title { font-size: 1.45rem; }
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .sound-board-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem !important;
}
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .sound-board-row .sound-board-pad { min-height: 96px; }

/* the clock: cloud over the running time, centred */
html body.record-path-own.room-recording .recorder-clock {
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    gap: 0.35rem !important;
    padding: 0.25rem 0 0.9rem !important;
}
html body.record-path-own.room-recording .recorder-clock-right {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin: 0 auto !important;
}
html body.record-path-own.room-recording .recorder-clock .room-hero-rig,
html body.record-path-own.room-recording .recorder-clock .record-companion {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: 124px !important;
    flex: 0 0 124px !important;
}
html body.record-path-own.sound-board-mode.room-recording .recorder-clock .room-hero-rig .brand-logo-wrap,
html body.record-path-own.sound-board-mode.room-recording .recorder-clock .room-hero-rig .brand-logo,
html body.record-path-own.sound-board-mode.room-recording .recorder-clock .room-hero-rig .face-mark,
html body.record-path-own.room-recording .recorder-clock .brand-logo-wrap,
html body.record-path-own.room-recording .recorder-clock .brand-logo,
html body.record-path-own.room-recording .recorder-clock .face-mark {
    width: 150px !important;
    max-width: 150px !important;
}
html body.record-path-own.sound-board-mode.room-recording .recorder-panel.recording-active .recorder-clock .timer,
html body.record-path-own.sound-board-mode.room-recording .recorder-clock .timer {
    font-size: 4rem !important;
}
html body.record-path-own.sound-board-mode.room-recording .sound-board-stage .recorder-clock {
    position: static !important;
}
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .recorder-active-row .recorder-btn-secondary,
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .recorder-active-row .recorder-btn-primary,
html[data-daypart] body.record-path-own.room-recording:not(.listening-room):not(.room-review):not(.room-counting) .recorder-done-row button {
    min-height: 58px;
    font-size: 1.08rem;
}

/* ── Review: the happy cloud (left) beside the title + player card (right) ── */
html[data-daypart] body.record-path-own.room-review:not(.listening-room) #sound-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "back  back"
        ".     ."
        "hero  panel"
        ".     .";
    grid-template-rows: auto minmax(0, 0.5fr) auto minmax(0, 1fr);
    column-gap: 4rem;
    align-items: center;
}
html[data-daypart] body.record-path-own.room-review:not(.listening-room) #sound-board-stage > #recorder-panel {
    position: relative !important;
    align-self: center;
    box-sizing: border-box;
    padding: 0.5rem !important;
    width: 100% !important;
    max-width: 520px !important;
    justify-self: start;
}
html[data-daypart] body.record-path-own.room-review:not(.listening-room) .room-hero { justify-self: end; }
html[data-daypart] body.record-path-own.room-review:not(.listening-room) .room-hero-rig,
html[data-daypart] body.record-path-own.room-review:not(.listening-room) .room-hero-rig .brand-logo-wrap,
html[data-daypart] body.record-path-own.room-review:not(.listening-room) .room-hero-rig .brand-logo { width: 300px !important; }


/* ══ Read a story (teller overlay) ════════════════════════════════════
   The 580px floating card becomes a full sky page: toolbar on top, a
   two-column composition (or one big reading card) inside the 1040px frame.
   ══════════════════════════════════════════════════════════════════════ */
html[data-daypart] body.teller-open .teller-overlay,
html[data-daypart] body.teller-open .teller-overlay.is-pages,
html[data-daypart] body.teller-open .teller-overlay.is-cover,
html[data-daypart] body:not(.admin-mode).teller-open .teller-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 76px 32px 40px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background-attachment: fixed !important;
    color: var(--rd-ink);
}
html[data-daypart="morning"] body.teller-open .teller-overlay:not(.zz):not(.zy) {
    background: linear-gradient(180deg, #F8C9B4 0%, #F6D5E6 46%, #C9D4F6 100%) !important;
}
html[data-daypart="day"] body.teller-open .teller-overlay:not(.zz):not(.zy) {
    background: linear-gradient(180deg, #8ECAF8 0%, #C5E6FF 48%, #EAF6FF 100%) !important;
}
html[data-daypart="night"] body.teller-open .teller-overlay:not(.zz):not(.zy) {
    background: radial-gradient(ellipse at 78% 12%, rgba(255, 214, 92, 0.14), transparent 28%),
        linear-gradient(180deg, #243860 0%, #1A2C4E 55%, #14243F 100%) !important;
    color: #FFF8EC;
}

/* Reading: chrome row above, one big reading card below */
html[data-daypart] body.teller-open .teller-overlay.is-pages {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-chrome {
    flex: 0 0 auto;
    width: var(--rd-frame) !important;
    max-width: 1040px !important;
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    column-gap: 1rem;
    padding: 0 !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-title { font-size: 1.5rem !important; }
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-anchor { width: 56px; height: 56px; }
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-chrome-right { min-width: 52px; justify-content: flex-end; }
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-chrome-balance { display: none !important; }
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-live:not(.hidden) { display: inline-flex !important; }

html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-pages {
    flex: 1 1 auto;
    width: var(--rd-frame) !important;
    max-width: 1040px !important;
    min-height: 0;
    margin: 0 !important;
    border-radius: 30px;
    background: var(--rd-card);
    box-shadow: var(--rd-card-shadow);
    overflow: hidden !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-stage {
    align-items: center !important;
    justify-content: center;
    padding: 2rem 5rem !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-page {
    max-width: 780px;
    margin: 0 auto;
    font-size: 2.35rem;
    line-height: 1.42;
    text-align: center;
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-thumb {
    width: 100% !important;
    max-width: none !important;
    padding: 0.9rem 2.5rem 1.5rem !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-top: 1px solid rgba(27, 42, 74, 0.1);
}
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-thumb-row,
html[data-daypart] body.teller-open .teller-overlay.is-pages .teller-thumb-paused {
    max-width: 640px !important;
    margin: 0 auto;
}


/* Cover: sticker (left), title + how to tell it (right) */
html[data-daypart] body.teller-open .teller-overlay.is-cover {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, calc(var(--rd-frame) / 2 - 1.5rem)));
    grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-areas:
        "back   back"
        "hero   ."
        "hero   title"
        "hero   copy"
        "hero   .";
    justify-content: center;
    column-gap: 3rem;
    align-items: center;
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-nav-back {
    grid-area: back;
    position: static !important;
    justify-self: start;
    display: inline-flex !important;
    margin-left: var(--rd-back-shift);
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .story-result-hero {
    grid-area: hero;
    justify-self: center;
    align-self: center;
    width: min(400px, 30vw) !important;
    height: min(400px, 30vw) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-chrome {
    grid-area: title;
    align-self: end;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-chrome-mid { justify-content: flex-start !important; }
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-title {
    font-size: clamp(2.3rem, 3.4vw, 3.1rem) !important;
    line-height: 1.1;
    text-align: left !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-cover-screen {
    grid-area: copy;
    align-self: start;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 1.2rem;
}
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-cover-meta { text-align: left; font-size: 1.05rem; margin-top: 0.3rem; }
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-acts { max-width: 460px !important; margin: 0 !important; }
html[data-daypart] body.teller-open .teller-overlay.is-cover .teller-acts .record-tile.tile-primary.teller-act-tell { min-height: 64px !important; }

/* Countdown: breathe on the sky */
html[data-daypart] body.teller-open .teller-overlay .teller-countdown {
    position: absolute;
    inset: 0;
    padding: 76px 32px 40px;
    background: transparent !important;
    background-image: none !important;
}
html[data-daypart] body.teller-open .teller-overlay .teller-countdown-title { font-size: 1.6rem; }
html[data-daypart] body.teller-open .teller-overlay .teller-countdown-ring { width: 300px; height: 300px; }
html[data-daypart] body.teller-open .teller-overlay .teller-countdown-num { font-size: 8rem; }
html[data-daypart] body.teller-open .teller-overlay .teller-countdown-sub { font-size: 1.25rem; }

/* Close / sending / sent: sticker (left) + words and actions (right) */
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-close,
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-sent {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, calc(var(--rd-frame) / 2 - 1.5rem)));
    column-gap: 3rem;
    justify-content: center;
    align-content: center;
    align-items: center;
    width: var(--rd-frame) !important;
    max-width: 1040px !important;
    min-height: calc(100dvh - 116px);
    padding: 0 !important;
    text-align: left;
}
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-close > *,
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-sent > * { grid-column: 2; text-align: left; justify-self: stretch; }
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-finish-sticker,
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-sent-sticker {
    grid-column: 1 !important;
    grid-row: 1 / span 8;
    justify-self: center;
    align-self: center;
    width: min(380px, 28vw) !important;
    height: min(380px, 28vw) !important;
    margin: 0 !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-title,
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-title {
    font-size: clamp(2.2rem, 3.2vw, 3rem) !important;
    line-height: 1.1;
    text-align: left !important;
}
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-hero,
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-hero { max-width: 460px; min-height: 64px; }
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-quiet { align-self: start; justify-self: start; }
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-review { max-width: 460px; }
html[data-daypart] body.teller-open .teller-overlay.is-close .teller-close-error { max-width: 460px; }
html[data-daypart] body.teller-open .teller-overlay.is-sent .teller-sent-actions { max-width: 460px; }

html[data-daypart] body.teller-open .teller-overlay.is-sending .teller-sending {
    width: var(--rd-frame) !important;
    max-width: 640px !important;
    min-height: calc(100dvh - 116px);
    padding: 0 !important;
    margin: 0 auto !important;
}


html[data-daypart] body.teller-open .teller-overlay.is-sending .teller-sending-sticker {
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    flex: 0 0 auto;
    width: 240px;
    height: 240px;
    margin: 0 auto 1.5rem;
}
html[data-daypart] body.teller-open .teller-overlay.is-sending .teller-title { font-size: 2.4rem !important; }
html[data-daypart] body.teller-open .teller-overlay.is-sending .teller-sending-sub { font-size: 1.1rem; }
html[data-daypart] body.teller-open .teller-overlay.is-sending .teller-sending-bar { width: min(360px, 100%); }

/* The countdown is its own sky, so the reading card never shows through */
html[data-daypart="morning"] body.teller-open .teller-overlay .teller-countdown {
    background: linear-gradient(180deg, #F8C9B4 0%, #F6D5E6 46%, #C9D4F6 100%) !important;
}
html[data-daypart="day"] body.teller-open .teller-overlay .teller-countdown {
    background: linear-gradient(180deg, #8ECAF8 0%, #C5E6FF 48%, #EAF6FF 100%) !important;
}
html[data-daypart="night"] body.teller-open .teller-overlay .teller-countdown {
    background: radial-gradient(ellipse at 78% 12%, rgba(255, 214, 92, 0.14), transparent 28%),
        linear-gradient(180deg, #243860 0%, #1A2C4E 55%, #14243F 100%) !important;
}

/* Only the wordmark and the sky toggle sit in the toolbar here */
html body.teller-open #main > .top-bar .desktop-top-nav { display: none !important; }


/* ══ Story Builder ════════════════════════════════════════════════════
   The idea (left) and how long it should be (right), under a quiet Back.
   ══════════════════════════════════════════════════════════════════════ */
html[data-daypart] body.record-path-teller:not(.teller-open) .app,
html[data-daypart] body.record-path-teller:not(.teller-open) #main,
html[data-daypart] body.record-path-teller:not(.teller-open) #main > [data-tab="record"] {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) #main > [data-tab="record"],
html[data-daypart] body.record-path-teller:not(.teller-open) #record-form {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) #record-path-bar:not(.hidden) {
    display: block !important;
    margin: 0 0 1rem;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .record-path-back {
    width: auto !important;
    min-height: 44px;
    margin-left: calc(var(--rd-back-shift) - 0.55rem);
    padding: 0.35rem 1rem 0.35rem 0.55rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--rd-ink) !important;
    -webkit-text-fill-color: var(--rd-ink) !important;
    transition: background 0.15s ease;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .record-path-back:hover { background: rgba(27, 42, 74, 0.08) !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) .record-path-back-title { display: none !important; }
html[data-daypart="night"] body.record-path-teller:not(.teller-open) .record-path-back {
    color: #FFF8EC !important;
    -webkit-text-fill-color: #FFF8EC !important;
}
html[data-daypart="night"] body.record-path-teller:not(.teller-open) .record-path-back:hover { background: rgba(255, 248, 236, 0.1) !important; }

html[data-daypart] body.record-path-teller:not(.teller-open) #story-helper-input:not(.hidden) {
    display: grid !important;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    grid-template-areas:
        "idea mode"
        "idea go"
        "idea status";
    grid-template-rows: auto auto 1fr;
    column-gap: 2.5rem;
    row-gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: none;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    padding: 0 !important;
    overflow: visible !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .story-helper-idea {
    grid-area: idea;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    min-height: min(560px, calc(100dvh - 190px));
    padding: 2rem 2rem 1.5rem !important;
    border-radius: 30px !important;
    border: 0 !important;
    background: var(--rd-card) !important;
    background-image: none !important;
    box-shadow: var(--rd-card-shadow) !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .story-prompt-area { flex: 1 1 auto; display: flex; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-prompt {
    flex: 1 1 auto;
    min-height: 330px;
    font-size: 1.5rem !important;
    line-height: 1.45 !important;
    font-family: 'Nunito', sans-serif;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .story-tell-controls { flex: 0 0 auto; }
html[data-daypart] body.record-path-teller:not(.teller-open) .story-mode {
    grid-area: mode;
    box-sizing: border-box;
    padding: 1.6rem 1.75rem 1.4rem !important;
    border-radius: 30px !important;
    border: 0 !important;
    background: var(--rd-card) !important;
    background-image: none !important;
    box-shadow: var(--rd-card-shadow) !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) #story-action-btn {
    grid-area: go;
    width: 100%;
    min-height: 68px;
    margin: 0 !important;
    border-radius: 22px !important;
    font-size: 1.2rem !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) #story-status { grid-area: status; }


/* Clarify: one quick question, a calm centred card */
html[data-daypart] body.record-path-teller:not(.teller-open) #story-clarify:not(.hidden) {
    box-sizing: border-box;
    width: min(680px, 100%);
    margin: 4vh auto 0 !important;
    padding: 2.5rem 2.75rem 2.25rem !important;
    border: 0 !important;
    border-radius: 30px !important;
    background: var(--rd-card) !important;
    box-shadow: var(--rd-card-shadow) !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .story-clarify-intro { font-size: 1.35rem !important; margin-bottom: 1.25rem !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-clarify-questions { font-size: 1.1rem; }
html[data-daypart] body.record-path-teller:not(.teller-open) .story-clarify-actions { margin-top: 1.5rem; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-clarify-go { min-height: 64px; border-radius: 22px !important; font-size: 1.15rem !important; }

/* Writing: the cloud, big and centred in the room */
html[data-daypart] body.record-path-teller:not(.teller-open) #story-writing:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 240px);
    padding-bottom: 6vh !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) .story-writing-mark,
html[data-daypart] body.record-path-teller:not(.teller-open) .story-writing-mark .brand-logo,
html[data-daypart] body.record-path-teller:not(.teller-open) .story-writing-mark .face-mark { width: 260px !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) .story-writing-headline { font-size: 2rem !important; margin-top: 0.5rem; }
html[data-daypart] body.record-path-teller:not(.teller-open) .story-writing-tip { font-size: 1.1rem !important; }

/* Output: the story on the left, what to do with it on the right */
html[data-daypart] body.record-path-teller:not(.teller-open) #story-output:not(.hidden) {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 3rem;
    align-items: start;
    width: 100%;
    margin: 0 !important;
    padding: 2.75rem 3rem 2.5rem !important;
    border: 0 !important;
    border-radius: 30px !important;
    background: var(--rd-card) !important;
    box-shadow: var(--rd-card-shadow) !important;
}
html[data-daypart] body.record-path-teller:not(.teller-open) #story-output > p { grid-column: 1; grid-row: 1; margin: 0 0 0.5rem !important; text-align: left !important; font-size: 0.95rem !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-output-title { grid-column: 1; grid-row: 2; margin: 0 0 1rem !important; text-align: left !important; font-size: 2.1rem !important; line-height: 1.15; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-output-text { grid-column: 1; grid-row: 3 / span 2; font-size: 1.25rem !important; line-height: 1.7 !important; max-height: none !important; overflow: visible !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) #tweak-chips { grid-column: 2; grid-row: 3; margin: 0 0 1.25rem !important; padding: 0 !important; border: 0 !important; justify-content: flex-start !important; text-align: left; }
html[data-daypart] body.record-path-teller:not(.teller-open) #tweak-chips .tweak-chips-label { flex-basis: 100%; font-size: 0.95rem !important; margin-bottom: 0.25rem; text-align: left; }
html[data-daypart] body.record-path-teller:not(.teller-open) #tweak-chips .tweak-chip { font-size: 1rem !important; min-height: 44px; padding: 0.5rem 1.1rem !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) #tell-story-btn { grid-column: 2; grid-row: 1 / span 2; align-self: start; width: 100% !important; margin: 0 0 1.5rem !important; }
html[data-daypart] body.record-path-teller:not(.teller-open) #story-output .btn-new-story { grid-column: 2; grid-row: 4; align-self: start; margin-top: 0.75rem !important; }
html[data-daypart="night"] body.record-path-teller:not(.teller-open) #story-output .tweak-chip { background: rgba(255,248,236,0.1) !important; color: #FFF8EC !important; }


/* ══ Sent (own recorder) ══════════════════════════════════════════════
   Sky, not a floating card: the cloud on the left, the news on the right.
   #main stays on screen only for its toolbar.
   ══════════════════════════════════════════════════════════════════════ */
html body.room-sent #main.hidden { display: block !important; height: 0; overflow: visible; }
html body.room-sent #main.hidden > :not(.top-bar) { display: none !important; }
html[data-daypart="morning"] body.room-sent .sent-screen:not(.hidden) {
    background: linear-gradient(180deg, #F8C9B4 0%, #F6D5E6 46%, #C9D4F6 100%) !important;
}
html[data-daypart="day"] body.room-sent .sent-screen:not(.hidden) {
    background: linear-gradient(180deg, #CFE6FB 0%, #E9F2FD 52%, #FFF8EC 100%) !important;
}
html[data-daypart="night"] body.room-sent .sent-screen:not(.hidden) {
    background: linear-gradient(180deg, #0F1B33 0%, #1A2C4E 60%, #223A63 100%) !important;
}
html body.room-sent .sent-screen:not(.hidden) {
    inset: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 76px 32px 40px !important;
    justify-content: flex-start !important;
    z-index: 180 !important;
}
html body.room-sent .sent-screen-inner {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 4rem;
    align-content: center;
    align-items: center;
    justify-items: stretch;
    width: var(--rd-frame) !important;
    max-width: 1040px !important;
    flex: 0 0 auto !important;
    margin: auto !important;
    text-align: left !important;
}
html body.room-sent .sent-screen-inner > * { grid-column: 2; text-align: left !important; }
html body.room-sent .sent-cloud-stage {
    grid-column: 1;
    grid-row: 1 / span 8;
    margin: 0;
    justify-self: center;
}
html body.room-sent .sent-cloud-stage::before { width: 420px; height: 420px; }
html body.room-sent .sent-room-mount { width: min(340px, 26vw) !important; max-width: none !important; }
html body.room-sent .sent-room-mount .brand-logo-wrap,
html body.room-sent .sent-room-mount .brand-logo,
html body.room-sent .sent-room-mount .face-mark { max-width: none !important; }
html body.room-sent .sent-title { font-size: clamp(2.2rem, 3.2vw, 3rem) !important; }
html body.room-sent .sent-tuck { justify-self: start; margin: 0.25rem 0 0.75rem !important; }
html body.room-sent .sent-subtext { max-width: 38ch; font-size: 1.15rem; margin-bottom: 1.75rem; }
html body.room-sent .sent-actions { max-width: 460px; }
html body.room-sent .sent-another { min-height: 64px !important; font-size: 1.2rem !important; }
html body.room-sent .sent-secondary { min-height: 54px !important; font-size: 1rem !important; }
html body.room-sent #credits-info { max-width: 460px; }


/* The theme toggle drops to <body> while #main is hidden: pin it where the toolbar puts it */
html body.room-sent > .daypart-btn {
    position: fixed !important;
    top: 9px !important;
    right: max(12px, calc((100vw - 1160px) / 2)) !important;
    left: auto !important;
    z-index: 250 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
html body.room-sent .sent-cloud-stage { align-self: start; position: sticky; top: 16dvh; }


/* ══ Guest name gate and phone interstitial ═══════════════════════════
   Same centred sky + card as the sign-in page.
   ══════════════════════════════════════════════════════════════════════ */
html body.brand-hero-mode:has(#contributor-name-setup:not(.hidden)):not(.admin-mode) .app,
html body.brand-hero-mode:has(#contributor-phone-setup:not(.hidden)):not(.admin-mode) .app {
    max-width: 680px !important;
    width: min(680px, calc(100vw - 48px));
    min-height: 100dvh;
    height: auto;
    padding-top: 64px;
    padding-bottom: 44px;
    justify-content: center;
    box-sizing: border-box;
}
html body:not(.admin-mode) #contributor-name-setup.brand-shell,
html body:not(.admin-mode) #contributor-phone-setup.brand-shell {
    max-width: 680px;
    width: min(680px, calc(100vw - 48px));
    height: auto;
    min-height: 100dvh;
    max-height: none;
    padding: 64px 0 44px;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}
html body:not(.admin-mode) #contributor-name-setup .setup-sky,
html body:not(.admin-mode) #contributor-phone-setup .setup-sky {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0 1rem 1.35rem;
    gap: 1.5rem;
}
html body:not(.admin-mode) #contributor-name-setup .brand-shell-sheet,
html body:not(.admin-mode) #contributor-phone-setup .brand-shell-sheet {
    flex: 0 0 auto;
    margin-top: 0;
    width: 100%;
    max-width: 560px;
    border-radius: 30px;
    padding: 2.1rem 2.45rem 2rem;
    box-shadow: 0 24px 64px rgba(27, 42, 74, 0.16), 0 4px 16px rgba(27, 42, 74, 0.08);
}
html[data-daypart="night"] body.brand-hero-mode #contributor-name-setup .brand-shell-sheet,
html[data-daypart="night"] body.brand-hero-mode #contributor-phone-setup .brand-shell-sheet {
    box-shadow: 0 28px 72px rgba(4, 10, 24, 0.52), 0 0 0 1px rgba(255, 248, 236, 0.12);
}

html body.brand-hero-mode:has(#contributor-name-setup:not(.hidden)):not(.admin-mode),
html body.brand-hero-mode:has(#contributor-phone-setup:not(.hidden)):not(.admin-mode) { overflow-y: auto; }

html[data-daypart="night"] body.record-path-own.sound-board-mode.room-recording .recorder-clock .timer,
html[data-daypart="night"] body.record-path-own.sound-board-mode.room-recording .recorder-panel.recording-active .recorder-clock .timer {
    color: #FFF8EC !important;
    -webkit-text-fill-color: #FFF8EC !important;
}

}
