:root {
  --parchment: #E9DCC0; --parchment-aged: #D8C39A; --ink: #3B2A1E; --ink-soft: #6b5440;
  --crimson: #8E1F2A; --burgundy: #5E1624; --royal: #1F3A5F; --midnight: #16233A;
  --gold: #C9A24A; --gold-hi: #E8C872; --gold-dk: #7d5f22; --moss: #3E5A3A; --violet: #3A2A4A; --wood: #2a1c14;
  --good: #3f7a3a; --bad: #9b2c2c;
  --f-title: "Cinzel", Georgia, serif; --f-deco: "Cinzel Decorative", "Cinzel", Georgia, serif; --f-body: "Cormorant Garamond", Garamond, Georgia, serif;
  --paper-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #120d0a; color: var(--ink); font-family: var(--f-body); font-size: 17px; overflow: hidden; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; }
a, .link { color: var(--burgundy); cursor: pointer; font-weight: 700; text-decoration: none; border-bottom: 1px dotted rgba(94,22,36,.5); }
a:hover, .link:hover { color: var(--crimson); border-bottom-style: solid; }
.muted { color: var(--ink-soft); font-style: italic; }
.good { color: var(--good); font-weight: 700; } .bad { color: var(--bad); font-weight: 700; }

.parchment { background-color: var(--parchment); background-image: var(--paper-noise), radial-gradient(ellipse at 50% 40%, rgba(255,250,235,.55), transparent 65%), radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(120,80,30,.28) 100%); }
.framed { position: relative; border: 2px solid var(--gold); border-radius: 4px;
  box-shadow: 0 0 0 1px #4a3515, inset 0 0 0 4px var(--parchment), inset 0 0 0 5px rgba(201,162,74,.8), inset 0 0 40px rgba(120,80,30,.25), 0 18px 50px rgba(0,0,0,.55); }
.framed::before, .framed::after { content: ""; position: absolute; width: 34px; height: 34px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M2 2h20c-8 2-12 6-14 14 0-6-2-10-6-12z' fill='%23C9A24A'/%3E%3Cpath d='M4 4c10 0 16 6 16 16' stroke='%237d5f22' stroke-width='1.2' fill='none'/%3E%3Ccircle cx='9' cy='9' r='2.4' fill='%238E1F2A' stroke='%23E8C872'/%3E%3C/svg%3E") no-repeat; }
.framed::before { top: -3px; left: -3px; } .framed::after { bottom: -3px; right: -3px; transform: rotate(180deg); }

.btn { font-family: var(--f-title); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 16px; border-radius: 3px; cursor: pointer; color: var(--ink);
  background: linear-gradient(#f3e8cf, #d9c396); border: 1px solid var(--gold-dk); box-shadow: inset 0 0 0 1px var(--gold-hi), 0 2px 0 #4a3515, 0 3px 8px rgba(0,0,0,.3); transition: filter .15s, transform .08s, box-shadow .15s; }
.btn:hover:not(:disabled) { filter: brightness(1.07); box-shadow: inset 0 0 0 1px var(--gold-hi), 0 2px 0 #4a3515, 0 0 14px rgba(232,200,114,.55); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 #4a3515; }
.btn:disabled { cursor: not-allowed; filter: grayscale(.85); opacity: .55; }
.btn.primary { color: #f6e9c8; background: linear-gradient(#a8303b, var(--crimson) 55%, var(--burgundy)); border-color: #3a0d14; box-shadow: inset 0 0 0 1px var(--gold), 0 2px 0 #2a0a0f, 0 3px 10px rgba(0,0,0,.35); }
.btn.violet { color: #eadff5; background: linear-gradient(#54406a, var(--violet)); border-color: #1c1226; box-shadow: inset 0 0 0 1px #b99a5a, 0 2px 0 #140c1c; }
.btn.sel { outline: 2px solid var(--gold-hi); outline-offset: 1px; filter: brightness(1.1); }
.btn.small { font-size: 11px; padding: 5px 10px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }

/* ── menü ekranları ── */
.sky { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 25%, rgba(232,200,114,.2), transparent 40%), radial-gradient(ellipse at 20% 110%, rgba(142,31,42,.45), transparent 55%), linear-gradient(#0e1628, #1b2742 45%, #3a2233 80%, #1d0f10); }
.sky::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 60% 20%, #fff9, transparent), radial-gradient(1.5px 1.5px at 80% 40%, #fffa, transparent), radial-gradient(1px 1px at 35% 12%, #fff7, transparent), radial-gradient(1px 1px at 90% 12%, #fff8, transparent); }
.center-win { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 92vh; overflow-y: auto; padding: 36px 32px 26px; }
.logo { font-family: var(--f-deco); font-size: 64px; letter-spacing: .12em; color: var(--burgundy); text-align: center; margin: 0; line-height: 1; text-shadow: 0 2px 0 rgba(255,255,255,.4); }
.logo-sub { text-align: center; font-style: italic; color: var(--ink-soft); margin: 6px 0 22px; font-size: 19px; }
.ribbon { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); padding: 8px 46px; color: #f6e9c8; font-family: var(--f-title); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(#a8303b, var(--crimson) 60%, var(--burgundy)); border: 1px solid var(--gold); box-shadow: 0 4px 10px rgba(0,0,0,.4); clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); }
.field { display: grid; gap: 5px; margin: 12px 0; font-family: var(--f-title); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
input, select, textarea { font: 500 18px var(--f-body); padding: 8px 11px; color: var(--ink); background: rgba(255,250,235,.65); border: 1px solid var(--gold-dk); border-radius: 3px; box-shadow: inset 0 2px 5px rgba(80,50,20,.2); outline: none; text-transform: none; letter-spacing: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--crimson); box-shadow: inset 0 2px 5px rgba(80,50,20,.2), 0 0 0 2px rgba(201,162,74,.5); }
.err { color: var(--crimson); font-weight: 700; min-height: 1.3em; }
h2.ph { font-family: var(--f-title); font-size: 20px; margin: 0 0 4px; color: var(--burgundy); letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.divider { height: 14px; margin: 6px 0 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14'%3E%3Cpath d='M0 7h86M114 7h86' stroke='%23C9A24A' stroke-width='1.3'/%3E%3Ccircle cx='100' cy='7' r='4.5' fill='%238E1F2A' stroke='%23C9A24A'/%3E%3Ccircle cx='90' cy='7' r='1.8' fill='%23C9A24A'/%3E%3Ccircle cx='110' cy='7' r='1.8' fill='%23C9A24A'/%3E%3C/svg%3E") center/contain no-repeat; }
h3.sh { font-family: var(--f-title); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 6px; border-bottom: 1px solid rgba(201,162,74,.6); padding-bottom: 3px; }
.camp { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border: 1px solid rgba(125,95,34,.55); border-radius: 3px; background: rgba(255,250,235,.45); margin-bottom: 8px; }
.camp b { font-size: 19px; } .camp small { color: var(--ink-soft); font-style: italic; }
.seg { display: inline-flex; border: 1px solid var(--gold-dk); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; padding: 6px 12px; cursor: pointer; background: rgba(255,250,235,.5); font-family: var(--f-title); font-size: 12px; letter-spacing: .05em; }
.seg button.on { background: linear-gradient(#a8303b, var(--burgundy)); color: #f6e9c8; }

/* ── kurulum (diyar seçimi) ── */
#setup { display: grid; grid-template-columns: 1fr 420px; }
#setupMap { position: relative; background: #0d0a08; }
#setupSide { padding: 20px; overflow-y: auto; margin: 10px; }
.rlist { display: grid; gap: 5px; max-height: 38vh; overflow-y: auto; padding-right: 4px; }
.ritem { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid rgba(125,95,34,.4); border-radius: 3px; cursor: pointer; background: rgba(255,250,235,.35); text-align: left; }
.ritem:hover { background: rgba(255,248,225,.9); } .ritem.sel { outline: 2px solid var(--gold); background: #fff8e4; } .ritem.taken { opacity: .45; }
.ritem .sw { width: 22px; height: 22px; border-radius: 3px; border: 1px solid #3B2A1E; }

/* ── oyun ── */
#game { display: grid; grid-template-rows: 58px 1fr 52px; }
.topbar, .bottombar { position: relative; z-index: 6; background: linear-gradient(#3a271b, var(--wood) 60%, #1b120c); color: #f0e2c0; box-shadow: 0 3px 12px rgba(0,0,0,.6); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 10px; border-bottom: 2px solid var(--gold); }
.bottombar { border-top: 2px solid var(--gold); display: flex; justify-content: center; gap: 4px; padding: 5px; overflow-x: auto; }
.tb-id { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.tb-id .crest svg { width: 36px; }
.tb-id b { font-family: var(--f-title); font-size: 15px; white-space: nowrap; } .tb-id small { display: block; color: var(--gold-hi); font-style: italic; font-size: 13px; white-space: nowrap; }
.tb-res { display: flex; gap: 5px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow: hidden; }
.res { display: flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 3px; background: rgba(233,220,192,.08); border: 1px solid rgba(201,162,74,.35); font-weight: 700; font-size: 16px; white-space: nowrap; }
.res svg { width: 17px; height: 17px; fill: var(--gold); } .res .d { font-size: 12px; font-weight: 600; } .res .d.pos { color: #9fd08a; } .res .d.neg { color: #e89a8a; }
.clock { display: flex; align-items: center; gap: 6px; }
.clock .date { font-family: var(--f-title); font-size: 14px; min-width: 118px; text-align: right; color: var(--gold-hi); }
.speed { display: flex; gap: 2px; } .speed button { width: 28px; height: 26px; border: 1px solid rgba(201,162,74,.5); background: rgba(233,220,192,.08); color: #d8c7a2; cursor: pointer; border-radius: 2px; font: 700 12px var(--f-title); }
.speed button.on { background: linear-gradient(#f3e8cf, #d9c396); color: var(--ink); } .speed button.run { box-shadow: 0 0 8px var(--gold-hi); }
.paused-tag { font-family: var(--f-title); font-size: 11px; color: #e89a8a; letter-spacing: .1em; }
.pl-dots { display: flex; gap: 4px; } .pl-dot { font-size: 12px; padding: 2px 7px; border-radius: 10px; border: 1px solid rgba(201,162,74,.5); color: #d8c7a2; white-space: nowrap; } .pl-dot.on { border-color: #7fc26b; color: #c9f0bd; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 12px; cursor: pointer; border: 1px solid rgba(201,162,74,.35); border-radius: 4px 4px 2px 2px; background: rgba(233,220,192,.06); color: #d8c7a2; font-family: var(--f-title); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; position: relative; white-space: nowrap; }
.tab svg { width: 18px; height: 18px; fill: #a8916a; } .tab:hover { background: rgba(233,220,192,.14); color: #fff2d0; }
.tab.sel { background: linear-gradient(#f3e8cf, #d9c396); color: var(--ink); border-color: var(--gold-hi); } .tab.sel svg { fill: var(--crimson); }
.tab .badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--crimson); color: #fff; font: 700 11px/17px var(--f-body); text-align: center; border: 1px solid var(--gold-hi); }
.stage { position: relative; overflow: hidden; background: #0d0a08; }
#map { position: absolute; inset: 0; }
#map svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
#map svg.drag { cursor: grabbing; }
.cty { cursor: pointer; } .cty:hover { filter: brightness(1.15); }
.lbl-c { opacity: 0; transition: opacity .2s; pointer-events: none; } .zoomed .lbl-c { opacity: 1; }
.lbl-r { pointer-events: none; }
.mapmodes { position: absolute; left: 10px; top: 10px; z-index: 4; display: flex; gap: 3px; }
.mapmodes button { padding: 4px 9px; font: 600 11px var(--f-title); letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--gold-dk); background: rgba(233,220,192,.85); cursor: pointer; border-radius: 2px; }
.mapmodes button.on { background: linear-gradient(#a8303b, var(--burgundy)); color: #f6e9c8; }
.panel { position: absolute; z-index: 5; top: 10px; bottom: 10px; width: 400px; padding: 18px 18px 14px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--gold-dk) transparent; }
#insp { left: 10px; top: 46px; } #side { right: 10px; }
.panel .x { position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold-dk); background: rgba(255,250,235,.7); cursor: pointer; font-weight: 700; z-index: 2; }
.side-dark { background-color: #d9cfc4; }

.head { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; margin-bottom: 8px; }
.portrait { width: 84px; height: 104px; border-radius: 42px 42px 5px 5px; overflow: hidden; border: 3px solid var(--gold); box-shadow: 0 0 0 1px #4a3515, 0 4px 10px rgba(0,0,0,.35); background: #222; }
.portrait svg, .pm svg { width: 100%; height: 100%; display: block; }
.head .nm { font-family: var(--f-title); font-weight: 700; font-size: 19px; line-height: 1.15; } .head .tt { font-style: italic; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chip { font-size: 14px; padding: 1px 8px; border-radius: 10px; border: 1px solid rgba(125,95,34,.6); background: rgba(255,250,235,.6); cursor: default; }
.chip.g { border-color: #7d6a2a; background: rgba(232,200,114,.35); } .chip.s { border-color: #8a4040; background: rgba(155,44,44,.12); }
.skills { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; margin: 6px 0; }
.skills div { border: 1px solid rgba(125,95,34,.45); border-radius: 3px; padding: 2px 0; background: rgba(255,250,235,.4); } .skills small { display: block; font-size: 11px; color: var(--ink-soft); font-family: var(--f-title); } .skills b { font-size: 18px; }
.kv { display: flex; justify-content: space-between; border-bottom: 1px dotted rgba(125,95,34,.45); padding: 2px 0; gap: 10px; } .kv b { text-align: right; }
.people { display: grid; gap: 4px; }
.person { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 3px; cursor: pointer; border: 1px solid transparent; }
.person:hover { background: rgba(255,248,225,.9); border-color: rgba(125,95,34,.4); } .person.dead { opacity: .55; }
.pm { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); background: #222; }
.person small { color: var(--ink-soft); font-style: italic; display: block; line-height: 1.1; }
.acts { display: grid; gap: 6px; }
.act { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; padding: 6px 10px; cursor: pointer; border: 1px solid rgba(125,95,34,.55); border-radius: 3px; background: rgba(255,250,235,.5); transition: .12s; }
.act:hover:not(:disabled) { background: #fff8e4; box-shadow: 0 0 10px rgba(232,200,114,.55); border-color: var(--gold); }
.act:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.6); }
.act .t { font-weight: 700; font-size: 16px; } .act .d { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); line-height: 1.15; } .act .c { font-family: var(--f-title); font-size: 11px; color: var(--ink-soft); }
.act.violet { border-color: rgba(58,42,74,.6); background: rgba(236,228,245,.5); }
.accept { font-size: 13px; font-weight: 700; } .accept.y { color: var(--good); } .accept.n { color: var(--bad); } .accept.m { color: #8a6a1f; }
.meter { height: 10px; border-radius: 6px; background: rgba(80,50,20,.18); box-shadow: inset 0 1px 3px rgba(0,0,0,.35); border: 1px solid var(--gold-dk); overflow: hidden; margin: 3px 0; }
.meter div { height: 100%; background: linear-gradient(var(--gold-hi), var(--gold-dk)); }
.warbar { position: relative; height: 16px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gold-dk); background: #9b2c2c; margin: 4px 0; }
.warbar div { position: absolute; left: 0; top: 0; bottom: 0; background: #3f7a3a; } .warbar span { position: absolute; inset: 0; text-align: center; font: 700 12px/16px var(--f-title); color: #fff; text-shadow: 0 1px 2px #000; }
.war { padding: 8px 10px; border: 1px solid rgba(125,95,34,.5); border-radius: 3px; background: rgba(255,250,235,.45); margin-bottom: 8px; }
.log li { padding: 4px 0; border-bottom: 1px dotted rgba(125,95,34,.35); line-height: 1.25; list-style: none; font-size: 15px; } .log { padding: 0; margin: 0; } .log time { display: block; font-size: 12px; color: var(--ink-soft); font-style: italic; } .log li.big { font-weight: 700; } .log li.mine { color: var(--violet); }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.msg { padding: 6px 10px; border-radius: 3px; background: rgba(255,250,235,.7); border: 1px solid rgba(125,95,34,.4); font-style: italic; } .msg.mine { align-self: flex-end; background: rgba(142,31,42,.08); } .msg b { font-style: normal; font-family: var(--f-title); font-size: 11px; display: block; color: var(--ink-soft); }
.crow { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; cursor: pointer; border-radius: 3px; }
.crow:hover { background: rgba(255,248,225,.9); } .crow svg { width: 28px; }
.tag { font-size: 11px; font-family: var(--f-title); padding: 1px 6px; border-radius: 8px; border: 1px solid; margin-left: 4px; white-space: nowrap; }
.tag.ally { color: var(--good); } .tag.war { color: var(--bad); } .tag.truce { color: #8a6a1f; } .tag.human { color: var(--royal); } .tag.vassal { color: var(--ink-soft); }

/* ── event ── */
.layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(10,6,4,.5), rgba(10,6,4,.82)); animation: fade .25s; }
@keyframes fade { from { opacity: 0 } }
.event-win { width: min(680px, 94vw); max-height: 92vh; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 18px; animation: rise .35s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0 } }
.event-img { aspect-ratio: 16/7; border: 2px solid var(--gold); box-shadow: 0 0 0 1px #4a3515, inset 0 0 50px rgba(0,0,0,.5); background: #1b2742; position: relative; overflow: hidden; }
.event-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-title { font-family: var(--f-title); font-size: 24px; text-align: center; color: var(--burgundy); margin: 12px 0 6px; letter-spacing: .05em; text-transform: uppercase; }
.ev-text { font-size: 19px; line-height: 1.4; margin: 0 0 12px; }
.ev-text .dropcap { float: left; width: 54px; height: 54px; margin: 4px 10px 0 0; display: grid; place-items: center; font: 700 36px/1 var(--f-deco); color: var(--gold-hi); background: radial-gradient(circle at 40% 35%, #a8303b, var(--burgundy)); border: 2px solid var(--gold); box-shadow: inset 0 0 0 2px var(--burgundy), inset 0 0 0 3px var(--gold-hi); }
.ev-opts { display: grid; gap: 7px; clear: both; }
.ev-opt { text-align: left; padding: 9px 14px 9px 38px; font-size: 17px; font-weight: 600; cursor: pointer; border: 1px solid var(--gold-dk); border-radius: 3px; background: linear-gradient(90deg, rgba(255,250,235,.85), rgba(233,220,192,.6)); position: relative; }
.ev-opt::before { content: ""; position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c2404c, #6d1520); box-shadow: 0 0 0 1px var(--gold); }
.ev-opt:hover:not(:disabled) { background: #fff8e4; box-shadow: 0 0 12px rgba(232,200,114,.6); } .ev-opt:disabled { opacity: .5; cursor: not-allowed; }
.ev-count { text-align: center; font-style: italic; color: var(--ink-soft); font-size: 14px; margin-top: 6px; }

#toasts { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; width: min(460px, 92vw); pointer-events: none; }
.toast { padding: 8px 14px 8px 40px; border: 1px solid var(--gold); border-radius: 3px; background-color: var(--parchment); background-image: var(--paper-noise); box-shadow: 0 6px 18px rgba(0,0,0,.45); position: relative; font-size: 16px; animation: slide .3s ease-out; }
.toast::before { content: ""; position: absolute; left: 12px; top: 50%; margin-top: -10px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c2404c, #6d1520); box-shadow: 0 0 0 1px var(--gold-hi); }
.toast.err::before { background: radial-gradient(circle at 35% 35%, #555, #111); }
@keyframes slide { from { transform: translateY(-12px); opacity: 0 } }
.tooltip { position: fixed; z-index: 70; max-width: 300px; padding: 7px 11px; font-size: 15px; color: #f0e2c0; background: rgba(34,24,16,.97); border: 1px solid var(--gold); border-radius: 3px; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.5); white-space: pre-line; }

@media (max-width: 1000px) {
  .panel { width: auto; left: 8px !important; right: 8px !important; top: auto !important; height: 52%; }
  #insp { z-index: 7; }
  .tab span, .res .l, .pl-dots { display: none; } .tb-id small { display: none; }
  #setup { grid-template-columns: 1fr; grid-template-rows: 45vh 1fr; }
  .clock .date { min-width: 0; font-size: 12px; }
}
.center-win { overflow-x: hidden; }
.center-win::before { top: 0; left: 0; } .center-win::after { bottom: 0; right: 0; }
.center-win .ribbon { position: relative; top: 0; left: auto; transform: none; display: table; margin: -12px auto 14px; }
.panel::before { top: 0; left: 0; } .panel::after { bottom: 0; right: 0; }
.act { width: 100%; margin-bottom: 5px; } .acts .act { margin-bottom: 0; }

/* ── özelleştirme ── */
.cust { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.cust-prev { display: grid; gap: 6px; } .cust-prev svg { width: 120px; height: 154px; border: 3px solid var(--gold); border-radius: 60px 60px 6px 6px; box-shadow: 0 0 0 1px #4a3515, 0 6px 14px rgba(0,0,0,.4); }
.cust-ctl small, .cust + small { font-family: var(--f-title); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 6px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(59,42,30,.4); cursor: pointer; padding: 0; } .swatch.on { border-color: var(--gold-hi); box-shadow: 0 0 0 2px var(--burgundy); }
.stepper { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-size: 14px; } .stepper span { min-width: 70px; } .stepper b { min-width: 30px; text-align: center; font-size: 13px; }
.stepper button { width: 22px; height: 22px; border: 1px solid var(--gold-dk); background: rgba(255,250,235,.7); border-radius: 3px; cursor: pointer; font-weight: 700; line-height: 1; padding: 0; }
.chip.pick { cursor: pointer; } .chip.pick.g { background: linear-gradient(#a8303b, var(--burgundy)); color: #f6e9c8; border-color: var(--gold); }
/* ── ses ── */
#soundPop { position: absolute; top: 54px; right: 60px; z-index: 30; padding: 12px 14px; width: 240px; }
.soundbox { display: grid; gap: 6px; font-size: 14px; } .soundbox label { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 6px; } .soundbox input { padding: 0; box-shadow: none; }
input[type=range] { accent-color: var(--crimson); }

/* ── son rötuşlar ── */
.haveCode { margin-top: 10px; font-size: 14px; color: var(--ink-soft); } .haveCode summary { cursor: pointer; font-style: italic; }
#conn { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 80; padding: 6px 14px; background: rgba(34,24,16,.95); color: #f0e2c0; border: 1px solid var(--gold); border-radius: 3px; font-size: 14px; }
.alerts { position: absolute; left: 10px; top: 44px; z-index: 4; display: flex; gap: 5px; flex-wrap: wrap; max-width: 60%; }
.alert { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 14px; border: 1px solid var(--gold); background: rgba(34,24,16,.9); color: #f0e2c0; cursor: pointer; font: 600 12px var(--f-title); letter-spacing: .04em; animation: fade .3s; }
.alert b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 35%, #c2404c, #6d1520); font-size: 12px; }
.alert:hover { box-shadow: 0 0 10px rgba(232,200,114,.6); }
#insp { top: 80px; }
#menuPop { position: absolute; top: 54px; right: 10px; z-index: 30; padding: 10px; width: 220px; display: grid; gap: 6px; }
#guide .event-win { width: min(560px, 92vw); }
#guide .event-win { overflow: hidden; }

/* ── bakım ekranı ── */
#maint { position: fixed; inset: 0; z-index: 200; }
.maint-win { text-align: center; } .maint-crest { width: 110px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); animation: bob 3s ease-in-out infinite; }
.maint-msg { font-size: 21px; line-height: 1.4; margin: 10px 0; } .maint-sub { font-size: 15px; }
.maint-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; } .maint-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--crimson); animation: blink 1.4s infinite both; }
.maint-dots span:nth-child(2) { animation-delay: .2s; } .maint-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } } @keyframes bob { 50% { transform: translateY(-6px) } }
.maint-win .ribbon { margin: 10px auto 12px; }

/* ── açılış: DEVELOPED BY 925xd ── */
#splash { position: fixed; inset: 0; z-index: 500; background: #000; display: grid; place-items: center; transition: opacity 1.2s ease; }
#splash.gone { opacity: 0; pointer-events: none; }
.splash-start { background: none; border: 0; color: #b8923e; font: 600 15px var(--f-title); letter-spacing: .35em; text-transform: uppercase; cursor: pointer; display: grid; gap: 14px; justify-items: center; animation: breathe 2.4s ease-in-out infinite; }
.splash-start .sp-crown { font-size: 44px; color: #C9A24A; text-shadow: 0 0 24px rgba(232,200,114,.5); letter-spacing: 0; }
@keyframes breathe { 50% { opacity: .45 } }
.splash-seq { display: grid; justify-items: center; gap: 14px; }
.sp-line { width: 0; height: 1px; background: linear-gradient(90deg, transparent, #E8C872, transparent); animation: line 1.6s .2s ease-out forwards; }
.sp-line2 { animation-delay: 1.9s; }
@keyframes line { to { width: min(520px, 80vw); } }
.sp-by { font: 600 clamp(12px, 1.6vw, 17px) var(--f-title); letter-spacing: .6em; color: #9c8a66; opacity: 0; animation: rise1 1.4s 1s ease-out forwards; padding-left: .6em; }
.sp-name { font: 700 clamp(56px, 12vw, 132px) var(--f-deco); letter-spacing: .06em; opacity: 0; filter: blur(10px);
  background: linear-gradient(180deg, #fff3cf 0%, #E8C872 40%, #a07a2a 75%, #6b4f1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: reveal 2.4s 1.5s cubic-bezier(.2,.7,.2,1) forwards; }
.sp-name::after { content: ""; }
@keyframes rise1 { from { transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes reveal { 0% { opacity: 0; filter: blur(12px); transform: scale(1.08); letter-spacing: .3em } 60% { opacity: 1; filter: blur(0) drop-shadow(0 0 30px rgba(232,200,114,.55)); } 100% { opacity: 1; filter: blur(0) drop-shadow(0 0 14px rgba(232,200,114,.35)); transform: scale(1); letter-spacing: .06em } }
.splash-seq.out { animation: seqout 1s ease-in forwards; } @keyframes seqout { to { opacity: 0; transform: scale(.98); } }
.sp-skip { position: absolute; right: 24px; bottom: 20px; color: #6b5a3a; font: 600 12px var(--f-title); letter-spacing: .2em; cursor: pointer; text-transform: uppercase; }
.sp-skip:hover { color: #E8C872; }
/* köşe imzası */
.credit { position: fixed; right: 10px; bottom: 6px; z-index: 450; pointer-events: none; font: 600 11px var(--f-title); letter-spacing: .08em; color: rgba(232,200,114,.55); text-shadow: 0 1px 2px #000; }
.credit b { color: rgba(232,200,114,.85); }
#game ~ .credit, body:has(#game:not(.hidden)) .credit { bottom: 58px; }
.sp-name { font-family: "Cormorant Garamond", Garamond, serif; font-weight: 700; font-style: italic; font-size: clamp(72px, 15vw, 168px); letter-spacing: .02em; line-height: .9; padding: 0 .12em .06em; }
@keyframes reveal { 0% { opacity: 0; filter: blur(12px); transform: scale(1.08); letter-spacing: .25em } 60% { opacity: 1; filter: blur(0) drop-shadow(0 0 30px rgba(232,200,114,.55)); } 100% { opacity: 1; filter: blur(0) drop-shadow(0 0 14px rgba(232,200,114,.35)); transform: scale(1); letter-spacing: .02em } }
.credit b { font-family: "Cormorant Garamond", Garamond, serif; font-style: italic; font-size: 13px; letter-spacing: .02em; }

/* ── profil & PRO ── */
.mecard { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin: 4px 0 8px; }
.me-name { font-family: var(--f-title); font-weight: 700; font-size: 19px; }
.pframe { position: relative; width: var(--s); height: var(--s); border-radius: 50%; padding: 4px; background: linear-gradient(145deg, #b8923e, #7d5f22); box-shadow: 0 3px 10px rgba(0,0,0,.35); flex: none; }
.pframe-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 40% 35%, #3a2a1e, #140e0a); display: grid; place-items: center; }
.pframe-in svg { width: 72%; height: auto; }
.pframe.pro { padding: 5px; background: conic-gradient(from var(--a, 0deg), #fff3cf, #E8C872, #a07a2a, #fff3cf, #C9A24A, #6b4f1a, #fff3cf); animation: spinA 4s linear infinite; box-shadow: 0 0 0 2px #3a0d14, 0 0 18px rgba(232,200,114,.65), 0 4px 12px rgba(0,0,0,.4); }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinA { to { --a: 360deg; } }
.pro-ribbon { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 1px 10px; font: 800 11px var(--f-title); letter-spacing: .18em; color: #3a0d14; background: linear-gradient(#fff3cf, #E8C872 50%, #b8923e); border: 1px solid #6b4f1a; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pro-badge { display: inline-block; vertical-align: middle; padding: 0 6px; font: 800 10px/16px var(--f-title); letter-spacing: .12em; color: #3a0d14; background: linear-gradient(#fff3cf, #E8C872 55%, #b8923e); border: 1px solid #6b4f1a; border-radius: 3px; }
.pl-dot.is-pro { border-color: #E8C872; color: #ffe9a8; box-shadow: 0 0 6px rgba(232,200,114,.5); } .pl-dot { cursor: pointer; }
.modal-win { width: min(560px, 94vw); }
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 6px; }
.pstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.pstat { border: 1px solid rgba(125,95,34,.45); border-radius: 3px; padding: 6px 4px; text-align: center; background: rgba(255,250,235,.45); }
.pstat b { display: block; font: 700 20px var(--f-title); color: var(--burgundy); } .pstat small { font-size: 12px; color: var(--ink-soft); }
.pro-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 17px; } .pro-list b { color: var(--gold-dk); display: inline-block; width: 22px; text-align: center; }
.pro-price { text-align: center; font: 700 36px var(--f-title); color: var(--burgundy); margin: 6px 0 10px; }

/* ── rozetler ── */
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 2px; }
.rbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 12px; font: 700 10.5px/1.5 var(--f-title); letter-spacing: .1em; text-transform: uppercase; border: 1px solid; position: relative; overflow: hidden; cursor: default; white-space: nowrap; }
.rbadge i { font-style: normal; font-size: 13px; line-height: 1; }
.rbadge.big { font-size: 12px; padding: 3px 11px 3px 8px; } .rbadge.big i { font-size: 15px; }
.rbadge.legendary { color: #fff3cf; background: linear-gradient(135deg, #4a1f5e, #2a0f3a 55%, #6b2a7a); border-color: #E8C872; box-shadow: 0 0 10px rgba(232,200,114,.45), inset 0 0 0 1px rgba(255,243,207,.2); }
.rbadge.legendary i { color: #E8C872; text-shadow: 0 0 8px rgba(232,200,114,.9); }
.rbadge.crimson { color: #fff0e0; background: linear-gradient(135deg, #a8303b, #5e1624); border-color: #E8C872; box-shadow: 0 0 8px rgba(168,48,59,.5); }
.rbadge.royal { color: #eef3ff; background: linear-gradient(135deg, #2f5689, #16233a); border-color: #C9A24A; box-shadow: 0 0 8px rgba(47,86,137,.5); }
.rbadge.legendary::after, .rbadge.crimson::after, .rbadge.royal::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
/* kurucu çerçevesi */
.pframe.founder { padding: 6px; background: conic-gradient(from var(--a, 0deg), #fff3cf, #E8C872, #6b2a7a, #2a0f3a, #E8C872, #a07a2a, #6b2a7a, #fff3cf); animation: spinA 3s linear infinite; box-shadow: 0 0 0 2px #2a0f3a, 0 0 26px rgba(232,200,114,.8), 0 0 50px rgba(107,42,122,.55), 0 6px 14px rgba(0,0,0,.45); }
.f-crown { position: absolute; top: calc(var(--s) * -0.34); left: 50%; transform: translateX(-50%); font-size: calc(var(--s) * 0.42); color: #E8C872; text-shadow: 0 0 12px rgba(232,200,114,.9), 0 2px 3px #000; z-index: 2; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
.pro-ribbon.f-rib { color: #fff3cf; background: linear-gradient(#6b2a7a, #3a1348); border-color: #E8C872; letter-spacing: .14em; font-size: 10px; box-shadow: 0 0 10px rgba(232,200,114,.6); }
.profile-head.is-founder { padding-top: 26px; } .mecard .pframe.founder { margin-top: 22px; }

.me-name, .pname { font-family: "Cormorant Garamond", Garamond, serif; font-weight: 700; text-transform: none; letter-spacing: .01em; }
.me-name { font-size: 24px; } .pname { font-size: 32px; }

.rbadge.rose { color: #fff0f4; background: linear-gradient(135deg, #b85c7b, #6e1f3a 60%, #9b3a5e); border-color: #E8C872; box-shadow: 0 0 10px rgba(232,140,170,.55); }
.rbadge.rose i { color: #ffe3ec; text-shadow: 0 0 8px rgba(255,190,210,.9); }
.rbadge.rose::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.2s ease-in-out infinite; }

/* kraliçe çerçevesi */
.pframe.queen { padding: 6px; background: conic-gradient(from var(--a, 0deg), #fff3cf, #f2b8c9, #E8C872, #b85c7b, #6e1f3a, #E8C872, #f2b8c9, #fff3cf); animation: spinA 3.4s linear infinite; box-shadow: 0 0 0 2px #4a1224, 0 0 24px rgba(242,184,201,.8), 0 0 46px rgba(184,92,123,.5), 0 6px 14px rgba(0,0,0,.45); }
.f-crown.q-crown { color: #ffd9e4; text-shadow: 0 0 12px rgba(255,190,210,.95), 0 0 4px #E8C872, 0 2px 3px #000; }
.pro-ribbon.q-rib { color: #fff0f4; background: linear-gradient(#b85c7b, #6e1f3a); border-color: #E8C872; letter-spacing: .16em; font-size: 10px; box-shadow: 0 0 10px rgba(242,184,201,.7); }
.mecard .pframe.queen { margin-top: 22px; }

/* ── arkadaşlar ── */
.fr-btn { position: relative; }
.fr-count { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--crimson); color: #fff; font: 700 11px/18px var(--f-body); font-style: normal; border: 1px solid var(--gold-hi); }
.fr-code { font-size: 15px; } .fcode { font-family: var(--f-title); letter-spacing: .12em; color: var(--burgundy); }
.fr-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px dotted rgba(125,95,34,.4); }
.fr-name { cursor: pointer; font-weight: 700; font-size: 17px; font-family: "Cormorant Garamond", serif; } .fr-name:hover { color: var(--crimson); }
.fr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9a8f80; box-shadow: 0 0 0 2px rgba(0,0,0,.15); } .fr-dot.on { background: #4caf50; box-shadow: 0 0 6px #4caf50; }
.chat.dm { max-height: 44vh; min-height: 160px; border: 1px solid rgba(125,95,34,.35); border-radius: 3px; padding: 8px; background: rgba(255,250,235,.35); }

.fr-row { grid-template-columns: 12px 1fr auto; } .fr-act { font-size: 13px; line-height: 1.2; }

/* ── profil simgesi ── */
.av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-emoji { font-size: calc(var(--s, 84px) * .5); line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.av-edit-wrap { position: relative; cursor: pointer; display: inline-block; }
.av-edit { position: absolute; right: 2px; bottom: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #1d130c; color: #E8C872; border: 1px solid #C9A24A; font-size: 13px; z-index: 3; opacity: .85; }
.av-edit-wrap:hover .av-edit { opacity: 1; box-shadow: 0 0 8px rgba(232,200,114,.7); }
.av-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.av-pick { font-size: 24px; padding: 6px 0; border-radius: 10px; border: 1px solid rgba(125,95,34,.45); background: rgba(255,255,255,.35); cursor: pointer; }
.av-pick:hover, .av-pick.on { border-color: #8E1F2A; background: rgba(232,200,114,.5); box-shadow: 0 0 8px rgba(142,31,42,.35); }
.mini-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; vertical-align: middle; background: #2a1c12; border: 1px solid #C9A24A; margin-right: 4px; flex: none; }
.mini-av .av-emoji { font-size: 13px; } .mini-av b { font: 700 11px var(--f-title); color: #E8C872; }
.pl-dot .mini-av { width: 16px; height: 16px; margin-right: 3px; } .pl-dot .mini-av .av-emoji { font-size: 10px; } .pl-dot .mini-av b { font-size: 9px; }
@media (max-width: 520px) { .av-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── uyarılar ── */
.alert.sev-warn b { background: radial-gradient(circle at 35% 35%, #e0a23a, #7a4d10); }
.alert.sev-info b { background: radial-gradient(circle at 35% 35%, #5a86b8, #1f3a5f); }
.alert.sev-good b { background: radial-gradient(circle at 35% 35%, #F6DF96, #9a6a1a); color: #1d130c; }
.alert.sev-bad { animation: fade .3s, pulseBad 2.4s ease-in-out infinite; }
.alert.open { box-shadow: 0 0 12px rgba(232,200,114,.9); border-color: #F6DF96; }
@keyframes pulseBad { 50% { box-shadow: 0 0 10px rgba(194,64,76,.8); } }
#alertPop { position: absolute; left: 10px; top: 80px; z-index: 6; width: min(380px, calc(100% - 20px)); max-height: calc(100% - 150px); overflow-y: auto; overflow-x: hidden; padding: 14px 16px; animation: fade .2s; }
#alertPop p { margin: 4px 0 8px; font-size: 15px; } #alertPop h4 { margin: 8px 0 4px; font-family: var(--f-title); font-size: 13px; letter-spacing: .05em; color: var(--crimson); }
#alertPop .x { position: absolute; right: 8px; top: 6px; }
.tips { list-style: none; padding: 0; margin: 0; } .tips li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(125,95,34,.35); font-size: 14px; }
.tips li .btn { flex: none; }
.inc-mini { margin-top: 8px; font-size: 13px; }
.match { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(125,95,34,.35); }
.match .pm, .cand .pm, .pick-row .pm { width: 44px; height: 52px; flex: none; cursor: pointer; } .match .act { width: auto; flex: none; }
.chip.link { cursor: pointer; } .chip.link:hover { background: rgba(232,200,114,.55); }

/* ── saray paneli ── */
.seat { border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: rgba(255,255,255,.22); }
.seat.empty { border-style: dashed; border-color: #8E1F2A; background: rgba(142,31,42,.06); }
.seat-h { display: flex; gap: 8px; align-items: center; } .seat-h > div { flex: 1; } .seat-h small { display: block; font-size: 12px; }
.seat-i { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #2a1c12; border: 1px solid #C9A24A; flex: none; }
.seat-sk { min-width: 30px; text-align: center; font: 700 16px var(--f-title); color: #fff; background: #5E1624; border-radius: 8px; padding: 2px 6px; }
.seat-tasks { margin-top: 6px; } .seat-tasks button { font-size: 12px; }
.pick-list { margin-top: 6px; max-height: 260px; overflow: auto; border-top: 1px solid rgba(125,95,34,.35); }
.pick-row { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px dashed rgba(125,95,34,.3); padding: 4px 2px; cursor: pointer; font: inherit; color: inherit; }
.pick-row > span:nth-child(2) { flex: 1; } .pick-row:hover { background: rgba(232,200,114,.3); }
.cands { display: grid; gap: 8px; margin: 8px 0; } .cand { display: flex; gap: 8px; align-items: flex-start; border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 8px; background: rgba(255,255,255,.25); }
.cand .btn { flex: none; line-height: 1.1; } .skills .hi { background: rgba(142,31,42,.18); border-radius: 6px; } .skills .hi b { color: #8E1F2A; }

/* ── oyun içi sohbet ── */
#gchat { position: absolute; left: 10px; bottom: 10px; z-index: 6; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
.gchat-btn { position: relative; padding: 7px 14px; border-radius: 18px; border: 1px solid var(--gold); background: rgba(34,24,16,.92); color: #f0e2c0; font: 700 13px var(--f-title); letter-spacing: .05em; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.gchat-btn:hover { box-shadow: 0 0 12px rgba(232,200,114,.6); }
.gchat-win { width: min(360px, calc(100vw - 40px)); padding: 10px 12px; }
.gchat-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-family: var(--f-title); } .gchat-h .x { position: static; }
.gchat-list { height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; margin-bottom: 8px; }
.gmsg { display: flex; gap: 6px; align-items: flex-start; } .gmsg > div { background: rgba(255,255,255,.4); border-radius: 10px; padding: 4px 9px; max-width: 85%; } .gmsg b { display: block; font-size: 13px; } .gmsg span { font-size: 15px; word-break: break-word; }
.gmsg.mine { flex-direction: row-reverse; } .gmsg.mine > div { background: rgba(232,200,114,.45); }
#gchatText { flex: 1; min-width: 0; }
.tips .act, #alertPop .act { width: auto; max-width: 100%; } .tips li > span { flex: 1; min-width: 0; }
.seat-i { color: #E8C872; }

/* ── oyuncu künyesi ve etkileşimler ── */
.pbanner { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 4px 0 8px; border-radius: 10px; background: linear-gradient(90deg, rgba(122,70,190,.22), rgba(122,70,190,.05)); border: 1px solid #9a72d0; cursor: pointer; }
.pbanner.mine { background: linear-gradient(90deg, rgba(232,200,114,.35), rgba(232,200,114,.08)); border-color: #C9A24A; }
.pbanner .mini-av { width: 34px; height: 34px; } .pbanner .mini-av .av-emoji { font-size: 20px; } .pbanner .mini-av b { font-size: 15px; }
.pbanner > div { flex: 1; } .pbanner small { display: block; font-size: 12px; color: #6b4f86; } .pbanner.mine small { color: #7d5f22; } .pbanner b { font-family: "Cormorant Garamond", serif; font-size: 18px; }
.pb-dot { font-size: 12px; color: #8a7a66; } .pb-dot.on { color: #3d8a2e; font-weight: 700; } .pb-dot::before { content: "●"; margin-right: 3px; }
.pint { border: 1px solid #9a72d0; border-radius: 10px; padding: 6px 10px 8px; margin: 6px 0 10px; background: rgba(122,70,190,.07); }
.ev-lead { font-size: 34px; float: left; margin: 0 10px 0 0; line-height: 1; } .ev-text { white-space: pre-line; }

/* ── hedefler / faaliyetler ── */
.goal, .act-card { border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: rgba(255,255,255,.25); }
.goal.done { border-color: #3d8a2e; background: rgba(90,160,70,.12); }
.goal-h { display: flex; gap: 8px; align-items: center; } .goal-h > div { flex: 1; } .goal-h small { display: block; font-size: 13px; color: #6d5a44; }
.goal-i { font-size: 22px; width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2a1c12; border: 1px solid #C9A24A; }
.goal-r { font: 700 13px var(--f-title); color: #7d5f22; white-space: nowrap; }
.goal .meter { margin: 6px 0 4px; }
.alert.sev-bad.stopped b { background: radial-gradient(circle at 35% 35%, #555, #111); }
.goal-i { color: #E8C872; }

/* ── yakınlık ── */
.night { border: 1px solid #c07a90; border-radius: 10px; padding: 6px 10px 8px; margin: 6px 0 10px; background: linear-gradient(135deg, rgba(160,40,80,.10), rgba(90,30,110,.08)); }
.night-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.night-opt { text-align: left; border: 1px solid rgba(142,31,72,.35); border-radius: 9px; padding: 7px 9px; background: rgba(255,255,255,.4); cursor: pointer; font: inherit; color: inherit; }
.night-opt b { display: block; font-size: 14px; } .night-opt small { font-size: 12px; color: #6d5a44; }
.night-opt:hover:not([disabled]) { background: rgba(232,160,190,.35); border-color: #8E1F48; box-shadow: 0 0 8px rgba(142,31,72,.25); }
.night-opt[disabled] { opacity: .5; cursor: default; }
@media (max-width: 520px) { .night-grid { grid-template-columns: 1fr; } }

/* ── aile ── */
.kidbox { border: 1px solid #7aa3c9; border-radius: 10px; padding: 6px 10px 8px; margin: 6px 0 10px; background: rgba(90,140,200,.08); }
.kid-opt:hover:not([disabled]) { background: rgba(150,190,235,.35); border-color: #1F3A5F; }
.perks { display: grid; gap: 6px; margin: 6px 0 10px; }
.perk { display: flex; gap: 8px; align-items: center; border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 6px 8px; background: rgba(255,255,255,.25); }
.perk > div { flex: 1; } .perk small { display: block; font-size: 12px; color: #6d5a44; } .perk.own { border-color: #C9A24A; background: rgba(232,200,114,.3); }
.namebox { margin: 0 0 8px; padding: 8px 10px; border: 1px dashed #C9A24A; border-radius: 10px; background: rgba(232,200,114,.15); }
.namebox label { display: block; font: 700 13px var(--f-title); margin-bottom: 4px; } .namebox input { flex: 1; }

/* ── okunaklı yazı tipi: Poppins (logo ve imza hariç) ── */
:root { --f-body: "Poppins", "Segoe UI", system-ui, sans-serif; --f-title: "Poppins", "Segoe UI", system-ui, sans-serif; }
html, body { font-size: 14px; }
input, select, textarea { font: 400 14px var(--f-body); }
.btn, .tab, .seg button, .mapmodes button, h3.sh, .field, .alert, .tag { letter-spacing: .02em; }
.btn { font-size: 12px; font-weight: 600; } .tab { font-size: 11.5px; } .alert { font-size: 11.5px; font-weight: 500; }
h2.ph { font-size: 17px; font-weight: 700; letter-spacing: .03em; } h3.sh { font-size: 11.5px; font-weight: 600; }
.ev-title { font-size: 20px; font-weight: 700; letter-spacing: .03em; }
.ev-text { font-size: 15px; line-height: 1.6; } .ev-opt { font-size: 14px; }
.act .t { font-size: 14px; font-weight: 600; } .act .d { font-size: 12px; line-height: 1.35; }
.toast { font-size: 13.5px; }
.head .nm, .me-name { font-size: 17px; } .head .tt, .tb-id small, .msg { font-style: normal; }
.me-name, .pname, .fr-name, .pbanner b { font-family: var(--f-body); font-weight: 600; }
.fr-name { font-size: 15px; } .pbanner b { font-size: 15px; }
.skills b { font-size: 16px; } .pstat b { font-size: 18px; }
.chip { font-size: 12px; } .kv { font-size: 13.5px; }
.night-opt b, .goal b, .perk b { font-size: 13px; }

/* ── bildirimler: seninle ilgili / dünya haberi ── */
.toast small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 1px; }
.toast.mine { border: 2px solid #E8C872; border-left: 6px solid #8E1F2A; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.5), 0 0 14px rgba(232,200,114,.45); }
.toast.mine::before { content: "♛"; display: grid; place-items: center; color: #F6DF96; font-size: 12px; }
.toast.world { background: rgba(38,30,24,.88); background-image: none; color: #d8ccb4; border: 1px solid rgba(150,135,110,.5); font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; opacity: .92; }
.toast.world::before { content: "🌍"; background: none; box-shadow: none; display: grid; place-items: center; font-size: 13px; }
.toast.world small { color: #a8987c; }

/* ── akıcılık ── */
.clock { position: relative; }
#mprog { position: absolute; left: 0; right: 0; bottom: -5px; height: 3px; background: rgba(201,162,74,.18); border-radius: 2px; overflow: hidden; }
#mprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b8923e, #F6DF96); box-shadow: 0 0 6px rgba(246,223,150,.7); }
#mprog.stopped i { background: #7a6a55; box-shadow: none; }
#map .cty { transition: fill .9s ease; }
.panel:not(.hidden) { animation: panelIn .22s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.btn, .act, .tab, .alert, .night-opt, .pick-row { transition: background-color .15s, box-shadow .15s, transform .12s, border-color .15s; }
.btn:active, .act:active:not([disabled]), .tab:active { transform: scale(.97); }
.toast { animation: slide .35s cubic-bezier(.2,.9,.3,1.2); }
.allybox { border: 1px solid #2fb457; border-radius: 10px; padding: 6px 10px 8px; margin: 6px 0 10px; background: rgba(47,180,87,.08); }

/* ── harita vurgusu ── */
.hl-glow { animation: hlPulse 1.4s ease-in-out infinite; }
@keyframes hlPulse { 0%, 100% { opacity: .25; } 50% { opacity: .75; } }
.hl-pin { animation: hlBob 1.4s ease-in-out infinite; }
@keyframes hlBob { 50% { transform: translateY(-6px); } }
.ev-map { display: block; margin: 0 0 8px; }
#evBack { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 460; box-shadow: 0 6px 20px rgba(0,0,0,.5), 0 0 16px rgba(255,211,107,.6); animation: breathe 2s ease-in-out infinite; }
.inbox { border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: rgba(255,255,255,.25); }
.inbox-crest { width: 34px; flex: none; cursor: pointer; }

#evBack { bottom: 96px; animation: evBackGlow 1.6s ease-in-out infinite; opacity: 1; }
@keyframes evBackGlow { 50% { box-shadow: 0 6px 20px rgba(0,0,0,.5), 0 0 26px rgba(255,211,107,.95); } }

#maint.banned .ribbon { background: linear-gradient(#8E1F2A, #5E1624); }
#maint.banned .maint-msg { font-size: 16px; }

/* ── yeni rozet renkleri ── */
.rbadge.emerald { color: #eafff0; background: linear-gradient(135deg, #2f8a55, #134a2c); border-color: #C9A24A; box-shadow: 0 0 8px rgba(47,138,85,.5); }
.rbadge.amber { color: #fff6e0; background: linear-gradient(135deg, #c07a1c, #6b3d0a); border-color: #F6DF96; box-shadow: 0 0 8px rgba(192,122,28,.5); }
.rbadge.steel { color: #f2f5f8; background: linear-gradient(135deg, #6b7784, #2f3740); border-color: #d9dee4; box-shadow: 0 0 8px rgba(160,175,190,.45); }
.rbadge.onyx { color: #F6DF96; background: linear-gradient(135deg, #1a1a1a, #000 55%, #2a2a2a); border-color: #E8C872; box-shadow: 0 0 10px rgba(232,200,114,.5); }
.rbadge.onyx i { color: #E8C872; text-shadow: 0 0 8px rgba(232,200,114,.9); }
.rbadge.emerald::after, .rbadge.amber::after, .rbadge.steel::after, .rbadge.onyx::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3.6s ease-in-out infinite; }

/* ── kraliyet fermanı ── */
#decree { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(60,30,10,.55), rgba(5,3,2,.92) 70%); animation: dcFade .5s ease-out; padding: 16px; }
#decree.out { animation: dcFadeOut .45s ease-in forwards; }
@keyframes dcFade { from { opacity: 0; } } @keyframes dcFadeOut { to { opacity: 0; } }
.dc-rays { position: absolute; width: 1400px; height: 1400px; left: 50%; top: 45%; margin: -700px 0 0 -700px; background: repeating-conic-gradient(from 0deg, rgba(246,223,150,.13) 0deg 6deg, transparent 6deg 18deg); animation: dcSpin 40s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%); pointer-events: none; }
@keyframes dcSpin { to { transform: rotate(360deg); } }
.dc-scroll { position: relative; width: min(520px, 92vw); animation: dcDrop .7s cubic-bezier(.2,1.3,.4,1); }
@keyframes dcDrop { from { transform: translateY(-60px) scale(.9); opacity: 0; } }
.dc-rod { height: 22px; margin: 0 -18px; border-radius: 11px; background: linear-gradient(#f6df96, #b8923e 45%, #6b4f1a); box-shadow: 0 4px 10px rgba(0,0,0,.6); position: relative; z-index: 2; }
.dc-rod::before, .dc-rod::after { content: ""; position: absolute; top: -5px; width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3cf, #b8923e 55%, #4a3515); } .dc-rod::before { left: -14px; } .dc-rod::after { right: -14px; }
.dc-body { background-color: var(--parchment); background-image: var(--paper-noise), linear-gradient(90deg, rgba(90,60,20,.18), transparent 12%, transparent 88%, rgba(90,60,20,.18)); padding: 22px 34px 26px; text-align: center; transform-origin: top; animation: dcUnroll .9s .15s cubic-bezier(.3,1,.3,1) both; box-shadow: inset 0 0 40px rgba(120,80,30,.35); overflow: hidden; }
@keyframes dcUnroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.dc-kicker { font: 700 13px Cinzel, serif; letter-spacing: .28em; text-transform: uppercase; color: var(--burgundy); }
.dc-crest img { width: 64px; margin: 10px auto 4px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); animation: dcPulse 2.4s ease-in-out infinite; }
@keyframes dcPulse { 50% { transform: scale(1.06); filter: drop-shadow(0 0 14px rgba(232,200,114,.9)); } }
.dc-msg { font-size: 17px; line-height: 1.6; white-space: pre-line; margin: 8px 0 12px; color: var(--ink); font-weight: 500; }
.dc-count { margin: 6px auto 14px; padding: 10px 16px; border: 2px solid var(--burgundy); border-radius: 12px; background: rgba(142,31,42,.08); display: inline-block; }
.dc-count b { display: block; font: 700 46px/1.1 Cinzel, serif; color: var(--burgundy); letter-spacing: .06em; text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.dc-count small { display: block; font-size: 12px; color: var(--ink-soft); }
.dc-sign { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; } .dc-sign i { font-family: "Cormorant Garamond", serif; font-size: 17px; font-weight: 700; color: var(--burgundy); }
.dc-seal { position: absolute; right: 18px; bottom: -14px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #f6d9a0; background: radial-gradient(circle at 35% 30%, #c2404c, #6d1520 70%); box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 0 0 3px rgba(0,0,0,.2); transform: rotate(-12deg); animation: dcStamp .5s 1s cubic-bezier(.3,1.6,.5,1) both; z-index: 3; }
@keyframes dcStamp { from { transform: scale(2.4) rotate(-40deg); opacity: 0; } }
#maintBar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 850; padding: 7px 18px; border-radius: 20px; font: 600 13px var(--f-body); color: #fff3cf; background: linear-gradient(135deg, #8E1F2A, #4a1015); border: 1px solid #E8C872; box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 14px rgba(232,200,114,.45); }
#maintBar b { font-size: 15px; letter-spacing: .05em; } #maintBar.urgent { animation: mbPulse 1s ease-in-out infinite; }
@keyframes mbPulse { 50% { box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 26px rgba(255,90,90,.9); } }

#verBar { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 870; display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 16px; border-radius: 22px; font: 600 13px var(--f-body); color: #fff3cf; background: linear-gradient(135deg, #2f5689, #16233a); border: 1px solid #E8C872; box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 14px rgba(232,200,114,.45); animation: slide .4s ease-out; white-space: nowrap; }

/* ── harita animasyonları: deniz, gemiler, yürüyüş, muharebe ── */
.sea-waves { animation: seaDrift 18s linear infinite; }
@keyframes seaDrift { to { transform: translateX(120px); } }
.fx-trail { stroke-dashoffset: 0; animation: trail 1.2s linear infinite, fadeOut 1s 5s forwards; }
@keyframes trail { to { stroke-dashoffset: -48; } }
@keyframes fadeOut { to { opacity: 0; } }
.fx-arrive { transform-box: fill-box; transform-origin: center; opacity: 0; animation: arrive 1.2s 4.1s ease-out; }
@keyframes arrive { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(9); } }
.fx-label { opacity: 0; animation: lbl 4.6s .6s ease-out forwards; }
@keyframes lbl { 0% { opacity: 0; transform: translateY(8px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.fx-charge.l { animation: chargeL 1.3s cubic-bezier(.5,0,.8,.6) forwards, shake .18s 1.3s 12 alternate; }
.fx-charge.r { animation: chargeR 1.3s cubic-bezier(.5,0,.8,.6) forwards, shake .18s 1.3s 12 alternate; }
@keyframes chargeL { to { transform: translateX(26px); } } @keyframes chargeR { to { transform: translateX(-26px); } }
@keyframes shake { from { rotate: -6deg; } to { rotate: 6deg; } }
.fx-boom { transform-box: fill-box; transform-origin: center; opacity: 0; animation: boom 1.6s 1.15s ease-out; }
@keyframes boom { 0% { opacity: .95; transform: scale(.2); } 60% { opacity: .6; } 100% { opacity: 0; transform: scale(1.8); } }
.fx-spark { opacity: 0; stroke-dasharray: 60; stroke-dashoffset: 60; animation: spark .7s ease-out forwards; }
@keyframes spark { 0% { opacity: 1; stroke-dashoffset: 60; } 100% { opacity: 0; stroke-dashoffset: -30; } }
.fx-swords { transform-box: fill-box; transform-origin: center; opacity: 0; animation: swords 2.8s 1.1s ease-out forwards; }
@keyframes swords { 0% { opacity: 0; transform: scale(2.6) rotate(-30deg); } 18% { opacity: 1; transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
.fx-dust { transform-box: fill-box; transform-origin: center; opacity: 0; animation: dust 2.6s 1.2s ease-out; }
.fx-dust.d2 { animation-delay: 1.5s; }
@keyframes dust { 0% { opacity: .55; transform: scale(.3); } 100% { opacity: 0; transform: scale(3.2); } }
.fx-flag { opacity: 0; animation: flagUp 1.4s 3.4s ease-out forwards; }
@keyframes flagUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(-10px); } }

/* ── üst çubuk: hükümdar becerileri ── */
#tbStats { display: flex; gap: 3px; align-items: center; cursor: pointer; margin-left: 6px; }
#tbStats span { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 10px; font: 600 12px var(--f-body); color: #f0e2c0; background: rgba(233,220,192,.08); border: 1px solid rgba(201,162,74,.35); }
#tbStats span i { font-style: normal; font-size: 11px; } #tbStats span.focus { border-color: #E8C872; box-shadow: 0 0 6px rgba(232,200,114,.5); } #tbStats span.low { border-color: #c2404c; color: #ffb3b3; }
@media (max-width: 1100px) { #tbStats span:nth-child(n+6) { display: none; } }
@media (max-width: 800px) { #tbStats { display: none; } }
.bulk { border: 1px dashed rgba(125,95,34,.5); border-radius: 10px; padding: 8px 10px; margin: 4px 0 8px; background: rgba(232,200,114,.08); } .bulk small { display: block; font-size: 12px; color: var(--ink-soft); }
.hookbox { border: 1px solid #7a4da8; border-radius: 10px; padding: 6px 10px 8px; margin: 6px 0 10px; background: rgba(90,50,140,.08); }

.pickrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; } .pickrow b { font: 600 12px var(--f-title); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); min-width: 64px; }

.wonder { display: flex; gap: 8px; align-items: center; border: 1px solid rgba(125,95,34,.45); border-radius: 10px; padding: 7px 9px; margin: 5px 0; background: rgba(255,255,255,.22); }
.wonder > div { flex: 1; } .wonder small { display: block; font-size: 12px; color: #6d5a44; } .wonder.mine { border-color: #C9A24A; background: rgba(232,200,114,.28); } .wonder.taken { opacity: .7; }
.meter.warn div { background: linear-gradient(90deg, #c2404c, #e0a23a); }

#maintCd { margin: 12px auto 6px; padding: 10px 18px; border: 2px solid var(--burgundy); border-radius: 12px; background: rgba(142,31,42,.08); display: inline-block; }
#maintCd b { display: block; font: 700 44px/1.1 Cinzel, serif; color: var(--burgundy); letter-spacing: .05em; } #maintCd small { display: block; font-size: 12px; color: var(--ink-soft); }
.maint-win { text-align: center; }

/* v0.1.2 devlet paneli */
.stateblk { border: 1px solid var(--line, #d8c7a0); border-radius: 12px; padding: 10px 12px; margin: 8px 0 10px; background: rgba(232,200,114,.07); }
.stateblk .sh-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .stateblk .sh-row small { color: var(--ink-soft); font-size: 12px; }
.sbar { display: grid; grid-template-columns: 128px 1fr 52px; align-items: center; gap: 8px; font-size: 13px; margin: 3px 0; }
.sbar b { text-align: right; font-size: 12px; } .sbar .sb { height: 8px; border-radius: 6px; background: rgba(0,0,0,.12); overflow: hidden; }
.sbar .sb > div { height: 100%; border-radius: 6px; background: #8a7a5a; } .sbar .sb > .g { background: #3f8a4a; } .sbar .sb > .m { background: #c9922a; } .sbar .sb > .b { background: #a8323e; }
.res-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; margin-top: 6px; } .res-row span { background: rgba(0,0,0,.05); border-radius: 8px; padding: 2px 8px; }
.why { font-size: 12px; margin: 4px 0; color: var(--burgundy, #8e1f2a); } .why small { display: block; color: var(--ink-soft); } .why span { display: block; }
@media (max-width: 480px) { .sbar { grid-template-columns: 100px 1fr 44px; } }

.wn-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(10,6,3,.62); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .3s; }
.wn { max-width: 560px; width: 100%; max-height: 88vh; overflow: auto; padding: 18px 20px; animation: rise .35s ease-out; }
.wn-i { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; } .wn-i > span { font-size: 22px; width: 30px; text-align: center; flex: none; }
.wn-i b { display: block; } .wn-i small { display: block; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }

.coopblk { background: rgba(47,93,58,.08); } .coop-join .ritem { align-items: flex-start; }
/* üst çubuk taşmasın: oyuncu rozetleri ve istatistikler daralır, sağdaki düğmeler hep görünür */
.topbar > * { flex-shrink: 0; }
.topbar > #tbStats, .topbar > .pl-dots, .topbar > .tb-id { flex-shrink: 1; min-width: 0; overflow: hidden; }
.pl-dots { max-width: 24vw; } .pl-dot { overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
@media (max-width: 1500px) { #tbStats span:nth-child(n+7) { display: none; } }
#game { grid-template-columns: minmax(0, 1fr); } /* ızgara içeriğe göre ekrandan taşmasın */
.topbar > .tb-res { flex: 1 0 auto; } /* kaynaklar (altın, prestij…) hiç kırpılmasın */

/* ── Fetih Masası ── */
#risk { display: grid; grid-template-rows: 50px 1fr; height: 100vh; background: #1d130c; }
#risk.hidden { display: none; }
.rk-head { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 2px solid var(--gold); color: #f0e2c0; font-family: var(--f-title); font-size: 18px; }
.rk-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
#rkMap { position: relative; min-height: 0; } #rkMap svg { width: 100%; height: 100%; display: block; }
.rk-c { stroke: #3b2a1e; stroke-opacity: .25; stroke-width: 1; cursor: pointer; transition: fill .4s; } .rk-c:hover { filter: brightness(1.18); }
.rk-pulse { animation: hlPulse 1.2s ease-in-out infinite; } .rk-boom { animation: boom .9s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.rk-side { margin: 8px; padding: 12px; overflow-y: auto; min-height: 0; }
.rk-seat { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; background: rgba(0,0,0,.04); font-size: 13px; }
.rk-seat i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); } .rk-seat.cur { outline: 2px solid var(--c); background: rgba(232,200,114,.18); } .rk-seat.dead { opacity: .45; text-decoration: line-through; }
.rk-turn { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-left: 6px solid var(--c); background: rgba(0,0,0,.05); border-radius: 8px; margin: 8px 0; }
.rk-rules { font-size: 13px; padding-left: 18px; } .rk-rules li { margin: 3px 0; }
.rk-roll { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.05); text-align: center; animation: rise .3s; }
.rk-roll small { display: block; font-size: 11px; } .rk-roll p { width: 100%; margin: 2px 0 0; }
.die { font-size: 36px; line-height: 1; margin: 0 1px; } .die.a { color: #a8323e; } .die.d { color: #2a2a2a; }
.rk-win { text-align: center; padding: 10px; } .rk-win h3 { margin: 4px 0; font-family: var(--f-title); }
.rk-insp { margin-top: 10px; padding: 8px; border-radius: 8px; background: rgba(0,0,0,.05); font-size: 13px; }
.rk-h { margin: 12px 0 4px; font-size: 13px; }
#rkLog { max-height: 140px; overflow-y: auto; font-size: 12px; } #rkLog div { padding: 2px 0; border-bottom: 1px solid rgba(0,0,0,.06); } #rkLog .big { font-weight: 700; }
#rkChat { max-height: 110px; overflow-y: auto; font-size: 12px; } #rkChatIn { width: 100%; margin-top: 4px; }
@media (max-width: 800px) { #risk { height: auto; min-height: 100vh; } .rk-body { grid-template-columns: 1fr; } #rkMap { height: 55vh; } }

/* zengin harita efektleri */
.fx-arrow { stroke-dashoffset: 14; opacity: 0; animation: arrowFly .7s ease-in forwards; } @keyframes arrowFly { 0% { opacity: 1; stroke-dashoffset: 14; } 100% { opacity: .9; stroke-dashoffset: -260; } }
.fx-wing { transform-box: fill-box; transform-origin: bottom; animation: wing .25s ease-in-out infinite alternate; } @keyframes wing { to { transform: scaleY(-.6); } }
.fx-halo-late { animation: haloLate 1.4s 4s ease-out forwards; } @keyframes haloLate { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.fx-ring { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 1.6s ease-out forwards; } @keyframes ring { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; transform: scale(1.15); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
.fx-rays { transform-box: fill-box; transform-origin: center; opacity: 0; animation: rays 3.6s ease-out forwards; } @keyframes rays { 0% { opacity: 0; transform: scale(.2) rotate(0); } 25% { opacity: .9; } 100% { opacity: 0; transform: scale(1.3) rotate(60deg); } }
.fx-crown { transform-box: fill-box; transform-origin: center; opacity: 0; animation: crownUp 3.8s .2s ease-out forwards; } @keyframes crownUp { 0% { opacity: 0; transform: translateY(60px) scale(.4); } 25% { opacity: 1; transform: translateY(-30px) scale(1.15); } 80% { opacity: 1; transform: translateY(-40px) scale(1); } 100% { opacity: 0; transform: translateY(-60px) scale(1); } }
.fx-halfmast { animation: halfmast 2.4s .4s ease-in-out forwards; } @keyframes halfmast { to { transform: translateY(40px); } }
.fx-candle { opacity: 0; animation: lbl 4.6s .2s ease-out forwards; }
.fx-plant { transform-box: fill-box; transform-origin: bottom; opacity: 0; animation: plant 3.6s ease-out forwards; } @keyframes plant { 0% { opacity: 0; transform: translateY(-50px) rotate(-12deg); } 20% { opacity: 1; transform: translateY(0) rotate(4deg); } 30% { transform: rotate(-2deg); } 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-wave { transform-box: fill-box; transform-origin: center; animation: wave 1.8s ease-out forwards; } @keyframes wave { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(6); opacity: 0; } }
.fx-hammer { transform-box: fill-box; transform-origin: 70% 80%; opacity: 0; animation: hammer 1.6s ease-in-out forwards; } @keyframes hammer { 0% { opacity: 0; transform: rotate(-40deg); } 20% { opacity: 1; } 35%, 65% { transform: rotate(25deg); } 50%, 80% { transform: rotate(-30deg); } 100% { opacity: 0; transform: rotate(10deg); } }

.rk-arrow { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: rkArrow .5s ease-out forwards, fadeOut .6s 1s forwards; } @keyframes rkArrow { to { stroke-dashoffset: 0; } }
.rk-arrow[stroke-dasharray="6 14"] { stroke-dasharray: 6 14; stroke-dashoffset: 0; animation: trail .6s linear infinite, fadeOut .6s 1s forwards; }
.rk-hit { transform-box: fill-box; transform-origin: center; opacity: 0; animation: boom .8s .4s ease-out; }

/* Tiny Tiles karelik animasyonlar */
@keyframes sp4 { to { transform: translateX(-320px); } } @keyframes sp5 { to { transform: translateX(-400px); } } @keyframes sp8 { to { transform: translateX(-640px); } }
@keyframes sp9 { to { transform: translateX(-720px); } } @keyframes sp10 { to { transform: translateX(-800px); } }
.fx-show { opacity: 0; animation: fxShow .01s var(--d, 0s) forwards; } @keyframes fxShow { to { opacity: 1; } }
.res-ic { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; background-size: 400% 100%; background-position: 0 0; background-repeat: no-repeat; }
/* küçük taşmalar: süs çerçevesi yatay kaydırma çubuğu çıkarmasın */
.rk-side, .wn { overflow-x: hidden; }

@keyframes bt9 { to { transform: translateX(-576px); } }

/* Ortaçağ kalesi ve dalgalanan sancak */
@keyframes fl10 { to { transform: translateX(-1280px); } }
@keyframes flagBg { to { background-position: -640px 0; } }
.court-flag { position: absolute; width: 64px; height: 56px; background: url(/castle/flag_10f.png) 0 0 / 640px 56px no-repeat; animation: flagBg 1.1s steps(10) infinite; }
.court-hero { position: relative; text-align: center; margin: -4px 0 6px; } .court-hero img { width: 62%; max-width: 260px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); }
.court-hero .court-flag { left: calc(50% - 64px); top: -18px; }
.maint-castle { position: relative; width: 170px; margin: 0 auto 4px; } .maint-castle img { width: 170px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.maint-castle .court-flag { left: 14px; top: -34px; }

/* Armorial: armalar, mum mühürler, sancaklar */
.arm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 6px 0; }
.arm { padding: 3px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.35); cursor: pointer; }
.arm img { width: 100%; display: block; } .arm.on { outline: 3px solid #E8C872; background: rgba(232,200,114,.25); } .arm:disabled { opacity: .28; cursor: not-allowed; }
.arm:not(:disabled):hover { transform: translateY(-2px); }
#evSeal { position: absolute; right: 22px; top: 22px; width: 96px; height: 96px; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); animation: dcStamp .55s .35s cubic-bezier(.3,1.6,.5,1) both; z-index: 3; }
.event-win { position: relative; }
.dc-seal.wax { width: 92px; height: 92px; right: 8px; bottom: -34px; background: none; border: 0; box-shadow: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.lobby-banner { position: absolute; top: 8px; width: 74px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); transform-origin: top center; animation: bannerSway 5s ease-in-out infinite; z-index: 2; pointer-events: none; }
.lobby-banner.l { left: 22px; } .lobby-banner.r { right: 22px; animation-delay: -2.5s; }
@keyframes bannerSway { 50% { transform: rotate(2.5deg); } }
@media (max-width: 560px) { .lobby-banner { width: 38px; } .arm-grid { grid-template-columns: repeat(4, 1fr); } }

@keyframes fr16 { to { transform: translateX(-448px); } } @keyframes fg13 { to { transform: translateX(-234px); } }

/* Ay ışığı teması (Moonlit UI · Vesper): entrika ve gece olayları */
.event-win.moon { background: #201a29; color: #f5ead7; border: 48px solid transparent; border-image: url(/ui/moon/dialogue-compact.png) 96 fill / 48px stretch; box-shadow: 0 20px 60px rgba(0,0,0,.6); padding: 0; }
.event-win.moon::before, .event-win.moon::after { display: none; }
.event-win.moon .event-img { margin: -26px -26px 14px; border: 0; border-radius: 6px; overflow: hidden; }
.event-win.moon .ev-title { color: #d6b982; font-family: var(--f-title); letter-spacing: .06em; }
.event-win.moon .ev-text { color: #e9dcc6; }
.event-win.moon .ev-opt { color: #f5ead7; background: none; border: 25px solid transparent; border-width: 12px 22px; border-image: url(/ui/moon/choice-normal.png) 50 88 fill / 12px 22px stretch; border-radius: 0; padding: 8px 14px 8px 30px; box-shadow: none; }
.event-win.moon .ev-opt:hover:not(:disabled) { border-image-source: url(/ui/moon/choice-hover.png); transform: none; }
.event-win.moon .ev-opt:active:not(:disabled) { border-image-source: url(/ui/moon/choice-pressed.png); }
.event-win.moon .ev-opt:focus-visible { outline: none; border-image-source: url(/ui/moon/choice-focus.png); }
.event-win.moon .ev-opt:disabled { border-image-source: url(/ui/moon/choice-disabled.png); color: #796b86; }
.event-win.moon .ev-opt::before { display: none; }
.event-win.moon .ev-count, .event-win.moon .muted { color: #a697b5; }

/* el çizimi parşömen kurdele (Digital Graffiti · Ribbons 01) */
.ribbon { background: url(/art/ribbons/ribbon4.png) center / 100% 100% no-repeat; clip-path: none; border: 0; box-shadow: none; color: #4a2410; padding: 42px 64px 10px; line-height: 16px; font-size: 14px; text-shadow: 0 1px 0 rgba(255,240,200,.6); filter: drop-shadow(0 4px 5px rgba(0,0,0,.35)); }
.center-win .ribbon { margin: -18px auto 8px; }
#maint.banned .ribbon { background: url(/art/ribbons/ribbon4.png) center / 100% 100% no-repeat; color: #7a1020; }
.center-win .ribbon { margin: -24px auto 6px; } .center-win.maint-win .ribbon { margin: 24px auto 10px; }

@keyframes hb64 { to { transform: translateX(-6144px); } }
/* kırmızı uyarı nabzı: gölgeyi canlandırmak her karede yeniden çizim yaptırıyordu; saydamlık canlandırması ekran kartında ucuzdur */
.alert.sev-bad { animation: fade .3s; position: relative; }
.alert.sev-bad::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 10px rgba(194,64,76,.85); opacity: 0; pointer-events: none; animation: pulseGlow 2.4s ease-in-out infinite; will-change: opacity; }
@keyframes pulseGlow { 50% { opacity: 1; } }

.alert[data-alert="onb"] { border-color: #E8C872; box-shadow: 0 0 0 2px rgba(232,200,114,.35); }
.tips.onb li { align-items: flex-start; } .tips.onb small { color: var(--ink-soft); }

.secure-nag { display: grid; gap: 4px; padding: 10px 12px; margin: 0 0 10px; border: 2px solid #a8323e; border-radius: 10px; background: rgba(168,50,62,.08); font-size: 13px; }
.secure-nag b { color: #a8323e; } .secure-nag .btn { justify-self: start; }

/* mevsim tonu: haritanın üstünde durgun, çok hafif bir renk (animasyon yok, performansa yük değil) */
#map::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: background .8s; }
body[data-season="winter"] #map::after { background: rgba(225,235,250,.16); }
body[data-season="autumn"] #map::after { background: rgba(200,120,40,.07); }
body[data-season="summer"] #map::after { background: rgba(255,220,120,.05); }
#map { position: relative; }

/* hanedan destanı */
.saga { max-height: 76vh; overflow-y: auto; padding-right: 4px; }
.saga-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--gold-dk, #7d5f22); padding-bottom: 10px; }
.saga-crest { width: 76px; flex: none; } .saga-head small { text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); } .saga-head h2 { margin: 0; font-family: var(--f-title); color: #5E1624; } .saga-head p { margin: 2px 0 0; font-size: 13px; }
.saga-rulers { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; } .saga-r { flex: none; width: 86px; text-align: center; font-size: 12px; } .saga-r .pm { width: 72px; height: 88px; margin: 0 auto 4px; overflow: hidden; border-radius: 6px; border: 2px solid #C9A24A; } .saga-r b { display: block; }
.saga-ch h3 { font-family: var(--f-title); color: #5E1624; margin: 14px 0 4px; font-size: 16px; } .saga-ch h3 small { font-family: var(--f-body); color: var(--ink-soft); font-size: 12px; }
.saga-ch ul { list-style: none; padding: 0; margin: 0; } .saga-ch li { display: grid; grid-template-columns: 24px 44px 1fr; gap: 4px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed rgba(0,0,0,.1); } .saga-ch li.big { font-weight: 600; } .saga-ch time { color: #7d5f22; font-weight: 700; }
/* tarih videosu */
.tl canvas { width: 100%; height: auto; border-radius: 8px; border: 2px solid #C9A24A; background: #8fa7a0; }
.tl-bar { display: flex; gap: 8px; align-items: center; margin-top: 8px; } .tl-bar input[type=range] { flex: 1; } .tl-bar select { width: auto; margin: 0; }
.tl-top { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-top: 6px; } .tl-top i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.modal-win:has(.tl), .modal-win:has(.saga) { width: min(1150px, 96vw); }
.tl canvas { max-height: 62vh; width: auto; max-width: 100%; display: block; margin: 0 auto; }
