:root {
  /* yüzeyler */
  --bg: #0b1724; --water: #0a2a44; --panel: rgba(13, 25, 39, 0.94); --panel-solid: #0f1d2d;
  --raised: #162a3e; --raised2: #1d354d; --hover: rgba(255,255,255,.06);
  --border: rgba(148, 178, 208, .16); --border-strong: rgba(148, 178, 208, .3);
  /* metin */
  --text: #eaf1f8; --text2: #c3d1df; --muted: #8aa0b6;
  /* vurgu ve roller */
  --accent: #38bdf8; --accent-ink: #04202f; --accent-soft: rgba(56,189,248,.14);
  --hak: #34d399; --yol: #fbbf24; --dogru: #34d399; --hata: #f87171;
  --c-taktik: #38bdf8; --c-ileri: #a78bfa; --c-kural: #fbbf24; --c-teknik: #34d399;
  --radius: 12px; --shadow: 0 12px 32px rgba(0,0,0,.38);
  --tap: 44px;                      /* dokunma hedefi */
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--water); color: var(--text); overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: manipulation;
  -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; height: 100dvh; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg use { pointer-events: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spacer { flex: 1; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }

/* --- ortak denetimler --- */
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 12px;
  background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--text2); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s; }
.tool svg { width: 20px; height: 20px; flex: 0 0 auto; }
.tool:hover { background: var(--hover); color: var(--text); }
.tool.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(56,189,248,.35); }
button.icon { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--muted);
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; }
button.icon svg { width: 20px; height: 20px; }
button.icon:hover { color: var(--text); background: var(--hover); }
.tb { background: var(--raised); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; min-height: 38px; font-size: 14px; }

/* anahtar (switch) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--raised2); border: 1px solid var(--border-strong); transition: background .15s; flex: 0 0 auto; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-lbl { font-size: 13px; color: var(--text2); }

/* kod rozeti (A4, B1 …): kategori rengiyle */
.code-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px; font-variant-numeric: tabular-nums;
  color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 40%, transparent); flex: 0 0 auto; }
.code-badge:empty { display: none; }

/* --- üst çubuk --- */
.topbar { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; padding: calc(8px + var(--sat)) 14px 8px;
  background: var(--panel-solid); border-bottom: 1px solid var(--border); flex: 0 0 auto; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(140deg, #38bdf8, #2563eb); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.brand-mark svg { width: 22px; height: 22px; }
.brand em { font-style: normal; color: var(--accent); }
.scn-btn { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: min(620px, 52vw); height: 48px; padding: 0 12px 0 10px;
  background: var(--raised); border: 1px solid var(--border); border-radius: 12px; text-align: left; transition: border-color .15s, background .15s; }
.scn-btn:hover { border-color: var(--border-strong); background: var(--raised2); }
/* başlık: tek satıra sığmazsa iki satır (kesilmeden), düğme yüksekliği sabit */
.scn-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.chev { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.tool-group { display: flex; align-items: center; gap: 4px; }

/* --- sahne --- */
.stage { position: relative; flex: 1 1 auto; min-height: 0; background: radial-gradient(120% 90% at 50% 40%, #0d3456 0%, var(--water) 70%); }
#boatLayer { --ls: 1; }      /* tekne etiketi ve notları kendi ölçeğini kullanır (app.js → state.ls) */
svg#course { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: inherit; }

/* marka: sahnenin sol alt köşesi (Velora logosu + ad); tıklamaları geçirir */
.brand-corner { position: absolute; left: 14px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; pointer-events: none;
  font-size: 13px; font-weight: 600; letter-spacing: .2px; color: rgba(234,241,248,.8); white-space: nowrap; }
.brand-corner svg { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
.brand-corner em { font-style: normal; color: var(--accent); }

/* --- bilgi kartı --- */
.info-card { position: absolute; top: 14px; right: 14px; width: min(380px, calc(100vw - 28px)); max-height: calc(100% - 28px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 4; transition: opacity .2s, transform .2s; overflow: hidden; }
.info-card.hidden { opacity: 0; transform: translateX(20px); pointer-events: none; }
.info-head { display: flex; align-items: center; gap: 6px; padding: 10px 6px 6px 16px; }
.handle { display: none; }
.info-title-wrap { flex: 1; min-width: 0; }
.step-meta { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); font-variant-numeric: tabular-nums; }
.step-meta .dot { margin: 0 6px; color: var(--muted); }
.step-meta #stepTime { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.info-scn { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.step-bar { display: flex; gap: 4px; padding: 4px 16px 0; }
.step-bar button { flex: 1; height: 14px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; }
.step-bar button::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--raised2); transition: background .2s; }
.step-bar button.done::before { background: color-mix(in srgb, var(--accent) 45%, var(--raised2)); }
.step-bar button.cur::before { background: var(--accent); }
.step-bar button:hover::before { background: var(--text2); }
.info-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--raised2) transparent; }
.info-body { padding: 8px 16px 14px; overflow-wrap: anywhere; }
.info-body h3 { margin: 4px 0 6px; font-size: 17px; line-height: 1.3; font-weight: 700; }
.info-body p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text2); }
.info-card.flash .info-body, .info-card.flash .step-title { animation: flash .6s ease-out; }
@keyframes flash { from { background: rgba(56,189,248,.12); } to { background: transparent; } }
/* ana sayfa kartı: üst satır = adım sayacı + (Bu ana git) + ‹ › + ×; hepsi aynı yükseklikte, dikey ortalı */
.pg-index .info-head { min-height: 52px; padding: 6px 6px 0 16px; gap: 2px; }
.pg-index .info-head .step-meta { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-nav { display: flex; align-items: center; gap: 0; flex: 0 0 auto; }
.step-nav button.icon { color: var(--text2); }
.step-nav button.icon:disabled { opacity: .3; cursor: default; background: none; }
.goto-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px; margin-right: 4px; border-radius: 16px; flex: 0 0 auto;
  border: 1px solid rgba(56,189,248,.45); background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; }
.goto-pill svg { width: 16px; height: 16px; }
.goto-pill:hover { background: rgba(56,189,248,.24); }
.goto-pill.hidden { display: none; }
.step-title { flex: 0 0 auto; margin: 10px 16px 0; font-size: 17px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.pg-index .info-body { padding: 6px 16px 14px; }
.boats-box { border-top: 1px solid var(--border); padding: 10px 16px 12px; }
.box-head { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.legend { display: flex; flex-direction: column; gap: 6px; }
.boat-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); min-width: 0; }
.boat-id { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: #071522; background: var(--c); flex: 0 0 auto; }
.boat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.role { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 700; flex: 0 0 auto;
  color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); border: 1px solid color-mix(in srgb, var(--r) 35%, transparent); }
.role i { font-style: normal; }
.crowd-row { font-size: 12px; color: var(--muted); }
.crowd-row .boat-id { background: #b8c7d6; }
.key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--muted); }
.key:empty { display: none; }
.key span { display: inline-flex; align-items: center; gap: 5px; }
.key .k { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; font-size: 10px; font-weight: 800; color: #fff; }
.key .k.s { background: #22c55e; } .key .k.i { background: #ef4444; }
.summary-box { border-top: 1px solid var(--border); padding: 4px 16px 12px; font-size: 13px; color: var(--muted); }
.summary-box summary { cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 8px 0; list-style-position: inside; }
.summary-box p { margin: 4px 0 2px; line-height: 1.55; color: var(--text2); overflow-wrap: anywhere; }

/* --- popover'lar --- */
.popover { position: absolute; top: 10px; right: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; z-index: 6; box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 250px; max-height: calc(100% - 20px); overflow-y: auto; }
.popover.hidden { display: none; }
.pop-title { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 6px 0 4px; }
.row-sw { justify-content: space-between; min-height: var(--tap); }
.row-sw .sw-lbl { font-size: 14px; color: var(--text); }
.pop-foot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-size: 11px; color: var(--muted); }
.add-popover { top: auto; bottom: 10px; left: 10px; right: 10px; gap: 8px; }
.add-popover .tb { min-height: var(--tap); }

/* --- senaryo seçici --- */
.picker { position: absolute; inset: 0; z-index: 8; background: rgba(4, 12, 22, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px; }
.picker.hidden { display: none; }
.picker-panel { width: min(940px, 100%); max-height: 100%; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 18px;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.picker-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 14px 6px 22px; }
.picker-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.picker-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.picker-tools { display: flex; align-items: center; gap: 12px; padding: 10px 22px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; flex: 1 1 220px; min-width: 0;
  background: var(--raised); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 14px; color: var(--text); }
.picker-tabs { display: flex; gap: 2px; padding: 3px; background: var(--raised); border: 1px solid var(--border); border-radius: 11px; flex: 0 1 auto; overflow-x: auto; }
.picker-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.picker-tabs button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat); opacity: .8; }
.picker-tabs button:hover { color: var(--text); }
.picker-tabs button.active { background: var(--raised2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.picker-tabs .count { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--muted); }
.picker-tabs button.empty { opacity: .55; }
.picker-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 22px 24px; }
.picker-topic { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 18px 2px 10px; }
.picker-topic::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* kartlar: kare küçük resim (döngüde oynayan ön izleme, js/thumbs.js) + altında başlık */
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 16px 12px; }
.card { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0; text-align: left; background: none; border: 0; color: var(--text); }
.card .thumb { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  background: radial-gradient(120% 100% at 50% 40%, #0d3456 0%, var(--water) 75%); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.card:hover .thumb { border-color: color-mix(in srgb, var(--cat) 60%, transparent); transform: translateY(-2px); }
.card.active .thumb { border-color: var(--cat); box-shadow: 0 0 0 2px var(--cat); }
/* küçük resmin üst köşeleri: solda kod, sağda durum (aynı yükseklik, aynı üst boşluk) */
.card .thumb .code-badge, .card .thumb .now, .card .thumb .lock { position: absolute; top: 8px; height: 24px; z-index: 1; }
.card .thumb .code-badge { left: 8px; background: color-mix(in srgb, var(--cat, var(--accent)) 22%, #0b1724); }
.card .thumb .now, .card .thumb .lock { right: 8px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 7px;
  font-size: 11px; font-weight: 700; background: rgba(7,18,30,.85); }
.card .thumb .now { color: var(--cat); }
.card .ttl { font-size: 13.5px; font-weight: 600; line-height: 1.3; padding: 0 2px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.picker-empty { color: var(--muted); font-size: 14px; padding: 36px 6px; text-align: center; line-height: 1.6; }

/* --- alt çubuk --- */
.bottombar { flex: 0 0 auto; background: var(--panel-solid); border-top: 1px solid var(--border); padding: 10px 14px calc(10px + var(--sab));
  display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.main-row { gap: 10px; }
.pg-index .bottombar { padding-bottom: calc(16px + var(--sab)); }   /* sağ alttaki sürüm etiketi düğmelere binmesin */
.play { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; flex: 0 0 auto;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(56,189,248,.35); transition: transform .1s, filter .15s; }
.play svg { width: 24px; height: 24px; }
.play:hover { filter: brightness(1.08); }
.play:active { transform: scale(.96); }
.timeline { position: relative; flex: 1; min-width: 60px; height: var(--tap); display: flex; align-items: center; }
.timeline input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: var(--tap); margin: 0; background: transparent; cursor: pointer; position: relative; z-index: 1; }
.timeline input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), var(--raised2) var(--p, 0%) 100%); }
.timeline input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--raised2); }
.timeline input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.timeline input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.timeline input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.ticks { position: absolute; left: 9px; right: 9px; top: 0; bottom: 0; pointer-events: none; z-index: 2; }
.ticks button { position: absolute; top: 50%; width: 14px; height: 22px; margin: -11px 0 0 -7px; padding: 0; border: 0; background: transparent; pointer-events: auto; }
.ticks button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 12px; margin: -6px 0 0 -1.5px; border-radius: 2px; background: rgba(234,241,248,.55); }
.ticks button.done::before { background: #062236; opacity: .55; }
.ticks button:hover::before { background: #fff; opacity: 1; height: 16px; margin-top: -8px; }
.time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.time .tot { color: var(--muted); font-weight: 500; }
.speed { display: flex; padding: 3px; gap: 2px; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; flex: 0 0 auto; }
.speed button { height: 32px; min-width: 40px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed button:hover { color: var(--text); }
.speed button.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 1px 4px rgba(56,189,248,.35); }   /* simülatörle aynı: seçili hız dolu mavi */
.add-row { flex-wrap: wrap; }
.add-row .tb { min-height: var(--tap); }
.add-row button.tb { max-width: 240px; }
.add-row .lbl { font-size: 13px; color: var(--muted); }
.add-btn { display: none; }

/* ===== TABLET (iPad portre/yatay) ===== */
@media (max-width: 1100px) {
  .brand-text { display: none; }
  .scn-btn { max-width: 60vw; }
  .tool .lbl { display: none; }
  .tool { width: var(--tap); height: var(--tap); padding: 0; }
  .info-card { width: min(350px, calc(100vw - 28px)); }
}
@media (max-width: 1100px) and (orientation: portrait) {
  /* dikey tablet: bilgi kartı sağ üstte, geniş; alt yarıya inmez (parkur aşağıda) */
  .info-card { top: 12px; right: 12px; left: auto; width: min(560px, 64vw); max-height: 44%; }
  .info-body p { font-size: 15px; }
  .legend { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
}

/* ===== TELEFON ===== */
@media (max-width: 640px) {
  .topbar { gap: 6px; padding-left: 8px; padding-right: 6px; }
  .brand { display: none; }
  .pg-index .topbar .spacer { display: none; }
  #btnFull { display: none; }
  .scn-btn { max-width: none; flex: 1; height: 48px; padding: 0 8px; gap: 8px; }
  .scn-title { font-size: 13px; }
  .tool-group { gap: 6px; }
  .acc-chip { margin-left: 0; }
  .info-card { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 50%; border-radius: 16px; }
  .info-card.hidden { transform: translateY(20px); }
  .info-head { padding-left: 4px; padding-top: 6px; }
  .handle { display: flex; align-items: center; justify-content: center; width: 32px; height: var(--tap); background: transparent; border: 0; flex: 0 0 auto; }
  .handle span { width: 20px; height: 4px; border-radius: 2px; background: var(--muted); display: block; }
  .info-card.collapsed .info-scroll, .info-card.collapsed .info-foot, .info-card.collapsed .step-bar { display: none; }
  .info-card.collapsed .info-scn { color: var(--text); }
  .switch .sw-lbl { display: none; }
  .row-sw .sw-lbl { display: inline; }
  .info-body { padding: 6px 14px 10px; }
  .info-body h3 { font-size: 16px; }
  .info-body p { font-size: 14px; }
  .info-foot { padding: 8px 10px; }
  /* ana sayfa (pg-index; simülatör de .info-card kullanır, etkilenmesin): */
  /* bilgi kartı = alttan çekmece (bottom sheet): sabit yükseklik (sahne odağı zıplamasın), metin içinde kayar.
     Daraltınca yalnız adım başlığı + gezinti kalır; sahne kalan alana sığdırılır (app.js → camArea) */
  .pg-index .info-card { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: min(36%, 300px); max-height: none;
    border-radius: 18px 18px 0 0; border-width: 1px 0 0; box-shadow: 0 -10px 28px rgba(0,0,0,.4); }
  .pg-index .info-card.collapsed { height: auto; }
  /* telefonda sahnenin altı çekmecede: marka çekmecenin hemen üstünde, yalnız simge + kısa ad */
  .pg-index .brand-corner { bottom: calc(var(--sheet, 0px) + 10px); left: 10px; font-size: 12px; }
  .pg-index .brand-corner svg { width: 22px; height: 22px; }
  .pg-index .info-card.hidden { transform: translateY(24px); }
  .pg-index .info-head { position: relative; min-height: 0; padding: 14px 4px 0 14px; gap: 2px; }
  .pg-index .handle { display: flex; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 96px; height: 18px; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; }
  .pg-index .handle span { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); display: block; }
  .pg-index .info-scn { display: none; }
  .pg-index .step-title { margin: 6px 14px 0; font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pg-index .info-card.collapsed .info-scroll, .pg-index .info-card.collapsed .step-bar { display: none; }
  .pg-index .info-card.collapsed .step-title { margin-bottom: 12px; }
  .pg-index .step-bar { padding: 6px 14px 0; }
  .pg-index .info-body { padding: 8px 14px 10px; }
  .pg-index .info-body p { font-size: 15px; line-height: 1.5; }
  .goto-pill span { display: none; }
  .goto-pill { width: 36px; height: 32px; padding: 0; justify-content: center; }
  .boats-box { padding: 8px 14px 10px; }
  .boats-box .box-head { display: none; }
  .legend { flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .legend::-webkit-scrollbar { display: none; }
  .boat-row { flex: 0 0 auto; background: var(--raised); border: 1px solid var(--border); border-radius: 14px; padding: 3px 8px 3px 3px; }
  .boat-row .boat-name { display: none; }
  .crowd-row { display: none; }
  .summary-box { padding: 2px 14px 10px; }
  /* alt boşluk: sürüm etiketi düğmelerin altına sığsın (iPhone'da ev çizgisi payı içinde) */
  .bottombar { padding-left: 8px; padding-right: 8px; }
  .pg-index .bottombar { padding-bottom: max(18px, var(--sab)); }
  .pg-index .ver-badge { bottom: 3px; }
  .main-row { gap: 6px; }
  .play { width: 46px; height: 46px; }
  .time { font-size: 12px; }
  .time .tot { display: none; }
  .speed button { min-width: 34px; padding: 0 4px; }
  .speed button:not(.on) { display: none; }
  .add-row { display: none; }
  .add-btn { display: inline-flex; align-items: center; }
  .picker { padding: 0; }
  .picker-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .picker-head { padding: calc(12px + var(--sat)) 8px 4px 16px; }
  .picker-tools { padding: 8px 16px 12px; }
  .picker-tabs { width: 100%; }
  .picker-tabs button { flex: 1; padding: 0 8px; justify-content: center; }
  .picker-tabs button::before { display: none; }
  .picker-list { padding: 4px 16px 24px; }
  .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .popover { right: 8px; left: auto; }
  .add-popover { left: 8px; }
}

/* ===== TELEFON YATAY (alçak ekran) ===== */
@media (max-height: 460px) and (min-width: 641px) {
  .add-row { display: none; }
  .add-btn { display: inline-flex; align-items: center; }
  .topbar { padding-top: calc(4px + var(--sat)); padding-bottom: 4px; }
  .scn-btn { height: 40px; }
  .scn-cat { display: none; }
  .info-card { width: 300px; top: 8px; right: 8px; max-height: calc(100% - 16px); }
  .info-head { padding-top: 6px; }
  .info-body { padding: 6px 14px 8px; }
  .info-body h3 { font-size: 14px; margin: 2px 0 4px; }
  .info-body p { font-size: 12px; }
  .pg-index .info-head { min-height: 44px; }
  .goto-pill span { display: none; }
  .goto-pill { width: 36px; height: 32px; padding: 0; justify-content: center; }
  .step-title { font-size: 14px; margin-top: 6px; }
  .boats-box .box-head { display: none; }
  .boats-box { padding: 6px 14px 8px; }
  .summary-box { padding: 2px 14px 8px; }
  .switch .sw-lbl { display: none; }
  .row-sw .sw-lbl { display: inline; }
  .bottombar { padding-top: 6px; padding-bottom: calc(6px + var(--sab)); }
  .play { width: 42px; height: 42px; }
}

@media (max-height: 460px) {
  /* yatay telefon: seçici tüm ekranı kaplar, başlık + arama + sekmeler + kapat tek satırda, kartlar kalan yüksekliği doldurur */
  .picker { position: fixed; inset: 0; z-index: 60; padding: 0; background: var(--panel-solid); }
  .picker-panel { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
  .picker-head { display: contents; }
  .picker-head h2 { grid-column: 1; grid-row: 1; align-self: center; font-size: 17px;
    padding: calc(8px + var(--sat)) 4px 8px calc(16px + env(safe-area-inset-left, 0px)); }
  .picker-head .icon { grid-column: 3; grid-row: 1; align-self: center; width: var(--tap); height: var(--tap);
    margin: var(--sat) calc(6px + env(safe-area-inset-right, 0px)) 0 0; }
  .picker-tools { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 8px; padding: calc(8px + var(--sat)) 6px 8px 10px; border-bottom: 0; }
  .search { flex: 1 1 140px; height: 38px; }
  .picker-tabs { flex: 0 0 auto; }
  .picker-tabs button { height: 32px; padding: 0 10px; }
  .picker-list { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--border);
    padding: 2px calc(16px + env(safe-area-inset-right, 0px)) calc(16px + var(--sab)) calc(16px + env(safe-area-inset-left, 0px)); }
  .picker-topic { margin: 12px 2px 8px; }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px 10px; }
}

/* simülatör bağlantısı (üst çubuk) */
/* Simülatör bağlantısı: diğer araç düğmeleriyle aynı yapı, turuncu ve çerçeveli (tıklanabilir olduğu belli) */
a.sim-link { text-decoration: none; color: #fed7aa; background: rgba(251,146,60,.16); border-color: rgba(251,146,60,.6); font-weight: 600; }
a.sim-link svg { color: #fb923c; }
a.sim-link:hover { background: rgba(251,146,60,.26); border-color: #fb923c; color: #fff; }
@media (max-width: 1100px) { a.sim-link.tool { width: auto; padding: 0 12px 0 10px; } a.sim-link .lbl { display: inline; } }
@media (max-width: 640px) { a.sim-link.tool { width: var(--tap); padding: 0; } a.sim-link .lbl { display: none; } }
/* Tam ekranda (iPad Safari) sol üstte sistemin kapatma (X) düğmesi çıkar: üst çubuğun solunu boş bırak */
html.is-fs .topbar { padding-left: 76px; }

/* sürüm etiketi (build.mjs her sayfaya ekler): sağ alt köşe, tıklamaları engellemez */
.ver-badge { position: fixed; right: calc(6px + env(safe-area-inset-right, 0px)); bottom: calc(1px + env(safe-area-inset-bottom, 0px)); z-index: 50; pointer-events: none;
  font: 600 10px/1 system-ui, -apple-system, sans-serif; color: rgba(226,232,240,.55); background: rgba(7,18,30,.7); padding: 2px 5px; border-radius: 6px; letter-spacing: .2px; font-variant-numeric: tabular-nums; }

/* ---------- Giriş ara ekranı, hesap menüsü (js/access.js) ---------- */
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  padding-top: calc(16px + var(--sat)); padding-bottom: calc(16px + var(--sab));
  background: rgba(4, 12, 22, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow-y: auto; }
.gate.hidden { display: none; }
.gate-card { position: relative; width: min(400px, 100%); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45); padding: 32px 28px 20px; margin: auto; }
.gate-x { position: absolute; top: 10px; right: 10px; }
.gate-hero { text-align: center; }
.gate-logo { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: #fff;
  background: linear-gradient(140deg, #38bdf8, #2563eb); box-shadow: 0 8px 24px rgba(37,99,235,.35); }
.gate-logo svg { width: 34px; height: 34px; }
.gate-logo:not(.lock) { background: none; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 8px 24px rgba(0,0,0,.35); overflow: hidden; }
.gate-logo:not(.lock) svg { width: 56px; height: 56px; }
.gate-logo.lock { background: color-mix(in srgb, var(--yol) 16%, transparent); color: var(--yol); box-shadow: none; }
.gate-logo.lock svg { width: 28px; height: 28px; }
.gate-hero h2 { margin: 16px 0 6px; font-size: 21px; font-weight: 700; letter-spacing: .1px; }
.gate-hero h2 em { font-style: normal; color: var(--accent); }
.gate-hero p { text-wrap: balance; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.gate-btns { display: grid; gap: 10px; margin-top: 26px; }
.gate-btn { min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; background: var(--raised); border: 1px solid var(--border-strong);
  color: var(--text); transition: background .15s, filter .15s; }
.gate-btn:hover { background: var(--raised2); }
.gate-btn span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.gate-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gate-btn.primary:hover { filter: brightness(1.07); background: var(--accent); }
.gate-btn.ghost { background: none; border-color: transparent; color: var(--text2); font-weight: 500; }
.gate-btn.velora { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #0b1a33; border-color: rgba(255,255,255,.16); color: #fff; }
.gate-btn.velora:hover { background: #12274a; }
.gate-vmark { display: inline-grid; width: 22px; height: 22px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.22); flex: none; }
.gate-vmark svg { width: 22px; height: 22px; display: block; }
.gate-sub { margin: -8px 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.gate-hint { text-wrap: balance; margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.gate-link { background: none; border: 0; padding: 0; color: var(--muted); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.gate-link:hover { color: var(--text2); }
.gate-owner { display: block; margin: 8px auto 0; font-size: 12px; min-height: 32px; text-decoration: none; opacity: .8; }
.gate-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0 6px 0 0; margin: -12px 0 8px -4px; min-height: 36px;
  color: var(--muted); font-size: 14px; }
.gate-back svg { width: 18px; height: 18px; }
.gate-back:hover { color: var(--text); }
.gate-h { margin: 0 0 16px; font-size: 21px; }
.gate-form { display: grid; gap: 10px; }
.gate-form input { height: 48px; padding: 0 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; width: 100%; min-width: 0; }
.gate-form input::placeholder { color: var(--muted); }
.gate-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.gate-form .gate-btn { margin-top: 6px; }
.gate-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gate-chip { min-height: 40px; border-radius: 10px; background: var(--raised); border: 1px solid var(--border); color: var(--text2); font-size: 13.5px; padding: 0 4px; }
.gate-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.gate-err { color: var(--hata); font-size: 13px; }
.gate-err:empty { display: none; }
.gate-foot { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.gate-consent { display: flex; gap: 8px; align-items: flex-start; flex: 1; font-size: 12px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.gate-consent input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.gate-consent .gate-link { font-size: 12px; line-height: 1.45; white-space: nowrap; }
.gate-consent input { margin-top: 1px; }
.gate-notice { font-size: 12.5px; line-height: 1.5; color: var(--text2); margin-top: 10px; max-height: 34vh; overflow-y: auto; overflow-wrap: anywhere; }
.gate-notice p { margin: 0 0 8px; }
.gate-notice.hidden { display: none; }
/* gizlilik penceresi (openPrivacy) */
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 36px; }
.gate-name { font-weight: 700; font-size: 18px; }
.gate-tag { font-size: 13px; color: var(--muted); margin-top: 2px; }
.gate-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.gate-actions .tb { min-height: 44px; padding: 0 16px; }
.tb.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.gate-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px;
  background: var(--raised); border: 1px solid var(--border); font-size: 14px; color: var(--text); cursor: pointer; }
.gate-toggle .switch { min-height: 0; flex: 0 0 auto; }
.gate-actions .tb { flex: 1; }
html.gate-open .ver-badge { z-index: 210; }

.acc-chip { --rc: var(--muted); display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; margin-left: 6px; flex: 0 0 auto;
  border-radius: 50%; background: var(--raised); border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); color: var(--rc);
  font-size: 16px; font-weight: 700; transition: background .15s, border-color .15s, box-shadow .15s; }
.acc-chip:hover, .acc-chip.on { background: var(--raised2); border-color: var(--rc); }
.acc-chip.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent); }
.acc-chip svg { width: 20px; height: 20px; }
.acc-chip.has-ini svg, .acc-chip:not(.has-ini) .acc-ini { display: none; }
.acc-chip[data-role="sahip"], .acc-av[data-role="sahip"] { --rc: var(--hak); }
.acc-chip[data-role="kayitli"], .acc-av[data-role="kayitli"] { --rc: var(--accent); }
@media (max-width: 1100px) { .acc-chip { width: var(--tap); height: var(--tap); } }
/* hesap ve ayarlar menüsü: üstte kişi, altında hesap işleri, sonra sayfanın ayarları */
.acc-menu { position: fixed; z-index: 120; width: min(300px, calc(100vw - 16px)); background: var(--panel-solid); border: 1px solid var(--border-strong);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.acc-menu.hidden { display: none; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.acc-av { --rc: var(--muted); display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: var(--raised);
  border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); color: var(--rc); font-size: 18px; font-weight: 700; }
.acc-av svg { width: 22px; height: 22px; }
.acc-av:has(.acc-ini:not(:empty)) svg, .acc-av .acc-ini:empty { display: none; }
.acc-id { min-width: 0; flex: 1; }
.acc-who { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-width: 0; }
.acc-role { display: inline-block; flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 2px 8px; border-radius: 6px;
  color: var(--muted); background: var(--raised2); }
.acc-role[data-role="sahip"] { color: var(--hak); background: color-mix(in srgb, var(--hak) 15%, transparent); }
.acc-role[data-role="kayitli"] { color: var(--accent); background: var(--accent-soft); }
.acc-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acc-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px;
  background: none; border: 0; text-align: left; color: var(--text); text-decoration: none; font-size: 14px; flex: 0 0 auto; }
.acc-item:hover { background: var(--hover); }
.acc-item small { color: var(--muted); font-size: 12px; }
.page-settings[hidden] { display: none; }
.page-settings { border-top: 1px solid var(--border); margin-top: 4px; padding: 2px 10px 0; display: flex; flex-direction: column; flex: 0 0 auto; }
.page-settings .row-sw { min-height: 42px; }
.page-settings .pop-title { padding: 12px 0 2px; }
.page-settings .pop-foot { margin: 6px -10px 0; padding: 8px 10px 4px; }
.acc-toast { position: fixed; left: 50%; bottom: calc(90px + var(--sab)); transform: translateX(-50%); z-index: 220; max-width: calc(100vw - 32px);
  background: var(--raised2); border: 1px solid var(--border-strong); color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow); transition: opacity .4s; }
.acc-toast.out { opacity: 0; }
/* kilitli senaryo kartı */
.card.locked .thumb svg { opacity: .55; }
.card.locked .ttl { color: var(--text2); }
.card .thumb .lock { color: var(--yol); }
@media (max-width: 420px) { .gate-card { padding: 28px 20px 18px; } }

/* --- Uygulama kabuğu (js/app-shell.js) ---
   Sayfa uygulama gibi: esnemez, kaymaz, büyümez; yazılar ve simgeler seçilmez; yalnız kendi kaydırma alanları kayar. */
html:not(:has(body[data-shell="page"])) { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; }
html:not(:has(body[data-shell="page"])) body { position: fixed; inset: 0; width: 100%; height: 100%; overscroll-behavior: none;
  /* yatay telefonda çentik / yuvarlak köşe payı (sol ve sağ) */
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
body:not([data-shell="page"]) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body:not([data-shell="page"]) :is(input, textarea, [contenteditable]) { -webkit-user-select: text; user-select: text; }
body:not([data-shell="page"]) :is(.info-scroll, .step-text, .gate-notice, .gate-body p) { -webkit-user-select: text; user-select: text; }
img, svg { -webkit-user-drag: none; }
button, a, [role="button"], label { -webkit-touch-callout: none; }

/* Telefon dikey tutulunca: "Telefonu yan çevir" ekranı (yalnız telefonda; iPad iki yönde de çalışır) */
.rotate-gate { display: none; }
html.is-phone.is-portrait .rotate-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 32px;
  padding-top: calc(32px + var(--sat)); padding-bottom: calc(32px + var(--sab));
  background: radial-gradient(120% 80% at 50% 30%, #12304d 0%, var(--bg) 70%); color: var(--text); text-align: center; }
html.is-phone.is-portrait .ver-badge { z-index: 1001; }
.rg-in { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 300px; }
.rg-in b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.rg-in span { font-size: 15px; line-height: 1.5; color: var(--text2); }
.rg-phone { width: 120px; height: 120px; color: var(--accent); margin-bottom: 8px; }
.rg-dev { transform-origin: 60px 60px; animation: rgTurn 2.4s ease-in-out infinite; }
.rg-arrow { opacity: .55; }
@keyframes rgTurn { 0%, 25% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .rg-dev { animation: none; transform: rotate(-90deg); } }
