/* gece.00 — Köşeli, mimari, çerçevesiz tam ekran gece sığınağı.
 * Keskin 2px geometri (yusufayaz.com.tr tasarım dili) + derin sakin gece atmosferi.
 */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-weight: 100 900;
  src: url('/fonts/archivo-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-weight: 100 900;
  src: url('/fonts/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: 'Archivo Variable', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, Consolas, monospace;
  --ink: #f0ece3;
  --ink-soft: rgba(240, 236, 227, 0.72);
  --ink-mute: rgba(240, 236, 227, 0.42);
  --warm: #f2c078;
  --warm-dim: rgba(242, 192, 120, 0.14);
  --warm-line: rgba(242, 192, 120, 0.42);
  --glass: rgba(9, 11, 19, 0.76);
  --line: rgba(240, 236, 227, 0.13);
  --line-strong: rgba(240, 236, 227, 0.26);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #05060b;
  color: var(--ink);
  font: 13px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button, a { -webkit-tap-highlight-color: transparent; }
.hud-top, .dock, .focus-nav, .sky-canvas { user-select: none; -webkit-user-select: none; }

.sr-only, .hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

button, input, textarea { font: inherit; color: inherit; }

/* Sade tek çizgi mimari SVG ikonlar (telefon sistem emojilerini %100 önler) */
.ui-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.ui-icon--sm { width: 12px; height: 12px; }
.ui-icon--xs { width: 11px; height: 11px; }

.icon-close {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.icon-close:hover { color: var(--warm); border-color: var(--line); }

.light-btn-angular__star {
  fill: var(--warm);
  stroke: none;
}

.drawer-item__lights {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--warm);
}

:focus-visible {
  outline: 1px solid var(--warm);
  outline-offset: 2px;
}

/* ---- Tam Ekran Gökyüzü ---- */
.sky-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ---- İlk Yükleme Perdesi (FOUC ve sahte metin parlamasını yok eder) ---- */
.loading-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #05060b;
  transition: opacity 420ms var(--ease), visibility 420ms var(--ease);
}

body[data-loading='false'] .loading-veil {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-veil__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading-veil__brand {
  font: 600 16px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.loading-veil__bar {
  width: 130px;
  height: 1px;
  background: rgba(240, 236, 227, 0.14);
  overflow: hidden;
  position: relative;
}

.loading-veil__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 45%;
  background: var(--warm);
  animation: loadSweep 1.1s ease-in-out infinite;
}

@keyframes loadSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.loading-veil__label {
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
}

/* ---- Köşelerde Sessiz Mimari HUD ---- */
.hud-top, .hud-bottom {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(clamp(14px, 2.2vw, 26px) + env(safe-area-inset-top, 0px)) clamp(16px, 3.2vw, 38px) 10px;
  pointer-events: none;
}

.hud-top { top: 0; }
.hud-bottom {
  bottom: 0;
  padding-top: 8px;
  padding-bottom: calc(clamp(10px, 1.8vw, 20px) + env(safe-area-inset-bottom, 0px));
  color: var(--ink-mute);
  font: 11px/1.4 var(--font-mono);
}

.hud-top__left, .hud-top__right, .hud-bottom a {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-tick {
  width: 4px;
  height: 13px;
  background: var(--warm);
}

.brand {
  font: 600 13.5px/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.brand__ext { color: var(--warm); }
.hud-sep { color: rgba(240, 236, 227, 0.22); font-family: var(--font-mono); font-size: 11px; }

.hud-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font: 11.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 8px var(--warm);
  animation: softPulse 3.6s ease-in-out infinite;
}

.pulse-dot.offline {
  background: #f69393;
  box-shadow: 0 0 8px #f69393;
}

@keyframes softPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Köşeli önizleme şeridi */
.preview-strip {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.55);
}

.strip-btn {
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
  cursor: pointer;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}

.strip-btn + .strip-btn { border-left: 1px solid var(--line); }
.strip-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.strip-btn.active { background: var(--warm-dim); color: var(--warm); }

.hud-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.48);
  color: var(--ink-soft);
  font: 11px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}

.hud-action:hover { border-color: var(--warm-line); color: var(--warm); }
.hud-action__num { color: var(--warm); font-variant-numeric: tabular-nums; }

.ghost-link {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 11px/1 var(--font-mono);
  cursor: pointer;
  transition: color 150ms var(--ease);
}

.ghost-link:hover { color: var(--warm); }

.hud-bottom__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.hud-bottom__link:hover { color: var(--warm); }

/* ---- Merkez Sahne ---- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 76px 24px 190px;
  pointer-events: none;
  max-width: 100vw;
  overflow-x: hidden;
}

.stage[hidden] { display: none; }

/* ---- GÜNDÜZ SAHNESİ ---- */
.day-inner {
  pointer-events: auto;
  width: min(560px, 100%);
  text-align: center;
}

.quiet-label {
  margin: 0 0 12px;
  color: var(--ink-mute);
  font: 11px/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.day-countdown {
  margin: 4px 0 18px;
  font: 300 clamp(46px, 9.5vw, 82px)/1 var(--font-mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--warm);
  text-shadow: 0 0 38px rgba(242, 192, 120, 0.22);
}

.day-lead {
  margin: 0 0 8px;
  font: 400 clamp(17px, 2.3vw, 22px)/1.4 var(--font-serif);
  color: var(--ink);
}

.day-note {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 13px;
}

.sealed-quote {
  position: relative;
  margin: 0 auto 28px;
  max-width: 470px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--warm);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.52);
  text-align: left;
}

.sealed-quote__body {
  margin: 6px 0 10px;
  font: italic 400 16.5px/1.55 var(--font-serif);
  color: var(--ink);
}

.sealed-quote__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sealed-quote__meta {
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
}

.angular-form {
  display: flex;
  max-width: 430px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.65);
}

.angular-form:focus-within { border-color: var(--warm); }

.angular-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
}

.angular-form input::placeholder { color: var(--ink-mute); }

.day-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.day-explainer {
  max-width: 440px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font: 11px/1.6 var(--font-mono);
}

/* ---- GECE SAHNESİ ---- */
.top-banners {
  position: fixed;
  top: calc(58px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.announce-banner {
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--warm-line);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.88);
  color: var(--warm);
  font: 11px/1.4 var(--font-mono);
  text-align: center;
}

.dawn-whisper {
  margin: 0;
  padding: 7px 16px;
  border: 1px solid rgba(244, 152, 108, 0.42);
  border-radius: var(--radius);
  background: rgba(244, 152, 108, 0.12);
  backdrop-filter: blur(8px);
  color: #ffd9c4;
  font: 11px/1.4 var(--font-mono);
  text-align: center;
}

.breath-overlay {
  text-align: center;
  pointer-events: none;
}

.breath-word {
  margin: 0;
  font: 400 clamp(22px, 3.6vw, 32px)/1.3 var(--font-serif);
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(5, 6, 12, 0.85);
}

.breath-sub {
  margin: 10px 0 0;
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
}

.focus-stage {
  position: relative;
  pointer-events: auto;
  width: min(650px, 100%);
  padding: 20px 18px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(5, 6, 11, 0.56) 0%, rgba(5, 6, 11, 0) 76%);
  transition: opacity 420ms var(--ease), transform 460ms var(--ease), filter 420ms var(--ease);
  will-change: opacity, transform, filter;
}

/* Not geçişinde ve ışık bağlandığında yumuşak yıldız ışığı parlaması */
.focus-stage::before {
  content: '';
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(242, 192, 120, 0.16) 0%, rgba(242, 192, 120, 0.04) 44%, rgba(242, 192, 120, 0) 72%);
  transform: scale(0.92);
  transition: opacity 720ms var(--ease), transform 820ms var(--ease);
}

.focus-stage.is-mine::before {
  background: radial-gradient(ellipse at 50% 48%, rgba(204, 186, 255, 0.18) 0%, rgba(192, 172, 255, 0.05) 44%, rgba(192, 172, 255, 0) 72%);
}

.focus-stage.bloom::before {
  opacity: 1;
  transform: scale(1.06);
}

.focus-stage.is-mine .focus-text {
  text-shadow: 0 0 34px rgba(204, 186, 255, 0.22), 0 4px 36px rgba(5, 6, 12, 0.92);
}

.focus-stage.fading {
  opacity: 0;
  filter: blur(4px);
}
.focus-stage.fading-next { transform: translateY(-7px) scale(0.992); }
.focus-stage.fading-prev { transform: translateY(7px) scale(0.992); }
.focus-stage.entering {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(9px) scale(0.994);
  transition: none;
}
.focus-stage.dimmed { opacity: 0.16; pointer-events: none; }

.focus-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.nav-square {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.55);
  color: var(--ink-soft);
  font: 12px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background 150ms var(--ease);
}

.nav-square:hover { border-color: var(--warm-line); color: var(--warm); background: var(--warm-dim); }
.nav-square--sm { font-size: 10px; }

.focus-index {
  min-width: 50px;
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Otomatik geçiş ince çizgisi */
.drift-track {
  width: 148px;
  height: 1px;
  margin: 0 auto 22px;
  background: rgba(240, 236, 227, 0.12);
  overflow: hidden;
}

.drift-progress {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--warm);
  transition: width 250ms linear;
}

.focus-text {
  margin: 0 0 22px;
  font: 400 clamp(22px, 3.4vw, 33px)/1.44 var(--font-serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-shadow: 0 4px 36px rgba(5, 6, 12, 0.92);
  word-break: break-word;
}

.focus-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--ink-mute);
  font: 11.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.focus-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Köşeli "Ben de uyanığım" düğmesi */
.light-btn-angular {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--warm-line);
  border-radius: var(--radius);
  background: rgba(242, 192, 120, 0.07);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.light-btn-angular:hover, .light-btn-angular.lit {
  border-color: var(--warm);
  background: rgba(242, 192, 120, 0.17);
  color: #fff6e2;
  box-shadow: 0 0 24px rgba(242, 192, 120, 0.18);
}

.light-btn-angular__star { color: var(--warm); }
.light-btn-angular__num {
  padding-left: 10px;
  border-left: 1px solid rgba(240, 236, 227, 0.18);
  color: var(--warm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- 00:00 — 05:00 Gece İlerleme Çizgisi ---- */
.night-timeline {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 64px));
  color: var(--ink-mute);
  font: 10px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0.72;
}

.night-timeline__rail {
  position: relative;
  flex: 1;
  height: 1px;
  background: rgba(240, 236, 227, 0.16);
}

.night-timeline__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(242, 192, 120, 0.65);
}

.night-timeline__tick {
  position: absolute;
  top: -3px;
  left: 0%;
  width: 6px;
  height: 6px;
  background: var(--warm);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 8px var(--warm);
}

/* ---- Köşeli Alt Dok ---- */
.dock {
  position: fixed;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: auto;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transition: opacity 450ms var(--ease);
}

.dock.calm { opacity: 0.54; }
.dock:hover, .dock:focus-within { opacity: 1; }

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 500 11.5px/1 var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.dock-btn + .dock-btn { border-left: 1px solid var(--line); }
.dock-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.dock-btn.active { background: var(--warm-dim); color: var(--warm); }
.dock-btn--warm { color: var(--warm); }

/* Canlı 3 çubuklu mini ses göstergesi */
.sound-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sound-eq i {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--ink-mute);
  transition: background 180ms var(--ease);
}

.sound-eq.on i {
  background: var(--warm);
  animation: eqBar 1.1s ease-in-out infinite;
}

.sound-eq.on i:nth-child(2) { animation-delay: 0.25s; }
.sound-eq.on i:nth-child(3) { animation-delay: 0.5s; }

@keyframes eqBar {
  0%, 100% { height: 3px; }
  50% { height: 11px; }
}

/* ---- Köşeli Yüzen Paneller (Ses Mikseri & Fısıltı Yazma) ---- */
.floating-panel {
  position: fixed;
  bottom: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: auto;
  width: min(460px, calc(100vw - 32px));
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--warm);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.94);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.68);
}

.floating-panel[hidden] { display: none; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-head__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quota-badge {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--warm);
  font: 10.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.quota-badge.empty {
  color: #f69393;
  border-color: rgba(246, 147, 147, 0.35);
}

.panel-title {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.modal__sheet .preset-row { grid-template-columns: repeat(2, 1fr); }

.preset-chip {
  padding: 8px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 11px/1.2 var(--font-mono);
  cursor: pointer;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}

.preset-chip + .preset-chip { border-left: 1px solid var(--line); }
.preset-chip:hover { color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.preset-chip.active { background: var(--warm-dim); color: var(--warm); font-weight: 600; }

.mixer-rows {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.mixer-row {
  display: grid;
  grid-template-columns: 126px 1fr 34px;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

.mixer-val {
  text-align: right;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Köşeli sürgü (custom range) */
.mixer-row input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: rgba(240, 236, 227, 0.18);
  outline: none;
  cursor: pointer;
}

.mixer-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 1px;
  background: var(--warm);
  border: 1px solid #090b13;
  cursor: pointer;
}

.mixer-row input[type='range']::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 1px;
  background: var(--warm);
  border: 1px solid #090b13;
  cursor: pointer;
}

/* Uyku zamanlayıcısı (tek satır sade şerit) */
.sleep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sleep-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
}

.sleep-row__rem {
  color: var(--warm);
  font-variant-numeric: tabular-nums;
}

.sleep-chips {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sleep-chip {
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}

.sleep-chip + .sleep-chip { border-left: 1px solid var(--line); }
.sleep-chip:hover { color: var(--ink); }
.sleep-chip.active { background: var(--warm-dim); color: var(--warm); }

/* Opsiyonel 4 sakin ruh hali tonu (fısıltı yazarken) */
.mood-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.mood-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}

.mood-chip + .mood-chip { border-left: 1px solid var(--line); }
.mood-chip:hover { color: var(--ink); }
.mood-chip.active { background: rgba(255, 255, 255, 0.05); color: var(--ink); font-weight: 600; }

.mood-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mood-dot--calm { background: #f2c078; }
.mood-dot--reflective { background: #a8c7f5; }
.mood-dot--sleepless { background: #f3a678; }
.mood-dot--hopeful { background: #fff0c2; }

.write-panel textarea {
  width: 100%;
  resize: none;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(5, 6, 11, 0.78);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-serif);
  outline: none;
}

.write-panel textarea:focus { border-color: var(--warm); }

.write-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.write-rules {
  color: var(--ink-mute);
  font: 10.5px/1.3 var(--font-mono);
}

.write-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.char-count {
  color: var(--ink-mute);
  font: 11px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.btn-angular-warm {
  padding: 9px 16px;
  border: 1px solid var(--warm);
  border-radius: var(--radius);
  background: var(--warm);
  color: #090b13;
  font: 700 11.5px/1 var(--font-mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 150ms var(--ease);
}

.btn-angular-warm:hover { filter: brightness(1.08); }
.btn-angular-warm:disabled { opacity: 0.48; cursor: not-allowed; }

.btn-angular-ghost {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 500 11.5px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}

.btn-angular-ghost:hover { border-color: var(--warm); color: var(--warm); }

.whisper-feedback {
  min-height: 16px;
  margin: 8px 0 0;
  font: 11px/1.4 var(--font-mono);
  color: var(--ink-soft);
}

.whisper-feedback.error { color: #f69393; }
.whisper-feedback.ok { color: #8fe3b3; }

.crisis-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(143, 227, 179, 0.42);
  border-left: 2px solid #8fe3b3;
  border-radius: var(--radius);
  background: rgba(143, 227, 179, 0.08);
  font-size: 12px;
}

.crisis-box p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---- Köşeli Yan Çekmece ---- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}

.drawer[hidden] { display: none; }

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 10, 0.62);
  backdrop-filter: blur(4px);
}

.drawer__sheet {
  position: relative;
  z-index: 2;
  width: min(390px, 92vw);
  height: 100%;
  padding: 22px;
  border-left: 1px solid var(--line-strong);
  background: rgba(9, 11, 19, 0.95);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.drawer-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 500 11px/1 var(--font-mono);
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.drawer-tab + .drawer-tab { border-left: 1px solid var(--line); }
.drawer-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.drawer-tab.active { background: var(--warm-dim); color: var(--warm); font-weight: 600; }
.drawer-tab--mine.active { background: rgba(200, 182, 255, 0.14); color: #dcd2ff; }
.drawer-tab__num { opacity: 0.72; font-variant-numeric: tabular-nums; }

.drawer-sort {
  display: inline-flex;
  align-self: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}

.sort-chip {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
  cursor: pointer;
  transition: color 140ms var(--ease), border-color 140ms var(--ease), background 140ms var(--ease);
}

.sort-chip:hover { color: var(--ink); }
.sort-chip.active { border-color: var(--warm-line); background: var(--warm-dim); color: var(--warm); }

.drawer-more {
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  font: 11px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.drawer-more:hover { border-color: var(--warm); color: var(--warm); }
.drawer-more:disabled { opacity: 0.45; cursor: wait; }

.mine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8b6ff;
  box-shadow: 0 0 8px rgba(200, 182, 255, 0.75);
}

.drawer-empty {
  padding: 28px 14px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 12.5px;
}
.drawer-empty p { margin: 0 0 14px; }

.drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}

.drawer-item.mine {
  border-left: 2px solid #c8b6ff;
  background: rgba(200, 182, 255, 0.04);
}

.drawer-item:hover, .drawer-item.active {
  border-color: var(--warm-line);
  border-left: 2px solid var(--warm);
  background: var(--warm-dim);
}

.drawer-item.mine:hover, .drawer-item.mine.active {
  border-color: rgba(200, 182, 255, 0.45);
  border-left: 2px solid #dcd2ff;
  background: rgba(200, 182, 255, 0.12);
}

.drawer-item.archive {
  cursor: default;
  border-left: 2px solid rgba(242, 192, 120, 0.55);
}
.drawer-item.archive:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.pwa-hint {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-mute);
  font: 10.5px/1.35 var(--font-mono);
}
.pwa-hint__actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }

.drawer-item__text {
  margin: 0 0 8px;
  font: 400 14px/1.48 var(--font-serif);
  color: var(--ink);
}

.drawer-item__meta {
  display: flex;
  justify-content: space-between;
  color: var(--ink-mute);
  font: 10.5px/1 var(--font-mono);
}

/* ---- Köşeli Paylaşım Modalı ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 10, 0.74);
  backdrop-filter: blur(8px);
}

.modal__sheet {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--warm);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.96);
  backdrop-filter: blur(22px);
}

.share-preview-box {
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #05060b;
  margin-bottom: 14px;
}

#share-preview {
  max-width: 100%;
  max-height: 360px;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-actions > * { flex: 1; }

/* ---- Köşeli Bildirim (Toast) ---- */
.toast {
  position: fixed;
  top: 66px;
  right: clamp(20px, 3.2vw, 38px);
  z-index: 60;
  padding: 9px 14px;
  border: 1px solid var(--warm-line);
  border-left: 2px solid var(--warm);
  border-radius: var(--radius);
  background: rgba(9, 11, 19, 0.94);
  color: var(--ink);
  font: 11.5px/1.3 var(--font-mono);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.toast[hidden] { display: none; }

@media (max-width: 960px) {
  .hide-md { display: none; }
}

@media (max-width: 680px) {
  .hide-sm { display: none; }
  .preview-strip { display: none; }

  .hud-top {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  }
  .hud-top__left, .hud-top__right { gap: 8px; }
  .brand { font-size: 13px; }
  .hud-meta { font-size: 11px; }
  .hud-action { padding: 7px 10px; font-size: 11px; min-height: 34px; }

  .stage {
    padding: calc(64px + env(safe-area-inset-top, 0px)) 20px calc(152px + env(safe-area-inset-bottom, 0px));
  }
  .stage--day {
    overflow-y: auto;
    align-content: center;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .day-inner, .focus-stage { width: 100%; max-width: 100%; }
  .focus-stage { padding: 14px 8px; }
  .day-countdown { font-size: clamp(38px, 12.5vw, 58px); margin: 4px 0 12px; }
  .day-lead { font-size: 16.5px; }
  .day-note { margin-bottom: 18px; font-size: 12px; }
  .sealed-quote { padding: 14px 16px; margin-bottom: 18px; }
  .sealed-quote__body { font-size: 15px; }
  .angular-form { width: 100%; }
  .angular-form input { font-size: 16px; padding: 10px 11px; }
  .angular-form .btn-angular-warm { padding: 10px 13px; white-space: nowrap; }

  .top-banners {
    top: calc(52px + env(safe-area-inset-top, 0px));
  }
  .announce-banner, .dawn-whisper {
    font-size: 10.5px;
    padding: 6px 12px;
  }

  .focus-nav { margin-bottom: 10px; gap: 6px; }
  .nav-square {
    width: 34px;
    height: 34px;
    border-color: rgba(240, 236, 227, 0.08);
    background: transparent;
  }
  .focus-index { min-width: 42px; font-size: 10.5px; }
  .drift-track { width: 88px; margin-bottom: 18px; opacity: 0.72; }
  .focus-text {
    font-size: clamp(21px, 5.8vw, 27px);
    line-height: 1.46;
    margin-bottom: 18px;
  }
  .focus-meta {
    flex-direction: column;
    font-size: 10.5px;
    margin-bottom: 22px;
    gap: 5px;
    opacity: 0.85;
  }
  .focus-meta .hud-sep { display: none; }
  .focus-actions { gap: 8px; }
  .light-btn-angular {
    height: 42px;
    padding: 0 18px;
    font-size: 12px;
    background: rgba(242, 192, 120, 0.06);
  }

  /* Mobilde gece zaman çizgisini ve alt link kalabalığını kaldır — ferah gökyüzü ve sade dok! */
  .night-timeline { display: none; }
  body[data-phase='night'] .hud-bottom,
  body[data-phase='dawn'] .hud-bottom { display: none; }

  .dock {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
    max-width: 400px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-color: rgba(240, 236, 227, 0.14);
    background: rgba(8, 10, 18, 0.86);
    opacity: 1 !important;
  }
  .dock-btn {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 9px 4px;
    font-size: 10px;
    min-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mobilde ses/yazma panelleri dokun hemen üstünde temiz alt sayfa olarak açılır */
  .floating-panel {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
    max-height: 72dvh;
    overflow-y: auto;
    padding: 16px 16px 18px;
  }
  /* Mobilde yazma paneli üst-ortada açılır -> telefon klavyesi asla textarea/gönder butonunu kapatmaz! */
  .write-panel {
    top: calc(58px + env(safe-area-inset-top, 0px));
    bottom: auto;
    max-height: calc(100dvh - 130px);
  }
  .sleep-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .sleep-row__label { justify-content: space-between; }
  .sleep-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sleep-chip { padding: 8px 4px; text-align: center; }
  .preset-row { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
  .preset-chip { padding: 10px 4px; font-size: 10.5px; min-height: 38px; }
  .mixer-rows { gap: 16px; }
  .mixer-row { grid-template-columns: 110px 1fr 34px; gap: 10px; font-size: 12px; }
  .mixer-row input[type='range'] { height: 4px; touch-action: none; }
  .mixer-row input[type='range']::-webkit-slider-thumb { width: 18px; height: 18px; }
  .mixer-row input[type='range']::-moz-range-thumb { width: 18px; height: 18px; }
  .write-panel textarea { font-size: 16px; min-height: 86px; }
  .write-foot { gap: 10px; }

  .toast {
    top: calc(58px + env(safe-area-inset-top, 0px));
    left: 16px;
    right: 16px;
    text-align: center;
  }

  .hud-bottom {
    padding: 6px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
  }
  .hud-bottom__note { display: none; }
}
