/* ============================================================
   What Would You Do? — standalone visual identity.
   Editorial, high-contrast, mobile-first, one-handed use.
   Foundations (Fraunces + DM Sans, warm paper, restrained purple)
   are inherited from Symbiont's design system but tokens are
   self-contained so the module can ship on its own domain.
   ============================================================ */

:root {
    --paper: #f7f5f0;
    --card: #fffdf9;
    --ink: #1b1815;
    --ink-2: #57514a;
    --ink-3: #8a827a;
    --line: #d9d3ca;
    --line-strong: #1b1815;
    --accent: #5646c4;
    --accent-deep: #43349f;
    --accent-soft: rgba(86, 70, 196, 0.08);
    --accent-line: rgba(86, 70, 196, 0.35);
    --spark: #d9654b;
    --spark-soft: rgba(217, 101, 75, 0.1);
    --bar-track: #ebe6de;
    --bar-other: #3f3a34;
    --danger: #b23a2a;
    --danger-soft: rgba(178, 58, 42, 0.09);
    --r-md: 12px;
    --r-lg: 16px;
    --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { height: 100%; }

body {
    font-family: var(--font-ui);
    background:
        radial-gradient(circle at 5% -4%, rgba(86, 70, 196, 0.09), transparent 270px),
        radial-gradient(circle at 103% 16%, rgba(217, 101, 75, 0.06), transparent 230px),
        var(--paper);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--accent-line);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============ Shell ============ */
.wwyd-shell {
    max-width: 600px;
    margin: 0 auto;
    padding: calc(10px + env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        calc(30px + env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left));
}

.wwyd-header {
    padding: 4px 3px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.wwyd-header-main {
    min-width: 0;
    padding-top: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wwyd-message-slot {
    position: fixed;
    z-index: 99;
    left: 50%;
    bottom: calc(var(--mobile-tabs-height, 66px) + 12px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    min-height: 44px;
    border: 1px solid rgba(27, 24, 21, .18);
    border-radius: 999px;
    background: rgba(255, 253, 249, .96);
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    transform: translateX(-50%);
    box-shadow: 0 7px 24px rgba(27, 24, 21, .18), 1px 2px 0 rgba(27, 24, 21, .16);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    transition: left .22s ease, padding .2s ease, gap .2s ease;
}

.wwyd-dock-action {
    position: relative;
    min-width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink-2);
    font: 800 10px var(--font-ui);
    line-height: 1;
    text-decoration: none;
    transition: padding .2s ease, background .15s ease, color .15s ease;
}

.wwyd-dock-action:hover { background: var(--accent-soft); color: var(--accent-deep); }
.wwyd-dock-action + .wwyd-dock-action::before { position: absolute; left: -2px; width: 1px; height: 18px; background: var(--line); content: ''; }
.wwyd-dock-action svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wwyd-message-shortcut { padding-right: 8px; }
.wwyd-dock-badge { position: absolute; top: -2px; right: 0; min-width: 14px; height: 14px; border: 1.5px solid rgba(255, 253, 249, .98); border-radius: 999px; padding: 0 3px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 6.5px; line-height: 1; box-shadow: 0 1px 3px rgba(27, 24, 21, .18); }
.wwyd-message-slot.is-collapsed { left: 25%; }
.wwyd-message-slot.is-collapsed { padding-right: 3px; padding-left: 3px; gap: 0; }
.wwyd-message-slot.is-collapsed .wwyd-dock-action { min-width: 31px; padding-right: 5px; padding-left: 5px; gap: 3px; }
.wwyd-message-slot.is-collapsed .wwyd-dock-action svg { width: 15px; height: 15px; }
.wwyd-message-slot.is-collapsed .wwyd-dock-badge { display: none; }

.auth-quick-logo { position: relative; }

.wwyd-brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.wwyd-brand-frame {
    position: relative;
    display: block;
    width: clamp(146px, 46vw, 176px);
    aspect-ratio: 2.55 / 1;
    overflow: hidden;
    border: 1.5px solid var(--line-strong);
    border-radius: 14px 14px 14px 5px;
    background: #faf8f3;
    box-shadow: 3px 3px 0 var(--spark);
    transform: rotate(-0.7deg);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wwyd-brand-image {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
}

@media (hover: hover) {
    .wwyd-brand:hover .wwyd-brand-frame {
        box-shadow: 4px 4px 0 var(--spark);
        transform: translateY(-1px) rotate(0deg);
    }
}

.wwyd-tagline {
    display: none;
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.wwyd-play-page .wwyd-tagline {
    display: block;
    max-width: 300px;
    line-height: 1.3;
}

/* ============ Case card ============ */
.case-card {
    background: var(--card);
    border: 1.5px solid var(--line-strong);
    border-radius: 18px;
    padding: 16px 16px 18px;
    box-shadow: 4px 5px 0 rgba(27, 24, 21, 0.88);
}

.case-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin-bottom: 15px;
}

.case-kicker::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--spark);
    transform: rotate(12deg);
}

.case-scenario {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 440;
    line-height: 1.54;
    letter-spacing: 0;
    border-left: 2px solid var(--accent-line);
    padding-left: 16px;
}

.story-beat {
    position: relative;
    max-width: 47ch;
}

.story-beat + .story-beat { margin-top: 13px; }

.story-beat::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0.67em;
    width: 6px;
    height: 6px;
    border: 2px solid var(--card);
    border-radius: 50%;
    background: var(--ink-3);
}

.story-beat:last-child::before { background: var(--spark); }

/* ============ Options ============ */
.options { margin-top: 20px; display: grid; gap: 10px; }

.option-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    text-align: left;
    background: var(--card);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: 11px 12px;
    min-height: 60px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s,
        transform 0.12s;
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: 7px auto 7px 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--spark);
    transform: scaleY(0);
    transition: transform 0.15s ease-out;
}

@media (hover: hover) {
    .option-btn:not([disabled]):hover {
        background: #fff;
        border-color: var(--accent);
        box-shadow: 2px 3px 0 var(--accent-line);
        transform: translateY(-2px);
    }

    .option-btn:not([disabled]):hover::before { transform: scaleY(1); }
}

.option-btn:not([disabled]):active { transform: translateY(0) scale(0.99); }

.option-btn[disabled] { cursor: default; }
.option-btn[disabled]:hover { background: var(--card); }

.option-btn.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 3px 3px 0 var(--accent-line);
}

.option-btn.selected::before { transform: scaleY(1); }

.option-btn.dimmed { opacity: 0.55; }

.option-body { display: block; flex: 1; min-width: 0; }

.option-action {
    display: block;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}

.option-rationale {
    display: block;
    margin-top: 3px;
    font-size: 12.25px;
    font-style: italic;
    color: var(--ink-2);
    line-height: 1.42;
}

.option-spinner {
    display: none;
    margin-left: auto;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 6px;
    border: 2px solid var(--accent-line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: wwyd-spin 0.7s linear infinite;
}

.option-btn.submitting .option-spinner { display: block; }

@keyframes wwyd-spin { to { transform: rotate(360deg); } }

.choice-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 8px;
}

.choice-action {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 8px 10px;
    background: transparent;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.choice-action:active { background: var(--accent-soft); }
.choice-action:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice-action-skip { border-color: var(--line-strong); color: var(--ink); }
.choice-action-finish { color: var(--accent-deep); border-color: var(--accent-line); }
.choice-action svg { width: 15px; height: 15px; }

.case-freedom-note {
    margin-top: 6px;
    color: var(--ink-3);
    font-size: 10.5px;
    line-height: 1.35;
    text-align: center;
}

/* ============ Results ============ */
.results { margin-top: 20px; display: none; }
.results.show { display: block; }

.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.results-total { font-size: 13px; color: var(--ink-2); font-weight: 500; }

.consensus-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    background: var(--spark-soft);
}

.bars { display: grid; gap: 12px; }

/* min-width: 0 stops the nowrap labels from widening the grid rows past
   the card (grid items otherwise refuse to shrink below min-content). */
.bar-row { position: relative; min-width: 0; }

.bar-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
    min-width: 0;
}

.bar-action {
    font-size: 13px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.bar-pct {
    font-family: var(--font-display);
    font-weight: 640;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.bar-track {
    height: 14px;
    background: var(--bar-track);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 7px;
    background: var(--bar-other);
    transition: width 0.7s cubic-bezier(0.25, 0.9, 0.35, 1);
}

.bar-row.yours .bar-fill { background: var(--accent); }

.your-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: middle;
}

.already-voted-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-md);
    padding: 9px 12px;
    display: none;
}

.already-voted-note.show { display: block; }

/* ============ Analysis ============ */
.analysis { margin-top: 22px; display: grid; gap: 16px; }

.analysis-block {
    border-top: 1.5px solid var(--line-strong);
    padding-top: 12px;
}

.analysis-block h3 {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin-bottom: 6px;
}

.analysis-block p { font-size: 14.5px; line-height: 1.6; color: var(--ink); }

/* ============ Actions ============ */
.actions {
    margin-top: 14px;
    display: none;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.actions.show { display: grid; }
.actions .wwyd-btn-primary { grid-column: 1 / -1; }

.case-comments {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding: 18px 18px 4px;
    background: var(--card);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-md);
}

.case-comments-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.case-comments-eyebrow {
    color: var(--accent-deep);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.case-comments-head h2 {
    margin-top: 2px;
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 660;
}

.case-comments-count {
    flex-shrink: 0;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 650;
}

.case-comments-source {
    margin-top: 7px;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.4;
}

.case-comments-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.case-comment {
    position: relative;
    margin-right: 16px;
    padding: 12px 14px 12px 32px;
    border: 1px solid var(--line);
    border-radius: 15px 15px 15px 5px;
    background: #fbf8f2;
    box-shadow: 1px 2px 0 rgba(27, 24, 21, 0.08);
}

.case-comment:nth-child(even) {
    margin-right: 0;
    margin-left: 16px;
    border-color: var(--accent-line);
    border-radius: 15px 15px 5px 15px;
    background: var(--accent-soft);
}

.case-comment::before {
    content: '\201C';
    position: absolute;
    top: 9px;
    left: 11px;
    color: var(--spark);
    font-family: Georgia, serif;
    font-size: 23px;
    line-height: 1;
}

.case-comment:nth-child(even)::before { color: var(--accent); }

.case-comment p {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.58;
}

.importance-rating {
    grid-column: 1 / -1;
    background: var(--card);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: 13px 14px;
}

.importance-rating-copy h2 {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 640;
}

.importance-rating-copy p {
    margin-top: 2px;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.35;
}

.importance-stars {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 2px;
}

.importance-star {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--line);
    font: inherit;
    font-size: clamp(20px, 7vw, 27px);
    line-height: 1;
    padding: 3px 0;
    cursor: pointer;
    transition: color 0.12s, transform 0.12s;
}

.importance-star:hover,
.importance-star.filled { color: var(--accent); }
.importance-star:active { transform: scale(0.9); }
.importance-star[disabled] { cursor: default; }

.importance-rating-footer {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.importance-selection {
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 650;
}

.importance-submit {
    min-width: 84px;
    min-height: 38px;
    border: 1.5px solid var(--ink);
    border-radius: 9px;
    background: var(--ink);
    color: var(--paper);
    padding: 7px 14px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.importance-submit[disabled] {
    cursor: default;
    opacity: 0.42;
}

.importance-rating.is-saved .importance-submit { opacity: 1; }

.importance-status {
    min-height: 0;
    margin-top: 0;
    color: var(--accent-deep);
    font-size: 11.5px;
    font-weight: 650;
}

.importance-status:not(:empty) { margin-top: 7px; }

.wwyd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    min-height: 48px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--line-strong);
    font-family: inherit;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s, background 0.15s;
    width: 100%;
}

.wwyd-btn:active { transform: translateY(1px); }

.wwyd-btn-primary {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.wwyd-btn-primary:hover { background: #000; }

.wwyd-btn-secondary { background: var(--card); color: var(--ink); }
.wwyd-btn-secondary:hover { background: var(--accent-soft); }

.wwyd-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ============ Toast / errors ============ */
.wwyd-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(8px);
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-width: calc(100vw - 40px);
    text-align: center;
    z-index: 50;
}

.wwyd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wwyd-toast.error { background: var(--danger); }

/* ============ Moral profile ============ */
.profile-page {
    width: min(100%, 520px);
    margin: 0 auto;
    padding-top: 2px;
}

.profile-account {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    color: var(--ink-3);
    font-size: 10.5px;
}

.profile-account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-account form { flex: 0 0 auto; }

.profile-account button {
    border: 0;
    background: transparent;
    padding: 3px;
    color: var(--accent-deep);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.profile-eyebrow {
    color: var(--accent-deep);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-note {
    margin: 18px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
}

.profile-complete {
    margin-top: 14px;
    color: var(--accent-deep);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.profile-actions {
    margin-top: 16px;
    display: grid;
    gap: 9px;
}

.profile-response-card {
    width: 100%;
    min-height: 330px;
    margin: 18px auto 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    padding: 24px 20px 20px;
    box-shadow: 0 12px 38px rgba(38, 31, 24, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.profile-response-card h1,
.profile-response-card h2 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: clamp(29px, 8.2vw, 39px);
    font-weight: 640;
    letter-spacing: -0.025em;
    line-height: 1.07;
}

.unified-profile-intro {
    margin-top: 16px;
    text-align: center;
}

.unified-profile-intro h1 {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: clamp(29px, 8vw, 38px);
    font-weight: 640;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.unified-profile-intro > p:last-child {
    max-width: 42ch;
    margin: 8px auto 0;
    color: var(--ink-2);
    font-size: 12.5px;
    line-height: 1.45;
}

.profile-analysis-switcher {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #eee9e1;
    padding: 5px;
}

.profile-analysis-tab {
    min-width: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    padding: 10px 7px 9px;
    color: var(--ink-2);
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.profile-analysis-tab span,
.profile-analysis-tab small { display: block; }

.profile-analysis-tab span {
    font-size: 11.5px;
    font-weight: 750;
}

.profile-analysis-tab small {
    margin-top: 2px;
    color: var(--ink-3);
    font-size: 9px;
    font-weight: 600;
}

.profile-analysis-tab.is-active {
    background: var(--card);
    color: var(--accent-deep);
    box-shadow: 0 2px 8px rgba(38, 31, 24, 0.08);
}

.profile-analysis-panel[hidden] { display: none !important; }

.unified-profile .profile-response-card { margin-top: 12px; }

/* ============ Blank section canvases ============ */
.wwyd-blank-tab-canvas {
    width: min(100%, 520px);
    min-height: calc(100dvh - 218px);
    margin: 0 auto;
}

.wwyd-blank-tab-page .wwyd-footer { display: none; }

.profile-answer { margin-top: 14px; }

.profile-response {
    color: var(--ink-2);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.52;
    white-space: pre-line;
}

.profile-value-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-value-row span {
    border: 1px solid #d8d0ef;
    border-radius: 999px;
    background: var(--accent-soft);
    padding: 6px 10px;
    color: var(--accent-deep);
    font-size: 11px;
    font-weight: 700;
}

.profile-detail {
    margin-top: 17px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.48;
}

.profile-detail strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-deep);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-reflection span {
    font-family: var(--font-display);
    font-size: 14.5px;
}

.profile-loading-dots {
    height: 28px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-deep);
    animation: ai-pulse 1.2s ease-in-out infinite;
}

.profile-loading-dots span:nth-child(2) { animation-delay: 0.14s; }
.profile-loading-dots span:nth-child(3) { animation-delay: 0.28s; }

.profile-retry {
    width: fit-content;
    margin-top: 18px;
    border: 1px solid #5a4c99;
    border-radius: 999px;
    background: #fff;
    padding: 8px 13px;
    color: #403579;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.profile-response-card [hidden],
.profile-actions [hidden] { display: none; }

@keyframes ai-pulse {
    0%, 100% { transform: scale(0.72); opacity: 0.55; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* ============ Profile sign-in ============ */
.wwyd-auth-page {
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 34px);
    background:
        radial-gradient(circle at 50% 18%, rgba(46, 63, 92, 0.72), transparent 48%),
        #10141d;
}

.wwyd-auth-page .wwyd-shell {
    width: min(100%, 430px);
    max-width: 430px;
    height: min(100%, 760px);
    min-height: 0;
    margin: 0;
    padding: 0 clamp(22px, 7vw, 34px) clamp(18px, 3dvh, 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
}

.auth-quick-logo {
    position: relative;
    height: clamp(92px, 13dvh, 108px);
    margin: 0 clamp(-34px, -7vw, -22px);
    overflow: hidden;
    border-bottom: 1px solid rgba(31, 28, 24, 0.08);
    background:
        radial-gradient(circle at 50% -35%, rgba(255, 255, 255, 0.92), transparent 64%),
        #f7f2e9;
}

.auth-quick-logo a {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.auth-quick-logo img {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: clamp(148px, 47vw, 186px);
    height: auto;
    transform: translate(-50%, -51%);
    filter: contrast(1.08);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.auth-desktop-story { display: none; }

.auth-page {
    width: min(100%, 400px);
    margin: 0 auto;
    padding-top: 12px;
}

.auth-intro {
    padding: 14px 8px 20px;
    text-align: center;
}

.auth-intro h1 {
    font-family: var(--font-display);
    font-size: clamp(31px, 9vw, 38px);
    font-weight: 640;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.auth-intro > p:last-child {
    max-width: 330px;
    margin: 8px auto 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.42;
}

.auth-step-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--spark);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-card {
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
}

.auth-error {
    margin-bottom: 11px;
    border: 1px solid #d9a29b;
    border-radius: 9px;
    background: #fff1ef;
    padding: 9px 10px;
    color: #7d2820;
    font-size: 12px;
    line-height: 1.4;
}

.auth-provider-list {
    display: grid;
    gap: 8px;
}

.auth-provider {
    width: 100%;
    min-height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    padding: 9px 12px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.auth-provider:hover { background: var(--paper); }
.auth-provider-apple { background: #151412; color: #fff; }
.auth-provider-apple:hover { background: #2a2825; }

.auth-provider-mark {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
}

.auth-provider-google {
    border-radius: 50%;
    background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.auth-divider {
    margin: 14px 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink-3);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: var(--line);
}

.auth-email-form { display: grid; gap: 8px; }

.auth-email-form label {
    font-size: 11px;
    font-weight: 700;
}

.auth-email-form input {
    width: 100%;
    min-height: 47px;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 16px;
    outline: none;
}

.auth-email-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-handle-field { position: relative; }
.auth-handle-field > span {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    color: var(--accent-deep);
    font-size: 16px;
    font-weight: 750;
    transform: translateY(-50%);
    pointer-events: none;
}
.auth-handle-field input { padding-left: 29px; }

.auth-email-form .wwyd-btn { margin-top: 2px; }

.auth-form-hint {
    margin: -3px 1px 2px;
    color: var(--ink-2);
    font-size: 10px;
    line-height: 1.35;
}

.auth-switch {
    margin-top: 13px;
    color: var(--ink-2);
    font-size: 11.5px;
    text-align: center;
}

.auth-switch a {
    color: var(--accent-deep);
    font-weight: 750;
    text-underline-offset: 2px;
}

.auth-local-note {
    margin-top: 8px;
    color: var(--ink-3);
    font-size: 9.5px;
    line-height: 1.35;
    text-align: center;
}

.auth-back {
    display: block;
    margin: 17px auto 0;
    padding: 6px;
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 650;
    text-align: center;
    text-underline-offset: 3px;
}

.auth-verify-page { padding-top: 12px; }
.auth-code-form input {
    text-align: center;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: 0.22em;
}

.auth-resend { margin-top: 12px; text-align: center; }
.auth-resend button {
    border: 0;
    background: transparent;
    padding: 5px;
    color: var(--accent-deep);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.wwyd-play-page .wwyd-footer,
.wwyd-auth-page .wwyd-footer,
.wwyd-profile-page .wwyd-footer { display: none; }

@media (max-width: 600px) {
    .wwyd-auth-page {
        display: block;
        padding: 0;
        background: var(--paper);
    }

    .wwyd-auth-page .wwyd-shell {
        width: 100%;
        max-width: 430px;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0 auto;
        padding-top: env(safe-area-inset-top, 0px);
        padding-right: max(22px, env(safe-area-inset-right));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        padding-left: max(22px, env(safe-area-inset-left));
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-quick-logo {
        margin-right: calc(-1 * max(22px, env(safe-area-inset-right)));
        margin-left: calc(-1 * max(22px, env(safe-area-inset-left)));
    }

    .auth-page {
        width: 100%;
        padding-top: clamp(8px, 1.8dvh, 15px);
    }
}

/* ============ Completion / utility pages ============ */
.wwyd-center {
    text-align: center;
    padding: 40px 10px 20px;
}

.wwyd-center .big {
    font-family: var(--font-display);
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 620;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.wwyd-center .sub {
    margin-top: 10px;
    color: var(--ink-2);
    font-size: 15px;
}

.wwyd-center .count {
    margin: 22px auto 0;
    display: inline-block;
    border: 1.5px solid var(--line-strong);
    background: var(--card);
    border-radius: var(--r-lg);
    padding: 14px 26px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 640;
}

.wwyd-center .actions-center {
    margin-top: 26px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Confirmation layouts where one action is destructive: the primary button
   leads, and the way out is a quiet link rather than a matching slab. */
.wwyd-center .actions-stack {
    flex-direction: column;
    align-items: center;
}

.unsubscribe-secondary {
    color: var(--ink-3);
    font-size: 11px;
    text-decoration: underline;
}

.wwyd-footer {
    margin-top: 34px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-3);
}

/* ============ Desktop ============ */
@media (min-width: 700px) {
    .wwyd-shell { padding-top: 32px; }
    .wwyd-header { padding-bottom: 22px; }
    .wwyd-brand-frame { width: 204px; }
    .wwyd-tagline { display: block; }
    .case-card { padding: 26px 28px 28px; }
    .case-scenario { font-size: 18.25px; line-height: 1.58; }
    .story-beat + .story-beat { margin-top: 16px; }
    .options { margin-top: 16px; gap: 12px; }
    .option-btn { min-height: 66px; padding: 14px 15px; }
    .option-action { font-size: 15.5px; }
    .option-rationale { font-size: 13.5px; line-height: 1.4; }
    .choice-actions { margin-top: 14px; }
    .importance-star { font-size: 27px; }
    .profile-card { padding: 24px 26px; }
    .profile-actions { grid-template-columns: 1fr 1fr; }

    /* Account access is intentionally a different composition on larger screens:
       an editorial brand panel beside a quiet, task-focused form. */
    .wwyd-auth-page {
        display: grid;
        place-items: center;
        padding: clamp(24px, 4vw, 64px);
        background:
            radial-gradient(circle at 16% 12%, rgba(117, 99, 255, 0.2), transparent 34%),
            radial-gradient(circle at 88% 86%, rgba(217, 101, 75, 0.13), transparent 30%),
            #111520;
    }

    .wwyd-quick-auth-page .wwyd-shell {
        width: min(100%, 1040px);
        max-width: 1040px;
        height: min(720px, calc(100dvh - 2 * clamp(24px, 4vw, 64px)));
        min-height: 560px;
        display: grid;
        grid-template-columns: minmax(330px, 0.88fr) minmax(430px, 1.12fr);
        margin: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 28px;
        background: var(--paper);
        box-shadow: 0 36px 110px rgba(0, 0, 0, 0.48);
    }

    .wwyd-auth-page .auth-quick-logo {
        position: relative;
        height: auto;
        min-height: 100%;
        margin: 0;
        padding: 48px 44px 42px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        overflow: hidden;
        border: 0;
        background:
            linear-gradient(155deg, rgba(255, 255, 255, 0.12), transparent 38%),
            var(--accent-deep);
        color: #fff;
    }

    .wwyd-auth-page .auth-quick-logo::before,
    .wwyd-auth-page .auth-quick-logo::after {
        content: '';
        position: absolute;
        border: 1px solid rgba(255, 255, 255, 0.16);
        pointer-events: none;
    }

    .wwyd-auth-page .auth-quick-logo::before {
        width: 320px;
        height: 320px;
        right: -190px;
        top: 122px;
        border-radius: 50%;
        box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.035),
                    0 0 0 96px rgba(255, 255, 255, 0.025);
    }

    .wwyd-auth-page .auth-quick-logo::after {
        width: 82px;
        height: 82px;
        left: 38px;
        bottom: 34px;
        border-color: rgba(255, 255, 255, 0.1);
        transform: rotate(12deg);
    }

    .wwyd-auth-page .auth-quick-logo a {
        z-index: 1;
        width: 214px;
        height: 94px;
        flex: 0 0 auto;
        overflow: hidden;
        border-radius: 18px 18px 18px 6px;
        background: #fffaf1;
        box-shadow: 5px 6px 0 var(--spark);
        transform: rotate(-1deg);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .wwyd-auth-page .auth-quick-logo a:hover {
        box-shadow: 7px 8px 0 var(--spark);
        transform: translateY(-2px) rotate(0deg);
    }

    .wwyd-auth-page .auth-quick-logo img {
        width: 214px;
        max-width: none;
        mix-blend-mode: multiply;
    }

    .auth-desktop-story {
        z-index: 1;
        margin-top: auto;
        display: block;
        max-width: 350px;
    }

    .auth-desktop-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.72);
    }

    .auth-desktop-eyebrow::before {
        content: '';
        width: 9px;
        height: 9px;
        border-radius: 3px;
        background: var(--spark);
        transform: rotate(12deg);
    }

    .auth-desktop-story > p {
        margin-top: 14px;
        font-family: var(--font-display);
        font-size: clamp(25px, 2.4vw, 34px);
        font-weight: 520;
        letter-spacing: -0.025em;
        line-height: 1.18;
    }

    .auth-desktop-prompt {
        margin-top: 28px;
        padding-top: 18px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        color: rgba(255, 255, 255, 0.68);
        font-size: 11px;
        font-weight: 600;
    }

    .auth-desktop-prompt span::before {
        content: '\00b7';
        margin-right: 7px;
        color: #f4a493;
    }

    .wwyd-quick-auth-page .auth-page {
        align-self: center;
        width: min(100% - 80px, 420px);
        margin: 0 auto;
        padding: 0;
    }

    .wwyd-quick-auth-page .auth-intro {
        padding: 0 0 28px;
        text-align: left;
    }

    .wwyd-quick-auth-page .auth-intro h1 {
        font-size: clamp(38px, 4vw, 52px);
        line-height: 1.02;
    }

    .wwyd-quick-auth-page .auth-intro > p:last-child {
        max-width: 38ch;
        margin: 12px 0 0;
        font-size: 14px;
        line-height: 1.55;
    }

    .wwyd-quick-auth-page .auth-card {
        padding-top: 24px;
    }

    .wwyd-quick-auth-page .auth-provider,
    .wwyd-quick-auth-page .auth-email-form input {
        min-height: 52px;
        border-radius: 12px;
    }

    .wwyd-quick-auth-page .auth-provider {
        font-size: 14px;
        transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }

    .wwyd-quick-auth-page .auth-provider:hover {
        background: #fff;
        box-shadow: 3px 4px 0 rgba(27, 24, 21, 0.14);
        transform: translateY(-1px);
    }

    .wwyd-quick-auth-page .auth-email-form label {
        font-size: 12px;
    }

    .wwyd-quick-auth-page .auth-email-form .wwyd-btn {
        min-height: 52px;
        margin-top: 5px;
        border-radius: 12px;
        font-size: 14px;
    }

    .wwyd-quick-auth-page .auth-back {
        margin-top: 22px;
        font-size: 12px;
    }
}

@media (max-width: 355px) {
    .wwyd-shell {
        padding-left: max(9px, env(safe-area-inset-left));
        padding-right: max(9px, env(safe-area-inset-right));
    }
    .wwyd-brand-frame { width: 136px; }
    .case-card { padding-left: 11px; padding-right: 11px; }
    .choice-actions { grid-template-columns: 1fr; }
}

/* Dilemmas use the same mobile logo band as Quick Questions and Login. */
@media (max-width: 699px) {
    .wwyd-quick-profile-page .auth-quick-logo {
        margin-right: calc(0px - max(12px, env(safe-area-inset-right)));
        margin-left: calc(0px - max(12px, env(safe-area-inset-left)));
    }

    .wwyd-dilemma-page .wwyd-shell,
    .wwyd-blank-tab-page .wwyd-shell {
        padding-top: calc(10px + env(safe-area-inset-top));
    }

    .wwyd-header.wwyd-dilemma-brand {
        position: relative;
        height: clamp(92px, 13dvh, 108px);
        margin-top: calc(-10px - env(safe-area-inset-top));
        margin-right: calc(0px - max(12px, env(safe-area-inset-right)));
        margin-bottom: 14px;
        margin-left: calc(0px - max(12px, env(safe-area-inset-left)));
        padding: 0;
        display: block;
        overflow: hidden;
        border-bottom: 1px solid rgba(31, 28, 24, 0.08);
        background:
            radial-gradient(circle at 50% -35%, rgba(255, 255, 255, 0.92), transparent 64%),
            #f7f2e9;
    }

    .wwyd-dilemma-brand .wwyd-header-main,
    .wwyd-dilemma-brand .wwyd-brand,
    .wwyd-dilemma-brand .wwyd-brand-frame {
        position: relative;
        width: 100%;
        height: 100%;
        padding: 0;
        display: block;
        overflow: hidden;
    }

    .wwyd-dilemma-brand .wwyd-brand-frame {
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .wwyd-dilemma-brand .wwyd-brand-image {
        position: absolute;
        top: 50%;
        left: 50%;
        width: clamp(148px, 47vw, 186px);
        height: auto;
        transform: translate(-50%, -51%);
        filter: contrast(1.08);
        mix-blend-mode: multiply;
        pointer-events: none;
    }

    .wwyd-dilemma-brand .wwyd-tagline {
        display: none;
    }

    .wwyd-dilemma-brand .wwyd-message-shortcut {
        width: auto;
        height: auto;
        display: inline-flex;
        overflow: visible;
    }

}

/* Compact 9:16 phones: keep the full pre-vote decision in one composed view. */
@media (max-width: 430px) and (max-height: 780px) {
    .wwyd-shell {
        padding-top: max(6px, env(safe-area-inset-top));
        padding-right: max(9px, env(safe-area-inset-right));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        padding-left: max(9px, env(safe-area-inset-left));
    }

    .wwyd-header {
        gap: 6px;
        padding: 1px 2px 8px;
    }

    .wwyd-brand-frame {
        width: 132px;
        border-radius: 10px 10px 10px 4px;
        box-shadow: 2px 2px 0 var(--spark);
    }
    .wwyd-tagline {
        margin-top: 4px;
        font-size: 10.5px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .case-card {
        padding: 11px 12px 10px;
        border-radius: 15px;
        box-shadow: 3px 3px 0 rgba(27, 24, 21, 0.88);
    }

    .case-kicker {
        gap: 6px;
        margin-bottom: 9px;
        padding: 3px 8px;
        font-size: 9px;
    }
    .case-kicker::before { width: 5px; height: 5px; }

    .case-scenario {
        padding-left: 13px;
        font-size: 14px;
        line-height: 1.36;
    }
    .story-beat + .story-beat { margin-top: 7px; }
    .story-beat::before {
        left: -17px;
        top: 0.59em;
        width: 5px;
        height: 5px;
    }

    .options { margin-top: 11px; gap: 7px; }
    .option-btn {
        min-height: 48px;
        padding: 7px 10px;
        border-radius: 10px;
    }
    .option-action { font-size: 13px; line-height: 1.25; }
    .option-rationale {
        margin-top: 1px;
        font-size: 10.75px;
        line-height: 1.25;
    }

    .choice-actions {
        margin-top: 7px;
        gap: 6px;
        grid-template-columns: 0.82fr 1.18fr;
    }
    .choice-action {
        min-height: 34px;
        padding: 5px 7px;
        border-radius: 8px;
        font-size: 10.75px;
    }
    .choice-action svg { width: 13px; height: 13px; }
    .case-freedom-note {
        margin-top: 3px;
        font-size: 9px;
        line-height: 1.2;
    }

    /* Post-vote content keeps the same compact reading rhythm. */
    .results { margin-top: 14px; }
    .results-head { margin-bottom: 9px; }
    .results-total { font-size: 11px; }
    .consensus-chip { padding: 3px 9px; font-size: 10.5px; }
    .bars { gap: 9px; }
    .bar-label { margin-bottom: 3px; }
    .bar-action { font-size: 11.5px; }
    .bar-pct { font-size: 15px; }
    .bar-track { height: 11px; }
    .your-chip { padding: 1px 6px; font-size: 9px; }
    .already-voted-note { margin-top: 9px; padding: 7px 9px; font-size: 11px; }

    .analysis { margin-top: 16px; gap: 12px; }
    .analysis-block { padding-top: 9px; }
    .analysis-block h3 { margin-bottom: 4px; font-size: 9.5px; }
    .analysis-block p { font-size: 13px; line-height: 1.48; }

    .actions { margin-top: 10px; gap: 7px; }
    .wwyd-btn {
        min-height: 44px;
        padding: 8px 11px;
        border-radius: 10px;
        font-size: 13px;
    }
    .wwyd-btn svg { width: 15px; height: 15px; }

    .importance-rating { padding: 10px 11px; }
    .importance-rating-copy h2 { font-size: 14px; }
    .importance-rating-copy p { font-size: 10px; }
    .importance-stars { margin-top: 7px; }
    .importance-star { font-size: clamp(18px, 6.4vw, 24px); }
    .importance-rating-footer { margin-top: 6px; }
    .importance-selection { font-size: 10.5px; }
    .importance-submit { min-height: 34px; padding: 5px 10px; font-size: 11px; }

    .case-comments { padding: 13px 13px 2px; }
    .case-comments-eyebrow { font-size: 9px; }
    .case-comments-head h2 { font-size: 19px; }
    .case-comments-count { font-size: 10.5px; }
    .case-comments-source { margin-top: 5px; font-size: 10px; }
    .case-comments-list { margin-top: 9px; gap: 8px; }
    .case-comment {
        margin-right: 10px;
        padding: 10px 11px 10px 28px;
        border-radius: 13px 13px 13px 4px;
    }
    .case-comment:nth-child(even) {
        margin-right: 0;
        margin-left: 10px;
        border-radius: 13px 13px 4px 13px;
    }
    .case-comment::before { top: 7px; left: 9px; font-size: 20px; }
    .case-comment p { font-size: 12.5px; line-height: 1.48; }

    /* Account access screens use the same proportions as the dilemma. */
    .auth-page { padding-top: 0; }
    .auth-intro { padding: 8px 6px 12px; }
    .auth-intro h1 { font-size: clamp(27px, 8vw, 31px); line-height: 1.06; }
    .auth-intro > p:last-child {
        margin-top: 5px;
        font-size: 11.5px;
        line-height: 1.34;
    }
    .auth-card { padding-top: 10px; }
    .auth-provider-list { gap: 6px; }
    .auth-provider {
        min-height: 44px;
        padding: 7px 10px;
        font-size: 12px;
    }
    .auth-divider { margin: 10px 0 9px; }
    .auth-email-form { gap: 6px; }
    .auth-email-form label { font-size: 10.5px; }
    .auth-email-form input {
        min-height: 44px;
        padding: 8px 10px;
        font-size: 15px;
    }
    .auth-form-hint { font-size: 9px; }
    .auth-switch { margin-top: 8px; font-size: 10.5px; }
    .auth-local-note { margin-top: 5px; font-size: 8.5px; }
    .auth-back { margin-top: 9px; padding: 4px; font-size: 10.5px; }
    .auth-verify-page { padding-top: 0; }
    .auth-code-form input { font-size: 21px; }
    .auth-resend { margin-top: 8px; }

    /* Profile cards remain readable when their generated reflection is long. */
    .profile-page { padding-top: 0; }
    .profile-account { font-size: 9.5px; }
    .profile-response-card {
        min-height: 260px;
        margin-top: 10px;
        padding: 16px 14px 14px;
        border-radius: 16px;
    }
    .profile-eyebrow { font-size: 9.5px; }
    .profile-response-card h1,
    .profile-response-card h2 { margin-top: 5px; font-size: 27px; line-height: 1.08; }
    .profile-answer { margin-top: 10px; }
    .profile-response { font-size: 14px; line-height: 1.42; }
    .profile-value-row { margin-top: 11px; gap: 5px; }
    .profile-value-row span { padding: 4px 8px; font-size: 9.5px; }
    .profile-detail { margin-top: 12px; padding-top: 10px; font-size: 11.5px; }
    .profile-detail strong { font-size: 9.5px; }
    .profile-reflection span { font-size: 13px; }
    .profile-note { margin-top: 13px; padding-top: 9px; font-size: 10px; }
    .profile-complete { margin-top: 10px; font-size: 11px; }
    .profile-actions { margin-top: 10px; gap: 7px; }

    .wwyd-center { padding: 28px 8px 16px; }
    .wwyd-center .big { font-size: 25px; }
    .wwyd-center .sub { margin-top: 7px; font-size: 13px; }
    .wwyd-center .count { margin-top: 16px; padding: 10px 20px; font-size: 17px; }
    .wwyd-center .actions-center { margin-top: 18px; gap: 7px; }
    .wwyd-footer { margin-top: 22px; font-size: 10px; }
}

/* 320×568-class screens: preserve the full choice, remove only auxiliary copy. */
@media (max-width: 330px) and (max-height: 600px) {
    .wwyd-header { padding: 0 1px 6px; }
    .wwyd-brand-frame { width: 112px; }
    .wwyd-play-page .wwyd-tagline { display: none; }

    .case-card { padding: 9px 10px 8px; }
    .case-kicker { display: none; }
    .case-scenario {
        padding-left: 11px;
        font-size: 13.5px;
        line-height: 1.32;
    }
    .story-beat + .story-beat { margin-top: 6px; }
    .story-beat::before { left: -15px; }

    .options { margin-top: 8px; gap: 5px; }
    .option-btn { min-height: 46px; padding: 5px 8px; }
    .option-action { font-size: 12.75px; }
    .option-rationale { font-size: 10.25px; }

    .choice-actions { margin-top: 5px; gap: 5px; }
    .choice-action { min-height: 30px; padding: 4px 5px; font-size: 10px; }
    .case-freedom-note { display: none; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ============ Purpose-built desktop compositions ============
   Phone layouts above remain unchanged. At desktop width, Quick Questions is
   the visual source: dark gallery backdrop, warm paper, navy/red decisions,
   and confident poster-like geometry. */
@media (min-width: 800px) {
    :root {
        --paper: #f5f0e7;
        --card: #fffdf8;
        --ink: #171920;
        --ink-2: #5f5a55;
        --ink-3: #81796f;
        --line: #cfc6ba;
        --line-strong: #171920;
        --accent: #1d3866;
        --accent-deep: #1d3866;
        --accent-soft: rgba(29, 56, 102, 0.09);
        --accent-line: rgba(29, 56, 102, 0.36);
        --spark: #a94740;
        --spark-soft: rgba(169, 71, 64, 0.11);
    }

    body:not(.wwyd-auth-page) {
        padding: clamp(18px, 3vw, 36px);
        background:
            radial-gradient(circle at 50% 12%, rgba(46, 63, 92, 0.72), transparent 48%),
            #10141d;
    }

    body:not(.wwyd-auth-page) .wwyd-shell {
        width: min(100%, 1180px);
        max-width: 1180px;
        min-height: min(820px, calc(100dvh - clamp(36px, 6vw, 72px)));
        margin: 0 auto;
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 28px;
        background: var(--paper);
        box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
    }

    body:not(.wwyd-auth-page) .wwyd-header {
        min-height: 108px;
        padding: 0 clamp(34px, 5vw, 72px);
        align-items: center;
        border-bottom: 1px solid rgba(23, 25, 32, 0.1);
        background:
            radial-gradient(circle at 18% -80%, rgba(255, 255, 255, 0.94), transparent 62%),
            var(--paper);
        text-align: left;
    }

    body:not(.wwyd-auth-page) .wwyd-header-main {
        position: relative;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 30px;
    }

    .wwyd-message-slot { bottom: 24px; }

    .wwyd-message-slot.is-collapsed {
        left: max(54px, calc((100vw - min(100vw, 1180px)) / 2 + 54px));
    }

    body:not(.wwyd-auth-page) .wwyd-brand-frame {
        width: 214px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    body:not(.wwyd-auth-page) .wwyd-brand:hover .wwyd-brand-frame {
        box-shadow: none;
        transform: scale(1.015);
    }

    body:not(.wwyd-auth-page) .wwyd-tagline {
        display: block;
        max-width: 360px;
        margin: 0;
        color: var(--ink-2);
        font-size: 13px;
        font-weight: 650;
        letter-spacing: 0.025em;
        text-align: right;
    }

    body:not(.wwyd-auth-page) .wwyd-footer {
        margin: 0;
        padding: 22px 34px 26px;
        border-top: 1px solid rgba(23, 25, 32, 0.08);
        font-size: 11px;
    }

    /* Moral dilemmas become a reading-and-decision spread. */
    .wwyd-play-page .wwyd-shell > main {
        padding: clamp(30px, 4.5vw, 58px);
    }

    .wwyd-play-page .case-card {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
        grid-template-areas:
            "kicker options"
            "scenario options"
            "scenario choice"
            "scenario freedom"
            "results results";
        column-gap: clamp(44px, 6vw, 78px);
        row-gap: 0;
        padding: clamp(32px, 4vw, 50px);
        border: 0;
        border-radius: 24px 24px 24px 8px;
        background:
            linear-gradient(90deg, transparent 0 calc(45% - 1px), rgba(23, 25, 32, 0.08) calc(45% - 1px) 45%, transparent 45%),
            var(--card);
        box-shadow: 10px 12px 0 var(--spark);
    }

    .wwyd-play-page .case-kicker {
        grid-area: kicker;
        margin-bottom: 20px;
        border-color: rgba(169, 71, 64, 0.38);
        background: var(--spark-soft);
        color: #87362f;
    }

    .wwyd-play-page .case-scenario {
        grid-area: scenario;
        align-self: start;
        max-width: 46ch;
        padding-left: 21px;
        border-left-color: rgba(169, 71, 64, 0.42);
        font-size: clamp(18px, 1.55vw, 21px);
        line-height: 1.55;
    }

    .wwyd-play-page .options {
        grid-area: options;
        align-self: center;
        margin: 0;
        gap: 13px;
    }

    .wwyd-play-page .option-btn {
        min-height: 88px;
        padding: 17px 19px;
        border: 0;
        border-radius: 16px 16px 16px 5px;
        background: var(--accent);
        color: #fffdf8;
        box-shadow: 4px 5px 0 rgba(10, 24, 49, 0.18);
    }

    .wwyd-play-page .option-btn:nth-child(2) { background: #a94740; }
    .wwyd-play-page .option-btn:nth-child(3) { background: #34363e; }

    .wwyd-play-page .option-btn::before {
        inset: 0 auto 0 0;
        width: 6px;
        background: rgba(255, 255, 255, 0.76);
    }

    .wwyd-play-page .option-action { font-size: 16px; }

    .wwyd-play-page .option-rationale {
        color: rgba(255, 253, 248, 0.7);
        font-size: 13px;
    }

    .wwyd-play-page .option-btn:not([disabled]):hover {
        border-color: transparent;
        background: var(--accent);
        filter: brightness(1.08) saturate(1.04);
        box-shadow: 7px 8px 0 rgba(10, 24, 49, 0.2);
    }

    .wwyd-play-page .option-btn:nth-child(2):not([disabled]):hover { background: #a94740; }
    .wwyd-play-page .option-btn:nth-child(3):not([disabled]):hover { background: #34363e; }
    .wwyd-play-page .option-btn.selected { outline: 4px solid rgba(23, 25, 32, 0.18); }
    .wwyd-play-page .option-btn.dimmed { opacity: 0.42; }
    .wwyd-play-page .choice-actions { grid-area: choice; margin-top: 16px; }
    .wwyd-play-page .case-freedom-note { grid-area: freedom; }

    .wwyd-play-page .results {
        grid-area: results;
        margin-top: 40px;
        padding-top: 32px;
        border-top: 1px solid var(--line);
    }

    .wwyd-play-page .results.show {
        display: grid;
        grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
        column-gap: clamp(44px, 6vw, 78px);
    }

    .wwyd-play-page .results-head,
    .wwyd-play-page .bars,
    .wwyd-play-page .already-voted-note { grid-column: 1; }

    .wwyd-play-page .analysis {
        grid-column: 2;
        grid-row: 1 / span 4;
        margin-top: 0;
    }

    .wwyd-play-page .actions {
        max-width: 100%;
        margin-top: 28px;
        grid-template-columns: 1.2fr 1fr 1fr;
    }

    .wwyd-play-page .actions .wwyd-btn-primary { grid-column: auto; }
    .wwyd-play-page .importance-rating,
    .wwyd-play-page .case-comments { grid-column: 1 / -1; }
    .wwyd-play-page .case-comments-list { grid-template-columns: 1fr 1fr; }

    /* Profile becomes an editorial results spread with a stable side rail. */
    .wwyd-profile-page .wwyd-shell {
        display: grid;
        grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
        grid-template-rows: 1fr auto;
    }

    .wwyd-profile-page .wwyd-header {
        grid-column: 1;
        grid-row: 1 / -1;
        min-height: 100%;
        padding: 54px 42px;
        align-items: flex-start;
        border-right: 1px solid rgba(255, 255, 255, 0.16);
        border-bottom: 0;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.13), transparent 42%),
            var(--accent);
        color: #fff;
    }

    .wwyd-profile-page .wwyd-header-main {
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .wwyd-profile-page .wwyd-brand-frame {
        width: 210px;
        border-radius: 18px 18px 18px 6px;
        background: #fffdf8;
        box-shadow: 6px 7px 0 var(--spark);
        transform: rotate(-1deg);
    }

    .wwyd-profile-page .wwyd-tagline {
        max-width: 22ch;
        margin-top: auto;
        color: rgba(255, 255, 255, 0.74);
        font-family: var(--font-display);
        font-size: 25px;
        line-height: 1.2;
        text-align: left;
    }

    .wwyd-profile-page .profile-page {
        width: 100%;
        max-width: none;
        padding: clamp(42px, 5vw, 68px);
    }

    .wwyd-profile-page .profile-account { justify-content: flex-end; }

    .wwyd-profile-page .profile-response-card {
        min-height: 430px;
        margin-top: 24px;
        padding: clamp(34px, 4vw, 52px);
        border: 0;
        border-radius: 24px 24px 24px 8px;
        box-shadow: 9px 10px 0 var(--spark);
    }

    .wwyd-profile-page .profile-response-card h1,
    .wwyd-profile-page .profile-response-card h2 {
        max-width: 14ch;
        font-size: clamp(43px, 4.2vw, 62px);
    }

    .wwyd-unified-profile-page .unified-profile-intro {
        margin-top: 24px;
        text-align: left;
    }

    .wwyd-unified-profile-page .unified-profile-intro h1 {
        font-size: clamp(36px, 3.3vw, 50px);
    }

    .wwyd-unified-profile-page .unified-profile-intro > p:last-child {
        margin-left: 0;
    }

    .wwyd-unified-profile-page .profile-analysis-switcher {
        width: min(100%, 520px);
        margin-top: 24px;
    }

    .wwyd-unified-profile-page .profile-response-card {
        min-height: 390px;
        margin-top: 18px;
    }

    .wwyd-blank-tab-page .wwyd-blank-tab-canvas {
        min-height: 600px;
    }

    .wwyd-profile-page .profile-response {
        max-width: 62ch;
        font-size: 18px;
    }

    .wwyd-profile-page .profile-actions { grid-template-columns: 1fr 1fr; }
    .wwyd-profile-page .wwyd-footer { display: none; }

    /* Every account route gets a desktop split, including legacy signup. */
    .wwyd-auth-page .wwyd-shell {
        width: min(100%, 1080px);
        max-width: 1080px;
        height: min(760px, calc(100dvh - clamp(44px, 8vw, 90px)));
        min-height: 580px;
        display: grid;
        grid-template-columns: minmax(340px, 0.88fr) minmax(440px, 1.12fr);
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 28px;
        background: var(--paper);
    }

    .wwyd-auth-page .wwyd-header,
    .wwyd-auth-page .auth-quick-logo {
        position: relative;
        height: auto;
        min-height: 100%;
        margin: 0;
        padding: 50px 44px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        overflow: hidden;
        border: 0;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.13), transparent 42%),
            var(--accent);
        color: #fff;
    }

    .wwyd-auth-page .wwyd-header-main {
        height: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .wwyd-auth-page .wwyd-header .wwyd-brand-frame,
    .wwyd-auth-page .auth-quick-logo a {
        width: 214px;
        height: 94px;
        overflow: hidden;
        border: 0;
        border-radius: 18px 18px 18px 6px;
        background: #fffdf8;
        box-shadow: 6px 7px 0 var(--spark);
        transform: rotate(-1deg);
    }

    .wwyd-auth-page .wwyd-header .wwyd-tagline {
        display: block;
        max-width: 19ch;
        margin-top: auto;
        color: rgba(255, 255, 255, 0.76);
        font-family: var(--font-display);
        font-size: 28px;
        line-height: 1.18;
    }

    .wwyd-auth-page .auth-page {
        align-self: center;
        width: min(100% - 88px, 440px);
        max-height: 100%;
        margin: 0 auto;
        padding: 36px 0;
        overflow-y: auto;
    }

    .wwyd-auth-page .auth-intro {
        padding: 0 0 28px;
        text-align: left;
    }

    .wwyd-auth-page .auth-intro h1 { font-size: clamp(40px, 4vw, 54px); }
    .wwyd-auth-page .auth-intro > p:last-child { margin: 11px 0 0; }

    /* Empty/error states use the same framed desktop stage. */
    body:not(.wwyd-play-page):not(.wwyd-profile-page):not(.wwyd-auth-page) .wwyd-center {
        min-height: 560px;
        display: grid;
        place-content: center;
        padding: 70px;
    }

    body:not(.wwyd-play-page):not(.wwyd-profile-page):not(.wwyd-auth-page) .wwyd-center .big {
        max-width: 18ch;
        margin: 0 auto;
        font-size: clamp(48px, 5vw, 70px);
        line-height: 1.02;
    }

    body:not(.wwyd-play-page):not(.wwyd-profile-page):not(.wwyd-auth-page) .wwyd-center .sub {
        max-width: 48ch;
        margin: 18px auto 0;
        font-size: 17px;
    }
}

@media (min-width: 800px) and (max-height: 680px) {
    body:not(.wwyd-auth-page) { padding-block: 12px; }

    body:not(.wwyd-auth-page) .wwyd-shell {
        min-height: calc(100dvh - 24px);
    }

    body:not(.wwyd-auth-page) .wwyd-header { min-height: 82px; }

    .wwyd-play-page .wwyd-shell > main,
    .wwyd-profile-page .profile-page { padding-block: 30px; }

    .wwyd-auth-page { padding-block: 12px; }

    .wwyd-auth-page .wwyd-shell {
        height: calc(100dvh - 24px);
        min-height: 0;
    }
}
