:root {
  --paper: #f4ead6;
  --paper-2: #eadbbd;
  --card: #fbf6ea;
  --ink: #2a1d14;
  --muted: #7b6550;
  --line: #d8c4a0;
  --madder: #9b2f22;
  --madder-2: #b8432f;
  --indigo: #22364d;
  --indigo-2: #304b69;
  --saffron: #d99a2b;
  --olive: #5f7d3c;
  --board: #2b2019;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 18px rgba(60,35,15,.12);
  font-family: 'Alegreya Sans', system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); font-size: 15px; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: 'Alegreya', Georgia, serif; margin: 0 0 .5em; line-height: 1.1; }
h3 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
[hidden] { display: none !important; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Kilim şeridi */
.kilim-band {
  height: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18'%3E%3Crect width='36' height='18' fill='%239b2f22'/%3E%3Cpath d='M0 9 L9 0 L18 9 L9 18Z' fill='%23d99a2b'/%3E%3Cpath d='M18 9 L27 0 L36 9 L27 18Z' fill='%2322364d'/%3E%3Cpath d='M5 9 L9 5 L13 9 L9 13Z' fill='%23f4ead6'/%3E%3Cpath d='M23 9 L27 5 L31 9 L27 13Z' fill='%23f4ead6'/%3E%3C/svg%3E") repeat-x;
}

/* Düğmeler, formlar */
.btn {
  font: inherit; font-weight: 700; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--madder); border-color: #7d2419; color: #fff; box-shadow: 0 2px 0 #6d1f15; }
.btn.primary:hover:not(:disabled) { background: var(--madder-2); }
.btn.indigo { background: var(--indigo); border-color: #172536; color: #fff; box-shadow: 0 2px 0 #142130; }
.btn.indigo:hover:not(:disabled) { background: var(--indigo-2); }
.btn.on { outline: 3px solid var(--saffron); outline-offset: 1px; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.35); color: inherit; }
.btn.link { background: none; border: none; color: var(--madder); text-decoration: underline; padding: 4px; }
.btn.block { width: 100%; }
label { display: block; font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input, select {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--saffron); border-color: var(--saffron); }

/* Giriş */
.screen { min-height: 100%; }
.home-inner, .lobby-inner { max-width: 820px; margin: 0 auto; padding: 32px 16px 48px; }
.brand { text-align: center; margin-bottom: 28px; }
.brand-mark {
  width: 84px; height: 84px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 42px;
  background: var(--saffron); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.brand h1 { font-size: clamp(38px, 7vw, 60px); color: var(--madder); }
.brand p { max-width: 520px; margin: 0 auto; color: var(--muted); font-size: 17px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 24px; }
.home-cards .card .btn { width: 100%; margin-top: 4px; }
.share .btn { text-decoration: none; }

/* Lobi */
.lobby-code { text-align: center; margin: 8px 0 20px; }
.lobby-code .code { font-family: 'Alegreya', serif; font-size: 54px; letter-spacing: .14em; color: var(--indigo); font-weight: 800; }
.share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.plist li:last-child { border-bottom: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0,0,0,.35); flex: none; }
.online { width: 8px; height: 8px; border-radius: 50%; background: #b9a990; flex: none; }
.online.on { background: #3fae5a; box-shadow: 0 0 0 3px rgba(63,174,90,.2); }
.grow { flex: 1; min-width: 0; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--paper-2); color: var(--muted); }

/* Oyun yerleşimi */
.game { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--indigo); color: #f4ead6;
  border-bottom: 4px solid var(--madder); flex: none;
}
.tb-brand { font-family: 'Alegreya', serif; font-size: 18px; }
.tb-room { opacity: .85; }
.tb-room b { letter-spacing: .1em; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.net { width: 10px; height: 10px; border-radius: 50%; background: #3fae5a; }
.net.off { background: #e0533d; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.game-main { flex: 1; display: grid; grid-template-columns: 1fr 390px; min-height: 0; }
.board-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--board); }
.board-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(120,80,45,.55) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4 L44 24 L24 44 L4 24Z' fill='none' stroke='%23ffffff' stroke-opacity='.04' stroke-width='2'/%3E%3Cpath d='M24 16 L32 24 L24 32 L16 24Z' fill='%23ffffff' fill-opacity='.025'/%3E%3C/svg%3E"),
    #2b2019; }
#board { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
#board.dragging { cursor: grabbing; }
.board-hint {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--saffron); color: var(--ink);
  font-weight: 700; padding: 7px 14px; border-radius: 99px; box-shadow: 0 4px 12px rgba(0,0,0,.35); white-space: nowrap;
  max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.zoom button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(20,14,10,.7);
  color: #f4ead6; font-size: 20px; cursor: pointer;
}

/* El */
.hand { display: flex; gap: 6px; padding: 8px 10px; background: #1d1611; border-top: 1px solid #000; overflow-x: auto; flex: none; align-items: center; }
.rc {
  display: flex; align-items: center; gap: 6px; background: #f4ead6; border-radius: 10px; padding: 5px 10px 5px 7px;
  font-weight: 700; min-width: 64px; border: 2px solid transparent;
}
.rc .ic { font-size: 20px; }
.rc .n { font-size: 20px; font-family: 'Alegreya', serif; }
.rc .nm { font-size: 11px; color: var(--muted); display: block; line-height: 1; }
.rc.zero { opacity: .5; }
.rc.flash { border-color: var(--saffron); animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.12); } }
.hand .vp { margin-left: auto; color: #f4ead6; font-family: 'Alegreya', serif; font-size: 18px; white-space: nowrap; padding-left: 8px; }
.hand .vp b { color: var(--saffron); font-size: 24px; }

/* Panel */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-left: 1px solid var(--line); }
.tabs { display: none; }
.tab-body { flex: 1; overflow-y: auto; padding: 4px 14px 20px; }
.psec { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.psec:last-child { border-bottom: none; }

.turn { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.turn .who { font-family: 'Alegreya', serif; font-size: 22px; font-weight: 800; }
.turn.mine .who { color: var(--madder); }
.hint { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 8px; padding: 8px 10px; margin: 6px 0 10px; }
.dice-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.dice-row svg { width: 46px; height: 46px; }
.dice-row svg.rolling { animation: roll .5s ease-out; }
@keyframes roll { 0% { transform: rotate(-120deg) scale(.6); } 70% { transform: rotate(12deg) scale(1.08); } 100% { transform: none; } }
.badge-red { background: var(--madder); color: #fff; font-weight: 700; padding: 3px 9px; border-radius: 99px; font-size: 13px; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.actions .btn { padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.actions .btn .cost { font-size: 12px; font-weight: 500; letter-spacing: -1px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1; }

/* Takas */
.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
.picker button {
  font: inherit; border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 5px 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font-size: 12px;
}
.picker button .ic { font-size: 19px; }
.picker button.sel { background: var(--saffron); border-color: #a87518; }
.picker button:disabled { opacity: .35; cursor: not-allowed; }
.counter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
.counter .cell { display: flex; flex-direction: column; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 4px 0; }
.counter .cell .ic { font-size: 18px; }
.counter .cell b { font-family: 'Alegreya', serif; font-size: 18px; }
.counter .cell.has { border-color: var(--saffron); background: #fff4d9; }
.counter .pm { display: flex; gap: 2px; }
.counter .pm button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; padding: 0; }
.offer { background: var(--card); border: 2px solid var(--saffron); border-radius: 10px; padding: 10px; margin: 8px 0; }
.offer .line { font-size: 17px; margin: 4px 0; }
.resp { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

/* Siparişler */
.order { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.order .vpb { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--indigo); color: #fff; font-family: 'Alegreya', serif; font-weight: 800; font-size: 18px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.order .city { font-weight: 700; }
.order .cost { font-size: 17px; letter-spacing: 1px; }
.order.ok { border-color: var(--olive); background: #f1f5e6; }

/* Oyuncular */
.pl { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 8px; border-radius: 10px; margin-bottom: 4px; }
.pl.cur { background: #fff4d9; box-shadow: inset 3px 0 0 var(--saffron); }
.pl .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .pts { font-family: 'Alegreya', serif; font-size: 24px; font-weight: 800; grid-row: span 2; }
.pl .meta { grid-column: 2; font-size: 12px; color: var(--muted); }

/* Kayıt ve sohbet */
.log, .chat { font-size: 13px; max-height: 220px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.log div, .chat div { padding: 2px 0; }
.log div:last-child { font-weight: 700; }
.pn { font-weight: 700; padding: 0 4px; border-radius: 4px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.chat-form { display: flex; gap: 6px; margin-top: 6px; }
.chat-form input { margin: 0; font-size: 15px; padding: 7px 10px; }

/* SVG harita */
.hex .bg { stroke: #3b2a1c; stroke-width: 1.6; stroke-linejoin: round; }
.hex .art, .hex .rim, .hex .ticon, .hex .tok { pointer-events: none; }
.hex .rim { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 2; stroke-linejoin: round; }
.hex.prod .bg { stroke: #ffd257; stroke-width: 5; animation: glow 1.2s ease-in-out 3; }
@keyframes glow { 50% { stroke: #fff4c2; stroke-width: 7; } }
.hex.blocked .bg, .hex.blocked .art { filter: brightness(.5) saturate(.5); }
.hex.target { cursor: pointer; }
.hex.target .bg { stroke: #ffd257; stroke-width: 4; stroke-dasharray: 8 6; animation: dash 1s linear infinite; }
.hex.target:hover .bg { filter: brightness(1.12); }
@keyframes dash { to { stroke-dashoffset: -28; } }
.tok circle.disc { stroke: #6b4f3a; stroke-width: 1.5; }
.tok.dbl circle.disc { stroke: #a8322a; stroke-width: 3; }
.die rect { fill: #fff; stroke: #5a4636; stroke-width: 1; }
.die circle { fill: #2a1d14; }
.tok .prob { fill: #6b4f3a; }
.tok.dbl .prob { fill: #a8322a; }
.ticon { font-size: 13px; }
.bld { stroke: #1a120c; stroke-width: 1.1; stroke-linejoin: round; pointer-events: none; }
.bld.pop, .bandit { transform-box: fill-box; transform-origin: 50% 100%; }
.bld.pop { animation: popin .7s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes popin { 0% { transform: translateY(-30px) scale(.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.road { pointer-events: none; }
.road line { stroke-linecap: round; }
.road .r-s { stroke: rgba(0,0,0,.35); stroke-width: 12; }
.road .r-o { stroke: #1a120c; stroke-width: 11; }
.road .r-b { stroke-width: 7.5; }
.road .r-h { stroke-width: 1.6; stroke-dasharray: 4 4; opacity: .9; }
.road.pop .r-o, .road.pop .r-b, .road.pop .r-s { stroke-dasharray: 60; animation: draw .7s ease-out both; }
.road.pop .r-h { animation: fadein .4s .6s both; }
@keyframes draw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
.bandit { pointer-events: none; animation: sway 3s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(-4deg); } }
.mk-line { stroke: #f1dfb6; stroke-width: 2; stroke-dasharray: 2 4; }
.mk rect.box { stroke: #7b6550; stroke-width: 1.5; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.mk.acc rect.box { stroke: var(--saffron); stroke-width: 3.5; }
.mk text { font-family: 'Alegreya Sans', sans-serif; fill: #2a1d14; }
.mk .mname { font-family: 'Alegreya', serif; font-weight: 800; font-size: 15px; }
.mk .mrate { font-size: 12.5px; fill: #6b4f3a; font-weight: 700; }
.spot { fill: #ffd257; stroke: #1a120c; stroke-width: 2; pointer-events: none; animation: pulse 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hit { fill: transparent; cursor: pointer; }
.hit:hover + .spot { fill: #fff; }
@keyframes pulse { 50% { transform: scale(1.35); } }
.espot { stroke: #ffd257; stroke-width: 6; stroke-dasharray: 6 5; stroke-linecap: round; pointer-events: none; animation: dash 1s linear infinite; }
.ehit { stroke: transparent; stroke-width: 22; cursor: pointer; stroke-linecap: round; }
.ehit:hover + .espot { stroke: #fff; }

/* Oyuncu şeridi */
.pstrip { display: flex; gap: 6px; padding: 6px 8px; background: linear-gradient(#1d1611, #241a13); border-bottom: 1px solid #000; overflow-x: auto; flex: none; scrollbar-width: none; }
.pstrip::-webkit-scrollbar { display: none; }
.chip { position: relative; display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #f4ead6; flex: none; }
.chip.cur { background: rgba(217,154,43,.22); border-color: var(--saffron); box-shadow: 0 0 0 2px rgba(217,154,43,.35), 0 0 16px rgba(217,154,43,.4); }
.chip.cur::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--saffron); border-bottom: 0; }
.chip .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: 'Alegreya', serif; font-weight: 800; font-size: 15px; border: 2px solid rgba(0,0,0,.4); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.chip .ci { display: flex; flex-direction: column; line-height: 1.05; }
.chip .ci b { font-size: 13px; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .ci small { font-size: 11px; opacity: .7; }
.chip .cvp { font-family: 'Alegreya', serif; font-weight: 800; font-size: 18px; color: var(--saffron); min-width: 14px; text-align: center; }
.chip .off { position: absolute; left: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #8a7a66; border: 1px solid #000; }
.bump { animation: bump .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 40% { transform: scale(1.18); } }

/* Animasyon katmanı */
.fxl { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.fly { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; will-change: transform; }
.rchip { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf3, #ead8b2); border: 2px solid #7b5a32; display: grid; place-items: center; font-size: 17px; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.fly.mine .rchip { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(217,154,43,.5), 0 4px 10px rgba(0,0,0,.4); }
.cback { width: 24px; height: 32px; border-radius: 5px; background: repeating-linear-gradient(45deg, #9b2f22 0 5px, #7d2419 5px 10px); border: 2px solid #f4ead6; box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.fly .dag { position: absolute; right: -8px; top: -8px; font-size: 16px; }
.bfly { font-size: 30px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.ftext { position: absolute; font-family: 'Alegreya', serif; font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 2px 0 #5b1d14, 0 0 8px rgba(0,0,0,.6); white-space: nowrap; }
.ftext.vp { color: #ffd257; font-size: 24px; }
.ftext.small { font-size: 14px; font-family: 'Alegreya Sans', sans-serif; }
.spark { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; }
.confetti { position: absolute; top: 0; width: 9px; height: 14px; border-radius: 2px; }
.banner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 46; pointer-events: none; background: rgba(34,54,77,.95); color: #f4ead6; padding: 10px 18px; border-radius: 99px; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.4); border: 2px solid var(--saffron); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.banner.danger { background: rgba(110,32,22,.96); }
.banner.turn { background: var(--madder); font-family: 'Alegreya', serif; font-size: 22px; font-weight: 800; padding: 10px 26px; }
.banner.order { background: rgba(60,80,40,.96); }

/* 3B zar */
.dice3d { position: fixed; inset: 0; z-index: 47; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(20,12,6,.55) 0, rgba(20,12,6,.25) 35%, transparent 60%); animation: fadein .2s; }
.dice3d.out { opacity: 0; transition: opacity .3s; }
.d3-who { display: flex; align-items: center; gap: 8px; background: rgba(20,14,10,.85); color: #f4ead6; padding: 7px 16px; border-radius: 99px; font-weight: 700; font-size: 16px; }
.d3-who .av { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); }
.d3-row { display: flex; gap: 42px; perspective: 700px; }
.d3 { width: 78px; height: 78px; }
.cube { width: 78px; height: 78px; position: relative; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; border-radius: 14px; background: radial-gradient(circle at 30% 25%, #fffef8, #f1e3c4); box-shadow: inset 0 0 0 2px #dcc89f, inset -5px -7px 12px rgba(120,80,30,.18); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 11px; backface-visibility: hidden; }
.face i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #5a3f2c, #1a120c); place-self: center; }
.face i.no { visibility: hidden; }
.face.f1 i { background: radial-gradient(circle at 35% 35%, #e0533d, #8c1f12); width: 18px; height: 18px; }
.f1 { transform: translateZ(39px); }
.f6 { transform: rotateY(180deg) translateZ(39px); }
.f3 { transform: rotateY(90deg) translateZ(39px); }
.f4 { transform: rotateY(-90deg) translateZ(39px); }
.f2 { transform: rotateX(90deg) translateZ(39px); }
.f5 { transform: rotateX(-90deg) translateZ(39px); }
.d3-res { min-height: 40px; font-family: 'Alegreya', serif; font-size: 30px; color: #fff; text-shadow: 0 3px 0 #5b1d14, 0 0 14px rgba(0,0,0,.8); opacity: 0; }
.d3-res b { color: #ffd257; font-size: 38px; }
.d3-res .dbl { background: var(--madder); padding: 6px 18px; border-radius: 99px; border: 2px solid #ffd257; font-size: 24px; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .bld.pop, .road.pop line, .bandit, .hex.prod .bg { animation: none; } }

/* Modal ve bildirim */
.modal { position: fixed; inset: 0; background: rgba(20,12,6,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-box { background: var(--paper); border-radius: 16px; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.4); border-top: 6px solid var(--madder); }
.modal-box .close { float: right; }
.rules p, .rules li { line-height: 1.45; }
.costs { width: 100%; border-collapse: collapse; font-size: 14px; }
.costs td { border-bottom: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.costs td:first-child { font-weight: 700; }
.costs td:nth-child(2) { white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.win-list { list-style: none; padding: 0; margin: 10px 0 16px; }
.win-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 17px; }
.win-list li:first-child { font-size: 21px; font-weight: 800; }
body.busy .actions, body.busy #board { cursor: progress; }

/* Telefon ve dar ekran */
@media (max-width: 900px) {
  .game-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 54%) minmax(0, 46%); }
  .panel { border-left: none; border-top: 2px solid var(--madder); }
  .tabs { display: flex; overflow-x: auto; background: var(--paper-2); flex: none; }
  .tabs button { flex: 1; font: inherit; font-weight: 700; font-size: 13px; padding: 10px 6px; border: none; background: none; color: var(--muted); position: relative; white-space: nowrap; }
  .tabs button.on { color: var(--madder); box-shadow: inset 0 -3px 0 var(--madder); }
  .tabs button i { position: absolute; top: 6px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--madder); display: none; }
  .tabs button.ping i { display: block; }
  .psec { display: none; border: none; }
  .psec.on { display: block; }
  .tb-brand b { display: none; }
  .hand { gap: 4px; padding: 6px 8px; }
  .rc { min-width: 0; padding: 3px 7px 3px 4px; gap: 3px; }
  .rc .ic { font-size: 17px; }
  .rc .n { font-size: 18px; }
  .rc .nm { display: none; }
  .hand .vp { font-size: 12px; padding-left: 4px; text-align: center; line-height: 1; }
  .hand .vp b { font-size: 20px; display: block; }
}
