/*
 * Stardust Room: the tool's own components, styled in the site's design language (24 Nov 2026, on the UltraCompress Pro
 * template). The first part is the shared block of Surprise Box's file, unchanged (tokens, page, hero, buttons, fields,
 * windows, toasts, information sections, text rules, cards, sliders and switches). Base: /libs/site-pages.css (tokens,
 * Inter and Space Grotesk, theme toggle, focus rings) and /libs/shared-nav.css (the site's header and footer). The second
 * part is the tool: the room (its colours belong to the night, not to the page theme), the writing box with its glowing
 * mirror, the weight stones, the room's settings, the overlays (after, help, breathing, your sky, bubbles), full screen
 * and the card with five tabs. Light is the default; dark applies when <html> has no data-theme. Written by hand: this
 * file is the source.
 */

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
}

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.block { display: block; }
.hint { color: var(--text-3); font-size: 0.8rem; font-weight: 400; line-height: 1.45; }
.err { color: var(--bad); font-size: 0.85rem; font-weight: 600; }
.err:empty { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9999px; font-family: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; padding: 12px 24px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.35); padding: 11px 23px; }
.btn-danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; transform: translateY(-2px); }
.btn-sm { font-size: 0.85rem; padding: 9px 16px; }
.btn-secondary.btn-sm, .btn-danger.btn-sm { padding: 8px 15px; }
.btn-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover { border-color: var(--brand); color: var(--link); background: var(--surface); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn:focus-visible, .link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shell-hint { margin-top: 14px; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.input, .select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--placeholder); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.select { width: auto; max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
.select option { color: #0a0a14; background: #fff; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip .ico { width: 15px; height: 15px; color: var(--link); }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Windows ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog--narrow { width: min(420px, calc(100vw - 16px)); }
.dialog--wide { width: min(680px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-head { padding: 18px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { margin: 0; font-size: 1.15rem; }
.dialog-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.2s ease, color 0.2s ease; }
.dialog-close:hover { border-color: var(--brand); color: var(--link); }
.dialog-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 210px); display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { padding: 14px 20px; border-top: 1px solid var(--surface-border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-message { margin: 0; color: var(--text); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.good { border-left-color: #4ade80; }
.toast.bad { border-left-color: #f87171; }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== Stardust Room components ===== */

/* ----- The site's text rules (p, ul, li, headings) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) ol, :where(.app-shell) li, :where(.app-shell) dl, :where(.app-shell) dd, :where(.dialog) p, :where(.dialog) ul, :where(.dialog) li, :where(.vr-focus) p { margin: 0; line-height: 1.5; }
:where(.app-shell) h2, :where(.app-shell) h3, :where(.app-shell) h4, :where(.vr-focus) h2 { margin: 0; line-height: 1.25; }
:root { --head: 81px; }
@media (max-width: 639.98px) { :root { --head: 65px; } }
.app-shell { scroll-margin-top: calc(var(--head) + 16px); }
.info-section > p { color: var(--text-2); max-width: 60rem; margin: 0 0 1rem; }

/* ----- Cards: the site's white cards, one layer ----- */
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sub-title { font-size: 1rem; color: var(--text-strong); margin-bottom: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }

/* sliders and switches (Frequency Studio's) */
.value { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 32px; margin: 0; padding: 0; background: transparent; cursor: pointer; --fill: 50%; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 12px; border-radius: 9999px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--brand) 0, var(--brand-2) var(--fill), var(--surface-2) var(--fill), var(--surface-2) 100%); }
.range::-moz-range-track { height: 12px; border-radius: 9999px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--brand) 0, var(--brand-2) var(--fill), var(--surface-2) var(--fill), var(--surface-2) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: #ffffff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #ffffff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.925rem; color: var(--text-strong); }
.switch-row .hint { font-weight: 400; display: block; margin-top: 2px; }
.switch-text { display: flex; flex-direction: column; min-width: 0; }
.switch { position: relative; width: 52px; height: 44px; flex: none; padding: 0; border: 0; background: transparent; cursor: pointer; }
.switch::before { content: ""; position: absolute; left: 3px; top: 8px; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); transition: background 0.2s ease; }
.switch::after { content: ""; position: absolute; top: 12px; left: 7px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
.switch[aria-checked="true"]::before { background: var(--gradient-brand); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 16px; }

/* ----- Layout: the room beside the card with five tabs; one above the other on narrow screens ----- */
.vr-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; --stage-h: clamp(600px, calc(100vh - var(--head) - 32px), 760px); }
@supports (height: 100svh) { .vr-layout { --stage-h: clamp(600px, calc(100svh - var(--head) - 32px), 760px); } }
@media (min-width: 1000px) { .vr-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); --stage-h: clamp(660px, calc(100vh - var(--head) - 48px), 820px); } }
.vr-slot { position: relative; min-width: 0; height: var(--stage-h); border-radius: 16px; background: #07061a; scroll-margin-top: calc(var(--head) + 12px); }
.vr-slot-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #ddd6fe; font-weight: 600; }
main [hidden], .dialog [hidden], .vr-focus [hidden] { display: none !important; }

/* ----- The room. Its colours belong to the night, not to the page theme. ----- */
.vr-stage { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; background: #07061a; color: #f4f1ff; isolation: isolate; --vr-size: 1.25rem; -webkit-tap-highlight-color: transparent; }
.vr-stage[data-size="s"] { --vr-size: 1.05rem; }
.vr-stage[data-size="l"] { --vr-size: 1.55rem; }
.vr-sky, .vr-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vr-sky { z-index: 0; }
.vr-fx { z-index: 6; pointer-events: none; }
.vr-aurora { position: absolute; left: -20%; right: -20%; top: -10%; height: 60%; z-index: 1; pointer-events: none; opacity: 0.55; filter: blur(42px); mix-blend-mode: screen; }
.vr-aurora::before, .vr-aurora::after { content: ""; position: absolute; left: 0; right: 0; height: 38%; border-radius: 50%; }
.vr-aurora::before { top: 18%; background: linear-gradient(90deg, rgba(45, 212, 191, 0), rgba(45, 212, 191, 0.45) 30%, rgba(129, 140, 248, 0.5) 60%, rgba(129, 140, 248, 0)); transform: rotate(-6deg); animation: aurora-a 26s ease-in-out infinite alternate; }
.vr-aurora::after { top: 42%; background: linear-gradient(90deg, rgba(236, 72, 153, 0), rgba(192, 132, 252, 0.4) 40%, rgba(56, 189, 248, 0.32) 75%, rgba(56, 189, 248, 0)); transform: rotate(5deg); animation: aurora-b 34s ease-in-out infinite alternate; }
@keyframes aurora-a { from { transform: translateX(-12%) rotate(-6deg) scaleY(0.8); opacity: 0.6; } to { transform: translateX(12%) rotate(-2deg) scaleY(1.2); opacity: 1; } }
@keyframes aurora-b { from { transform: translateX(10%) rotate(5deg); opacity: 0.9; } to { transform: translateX(-14%) rotate(1deg) scaleY(1.3); opacity: 0.5; } }

/* the bar at the top */
.vr-top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: opacity 0.6s ease; }
.vr-tools { display: flex; gap: 8px; }
.vr-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); color: #ede9fe; font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.vr-pill:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(196, 181, 253, 0.6); transform: translateY(-1px); }
.vr-pill-star { color: #fde68a; }
.vr-tool { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); color: #ede9fe; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.vr-tool:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(196, 181, 253, 0.6); transform: translateY(-1px); }
.vr-tool--sm { width: 36px; height: 36px; }
.vr-tool .ico-off { display: none; }
.vr-tool[aria-pressed="false"] .ico-on { display: none; }
.vr-tool[aria-pressed="false"] .ico-off { display: inline; }
.vr-stage button:focus-visible, .vr-stage a:focus-visible, .vr-text:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }

/* the writing room */
.vr-room { position: absolute; inset: 72px 24px 18px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity 0.5s ease, transform 0.5s ease; }
.vr-ask { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 46rem; transition: opacity 0.6s ease; }
.vr-prompt { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 500; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); line-height: 1.4; color: #ddd6fe; text-align: center; text-wrap: balance; animation: rise-in 0.8s ease both; }
.vr-again { width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #a5b4fc; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color 0.2s ease, transform 0.4s ease, background 0.2s ease; }
.vr-again:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); transform: rotate(-60deg); }
.vr-write { position: relative; width: min(100%, 800px); flex: 1 1 auto; min-height: 150px; max-height: 340px; }
.vr-text, .vr-mirror, .vr-placeholder { position: absolute; inset: 0; margin: 0; padding: 18px 20px; border: 0; border-radius: 16px; font-family: 'Inter', sans-serif; font-weight: 300; font-size: var(--vr-size); line-height: 1.6; letter-spacing: 0.01em; text-align: left; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.vr-mirror { overflow-y: hidden; color: #f4f1ff; text-shadow: 0 0 14px rgba(196, 181, 253, 0.6), 0 0 2px rgba(255, 255, 255, 0.45); pointer-events: none; z-index: 1; }
.vr-mirror .w { transition: opacity 1.1s ease, filter 1.1s ease, transform 1.1s ease, color 0.6s ease; display: inline; }
.vr-mirror .w.is-new { animation: word-in 0.9s ease-out; }
@keyframes word-in { from { text-shadow: 0 0 22px rgba(255, 255, 255, 0.95), 0 0 6px rgba(253, 230, 138, 0.9); color: #fffbeb; } }
.vr-mirror .w.is-gone { opacity: 0; filter: blur(5px); color: #c4b5fd; }
.vr-placeholder { overflow: hidden; color: rgba(221, 214, 254, 0.5); pointer-events: none; z-index: 1; transition: opacity 0.3s ease; }
.vr-text { z-index: 2; resize: none; outline: none; background: rgba(255, 255, 255, 0.035); color: transparent; -webkit-text-fill-color: transparent; caret-color: #f5d0fe; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); transition: box-shadow 0.3s ease, background 0.3s ease; }
.vr-text:focus { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.5), 0 0 0 4px rgba(139, 92, 246, 0.14); }
.vr-text::selection { background: rgba(196, 181, 253, 0.35); color: transparent; -webkit-text-fill-color: transparent; }
.vr-text:focus-visible { outline: none; }
.vr-bar { width: min(100%, 800px); display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.vr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.vr-weigh { display: flex; align-items: center; gap: 4px; }
.vr-weigh-label { font-size: 0.85rem; font-weight: 600; color: #c7d2fe; margin-right: 6px; }
.vr-stone { position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.2s ease, background 0.2s ease; }
.vr-stone span { display: block; width: var(--d); height: calc(var(--d) * 0.82); border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%; background: radial-gradient(circle at 35% 30%, #c7c3dd, #6b6688 70%); box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.vr-stone:hover { background: rgba(255, 255, 255, 0.08); }
.vr-stone:hover span { transform: translateY(-2px); }
.vr-stone[aria-checked="true"] { background: rgba(196, 181, 253, 0.18); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.7); }
.vr-stone[aria-checked="true"] span { background: radial-gradient(circle at 35% 30%, #fef3c7, #c4b5fd 75%); box-shadow: 0 0 12px rgba(196, 181, 253, 0.8); }
.vr-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.07); color: #ede9fe; font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.vr-chip:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(196, 181, 253, 0.6); transform: translateY(-1px); }
.vr-chip .ico { width: 15px; height: 15px; opacity: 0.8; }
.vr-main { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 13px 28px; border: 0; border-radius: 9999px; background: var(--gradient-brand); color: #ffffff; font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: 0.01em; cursor: pointer; box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset; transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease; }
.vr-main:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(139, 92, 246, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2) inset; }
.vr-main:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.vr-main:not(:disabled) .ico { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.2) rotate(18deg); filter: drop-shadow(0 0 6px #fde68a); } }
.vr-main--sm { min-height: 44px; padding: 11px 22px; font-size: 0.95rem; }
.vr-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); color: #ede9fe; font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.vr-ghost:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(196, 181, 253, 0.65); transform: translateY(-2px); }
.vr-ghost--sm { min-height: 36px; padding: 6px 14px; font-size: 0.85rem; }
.vr-whisper { font-size: 0.8rem; color: rgba(221, 214, 254, 0.72); text-align: center; transition: opacity 0.6s ease; min-height: 1.2em; }
.vr-whisper kbd { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #ede9fe; }

/* while typing, everything but the words steps back; while letting go, the room steps aside */
.vr-stage.is-typing .vr-top, .vr-stage.is-typing .vr-whisper, .vr-stage.is-typing .vr-ask { opacity: 0.12; }
.vr-stage.is-typing .vr-weigh, .vr-stage.is-typing .vr-chip { opacity: 0.35; }
.vr-stage[data-view="release"] .vr-room, .vr-stage[data-view="after"] .vr-room, .vr-stage[data-view="help"] .vr-room, .vr-stage[data-view="breathe"] .vr-room, .vr-stage[data-view="sky"] .vr-room { opacity: 0; pointer-events: none; transform: translateY(8px); }
.vr-stage[data-view="release"] .vr-top, .vr-stage[data-view="breathe"] .vr-top { opacity: 0.25; }
.vr-stage[data-view="release"] { cursor: default; }
.vr-stage[data-way="bubbles"][data-view="release"] { cursor: pointer; }

/* the room's settings */
.vr-pick { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 9; max-height: calc(100% - 88px); overflow-y: auto; padding: 16px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(16, 12, 38, 0.95); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 14px; animation: rise-in 0.25s ease-out; }
.vr-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vr-pick-title { font-size: 1rem; color: #f5f3ff; }
.vr-pick-note { font-size: 0.85rem; color: #c7d2fe; min-height: 1.2em; }
.vr-pick-row { display: flex; flex-direction: column; gap: 8px; }
.vr-pick-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #a5b4fc; }
.vr-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.vr-seg button { min-height: 40px; padding: 8px 14px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: #ddd6fe; font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
.vr-seg button:hover { border-color: rgba(196, 181, 253, 0.7); }
.vr-seg button[aria-pressed="true"] { background: var(--gradient-brand); border-color: transparent; color: #ffffff; }

/* the nine ways, as tiles (in the card and in the room) */
.vr-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vr-way { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--chip-border); background: var(--surface); color: var(--text-strong); font-family: inherit; font-size: 0.8rem; font-weight: 600; text-align: center; line-height: 1.2; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.vr-way-emoji { font-size: 1.6rem; line-height: 1; transition: transform 0.3s ease; }
.vr-way:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--surface-hover-shadow); }
.vr-way:hover .vr-way-emoji { transform: scale(1.15); }
.vr-way[aria-pressed="true"] { border-color: transparent; background: var(--tint-brand); box-shadow: inset 0 0 0 2px var(--brand); color: var(--link); }
.vr-way:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vr-ways--room .vr-way { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: #ede9fe; }
.vr-ways--room .vr-way:hover { border-color: rgba(196, 181, 253, 0.7); box-shadow: none; }
.vr-ways--room .vr-way[aria-pressed="true"] { background: rgba(139, 92, 246, 0.28); box-shadow: inset 0 0 0 2px #c4b5fd; color: #ffffff; }
.vr-ways--room .vr-way:focus-visible { outline-color: #c4b5fd; }
.vr-way--keep .vr-way-emoji { filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6)); }

/* overlays in the room */
.vr-over { position: absolute; inset: 72px 16px 16px; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; gap: 18px; text-align: center; padding: 0 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.vr-after-line { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 500; font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); line-height: 1.35; max-width: 34rem; color: #ffffff; text-shadow: 0 0 24px rgba(196, 181, 253, 0.7); text-wrap: balance; animation: rise-in 1.2s ease both; }
.vr-after-result { font-size: 1.05rem; color: #fde68a; max-width: 32rem; animation: rise-in 0.8s ease both; }
.vr-after-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; animation: rise-in 1s 0.4s ease both; }
.vr-weigh--after { flex-wrap: wrap; justify-content: center; animation: rise-in 0.9s 0.3s ease both; }
.vr-weigh--after .vr-weigh-label { width: 100%; margin: 0 0 4px; font-size: 0.95rem; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
.vr-help-card { max-width: 520px; width: 100%; padding: 22px; border-radius: 18px; border: 1px solid rgba(253, 230, 138, 0.35); background: rgba(20, 15, 44, 0.94); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 12px; text-align: left; animation: rise-in 0.6s ease both; }
.vr-help-title { font-size: 1.25rem; color: #fef3c7; }
.vr-help-card p { color: #e0e7ff; font-size: 0.95rem; line-height: 1.55; }
.vr-help-links { display: flex; flex-wrap: wrap; gap: 8px; }
.vr-help-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 9999px; background: rgba(253, 230, 138, 0.14); border: 1px solid rgba(253, 230, 138, 0.45); color: #fef3c7; font-weight: 700; text-decoration: none; }
.vr-help-links a:hover { background: rgba(253, 230, 138, 0.26); }
.vr-help-card .vr-help-note { font-size: 0.85rem; color: #a5b4fc; }
.vr-help-card .vr-main { align-self: flex-start; }
.vr-orb { position: relative; width: 120px; height: 120px; border-radius: 50%; transform: scale(0.7); transition-property: transform; transition-timing-function: ease-in-out; }
.vr-orb::before { content: ""; position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, rgba(196, 181, 253, 0.45), rgba(196, 181, 253, 0) 65%); }
.vr-orb span { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffbeb, #fde68a 30%, #c4b5fd 70%, rgba(139, 92, 246, 0.9)); box-shadow: 0 0 40px rgba(253, 230, 138, 0.6), 0 0 90px rgba(139, 92, 246, 0.5); }
.vr-orb.is-in { transform: scale(1.35); }
.vr-breathe-word { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.6rem; font-weight: 500; color: #ffffff; }
.vr-breathe-left { color: #c7d2fe; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.vr-skyview { position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; pointer-events: none; }
.vr-skyview > * { pointer-events: auto; }
.vr-skyview-text { font-size: 1rem; color: #ede9fe; max-width: 36rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.vr-skyview-tip { font-size: 0.9rem; color: #fde68a; min-height: 1.3em; }
.vr-bubblebar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 9999px; background: rgba(16, 12, 38, 0.8); border: 1px solid rgba(255, 255, 255, 0.14); color: #dbeafe; font-size: 0.9rem; white-space: nowrap; animation: rise-in 0.5s ease both; }

/* ----- Full screen: the room in the browser's top layer ----- */
.vr-focus { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #07061a; color: #ffffff; overflow: hidden; }
.vr-focus::backdrop { background: #07061a; }
.vr-focus-slot { position: absolute; inset: 0; }
.vr-stage.is-focus { border-radius: 0; }
.vr-stage.is-focus .vr-write { max-height: 52vh; }

/* ----- The card with five tabs ----- */
.vr-panel { padding: 0; gap: 0; overflow: hidden; }
@media (min-width: 1000px) { .vr-panel { height: var(--stage-h); } }
.vr-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; border-bottom: 1px solid var(--surface-border); flex: none; }
.vr-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.vr-tabs button span { font-size: 1.15rem; line-height: 1; }
.vr-tabs button:hover { color: var(--link); }
.vr-tabs button[aria-selected="true"] { background: var(--tint-brand); color: var(--link); box-shadow: inset 0 0 0 1px var(--tint-brand-border); }
.vr-tabs button:focus-visible, .vr-pane:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.vr-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.vr-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vr-fadefield { margin-top: 8px; }

/* tonight's question */
.vr-tonight { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, #1e1b4b, #312e81 60%, #4c1d95); color: #ede9fe; }
.vr-tonight .sub-title { color: #c7d2fe; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.vr-tonight-text { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.1rem; font-weight: 500; line-height: 1.4; color: #ffffff; }
.vr-tonight .btn-secondary { background: rgba(255, 255, 255, 0.1); color: #ffffff; border-color: rgba(255, 255, 255, 0.28); }
.vr-tonight .btn-secondary:hover:not(:disabled) { color: #ffffff; border-color: #c4b5fd; }
.vr-feel button { padding: 7px 12px; }

/* soundscapes */
.vr-ambs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vr-amb { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--chip-border); background: var(--surface); color: var(--text-strong); font-family: inherit; font-size: 0.875rem; font-weight: 600; text-align: left; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.vr-amb span:first-child { font-size: 1.35rem; line-height: 1; }
.vr-amb:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--surface-hover-shadow); }
.vr-amb[aria-pressed="true"] { background: var(--tint-brand); box-shadow: inset 0 0 0 2px var(--brand); color: var(--link); border-color: transparent; }
.vr-amb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vr-amb.is-playing::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.4); opacity: 0.6; } }

/* your sky */
.vr-skyhead { display: flex; align-items: center; gap: 14px; }
.vr-skyhead-star { width: 52px; height: 52px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fde68a; background: linear-gradient(135deg, #1e1b4b, #4c1d95); box-shadow: 0 0 18px rgba(139, 92, 246, 0.35); }
.vr-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vr-stats div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.vr-stats dt { font-size: 0.75rem; color: var(--text-2); font-weight: 600; }
.vr-stats dd { margin: 2px 0 0; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.vr-chart { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.vr-chart-pair { flex: 1 1 0; min-width: 0; max-width: 28px; display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.vr-chart-pair i { flex: 1; border-radius: 4px 4px 2px 2px; }
.vr-chart-pair i:first-child { background: #a78bfa; }
.vr-chart-pair i:last-child { background: #f59e0b; }
.vr-chart-empty { margin: auto; color: var(--text-3); font-size: 0.85rem; text-align: center; }
.vr-badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vr-badge { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vr-badge-emoji { font-size: 1.4rem; line-height: 1; flex: none; filter: grayscale(1); opacity: 0.45; }
.vr-badge.is-earned { border-color: var(--tint-brand-border); background: var(--tint-brand); }
.vr-badge.is-earned .vr-badge-emoji { filter: none; opacity: 1; }
.vr-badge-name { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-strong); }
.vr-badge-how { display: block; font-size: 0.75rem; color: var(--text-2); line-height: 1.35; }

/* calm */
.vr-calmcard { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.vr-calmcard--help { border-color: rgba(217, 119, 6, 0.35); background: var(--warn-soft); }
.vr-kind { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.15rem; font-weight: 500; line-height: 1.4; color: var(--text-strong); }
.vr-keys { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-2); }

/* ----- Narrow screens ----- */
@media (max-width: 639px) {
    .vr-pane { padding: 16px; }
    .vr-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .vr-top { top: 10px; left: 10px; right: 64px; }   /* the right end stays free for the site's round theme button */
    .vr-stage.is-focus .vr-top { right: 10px; }
    .vr-room { inset: 64px 12px 12px; gap: 10px; }
    .vr-write { min-height: 140px; }
    .vr-text, .vr-mirror, .vr-placeholder { padding: 14px; }
    .vr-bar { justify-content: center; }
    .vr-weigh { width: 100%; justify-content: center; }
    .vr-actions { width: 100%; margin-left: 0; justify-content: center; }
    .vr-main { flex: 1 1 auto; }
    .vr-over { inset: 64px 10px 10px; }
    .vr-help-card { padding: 16px; gap: 10px; }
    .vr-pick { left: 8px; right: 8px; bottom: 8px; max-height: calc(100% - 70px); }
    .vr-bubblebar { white-space: normal; width: calc(100% - 24px); justify-content: space-between; }
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
    .vr-badges { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 399px) { .vr-ambs { grid-template-columns: minmax(0, 1fr); } .vr-stone { width: 34px; } }

/* still pictures: the device asks for reduced motion, or Calm is chosen */
.vr-stage.is-still .vr-aurora::before, .vr-stage.is-still .vr-aurora::after, .vr-stage.is-still .vr-main .ico { animation: none; }
.vr-stage.is-still .vr-orb { transition-property: opacity; }
.vr-stage.is-still .vr-orb.is-in { transform: scale(0.7); opacity: 1; }
.vr-stage.is-still .vr-orb:not(.is-in) { opacity: 0.55; }
.vr-stage.is-still .vr-mirror .w.is-new { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .toast, .seg button, .chip, .switch::before, .switch::after, .vr-tool, .vr-pill, .vr-chip, .vr-main, .vr-ghost, .vr-way, .vr-amb, .vr-tabs button, .vr-room, .vr-again, .dialog[open], .vr-pick, .vr-prompt, .vr-after-line, .vr-after-actions, .vr-after-result, .vr-help-card { transition: none; animation: none; }
}

/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The room's pictures are pictures. */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]) { min-height: 44px; }
    main input[type="range"] { height: 44px; }
    main .seg button { min-height: 44px; min-width: 44px; }
    main .vr-tool, main .vr-again { width: 44px; height: 44px; }
    main .vr-pill, .vr-focus .vr-pill { min-height: 44px; }
    main .vr-stone { width: 44px; height: 44px; }
    main .vr-seg button { min-height: 44px; }
    main :is(p, li, dt, .hint, .label, .select, .input, .seg button, .muted, .small, .switch-row, .link, .vr-tabs button, .vr-pill, .vr-chip, .vr-ghost, .vr-weigh-label, .vr-whisper, .vr-pick-note, .vr-pick-label, .vr-seg button, .vr-way, .vr-amb, .vr-stats dt, .vr-badge-name, .vr-badge-how, .vr-keys, .value, .vr-bubblebar) { font-size: 1rem; }
    main .btn { font-size: 1rem; }
    .vr-focus :is(.vr-pill, .vr-chip, .vr-ghost, .vr-weigh-label, .vr-whisper, .vr-pick-note, .vr-pick-label, .vr-seg button, .vr-way, .vr-bubblebar, .vr-skyview-text, .vr-skyview-tip, .vr-breathe-left, .vr-help-card p) { font-size: 1rem; }
    .vr-focus .vr-tool, .vr-focus .vr-again, .vr-focus .vr-stone { width: 44px; height: 44px; }
    .dialog :is(p, li, .label, .input, .btn, .hint) { font-size: 1rem; }
    .dialog .btn, .dialog .input { min-height: 44px; }
    /* display words stay large: the rule above reaches every p */
    main p.vr-prompt, .vr-focus p.vr-prompt { font-size: 1.1rem; }
    main p.vr-after-line, .vr-focus p.vr-after-line { font-size: 1.35rem; }
    main p.vr-breathe-word, .vr-focus p.vr-breathe-word { font-size: 1.5rem; }
    main p.vr-tonight-text { font-size: 1.1rem; }
    main p.vr-kind { font-size: 1.15rem; }
    main .vr-stats dd { font-size: 1.2rem; }
}
