/* ================================================================
   PROTOTYPE LAYER: loads after the original style.css.
   Uses only the original color tokens so the look stays the same.
   ================================================================ */

:root {
    --text-soft: #55625D;
    --line: rgba(44, 53, 49, 0.1);
}
@media (prefers-color-scheme: dark) {
    :root { --text-soft: #B8C4BE; --line: rgba(241, 243, 241, 0.12); }
}

html { scroll-padding-top: 96px; }

/* Test strip */
.test-strip {
    display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap;
    padding: 0.45rem 1rem; font-size: 0.8rem;
    background: var(--sage-light); color: var(--sage-dark);
}
.test-strip button {
    background: none; border: 1px solid currentColor; color: inherit; border-radius: 999px;
    padding: 0.15rem 0.7rem; font: inherit; font-weight: 600; cursor: pointer;
}
.changes-panel { background: var(--sage-light); color: var(--charcoal); padding-block: 0.5rem 1.25rem; }
.changes-panel h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.changes-panel ul { padding-left: 1.2rem; display: grid; gap: 0.25rem; font-size: 0.9rem; }

/* Header pill */
.help-now-pill {
    margin-left: auto; margin-right: 1.25rem;
    background: var(--terracotta-light); color: var(--soft-terracotta);
    padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}
.help-now-pill:hover { background: var(--soft-terracotta); color: var(--white); }
.saved-count {
    display: inline-block; min-width: 1.3em; padding: 0 0.35em; margin-left: 0.2em;
    border-radius: 999px; background: var(--burnt-orange-light); color: var(--burnt-orange);
    font-size: 0.75em; font-weight: 600; text-align: center; line-height: 1.5;
}

/* Hero app */
.hero.hero-app { padding: 3.25rem 0 1.5rem; }
.hero-app .hero-single { max-width: 860px; }
.hero-app h1 { margin-bottom: 0.75rem; text-wrap: balance; }
.hero-app .hero-lede { margin-bottom: 1.75rem; max-width: 60ch; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; max-width: 560px; margin-bottom: 1.5rem; }
.mode-btn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
    padding: 1rem 1.25rem; border-radius: 12px; cursor: pointer; text-align: left;
    font-family: inherit; color: var(--charcoal);
    background: var(--white); border: 1.5px solid var(--line);
    transition: var(--transition);
}
.mode-btn:hover { border-color: var(--burnt-orange); }
.mode-btn.active { background: var(--burnt-orange); border-color: var(--burnt-orange); color: #fff; }
.mode-title { font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 600; }
.mode-sub { font-size: 0.85rem; opacity: 0.85; }

.prefs { display: grid; gap: 0.6rem; }
.pref-group { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pref-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
    color: var(--text-soft); min-width: 6.5rem;
}
.pref-chip {
    font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer;
    padding: 0.35rem 0.8rem; border-radius: 999px;
    background: var(--white); color: var(--charcoal); border: 1px solid var(--line);
    transition: var(--transition);
}
.pref-chip:hover { border-color: var(--sage-green); }
.pref-chip.active { background: var(--sage-green); border-color: var(--sage-green); color: var(--warm-ivory); }

/* Need tiles */
.app-body { padding-block: 1.5rem 3rem; }
.need-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.75rem; }
.need-card {
    background: var(--white); border: 1px solid var(--line); border-radius: 10px;
    padding: 1rem 0.5rem; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    transition: var(--transition); color: var(--charcoal);
}
.need-card:hover, .need-card.active {
    background: var(--burnt-orange-light); border-color: var(--burnt-orange); transform: translateY(-2px);
}
.need-card:hover .selector-title, .need-card.active .selector-title { color: var(--burnt-orange); }
.need-card .selector-icon { margin-bottom: 0.35rem; }

.newcomer-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1rem 0 0.5rem; }
.link-btn {
    background: none; border: none; padding: 0; font: inherit; font-size: 0.92rem; font-weight: 600;
    color: var(--sage-green); cursor: pointer; text-decoration: none;
}
.link-btn:hover, .link-btn.active { color: var(--burnt-orange); text-decoration: underline; }

/* Results */
.results { margin-top: 1.5rem; scroll-margin-top: 100px; }
.results-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.results-head h2 { font-size: 1.6rem; color: var(--charcoal); }
.results-count { font-size: 0.85rem; color: var(--text-soft); }
.sub-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.sub-chips:empty { display: none; }
.results-empty {
    padding: 1.5rem; border-radius: 12px; background: var(--white); border: 1px dashed var(--line);
    color: var(--text-soft);
}
.results-empty button { margin-top: 0.75rem; }
#showMoreBtn { margin: 1.5rem auto 0; display: flex; }
#showMoreBtn[hidden] { display: none; }

.btn-ghost {
    background: var(--white); color: var(--charcoal); border: 1px solid var(--line); font-family: inherit;
}
.btn-ghost:hover { border-color: var(--burnt-orange); color: var(--burnt-orange); }
button.btn { font-family: inherit; }

/* Card actions added to every card */
.res-card .card-actions {
    display: flex; gap: 0.5rem; align-items: center; justify-content: space-between;
    margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line);
}
.card-actions .res-link { margin: 0; }
.card-icons { display: flex; gap: 0.35rem; }
.icon-btn {
    font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
    background: transparent; color: var(--text-soft);
    border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem;
    transition: var(--transition);
}
.icon-btn:hover { color: var(--burnt-orange); border-color: var(--burnt-orange); }
.icon-btn[aria-pressed="true"] { color: var(--burnt-orange); background: var(--burnt-orange-light); border-color: var(--burnt-orange); }
.res-card .res-tags-list { margin-bottom: 0; }

.where-badge { font-size: 0.72rem; font-weight: 600; color: var(--sage-green); }

/* Surprise */
#surprisePanel { max-width: 640px; }
.surprise-card .res-card { padding: 2rem; background: var(--white); box-shadow: var(--shadow-card); }
.surprise-card .res-card:hover { transform: none; }
.surprise-card .res-title { font-size: 1.6rem; }
.surprise-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.surprise-note { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.75rem; }
@media (prefers-reduced-motion: no-preference) {
    .surprise-card .res-card { animation: pop-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
    @keyframes pop-in { from { opacity: 0.4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* Crisis moved below */
#crisis { padding-block: 1rem 2rem; scroll-margin-top: 100px; }
.crisis-disclaimer { margin-top: 1rem; margin-bottom: 0; }

/* Toast */
.toast {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 300;
    background: var(--charcoal); color: var(--warm-ivory);
    padding: 0.7rem 1.1rem; border-radius: 10px; font-size: 0.9rem; max-width: calc(100% - 32px);
    box-shadow: var(--shadow-card);
}

:where(button, a):focus-visible { outline: 2px solid var(--burnt-orange); outline-offset: 2px; }

@media (max-width: 1100px) {
    .need-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .help-now-pill { margin-right: 0.5rem; font-size: 0.75rem; padding: 0.35rem 0.7rem; }
    .hero.hero-app { padding-top: 2rem; }
    .hero-app h1 { font-size: 2.1rem; }
    .pref-label { min-width: 100%; }
    .need-grid { grid-template-columns: repeat(2, 1fr); }
    .need-card { flex-direction: row; justify-content: flex-start; gap: 0.6rem; padding: 0.85rem; text-align: left; }
    .need-card .selector-icon { margin-bottom: 0; font-size: 1.25rem; }
    .container { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
    .library-section { padding: 1.5rem; }
}
@media (max-width: 420px) {
    .brand-subtitle { display: none; }
    .mode-btn { padding: 0.85rem 1rem; }
    .mode-title { font-size: 1.1rem; }
}

/* Collapsible preferences */
.prefs-details > summary {
    cursor: pointer; list-style: none; font-size: 0.85rem; font-weight: 600; color: var(--sage-green);
    margin-bottom: 0.6rem; display: none;
}
.prefs-details > summary::-webkit-details-marker { display: none; }
.prefs-details > summary::before { content: "＋ "; }
.prefs-details[open] > summary::before { content: "－ "; }
.prefs-summary { font-weight: 500; color: var(--text-soft); }
@media (max-width: 768px) {
    .prefs-details > summary { display: block; }
}

/* Art + imagination prompt card */
.prompt-card { background: var(--burnt-orange-light); border-color: var(--burnt-orange); }
.prompt-card:hover { transform: none; }
.prompt-text { font-family: 'Lora', serif; font-size: 1.2rem; line-height: 1.45; color: var(--charcoal); margin: 0.5rem 0 1rem; text-wrap: pretty; }
.surprise-card .prompt-text { font-size: 1.45rem; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.prompt-actions { flex-wrap: wrap; }
.prompt-streak { font-size: 0.8rem; color: var(--text-soft); margin-top: 0.6rem; }
.link-btn-strong { color: var(--burnt-orange); }
.surprise-card .prompt-card { background: var(--burnt-orange-light); }

/* Study spot photos */
.res-card .spot-photo {
    margin: -1.75rem -1.75rem 1.25rem; aspect-ratio: 16 / 9; max-width: none;
    border-radius: 12px 12px 0 0; overflow: hidden; background: var(--sage-light);
}
.spot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-photo-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
    color: var(--sage-green); border-bottom: 1px dashed var(--line);
}
.spot-photo-empty span { font-size: 1.75rem; opacity: 0.7; }
.spot-photo-empty small { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* Walking route stops */
.route-stops { margin: 0.25rem 0 0.75rem 1.1rem; font-size: 0.88rem; color: var(--text-soft); display: grid; gap: 0.15rem; }

/* Closest-match note */
.relaxed-note {
    font-size: 0.9rem; color: var(--charcoal); background: var(--sage-light);
    padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem;
}
.relaxed-note .link-btn { font-size: 0.88rem; }
.relaxed-note:empty, #relaxedNote:empty { display: none; }
@media (max-width: 768px) {
    .res-card .spot-photo { margin: -1.25rem -1.25rem 1rem; }
}
.icon-btn { white-space: nowrap; }

/* Container exercise */
html.ce-lock { overflow: hidden; }
.ce-overlay {
    position: fixed; inset: 0; z-index: 400; overflow-y: auto;
    background: var(--warm-ivory);
    padding: calc(1rem + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    display: flex; justify-content: center; align-items: flex-start;
}
.ce-panel { position: relative; width: 100%; max-width: 620px; padding-block: 3rem 2rem; outline: none; }
.ce-stop {
    position: absolute; top: 0; right: 0; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    background: var(--white); color: var(--charcoal); border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 1rem;
}
.ce-stop:hover { border-color: var(--burnt-orange); color: var(--burnt-orange); }
.ce-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--sage-green); margin-bottom: 0.75rem; }
.ce-panel h2 { font-size: 2rem; color: var(--charcoal); margin-bottom: 1rem; text-wrap: balance; outline: none; }
.ce-text { font-size: 1.1rem; line-height: 1.7; color: var(--charcoal); max-width: 60ch; }
.ce-step-text { font-family: 'Lora', serif; font-size: 1.35rem; line-height: 1.6; min-height: 7.5em; }
.ce-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin: 1.75rem 0 0.6rem; }
.ce-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.ce-option {
    display: flex; flex-direction: column; gap: 0.15rem; text-align: left; cursor: pointer; font: inherit;
    padding: 0.85rem 1rem; border-radius: 10px; background: var(--white); color: var(--charcoal); border: 1.5px solid var(--line);
}
.ce-option span { font-size: 0.8rem; color: var(--text-soft); }
.ce-option.active { border-color: var(--sage-green); background: var(--sage-light); }
.ce-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }
.ce-nav .btn { min-width: 7rem; }
.ce-nav-end .btn-primary { flex-basis: 100%; }
.ce-fine { font-size: 0.85rem; color: var(--text-soft); margin-top: 1.5rem; }
.ce-fine .link-btn { font-size: inherit; text-decoration: underline; }
.ce-dots { display: flex; gap: 0.3rem; margin-bottom: 1.25rem; }
.ce-dots span { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.ce-dots span.on { background: var(--sage-green); }
.ce-breath { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1rem; }
.ce-breath p { font-family: 'Lora', serif; font-size: 1.2rem; color: var(--sage-dark); }
.ce-circle {
    width: 160px; height: 160px; border-radius: 50%; max-width: 100%;
    background: radial-gradient(circle, var(--sage-light) 0%, var(--sage-green) 100%);
    transform: scale(1); transition: transform 4s ease-in-out;
}
.ce-circle.out { transform: scale(0.55); transition-duration: 6s; }
@media (prefers-reduced-motion: reduce) { .ce-circle { transition: none; } }
.tool-card { border-color: var(--sage-green); background: var(--sage-light); }
.tool-card:hover { transform: none; border-color: var(--sage-green); }
@media (max-width: 480px) {
    .ce-options { grid-template-columns: 1fr; }
    .ce-panel h2 { font-size: 1.65rem; }
    .ce-step-text { font-size: 1.2rem; }
}
.ce-overlay[hidden], [hidden] { display: none !important; }

/* Leisure art video list */
.video-list { margin: 0.25rem 0 1rem; font-size: 0.88rem; }
.video-list summary { cursor: pointer; font-weight: 600; color: var(--sage-green); }
.video-list summary:hover { color: var(--burnt-orange); }
.video-list ol { margin: 0.6rem 0 0 1.1rem; display: grid; gap: 0.6rem; }
.video-list a { color: var(--charcoal); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.video-list a:hover { color: var(--burnt-orange); }
.video-channel { color: var(--text-soft); }
.video-list small { display: block; color: var(--text-soft); font-size: 0.82rem; line-height: 1.4; margin-top: 0.1rem; }
a.icon-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Research-backed swaps: one featured idea, quiet list below */
.swap-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.swap-feature {
    grid-row: span 2; background: var(--white); border: 1px solid var(--line); border-radius: 16px;
    padding: 1.75rem; box-shadow: var(--shadow-subtle);
}
.swap-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--burnt-orange); margin-bottom: 0.5rem; }
.swap-title { display: flex; align-items: center; gap: 0.6rem; font-size: 1.6rem; color: var(--charcoal); line-height: 1.25; text-wrap: balance; outline: none; }
.swap-feature .swap-icon { font-size: 1.6rem; }
.swap-how { font-size: 1.05rem; line-height: 1.6; color: var(--charcoal); margin: 0.75rem 0 1.25rem; max-width: 52ch; }
.swap-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.swap-actions .btn { font-variant-numeric: tabular-nums; }
.swap-why { margin-top: 1.25rem; font-size: 0.88rem; color: var(--text-soft); }
.swap-why summary { cursor: pointer; font-weight: 600; color: var(--sage-green); display: inline-flex; align-items: center; gap: 0.5rem; list-style: none; }
.swap-why summary::-webkit-details-marker { display: none; }
.swap-why summary::before { content: "＋"; font-weight: 400; }
.swap-why[open] summary::before { content: "－"; }
.swap-why p { margin-top: 0.5rem; line-height: 1.55; }
.swap-why a { color: var(--sage-green); font-weight: 600; }

.swap-list { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 0.5rem; }
.swap-list-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-soft); padding: 0.6rem 0.75rem 0.35rem; }
.swap-row {
    width: 100%; display: flex; align-items: center; gap: 0.65rem; text-align: left; cursor: pointer;
    font: inherit; font-size: 0.92rem; color: var(--charcoal); background: none; border: none;
    padding: 0.65rem 0.75rem; border-radius: 10px; transition: background 0.15s;
}
.swap-row:hover { background: var(--burnt-orange-light); }
.swap-row + .swap-row { border-top: 1px solid var(--line); border-radius: 0; }
.swap-row:hover + .swap-row { border-top-color: transparent; }
.swap-icon { width: 1.6rem; text-align: center; flex: none; }
.swap-row-title { flex: 1; min-width: 0; font-weight: 500; }
.swap-row-time { font-size: 0.78rem; color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.swap-row::after { content: "›"; color: var(--text-soft); font-size: 1.1rem; }

.swap-settings { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 0.5rem; }
.swap-settings > summary {
    display: flex; align-items: center; gap: 0.65rem; cursor: pointer; list-style: none;
    padding: 0.65rem 0.75rem; font-size: 0.92rem; font-weight: 500; color: var(--charcoal);
}
.swap-settings > summary::-webkit-details-marker { display: none; }
.swap-settings > summary .swap-row-time { margin-left: auto; }
.swap-setting { padding: 0.75rem; border-top: 1px solid var(--line); }
.swap-setting h4 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--charcoal); }
.swap-setting > p { font-size: 0.88rem; line-height: 1.55; color: var(--charcoal); margin-top: 0.3rem; }
.swap-setting .swap-why { margin-top: 0.5rem; }

.evidence-badge { font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.evidence-strong { background: var(--sage-green); color: var(--warm-ivory); }
.evidence-good { background: var(--sage-light); color: var(--sage-dark); }
.evidence-early { background: var(--muted-blue-light); color: var(--muted-blue); }

@media (max-width: 768px) {
    .swap-panel { grid-template-columns: 1fr; }
    .swap-feature { grid-row: auto; padding: 1.35rem; }
    .swap-title { font-size: 1.35rem; }
    .swap-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
    .swap-feature { animation: pop-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
}
.grid-divider { grid-column: 1 / -1; font-size: 1.2rem; color: var(--charcoal); margin-top: 0.5rem; }

/* Header: keep the brand on one line on small phones and with larger text */
.nav-container { height: auto; min-height: 72px; gap: 0.75rem; padding-block: 0.5rem; }
.brand-logo { min-width: 0; flex: 0 1 auto; }
.brand-title, .brand-subtitle { white-space: nowrap; }
.help-now-pill { flex: none; }
.mobile-menu-toggle { flex: none; }
@media (max-width: 768px) {
    .nav-links { top: 100%; }
}
@media (max-width: 520px) {
    .brand-title { font-size: 1.15rem; }
    .brand-subtitle { display: none; }
    .help-now-pill { margin-right: 0; }
}
@media (max-width: 360px) {
    .brand-title { font-size: 1.05rem; }
    .help-now-pill { padding: 0.3rem 0.6rem; font-size: 0.72rem; }
}
@media (min-width: 769px) and (max-width: 1100px) {
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.85rem; }
    .brand-subtitle { display: none; }
    .help-now-pill { margin-right: 0.25rem; }
}

/* Cards never push the page wider than the screen */
.resource-grid > * { min-width: 0; }
.res-card { overflow-wrap: anywhere; }

/* Student tips, quotes, and safety notes on cards */
.card-tip { font-size: 0.85rem; line-height: 1.5; color: var(--charcoal); margin-top: 0.6rem; }
.card-tip strong { color: var(--sage-green); }
.student-quote {
    margin: 0.75rem 0 0; padding: 0.55rem 0.8rem; border-left: 3px solid var(--burnt-orange);
    background: var(--burnt-orange-light); border-radius: 0 8px 8px 0;
    font-family: 'Lora', serif; font-style: italic; font-size: 0.92rem; line-height: 1.45; color: var(--charcoal);
}
.student-quote cite { display: block; margin-top: 0.25rem; font-family: 'Inter', sans-serif; font-style: normal; font-size: 0.72rem; color: var(--text-soft); letter-spacing: 0.02em; }
.card-safety { font-size: 0.8rem; line-height: 1.45; color: var(--muted-blue); background: var(--muted-blue-light); padding: 0.45rem 0.7rem; border-radius: 8px; margin-top: 0.6rem; }
.card-safety::before { content: "Safety: "; font-weight: 600; }

/* Study spot map */
.spot-map-wrap { margin-bottom: 1.5rem; scroll-margin-top: 90px; }
.spot-map-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.spot-map-head h3 { font-size: 1.3rem; color: var(--charcoal); }
.spot-map-count { font-size: 0.85rem; color: var(--text-soft); }
.spot-map-head .btn { margin-left: auto; }
.spot-map-msg { font-size: 0.85rem; color: var(--muted-blue); background: var(--muted-blue-light); padding: 0.45rem 0.75rem; border-radius: 8px; margin-bottom: 0.6rem; }
.spot-map {
    width: 100%; aspect-ratio: 1.36; height: auto; max-height: 75vh; max-width: 100%; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--line); background: var(--warm-ivory); z-index: 0;
}
.spot-map-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; font-size: 0.78rem; color: var(--text-soft); margin-top: 0.6rem; }
.spot-map-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.spot-map-legend .spot-pin { width: 14px; height: 14px; border-width: 2px; }
.spot-map-hint { margin-left: auto; }
.spot-offmap { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.85rem; margin-top: 0.6rem; color: var(--text-soft); }
.spot-offmap a { color: var(--sage-green); font-weight: 600; text-decoration: none; }
.spot-offmap a:hover { text-decoration: underline; }

.spot-pin {
    display: inline-block; width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box;
    border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.35); margin: 2px;
}
.spot-pin-indoor { background: var(--burnt-orange); }
.spot-pin-outdoor { background: var(--sage-green); }
.spot-pin-approx { border-style: dashed; border-color: var(--charcoal); }
.leaflet-marker-icon:focus-visible .spot-pin, .leaflet-marker-icon:hover .spot-pin { transform: scale(1.15); }

.spot-map .leaflet-popup-content-wrapper { border-radius: 12px; background: var(--white); color: var(--charcoal); }
.spot-map .leaflet-popup-tip { background: var(--white); }
.spot-map .leaflet-popup-content { margin: 0.8rem 0.9rem; font-family: 'Inter', sans-serif; }
.spot-pop strong { font-family: 'Lora', serif; font-size: 1rem; display: block; margin-bottom: 0.35rem; }
.spot-pop p { margin: 0.3rem 0 !important; font-size: 0.8rem; line-height: 1.4; }
.spot-pop-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.spot-pop-chips span { font-size: 0.7rem; background: var(--sage-light); color: var(--sage-dark); padding: 0.1rem 0.45rem; border-radius: 999px; }
.spot-pop-tip { color: var(--text-soft); }
.spot-pop-approx { color: var(--muted-blue); font-style: italic; }
.spot-pop-actions { display: flex; gap: 0.5rem; margin-top: 0.55rem; flex-wrap: wrap; }
.spot-pop-actions a, .spot-pop-actions button {
    font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; text-decoration: none;
    padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--burnt-orange);
}
.spot-pop-actions a { background: var(--burnt-orange); color: #fff !important; }
.spot-pop-actions button { background: transparent; color: var(--burnt-orange); }
.bldg-tip { font-family: 'Inter', sans-serif; font-size: 0.75rem; }
.spot-map .leaflet-control-attribution { font-size: 0.65rem; background: rgba(255,255,255,0.8); }
.spot-map .leaflet-bar a { background: var(--white); color: var(--charcoal); border-color: var(--line); }

.map-jump {
    font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; margin-top: 0.6rem;
    background: none; border: 1px solid var(--line); color: var(--sage-green); border-radius: 999px; padding: 0.3rem 0.75rem;
}
.map-jump:hover { border-color: var(--sage-green); }
.map-link { margin-left: auto; font-size: 0.88rem; }
.card-flash { outline: 3px solid var(--burnt-orange); outline-offset: 2px; transition: outline-color 0.3s; }
@media (max-width: 768px) {
    .spot-map { max-height: none; aspect-ratio: 1.15; }
    .spot-map-hint { margin-left: 0; width: 100%; }
}

/* "More" on cards */
.card-more { margin-top: 0.6rem; font-size: 0.85rem; color: var(--text-soft); }
.card-more summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--sage-green); display: inline-flex; gap: 0.3rem; }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: "＋"; font-weight: 400; }
.card-more[open] summary::after { content: "－"; }
.card-more p, .card-more ol { margin-top: 0.4rem; line-height: 1.5; }

/* Price badge: top-right of every card */
.price {
    display: inline-flex; align-items: baseline; gap: 0.05rem; white-space: nowrap;
    font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
    padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--burnt-orange-light); color: var(--burnt-orange);
    font-variant-numeric: tabular-nums;
}
.price b { font-weight: 700; }
.price i { font-style: normal; font-weight: 700; opacity: 0.28; }
.price-word { font-size: 0.72rem; font-weight: 600; color: var(--sage-green); }
.price-dash { margin: 0 0.12rem; opacity: 0.5; font-weight: 500; }
.price-free { background: var(--sage-light); color: var(--sage-dark); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; }
.price-free small { font-weight: 500; opacity: 0.8; margin-left: 0.2rem; font-size: 0.68rem; }
.res-header-meta { align-items: center; gap: 0.5rem; }
.res-where-tag { background: var(--sage-light); color: var(--sage-dark); }
.price-key { font-size: 0.72rem; color: var(--text-soft); margin-left: 0.25rem; }

/* Feedback: one line, one button, at the very bottom */
.feedback-simple {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1rem;
    padding-block: 2rem 2.5rem; text-align: center;
}
.feedback-simple p { font-size: 1.05rem; color: var(--charcoal); font-weight: 500; }
.feedback-simple .btn { padding: 0.75rem 1.6rem; font-weight: 600; }
.feedback-simple small { flex-basis: 100%; font-size: 0.78rem; color: var(--text-soft); }
.nav-feedback { font-weight: 600 !important; }
.card-more { margin-bottom: 0.75rem; }

/* Location: privacy line, messages, closest spots */
.spot-map-privacy { font-size: 0.75rem; color: var(--text-soft); margin: -0.3rem 0 0.6rem; }
.spot-map-msg[data-tone="warn"] { color: var(--charcoal); background: var(--burnt-orange-light); }
.spot-nearby { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.7rem; }
.spot-nearby-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-soft); width: 100%; }
.spot-nearby-item {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; text-align: left; cursor: pointer;
    font: inherit; padding: 0.5rem 0.8rem; border-radius: 10px; background: var(--white); border: 1px solid var(--line); color: var(--charcoal);
    flex: 1 1 160px; min-width: 0;
}
.spot-nearby-item strong { font-size: 0.85rem; font-weight: 600; }
.spot-nearby-item span { font-size: 0.75rem; color: var(--sage-green); font-weight: 600; }
.spot-nearby-item:hover { border-color: var(--burnt-orange); }
#spotLocate:disabled { opacity: 0.6; cursor: wait; }
@media (max-width: 700px) {
    .spot-nearby { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.2rem; scrollbar-width: none; }
    .spot-nearby-label { display: none; }
    .spot-nearby-item { flex: 0 0 auto; max-width: 70%; }
}

/* Directions + Website buttons */
.card-actions { flex-wrap: wrap; row-gap: 0.6rem; }
.place-actions { display: inline-flex; gap: 0.45rem; flex-wrap: wrap; }
.btn-dir, .btn-site, .pop-dir {
    display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; cursor: pointer; white-space: nowrap;
    font: inherit; font-size: 0.82rem; font-weight: 600; padding: 0.42rem 0.9rem; border-radius: 999px; transition: var(--transition);
}
.btn-dir, .pop-dir { background: var(--burnt-orange); color: #fff !important; border: 1px solid var(--burnt-orange); }
.btn-dir::before, .pop-dir::before { content: "➤"; font-size: 0.7rem; }
.btn-dir:hover { filter: brightness(0.92); }
.btn-site { background: transparent; color: var(--burnt-orange); border: 1px solid var(--burnt-orange); }
.btn-site::after { content: "↗"; font-size: 0.75rem; }
.btn-site:hover { background: var(--burnt-orange-light); }
.spot-pop-actions .pop-dir { padding: 0.35rem 0.75rem; font-size: 0.78rem; }

/* Apple / Google chooser */
.dir-sheet { position: fixed; inset: 0; z-index: 500; display: flex; align-items: flex-end; justify-content: center; }
.dir-sheet[hidden] { display: none !important; }
.dir-sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 24, 22, 0.45); }
.dir-sheet-panel {
    position: relative; width: 100%; max-width: 420px; background: var(--white); color: var(--charcoal);
    border-radius: 18px 18px 0 0; padding: 1.25rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0,0,0,0.18); display: grid; gap: 0.7rem;
}
@media (min-width: 600px) { .dir-sheet { align-items: center; } .dir-sheet-panel { border-radius: 18px; } }
.dir-sheet-title { font-family: 'Lora', serif; font-size: 1.15rem; font-weight: 600; }
.dir-sheet-place { font-size: 0.85rem; color: var(--text-soft); margin-top: -0.5rem; }
.dir-sheet-choices { display: grid; gap: 0.5rem; }
.dir-choice {
    display: block; text-align: center; text-decoration: none; font-weight: 600; font-size: 0.95rem;
    padding: 0.8rem; border-radius: 12px; border: 1px solid var(--line); color: var(--charcoal); background: var(--warm-ivory);
}
.dir-choice:first-child { background: var(--burnt-orange); border-color: var(--burnt-orange); color: #fff; }
.dir-sheet-remember { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-soft); }
.dir-sheet-cancel { font: inherit; font-size: 0.9rem; background: none; border: none; color: var(--text-soft); cursor: pointer; padding: 0.3rem; }

/* Three good things journal */
.gt-journal, .gt-done { display: grid; gap: 0.8rem; }
.gt-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gt-chip {
    font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer;
    padding: 0.38rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--warm-ivory); color: var(--charcoal);
    transition: var(--transition);
}
.gt-chip:hover { border-color: var(--sage-green); }
.gt-chip.active { background: var(--sage-green); border-color: var(--sage-green); color: var(--warm-ivory); }
.gt-list { list-style: none; counter-reset: gt; display: grid; gap: 0.5rem; padding: 0; }
.gt-list li { counter-increment: gt; display: flex; align-items: center; gap: 0.5rem; }
.gt-list li::before { content: counter(gt); flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
    font-size: 0.8rem; font-weight: 700; color: var(--burnt-orange); background: var(--burnt-orange-light); }
.gt-input {
    flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem; border-radius: 10px;
    border: 1px solid var(--line); background: var(--warm-ivory); color: var(--charcoal);
}
.gt-input:focus { outline: 2px solid var(--burnt-orange); outline-offset: 1px; border-color: transparent; }
.gt-mic {
    flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer; font-size: 1.05rem;
    border: 1px solid var(--line); background: var(--white); color: var(--charcoal);
}
.gt-mic:hover { border-color: var(--burnt-orange); }
.gt-mic.on { background: var(--burnt-orange); border-color: var(--burnt-orange); color: #fff; animation: gt-pulse 1.2s ease-in-out infinite; }
@keyframes gt-pulse { 50% { box-shadow: 0 0 0 6px var(--burnt-orange-light); } }
@media (prefers-reduced-motion: reduce) { .gt-mic.on { animation: none; } }
.gt-msg { font-size: 0.85rem; color: var(--charcoal); background: var(--burnt-orange-light); padding: 0.45rem 0.7rem; border-radius: 8px; }
.gt-note { font-size: 0.75rem; color: var(--text-soft); }
.gt-done-title { font-family: 'Lora', serif; font-size: 1.15rem; font-weight: 600; color: var(--sage-dark); }
.gt-done-list { padding-left: 1.2rem; display: grid; gap: 0.25rem; color: var(--charcoal); }

.swap-panel > * { min-width: 0; }
.gt-chips, .gt-list, .gt-journal { min-width: 0; }
.gt-list { margin: 0; padding: 0; width: 100%; }
.gt-list li { width: 100%; min-width: 0; }

/* One-tap crisis buttons */
.crisis-actions { display: inline-flex; flex-wrap: wrap; gap: 0.45rem; }
.btn-call, .btn-text {
    display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; white-space: nowrap;
    font: inherit; font-size: 0.85rem; font-weight: 700; padding: 0.5rem 1rem; border-radius: 999px; min-height: 2.5rem;
}
.btn-call { background: var(--soft-terracotta); color: #fff !important; border: 1px solid var(--soft-terracotta); }
.btn-call::before { content: "📞"; font-size: 0.85rem; }
.btn-text { background: var(--white); color: var(--soft-terracotta) !important; border: 1.5px solid var(--soft-terracotta); }
.btn-text::before { content: "💬"; font-size: 0.85rem; }
.crisis-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.crisis-buttons .crisis-number { flex: 1 1 8rem; text-align: center; }
.dir-choice small { display: block; font-weight: 500; font-size: 0.75rem; opacity: 0.8; margin-top: 0.1rem; }
.btn-dir[data-dir-route]::before { content: "🚶"; font-size: 0.85rem; }
.btn-dir.btn-app::before { content: "📲"; font-size: 0.8rem; }
.btn-site.btn-app::after { content: "↗"; }
.results-empty { display: grid; gap: 0.6rem; justify-items: start; }
.results-empty p { margin: 0; color: var(--charcoal); }
.empty-try { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-soft) !important; }
.empty-alts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.results-empty .btn { margin-top: 0; }

/* Breathing step: counts, holds, pattern choice */
.ce-patterns { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.ce-pattern {
    font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.35rem 0.8rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--white); color: var(--charcoal);
}
.ce-pattern.active { background: var(--sage-green); border-color: var(--sage-green); color: var(--warm-ivory); }
.ce-circle-wrap { position: relative; width: 180px; height: 180px; max-width: 100%; display: grid; place-items: center; margin: 0.5rem auto 0; }
.ce-circle-wrap .ce-circle { position: absolute; inset: 0; margin: auto; width: 180px; height: 180px; transition-property: transform; transition-timing-function: ease-in-out; }
.ce-circle-wrap .ce-circle.out { transform: scale(0.5); }
.ce-circle[data-phase="hold"], .ce-circle[data-phase="rest"] { box-shadow: 0 0 0 6px var(--sage-light); }
.ce-count { position: relative; font-family: 'Lora', serif; font-size: 2.6rem; font-weight: 600; color: var(--warm-ivory); text-shadow: 0 1px 6px rgba(0,0,0,0.18); font-variant-numeric: tabular-nums; }
.ce-phase { font-family: 'Lora', serif; font-size: 1.35rem !important; color: var(--sage-dark); text-align: center; min-height: 1.6em; }
.ce-rounds { font-size: 0.8rem !important; color: var(--text-soft) !important; text-align: center; font-family: 'Inter', sans-serif !important; }
.ce-breath-note { font-size: 0.8rem !important; color: var(--text-soft) !important; text-align: center; max-width: 34ch; margin-inline: auto; font-family: 'Inter', sans-serif !important; }
.ce-panel:has(.ce-breath) .ce-step-text { min-height: 0; margin-bottom: 0.25rem; }

/* Third button: Calm me (layout: two on top, one wide below) */
.mode-switch.layout-two-one { grid-template-columns: 1fr 1fr; }
.mode-switch.layout-two-one .mode-calm { grid-column: 1 / -1; }
.mode-btn.mode-calm.active { background: var(--sage-green); border-color: var(--sage-green); color: #fff; }
/* Alternative layout: three in a row (names only) */
.mode-switch.layout-three { grid-template-columns: 1fr 1fr 1fr; max-width: 640px; }
.mode-switch.layout-three .mode-sub { display: none; }
.mode-switch.layout-three .mode-btn { align-items: center; text-align: center; padding: 0.85rem 0.5rem; }

#calmPanel { max-width: 640px; }
.calm-q { font-size: 1.5rem; color: var(--charcoal); margin-bottom: 0.9rem; }
.calm-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.calm-choice {
    display: flex; align-items: center; gap: 0.75rem; text-align: left; cursor: pointer; font: inherit; min-width: 0;
    padding: 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); color: var(--charcoal);
    transition: var(--transition);
}
.calm-choice:hover, .calm-choice.active { border-color: var(--sage-green); background: var(--sage-light); }
.calm-ic { font-size: 1.6rem; flex: none; }
.calm-text { display: flex; flex-direction: column; min-width: 0; }
.calm-text strong { font-family: 'Lora', serif; font-size: 1.1rem; font-weight: 600; }
.calm-text small { font-size: 0.8rem; color: var(--text-soft); }
.calm-time { margin-left: auto; flex: none; font-size: 0.72rem; font-weight: 700; color: var(--sage-dark); background: var(--sage-light); padding: 0.15rem 0.55rem; border-radius: 999px; }
.calm-choice.active .calm-time { background: var(--white); }
.calm-prompt { margin-top: 1rem; }
.calm-prompt .prompt-card { padding: 1.5rem; }
.calm-note { font-size: 0.82rem; color: var(--text-soft); margin-top: 1rem; }
.calm-note .link-btn { font-size: inherit; text-decoration: underline; }
@media (max-width: 560px) { .calm-choices { grid-template-columns: 1fr; } }
@media (max-width: 360px) {
    .mode-switch.layout-three { gap: 0.4rem; }
    .mode-switch.layout-three .mode-btn { padding: 0.75rem 0.3rem; }
    .mode-switch.layout-three .mode-title { font-size: 0.95rem; white-space: nowrap; }
}

/* About page */
body.show-about main > section:not(#about) { display: none; }
.about-page { padding-block: 2.5rem 4rem; }
.about-wrap { max-width: 720px; }
.about-back { display: inline-block; font-size: 0.88rem; font-weight: 600; color: var(--sage-green); text-decoration: none; margin-bottom: 1.5rem; }
.about-back:hover { text-decoration: underline; }
.about-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--burnt-orange); margin-bottom: 0.6rem; }
.about-page h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.2; color: var(--charcoal); text-wrap: balance; margin-bottom: 1.75rem; }
.about-founder { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 14px; background: var(--white); border: 1px solid var(--line); margin-bottom: 2rem; }
.about-photo { flex: none; width: 76px; height: 76px; border-radius: 50%; background: var(--sage-light); display: grid; place-items: center; border: 2px dashed var(--sage-green); }
.about-photo span { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sage-green); }
.about-name { font-family: 'Lora', serif; font-size: 1.2rem; font-weight: 600; color: var(--charcoal); }
.about-role { font-size: 0.85rem; color: var(--text-soft); line-height: 1.45; margin-top: 0.15rem; }
.about-body { display: grid; gap: 1rem; }
.about-body p { font-size: 1.05rem; line-height: 1.75; color: var(--charcoal); max-width: 62ch; }
.about-body h2 { font-size: 1.4rem; color: var(--charcoal); margin-top: 1rem; }
.about-body a:not(.btn) { color: var(--burnt-orange); font-weight: 600; }
.about-body .btn { justify-self: start; margin-top: 0.25rem; }
.fill-in { background: var(--burnt-orange-light); color: var(--burnt-orange); border-radius: 4px; padding: 0 0.2em; font-weight: 600; }
.calm-more { margin-top: 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 0.5rem; }
.calm-more-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-soft); padding: 0.6rem 0.75rem 0.35rem; }
.about-linkedin { display: inline-block; margin-top: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--sage-green); text-decoration: none; }
.about-linkedin:hover { text-decoration: underline; }
img.about-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--sage-light); flex: none; }

/* Calm scenes in the container exercise */
.calm-scene { margin: 0 0 1.25rem; border-radius: 18px; overflow: hidden; aspect-ratio: 2 / 1; max-width: 100%; max-height: 220px; width: 100%;
    box-shadow: 0 6px 24px rgba(74, 107, 93, 0.12); }
.calm-scene svg { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
    .cs-wave { animation: cs-drift 14s ease-in-out infinite alternate; }
    .cs-w2 { animation-duration: 18s; }
    .cs-w3 { animation-duration: 22s; }
    .cs-cloud { animation: cs-cloud 60s linear infinite; }
    .cs-ripple { transform-box: fill-box; transform-origin: center; animation: cs-ripple 7.5s ease-out infinite; }
    .cs-sun { animation: cs-glow 8s ease-in-out infinite alternate; }
    .cs-foam { animation: cs-foam 6s ease-in-out infinite alternate; }
}
@keyframes cs-drift { to { transform: translateX(-24px); } }
@keyframes cs-cloud { from { transform: translateX(-30px); } to { transform: translateX(60px); } }
@keyframes cs-ripple { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(5); opacity: 0; } }
@keyframes cs-glow { to { opacity: 0.75; } }
@keyframes cs-foam { to { opacity: 0.35; } }
/* In dark mode, soften the bright scene a little */
@media (prefers-color-scheme: dark) { .calm-scene { filter: brightness(0.92); } }

/* Read aloud */
.ce-listen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: -0.4rem 0 0.9rem; }
.ce-listen-btn {
    font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 0.4rem 0.95rem; border-radius: 999px;
    border: 1.5px solid var(--sage-green); background: var(--white); color: var(--sage-green);
}
.ce-listen-btn.on { background: var(--sage-green); color: var(--warm-ivory); }
.ce-autoread { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-soft); cursor: pointer; }
.ce-autoread input { width: 1rem; height: 1rem; accent-color: var(--sage-green); }

/* Calm me: three choices */
.calm-choices { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .calm-choices { grid-template-columns: 1fr; } }
.calm-choice .calm-text small { line-height: 1.3; }

/* Rant */
.calm-rant { margin-top: 1rem; }
.rant { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; display: grid; gap: 0.8rem; }
.rant-modes { display: inline-flex; gap: 0.35rem; background: var(--warm-ivory); border-radius: 999px; padding: 0.25rem; justify-self: start; }
.rant-mode { font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; border-radius: 999px; padding: 0.4rem 0.9rem; background: transparent; color: var(--text-soft); }
.rant-mode.active { background: var(--sage-green); color: var(--warm-ivory); }
.rant-text {
    width: 100%; min-height: 9rem; resize: vertical; font: inherit; font-size: 1rem; line-height: 1.6;
    padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--warm-ivory); color: var(--charcoal);
}
.rant-text:focus { outline: 2px solid var(--sage-green); outline-offset: 1px; border-color: transparent; }
.rant-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rant-mic.on { background: var(--burnt-orange); border-color: var(--burnt-orange); color: #fff; }
.rant-note { font-size: 0.78rem; color: var(--text-soft); line-height: 1.5; }
.rant-msg { font-size: 0.85rem; background: var(--burnt-orange-light); color: var(--charcoal); padding: 0.45rem 0.7rem; border-radius: 8px; }
.rant-aloud { display: grid; gap: 0.7rem; justify-items: center; text-align: center; padding: 0.5rem 0; }
.rant-aloud-text { font-family: 'Lora', serif; font-size: 1.15rem; line-height: 1.5; color: var(--charcoal); max-width: 34ch; }
.rant-clock { font-family: 'Lora', serif; font-size: 2.4rem; color: var(--sage-dark); font-variant-numeric: tabular-nums; }
.rant-float { min-height: 9rem; display: flex; flex-wrap: wrap; gap: 0.35rem; align-content: flex-start; padding: 0.5rem; font-size: 1rem; color: var(--charcoal); }
.rant-float span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
    .rant-float span { animation: rant-drift 1.6s ease-in var(--d) forwards; }
}
@media (prefers-reduced-motion: reduce) { .rant-float span { opacity: 0; transition: opacity 0.3s; } }
@keyframes rant-drift { to { transform: translate(var(--x), -90px); opacity: 0; filter: blur(3px); } }
.rant-done { display: grid; gap: 0.6rem; text-align: center; justify-items: center; padding: 1rem 0; }
.rant-done-title { font-family: 'Lora', serif; font-size: 1.5rem; color: var(--sage-dark); }
.rant-next { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; }
.rant-checkin { border-radius: 12px; background: var(--terracotta-light); border: 1px solid var(--soft-terracotta); padding: 0.9rem 1rem; display: grid; gap: 0.55rem; }
.rant-checkin-title { font-family: 'Lora', serif; font-size: 1.1rem; font-weight: 600; color: var(--charcoal); }
.rant-checkin p { font-size: 0.9rem; color: var(--charcoal); line-height: 1.5; }
.rant-checkin-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.rant-checkin .link-btn { justify-self: start; font-size: 0.85rem; text-decoration: underline; color: var(--text-soft); }

/* Rant: how it disappears */
.rant-styles { display: grid; grid-template-columns: repeat(4, auto); gap: 0.4rem; justify-content: start; }
@media (max-width: 480px) { .rant-styles { grid-template-columns: 1fr 1fr; } }
.rant-style {
    font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 0.42rem 0.8rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--warm-ivory); color: var(--charcoal); white-space: nowrap;
}
.rant-style.active { border-color: var(--charcoal); background: var(--charcoal); color: var(--warm-ivory); }
.rant-go-burn { background: linear-gradient(135deg, #D9480F, #F08C00); border-color: transparent; }
.rant-go-boom { background: linear-gradient(135deg, #7048E8, #D6336C); border-color: transparent; }
.rant-go-wash { background: linear-gradient(135deg, #1971C2, #4DABF7); border-color: transparent; }
.rant-go-away { background: var(--sage-green); border-color: var(--sage-green); }

.rant-stage { position: relative; min-height: 200px; overflow: hidden; border-radius: 12px; }
.rant-stage .rant-float { position: relative; z-index: 2; }

/* Burn: glow, embers, smoke */
.rant-fire { position: absolute; inset: auto 0 0 0; height: 0; z-index: 1;
    background: radial-gradient(120% 100% at 50% 100%, rgba(255,146,43,0.55), rgba(250,82,82,0.25) 45%, transparent 75%); }
.rant-embers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.rant-embers i { position: absolute; bottom: -6px; left: var(--l); width: var(--s); height: var(--s); border-radius: 50%; background: #FFA94D; opacity: 0; box-shadow: 0 0 6px #FF922B; }

/* Blow up: flash, shockwave, scatter */
.rant-flash { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at 50% 50%, rgba(255,236,153,0.85), transparent 60%); opacity: 0; }
.rant-ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1.5px solid rgba(214,51,108,0.4); box-shadow: 0 0 12px rgba(214,51,108,0.25); z-index: 1; opacity: 0; }

/* Wash: a wave rises, words dissolve like ink, wave recedes */
.rant-water { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 3;
    background: linear-gradient(180deg, rgba(116,192,252,0.75), rgba(25,113,194,0.85)); }
.rant-water svg { position: absolute; left: 0; width: 200%; height: 26px; top: -24px; fill: rgba(116,192,252,0.75); }

@media (prefers-reduced-motion: no-preference) {
    .rant-burn span { animation: rant-burn 1.6s ease-in var(--d) forwards; }
    .rant-stage-burn .rant-fire { animation: rant-fire 2.6s ease-in-out forwards; }
    .rant-embers i { animation: rant-ember 1.8s ease-out var(--d) infinite; }

    .rant-boom span { animation: rant-boom 1.1s cubic-bezier(.2,.7,.3,1) var(--d) forwards; }
    .rant-flash { animation: rant-flash 0.6s ease-out forwards; }
    .rant-ring { animation: rant-ring 0.9s ease-out forwards; }

    .rant-wash span { animation: rant-wash 1.3s ease-in var(--d) forwards; }
    .rant-stage-wash .rant-water { animation: rant-tide 3s ease-in-out forwards; }
    .rant-water svg { animation: rant-wave 1.6s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
    .rant-burn span, .rant-boom span, .rant-wash span { opacity: 0; transition: opacity 0.3s; }
}
@keyframes rant-burn {
    0%   { color: var(--charcoal); }
    30%  { color: #E8590C; text-shadow: 0 0 8px rgba(255,146,43,0.9); }
    60%  { color: #FFA94D; text-shadow: 0 0 14px rgba(255,212,59,0.9); transform: translateY(-14px) scale(0.95); }
    100% { color: #868E96; text-shadow: none; transform: translate(var(--x), -70px) scale(0.6); opacity: 0; filter: blur(4px); }
}
@keyframes rant-fire { 0% { height: 0; } 40% { height: 85%; } 75% { height: 100%; opacity: 1; } 100% { height: 100%; opacity: 0; } }
@keyframes rant-ember { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--x), -180px); opacity: 0; } }
@keyframes rant-boom {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.25); color: #D6336C; }
    100% { transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.4); opacity: 0; filter: blur(2px); }
}
@keyframes rant-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rant-ring { 0% { opacity: 0.8; transform: scale(0.2); } 100% { opacity: 0; transform: scale(9); } }
@keyframes rant-wash {
    0%   { color: var(--charcoal); }
    40%  { color: #1971C2; filter: blur(1px); }
    100% { color: #A5D8FF; transform: translate(var(--x), 26px) scaleY(0.6); opacity: 0; filter: blur(6px); }
}
@keyframes rant-tide { 0% { height: 0; } 45% { height: 100%; } 70% { height: 100%; } 100% { height: 0; } }
@keyframes rant-wave { to { transform: translateX(-50%); } }

/* Rant time limit */
.rant-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.rant-limit-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-soft); margin-right: 0.25rem; }
.rant-limit-btn { font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--charcoal); }
.rant-limit-btn.active { background: var(--sage-light); border-color: var(--sage-green); color: var(--sage-dark); }
.rant-timer { display: flex; align-items: center; gap: 0.6rem; }
.rant-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--sage-light); overflow: hidden; }
.rant-bar i { display: block; height: 100%; width: 100%; background: var(--sage-green); border-radius: inherit; transition: width 1s linear, background 0.4s; }
.rant-timer.low .rant-bar i { background: var(--burnt-orange); }
#rantLeft { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }
.rant-text[readonly] { opacity: 0.7; }
.rant-timeup { border-radius: 12px; background: var(--sage-light); padding: 0.9rem 1rem; display: grid; gap: 0.55rem; }
.rant-timeup-title { font-family: 'Lora', serif; font-size: 1.15rem; font-weight: 600; color: var(--sage-dark); }
.rant-starters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.rant-starter { font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0.32rem 0.7rem; border-radius: 999px; border: 1px dashed var(--sage-green); background: transparent; color: var(--sage-dark); }
.rant-starter:hover { background: var(--sage-light); border-style: solid; }
.rant-aloud-try { font-size: 0.85rem; color: var(--text-soft); max-width: 38ch; }

/* Rant v2: effects play in place over the text box, and only the words move */
.rant-field { position: relative; }
.rant-field .rant-text { display: block; height: 100%; }
.rant-overlay { position: absolute; inset: 0; border-radius: 12px; overflow: visible; pointer-events: none; z-index: 2;
    border: 1px solid transparent; color: var(--charcoal); font-family: inherit; }
.rant-stage-wash { overflow: hidden; }
.rant-overlay .rant-float { min-height: 0; padding: 0; gap: 0 0.3em; position: relative; z-index: 2; }
.rant-overlay .rw, .rant-overlay .rl { display: inline-block; }
.rant-controls { display: grid; gap: 0.5rem; }
.rant-styles { grid-template-columns: repeat(4, auto); }
.rant-style { font-size: 0.88rem; padding: 0.55rem 0.95rem; color: #fff; border: none; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.rant-style.rant-go-away { background: var(--sage-green); }
.rant-style.rant-go-burn { background: linear-gradient(135deg, #D9480F, #F08C00); }
.rant-style.rant-go-boom { background: linear-gradient(135deg, #7048E8, #D6336C); }
.rant-style.rant-go-wash { background: linear-gradient(135deg, #1971C2, #4DABF7); }
.rant-style:hover { filter: brightness(1.06); transform: translateY(-1px); }
.rant-style:disabled { opacity: 0.5; cursor: default; transform: none; }
.ember { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #FFA94D; box-shadow: 0 0 6px #FF922B; opacity: 0; z-index: 3; }
.rant-field .rant-done { min-height: inherit; align-content: center; background: var(--warm-ivory); border-radius: 12px; border: 1px solid var(--line); padding: 1rem; }

@media (prefers-reduced-motion: no-preference) {
    .rant-overlay .rant-away .rw { animation: rant-drift 1.6s ease-in var(--d) forwards; }
    .rant-overlay .rant-burn .rw { animation: rant-burn 1.5s ease-in var(--d) forwards; }
    .rant-overlay .ember { animation: rant-ember-up 1.4s ease-out var(--d) forwards; }
    .rant-overlay .rant-boom .rw { animation: rant-boom 1.1s cubic-bezier(.2,.7,.3,1) var(--d) forwards; }
    .rant-overlay .rant-boom.letters .rw { animation: none; }
    .rant-overlay .rant-boom.letters .rl { animation: rant-boom 1.1s cubic-bezier(.2,.7,.3,1) var(--d) forwards; }
    .rant-overlay .rant-wash .rw { animation: rant-wash 1.3s ease-in var(--d) forwards; }
}
@media (prefers-reduced-motion: reduce) { .rant-overlay .rw { opacity: 0; transition: opacity 0.3s; } }
@keyframes rant-ember-up { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), -60px); } }
@media (max-width: 560px) {
    .rant-styles { grid-template-columns: 1fr 1fr; }
    .rant-style { justify-content: center; text-align: center; }
}
.rant-controls { min-width: 0; }

/* Rant: calm lake scene under the "It's gone" message (dawn in light mode, moonlight in dark) */
.rant-controls[hidden] { display: none !important; }
.rant-field-done { display: flex; flex-direction: column; gap: 0.75rem; }
.rant-field-done .rant-done { flex: none; min-height: 0; }
.rant-rest { flex: 1 1 auto; min-height: 120px; margin: 0; border-radius: 16px; overflow: hidden; position: relative;
    opacity: 0; animation: rs-in 1.2s ease 0.1s forwards;
    --rs-sky1: #D7E7F4; --rs-sky2: #F7EDE4; --rs-orb: #FFF3DF; --rs-glow: #FFE9C9; --rs-star: #FFFFFF; --rs-star-o: 0;
    --rs-hill1: #BFD5E6; --rs-hill2: #A8C6DC; --rs-water1: #B4D2E7; --rs-water2: #8DB4D2; --rs-shine: #FFF3DF; --rs-ripple: rgba(255,255,255,.75); }
.rant-rest svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rant-rest .rs-sky1 { stop-color: var(--rs-sky1); } .rant-rest .rs-sky2 { stop-color: var(--rs-sky2); }
.rant-rest .rs-water1 { stop-color: var(--rs-water1); } .rant-rest .rs-water2 { stop-color: var(--rs-water2); }
.rant-rest .rs-glow { stop-color: var(--rs-glow); }
.rant-rest .rs-orb { fill: var(--rs-orb); }
.rant-rest .rs-hill1 { fill: var(--rs-hill1); } .rant-rest .rs-hill2 { fill: var(--rs-hill2); }
.rant-rest .rs-shine rect { fill: var(--rs-shine); opacity: .7; }
.rant-rest .rs-star { fill: var(--rs-star); opacity: var(--rs-star-o); }
.rant-rest .rs-ripples ellipse { stroke: var(--rs-ripple); stroke-width: 1.2; }
@media (prefers-color-scheme: dark) {
    .rant-rest { --rs-sky1: #121C2E; --rs-sky2: #2A3A52; --rs-orb: #EEE7D2; --rs-glow: #8FA4C4; --rs-star: #F3EEDD; --rs-star-o: .85;
        --rs-hill1: #24344B; --rs-hill2: #1C2A3E; --rs-water1: #1E2E45; --rs-water2: #121C2C; --rs-shine: #E8E1CB; --rs-ripple: rgba(232,225,203,.4); }
}
@media (prefers-reduced-motion: no-preference) {
    .rant-rest .rs-ripples ellipse { transform-box: fill-box; transform-origin: center; animation: cs-ripple 6s ease-out infinite; }
    .rant-rest .rs-star { animation: rs-twinkle 4s ease-in-out infinite alternate; }
    .rant-rest .rs-shine { animation: rs-shimmer 5s ease-in-out infinite alternate; }
}
@media (prefers-reduced-motion: reduce) { .rant-rest { animation: none; opacity: 1; } }
@keyframes rs-in { to { opacity: 1; } }
@keyframes rs-twinkle { from { opacity: calc(var(--rs-star-o) * .35); } to { opacity: var(--rs-star-o); } }
@keyframes rs-shimmer { from { opacity: .55; } to { opacity: 1; } }
