/* ==========================================================================
   mindspeace — immersive studio
   ========================================================================== */

:root {
  --accent: #7dd3fc;
  --text: #f5f7fb;
  --muted: rgba(236, 240, 255, 0.68);
  --dim: rgba(236, 240, 255, 0.45);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --glass: rgba(14, 16, 26, 0.38);
  --glass-strong: rgba(13, 15, 24, 0.78);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 55%, transparent);
  --shade: 0.25;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #05060a; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #05060a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
}

/* ---------- STAGE ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}
.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  transform-origin: 50% 45%;
  animation: drift 70s ease-in-out infinite alternate;
  transition: opacity 0.45s ease;
  will-change: transform;
}
.scene-img.is-fading { opacity: 0; }
@keyframes drift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.11) translate3d(-1.2%, -0.8%, 0); }
}
.scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.scene-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(0, 0, 0, calc(var(--shade) * 0.9 + 0.12)), transparent 75%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 22%, transparent 70%, rgba(0, 0, 0, 0.55)),
    rgba(0, 0, 0, var(--shade));
  transition: background 0.3s ease;
}
.no-motion .scene-img { animation: none; transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) {
  .scene-img { animation: none; transform: scale(1.03); }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- TOP BAR ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
  transition: opacity 0.6s ease;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.wallclock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; padding: 0 6px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.presence { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; color: var(--muted); }
.presence b { color: var(--text); font-weight: 600; }
.presence .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center;
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.active { background: rgba(255, 255, 255, 0.18); }

/* ---------- HERO ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(6px, 1.8vh, 18px) 18px calc(85px + var(--safe-b));
  transition: transform 0.45s var(--ease);
  min-height: 0;
  gap: clamp(4px, 1.2vh, 12px);
}
.hero-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero-meta .sep { opacity: 0.5; }
.hero-time {
  font-size: clamp(3.6rem, min(16vw, 13.5vh), 9.5rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
  text-shadow: 0 6px 50px rgba(0, 0, 0, 0.45);
}
.hero-progress { width: min(340px, 72vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; margin-bottom: clamp(10px, 2vh, 22px); }
.hero-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; box-shadow: 0 0 12px var(--accent); transition: width 0.3s linear; }
.hero-controls { display: flex; align-items: center; gap: 14px; }
.ctl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease; }
.ctl:active { transform: scale(0.95); }
.ctl-round { width: 48px; height: 48px; border-radius: 50%; color: var(--text); }
.ctl-round:hover { background: rgba(255, 255, 255, 0.16); }
.ctl-main {
  min-width: 168px; height: 54px; padding: 0 26px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.94); color: #0b0d14; font-weight: 650; font-size: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.ctl-main:hover { background: #fff; }
.ctl-main.is-running {
  background: rgba(14, 16, 26, 0.4); color: var(--text);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
}
.tagline { margin-top: 26px; font-size: 0.86rem; font-weight: 450; color: var(--dim); letter-spacing: 0.02em; text-shadow: 0 1px 10px rgba(0,0,0,.6); }

.nowplaying {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 8px 8px 10px; border-radius: 18px; max-width: min(640px, 94vw);
}
.np-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.np-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); font-size: 0.8rem; color: var(--text); white-space: nowrap;
}
.np-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.np-chip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.np-chip button:hover { background: rgba(255, 255, 255, 0.15); color: var(--text); }
.np-chip .ic { width: 12px; height: 12px; }
.np-controls { display: flex; align-items: center; gap: 4px; }
.np-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text); }
.np-btn:hover { background: rgba(255, 255, 255, 0.12); }
.np-btn .ic { width: 16px; height: 16px; }
.np-master { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 0 4px; }
.np-master .ic { width: 16px; height: 16px; }
.np-master input[type="range"] { width: 96px; }
.resume-chip { margin-top: 16px; padding: 9px 16px; border-radius: 999px; font-size: 0.85rem; color: var(--text); transition: background 0.2s ease; }
.resume-chip:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- DOCK ---------- */
.dock {
  position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 22px; z-index: 5;
  max-width: calc(100vw - 16px);
  overflow-x: auto;
  scrollbar-width: none;
  transition: opacity 0.6s ease, transform 0.4s var(--ease);
}
.dock::-webkit-scrollbar { display: none; }
.dock-btn {
  position: relative; width: 74px; padding: 8px 4px 6px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 0.7rem; font-weight: 550; letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
}
.dock-btn .ic { width: 22px; height: 22px; }
.dock-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.dock-btn.active { color: var(--text); background: rgba(255, 255, 255, 0.14); }
.dock-btn .live { position: absolute; top: 7px; right: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); opacity: 0; transform: scale(0.5); transition: opacity 0.3s ease, transform 0.3s var(--ease); }
.dock-btn.is-live .live { opacity: 1; transform: scale(1); }

/* idle: let the scene breathe */
.stage.idle .topbar, .stage.idle .dock, .stage.idle .hero-controls, .stage.idle .nowplaying, .stage.idle .tagline, .stage.idle .resume-chip { opacity: 0; }
.stage.idle { cursor: none; }

/* desk mode */
.desk .tagline, .desk .nowplaying, .desk .resume-chip { display: none; }
.desk .hero-time { font-size: clamp(6rem, 26vw, 16rem); }

/* ---------- PANELS ---------- */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.panel {
  position: fixed; z-index: 30;
  left: 8px; right: 8px; bottom: calc(8px + var(--safe-b));
  max-height: min(78svh, 720px);
  display: flex; flex-direction: column;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.42s var(--ease), opacity 0.3s ease, visibility 0s linear 0.42s;
}
.panel.open { transform: none; opacity: 1; visibility: visible; transition: transform 0.42s var(--ease), opacity 0.3s ease, visibility 0s; }
@media (max-width: 959px) {
  body.panel-open .backdrop { opacity: 1; pointer-events: auto; }
}
@media (min-width: 960px) {
  .panel { left: auto; right: 16px; top: 72px; bottom: 16px; width: 400px; max-height: none; transform: translateX(calc(100% + 32px)); }
  body.panel-open .hero { transform: translateX(-200px); }
  body.panel-open .dock { transform: translateX(calc(-50% - 200px)); }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 22px; }
.panel-head h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.panel-close { color: var(--muted); }
.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 26px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.label { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-top: 8px; }
.hint { font-size: 0.85rem; color: var(--muted); }
.note { font-size: 0.78rem; color: var(--dim); }
.warn { font-size: 0.82rem; color: #fde68a; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.22); border-radius: 14px; padding: 10px 12px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.82rem; color: var(--text); transition: background 0.2s ease, border-color 0.2s ease; }
.chip:hover { background: var(--surface-hover); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); }

/* sound tiles */
.sound-group { display: flex; flex-direction: column; gap: 10px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: background 0.25s ease, border-color 0.25s ease; overflow: hidden; }
.tile:hover { background: var(--surface-hover); }
.tile.on { background: var(--accent-soft); border-color: var(--accent-line); }
.tile-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 11px 9px; text-align: left; }
.tile-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); color: var(--muted); transition: background 0.25s ease, color 0.25s ease; flex: none; }
.tile.on .tile-icon { background: var(--accent); color: #0b0d14; }
.tile-icon .ic { width: 18px; height: 18px; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-text b { font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-text small { font-size: 0.72rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile input.tile-vol { display: block; width: calc(100% - 22px); margin: 0 11px 11px; }

/* range */
input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  height: 22px; background: transparent; cursor: pointer; width: 100%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, 0.16) var(--fill));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; margin-top: -6px;
  background: #fff; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 6px rgba(0,0,0,.4);
  transition: transform 0.15s ease;
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 10px; border-radius: 11px; font-size: 0.85rem; font-weight: 550; color: var(--muted); transition: background 0.2s ease, color 0.2s ease; }
.seg button .ic { width: 16px; height: 16px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, 0.15); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* bands */
.bands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.band { padding: 10px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: background 0.2s ease, border-color 0.2s ease; }
.band:hover { background: var(--surface-hover); }
.band b { display: block; font-size: 0.88rem; font-weight: 600; }
.band small { display: block; font-size: 0.7rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.band.on { background: var(--accent-soft); border-color: var(--accent-line); }

/* readout */
.readout { text-align: center; padding: 14px 10px; border-radius: 18px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.readout-hz { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.readout-hz b { font-size: 2.6rem; font-weight: 250; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.readout-hz span { color: var(--muted); font-size: 0.95rem; }
.readout-band { font-size: 0.88rem; color: var(--accent); font-weight: 550; }
.readout-sub { font-size: 0.76rem; color: var(--dim); font-variant-numeric: tabular-nums; margin-top: 2px; }
.readout-small .readout-hz b { font-size: 2.1rem; }

/* fields */
.field { display: flex; flex-direction: column; gap: 4px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; }
.field-top label { font-size: 0.85rem; font-weight: 550; }
.field-range { font-size: 0.72rem; color: var(--dim); }
.field-row { display: flex; align-items: center; gap: 10px; }
.num { width: 78px; flex: none; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.num:focus { outline: none; border-color: var(--accent-line); }

/* buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 14px; font-weight: 650; font-size: 0.95rem;
  transition: transform 0.15s var(--ease), background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: #0b0d14; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.is-on { background: rgba(255, 255, 255, 0.12); color: var(--text); border: 1px solid var(--line-strong); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.btn-secondary.is-on { background: var(--accent-soft); border-color: var(--accent-line); }
.btn-primary:active, .btn-secondary:active { transform: scale(0.98); }
.btn-small { padding: 7px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); transition: background 0.2s ease; }
.btn-small:hover { background: rgba(255, 255, 255, 0.16); }
.btn-row { display: grid; grid-template-columns: 1.3fr 0.7fr 0.7fr 1.3fr; gap: 6px; }

/* switch */
.switch { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; width: 38px; height: 22px; border-radius: 22px; background: rgba(255, 255, 255, 0.16); flex: none; transition: background 0.2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* tones */
.tone-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tone { position: relative; padding: 14px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: background 0.2s ease, border-color 0.2s ease; overflow: hidden; }
.tone:hover { background: var(--surface-hover); }
.tone b { display: block; font-size: 1.35rem; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tone b small { font-size: 0.75rem; color: var(--muted); margin-left: 3px; font-weight: 450; }
.tone span { font-size: 0.75rem; color: var(--dim); }
.tone.on { background: var(--accent-soft); border-color: var(--accent-line); }
.tone.on::after { content: ""; position: absolute; right: 12px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* sessions */
.ses-list { display: flex; flex-direction: column; gap: 10px; }
.ses { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.ses-title { font-weight: 600; font-size: 0.95rem; }
.ses-title small { color: var(--dim); font-weight: 450; margin-left: 6px; font-size: 0.78rem; }
.ses p { grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted); }
.ses svg.curve { grid-column: 1 / -1; width: 100%; height: 38px; }
.ses svg.curve polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ses svg.curve .area { fill: var(--accent-soft); stroke: none; }
.ses.on { border-color: var(--accent-line); background: var(--accent-soft); }
.ses-active { padding: 14px; border-radius: 18px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--accent-line); display: flex; flex-direction: column; gap: 10px; }
.ses-active-top, .ses-active-bottom { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.ses-active-top span { color: var(--muted); font-size: 0.85rem; }
.ses-active-bottom span { color: var(--accent); font-size: 0.85rem; font-weight: 550; }
.ses-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.ses-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.5s linear; }

/* focus panel */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stats b { display: block; font-size: 1.7rem; font-weight: 300; font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.75rem; color: var(--dim); }
.tasks { display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.task input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.task input[type="text"] { flex: 1; min-width: 0; padding: 8px 0; background: transparent; border: 0; outline: none; font-size: 0.88rem; }
.task.done input[type="text"] { text-decoration: line-through; color: var(--dim); }
textarea { width: 100%; resize: vertical; min-height: 90px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; outline: none; }
textarea:focus, .task:focus-within { border-color: var(--accent-line); }
.breath { display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.breath-orb { width: 60px; height: 60px; margin: 12px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 55%, transparent 72%); opacity: 0.85; transform: scale(0.75); transition: transform 4s cubic-bezier(0.45, 0, 0.55, 1); box-shadow: 0 0 30px var(--accent-line); }
.breath-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.breath-side b { font-weight: 550; font-size: 0.95rem; }

/* scenes */
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scene-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; border: 2px solid transparent; transition: border-color 0.2s ease, transform 0.2s var(--ease); }
.scene-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 0.8rem; font-weight: 600; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }
.scene-card:hover { transform: translateY(-2px); }
.scene-card.on { border-color: var(--accent); }

/* ---------- GUIDE (SEO content) ---------- */
.guide { background: linear-gradient(#05060a, #090b12); border-top: 1px solid var(--line); }
.guide-inner { max-width: 760px; margin: 0 auto; padding: 72px 22px 40px; display: flex; flex-direction: column; gap: 52px; }
.guide h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 14px; }
.guide p, .guide li { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.guide p + p { margin-top: 12px; }
.guide b { color: var(--text); font-weight: 600; }
.guide ul, .guide ol { padding-left: 20px; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.guide .steps li::marker { color: var(--accent); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); margin: 6px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 600; background: rgba(255, 255, 255, 0.04); }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text); font-weight: 550; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; list-style: none; padding: 14px 30px 14px 0; font-weight: 600; font-size: 1.02rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; font-weight: 300; color: var(--muted); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 16px; }
.site-footer { max-width: 760px; margin: 0 auto; padding: 32px 22px calc(110px + var(--safe-b)); border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--dim); display: flex; flex-direction: column; gap: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 550; transition: color 0.2s; }
.footer-nav a:hover { color: var(--text); }
.footer-legal { margin-bottom: 12px; font-size: 0.84rem; }
.footer-legal h3 { font-size: 0.92rem; color: var(--text); margin: 0 0 4px; font-weight: 600; }
.footer-legal p { margin: 0; color: var(--dim); line-height: 1.6; }
.muted { color: var(--dim); }

/* ---------- SMALL SCREENS ---------- */
@media (max-width: 560px) {
  .topbar { padding-left: 14px; padding-right: 12px; }
  .wallclock { display: none; }
  .dock { gap: 0; padding: 4px; border-radius: 18px; width: calc(100% - 16px); justify-content: space-around; }
  .dock-btn { width: auto; flex: 1 1 0; font-size: 0.65rem; padding: 6px 1px 5px; gap: 2px; }
  .dock-btn .ic { width: 20px; height: 20px; }
  .dock-btn .live { right: calc(50% - 14px); top: 5px; }
  .hero { padding-bottom: 96px; }
  .ctl-main { min-width: 140px; height: 48px; padding: 0 18px; font-size: 0.95rem; }
  .np-master input[type="range"] { width: 76px; }
  .bands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 640px) and (orientation: landscape) {
  .hero { padding-bottom: 86px; }
  .hero-time { font-size: clamp(3.6rem, 15vh, 7rem); margin: 2px 0 6px; }
  .tagline { display: none; }
  .hero-progress { margin-bottom: 12px; }
}
