/* ==========================================================================
   Taraklı FM — Modern Web Radyo Arayüzü Stilleri
   Tarihi Taraklı ahşap/kiremit sıcaklığı + Modern yayın konsolu hassasiyeti
   ========================================================================== */

@property --arc-start {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@property --arc-end {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@property --progress-dash-animation {
  syntax: "*";
  inherits: false;
  initial-value: , progress-dash 3s ease-in-out infinite;
}

:root {
  /* Dokunmatik / Fare hedef boyutu (WCAG 2.5.8 & 2.5.5) */
  --target-size: 24px;

  /* Açık ve Koyu ham renk paleti */
  --bg-light: #faf6f1;
  --bg-dark: #14100d;

  --surface-light: rgba(255, 252, 248, 0.88);
  --surface-dark: rgba(31, 24, 20, 0.88);

  --surface-elevated-light: #ffffff;
  --surface-elevated-dark: #281f1a;

  --surface-subtle-light: #f1e9df;
  --surface-subtle-dark: #211915;

  --text-primary-light: #1e1611;
  --text-primary-dark: #f7efe6;

  --text-secondary-light: #5c4b3e;
  --text-secondary-dark: #c4b2a1;

  --border-light: rgba(120, 82, 52, 0.16);
  --border-dark: rgba(245, 208, 175, 0.13);

  --brand-light: #b93815;
  --brand-dark: #f97316;

  --brand-strong-light: #9a2c0f;
  --brand-strong-dark: #fb923c;

  --brand-contrast-light: #ffffff;
  --brand-contrast-dark: #1c0d04;

  --live-green-light: #15803d;
  --live-green-dark: #4ade80;

  --shadow-card-light: 0 20px 50px -16px rgba(69, 39, 18, 0.16);
  --shadow-card-dark: 0 24px 60px -16px rgba(0, 0, 0, 0.62);

  /* Varsayılan (light-dark desteklemeyen eski tarayıcılar için geri dönüş) */
  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-elevated: var(--surface-elevated-light);
  --surface-subtle: var(--surface-subtle-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --border-color: var(--border-light);
  --brand: var(--brand-light);
  --brand-strong: var(--brand-strong-light);
  --brand-contrast: var(--brand-contrast-light);
  --live-green: var(--live-green-light);
  --shadow-card: var(--shadow-card-light);
  --scrollbar-track: #efe7dc;
  --scrollbar-thumb: #967c66;

  @media (prefers-color-scheme: dark) {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-elevated: var(--surface-elevated-dark);
    --surface-subtle: var(--surface-subtle-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border-color: var(--border-dark);
    --brand: var(--brand-dark);
    --brand-strong: var(--brand-strong-dark);
    --brand-contrast: var(--brand-contrast-dark);
    --live-green: var(--live-green-dark);
    --shadow-card: var(--shadow-card-dark);
    --scrollbar-track: #1e1713;
    --scrollbar-thumb: #7b6655;
  }

  /* Modern light-dark() bağlaması */
  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --surface-elevated: light-dark(var(--surface-elevated-light), var(--surface-elevated-dark));
    --surface-subtle: light-dark(var(--surface-subtle-light), var(--surface-subtle-dark));
    --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));
    --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));
    --border-color: light-dark(var(--border-light), var(--border-dark));
    --brand: light-dark(var(--brand-light), var(--brand-dark));
    --brand-strong: light-dark(var(--brand-strong-light), var(--brand-strong-dark));
    --brand-contrast: light-dark(var(--brand-contrast-light), var(--brand-contrast-dark));
    --live-green: light-dark(var(--live-green-light), var(--live-green-dark));
    --shadow-card: light-dark(var(--shadow-card-light), var(--shadow-card-dark));
    --scrollbar-track: light-dark(#efe7dc, #1e1713);
    --scrollbar-thumb: light-dark(#967c66, #7b6655);
  }

  /* Kök renk şeması ve <meta name="color-scheme"> senkronizasyonu */
  color-scheme: light dark;
  accent-color: var(--brand);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-block-size: 100dvh;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
}

p,
li {
  margin: 0;
  text-wrap: pretty;
}

img,
video {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

/* Etkileşimli hedeflerin minimum boyut garantisi */
:where(button, select, textarea, input:not([type="checkbox"], [type="radio"]), [role="button"], nav a, label:has(input[type="checkbox"], input[type="radio"])) {
  min-block-size: var(--target-size);
  min-inline-size: var(--target-size);
}

:where([role="button"], nav a, label:has(input[type="checkbox"], input[type="radio"])) {
  display: inline-flex;
  align-items: center;
}

:where(.toolbar > :not(button, input, select, textarea, a, [role="button"], label)) {
  min-inline-size: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono-readout {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Atmosferik arka plan ışıması */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 15%, rgba(234, 88, 12, 0.15), transparent 46%),
    radial-gradient(circle at 82% 78%, rgba(217, 119, 6, 0.12), transparent 50%);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-inline-size: 68rem;
  margin-inline: auto;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

/* Üst Çubuk */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 1.125rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-emblem {
  border-radius: 0.65rem;
  flex-shrink: 0;
}

.brand-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--brand);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.live-clock {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.icon-button:hover {
  border-color: var(--brand);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button:focus-visible,
.chip-btn:focus-visible,
.secondary-btn:focus-visible,
.play-fab:focus-visible,
.pill-link:focus-visible,
.sleep-option:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-contrast);
  font-variant-numeric: tabular-nums;
}

/* Ana Stüdyo Sahnesi & Container Query */
.player-stage {
  container: player-stage / inline-size;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.studio-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-card);
}

@container player-stage (inline-size > 46rem) {
  .studio-card {
    grid-template-columns: 20rem 1fr;
    align-items: stretch;
    padding: 1.75rem;
    gap: 2rem;
  }
}

/* Sol Görsel Kartı */
.artwork-column {
  display: flex;
  flex-direction: column;
}

.artwork-frame {
  position: relative;
  flex: 1;
  min-block-size: 14.5rem;
  border-radius: 1.125rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #1c1512;
}

.station-photo {
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 14.5rem;
  object-fit: cover;
  transition: transform 600ms ease;
}

.artwork-frame[data-playing="true"] .station-photo {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .station-photo {
    transition: none;
  }
  .artwork-frame[data-playing="true"] .station-photo {
    transform: none;
  }
}

.artwork-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.875rem;
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 7, 0.55) 0%,
    rgba(12, 9, 7, 0.08) 45%,
    rgba(12, 9, 7, 0.72) 100%
  );
}

.status-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 16, 13, 0.82);
  color: #fff7ed;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.pulse-dot {
  inline-size: 0.52rem;
  block-size: 0.52rem;
  border-radius: 50%;
  background: #f59e0b;
}

.status-pill[data-state="playing"] .pulse-dot {
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28);
}

.status-pill[data-state="error"] .pulse-dot {
  background: #f87171;
}

.listener-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.6rem;
  background: rgba(20, 16, 13, 0.78);
  color: #f5ebe0;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Sağ Konsol Sütunu */
.console-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-inline-size: 0;
}

.station-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.program-title {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.program-subtitle {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

/* Spektrum Analizörü Kutusu */
.visualizer-box {
  position: relative;
  border-radius: 1rem;
  padding: 0.75rem 0.875rem 0.55rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
}

#spectrum-canvas {
  inline-size: 100%;
  block-size: 5.5rem;
  display: block;
}

.visualizer-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Oynatma Konsolu */
.controls-deck {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.primary-transport {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.play-fab {
  inline-size: 4rem;
  block-size: 4rem;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: var(--brand-contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(185, 56, 21, 0.45);
  transition: transform 140ms ease, background-color 150ms ease;
}

.play-fab:hover {
  background: var(--brand-strong);
}

.play-fab:active {
  transform: scale(0.95);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease;
}

.secondary-btn:hover {
  border-color: var(--brand);
}

/* Ses Kaydırıcısı (Native Range Slider — Modern Web Guidance uyumlu) */
.volume-row {
  flex: 1 1 13rem;
  max-inline-size: 20rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.volume-readout {
  min-inline-size: 2.75rem;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="range"] {
  --slider-track-size: 0.45rem;
  --slider-thumb-size: 1.2rem;
  --slider-track-radius: 999px;
  --slider-thumb-radius: 50%;
  --slider-track-color: var(--border-color);
  --slider-fill-color: var(--brand);
  --slider-thumb-color: var(--slider-fill-color);
  --slider-direction: to right;

  &:dir(rtl) {
    --slider-direction: to left;
  }

  --attr-min: attr(min type(<number>), 0);
  --attr-max: attr(max type(<number>), 100);
  --control-value: attr(value type(<number>), 85);
  --slider-progress: calc(
    progress(var(--control-value), var(--attr-min), var(--attr-max)) * 100%
  );

  appearance: none;
  inline-size: 100%;
  block-size: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

@supports not (opacity: progress(1, 0, 100)) {
  input[type="range"] {
    --slider-progress: calc(
      (var(--control-value) - var(--attr-min)) /
      (var(--attr-max) - var(--attr-min)) * 100%
    );
  }
}

input[type="range"]::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: linear-gradient(
    var(--slider-direction),
    var(--slider-fill-color) var(--slider-progress),
    var(--slider-track-color) var(--slider-progress)
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  margin-block-start: calc(
    (var(--slider-track-size) - var(--slider-thumb-size)) / 2
  );
  border: 0;
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
}

input[type="range"]::-moz-range-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: var(--slider-track-color);
}

input[type="range"]::-moz-range-progress {
  block-size: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: var(--slider-fill-color);
}

input[type="range"]::-moz-range-thumb {
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  border: 0;
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--slider-fill-color);
  outline-offset: 4px;
}

/* Belirsiz Yükleme Halkası (Native <progress> Spinner) */
progress.loading-spinner:indeterminate::-webkit-progress-bar {
  display: none;
  background: none;
}
progress.loading-spinner:indeterminate::-webkit-progress-value {
  display: none;
  background: none;
}
progress.loading-spinner:indeterminate::-moz-progress-bar {
  display: none;
  background: none;
}
progress.loading-spinner:indeterminate::slider-fill {
  display: none;
  background: none;
}

progress.loading-spinner:indeterminate {
  --_from: calc(90deg + var(--arc-start, 0deg));
  --_to: calc(90deg + var(--arc-end, 158deg));
  --size: 28px;
  --thickness: 3px;
  --spinner-color: var(--brand-contrast);
  --track-color: rgba(255, 255, 255, 0.24);
  --spinner-duration: 1.3s;
  --_used-spinner-duration: var(--spinner-duration);

  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  appearance: none;
  border: 0;

  background: conic-gradient(
      from var(--_from),
      var(--spinner-color) calc(var(--_to) - var(--_from)),
      transparent 0
    )
    var(--track-color);

  @supports (background-clip: border-area) {
    background-clip: border-area;
    border: var(--thickness) solid transparent;
    background-origin: border-box;
  }

  @supports not (background-clip: border-area) {
    --clip-boundary: calc(100% - var(--thickness));
    mask-image: radial-gradient(
      farthest-side,
      transparent var(--clip-boundary),
      black var(--clip-boundary)
    );
    border: 0;
  }

  @media (forced-colors: active) {
    forced-color-adjust: none;
    --spinner-color: CanvasText;
    --track-color: Canvas;
  }

  animation:
    progress-spin var(--_used-spinner-duration) linear infinite
    var(--progress-dash-animation, );
}

@media (prefers-reduced-motion: reduce) {
  progress.loading-spinner:indeterminate {
    --_used-spinner-duration: 6s;
    --progress-dash-animation: ;
    --arc-end: 158deg;
  }
}

@keyframes progress-spin {
  to {
    rotate: 1turn;
  }
}

@keyframes progress-dash {
  from {
    --arc-start: 0deg;
    --arc-end: 3deg;
  }
  50% {
    --arc-start: 100deg;
    --arc-end: 358deg;
  }
  to {
    --arc-start: 360deg;
    --arc-end: 363deg;
  }
}

/* Alt Bilgi Şeridi */
.info-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@container player-stage (inline-size > 46rem) {
  .info-strip {
    grid-template-columns: 1fr 1fr;
  }
}

.mini-card {
  padding: 1.125rem 1.25rem;
  border-radius: 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.mini-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.external-links {
  margin-top: 0.25rem;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.pill-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.app-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-block: 0.35rem;
}

kbd {
  display: inline-block;
  padding: 0.1rem 0.38rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-color);
  background: var(--surface-elevated);
  font-size: 0.74rem;
  font-family: inherit;
}

/* Native <dialog> Modallar (Kaydırma Kapsama Kuralları) */
dialog:modal {
  overscroll-behavior: contain;
  inline-size: min(92vw, 29rem);
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(10, 8, 6, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dialog-header h2 {
  font-size: 1.125rem;
  font-weight: 800;
}

.dialog-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.sleep-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.sleep-option {
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.sleep-option:hover,
.sleep-option[data-active="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-contrast);
}

.sleep-cancel {
  grid-column: 1 / -1;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.settings-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.theme-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 0.85rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
}

.segment-item {
  position: relative;
  justify-content: center;
  padding: 0.45rem 0.5rem;
  border-radius: 0.6rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.segment-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-item:has(input:checked) {
  background: var(--brand);
  color: var(--brand-contrast);
}

.segment-item:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-inline-size: 0;
}

.switch-label {
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.switch-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
}

input[type="checkbox"][switch] {
  accent-color: var(--brand);
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

input[type="checkbox"][switch]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.diag-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
}

.diag-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.diag-list dt {
  color: var(--text-secondary);
}

.diag-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

/* Bildirim Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 50;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-card);
}

/* Eski WebKit kaydırma çubuğu geri dönüşü */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}
