/* ==========================================================================
   THEATRON — ortak tasarım sistemi
   Marka paleti ana siteden türetildi: mercan #E3725C · lacivert #130F49 · krem #F5EEE9
   Karanlık "sahne" teması: ışıklar kısık, odak oyunda.
   ========================================================================== */

/* ---------- Tokenlar ---------- */
:root {
  --night-950: #06051c;
  --night-900: #0a0929;
  --night-850: #0e0c37;
  --night-800: #130f49;
  --night-700: #1c1760;
  --night-600: #2a247f;
  --night-500: #3d37a3;

  --coral-700: #a63f2b;
  --coral-600: #c9553f;
  --coral-500: #e3725c;
  --coral-400: #f5a184;
  --coral-300: #f9c3b0;

  --cream-50: #fdfaf7;
  --cream-100: #f9f3ee;
  --cream-200: #f5eee9;
  --cream-300: #ece2db;
  --cream-400: #d8c9be;
  --cream-500: #b9a698;

  --gold-700: #8f6c26;
  --gold-600: #b8903d;
  --gold-500: #d9b15a;
  --gold-400: #ebcb7e;
  --gold-300: #f6e0a6;
  --gold-200: #fbefcb;

  --olive: #93a355;
  --sea: #3f9aa3;
  --wine: #b25596;
  --crimson: #e0505a;
  --sky: #8089f5;
  --green: #79b551;

  --ink: #1a1233;
  --ink-soft: #3a2f57;

  --text: var(--cream-200);
  --text-dim: rgba(245, 238, 233, 0.76);
  --text-mute: rgba(245, 238, 233, 0.55);
  --line: rgba(245, 238, 233, 0.12);
  --line-strong: rgba(245, 238, 233, 0.24);
  --glass: rgba(255, 255, 255, 0.05);

  --font-display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --r-xl: 32px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 30px 60px -24px rgba(0, 0, 0, 0.75);
  --glow-gold: 0 0 0 1px rgba(235, 203, 126, 0.35), 0 18px 50px -14px rgba(217, 177, 90, 0.45);
  --glow-coral: 0 0 0 1px rgba(245, 161, 132, 0.35), 0 18px 50px -14px rgba(227, 114, 92, 0.5);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 1240px;

  /* Yunan "meander" (anahtar) deseni: mask olarak kullanılır, rengi background belirler */
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14' viewBox='0 0 24 14'%3E%3Cpath d='M0 13V1h20v9H6V5h8v1' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='miter'/%3E%3Cpath d='M20 13h4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");

  /* ince film greni */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .9 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

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

/* hidden özniteliği, bileşenlerin display kurallarına yenilmesin */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--night-900);
}

body.th {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    var(--grain),
    radial-gradient(1100px 760px at 50% -12%, rgba(58, 48, 170, 0.55) 0%, transparent 62%),
    radial-gradient(900px 700px at 100% 105%, rgba(120, 38, 92, 0.38) 0%, transparent 60%),
    radial-gradient(800px 600px at -10% 70%, rgba(227, 114, 92, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, var(--night-850), var(--night-900) 40%, var(--night-950));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body.th ::selection {
  background: var(--coral-500);
  color: var(--night-900);
}

body.th h1,
body.th h2,
body.th h3,
body.th h4,
body.th p {
  margin: 0;
}

body.th a {
  color: inherit;
}

body.th img,
body.th svg {
  display: block;
  max-width: 100%;
}

body.th button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ince kaydırma çubuğu */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 238, 233, 0.25) transparent;
}

/* ---------- Tipografi ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.06;
}

.serif-i {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font: 800 0.72rem/1 var(--font-ui);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400));
}

.gold-text {
  background: linear-gradient(180deg, #fff6d9 0%, var(--gold-400) 42%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.coral-text {
  background: linear-gradient(180deg, var(--coral-300), var(--coral-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dim {
  color: var(--text-dim);
}

.mute {
  color: var(--text-mute);
}

/* ---------- Simgeler ---------- */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- Düğmeler ---------- */
.btn {
  --b-bg: rgba(255, 255, 255, 0.07);
  --b-fg: var(--cream-200);
  --b-bd: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--b-bd);
  background: var(--b-bg);
  color: var(--b-fg);
  font: 700 0.95rem/1 var(--font-ui);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.28s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background 0.25s,
    border-color 0.25s,
    filter 0.25s,
    opacity 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 203, 126, 0.65);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.38;
  pointer-events: none;
  filter: saturate(0.4);
}

.btn--gold,
.btn--coral,
.btn--green,
.btn--red,
.btn--amber {
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--gold {
  --b-bg: linear-gradient(180deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600));
  --b-fg: #2b1d06;
  box-shadow:
    0 14px 30px -14px rgba(217, 177, 90, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn--coral {
  --b-bg: linear-gradient(180deg, var(--coral-300), var(--coral-500) 52%, var(--coral-600));
  --b-fg: #2a0f0a;
  box-shadow:
    0 14px 30px -14px rgba(227, 114, 92, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--green {
  --b-bg: linear-gradient(180deg, #b6e08b, var(--green) 55%, #4f8c2f);
  --b-fg: #0d2406;
  box-shadow:
    0 14px 30px -14px rgba(121, 181, 81, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--red {
  --b-bg: linear-gradient(180deg, #f58a90, var(--crimson) 55%, #b32636);
  --b-fg: #fff;
  box-shadow:
    0 14px 30px -14px rgba(224, 80, 90, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--amber {
  --b-bg: linear-gradient(180deg, #f6e0a6, #d9b15a 60%, #b8903d);
  --b-fg: #2b1d06;
  box-shadow:
    0 14px 30px -14px rgba(217, 177, 90, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn--ghost {
  --b-bg: transparent;
}

.btn--quiet {
  --b-bg: transparent;
  --b-bd: transparent;
  color: var(--text-dim);
}

.btn--quiet:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--sm {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
}

.btn--lg {
  min-height: 58px;
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn--xl {
  min-height: 72px;
  padding: 1.2rem 2.4rem;
  font-size: 1.2rem;
}

.btn--icon {
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
}

.btn--block {
  width: 100%;
}

/* parlak geçiş (shine) — birincil düğmelerde */
.btn--gold::after,
.btn--coral::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
}

.btn--gold:hover::after,
.btn--coral:hover::after {
  animation: th-shine 0.9s var(--ease-out);
}

/* ---------- Çipler ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font: 700 0.75rem/1.1 var(--font-ui);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.chip .ico {
  width: 1.05em;
  height: 1.05em;
}

.chip--gold {
  color: var(--gold-300);
  border-color: rgba(235, 203, 126, 0.35);
  background: rgba(217, 177, 90, 0.1);
}

.chip--coral {
  color: var(--coral-300);
  border-color: rgba(245, 161, 132, 0.35);
  background: rgba(227, 114, 92, 0.12);
}

.chip--sea {
  color: #9be1e8;
  border-color: rgba(63, 154, 163, 0.5);
  background: rgba(63, 154, 163, 0.14);
}

.chip--wine {
  color: #f0b3dc;
  border-color: rgba(178, 85, 150, 0.5);
  background: rgba(178, 85, 150, 0.14);
}

.chip--olive {
  color: #cfdc9a;
  border-color: rgba(147, 163, 85, 0.5);
  background: rgba(147, 163, 85, 0.14);
}

button.chip {
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  touch-action: manipulation;
}

button.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

button.chip[aria-pressed='true'] {
  background: linear-gradient(180deg, rgba(235, 203, 126, 0.28), rgba(217, 177, 90, 0.16));
  border-color: rgba(235, 203, 126, 0.7);
  color: var(--gold-200);
}

/* ---------- Paneller ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gilded {
  position: relative;
}

.gilded::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(246, 224, 166, 0.75), rgba(217, 177, 90, 0.12) 38%, rgba(227, 114, 92, 0.4));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  pointer-events: none;
}

/* ---------- Meander (Yunan anahtarı) ayraç ---------- */
.meander {
  height: 14px;
  background: linear-gradient(90deg, transparent, var(--gold-500) 12%, var(--gold-500) 88%, transparent);
  -webkit-mask: var(--meander) repeat-x center / 24px 14px;
  mask: var(--meander) repeat-x center / 24px 14px;
  opacity: 0.55;
}

/* ---------- Form öğeleri ---------- */
.field {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 7, 36, 0.55);
  color: var(--cream-100);
  font: 600 1rem/1.3 var(--font-ui);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.field::placeholder {
  color: var(--text-mute);
  font-weight: 500;
}

.field:hover {
  border-color: rgba(245, 238, 233, 0.4);
}

.field:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(235, 203, 126, 0.18);
  background: rgba(8, 7, 36, 0.8);
}

textarea.field {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}

.label {
  display: block;
  margin-bottom: 0.45rem;
  font: 800 0.72rem/1.2 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* sayaç (stepper) */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 7, 36, 0.5);
}

.stepper__btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream-100);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.2s,
    transform 0.2s var(--ease-out);
}

.stepper__btn:hover {
  background: rgba(235, 203, 126, 0.25);
}

.stepper__btn:active {
  transform: scale(0.88);
}

.stepper__btn[disabled] {
  opacity: 0.3;
  pointer-events: none;
}

.stepper__val {
  min-width: 3.2ch;
  padding: 0 0.35rem;
  text-align: center;
  font: 800 1.1rem/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--cream-50);
}

.stepper--lg .stepper__btn {
  width: 52px;
  height: 52px;
}

.stepper--lg .stepper__val {
  min-width: 4.2ch;
  font-size: 1.5rem;
}

/* bölmeli seçici (segmented) */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(8, 7, 36, 0.5);
  border: 1px solid var(--line);
}

.seg__opt {
  min-width: 44px;
  min-height: 40px;
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: 800 0.88rem/1 var(--font-ui);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.25s var(--ease-out),
    color 0.2s,
    transform 0.2s;
}

.seg__opt:hover {
  color: var(--text);
}

.seg__opt[aria-pressed='true'] {
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  color: #2b1d06;
  box-shadow: 0 6px 16px -8px rgba(217, 177, 90, 0.9);
}

/* anahtar (switch) */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  position: relative;
  width: 48px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line-strong);
  transition:
    background 0.25s,
    border-color 0.25s;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream-200);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease-spring);
}

.switch input:checked + .switch__track {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  border-color: var(--gold-300);
}

.switch input:checked + .switch__track::after {
  transform: translateX(20px);
  background: #fff8e8;
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

/* kaydırıcı (range) */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-500) var(--fill, 50%), rgba(255, 255, 255, 0.14) var(--fill, 50%));
  outline-offset: 6px;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d9, var(--gold-400) 55%, var(--gold-600));
  border: 2px solid var(--night-900);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease-spring);
}

.range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 2px solid var(--night-900);
}

kbd {
  display: inline-block;
  padding: 0.12rem 0.48rem;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.08);
  font: 800 0.72rem/1.4 var(--font-ui);
  color: var(--cream-200);
}

/* ---------- Üst çubuk (oyun sayfaları) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem var(--gutter);
  background: linear-gradient(180deg, rgba(9, 8, 38, 0.94), rgba(9, 8, 38, 0.6));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.45rem 0.6rem;
  border-radius: 999px;
  color: var(--text-dim);
  text-decoration: none;
  font: 700 0.84rem/1 var(--font-ui);
  transition:
    color 0.2s,
    background 0.2s;
}

.topbar__back:hover {
  color: var(--cream-50);
  background: rgba(255, 255, 255, 0.08);
}

.topbar__title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__title .ico {
  color: var(--gold-400);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* dar ekran: uzun oyun adları iki satıra bölünür, kesilmez */
@media (max-width: 480px) {
  .topbar {
    gap: 0.4rem;
  }
  .topbar__title {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    line-height: 1.18;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
  }
  .topbar__actions {
    gap: 0.1rem;
  }
  .topbar .btn--icon {
    width: 40px;
    min-height: 40px;
    height: 40px;
  }
}

/* telefon yan tutulduğunda üst çubuk dikey alanı yemesin */
@media (max-height: 560px) and (orientation: landscape) {
  .topbar {
    padding-block: 0.25rem;
  }
  .topbar .btn--icon {
    width: 38px;
    min-height: 38px;
    height: 38px;
  }
}

/* ---------- Diyalog (sheet) ---------- */
dialog.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  width: min(760px, calc(100vw - 1.6rem));
  max-width: none;
  max-height: calc(100dvh - 1.6rem);
  margin: auto;
  overflow: visible;
}

dialog.sheet::backdrop {
  background: rgba(4, 3, 20, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

dialog.sheet[open] {
  animation: th-sheet-in 0.5s var(--ease-out) both;
}

dialog.sheet[open]::backdrop {
  animation: th-fade 0.4s ease both;
}

/* dialog.sheet ile aynı özgüllük: genişlik sınıfları ezilmesin */
dialog.sheet.sheet--sm {
  width: min(480px, calc(100vw - 1.6rem));
}

dialog.sheet.sheet--lg {
  width: min(980px, calc(100vw - 1.6rem));
}

.sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 1.6rem);
  overflow: hidden;
  border-radius: var(--r-xl);
  background:
    var(--grain),
    radial-gradient(700px 360px at 50% -20%, rgba(70, 58, 190, 0.5), transparent 70%),
    linear-gradient(180deg, #15114f, #0c0a30);
  border: 1px solid rgba(235, 203, 126, 0.28);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.6rem 0.8rem;
}

.sheet__head h2 {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}

.sheet__body {
  padding: 0.4rem 1.6rem 1.4rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.sheet__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.6rem 1.4rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.sheet__x {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.3s var(--ease-out);
}

.sheet__x:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  z-index: 200;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
  width: min(92vw, 460px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 12, 56, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-2);
  font: 700 0.9rem/1.3 var(--font-ui);
  animation: th-toast 0.45s var(--ease-spring) both;
}

.toast.is-out {
  animation: th-toast-out 0.3s ease forwards;
}

.toast--good {
  border-color: rgba(121, 181, 81, 0.6);
}

.toast--bad {
  border-color: rgba(224, 80, 90, 0.7);
}

/* ---------- Yardımcılar ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.stack {
  display: grid;
  gap: var(--gap, 1rem);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 0.75rem);
}

.row--wrap {
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
}

.center {
  text-align: center;
}

.hide {
  display: none !important;
}

/* kaydırınca görünme: JS yoksa her şey görünür kalır */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Animasyonlar ---------- */
@keyframes th-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes th-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes th-pop {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  60% {
    opacity: 1;
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes th-shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-7px);
  }
  40%,
  60% {
    transform: translateX(7px);
  }
}

@keyframes th-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 2deg));
  }
}

@keyframes th-shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes th-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse, rgba(235, 203, 126, 0.55));
  }
  100% {
    box-shadow: 0 0 0 22px rgba(235, 203, 126, 0);
  }
}

@keyframes th-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes th-shimmer {
  to {
    background-position: 200% 0;
  }
}

@keyframes th-sheet-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes th-toast {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes th-toast-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}

@keyframes th-breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 560px) {
  .sheet__head {
    padding: 1.1rem 1.1rem 0.6rem;
  }
  .sheet__body {
    padding: 0.3rem 1.1rem 1.1rem;
  }
  .sheet__foot {
    padding: 0.9rem 1.1rem 1.1rem;
  }
  .topbar__title {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }
  .topbar__back span {
    display: none;
  }
}
