/* Fetih — sade, tok görünüm: koyu ceviz zemin, krem yazı, tek altın vurgu */
:root {
  --bg: #17110d; --bg2: #1f1712; --panel: #261d16; --panel2: #31261d; --line: #3d3025;
  --text: #f2e9da; --muted: #a8977f; --accent: #dfa53a; --accent-ink: #2a1a06; --danger: #d0604b; --ok: #5fae6a;
  --p0: #3b7be8; --p1: #9157e0; --p2: #1fb3b8; --p3: #e8519f; --p4: #eeeeee; --neutral: #8a9097;
  --r: 14px; --tap: 46px;
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text); background: radial-gradient(1200px 700px at 50% -10%, #2b1f16 0%, var(--bg) 60%) fixed, var(--bg);
  font: 16px/1.45 var(--sans); -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: .3px; }
h2 { font-size: 17px; margin: 0 0 10px; }
button, input, select { font: inherit; color: inherit; }
button {
  min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2); cursor: pointer; touch-action: manipulation; transition: filter .15s, transform .05s;
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
button.ghost { background: transparent; }
button.big { min-height: 52px; font-size: 17px; width: 100%; }
button.small { min-height: 34px; padding: 0 10px; font-size: 14px; }
.danger-text { color: #ff9c8a; }
input, select { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); width: 100%; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.dim { color: var(--muted); }
.small-t { font-size: 13px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.err { color: #ff9c8a; font-size: 14px; min-height: 1.2em; margin: 0; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--panel2); color: var(--muted); vertical-align: 1px; }
.tag.warn { background: #6b2a1e; color: #ffcfc4; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; vertical-align: -1px; }

/* Sayfalar (karşılama, ana sayfa, lobi) */
.page { max-width: 420px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 18px 28px; }
.brand { text-align: center; margin-bottom: 22px; }
.brand .logo { width: 64px; height: 64px; }
.brand h1 { font-size: clamp(30px, 8vw, 40px); margin: 6px 0 4px; }
.brand p { margin: 0; color: var(--muted); }
.brand.small .logo { width: 44px; height: 44px; }
.brand.small h1 { font-size: 26px; }
.code { color: var(--accent); letter-spacing: 3px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 0 10px 30px #0006; }
.lbl { font-size: 14px; color: var(--muted); }
.center-link { text-align: center; margin: 16px 0 0; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.invite { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.invite-code { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 0 4px; }
.invite-code .code { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.slots { display: grid; gap: 6px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg2); min-height: 46px; }
.slot.empty { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

/* Reklam yerleri */
.ad { display: grid; place-items: center; border-radius: 10px; background: #0000002e; border: 1px solid var(--line); color: #6f6252; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.ad-banner { height: 64px; margin-top: 18px; }
.ad-side { height: 250px; }
.ad-full { position: fixed; inset: 0; background: #000c; z-index: 80; display: grid; place-items: center; padding: 20px; }
.ad-full .box { width: min(480px, 100%); height: min(400px, 70vh); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: grid; place-items: center; position: relative; color: var(--muted); letter-spacing: 1px; }
.ad-full .close { position: absolute; top: 10px; right: 10px; }

/* Bildirim */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 90;
  background: #0d0906f2; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: 90vw; font-size: 14px; transition: .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Pencereler (kurallar, eğitim) */
.modal { position: fixed; inset: 0; z-index: 70; background: #000b; display: grid; place-items: center; padding: 14px; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; width: min(560px, 100%); max-height: 88vh; max-height: 88dvh; overflow: auto; box-shadow: 0 20px 60px #000a; }
.modal h3 { margin: 16px 0 4px; font-size: 15px; color: var(--accent); }
.modal p { font-size: 14px; margin: 0; }
.tutorial .box { width: min(420px, 100%); text-align: left; }
.tutorial h2 { font-size: 22px; margin: 10px 0 8px; }
.tutorial p { font-size: 15px; margin-bottom: 18px; }
.dots { display: flex; gap: 6px; }
.dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.dots span.on { background: var(--accent); }

/* ===== Oyun ekranı =====
   Bilgisayar:  üst çubuk / solda oyuncular · ortada tahta · sağda banka+ticaret / altta sohbet */
.gameScreen {
  position: fixed; inset: 0; display: grid; background: var(--bg);
  grid-template-columns: 230px minmax(0, 1fr) 290px;
  grid-template-rows: auto minmax(0, 1fr) 180px;
  grid-template-areas: "top top top" "left board right" "left chat right";
}
.topbar { grid-area: top; display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "brand turn army act" "brand res next act";
  gap: 6px 18px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.tb-brand { grid-area: brand; font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.tb-turn { grid-area: turn; display: flex; gap: 12px; align-items: center; font-size: 14px; white-space: nowrap; }
.tb-res { grid-area: res; display: flex; gap: 6px; }
.tb-res span { background: var(--panel2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tb-army { grid-area: army; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; align-items: center; }
.tb-army .pw { color: var(--accent); font-weight: 800; }
.tb-act { grid-area: act; display: flex; gap: 8px; align-items: center; }
.tb-act .primary { min-width: 130px; min-height: 44px; font-size: 16px; }
.tb-next { grid-area: next; font-size: 13px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 8px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent); }
.timer.low { color: var(--danger); }

.left { grid-area: left; overflow: auto; padding: 10px; border-right: 1px solid var(--line); }
.right { grid-area: right; overflow: auto; padding: 10px; border-left: 1px solid var(--line); }
.bottom { grid-area: chat; display: flex; flex-direction: column; padding: 8px 10px; border-top: 1px solid var(--line); min-height: 0; }
.left h2, .right h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 2px 0 8px; }
.right h2.mt { margin-top: 18px; }

.pcard { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--pc); border-radius: 12px; padding: 9px 10px; margin-bottom: 8px; }
.pcard.turn { box-shadow: 0 0 0 2px var(--accent); }
.pcard.out { opacity: .4; }
.pc-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; font-weight: 800; font-size: 14px; flex: none; text-shadow: 0 1px 2px #0006; }
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.pc-pact { margin-top: 6px; font-size: 12px; }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-size: 12px; text-decoration: underline; }
.left-foot { margin-top: 12px; }

.bankstock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 13px; margin-bottom: 8px; }
.bankstock span { background: var(--bg2); text-align: center; padding: 4px 0; border-radius: 8px; }
.offer { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--panel); border-radius: 10px; margin-bottom: 6px; font-size: 13px; }
.tform { margin-top: 8px; display: grid; gap: 6px; }
.tform .w { width: 26px; font-size: 13px; color: var(--muted); }
.num { width: 54px; flex: none; }

.bottom .tabs { display: flex; gap: 4px; margin-bottom: 6px; background: var(--bg2); padding: 3px; border-radius: 10px; width: 220px; }
.tabs button { flex: 1; min-height: 28px; border: 0; background: transparent; font-size: 13px; color: var(--muted); }
.tabs button.on { background: var(--panel2); color: var(--text); }
.log { flex: 1; min-height: 0; overflow-y: auto; font-size: 13px; margin-bottom: 6px; overscroll-behavior: contain; }
.log div { padding: 2px 0; border-bottom: 1px solid #ffffff08; }

/* Tahta */
.boardArea {
  grid-area: board; position: relative; overflow: hidden; perspective: 1600px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  background: radial-gradient(900px 600px at 50% 40%, #9a6a44 0%, #7c5133 70%, #6a4329 100%);
}
.boardArea:active { cursor: grabbing; }
.tilt { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; transition: transform .2s ease-out; }
.board { display: block; height: auto; overflow: visible; }
.board .sea polygon[fill="#3d7fa8"] { fill: #3f7898; }
.board .sea, .board .slabs { filter: drop-shadow(0 8px 6px rgba(0,0,0,.3)); }
.board .route { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 3 7; stroke-linecap: round; }
.board .routeTxt { font-size: 18px; fill: #fff; }
.board .cname { font-family: var(--serif); font-size: 18px; font-weight: 700; fill: #fff3dc; paint-order: stroke; stroke: #4a2a14; stroke-width: 4px; letter-spacing: 1px; }
.board .rname { font-size: 9px; font-weight: 700; fill: #2a2318; paint-order: stroke; stroke: #ffffffb8; stroke-width: 2.5px; pointer-events: none; }
.board .pieces, .board .routes { pointer-events: none; }
.board .hex { cursor: pointer; }
.board .hex .hit { transition: fill .15s; }
.board .hex:hover .hit { fill: #ffffff22; }
.board .hex.sel .hit { stroke: #fff; stroke-width: 6; fill: #ffffff26; }

@keyframes march { to { stroke-dashoffset: -32; } }
/* Kurulumda seçilebilir bölgeler: siyah, yanıp sönen kalın çerçeve (başka hiçbir yerde kullanılmayan renk) */
/* Alınabilecek bölgeler çerçevesiz, karonun kendisi yumuşakça parlayıp söner */
/* Alınabilecek bölgeler: ince siyah kesik çizgi (karoyu soldurmaz) */
.board .hex.pick .hit, .board .hex.target .hit { stroke: #000; stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linejoin: round; fill: transparent; stroke-opacity: .9; }

.board .hex.rolled .hit { fill: #fff6a02e; }
@keyframes glow { from { stroke-opacity: .45; } to { stroke-opacity: 1; } }
.boardCtrl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.boardCtrl button { width: 40px; height: 40px; padding: 0; border-radius: 10px; background: #17110de0; border: 1px solid var(--line); color: var(--text); font-size: 17px; }

/* Bölge penceresi */
.popup { position: absolute; z-index: 15; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 14px 40px #000b; display: grid; gap: 8px; cursor: default; }
.popup[hidden] { display: none; }
.popup .ph { display: flex; align-items: center; gap: 8px; }
.popup .ph .dim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.popup .ph b { font-family: var(--serif); font-size: 17px; }
.popup .x { margin-left: auto; }
.popup .sub { margin: 0; font-weight: 700; }
.lbl2 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 4px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { min-height: 30px; width: 30px; padding: 0; }
.stepper b { min-width: 18px; text-align: center; }
.odds-row { display: flex; justify-content: space-between; align-items: center; }
.odds { font-size: 26px; font-weight: 800; color: var(--accent); font-family: var(--serif); }

/* Saldırı ibresi */
.needle { position: absolute; left: 50%; top: 12px; transform: translate(-50%, -16px); width: min(420px, 92%); background: #17110df2; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 16; }
.needle.show { opacity: 1; transform: translate(-50%, 0); }
.nTitle { font-size: 14px; margin-bottom: 8px; }
.nBar { position: relative; height: 18px; border-radius: 9px; background: #8f3328; }
.nWin { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); border-radius: 9px 0 0 9px; }
.nPtr { position: absolute; top: -6px; width: 4px; height: 30px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px #000; left: 0; transition: left 1.4s cubic-bezier(.2,.8,.2,1); }
.nRes { margin-top: 8px; font-weight: 800; font-size: 16px; text-align: center; min-height: 1.3em; font-family: var(--serif); }

.mobileBar { display: none; }
.badge { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* Orta genişlik (tablet / küçük dizüstü): sağ sütun daralır */
@media (max-width: 1180px) and (min-width: 900px) {
  .gameScreen { grid-template-columns: 200px minmax(0, 1fr) 250px; }
  .topbar { grid-template-columns: auto 1fr auto; grid-template-areas: "brand turn act" "res army act" "next next next"; }
}

/* Telefon: üstte kaynaklar, tam ekran tahta, altta 3 sekme (Oyuncular / Ticaret / Sohbet) */
@media (max-width: 899px) {
  .gameScreen { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top" "board" "nav"; }
  .topbar { grid-template-columns: 1fr auto; grid-template-areas: "turn act" "res act" "army army" "next next"; gap: 4px 8px; padding: 6px 10px; }
  .tb-brand { display: none; }
  .tb-res span { padding: 2px 8px; font-size: 14px; }
  .tb-army { font-size: 12px; }
  .tb-act .primary { min-width: 0; min-height: 44px; }
  .tb-act .ghost { display: none; }
  .tb-next { font-size: 12px; }
  .mobileBar { grid-area: nav; display: flex; border-top: 1px solid var(--line); background: var(--bg2); padding-bottom: env(safe-area-inset-bottom); }
  .mobileBar button { position: relative; flex: 1; border: 0; border-radius: 0; background: transparent; min-height: 50px; font-size: 14px; color: var(--muted); }
  .mobileBar button.on { color: var(--accent); background: var(--panel); }
  .left, .right, .bottom { display: none; position: fixed; left: 0; right: 0; bottom: calc(50px + env(safe-area-inset-bottom)); max-height: 60vh; max-height: 60dvh;
    z-index: 25; background: var(--bg); border: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px #000a; overflow: auto; }
  .gameScreen[data-open="players"] .left, .gameScreen[data-open="trade"] .right { display: block; }
  .gameScreen[data-open="chat"] .bottom { display: flex; height: 50vh; height: 50dvh; }
  .popup { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: calc(58px + env(safe-area-inset-bottom)); width: auto; max-height: 58vh; overflow: auto; z-index: 26; }
  .boardCtrl { top: 10px; bottom: auto; }
  .boardCtrl button { width: 38px; height: 38px; }
}
/* Yatay telefon */
@media (max-width: 899px) and (orientation: landscape) {
  .topbar { grid-template-columns: auto auto 1fr auto; grid-template-areas: "turn res army act"; }
  .tb-next { display: none; }
  .left, .right, .bottom { max-height: 70vh; }
  .popup { left: auto !important; right: 8px; width: 320px; top: 8px !important; bottom: 58px; max-height: none; }
}

/* ===== Cila: ışık, derinlik, hareket ("Unity havası") ===== */
.boardArea::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.45) 100%); z-index: 1; }
.boardArea > .needle, .boardArea > .popup, .boardArea > .boardCtrl, .boardArea > .diceLayer { z-index: 20; }
.board .waves .wave { opacity: .0; animation: wave 4.5s ease-in-out infinite; }
.board .waves .w1 { animation-delay: 1.5s; }
.board .waves .w2 { animation-delay: 3s; }
@keyframes wave { 0%, 100% { opacity: 0; transform: translateX(-3px); } 50% { opacity: .35; transform: translateX(3px); } }
.board .hex { transition: transform .18s ease-out, filter .18s; transform-box: fill-box; transform-origin: center; }
.board .hex:hover { transform: translateY(-4px); filter: brightness(1.08) drop-shadow(0 6px 4px rgba(0,0,0,.35)); }
.board .hex.sel { transform: translateY(-5px); filter: brightness(1.1) drop-shadow(0 8px 6px rgba(0,0,0,.45)); }
.board .hex.rolled { animation: rolled 1.2s ease-in-out 3; }
@keyframes rolled { 50% { filter: brightness(1.35) drop-shadow(0 0 10px #ffe68a); transform: translateY(-4px); } }
.board .hex.flash { animation: hitShake .5s ease-in-out 2; }
@keyframes hitShake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-4px,1px); } 40% { transform: translate(4px,-1px); filter: brightness(1.6) saturate(1.4); } 60% { transform: translate(-3px,0); } 80% { transform: translate(2px,1px); } }
.board .hex.target .hit { stroke: #000; stroke-width: 2.5; stroke-dasharray: 7 5; fill: transparent; }
.board .port { cursor: pointer; pointer-events: all; transition: transform .15s; }
.board .ports { pointer-events: all; }
.board .port:hover { filter: brightness(1.1) drop-shadow(0 0 6px #fff); }
.board .route { stroke: #fff; stroke-width: 3.5; stroke-dasharray: 2 9; animation: routeMove 1s linear infinite; filter: drop-shadow(0 0 3px #0008); }
@keyframes routeMove { to { stroke-dashoffset: -22; } }
.board .routeTxt { font-size: 16px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: #1f4f6f; stroke-width: 3px; }

/* Zar */
.diceLayer { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.diceLayer.show { opacity: 1; }
.dicePair { display: flex; gap: 34px; perspective: 700px; }
.die { width: 64px; height: 64px; transform: translate(var(--dx, 0), -320px) scale(1.25); transition: transform 1.15s cubic-bezier(.25,1.45,.45,1); }
.die.land { transform: translate(0, 0) scale(1); }
.die::after { content: ""; position: absolute; left: 6px; right: 0; bottom: -14px; height: 14px; border-radius: 50%; background: rgba(0,0,0,.4); filter: blur(4px); }
.cube { position: relative; width: 64px; height: 64px; transform-style: preserve-3d; transition: transform 1.15s cubic-bezier(.2,.75,.25,1); }
.face { position: absolute; inset: 0; border-radius: 12px; background: radial-gradient(circle at 30% 25%, #ffffff, #ece4d4 70%, #d8ccb4);
  border: 1px solid #c9bb9c; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; box-shadow: inset 0 0 8px rgba(0,0,0,.12); backface-visibility: hidden; }
.face i { display: block; width: 11px; height: 11px; margin: auto; border-radius: 50%; }
.face i.on { background: radial-gradient(circle at 35% 30%, #5a3a2a, #1e120c); box-shadow: inset 0 1px 1px rgba(255,255,255,.25); }
.face.f1 i.on { background: radial-gradient(circle at 35% 30%, #e0574a, #8f2d24); width: 14px; height: 14px; }
.f1 { transform: translateZ(32px); }
.f6 { transform: rotateY(180deg) translateZ(32px); }
.f2 { transform: rotateY(90deg) translateZ(32px); }
.f5 { transform: rotateY(-90deg) translateZ(32px); }
.f3 { transform: rotateX(90deg) translateZ(32px); }
.f4 { transform: rotateX(-90deg) translateZ(32px); }
.diceSum { position: absolute; top: calc(50% + 62px); left: 50%; transform: translate(-50%, 10px) scale(.8); opacity: 0; text-align: center; transition: .35s cubic-bezier(.2,1.4,.4,1);
  background: #17110de8; border: 1px solid var(--accent); border-radius: 16px; padding: 8px 18px; box-shadow: 0 10px 30px #000a, 0 0 24px #dfa53a44; }
.diceSum.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.diceSum b { display: block; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); text-shadow: 0 2px 0 #6b4a12; }
.diceSum span { font-size: 13px; color: var(--muted); }

/* Onay penceresi */
.modal.confirm .box { width: min(380px, 100%); text-align: center; animation: pop .22s cubic-bezier(.2,1.4,.4,1); }
.modal.confirm h2 { font-size: 20px; margin: 0 0 10px; }
.modal.confirm p { font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.modal.confirm .row button { flex: 1; min-height: 46px; }
.acc { color: var(--accent); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup:not([hidden]) { animation: pop .18s cubic-bezier(.2,1.4,.4,1); }

/* Cilalı paneller ve düğmeler */
button.primary { background: linear-gradient(180deg, #f2c25a, #d39a2c); border-color: #b9821f; box-shadow: inset 0 1px 0 #fff6, 0 3px 0 #8a5d14, 0 6px 14px #0006; text-shadow: 0 1px 0 #fff4; }
button.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 #fff6, 0 1px 0 #8a5d14, 0 3px 8px #0006; }
button:not(.primary):not(.link):not(.ghost) { background: linear-gradient(180deg, #3a2e24, #2c221a); box-shadow: inset 0 1px 0 #ffffff14, 0 2px 0 #0007; }
.panel, .pcard, .popup, .modal .box { background: linear-gradient(180deg, #2c2219, #221a14); box-shadow: inset 0 1px 0 #ffffff10, 0 10px 30px #0007; }
.topbar { background: linear-gradient(180deg, #2a2019, #1b1410); box-shadow: 0 4px 16px #0008; z-index: 5; }
.tb-res span { background: linear-gradient(180deg, #3a2e24, #2a2019); box-shadow: inset 0 1px 0 #ffffff14; }
.pcard.turn { box-shadow: 0 0 0 2px var(--accent), 0 0 18px #dfa53a55; }
.avatar { box-shadow: inset 0 -2px 0 #0004, inset 0 2px 0 #fff4, 0 2px 4px #0006; }
.boardCtrl button { background: linear-gradient(180deg, #2a2019f0, #17110df0); box-shadow: inset 0 1px 0 #ffffff14, 0 4px 10px #0008; }
.needle { box-shadow: 0 14px 40px #000b, 0 0 20px #dfa53a33; }
.nWin { background: linear-gradient(180deg, #7ad08a, #3f9a4f); }
.nBar { background: linear-gradient(180deg, #b8463a, #7d2a21); box-shadow: inset 0 2px 4px #0006; }
@media (prefers-reduced-motion: reduce) { .board .waves .wave, .board .route, .board .hex.rolled { animation: none; } .die, .cube { transition-duration: .01s; } }

/* ===== Canlı renkler, belirgin süre, reklam düzeni ===== */

.boardArea { background: radial-gradient(900px 600px at 50% 40%, #b57a49 0%, #8f5a34 70%, #74472a 100%); }

.timer { display: inline-flex; align-items: baseline; gap: 3px; position: relative; padding: 3px 12px 7px; border-radius: 12px;
  background: linear-gradient(180deg, #3b2c1c, #251b12); border: 1px solid #6b5230; box-shadow: inset 0 1px 0 #ffffff1a, 0 3px 10px #0007; color: var(--accent); overflow: hidden; }
.timer b { font-family: var(--serif); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.4em; text-align: right; }
.timer small { font-size: 12px; color: var(--muted); }
.timer .tclock { font-size: 15px; margin-right: 2px; }
.timer i { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p, 1) * 100%); background: linear-gradient(90deg, #f2c25a, #ffe08a); transition: width .5s linear; }
.timer.mine { border-color: var(--accent); box-shadow: inset 0 1px 0 #ffffff1a, 0 0 14px #dfa53a55; }
.timer.low { color: #ff6b5a; border-color: #ff6b5a; animation: timerPulse 1s ease-in-out infinite; }
.timer.low i { background: linear-gradient(90deg, #ff4d3d, #ff8a7a); }
@keyframes timerPulse { 50% { box-shadow: 0 0 18px #ff4d3d99; transform: scale(1.06); } }
.ally { color: #7fe08f; font-weight: 700; }

/* Menü sayfaları: reklam düzeni */
.adPage { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 24px; padding: 0 12px; }
.adMain { width: 100%; max-width: 420px; }
.adMain .page { padding-top: 12px; }
.ad-top { height: 50px; margin-top: max(12px, env(safe-area-inset-top)); }
.ad-rail { display: none; }
.ad-rect { height: 250px; margin-top: 14px; }
@media (min-width: 1100px) {
  .adPage { grid-template-columns: 160px minmax(0, 420px) 160px; justify-content: center; align-items: start; gap: 40px; }
  .ad-rail { display: grid; width: 160px; height: 600px; position: sticky; top: 24px; margin-top: 24px; }
  .ad-top { height: 90px; }
}
.invites { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 21; display: grid; gap: 8px; width: min(460px, calc(100% - 70px)); }
.invite-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); border-left: 5px solid var(--pc);
  background: linear-gradient(180deg, #2c2219f5, #1d1611f5); box-shadow: 0 12px 30px #000b, 0 0 18px #dfa53a33; animation: pop .25s cubic-bezier(.2,1.4,.4,1); font-size: 14px; }
@media (max-width: 899px) { .invites { bottom: 10px; width: calc(100% - 20px); } .invite-card { flex-wrap: wrap; } .invite-card .grow { flex-basis: calc(100% - 40px); } .invite-card button { flex: 1; } }
@media (max-width: 899px) { #toast { bottom: auto; top: 150px; } }
/* Liman okları: canlı turuncu + yavaş, yumuşak parıltı */
.board .port .portGlow { transform-box: fill-box; transform-origin: center; animation: portGlow 2.5s ease-in-out infinite; opacity: 0; }
@keyframes portGlow { 0%, 100% { opacity: 0; transform: scale(1); } 50% { opacity: .55; transform: scale(1.75); } }
.board .port:hover .portGlow { animation-duration: 1s; }
@media (prefers-reduced-motion: reduce) { .board .port .portGlow { animation: none; opacity: .3; } }

/* ---------- düşük grafik kalitesi (zayıf cihazlar, kural 102) ---------- */
.lowfx .board .sea, .lowfx .board .slabs, .lowfx .board .tops .hex, .lowfx .board .route, .lowfx .die::after { filter: none !important; }
.lowfx .board .waves { display: none; }
.lowfx .board .hex:hover, .lowfx .board .hex.sel { filter: none; }
.lowfx .board .port .portGlow { animation: none; opacity: .35; }
.lowfx .tilt { transition: none !important; }
.lowfx * { backdrop-filter: none !important; }

/* ---------- alt bilgi ve çerez bildirimi ---------- */
.siteFoot { text-align: center; font-size: 13px; color: var(--muted); padding: 18px 0 28px; }
.siteFoot a { color: var(--muted); }
.siteFoot a:hover { color: var(--accent); }
.consent { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  width: min(560px, calc(100% - 24px)); background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; box-shadow: 0 12px 30px #000a; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.consent p { margin: 0; }
.consent a { color: var(--accent); }
.consent .row { justify-content: flex-end; gap: 8px; }
/* Bilgi sayfaları (gizlilik, hakkında, iletişim) */
.docPage { max-width: 760px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px 40px; }
.docPage h1 { font-family: var(--serif); color: var(--accent); margin: 8px 0 4px; }
.docPage h2 { font-family: var(--serif); font-size: 19px; margin: 26px 0 6px; }
.docPage p, .docPage li { color: var(--text); opacity: .92; }
.docPage a { color: var(--accent); }
.docPage .back { display: inline-block; margin-bottom: 10px; }
.docPage .dim { color: var(--muted); font-size: 14px; }
.terr { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid #0006; }

/* Kıta sınırları: kalın siyah çizgi (kazanmak için alınması gereken bölgeler) */
.board .borders { pointer-events: none; }
.board .borders .cb { stroke: #000; stroke-width: 2; stroke-dasharray: 6 5; stroke-linecap: round; opacity: .85; }
.boardCtrl button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }



.avatar.ink-dark { color: #2a2a2a; text-shadow: none; }
