:root {
    color-scheme: light;
    --paper: #f8f3ff;
    --card: #fffdf9;
    --ink: #281840;
    --accent: #4c227d;
    --muted: #604d72;
    --edge: #d1bfdf;
    --soft: #f0e4ff;
    --lime: #dbf975;
    --line: 1px solid var(--edge);
    font: 100%/1.46 system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, #e8d6fb 0, var(--paper) 30rem);
    color: var(--ink);
}
main { width: min(100%, 43rem); margin-inline: auto; padding: .9rem 1rem 1.25rem; }

button {
    font: inherit;
    color: inherit;
    background: var(--card);
    border: var(--line);
    border-radius: .65rem;
    cursor: pointer;
    min-height: 2.75rem;
    padding: .5rem .8rem;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:focus-visible, .talk:focus { outline: 3px solid #752dc2; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: default; }

.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .4rem .6rem;
    padding: .9rem;
    border-radius: 1.05rem;
    background: var(--ink);
    color: #fff9ff;
}
.brand { min-width: 0; }
.brand strong {
    display: block;
    color: var(--lime);
    font-size: clamp(2rem, 8vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -.072em;
    line-height: .98;
}
.brand strong span { color: #f6add8; }
.tagline { grid-column: 1 / -1; margin: 0; color: #f1e6ff; font-size: .84rem; line-height: 1.35; }
.headerActions { display: flex; gap: .2rem; flex: 0 0 auto; }
.headerActions button {
    background: transparent;
    border: 1px solid transparent;
    color: inherit;
    display: grid;
    justify-items: center;
    align-content: center;
    min-width: 2.75rem;
    padding: .25rem .3rem;
    line-height: 1.2;
}
.headerActions button:hover { border-color: #bea6d2; }
.headerActions button:focus-visible { outline-color: var(--lime); }
.headerActions svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
}
.settingsIcon { font-size: 1.25rem; line-height: 1; }
.toolLabel { font-weight: 650; font-size: .6875rem; }
#bankCount:not(:empty) { margin-inline-start: .125rem; }

.dailyHeader { margin: .65rem 0 .15rem; }
.dailyHeader > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .65rem; }
.dailyHeader h2 { margin: 0; font-size: 1.05rem; font-weight: 850; }
.dailyHeader time, #previewLabel { color: var(--muted); font-size: .8125rem; }
.pickyIntro { display: flex; align-items: center; gap: .85rem; margin: 0 0 .55rem; }
.pickyButton {
    background: transparent;
    border-color: transparent;
    display: grid;
    justify-items: center;
    flex: none;
    min-width: 3.55rem;
    padding: .1rem .2rem .2rem;
    color: var(--ink);
    font-weight: 850;
    font-size: .75rem;
    line-height: 1;
}
.pickyButton:hover:not(:disabled) { border-color: transparent; }
.pickyButton { -webkit-tap-highlight-color: transparent; }
.host { width: 3rem; height: 3rem; overflow: visible; }
.buddybody { transform-origin: 50% 85%; animation: breathe 3.2s ease-in-out infinite; }
.eyes { transform-origin: 50% 40%; transform-box: fill-box; }
.host.blink .eyes { animation: blink .24s ease-in-out; }
.pupils { transition: transform .35s ease; }
.host.glance .pupils { transform: translateX(-3px); }
.host.perk .buddybody { animation: perk .65s ease-in-out, breathe 3.2s ease-in-out .65s infinite; }
.host.perk .mouth { d: path('M 29 42 Q 39 58 49 42'); }
.host.side-eye .pupils { transform: translateX(3.5px); }
.host.wobble .buddybody { animation: wobble .6s ease-in-out, breathe 3.2s ease-in-out .6s infinite; }
.host.mischief .mouth { d: path('M 31 43 Q 39 52 48 40'); }
.host.mischief .brows { transform: translateY(-1.5px); }
.host.side-eye .brows { transform: rotate(8deg); transform-origin: 50% 25%; }
.pickyBubble {
    position: relative;
    background: var(--soft);
    border: 1px solid #b798d5;
    border-radius: .65rem;
    padding: .5rem .68rem;
    font-size: .9rem;
    font-weight: 700;
}
.pickyBubble::before {
    position: absolute;
    content: '';
    top: calc(50% - .28rem);
    left: -.32rem;
    width: .56rem;
    height: .56rem;
    transform: rotate(45deg);
    background: inherit;
    border-block-end: inherit;
    border-inline-start: inherit;
}
#hostNote { position: relative; margin: 0; }

#questionCard, .panel {
    background: var(--card);
    border: 1px solid #b8a2cc;
    border-top: 3px solid var(--accent);
    border-radius: 1rem;
    box-shadow: .22rem .24rem 0 #d8c4e9;
    padding: clamp(.8rem, 3.6vw, 1.45rem);
}
#questionCard, .talk, .pickFeedback { scroll-margin: .55rem; }
.panel { margin-top: .85rem; }
#loadingMessage { margin-block: .85rem; color: var(--muted); }
.cardProgress { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem; }
.cardProgress, .eyebrow {
    color: var(--accent);
    font-size: .8125rem;
    font-weight: 790;
    margin: 0 0 .4rem;
}
.progressMarks { display: flex; gap: .23rem; }
.progressMarks span { width: .75rem; height: .25rem; border-radius: 1rem; background: #decfea; }
.progressMarks .currentMark { background: var(--accent); }

.questionhead { display: flex; align-items: flex-start; gap: .5rem; }
h1 {
    color: var(--ink);
    margin: 0 0 .35rem;
    font-size: clamp(1.55rem, 5.8vw, 2.45rem);
    font-weight: 880;
    line-height: 1.08;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}
.questionhead h1 { flex: 1; min-width: 0; }
.save {
    flex: 0 0 auto;
    min-width: 2.75rem;
    display: grid;
    justify-items: center;
    padding: .15rem .32rem;
    border-color: transparent;
    color: var(--accent);
    font-size: .625rem;
    font-weight: 750;
}
.save svg { width: 1.12rem; height: 1.12rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.save[aria-pressed="true"] svg { fill: currentColor; }
#story { margin: .12rem 0 .55rem; }
#prompt { margin: 0 0 .45rem; font-weight: 800; }

.answers, .saved { display: grid; gap: .39rem; }
.answer {
    background: #fdf9ff;
    width: 100%;
    min-height: 2.75rem;
    text-align: start;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}
.answerCopy { min-width: 0; display: grid; gap: .18rem; }
.pickyBadge {
    justify-self: start;
    padding: .12rem .46rem;
    border-radius: .45rem;
    background: var(--accent);
    color: #fff9ff;
    font-size: .75rem;
    font-weight: 800;
}
.answerLabel { min-width: 0; overflow-wrap: anywhere; }
.answer.selected {
    border-color: var(--accent);
    background: var(--lime);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.answer.pickyChoice:not(.selected) {
    border-color: #789355;
    background: #e8f5ce;
}
.pct { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); font-size: .875rem; }
#status { margin: .25rem 0 0; }

.pickFeedback {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    margin-top: .55rem;
}
.pickFeedback p { margin: 0; color: var(--accent); font-size: .85rem; }
.pickFeedback strong { display: inline; margin-right: .25rem; font-weight: 850; }
#jumpToTalk {
    flex: none;
    color: #fff9ff;
    background: var(--ink);
    border-color: var(--ink);
    font-size: .86rem;
    font-weight: 800;
    padding-inline: .65rem;
}
#jumpToTalk:hover { background: var(--accent); }
.talk {
    background: var(--soft);
    border: 1px solid #c6a9e0;
    border-inline-start: .27rem solid var(--accent);
    border-radius: .65rem;
    padding: .62rem .75rem;
    margin: .65rem 0 .65rem;
}
.talk.picked { background: #f3ffd0; border-color: #91a84a; border-inline-start-color: var(--accent); }
#talkHeading { display: flex; align-items: center; gap: .35rem; margin-bottom: .1rem; color: var(--accent); }
.talk svg { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pickyHandoff {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    margin: .55rem 0 0;
    padding-top: .5rem;
    border-top: 1px solid #aa87c677;
    color: var(--ink);
    font-size: .875rem;
}
.pickyHandoff strong { color: var(--accent); }
.dailyNav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .55rem; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff9ff; font-weight: 800; }
.primary:hover { background: var(--ink); }
.secondary { background: #faf3ff; }
.tomorrow { margin: 0; color: var(--accent); font-weight: 800; font-size: .875rem; }
.panelBack { margin-top: .85rem; }
.saved button { text-align: start; }
.largeTextSetting { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .65rem 0; border-block: var(--line); cursor: pointer; }
.largeTextSetting small { display: block; color: var(--muted); }
.largeTextSwitch { display: flex; align-items: center; gap: .45rem; white-space: nowrap; min-height: 2.75rem; }
.largeTextSwitch input { margin: 0; width: 1.35rem; height: 1.35rem; accent-color: var(--accent); }
footer { color: var(--muted); text-align: center; font-size: .75rem; margin-top: .8rem; }
.demoTools { margin-top: .65rem; text-align: center; }
.demoTools button { font-size: .85rem; }

.large-text body { font-size: 1.375rem; }
.large-text h1 { font-size: 2rem; }
.large-text .dailyHeader h2 { font-size: 1.28rem; }
.large-text :is(.tagline, .dailyHeader time, #previewLabel, .cardProgress, .eyebrow, .muted, .tomorrow, .save, .pickyBubble, .pickFeedback p, .pickyBadge, .pickyHandoff, #jumpToTalk) { font-size: 1rem; }
.large-text .toolLabel { font-size: .8125rem; }
.large-text :is(.answer, .dailyNav button, .panelBack, #returnLive) { min-height: 3.375rem; }
.large-text .dailyNav { align-items: stretch; }

@keyframes breathe { 50% { transform: scale(1.025, 1.055) translateY(-1px); } }
@keyframes blink { 50% { transform: scaleY(.06); } }
@keyframes perk { 45% { transform: translateY(-6px) rotate(-9deg) scale(1.07); } }
@keyframes wobble {
    25% { transform: translateX(-3px) rotate(-8deg); }
    62% { transform: translateX(2px) rotate(7deg); }
}
@media (max-width: 360px) {
    main { padding: .65rem .55rem 1rem; }
    .masthead { gap: .25rem; padding: .65rem; }
    .headerActions { gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .buddybody, .host.blink .eyes, .host.perk .buddybody, .host.wobble .buddybody { animation: none; }
    .pupils { transition: none; }
}

@media (max-width: 600px) {
    main { padding-top: .55rem; }
    .masthead { padding-block: .55rem; gap: .2rem .45rem; }
    .dailyHeader { margin-block: .4rem .05rem; }
    .dailyHeader h2:not(.themeTitle) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .pickyIntro { margin-bottom: .28rem; gap: .65rem; }
    .pickyButton { padding-block: 0; }
    .pickyBubble { padding-block: .35rem; }
    .host { width: 3.375rem; height: 3.375rem; }
}

:root[data-theme-colors] {
    --theme-main: var(--theme-primary, #281840);
    --theme-detail: var(--theme-accent, #4c227d);
    --theme-on-main: var(--theme-on-primary, #fff);
    --accent: var(--theme-readable-accent, #4c227d);
    --paper: color-mix(in srgb, var(--theme-detail) 6%, #fffdf9);
    --soft: color-mix(in srgb, var(--theme-detail) 12%, #fffdf9);
    --edge: color-mix(in srgb, var(--theme-detail) 25%, #fffdf9);
}
[data-theme-colors] body {
    background: linear-gradient(160deg, color-mix(in srgb, var(--theme-main) 14%, #fffdf9), var(--paper) 30rem);
}
[data-theme-colors] .masthead { background: var(--theme-main); color: var(--theme-on-main); }
[data-theme-colors] :is(.brand strong, .brand strong span, .tagline) { color: var(--theme-on-main); }
[data-theme-colors] .pickyBubble { border-color: var(--edge); }
[data-theme-colors] :is(#questionCard, .panel) {
    border-color: var(--edge);
    border-top-color: var(--accent);
    box-shadow: .22rem .24rem 0 var(--edge);
}
[data-theme-colors] :is(.answer, .secondary) { background: var(--paper); }
[data-theme-colors] :is(.answer.pickyChoice:not(.selected), .talk.picked) {
    background: var(--soft);
    border-color: var(--accent);
}
[data-theme-colors] .answer.selected {
    background: color-mix(in srgb, var(--theme-detail) 20%, #fffdf9);
}
[data-theme-colors] .talk { border-color: var(--edge); border-inline-start-color: var(--accent); }
[data-theme-colors] .talk.picked { border-color: var(--accent); }
[data-theme-colors] .progressMarks span { background: var(--edge); }
[data-theme-colors] .progressMarks .currentMark { background: var(--accent); }
[data-theme-colors] :is(button:focus-visible, .talk:focus) { outline-color: var(--accent); }
[data-theme-colors] .headerActions button:focus-visible { outline-color: var(--theme-on-main); }
[data-theme-colors] #jumpToTalk {
    background: var(--theme-main);
    border-color: var(--theme-main);
    color: var(--theme-on-main);
}

:is(#packSessions, #settingsPacks) { padding: 0; list-style: none; }
:is(#packSessions a, #settingsPacks a, #packContinue) {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .4rem .65rem;
    border: var(--line);
    border-radius: .55rem;
    color: var(--ink);
    background: #faf3ff;
    font-weight: 700;
}
#packBack, #packPicker > a, #packExit, #settingsDaily { color: var(--accent); }
#packContinue { margin-bottom: .65rem; background: var(--accent); color: white; }
#packExit { display: block; margin-top: .65rem; }
.packCompletion {
    margin-inline-start: auto;
    padding-inline-start: .65rem;
    color: #236344;
}

#shareDialog {
    width: min(26rem, calc(100% - 2rem));
    max-width: none;
    padding: 1rem;
    border: var(--line);
    border-radius: 1rem;
    background: var(--paper);
    color: var(--ink);
}
#shareDialog::backdrop { background: #24163880; }
.shareHeading, .shareActions { display: flex; align-items: center; gap: .5rem; }
.shareHeading { justify-content: space-between; margin-bottom: .75rem; }
.shareHeading h2 { margin: 0; }
#shareMessage {
    display: block;
    width: 100%;
    margin: .25rem 0 .75rem;
    padding: .55rem;
    border: var(--line);
    border-radius: .5rem;
    font: inherit;
    color: inherit;
    background: #faf3ff;
    resize: vertical;
}
.shareActions { flex-wrap: wrap; }
#textQuestion { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem .75rem; border-radius: .55rem; text-decoration: none; }
#shareStatus { margin: .5rem 0 0; }
#shareStatus:empty { display: none; }

.offlineBadge { display: inline-block; margin: .25rem 0 .15rem; padding: .13rem .48rem; border: 1px solid #cedbd0; border-radius: .45rem; background: #eef5ef; color: #3c5844; font-size: .875rem; font-weight: 650; }
.offlinePicker { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin: .2rem 0 .8rem; }
.offlinePicker label { font-weight: 750; }
.offlinePicker select { min-height: 2.65rem; max-width: 100%; padding: .35rem; border: var(--line); border-radius: .45rem; background: var(--paper); color: var(--ink); font: inherit; }
.offlineSettings { margin-block: 1.15rem; }
.offlineSettings p { margin-block: .4rem .65rem; }
.offlineSettings p:empty { display: none; }

#weirdFact { margin: .12rem 0 .65rem; }
#weirdFact strong { display: block; margin-bottom: .15rem; }
#scienceSource { margin-top: .75rem; }
#scienceSource summary { cursor: pointer; }
#scienceSource p { margin: .35rem 0 0; }
#scienceSource a { color: inherit; }

#packDiscovery {
    margin: .7rem 0;
    padding: .65rem .8rem;
    border: 1px solid #d3bb8e;
    border-radius: .85rem;
    background: #fff3da;
    color: #34271e;
}
#featuredPackHeading { margin: 0; font-size: 1rem; }
#packDiscovery p { margin: .15rem 0 .3rem; }
.playFeaturedPack, #packDiscovery summary { color: #633715; font-weight: 700; }
.playFeaturedPack { display: inline-flex; align-items: center; min-height: 2.75rem; }
#packDiscovery details { display: inline-block; margin-left: .8rem; }
#packDiscovery details[open] { display: block; margin-left: 0; }
#packDiscovery summary { cursor: pointer; padding-block: .65rem; }
.packPreviews { display: grid; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.packPreviews a {
    display: block;
    padding: .55rem .7rem;
    border: var(--line);
    border-radius: .6rem;
    background: var(--card);
    color: inherit;
    text-decoration: none;
}
.packPreviews a:hover { border-color: var(--accent); }
.packPreviews strong { color: var(--accent); text-decoration: underline; }
.packPreviews span { display: block; }
