/* Mamut Kral: "savana çıkartması" (inceleme/04-gorsel-yon.md).
   Krem paneller, sıcak koyu kahve kalın çizgi, altın ana düğme, başlıklarda Paytone One, metinlerde Nunito (css/fonts.css). Tek tema. */
:root {
  --ink: #3b2715;          /* çizgi ve yazı */
  --ink2: #6b5134;         /* ikincil yazı */
  --ink3: #8c7556;         /* soluk yazı */
  --cream: #fff4dc;        /* panel */
  --cream2: #f0dcb4;       /* panel içi vurgu, seçili satır */
  --paper: #fbf3dc;        /* giriş alanı, kutucuk */
  --sand: #dcb66e;
  --sand-dk: #c89f55;
  --gold: #f2b134;
  --gold-lt: #ffd66b;
  --gold-dk: #b97a14;
  --red: #d4553a;
  --teal: #2f9c95;
  --leaf: #5f7d2e;
  --steel: #e1e7ec;
  --threat: #e0654a;       /* seni yiyebilir (renk körü modunda turuncu) */
  --prey: #6fae45;         /* yiyebilirsin (renk körü modunda mavi) */
  --line: 3px solid var(--ink);
  --lift: 0 4px 0 rgba(59, 39, 21, 0.35);
  --display: "Oyun Baslik", "Oyun", system-ui, sans-serif;
  --body: "Oyun", system-ui, "Segoe UI", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
body.cb { --threat: #f08a24; --prey: #4f9be0; }

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--sand);
}
body {
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#game {
  position: fixed;
  inset: 0;
  display: block;
  touch-action: none;
  outline: none;
}
/* kişisel mod: tacı sende olunca sadece senin ekranında ince bir buzul tonu (js/ui.js setMamutMoment) */
#mamutOverlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(159, 216, 235, 0) 45%, rgba(74, 147, 171, 0.26) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
}
body.mamut-moment #mamutOverlay { opacity: 1; }
/* kişisel mod: HUD vurgu renkleri sıcak altından soğuk buz tonuna döner (sadece HUD, menü/pencereler etkilenmez) */
body.mamut-moment #hud {
  --gold: #8fd4e8;
  --gold-lt: #d3f1f8;
  --gold-dk: #4a93ab;
  --teal: #3f86c2;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
button { font-family: inherit; color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.kbd {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 6px 3px;
  border-radius: 6px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-bottom-width: 3px;
  color: var(--ink);
}
body.touch .kb-only { display: none !important; }
body:not(.touch) .touch-only { display: none !important; }

/* ---------- Düğmeler ---------- */
.btn {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 9px 20px 8px;
  border-radius: 14px;
  border: var(--line);
  background: var(--cream);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.15s ease;
}
.btn:hover { background: #fffaf0; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--gold); }
.btn.primary:hover { background: #f7bf4d; }
.btn.danger { color: #a3311d; background: #fbe3d8; }
.btn.small { font-size: 15px; padding: 6px 12px 5px; border-radius: 12px; }
.btn.pool { font-size: 16px; padding: 7px 16px 6px; background: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px 10px; padding-bottom: 4px; }

.small-btn {
  font-size: 13px;
  font-weight: 800;
  padding: 5px 12px 4px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.small-btn:hover { background: #fff; }

.chips-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  font: 800 14px var(--body);
  min-height: 36px;
  padding: 6px 14px 5px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.chip-btn:hover { background: #fff; }
.chip-btn[aria-pressed="true"] { background: var(--gold); box-shadow: inset 0 -3px 0 rgba(59, 39, 21, 0.25); }
.chip-btn.yes { background: #dcebc5; }

/* ---------- HUD ---------- */
.panel {
  position: fixed;
  background: rgba(255, 244, 220, 0.95);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--lift);
}
.hud-top {
  position: fixed;
  top: calc(12px + var(--sat));
  left: calc(12px + var(--sal));
  right: calc(12px + var(--sar));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.hud-top > .panel { position: static; pointer-events: auto; }
.hud-tl {
  width: auto;
  max-width: min(320px, calc(100vw - 190px));
  padding: 7px 10px;
  display: grid;
  gap: 6px;
}
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.crown-time-chip { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; }
.crown-time-chip svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.crown-time-chip .ctc-bg { fill: none; stroke: rgba(59, 39, 21, 0.18); stroke-width: 3; }
.crown-time-chip .ctc-ring {
  fill: none;
  stroke: var(--gold-dk);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 94.2px;
  stroke-dashoffset: calc(94.2px * (1 - var(--frac, 1)));
  transition: stroke-dashoffset 0.2s linear;
}
.crown-time-chip.hot .ctc-ring { stroke: #d0634e; }
.crown-time-chip .ctc-crown {
  width: 15px;
  height: 12px;
  background: var(--gold-dk);
  clip-path: polygon(0 100%, 0 20%, 28% 55%, 50% 0, 72% 55%, 100% 20%, 100% 100%);
}
.crown-time-chip.hot .ctc-crown { background: #d0634e; }
/* serbest renk paleti (özelleştirme, renk satırı) */
.color-palette { flex: 1 1 100%; width: 100%; height: 64px; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--ink); cursor: crosshair; touch-action: none; }
.color-palette.on { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 3px #ffd66b; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hud-tl .chips:not(:has(.chip:not([hidden]))) { display: none; }
/* anlık kilo değişimi (duraklat düğmesinin yanında) ve nedenleri */
.chip {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  padding: 2px 8px 1px 5px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink2);
}
.chip .kbd { font-size: 9px; padding: 2px 4px 1px; border-width: 1.5px; border-bottom-width: 2px; }
.chip.dash { --cd: 0%; }
.chip.dash::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--cd);
  background: rgba(59, 39, 21, 0.22);
}
.chip.dash.ready { color: var(--ink); background: #dcebc5; }
.chip.dash.hurt { background: #f3d2c4; color: #8e2418; }
.chip.dash.sprinting, #tDash.sprinting { box-shadow: 0 0 0 3px rgba(242, 177, 52, 0.85), 0 0 12px rgba(242, 177, 52, 0.7); }
.chip.leaf { background: #cfe0a8; color: var(--ink); padding-left: 8px; }

/* etki süresi olan durumlar (hız/hortum yemi): uzun yazı yerine ikon + çevresinde geri sayım halkası */
.chip-ring { position: relative; flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
.chip-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.chip-ring .cr-bg { fill: none; stroke: rgba(59, 39, 21, 0.18); stroke-width: 2.6; }
.chip-ring .cr-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 75.4px;
  stroke-dashoffset: calc(75.4px * (1 - var(--frac, 1)));
  transition: stroke-dashoffset 0.2s linear;
}
.chip-ring .cr-ico { width: 13px; height: 13px; display: grid; place-items: center; }
.chip-ring.boost .cr-ico.cr-bolt { background: var(--gold); clip-path: polygon(45% 0, 8% 58% ,40% 58%, 30% 100%, 92% 35%, 55% 35%); }
.chip-ring.trunkc .cr-ico.cr-x2 { width: auto; height: auto; font-size: 11px; font-weight: 800; color: var(--ink); }

.top-center {
  position: fixed;
  top: calc(12px + var(--sat));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
/* üst kutu (LİSTE 11): maçta tek satır taç süresi ve ince çubuk; kısa uyarılar birkaç sn kendi renginde (js/ui.js updateMatchBar) */
.match-bar {
  position: relative;
  pointer-events: auto;
  min-width: 150px;
  max-width: 100%;
  background: rgba(255, 244, 220, 0.95);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 2px 12px 4px;
  text-align: center;
  box-shadow: 0 3px 0 rgba(59, 39, 21, 0.3);
}
.match-bar.active { background: rgba(227, 241, 246, 0.95); }
.mb-line { display: flex; justify-content: center; align-items: baseline; gap: 8px; }
.mb-phase { font-family: var(--display); font-size: 14px; color: var(--ink); }
.mb-time { font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.mb-time:empty { display: none; }
.mb-sub { font-size: 11.5px; font-weight: 700; color: var(--ink2); line-height: 1.2; font-variant-numeric: tabular-nums; }
.mb-sub:empty { display: none; }
.mb-track { height: 4px; border-radius: 2px; background: rgba(59, 39, 21, 0.15); overflow: hidden; margin-top: 2px; }
.mb-track[hidden] { display: none; }
.mb-fill { height: 100%; width: 0; background: var(--teal); border-radius: 2px; transition: width 0.2s linear; }
.match-bar.warm .mb-fill { background: var(--gold-dk); }
/* kısa uyarı: başlık + tek satır, kendi renginde */
.match-bar.alert { padding: 3px 14px 4px; }
.match-bar.alert .mb-phase { font-size: 16px; }
.match-bar.alert .mb-sub { color: var(--ink); font-size: 12px; }
.match-bar.tone-cream { background: var(--cream); }
.match-bar.tone-gold { background: var(--gold); }
.match-bar.tone-orange { background: #f4a640; }
.match-bar.tone-red { background: #f4a88a; }
.match-bar.tone-blue { background: #bfe6f7; }
.match-bar.pop { animation: mb-pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes mb-pop { from { transform: scale(0.8); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .match-bar.pop { animation: none; } }
@media (max-width: 480px) { .mb-phase { font-size: 13px; } .mb-time { font-size: 12px; } .mb-sub { font-size: 11px; } .match-bar.alert .mb-phase { font-size: 14.5px; } }
.tip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 3px 10px 3px 4px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  background: rgba(255, 244, 220, 0.92);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(59, 39, 21, 0.3);
}
.tip.show { animation: tip-in 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
.tip-ico { flex: none; width: 18px; height: 18px; display: grid; place-items: center; font: 400 12px var(--display); background: var(--gold); border: 2px solid var(--ink); border-radius: 50%; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-8px) scale(0.9); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .tip { font-size: 11.5px; padding: 3px 8px 2px 4px; } }
@media (prefers-reduced-motion: reduce) { .tip.show { animation: none; } }
@keyframes throb { from { transform: scale(1); } to { transform: scale(1.03); } }

/* liderlik, ifade ve sohbet daireleri ve altlarında açılan tek panel (LİSTE 17) */
.hud-tr { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.dock-btns { display: flex; flex-direction: row-reverse; gap: 7px; pointer-events: auto; }
.dock-btn {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: rgba(255, 244, 220, 0.95);
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(59, 39, 21, 0.3);
  cursor: pointer;
  pointer-events: auto;
}
.dock-btn:hover { background: #fff; }
.dock-btn[aria-expanded="true"] { background: var(--gold); }
.dock-btn .kbd { position: absolute; right: -6px; bottom: -6px; font-size: 9px; padding: 2px 4px 1px; border-width: 1.5px; border-bottom-width: 2px; }
.dock-ico { width: 22px; height: 22px; display: block; }
.board-box { position: static; width: 210px; padding: 8px 10px 6px; pointer-events: auto; animation: dockPop 0.14s ease-out; }
.board-box[hidden] { display: none; }
@keyframes dockPop { from { transform: translateY(-6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .board-box, .hud-tr .emote-panel { animation: none; } }
/* mini harita ve duyuru kutusunu daireye çeviren küçük düğme (köşede, "–") */
.fold-btn {
  position: absolute;
  z-index: 1;
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
}
.fold-btn::after { content: ""; width: 10px; height: 2.5px; border-radius: 2px; background: currentColor; }
.fold-btn:hover { background: #fff; }
body.touch .fold-btn::before, body.touch .dock-btn::before { content: ""; position: absolute; inset: -7px; }
#mmKapat { top: -9px; left: -9px; }
#mbKapat { top: -9px; right: -9px; }
#mbAc { pointer-events: auto; }
#mbAc.yeni { background: var(--gold); animation: mbYeni 0.6s ease-in-out infinite alternate; }
@keyframes mbYeni { to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { #mbAc.yeni { animation: none; } }
.board-net { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--teal); }
#boardList { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
#boardList li {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
  padding: 0 5px;
  border-radius: 8px;
}
/* satırları hizalamak kolaylaşsın diye bir aşağı bir soluk ton (sen/taç sahibi renkleri üstüne biner) */
#boardList li:not(.gap):not(.sep):nth-of-type(even) { background: rgba(59, 39, 21, 0.05); }
#boardList li.me { background: var(--cream2); }
#boardList li.crowned { box-shadow: inset 3px 0 0 var(--gold-dk); }
#boardList li.human .b-name { color: #1f6f6a; }
#boardList li.gap { display: block; text-align: center; color: var(--ink3); line-height: 1; }
#boardList li.sep {
  display: block;
  margin-top: 4px;
  padding-top: 3px;
  border-top: 2px solid rgba(59, 39, 21, 0.2);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  line-height: 1.4;
}
.b-rank { color: var(--ink3); font-variant-numeric: tabular-nums; text-align: right; }
.b-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.b-name .avatar { box-shadow: none; }
.b-lv { font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.b-crown {
  flex: none;
  width: 14px;
  height: 11px;
  background: var(--gold-dk);
  clip-path: polygon(0 100%, 0 20%, 28% 55%, 50% 0, 72% 55%, 100% 20%, 100% 100%);
}
.b-on {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5fbf6a;
  box-shadow: 0 0 0 1.5px var(--ink);
}

#feed {
  position: fixed;
  left: calc(12px + var(--sal));
  top: calc(150px + var(--sat));
  display: grid;
  gap: 4px;
  pointer-events: none;
  max-width: 300px;
}
.feed-item {
  justify-self: start;
  font-size: 13px;
  font-weight: 800;
  padding: 2px 10px 1px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: rgba(255, 244, 220, 0.9);
  color: var(--ink2);
}
.feed-item.me { color: var(--ink); background: var(--cream); }
.feed-item.gold { background: var(--gold-lt); color: var(--ink); }
.feed-item.red { background: #f6c7b6; color: var(--ink); }

#announce {
  position: fixed;
  left: 50%;
  top: 24%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  width: min(640px, calc(100vw - 32px));
}
#announce.show { animation: ann-in 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes ann-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* sağ alt (dokunmatikte sağ üst): mini harita kendi kutusunda, ifade ve sohbet düğmeleri onun altında ve ondan bağımsız */
.hud-br {
  position: fixed;
  right: calc(12px + var(--sar));
  bottom: calc(12px + var(--sab));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.mm-card {
  position: relative;
  padding: 5px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--lift);
}
.mm-card[hidden] { display: none; }
#minimap { display: block; width: 260px; height: 260px; border-radius: 9px; box-shadow: inset 0 0 0 2px var(--sand-dk); }
.mm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; padding: 4px 2px 0; font-size: 10px; font-weight: 800; color: var(--ink2); line-height: 1.2; }
.mm-legend span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.mm-legend .d { width: 8px; height: 8px; display: inline-block; border: 1.3px solid var(--ink); border-radius: 50%; }
.mm-legend .d.red { background: var(--threat); border: 0; border-radius: 0; width: 9px; height: 8px; clip-path: polygon(50% 0, 100% 100%, 0 100%); box-shadow: none; position: relative; }
.mm-legend .d.green { background: var(--prey); border: 0; border-radius: 0; width: 9px; height: 8px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.mm-legend .d.ring { background: #fff; border-width: 1.8px; }
.mm-legend span[hidden] { display: none; }
.mm-legend .dm { width: 8px; height: 10px; display: inline-block; background: var(--ink); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); position: relative; }
.mm-legend .dm::after { content: ""; position: absolute; inset: 1.6px; background: #8fdcf5; clip-path: inherit; }
.mm-legend .sq { width: 7px; height: 7px; border: 1.5px solid var(--ink); background: var(--cream); display: inline-block; }
#minimap + .mm-legend { max-width: 260px; }

.hint { font-size: 13px; color: var(--ink2); padding-left: 6px; }

/* ---------- Dokunmatik düğmeler ---------- */
#touchBtns { display: none; }
body.touch #touchBtns {
  position: fixed;
  right: calc(16px + var(--sar));
  bottom: calc(16px + var(--sab));
  display: grid;
  gap: 12px;
  justify-items: end;
}
body.touch.btns-left #touchBtns { right: auto; left: calc(16px + var(--sal)); justify-items: start; }
.t-grid {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: end;
  justify-items: center;
}
#tDash, #tTrap, #tSpray, #tSwing {
  --cd: 0%;
  border-radius: 50%;
  border: var(--line);
  box-shadow: 0 4px 0 rgba(59, 39, 21, 0.45);
  font-family: var(--display);
  color: var(--ink);
  line-height: 1;
  letter-spacing: 0;
  touch-action: none;
}
#tDash {
  grid-column: 2; grid-row: 2;
  width: 92px; height: 92px;
  font-size: 20px;
  background: linear-gradient(to top, rgba(59, 39, 21, 0.4) var(--cd), transparent var(--cd)), rgba(242, 177, 52, 0.9);
}
/* dokunmatik: üstte küçük Bırak ve Kapan, altta iri Hortum ve köşede Atıl */
#tSwing {
  grid-column: 1; grid-row: 2;
  width: 96px; height: 96px;
  padding: 0;
  font-size: 17px;
  background: linear-gradient(to top, rgba(59, 39, 21, 0.4) var(--cd), transparent var(--cd)), rgba(208, 99, 78, 0.92);
  color: #fff4dc;
  text-shadow: 0 1px 0 rgba(59, 39, 21, 0.6);
}
@keyframes trunkGlow { 0%, 100% { box-shadow: 0 0 0 3px rgba(242, 160, 58, 0.9), 0 0 10px rgba(242, 160, 58, 0.6); } 50% { box-shadow: 0 0 0 5px rgba(242, 160, 58, 1), 0 0 22px rgba(242, 160, 58, 0.9); } }
#tSwing.boosted, .chip.boosted { animation: trunkGlow 0.9s ease-in-out infinite; }
@keyframes waterGlow { 0%, 100% { box-shadow: 0 0 0 3px rgba(91, 189, 232, 0.9), 0 0 10px rgba(91, 189, 232, 0.6); } 50% { box-shadow: 0 0 0 5px rgba(91, 189, 232, 1), 0 0 22px rgba(91, 189, 232, 0.9); } }
#tSpray.wboost, .chip.wboost { animation: waterGlow 0.9s ease-in-out infinite; }
#tSwing.hurt { opacity: 0.7; font-size: 13px; background: rgba(160, 120, 100, 0.9); }
#tTrap {
  grid-column: 2; grid-row: 1;
  width: 72px; height: 72px;
  padding: 0;
  font-size: 15px;
  background: linear-gradient(to top, rgba(59, 39, 21, 0.4) var(--cd), transparent var(--cd)), rgba(225, 231, 236, 0.92);
}
#tSpray {
  grid-column: 1; grid-row: 1;
  width: 72px; height: 72px;
  padding: 0;
  font-size: 15px;
  background: rgba(236, 201, 120, 0.92);
}
#tTrap.locked { opacity: 0.4; }
body.btns-left #tSpray, body.btns-left #tSwing { grid-column: 2; }
body.btns-left #tDash, body.btns-left #tTrap { grid-column: 1; }
#tDrop {
  font-family: var(--display);
  font-size: 16px;
  padding: 10px 16px;
  border-radius: 16px;
  border: var(--line);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(59, 39, 21, 0.45);
  touch-action: none;
}

/* dokunmatikte oyun ekranı sade: ses düğmesi yok (Ayarlar'da), küçük duraklat simgesi */
body.touch #muteBtn { display: none; }
body.touch #dashChip, body.touch #sprayChip { display: none; }
#interBoard .i-ek { font-weight: 700; opacity: 0.75; font-size: 0.82em; }
/* dokunmatikte hortum çipi sadece yaralıyken (geri sayım); bekleme düğmenin kendisinde görünür */
body.touch #swingChip:not(.hurt) { display: none; }
body.touch .hud-top { flex-direction: column; right: auto; }
body.touch .hud-tl { padding: 4px; border-radius: 28px; }
body.touch .hud-tl .chips:not(:has(.chip:not([hidden]):not(#dashChip):not(#trapChip):not(#sprayChip):not(#swingChip:not(.hurt)))) { display: none; }
#pauseBtn { display: inline-flex; align-items: center; gap: 7px; }
.pb-ico {
  flex: none;
  width: 10px;
  height: 12px;
  border-left: 3.5px solid currentColor;
  border-right: 3.5px solid currentColor;
}
#pauseBtn.paused .pb-ico { border: 0; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
body.touch #pauseBtn { position: relative; width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 50%; }
body.touch #pauseBtn::before { content: ""; position: absolute; inset: -9px; } /* dokunma alanı görünenden büyük */
body.touch #pauseBtn .pb-txt { display: none; }
body.touch #pauseBtn .pb-ico { width: 9px; height: 11px; border-left-width: 3px; border-right-width: 3px; }
body.touch #pauseBtn.paused .pb-ico { width: 10px; margin-left: 2px; }
/* tablo sadece başlığından dokunulabilir, altındaki oyun alanına (joystick) dokunuş geçer */
/* tablo dokunuşu geçirir, altındaki oyun alanına (joystick) dokunuş gider; daireler solda başlar */
body.touch .hud-tr { align-items: flex-start; }
body.touch .dock-btns { flex-direction: row; }
body.touch .dock-btn { width: 34px; height: 34px; }
body.touch .board-box { pointer-events: none; width: 140px; padding: 5px 7px 4px; }
body.touch #boardList li { font-size: 11px; line-height: 1.4; grid-template-columns: 16px 1fr auto; gap: 4px; padding: 0 3px; }
body.touch .b-lv { font-size: 11px; }
body.touch #boardList li.sep { font-size: 10px; }
/* dokunmatik: mini harita sağ üstte (joystick genelde solda) */
body.touch .hud-br { top: calc(12px + var(--sat)); bottom: auto; left: auto; right: calc(12px + var(--sar)); }
body.touch .mm-card { padding: 3px; border-radius: 12px; }
body.touch #minimap { width: 224px; height: 224px; }
body.touch #minimap + .mm-legend { max-width: 224px; }

/* ---------- Menüler ---------- */
.overlay {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(24px + var(--sat)) max(16px, var(--sar)) calc(24px + var(--sab)) max(16px, var(--sal));
}
/* menünün arkası (LİSTE 37): hazır görsel çok yavaş kayar (yalnız dönüşüm: ekran kartı birleştirir, çizim yok) */
.menu-arka {
  position: fixed;
  inset: -4%;
  background: #7f9a46 center / cover no-repeat;
  animation: menuKay 48s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes menuKay { from { transform: translate3d(-1.5%, -1%, 0) scale(1.02); } to { transform: translate3d(1.5%, 1%, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .menu-arka { animation: none; } }
/* LİSTE 45: canlı arka plan başlayınca durgun görsel söner */
.menu-arka { transition: opacity 0.9s ease; }
.menu-arka.soluk { opacity: 0; }
.izle-bar { position: fixed; left: 50%; bottom: calc(18px + var(--sab)); transform: translateX(-50%); z-index: 8; }

/* Mamut'un bedeli (LİSTE 39): taçlıyken tacı bırakma düğmesi, asıl kiloyla */
.tac-birak { background: #ffe9a8; border-color: #b8860b; font-variant-numeric: tabular-nums; }

#nameInput {
  flex: 1;
  min-width: 0;
  font: 800 19px var(--body);
  color: var(--ink);
  background: var(--paper);
  border: var(--line);
  border-radius: 14px;
  padding: 10px 14px 8px;
  -webkit-user-select: text;
  user-select: text;
}
#nameInput::placeholder { color: var(--ink3); }
#nameInput.locked { background: var(--cream2); cursor: default; }
.me-avatar { position: relative; display: grid; place-items: center; flex: none; }
.avatar-badge { top: -6px; right: -6px; }
.avatar-rank { position: absolute; bottom: -3px; left: 0; }

.over-class { margin-top: 2px; }
.class-card-wrap { max-width: 860px; }
.class-pick-bar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 12px; position: sticky; bottom: 0; }
.class-pick-bar span { font: 800 15px var(--body); color: var(--ink2); font-variant-numeric: tabular-nums; }
.class-pick-note { font-weight: 800; color: var(--ink); }
.class-card[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.class-card {
  display: grid; align-content: start; gap: 4px; padding: 8px 10px 10px; text-align: left; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; font: inherit; color: var(--ink);
  position: relative;
}
/* LİSTE 54: iki yüzlü kart; kartın boyunu ön yüz belirler, arka yüz onun üstüne oturur ve uzunsa kendi içinde kayar */
.class-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.kart-on, .kart-arka { display: grid; align-content: start; gap: 4px; min-width: 0; transition: opacity 0.18s, transform 0.18s; }
.kart-arka {
  position: absolute; inset: 8px 8px 8px 10px; overflow-y: auto; overscroll-behavior: contain; padding-right: 26px;
  visibility: hidden; opacity: 0; transform: rotateY(70deg);
}
.class-card.cevrik .kart-on { visibility: hidden; opacity: 0; transform: rotateY(-70deg); }
.class-card.cevrik .kart-arka { visibility: visible; opacity: 1; transform: none; }
.kart-rol { margin: 0; font: 700 13px/1.3 var(--body); color: var(--ink2); }
.kart-arka ul { font-size: 12px; line-height: 1.22; }
.kart-arka h3 { font-size: 16px; }
.kart-hb { margin: 4px 0 0; font: 800 12px var(--body); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink2); }
.kart-hamle li { padding-left: 0; }
.kart-hamle li::before { content: none; }
.kart-cevir {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink);
  background: #fff4dc; color: var(--ink); font: 800 15px/1 var(--body); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.kart-cevir:hover { background: #fff; }
.class-card:hover { background: #fff; }
.class-card[aria-pressed="true"] { background: #fff3cf; box-shadow: 0 0 0 3px var(--gold), var(--lift); }
.class-prev { width: 100%; height: 104px; display: block; }
.class-card h3 { display: flex; align-items: center; gap: 6px; margin: 0; font: 800 18px var(--body); }
.class-card h3 svg { width: 20px; height: 20px; color: var(--ink2); }
.class-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13px; line-height: 1.25; }
.class-card li { position: relative; padding-left: 16px; }
.class-card li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.class-card li.plus::before { content: "+"; color: #3f8a4a; }
.class-card li.minus::before { content: "−"; color: var(--red); }
.class-card li.minus { color: var(--ink2); }
.class-rules { display: grid; gap: 6px; }
.class-stats { display: grid; gap: 6px; margin-top: 8px; }
.class-stats-tbl { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 4px 8px; font-size: 13px; align-items: center; overflow-x: auto; }
.cst-h { font-weight: 800; color: var(--ink2); font-size: 12px; line-height: 1.15; }
.cst-n { display: flex; align-items: center; gap: 4px; font-weight: 800; min-width: 0; }
.cst-n svg { width: 15px; height: 15px; flex: none; color: var(--ink2); }
.class-rule { margin: 0; }
.class-rule svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; color: var(--ink2); }

/* hyphens: uzun kelimeler (Almanca vb.) dilin hece kurallarıyla bölünsün, harf ortasından değil (LİSTE 12) */

.tile-lock { position: absolute; top: 4px; right: 6px; font-size: 13px; }
.tile-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font: 400 12px var(--display);
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.ico-how { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 40 40'%3E%3Ccircle r='17' fill='%232f9c95' stroke='%233b2715' stroke-width='2.5'/%3E%3Cpath d='M-6 -5 C -6 -12, 7 -12, 7 -5 C 7 0, 1 0, 1 5' fill='none' stroke='%23fff4dc' stroke-width='4' stroke-linecap='round'/%3E%3Ccircle cx='1' cy='11' r='2.6' fill='%23fff4dc'/%3E%3C/svg%3E"); }
.ico-set { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 40 40'%3E%3Ccircle r='17' fill='%23f2b134' stroke='%233b2715' stroke-width='2.5'/%3E%3Cpath d='M-2.94 -8.08L-2.65 -11.50L2.65 -11.50L2.94 -8.08A8.6 8.6 0 0 1 3.63 -7.79L6.25 -10.01L10.01 -6.25L7.79 -3.63A8.6 8.6 0 0 1 8.08 -2.94L11.50 -2.65L11.50 2.65L8.08 2.94A8.6 8.6 0 0 1 7.79 3.63L10.01 6.25L6.25 10.01L3.63 7.79A8.6 8.6 0 0 1 2.94 8.08L2.65 11.50L-2.65 11.50L-2.94 8.08A8.6 8.6 0 0 1 -3.63 7.79L-6.25 10.01L-10.01 6.25L-7.79 3.63A8.6 8.6 0 0 1 -8.08 2.94L-11.50 2.65L-11.50 -2.65L-8.08 -2.94A8.6 8.6 0 0 1 -7.79 -3.63L-10.01 -6.25L-6.25 -10.01L-3.63 -7.79A8.6 8.6 0 0 1 -2.94 -8.08Z' fill='%23fff4dc' stroke='%233b2715' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle r='3.6' fill='%23f2b134' stroke='%233b2715' stroke-width='2'/%3E%3C/svg%3E"); }
/* yeni kutucuk simgeleri: çizgili SVG, renkli daire zemin üstünde (ico-how/ico-set ile aynı dil) */

.net-line { margin: 0; font-size: 14px; font-weight: 800; color: var(--ink); background: rgba(255, 244, 220, 0.9); border: 2px solid var(--ink); border-radius: 14px; padding: 5px 12px 4px; }
/* oyna düğmesinin hemen altında küçük, rozetsiz durum yazısı */
.net-line-small { justify-self: center; background: none; border: none; box-shadow: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--ink2); text-align: center; }
/* kutucuk ızgarasının altında, sol hizalı öneri düğmesi */

/* oyun türü penceresi: seçenekler alt alta, tam genişlik */
.game-mode-sel { justify-content: center; }
.game-mode-sel .chip-btn { min-width: 96px; text-align: center; }
.game-mode-note { margin: -4px 0 0; text-align: center; }
.game-type-row { flex-direction: column; }
.game-type-row .btn { width: 100%; text-align: center; }
.friends-line {
  justify-self: start;
  border: 2px solid var(--ink);
  background: #dcebc5;
  color: var(--ink);
  font: 800 14px var(--body);
  padding: 5px 12px 4px;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
}
.friends-line.live::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #5fbf6a;
  box-shadow: 0 0 0 1.5px var(--ink);
  vertical-align: 0;
}

/* ---------- Pencereler ---------- */
.center-overlay {
  background: rgba(59, 39, 21, 0.45);
  display: grid;
  place-items: safe center;
}

/* Maç ara ekranı (LİSTE 9 Grup E4): hafif saydam, dünya arkada görünür/incelenebilir kalsın diye tam karartma yok */
/* maç sonu (LİSTE 53, Yusuf): arka plan tamamen kapanır, yeni ekran; önce taç töreni (tuval), sonra tablo */
.intermission-overlay {
  background: #2a1c10;
  display: grid;
  place-items: safe start center;
  padding-top: calc(32px + var(--sat));
}
body.mac-sonu #ayak, body.mac-sonu #hud { visibility: hidden; }
.intermission-stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intermission-card { max-width: 440px; position: relative; opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; pointer-events: none; }
.intermission-overlay.tablo .intermission-card { opacity: 1; transform: none; pointer-events: auto; }
.intermission-board .i-arkadas { margin-left: 6px; font-size: 11.5px; padding: 1px 8px; vertical-align: 1px; }
@media (prefers-reduced-motion: reduce) { .intermission-card { transition: none; } }
.intermission-timer { margin: -6px 0 0; font-size: 14px; font-weight: 800; color: var(--teal); }
.intermission-son { margin: 0; padding: 4px 12px 3px; border: 2px solid var(--ink); border-radius: 12px; background: var(--gold); font-size: 15px; font-weight: 800; color: var(--ink); text-align: center; text-wrap: balance; }
.intermission-son[hidden] { display: none; }
.intermission-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 40vh; overflow-y: auto; }
.intermission-board li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.5;
  padding: 3px 6px;
  border-radius: 8px;
}
.intermission-board li:nth-of-type(even) { background: rgba(59, 39, 21, 0.05); }
.intermission-board li.me { background: var(--cream2); }
.intermission-board li.ih { font-size: 11px; color: var(--ink3); background: none; letter-spacing: 0.05em; padding-block: 0; }
.intermission-board li.bot .i-name { color: var(--ink2); font-weight: 700; }
.intermission-board .i-rank { color: var(--ink3); }
.intermission-board .i-score { color: var(--gold-dk); }
.card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--cream);
  border: var(--line);
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 14px;
  box-shadow: 0 6px 0 rgba(59, 39, 21, 0.45);
}
.card.wide { max-width: 580px; }
.card h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
}
.card > h2:first-of-type { padding-right: 44px; }
.x-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: 800 26px/1 var(--body);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  z-index: 1;
}
.x-close span { margin-top: -3px; }
.x-close:hover { background: #fff; }
.x-close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.over-cause { margin: -4px 0 0; font-size: 17px; font-weight: 800; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.stat-k { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink3); }
.stat-v { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.over-best { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink2); }
.over-best.record { color: var(--gold-dk); font-family: var(--display); font-size: 20px; }
.pause-note { margin: -4px 0 0; font-size: 15px; color: var(--ink2); }
#pauseFsNote { margin: 0; }
.more-btn {
  justify-self: start;
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--teal);
  font: 800 14px var(--body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.confirm { padding: 10px 12px; border-radius: 14px; background: #fbe3d8; border: 2px solid var(--ink); }
.confirm p { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.acc-save { position: sticky; bottom: -1px; justify-content: flex-end; padding: 10px 0 4px; background: linear-gradient(180deg, rgba(255, 244, 220, 0), var(--cream) 40%); }

/* Özelleştirme ve ayarlar */
#customPreview {
  width: 100%;
  height: 170px;
  border-radius: 16px;
  background: var(--sand);
  border: var(--line);
}
.opt-rows { display: grid; gap: 10px; }
#lookRows { display: grid; gap: 10px; }
.opt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-lbl {
  width: 128px;
  flex: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink2);
}
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  padding: 0;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5.5px var(--ink); }
.swatches-inline { display: contents; }
/* palet açma düğmesi: rengarenk halka (ortası boş), açıkken altın halkayla vurgulanır */
.palette-toggle {
  background: conic-gradient(#e94f4f, #f2b134, #e9e24f, #6fbf6f, #4fa8e9, #9a6fd6, #d64fa0, #e94f4f);
  position: relative;
}
.palette-toggle::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--ink);
}
.palette-toggle[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5.5px #f2b134; }
.opt-note { flex-basis: 100%; margin: -4px 0 0 138px; font-size: 12px; color: var(--ink3); }
@media (max-width: 480px) { .opt-note { margin-left: 0; } }
.vol-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
#volRange { width: min(220px, 55vw); accent-color: var(--gold-dk); }
.vol-val { min-width: 52px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink2); }

/* Hesap penceresi */
.acc-lead { margin: 0; font-size: 15px; color: var(--ink2); }
.acc-h { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--gold-dk); }
.acc-sub { margin: 0; font-size: 13px; color: var(--ink2); }
#gsiBtn { min-height: 44px; color: var(--ink2); font-size: 14px; }
.nick-input {
  flex: 1 1 140px;
  min-width: 0;
  font: 800 16px var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 6px 10px 5px;
  -webkit-user-select: text;
  user-select: text;
}
.nick-box.first { border: 3px solid var(--gold-dk); border-radius: 16px; padding: 4px 12px 8px; background: #fbe9bf; }
.nick-status { min-height: 1.3em; margin: 2px 0 0; font-size: 14px; font-weight: 700; color: var(--ink2); }
.nick-status.ok { color: #3f7a26; }
.nick-status.bad { color: #b23a22; }
.name-row { display: grid; gap: 4px; margin-top: 6px; }
.name-lbl { font-weight: 800; font-size: 14px; }
.name-lbl span { font-weight: 600; font-size: 12px; color: var(--ink3); }
.name-field { display: flex; gap: 8px; align-items: center; min-width: 0; }
.name-field .nick-input, .handle-field { flex: 1 1 auto; min-width: 0; }
.handle-field { display: flex; align-items: center; gap: 2px; min-width: 0; }
.handle-field > span { font-weight: 800; color: var(--gold-dk); font-size: 18px; }
.handle-field .nick-input { flex: 1; min-width: 0; }
.handle-now { margin: 0; font-weight: 800; color: var(--gold-dk); font-size: 16px; }
.acc-stats { grid-template-columns: repeat(3, 1fr); }
.acc-stats .stat-v { font-size: 18px; }
.acc-friends { justify-self: start; margin-top: 4px; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-list li.empty { font-size: 14px; color: var(--ink3); }
.top-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  font: 800 14px var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid rgba(59, 39, 21, 0.25);
  border-radius: 12px;
  padding: 7px 10px 6px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.top-row:hover { border-color: var(--ink); }
.top-row span:nth-child(1) { color: var(--ink3); }
.top-row span:nth-child(n+3) { color: var(--ink2); font-size: 13px; }
.top-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.top-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.privacy { font-size: 13px; color: var(--ink2); }
.privacy summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.privacy p { margin: 6px 0 0; }
.privacy a { color: var(--teal); font-weight: 800; }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  border-radius: 50%; overflow: hidden; line-height: 1;
  box-shadow: 0 0 0 2px var(--ink);
}
.avatar img { width: 100%; height: 100%; display: block; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.avatar-btn { padding: 2px; border-radius: 50%; border: 3px solid transparent; background: none; cursor: pointer; }
.avatar-btn[aria-pressed="true"] { border-color: var(--gold-dk); }
.avatar-btn:hover { border-color: var(--cream2); }

/* Oyuncu çipi, profil, arkadaş listesi */
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 10px 3px 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.person-chip:hover { background: #fff; }
.pc-names { display: grid; min-width: 0; line-height: 1.15; }
.pc-names b, .pc-names span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-handle { font-size: 12px; color: var(--ink3); font-weight: 700; }
.status-pill { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 1.5px solid var(--ink); }
.status-pill.playing { background: #dcebc5; color: var(--ink); }
.status-pill.online { background: #d6e9ec; color: var(--ink); }
.friend-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.friend-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.friend-row .person-chip { flex: 0 1 auto; }
.profile-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-nick { margin: 0; }
.who-names { display: grid; min-width: 0; line-height: 1.1; }
.who-names small { font-size: 14px; color: var(--ink2); }
.rel-note { align-self: center; font-weight: 800; color: var(--ink2); }
.vs-box, .pair-block { display: grid; gap: 6px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.pair-h { margin: 0; font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--gold-dk); }
.pair-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pair-lbl { font-size: 13px; color: var(--ink2); min-width: 150px; }
.pair-val { font-size: 13px; font-weight: 800; }
.stats-block { display: grid; gap: 8px; }
.stats-body { display: grid; gap: 10px; }
.stats-body > .pair-block { margin-top: 4px; }
.met-when { font-size: 12px; color: var(--ink3); }
.killer-card { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -4px; }
.kc-guest { font-weight: 800; color: var(--ink2); }

/* Nasıl oynanır */
.rules-h { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--gold-dk); }
.rules-h span { font-family: var(--body); font-size: 13px; font-weight: 700; color: var(--ink3); }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: start; }
.rule { border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.rule summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
}
.rule summary::-webkit-details-marker { display: none; }
.rule summary::after {
  content: "";
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink2);
  transform: rotate(-90deg);
  transition: transform 0.15s;
}
.rule[open] summary::after { transform: none; }
.rule[open] { background: #fff; }
.rule summary svg { width: 24px; height: 24px; flex: none; }
.rule summary b { font-weight: 800; }
.rule p { margin: 0; padding: 0 12px 10px 46px; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.rule p b { color: var(--ink); }
.c-green { color: #3f7a26; font-weight: 800; }
.c-red { color: #b23a22; font-weight: 800; }
.c-blue { color: #2c6f9e; font-weight: 800; }
body.cb .c-green { color: #2c6f9e; }
body.cb .c-red { color: #b8600e; }
.howto { display: grid; gap: 8px; }
.howto-goal { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink2); }
.howto-h { margin: 4px 0 0; font-size: 15px; font-weight: 800; }
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--ink2);
}
.controls > span { display: inline-flex; align-items: center; gap: 5px; }
.controls-note { flex-basis: 100%; font-size: 13px; color: var(--ink3); }

#perfBox {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--sab));
  transform: translateX(-50%);
  font: 800 12px var(--body);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: rgba(255, 244, 220, 0.9);
  border: 2px solid var(--ink);
  padding: 2px 10px 1px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 5;
}
#perfOlc {
  pointer-events: auto;
  font: 800 11px var(--body);
  margin-left: 6px;
  padding: 0 7px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: var(--cream, #fff4dc);
  color: var(--ink);
  cursor: pointer;
}
#perfOlc:disabled { opacity: 0.7; cursor: default; }

/* ---------- Dar ekranlar ---------- */
@media (max-width: 760px) {
  .board-box { width: 150px; padding: 7px 9px 5px; }
  #boardList li { font-size: 12px; grid-template-columns: 16px 1fr auto; }
  #minimap { width: 169px; height: 169px; }
  #feed { display: none; }
  .top-center { top: calc(122px + var(--sat)); width: min(320px, calc(100vw - 32px)); }
  .rules { grid-template-columns: 1fr; }
  
  
  
  .hint { display: none; }
}
@media (max-width: 480px) {
  .chip { font-size: 12px; }
  
  .btn.pool { font-size: 15px; padding: 6px 14px 5px; }
  .opt-lbl { width: 100%; }
  .acc-stats { grid-template-columns: 1fr 1fr; }
  /* telefonda taç bilgisi mini haritanın ve açıklamasının altında, sağa yaslı */
  body.touch .top-center {
    top: calc(12px + var(--sat) + 172px + 44px);
    left: auto;
    right: calc(12px + var(--sar));
    transform: none;
    width: min(210px, calc(100vw - 190px));
    justify-items: end;
  }
  #announce { top: 35%; }
  body.touch #announce { top: 40%; }
}
@media (max-width: 400px) {
  
  
  .btn { padding-left: 16px; padding-right: 16px; }
  
  
}
@media (prefers-reduced-motion: reduce) {
  #announce.show { animation: none; opacity: 1; }
}

/* ---------- Yatay telefon (kısa ekran) ---------- */
@media (max-height: 500px) {
  .hud-tl { padding: 6px 10px; gap: 5px; }
  .board-box { width: 160px; padding: 6px 9px 4px; }
  #boardList li { font-size: 12px; line-height: 1.35; }
  #announce { top: 36%; }
  #feed { display: none; }
  .top-center { top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 420px)); justify-items: center; }
  body.touch .top-center { top: calc(10px + var(--sat)); left: 50%; right: auto; transform: translateX(-50%); width: min(300px, calc(100vw - 380px)); justify-items: center; }
  #tDash { width: 78px; height: 78px; }
  #tSwing { width: 86px; height: 86px; font-size: 15px; }
  #tSpray, #tTrap { width: 62px; height: 62px; font-size: 13px; padding: 0; }
  #tDrop { font-size: 15px; padding: 7px 14px 6px; }
  body.touch #minimap { width: 190px; height: 190px; }
  body.touch .mm-legend { display: none; }
}

/* Yatay telefon ana menüsü: solda başlık ve Oyna, sağda kutucuklar */
@media (orientation: landscape) and (max-height: 500px) {
  
  
  
  
  .friends-line, .net-line { grid-column: 2; }
  
  
  
  
  
  
  
  
  #nameInput { font-size: 16px; padding-top: 7px; padding-bottom: 6px; }
  
  .net-line { font-size: 12px; }
  #custom .card.wide {
    max-width: min(940px, calc(100vw - 24px));
    display: grid;
    grid-template-columns: minmax(200px, 38%) minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
  }
  #custom .card > * { grid-column: 2; }
  #custom .card > .x-close { grid-column: auto; }
  #custom .card > h2 { grid-column: 1 / -1; margin-bottom: 4px; }
  #custom #customPreview {
    grid-column: 1;
    grid-row: 2 / span 20;
    position: sticky;
    top: 8px;
    height: min(300px, calc(100vh - 90px));
  }
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; }
  .rule summary { padding: 6px 10px; font-size: 14px; }
  .rule summary svg { width: 20px; height: 20px; }
  .rule p { padding: 0 10px 8px 40px; font-size: 13px; }
  .howto-goal { font-size: 13px; }
}

/* ---------- Yerleşim düzeltmeleri (yerlesim_denetimi.py ile bulunanlar) ---------- */
/* ızgara izleri içeriğin doğal genişliğine göre büyümesin (isim alanı + profil resmi kartı taşırıyordu) */
.card, .center-overlay { grid-template-columns: minmax(0, 1fr); }
.card > * { min-width: 0; }

#nameInput { width: 100%; }
.btn { max-width: 100%; overflow-wrap: anywhere; }
/* Görünüm kutucuğundaki önizleme kutucuğa göre küçülür */

/* dokunma alanları */
body.touch #volRange { height: 32px; }
.privacy summary { padding: 6px 0; }

/* Dikey telefon oyun ekranı: taç paneli, taç bilgisi ve ipucu tam genişlikte, mini harita satırının altında.
   Sol sütun (durum + liderler) ve mini harita dar ekranda birbirine binmesin. */
@media (orientation: portrait) {
  body.touch .top-center {
    top: calc(var(--sat) + 12px + var(--mm) + 50px);
    left: calc(12px + var(--sal));
    right: calc(12px + var(--sar));
    width: auto;
    max-width: 460px;
    margin: 0 auto;
    transform: none;
    justify-items: center;
  }
  body.touch { --mm: min(224px, calc(100vw - 36px - 140px - 8px)); }
  body.touch #minimap { width: var(--mm); height: var(--mm); }
  body.touch #minimap + .mm-legend { max-width: var(--mm); }
  body.touch .hud-tl { max-width: calc(100vw - var(--mm) - 44px); }
}
@media (orientation: portrait) and (max-width: 360px) {
  body.touch .board-box { width: 128px; }
  body.touch { --mm: min(224px, calc(100vw - 36px - 128px - 8px)); }
  .mm-legend { gap: 1px 5px; font-size: 9px; }
}

/* Kısa yatay telefon: mini harita dokunmatik düğmelerle çakışmasın; "Tacı bırak" düğmelerin yanında */
@media (orientation: landscape) and (max-height: 500px) {
  /* Önceki boyutun 1.3 katı; ama sağ alttaki tuş takımına (yüksekliği ~28 + 1.66 x B, B = js/ayak.js layout) inmeyecek kadar.
     İfade ve sohbet düğmeleri haritanın altında sola yaslı: hemen altlarındaki Kapan tırnağı sağ kenara yakın. */
  body.touch { --mmy: min(190px, calc((100vh - 290px) * 1.3), calc(100vh - (28px + 1.66 * clamp(70px, 20vh, 88px)) - 34px)); }
  body.touch #minimap { width: var(--mmy); height: var(--mmy); }
  body.touch .hud-tl { max-width: min(320px, 45vw); }
}

/* En küçük dikey telefonlar: durum kutucukları küçük ve yan yana; taç paneli varken ipucu yerine panelin kendi kısa açıklaması */
@media (orientation: portrait) and (max-width: 380px) {
  body.touch .chip { font-size: 10px; padding: 1px 6px 0 5px; }
  body.touch .chips { gap: 3px; }
}

@media (orientation: portrait) and (max-width: 380px) and (max-height: 700px) {
  body.touch #tDrop { font-size: 13px; padding: 6px 10px 5px; }
}

/* dokunmatik düğme yazıları dairenin içinde kalsın (yatayda "Kapan" taşıyordu) */
#tSpray, #tTrap, #tDash, #tSwing { padding: 0; }
/* Tam ekran düğmesi: dört köşe simgesi + kısa yazı */
.fs-ico::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9V3h6M15 3h6v6M21 15v6h-6M9 21H3v-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9V3h6M15 3h6v6M21 15v6h-6M9 21H3v-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* "Nasıl oynanır"da oyundaki duraklat simgesi (emoji yerine): iki koyu çubuk */
.pause-kbd { display: inline-grid; place-items: center; min-width: 22px; }
.pause-kbd .pb-ico { display: block; width: 8px; height: 10px; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }

/* Menü: tek başına zorluk seçimi (Oyna'nın altında) */
.diff-row { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.diff-lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); margin-right: 2px; }
.diff-row .chip-btn { min-height: 32px; padding: 4px 14px 3px; font-size: 14px; }
@media (orientation: landscape) and (max-height: 500px) { .diff-row .chip-btn { min-height: 32px; padding: 3px 11px 2px; font-size: 13px; } }

/* Öneri penceresi ve menüdeki sade düğme */
.fb-list { margin: 0; padding-left: 24px; display: grid; gap: 8px; font-weight: 800; }
.fb-list textarea { vertical-align: top; width: 100%; resize: vertical; min-height: 52px; font: 700 15px/1.35 var(--body); color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; padding: 6px 10px; -webkit-user-select: text; user-select: text; }
.btn.fb-add { justify-self: start; font-size: 14px; padding: 4px 12px 3px; }
#adminLink { margin: 8px 0 0; }

/* Pencere alt çubuğu: "Kaydet ve çık" / "Kaydetmeden çık" sığdığı sürece tek satırda, çok darda alt alta */
.acc-save { gap: 8px; }
.acc-save .btn { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 8px 14px 7px; white-space: nowrap; }
.acc-save .btn:only-child { flex: 0 0 auto; }
@media (max-width: 440px) { .acc-save .btn { font-size: 15px; padding: 8px 11px 7px; } }
@media (max-width: 360px) { .acc-save .btn { font-size: 14px; padding: 7px 10px 6px; } }

/* Hortum düğmesiyle 4 dokunmatik düğme: küçük ekranlarda yer açılır */
/* dar dikey telefon: 2x2 ama küçük (toplam yükseklik eski 3 düğmeli düzenden az) */
@media (orientation: portrait) and (max-width: 400px) {
  body.touch .t-grid { gap: 9px; }
  body.touch #tDash { width: 76px; height: 76px; font-size: 18px; }
  body.touch #tSwing { width: 80px; height: 80px; font-size: 15px; }
  body.touch #tSpray, body.touch #tTrap { width: 60px; height: 60px; font-size: 13px; }
}
/* yatay kısa ekran: köşede büyük Atıl, çevresinde çeyrek yay üzerinde daha küçük Hortum (sol), Bırak (çapraz), Kapan (üst).
   "Tacı bırak" yayın soluna geçer, mini haritaya değmez. Yay 160x160: Atıl merkezi (124,124), 64 px'lik küçükler 92 birim uzakta
   (45 derece aralıkla aralarında ~6 px boşluk kalır). */
@media (orientation: landscape) and (max-height: 500px) {
  body.touch #touchBtns { display: flex; align-items: flex-end; gap: 10px; }
  body.touch.btns-left #touchBtns { flex-direction: row-reverse; }
  body.touch .t-grid { display: block; position: relative; width: 160px; height: 160px; }
  body.touch .t-grid > button { position: absolute; margin: 0; }
  body.touch #tDash { width: 72px; height: 72px; left: 88px; top: 88px; font-size: 18px; }
  body.touch #tSwing, body.touch #tSpray, body.touch #tTrap { width: 64px; height: 64px; font-size: 13px; }
  body.touch #tSwing { left: 0; top: 92px; }
  body.touch #tSpray { left: 27px; top: 27px; }
  body.touch #tTrap { left: 92px; top: 0; }
  body.touch.btns-left #tDash { left: 0; }
  body.touch.btns-left #tSwing { left: 96px; }
  body.touch.btns-left #tSpray { left: 69px; }
  body.touch.btns-left #tTrap { left: 4px; }
}

/* Yatay telefon ana menüsü: solda ana sütun (başlık, Oyna, kutucuklar), sağda ikincil sütun (arkadaşlar, havuz,
   tam ekran, öneri, rekor). İki sütun yüksekliği paylaştığı için kısa ekranlarda da alttan taşmaz. Arkadaki canlı dünya
   sağ tarafta kalır; soldan sağa açılan karartma yazıları okunur tutar. */

@media (orientation: landscape) and (max-height: 780px) {
  
  
  
  
  .friends-line, .net-line { grid-column: 1; grid-row: auto; }
  
  
  
  
  
  
  
  
  
  
  
  .btn.pool { font-size: 13px; padding: 5px 11px 4px; text-align: center; }
  .net-line { font-size: 12px; }
  .friends-line { font-size: 12px; }
}

/* ana ekranda dokunulabilir satır ve profil resmi */
#menuForm.signed #nameInput, #meAvatar { cursor: pointer; }

/* ---------- İfadeler ---------- */
#emoteBtn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; }
#emoteBtnIco { width: 26px; height: 26px; display: block; }
#emoteBtn.cool { opacity: 0.5; }
body.touch #emoteBtnIco { width: 26px; height: 26px; }
.emote-panel {
  z-index: 6;
  padding: 8px 10px 10px;
  display: grid;
  gap: 6px;
  pointer-events: auto;
}
.hud-tr .emote-panel { position: static; animation: dockPop 0.14s ease-out; }
.emote-panel[hidden] { display: none; }
.emote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--display); font-size: 15px; color: var(--ink); }
.emote-keys { font-family: inherit; font-size: 11px; font-weight: 700; color: var(--ink2); }
.emote-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; }
.emote-cell {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 70px;
  padding: 4px 2px 3px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: 700 11px/1.1 "Oyun", system-ui, sans-serif;
  cursor: pointer;
  touch-action: none;
}
.emote-cell:hover { background: #fff; }
.emote-cell canvas { width: 46px; height: 46px; display: block; }
.emote-cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.emote-cell .ek { position: absolute; top: 2px; left: 6px; font-size: 10px; font-weight: 800; color: var(--ink2); }
body.touch .emote-cell .ek { display: none; }
body.touch .emote-cell { width: 58px; padding: 3px 1px 2px; font-size: 10px; }
body.touch .emote-cell canvas { width: 40px; height: 40px; }
@media (max-height: 500px) {
  .emote-panel { padding: 5px 8px 8px; gap: 4px; }
  .emote-head { font-size: 13px; }
  .emote-grid { gap: 4px; }
  body.touch .emote-cell { width: 54px; }
  body.touch .emote-cell span { display: none; }
  body.touch .emote-cell canvas { width: 44px; height: 44px; }
}

/* Kısa yatay ekran (telefon yan): pencereler daha az boşluk ve daha küçük başlıkla alttan taşmadan sığsın.
   Duraklat penceresinde dört düğme tek satırda. (yatay_menu.py ve ayarlar_tasma.py ile ölçülür.) */
@media (orientation: landscape) and (max-height: 500px) {
  .overlay:not(.menu-overlay) { padding-top: calc(10px + var(--sat)); padding-bottom: calc(10px + var(--sab)); }
  .card { padding: 14px 16px; gap: 9px; border-radius: 20px; }
  .card h2 { font-size: 27px; }
  .card > h2:first-of-type { padding-right: 40px; }
  .x-close { top: 8px; right: 8px; }
  .pause-note { font-size: 13px; margin-top: 0; }
  #pause .card { max-width: min(560px, 100%); }
  #pause .btn-row { flex-wrap: nowrap; gap: 8px; }
  #pause .btn-row .btn { flex: 1 1 auto; min-width: 0; font-size: 15px; padding: 7px 10px 6px; white-space: nowrap; }
}

/* Dar ekranda En iyiler satırı iki satır: üstte isim, altında sayılar (isim sıfıra sıkışmasın) */
@media (max-width: 440px) {
  .top-row { grid-template-columns: 26px repeat(3, auto); gap: 2px 10px; justify-content: stretch; }
  .top-row > span:nth-child(1) { grid-row: 1 / span 2; align-self: center; }
  .top-row > .top-who { grid-column: 2 / -1; grid-row: 1; }
  .top-row > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .top-row > span:nth-child(4) { grid-column: 3; grid-row: 2; }
  .top-row > span:nth-child(5) { grid-column: 4; grid-row: 2; justify-self: start; }
}

/* En kısa yatay ekranlarda (568x320 gibi) hesap çağrısının notu ve alanlar sıkışır */
@media (orientation: landscape) and (max-height: 400px) {
  
  
  #nameInput { font-size: 15px; padding-top: 5px; padding-bottom: 4px; }
  
  
  
  
  
  
  
  
  
}

/* ---------- Ölüm ekranı: neden resmi + gövde + düğmeler ---------- */
.over-card { max-width: 460px; padding: 0 0 18px; gap: 0; overflow: hidden; }
.over-card > .over-art { display: block; }
.over-art { width: 100%; line-height: 0; background: var(--cream2); border-bottom: var(--line); position: relative; aspect-ratio: 340 / 200; } /* (LİSTE 53: gazete daha büyük; 340 / 160 idi) */
/* Savana Gazetesi tuvali (LİSTE 49, js/gazete.js): alanı doldurur, alanın boyunu CSS belirler */
.over-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.over-body { display: grid; gap: 10px; padding: 14px 20px 6px; min-width: 0; }
.over-body h2 { font-size: 34px; }
.over-body .over-cause { margin: 0; line-height: 1.3; }
.over-body .killer-card { margin-top: 0; }
.over-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px 20px 0; }
.over-again { width: 100%; font-size: 22px; padding: 10px 16px 9px; }
/* son dakikada elenen oyuncu (LİSTE 18): doğma düğmeleri görünür ama kilitli, basınca nedeni yazar */
.btn.kilitli { opacity: 0.45; filter: grayscale(0.6); }
.over-kilit { margin: 0; font-size: 13.5px; font-weight: 800; color: #b23a2a; text-align: center; text-wrap: balance; }
.over-kilit[hidden] { display: none; }
.over-sub { display: flex; gap: 8px; }
/* yazı sığmazsa iki satıra kırılır (dar telefonda tek satıra zorlanınca düğmeden taşıyordu) */
.over-sub .btn { flex: 1 1 auto; font-size: 15px; padding: 8px 8px 7px; line-height: 1.1; min-width: min-content; text-wrap: balance; text-align: center; overflow-wrap: normal; }
/* (LİSTE 49) kelime ortasından bölünmesin: "Ayarla / r" oluyordu; sığmazsa kelime aralarından iki satıra iner */
@media (max-width: 360px) {
  .over-body { padding: 12px 14px 4px; }
  .over-actions { padding: 8px 14px 0; }
  .over-sub { gap: 6px; }
  .over-sub .btn { font-size: 14px; padding: 8px 4px 7px; }
}
@media (orientation: portrait) and (max-height: 620px) { .over-art { aspect-ratio: auto; height: 132px; } .over-body { gap: 6px; padding-top: 10px; } .over-body h2 { font-size: 30px; } }
/* yatay geniş ekran: solda resim, sağda gövde ve düğmeler */
@media (orientation: landscape) and (min-width: 540px) {
  .over-card {
    max-width: min(920px, calc(100vw - 24px));
    /* (LİSTE 53, Yusuf: gazete öne çıksın, seçenekler daralsın; 40% idi) */
    grid-template-columns: minmax(300px, 56%) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    padding: 0;
  }
  .over-card > .over-art { grid-column: 1; grid-row: 1 / span 2; border-bottom: 0; border-right: var(--line); align-self: stretch; display: grid; aspect-ratio: auto; min-height: 250px; }
  .over-card > .over-body { grid-column: 2; grid-row: 1; padding: 16px 20px 6px 18px; }
  .over-card > .over-actions { grid-column: 2; grid-row: 2; padding: 6px 20px 18px 18px; }
}
/* yatay telefon (LİSTE 49): kart ekranın yüksekliğine sığar (eskiden 320-360 boyda düğmeler ekranın dışına taşıyordu);
   başlık, istatistikler ve düğmeler sıkılaşır, resim sütunu daralır */
@media (orientation: landscape) and (max-height: 500px) {
  .over-card { max-height: calc(100dvh - 16px); grid-template-columns: minmax(220px, 50%) minmax(0, 1fr); }
  .over-card > .over-body { padding: 10px 16px 4px 14px; gap: 5px; overflow-y: auto; min-height: 0; }
  .over-card > .over-actions { padding: 4px 16px 12px 14px; gap: 6px; }
  .over-body h2 { font-size: 24px; line-height: 1.05; }
  .over-body .over-cause { font-size: 13.5px; line-height: 1.25; }
  .over-body .stats { gap: 6px; }
  .over-body .stat { padding: 3px 10px 4px; border-radius: 11px; }
  .over-body .stat-k { font-size: 10px; }
  .over-body .stat-v { font-size: 18px; }
  .over-body .more-btn { font-size: 13px; }
  .over-body .over-best { font-size: 13px; }
  .over-body .over-best.record { font-size: 16px; }
  .over-again { font-size: 18px; padding: 6px 12px 5px; }
  .over-sub { gap: 6px; }
  .over-sub .btn { font-size: 13.5px; padding: 6px 6px 5px; }
}
@media (orientation: landscape) and (max-height: 370px) {
  .over-card > .over-body { padding-top: 8px; gap: 4px; }
  .over-body h2 { font-size: 21px; }
  .over-body .over-cause { font-size: 12.5px; }
  .over-body .stat-v { font-size: 16px; }
  .over-again { font-size: 16px; padding: 5px 10px 4px; }
  .over-sub .btn { font-size: 12.5px; padding: 5px 5px 4px; }
}

/* ---------- Özel oda ---------- */
.room-note { background: #fbe3d8; cursor: pointer; }
.room-here { display: grid; gap: 6px; padding: 12px 14px; border: var(--line); border-radius: 16px; background: var(--paper); }
.room-here > * { margin: 0; min-width: 0; }
.room-code { font-family: var(--display); font-size: 20px; letter-spacing: 0.14em; color: var(--ink); }
.room-code.big { font-size: 34px; line-height: 1; }
.room-code-in { text-transform: uppercase; letter-spacing: 0.14em; }
.room-mine { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
.room-rank { margin: 0; font-size: 13px; font-weight: 800; color: #a3311d; }
.room-rank.yes { color: #3f7a26; }
.room-det { border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 0 12px; }
.room-det > summary { cursor: pointer; font-weight: 800; padding: 9px 0 8px; }
.room-det[open] > summary { border-bottom: 2px dashed var(--sand-dk); margin-bottom: 8px; }
.room-grp { display: grid; gap: 10px; padding-bottom: 10px; }
.room-gh { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--gold-dk); }
.room-row { display: grid; gap: 2px; padding: 6px 8px 5px; border-radius: 10px; }
.room-row.chg { background: rgba(242, 177, 52, 0.22); }
.room-rh { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: 14px; }
.room-rv { font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }
.room-row input[type=range] { width: 100%; accent-color: var(--gold-dk); }
body.touch .room-row input[type=range] { height: 32px; }
#roomMakeBtn { justify-self: start; }
@media (max-height: 780px) and (orientation: landscape) {
  #roomView .card { padding: 12px 16px; gap: 8px; }
  .room-code.big { font-size: 26px; }
}

/* Hesap rütbesi (js/rutbe.js) */
.rank-badge { display: inline-flex; flex: none; line-height: 0; }
.rank-badge svg { display: block; }
.rank-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-line.detail {
  gap: 12px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
}
.rank-txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.rank-name { font: 800 15px/1.1 var(--body); color: var(--ink); letter-spacing: 0.01em; }
.rank-line.detail .rank-name { font: 400 19px/1.1 var(--display); }
.rank-sub { font: 700 12px/1.2 var(--body); color: var(--ink3); font-variant-numeric: tabular-nums; }
.rank-bar { height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: var(--cream2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--gold); border-right: 2px solid var(--ink); }
.person-chip .rank-badge { margin-left: 2px; }
.top-row.rank-row { grid-template-columns: 34px 1fr auto auto; }
.rank-up {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border: 2px solid var(--gold-dk);
  border-radius: 12px;
  background: #fff3c9;
  font: 800 15px var(--body);
  color: var(--ink);
  animation: rank-pop 0.5s ease-out;
}
@keyframes rank-pop { from { transform: scale(0.85); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rank-up { animation: none; } }
@media (max-width: 440px) {
  .top-row.rank-row { grid-template-columns: 26px repeat(2, auto); }
}

/* ---------- Sohbet (js/sohbet.js) ---------- */
.chat-ico { width: 20px; height: 20px; display: block; flex: none; }
.chat-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font: 800 11px/1 var(--body);
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.chat-badge[hidden] { display: none; }
.chat-panel {
  z-index: 7;
  left: calc(16px + var(--sal));
  bottom: calc(16px + var(--sab));
  width: min(380px, calc(100vw - 32px - var(--sal) - var(--sar)));
  max-height: min(560px, calc(100dvh - 32px - var(--sat) - var(--sab)));
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--cream);
  pointer-events: auto;
  animation: chatUp 0.16s ease-out;
}
.chat-panel[hidden] { display: none; }
@keyframes chatUp { from { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-panel { animation: none; } }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-head h2 { margin: 0; font: 400 21px/1.1 var(--display); color: var(--ink); }
.chat-x {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  font: 800 22px/1 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}
.chat-x span { margin-top: -3px; }
.chat-list {
  flex: 1 1 auto;
  min-height: 90px;
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 6px;
  background: var(--paper);
  border: 2px solid rgba(59, 39, 21, 0.25);
  border-radius: 12px;
}
.chat-empty { margin: 4px; font-size: 13px; color: var(--ink3); }
.chat-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 3px 6px; border-radius: 8px; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.chat-row.mine { background: rgba(47, 156, 149, 0.1); }
.chat-row.tagged { background: #fff3c9; box-shadow: inset 3px 0 0 var(--gold-dk); }
.chat-who { padding: 0; border: 0; background: none; font: 800 14px var(--body); color: var(--gold-dk); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.chat-who:disabled { color: var(--teal); text-decoration: none; cursor: default; }
.chat-text { color: var(--ink); }
.chat-tag { color: var(--teal); }
.chat-acts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.chat-acts .danger { border-color: var(--red); color: var(--red); }
.chat-note { margin: 0; padding: 4px 8px; font-size: 13px; font-weight: 700; color: var(--ink); background: #fff3c9; border-radius: 8px; }
.chat-to { display: flex; align-items: center; gap: 6px; font: 800 14px var(--body); color: var(--teal); }
.chat-to[hidden] { display: none; }
.chat-presets { display: flex; flex-wrap: wrap; gap: 5px; max-height: 150px; overflow-y: auto; padding: 2px; }
.chat-preset {
  padding: 4px 10px 3px;
  font: 700 13px/1.2 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.chat-preset:hover { background: #fff; }
.chat-preset:active { transform: translateY(1px); }
.chat-form { display: flex; gap: 6px; }
.chat-form[hidden] { display: none; }
.chat-form input { flex: 1; min-width: 0; font: 700 15px var(--body); padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); }
.chat-form .btn { padding: 5px 14px; font-size: 14px; }
.chat-rule { margin: 0; font-size: 12px; color: var(--ink3); line-height: 1.3; }
.chat-muted { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.chat-muted[hidden] { display: none; }
.chat-feed { display: grid; gap: 3px; }
.chat-feed[hidden] { display: none; }
.chat-feed-row {
  display: block;
  max-width: 100%;
  padding: 2px 8px;
  text-align: left;
  font: 700 12px/1.3 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid rgba(59, 39, 21, 0.35);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-feed-row.tagged { background: #fff3c9; border-color: var(--gold-dk); }
.chat-feed-row b { color: var(--gold-dk); }
@media (max-width: 520px) {
  .chat-panel { left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(8px + var(--sab)); width: auto; }
  .chat-list { max-height: 34dvh; }
}

/* ---------- Hamle tuş takımı: yay düzeni (js/ayak.js, LİSTE 11) ---------- */
/* hamle çipleri tuşların içine taşındı: durum çipleri (hız, hortum yemi, erime, gizli) kalır */
#swingChip, #dashChip, #sprayChip, #trapChip { display: none !important; }
#touchBtns, body.touch #touchBtns {
  position: fixed;
  left: var(--sal);
  right: auto;
  bottom: var(--sab);
  display: grid;
  gap: 8px;
  justify-items: start;
  pointer-events: none;
  z-index: 4;
}
body.touch #touchBtns { left: auto; right: var(--sar); justify-items: end; }
body.touch.btns-left #touchBtns { right: auto; left: var(--sal); justify-items: start; }
#touchBtns > * { pointer-events: auto; }
#ayak { display: block; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
#ayak .kp { cursor: pointer; }
#ayak .kp-ico { opacity: 0.55; }
#ayak .kp.ready .kp-ico { opacity: 1; }
#ayak .kp-glow, #ayak .kp-ph, #ayak .kp-hold, #ayak .kp-div, #ayak .kp-sico { pointer-events: none; }
#ayak .kp.full .kp-glow { opacity: 0.8; }
#ayak .kp.glow .kp-glow { opacity: 1; animation: ayGlow 0.9s ease-in-out infinite; }
#ayak .kp.locked { opacity: 0.55; }
#ayak .kp.hurt .kp-base { fill: #d7b3a4; }
#ayak .kp.busy { opacity: 0.8; }
#ayak text { font-family: var(--display); fill: var(--ink); paint-order: stroke; stroke: #fff6dc; stroke-width: 3px; pointer-events: none; }
#ayak .kp-key { display: none; font-family: var(--body); font-weight: 800; }
#ayak.desk .kp-key { display: inline; }
/* LİSTE 60: J3 joystick halkaları, II tuşu (O3): hazır değilken soluk iz, hazır olunca alevli halkayla belirir */
#ayak .kp-joy, #ayak .kp-alev { pointer-events: none; }
#ayak .kp.ozel2 { transition: opacity 0.2s; }
#ayak .kp.ozel2.gizli { opacity: 0.3; pointer-events: none; }
#ayak .kp.ozel2.gizli .kp-base { fill: #e8dcc4; }
#ayak .kp.ozel2.gizli .kp-alev, #ayak .kp.ozel2.gizli .kp-sico { display: none; }
#ayak .kp.ozel2 .kp-alev { transform-box: fill-box; transform-origin: center; animation: ayAlev 1.8s linear infinite; }
@keyframes ayAlev { to { transform: rotate(360deg); } }
/* LİSTE 60 (D2): hızlanırken Atıl turuncu, simge koşan ok, kenarından balyalar dökülür */
#ayak .kp-tut, #ayak .kp-kos, #ayak .kp-balya, #ayak .kp-serit { pointer-events: none; }
#ayak .kp-kos, #ayak .kp-balya, #ayak #tDash .kp-alev { display: none; }
#ayak .kp.sprint .kp-base, #ayak .kp.sprint .kp-fill { fill: #ffb347; }
#ayak .kp.sprint .kp-ico { display: none; }
#ayak .kp.sprint .kp-kos, #ayak .kp.sprint .kp-balya, #ayak #tDash.sprint .kp-alev { display: inline; }
#ayak #tDash .kp-alev { transform-box: fill-box; transform-origin: center; animation: ayAlev 1.2s linear infinite; }
#ayak .kp-balya { animation: ayBalya 0.9s ease-in infinite; }
@keyframes ayBalya { 0% { transform: translate(0, -6px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(0, 18px) rotate(25deg); opacity: 0; } }
#ayak .kp-kilo { fill: #a5530f; }
@media (prefers-reduced-motion: reduce) { #ayak #tDash .kp-alev, #ayak .kp-balya { animation: none; } }
@media (prefers-reduced-motion: reduce) { #ayak .kp.ozel2 .kp-alev { animation: none; } }
@keyframes ayGlow { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Kısa yatay telefon: "Tacı bırak" büyük ayak tuş takımının üstüne değil soluna, alta yaslı (üstte mini harita var).
   Yukarıdaki genel #touchBtns kuralından sonra gelmeli, yoksa o kural bunu ezer. */
@media (orientation: landscape) and (max-height: 500px) {
  body.touch #touchBtns { display: flex; align-items: flex-end; gap: 0; }
  body.touch.btns-left #touchBtns { flex-direction: row-reverse; }
  body.touch #tDrop { margin: 0 8px 14px; }
}

/* Dikey telefon: "Tacı bırak" büyük ayak tuş takımının üstüne değil, kutusunun boş sol üst köşesine (çeyrek dairenin dışı)
   oturur; üstüne dizilince kısa ekranlarda taç paneline biniyordu. Sol altta sabit joystick olduğu için sola alınmaz. */
@media (orientation: portrait) {
  body.touch #tDrop { position: absolute; left: 0; top: 0; margin: 0; font-size: 13px; padding: 6px 9px 5px; border-radius: 12px; }
}
@media (orientation: portrait) and (max-width: 340px) {
  body.touch #tDrop { font-size: 11.5px; padding: 5px 6px 4px; }
}
/* Alçak masaüstü ekranı: büyüyen mini harita sağ üstteki liderlere ve üst ortadaki ipucuna yaklaşmasın */
@media (max-height: 700px) and (min-width: 761px) {
  body:not(.touch) #minimap { width: min(260px, calc(100vh - 370px)); height: min(260px, calc(100vh - 370px)); }
  body:not(.touch) #minimap + .mm-legend { max-width: min(260px, calc(100vh - 370px)); }
}

/* Maç sonu buzunda elenen oyuncunun izleme şeridi (js/buz.js, js/ui.js updateElim) */
.elim-bar {
  position: fixed; top: calc(12px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 6px 8px 6px 14px; background: #dff3fb; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: var(--lift);
  font-family: var(--display); font-size: 15px; color: var(--ink);
}
.elim-bar[hidden] { display: none; }
.elim-bar .btn { padding: 4px 12px; font-size: 14px; }

/* ---------- Deneme alanı (test modu, LİSTE 15, js/deneme_ui.js) ---------- */
.dn-giris-kutu { max-width: 480px; }
.dn-genis { width: 100%; }
.dn-satir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dn-satir label { font-weight: 700; font-size: 14px; }
.dn-durum.bad { color: var(--red); font-weight: 700; }
/* deneyler (LİSTE 34, js/deney.js): giriş penceresindeki liste ve oyunda üstteki sayaç kutusu */
.dn-deney-liste { display: grid; gap: 8px; }
.dn-deney-btn {
  display: grid; gap: 2px; text-align: left; cursor: pointer;
  padding: 10px 12px; background: var(--cream, #fff8e6); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: var(--lift);
  font: 600 13px/1.35 var(--body);
}
.dn-deney-btn b { font: 800 15px var(--display); }
.dn-deney-btn:hover, .dn-deney-btn:focus-visible { background: var(--gold-lt); }
.dn-deney-hud {
  position: fixed; top: calc(64px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 30;
  width: min(440px, calc(100vw - 24px)); padding: 8px 14px; text-align: center; pointer-events: none;
  background: rgba(255, 248, 230, 0.94); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: var(--lift);
  font: 600 13px/1.35 var(--body);
}
.dn-deney-hud[hidden] { display: none; }
.dn-deney-hud b { font: 800 16px var(--display); }
.dn-deney-hud p { margin: 2px 0 4px; }
.dn-deney-say { font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.dn-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dn-liste-sat { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.dn-ac-btn {
  position: fixed;
  left: max(10px, var(--sal));
  top: calc(50% - 20px);
  z-index: 40;
  font: 800 14px var(--body);
  color: var(--ink);
  background: var(--gold-lt);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: var(--lift);
  cursor: pointer;
}
.dn-panel {
  position: fixed;
  left: max(8px, var(--sal));
  top: calc(8px + var(--sat));
  bottom: calc(8px + var(--sab));
  width: min(340px, calc(100vw - 16px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: rgba(255, 244, 220, 0.97);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--lift);
  color: var(--ink);
  font: 600 14px var(--body);
}
.dn-bas { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 2px solid var(--cream2); }
.dn-bas b { font: 400 22px var(--display); }
.dn-fps { flex: 1; font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.dn-x { width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font: 800 18px var(--body); cursor: pointer; }
.dn-govde { overflow-y: auto; padding: 8px 10px 12px; display: grid; gap: 8px; }
.dn-bolum { display: grid; gap: 8px; padding: 8px; border: 2px solid var(--cream2); border-radius: 12px; background: var(--paper); }
.dn-bolum > summary { font: 800 15px var(--body); cursor: pointer; }
.dn-hedef { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dn-bilgi { font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.dn-dugmeler { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dn-dugmeler[hidden] { display: none; }
.dn-etiket { font-size: 13px; font-weight: 800; }
.dn-kutu { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.dn-kutu input { width: 18px; height: 18px; }
.dn-sel { font: 700 14px var(--body); color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 6px; max-width: 170px; }
.dn-sayi { flex: 0 0 70px; }
.dn-panel .chip-btn { padding: 4px 9px; font-size: 13px; }
.dn-panel .chip-btn[aria-pressed="true"] { background: var(--gold); }
.dn-tehlike { color: var(--red); }
.dn-panel input[type="range"] { flex: 1 1 120px; accent-color: var(--gold-dk); }

/* ---------- Uygulamalı tur: Dede Hortum (LİSTE 15, js/ogretici.js) ---------- */
.og-kutu {
  position: fixed;
  top: calc(10px + var(--sat));
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 24px));
  z-index: 50;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.og-kutu[hidden] { display: none; }
.og-dede { flex: none; width: 96px; height: 96px; filter: drop-shadow(0 4px 0 rgba(59, 39, 21, 0.3)); }
.og-dede svg { width: 100%; height: 100%; display: block; overflow: visible; }
.og-dede-kucuk { width: 72px; height: 72px; }
.og-balon {
  position: relative;
  flex: 1;
  min-width: 0;
  margin-top: 8px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--lift);
  padding: 8px 14px 10px;
  color: var(--ink);
  cursor: pointer;
}
.og-balon::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 26px;
  border: 11px solid transparent;
  border-right-color: var(--ink);
  border-left: 0;
}
.og-balon::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 28px;
  border: 9px solid transparent;
  border-right-color: var(--cream);
  border-left: 0;
}
.og-ust { display: flex; align-items: baseline; gap: 8px; }
.og-ad { font: 400 19px var(--display); color: var(--gold-dk); }
.og-ilerleme { margin-left: auto; font: 700 12px var(--body); color: var(--ink3); font-variant-numeric: tabular-nums; }
.og-metin { margin: 2px 0 0; font: 700 17px/1.35 var(--body); min-height: 2.7em; text-wrap: pretty; }
.og-istem {
  margin: 8px 0 0;
  padding: 6px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--gold-lt);
  font: 800 17px var(--body);
  text-align: center;
  animation: og-nabiz 0.7s ease-in-out infinite alternate;
}
.og-istem[hidden] { display: none; }
.og-alt { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.og-sayac { flex: 1; font: 800 14px var(--body); color: var(--ink2); font-variant-numeric: tabular-nums; }
.og-dugme {
  font: 800 14px var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 4px 12px;
  cursor: pointer;
}
.og-dugme[hidden] { display: none; }
.og-devam { background: var(--gold); }
.og-atla { font-size: 12.5px; color: var(--ink2); }
.og-bitir {
  position: absolute;
  right: 4px;
  bottom: -30px;
  font: 800 12.5px var(--body);
  color: var(--ink);
  background: rgba(255, 244, 220, 0.9);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 2px 10px;
  cursor: pointer;
}
.og-gorevde .og-metin { min-height: 0; }
.og-gorevde .og-dede { width: 72px; height: 72px; }
/* zaman durunca: kenarlarda soğuk bir hare */
.og-dondu {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(40, 70, 110, 0) 55%, rgba(40, 70, 110, 0.38) 100%);
  box-shadow: inset 0 0 0 4px rgba(242, 177, 52, 0.55);
}
.og-dondu[hidden] { display: none; }
/* Dede'nin hareketleri */
.og-hortum { transform-box: view-box; transform-origin: 60px 68px; }
.og-konusuyor .og-hortum { animation: og-sallan 0.34s ease-in-out infinite alternate; }
.og-goz { transform-box: fill-box; transform-origin: center; animation: og-kirp 4.6s infinite; }
.og-konusuyor .og-kas { animation: og-kas 0.68s ease-in-out infinite alternate; }
@keyframes og-sallan { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
@keyframes og-kirp { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes og-kas { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes og-nabiz { from { transform: scale(1); } to { transform: scale(1.04); } }
/* tuş takımında parlayan tuş */
#ayak .kp.og-vurgu .kp-glow { opacity: 1 !important; fill: #ffd66b; animation: og-isik 0.6s ease-in-out infinite alternate; }
#ayak .kp.og-vurgu .kp-ring { stroke: #f27a1a; stroke-width: 5px; }
@keyframes og-isik { from { opacity: 0.55; } to { opacity: 1; } }
.og-kart { max-width: 500px; }
.og-kart-bas { display: flex; align-items: center; gap: 12px; }
.og-kart p { margin: 0; font-weight: 700; }
.og-dersler { display: flex; flex-wrap: wrap; gap: 8px; }
.og-dersler .btn { flex: 1 1 140px; }
.og-rehber { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 2px solid var(--cream2); border-radius: 14px; padding: 10px; }
.og-rehber p { margin: 0 0 8px; font-weight: 700; }
.og-rehber-sag { flex: 1; min-width: 0; }
@media (max-width: 560px) {
  .og-dede { width: 64px; height: 64px; }
  .og-gorevde .og-dede { width: 52px; height: 52px; }
  .og-metin { font-size: 15px; }
  .og-rehber { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .og-konusuyor .og-hortum, .og-goz, .og-konusuyor .og-kas, .og-istem, #ayak .kp.og-vurgu .kp-glow { animation: none; }
}
/* geniş ekranda balon üst ortadaki taç göstergesinin altında */
@media (min-width: 900px) and (min-height: 560px) {
  .og-kutu { top: calc(62px + var(--sat)); }
}
/* yatay telefon: alçak ekranda balon küçük */
@media (max-height: 500px) {
  .og-kutu { top: calc(4px + var(--sat)); width: min(600px, calc(100vw - 24px)); }
  .og-dede, .og-gorevde .og-dede { width: 54px; height: 54px; }
  .og-balon { margin-top: 2px; padding: 4px 10px 6px; border-width: 2.5px; }
  .og-balon::before { top: 16px; }
  .og-balon::after { top: 18px; }
  .og-ad { font-size: 15px; }
  .og-metin { font-size: 14px; line-height: 1.3; min-height: 0; }
  .og-istem { margin-top: 4px; padding: 3px 10px; font-size: 14px; }
  .og-alt { margin-top: 3px; }
  .og-dugme { padding: 2px 10px; font-size: 13px; }
  .og-bitir { bottom: -26px; }
}

/* İzci Uçuşu (LİSTE 23): yer seçmek için büyük harita (js/ucus_ui.js) */
#ucusHarita { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(35, 22, 8, 0.45); padding: 8px; }
#ucusHarita[hidden] { display: none; }
#ucusHarita .uh-kart { display: flex; flex-direction: column; gap: 6px; background: #fff4dc; border: 3px solid #3b2715; border-radius: 14px; padding: 8px; box-shadow: 0 6px 0 rgba(59, 39, 21, 0.35); width: min(94vw, calc(94vh - 70px)); }
#ucusHarita .uh-baslik { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: #3b2715; line-height: 1.15; }
#ucusHarita .uh-baslik b { font-size: 18px; }
#ucusHarita .uh-baslik span { font-size: 13px; opacity: 0.8; }
#ucusHarita .uh-sure { height: 6px; border-radius: 3px; background: rgba(59, 39, 21, 0.18); overflow: hidden; }
#ucusHarita .uh-sure i { display: block; height: 100%; background: #9fdcf0; border-right: 2px solid #3b2715; transform-origin: left center; }
#ucusHarita canvas { display: block; width: 100%; aspect-ratio: 1 / 1; border: 2px solid #3b2715; border-radius: 8px; cursor: crosshair; touch-action: none; }

/* son dakikada özel hamle tuşu kilitli (LİSTE 32) */
#tOzel.kilitli { opacity: 0.55; filter: saturate(0.4); }

/* ============================================================================================================
   Ana menü ve Seçenekler (LİSTE 42). Ana ekranda yalnız logo, ad, oyun türü + Oyna, üç düğme (Sınıf, Nasıl
   oynanır, Seçenekler; gerekirse Döndür) ve küçük "Oyunu izle" bağlantısı. Gerisi Seçenekler'de, açıklamalı satırlar.
   Düzen: masaüstünde solda bir sütun; dikey telefonda ortada; yatay telefonda iki sütun (solda kart, sağda düğmeler).
   ============================================================================================================ */
.ana-menu {
  background: linear-gradient(90deg, rgba(43, 28, 14, 0.62) 0%, rgba(43, 28, 14, 0.34) 42%, rgba(43, 28, 14, 0) 78%);
  display: flex;
  align-items: safe center;
}
.am-kutu {
  width: 100%;
  max-width: 452px;
  min-width: 0;
  margin-left: clamp(0px, 6vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  justify-items: stretch;
}
.am-kutu > * { min-width: 0; }

/* logo: yazı görsele gömülü; başlık metni ekran okuyucu için. LİSTE 44: masaüstünde ve dikey telefonda kapak görseli
   (gorsel/kapak.webp; açılış ekranı da onu yükler); yatay telefonda simge ve yazı yan yana (gorsel/logo-yatay.webp) */
.ana-menu h1.am-logo {
  margin: 0;
  font: inherit;
  text-transform: none;
  -webkit-text-stroke: 0;
  line-height: 0;
  letter-spacing: 0;
}
.am-logo picture { display: block; }
#menu #logoCanvas {
  display: block;
  width: min(100%, 300px, 36vh);
  height: auto;
  aspect-ratio: 566 / 640;
  margin: 0;
  filter: drop-shadow(0 8px 14px rgba(43, 28, 14, 0.45));
}
.am-slogan {
  justify-self: start;
  margin: -6px 0 0 6px;
  padding: 3px 12px 2px;
  font: 800 14px var(--body);
  color: var(--ink);
  background: rgba(255, 244, 220, 0.94);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

/* kart: ad, oyun türü + Oyna */
.am-kart {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--cream);
  border: var(--line);
  border-radius: 24px;
  box-shadow: 0 6px 0 rgba(43, 28, 14, 0.45);
}
.am-ad { display: flex; gap: 10px; align-items: center; margin: 0; min-width: 0; }
.am-oyna { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.am-tur {
  flex: 0 1 46%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 7px;
  font: 800 14px/1.15 var(--body);
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.am-tur:hover { background: #fffaf0; }
.am-tur:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.am-tur-ico {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d9a35e;
  border: 2.5px solid var(--ink);
  color: var(--cream);
}
.am-tur-ico svg { width: 19px; height: 19px; }
.am-tur-yazi { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.am-tur-nerede { font: 800 12px/1.15 var(--body); color: var(--ink2); }
.am-tur-mod { font: 400 19px/1.1 var(--display); }
.am-ok {
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-3px) rotate(45deg);
  margin-right: 4px;
}
.ana-menu .am-play {
  flex: 1 1 54%;
  min-width: 0;
  font-size: 30px;
  padding: 11px 16px 10px;
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--gold-dk), 0 6px 0 2px var(--ink);
}
.ana-menu .am-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-dk), 0 2px 0 2px var(--ink); }
.am-hesap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.am-hesap-not { flex: 1 1 220px; min-width: 0; font-size: 12.5px; line-height: 1.3; color: var(--ink2); }

/* ana ekran düğmeleri */
.am-dugmeler { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.am-dugme {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 84px;
  padding: 9px 6px 7px;
  background: var(--cream);
  border: var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.am-dugme:hover { background: #fffaf0; }
.am-dugme:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.am-ico { display: block; width: 38px; height: 38px; background-position: center; background-size: contain; background-repeat: no-repeat; }
.am-ico-svg { display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); color: var(--cream); }
.am-ico-svg svg { width: 21px; height: 21px; }
#classTile .am-ico { display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); color: var(--cream); background: #d4553a; }
#classTile .am-ico svg { width: 22px; height: 22px; }
.am-ico-fs { background: var(--teal); }
.am-ico-sec { background: #7b6bb8; }
.am-yazi { font: 800 14px/1.1 var(--body); text-align: center; max-width: 100%; overflow-wrap: break-word; text-wrap: balance; hyphens: manual; }
.am-nokta {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--ink);
}

/* alt satır: Oyunu izle, arkadaşlar, oda notu */
.am-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.am-link {
  font: 800 14px var(--body);
  color: var(--ink);
  background: rgba(255, 244, 220, 0.92);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px 4px;
  cursor: pointer;
}
.am-link:hover { background: #fff; }
.am-kart .am-link { background: #d6e9ec; }
#izleBtn::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z' fill='none' stroke='%233b2715' stroke-width='2.4'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%233b2715'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Seçenekler penceresi ---------- */
.sec-kart { max-width: 480px; gap: 12px; }
.sec-liste { display: grid; gap: 8px; }
.sec-satir {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 8px 12px 8px 10px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.15s ease;
}
button.sec-satir:hover { background: #fffaf0; }
button.sec-satir:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.sec-dil { cursor: default; flex-wrap: wrap; row-gap: 8px; }
.sec-ico { flex: none; width: 42px; height: 42px; background-position: center; background-size: contain; background-repeat: no-repeat; }
.sec-ico-svg { display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); color: var(--cream); }
.sec-ico-svg svg { width: 22px; height: 22px; }
.sec-ico-dil { background: #a585d0; }
.sec-ico-sohbet { background: #6f93d8; }
.sec-ico-hesap { background: var(--teal); }
.sec-ico-oneri { background: #d9a35e; }
.sec-fil { width: 64px; height: 40px; border-radius: 10px; }
.sec-yazi { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sec-ad { font: 400 18px/1.15 var(--display); }
.sec-alt { font: 700 13px/1.25 var(--body); color: var(--ink2); overflow-wrap: anywhere; }
.sec-ok {
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--ink3);
  border-top: 3px solid var(--ink3);
  transform: rotate(45deg);
  margin: 0 4px 0 2px;
}
.sec-dil-sec { flex: 0 1 auto; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; max-width: 100%; }
.sec-dil-sec .chip-btn { min-width: 46px; padding: 5px 10px 4px; }
.sec-dil-sec .chip-btn[aria-pressed="true"] { background: var(--gold); }
.sec-satir .tile-lock { position: static; font-size: 15px; }
.sec-satir .chat-badge { position: static; }
/* yönetici: deneme alanı da bir satır gibi */
.sec-liste .dn-menu-btn { justify-self: stretch; font: 400 17px var(--display); padding: 10px 14px; border-style: dashed; box-shadow: none; }

/* oyun türü penceresinde zorluk */
.gt-zorluk { margin-top: -2px; }

/* ---------- Ayarlar: temel ve gelişmiş ---------- */
.opt-grup { display: grid; gap: 14px; }
.ileri-ac {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 800 15px var(--body);
  color: var(--ink);
  background: none;
  border: 2px dashed var(--ink3);
  border-radius: 999px;
  padding: 6px 14px 5px;
  cursor: pointer;
}
.ileri-ac::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.ileri-ac[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.opt-ileri { padding: 12px; background: rgba(240, 220, 180, 0.45); border: 2px solid var(--cream2); border-radius: 16px; }

/* ---------- dar ve yatay ekranlar ---------- */
@media (max-width: 760px) {
  .ana-menu { background: rgba(43, 28, 14, 0.38); }
  .am-kutu { margin: 0 auto; }
}
/* dikey telefon: dikey logo, ortalı */
@media (orientation: portrait) and (max-width: 700px) {
  .ana-menu { align-items: safe center; }
  .am-kutu { justify-items: stretch; gap: 12px; }
  #menu #logoCanvas { width: min(58%, 250px, 30vh); margin: 0 auto; }
  .am-slogan { justify-self: center; margin: -4px 0 0; font-size: 13px; }
  .am-alt { justify-content: center; }
}
@media (max-width: 420px) {
  .am-dugmeler { gap: 8px; }
  .am-dugme { padding-left: 3px; padding-right: 3px; }
  .am-oyna { flex-direction: column; }
  .am-tur { flex: none; }
  .ana-menu .am-play { flex: none; font-size: 28px; }
  .am-dugme { min-height: 78px; }
  .am-yazi { font-size: 12.5px; }
  .sec-ad { font-size: 17px; }
}
@media (max-width: 360px) {
  .am-dugmeler { gap: 7px; }
  .am-dugme { padding-left: 2px; padding-right: 2px; border-radius: 16px; }
  .am-yazi { font-size: 12px; }
}
/* yatay telefon (LİSTE 45, Yusuf): tek sol sütun (en üstte logo, kart, en altta dört düğme); sağ bölge canlı maça açık */
@media (orientation: landscape) and (max-height: 500px) {
  .ana-menu {
    background: linear-gradient(90deg, rgba(43, 28, 14, 0.55) 0%, rgba(43, 28, 14, 0.3) 46%, rgba(43, 28, 14, 0) 62%);
    align-items: safe center;
    padding: calc(10px + var(--sat)) calc(16px + var(--sar)) calc(12px + var(--sab)) calc(16px + var(--sal));
  }
  .am-kutu { max-width: min(430px, 54vw); margin: 0; gap: 10px; align-items: start; }
  #menu #logoCanvas { width: auto; height: min(22vh, 86px); aspect-ratio: 580 / 200; margin: 0; }
  .am-slogan { display: none; }
  .am-kart { padding: 10px; gap: 8px; }
  .am-dugmeler { gap: 7px; }
  .am-dugme { min-height: 60px; padding: 5px 3px 4px; }
  .am-ico { width: 28px; height: 28px; }
  .am-yazi { font-size: 12px; }
  .ana-menu .am-play { font-size: 24px; padding: 8px 14px 7px; }
}
/* çok alçak yatay ekran (ör. 568x320, 640x360): logo ve kart sıkışır, menü kaydırmasız sığsın */
@media (orientation: landscape) and (max-height: 380px) {
  #menu #logoCanvas { height: min(18vh, 56px); }
  .am-kutu { gap: 6px; }
  .am-kart { padding: 8px; gap: 6px; }
  .am-ad #nameInput { padding: 6px 12px 5px; font-size: 16px; }
  .am-tur { padding: 4px 8px 4px 5px; }
  .am-tur-ico { width: 28px; height: 28px; }
  .am-tur-mod { font-size: 16px; }
  .ana-menu .am-play { font-size: 21px; padding: 6px 12px 5px; }
  .am-dugme { min-height: 50px; gap: 2px; }
  .am-ico { width: 24px; height: 24px; }
  .am-yazi { font-size: 11px; }
}

/* LİSTE 44: yatay telefonda sınıf kartları soldan sağa tek sıra, sığmayanlar yana kaydırılır */
@media (orientation: landscape) and (max-height: 500px) {
  .card.class-card-wrap { max-width: min(1000px, 100%); }
  .class-card-wrap .acc-sub { font-size: 13px; line-height: 1.3; margin: 0; }
  .class-cards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 4px 4px 8px; margin: -4px -4px 0;
    -webkit-overflow-scrolling: touch;
  }
  .class-card { scroll-snap-align: start; }
  .class-prev { height: 84px; }
}

/* LİSTE 45: yatay ekranlarda (masaüstü ve yatay telefon) "Oyunu izle" sağ bölgede, canlı maçın üstünde */
@media (orientation: landscape) and (min-width: 560px) {
  #menu #izleBtn {
    position: fixed; right: calc(20px + var(--sar)); bottom: calc(18px + var(--sab)); z-index: 2;
    font-size: 16px; padding: 8px 18px 7px; box-shadow: 0 4px 0 rgba(43, 28, 14, 0.45);
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  #menu #izleBtn { font-size: 14px; padding: 6px 14px 5px; bottom: calc(12px + var(--sab)); right: calc(14px + var(--sar)); }
}

/* LİSTE 46: Hakkında bağlantıları (Seçenekler satırı bir bağlantı, menünün altında küçük bağlantı) */
a.sec-satir { text-decoration: none; color: inherit; }
.sec-ico-hakkinda { background: var(--teal); }
.am-link.am-hakkinda { text-decoration: none; display: inline-block; background: rgba(255, 244, 220, 0.8); font-size: 13px; }

/* yatay telefonda menünün altında yer yok: Hakkında yalnız Seçenekler'de */
@media (orientation: landscape) and (max-height: 500px) { .ana-menu .am-alt .am-hakkinda { display: none; } }

/* ---------- Tuş yerleşimi ve klavye tuşları (LİSTE 56, js/yerlesim.js) ---------- */
/* kayıtlı yerleşimde tuş takımı bütün ekranı kaplar; yalnız tuşlar dokunulabilir */
#ayak.serbest { position: fixed; left: 0; top: 0; pointer-events: none; }
#ayak.serbest .kp { pointer-events: auto; }
.yer-ed { position: fixed; inset: 0; z-index: 60; background: rgba(40, 28, 14, 0.55); touch-action: none; user-select: none; -webkit-user-select: none; }
.yer-ust { position: absolute; left: 50%; top: calc(10px + var(--sat, 0px)); transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 12px 14px; }
.yer-ust b, .tus-panel b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.yer-not { font-size: 13px; color: var(--ink-2, #6b5236); }
.yer-ust.alt { top: auto; bottom: calc(10px + var(--sab, 0px)); }
.yer-kaylar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; }
@media (max-height: 500px) { .yer-ust { gap: 4px; padding: 8px 12px; } .yer-ust b { font-size: 16px; } .yer-not { font-size: 11.5px; line-height: 1.3; } }
.yer-kay { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-weight: 800; font-size: 14px; }
.yer-kay i { font-style: normal; color: #b56a10; }
.yer-mesaj { min-height: 1.2em; font-size: 13px; font-weight: 800; color: #a0281e; }
.yer-dug { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.yer-oge { position: absolute; border-radius: 50%; border: 3px dashed #fff6dc; background: rgba(255, 246, 220, 0.25); color: #fff6dc; font: 800 13px var(--body, system-ui); display: grid; place-items: center; text-align: center; padding: 0; cursor: grab; touch-action: none; opacity: var(--yer-saydam, 1); text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.yer-oge.secili { border-style: solid; border-color: #ffd257; background: rgba(255, 210, 87, 0.3); }
.yer-oge.cakisma { border-color: #e5372b; background: rgba(229, 55, 43, 0.3); }
.tus-ed { display: grid; place-items: center; padding: 16px; }
.tus-panel { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: grid; gap: 10px; padding: 14px 16px; }
.tus-liste { display: grid; gap: 6px; }
.tus-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-weight: 700; }
.tus-btn { min-width: 92px; }
.tus-btn.on { background: #ffd257; }

/* ---------- Ekranlar ve gezinme (LİSTE 59, js/ekran.js) ---------- */
/* büyük pencereler arkadan bağımsız, ekranı tamamen kaplar; tek ekran alanı, yana kayarak geçer */
.center-overlay.tam-ekran { background: var(--cream2); place-items: safe start center; z-index: 30; }
.center-overlay.tam-ekran > .card { max-width: 720px; min-height: calc(100% - 4px); align-content: start; box-shadow: none; }
@media (max-width: 760px), (max-height: 520px) {
  .center-overlay.tam-ekran { padding: var(--sat) var(--sar) var(--sab) var(--sal); }
  .center-overlay.tam-ekran > .card { max-width: none; min-height: 100%; border-radius: 0; border-width: 0; padding-top: 58px; }
}
.center-overlay.tam-ekran > .card { padding-top: 58px; }
.x-close.geri-btn { right: auto; left: 12px; top: 10px; width: auto; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; gap: 4px; display: inline-flex; align-items: center; font: 800 15px var(--body); }
.x-close.geri-btn .geri-ok { font-size: 26px; line-height: 1; margin-top: -3px; }
.x-close.geri-btn span { margin-top: 0; }
.kay-ileri { animation: ekranIleri 0.22s ease-out; }
.kay-geri { animation: ekranGeri 0.22s ease-out; }
@keyframes ekranIleri { from { transform: translateX(48px); opacity: 0.2; } to { transform: none; opacity: 1; } }
@keyframes ekranGeri { from { transform: translateX(-48px); opacity: 0.2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kay-ileri, .kay-geri { animation: none; } }
/* deneme ayarları ön ekranı (LİSTE 59): panel tam ekran, altta Başlat */
.dn-onayar-not, .dn-baslat-satir { display: none; }
.dn-panel.dn-onayar { left: 0; top: 0; bottom: 0; right: 0; width: auto; border-radius: 0; border-width: 0; background: var(--cream2); z-index: 46;
  padding: var(--sat) var(--sar) var(--sab) var(--sal); }
.dn-panel.dn-onayar .dn-bas, .dn-panel.dn-onayar .dn-govde, .dn-panel.dn-onayar .dn-onayar-not, .dn-panel.dn-onayar .dn-baslat-satir { width: min(720px, 100%); margin-inline: auto; }
.dn-panel.dn-onayar .dn-govde { flex: 1 1 auto; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 16px; }
.dn-panel.dn-onayar .dn-onayar-not { display: block; margin-block: 6px; padding-inline: 4px; font-size: 13px; color: var(--ink2); }
.dn-panel.dn-onayar .dn-baslat-satir { display: block; padding: 10px 0 12px; }
.dn-panel.dn-onayar .dn-bas b::after { content: ""; }
