:root {
  /* Düzen: katalog = ortalanmış tek sütun, gruplara ayrılmış kart ızgarası;
     cihaz sayfası = solda tam yükseklikte 3D sahne, sağda cihaz kartı; telefonda alt alta */
  --bg: #e8edf1;
  --stage-top: #f6f8fa;
  --stage-bottom: #dbe3e9;
  --panel: #ffffff;
  --ink: #142230;
  --muted: #586979;
  --line: #d4dde4;
  --accent: #e0a91a;
  --accent-ink: #7a5800;
  --accent-soft: #fbf1d4;
  --bench: #cdd6dd;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1318;
    --stage-top: #1b242d;
    --stage-bottom: #0e1419;
    --panel: #141c23;
    --ink: #e3eaf0;
    --muted: #93a3b1;
    --line: #27333d;
    --accent: #f0be3c;
    --accent-ink: #f4cd66;
    --accent-soft: #2c2715;
    --bench: #25303a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1318;
  --stage-top: #1b242d;
  --stage-bottom: #0e1419;
  --panel: #141c23;
  --ink: #e3eaf0;
  --muted: #93a3b1;
  --line: #27333d;
  --accent: #f0be3c;
  --accent-ink: #f4cd66;
  --accent-soft: #2c2715;
  --bench: #25303a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0; }
h1 { margin: 0; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; text-wrap: balance; }
h3 { margin: 0; font: 600 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ================= Katalog ================= */
.home { min-height: 100%; display: flex; flex-direction: column; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.site-head { padding: 40px 0 8px; }
.head-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font: 600 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.brand-mark { width: 22px; height: 22px; }
.site-head h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; max-width: 20ch; }
.site-head .lede { margin-top: 12px; max-width: 62ch; font-size: 17px; color: var(--muted); }
.sections { display: inline-flex; gap: 4px; margin-top: 28px; padding: 4px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 55%, var(--bg)); border: 1px solid var(--line); }
.sections a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 7px; text-decoration: none; font-weight: 600; color: var(--muted); }
.sections a:hover { color: var(--ink); }
.sections a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.count { font: 600 12px var(--font-mono); padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }

#catalog { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 32px; }
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; color: var(--muted); }
.cat-head p:first-child { max-width: 62ch; }
.progress { font: 500 13px var(--font-mono); font-variant-numeric: tabular-nums; }
.progress b { color: var(--accent-ink); font-weight: 600; }
.group { display: flex; flex-direction: column; gap: 12px; }
.group h2 { font-size: 15px; font-weight: 600; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dcard {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 168px; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); text-decoration: none; color: inherit;
}
.dcard .sig { font: 600 20px/1.2 var(--font-mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-bottom: auto; padding-bottom: 14px; }
.dcard .name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.dcard .blurb { font-size: 14px; color: var(--muted); }
.dcard .pill { align-self: flex-start; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font: 600 11px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.dcard.ready { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); transition: transform .15s, box-shadow .15s; }
.dcard.ready:hover { transform: translateY(-2px); box-shadow: inset 0 3px 0 var(--accent), 0 8px 20px rgb(0 0 0 / .08); }
.dcard.ready .sig { color: var(--ink); }
.dcard.ready .pill { background: var(--accent); color: #1c1400; }
.dcard.soon { background: transparent; border-style: dashed; }
.dcard.soon .sig, .dcard.soon .name { color: var(--muted); }
.dcard.soon .pill { border: 1px solid var(--line); color: var(--muted); }
.site-foot { margin-top: auto; padding: 28px 0 32px; font-size: 13px; color: var(--muted); }
.site-foot p { margin: 0 0 6px; }
.site-foot .game-link a { font-weight: 600; color: var(--accent-ink); }
.site-foot .legal a, .site-foot .contact a, .sheet .foot.legal a { color: var(--accent-ink); }

/* ================= Kullanım koşulları (kosullar.html) ================= */
.brand a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.lang-jump a { display: inline-block; border-radius: 6px; padding: 4px 9px; font: 600 12px var(--font-mono); letter-spacing: .04em; color: var(--muted); text-decoration: none; }
.lang-jump a:hover { color: var(--ink); }
.legal-page { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 28px; }
.legal-page section { max-width: 68ch; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); scroll-margin-top: 16px; }
.legal-page h1 { font-size: clamp(26px, 3.6vw, 34px); line-height: 1.15; margin-bottom: 6px; }
.legal-page .updated { font: 500 12px var(--font-mono); color: var(--muted); margin-bottom: 16px; }
.legal-page section p + p { margin-top: 12px; }
.legal-page a { color: var(--accent-ink); }
.legal-page .back a { font-weight: 600; text-decoration: none; }

/* Dil seçici (katalog başlığı ve cihaz sayfası) */
.lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px); }
.lang button { border: 0; border-radius: 6px; padding: 4px 9px; background: transparent; font: 600 12px var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }

/* ================= Cihaz sayfası ================= */
.device { display: grid; grid-template-columns: minmax(0, 1fr) 392px; height: 100%; }
.loading, .load-error { grid-column: 1 / -1; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); }

.stage { position: relative; overflow: hidden; min-height: 0; background: radial-gradient(120% 90% at 50% 20%, var(--stage-top), var(--stage-bottom)); }
.gl { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.gl:active { cursor: grabbing; }

.crumbs { position: absolute; top: 16px; left: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.hint { position: absolute; top: 40px; left: 18px; font-size: 12px; color: var(--muted); pointer-events: none; }
.tools { position: absolute; top: 12px; right: 14px; z-index: 5; display: flex; gap: 8px; align-items: center; }
.chipbtn, .switch {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 500;
}
.chipbtn:hover, .switch:hover { border-color: var(--muted); }
.switch { cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 30px; height: 18px; border-radius: 9px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(12px); }

.overlay { position: absolute; inset: 0; pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; padding: 0;
  border-radius: 50%; border: 2px solid var(--accent); background: var(--panel); color: var(--ink);
  font: 600 12px/20px var(--font-mono); text-align: center;
  box-shadow: 0 1px 4px rgb(0 0 0 / .2); pointer-events: auto; transition: opacity .2s, background .15s;
}
.hs.behind { opacity: .3; }
.hs[aria-pressed="true"] { background: var(--accent); color: #1c1400; }
.hs .lbl {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%); width: max-content; max-width: min(240px, 46vw);
  padding: 2px 8px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font: 500 12px/1.5 var(--font-body); opacity: 0; pointer-events: none; transition: opacity .15s;
}
.hs:hover .lbl, .hs:focus-visible .lbl, .hs[aria-pressed="true"] .lbl { opacity: 1; }
.hs.flip .lbl { left: auto; right: 28px; }
.pl { position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }

.caption {
  position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 200px);
  padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(6px); font-size: 14px;
}
.caption b { font: 600 12px var(--font-mono); color: var(--accent-ink); margin-right: 6px; letter-spacing: .02em; }

.hud {
  position: absolute; right: 14px; bottom: 14px; display: flex; gap: 14px; align-items: stretch;
  padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(6px); font-size: 12px;
}
.gauge { display: flex; gap: 8px; }
.track { position: relative; width: 6px; height: 84px; border-radius: 3px; background: var(--line); margin: 6px 0; }
.track i { position: absolute; left: -4px; width: 14px; height: 2px; background: var(--muted); }
.pin { position: absolute; left: -5px; top: 0; width: 16px; height: 10px; margin-top: -4px; border-radius: 3px; background: var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.gauge-labels { list-style: none; margin: 0; padding: 0; position: relative; width: 62px; height: 96px; color: var(--muted); }
.gauge-labels li { position: absolute; left: 0; line-height: 12px; }
.gauge-labels li.on { color: var(--ink); font-weight: 600; }
.readout { margin: 0; display: grid; gap: 4px; align-content: center; }
.readout div { display: flex; justify-content: space-between; gap: 12px; }
.readout dt { color: var(--muted); }
.readout dd { margin: 0; font: 600 13px var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
/* Görünüm penceresi (ör. mikroskopta okülerden görünen) */
.view { margin: 0; display: grid; gap: 6px; justify-items: center; align-content: center; }
.view-slot { display: block; padding: 0; border: 0; border-radius: 50%; background: none; cursor: zoom-in; }
.view.big .view-slot { cursor: zoom-out; }
.view-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.view-canvas { display: block; width: 196px; height: 196px; border-radius: 50%; background: #000; box-shadow: 0 0 0 3px #0b0f13, 0 2px 10px rgb(0 0 0 / .35); transition: width .2s, height .2s; }
.view.big .view-canvas { width: min(360px, 52vh); height: min(360px, 52vh); }
.view.rect .view-slot, .view.rect .view-canvas { border-radius: 10px; }
.view figcaption { font: 600 11px var(--font-mono); color: var(--muted); letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums; }
.stage:has(.view) .caption { max-width: calc(100% - 430px); }
.gl-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }

.sheet { background: var(--panel); border-left: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; }
.sheet-scroll { height: 100%; overflow: auto; padding: 22px 22px 28px; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { margin-bottom: 4px; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.sheet h1 { font-size: 28px; line-height: 1.15; }
.sheet .lede { margin-top: 8px; color: var(--muted); }
.specs { margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.specs div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.specs dt { font-size: 11px; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .25); flex: none; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 10px; background: var(--bg); }
.tabs button { border: 0; border-radius: 7px; padding: 8px 10px; background: transparent; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.panel { display: flex; flex-direction: column; gap: 18px; }

.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.parts button { width: 100%; height: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-align: left; font-size: 13px; line-height: 1.25; }
.parts button:hover { border-color: var(--muted); }
.parts button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.num { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--font-mono); border: 1.5px solid var(--accent); }
.parts button[aria-pressed="true"] .num { background: var(--accent); color: #1c1400; }

.card { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px 16px; display: grid; gap: 8px; }
.card .note { font-size: 14px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); }
.block { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }
.field output { font: 600 14px var(--font-mono); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; }
.scale { display: flex; justify-content: space-between; font: 500 11px var(--font-mono); color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-row.center { align-items: center; }
.btn { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 7px 12px; font-size: 14px; font-weight: 500; }
.btn:hover:not(:disabled) { border-color: var(--muted); background: var(--bg); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: var(--ink); opacity: .9; }
.small { font-size: 13px; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps li { border-radius: 8px; border: 1px solid transparent; }
.steps li.active { border-color: var(--line); background: var(--bg); }
.steps button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 0; background: transparent; text-align: left; font-size: 14px; }
.steps li.active button { font-weight: 600; }
.steps .num { border-color: var(--line); color: var(--muted); }
.steps li.active .num { border-color: var(--accent); color: var(--ink); }
.steps li.done .num { background: var(--muted); border-color: var(--muted); color: var(--panel); }
.steps li.done .num span { display: none; }
.steps li.done .num::after { content: "✓"; font-family: var(--font-body); font-size: 12px; }
.steps p { padding: 0 10px 10px 38px; font-size: 14px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); margin: 0; }
/* Oynatma hızı (Kullanım / Protokol) */
.speed { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; border: 1px solid var(--line); width: fit-content; }
.speed > span { font-size: 13px; color: var(--muted); padding: 0 8px 0 6px; }
.speed button { border: 0; border-radius: 6px; padding: 5px 11px; background: transparent; font-size: 13px; color: var(--muted); }
.speed button:hover { color: var(--ink); }
.speed button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.habits ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.sheet .foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.sheet .foot + .foot { border-top: 0; padding-top: 0; }

/* ================= Telefon ================= */
@media (max-width: 860px) {
  .device { grid-template-columns: 1fr; height: auto; }
  .stage { height: 62vh; height: 62svh; min-height: 380px; }
  .sheet { border-left: 0; border-top: 1px solid var(--line); }
  .sheet-scroll { height: auto; overflow: visible; padding: 18px 16px 24px; }
  .hint { display: none; }
  .caption { max-width: calc(100% - 32px); bottom: auto; top: 44px; font-size: 13px; }
  .hud { padding: 8px 10px; gap: 10px; }
  .readout { display: none; }
  .hud:not(:has(.gauge, .view)) { display: none; }
  .view-canvas { width: 124px; height: 124px; }
  .view.big .view-canvas { width: min(250px, 46svh); height: min(250px, 46svh); }
  .stage:has(.view) .caption { max-width: calc(100% - 32px); }
  .tools .chipbtn { display: none; }
  /* Konum satırı araç çubuğunun altına girmesin: sayfa adı aşağıda başlık olarak zaten var */
  .crumbs strong, .crumbs span:last-of-type { display: none; }
}
@media (max-width: 480px) {
  /* "İç yapı" düğmesi olan sayfalarda yer dar: yalnızca site adı (ana sayfaya bağlantı) kalır */
  .stage:has(.t-inner) .crumbs a:nth-of-type(2), .stage:has(.t-inner) .crumbs span { display: none; }
}
@media (max-width: 420px) {
  .site-head { padding-top: 28px; }
  .specs div { padding: 7px 8px; }
  .specs dd { font-size: 12px; }
  .parts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
