/* Tüm temalar için güvenli varsayılanlar: eski temalar (Klasik, Pano, Minimal, Sıcak gece, Premium) bu değişkenleri
   tanımlamıyordu → telefon panelinin zemini saydam kalıyor, harita içinden görünüyordu. Premium temalar kendi değerlerini ezer. */
body { --card: var(--panel, #101e30); --accent-soft: rgba(255, 255, 255, .08); --font-display: -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif; --amber: #fbbf24; }
/* =====================================================================
   HIKO Flight Wall — V0.5 Premium Edition
   Onaylı temalar: home (Luxury Home, LCD varsayılanı), apple (Apple Minimal,
   mobil varsayılanı), cockpit (Aviation Cockpit). Eski temalar styles.css'te.
   Düzen: LCD %62 harita / %38 fotoğraf+telemetri; mobil: harita + alt sayfa.
   ===================================================================== */

/* ---------- Tema belirteçleri (talimat §3) ---------- */
body.theme-home {
  --bg: #12100e; --card: #1c1915; --panel: #1c1915; --stat: #1c1915; --border: #332c22;
  --fg: #f4efe6; --muted: #a67c52; --accent: #d4af37; --accent-soft: rgba(212, 175, 55, .14);
  --blue: #d4af37; --green: #c9b458; --amber: #e0a458; --red: #e30a17; --red2: #d4af37;
  --map-bg: #15120f; --map-grid: #221d17; --map-route: #d4af37; --map-trail: #f4efe6;
  --map-label: #c8b49a; --map-night: rgba(0, 0, 0, .35); --plane: #f4efe6;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "DejaVu Serif", serif;
}
body.theme-apple {
  --bg: #000000; --card: #141416; --panel: #141416; --stat: #141416; --border: #26262a;
  --fg: #f5f5f7; --muted: #8e8e93; --accent: #e30a17; --accent-soft: rgba(227, 10, 23, .14);
  --blue: #e30a17; --green: #30d158; --amber: #ff9f0a; --red: #e30a17; --red2: #e30a17;
  --map-bg: #0a0a0b; --map-grid: #18181b; --map-route: #e30a17; --map-trail: #f5f5f7;
  --map-label: #a1a1a6; --map-night: rgba(0, 0, 0, .4); --plane: #ffffff;
  --font-display: -apple-system, "SF Pro Display", "HikoInter", system-ui, sans-serif;
}
body.theme-cockpit {
  --bg: #07111f; --card: #0e1d33; --panel: #0e1d33; --stat: #0e1d33; --border: #1e3554;
  --fg: #f0f6fc; --muted: #8b9eb7; --accent: #00d4e8; --accent-soft: rgba(0, 212, 232, .13);
  --blue: #00d4e8; --green: #3ee08f; --amber: #ffb340; --red: #ff4d5e; --red2: #00d4e8;
  --map-bg: #0a1628; --map-grid: #13253f; --map-route: #00d4e8; --map-trail: #f0f6fc;
  --map-label: #8b9eb7; --map-night: rgba(0, 6, 18, .42); --plane: #ffffff;
  --font-display: "HikoInter", -apple-system, system-ui, sans-serif;
}
body.theme-home, body.theme-apple, body.theme-cockpit { background: var(--bg); color: var(--fg); }
body.theme-home .top, body.theme-apple .top, body.theme-cockpit .top { border-bottom-color: var(--accent); }
body.theme-home .panel, body.theme-apple .panel, body.theme-cockpit .panel { background: var(--card); border-color: var(--border); }
body.theme-home button:not(.ghost):not(.sheet-handle), body.theme-cockpit button:not(.ghost):not(.sheet-handle) { background: var(--accent); border-color: var(--accent); color: #111; }

/* ---------- Ortak panel çerçevesi ---------- */
.dash { background: var(--bg); }
body.theme-home .dash, body.theme-apple .dash, body.theme-cockpit .dash { background: var(--bg); border-color: var(--border); }
.dash-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.brandblock { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-brand { font-weight: 300; letter-spacing: .32em; font-size: clamp(14px, 1.6vw, 26px); margin: 0; color: var(--fg); }
.dash-brand .red { color: inherit; }
body.theme-apple .dash-brand { font-weight: 700; letter-spacing: .04em; }
body.theme-apple .dash-brand .red { color: #8e8e93; }
.dstatus { font-size: clamp(11px, .95vw, 15px); font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.dstatus.DEMO { color: var(--accent); }
body.theme-cockpit .dstatus.DEMO { color: #ffb340; }
body.theme-apple .dstatus.DEMO { color: #f5f5f7; }
.dstatus.STALE, .dstatus.UNAVAILABLE { color: var(--amber); }
.head-mid { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mob-flight { display: none; }
.dash-clock { justify-self: end; display: flex; align-items: baseline; gap: 12px; color: var(--fg); margin: 0; }
#dashClock { font-size: clamp(18px, 2.4vw, 44px); font-weight: 300; font-variant-numeric: tabular-nums; }
.dash-date { display: inline; color: var(--muted); font-size: clamp(10px, .85vw, 14px); letter-spacing: .12em; text-transform: uppercase; }
.chip { background: var(--accent-soft); color: var(--accent); }

/* ---------- LCD düzeni: %62 harita | %38 yan sütun ---------- */
.lcd-grid { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: clamp(10px, 1.4vw, 24px); margin-top: 14px; }
.map-col { min-width: 0; }
.map-wrap { position: relative; height: 100%; min-height: 440px; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; background: var(--map-bg); }
.map { position: absolute; inset: 0; }
.route-card { position: absolute; left: clamp(10px, 1.2vw, 22px); bottom: clamp(10px, 1.2vw, 22px); z-index: 520;
  max-width: min(46%, 520px); min-width: 230px; padding: clamp(12px, 1.2vw, 22px) clamp(14px, 1.6vw, 28px);
  background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--border); border-radius: 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.theme-home .route-card, body.theme-home .photo-card, body.theme-home .tele-card { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.route-big { display: flex; align-items: baseline; gap: .35em; font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 84px); line-height: 1; color: var(--fg); }
.route-big .airport { font-size: inherit; font-weight: 500; letter-spacing: .02em; line-height: 1; }
body.theme-apple .route-big .airport, body.theme-cockpit .route-big .airport { font-weight: 800; }
.route-arrow { color: var(--accent); font-size: .7em; }
body.theme-apple .route-arrow { color: #8e8e93; }
.route-names { color: var(--fg); opacity: .85; font-size: clamp(13px, 1.4vw, 24px); margin-top: 6px; }
.route-card .flightno { color: var(--accent); font-size: clamp(14px, 1.5vw, 26px); font-weight: 600; margin-top: 4px; letter-spacing: .04em; text-align: left; }
.route-card .airline { justify-content: flex-start; min-height: 0; margin-bottom: 4px; }
.route-card .track { margin: 10px 0 2px; height: 22px; }
.route-card .track::before { border-top: 3px solid var(--border); top: 10px; border-radius: 2px; }
.route-card .track-fill { top: 10px; height: 3px; background: var(--accent); }
.route-card .plane-icon { font-size: 18px; top: 0; color: var(--accent); }
.route-times { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }

.map-legend { position: absolute; top: 10px; left: 10px; z-index: 510; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted);
  background: color-mix(in srgb, var(--card) 80%, transparent); padding: 4px 8px; border-radius: 6px; }
.lg-plan, .lg-track { display: inline-block; width: 18px; height: 0; margin-left: 4px; }
.lg-plan { border-top: 2px dashed var(--map-route); }
.lg-track { border-top: 3px solid var(--map-trail); }
.pos-badge { position: absolute; top: 10px; right: 10px; z-index: 515; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: rgba(30, 20, 0, .85); color: var(--amber); border: 1px solid var(--amber); }
.map-wrap.pos-stale .m-plane, .map-wrap.pos-stale .plane-marker { opacity: .45; }
.map-wrap.pos-stale .m-trail { opacity: .55; }
.map-btn { top: auto; right: 10px; bottom: 10px; }

/* Yan sütun: fotoğraf + telemetri */
.side { display: flex; flex-direction: column; gap: clamp(10px, 1.2vw, 20px); min-width: 0; }
.photo-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: clamp(8px, .9vw, 14px); display: flex; flex-direction: column; }
.photo-card a { display: block; border-radius: 10px; overflow: hidden; flex: 1 1 auto; min-height: 0; }
.photo-card img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--map-bg); }
.photo-card img.generic { object-fit: contain; }
.photo-card figcaption { text-align: center; padding: 10px 6px 2px; background: transparent; }
.photo-card.photo-missing, body.mode-wall .photo-card.photo-missing { flex: 0 0 auto; }
.photo-card.photo-missing figcaption { padding: 12px 8px; }
.photo-title { font-size: clamp(14px, 1.4vw, 24px); font-weight: 500; color: var(--fg); }
.photo-model { color: var(--fg); font-weight: 500; font-size: inherit; }
.photo-sep { color: var(--accent); }
.photo-badge { margin-top: 4px; }
.photo-badge.generic { background: transparent; color: var(--muted); font-weight: 500; }
.photo-credit { font-size: 11px; }

.tele-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: clamp(12px, 1.3vw, 22px); display: flex; flex-direction: column; gap: 10px; }
.eta-block { text-align: center; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.eta-block .k { text-transform: none; font-size: clamp(12px, 1.1vw, 18px); letter-spacing: .02em; color: var(--fg); opacity: .85; }
.eta-value { font-family: var(--font-display); font-size: clamp(30px, 3.8vw, 68px); font-weight: 400; line-height: 1.05; color: var(--fg); }
body.theme-apple .eta-value, body.theme-cockpit .eta-value { font-weight: 700; }
.eta-block .eta-src { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); opacity: 1; }
.tele-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.tele-grid .stat { background: transparent; border-radius: 0; padding: 8px 10px; border-left: 1px solid var(--border); }
.tele-grid .stat:nth-child(3n + 1) { border-left: 0; }
.tele-grid .stat:nth-child(n + 4) { border-top: 1px solid var(--border); }
.tele-grid .k { text-transform: none; letter-spacing: .01em; font-size: clamp(11px, .95vw, 15px); color: var(--muted); }
.tele-grid .v { font-size: clamp(15px, 1.6vw, 28px); font-weight: 500; color: var(--fg); }
.tele-grid .v.status { font-size: clamp(12px, 1.1vw, 18px); }
.tele-foot { font-size: 11px; font-style: italic; color: var(--muted); text-align: center; }
.tele-card .wx-card { background: transparent; padding: 0; justify-content: center; }
.vs-arrow { color: var(--accent); margin-left: 4px; font-size: .8em; }

/* LCD duvar: tek ekran, kaydırma yok */
body.mode-wall .dash { display: flex; flex-direction: column; }
body.mode-wall .live:not(.hidden) { flex: 1; display: flex; flex-direction: column; min-height: 0; }
body.mode-wall .lcd-grid { flex: 1; min-height: 0; }
body.mode-wall .map-wrap { min-height: 0; }
body.mode-wall .side { min-height: 0; overflow: hidden; }
body.mode-wall .photo-card { flex: 1 1 auto; min-height: 0; }
body.mode-wall .photo-card img { aspect-ratio: auto; height: 100%; max-height: none; }
body.mode-wall .tele-card { flex: 0 0 auto; }
body.mode-wall .note-ribbon { margin-top: 8px; padding: 6px 12px; }
@media (max-height: 640px) {
  body.mode-wall .tele-foot, body.mode-wall .tele-card .wx-card { display: none; }
  body.mode-wall .tele-grid .stat { padding: 4px 8px; }
}

/* ---------- Bekleme ekranı (Luxury Home maketi) ---------- */
.idle { text-align: center; padding: 3vh 10px; }
.idle-inner { transition: transform 2.5s ease; }
.idle-brand { font-family: var(--font-display); letter-spacing: .5em; font-size: clamp(13px, 1.5vw, 26px); color: var(--fg); opacity: .9; }
.idle-clock { font-family: var(--font-display); font-weight: 400; font-size: clamp(72px, 13vw, 230px); line-height: 1; margin-top: 3vh; color: var(--fg); display: inline-block; }
.idle-tz { display: inline-block; font-family: var(--font-display); font-size: clamp(40px, 7vw, 120px); margin-left: .25em; color: var(--fg); }
.idle-rule { width: min(48%, 640px); height: 2px; margin: 2.5vh auto 2vh; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.idle-status { font-size: clamp(20px, 2.8vw, 46px); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.idle-date { color: var(--muted); opacity: .8; margin-top: 8px; font-size: clamp(12px, 1.2vw, 18px); }
.idle-card { margin-top: 4vh; background: color-mix(in srgb, var(--card) 85%, transparent); border: 1px solid var(--border); border-radius: 12px; min-width: min(100%, 640px); padding: 2vh 3vw; }
.idle-card .k { font-size: clamp(12px, 1vw, 16px); text-transform: none; color: var(--fg); opacity: .8; }
.idle-flight { font-size: clamp(22px, 2.6vw, 44px); font-weight: 500; color: var(--fg); }
.idle-route { color: var(--accent); }
body.theme-apple .idle-route { color: #f5f5f7; }
.idle-countdown { font-size: clamp(18px, 2.2vw, 36px); color: var(--muted); font-weight: 400; margin-top: 6px; }
body.theme-apple .idle-clock, body.theme-apple .idle-tz { font-weight: 200; }
body.theme-cockpit .idle-clock { font-weight: 300; }
body.mode-wall .idle:not(.hidden) { flex: 1; display: flex; align-items: center; justify-content: center; }

/* ---------- Mobil: harita öncelikli + alt sayfa (Deriko, dar ekran) ---------- */
body.mobile-ui {
  --mobile-tabs-size: calc(63px + env(safe-area-inset-bottom));
  --mobile-account-size: 51px;
  --mobile-dock: calc(var(--mobile-account-size) + var(--mobile-tabs-size));
  --mobile-top: calc(env(safe-area-inset-top) + 62px);
  --standby-sheet: 64px; /* collapsed handle plus separation from next-flight card */
}
body.mobile-ui:not(.login-view) {
  padding: 0; overflow: hidden; height: 100vh; height: 100dvh;
}
body.mobile-ui main { max-width: none; }
body.mobile-ui:not(.login-view) .top, body.mobile-ui .demo-banner, body.mobile-ui .footer { display: none !important; }
body.mobile-ui .dash { position: fixed; inset: 0; margin: 0; border: 0; border-radius: 0; padding: 0; overflow: hidden; }
body.mobile-ui .dash-head { position: absolute; z-index: 650; top: calc(env(safe-area-inset-top) + 10px);
  left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  display: flex; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 90%, transparent); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body.mobile-ui .brandblock { flex-direction: row; align-items: center; }
body.mobile-ui .dash-brand, body.mobile-ui .head-mid .chip, body.mobile-ui .dash-date { display: none; }
body.mobile-ui .head-mid { order: -1; }
body.mobile-ui .mob-flight { display: inline; font-weight: 600; font-size: 16px; color: var(--fg); }
body.mobile-ui .mob-flight:not(:empty)::after { content: " •"; color: var(--accent); }
body.mobile-ui .dstatus { font-size: 13px; }
body.mobile-ui .dstatus::after { content: " •"; color: var(--fg); }
body.mobile-ui #dashClock { font-size: 16px; font-weight: 500; }
body.mobile-ui .note-ribbon { position: absolute; z-index: 640; top: var(--mobile-top);
  left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  margin-top: 0; font-size: .875rem; line-height: 1.4; overflow-wrap: anywhere;
  max-height: 28dvh; overflow-y: auto; overscroll-behavior: contain; }
body.mobile-ui .note-author { min-width: 0; flex: 0 1 35%; white-space: normal; text-align: end; }
body.mobile-ui .live:not(.hidden) { position: absolute; inset: 0 0 calc(var(--mobile-dock) + var(--sheet-peek, 46dvh)) 0; display: block; }
body.mobile-ui .lcd-grid { display: block; height: 100%; margin: 0; }
body.mobile-ui .map-col, body.mobile-ui .map-wrap { height: 100%; min-height: 0; border-radius: 0; border: 0; }
body.mobile-ui .pos-badge { top: calc(env(safe-area-inset-top) + 66px); }
body.mobile-ui .map-btn { bottom: 34px; }
body.mobile-ui .warnings { padding: 0 18px 0 34px; }
body.mobile-ui .idle:not(.hidden) {
  position: absolute; inset: var(--mobile-top) 0 calc(var(--mobile-dock) + var(--standby-sheet)) 0;
  display: block; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
body.mobile-ui .idle-clock, body.mobile-ui .idle-tz, body.mobile-ui .idle-rule, body.mobile-ui .idle-brand { display: none; }
body.mobile-ui .idle-inner { margin: 0 auto; max-width: 36rem; }
body.mobile-ui .idle-card { min-width: 0; width: 100%; margin-top: 12px; padding: 12px; overflow-wrap: anywhere; }
body.mobile-ui .idle-when { font-size: .875rem; line-height: 1.4; }
body.mobile-ui.is-standby { --standby-sheet: 68px; }
body.mobile-ui.is-standby .sheet:not(.expanded):not(.hidden) {
  height: var(--standby-sheet); padding-bottom: 0; overflow: hidden;
}
body.mobile-ui.is-standby .sheet:not(.expanded) .sheet-more { display: none; }
body.mobile-ui.is-standby .sheet.expanded:not(.hidden) { padding-bottom: 18px; }

.sheet { position: fixed; z-index: 700; left: 0; right: 0; bottom: 0; height: var(--sheet-peek, 46dvh);
  background: var(--card); border-top: 1px solid var(--border); border-radius: 22px 22px 0 0;
  padding: 0 18px calc(env(safe-area-inset-bottom) + 14px); overflow: hidden;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); transition: height .32s cubic-bezier(.3, .7, .3, 1); }
.sheet.expanded { height: calc(100dvh - env(safe-area-inset-top) - 70px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.mobile-ui .sheet { overflow-y: auto; overscroll-behavior: contain;
  padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
body.mobile-ui .sheet.expanded { height: calc(100dvh - var(--mobile-dock) - var(--mobile-top)); }
body.is-standby .sheet:not(.expanded) { height: var(--sheet-peek-idle, 120px); }
body.is-standby .sheet-live { display: none; }
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
.sheet-handle { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; align-items: center; width: 100%; height: 30px; min-height: 30px;
  padding: 0; margin: 0 0 4px; background: var(--card); border: 0; border-radius: 0; cursor: pointer; }
.sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--muted); opacity: .6; }
.sheet-live { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "route photo" "tele tele"; gap: 12px 14px; }
.sheet-live .route-card { grid-area: route; position: static; max-width: none; min-width: 0; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-live .route-big { font-size: clamp(32px, 11vw, 46px); }
.sheet-live .route-names { font-size: 16px; }
.sheet-live .route-card .track { position: relative; }
.sheet-live .photo-card { grid-area: photo; padding: 0; border: 0; background: none; align-self: start; }
.sheet-live .photo-card img { aspect-ratio: 16 / 10; border-radius: 12px; }
.sheet-live .photo-card figcaption { padding: 4px 0 0; }
.sheet-live .photo-title { font-size: 12px; }
.sheet-live .photo-badge, .sheet-live .photo-credit { font-size: 10px; margin-top: 2px; }
.sheet-live .tele-card { grid-area: tele; padding: 10px 6px; border-radius: 14px; background: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.sheet-live .tele-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.sheet-live .eta-block { border: 0; padding: 4px 8px; text-align: center; }
.sheet-live .eta-block .k { font-size: 13px; color: var(--muted); }
.sheet-live .eta-value { font-size: 22px; font-family: inherit; font-weight: 500; }
.sheet-live .tele-grid { grid-column: 2 / 4; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet-live .tele-grid .stat { text-align: center; border-left: 1px solid var(--border); border-top: 0 !important; padding: 4px 8px; }
.sheet-live .tele-grid .stat:nth-child(n + 3) { display: none; }
.sheet-live .tele-grid .stat.primary-countdown { display: block; }
.sheet-live .tele-grid .v { font-size: 20px; }
.sheet-live .tele-foot, .sheet-live .wx-card, .sheet-live .eta-src { display: none; }
.sheet.expanded .sheet-live .tele-grid .stat:nth-child(n + 3) { display: block; }
.sheet.expanded .sheet-live .tele-grid { grid-column: 1 / 4; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet.expanded .sheet-live .tele-grid .stat { border-top: 1px solid var(--border) !important; }
.sheet.expanded .sheet-live .tele-foot, .sheet.expanded .sheet-live .wx-card { display: flex; grid-column: 1 / 4; justify-content: center; }
.sheet.expanded .sheet-live .eta-src { display: block; }
.sheet-live .fresh { grid-column: 1 / -1; justify-content: center; font-size: 13px; }
.sheet-more { margin-top: 14px; }
.sheet-more .panel { margin-top: 12px; padding: 14px; }
.sheet-title { color: var(--muted); font-size: 13px; text-align: center; margin: 2px 0 8px; }
body:not(.is-standby) .sheet-title { display: none; }

/* ---------- LED önizleme: fiziksel en-boy oranına göre ---------- */
.led-panel { aspect-ratio: var(--led-ratio, 2 / 1); }
.route-big { flex-wrap: nowrap; white-space: nowrap; }
.route-big .airport { flex: none; white-space: nowrap; }

/* Mobil düzeltmeler: kompakt daraltılmış sayfa */
.sheet-live .route-big { font-size: min(10vw, 40px); gap: .22em; }
.sheet-live .route-card { min-width: 0; overflow: hidden; }
.sheet:not(.expanded) .sheet-live .route-card .airline,
.sheet:not(.expanded) .sheet-live .route-times,
.sheet:not(.expanded) .sheet-live .photo-badge,
.sheet:not(.expanded) .sheet-live .photo-credit { display: none; }
.sheet-live .route-card .track { margin: 8px 0 0; }
.eta-short { display: none; }
.sheet-live .eta-long { display: none; }
.sheet-live .eta-short { display: inline; }
.sheet-live .eta-value { white-space: nowrap; font-size: 20px; }
.sheet-live .eta-value .tz { font-size: .7em; opacity: .8; }
.sheet.expanded .sheet-live .eta-block { grid-column: 1 / 4; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.sheet.expanded .sheet-live .eta-value { font-size: 30px; }
.sheet-live { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.sheet-live .route-big { font-size: min(8.4vw, 36px); }
.sheet-live .photo-card, .sheet-live figcaption { min-width: 0; }
.sheet-live .photo-title { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
/* Bekleme ekranında başlık tekrar etmesin (maket): yalnızca veri durumu (DEMO) kalır */
body.mode-wall.is-standby .dash-brand, body.mode-wall.is-standby .dash-clock,
body.mode-wall.is-standby .head-mid { visibility: hidden; }
/* color-mix desteklemeyen eski TV tarayıcıları için düz renk yedeği */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .route-card, .map-legend, .idle-card, body.mobile-ui .dash-head { background: var(--card); }
}
/* Demo verisi: canlı yeşil yerine nötr kehribar — demo asla CANLI gibi görünmez */
.fresh.DEMO { color: var(--amber); }
.fresh.DEMO .dot { background: var(--amber); animation: none; box-shadow: none; }

/* APP_MODE=demo kilidi notu */
.demo-lock { margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--amber, #e0a040); border-radius: 10px; font-size: 13px; color: var(--amber, #e0a040); }

/* ===== V0.5.1 — mobil/tablet düzeltmeleri ===== */
/* Roster responsive rules live in the single container-query block below. */
/* Telefon başlığı tek satır */
body.mobile-ui .dash-head { white-space: nowrap; }
/* Değerler harf harf kırılmasın (styles.css'teki overflow-wrap:anywhere yerine) */
.tele-grid .v, .eta-block #sEta { overflow-wrap: normal; word-break: normal; }
/* Tablet (761–1100 px, duvar modu hariç): telemetri 2 sütun */
@media (min-width: 761px) and (max-width: 1100px) {
  body:not(.mode-wall) .tele-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.mode-wall) .tele-grid .stat { border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
  body:not(.mode-wall) .tele-grid .stat:nth-child(odd) { border-left: 0; }
  body:not(.mode-wall) .tele-grid .stat:nth-child(-n + 2) { border-top: 0; }
  body:not(.mode-wall) .tele-grid .v { font-size: 18px; }
}
@media (max-width: 480px) {
  body.mode-wall #teleCard .tele-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.mode-wall #teleCard .tele-grid .stat { min-width: 0; padding: 6px; border-left: 1px solid var(--border); }
  body.mode-wall #teleCard .tele-grid .stat:nth-child(odd) { border-left: 0; }
  body.mode-wall #teleCard .tele-grid .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  body.mode-wall #teleCard .tele-grid .stat:nth-child(-n + 2) { border-top: 0; }
  body.mode-wall #teleCard .tele-grid :is(.k, .v) {
    max-width: 100%; white-space: normal; overflow-wrap: anywhere;
  }
  body.mode-wall #teleCard .tele-grid .v { font-size: clamp(13px, 4vw, 16px); }
}

/* ===== V0.5.1 — premium giriş ekranı ===== */
body.login-view { min-height: 100dvh; }
body.login-view .top { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
body.login-view .top .sub { color: var(--muted); }
body.login-view #loginPanel { max-width: 420px; margin: 9vh auto 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
body.login-view #loginPanel h2 { font-family: var(--font-display, inherit); font-size: 24px; letter-spacing: .02em; text-transform: none;
  color: var(--fg); margin: 0 0 18px; }
body.login-view #loginForm { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
body.login-view #loginForm label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); width: 100%; }
body.login-view #loginForm input { width: 100%; min-height: 48px; font-size: 17px; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--border); color: var(--fg); padding: 10px 14px; }
body.login-view #loginForm input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
body.login-view #loginForm button { width: 100%; min-height: 50px; margin-top: 6px; font-size: 17px; font-weight: 700; border-radius: 12px;
  background: var(--accent); color: #fff; border: 0; }
body.theme-home.login-view #loginForm button, body.theme-cockpit.login-view #loginForm button { color: #111; }
body.login-view .login-hint { margin: 16px 0 0; text-align: center; font-size: 12px; letter-spacing: .04em; color: var(--amber, #e0a040); }
@media (max-width: 760px) { body.login-view #loginPanel { margin: 6vh 12px 0; } }
body.login-view .top { padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; background: transparent; }
body.login-view .top .brand { font-family: var(--font-display, inherit); letter-spacing: .12em; }
body.login-view .top .brand .red { color: var(--accent); }
@media (max-width: 420px) { body.login-view .top .brand { font-size: 20px; letter-spacing: .08em; white-space: nowrap; } }
body.login-view #leafletWarn, body.login-view .vendor-warn { display: none !important; }
body.login-view .footer, body.login-view #footer { display: none !important; }
/* Telefonda Leaflet +/− düğmeleri başlığın altında kalıyordu: iki parmakla yakınlaştırma yeterli */
body.mobile-ui .leaflet-control-zoom { display: none !important; }
/* V0.5.1 düzeltme: gerçek Leaflet haritası (z-index 200–1000 katmanları) alt panelin üstüne çıkıyordu.
   Harita kendi yığın bağlamına hapsedilir; panel ve başlık her zaman üstte kalır. */
body.mobile-ui .live:not(.hidden) { z-index: 1; isolation: isolate; }
body.mobile-ui .map-wrap { position: relative; z-index: 0; isolation: isolate; }
body.mobile-ui .sheet { z-index: 1200; }
body.mobile-ui .dash-head { z-index: 1150; }
body.mobile-ui .note-ribbon { z-index: 1140; }
/* iPhone Safari çizim hatası: panel açıkken haritayı ve harita üstü öğeleri tamamen gizle; panel kendi katmanında */
body.mobile-ui.sheet-open .live, body.mobile-ui.sheet-open .map-wrap, body.mobile-ui.sheet-open #recenterBtn,
body.mobile-ui.sheet-open .map-legend, body.mobile-ui.sheet-open .leaflet-control-container { visibility: hidden !important; }
/* (translateZ geri alındı: iPhone Safari'de panel içindeki dokunma/seçimleri bozuyordu) */

/* ===== V0.5.3 TV (Samsung Tizen vb.): 3–4 m mesafeden okunabilirlik =====
   Yalnızca duvar modu + TV tarayıcısı (body.tv-ui). Telefon/mobil arayüz etkilenmez. */
body.tv-ui .demo-banner { font-size: 1.15vw; padding: .45vw; }
body.tv-ui .dash-head { font-size: 1.4vw; }
body.tv-ui .chip, body.tv-ui .fresh { font-size: 1.35vw; }
body.tv-ui .dash-clock { font-size: 1.5vw; }
body.tv-ui .map-legend { font-size: 1vw; gap: .5vw; padding: .3vw .6vw; }
body.tv-ui .route-card .airline { font-size: 1vw; }
body.tv-ui .route-times { font-size: 1.15vw; }
body.tv-ui .photo-title { font-size: 1.7vw; }
/* İnce baskı TV'de okunmuyor: DEMO bandı zaten her şeyi söylüyor */
body.tv-ui .photo-credit, body.tv-ui .photo-badge { display: none; }
body.tv-ui .tele-card .k, body.tv-ui .eta-src { font-size: 1.1vw; }
body.tv-ui .tele-grid .k { font-size: 1.05vw; }
/* TV'de 4 büyük değer (2×2): "Son veri" ve "Kaynak" zaten üst satırda (DEMO • 3 sn önce) */
body.tv-ui .tele-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.tv-ui .tele-grid .stat:nth-child(n + 5) { display: none; }
body.tv-ui .tele-grid .stat { border-left: 1px solid var(--border); border-top: 1px solid var(--border); padding: .5vw .9vw; }
body.tv-ui .tele-grid .stat:nth-child(odd) { border-left: 0; }
body.tv-ui .tele-grid .stat:nth-child(-n + 2) { border-top: 0; }
body.tv-ui .tele-grid .v { font-size: 2.3vw; white-space: nowrap; }
body.tv-ui #fStatus { font-size: 2vw; margin-top: 0; }
/* Rota kartı: büyük havalimanı kodları kartın dışına taşmasın */
body.tv-ui .route-card { max-width: none; }
body.tv-ui .route-big { font-size: 3.9vw; }
body.tv-ui .route-names { font-size: 1.35vw; }
body.tv-ui .route-card .flightno { font-size: 1.5vw; }
body.tv-ui .tele-grid .stat .k + .k, body.tv-ui #sAgeAbs, body.tv-ui #sMatch { display: none; }
body.tv-ui .tele-foot { display: block; font-size: 1.05vw; }
body.tv-ui .last-known { font-size: .85vw; }
/* Kumanda: tam ekran ipucu */
.tv-fs-hint { position: fixed; left: 50%; bottom: 2.2vw; transform: translateX(-50%); z-index: 3000;
  font: 600 1.5vw/1.2 -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif; color: #0b1220; background: var(--amber, #fbbf24);
  border: 0; border-radius: 999px; padding: .9vw 2.2vw; box-shadow: 0 .4vw 1.6vw rgba(0,0,0,.5); cursor: pointer; }
.tv-fs-hint.hidden { display: none; }
.tv-fs-hint:focus { outline: .25vw solid #fff; outline-offset: .2vw; }

/* V0.6 paylaşım düğmesi: paylaşılmış uçuş vurgulu */
button.shared { color: var(--accent, #60a5fa); border-color: currentColor; }


/* ===== A6.5 TV eşleştirme ekranı (uzaktan okunur) ===== */
.pair-view { position: fixed; inset: 0; display: grid; place-items: center; background: #0b1220; color: #f8fafc; z-index: 4000;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif; }
.pair-view.hidden { display: none; }
.pair-card { width: min(92vw, 1400px); text-align: left; }
.pair-title { font-size: clamp(28px, 3vw, 64px); letter-spacing: .3em; margin: 0 0 1vw; }
.pair-lead { font-size: clamp(18px, 2.2vw, 46px); margin: 0 0 2.5vw; }
.pair-row { display: flex; gap: 4vw; align-items: center; flex-wrap: wrap; }
.pair-qr svg { width: clamp(180px, 22vw, 440px); height: auto; border-radius: 12px; display: block; }
.pair-or { font-size: clamp(14px, 1.5vw, 30px); color: #cbd5e1; margin: 0 0 1vw; }
.pair-code { font-size: clamp(40px, 7vw, 150px); font-weight: 700; letter-spacing: .08em; margin: 0; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.pair-note { font-size: clamp(14px, 1.3vw, 26px); color: #fbbf24; margin-top: 1.5vw; }

/* Audit M1: TV / duvar ekranında sesli anons için tek dokunuşluk düğme (tarayıcı kuralı: kullanıcı hareketi) */
.voice-arm { position: fixed; right: 2vw; bottom: 3vh; z-index: 60; font-size: clamp(16px, 1.6vw, 30px);
  padding: .7em 1.1em; border-radius: 999px; border: 2px solid rgba(255,255,255,.35); background: rgba(10,14,20,.88);
  color: #fff; cursor: pointer; }
.voice-arm:focus, .voice-arm:focus-visible { outline: 4px solid #4c8dff; outline-offset: 3px; }
.voice-arm.armed { opacity: .55; font-size: clamp(12px, 1vw, 20px); }
.voice-arm.hidden { display: none; }

/* P0 #36: iPhone 375/390/430 — scroll the next flight ABOVE the sheet and dock.
   Keep one dominant header clock; idle clock stays hidden on mobile. */
@media (max-width: 430px) {
  body.mobile-ui.is-standby .idle:not(.hidden) {
    bottom: calc(var(--mobile-dock) + var(--standby-sheet) + 12px);
    scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  body.mobile-ui.is-standby #nextCard { margin-bottom: 12px; }
  /* The standby panel and the bottom dock are fixed overlays. Keep the
     scrollable standby viewport above both even on notched iPhones. */
  body.mobile-ui.is-standby .idle:not(.hidden) {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }
  body.mobile-ui.is-standby .sheet:not(.hidden) {
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.mobile-ui #idleClock, body.mobile-ui .idle-tz { display: none !important; }
  body.mobile-ui .dash-clock { display: flex; margin-left: auto; }
}

/* Map labels and telemetry keep their place as device width and text size change. */
.map-legend { max-width: min(34rem, calc(100% - 24px)); }
.map-wrap:not(.pos-stale) .map-legend { color: var(--fg); }
.lg-track { border-color: #fff; }
.m-trail { stroke: #fff; }
#mapHistory:empty { display: none; }
#sAgeAbs, #sServerAt, #sScreenAt { overflow-wrap: anywhere; }
.map-btn:focus-visible, .photo-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.theme-home .aircraft-illustration { background: linear-gradient(135deg, #282018, var(--card)); border-radius: 10px; }
body.theme-apple .aircraft-illustration { background: var(--map-bg); border-radius: 10px; }
body.theme-cockpit .aircraft-illustration { background: var(--map-bg); border: 1px solid var(--border); }
.route-card .plane-icon svg { display: block; width: 1.35em; height: 1.35em; fill: currentColor; }
body.tv-ui .plane-marker { width: 62px; height: 62px; }
.map-wrap:has(.pos-badge:not(.hidden)) .leaflet-top.leaflet-right { top: 42px; }
body.mobile-ui .map-wrap .leaflet-top.leaflet-right { top: calc(env(safe-area-inset-top) + 105px); }

.map-col { display: flex; flex-direction: column; gap: 8px; }
.map-col > .map-wrap { flex: 1 1 auto; }
.map-col > .route-card { position: static; z-index: auto; min-width: 0; max-width: none; padding: 8px 12px; }
.map-col > .route-card .route-big { font-size: clamp(23px, 2.6vw, 46px); }
.map-col > .route-card .route-names { font-size: clamp(12px, 1.05vw, 18px); }
.map-col > .route-card .track { margin-top: 4px; }
.map-key { display: inline-flex; align-items: center; gap: 6px; }
.map-legend small { flex-basis: 100%; font-size: .85em; color: var(--muted); }
.m-track-gap { fill: var(--map-bg); stroke: var(--amber); stroke-width: 2; fill-opacity: 1; }
.m-trail { stroke-width: 4; filter: drop-shadow(0 1px 2px #000); }
.photo-card .photo-title { text-wrap: balance; overflow-wrap: anywhere; }
.photo-card .photo-credit { line-height: 1.4; }
body.mode-wall .photo-card:not(.photo-missing) img { object-fit: contain; }

body.tv-ui .photo-card:not(.photo-missing) .photo-credit,
.sheet:not(.expanded) .sheet-live .photo-card:not(.photo-missing) .photo-credit { display: block; }

/* Roster source conflicts must be visible to pilot and authorized family viewers;
   never erase, reorder, or silently correct stored schedule records. */
.roster-integrity-warning { display: block; margin-top: 4px; color: #f5c46d;
  font-size: 0.76em; line-height: 1.35; font-weight: 600; white-space: normal; }
.roster-needs-review td:first-child { border-left: 3px solid #f5c46d; }
.jr-body .roster-integrity-warning { font-size: 0.8rem; }

#rosterCorrection { overflow-wrap: anywhere; }
#rosterCorrection form { display: grid; gap: .6rem; }
#rosterCorrection select { width: 100%; max-width: 100%; }
#rosterCorrection button { margin-block: .25rem; }


/* P0: functional mobile map controls, including interactive SVG when licensed tiles are absent. */
.map-actions { position: absolute; z-index: 620; right: 10px; bottom: 14px;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 20px); }
.map-actions button { min-height: 44px; padding: 8px 10px; border: 1px solid #8298ac; border-radius: 10px;
  background: rgba(9,20,34,.94); color: #f5f8fc; font-size: 13px; font-weight: 650; white-space: nowrap; }
.map-actions button:focus-visible { outline: 3px solid #98ccfa; outline-offset: 1px; }
.map-actions ~ #recenterBtn { display: none !important; }
#mapFallback svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.viewer-flight-cue { position: absolute; z-index: 580; left: 10px; bottom: 70px; max-width: calc(100% - 20px);
  padding: 8px 10px; font-size: 12px; line-height: 1.3; color: #f3dfb8; border: 1px solid #947a4a;
  border-radius: 10px; background: rgba(9, 17, 27, .9); pointer-events: none; }
.viewer-flight-cue.hidden { display: none; }
body.mobile-ui { --sheet-peek: clamp(205px, 33dvh, 315px); }
body.mobile-ui .map-actions { bottom: var(--mobile-map-controls-bottom, 14px);
  right: max(8px, env(safe-area-inset-right)); left: max(8px, env(safe-area-inset-left)); max-width: none;
  flex-wrap: nowrap; justify-content: center; gap: 6px; }
body.mobile-ui .map-actions button { flex: 1 1 0; min-width: 0; font-size: 12px; padding: 8px 4px; }
body.mobile-ui .map-legend {
  top: auto; bottom: calc(var(--mobile-map-controls-bottom, 14px) + 50px);
  left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  width: fit-content; flex-wrap: wrap; pointer-events: none;
}
body.mobile-ui .viewer-flight-cue { top: var(--mobile-top); bottom: auto;
  left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  width: fit-content; max-width: 330px; }
body.mobile-ui #posBadge:not(.hidden) ~ .viewer-flight-cue { display: none; }
@media (max-height: 500px) {
  body.mobile-ui { --sheet-peek: 50px; --mobile-map-controls-bottom: 5px; }
  body.mobile-ui .sheet:not(.expanded) .sheet-handle { min-height: 44px; }
  body.mobile-ui .map-legend { gap: 3px 6px; }
  body.mobile-ui .map-legend small { flex-basis: auto; }
}
/* Fullscreen map must render ABOVE Home/Settings and remain interactive.
   The fixed #dash establishes a stacking context below .section-page (z=1400);
   z-index on #mapWrap alone is insufficient and made Kapat appear dead. */
body.mobile-ui.hiko-map-fullscreen .dash {
  z-index: 1700 !important;
  overflow: visible !important;
}
body.mobile-ui.hiko-map-fullscreen .section-page {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Safari iOS has restricted Fullscreen API support: use a safe viewport overlay. */
body.mobile-ui.hiko-map-fullscreen #mapWrap { position: fixed !important; z-index: 1800 !important;
  inset: 0 !important; width: 100vw !important; height: 100dvh !important; max-height: none !important;
  border: 0 !important; border-radius: 0 !important; overflow: hidden !important; }
body.mobile-ui.hiko-map-fullscreen .map-actions { top: calc(env(safe-area-inset-top) + 12px); bottom: auto; }
body.mobile-ui.hiko-map-fullscreen .map-legend { bottom: calc(env(safe-area-inset-bottom) + 26px); }
body.mobile-ui.hiko-map-fullscreen .pos-badge { top: calc(env(safe-area-inset-top) + 72px); }
body.mobile-ui.hiko-map-fullscreen .viewer-flight-cue { top: calc(env(safe-area-inset-top) + 72px); }
body.hiko-map-fullscreen .sheet, body.hiko-map-fullscreen .account-bar,
body.hiko-map-fullscreen .mobile-tabs { pointer-events: none; }
@media (max-width: 380px) {
 body.mobile-ui .map-actions button { font-size: 11px; }
 body.mobile-ui .viewer-flight-cue { font-size: 11px; }
}

/* Fullscreen escape/close must not be obstructed by the floating flight header. */
body.hiko-map-fullscreen .dash-head,
body.hiko-map-fullscreen .note-ribbon { visibility: hidden !important; pointer-events: none !important; }
body.hiko-map-fullscreen:not(.mobile-ui) #mapWrap { position: fixed !important; z-index: 1800 !important;
  inset: 0 !important; width: 100vw !important; height: 100dvh !important; min-height: 0 !important;
  border: 0 !important; border-radius: 0 !important; }
body.hiko-map-fullscreen:not(.mobile-ui) .map-actions { top: max(14px, env(safe-area-inset-top)); bottom: auto;
  right: max(10px, env(safe-area-inset-right)); left: max(10px, env(safe-area-inset-left)); max-width: none; }


/* ETA geçtikten sonra, radar kesintisi iniş gibi yorumlanmasın:
   harita üzerindeki uyarı küçük ekranlarda kırılarak görünür kalmalı. */
body.mobile-ui .pos-badge { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); width: auto;
  white-space: normal; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
body.mobile-ui .eta-block .eta-src { color: var(--amber, #e2aa52); line-height: 1.45;
  white-space: normal; letter-spacing: .025em; }


/* Overdue ETA is historic, not a verified landing. Keep the warning legible
   inside the narrow iPhone flight-card column without clipping adjacent stats. */
.eta-value.eta-expired { font-size: clamp(15px, 3.4vw, 25px); white-space: normal; overflow-wrap: normal; line-height: 1.25; color: var(--amber, #e0a040); }
.eta-src { white-space: normal; overflow-wrap: anywhere; }

/* Account for the rendered note's height when the standby content is shown. */
body.mobile-ui.has-visible-note .idle:not(.hidden) {
  top: calc(var(--mobile-top) + var(--hiko-note-clearance, 0px));
  scroll-padding-top: 12px;
}
body.mobile-ui .idle:not(.hidden) {
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
body.mobile-ui .sheet-handle {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  height: auto;
  padding: 9px 10px;
  touch-action: none;
}
body.mobile-ui .sheet-handle .sheet-action-text {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.2;
  color: var(--fg);
  pointer-events: none;
}
body.mobile-ui .sheet.expanded .sheet-handle {
  min-height: 56px;
}
@media (max-height: 500px) {
  body.mobile-ui .sheet:not(.expanded) .sheet-handle {
    min-height: 44px; gap: 3px; padding-block: 4px;
  }
}
body.mobile-ui .sheet-more {
  min-height: 0;
  padding-bottom: 20px;
}
body.mobile-ui .sheet.expanded #rosterPanel {
  overflow: visible;
  padding-bottom: 18px;
}

/* HIKO Trust Evidence: evidence is explanatory, never an authorization grant. */
.flight-evidence{margin-top:4px;border:1px solid var(--border);border-inline-start:3px solid var(--muted);
  background:var(--accent-soft);border-radius:12px;padding:0 12px;min-width:0;max-width:100%;
  overflow-wrap:anywhere;color:var(--fg)}
.flight-evidence[data-kind="landed"]{border-inline-start-color:var(--green)}
.flight-evidence[data-kind="stale"],.flight-evidence[data-kind="unknown"]{border-inline-start-color:var(--amber)}
.flight-evidence summary{display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:48px;padding:10px 0;cursor:pointer;font-size:clamp(13px,1.1vw,16px);font-weight:650}
.flight-evidence summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:5px}
.flight-evidence .flight-evidence-more{font-size:12px;font-weight:450;color:var(--fg);opacity:.85;flex-shrink:0}
.flight-evidence p{margin:0 0 10px;font-size:clamp(12px,1vw,15px);line-height:1.5}
.flight-evidence .flight-evidence-source{font-size:12px;color:var(--fg);opacity:.75;font-variant-numeric:tabular-nums}
@media(prefers-reduced-motion:reduce){.flight-evidence,.flight-evidence summary{transition:none}}

/* P0 LOCAL RELEASE - 2026-11-21: scene controls, truthful countdown and real iPhone layout. */
.flight-view-modes { position: fixed; z-index: 1805; right: max(12px,env(safe-area-inset-right,0px));
  top: calc(env(safe-area-inset-top,0px) + 78px); display: flex; flex-direction: column;
  align-items: flex-end; max-width: calc(100vw - 24px); font-family: inherit; }
.flight-view-modes #flightViewToggle { min-height: 44px; padding: 9px 15px;
  background: rgba(24,26,31,.96); border: 1px solid rgba(207,169,92,.8); color: #f5e8cf;
  border-radius: 13px; font-size: 14px; font-weight: 700; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.flight-view-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px;
  padding: 9px; margin-top: 6px; background: rgba(16,18,23,.98);
  border: 1px solid rgba(207,169,92,.45); border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.6);
  width: min(280px,calc(100vw - 24px)); }
#flightViewLinks[hidden] { display: none !important; }
.flight-view-links a { text-align: center; min-height: 44px; display: flex; align-items: center;
  justify-content: center; border: 1px solid #4a443e; border-radius: 10px;
  color: #f3eee4; text-decoration: none; font-size: 13px; font-weight: 700; background: #262728; }
.flight-view-links a[aria-current="page"] { background: #6f5029; border-color: #d0a75c; color: white; }
.flight-view-links a:focus-visible, #flightViewToggle:focus-visible { outline: 3px solid #bbd9ff; outline-offset: 2px; }
body.mobile-ui[data-section]:not([data-section="flight"]) .flight-view-modes,
body.login-view .flight-view-modes, body.hiko-map-fullscreen .flight-view-modes { display: none !important; }
body.mode-wall .flight-view-modes { top: max(12px,env(safe-area-inset-top,0px)); right: max(12px,env(safe-area-inset-right,0px)); }
body.mode-wall .wall-countdown-hero:not(.hidden) { display: flex; flex: 0 0 auto; align-items: center;
  justify-content: center; flex-wrap: wrap; column-gap: 18px; row-gap: 3px; padding: 7px 16px;
  margin: 5px 0 10px; border: 1px solid rgba(207,169,92,.48); border-radius: 13px;
  background: linear-gradient(100deg,rgba(186,136,59,.12),rgba(255,255,255,.035)); text-align: center; }
.wall-countdown-hero strong { font-size: clamp(27px,4.2vw,56px); line-height: 1.08; font-weight: 700;
  letter-spacing: .025em; font-variant-numeric: tabular-nums; color: #f5e7cd; white-space: nowrap; }
.wall-countdown-hero > span { font-size: clamp(17px,2.3vw,32px); font-weight: 700; }
.wall-countdown-hero small { font-size: 12px; color: var(--muted); }
body.layout-led .wall-countdown-hero { display: none !important; }
.led-countdown-status { text-align: center; color: #e2d1ad; font-size: clamp(12px,2.2vw,18px);
  font-variant-numeric: tabular-nums; margin: 12px auto 3px; padding: 0 12px; }
body.mobile-ui .sheet:not(.hidden) { bottom: var(--mobile-dock); padding-bottom: 12px; }
body.mobile-ui .sheet.expanded { height: calc(100dvh - var(--mobile-top) - var(--mobile-dock));
  scroll-padding-top: 12px; }
/* Tutamak kaydırınca da görünür kalmalı: aksi hâlde aşağı kaydırılmış açık panel kapatılamıyor (iPhone). */
body.mobile-ui .sheet.expanded .sheet-handle { position: sticky; top: 0; z-index: 640; /* #routeCard z 520 üstünde */
  min-height: 60px; margin-bottom: 18px; flex-shrink: 0; background: var(--panel, #15181d);
  box-shadow: 0 8px 14px -10px rgba(0,0,0,.7); }
body.mobile-ui .sheet.expanded .sheet-live { display: flex; flex-direction: column; gap: 14px; }
body.mobile-ui .sheet.expanded .sheet-live > * { min-width: 0; width: 100%; flex-shrink: 0; }
body.mobile-ui .sheet.expanded .sheet-live .route-card { overflow: visible; padding-top: 3px; }
body.mobile-ui .sheet.expanded .sheet-live .route-big { font-size: clamp(30px, 9vw, 48px);
  white-space: nowrap; overflow: visible; }
body.mobile-ui .sheet.expanded .sheet-live #teleCard { display: block; }
body.mobile-ui .sheet.expanded .sheet-live #teleCard .eta-block { margin-bottom: 12px; }
body.mobile-ui .sheet.expanded .sheet-live #teleCard .tele-grid { display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
body.mobile-ui .sheet.expanded #sCount, body.mobile-ui .sheet.expanded #sAlt,
body.mobile-ui .sheet.expanded #sGs { font-size: clamp(18px,5vw,26px); white-space: nowrap;
  word-break: keep-all; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
body.mobile-ui .sheet.expanded #sAge { font-size: clamp(16px,4.5vw,23px); }
body.mobile-ui .sheet.expanded .photo-card.photo-missing { padding: 8px; }
.photo-card.photo-missing .aircraft-illustration { min-height: 144px; display: grid;
  align-content: center; padding: 14px 10px; gap: 8px;
  background: radial-gradient(ellipse at 55% 25%,rgba(138,159,183,.18),transparent 65%),#161d27;
  border: 1px solid rgba(189,205,223,.18); border-radius: 14px; }
.photo-card.photo-missing .aircraft-illustration svg { width: min(100%,410px);
  height: clamp(100px,14vw,170px); margin: auto; }
.photo-card.photo-missing .photo-title { font-size: clamp(14px,1.7vw,23px); line-height: 1.4; }
@media (max-width: 430px) {
  body.mode-wall .flight-view-modes { top: max(10px,env(safe-area-inset-top,0px)); }
  body.mode-wall .wall-countdown-hero:not(.hidden) { padding: 6px 8px; margin-top: 52px; }
  body.mode-wall .wall-countdown-hero strong { font-size: clamp(26px,8vw,39px); }
  .photo-card.photo-missing .aircraft-illustration svg { height: 108px; }
}


/* Viewer-first flight switcher: preview access above the scroll, sound in an optional drawer. */
.viewer-quick-modes, .viewer-quick-drawer { display: none; }
body.role-viewer:not(.mode-wall):not(.login-view) .viewer-quick-modes {
  display: flex; position: relative; z-index: 1550; align-items: stretch; gap: 5px;
  padding: 7px; margin: 12px 0 6px; border: 1px solid rgba(196,161,101,.5);
  border-radius: 15px; background: rgba(22,22,22,.97); width: min(100%, 460px);
}
.viewer-quick-modes > :is(a,button) {
  flex: 1 1 0; min-width: 0; min-height: 46px; display: grid; place-items: center;
  padding: 7px 4px; border: 1px solid rgba(183,162,127,.42); border-radius: 10px;
  background: #242220; color: #f1e7d9; font: 600 13px/1.2 -apple-system,system-ui,sans-serif;
  text-decoration: none; text-align: center; white-space: normal;
}
.viewer-quick-modes > :is(a,button):focus-visible, .viewer-quick-drawer :is(button,summary):focus-visible {
  outline: 3px solid #badbff; outline-offset: 2px;
}
.viewer-quick-modes > a[aria-current="page"] {
  border-color: #cbaa6a; color: #f5d595; background: #40311c;
}
body.role-viewer:not(.mode-wall):not(.login-view) .viewer-quick-drawer:not([hidden]) {
  display: block; position: fixed; z-index: 1750;
  top: max(88px,calc(env(safe-area-inset-top) + 86px));
  right: max(12px,env(safe-area-inset-right)); left: max(12px,env(safe-area-inset-left));
  max-width: 560px; max-height: min(76dvh,650px); overflow-y: auto; padding: 14px;
  border-radius: 18px; border: 1px solid rgba(204,170,107,.72);
  background: #181817; color: #f4ebe1; box-shadow: 0 22px 70px rgba(0,0,0,.82);
  overscroll-behavior: contain;
}
.viewer-quick-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.viewer-quick-drawer :is(button,summary) {
  cursor: pointer; min-height: 44px; color: #f4ebe1; padding: 10px 12px;
  border: 1px solid #635746; border-radius: 10px; background: #29251e;
}
.viewer-quick-drawer > button { display: block; width: 100%; text-align: left; margin-top: 9px; }
.viewer-quick-drawer details { border: 1px solid #494037; border-radius: 12px; margin: 10px 0; }
.viewer-quick-drawer summary { display: list-item; list-style-position: inside; }
.viewer-quick-drawer details[open] > summary { margin-bottom: 8px; }
.viewer-quick-help { font-size: 12px; line-height: 1.5; color: #b7ada1; }
.viewer-quick-drawer #hikoAudioLab { margin: 6px 0; padding: 10px; }
.viewer-quick-drawer #hikoAudioLab .hiko-audio-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 760px) {
  /* No redundant flight switcher on Settings or on other workspace panels. */
  body.mobile-ui.role-viewer .viewer-quick-modes { display: none !important; }
  body.mobile-ui.role-viewer[data-section="flight"],
  body.mobile-ui.role-viewer[data-section="home"] {
    --mobile-top: calc(env(safe-area-inset-top) + 136px);
  }
  body.mobile-ui.role-viewer:not(.login-view):is([data-section="flight"],[data-section="home"]) .viewer-quick-modes {
    position: fixed; z-index: 1600; left: max(8px,env(safe-area-inset-left));
    right: max(8px,env(safe-area-inset-right)); top: calc(env(safe-area-inset-top) + 72px);
    margin: 0; width: auto; padding: 5px; gap: 4px; border-radius: 13px;
    display: flex !important;
  }
  body.mobile-ui.role-viewer .viewer-quick-modes > :is(a,button) { min-height: 44px; font-size: 12px; padding: 6px 2px; }
  body.mobile-ui.role-viewer .flight-view-modes { display: none !important; }
  body.mobile-ui.role-viewer .viewer-quick-drawer:not([hidden]) {
    top: calc(env(safe-area-inset-top) + 132px);
    max-height: calc(100dvh - env(safe-area-inset-top) - var(--mobile-dock) - 144px);
  }
}
@media (max-width: 360px) {
  body.mobile-ui.role-viewer .viewer-quick-modes > :is(a,button) { font-size: 11px; }
}


/* Wall preview on phones: prevent legacy 62/38 desktop columns on mobile Safari. */
@media (max-width: 760px) {
  body.mode-wall .lcd-grid, body.mode-wall #flightSceneGrid {
    display: grid; grid-template-columns: minmax(0,1fr);
    grid-template-areas: none; gap: 12px; height: auto; min-height: 0;
  }
  body.mode-wall .lcd-grid > :is(.map-col,#side,#photoCard,#teleCard,#routeCard) {
    grid-column: 1; grid-area: auto; min-width: 0; max-width: 100%; width: 100%;
  }
  body.mode-wall .lcd-grid .map-col { min-height: 42dvh; }
  body.mode-wall .lcd-grid .map-wrap { min-height: 42dvh; }
  body.mode-wall .lcd-grid .side { overflow: visible; }
  body.mode-wall .dash, body.mode-wall .live:not(.hidden) { min-height: 0; height: auto; overflow: visible; }
  body.mode-wall { overflow-y: auto; }
  body.mode-wall .tele-grid > .stat { overflow-wrap: normal; }
  body.mode-wall .tele-grid .v { font-size: clamp(15px,4vw,23px); word-break: keep-all; }
  body.mode-wall .map-legend { max-width: 100%; }
}
/* PWA / wall: scene switcher stays at the top even after the LED page scrolls.
   Do not put this menu in document flow: scrolling previously moved it offscreen. */
body.mode-wall .flight-view-modes {
  position: fixed; top: calc(env(safe-area-inset-top) + 10px);
  right: max(10px, env(safe-area-inset-right)); left: auto;
  margin: 0; z-index: 1805; width: max-content; max-width: calc(100vw - 20px);
}
body.mode-wall .flight-view-links { position: absolute; top: calc(100% + 4px); right: 0; }
body.mode-wall .wall-return-link {
  position: fixed; z-index: 1806;
  top: calc(env(safe-area-inset-top) + 10px);
  left: max(10px, env(safe-area-inset-left)); right: auto;
  min-height: 44px; max-width: 42vw; padding: 9px 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,24,29,.97); border: 1px solid rgba(203,168,107,.85);
  border-radius: 13px; color: #f5e8cf; font: 700 13px/1.2 system-ui,sans-serif;
  text-decoration: none; box-shadow: 0 5px 22px rgba(0,0,0,.5);
}
body.mode-wall .wall-return-link:focus-visible { outline: 3px solid #badbff; outline-offset: 2px; }
body.mode-wall.layout-led #ledView { padding-top: calc(env(safe-area-inset-top) + 64px); }
body.mode-wall.layout-led .wall-controls { opacity: 1; pointer-events: auto; }
@media (max-width: 430px) {
  body.mode-wall .flight-view-modes { top: calc(env(safe-area-inset-top) + 8px); }
  body.mode-wall .wall-return-link { top: calc(env(safe-area-inset-top) + 8px); }
}


/* Regression: specificity must beat the base viewer drawer rule on iPhone. */
@media (max-width: 760px) {
  body.mobile-ui.role-viewer:not(.mode-wall):not(.login-view) .viewer-quick-drawer:not([hidden]) {
    top: calc(env(safe-area-inset-top) + 132px);
    max-height: max(48px, calc(100dvh - env(safe-area-inset-top) - var(--mobile-dock) - 144px));
  }
}
@media (max-width: 760px) and (max-height: 500px) {
  body.mobile-ui.role-viewer:not(.mode-wall):not(.login-view) .viewer-quick-drawer:not([hidden]) {
    top: max(6px, env(safe-area-inset-top));
    max-height: calc(100dvh - var(--mobile-dock) - 12px);
  }
}

/* One place to select views on family screen; keep pilot workspace unchanged. */
body.role-viewer:not(.mode-wall) .flight-view-modes,
body.role-viewer:not(.mode-wall) #rosterPanel .row-between .controls a[href^="/wall/"] {
  display: none !important;
}


/* Flight map modes: visually distinguish focus-on-aircraft from full flight route. */
.map-actions button[aria-pressed="true"] {
  border-color: var(--accent, #d4af37) !important;
  box-shadow: inset 0 0 0 1px var(--accent, #d4af37);
}
.map-actions button:disabled {
  opacity: .5; cursor: not-allowed;
}
.photo-missing .photo-credit a {
  display: inline-block; margin-top: 6px; color: var(--accent, #d4af37);
  text-decoration: underline; text-underline-offset: 3px;
}

/* Aile: konum tazelik uyarısı hızlı geçiş çubuğunun altında kalmasın (dikey ve yatay iPhone). */
body.role-viewer.mobile-ui:not(.hiko-map-fullscreen) .pos-badge {
  top: max(calc(env(safe-area-inset-top) + 66px), calc(var(--viewer-quick-bottom, 0px) + 8px)); }

/* Push feedback stays next to its Test button, not at the end of a long Settings page. */
.push-test-feedback:not(:empty) {
  margin: 8px 0 14px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(203,168,107,.5);
  background: rgba(203,168,107,.09); color: var(--fg, #f5f5f7);
  font-size: 13px; line-height: 1.45;
}

/* Dedicated exit for iOS home-screen PWA map overlay. The original top 'Kapat'
   was hard to reach, with no native browser back control in standalone mode. */
#mapExitOverlay[hidden] { display: none !important; }
body.hiko-map-fullscreen #mapExitOverlay {
  position: fixed !important;
  z-index: 1950 !important;
  left: max(12px,env(safe-area-inset-left)) !important;
  right: max(12px,env(safe-area-inset-right)) !important;
  width: auto !important;
  bottom: calc(env(safe-area-inset-bottom) + 188px) !important;
  min-height: 52px;
  padding: 12px 18px;
  background: rgba(12,16,24,.96);
  border: 2px solid rgba(226,186,99,.96);
  border-radius: 14px;
  color: #fbe6b4;
  font-size: clamp(15px,4vw,19px);
  font-weight: 750;
  box-shadow: 0 8px 32px rgba(0,0,0,.62);
  text-align: center;
  touch-action: manipulation;
  pointer-events: auto !important;
}
body.hiko-map-fullscreen #mapExitOverlay:focus-visible {
  outline: 3px solid #9fdbff; outline-offset: 3px;
}
@media (max-height: 650px) {
  body.hiko-map-fullscreen #mapExitOverlay {
    bottom: calc(env(safe-area-inset-bottom) + 120px) !important;
  }
}


/* AVILUMA operational status — quiet, high-contrast luxury, no false live badges. */
.ops-panel {
  margin: 14px 0; padding: clamp(14px,2.5vw,21px);
  border: 1px solid rgba(197,170,132,.32);
  border-radius: 18px; background: linear-gradient(160deg,#1c1d1d,#161a20);
  color: #f5f0e9; min-width: 0; box-sizing: border-box;
}
.ops-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ops-eyebrow { font: 700 10px/1.3 system-ui,sans-serif; color: #bda782; letter-spacing: .13em; }
.ops-head h3 { margin: 5px 0 8px; font: 600 clamp(18px,3vw,23px)/1.2 system-ui,sans-serif; }
.ops-badge { padding: 6px 10px; border-radius: 24px; border: 1px solid #696052;
  font: 600 11px/1.35 system-ui,sans-serif; color: #d9c5a5; max-width: 100%; }
.ops-badge[data-kind="delay"] { border-color: #b98643; background: rgba(158,93,27,.18); color: #f4c184; }
.ops-badge[data-kind="unknown"] { border-color: #51565c; color: #bfc4c9; }
.ops-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px; margin-top: 14px; }
.ops-grid > div { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.026);
  padding: 10px; border-radius: 11px; min-width: 0; }
.ops-grid small { display: block; font: 500 11px/1.3 system-ui,sans-serif;
  color: #aaadaf; margin-bottom: 7px; }
.ops-grid strong { display: block; font: 700 clamp(14px,2.3vw,18px)/1.25 system-ui,sans-serif;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ops-source { font-size: 11px; color: #b5b4b0; line-height: 1.5; margin: 12px 0; }
.ops-details { border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; }
.ops-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center;
  font: 600 13px/1.35 system-ui,sans-serif; color: #e7d8bd; }
.ops-details ol { margin: 8px 0 12px; padding-left: 22px; max-height: 220px; overflow-y: auto; }
.ops-details li { margin: 8px 0; line-height: 1.4; font-size: 12px; }
.ops-details li strong,.ops-details li small { display: block; }
.ops-details li small { color: #b0aca8; margin-top: 2px; }
.ops-edit-toggle, .ops-edit-form button { min-height: 44px; cursor: pointer;
  background: #272b30; color: #f1e9db; border: 1px solid #8d7653; border-radius: 11px;
  padding: 9px 13px; font: 600 13px/1.3 system-ui,sans-serif; }
.ops-edit-form[hidden], .ops-edit-toggle[hidden] { display: none !important; }
.ops-edit-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;
  padding: 12px 0; }
.ops-edit-form p { grid-column: 1/-1; font-size: 12px; line-height: 1.45;
  color: #bbbab7; margin: 0; }
.ops-edit-form label { display: grid; gap: 5px; font-size: 12px; color: #d0c7b9; min-width: 0; }
.ops-edit-form input { width: 100%; box-sizing: border-box; font-size: 16px; color: #f8f5ee;
  background: #0b1725; border: 1px solid #58616a; border-radius: 8px; padding: 10px; min-height: 44px; }
.ops-edit-form button { grid-column: 1/-1; }
.ops-edit-status { font-size: 12px; line-height: 1.5; color: #d3c0a3; margin: 8px 0 0; }
.ops-edit-status:empty { display: none; }
body.mode-wall .ops-panel { max-height: 28dvh; overflow-y: auto; margin-top: 6px; }
@media (max-width: 760px) {
  body.mobile-ui .sheet-live .ops-panel { width: 100%; margin: 3px 0 12px; }
  .ops-edit-form { grid-template-columns: 1fr; }
  body.mode-wall .ops-panel { max-height: none; }
}


/* Responsive Roster card surface — layout follows its CONTAINER, not iPhone
   model or hard-coded screen dimensions. Works inside narrow tablet/desktop
   panels, Android, iOS, rotated screens, split-view and large text. */
#rosterPanel { min-width: 0; max-width: 100%; box-sizing: border-box; }
#rosterPanel .table-wrap {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  container-name: hiko-roster; container-type: inline-size;
}
body.mobile-ui .sec[data-sec="roster"] #rosterPanel {
  display: block; width: 100%; margin: 0 0 14px; overflow: visible;
}
#rosterPanel .row-between { flex-wrap: wrap; row-gap: 8px; }
#rosterPanel .row-between .controls { display: flex; flex-wrap: wrap; gap: 8px; }
#rosterPanel .row-between .controls > * {
  min-height: 44px; min-width: 0; max-width: 100%;
  box-sizing: border-box; white-space: normal;
}
@container hiko-roster (max-width: 850px) {
  #rosterTable thead { display: none; }
  #rosterTable, #rosterTable tbody {
    display: block; width: 100%; max-width: 100%; min-width: 0;
    box-sizing: border-box; margin: 0;
  }
  #rosterTable tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
    gap: clamp(6px, 1.7cqw, 12px);
    align-items: start; padding: clamp(10px,2cqw,16px);
    margin: 0 0 6px; border: 1px solid var(--border);
    border-radius: 12px; background: rgba(255,255,255,.025);
  }
  #rosterTable td {
    display: block; width: 100%; min-width: 0; max-width: 100%;
    box-sizing: border-box; border: 0; padding: 0; margin: 0;
    white-space: normal; overflow: visible; text-overflow: clip;
    overflow-wrap: anywhere; word-break: normal;
  }
  #rosterTable td:nth-child(1) {
    grid-row: 2; grid-column: 1 / -1; font-size: .825rem;
    color: var(--muted); text-align: left;
  }
  #rosterTable td:nth-child(2) {
    grid-row: 1; grid-column: 1; font-size: clamp(.95rem,2.7cqw,1.15rem);
    font-weight: 750; text-align: left;
  }
  #rosterTable td:nth-child(3) {
    grid-row: 1; grid-column: 2; font-size: clamp(.88rem,2.5cqw,1.08rem);
    text-align: right; white-space: normal;
  }
  #rosterTable td:nth-child(4), #rosterTable td:nth-child(5) {
    grid-row: 3; font-size: clamp(1rem,3cqw,1.3rem);
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  #rosterTable td:nth-child(4) { grid-column: 1; text-align: left; }
  #rosterTable td:nth-child(5) { grid-column: 2; text-align: right; }
  #rosterTable td:nth-child(4)::before, #rosterTable td:nth-child(5)::before {
    display: block; margin-bottom: 2px; font-size: .72rem;
    font-weight: 500; color: var(--muted); white-space: normal;
  }
  #rosterTable td:nth-child(4)::before { content: "Kalkış · TRT"; }
  #rosterTable td:nth-child(5)::before { content: "Varış · TRT"; }
  #rosterTable td:nth-child(5)::after { content: none; }
  #rosterTable td:nth-child(6) {
    grid-row: 4; grid-column: 1 / -1; text-align: left;
    font-size: .8rem; color: var(--muted);
  }
  #rosterTable td:nth-child(7) {
    grid-row: 5; grid-column: 1 / -1;
    display: flex; flex-wrap: wrap; align-items: stretch;
    justify-content: flex-start; gap: 8px; text-align: left;
  }
  #rosterTable td:nth-child(7) button {
    flex: 1 1 min(32%, 132px); min-width: min(92px,100%);
    min-height: 44px; max-width: 100%; box-sizing: border-box;
    padding: 8px 6px; white-space: normal;
    font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere;
  }
  #rosterTable tr.current { border-color: rgba(210,168,89,.76);
    background: rgba(209,160,65,.12); }
}
@container hiko-roster (max-width: 285px) {
  #rosterTable tbody tr { grid-template-columns: minmax(0,1fr); }
  #rosterTable td:nth-child(n) { grid-column: 1; text-align: left; }
  #rosterTable td:nth-child(3) { grid-row: 2; }
  #rosterTable td:nth-child(1) { grid-row: 3; }
  #rosterTable td:nth-child(4) { grid-row: 4; }
  #rosterTable td:nth-child(5) { grid-row: 5; }
  #rosterTable td:nth-child(6) { grid-row: 6; }
  #rosterTable td:nth-child(7) { grid-row: 7; }
  #rosterTable td:nth-child(7) button { flex: 1 1 100%; }
}
/* Fallback for old WebViews without container queries: no clipped actions. */
@supports not (container-type: inline-size) {
  body.mobile-ui #rosterPanel .table-wrap { overflow-x: auto; }
  body.mobile-ui #rosterTable { width: 100%; min-width: 0; }
  body.mobile-ui #rosterTable tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.mobile-ui #rosterTable td:nth-child(4) { grid-row: 3; grid-column: 1; }
  body.mobile-ui #rosterTable td:nth-child(5) { grid-row: 3; grid-column: 2; }
  body.mobile-ui #rosterTable td:nth-child(6) { grid-row: 4; grid-column: 1 / -1; }
  body.mobile-ui #rosterTable td:nth-child(7) {
    grid-row: 5; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px;
  }
  body.mobile-ui #rosterTable td:nth-child(7) button { min-height: 44px; white-space: normal; }
}
body.mobile-ui #rosterPanel .roster-quick-selected {
  outline: 2px solid #d8ae55; outline-offset: -2px;
  background: rgba(209,160,65,.12);
}
.recent-flight-quick {
  width: min(92vw,420px); margin: 14px auto; padding: 14px;
  box-sizing: border-box; background: rgba(25,29,37,.94);
  border: 1px solid rgba(219,179,106,.55); border-radius: 16px;
  text-align: left; font: 500 14px/1.45 system-ui,sans-serif;
  color: #f6eedb;
}
.recent-flight-quick[hidden],.recent-flight-quick.hidden { display:none!important; }
.recent-flight-quick strong { color: #eac58d; font-size: 12px; }
.recent-flight-quick p { margin: 7px 0 12px; overflow-wrap: anywhere; }
.recent-flight-quick button {
  min-height: 48px; width: 100%; background: #d7af52;
  color: #171d25; border: 0; border-radius: 10px;
  font: 700 14px/1.3 system-ui,sans-serif;
  touch-action: manipulation;
}
body:not(.mobile-ui) .recent-flight-quick,
body.role-viewer .recent-flight-quick { display: none!important; }

/* Yatay/alçak ekranda tam ekran çıkış düğmesi haritanın ortasını kapatmasın:
   tam genişlikte şerit sürükleme ve iki parmak yakınlaştırmayı engelliyordu. */
@media (max-height: 500px) {
  body.hiko-map-fullscreen #mapExitOverlay {
    right: auto !important; width: auto !important; max-width: 46vw;
    bottom: calc(env(safe-area-inset-bottom) + 12px) !important;
    min-height: 44px; padding: 8px 14px; font-size: 15px;
  }
}
