/* PicEng — mobil uygulama kabuğu
 * Renk/tipografi token'ları Stitch designMd çıktısından. */

:root {
  --surface: #f8f9fb;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f4f6;
  --surface-container: #edeef0;
  --surface-container-high: #e7e8ea;
  --surface-container-highest: #e1e2e4;
  --on-surface: #191c1e;
  --on-surface-variant: #434654;
  --inverse-surface: #2e3132;
  --outline: #737685;
  --outline-variant: #c3c6d6;

  --primary: #003d9b;
  --on-primary: #ffffff;
  --primary-container: #0052cc;
  --on-primary-container: #c4d2ff;
  --primary-fixed: #dae2ff;

  --secondary: #775a00;
  --secondary-container: #fec300;
  --on-secondary-container: #6d5200;

  --tertiary: #004b59;
  --tertiary-container: #006477;
  --on-tertiary-container: #76e2ff;

  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error-container: #93000a;

  --background: #f4f6fa;

  --r-sm: 8px;
  --r: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-full: 9999px;

  --pad: 18px;
  --gap: 14px;
  --gutter: 2px;

  --f-head: "Montserrat", system-ui, -apple-system, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;

  --e1: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --e2: 0 8px 32px rgba(16, 24, 40, .14);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --dur: 280ms;
  --ease: cubic-bezier(.32, .72, 0, 1);
}

* { box-sizing: border-box; }
/* display:flex tanımlı bileşenlerde [hidden] etkisiz kalıyordu */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 24px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  /* Çift dokunuşla yakınlaştırmayı kapatır, kaydırmayı bozmaz */
  touch-action: manipulation;
  overscroll-behavior: none;
  overflow: hidden;
  user-select: none;
}

button, input { font: inherit; color: inherit; touch-action: manipulation; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   KABUK — sabit yükseklik, içeride kayan görünümler
   ============================================================ */
.app {
  position: fixed; inset: 0;
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--background);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(16, 24, 40, .1);
}

.topbar {
  flex: 0 0 auto;
  padding: calc(var(--safe-t) + 10px) var(--pad) 10px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(244, 246, 250, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
  z-index: 20;
  min-height: calc(var(--safe-t) + 56px);
}
.topbar.scrolled { border-bottom-color: rgba(115, 118, 133, .16); }
.topbar .title {
  flex: 1; min-width: 0;
  font-family: var(--f-head); font-weight: 700; font-size: 19px; line-height: 26px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar .title.brand { color: var(--primary-container); }

.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--on-surface);
  transition: background .15s ease, transform .12s ease;
}
.icon-btn:active { background: var(--surface-container-high); transform: scale(.92); }
.icon-btn[hidden] { display: none; }

.avatar {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary-container), #2f7bff);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 82, 204, .3);
  transition: transform .12s ease;
}
.avatar:active { transform: scale(.92); }

/* --- Görünüm yığını --- */
.view-stack { flex: 1 1 auto; position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  will-change: transform, opacity;
}
.view-inner { padding: 4px var(--pad) 28px; }
.view-inner > * + * { margin-top: var(--gap); }

/* ============================================================
   ALT GEZİNME
   ============================================================ */
.tabbar {
  flex: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(var(--safe-b) + 6px);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(115, 118, 133, .14);
}
.tabbar[hidden] { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 4px; border-radius: var(--r);
  color: var(--outline);
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  transition: color .2s ease;
}
.tab .pill {
  width: 100%; max-width: 58px; height: 30px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  transition: background .24s var(--ease);
  position: relative;
}
.tab .pill .material-symbols-outlined { font-size: 22px; transition: transform .24s var(--ease); }
.tab.on { color: var(--primary-container); }
.tab.on .pill { background: var(--primary-fixed); }
.tab.on .pill .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
  transform: translateY(-1px);
}
.tab:active .pill { transform: scale(.9); }

/* ============================================================
   TİPOGRAFİ
   ============================================================ */
.t-display { font-family: var(--f-head); font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.t-h1 { font-family: var(--f-head); font-size: 25px; line-height: 33px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.t-h2 { font-family: var(--f-head); font-size: 21px; line-height: 29px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.t-h3 { font-family: var(--f-head); font-size: 17px; line-height: 24px; font-weight: 700; margin: 0; }
.t-body { font-size: 15px; line-height: 22px; margin: 0; }
.t-sm { font-size: 13px; line-height: 19px; margin: 0; }
.t-xs { font-size: 11.5px; line-height: 16px; margin: 0; }
.t-caps { font-size: 11px; line-height: 15px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin: 0; }
.muted { color: var(--on-surface-variant); }
.dim { color: var(--outline); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-top: 22px !important;
}

/* ============================================================
   KART & BİLEŞENLER
   ============================================================ */
.card {
  background: var(--surface-container-lowest);
  border-radius: var(--r-md);
  padding: var(--pad);
  box-shadow: var(--e1);
}

.row-card {
  display: flex; align-items: center; gap: var(--gap);
  width: 100%; text-align: left;
  background: var(--surface-container-lowest);
  border-radius: var(--r-md);
  padding: 14px var(--pad);
  box-shadow: var(--e1);
  transition: transform .14s var(--ease), box-shadow .14s ease;
}
.row-card:active { transform: scale(.978); box-shadow: 0 1px 4px rgba(16, 24, 40, .06); }
.row-card .grow { flex: 1; min-width: 0; }
.row-card .chev { flex: 0 0 auto; color: var(--outline-variant); display: flex; }

.tile {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
}
.tile.blue { background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; }
.tile.teal { background: linear-gradient(135deg, #004b59, #0891a8); color: #fff; }
.tile.amber { background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container); }
.tile.violet { background: linear-gradient(135deg, #4b3bb5, #7a6cf0); color: #fff; }

/* --- İstatistik --- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--surface-container-lowest);
  border-radius: var(--r-md); padding: 14px var(--pad);
  box-shadow: var(--e1);
  display: flex; flex-direction: column; gap: 2px;
}
.stat .ico {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-fixed); color: var(--primary);
  margin-bottom: 6px;
}
.stat.amber .ico { background: #fff2c4; color: var(--secondary); }
.stat .value { font-family: var(--f-head); font-size: 26px; line-height: 32px; font-weight: 700; color: var(--on-surface); }
.stat .cap { color: var(--outline); }

/* --- Öne çıkan kart --- */
.hero {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: 20px var(--pad);
  background: linear-gradient(135deg, #0044ad 0%, #0052cc 45%, #2f7bff 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 82, 204, .28);
  transition: transform .14s var(--ease);
}
.hero:active { transform: scale(.985); }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .09); pointer-events: none;
}
.hero::before { width: 190px; height: 190px; top: -95px; right: -55px; }
.hero::after { width: 120px; height: 120px; bottom: -70px; right: 40px; background: rgba(254, 195, 0, .16); }
.hero > * { position: relative; z-index: 1; }
.hero .kicker { display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .82); }
.hero .kicker .material-symbols-outlined { font-size: 15px; }
.hero h2 { font-family: var(--f-head); font-size: 23px; line-height: 30px; font-weight: 700; margin: 9px 0 3px; letter-spacing: -.01em; }
.hero .meta { color: rgba(255, 255, 255, .78); }
.hero .cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 15px;
  background: rgba(255, 255, 255, .17);
  border-radius: var(--r-full); padding: 8px 16px;
  font-weight: 700; font-size: 13.5px;
}
.hero .cta .material-symbols-outlined { font-size: 17px; }

/* --- Çip --- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap;
}
.chip .material-symbols-outlined { font-size: 15px; }
.chip.blue { background: var(--primary-container); color: #fff; }
.chip.soft { background: var(--primary-fixed); color: var(--primary); }
.chip.amber { background: #fff2c4; color: var(--secondary); }
.chip.grey { background: var(--surface-container-high); color: var(--on-surface-variant); }

/* --- İlerleme çubuğu --- */
.bar { height: 7px; border-radius: var(--r-full); background: var(--surface-container-high); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, #0052cc, #2f7bff); transition: width .5s var(--ease); }
.bar.amber > i { background: linear-gradient(90deg, #f7be00, #fed964); }

/* --- Seviye kartı --- */
.level { display: block; position: relative; }
.level.locked { opacity: .55; }
.level .head { display: flex; align-items: center; gap: var(--gap); }
.level .ring {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 14px;
  background: var(--surface-container-high); color: var(--on-surface-variant);
}
.level .ring.done { background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; }
.level .ring.active { background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container); }
.level .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 13px 0 7px; }

/* --- Buton --- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px; border-radius: var(--r);
  font-family: var(--f-head); font-weight: 700; font-size: 15.5px;
  transition: transform .14s var(--ease), opacity .15s ease;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; box-shadow: 0 4px 14px rgba(0, 82, 204, .3); }
.btn-secondary { background: var(--surface-container-lowest); color: var(--primary-container); box-shadow: inset 0 0 0 1.5px var(--outline-variant); }
.btn-ghost { color: var(--on-surface-variant); }
.btn-danger { background: var(--surface-container-lowest); color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error-container); }

/* ============================================================
   OYUN
   ============================================================ */
.game-view { display: flex; flex-direction: column; overflow: hidden; }

.game-status {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px var(--pad) 10px;
}
.game-status .left { display: flex; align-items: center; gap: 7px; min-width: 0; }

.hint-btn {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--r-full);
  background: linear-gradient(135deg, #004b59, #0891a8); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 75, 89, .3);
  position: relative;
  transition: transform .14s var(--ease);
}
.hint-btn:active, .hint-btn.pressed { transform: scale(.9); }
.hint-btn .count {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--secondary-container); color: var(--on-secondary-container);
  font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.board-wrap {
  flex: 1 1 auto; min-height: 0; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px var(--pad) 2px;
  overflow: hidden;              /* hiçbir koşulda dışarı taşmasın */
}

/* Oran ızgaranın kendisinde (sütun/satır), JS renderBoard'da atanır.
 * max-width + max-height birlikte: tahta hem yatayda hem dikeyde
 * kutunun içine sığar, hangisi önce sınırlarsa ona uyar. */
.board {
  display: grid; gap: var(--gutter);
  background: var(--outline-variant);
  padding: var(--gutter);
  border-radius: var(--r);
  box-shadow: var(--e1);
  /* Kesin ölçü fitBoard() tarafından piksel olarak yazılır.
     Buradakiler ölçüm gelmezse devreye giren yedek. */
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  flex: 0 0 auto;
}

.cell {
  position: relative;
  min-width: 0; min-height: 0;   /* ızgara hücresi taşırmasın */
  border-radius: 4px;
  background: var(--surface-container-lowest);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700;
  font-size: var(--cell-font, clamp(11px, 3.6vw, 20px));
  color: var(--on-surface);
  transition: background .14s ease, color .14s ease;
}
.cell.block { background: var(--inverse-surface); }
.cell .num {
  position: absolute; top: 1px; left: 2.5px;
  font-family: var(--f-body); font-size: var(--num-font, 7.5px); line-height: 1;
  font-weight: 700; color: var(--outline);
  pointer-events: none;
}
.cell.in-word { background: var(--primary-fixed); }
.cell.in-word .num { color: var(--primary); }
.cell.active { background: #9db9ff; box-shadow: inset 0 -3px 0 var(--primary-container); }
.cell.solved { color: var(--primary-container); }
.cell.reveal { animation: pop .34s var(--ease); }

/* Yanlış kelime — tasarım sisteminin kuralı:
   "Error Cell: soft red background with dark red text" */
.cell.wrong {
  background: var(--error-container);
  color: var(--on-error-container);
  box-shadow: inset 0 0 0 1.5px var(--error);
}
.cell.wrong .num { color: var(--error); }
@keyframes pop { 0% { transform: scale(.55); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* --- İpucu + klavye --- */
.game-foot {
  flex: 0 0 auto;
  background: var(--surface-container-low);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -6px 24px rgba(16, 24, 40, .08);
  padding: 12px 7px calc(var(--safe-b) + 8px);
  margin-top: 12px;
}

.clue-card {
  display: flex; align-items: center; gap: 10px;
  margin: 0 7px 11px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #0044ad, #0052cc);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 82, 204, .24);
}
.clue-card.wrong {
  background: linear-gradient(135deg, #9f1414, #ba1a1a);
  box-shadow: 0 4px 16px rgba(186, 26, 26, .32);
}
.clue-card.wrong .kicker { color: #ffdad6; }
.clue-card.wrong .kicker .dot { background: #ffdad6; }
.clue-card .body { flex: 1; min-width: 0; }
.clue-card .kicker {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .75);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.clue-card .kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary-container); flex: 0 0 auto; }
.clue-card .word {
  font-family: var(--f-head); font-size: 19px; line-height: 26px; font-weight: 700;
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clue-card .nav { display: flex; gap: 3px; flex: 0 0 auto; }
.clue-card .nav button {
  width: 33px; height: 38px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s ease, transform .12s ease;
}
.clue-card .nav button:active,
.clue-card .nav button.pressed { background: rgba(255, 255, 255, .32); transform: scale(.92); }

.keyboard { display: flex; flex-direction: column; gap: 6px; }
.keyboard.shake { animation: kb-shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes kb-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.kb-row { display: flex; gap: 4px; }
.key {
  flex: 1 1 0; min-width: 0; height: clamp(38px, 5.4vh, 46px);
  border-radius: var(--r-sm);
  background: var(--surface-container-lowest);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .16);
  font-family: var(--f-head); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background .06s linear, transform .05s linear;
}
/* pointerdown'da preventDefault ettiğimiz için bazı tarayıcılarda :active
   tetiklenmez — görsel geri bildirimi .pressed sınıfı taşır. */
.key:active,
.key.pressed { background: var(--surface-container-high); transform: translateY(1.5px); }
.key.wide { flex: 1.55 1 0; background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; }
.key.wide:active, .key.wide.pressed { background: linear-gradient(135deg, #003d9b, #1f6bef); }
.key.del { flex: 1.55 1 0; background: var(--surface-container-high); }
.key.del:active, .key.del.pressed { background: var(--surface-container-highest); }

/* Alçak ekranlarda alt bölümü sıkıştır, ızgaraya daha çok yer kalsın */
@media (max-height: 720px) {
  .game-foot { padding-top: 9px; margin-top: 8px; }
  .clue-card { padding: 9px 12px; margin-bottom: 9px; }
  .clue-card .word { font-size: 17px; line-height: 23px; }
  .keyboard { gap: 5px; }
  .game-status { padding-bottom: 7px; }
}
@media (max-height: 600px) {
  .clue-card .kicker { display: none; }
  .key { height: 36px; }
}

/* ============================================================
   KUTLAMA
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 20, 30, .5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.overlay.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px;
  background: var(--surface-container-lowest);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px var(--pad) calc(var(--safe-b) + var(--pad));
  text-align: center;
  box-shadow: var(--e2);
  transform: translateY(100%);
  transition: transform .42s var(--ease);
  max-height: 88%; overflow-y: auto;
}
.overlay.show .sheet { transform: none; }
.sheet .grabber { width: 38px; height: 4px; border-radius: var(--r-full); background: var(--outline-variant); margin: 0 auto 16px; }
.sheet .medal {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(254, 195, 0, .42);
}
.score-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 16px; }
.score-row div { background: var(--surface-container-low); border-radius: var(--r); padding: 11px 4px; }
.score-row b { display: block; font-family: var(--f-head); font-size: 19px; line-height: 25px; color: var(--primary-container); }
.word-list { text-align: left; max-height: 210px; overflow-y: auto; margin-bottom: 16px; }
.word-list .wl {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--surface-container);
}
/* Yönetim panelinden girilen ek bilgi: okunuş, not, örnek cümle */
.word-list .wl.has-extra { border-bottom: 0; padding-bottom: 2px; }
.word-list .wl-extra {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 0 8px; border-bottom: 1px solid var(--surface-container);
  color: var(--on-surface-variant);
}
.word-list .wl-extra .ex { font-style: italic; }
.sheet .actions { display: flex; flex-direction: column; gap: 9px; }

#confetti { position: fixed; inset: 0; z-index: 55; pointer-events: none; }

/* ============================================================
   SIRALAMA
   ============================================================ */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-items: end; }
.podium .p {
  background: var(--surface-container-lowest); border-radius: var(--r-md);
  padding: 13px 6px; text-align: center; box-shadow: var(--e1);
}
.podium .p .av {
  width: 42px; height: 42px; border-radius: var(--r-full); margin: 0 auto 7px;
  background: var(--surface-container-high); color: var(--on-surface-variant);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 16px;
}
.podium .p1 {
  padding-top: 22px;
  background: linear-gradient(135deg, #0044ad, #2f7bff); color: #fff;
  box-shadow: 0 8px 22px rgba(0, 82, 204, .3);
}
.podium .p1 .av { background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container); }
.podium .p .nm { font-weight: 700; font-size: 13px; line-height: 18px; }
.podium .p .pt { font-size: 11px; line-height: 15px; opacity: .75; }

.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--surface-container-lowest);
  border-radius: var(--r); box-shadow: var(--e1);
}
.rank-row .pos { width: 22px; text-align: center; font-family: var(--f-head); font-weight: 700; color: var(--outline); flex: 0 0 auto; }
.rank-row .av {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--r-full);
  background: var(--surface-container-high); color: var(--on-surface-variant);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 13px;
}
.rank-row.me { background: var(--primary-fixed); box-shadow: none; }
.rank-row.me .av { background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; }
.rank-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .pts { font-family: var(--f-head); font-weight: 700; color: var(--primary-container); flex: 0 0 auto; }

/* ============================================================
   PROFİL
   ============================================================ */
.profile-head { text-align: center; padding: 6px 0 2px; }
.profile-head .big-av {
  width: 82px; height: 82px; margin: 0 auto 14px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 32px;
  box-shadow: 0 8px 24px rgba(0, 82, 204, .32);
}
.name-input {
  text-align: center; border: 0; background: transparent; outline: none;
  font-family: var(--f-head); font-weight: 700; font-size: 21px; line-height: 29px;
  width: 100%; padding: 3px 0; border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
  user-select: text;
}
.name-input:focus { border-bottom-color: var(--primary-container); }

.mini-level { display: flex; align-items: center; gap: 10px; }
.mini-level .lb { width: 26px; font-family: var(--f-head); font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.mini-level .bar { flex: 1; }
.mini-level .pc { width: 42px; text-align: right; flex: 0 0 auto; }

/* ============================================================
   ANA EKRANA EKLE
   ============================================================ */
#install-slot:empty { display: none; }

.install-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px 13px;
  padding: 15px var(--pad);
  border-radius: var(--r-md);
  background: var(--surface-container-lowest);
  box-shadow: var(--e1), inset 0 0 0 1.5px var(--primary-fixed);
  animation: rise .45s var(--ease) backwards .1s;
}
.install-card .ico {
  width: 46px; height: 46px; border-radius: var(--r);
  background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.install-card .body { min-width: 0; padding-right: 26px; }
.install-card .body b { display: block; font-family: var(--f-head); font-size: 16px; line-height: 22px; }
.install-card .body span { display: block; margin-top: 3px; font-size: 13px; line-height: 18px; color: var(--on-surface-variant); }
.install-card .btn { grid-column: 1 / -1; padding: 12px 16px; font-size: 14.5px; }
.install-card .x {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--outline);
}
.install-card .x .material-symbols-outlined { font-size: 18px; }
.install-card .x:active { background: var(--surface-container-high); }

/* iOS yönergeleri */
.steps { list-style: none; margin: 18px 0 20px; padding: 0; text-align: left; }
.steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 0; font-size: 14.5px; line-height: 21px;
}
.steps li + li { border-top: 1px solid var(--surface-container); }
.steps .n {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: var(--r-full);
  background: var(--primary-fixed); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 12.5px;
}

/* ============================================================
   KİMLİK DOĞRULAMA (giriş / kayıt)
   ============================================================ */
.auth-hero { text-align: center; padding: 18px 0 8px; }
.auth-hero img { width: 62px; height: 62px; border-radius: 16px; box-shadow: 0 8px 22px rgba(0, 82, 204, .28); }
.auth-hero h2 { margin: 16px 0 6px; }

.field { display: block; margin-bottom: 13px; }
.field > .lbl {
  display: block; margin-bottom: 6px; padding-left: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--on-surface-variant);
}
.field .wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-container-lowest);
  border-radius: var(--r); padding: 0 14px;
  box-shadow: inset 0 0 0 1.5px var(--outline-variant);
  transition: box-shadow .18s ease;
}
.field .wrap:focus-within { box-shadow: inset 0 0 0 2px var(--primary-container); }
.field .wrap .material-symbols-outlined { font-size: 20px; color: var(--outline); }
.field input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  padding: 14px 0; font-size: 16px; font-family: var(--f-body);
  user-select: text; -webkit-user-select: text;
}
.field input::placeholder { color: var(--outline-variant); }
.field .hint { display: block; margin: 5px 0 0 2px; font-size: 11.5px; line-height: 16px; color: var(--outline); }
.field.bad .wrap { box-shadow: inset 0 0 0 2px var(--error); }
.field.bad .hint { color: var(--error); }

.peek { color: var(--outline); display: flex; padding: 4px; margin-right: -4px; }

.form-error {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--error-container); color: var(--on-error-container);
  border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px;
  font-size: 13.5px; line-height: 19px;
}
.form-error[hidden] { display: none; }
.form-error .material-symbols-outlined { font-size: 18px; }

.auth-switch { text-align: center; margin-top: 18px; color: var(--on-surface-variant); font-size: 14px; }
.auth-switch a { color: var(--primary-container); font-weight: 700; }

.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .dots::after {
  content: ""; display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px;
}

/* Oturum durumu kartı */
.account {
  display: flex; align-items: center; gap: var(--gap);
  background: linear-gradient(135deg, #0044ad, #2f7bff); color: #fff;
  border-radius: var(--r-md); padding: 15px var(--pad);
  box-shadow: 0 6px 20px rgba(0, 82, 204, .26);
}
.account .av {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 17px;
}
.account .grow { flex: 1; min-width: 0; }
.account .grow b { display: block; font-family: var(--f-head); font-size: 16px; }
.account .grow span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.account button {
  flex: 0 0 auto; color: #fff; background: rgba(255, 255, 255, .18);
  border-radius: var(--r-full); padding: 8px 14px; font-size: 13px; font-weight: 700;
}
.account button:active { background: rgba(255, 255, 255, .3); }

.guest-cta { display: flex; gap: 10px; }
.guest-cta .btn { flex: 1; }

/* ============================================================
   YARDIMCI
   ============================================================ */
.center-msg { text-align: center; padding: 56px var(--pad); color: var(--on-surface-variant); }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--surface-container-high); border-top-color: var(--primary-container);
  border-radius: 50%; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.note {
  display: flex; gap: 9px; align-items: flex-start;
  color: var(--outline); padding: 2px 2px 0;
}
.note .material-symbols-outlined { font-size: 17px; flex: 0 0 auto; margin-top: 1px; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none; flex: 0 0 auto;
  line-height: 1;
}

/* Giriş animasyonu — liste öğeleri kademeli belirir */
.stagger > * {
  animation: rise .42s var(--ease) backwards;
}
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; }
.stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; }
.stagger > *:nth-child(8) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Hareket azaltma açıkken sarsıntı kapanır; uyarı rengi tek başına taşır */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   ARKADAŞLAR
   ============================================================ */

/* Sekme çubuğundaki bekleyen istek rozeti */
.tab-badge {
  position: absolute; top: -1px; right: 8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--error); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  font-style: normal;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

.search-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-container-lowest);
  border-radius: var(--r-full);
  padding: 0 8px 0 15px; height: 48px;
  box-shadow: inset 0 0 0 1.5px var(--outline-variant);
  transition: box-shadow .18s ease;
}
.search-field:focus-within { box-shadow: inset 0 0 0 2px var(--primary-container); }
.search-field > .material-symbols-outlined { font-size: 21px; color: var(--outline); }
.search-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 15.5px; padding: 0;
  -webkit-appearance: none; appearance: none;
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input::placeholder { color: var(--outline-variant); }

.list { display: flex; flex-direction: column; gap: 9px; }

.friend-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-container-lowest);
  border-radius: var(--r-md);
  padding: 11px 12px;
  box-shadow: var(--e1);
}
.friend-row .grow { flex: 1; min-width: 0; }
.friend-row .nm {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.friend-row .grow .t-xs { display: block; }
.friend-row.muted-row { opacity: .72; box-shadow: none; background: var(--surface-container-low); }

/* Ad baş harfi + çevrimiçi lambası */
.f-av {
  position: relative; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 18px;
}
.f-av.sm { width: 26px; height: 26px; font-size: 12px; }
.f-av.win  { background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container); }
.f-av.lose { background: var(--surface-container-high); color: var(--outline); }
.f-av .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: var(--r-full);
  box-shadow: 0 0 0 2.5px var(--surface-container-lowest);
}
.f-av .dot.on  { background: #12b76a; }
.f-av .dot.off { background: var(--outline-variant); }

.duel-btn {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 5px;
  height: 38px; padding: 0 14px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 82, 204, .28);
  transition: transform .14s var(--ease);
}
.duel-btn .material-symbols-outlined { font-size: 18px; }
.duel-btn:active { transform: scale(.94); }
.duel-btn.ghost {
  background: var(--surface-container-lowest); color: var(--primary-container);
  box-shadow: inset 0 0 0 1.5px var(--outline-variant);
}
.duel-btn[disabled] { opacity: .55; pointer-events: none; }

.rnd {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  transition: transform .14s var(--ease);
}
.rnd:active { transform: scale(.9); }
.rnd.ok { background: var(--primary-container); color: #fff; }
.rnd.no { background: var(--surface-container-high); color: var(--on-surface-variant); }

.icon-mini {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--outline);
}
.icon-mini:active { background: var(--surface-container-high); }

.empty-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface-container-lowest);
  border-radius: var(--r-md); padding: 16px; box-shadow: var(--e1);
}
.empty-card .tile { flex: 0 0 auto; }
.tile.grey { background: var(--surface-container-high); color: var(--outline); }

/* ============================================================
   SAVAŞ — üst bilgi ve rakibin canlı tahtası
   ============================================================ */

/* Üst bilginin yüksekliğini SOL sütun belirler (~86px). Rakip paneli ona
   göre gerilir, minyatür de artakalan boşluğu doldurur. Böylece bulmaca
   ne kadar büyük olursa olsun üst bilgi aynı yüksekliktedir ve tahtaya
   kalan yer öngörülebilir kalır. */
.vs-hud {
  --hud: 88px;                 /* iç yükseklik; alçak ekranlarda küçülür */
  flex: 0 0 auto;
  display: flex; align-items: stretch; gap: 8px;
  margin: 2px var(--pad) 0;
  padding: 8px;
  height: calc(var(--hud) + 16px);
  background: var(--surface-container-lowest);
  border-radius: var(--r-md);
  box-shadow: var(--e1);
}

/* Yükseklik sabit olduğu için iki sütun da kesin ölçüde: rakip paneli
   gerilir, minyatür artakalan boşluğu alır. İçeriğe bırakılsaydı bulmacanın
   biçimi üst bilginin boyunu belirlerdi — asıl sorun buydu. */
.vs-me {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.vs-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vs-line .nm {
  flex: 1; min-width: 0; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vs-me .bar { height: 6px; flex: 0 0 auto; }
.vs-me .chip { padding: 3px 9px; font-size: 11px; }
.vs-timer { font-variant-numeric: tabular-nums; font-weight: 700; }

.hint-btn.mini {
  width: 30px; height: 30px; margin-left: auto;
  box-shadow: 0 2px 7px rgba(0, 75, 89, .28);
}
.hint-btn.mini .material-symbols-outlined { font-size: 18px; }
.hint-btn.mini .count {
  min-width: 15px; height: 15px; line-height: 15px;
  font-size: 9.5px; top: -3px; right: -3px;
}

.vs-badge {
  flex: 0 0 auto; align-self: center;
  width: 26px; height: 26px; border-radius: var(--r-full);
  background: var(--surface-container-high); color: var(--outline);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 10px; letter-spacing: .02em;
}

/* Rakibin paneli — ekranın sağ üstü */
.vs-opp {
  flex: 0 0 auto; width: 100px; min-height: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px; border-radius: var(--r);
  background: var(--surface-container-low);
  box-shadow: inset 0 0 0 1.5px var(--outline-variant);
  text-align: left;
  transition: transform .14s var(--ease);
}
.vs-opp:active { transform: scale(.96); }
.vs-opp .nm { font-weight: 700; font-size: 10.5px; line-height: 14px; }
.vs-opp .f-av.sm { width: 20px; height: 20px; font-size: 10px; }
.vs-opp .foot { gap: 5px; }
.vs-opp .foot .bar { flex: 1; height: 4px; }
.vs-opp .cnt {
  font-weight: 700; color: var(--primary-container);
  font-variant-numeric: tabular-nums; font-size: 10.5px;
}
.vs-opp .drop {
  display: block; text-align: center; font-weight: 700;
  color: var(--error); line-height: 13px; font-size: 10px;
}

/* Canlı lambası */
.live {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: var(--r-full);
  background: #12b76a; font-style: normal;
  animation: live-pulse 1.6s ease-in-out infinite;
}
.live.off { background: var(--outline-variant); animation: none; }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .5); }
  50%      { box-shadow: 0 0 0 4px rgba(18, 183, 106, 0); }
}

/* Rakibin ızgarasının minyatürü — harf değil, yalnız durum taşır.
   Ölçüsünü kabı belirler: .mini artakalan yüksekliği alır, içindeki .g
   o yüksekliğe oturur. Genişlik taşarsa max-width kırpar, taşma olmaz. */
.vs-opp .mini {
  flex: 1 1 auto; min-height: 26px; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mini > .g { display: grid; gap: 1px; height: 100%; width: auto; max-width: 100%; }
.mini .mc {
  background: var(--surface-container-high);
  border-radius: 1px; min-width: 0; min-height: 0;
  transition: background .25s var(--ease);
}
.mini .mc.f { background: var(--primary-fixed); }
.mini .mc.s { background: var(--primary-container); }
.mini .mb { background: transparent; }

/* Büyütülmüş hâli — burada genişlik sürüyor */
.mini.big { display: block; max-width: 250px; margin: 16px auto 4px; }
.mini.big > .g { width: 100%; height: auto; gap: 2px; }
.mini.big .mc { border-radius: 2px; }

.vs-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 12px; color: var(--outline); font-size: 11.5px;
}
.vs-legend span { display: flex; align-items: center; gap: 5px; }
.vs-legend .sw {
  width: 11px; height: 11px; border-radius: 2px;
  background: var(--surface-container-high);
}
.vs-legend .sw.f { background: var(--primary-fixed); }
.vs-legend .sw.s { background: var(--primary-container); }

/* --- Savaş üst bilgisinin ekrana uyarlanması --- */

/* Alçak ekran: minyatür küçülür, tahtaya yer kalır */
@media (max-height: 720px) {
  .vs-hud { --hud: 78px; gap: 7px; }
  .vs-me { gap: 5px; }
  .vs-opp .mini { min-height: 22px; }
}
@media (max-height: 620px) {
  /* 72 = başlık 20 + minyatür 20 + alt satır 12 + boşluklar 8 + dolgu 12 */
  .vs-hud { --hud: 72px; }
  .vs-opp .foot .bar { display: none; }   /* sayı zaten duruyor */
  .vs-opp .mini { min-height: 14px; }
  .hint-btn.mini { width: 26px; height: 26px; }
  .hint-btn.mini .material-symbols-outlined { font-size: 16px; }
}

/* Dar ekran: önce VS rozeti, sonra rakip panelinin genişliği gider */
@media (max-width: 400px) {
  .vs-opp { width: 92px; }
}
@media (max-width: 359px) {
  .vs-badge { display: none; }
  .vs-opp { width: 80px; }
  .vs-me .chip { padding: 3px 7px; }
}

/* Geniş/uzun ekranda minyatür rahat nefes alsın */
@media (min-height: 860px) {
  .vs-hud { --hud: 100px; }
  .vs-opp { width: 112px; }
  .vs-opp .mini { min-height: 40px; }
}

/* ============================================================
   SAVAŞ — davet, kurulum ve sonuç kutuları
   ============================================================ */

.vs-invite-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.big-av {
  width: 64px; height: 64px; border-radius: var(--r-full); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 700; font-size: 26px;
}
.big-av.me   { background: var(--surface-container-high); color: var(--on-surface-variant); }
.big-av.duel { background: linear-gradient(135deg, #0052cc, #2f7bff); color: #fff; box-shadow: 0 8px 22px rgba(0, 82, 204, .3); }
.vs-invite-head .clash {
  width: 38px; height: 38px; border-radius: var(--r-full); flex: 0 0 auto;
  background: var(--secondary-container); color: var(--on-secondary-container);
  display: flex; align-items: center; justify-content: center;
}

.vs-countdown { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
.vs-countdown .bar { flex: 1; height: 6px; }
.vs-countdown .bar > i { background: linear-gradient(90deg, #f7be00, #fed964); transition: width .5s linear; }
.vs-countdown .t-xs { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

/* Boy ve seviye seçimi */
.pick-row { display: flex; gap: 8px; margin-top: 8px; }
.pick-row.wrap { flex-wrap: wrap; }
.pick {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 11px 6px; border-radius: var(--r);
  background: var(--surface-container-low); color: var(--on-surface-variant);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: background .18s ease, box-shadow .18s ease;
}
.pick b { font-family: var(--f-head); font-size: 14px; }
.pick .t-xs { color: var(--outline); }
.pick.sm { flex: 0 0 auto; min-width: 54px; padding: 10px 12px; }
.pick.on {
  background: var(--primary-fixed); color: var(--primary);
  box-shadow: inset 0 0 0 1.5px var(--primary-container);
}
.pick.on .t-xs { color: var(--primary); }

.sheet .medal.gold { background: linear-gradient(135deg, #fec300, #ffdb63); color: var(--on-secondary-container); }
.sheet .medal.grey {
  background: var(--surface-container-high); color: var(--outline);
  box-shadow: none;
}

/* ============================================================
   KISA BİLDİRİM
   ============================================================ */
.toast {
  position: fixed; z-index: 80;
  left: 50%; bottom: calc(var(--safe-b) + 84px);
  transform: translate(-50%, 14px);
  max-width: min(88vw, 420px);
  background: var(--inverse-surface); color: #fff;
  padding: 12px 18px; border-radius: var(--r-full);
  font-size: 13.5px; line-height: 19px; text-align: center;
  box-shadow: var(--e2);
  opacity: 0; pointer-events: none;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ============================================================
   SIRALAMA — genel / arkadaşlar geçişi
   ============================================================ */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-container); border-radius: var(--r-full);
  margin-bottom: var(--gap);
}
.seg button {
  flex: 1; padding: 9px 6px; border-radius: var(--r-full);
  font-size: 13.5px; font-weight: 700; color: var(--on-surface-variant);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.seg button.on {
  background: var(--surface-container-lowest); color: var(--primary-container);
  box-shadow: var(--e1);
}

/* Savaş galibiyeti rozeti */
.podium .p .wins {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 4px;
  color: var(--secondary); font-weight: 700;
}
.rank-row .nm .wins {
  display: block; font-style: normal; font-weight: 500; color: var(--outline);
}

/* ============================================================
   HESAP — silme ekranı
   ============================================================ */
.kill-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.kill-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0; font-size: 13.5px; line-height: 20px;
  color: var(--on-surface-variant);
}
.kill-list li .material-symbols-outlined { color: var(--outline); margin-top: 1px; }

.danger-link {
  display: block; text-align: center; margin-top: 18px;
  color: var(--error); font-size: 13.5px; font-weight: 600;
}

/* ============================================================
   ÇOK ALÇAK EKRAN
   ============================================================
   Yatay tutulan telefon ya da küçültülmüş masaüstü penceresi. Uyarı metni
   göstermek işe yaramıyordu: metnin kendisi yer kaplayıp ekranı daha da
   daraltıyordu. Bunun yerine kabuğu sıkıştırıp tahtaya yer açıyoruz. */
@media (max-height: 500px) {
  .vs-hud { --hud: 58px; }
  .vs-opp .mini { min-height: 12px; }
  .vs-opp .nm, .vs-me .bar { display: none; }

  .game-status { padding-bottom: 5px; }
  .game-foot { padding-top: 7px; margin-top: 6px; }
  .clue-card { padding: 7px 12px; margin-bottom: 7px; }
  .clue-card .word { font-size: 16px; line-height: 21px; }
  .keyboard { gap: 4px; }
  .key { height: 30px; font-size: 13px; }

  /* Sıkıştırmaya rağmen sığmayan en büyük ızgaralar sessizce kırpılmasın:
     kaydırılabilir olsun. overflow:hidden burada harfleri yutuyordu. */
  .board-wrap { overflow: auto; align-items: flex-start; padding-top: 2px; }
}

/* ============================================================
   TEMA PAKETLERİ — karolar ve Paketler sayfası
   ============================================================ */
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-width: 0; padding: 14px; text-align: left;
  background: var(--surface-container-lowest); border-radius: var(--r-md); box-shadow: var(--e1);
  transition: transform .16s var(--ease);
}
.pack-tile:active { transform: scale(.97); }
.pack-tile .tile { width: 40px; height: 40px; }
.pack-tile .nm {
  font-family: var(--f-head); font-weight: 700; font-size: 15px; line-height: 20px; color: var(--on-surface);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pack-tile .t-xs { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-head .more {
  display: inline-flex; align-items: center; gap: 1px;
  color: var(--primary-container); font-weight: 700;
}
