/* Küllerin Tahtı — mobil öncelikli arayüz. Piksel sanat oyun dünyası + koyu kül tonlu paneller. */
:root {
  --bg: #1d1b22;
  --panel: #262330;
  --panel-2: #312c3c;
  --line: #4a4356;
  --ink: #f3efe6;
  --muted: #b9b2c6;
  --gold: #f2c14e;
  --ember: #e8542a;
  --teal: #38b2a3;
  --ok: #7bc043;
  --bad: #e15b5b;
  --display: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --nav-h: 62px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; overscroll-behavior: none; }
button { font-family: inherit; color: inherit; }
b { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; image-rendering: crisp-edges; image-rendering: pixelated; background: #2f6f8a; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }

/* ---------- Üst HUD */
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 5px; padding: calc(6px + var(--sat)) 8px 4px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.hud-top::-webkit-scrollbar { display: none; }
.res { display: flex; align-items: center; gap: 4px; background: rgba(18, 16, 24, .88); border: 2px solid var(--line); border-radius: 8px; padding: 3px 8px 3px 4px; font-size: 13px; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.res.trophy { border-color: #6b5a2c; }
.res .crown { font-size: 13px; margin-right: 2px; }
.spacer { flex: 1 1 auto; }
.ric { width: 20px; height: 20px; display: inline-block; background-size: contain; background-repeat: no-repeat; background-position: center; image-rendering: pixelated; flex: 0 0 auto; }
.ric-gold { background-image: url(../assets/ts/ui_elements/ui_elements/icons/icon_03.png); }
.ric-wood { background-image: url(../assets/ts/ui_elements/ui_elements/icons/icon_02.png); }
.ric-meat { background-image: url(../assets/ts/ui_elements/ui_elements/icons/icon_04.png); }
.ric-faith { background: radial-gradient(circle at 50% 25%, #ffe680 0 22%, #ffb347 23% 40%, transparent 41%), linear-gradient(#f7f1dc, #f7f1dc) 50% 70% / 30% 55% no-repeat; }
.ric-essence { background: linear-gradient(135deg, #e9d5ff, #c084fc 45%, #7c3aed); clip-path: polygon(50% 5%, 92% 45%, 50% 95%, 8% 45%); }
.ric-trophy { background: radial-gradient(circle at 50% 35%, #f2c14e 0 45%, transparent 46%), linear-gradient(#f2c14e, #f2c14e) 50% 88% / 60% 18% no-repeat; }
.view-title { position: absolute; top: calc(44px + var(--sat)); left: 8px; font-family: var(--display); font-size: 18px; letter-spacing: .5px; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.6); pointer-events: none !important; }
.builders { position: absolute; top: calc(44px + var(--sat)); right: 8px; background: rgba(18,16,24,.85); border: 2px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.conn { position: absolute; top: calc(72px + var(--sat)); left: 50%; transform: translateX(-50%); background: rgba(225, 91, 91, .9); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: 12px; }

.ctx-buttons { position: absolute; left: 8px; right: 8px; bottom: calc(var(--nav-h) + var(--sab) + 10px); display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; pointer-events: none !important; }
.ctx-buttons > * { pointer-events: auto; }

/* ---------- Alt gezinme */
.nav { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); display: flex; background: linear-gradient(#2b2735, #1f1c26); border-top: 3px solid #4a4356; }
.nav button { flex: 1; background: none; border: 0; border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); position: relative; padding: 4px 0; }
.nav button:last-child { border-right: 0; }
.nav button .ic { font-size: 20px; line-height: 1; filter: grayscale(.4) brightness(.9); }
.nav button.active { color: var(--gold); background: rgba(242,193,78,.08); }
.nav button.active .ic { filter: none; }
.nav .badge { position: absolute; top: 4px; right: 14%; background: var(--ember); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; }
.fab { position: absolute; right: 10px; bottom: calc(var(--nav-h) + var(--sab) + 12px); width: 62px; height: 62px; border-radius: 50%; border: 3px solid #6b5a2c; background: radial-gradient(circle at 35% 30%, #f7d77a, #d9a441 60%, #8a6a1e); color: #2a1f08; font-size: 20px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.5); font-weight: 700; }
.fab span { font-size: 10px; margin-top: 1px; }
.fab:active { transform: scale(.95); }

/* ---------- Panel (bottom sheet) */
.panel { position: absolute; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab)); max-height: 58vh; background: var(--panel); border-top: 3px solid var(--line); border-radius: 14px 14px 0 0; display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.45); }
.panel.tall { max-height: 78vh; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
#panel-title { font-family: var(--display); font-size: 19px; letter-spacing: .3px; }
.xbtn { background: var(--panel-2); border: 2px solid var(--line); color: var(--ink); width: 34px; height: 34px; border-radius: 8px; font-size: 16px; }
.panel-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px calc(12px + var(--sab)); touch-action: pan-y; }
.panel-body p { margin: 4px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tag { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 12px; }
.tag.tier { border-color: #6b5a2c; color: var(--gold); }

.btn { background: linear-gradient(#4b4459, #352f3d); border: 2px solid var(--line); border-bottom-width: 4px; color: var(--ink); border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; justify-content: center; min-height: 40px; }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn.primary { background: linear-gradient(#5aa6e6, #3d7dca); border-color: #23508a; color: #fff; }
.btn.gold { background: linear-gradient(#f7d77a, #d9a441); border-color: #8a6a1e; color: #2a1f08; }
.btn.danger { background: linear-gradient(#e87272, #c94a4a); border-color: #8f2a2a; color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; min-height: 34px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; filter: grayscale(.5); }
.cost { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; }
.cost.lack { color: var(--bad); }
.cost .ric { width: 16px; height: 16px; }
.costs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Kartlar (inşa menüsü, ordu) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.card { background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.card.locked { opacity: .55; }
.card.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.25) inset; }
.card canvas { width: 100%; height: auto; aspect-ratio: 5 / 3; image-rendering: pixelated; background: radial-gradient(ellipse at 50% 80%, rgba(255,255,255,.06), rgba(0,0,0,.25)); border-radius: 8px; display: block; }
.card .name { font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; gap: 4px; letter-spacing: .01em; }
.card .name .lvl { color: var(--gold); font-size: 12px; font-weight: 800; }
.card .desc { font-size: 12px; color: var(--muted); line-height: 1.35; min-height: 28px; font-weight: 500; }
.panel-body p { font-weight: 500; }
.stats div span:first-child { color: var(--muted); font-weight: 600; }
.btn { font-weight: 800; letter-spacing: .01em; }
.nav button span:last-child { font-weight: 700; }
.res b { font-weight: 800; }
.card .count { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 700; }
/* bina paneli: şimdiki / sonraki seviye önizlemeleri */
.prev-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.prev-card { flex: 1; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; padding: 6px; font-weight: 700; }
.prev-card.next { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.2) inset; }
.prev-card canvas { width: 100%; height: auto; aspect-ratio: 5 / 3; image-rendering: pixelated; background: radial-gradient(ellipse at 50% 80%, rgba(255,255,255,.06), rgba(0,0,0,.25)); border-radius: 8px; display: block; }
.prev-arrow { color: var(--gold); font-size: 22px; font-weight: 900; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 12px; font-size: 13px; margin: 6px 0; }
.stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,.08); padding: 2px 0; }
.stats div span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.stats .up { color: var(--ok); font-size: 11px; margin-left: 4px; }
.progress { height: 10px; background: rgba(0,0,0,.4); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, #7bc043, #38b2a3); }
.qlist { display: flex; gap: 6px; flex-wrap: wrap; }
.qitem { background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.qitem button { background: none; border: 0; color: var(--bad); font-weight: 700; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { background: var(--panel-2); border: 0; width: 34px; height: 34px; font-size: 18px; font-weight: 700; }
.stepper span { width: 36px; text-align: center; font-weight: 700; }
.lb { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb td { padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.lb .rank { width: 26px; color: var(--muted); font-weight: 700; }
.lb .av { width: 34px; height: 34px; image-rendering: pixelated; border-radius: 6px; background: rgba(0,0,0,.3); }
.lb .me { background: rgba(242,193,78,.08); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #666; margin-right: 4px; }
.dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.color-chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.4); }
.log { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.log div { background: rgba(0,0,0,.25); padding: 5px 8px; border-radius: 6px; border-left: 3px solid var(--line); }
.log div.win { border-left-color: var(--ok); }
.log div.loss { border-left-color: var(--bad); }

/* Sohbet */
.chat-list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; max-height: 40vh; overflow-y: auto; }
.chat-list .m { padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.2); line-height: 1.35; word-break: break-word; }
.chat-list .m.sys { color: var(--muted); font-style: italic; background: transparent; }
.chat-list .m b { margin-right: 4px; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input { flex: 1; background: rgba(0,0,0,.35); border: 2px solid var(--line); color: var(--ink); border-radius: 8px; padding: 9px 10px; font-size: 14px; }

/* ---------- Savaş HUD */
.battle-hud { position: absolute; inset: 0; pointer-events: none !important; }
.battle-hud > * { pointer-events: auto; }
.bh-top { position: absolute; top: calc(6px + var(--sat)); left: 8px; right: 8px; display: flex; gap: 8px; align-items: center; background: rgba(18,16,24,.85); border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.bh-timer { font-family: var(--display); font-size: 24px; min-width: 60px; color: var(--gold); text-align: center; }
.bh-mid { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bh-names { font-size: 12px; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-bar { position: relative; height: 16px; background: rgba(0,0,0,.5); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.bh-fill { height: 100%; width: 0; background: linear-gradient(90deg, #e8542a, #f2c14e); transition: width .3s; }
.bh-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; font-weight: 700; line-height: 16px; }
.bh-stars { font-size: 20px; color: var(--gold); letter-spacing: 2px; }
.bh-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 8px calc(8px + var(--sab)); background: linear-gradient(transparent, rgba(18,16,24,.9) 30%); display: flex; gap: 8px; align-items: flex-end; }
.bh-tray { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.bh-tray::-webkit-scrollbar { display: none; }
.tray-item { flex: 0 0 auto; width: 66px; height: 74px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px; position: relative; font-size: 10px; color: var(--muted); }
.tray-item canvas { width: 44px; height: 44px; image-rendering: pixelated; }
.tray-item .n { position: absolute; top: 3px; right: 5px; font-weight: 700; font-size: 13px; color: var(--ink); }
.tray-item.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.3) inset; }
.tray-item.spell { border-color: #4b3b7a; background: linear-gradient(#3a2f5c, #2a2342); }
.tray-item.spell.sel { border-color: #c084fc; }
.tray-item.empty { opacity: .35; }
.tray-item .cd { position: absolute; inset: 0; background: rgba(0,0,0,.6); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; }
.bh-actions { display: flex; flex-direction: column; gap: 6px; }
.bh-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--sab)); background: rgba(18,16,24,.8); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--muted); white-space: nowrap; pointer-events: none !important; }

/* ---------- Savaş girişi */
.intro { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at center, rgba(20,16,30,.92), rgba(10,8,14,.98)); animation: introIn .35s ease-out; }
.intro.out { animation: introOut .4s ease-in forwards; }
.intro-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: slideIn .5s ease-out; }
.intro-side img { width: 96px; height: 128px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.7)); }
.intro-name { font-family: var(--display); font-size: 20px; text-align: center; max-width: 150px; text-wrap: balance; }
.intro-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.intro-vs { font-size: 44px; line-height: 1; filter: drop-shadow(0 0 12px rgba(232,84,42,.8)); animation: pulse 1s infinite; }
.intro-title { font-family: var(--display); font-size: 22px; color: var(--gold); letter-spacing: .06em; text-shadow: 0 2px 0 #6b3a1a; text-align: center; }
.intro-count { font-family: var(--display); font-size: 34px; color: #fff; }
@keyframes introIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes introOut { to { opacity: 0; } }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .intro, .intro-side, .intro-vs { animation: none !important; } }

/* ---------- Modal */
.modal { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: var(--panel); border: 3px solid var(--line); border-radius: 14px; padding: 18px; width: min(420px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-card h2 { font-family: var(--display); margin: 0 0 6px; font-size: 26px; }
.br-stars { font-size: 34px; color: var(--gold); letter-spacing: 4px; margin-bottom: 8px; text-shadow: 0 0 12px rgba(242,193,78,.5); }
#br-body { font-size: 14px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
#br-body b { color: var(--ink); }

/* ---------- Toast */
.toast { position: absolute; left: 50%; top: calc(110px + var(--sat)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none !important; }
.toast div { background: rgba(18,16,24,.92); border: 2px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; animation: toast .25s ease-out; max-width: 86vw; text-align: center; }
.toast div.err { border-color: var(--bad); color: #ffb3b3; }
.toast div.ok { border-color: var(--ok); }
@keyframes toast { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Giriş */
.login { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 20%, #3a2f45, #1d1b22 60%, #121016); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; touch-action: pan-y; }
.login-card { width: min(400px, 100%); background: rgba(38,35,48,.92); border: 3px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.logo { text-align: center; margin-bottom: 10px; }
.logo-kicker { color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.logo h1 { font-family: var(--display); font-size: 44px; line-height: .95; margin: 4px 0 6px; color: var(--gold); text-shadow: 0 3px 0 #6b3a1a, 0 0 24px rgba(232,84,42,.45); letter-spacing: 1px; }
.logo h1.logo-name { font-size: 40px; text-transform: none; letter-spacing: 0; }
.logo h1.logo-name span { color: #f7e27a; }
.res.kh { border-color: #7a5a8a; background: linear-gradient(#2d2438, #1a1522); color: var(--ink); cursor: pointer; }
.res.kh.mine { border-color: var(--gold); }
.kh-bar { height: 12px; background: rgba(0,0,0,.4); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.kh-bar > div { height: 100%; background: linear-gradient(90deg, #c084fc, #f7e27a); }
.kh-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.kh-hero canvas { width: 72px; height: 90px; image-rendering: pixelated; background: radial-gradient(circle at 50% 30%, #3a2f50, #1d1826); border-radius: 12px; border: 2px solid #7a5a8a; }
.kh-hero .hn { font-family: var(--display); font-size: 20px; color: #f7e27a; }
.logo-sub { color: var(--muted); font-size: 12px; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: .3px; }
.field input { width: 100%; background: rgba(0,0,0,.35); border: 2px solid var(--line); color: var(--ink); border-radius: 10px; padding: 11px 12px; font-size: 16px; -webkit-user-select: text; user-select: text; }
.field input:focus { outline: none; border-color: var(--gold); }
.colors { display: flex; gap: 6px; }
.colors button { flex: 1; background: var(--c); border: 3px solid rgba(0,0,0,.35); border-radius: 10px; height: 40px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; opacity: .7; }
.colors button.sel { opacity: 1; border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
#login-preview { display: block; margin: 6px auto; width: 192px; height: 96px; image-rendering: pixelated; }
.sigils { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; touch-action: pan-x; }
.sigils::-webkit-scrollbar { display: none; }
.sigils button { flex: 0 0 auto; width: 62px; height: 86px; padding: 0; border-radius: 8px; border: 2px solid var(--line); background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45)) center / 78% no-repeat; background-blend-mode: normal; opacity: .8; transition: transform .12s, opacity .12s; }
.sigils button:hover { opacity: 1; transform: translateY(-2px); }
.banner-img { width: 40px; height: 54px; object-fit: contain; flex: 0 0 auto; }
.av-wrap { display: inline-flex; gap: 3px; align-items: center; }
.av-wrap .banner-mini { width: 22px; height: 30px; object-fit: contain; background: none; border-radius: 0; }
.sigils button.sel { border-color: var(--gold); opacity: 1; transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 2px rgba(242,193,78,.35), 0 6px 14px rgba(0,0,0,.4); }
.av { image-rendering: pixelated; }
.house-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.house-line img { width: 44px; height: 44px; border-radius: 8px; background: rgba(0,0,0,.3); image-rendering: pixelated; }
.house-line .hn { font-family: var(--display); font-size: 18px; }
.house-line .mt { font-size: 12px; color: var(--muted); font-style: italic; }
.titles { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.titles span { background: linear-gradient(#5a4a1e, #3d3212); border: 1px solid #8a6a1e; color: var(--gold); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; }
.login-actions { display: flex; gap: 8px; margin-top: 8px; }
.login-actions .btn { flex: 1; }
.login-msg { min-height: 18px; margin-top: 8px; font-size: 13px; color: var(--bad); text-align: center; }
.login-foot { margin-top: 10px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; }

/* Lord sınıfı seçimi ve portreler (KayKit Adventurers 3D render) */
.heroes { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; touch-action: pan-x; }
.heroes::-webkit-scrollbar { display: none; }
.heroes button { flex: 0 0 auto; width: 64px; height: 76px; padding: 0; border-radius: 10px; border: 3px solid var(--line); background: radial-gradient(circle at 50% 30%, #3a3450, #221f2b) center / 100% no-repeat; opacity: .75; position: relative; }
.heroes button img { width: 100%; height: 58px; object-fit: contain; display: block; margin-top: 2px; }
.heroes button span { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 9px; font-weight: 700; color: var(--ink); }
.heroes button.sel { border-color: var(--gold); opacity: 1; box-shadow: 0 0 0 2px rgba(242,193,78,.3); }
.portrait { width: 56px; height: 56px; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #3a3450, #221f2b); object-fit: contain; border: 2px solid var(--line); flex: 0 0 auto; }
.portrait.big { width: 84px; height: 84px; }

/* Savaş tepkileri */
.bh-react { position: absolute; right: 8px; bottom: calc(96px + var(--sab)); display: flex; flex-direction: column; gap: 4px; }
.bh-react button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: rgba(18,16,24,.85); font-size: 20px; line-height: 1; padding: 0; }
.bh-react button:active { transform: scale(.9); }
.bh-float { position: absolute; left: 0; right: 0; top: calc(70px + var(--sat)); bottom: 120px; pointer-events: none !important; overflow: hidden; }
.bh-float .fe { position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center; animation: floatUp 2.6s ease-out forwards; }
.bh-float .fe b { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.bh-float .fe span { font-size: 11px; font-weight: 700; background: rgba(18,16,24,.8); border-radius: 6px; padding: 1px 6px; margin-top: 2px; white-space: nowrap; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bh-float .fe { animation-duration: .8s; } }
/* eylemli toast */
.toast div.action { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.toast div.action button { background: linear-gradient(#f7d77a, #d9a441); border: 2px solid #8a6a1e; color: #2a1f08; border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13px; }
.brstats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; text-align: left; font-size: 13px; margin: 8px 0; }
.brstats div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,.1); padding: 2px 0; }
.brstats div span:last-child { color: var(--ink); font-weight: 700; }

@media (min-width: 700px) {
  .panel { left: auto; right: 12px; width: 420px; bottom: calc(var(--nav-h) + var(--sab) + 10px); border-radius: 14px; border: 3px solid var(--line); max-height: 70vh; }
  .nav { left: 50%; transform: translateX(-50%); width: 560px; border-radius: 14px 14px 0 0; border: 3px solid var(--line); border-bottom: 0; }
  .fab { right: 20px; }
}

/* İlk adımlar rehberi */
.guide { position: absolute; top: calc(78px + var(--sat)); left: 8px; width: min(240px, 60vw); background: rgba(18,16,24,.9); border: 2px solid var(--line); border-radius: 10px; padding: 6px 8px 4px; font-size: 13px; z-index: 5; }
.guide .gh { display: flex; align-items: center; justify-content: space-between; font-weight: 800; color: var(--gold); letter-spacing: .3px; margin-bottom: 4px; }
.guide .gh button { background: none; border: 0; color: var(--muted); font-size: 15px; padding: 0 2px; cursor: pointer; }
.guide .gs { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; cursor: pointer; line-height: 1.25; }
.guide .gs.done { color: var(--muted); text-decoration: line-through; }
.guide .gs.next { background: rgba(242,193,78,.14); border: 1px solid rgba(242,193,78,.5); animation: guide-pulse 1.6s ease-in-out infinite; }
.guide .gs .ck { width: 16px; text-align: center; flex: none; }
.guide .gr { font-size: 11px; color: var(--muted); padding: 3px 4px 0; }
@keyframes guide-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,193,78,0);} 50% { box-shadow: 0 0 8px 1px rgba(242,193,78,.35);} }
@media (prefers-reduced-motion: reduce) { .guide .gs.next { animation: none; } }
body.guide-on .toast { top: calc(300px + var(--sat)); }
/* Ejderha element resimleri (Dragons Pack) */
.card .elem { position: absolute; top: 6px; left: 6px; width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 6px var(--ec, #ff6a2a)); pointer-events: none; }
.elem-card { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--ec, #ff6a2a); background: linear-gradient(135deg, rgba(0,0,0,.35), rgba(0,0,0,.15)); box-shadow: inset 0 0 24px -12px var(--eg, #ffb347); }
.elem-card img { width: 72px; height: 72px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 8px var(--ec, #ff6a2a)); flex: none; }
.elem-card .en { font-weight: 800; color: var(--eg, #ffb347); }
/* Ses ayarı satırları */
.vol-row { display: grid; grid-template-columns: 78px 1fr 44px; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.vol-row input[type=range] { width: 100%; accent-color: var(--gold); }
.vol-row .vv { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }
.tray-empty { display: flex; align-items: center; padding: 0 14px; font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; min-height: 64px; }

/* Hane onayı bekleme ekranı */
.pending { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10,9,14,.92); backdrop-filter: blur(3px); }
.pending-card { max-width: 380px; text-align: center; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; padding: 26px 22px; box-shadow: 0 18px 48px rgba(0,0,0,.5); }
.pending-card h2 { margin: 6px 0 10px; color: var(--gold); }
.pending-card p { color: var(--muted); line-height: 1.45; }
.pending-icon { font-size: 44px; animation: pending-pulse 2s ease-in-out infinite; }
.pending-house { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; }
.pending-house img { width: 54px; height: 72px; image-rendering: pixelated; }
.pending-house b { font-size: 16px; }
@keyframes pending-pulse { 0%,100% { opacity: .55; transform: scale(1);} 50% { opacity: 1; transform: scale(1.08);} }

/* Garnizon paneli satırları */
.grow-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.grow-row:last-child { border-bottom: 0; }
