:root {
  --bg0: #120b07;
  --bg1: #24150d;
  --text: #f7eedf;
  --muted: #bda98f;
  --gold1: #ffd98a;
  --gold2: #e2a240;
  --gold3: #a8661c;
  --glass: rgba(255, 240, 220, .06);
  --glass-b: rgba(255, 220, 170, .14);
  --err: #ff8a7a;
  --ok: #7dffb0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; color: var(--text); background: var(--bg0);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none;
}
.hidden { display: none !important; }
.btn svg, .icon-btn svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Arka plan ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #3a2214 0%, var(--bg1) 40%, var(--bg0) 100%); }
.glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .35; }
.g1 { background: #b8651e; top: -30vmax; left: -15vmax; animation: drift 18s ease-in-out infinite alternate; }
.g2 { background: #5c1a12; bottom: -35vmax; right: -20vmax; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(10vmax, 6vmax) scale(1.15); } }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px 16px; }

/* ---------- Kartlar ---------- */
.card {
  position: relative; width: min(360px, 100%); max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; text-align: center;
  padding: 22px 24px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,235,205,.10), rgba(255,235,205,.03));
  border: 1px solid var(--glass-b);
  box-shadow: 0 30px 60px -20px #000c, inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card.wide { width: min(420px, 100%); }
.pop { animation: pop .38s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

.menu-wrap { display: flex; align-items: center; gap: clamp(20px, 6vw, 70px); }
.brand { text-align: center; }
h1 {
  margin: 6px 0 0; font-family: Cinzel, Georgia, serif; font-weight: 900; font-size: clamp(42px, 9vh, 72px);
  letter-spacing: .14em; line-height: 1;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold1) 35%, var(--gold2) 65%, var(--gold3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(226,162,64,.35)); cursor: default;
}
h1 .kicker { display: block; font-size: .36em; letter-spacing: .32em; margin: 0 0 .1em .32em; }
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
h2 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 28px; color: var(--gold1); }
.label { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .2em; }
.hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.hint.err { color: var(--err); min-height: 1em; }

.logo-dice { display: flex; justify-content: center; gap: 18px; height: 70px; align-items: center; }
.logo-dice .die3d { --s: 46px; }
.die3d.spin .cube { animation: tumble 9s linear infinite; }
.die3d.spin.b .cube { animation-duration: 12s; animation-direction: reverse; }
@keyframes tumble { from { transform: rotateX(0) rotateY(0) rotateZ(0); } to { transform: rotateX(360deg) rotateY(720deg) rotateZ(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
input {
  width: 100%; padding: 13px 14px; font: 600 16px Inter, sans-serif; color: var(--text);
  background: rgba(0,0,0,.35); border: 1px solid var(--glass-b); border-radius: 12px; outline: none;
  transition: border-color .2s, box-shadow .2s; text-transform: none; letter-spacing: normal;
}
input:focus { border-color: var(--gold2); box-shadow: 0 0 0 4px rgba(226,162,64,.18); }
#codeInput { text-transform: uppercase; letter-spacing: .35em; text-align: center; font-weight: 800; font-size: 18px; }
.join-row { display: flex; gap: 8px; }
.join-row .btn { flex: 0 0 auto; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--glass-b); }

/* ---------- Butonlar ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  font: 700 16px Inter, sans-serif; color: var(--text); letter-spacing: .02em;
  transition: transform .12s, filter .2s, box-shadow .2s, opacity .2s;
}
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .55; }
.btn.big { padding: 15px 24px; font-size: 18px; }
.btn.gold {
  color: #2a1504;
  background: linear-gradient(180deg, #ffe3a3 0%, var(--gold2) 55%, #c07a26 100%);
  border-color: #ffd98a; box-shadow: 0 8px 22px -6px rgba(226,162,64,.65), inset 0 1px 0 #fff8;
}
.btn.gold svg .f { fill: currentColor; stroke: none; }
.btn.dark { background: rgba(0,0,0,.4); border-color: var(--glass-b); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.glass { background: rgba(20,12,8,.62); border-color: var(--glass-b); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 20px -6px #000a; }
.btn .fill { position: absolute; inset: 0; background: rgba(255,255,255,.35); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.btn.counting .fill { animation: fillbar var(--t, 2s) linear forwards; }
@keyframes fillbar { to { transform: scaleX(1); } }
.btn.pulse { animation: btnpulse 1.4s ease-in-out infinite; }
@keyframes btnpulse { 50% { box-shadow: 0 0 0 8px rgba(255,217,138,.0), 0 0 28px rgba(255,217,138,.75); } }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-b); color: var(--text);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.92); }
#soundBtn .mute { display: none; }
#soundBtn.off .mute { display: inline; }
#soundBtn.off .wave { display: none; }

/* ---------- Bekleme ---------- */
.code-tiles { display: flex; gap: 8px; justify-content: center; }
.code-tiles span {
  width: 52px; height: 64px; display: grid; place-items: center; border-radius: 12px;
  font: 900 34px Cinzel, Georgia, serif; color: var(--gold1);
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.5)); border: 1px solid var(--glass-b);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.4); animation: tileIn .45s backwards cubic-bezier(.2,1.4,.4,1);
}
@keyframes tileIn { from { transform: translateY(14px) scale(.7); opacity: 0; } }
.waiting-dots { color: var(--muted); font-size: 14px; }
.waiting-dots span { animation: blink 1.4s infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .15; } 30% { opacity: 1; } }

#conn {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: rgba(120,30,20,.85); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 13px;
  backdrop-filter: blur(6px); box-shadow: 0 6px 18px #0008;
}
.mini-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff5; border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Oyun ekranı / HUD ---------- */
#game { flex-direction: column; padding: 6px 10px 8px; gap: 6px; justify-content: flex-start; }
#hud { width: 100%; display: flex; align-items: center; gap: 10px; height: 46px; flex: 0 0 auto; }
.plate {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-b); transition: box-shadow .3s, background .3s, border-color .3s;
}
.plate.me { justify-content: flex-end; padding: 5px 6px 5px 12px; text-align: right; }
.plate .meta { min-width: 0; line-height: 1.15; }
.plate .nm { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .pip { font-size: 11px; color: var(--muted); }
.plate.active { border-color: var(--gold2); background: rgba(226,162,64,.16); box-shadow: 0 0 0 3px rgba(226,162,64,.15), 0 0 24px rgba(226,162,64,.35); }
.plate.offline { opacity: .5; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; position: relative; }
.plate.active .avatar::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--gold1); border-right-color: var(--gold2);
  animation: spin 1.1s linear infinite;
}
.score { display: flex; align-items: center; gap: 6px; font: 900 24px Cinzel, Georgia, serif; color: var(--gold1); padding: 0 6px; }
.score i { font-style: normal; color: var(--muted); font-size: 18px; }
.hud-btns { display: flex; gap: 6px; }

#stage { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; }
#board {
  position: absolute; left: 0; top: 0; width: 1000px; height: 600px; transform-origin: 0 0;
  border-radius: 22px; box-shadow: 0 30px 60px -10px #000, 0 0 0 1px #0008;
}
#boardSvg { position: absolute; inset: 0; display: block; border-radius: 22px; }
#marks, #pieces, #diceLayer { position: absolute; inset: 0; pointer-events: none; }
#pieces { pointer-events: auto; }

/* Pullar */
.ck {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%;
  will-change: transform; transition: width .3s, height .3s, border-radius .3s, margin .3s, box-shadow .2s;
  margin: -24px 0 0 -24px;
}
.ck::before { /* iç halka */
  content: ""; position: absolute; inset: 8px; border-radius: 50%; transition: opacity .3s;
}
.ck.w {
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #f6eedc 30%, #dccaa3 70%, #a98f60 100%);
  box-shadow: 0 4px 6px rgba(0,0,0,.55), inset 0 -3px 4px rgba(120,90,40,.45), inset 0 2px 2px #fff;
}
.ck.w::before { box-shadow: inset 0 2px 3px rgba(110,80,30,.45), 0 1px 0 rgba(255,255,255,.8); background: radial-gradient(circle at 40% 35%, #fbf5e8, #e2d3b2); }
.ck.b {
  background: radial-gradient(circle at 34% 28%, #7a7a80 0%, #3a3a40 30%, #1a1a1e 70%, #050506 100%);
  box-shadow: 0 4px 6px rgba(0,0,0,.65), inset 0 -3px 4px rgba(0,0,0,.6), inset 0 2px 2px rgba(255,255,255,.25);
}
.ck.b::before { box-shadow: inset 0 2px 3px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.18); background: radial-gradient(circle at 40% 35%, #44444a, #1f1f23); }
.ck.off { width: 62px; height: 13px; border-radius: 4px; margin: -6.5px 0 0 -31px; }
.ck.off::before { opacity: 0; }
.ck.movable { cursor: grab; }
.ck.movable::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,217,138,.9), 0 0 16px rgba(255,200,90,.8);
  animation: glow 1.3s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .35; } }
.ck.selected::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 0 22px rgba(255,255,255,.9); animation: none;
}
.ck.lifted { z-index: 50; }
.ck.last::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(110,200,255,.85);
}
.ck .cnt {
  position: absolute; inset: 0; display: grid; place-items: center; font: 800 17px Inter, sans-serif; z-index: 2;
}
.ck.w .cnt { color: #5a4220; }
.ck.b .cnt { color: #f1e6d0; }

/* Hedef işaretleri */
.dest {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,255,180,.55), rgba(140,255,180,.12) 60%, transparent 72%);
  box-shadow: 0 0 0 2px rgba(140,255,180,.85);
  animation: destPulse 1s ease-in-out infinite;
}
@keyframes destPulse { 50% { transform: scale(.82); opacity: .7; } }
.tray-dest {
  position: absolute; border-radius: 10px; border: 2px solid rgba(140,255,180,.85);
  background: rgba(140,255,180,.12); box-shadow: 0 0 22px rgba(140,255,180,.5) inset;
  animation: destPulse2 1s ease-in-out infinite;
}
@keyframes destPulse2 { 50% { opacity: .55; } }

/* 3B zarlar */
.die3d { --s: 46px; width: var(--s); height: var(--s); perspective: 400px; }
#diceLayer .die3d { position: absolute; left: 0; top: 0; margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); transition: opacity .3s, filter .3s; }
#diceLayer .die3d.used { opacity: .38; filter: grayscale(1); }
.die3d .shadow { position: absolute; inset: 10% 5% -12% 12%; border-radius: 30%; background: rgba(0,0,0,.45); filter: blur(5px); }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.face {
  position: absolute; inset: 0; border-radius: 18%;
  background: radial-gradient(circle at 30% 25%, #ffffff, #f4ede0 55%, #ddd1bb);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 -3px 6px rgba(0,0,0,.12);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14%;
  backface-visibility: hidden;
}
.face i { width: 72%; height: 72%; align-self: center; justify-self: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a1010, #1a0505); box-shadow: inset 0 1px 1px rgba(0,0,0,.6); }
.face.f1 i { background: radial-gradient(circle at 35% 35%, #d43a2a, #7a120a); width: 90%; height: 90%; }

/* Butonlar tahtada */
#actions { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
#actions .btn { position: absolute; pointer-events: auto; transform: translate(-50%, -50%) scale(var(--k, 1)); white-space: nowrap; animation: btnIn .3s cubic-bezier(.2,1.4,.4,1); }
#actions .btn:active { transform: translate(-50%, -50%) scale(calc(var(--k, 1) * .95)); }
@keyframes btnIn { from { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--k, 1) * .6)); } }

#toast {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(15,9,5,.82); border: 1px solid var(--glass-b); backdrop-filter: blur(8px);
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; pointer-events: none;
  white-space: nowrap; animation: toastIn .3s ease-out; box-shadow: 0 8px 20px #0009;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } }
#turnBanner {
  position: absolute; left: 50%; top: 50%; z-index: 35; pointer-events: none;
  font: 900 clamp(26px, 7vh, 48px) Cinzel, Georgia, serif; letter-spacing: .08em; color: var(--gold1);
  text-shadow: 0 4px 24px #000, 0 0 30px rgba(226,162,64,.6);
  animation: banner 1.3s ease-out forwards;
}
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

/* ---------- Modallar ---------- */
.modal { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 12px 16px;
  background: rgba(8,4,2,.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.over-icon { font-size: 44px; line-height: 1; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.final-score { font: 900 40px Cinzel, Georgia, serif; color: var(--gold1); display: flex; justify-content: center; gap: 10px; }
.final-score i { font-style: normal; color: var(--muted); }

.invite-card { text-align: center; max-width: 380px; width: 100%; }
.invite-card h2 { margin: 6px 0 4px; font-size: 22px; line-height: 1.25; }
.invite-opts { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.invite-card .field { text-align: left; }
.invite-warn { margin: 10px 0 0; color: #f0a35a; font-size: 13px; }

.switch { display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 16px; padding: 8px 0; cursor: pointer; }
.switch input { display: none; }
.track { width: 50px; height: 28px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid var(--glass-b); position: relative; transition: background .25s; }
.knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ddd; transition: transform .25s; }
.switch input:checked + .track { background: var(--gold2); }
.switch input:checked + .track .knob { transform: translateX(22px); background: #fff; }

@media (max-height: 420px) {
  .menu-wrap { gap: 28px; }
  .card { padding: 16px 20px; gap: 10px; }
  .logo-dice { height: 56px; }
  .btn.big { padding: 12px 20px; font-size: 16px; }
}
@media (max-width: 640px) and (orientation: portrait) {
  .menu-wrap { flex-direction: column; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Geniş/kısa ekranlarda (telefon yatay) bilgi paneli solda dikey durur, tahta büyür */
#game.side { flex-direction: row; padding: 8px 10px; gap: 10px; }
#game.side #hud { flex-direction: column; width: 168px; height: 100%; justify-content: center; gap: 14px; }
#game.side .plate { flex: 0 0 auto; width: 100%; }
#game.side .plate.me { flex-direction: row-reverse; justify-content: flex-end; text-align: left; padding: 5px 12px 5px 6px; }
#game.side .score { font-size: 34px; justify-content: center; }
#game.side .hud-btns { justify-content: center; }
#game.side #stage { height: 100%; }

/* Menü seçenekleri */
.opts { display: flex; gap: 8px; align-items: stretch; }
.seg { flex: 1; display: flex; background: rgba(0,0,0,.35); border: 1px solid var(--glass-b); border-radius: 12px; padding: 3px; }
.seg button, .chip {
  flex: 1; border: 0; background: transparent; color: var(--muted); font: 600 13px Inter, sans-serif;
  padding: 8px 4px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: linear-gradient(180deg, #ffe3a3, var(--gold2)); color: #2a1504; }
.chip { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--glass-b); background: rgba(0,0,0,.35); border-radius: 12px; }
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #ffe3a3, var(--gold2)); color: #2a1504; border-color: #ffd98a; }
.row .btn { padding-left: 10px; padding-right: 10px; }
.score small { font: 700 13px Inter, sans-serif; color: var(--muted); margin-left: 4px; align-self: flex-end; padding-bottom: 4px; }
.plate .pip.warn { color: #ffb36b; font-weight: 700; }
.plate .pip.alarm { color: #ff7b6b; font-weight: 800; animation: blink 1s infinite; }

/* Hazır mesajlar */
#chatPanel {
  position: absolute; right: 8px; top: 6px; z-index: 38; width: min(300px, 92%);
  background: rgba(15,9,5,.9); border: 1px solid var(--glass-b); border-radius: 16px; padding: 10px;
  backdrop-filter: blur(10px); box-shadow: 0 14px 30px #000b; animation: pop .25s cubic-bezier(.2,1.4,.4,1);
}
#chatList { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#chatList button {
  border: 1px solid var(--glass-b); background: rgba(255,255,255,.06); color: var(--text); border-radius: 10px;
  padding: 9px 6px; font: 600 13px Inter, sans-serif; cursor: pointer;
}
#chatList button:active { transform: scale(.95); }
.mute-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mute-row input { width: 16px; height: 16px; accent-color: var(--gold2); }
.bubble {
  position: absolute; z-index: 37; max-width: 60%; padding: 8px 14px; border-radius: 16px; font-weight: 700; font-size: 15px;
  background: #fff7e6; color: #2a1504; box-shadow: 0 8px 20px #0009; pointer-events: none;
  animation: bubbleIn .35s cubic-bezier(.2,1.4,.4,1);
}
.bubble.opp { top: 8px; left: 12px; border-top-left-radius: 4px; }
.bubble.me { bottom: 10px; right: 12px; border-bottom-right-radius: 4px; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.6); } }

/* Çift dokunmayla yakınlaştırmayı kapat (iOS dahil), dokunuşlar gecikmesiz */
button, input, label, .ck, #pieces { touch-action: manipulation; }

/* ---------- Dikey ekran (telefon dik tutulunca, tarayıcı) ---------- */
#game.portrait { padding: 8px 6px 10px; gap: 8px; }
#game.portrait #hud {
  height: auto; display: grid; gap: 8px 6px; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "btns btns btns" "opp score me";
}
#game.portrait #oppTag { grid-area: opp; }
#game.portrait #meTag { grid-area: me; }
#game.portrait .score { grid-area: score; font-size: 22px; padding: 0 2px; }
#game.portrait .hud-btns { grid-area: btns; justify-content: flex-end; }
#game.portrait .plate { padding: 4px 8px 4px 4px; gap: 6px; }
#game.portrait .plate.me { padding: 4px 4px 4px 8px; }
#game.portrait .avatar { width: 26px; height: 26px; }
#game.portrait .plate .nm { font-size: 13px; }
#game.portrait .icon-btn { width: 38px; height: 38px; }
#game.portrait #actions .btn.big { padding: 13px 22px; font-size: 17px; }
#game.portrait .bubble.me { bottom: 84px; }

/* ---------- Oyunu durdurma ---------- */
#pauseBtn .pl { display: none; }
#pauseBtn.on .pz { display: none; }
#pauseBtn.on .pl { display: inline; fill: currentColor; stroke: none; }
#pauseBtn.on { border-color: var(--gold2); color: var(--gold1); background: rgba(226,162,64,.18); }
#pauseBtn.used-up { opacity: .4; }
#pauseOverlay {
  position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 12px;
  background: rgba(8,4,2,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border-radius: 18px; animation: fade .25s;
}
.pause-card { width: min(320px, 100%); gap: 8px; padding: 18px 20px; }
.pause-card h2 { font-size: 22px; }
.pause-icon { font-size: 34px; line-height: 1; }

/* ---------- Birleşik hamle hedefi (ör. 4+2) ---------- */
.dest.combo { background: radial-gradient(circle, rgba(255,217,138,.5), rgba(255,217,138,.12) 60%, transparent 72%); box-shadow: 0 0 0 2px rgba(255,217,138,.9); }
.dest.combo span, .tray-dest.combo span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 800 15px Inter, sans-serif; color: #2a1504; background: #ffe3a3; padding: 1px 6px; border-radius: 8px;
  box-shadow: 0 2px 6px #0008; white-space: nowrap;
}
.tray-dest.combo { border-color: rgba(255,217,138,.9); background: rgba(255,217,138,.12); }
/* Dikeyde tahta döndürülünce yazılar düz okunsun */
#game.portrait .ck .cnt { rotate: -90deg; }
#game.portrait .dest.combo span, #game.portrait .tray-dest.combo span { transform: translate(-50%, -50%) rotate(-90deg); }
#game.portrait #diceLayer .cube { rotate: -90deg; }

/* Durdurma reklamı alanı: kartın yanında (dik ekranda altında), ekranı kaplamaz */
#pauseOverlay { gap: 16px; flex-wrap: wrap; align-content: center; }
#pauseAdSlot {
  width: 300px; height: 250px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  background: rgba(0,0,0,.35); border: 1px dashed var(--glass-b); color: var(--muted); font-size: 12px; letter-spacing: .1em;
}
/* Menüde bildirim anahtarı */
.notify-row { justify-content: flex-start; font-size: 14px; padding: 2px 0 0; color: var(--muted); }
.notify-row small { color: #f0a35a; }
