/* =========================================================
   Masaüstü özellik dock'u (scene.featureMenu)
   ========================================================= */
#feature-dock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; }
body.playing:not(.is-touch) #feature-dock.show { display: flex; }
/* Bildirimler dock ve mini haritanın altında kalmasın */
body.playing:not(.is-touch):has(#feature-dock.show) #toasts { right: 72px; }
body.playing:not(.is-touch):has(#jc-minimap.show) #toasts { top: 183px; }
body.playing:not(.is-touch):has(#jc-minimap.big.show) #toasts { top: 282px; }
.dock-btn { position: relative; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; font-size: 18px; line-height: 1; border-radius: 9px; }
.dock-btn img { width: 22px; height: 22px; image-rendering: pixelated; }
.dock-btn .tip {
  position: absolute; right: 46px; top: 50%; transform: translateY(-50%) translateX(4px); white-space: nowrap;
  background: var(--glass-strong); border: 1px solid var(--stroke); border-radius: 8px; padding: 5px 9px;
  font-size: 12px; opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
.dock-btn:hover .tip, .dock-btn:focus-visible .tip { opacity: 1; transform: translateY(-50%); }
/* Alçak pencerede dock sığsın (taşma kaydırması ipuçlarını keseceği için küçültülür) */
@media (max-height: 680px) { #feature-dock { gap: 3px; padding: 4px; } .dock-btn { width: 30px; height: 30px; font-size: 15px; } .dock-btn .tip { right: 40px; } }

/* =========================================================
   Dokunmatik / mobil (body.is-touch, .portrait / .landscape)
   ========================================================= */
#game canvas { touch-action: none; }
#hud-top .brk, #hud-extra:empty { display: none; }
.touch-only { display: none; }
body.is-touch .touch-only { display: list-item; }
body.is-touch {
  touch-action: manipulation; overscroll-behavior: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none;
}
/* Tam ekran tuşu: masaüstünde sağ alt, dokunmatikte sol üst köşe (menü tuşunun simetriği) */
#btn-fs {
  position: fixed; z-index: 50; right: 14px; bottom: 14px; width: 40px; height: 40px; padding: 0; display: grid; place-items: center;
  font-size: 20px; line-height: 1; border-radius: 10px; color: var(--text, #f4f1ea); cursor: pointer;
  background: rgba(18, 22, 32, 0.55); border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#btn-fs:hover { background: rgba(18, 22, 32, 0.75); }
body.is-touch #btn-fs { top: calc(8px + env(safe-area-inset-top)); bottom: auto; right: auto; left: calc(8px + env(safe-area-inset-left)); width: 44px; height: 44px; border-radius: 12px; touch-action: manipulation; }
body:not(.playing):not(.is-touch) #btn-fs { top: 14px; bottom: auto; }
/* Dikey (tablet): üst bar tüm genişliği kaplar → menü tuşunun altına */
body.is-touch.portrait #btn-fs { left: auto; right: calc(12px + env(safe-area-inset-right)); top: calc(58px + env(safe-area-inset-top)); width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
body.modal-open #btn-fs, body:has(#gameover.show) #btn-fs { display: none; }

/* Telefonda yalnız yatay: dikey tutulunca her şeyin üstünde "çevir" ekranı */
#rotate-overlay { display: none; }
body.rotate-needed #rotate-overlay {
  display: flex; position: fixed; inset: 0; z-index: 9999; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: #1a2a1a; color: #f4f1ea; text-align: center; padding: 24px;
}
#rotate-overlay .rot-icon { font-size: 64px; animation: rotHint 1.8s ease-in-out infinite; }
#rotate-overlay p { font-size: 20px; font-weight: 700; }
#rotate-overlay span { font-size: 14px; opacity: 0.7; }
@keyframes rotHint { 0%, 20% { transform: rotate(0deg); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
body.is-touch #keys, body.is-touch #hint, body.is-touch #quest-tracker { display: none !important; }
body.is-touch .slot:hover { background: rgba(255, 255, 255, 0.06); }
body.is-touch .slot .key { display: none; }
/* Kaydırılabilir hotbar taşanı kırpar: adet rozeti slotun içinde kalsın */
body.is-touch .slot .count { bottom: 1px; right: 1px; }

/* --- Kontrol katmanı --- */
/* --mc-s: yan boşluk, --mc-b: kontrollerin alt kenarı (portrede hotbar'ın üstü, yatayda ekran altı) */
body.is-touch { --mc-s: calc(16px + env(safe-area-inset-left)); --mc-sr: calc(16px + env(safe-area-inset-right)); --mc-b: calc(84px + env(safe-area-inset-bottom)); }
body.is-touch.landscape { --mc-b: calc(14px + env(safe-area-inset-bottom)); }
#mobile-ui { display: none; position: absolute; inset: 0; pointer-events: none; }
body.is-touch.playing:not(.modal-open) #mobile-ui { display: block; }
body:has(#gameover.show) #mobile-ui { display: none !important; }
.mc-btn {
  pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none;
  opacity: var(--mc-alpha, 0.85); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 22, 32, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); padding: 0; transition: transform 0.08s, background 0.12s, opacity 0.15s;
}
#ui .mc-btn:hover:not(:disabled) { background: rgba(18, 22, 32, 0.55); }
.mc-btn.pressed { transform: scale(0.92); }

/* Joystick: taban her zaman görünür (sol alt). Bölgenin herhangi bir yerine dokununca çalışır;
   yüzen modda taban parmağın altına taşınır, sabit modda yerinde kalır. */
.mc-joyzone {
  position: absolute; left: 0; width: 52%; top: 46%;
  bottom: calc(76px + env(safe-area-inset-bottom)); pointer-events: auto; touch-action: none;
}
/* Yatay telefonda bölge hotbar'a taşmaz (hotbar ortada, iki yanı kontrollere ayrılmış) */
body.landscape .mc-joyzone { top: 34%; bottom: 0; width: calc(200px + env(safe-area-inset-left)); }
/* Yatayda co-op paneli sol üstte (hava rozetinin altında); bölge onun altından başlar */
body.is-touch.landscape:has(#net-panel.show) .mc-joyzone { top: 60%; }
.mc-joy {
  position: fixed; width: 128px; height: 128px; transform: translate(-50%, -50%); border-radius: 50%;
  left: calc(var(--mc-s) + 72px); top: calc(100% - var(--mc-b) - 72px);
  background: radial-gradient(circle, rgba(18, 22, 32, 0.2) 40%, rgba(18, 22, 32, 0.45));
  border: 2px solid rgba(255, 255, 255, 0.5); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 0 0 10px rgba(255, 255, 255, 0.05);
  opacity: calc(var(--mc-alpha, 0.85) * 0.8); pointer-events: none; transition: opacity 0.15s, border-color 0.15s;
}
/* İç halka: tabanın merkezi ve sınırı bir bakışta seçilsin */
.mc-joy::before { content: ''; position: absolute; inset: 24px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.35); }
.mc-joy.active { opacity: var(--mc-alpha, 0.85); border-color: rgba(255, 209, 102, 0.85); }
.mc-knob {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(220, 225, 235, 0.6));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* D-pad (ayarlardan): 3x3 ızgara, 58px tuşlar; 4 yönlüde köşeler gizli */
.mc-dpad {
  position: absolute; left: var(--mc-s); bottom: var(--mc-b); display: none;
  grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); gap: 2px;
  pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; opacity: var(--mc-alpha, 0.85);
}
body.mv-dpad .mc-dpad { display: grid; }
body.mv-dpad .mc-joyzone { display: none; }
.mc-dpad i {
  display: grid; place-items: center; font-style: normal; font-size: 20px; color: rgba(255, 255, 255, 0.85);
  background: rgba(18, 22, 32, 0.55); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); pointer-events: none;
}
.mc-dpad i.d-c { background: rgba(18, 22, 32, 0.3); border-radius: 50%; }
.mc-dpad i.d-ul, .mc-dpad i.d-ur, .mc-dpad i.d-dl, .mc-dpad i.d-dr { font-size: 14px; border-radius: 50%; }
body:not(.mv-dpad8) .mc-dpad i.d-ul, body:not(.mv-dpad8) .mc-dpad i.d-ur,
body:not(.mv-dpad8) .mc-dpad i.d-dl, body:not(.mv-dpad8) .mc-dpad i.d-dr { visibility: hidden; }
.mc-dpad i.on { background: rgba(255, 209, 102, 0.6); border-color: rgba(255, 209, 102, 0.95); transform: scale(0.94); }

/* Sağ alt eylem kümesi: eylem (80) köşede, etkileşim (68) üstünde, çanta (56) solunda, yuvarlanma çantanın üstünde */
.mc-cluster { position: absolute; right: var(--mc-sr); bottom: var(--mc-b); width: 0; height: 0; }
.mc-action {
  position: absolute; right: 0; bottom: 0; width: 80px; height: 80px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 220, 140, 0.55), rgba(190, 120, 40, 0.55));
  border: 2px solid rgba(255, 209, 102, 0.75);
}
#ui .mc-action:hover:not(:disabled) { background: radial-gradient(circle at 35% 30%, rgba(255, 220, 140, 0.55), rgba(190, 120, 40, 0.55)); }
.mc-action img { width: 36px; height: 36px; image-rendering: pixelated; pointer-events: none; }
.mc-action.empty img { display: none; }
.mc-action.empty::before { content: '✊'; font-size: 26px; }
.mc-action .lb { font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; pointer-events: none; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-action.aiming { border-color: var(--red); box-shadow: 0 0 0 4px rgba(235, 87, 87, 0.3); }
.mc-inv { position: absolute; right: 96px; bottom: 0; width: 56px; height: 56px; border-radius: 50%; font-size: 24px; }
/* Etkileşim: her zaman görünür. Yakında bir şey yoksa soluk; varsa parlak + üstünde etiket balonu */
.mc-interact {
  position: absolute; right: 6px; bottom: 96px; width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(110, 224, 110, 0.85); box-shadow: 0 0 0 4px rgba(110, 224, 110, 0.18), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.mc-interact, #ui .mc-interact:hover:not(:disabled) { background: rgba(40, 120, 60, 0.78); }
.mc-interact .ic { font-size: 28px; line-height: 1; pointer-events: none; }
.mc-interact .tag {
  position: absolute; right: 0; bottom: calc(100% + 8px); max-width: min(62vw, 240px); padding: 5px 11px; border-radius: 12px;
  background: rgba(30, 90, 45, 0.94); border: 1px solid rgba(110, 224, 110, 0.7); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); animation: mcPop 0.18s ease;
}
.mc-interact .tag:empty { display: none; }
.mc-interact.off { opacity: calc(var(--mc-alpha, 0.85) * 0.5); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); filter: grayscale(0.9); }
.mc-interact.off, #ui .mc-interact.off:hover:not(:disabled) { background: rgba(18, 22, 32, 0.55); }
.mc-interact.off .tag { display: none; }
.mc-interact.off.nudge .tag { display: block; background: rgba(18, 22, 32, 0.92); border-color: rgba(255, 255, 255, 0.3); animation: mcFade 1.4s ease forwards; }
.mc-interact.off.nudge { animation: mcShake 0.3s ease; }
@keyframes mcPop { from { transform: scale(0.8); opacity: 0; } }
@keyframes mcFade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mcShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.mc-menu {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right));
  width: 44px; height: 44px; border-radius: 12px; font-size: 22px; opacity: 1;
}
.mc-menu .dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: none; box-shadow: 0 0 6px var(--green); }
.mc-menu .dot.show { display: block; }

/* Diğer modüllerin dokunmatik butonları eylem kümesine hizalanır (çakışmasın); dokunmatik düzen kapalıyken gizli */
body:not(.is-touch) .cb-dodge { display: none !important; }
body.is-touch .cb-dodge {
  width: 56px; height: 56px; font-size: 22px; opacity: var(--mc-alpha, 0.85);
  right: calc(var(--mc-sr) + 100px); bottom: calc(var(--mc-b) + 72px);
}

/* Sol elle oyna: kontroller aynalanır */
body.left-handed .mc-joyzone { left: auto; right: 0; }
body.left-handed.landscape .mc-joyzone { width: calc(200px + env(safe-area-inset-right)); }
body.left-handed .mc-joy { left: calc(100% - var(--mc-sr) - 72px); }
body.left-handed .mc-dpad { left: auto; right: var(--mc-sr); }
body.left-handed .mc-cluster { right: auto; left: var(--mc-s); }
body.left-handed .mc-action { right: auto; left: 0; }
body.left-handed .mc-interact { right: auto; left: 6px; }
body.left-handed .mc-interact .tag { right: auto; left: 0; }
body.left-handed .mc-inv { right: auto; left: 96px; }
body.is-touch.left-handed .cb-dodge { right: auto; left: calc(var(--mc-s) + 100px); }

/* --- Hotbar: büyük dokunma hedefleri, yatay kaydırma --- */
body.is-touch #hotbar {
  pointer-events: auto; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none;
  bottom: calc(8px + env(safe-area-inset-bottom)); padding: 6px; max-width: calc(100vw - 16px);
}
body.is-touch #hotbar::-webkit-scrollbar { display: none; }
body.is-touch .slot { width: 48px; height: 48px; flex-shrink: 0; }
body.is-touch .slot img { width: 34px; height: 34px; }
body.is-touch #hotbar .slot.active { transform: none; box-shadow: inset 0 0 0 2px var(--accent); }
body.is-touch #item-name { bottom: calc(74px + env(safe-area-inset-bottom)); }
/* Yatayda hotbar ortada kalır; iki yan joystick/D-pad ve eylem kümesine ayrılır */
body.is-touch.landscape #hotbar { max-width: calc(100vw - 400px - env(safe-area-inset-left) - env(safe-area-inset-right)); }

/* --- Portre üst bar: 2 satır --- */
body.is-touch.portrait #hud-top {
  left: calc(8px + env(safe-area-inset-left)); right: calc(60px + env(safe-area-inset-right));
  top: calc(6px + env(safe-area-inset-top)); transform: none; max-width: none;
  flex-wrap: wrap; gap: 3px 10px; padding: 5px 10px; font-size: 12px; border-radius: 12px; min-height: 44px;
}
body.is-touch.portrait #hud-top .sep { display: none; }
body.is-touch.portrait #hud-top .brk { display: block; flex-basis: 100%; height: 0; order: 4; }
body.is-touch.portrait #hud-top .b-time { order: 1; gap: 5px; }
body.is-touch.portrait #hud-top .b-coins { order: 2; margin-left: auto; }
body.is-touch.portrait #hud-top .b-wave { order: 3; }
body.is-touch.portrait #hud-top .b-zom { order: 3; }
body.is-touch.portrait #hud-top .b-hp { order: 5; }
body.is-touch.portrait #hud-top .b-en { order: 6; }
body.is-touch.portrait #hud-top .b-shelter { order: 7; }
body.is-touch.portrait #hud-extra { order: 8; flex-basis: 100%; overflow: hidden; flex-wrap: wrap; gap: 4px 10px; }
body.is-touch.portrait #hud-top .stat { flex: 1 1 0; min-width: 0; gap: 5px; }
body.is-touch.portrait #hud-top .bar { flex: 1; width: auto; min-width: 24px; }
body.is-touch.portrait #hud-top .num { min-width: 0; }
body.is-touch.portrait #hud-top .b-hp .num, body.is-touch.portrait #hud-top .b-en .num { font-size: 11px; }
body.is-touch.portrait #hud-top .big { font-size: 15px; }
body.is-touch.portrait #hud-top .b-time > div { display: flex; align-items: baseline; gap: 6px; }
body.is-touch.portrait #hud-top .block { gap: 5px; }
body.is-touch.portrait #hud-top .phase { font-size: 16px; }
body.is-touch.portrait #hud-top .sub { font-size: 10px; }
body.is-touch.landscape #hud-top { top: calc(6px + env(safe-area-inset-top)); max-width: calc(100vw - 130px); }

/* --- Yatay: sağ sütun eylem kümesine ayrılır; mini harita ve co-op paneli üst kısımda kalır --- */
body.is-touch.landscape #jc-minimap { top: calc(var(--hud-h, 56px) + 6px); right: var(--mc-sr); }
body.is-touch.landscape #jc-minimap.big { width: 128px; height: 88px; }
/* Etiket balonu sağ sütunda kalsın (üst ortadaki ipucu/hedef kartlarına uzanmasın) */
body.is-touch.landscape .mc-interact .tag { max-width: 180px; }
body.is-touch.landscape #net-panel { top: calc(env(safe-area-inset-top, 0px) + 108px); left: var(--mc-s); right: auto; max-height: calc(44vh - 100px); overflow: hidden; }
body.is-touch.landscape.left-handed #net-panel { left: auto; right: var(--mc-sr); top: calc(var(--hud-h, 56px) + 80px); }

/* --- Bildirimler --- */
/* Portrede bildirimler üstteki rozet/mini haritayla çakışmasın: başparmak kümesinin üstünde */
body.is-touch.portrait #toasts { top: auto; bottom: calc(304px + env(safe-area-inset-bottom)); left: 12px; right: 12px; align-items: center; pointer-events: none; }
/* Üst bara yapışan diğer modül öğeleri --hud-h (mobile.js ölçer) altına hizalanır */
body.is-touch.portrait #wx-badge { top: calc(var(--hud-h, 64px) + 6px); left: calc(8px + env(safe-area-inset-left)); }
body.is-touch.portrait #jc-minimap { top: calc(var(--hud-h, 64px) + 6px); right: calc(8px + env(safe-area-inset-right)); }
body.is-touch.portrait .toast { font-size: 12px; padding: 7px 12px; max-width: 100%; }
/* Alt panel (sheet) açıkken bildirimler üstte, panelin üstüne binmeden görünür */
/* Yatayda sağ sütun eylem kümesine, üst orta hedef kartına ait: bildirimler hotbar'ın üstünde, iki kontrol grubunun arasında */
body.is-touch.landscape #toasts { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 440px); align-items: center; pointer-events: none; }
body.is-touch.landscape:not(.modal-open) .toast:not(:nth-last-child(-n+3)) { display: none; }
body.is-touch.landscape .toast { font-size: 12px; padding: 6px 12px; }
body.is-touch.portrait.modal-open #toasts { bottom: auto; top: calc(8px + env(safe-area-inset-top)); z-index: 20; }
body.is-touch.portrait.modal-open .toast:not(:nth-last-child(-n+2)) { display: none; }
body.is-touch #banner h2 { font-size: 20px; }
body.is-touch.landscape #banner { top: 30%; }
body.is-touch #banner p { font-size: 14px; padding: 0 16px; }

/* --- Modallar: portrede bottom-sheet --- */
.sheet-grab { display: none; }
body.is-touch .x { min-width: 44px; min-height: 44px; font-size: 20px; }
body.is-touch .modal button { min-height: 44px; }
body.is-touch .modal .slot { cursor: default; }
body.is-touch #inv-grid { grid-template-columns: repeat(6, 48px); }
body.is-touch .craft { min-width: 0; }
body.is-touch .modal { max-height: calc(100vh - 16px); overscroll-behavior: contain; }
body.is-touch.portrait .modal,
body.is-touch.portrait #modal-dialog {
  left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: 84vh;
  border-radius: 20px 20px 0 0; border-bottom: none;
  padding: 4px 14px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: opacity 0.2s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.is-touch.portrait .modal.show,
body.is-touch.portrait #modal-dialog.show { transform: translateY(0); }
/* style.css'teki sabit ID genişlikleri (#modal-feature 560px vb.) dikeyde ekrandan taşmasın */
body.is-touch.portrait #modal-inventory, body.is-touch.portrait #modal-shop, body.is-touch.portrait #modal-feature { min-height: 70vh; width: 100%; max-width: 100%; }
body.is-touch.portrait .sheet-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); margin: 6px auto 8px; }
body.is-touch.portrait .modal header { margin-bottom: 10px; }
body.is-touch.portrait .shop-list, body.is-touch.portrait #craft-list { max-height: none; }
body.is-touch.portrait .portrait { width: 56px; height: 56px; }
body.is-touch.portrait .dlg { gap: 12px; }
body.is-touch.portrait .npc-text { font-size: 14px; }
body.is-touch.portrait .options button { flex: 1 1 calc(50% - 4px); }
body.is-touch.portrait #inv-info { max-width: none; }

/* --- Mobil menü sayfası --- */
.mm h4 { margin: 4px 0 8px; }
.mm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mm-card { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border-radius: 14px; }
.mm-card .ic { font-size: 24px; line-height: 1; }
.mm-card .ic img { width: 28px; height: 28px; image-rendering: pixelated; }
.mm-card .lb { font-size: 12px; text-align: center; line-height: 1.2; }
.mm-quests .mm-quest { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 14px; }
.mm-quest span { grid-column: 1; font-size: 12px; color: var(--muted); }
.mm-quest i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 600; }
.mm-quest.ready i { color: var(--green); }
.mm-settings .mm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 14px; }
.mm-settings .mm-row.col { flex-direction: column; align-items: stretch; justify-content: center; padding: 8px 0; }
.mm-settings input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; }
.mm-settings input[type=range] { width: 100%; height: 32px; accent-color: var(--accent); }
.mm-settings small { display: block; font-size: 11px; }
.mm-seg { display: flex; gap: 6px; margin-top: 8px; }
.mm-seg button { flex: 1 1 0; min-height: 44px; padding: 4px 6px; font-size: 13px; border-radius: 10px; }
.mm-seg button.on { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-weight: 700; }
#ui .mm-seg button.on:hover:not(:disabled) { background: var(--accent); }
.mm-tip { font-size: 12px; margin-top: 12px; line-height: 1.5; }

/* --- Ana menü / oyun sonu --- */
body.is-touch #menu, body.is-touch #gameover { padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow: auto; }
body.is-touch.portrait .menu-card { padding: 24px 20px; }
body.is-touch.portrait .menu-card h1 { font-size: 21px; }
body.is-touch.portrait #gameover h1 { font-size: 19px; }
body.is-touch.portrait .menu-card .kicker { margin-bottom: 12px; }
body.is-touch.portrait .tag { margin: 12px 0 18px; font-size: 14px; }
body.is-touch .menu-btns { flex-wrap: wrap; }
body.is-touch .menu-btns button { min-height: 48px; flex: 1 1 140px; }

/* Kiler rozeti dar ekranda küçük */
body.is-touch.portrait .hv-badge { padding: 3px 7px; font-size: 11px; }

/* Oyun sonu ekranında dokunmatik kaçış butonu görünmesin */
body:has(#gameover.show) .cb-dodge { display: none !important; }
