/* morley.cloud/pomodoro: immersive synthwave Pomodoro timer.
   Sections: fonts, tokens, base, scene, topbar, stage, clock, controls, dock, tracks,
   toast, content, footer, dialog, zen, responsive, reduced motion */

@font-face {
  font-family: "Inter";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
}

/* ---------- tokens ---------- */
@property --sky-top { syntax: "<color>"; inherits: true; initial-value: #0a0612; }
@property --sky-mid { syntax: "<color>"; inherits: true; initial-value: #2a0c4e; }
@property --sky-low { syntax: "<color>"; inherits: true; initial-value: #8a1f78; }
@property --sun-a   { syntax: "<color>"; inherits: true; initial-value: #ffd36b; }
@property --sun-b   { syntax: "<color>"; inherits: true; initial-value: #ff2fa8; }
@property --accent  { syntax: "<color>"; inherits: true; initial-value: #ff4fd8; }

:root {
  color-scheme: dark;
  --bg: #0a0612;
  --ink: #f6ecff;
  --mute: #b9a7d9;
  --glass: rgba(14, 8, 28, .58);
  --glass-line: rgba(255, 255, 255, .14);
  --horizon: 60%;
  --sky-top: #0a0612; --sky-mid: #2a0c4e; --sky-low: #8a1f78;
  --sun-a: #ffd36b; --sun-b: #ff2fa8;
  --accent: #ff4fd8;
  --accent-2: #22e0ff;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
body[data-mode="short"] {
  --sky-mid: #072a4e; --sky-low: #0e7aa0; --sun-a: #b9fff2; --sun-b: #22b8ff; --accent: #2de2ff; --accent-2: #ff4fd8;
}
body[data-mode="long"] {
  --sky-mid: #1a1260; --sky-low: #5b3bd1; --sun-a: #ffc2f5; --sun-b: #7c5cff; --accent: #b79bff; --accent-2: #2de2ff;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: --sky-mid 1.2s, --sky-low 1.2s, --sun-a 1.2s, --sun-b 1.2s, --accent 1.2s, --accent-2 1.2s;
  overflow-x: hidden;
}
svg { display: block; fill: currentColor; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--accent-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--accent); color: #12041f; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.noscript { position: relative; z-index: 5; margin: 24px; padding: 16px; border: 1px solid var(--glass-line); border-radius: 12px; background: var(--glass); }

/* ---------- scene ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 38%, var(--sky-low) var(--horizon)); }
.stars {
  position: absolute; inset: 0 0 40% 0; opacity: .85;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 17% 33%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 26% 8%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 43% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 14%, #fde 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 61% 29%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 36%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 19%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 93% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 4% 44%, #fde 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 5%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 66% 47%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 97% 41%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
.sun {
  position: absolute; left: 50%; top: var(--horizon);
  width: min(62vmin, 520px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -68%);
  background: linear-gradient(to bottom, var(--sun-a) 8%, var(--sun-b) 78%);
  box-shadow: 0 0 90px 10px color-mix(in srgb, var(--sun-b) 55%, transparent), 0 0 220px 40px color-mix(in srgb, var(--sun-b) 28%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 54%, #000 54% 62%, transparent 62% 67.5%, #000 67.5% 75%, transparent 75% 81%, #000 81% 88%, transparent 88% 94.5%, #000 94.5% 100%);
          mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 54%, #000 54% 62%, transparent 62% 67.5%, #000 67.5% 75%, transparent 75% 81%, #000 81% 88%, transparent 88% 94.5%, #000 94.5% 100%);
  animation: sunpulse 8s ease-in-out infinite alternate;
}
.ground {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 35%, #12041f) 0%, #0d0420 14%, #070212 100%);
  border-top: 1px solid color-mix(in srgb, var(--accent) 80%, transparent);
  box-shadow: 0 -2px 28px color-mix(in srgb, var(--accent) 60%, transparent);
}
.grid {
  position: absolute; left: -60%; right: -60%; top: var(--horizon); bottom: -30%;
  transform: perspective(380px) rotateX(64deg);
  transform-origin: 50% 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--accent) 85%, transparent) 2px, transparent 2px),
    linear-gradient(to bottom, color-mix(in srgb, var(--accent) 85%, transparent) 2px, transparent 2px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 100%);
  animation: gridmove 2.6s linear infinite paused;
}
body.is-running .grid { animation-play-state: running; }
.scan {
  position: absolute; inset: 0; opacity: .22;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .55) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.scene::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(5, 2, 12, .65) 100%);
}
@keyframes gridmove { from { background-position: 0 0; } to { background-position: 0 64px; } }
@keyframes twinkle { from { opacity: .55; } to { opacity: .95; } }
@keyframes sunpulse { from { filter: brightness(.96); } to { filter: brightness(1.08); } }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(10, 6, 18, .85), rgba(10, 6, 18, 0));
  transition: opacity .6s;
}
.brand { font: 600 15px var(--mono); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand b { color: var(--accent); }
.brand:hover { color: #fff; }
.actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .2s, color .2s, transform .15s;
}
.icon-btn:hover, .icon-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.coffee {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
  color: #1b0a00; background: linear-gradient(135deg, #ffd36b, #ff9f5a);
  box-shadow: 0 6px 22px rgba(255, 159, 90, .35);
  transition: transform .15s, box-shadow .2s;
}
.coffee:hover { color: #1b0a00; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255, 159, 90, .5); }
.coffee.small { height: 34px; padding: 0 14px; font-size: 13px; }

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 20px 128px; gap: 14px; text-align: center;
}
.stage-title {
  font: 600 13px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
  transition: opacity .6s;
}
.stage-title span { display: block; font-size: 11px; letter-spacing: .22em; opacity: .75; margin-top: 2px; }

.modes {
  display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .6s;
}
.mode {
  border: 0; background: transparent; color: var(--mute); padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: background .2s, color .2s;
}
.mode:hover { color: var(--ink); }
.mode[aria-pressed="true"] { background: var(--accent); color: #17041f; }

/* ---------- clock ---------- */
.clock { position: relative; width: min(74vw, 38vh, 380px); width: min(74vw, 38svh, 380px); aspect-ratio: 1; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-fg {
  stroke: var(--accent); stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 70%, transparent));
  transition: stroke-dashoffset .25s linear, stroke 1.2s;
}
.clock::before {
  content: ""; position: absolute; inset: 7%; border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 4, 22, .78) 0%, rgba(10, 4, 22, .55) 70%, transparent 100%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.readout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#time {
  font: 700 clamp(48px, 15vmin, 96px)/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  color: #fff; text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 42px color-mix(in srgb, var(--accent) 50%, transparent);
}
.phase { font: 600 13px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
body.is-running .ring-fg { animation: glow 2.4s ease-in-out infinite alternate; }
@keyframes glow { from { filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 60%, transparent)); }
                  to   { filter: drop-shadow(0 0 9px var(--accent)) drop-shadow(0 0 26px color-mix(in srgb, var(--accent) 85%, transparent)); } }

.task input {
  width: min(86vw, 380px); text-align: center; padding: 10px 16px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.task input::placeholder { color: var(--mute); opacity: .8; }
.task input:focus { outline: none; border-color: var(--accent); }

/* ---------- controls ---------- */
.controls { display: flex; align-items: center; gap: 18px; }
.round {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .2s, color .2s, transform .15s;
}
.round:hover { border-color: var(--accent); color: var(--accent); }
.round:active { transform: scale(.94); }
.round.sm { width: 42px; height: 42px; flex: none; }
.start {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 164px; height: 60px; padding: 0 28px;
  border: 0; border-radius: 999px; font-weight: 800; font-size: 18px; letter-spacing: .02em; color: #17041f;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 10px 36px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform .15s, box-shadow .2s, background 1.2s;
}
.start:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset, 0 14px 44px color-mix(in srgb, var(--accent) 70%, transparent); }
.start:active { transform: scale(.97); }

.dots { display: flex; gap: 10px; list-style: none; padding: 0; }
.dots li { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--mute); opacity: .7; transition: background .3s, border-color .3s, box-shadow .3s; }
.dots li.on { background: var(--accent); border-color: var(--accent); opacity: 1; box-shadow: 0 0 10px var(--accent); }
.today { font: 500 12px var(--mono); color: var(--mute); letter-spacing: .04em; transition: opacity .6s; }

/* ---------- toast ---------- */
.toast {
  position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  max-width: min(92vw, 560px); padding: 14px 44px 14px 18px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--accent); font-size: 14px; text-align: left;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: rise .5s ease-out;
}
.toast p { flex: 1 1 220px; }
.toast-x { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--mute); font-size: 22px; line-height: 1; border-radius: 8px; }
.toast-x:hover { color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- dock + soundtracks ---------- */
.dock {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(94vw, 760px); display: flex; flex-direction: column; gap: 10px; transition: opacity .6s;
}
.dock-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 18px; text-align: left;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.np { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.np-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.np-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-text small { font: 500 11px var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; width: 18px; flex: none; opacity: .35; }
.eq i { flex: 1; height: 30%; background: var(--accent); border-radius: 1px; }
.eq.on { opacity: 1; }
.eq.on i { animation: eq 0.9s ease-in-out infinite alternate; }
.eq.on i:nth-child(2) { animation-delay: -.3s; animation-duration: 1.1s; }
.eq.on i:nth-child(3) { animation-delay: -.6s; animation-duration: .8s; }
.eq.on i:nth-child(4) { animation-delay: -.15s; animation-duration: 1.3s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

.vol input[type="range"] { width: 110px; accent-color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-line); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
.pill:hover, .pill[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.pill.pri { background: var(--accent); color: #17041f; border-color: var(--accent); }
.pill.pri:hover { color: #17041f; filter: brightness(1.1); }

.tracks {
  padding: 16px; border-radius: 18px; text-align: left;
  background: rgba(12, 6, 24, .82); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  max-height: 46vh; overflow: auto;
}
.tracks-title { font: 700 14px var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.tracks-title span { color: var(--mute); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 8px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.track {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-line); transition: border-color .2s, background .2s, transform .15s;
}
.track:hover { border-color: var(--accent); background: rgba(255, 255, 255, .08); }
.track[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.track b { font-size: 15px; }
.track span { font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.track em { font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: var(--accent-2); margin-top: 2px; }
.tracks-note { font-size: 12px; color: var(--mute); margin-top: 12px; }

/* ---------- YouTube mini player ---------- */
.yt-card {
  position: fixed; right: 16px; bottom: 96px; z-index: 15;
  width: min(320px, 70vw); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px;
  background: #000; border: 1px solid var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 0 28px color-mix(in srgb, var(--accent) 35%, transparent);
}
.yt-card iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .yt-card { right: 12px; bottom: 186px; width: min(240px, 60vw); } }

/* ---------- content (SEO copy) ---------- */
.content {
  position: relative; z-index: 2; padding: 72px 0 24px;
  background: linear-gradient(to bottom, rgba(7, 2, 18, 0) 0, rgba(7, 2, 18, .88) 120px);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 22px; }
.content-head { text-align: center; padding-bottom: 36px; }
.eyebrow { font: 600 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.content h2 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.25; letter-spacing: -.02em; margin-bottom: 14px; }
.content-head h2 { font-size: clamp(26px, 4.4vw, 38px); margin-bottom: 14px; }
.content section { padding: 34px 0; border-top: 1px solid var(--glass-line); }
.content p { color: #dccdf3; margin-bottom: 14px; max-width: 70ch; }
.content-head p { margin-left: auto; margin-right: auto; }
.steps { padding-left: 22px; display: grid; gap: 12px; color: #dccdf3; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.steps b { color: #fff; }
.feature-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feature-grid li { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 4px; }
.feature-grid b { color: #fff; }
.feature-grid span { color: var(--mute); font-size: 14px; line-height: 1.55; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 28px; }
.keys div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--glass-line); }
.keys dd { color: var(--mute); font-size: 14px; text-align: right; }
kbd { font: 600 12px var(--mono); padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); border-bottom-width: 2px; }
details { border: 1px solid var(--glass-line); border-radius: 14px; background: rgba(255, 255, 255, .04); margin-bottom: 10px; }
summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 700 18px var(--mono); color: var(--accent); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 18px 4px; margin: 0 0 14px; }
.about-maker .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ---------- footer ---------- */
.site-footer {
  position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 28px max(22px, calc((100vw - 860px) / 2)); background: rgba(7, 2, 18, .94);
  border-top: 1px solid var(--glass-line); color: var(--mute); font: 13px var(--mono);
}
.site-footer ul { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; padding: 0; }
.site-footer a { color: var(--mute); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- settings dialog ---------- */
dialog {
  margin: auto; width: min(94vw, 520px); max-height: 92vh; overflow: auto; padding: 24px; border-radius: 20px;
  background: #130a26; color: var(--ink); border: 1px solid var(--glass-line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px color-mix(in srgb, var(--accent) 25%, transparent);
}
dialog::backdrop { background: rgba(5, 2, 12, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h2 { font-size: 20px; margin-bottom: 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; padding: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); }
.fields input[type="number"] {
  padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-line); color: var(--ink);
}
.fields input:focus { outline: none; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.note { font-size: 13px; color: var(--amber, #fbbf24); margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- zen ---------- */
html.zen, html.zen body { overflow: hidden; }
html.zen .content, html.zen .site-footer { display: none; }
html.zen.idle .topbar,
html.zen.idle .dock,
html.zen.idle .stage-title,
html.zen.idle .modes,
html.zen.idle .today { opacity: 0; pointer-events: none; }
html.zen.idle { cursor: none; }
html.zen .stage { padding-bottom: 60px; }
html.zen .clock { width: min(84vw, 66svh, 600px); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .coffee span { display: none; }
  .coffee { width: 40px; padding: 0; justify-content: center; }
  .coffee.small span, .about-maker .coffee span, .toast .coffee span { display: inline; }
  .toast .coffee, .about-maker .coffee { width: auto; padding: 0 16px; }
  .stage { padding: 68px 16px 190px; gap: 14px; }
  .dock-bar { flex-wrap: wrap; }
  .np { flex: 1 1 60%; }
  .vol { order: 4; flex: 1 1 40%; }
  .vol input[type="range"] { width: 100%; }
  .pill span { display: inline; }
  .fields { grid-template-columns: 1fr 1fr; }
  .mode { padding: 8px 12px; font-size: 13px; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .stage { flex-direction: row; flex-wrap: wrap; padding-bottom: 110px; }
  .stage-title { display: none; }
}

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