/* Maskeli Fiiller – stil dosyası */

:root {
  --bg: #1a1230;
  --bg-2: #251a45;
  --bg-3: #31245a;
  --on-dark: #f6efe2;
  --on-dark-muted: #b9add6;
  --paper: #fffaf0;
  --paper-2: #f4ead6;
  --ink: #261c3d;
  --muted: #6d6388;
  --line: #e2d4b8;

  /* Maske renkleri: yalnızca maskeler ve fiilimsi türleri için */
  --mavi: #2d7ff9;
  --yesil: #1fa65a;
  --turuncu: #f08a1c;
  --altin: #e8b62c;
  --mavi-ink: #1a5cc0;
  --yesil-ink: #147a40;
  --turuncu-ink: #b45f08;
  --altin-ink: #8a6500;

  /* Kare ve deste renkleri (belgedeki kart arkaları: Vaka mor, Tuzak kırmızı, Kök gri) */
  --vaka: #6b4bd6;
  --tuzak: #d83f4a;
  --kok: #7c8291;
  --duello: #c23b86;
  --start: #f4e3b2;

  --good: #1f9d55;
  --bad: #d6453d;

  --radius: 18px;
  --shadow: 0 18px 50px rgba(5, 2, 20, .45);
  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--on-dark);
  background:
    radial-gradient(1100px 600px at 50% -10%, #3d2b72 0%, transparent 62%),
    radial-gradient(800px 500px at 100% 100%, #3a1f4f 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; }
p { margin: 0 0 .7em; }
button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 3px solid var(--altin); outline-offset: 2px; }
kbd { font-family: var(--font-body); }

.muted { color: var(--muted); }
.center { text-align: center; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Üst çubuk ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(232, 182, 44, .2);
  background: rgba(20, 13, 40, .6);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--altin);
}
.brand-mask::before { content: '🎭'; font-size: 1.4rem; }
.topnav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-btn {
  background: transparent;
  border: 1px solid rgba(246, 239, 226, .25);
  color: var(--on-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
}
.nav-btn:hover { background: rgba(255, 255, 255, .08); }
.nav-btn.icon-only { padding: 6px 10px; }

main#app { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }

/* ---------- Düğmeler ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 13px 24px; font-size: 1.2rem; }
.btn-xl { flex-direction: column; gap: 2px; padding: 16px 24px; font-size: 1.45rem; width: 100%; }
.btn-xl small { font-family: var(--font-body); font-size: .85rem; font-weight: 600; opacity: .85; }
.btn-small { padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-primary { background: linear-gradient(180deg, #8467ff, #6447e6); color: #fff; box-shadow: 0 5px 0 #4a31b8; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #9078ff, #6d51ef); }
.btn-gold { background: linear-gradient(180deg, #f6cf55, #e2a91f); color: #2a1d00; box-shadow: 0 5px 0 #a57a0c; }
.btn-gold:hover:not(:disabled) { background: linear-gradient(180deg, #fbd86b, #e8b330); }
.btn-gold-outline { background: transparent; border: 2px solid var(--altin); color: var(--altin); }
.btn-secondary { background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 #c9b893; }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; opacity: .85; }
.btn-ghost:hover { opacity: 1; }
.btn-good { background: var(--good); color: #fff; box-shadow: 0 5px 0 #146b39; }
.btn-bad { background: var(--bad); color: #fff; box-shadow: 0 5px 0 #942d27; }
.link-btn {
  background: none;
  border: 0;
  padding: 2px 4px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.row-center { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; }
.row-end { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 20px; }

/* ---------- Maskeler ---------- */

.mask { display: inline-block; flex: none; vertical-align: middle; }
.mask svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mask-face { stroke: rgba(0, 0, 0, .35); stroke-width: 2; }
.mask-eye { fill: #1a1230; }
.mask-isim .mask-face { fill: var(--mavi); }
.mask-sifat .mask-face { fill: var(--yesil); }
.mask-zarf .mask-face { fill: var(--turuncu); }
.mask-altin .mask-face { fill: var(--altin); stroke: #fff3c4; }
[class*='mask-empty'] .mask-face { fill: rgba(255, 255, 255, .04); stroke-width: 2.4; stroke-dasharray: 4 3; }
[class*='mask-empty'] .mask-eye { fill: none; stroke-width: 1.4; }
.mask-empty-isim .mask-face, .mask-empty-isim .mask-eye { stroke: var(--mavi); }
.mask-empty-sifat .mask-face, .mask-empty-sifat .mask-eye { stroke: var(--yesil); }
.mask-empty-zarf .mask-face, .mask-empty-zarf .mask-eye { stroke: var(--turuncu); }
.mask-empty-altin .mask-face, .mask-empty-altin .mask-eye { stroke: var(--altin); }

.track { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.track-grp { display: inline-flex; align-items: center; gap: 3px; }
.extra { font-weight: 800; font-size: .85rem; margin-left: 2px; }

.pawn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.who-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }

/* ---------- Ana menü ---------- */

.home { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding-top: 12px; }
.hero { max-width: 720px; }
.hero-masks { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-bottom: 8px; }
.hero-masks .mask:nth-child(1) { transform: rotate(-14deg); }
.hero-masks .mask:nth-child(3) { transform: rotate(14deg); }
.hero-masks .mask { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); }
.home h1 {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  margin: 0;
  background: linear-gradient(180deg, #ffe08a, #e8b62c 60%, #c48d12);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .5px;
}
.hero-sub { font-family: var(--font-display); font-size: 1.25rem; color: var(--on-dark-muted); margin-top: -4px; }
.story { font-size: 1.08rem; max-width: 60ch; margin: 10px auto 14px; color: #e9e1f7; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .95rem;
}
.home-actions { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 420px; }
.home-links { color: var(--on-dark-muted); }
.foot { color: var(--on-dark-muted); font-size: .85rem; margin-top: 8px; }

/* ---------- Kurulum ---------- */

.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.setup { max-width: 640px; margin: 8px auto; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--paper-2); border-radius: 14px; padding: 4px; gap: 4px; margin: 6px 0 14px; }
.seg-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 11px; font-weight: 800; color: var(--muted); }
.seg-btn[aria-pressed='true'] { background: var(--ink); color: #fff; }
.name-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.name-row { display: flex; align-items: center; gap: 10px; }
.name-row .pawn { width: 34px; height: 34px; font-size: 1rem; }
.name-row input, .text-in {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.1rem;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.name-row input:focus, .text-in:focus { outline: none; border-color: var(--vaka); box-shadow: 0 0 0 3px rgba(107, 75, 214, .2); }
.pawn-name { color: var(--muted); font-size: .9rem; width: 88px; }

.toggles { display: flex; flex-direction: column; gap: 10px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 48px; height: 28px; flex: none; border-radius: 999px; background: #cfc3aa; position: relative; transition: background .15s; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch-input:checked + .switch-ui { background: var(--vaka); }
.switch-input:checked + .switch-ui::after { transform: translateX(20px); }
.switch-input:focus-visible + .switch-ui { outline: 3px solid var(--altin); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; }
.switch-text small { color: var(--muted); }

/* ---------- Oyun ekranı ---------- */

.game { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.board-wrap { min-width: 0; }

.board {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, calc(100vh - 110px));
  min-width: 280px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(145deg, #2c2054, #1d1539);
  border: 3px solid #c9a24a;
  box-shadow: var(--shadow), inset 0 0 0 4px rgba(232, 182, 44, .14);
}
.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 9px;
  color: #fff;
  font-weight: 800;
  font-size: clamp(9px, 2.1cqi, 15px);
  text-align: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .12);
  transition: box-shadow .2s, transform .2s;
}
.cell-icon { font-size: clamp(13px, 3.6cqi, 28px); line-height: 1; }
.cell-label { line-height: 1.1; letter-spacing: .2px; }
.cell-arrow { position: absolute; top: 3px; right: 5px; font-size: clamp(9px, 2cqi, 14px); opacity: .6; color: var(--ink); }
.cell-pawns {
  position: absolute;
  inset: auto 2px 2px 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
}
.cell-pawns .pawn { width: clamp(14px, 3.4cqi, 25px); height: clamp(14px, 3.4cqi, 25px); font-size: clamp(8px, 1.6cqi, 12px); border-width: 1.5px; }
.cell-pawns .pawn.active { box-shadow: 0 0 0 2px var(--altin), 0 2px 6px rgba(0, 0, 0, .4); z-index: 1; }
.cell.here { box-shadow: 0 0 0 3px var(--altin), 0 0 18px rgba(232, 182, 44, .55); z-index: 1; }

.sq-start { background: linear-gradient(160deg, #fbedc4, #e9cf86); color: var(--ink); }
.sq-vaka { background: linear-gradient(160deg, #8064e6, var(--vaka)); }
.sq-uret { background: linear-gradient(160deg, #9aa0ad, var(--kok)); }
.sq-tuzak { background: linear-gradient(160deg, #ea5c66, var(--tuzak)); }
.sq-duello { background: linear-gradient(160deg, #d95aa1, var(--duello)); }

.board-center {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.8cqi, 16px);
  padding: clamp(6px, 2cqi, 18px);
  margin: 4px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, #3b2a6e, #221842 72%);
  border: 1px solid rgba(232, 182, 44, .3);
  text-align: center;
}
.center-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(16px, 5cqi, 38px); color: var(--altin); line-height: 1; }
.center-title .mask { width: clamp(20px, 5cqi, 40px) !important; height: auto !important; aspect-ratio: 64 / 41; }
.turn-box { display: flex; flex-direction: column; align-items: center; gap: clamp(4px, 1.2cqi, 10px); }
.turn-who { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: clamp(12px, 2.6cqi, 19px); }
.turn-who .muted { color: var(--on-dark-muted); font-weight: 600; }
.turn-row { display: flex; align-items: center; gap: clamp(8px, 2cqi, 16px); }
.die-slot { width: clamp(38px, 9.5cqi, 72px); }
.btn-roll { font-size: clamp(14px, 3.2cqi, 24px); padding: .5em 1.1em; min-width: 6.2em; }
.board-center.ready .btn-roll { animation: glow 1.6s ease-in-out infinite; }

.die {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 18%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 13%;
  gap: 6%;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .35);
}
.die.blank { opacity: .55; }
.pip { border-radius: 50%; }
.pip.on { background: var(--ink); }

.piles { display: flex; gap: clamp(4px, 1.4cqi, 12px); }
.pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 10cqi, 82px);
  aspect-ratio: 63 / 88;
  border-radius: 7px;
  font-size: clamp(10px, 2cqi, 14px);
  line-height: 1.1;
  color: #fff;
  box-shadow: 2px 2px 0 rgba(255, 255, 255, .35), 4px 4px 0 rgba(0, 0, 0, .25);
}
.pile small { opacity: .85; font-weight: 700; }
.pile-vaka { background: var(--vaka); }
.pile-tuzak { background: var(--tuzak); }
.pile-kok { background: var(--kok); }
.treasury {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .2);
  font-size: clamp(11px, 2.2cqi, 16px);
}
.tre-label { color: var(--on-dark-muted); font-weight: 700; }
.tre { display: inline-flex; align-items: center; gap: 4px; }

@container (max-width: 470px) {
  .piles { display: none; }
  .cell-label { font-size: 9px; }
}
@container (max-width: 380px) {
  .cell-label { font-size: 8px; letter-spacing: 0; }
  .sq-start .cell-label { font-size: 7px; }
  .tre-label { display: none; }
}
@container (max-width: 290px) {
  .cell-label { display: none; }
}

/* Yan panel */
.side {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.side-title { font-size: 1.3rem; color: var(--altin); }
.players { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.player {
  background: var(--bg-3);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.player.current { border-color: var(--altin); box-shadow: 0 0 0 3px rgba(232, 182, 44, .18); }
.player.won { border-color: var(--yesil); }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.player-pos { font-size: .8rem; color: var(--on-dark-muted); }
.trade { display: flex; flex-wrap: wrap; gap: 6px; }
.goal { font-size: .88rem; color: var(--on-dark-muted); padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.log-title { font-size: 1rem; margin-top: 14px; color: var(--on-dark-muted); }
.log { list-style: none; margin: 0; padding: 0; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.log li { padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.log li:first-child { background: rgba(232, 182, 44, .12); }
.side-actions { margin-top: 14px; display: flex; justify-content: center; }

/* ---------- Pencereler ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 6, 25, .72);
  backdrop-filter: blur(3px);
  animation: fade .18s ease;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  border-top: 10px solid var(--altin);
  padding: 22px 24px 26px;
  box-shadow: var(--shadow);
  outline: none;
  animation: rise .22s ease;
}
.card-vaka { border-top-color: var(--vaka); }
.card-tuzak { border-top-color: var(--tuzak); }
.card-uret { border-top-color: var(--kok); }
.card-duello { border-top-color: var(--duello); }
.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--paper-2);
  font-size: 1.6rem;
  line-height: 1;
}
.modal-x:hover { background: var(--line); }

.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.deck-badge { padding: 5px 12px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .9rem; }
.db-vaka { background: var(--vaka); }
.db-tuzak { background: var(--tuzak); }
.db-kok { background: var(--kok); }
.db-duello { background: var(--duello); }
.card-who { display: inline-flex; align-items: center; gap: 8px; }
.timer-host { margin-left: auto; }
.timer {
  position: relative;
  width: 170px;
  height: 32px;
  border-radius: 999px;
  background: #e8dcc4;
  overflow: hidden;
}
.timer-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: linear-gradient(90deg, #7c5cff, #b39dff);
  transition: transform .1s linear;
}
.timer-num { position: relative; display: flex; height: 100%; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; }
.timer-num::after { content: ' sn'; font-weight: 600; font-size: .85rem; margin-left: 3px; }
.timer.low .timer-fill { background: var(--bad); }
.timer.low { animation: pulse .5s ease-in-out infinite alternate; }

.banner {
  background: #fff3cd;
  border-left: 5px solid var(--altin);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.lead { font-size: 1.1rem; font-weight: 700; }
.step { font-weight: 800; color: var(--muted); margin: 14px 0 6px; font-size: .95rem; }
.step .muted { font-weight: 600; }

.sentence {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 8px;
  margin: 10px 0 6px;
  font-size: clamp(1.25rem, 3.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.5;
}
.sentence.static { display: block; text-align: center; padding: 10px 8px; }
.word {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 2px 12px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--line);
  transition: background .12s, color .12s, transform .08s;
}
.word:hover { border-color: var(--vaka); }
.word[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 3px 0 #000; }
.w.hl { padding: 0 8px; border-radius: 10px; color: #fff; }
.hl-isim { background: var(--mavi); }
.hl-sifat { background: var(--yesil); }
.hl-zarf { background: var(--turuncu); }
.trap-word { background: #ffeaa3; padding: 0 8px; border-radius: 8px; border-bottom: 4px solid var(--tuzak); }

.type-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  border: 3px solid transparent;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  transition: background .12s, border-color .12s, transform .08s;
}
.type-btn kbd { position: absolute; top: 6px; right: 9px; font-size: .75rem; opacity: .55; }
.tb-isim { background: #e3eeff; }
.tb-sifat { background: #ddf4e6; }
.tb-zarf { background: #ffecd9; }
.tb-isim:hover { border-color: var(--mavi); }
.tb-sifat:hover { border-color: var(--yesil); }
.tb-zarf:hover { border-color: var(--turuncu); }
.tb-isim[aria-pressed='true'] { background: var(--mavi); border-color: var(--mavi-ink); color: #fff; }
.tb-sifat[aria-pressed='true'] { background: var(--yesil); border-color: var(--yesil-ink); color: #fff; }
.tb-zarf[aria-pressed='true'] { background: var(--turuncu); border-color: var(--turuncu-ink); color: #fff; }
.type-btn[aria-pressed='true'] .mask-face { stroke: #fff; }
@media (hover: none) { .type-btn kbd { display: none; } }

.chips, .reason-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.reason-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chip {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
}
.chip.reason { border-radius: 14px; text-align: left; padding: 10px 14px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }

.yn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.yn-btn {
  padding: 14px 10px;
  border-radius: 16px;
  border: 3px solid var(--line);
  background: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.yn-btn.yes[aria-pressed='true'] { background: var(--good); border-color: #146b39; color: #fff; }
.yn-btn.no[aria-pressed='true'] { background: var(--bad); border-color: #942d27; color: #fff; }

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}
.result.good { background: #e1f5e8; color: #135e36; }
.result.bad { background: #fde6e3; color: #93271f; }

.answer-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper-2);
}
.answer-box dt { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.answer-box dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.tt-isim { color: var(--mavi-ink); }
.tt-sifat { color: var(--yesil-ink); }
.tt-zarf { color: var(--turuncu-ink); }
.note { background: #efeaff; border-left: 4px solid var(--vaka); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.attempts { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.attempts li { padding: 6px 10px; border-radius: 8px; background: var(--paper-2); }
.attempts li.ok { color: #135e36; }
.attempts li.no { color: #93271f; }
.challenger { display: flex; justify-content: center; font-size: 1.4rem; margin: 6px 0; }
.challenger .pawn { width: 38px; height: 38px; font-size: 1.1rem; }

/* Üret */
.kok-card {
  margin: 8px auto 14px;
  width: min(260px, 80%);
  aspect-ratio: 63 / 88;
  max-height: 260px;
  border-radius: 16px;
  background: linear-gradient(160deg, #9aa0ad, var(--kok));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}
.kok-label { text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; opacity: .85; font-weight: 700; }
.kok-root { font-family: var(--font-display); font-size: 3rem; font-weight: 800; }
.mask-die {
  width: 104px;
  height: 104px;
  border-radius: 20px;
  background: #fff;
  border: 3px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 var(--line);
}
.mask-die .q { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--muted); }
.mask-die.landed { animation: pop .4s ease; }
.produce-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 1.2rem;
}
.pt-isim { background: #e3eeff; }
.pt-sifat { background: #ddf4e6; }
.pt-zarf { background: #ffecd9; }
.field { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-weight: 700; }
textarea.text-in { resize: vertical; min-height: 64px; }
.judge-answer { padding: 12px 14px; border-radius: 14px; background: var(--paper-2); margin-bottom: 10px; }
.judge-word { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin: 6px 0 0; }
.judge-sent { font-size: 1.15rem; margin: 4px 0 0; }
.hints { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.hints li { padding: 8px 12px; border-radius: 10px; font-weight: 700; }
.hint-ok { background: #e1f5e8; color: #135e36; }
.hint-warn { background: #fff0db; color: #8a4a00; }
.hint-info { background: #eeeaf5; color: var(--muted); }
.defter-mini { font-size: .92rem; border: 2px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.defter-mini p:last-child { margin-bottom: 0; }

/* Düello */
.buzzers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.buzzer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 140px;
  border: 0;
  border-radius: 26px;
  background: var(--pc);
  color: #fff;
  font-family: var(--font-display);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .3), inset 0 -6px 0 rgba(0, 0, 0, .15);
  transition: transform .06s;
}
.buzzer:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.bz-name { font-size: 1.6rem; font-weight: 800; }
.bz-key { font-size: .9rem; opacity: .85; font-family: var(--font-body); }
@media (hover: none) { .bz-key { display: none; } }
.rival-row { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.rival-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 3px solid var(--pc);
  font-weight: 800;
  font-size: 1.15rem;
  text-align: left;
}
.rival-btn .track { margin-left: auto; }
.rival-btn:hover { background: var(--paper-2); }

/* Zafer */
.victory { text-align: center; overflow: hidden; border-top-color: var(--altin); }
.win-kicker { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--altin-ink); margin-bottom: 0; }
.win-name { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: clamp(2rem, 6vw, 3rem); }
.win-name .pawn { width: 48px; height: 48px; font-size: 1.4rem; }
.win-table { list-style: none; padding: 0; margin: 18px auto 0; max-width: 460px; display: flex; flex-direction: column; gap: 6px; }
.win-table li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 12px; background: var(--paper-2); border-radius: 10px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; animation: fall linear forwards; }

/* ---------- Fuar modu ---------- */

.fair { max-width: 860px; margin: 0 auto; }
.fair-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, .08);
}
.fair-bar-left { display: flex; align-items: center; gap: 12px; }
.fair-progress { display: flex; gap: 6px; }
.fair-progress .dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .2);
}
.fair-progress .dot.now { border-color: var(--altin); color: var(--altin); }
.fair-progress .dot.ok { background: var(--good); border-color: var(--good); }
.fair-progress .dot.no { background: var(--bad); border-color: var(--bad); }
.fair-clock { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--altin); font-variant-numeric: tabular-nums; }
.fair-clock.low { color: #ff8a80; animation: pulse .5s ease-in-out infinite alternate; }
.fair-scores { display: flex; flex-direction: column; gap: 4px; }
.fair-score { display: flex; align-items: center; gap: 8px; }
.fair-masks { display: inline-flex; gap: 2px; min-width: 20px; }
.fair-stage { max-height: none; margin: 16px auto 0; animation: none; }
.fair-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 12px 0; }
.fair-result { text-align: center; padding: 16px; border-radius: 16px; background: var(--paper-2); }
.fair-result.earned { background: linear-gradient(180deg, #fff5d6, #ffe9a8); box-shadow: 0 0 0 3px var(--altin); }
.big-score { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin: 0; }
.badge-art { position: relative; display: inline-block; animation: pop .5s ease; }
.badge-art span { position: absolute; right: -14px; bottom: -6px; font-size: 2.2rem; }
.tally { margin-top: 22px; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); }
.tally h3 { font-size: 1rem; color: var(--muted); }
.tally p { margin-bottom: 4px; }

/* ---------- Kurallar ve Defter ---------- */

.help-modal h2 { color: var(--vaka); padding-right: 40px; }
.help-modal h3 { margin-top: 18px; font-size: 1.15rem; }
.rule-list { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rule-list li { padding: 8px 12px; border-radius: 10px; background: var(--paper-2); }
.sq-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 800; color: #fff; margin-right: 4px; }
.sq-chip.sq-start { color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 10px 0 14px; }
.defter { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .95rem; }
.defter th, .defter td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.defter thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.defter td .mask { margin-right: 4px; }
.row-isim th { color: var(--mavi-ink); }
.row-sifat th { color: var(--yesil-ink); }
.row-zarf th { color: var(--turuncu-ink); }
.mnemonic { background: #ddf4e6; padding: 8px 12px; border-radius: 10px; }

/* ---------- Bildirim ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hareket ---------- */

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pulse { to { transform: scale(1.04); } }
@keyframes glow {
  0%, 100% { box-shadow: 0 5px 0 #a57a0c, 0 0 0 0 rgba(232, 182, 44, .0); }
  50% { box-shadow: 0 5px 0 #a57a0c, 0 0 0 8px rgba(232, 182, 44, .25); }
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confetti { display: none; }
}

/* ---------- Ekran boyutları ---------- */

@media (max-width: 960px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .board { width: min(100%, 720px); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  main#app { padding: 12px 10px 32px; }
  .topbar { padding: 8px 10px; gap: 6px; }
  .brand { font-size: 1.05rem; white-space: nowrap; gap: 4px; padding: 4px 2px; }
  .brand-mask::before { font-size: 1.15rem; }
  .topnav { flex-wrap: nowrap; gap: 4px; }
  .nav-btn { padding: 5px 9px; font-size: .82rem; white-space: nowrap; }
  .hide-sm { display: none; }
  .board { min-width: 0; padding: 5px; gap: 3px; border-radius: 14px; }
  .cell { border-radius: 6px; border-width: 1px; }
  .panel { padding: 18px 16px; }
  .overlay { padding: 8px; align-items: flex-end; }
  .modal { padding: 16px 14px 20px; max-height: calc(100vh - 16px); border-radius: 18px; }
  .timer { width: 120px; }
  .timer-host { margin-left: 0; width: 100%; }
  .timer-host .timer { width: 100%; }
  .type-row { gap: 6px; }
  .type-btn { font-size: .9rem; padding: 10px 4px 8px; }
  .reason-row { grid-template-columns: 1fr; }
  .buzzer { min-height: 110px; }
  .bz-name { font-size: 1.25rem; }
  .pawn-name { display: none; }
  .fair-clock { font-size: 1.6rem; }
}
