:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ease-flow: cubic-bezier(0.19, 1, 0.22, 1);
  --page: #334c60;
  --ink: #f1f7fc;
  --muted: #dcedf8;
  --glass-face: #49647a;
  --glass-hover: #506c82;
  --glass-edge: rgb(205 232 250 / 20%);
  --glass-highlight: rgb(205 232 250 / 5%);
  --shadow: rgb(23 43 60 / 16%);
  --utility: #314b60;
  --utility-selected: #4b687e;
  --selected-face: #a9d7f6;
  --selected-ink: #203c51;
  --edge: rgb(25 49 69 / 8%);
  --water-dark-low: #2d4355;
  --water-dark-high: #4b687e;
  --water-light-low: #c4cfec;
  --water-light-high: #edf0f8;
  --water-openness: 0;
  --fallback-center: var(--water-dark-high);
  --fallback-edge: var(--water-dark-low);
  --dialog: #395367;
  background: var(--page);
  color: var(--ink);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #dbe1f2;
  --ink: #29334a;
  --muted: #455169;
  --glass-face: #e8ecf7;
  --glass-hover: #f3f5fb;
  --glass-edge: rgb(255 255 255 / 75%);
  --glass-highlight: rgb(255 255 255 / 20%);
  --shadow: rgb(47 60 101 / 15%);
  --utility: #d4ddef;
  --utility-selected: #f1f3fb;
  --selected-face: #4d618e;
  --selected-ink: #ffffff;
  --edge: rgb(97 106 152 / 5%);
  --fallback-center: var(--water-light-high);
  --fallback-edge: var(--water-light-low);
  --dialog: #e8ecf7;
}

/* Open twilight water: brighter reflections within the existing render budget. */
:root[data-theme="dark"]:is([data-view="welcome"], [data-view="choosing"]) {
  --page: #1b2743;
  --ink: #f8fafc;
  --muted: #d5e2f4;
  --glass-face: #2a3c5a;
  --glass-hover: #344b6b;
  --glass-edge: rgb(248 250 252 / 15%);
  --glass-highlight: rgb(248 250 252 / 5%);
  --shadow: rgb(7 13 26 / 28%);
  --utility: #263752;
  --utility-selected: #3a5274;
  --selected-face: #7dd3fc;
  --selected-ink: #0f172a;
  --edge: rgb(15 24 44 / 12%);
  --water-dark-low: #1b2743;
  --water-dark-high: #46658f;
  --water-openness: 1;
  --dialog: #263752;
  --organization-paper: #e2e8f0;
}
:root[data-theme="dark"]:is([data-view="welcome"], [data-view="choosing"]) .surface-light {
  background: radial-gradient(ellipse at 50% 43%, transparent 34%, var(--edge) 100%);
}
:root[data-theme="dark"]:is([data-view="welcome"], [data-view="choosing"]) .utility {
  box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 1px var(--glass-edge), 0 6px 18px -10px var(--shadow);
}

/* Three related, low-chroma palettes continue from each pill into its chat. */
:root[data-mode="validation"], .mode[data-mode="validation"] {
  --page: #403b46; --ink: #f8f1f6; --muted: #ead9e6;
  --glass-face: #625762; --glass-hover: #6b5e6c;
  --utility: #463e4b; --utility-selected: #625462;
  --selected-face: #dfcddc; --selected-ink: #3b313f; --dialog: #4c444f;
  --water-dark-low: #3a3540; --water-dark-high: #625763;
  --water-light-low: #d8ccd5; --water-light-high: #f2eaf0;
}
:root[data-mode="support"], .mode[data-mode="support"] {
  --page: #42413b; --ink: #faf5ed; --muted: #ece1d1;
  --glass-face: #625c51; --glass-hover: #6c6458;
  --utility: #46433b; --utility-selected: #625b4e;
  --selected-face: #e3d7c1; --selected-ink: #3e362b; --dialog: #4d4941;
  --water-dark-low: #3a3934; --water-dark-high: #645e53;
  --water-light-low: #dfd4c3; --water-light-high: #f6f0e6;
}
:root[data-mode="counseling"], .mode[data-mode="counseling"] {
  --page: #3d3c4c; --ink: #f5f2fc; --muted: #e2dcf4;
  --glass-face: #5a566c; --glass-hover: #645e77;
  --utility: #403c51; --utility-selected: #5c536d;
  --selected-face: #dbd3ec; --selected-ink: #393245; --dialog: #454257;
  --water-dark-low: #363543; --water-dark-high: #5e5b72;
  --water-light-low: #d2cede; --water-light-high: #f0edf8;
}
:root[data-theme="light"][data-mode="validation"], :root[data-theme="light"] .mode[data-mode="validation"] {
  --page: #e6dce3; --ink: #3a303b; --muted: #5d4e5b;
  --glass-face: #f0e9ee; --glass-hover: #f8f2f6;
  --utility: #e1d5de; --utility-selected: #faf3f8;
  --selected-face: #756170; --selected-ink: #ffffff; --dialog: #f0e9ee;
}
:root[data-theme="light"][data-mode="support"], :root[data-theme="light"] .mode[data-mode="support"] {
  --page: #eae1d2; --ink: #3e362a; --muted: #5b5143;
  --glass-face: #f3eee4; --glass-hover: #fbf7ee;
  --utility: #e4d9c6; --utility-selected: #fcf8ef;
  --selected-face: #75634b; --selected-ink: #ffffff; --dialog: #f3eee4;
}
:root[data-theme="light"][data-mode="counseling"], :root[data-theme="light"] .mode[data-mode="counseling"] {
  --page: #e2deed; --ink: #363345; --muted: #534f66;
  --glass-face: #eeecf6; --glass-hover: #f7f4fd;
  --utility: #ddd7e9; --utility-selected: #f7f3fd;
  --selected-face: #6b6384; --selected-ink: #ffffff; --dialog: #eeecf6;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; min-height: 100%; }
body { overflow-x: hidden; }
:root { --landing-min-height: 560px; --landing-footer-gap: max(30px, env(safe-area-inset-bottom)); --organization-paper: #f3f5fb; --organization-ink: #29334a; }
:root[data-view="choosing"] { --landing-min-height: 700px; }
::selection { color: var(--page); background: var(--ink); }
button { font: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
[hidden] { display: none !important; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 46% 38%, var(--fallback-center), var(--fallback-edge));
  transition: background 1s ease;
}
#water { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s ease; }
#water.is-active { opacity: 1; }
.surface-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 43%, transparent 22%, var(--edge) 100%);
  box-shadow: inset 0 0 130px 18px var(--edge);
  transition: box-shadow 1.3s ease, background 1.3s ease;
}

.scene { position: relative; min-height: 560px; height: 100svh; isolation: isolate; --welcome-shift: 0svh; --action-gap: clamp(24px, 4svh, 36px); }
.scene[data-phase="choosing"] { --welcome-shift: -12svh; }
.welcome-anchor {
  position: absolute;
  top: 42svh;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 48px);
  transform: translate3d(-50%, calc(-50% + var(--welcome-shift)), 0);
  transition: transform 1100ms var(--ease-flow);
}
.welcome {
  margin: 0;
  font-size: clamp(76px, 11vw, 164px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-align: center;
  transition: color 900ms ease;
}
.welcome-question {
  max-width: min(36ch, calc(100vw - 56px));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}
:lang(id) .welcome { font-size: clamp(62px, 8.5vw, 132px); }
.actions {
  position: absolute;
  top: calc(100% + var(--action-gap));
  left: 50%;
  display: grid;
  place-items: center;
  width: min(990px, calc(100vw - 96px));
  transform: translateX(-50%);
}
.glass {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 21px 28px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--glass-highlight), transparent 70%), var(--glass-face);
  box-shadow:
    inset 0 1px 1px var(--glass-edge),
    inset 0 -1px 2px rgb(0 0 0 / 10%),
    0 8px 16px -8px var(--shadow),
    0 20px 40px -16px var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 800ms ease, box-shadow 600ms ease, color 800ms ease, transform 600ms var(--ease-flow);
}
.glass span { position: relative; }
.glass:active { transform: translateY(1px) scale(0.985); }
.start { width: 202px; font-size: 21px; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 18px; width: 100%; }
.mode { width: 100%; min-height: 112px; padding: 18px 22px; font-size: clamp(17px, 1.4vw, 19px); }
.mode span { max-width: 25ch; text-wrap: balance; overflow-wrap: break-word; }
.mode-choice { min-width: 0; }
.mode-description { max-width: 34ch; margin: 14px auto 0; padding-inline: 6px; color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; text-wrap: pretty; }
.scene:is([data-phase="welcome"], [data-phase="choosing"]) { min-height: var(--landing-min-height); }
.welcome.has-service-name { max-width: min(1100px, calc(100vw - 64px)); font-size: clamp(76px, 10vw, 144px); }
.welcome-prefix { display: block; margin-bottom: 12px; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.welcome-wordmark { display: inline-flex; align-items: center; gap: 0.12em; }
.service-logo { display: inline-flex; flex: 0 0 auto; width: 0.9em; height: 0.9em; }
.service-logo img { display: block; width: 100%; height: 100%; }
:root[data-theme="light"] .service-logo-dark, :root:not([data-theme="light"]) .service-logo-light { display: none; }
:lang(id) .welcome.has-service-name { font-size: clamp(76px, 10vw, 144px); }
.organization-strip { position: absolute; z-index: 3; top: 24px; left: max(36px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 22px; padding: 8px 16px; border-radius: 12px; background: var(--organization-paper); color: var(--organization-ink); }
.organization-strip a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.3; }
.organization-strip a + a { padding-left: 22px; border-left: 1px solid color-mix(in srgb, var(--organization-ink) 20%, transparent); }
.organization-strip img { display: block; flex: 0 0 auto; object-fit: contain; }
.organization-strip a:focus-visible { outline: 2px solid var(--organization-ink); outline-offset: 4px; }
.landing-scroll { position: absolute; left: 50%; bottom: var(--landing-footer-gap); display: grid; place-items: center; min-height: 48px; padding: 10px 14px; border-radius: 12px; color: var(--ink); background: transparent; transform: translateX(-50%); font-size: 14px; line-height: 1.5; text-align: center; text-underline-offset: 5px; }
.landing-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.landing-scroll:active { background: var(--utility); }
.landing-info { position: relative; z-index: 1; padding: 88px 40px 64px; background: var(--dialog); color: var(--ink); border-top: 1px solid var(--glass-edge); }
.landing-info-inner { max-width: 1000px; margin-inline: auto; }
.landing-info h2, .landing-guides h2 { max-width: 22ch; margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -0.03em; text-wrap: balance; }
.landing-info h2:focus { outline: none; }
.project-intro { max-width: 60ch; margin: 22px 0 48px; font-size: 20px; line-height: 1.6; color: var(--muted); }
.project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 36px; border-top: 1px solid var(--glass-edge); border-top-color: color-mix(in srgb, var(--ink) 20%, var(--dialog)); }
.project-details h3 { margin: 0 0 20px; font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; }
.project-details p, .project-steps { color: var(--muted); font-size: 16px; line-height: 1.7; }
.project-details p { margin: 0 0 16px; max-width: 60ch; }
.project-steps { margin: 0; padding-left: 24px; }
.project-steps li { padding-left: 8px; margin-bottom: 14px; }
.project-steps li::marker { color: var(--ink); font-weight: 600; }
.project-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
#project-back-top { margin-top: 12px; }
.landing-guides { position: relative; z-index: 1; padding: 80px 40px 96px; background: var(--page); color: var(--ink); border-top: 1px solid var(--glass-edge); }
.guide-intro { margin: 20px 0 48px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.guide-lesson { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.guide-lesson + .guide-lesson { margin-top: 72px; }
.guide-media { min-width: 0; }
.guide-media video { display: block; width: 100%; aspect-ratio: 64 / 45; border-radius: 12px; background: var(--dialog); }
.guide-media video:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.guide-copy h3 { margin: 0 0 22px; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.guide-copy ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.guide-copy li { margin-bottom: 14px; padding-left: 6px; }
.guide-note, .guide-unavailable { margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
:root:is([data-view="welcome"], [data-view="choosing"]) .corner-controls { position: absolute; }
:root:is([data-view="welcome"], [data-view="choosing"]) .corner-footer { position: absolute; bottom: auto; top: calc(max(100svh, var(--landing-min-height)) - var(--landing-footer-gap) - 48px); }
:root[data-theme="dark"] .mode { color: var(--selected-ink); background: linear-gradient(180deg, var(--glass-highlight), transparent 70%), var(--selected-face); }
:root[data-theme="dark"] .start { color: var(--selected-ink); background: linear-gradient(180deg, var(--glass-highlight), transparent 70%), var(--selected-face); }
.mode[aria-pressed="true"] { background: var(--selected-face); color: var(--selected-ink); }
.return-conversation { min-height: 44px; margin-top: 20px; padding: 10px 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 14px; line-height: 1.5; cursor: pointer; text-decoration: underline; text-underline-offset: 5px; }
.return-conversation:active { opacity: 0.65; }

.scene:is([data-phase="disclosure"], [data-phase="return"]) { height: auto; min-height: 100svh; }
.flow-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(112px, calc(env(safe-area-inset-top) + 92px)) 24px max(112px, calc(env(safe-area-inset-bottom) + 92px));
}
.flow-content {
  width: min(600px, 100%);
  padding: 36px 40px;
  border-radius: 24px;
  color: var(--ink);
  background: var(--dialog);
  box-shadow: inset 0 1px 1px var(--glass-edge), 0 16px 48px -24px var(--shadow);
}
.flow-content h1 { margin: 0; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.flow-content h1:focus { outline: none; }
.flow-mode { margin: 10px 0 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.flow-intro { margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.disclosure-list { display: grid; gap: 20px; margin: 28px 0 24px; }
.disclosure-list dt { margin: 0 0 5px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.disclosure-list dd { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.disclosure-links { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 0; }
.text-link { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.5; font-weight: 500; text-align: left; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#disclosure .flow-actions { margin-top: 24px; }
.remember-conversation { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 20px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.remember-conversation input { flex-shrink: 0; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.remember-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
#return-form { margin-top: 28px; }
#return-form label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 500; }
#return-room-id { display: block; width: 100%; min-height: 56px; padding: 14px 16px; border: 1px solid var(--glass-edge); border-radius: 14px; background: var(--utility); color: var(--ink); font: inherit; font-size: 16px; letter-spacing: 0.02em; }
#return-room-id::placeholder { color: var(--muted); opacity: 1; }
#return-room-id:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
#return-room-id[aria-invalid="true"] { border-color: var(--ink); }
.return-error { min-height: 1.6em; margin: 10px 0 22px; color: var(--ink); font-size: 13px; line-height: 1.6; }
.saved-return { margin-top: 32px; }
.saved-return h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.saved-return .conversation-list { display: grid; align-content: start; gap: 12px; max-height: 360px; padding: 4px; }
.saved-return .conversation-row { min-height: 132px; padding: 18px 20px; border: 1px solid var(--glass-edge); border-color: color-mix(in srgb, var(--ink) 24%, var(--dialog)); border-radius: 14px; background: var(--utility); transition: background 160ms ease, border-color 160ms ease; }
.saved-return .conversation-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.saved-return .conversation-row:active { background: var(--utility-selected); border-color: var(--ink); }
@media (hover: hover) { .saved-return .conversation-row:hover { background: var(--glass-hover); border-color: var(--muted); } }
@media (prefers-reduced-motion: reduce) { .saved-return .conversation-row { transition: none; } }
.flow-actions { display: flex; align-items: center; gap: 16px; }
.continue-button { flex: 1; min-height: 56px; padding: 16px 24px; font-size: 16px; }
.back-button { min-width: 80px; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 999px; color: var(--ink); background: transparent; font-size: 15px; font-weight: 500; cursor: pointer; }
.back-button:active, .text-link:active { opacity: 0.7; }

/* The expanding surface carries no text, blur, or large shadow. Content keeps
   its final layout and fades above it; temporary layers are removed on settle. */
.flow-screen { position: relative; z-index: 1; }
.flow-content.is-morph-target { background: transparent; box-shadow: none; will-change: transform, opacity; }
.morph-surface { position: absolute; z-index: 0; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.morph-label { position: absolute; z-index: 3; display: grid; place-items: center; text-align: center; pointer-events: none; opacity: 0; will-change: opacity; }
.welcome-anchor[inert] { z-index: 2; pointer-events: none; }

.corner-controls {
  position: fixed;
  top: max(30px, env(safe-area-inset-top));
  right: max(36px, env(safe-area-inset-right));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}
.utility {
  border: 0;
  border-radius: 999px;
  background: var(--utility);
  color: var(--muted);
  box-shadow: inset 0 1px 1px var(--glass-edge), 0 6px 18px -10px var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 800ms ease, color 800ms ease;
}
.language-switch { display: flex; padding: 4px; gap: 2px; }
.language-switch button {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 400ms ease, color 400ms ease;
}
.language-switch button[aria-pressed="true"] { color: var(--ink); background: var(--utility-selected); }
.icon-button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; cursor: pointer; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon, .sound-on { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
#mute-toggle[aria-pressed="false"] .sound-muted { display: none; }
#mute-toggle[aria-pressed="false"] .sound-on { display: block; }

.corner-footer {
  position: fixed;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: max(36px, env(safe-area-inset-left));
  right: max(36px, env(safe-area-inset-right));
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.corner-footer > * { pointer-events: auto; }
/* Reading screens scroll as documents; utilities must not cover their content. */
:root:is([data-view="disclosure"], [data-view="return"]) .corner-controls { position: absolute; }
:root:is([data-view="disclosure"], [data-view="return"]) .corner-footer {
  position: relative;
  inset: auto;
  margin: -80px max(36px, env(safe-area-inset-right)) 0 max(36px, env(safe-area-inset-left));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.privacy-link {
  min-height: 44px;
  padding: 10px 0 10px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration-line: underline;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  transition: color 700ms ease, text-decoration-color 300ms ease;
}
.privacy-dialog {
  width: min(460px, calc(100% - 40px));
  max-height: calc(100svh - 80px);
  padding: 38px 32px 30px;
  border: 0;
  border-radius: 24px;
  background: var(--dialog);
  color: var(--ink);
  box-shadow: inset 0 1px 1px var(--glass-edge), 0 24px 100px rgb(0 0 0 / 25%);
}
.privacy-dialog::backdrop { background: rgb(0 0 0 / 42%); backdrop-filter: blur(8px); }
.privacy-close { position: absolute; top: 10px; right: 10px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.privacy-dialog h2 { margin: 18px 0 24px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.privacy-dialog p { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.privacy-dialog p:last-child { margin-bottom: 0; }
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"], [data-blur="off"]) :is(.glass, .utility),
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"], [data-blur="off"]) .privacy-dialog::backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"]) .surface-light { box-shadow: none; }
/* Keep press feedback on the compositor; no stretched pill shadows or paint transitions. */
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"]) .glass {
  box-shadow: inset 0 1px 1px var(--glass-edge), 0 8px 16px -10px var(--shadow);
  transition: none;
}
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"]) .glass:active { transform: none; opacity: 0.85; }
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"]) :is(.utility, .language-switch button, .privacy-link, .welcome) { transition: none; }
:root:is([data-quality="light"], [data-quality="low"], [data-quality="still"]) .utility:active { opacity: 0.85; }

/* Development-only panel, constructed only when the URL contains ?perf=1. */
.perf-panel {
  position: fixed;
  z-index: 100;
  top: 76px;
  left: 20px;
  width: min(320px, calc(100vw - 40px));
  max-height: calc(100svh - 100px);
  overflow: auto;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--dialog);
  color: var(--ink);
  box-shadow: 0 8px 30px var(--shadow);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.perf-panel summary { cursor: pointer; font-weight: 600; }
.perf-panel summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.perf-panel .perf-summary { color: var(--muted); font-size: 11px; font-weight: 400; }
.perf-body { display: grid; gap: 10px; margin-top: 16px; }
.perf-panel label { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.perf-panel select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--muted); border-radius: 8px; color: var(--ink); background: var(--page); font: inherit; }
.perf-panel output { white-space: pre-line; }
.perf-panel .perf-checkbox { justify-content: flex-start; gap: 8px; }
.perf-panel small { color: var(--muted); font-size: 11px; }
@media (hover: hover) {
  .glass:hover { background: var(--glass-hover); }
  :root[data-theme="dark"] :is(.mode, .start):hover { background: color-mix(in srgb, var(--selected-face), white 5%); }
  .mode[aria-pressed="true"]:hover { background: var(--selected-face); }
  .utility:hover { color: var(--ink); }
  .privacy-link:hover { color: var(--ink); text-decoration-color: currentColor; }
}
@media (max-width: 760px) {
  :root { --landing-footer-gap: max(20px, env(safe-area-inset-bottom)); --landing-min-height: 640px; }
  :root[data-view="choosing"] { --landing-min-height: 1020px; }
  .welcome-anchor { top: max(42svh, 300px); }
  .welcome.has-service-name, :lang(id) .welcome.has-service-name { font-size: clamp(48px, 14vw, 90px); max-width: calc(100vw - 48px); }
  .welcome-prefix { font-size: 18px; margin-bottom: 10px; }
  .organization-strip { top: 16px; left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); justify-content: center; gap: 16px; padding: 7px 12px; }
  .organization-strip a { gap: 8px; font-size: 12px; }
  .organization-strip a + a { padding-left: 16px; }
  .organization-strip img { max-width: 100px; }
  :root[data-organizations="true"]:is([data-view="welcome"], [data-view="choosing"]) .corner-controls { top: 90px; }
  .mode-description { margin-top: 10px; padding: 0 4px; font-size: 14px; }
  .mode-choice + .mode-choice { margin-top: 8px; }
  .landing-info { padding: 56px 24px 48px; }
  .landing-guides { padding: 56px 24px 64px; }
  .guide-lesson { grid-template-columns: 1fr; gap: 28px; }
  .guide-lesson + .guide-lesson { margin-top: 56px; }
  .guide-intro { margin-bottom: 32px; }
  .guide-copy h3 { font-size: 22px; }
  .guide-copy ol { font-size: 15px; }
  .landing-scroll { bottom: calc(var(--landing-footer-gap) + 58px); max-width: calc(100vw - 48px); font-size: 14px; }
  .project-intro { margin-bottom: 32px; font-size: 18px; }
  .project-details { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .scene[data-phase="choosing"] { --welcome-shift: -14svh; }
  .welcome { font-size: clamp(54px, 15vw, 100px); }
  .welcome-question { margin-top: 16px; font-size: 16px; }
  :lang(id) .welcome { font-size: clamp(35px, 10.5vw, 72px); }
  .actions { width: min(330px, calc(100vw - 56px)); }
  .modes { grid-template-columns: 1fr; gap: 14px; }
  .glass { min-height: 64px; padding: 19px 22px; font-size: 17px; }
  .mode { min-height: 84px; padding-block: 16px; }
  .start { width: 184px; font-size: 19px; }
  .corner-controls { top: max(20px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); gap: 10px; }
  .corner-footer { bottom: max(20px, env(safe-area-inset-bottom)); left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); }
  .surface-light { box-shadow: inset 0 0 80px 8px var(--edge); }
  .flow-screen { padding-inline: 20px; }
  .flow-content { padding: 28px 24px; }
  .flow-mode { font-size: 16px; }
  .flow-actions { flex-direction: column; gap: 8px; }
  .flow-actions > button { width: 100%; }
  .flow-actions .continue-button { min-height: 56px; padding: 16px 20px; font-size: 16px; }
  :root:is([data-view="disclosure"], [data-view="return"]) .corner-footer { margin-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
}
@media (max-height: 560px) and (min-width: 761px) {
  .scene { min-height: 400px; }
  .welcome-anchor { top: max(38svh, 220px); }
  .scene[data-phase="choosing"] { --welcome-shift: -10svh; }
  .welcome { font-size: min(10vw, 104px); }
  .welcome-question { margin-top: 12px; font-size: 16px; line-height: 1.4; }
  :lang(id) .welcome { font-size: min(8vw, 90px); }
  .corner-controls { top: 20px; }
  .corner-footer { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
