/* Yarış simülatörü sayfası (style.css'in üstüne) */
a.brand, a.tool { color: inherit; text-decoration: none; }
/* üst çubuk: geri düğmesi + başlık, sağda Sıralama ve tam ekran */
.sim-top { gap: 14px; }
.back-btn { border-color: var(--border); background: var(--raised); color: var(--text); padding: 0 14px 0 10px; }
.back-btn:hover { background: var(--raised2); }
.sim-h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#course { touch-action: none; }

/* panel */
.sim-panel { width: min(360px, calc(100vw - 28px)); }
.panel-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
.howto { padding: 4px 16px 12px; }
.howto ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.howto b { color: var(--text); }
.hidden { display: none !important; }
.info-card.hidden { display: flex !important; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon.sm { width: 28px; height: 28px; }
.icon.sm svg { width: 16px; height: 16px; }
.sel-box { border-top: 1px solid var(--border); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; background: rgba(56,189,248,.05); }
.sel-row { display: flex; align-items: center; gap: 8px; }
.sel-row.wrap { flex-wrap: wrap; }
.name-in { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.name-in:focus { outline: none; border-color: rgba(56,189,248,.6); box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.save-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.save-box .tb.sm { height: 28px; min-height: 28px; padding: 0 10px; font-size: 12px; }
.save-box .tb.sm.warn { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.55); color: #fecaca; }
.sel-row .lbl { font-size: 12px; color: var(--muted); width: 52px; flex: 0 0 auto; }
.seg { display: flex; padding: 3px; gap: 2px; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.tb:disabled, .tool:disabled { opacity: .4; cursor: default; }

.standings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.standings li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); padding: 3px 6px; border-radius: 8px; min-width: 0; }
.standings li.me { background: rgba(251,146,60,.14); color: var(--text); }
.standings .pos { width: 18px; text-align: right; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.standings li.fin .pos { color: var(--hak); }
.standings .boat-id { color: #0b1724; font-size: 11px; }
.standings .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .stt { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.standings li.fin .stt { color: var(--hak); font-weight: 600; }

.mini-sw { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); cursor: pointer; }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.events li { font-size: 12.5px; line-height: 1.4; color: var(--text2); padding-left: 8px; border-left: 2px solid var(--border-strong); }
.events li.rule { border-color: var(--yol); }
.events li.bad { border-color: var(--hata); color: #fecaca; }
.events li.good { border-color: var(--hak); color: #bbf7d0; }
.events li.protest { border-color: #f87171; background: rgba(248,113,113,.1); color: #fecaca; font-weight: 600; border-radius: 0 6px 6px 0; padding: 3px 6px 3px 8px; }
.events li.wind { border-color: #7dd3fc; color: #bae6fd; }
.events li.empty { border: 0; padding: 0; color: var(--muted); }
.events .et { display: inline-block; min-width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* alt çubuk: denetim grupları (etiket üstte, gövde altta; aynı yükseklik) */
.ci { width: 15px; height: 15px; flex: 0 0 auto; }
.seg button:disabled, .stepper button:disabled { opacity: .35; cursor: default; }
.stepper { display: inline-flex; align-items: stretch; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.stepper button { width: 38px; border: 0; background: transparent; color: var(--text); font-size: 18px; font-weight: 600; display: grid; place-items: center; }
.stepper button:hover:not(:disabled) { background: var(--raised2); }
.stepper button svg { width: 17px; height: 17px; }
.stepper .val { min-width: 44px; display: grid; place-items: center; padding: 0 4px; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.tb.accent { background: rgba(251,146,60,.16); border-color: rgba(251,146,60,.55); color: #fed7aa; }
.tb.accent:hover:not(:disabled) { background: rgba(251,146,60,.24); }
#btnRoute.has { border-color: rgba(251,146,60,.55); color: #fed7aa; }
#btnRoute.on { background: rgba(251,146,60,.22); border-color: #fb923c; color: #fff; }
.tb.tgl.warn.on { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.55); color: #fecaca; }

/* rota çubuğu: çizim modunda sahnenin üstünde */
.route-bar { position: absolute; top: 12px; left: 12px; right: 12px; margin: 0 auto; width: fit-content; z-index: 7; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; background: var(--panel-solid); border: 1px solid rgba(251,146,60,.55);
  border-radius: 14px; box-shadow: var(--shadow), 0 0 0 4px rgba(251,146,60,.08); }
.rb-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rb-dot { width: 10px; height: 10px; border-radius: 50%; background: #fb923c; flex: 0 0 auto; animation: rbPulse 1.4s ease-in-out infinite; }
@keyframes rbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251,146,60,.6); } 50% { box-shadow: 0 0 0 6px rgba(251,146,60,0); } }
.rb-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rb-text b { font-size: 13.5px; color: #fed7aa; }
.rb-text span { font-size: 12px; color: var(--text2); max-width: 240px; }
.rb-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rb-actions .tb { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-height: 38px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.rb-actions .seg button { height: 30px; }
.rb-done { background: var(--raised); }
.rb-done.ready { background: #16a34a; border-color: #22c55e; color: #fff; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: doneGlow 1.8s ease-out infinite; }
.rb-done.ready:hover { background: #15803d; }
@keyframes doneGlow { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } }
body.drawing #course { cursor: crosshair; }

.toast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 32px);
  background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; box-shadow: var(--shadow); }

@media (max-width: 1100px) {
  .back-btn { width: auto; padding: 0 14px 0 10px; }
  .back-btn .lbl { display: inline; }
  .stepper button { width: 34px; }
  .route-bar { flex-wrap: wrap; gap: 8px; justify-content: space-between; }
  .rb-actions { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .back-btn { width: var(--tap); padding: 0; }
  .back-btn .lbl { display: none; }
  .sim-h1 { font-size: 16px; }
  .toast { bottom: auto; top: 10px; }
  .sim-panel { max-height: 46%; }
  .route-bar { top: 8px; padding: 8px; border-radius: 12px; }
  .rb-text span { white-space: normal; }
  .rb-actions { flex: 1 1 100%; flex-wrap: wrap; }
  .rb-actions .tb { padding: 0 10px; }
  .rb-done { margin-left: auto; }
}
.tb.tgl.on { background: var(--accent-soft); border-color: rgba(56,189,248,.45); color: var(--accent); }
.tb.tgl.warn.on { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.55); color: #fecaca; }
.seg#selRules button[data-v="vermez"].on { background: rgba(248,113,113,.18); color: #fca5a5; }
.standings li.pen .stt { color: #fca5a5; }
/* parkur ayarı */
.course-box .sel-row .lbl { width: 128px; flex: 0 0 128px; }
.course-box .stepper { height: 36px; }
.course-box .stepper .val { min-width: 76px; font-size: 13px; }
.course-box .box-head small { font-weight: 500; font-size: 11.5px; color: var(--text2); margin-left: 6px; }
.course-box .box-head small.changed { color: #fb923c; }
.course-box .box-head .tb.sm { height: 30px; min-height: 30px; padding: 0 10px; font-size: 12.5px; }
/* sağanak ayar kartı: sahnenin sağ altında, seçili sağanakla aynı mavi */
.gust-bar { position: absolute; right: 14px; bottom: 14px; z-index: 7; width: 270px; display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: var(--panel-solid); border: 1.5px solid #38bdf8; border-radius: 14px; box-shadow: var(--shadow), 0 0 0 4px rgba(56,189,248,.12); animation: gbIn .22s ease-out; }
.gust-bar.flash { animation: gbIn .22s ease-out, gbGlow 1.1s ease-out 2; }
@keyframes gbIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes gbGlow { 0% { box-shadow: var(--shadow), 0 0 0 0 rgba(56,189,248,.7); } 100% { box-shadow: var(--shadow), 0 0 0 14px rgba(56,189,248,0); } }
.gb-head { display: flex; align-items: center; gap: 10px; }
.gb-head .rb-text { flex: 1 1 auto; }
.gust-bar .rb-text b { color: #bae6fd; font-size: 14px; }
.gust-bar .rb-text span { max-width: none; font-size: 11.5px; }
.gb-dot { width: 10px; height: 10px; border-radius: 50%; background: #38bdf8; flex: 0 0 auto; animation: gbPulse 1.4s ease-in-out infinite; }
@keyframes gbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,.6); } 50% { box-shadow: 0 0 0 6px rgba(56,189,248,0); } }
.gb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gb-row .lbl { font-size: 12.5px; color: var(--text2); }
.gb-row .stepper .val { min-width: 64px; }
.gb-actions { display: flex; gap: 8px; }
.gb-actions .tb { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-height: 38px; font-size: 13px; font-weight: 600; }
.gb-del { color: #fca5a5; border-color: rgba(248,113,113,.45); }
.gb-del:hover { background: rgba(248,113,113,.16); }
.route-bar:not(.hidden) ~ .gust-bar { display: none; }
/* panel açıkken kart panelin soluna */
@media (max-width: 640px), (max-height: 460px) { .gust-bar { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 10px; border-radius: 12px; gap: 8px; } }
/* sağanak düzenlenirken alttaki Sağanak grubu da mavi: ikisinin bağlantısı görünsün */
.course-box.sea-box .sel-row .lbl { width: 64px; flex: 0 0 64px; }
.boat-box .seg button { padding: 0 8px; }
/* sayfa sabit: iPad Safari'de sayfa esneyip kaymasın */
body.sim { position: fixed; inset: 0; overscroll-behavior: none; }
.panel-scroll { overscroll-behavior: contain; }
/* yakınlaştırma */
.zoom-ctl { position: absolute; left: 14px; bottom: 14px; z-index: 5; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.zoom-ctl button { min-width: 44px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 20px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.zoom-ctl button:hover:not(:disabled) { background: var(--raised2); }
.zoom-ctl button:disabled { opacity: .35; cursor: default; }
.zoom-ctl .zc-txt { font-size: 12px; padding: 0 8px; height: 34px; }
.zoom-ctl .zc-txt .ci { width: 15px; height: 15px; }
.zoom-ctl #btnFollow.on { background: rgba(251,146,60,.18); color: #fed7aa; }
#zoomVal { text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; padding: 1px 0; }
/* elle sürerken: yalnız + / − (büyük), Tümü ve Takip yok (kamera hep teknende) */
body.driving .zoom-ctl #btnZoomFit, body.driving .zoom-ctl #btnFollow { display: none; }
body.driving .zoom-ctl button { min-width: 56px; height: 54px; font-size: 28px; }
@media (max-width: 640px) { .zoom-ctl { left: auto; right: 10px; bottom: auto; top: 10px; } }
@media (max-width: 640px) { .stage:has(.route-bar:not(.hidden)) .zoom-ctl { display: none; } }
@media (max-width: 640px) { .zoom-ctl { padding: 3px; gap: 0; border-radius: 12px; } .zoom-ctl button { min-width: 40px; height: 36px; font-size: 18px; } .zoom-ctl .zc-txt { font-size: 11px; height: 30px; padding: 0 6px; } #zoomVal { display: none; } }
@media (max-width: 640px) { body.driving .zoom-ctl button { min-width: 48px; height: 46px; font-size: 24px; } }
.tb.accent.pulse:not(:disabled) { box-shadow: 0 0 0 0 rgba(251,146,60,.5); animation: tackPulse 2s ease-out infinite; }
@keyframes tackPulse { 0% { box-shadow: 0 0 0 0 rgba(251,146,60,.45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(251,146,60,0); } }

/* ---------- Seçim durumları: seçili / açık olan her şey dolu renkle ---------- */
/* seçenek grupları: seçili olan dolu mavi, ötekiler sönük */
.seg button.on, .speed button.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 1px 4px rgba(56,189,248,.35); }
.seg button.on:hover { color: var(--accent-ink); }
.seg#selRules button[data-v="vermez"].on { background: #ef4444; color: #fff; box-shadow: 0 1px 4px rgba(239,68,68,.4); }
/* aç/kapa düğmeleri: solda küçük anahtar; açıkken dolu renk */
.tb.tgl { display: inline-flex; align-items: center; gap: 6px; }
.tb.tgl::before { content: ''; flex: 0 0 auto; width: 22px; height: 13px; border-radius: 7px; transition: background .15s;
  background: radial-gradient(circle at 6.5px 50%, #94a3b8 4px, transparent 4.5px), var(--raised2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tb.tgl.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tb.tgl.on::before { background: radial-gradient(circle at 15.5px 50%, #fff 4.5px, transparent 5px), rgba(4,32,47,.55); box-shadow: none; }
.tb.tgl.warn.on { background: #dc2626; border-color: #ef4444; color: #fff; }
.tb.tgl.warn.on::before { background: radial-gradient(circle at 15.5px 50%, #fff 4.5px, transparent 5px), rgba(69,10,10,.55); }
#btnRoute.on { background: #fb923c; border-color: #fb923c; color: #2a1204; font-weight: 800; }
/* basınca tepki */
.tb, .seg button, .stepper button, .speed button, .play, .tool, .ms-chip { transition: transform .08s, background .15s, color .15s, border-color .15s; }
.tb:active:not(:disabled), .seg button:active:not(:disabled), .stepper button:active:not(:disabled), .speed button:active, .tool:active { transform: scale(.94); }
.tb:disabled, .seg button:disabled, .stepper button:disabled { cursor: not-allowed; }
.tb.fired { animation: fired .6s ease-out; }
@keyframes fired { 0% { background: #fb923c; color: #2a1204; box-shadow: 0 0 0 0 rgba(251,146,60,.8); } 100% { box-shadow: 0 0 0 14px rgba(251,146,60,0); } }
/* seçili tekne kutusu ve sıralamadaki satırı */
#selBox { background: rgba(56,189,248,.1); box-shadow: inset 3px 0 0 var(--accent); }
#selTitle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 700; }
#selTitle .boat-id { color: #0b1724; font-size: 11px; }
#selTitle em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 2px 6px; }
.standings li { cursor: pointer; }
.standings li:hover { background: var(--raised); }
.standings li.sel { background: rgba(56,189,248,.18); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); }
#course .boat { cursor: pointer; }
#course .gust { cursor: pointer; }

/* sahnenin üstünde durum şeridi: ne oluyor, senin teknen hangi modda, ne seçili */
.mode-strip { position: absolute; top: 12px; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 24px); z-index: 4;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; pointer-events: none; }
.ms-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--panel-solid); border: 1px solid var(--border-strong); color: var(--text2); box-shadow: var(--shadow); }
.ms-chip b { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; }
.ms-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.ms-chip.ms-sel::before, .ms-chip.ms-auto::before { display: none; }
.ph-setup { color: #7dd3fc; } .ph-count { color: #fbbf24; } .ph-race { color: #4ade80; } .ph-end { color: #cbd5e1; }
.ph-pause { color: #e2e8f0; border-color: #e2e8f0; }
.ph-race::before, .ph-count::before { animation: msBlink 1.2s ease-in-out infinite; }
@keyframes msBlink { 50% { opacity: .25; } }
.ms-manual { background: #fb923c; border-color: #fb923c; color: #2a1204; }
.ms-route { background: rgba(251,146,60,.18); border-color: #fb923c; color: #fed7aa; }
.ms-auto b { color: var(--text); }
.ms-warn { background: #dc2626; border-color: #ef4444; color: #fff; font-weight: 800; }
.ms-sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; font-family: inherit; }
.ms-sel .boat-id { color: #0b1724; font-size: 11px; box-shadow: 0 0 0 1.5px rgba(4,32,47,.5); }
.ms-sel .ci.x { width: 13px; height: 13px; opacity: .75; }
.ms-sel:hover .ci.x { opacity: 1; }
.route-bar:not(.hidden) ~ .mode-strip { display: none; }
/* telefon: pusulanın altında, alt alta */
@media (max-width: 640px) {
  .mode-strip { top: 166px; left: 8px; right: auto; margin: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
  .ms-chip { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .ms-auto { display: none; }
  .toast { top: 44px; }
}

/* --- yarış kaydı: "Kaydedelim mi?" ve Kayıtlar penceresi --- */
.picker.dlg { z-index: 9; align-items: center; }
.dlg-panel { width: min(460px, 100%); }
.dlg-panel.wide { width: min(720px, 100%); max-height: min(640px, 100%); }
.dlg-panel .picker-head h2 small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.dlg-body { padding: 8px 22px 4px; display: flex; flex-direction: column; gap: 8px; }
.dlg-lbl { font-size: 12px; color: var(--muted); margin-top: 6px; }
.dlg-in { width: 100%; box-sizing: border-box; height: 44px; font-size: 16px; }
.dlg-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; }
.dlg-actions .tb, .dlg-tools .tb, .rec-act .tb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tb.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tb.primary:hover:not(:disabled) { filter: brightness(1.08); }
.tb.armed { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.55); color: #fecaca; }
.dlg-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 22px 14px; border-bottom: 1px solid var(--border); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.rec-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-sum .rc { font-size: 12px; color: var(--text2); background: var(--raised); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.rec-sum .rc b { color: #fdba74; }
.rec-list { list-style: none; margin: 0; padding: 8px 22px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.rec-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-top: 8px; background: var(--raised); border: 1px solid var(--border); border-radius: 12px; }
.rec-item.cur { border-color: rgba(56,189,248,.55); }
.rec-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rec-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.rec-cur { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.rec-date { font-size: 12px; color: var(--muted); }
.rec-item .rec-sum .rc { background: var(--raised2); }
.rec-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 0 auto; max-width: 300px; }
.rec-act .tb { min-height: 38px; padding: 0 11px; }
.rec-act .tb.del:hover { color: #fecaca; }
.rec-empty { color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; padding: 36px 6px; }
@media (max-width: 640px), (max-height: 460px) {
  .picker.dlg { padding: 12px; align-items: center; }
  .picker.dlg .dlg-panel { height: auto; max-height: 100%; border-radius: 16px; border: 1px solid var(--border); }
  .picker.dlg .dlg-panel.wide { height: 100%; }
  .picker.dlg .picker-head { padding: 14px 8px 4px 16px; }
  .dlg-body, .dlg-tools, .rec-list { padding-left: 14px; padding-right: 14px; }
  .dlg-actions { padding: 12px 14px 14px; }
  .dlg-actions .tb { flex: 1; min-height: 44px; }
  .rec-item { flex-direction: column; align-items: stretch; }
  .rec-act { max-width: none; justify-content: stretch; }
  .rec-act .tb { flex: 1; min-height: 44px; }
}

/* =====================================================================
   Düzen (2026-11-13): animasyon ön planda. Ayarlar kategorilere ayrıldı, varsayılan kapalı.
   body.lay-rail  (yatay ekran): kategori düğmeleri sahnenin sağında dikey ray, seçilen kategori rayın solunda açılır.
   body.lay-strip (dikey ekran, telefon): kategori düğmeleri alt çubukta yatay şerit, seçilen kategori alttan açılır.
   Elle sürerken alt çubuğun yerini dümen paneli alır (body.driving).
   ===================================================================== */
:root { --rail-w: 76px; }
.cat-rail { z-index: 6; }
.cr-cats { display: flex; gap: 2px; }
.cat-rail button { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: transparent; color: var(--text2);
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, transform .08s; }
.cat-rail button svg { width: 20px; height: 20px; flex: 0 0 auto; }
.cat-rail button:hover { background: var(--raised2); color: var(--text); }
.cat-rail button:active { transform: scale(.95); }
.cat-rail button.on { background: var(--accent); color: var(--accent-ink); }
.cat-rail .cr-mine { color: #fdba74; }
.cat-rail .cr-mine.on { background: #fb923c; color: #2a1204; }
.cat-rail button.dot { position: relative; }
.cat-rail button.dot::after { content: ''; position: absolute; top: 7px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #fb923c; box-shadow: 0 0 0 2px var(--panel-solid); }
.cat-rail button.on.dot::after { display: none; }

/* yatay: sağda dikey ray */
body.lay-rail .cat-rail { position: absolute; top: 12px; right: 12px; bottom: 12px; width: var(--rail-w); display: flex; flex-direction: column; pointer-events: none; }
body.lay-rail .cr-quick { display: none; }
body.lay-rail .cr-cats { pointer-events: auto; flex-direction: column; padding: 5px; max-height: 100%; overflow-y: auto; scrollbar-width: none;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
body.lay-rail .cr-cats::-webkit-scrollbar { display: none; }
body.lay-rail .cat-rail button { flex-direction: column; gap: 4px; width: 100%; min-height: 56px; flex: 0 0 auto; font-size: 10.5px; letter-spacing: .02em; }
body.lay-rail .sim-panel { top: 12px; bottom: auto; left: auto; right: calc(var(--rail-w) + 22px); width: 340px; max-height: calc(100% - 24px); border-radius: 16px; }
body.lay-rail .sim-panel.hidden { transform: translateX(16px); }
body.lay-rail .mode-strip { top: 12px; bottom: auto; left: 12px; right: calc(var(--rail-w) + 24px); margin: 0 auto; justify-content: center; flex-direction: row; }
body.lay-rail .stage:has(#panel:not(.hidden)) .mode-strip { right: calc(var(--rail-w) + 374px); }
body.lay-rail .route-bar { right: calc(var(--rail-w) + 24px); }
body.lay-rail .gust-bar { right: calc(var(--rail-w) + 22px); }
body.lay-rail .stage:has(#panel:not(.hidden)) .gust-bar { right: calc(var(--rail-w) + 374px); }
body.lay-rail .toast { left: calc(50% - var(--rail-w) / 2); }
body.lay-rail .quick { display: flex; gap: 8px; flex: 0 0 auto; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); }
body.lay-rail .quick .tb { display: inline-flex; align-items: center; gap: 7px; height: 44px; min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 700; }
body.lay-rail .quick .ci { width: 18px; height: 18px; }

/* dikey ve telefon: alt çubukta yatay şerit (hızlı düğmeler solda) */
body.lay-strip .cat-rail { display: flex; align-items: stretch; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
body.lay-strip .cat-rail::-webkit-scrollbar { display: none; }
body.lay-strip .cr-quick { display: flex; flex: 0 0 auto; gap: 6px; padding-right: 6px; border-right: 1px solid var(--border); }
body.lay-strip .cr-quick .quick { display: flex; gap: 6px; }
body.lay-strip .cr-cats { flex: 1 0 auto; justify-content: space-between; }
body.lay-strip .cat-rail button, body.lay-strip .quick .tb { flex-direction: column; gap: 3px; min-width: 62px; height: 54px; min-height: 54px; padding: 0 6px; font-size: 10.5px; letter-spacing: .02em; }
body.lay-strip .quick .tb { display: flex; align-items: center; justify-content: center; font-weight: 700; border-radius: 11px; min-width: 70px; }
body.lay-strip .quick .ci { width: 20px; height: 20px; }
body.lay-strip .sim-panel { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: min(54%, 520px); border-radius: 16px; }
body.lay-strip .sim-panel.hidden { transform: translateY(16px); }
@media (min-width: 641px) { body.lay-strip .sim-panel { left: auto; width: min(420px, calc(100% - 16px)); } }
body.lay-strip .mode-strip { top: 12px; bottom: auto; left: 0; right: 0; margin: 0 auto; justify-content: center; }
@media (max-width: 640px) { body.lay-strip .mode-strip { top: 166px; left: 8px; right: auto; margin: 0; flex-direction: column; align-items: flex-start; } }
body.lay-strip .stage:has(#panel:not(.hidden)) .gust-bar,
body.lay-strip .stage:has(#panel:not(.hidden)) .toast { display: none; }

/* panel: başlık + yalnız açık kategorinin bölümleri */
.sim-panel .panel-scroll > section { display: none; }
.sim-panel[data-open="mine"] [data-cat="mine"], .sim-panel[data-open="wind"] [data-cat="wind"], .sim-panel[data-open="gust"] [data-cat="gust"],
.sim-panel[data-open="sea"] [data-cat="sea"], .sim-panel[data-open="fleet"] [data-cat="fleet"], .sim-panel[data-open="course"] [data-cat="course"],
.sim-panel[data-open="show"] [data-cat="show"], .sim-panel[data-open="rank"] [data-cat="rank"], .sim-panel[data-open="help"] [data-cat="help"],
.sim-panel[data-open="sel"] [data-cat="sel"] { display: flex; }
.sim-panel .panel-scroll > section.boats-box { flex-direction: column; }
.sim-panel .panel-scroll > section.howto { display: none; }
.sim-panel[data-open="help"] .panel-scroll > section.howto { display: block; }
.sim-panel .panel-scroll > section.hidden { display: none !important; }
.sim-panel .panel-scroll > section:first-of-type, .sim-panel .panel-scroll > section { border-top: 0; }
.sim-panel .panel-scroll > section + section { border-top: 1px solid var(--border); }
.sim-panel #selBox { box-shadow: none; background: transparent; }
.sim-panel .info-head { padding: 12px 6px 8px 16px; border-bottom: 1px solid var(--border); }
.sim-panel #catTitle { font-size: 13px; letter-spacing: .08em; }
.sim-panel .sel-box { background: transparent; padding: 12px 16px 14px; gap: 10px; }
.sim-panel .sel-row { min-height: 40px; }
.sim-panel .sel-row .lbl { width: 72px; flex: 0 0 72px; font-size: 12.5px; }
.sim-panel .course-box .sel-row .lbl { width: 128px; flex: 0 0 128px; }
.sim-panel .tb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-height: 40px; padding: 0 12px; font-size: 13.5px; font-weight: 600; }
.sim-panel .tb.sm { height: 32px; min-height: 32px; font-size: 12.5px; }
.sim-panel select.tb { justify-content: flex-start; text-align: left; padding: 0 10px; }
.sim-panel .grow { flex: 1 1 0; min-width: 0; }
.sim-panel .stepper { height: 40px; }
.grow-seg { flex: 1 1 auto; flex-wrap: nowrap; }
.grow-seg button { flex: 1 1 0; height: 34px; }
.cat-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.cat-note:empty { display: none; }
.cat-foot { justify-content: space-between; }
.cat-foot small { font-size: 12px; color: var(--text2); }
.cat-foot small.changed { color: #fb923c; }
.sheet-ctl { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sheet-ctl .tb { width: 64px; flex: 0 0 auto; }
.sheet-val { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-val.slow { color: #fbbf24; }
#btnRoute.has { border-color: rgba(251,146,60,.55); color: #fed7aa; }
.sim-panel .events { max-height: none; }
.sim-panel .boats-box { padding: 10px 16px 12px; }
.sim-panel .boats-box .box-head { display: flex; }

/* hızlı düğmeler: Tramola ve Elle sür */
.drive-btn { background: rgba(251,146,60,.14); border-color: rgba(251,146,60,.55); color: #fed7aa; }
.drive-btn:hover:not(:disabled) { background: rgba(251,146,60,.24); }
.drive-btn.on { background: #fb923c; border-color: #fb923c; color: #2a1204; }
.drive-btn .ci { color: #fb923c; }
.drive-btn.on .ci { color: #2a1204; }
#btnTack.hidden { display: none; }

/* ---------- Elle sürme: en altta dümen paneli ----------
   iPad'i iki elle tutarken: sol başparmakla dümen (◀ ▶ yan yana), sağ başparmakla iskota (tek düğme: çek / sal),
   yanında Orsa / Tramola; ortada hız, iskota göstergesi, Kavança. Zaman kutusu ayrı (#driveBar). */
body.driving .main-row, body.driving .strip-host, body.driving.lay-strip .bottombar > .cat-rail { display: none; }
.helm-pad { display: flex; align-items: stretch; gap: 12px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; animation: hpIn .2s ease-out; }
@keyframes hpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hp-steer { display: flex; gap: 8px; flex: 0 0 auto; }
.hp-rud, .hp-sheetbtn { flex: 0 0 auto; width: 104px; min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 16px;
  background: var(--raised); border: 1px solid var(--border-strong); color: var(--text); font: inherit; cursor: pointer; touch-action: none; transition: background .1s, transform .08s, border-color .15s; }
.hp-rud .hp-arrow { font-size: 30px; line-height: 1; color: #fb923c; }
.hp-rud b, .hp-sheetbtn b { font-size: 16px; }
.hp-rud small, .hp-sheetbtn small { font-size: 12px; color: var(--text2); font-weight: 600; }
.hp-rud:hover, .hp-sheetbtn:hover { background: var(--raised2); }
.hp-rud.held { background: #fb923c; border-color: #fb923c; color: #2a1204; transform: scale(.97); }
.hp-rud.held .hp-arrow, .hp-rud.held small { color: #2a1204; }
/* iskota düğmesi: yelken simgesi; salıkken (Çek) turuncu çerçeve, trimliyken (Sal) yeşil */
.hp-sheetbtn { width: 120px; border-width: 2px; }
.hp-sheetbtn:active { transform: scale(.96); }
.hp-sheeticon { width: 34px; height: 34px; background: currentColor; -webkit-mask: var(--sail) center / contain no-repeat; mask: var(--sail) center / contain no-repeat; color: #fb923c;
  --sail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2 4 19h7zM13 5c4 3 6 8 6 14h-6z' fill='black'/%3E%3C/svg%3E"); }
.hp-sheetbtn.eased { border-color: #fb923c; }
.hp-sheetbtn.trim { border-color: #22c55e; }
.hp-sheetbtn.trim .hp-sheeticon { color: #4ade80; }
.hp-sheetbtn.over { border-color: #ef4444; }
.hp-sheetbtn.over .hp-sheeticon { color: #f87171; }
.hp-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.hp-stat { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; color: var(--text2); white-space: nowrap; }
.hp-dot { width: 10px; height: 10px; border-radius: 50%; background: #fb923c; flex: 0 0 auto; align-self: center; animation: rbPulse 1.4s ease-in-out infinite; }
.hp-kn { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.hp-point { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* sağ başparmak: Orsa + Tramola sütunu, yanında büyük iskota düğmesi */
.hp-right { display: flex; gap: 8px; flex: 0 0 auto; }
.hp-col { display: flex; flex-direction: column; gap: 8px; width: 132px; }
.hp-col .tb { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 0 10px; font-size: 15px; font-weight: 800; border-radius: 14px; }
.hp-col .ci { width: 18px; height: 18px; }
.hp-tack { background: rgba(251,146,60,.16); border-color: rgba(251,146,60,.6); color: #fed7aa; }
.hp-tack:hover { background: rgba(251,146,60,.26); }
.hp-tack.jibe { background: rgba(167,139,250,.16); border-color: rgba(167,139,250,.6); color: #ddd6fe; }   /* kavança: mor, tramoladan ayırt edilsin */
.hp-tack.jibe:hover { background: rgba(167,139,250,.26); }
.hp-tack.jibe .ci { transform: scaleY(-1); }
/* elle sürerken zaman kutusu: sahnenin üstünde ortada */
.drive-bar { position: absolute; top: 12px; left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 7; display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px;
  background: var(--panel-solid); border: 1px solid rgba(251,146,60,.55); border-radius: 14px; box-shadow: var(--shadow); }
.db-dot { width: 9px; height: 9px; border-radius: 50%; background: #fb923c; animation: rbPulse 1.4s ease-in-out infinite; }
.db-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; color: var(--text); white-space: nowrap; margin-right: 2px; }
.drive-bar .tb { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-height: 38px; padding: 0 13px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.db-done { background: #16a34a; border-color: #22c55e; color: #fff; }
.db-done:hover { background: #15803d; }
.db-reset { color: var(--muted); }
.drive-bar .db-speed { min-width: 48px; padding: 0 10px; font-variant-numeric: tabular-nums; }
.db-speed.changed { background: var(--accent-soft); color: var(--accent); border-color: rgba(56,189,248,.45); }
@media (max-width: 640px) { .db-reset .db-lbl, #hpPlayLbl, .drive-bar .db-dot { display: none; } .drive-bar .db-reset, .drive-bar .db-play { padding: 0 10px; } .drive-bar .db-speed { min-width: 44px; padding: 0 6px; } .drive-bar { max-width: calc(100% - 16px); } }
.reset-btn { border: 1px solid var(--border); }
.reset-btn .lbl { font-size: 13px; font-weight: 600; }
.db-play.paused { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.lay-rail .drive-bar { right: calc(var(--rail-w) + 24px); }
body.driving .mode-strip { display: none; }
@media (max-width: 640px) { .drive-bar { top: auto; bottom: 10px; padding: 4px 4px 4px 10px; gap: 6px; } .drive-bar .tb { height: 36px; min-height: 36px; padding: 0 10px; font-size: 12.5px; } .db-time { font-size: 12.5px; } }
.hp-mid .tb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-height: 44px; padding: 0 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.hp-gwrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hp-gwrap .trim-gauge { flex: 1 1 auto; }
.hp-trimtxt { flex: 0 1 auto; font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.hp-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.hp-actions .tb { padding: 0 8px; }
.hp-vmg.on { background: #0ea5e9; border-color: #38bdf8; color: #04202f; }
/* iskota göstergesi: 0° (tam çekik) … 90° (tam salık); yeşil çentik ideal iskota, yuvarlak senin iskotan */
.trim-gauge { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(248,113,113,.35), var(--raised2) 20%, var(--raised2) 80%, rgba(248,113,113,.35)); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tg-ideal { position: absolute; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; border-radius: 2px; background: #4ade80; }
.tg-knob { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fbbf24; border: 2px solid #fff; transition: left .12s linear; }
.trim-gauge.ok .tg-knob { background: #22c55e; } .trim-gauge.bad .tg-knob { background: #ef4444; } .trim-gauge.off .tg-knob { background: #94a3b8; }
.ph-drive { background: #fb923c; border-color: #fb923c; color: #2a1204; font-weight: 800; }
body.driving .gust-bar { display: none; }
@media (max-width: 1100px) {
  .hp-rud { width: 92px; }
  .hp-sheetbtn { width: 104px; }
  .hp-point { display: none; }
}
/* telefon: dümen solda, Orsa/Tramola + iskota sağda; ortada hız ve gösterge */
@media (max-width: 1100px) { .hp-col { width: 112px; } }
@media (max-width: 640px), (max-height: 460px) {
  .helm-pad { gap: 5px; }
  .hp-steer, .hp-right { gap: 4px; }
  .hp-rud { width: 48px; min-height: 0; border-radius: 12px; }
  .hp-sheetbtn { width: 58px; min-height: 0; border-radius: 12px; }
  .hp-rud .hp-arrow { font-size: 22px; }
  .hp-rud b, .hp-sheetbtn b { font-size: 13px; }
  .hp-rud small, .hp-sheetbtn small { display: none; }
  .hp-sheeticon { width: 24px; height: 24px; }
  .hp-col { width: 74px; gap: 4px; }
  .hp-col .tb { font-size: 12px; min-height: 40px; padding: 0 4px; border-radius: 11px; }
  .hp-col .ci { display: none; }
  .hp-mid { gap: 5px; }
  .hp-kn { font-size: 15px; }
  .hp-point, .hp-trimtxt { display: none; }
  .hp-mid .tb { height: 36px; min-height: 36px; font-size: 11.5px; padding: 0 4px; }
  .hp-actions { grid-template-columns: 1fr; gap: 4px; }
}
body.driving .bottombar { padding-bottom: calc(14px + var(--sab)); }

/* durum rozetleri (2026-11-13): sağ üstte, simge + tek kelime; animasyonu kapatmaz */
.mode-strip { flex-direction: row !important; justify-content: flex-end !important; align-items: center !important; gap: 6px; margin: 0 !important; left: auto !important; width: auto; }
.ms-chip { height: 30px; padding: 0 11px 0 9px; gap: 6px; font-size: 12.5px; font-weight: 700; }
.ms-chip::before { display: none; }
.ms-chip .ci { width: 15px; height: 15px; }
.ms-chip.hidden { display: none; }
body.lay-rail .mode-strip { top: 12px !important; right: calc(var(--rail-w) + 24px) !important; }
body.lay-rail .stage:has(#panel:not(.hidden)) .mode-strip { right: calc(var(--rail-w) + 374px) !important; }
body.lay-strip .mode-strip { top: 12px !important; right: 12px !important; }
@media (max-width: 640px) { body.lay-strip .mode-strip { top: 160px !important; right: 10px !important; flex-direction: column !important; align-items: flex-end !important; gap: 4px; } .ms-chip { height: 28px; font-size: 12px; } }
.ph-pause { background: var(--panel-solid); color: #e2e8f0; border-color: var(--border-strong); }
.ph-end { background: var(--panel-solid); color: #cbd5e1; }

/* Start bayrakları (Parkur → 5-4-1): hazırlık bayrağı seçimi, işaret sırası, kural açıklaması */
.flag-seg { flex: 1 1 100%; flex-wrap: nowrap; }
.flag-seg button { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; }
.flag-ico { width: 21px; height: 15px; flex: 0 0 auto; display: block; }
.flag-seq { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 2px; }
.flag-seq li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.35; color: var(--text2); padding: 4px 8px; border-radius: 7px; }
.flag-seq li b { font-variant-numeric: tabular-nums; width: 32px; flex: 0 0 32px; color: var(--muted); font-weight: 700; }
.flag-seq li.now { background: var(--accent-soft); color: var(--text); }
.flag-seq li.now b { color: var(--accent); }
.flag-seq li.past { opacity: .5; }
.flag-box .box-head small { margin-left: auto; }
.events li.flag { border-color: #fbbf24; color: #fde68a; }

/* Geri sayım çubuğu (sahnenin üstünde ortada): süre 2-5 dk, hızlı geri sayım, 1:00'a / start'a atla */
.count-bar { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 5px 0 12px; border-radius: 19px;
  background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 12.5px; white-space: nowrap; }
.count-bar.hidden { display: none; }
.cb-lbl { color: #fbbf24; font-weight: 700; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.cb-seg { display: none; align-items: center; gap: 2px; padding: 2px; border-radius: 14px; background: var(--raised); border: 1px solid var(--border); }
.count-bar.setup .cb-seg { display: inline-flex; }
.cb-seg button { height: 26px; min-width: 28px; padding: 0 6px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.cb-seg button.on { background: var(--accent); color: var(--accent-ink); }
.cb-seg i { font-style: normal; color: var(--muted); font-size: 11.5px; padding: 0 6px 0 2px; }
.cb-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--raised);
  color: var(--text2); font-weight: 700; font-size: 12px; font-family: inherit; cursor: pointer; }
.cb-btn .ci { width: 12px; height: 12px; }
.cb-btn.hidden { display: none; }
.cb-fast .ci { display: none; }
.cb-fast.on { border-color: rgba(251,191,36,.6); color: #fcd34d; }
.cb-fast.live { background: rgba(251,191,36,.16); }
.cb-fast.live .ci { display: block; }
@media (max-width: 640px) {
  .count-bar { height: 32px; gap: 4px; padding: 0 3px 0 9px; }
  .cb-lbl { display: none; }
  .cb-btn { height: 26px; padding: 0 8px; font-size: 11.5px; }
  .cb-seg button { height: 24px; min-width: 24px; }
}

/* ---------- Simülatör görünümü (2026-11-13 tasarım turu): sahnedeki yüzen parçalar tek dilde ----------
   Hepsi aynı cam yüzey (koyu, hafif bulanık, ince kenar, 14-16 px köşe); simgeli düğmeler 44 px. */
:root { --float-bg: rgba(11, 22, 35, .86); --float-bd: rgba(148, 178, 208, .2); }
.zoom-ctl, body.lay-rail .cr-cats, .count-bar, .drive-bar, .ms-chip {
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); }
.zoom-ctl, body.lay-rail .cr-cats, .count-bar { background: var(--float-bg); border-color: var(--float-bd); }
.zoom-ctl { gap: 2px; padding: 4px; border-radius: 16px; }
.zoom-ctl button { width: 44px; min-width: 44px; height: 44px; border-radius: 11px; color: var(--text2); transition: background .12s, color .12s, transform .08s; }
.zoom-ctl button:hover:not(:disabled) { color: var(--text); }
.zoom-ctl button:active:not(:disabled) { transform: scale(.93); }
.zoom-ctl .ci { width: 20px; height: 20px; }
.zoom-ctl #btnFollow.on { background: #fb923c; color: #2a1204; }
#zoomVal { font-size: 10.5px; font-weight: 700; padding: 0; }
.zc-sep { display: block; height: 1px; margin: 3px 8px; background: var(--float-bd); }
body.driving .zoom-ctl .zc-sep { display: none; }
body.driving .zoom-ctl .ci { width: 26px; height: 26px; }
@media (max-width: 640px) { .zoom-ctl button { width: 40px; min-width: 40px; height: 38px; } }

/* Elle sürerken zaman kutusu (kullanıcı 2026-11-13): simülatörün geri sayım çubuğuyla aynı hap biçimi; süre yalnız gösterge kartında.
   Sıra: Start/Durdur · (kurulumda) geri sayım süresi · hız seçenekleri · Sıfırla · Bitir */
.drive-bar { gap: 6px; padding: 4px; border-radius: 22px; background: var(--float-bg); border: 1px solid var(--float-bd); }
.drive-bar .tb { height: 36px; min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13px; }
.drive-bar .count-bar { height: 36px; padding: 0 2px 0 10px; border: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.driving .cb-fast, body.driving #cbJump1, body.driving #cbJump0 { display: none !important; }
.db-seg { display: inline-flex; height: 36px; padding: 3px; border-radius: 18px; }
.db-seg button { height: 28px; min-width: 34px; padding: 0 11px; border-radius: 14px; font-variant-numeric: tabular-nums; }
.db-seg button.on { background: var(--accent); color: var(--accent-ink); }
.drive-bar .db-speed { display: none; }
/* sol üstteki gösterge kartının yanından başlar (üstüne binmez) */
body.driving .drive-bar { left: 318px; margin: 0 auto; }
@media (max-width: 900px) { .drive-bar .cb-lbl, .drive-bar .db-lbl, .drive-bar .db-seg { display: none; } .drive-bar .db-speed { display: inline-flex; min-width: 46px; padding: 0 8px; } }

/* ---------- Yatay telefon (telefon yalnız yatay kullanılır; js/app-shell.js) ----------
   Ekran yüksekliği ~320-430 px: üst çubuk ve alt çubuk ince, yakınlaştırma sol altta yatay,
   ayar rayı dar; elle sürerken üst çubuk kalkar, dümen ve iskota sahnenin köşelerinde oyun kumandası gibi durur. */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --rail-w: 60px; }
  .sim-top { gap: 8px; padding-top: calc(4px + var(--sat)); padding-bottom: 4px; }
  .sim-top .tool { height: 36px; min-width: 36px; }
  .sim-h1 { font-size: 15px; }
  .acc-chip { width: 36px; height: 36px; }
  .bottombar { padding-top: 6px; padding-bottom: calc(8px + var(--sab)); }
  .bottombar .play { width: 40px; height: 40px; }
  body.lay-rail .quick .tb { height: 40px; min-height: 40px; padding: 0 12px; font-size: 13px; }
  .speed button { min-width: 34px; }
  body.lay-rail .cat-rail { top: 8px; right: 8px; bottom: 8px; }
  body.lay-rail .cat-rail button { min-height: 46px; gap: 2px; font-size: 9.5px; padding: 0 2px; }
  body.lay-rail .cat-rail .ci { width: 18px; height: 18px; }
  body.lay-rail .sim-panel { top: 8px; right: calc(var(--rail-w) + 16px); width: 300px; max-height: calc(100% - 16px); }
  body.lay-rail .stage:has(#panel:not(.hidden)) .mode-strip, body.lay-rail .stage:has(#panel:not(.hidden)) .gust-bar { right: calc(var(--rail-w) + 326px) !important; }
  body.lay-rail .mode-strip { top: 8px !important; right: calc(var(--rail-w) + 18px) !important; }
  /* yakınlaştırma: sol altta yatay, ince */
  .zoom-ctl { left: 8px; bottom: 8px; top: auto; right: auto; flex-direction: row; align-items: center; padding: 3px; gap: 0; border-radius: 12px; }
  .zoom-ctl button { width: 40px; min-width: 40px; height: 38px; }
  .zc-sep { width: 1px; height: 22px; margin: 0 3px; }
  body.driving .zoom-ctl button { width: 46px; min-width: 46px; height: 42px; }
  #zoomVal { display: none; }
  .count-bar { height: 32px; }

  /* --- elle sürme: tam ekran, kumanda sahnenin üstünde --- */
  body.driving .sim-top { display: none; }
  body.driving .stage { padding-top: var(--sat); }
  body.driving .bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: none; border: 0; pointer-events: none;
    padding: 0 calc(10px + env(safe-area-inset-right, 0px)) calc(10px + var(--sab)) calc(10px + env(safe-area-inset-left, 0px)); }
  body.driving .helm-pad { pointer-events: none; align-items: flex-end; gap: 10px; }
  body.driving .helm-pad > * { pointer-events: auto; }
  body.driving .hp-steer, body.driving .hp-right { gap: 8px; }
  body.driving .hp-rud, body.driving .hp-sheetbtn, body.driving .hp-col .tb {
    background: rgba(11, 23, 36, .62); border-color: rgba(148, 178, 208, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  body.driving .hp-rud { width: 74px; height: 86px; min-height: 86px; border-radius: 18px; }
  body.driving .hp-rud .hp-arrow { font-size: 28px; }
  body.driving .hp-rud.held { background: #fb923c; border-color: #fb923c; }
  body.driving .hp-sheetbtn { width: 80px; height: 86px; min-height: 86px; border-radius: 18px; }
  body.driving .hp-sheetbtn.eased { border-color: #fb923c; } body.driving .hp-sheetbtn.trim { border-color: #22c55e; } body.driving .hp-sheetbtn.over { border-color: #ef4444; }
  body.driving .hp-col { width: 84px; height: 86px; gap: 6px; }
  body.driving .hp-col .tb { min-height: 0; border-radius: 13px; font-size: 12.5px; }
  body.driving .hp-tack { background: rgba(120, 53, 15, .62); }
  body.driving .hp-tack.jibe { background: rgba(76, 29, 149, .55); }
  /* orta: hız ve iskota göstergesi küçük cam şerit */
  body.driving .hp-mid { align-self: flex-end; max-width: 300px; margin: 0 auto; padding: 8px 12px; gap: 6px; border-radius: 14px;
    background: rgba(11, 23, 36, .62); border: 1px solid rgba(148, 178, 208, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  body.driving .hp-kn { font-size: 17px; }
  body.driving .hp-point { display: inline; font-size: 11.5px; }
  /* sürerken ayar rayı kalkar (sağ başparmak alanı), yakınlaştırma solda dümenin üstünde */
  body.driving.lay-rail .cat-rail, body.driving .sim-panel { display: none; }
  body.driving .zoom-ctl { flex-direction: column; left: calc(8px + env(safe-area-inset-left, 0px)); top: auto; bottom: calc(102px + var(--sab)); }
  body.driving.lay-rail .drive-bar { left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); margin: 0; top: calc(8px + var(--sat)); }
  body.driving .drive-bar .tb { height: 34px; min-height: 34px; padding: 0 11px; }
  .drive-bar .db-seg, .drive-bar .cb-lbl, .drive-bar .db-lbl { display: none; }
  .drive-bar .db-speed { display: inline-flex; min-width: 44px; padding: 0 8px; }
  .drive-bar .count-bar { padding-left: 2px; }
  body.driving .toast { top: calc(60px + var(--sat)); bottom: auto; left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); transform: none; max-width: min(420px, calc(100% - 290px)); font-size: 12.5px; }
}

/* Tümünü sıfırla (rayın en altında, ayrı çizgiyle; iki dokunuşla onay) */
.cr-sep { display: block; flex: 0 0 auto; background: var(--float-bd); }
body.lay-rail .cr-sep { height: 1px; margin: 4px 8px; }
body.lay-strip .cr-sep { width: 1px; margin: 6px 2px; }
.cat-rail .cr-changed { color: #fdba74; position: relative; }
.cat-rail .cr-changed:hover { background: rgba(251,146,60,.14); color: #fed7aa; }
.cat-rail .cr-changed span { white-space: normal; text-align: center; line-height: 1.1; }
.cat-rail .cr-changed b { position: absolute; top: 4px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #fb923c; color: #1c1917; font-size: 10.5px; line-height: 16px; font-weight: 700; }
.cat-rail .cr-changed.hidden { display: none; }
body.lay-strip .cat-rail .cr-changed { min-width: 64px; }
body.lay-rail .cat-rail .cr-changed:not(.hidden) ~ .cr-reset, body.lay-rail .cat-rail .cr-changed { min-height: 48px; gap: 3px; }
.cat-rail .cr-reset { color: #fca5a5; }
.cat-rail .cr-reset:hover { background: rgba(248,113,113,.14); color: #fecaca; }
.cat-rail .cr-reset.warn { background: #ef4444; color: #fff; }
.cat-rail .cr-reset span { white-space: normal; text-align: center; line-height: 1.1; }
body.lay-strip .cat-rail .cr-reset { min-width: 64px; }
@media (max-width: 900px) { body.lay-strip .cat-rail button { min-width: 56px; } body.lay-strip .quick .tb { min-width: 60px; } }

/* Kurulumda Start: yazılı, geniş, birincil düğme (kullanıcı 2026-11-13: start vermek zordu) */
.play .play-lbl:empty { display: none; }
.bottombar .play.start { width: auto; height: 48px; padding: 0 22px 0 16px; border-radius: 24px; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: .02em; box-shadow: 0 0 0 0 rgba(56,189,248,.5); animation: startPulse 2.2s ease-out infinite; }
@keyframes startPulse { 0% { box-shadow: 0 0 0 0 rgba(56,189,248,.45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(56,189,248,0); } }
@media (max-width: 900px) { .bottombar .play.start { height: 42px; padding: 0 16px 0 12px; font-size: 14px; } }
/* alçak yatay ekran (ör. iPad 1024×768): "Varsayılan" rozeti görünürken ray taşmasın */
@media (max-height: 790px) and (min-height: 501px) { body.lay-rail .cat-rail button { min-height: 51px; gap: 3px; } }
