/* Kadim Taşlar Online — arayüz. Keçe, bakır, altın ve turkuaz: bozkır otağlarının renkleri. */
:root {
  --felt: #1d1410;
  --felt-2: #2a1c15;
  --felt-3: #3a271c;
  --ink: #f3e7cf;
  --ink-dim: #c9b897;
  --ink-mute: #8f7d62;
  --gold: #d9b25a;
  --gold-2: #f3d58a;
  --gold-dark: #8a6a2a;
  --red: #b0302f;
  --red-2: #e0524a;
  --teal: #2fa39a;
  --teal-2: #6fe0d2;
  --blue: #3c7be0;
  --hp: #d8343c;
  --mp: #3a78e6;
  --exp: #e8c25a;
  --ok: #7fe08a;
  --err: #ff7b6a;
  --r-siradan: #ddd5c3;
  --r-ozel: #6fc3ff;
  --r-nadir: #c58bff;
  --r-destansi: #ffb347;
  --r-efsanevi: #ff6450;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --font-title: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --slot: 44px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120c09; color: var(--ink); font-family: var(--font-ui); font-size: 14px; }
body { user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
canvas { display: block; }
#game, #scene { position: fixed; inset: 0; width: 100vw; height: 100vh; }
#scene { z-index: 1; }
/* gün ışığı tonu + kenar karartması: tuvalde değil, birleştiricide (compositor) çizilir */
#light { position: fixed; inset: 0; z-index: 1; pointer-events: none; background-image: radial-gradient(ellipse 75% 75% at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(20, 10, 4, .42) 100%); }
#game { z-index: 0; cursor: crosshair; }
button { font: inherit; color: inherit; }
input, select { font: inherit; }
[hidden] { display: none !important; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

/* ---------- ortak bileşenler ---------- */
.panel {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(217, 178, 90, .08), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--felt-2), var(--felt));
  border: 1px solid var(--gold-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 4px rgba(217, 178, 90, .10), var(--shadow);
  border-radius: 10px;
  padding: 14px 16px 16px;
}
.panel::before, .panel::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 34 34'%3E%3Cpath d='M3 31 V12 C3 6 7 3 13 3 H31' fill='none' stroke='%23d9b25a' stroke-width='2'/%3E%3Cpath d='M8 26 C8 18 10 12 16 11 C21 10 23 15 19 18 C16 20 13 17 15 15' fill='none' stroke='%23d9b25a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
  opacity: .9;
}
.panel::before { left: 4px; top: 4px; }
.panel::after { right: 4px; bottom: 4px; transform: rotate(180deg); }
.panel-title {
  font-family: var(--font-title); font-size: 17px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-2); text-align: center; margin: 0 26px 10px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(217, 178, 90, .25); text-shadow: 0 1px 0 #000;
}
.panel-close {
  position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-dark); background: rgba(0, 0, 0, .35); color: var(--gold-2); cursor: pointer; font-size: 16px; line-height: 1; z-index: 2;
}
.panel-close:hover { background: var(--red); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; min-height: 38px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--gold-dark); color: var(--ink);
  background: linear-gradient(180deg, #4a3222, #2c1d14);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .18), 0 2px 0 rgba(0, 0, 0, .5);
  font-weight: 600; letter-spacing: .03em; transition: filter .12s, transform .06s;
}
.btn:hover { filter: brightness(1.18); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.gold { background: linear-gradient(180deg, #d9b25a, #9b7430); color: #22150c; border-color: #f3d58a; text-shadow: 0 1px 0 rgba(255, 255, 255, .3); }
.btn.red { background: linear-gradient(180deg, #c23a35, #7d1e1c); border-color: #e0524a; }
.btn.teal { background: linear-gradient(180deg, #2fa39a, #1b6460); border-color: #6fe0d2; }
.btn.small { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12px; color: var(--ink-dim); letter-spacing: .06em; text-transform: uppercase; }
.input {
  width: 100%; padding: 10px 12px; border-radius: 7px; border: 1px solid #5a4330; color: var(--ink);
  background: rgba(0, 0, 0, .35); outline: none; user-select: text; -webkit-user-select: text;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 178, 90, .18); }
.msg-line { min-height: 20px; font-size: 13px; margin: 6px 0; }
.msg-line.err { color: var(--err); }
.msg-line.ok { color: var(--ok); }
.muted { color: var(--ink-mute); }
.gold-txt { color: var(--gold-2); }
.row { display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* ---------- açılış ekranları ---------- */
#screens { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; }
#screens > * { pointer-events: auto; }
.brand { text-align: center; margin-bottom: 14px; }
.brand h1 {
  margin: 0; font-family: var(--font-title); font-weight: 700; font-size: clamp(30px, 6vw, 54px); letter-spacing: .12em;
  background: linear-gradient(180deg, #fff1c4 10%, #e1b65a 55%, #8d6424 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .7)) drop-shadow(0 0 18px rgba(255, 170, 60, .25));
}
.brand .sub { font-family: var(--font-title); color: var(--ink-dim); letter-spacing: .3em; text-transform: uppercase; font-size: 12px; margin-top: 2px; }
.brand .runes { color: var(--gold); letter-spacing: .5em; opacity: .7; font-size: 13px; margin-top: 6px; }
.auth-card { width: min(380px, 92vw); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.auth-tabs button { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid #5a4330; background: rgba(0, 0, 0, .25); color: var(--ink-dim); cursor: pointer; font-weight: 600; }
.auth-tabs button.on { background: rgba(217, 178, 90, .18); color: var(--gold-2); border-color: var(--gold); }
.foot-note { margin-top: 10px; font-size: 11px; color: var(--ink-mute); text-align: center; }

.select-wrap { width: min(980px, 96vw); max-height: 96vh; overflow: auto; }
.char-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.char-card {
  position: relative; border: 1px solid #5a4330; border-radius: 10px; padding: 8px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, rgba(255, 220, 150, .05), rgba(0, 0, 0, .25));
  transition: border-color .15s, transform .15s;
}
.char-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.char-card.on { border-color: var(--gold-2); box-shadow: 0 0 0 2px rgba(243, 213, 138, .35), 0 0 30px rgba(243, 213, 138, .15); }
.char-card canvas { width: 100%; height: 190px; }
.char-card .nm { font-family: var(--font-title); font-size: 18px; color: var(--gold-2); }
.char-card .meta { font-size: 12px; color: var(--ink-dim); }
.char-card.new { display: grid; place-items: center; min-height: 250px; color: var(--ink-dim); font-family: var(--font-title); font-size: 18px; border-style: dashed; }
.char-card.new .plus { font-size: 48px; color: var(--gold); line-height: 1; }
.select-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.create-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }
.create-preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid #5a4330; min-height: 300px; background: #241811; }
.create-preview canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.create-preview .cap { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--font-title); font-size: 22px; color: var(--gold-2); text-shadow: 0 2px 4px #000; }
.opt-group { margin-bottom: 12px; }
.opt-group > .lbl { font-size: 12px; color: var(--ink-dim); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { flex: 1 1 0; min-width: 84px; padding: 9px 8px; border-radius: 7px; border: 1px solid #5a4330; background: rgba(0, 0, 0, .25); cursor: pointer; text-align: center; }
.opt b { display: block; font-family: var(--font-title); font-size: 15px; color: var(--ink); }
.opt span { font-size: 11px; color: var(--ink-mute); }
.opt.on { border-color: var(--gold); background: rgba(217, 178, 90, .16); }
.opt.on b { color: var(--gold-2); }
.class-desc { font-size: 13px; color: var(--ink-dim); min-height: 36px; margin: 4px 0 8px; line-height: 1.4; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; font-size: 13px; }
#hud .pe { pointer-events: auto; }
.hud-me { position: absolute; left: 12px; top: 10px; display: flex; gap: 8px; align-items: center; }
.hud-badge {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, #4b3020, #1b110c); border: 2px solid var(--gold); box-shadow: 0 0 0 2px #000, var(--shadow);
  font-family: var(--font-title); font-weight: 700; color: var(--gold-2); font-size: 18px;
}
.hud-badge small { position: absolute; bottom: -7px; font-size: 10px; background: #000; border: 1px solid var(--gold-dark); border-radius: 8px; padding: 0 5px; letter-spacing: .05em; }
.hud-bars { display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
.hud-name { font-family: var(--font-title); font-weight: 700; color: var(--ink); text-shadow: 0 1px 2px #000; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.hud-name .gold-txt { font-family: var(--font-ui); font-size: 12px; font-weight: 600; }
.bar { position: relative; height: 15px; border-radius: 8px; background: rgba(0, 0, 0, .65); border: 1px solid rgba(217, 178, 90, .45); overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.bar > i { position: absolute; inset: 0; transform-origin: left center; transition: transform .15s linear; }
.bar.hp > i { background: linear-gradient(180deg, #ff6a6a, var(--hp) 55%, #8a1218); }
.bar.mp > i { background: linear-gradient(180deg, #7fb0ff, var(--mp) 55%, #183c86); }
.bar.ward > i { background: linear-gradient(180deg, rgba(150, 255, 240, .85), rgba(47, 163, 154, .7)); }
.bar > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 1px #000, 0 0 3px #000; letter-spacing: .03em; }
.bar.thin { height: 9px; }
.bar.thin > span { display: none; }
.hud-buffs { display: flex; gap: 4px; margin-top: 2px; min-height: 18px; }
.buff { font-size: 10px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--gold-dark); background: rgba(0, 0, 0, .6); color: var(--gold-2); }
.buff.ward { color: var(--teal-2); border-color: var(--teal); }

.party-frames { position: absolute; left: 12px; top: 84px; display: flex; flex-direction: column; gap: 6px; }
.pf { width: 176px; padding: 5px 7px; border-radius: 7px; background: rgba(15, 9, 6, .72); border: 1px solid rgba(217, 178, 90, .3); }
.pf .pn { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 3px; }
.pf .pn b { font-weight: 700; }
.pf.leader .pn b::before { content: "★ "; color: var(--gold); }
.pf.far { opacity: .55; }
.pf .bar { height: 8px; margin-bottom: 2px; }
.pf .bar > span { display: none; }

.hud-top-right { position: absolute; right: 12px; top: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.minimap { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 0 3px #000, 0 0 0 5px rgba(217, 178, 90, .25), var(--shadow); overflow: hidden; background: #000; }
.minimap canvas { width: 100%; height: 100%; }
.mm-label { font-family: var(--font-title); font-size: 13px; color: var(--gold-2); text-shadow: 0 1px 2px #000; text-align: center; width: 168px; }
.mm-label small { display: block; font-family: var(--font-ui); color: var(--ink-dim); font-size: 10.5px; }
.tracker { width: 230px; background: linear-gradient(90deg, transparent, rgba(15, 9, 6, .75) 18%); padding: 6px 10px 8px 26px; border-radius: 6px; text-align: right; }
.tracker h4 { margin: 0 0 3px; font-family: var(--font-title); color: var(--gold-2); font-size: 13.5px; letter-spacing: .04em; }
.tracker .qd { color: var(--ink-dim); font-size: 12px; line-height: 1.35; }
.tracker .qp { color: var(--ok); font-weight: 700; font-size: 12px; margin-top: 3px; }
.tracker .qp.ready { color: var(--gold-2); }

.hud-bottom { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.expbar { width: min(560px, 60vw); height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .7); border: 1px solid rgba(217, 178, 90, .45); overflow: hidden; position: relative; }
.expbar > i { position: absolute; inset: 0; background: linear-gradient(180deg, #ffe39a, var(--exp), #8d6a20); transform-origin: left center; transition: transform .3s; }
.expbar > span { position: absolute; right: 6px; top: -15px; font-size: 10.5px; color: var(--ink-dim); text-shadow: 0 1px 2px #000; }
.skillbar { display: flex; gap: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(15, 9, 6, .78); border: 1px solid rgba(217, 178, 90, .4); box-shadow: var(--shadow); }
.sk {
  --cd: 0; position: relative; width: 52px; height: 52px; border-radius: 8px; border: 1px solid var(--gold-dark); overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, #3b2a1f, #120b08);
}
.sk img { width: 100%; height: 100%; display: block; }
.sk::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(0, 0, 0, .72) calc(var(--cd) * 1turn), transparent 0); pointer-events: none; }
.sk .key { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 800; color: var(--gold-2); text-shadow: 0 1px 2px #000; z-index: 2; }
.sk .cnt { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px #000; z-index: 2; }
.sk .cdt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; text-shadow: 0 1px 3px #000; z-index: 2; }
.sk.locked { filter: grayscale(1) brightness(.5); }
.sk.nomp { box-shadow: inset 0 0 0 2px rgba(58, 120, 230, .8); }
.sk.flash { animation: skflash .35s; }
@keyframes skflash { 0% { box-shadow: 0 0 0 3px var(--err); } 100% { box-shadow: 0 0 0 0 transparent; } }
.sk-sep { width: 1px; background: rgba(217, 178, 90, .25); margin: 4px 2px; }
.menu-btns { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 6px; }
.mbtn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--gold-dark); background: rgba(15, 9, 6, .8); cursor: pointer; display: grid; place-items: center; position: relative; }
.mbtn img { width: 30px; height: 30px; }
.mbtn:hover { border-color: var(--gold); background: rgba(60, 40, 25, .9); }
.mbtn .k { position: absolute; right: 2px; bottom: 0; font-size: 9px; color: var(--ink-mute); font-weight: 700; }
.mbtn .dot { position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--red-2); border: 2px solid #000; }

.announce { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; width: min(640px, 70vw); }
.ann {
  padding: 8px 22px; border-radius: 6px; text-align: center; font-family: var(--font-title); font-size: 15.5px; letter-spacing: .03em;
  background: linear-gradient(90deg, transparent, rgba(20, 12, 8, .88) 15%, rgba(20, 12, 8, .88) 85%, transparent);
  color: var(--gold-2); text-shadow: 0 1px 2px #000; animation: annIn .4s ease-out, annOut .6s ease-in 5.4s forwards;
}
.ann.up { color: #ffe9a8; text-shadow: 0 0 12px rgba(255, 200, 80, .7), 0 1px 2px #000; }
.ann.upfail { color: #ffb0a0; }
.ann.admin { color: var(--teal-2); }
.ann.boss { color: #ffcf7a; font-size: 17px; }
@keyframes annIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
@keyframes annOut { to { opacity: 0; transform: translateY(-6px); } }
.center-msg { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; pointer-events: auto; }
.death-card { padding: 22px 30px; }
.death-card h2 { margin: 0 0 6px; font-family: var(--font-title); color: var(--red-2); letter-spacing: .1em; }
.zone-title { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: zt 3.2s ease-out forwards; }
.zone-title b { display: block; font-family: var(--font-title); font-size: 38px; letter-spacing: .14em; color: var(--gold-2); text-shadow: 0 3px 0 #000, 0 0 30px rgba(255, 180, 70, .35); }
.zone-title span { color: var(--ink-dim); letter-spacing: .3em; font-size: 12px; text-transform: uppercase; }
@keyframes zt { 0% { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; transform: translate(-50%, 0); } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- sohbet ---------- */
.chat { position: absolute; left: 12px; bottom: 10px; width: min(380px, 34vw); pointer-events: auto; }
.chat-log { height: 150px; overflow-y: auto; padding: 6px 8px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, rgba(10, 6, 4, .25), rgba(10, 6, 4, .62)); font-size: 12.5px; line-height: 1.38; scrollbar-width: thin; user-select: text; -webkit-user-select: text; }
.chat-log div { text-shadow: 0 1px 2px #000; word-wrap: break-word; }
.chat-log .from { font-weight: 700; color: #f6d48e; cursor: pointer; }
.chat-log .c-p .from, .chat-log .c-p { color: #8ad7ff; }
.chat-log .c-w, .chat-log .c-w .from { color: #f0a0ff; }
.chat-log .c-sys { color: var(--ink-dim); font-style: italic; }
.chat-log .c-err { color: var(--err); }
.chat-log .c-ok { color: var(--ok); }
.chat-log .c-loot { color: #e8d39a; }
.chat-log .c-ann { color: var(--gold-2); }
.chat-log .adm { color: var(--teal-2); }
.chat-bar { display: flex; gap: 0; border-radius: 0 0 8px 8px; overflow: hidden; border: 1px solid rgba(217, 178, 90, .35); background: rgba(10, 6, 4, .85); }
.chat-bar select { background: transparent; border: 0; color: var(--gold-2); padding: 0 4px; font-size: 12px; font-weight: 700; outline: none; }
.chat-bar select option { background: #1d1410; }
.chat-bar input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 8px; outline: none; user-select: text; -webkit-user-select: text; }
.chat-bar .to { width: 74px; border-right: 1px solid rgba(217, 178, 90, .25); }
.chat.collapsed .chat-log { height: 64px; background: transparent; mask-image: linear-gradient(transparent, #000 40%); -webkit-mask-image: linear-gradient(transparent, #000 40%); }

/* ---------- pencereler ---------- */
#panels { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
#panels .win { position: absolute; pointer-events: auto; max-height: calc(100vh - 20px); overflow: auto; scrollbar-width: thin; }
.win.inv { right: 14px; top: 50%; transform: translateY(-50%); }
.win.left { left: 14px; top: 50%; transform: translateY(-50%); }
.win.center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.inv-body { display: flex; gap: 14px; }
.paperdoll { display: grid; grid-template-columns: var(--slot) 1fr var(--slot); grid-template-rows: repeat(5, var(--slot)); gap: 8px 8px; width: calc(var(--slot) * 2 + 120px); }
.paperdoll .slot.boots { justify-self: center; }
.paperdoll canvas { grid-column: 2; grid-row: 1 / span 4; width: 100%; height: 100%; border-radius: 8px; background: radial-gradient(circle at 50% 60%, rgba(217, 178, 90, .12), transparent 70%); }
.slot {
  position: relative; width: var(--slot); height: var(--slot); border-radius: 6px; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, rgba(255, 220, 160, .06), rgba(0, 0, 0, .45)); border: 1px solid #4b3828;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}
.slot img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); pointer-events: none; }
.slot .n { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px #000, 0 0 2px #000; pointer-events: none; }
.slot .pl { position: absolute; left: 3px; top: 1px; font-size: 10.5px; font-weight: 800; color: var(--gold-2); text-shadow: 0 1px 2px #000; pointer-events: none; }
.slot.eq .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; color: var(--ink-mute); text-align: center; line-height: 1.05; letter-spacing: .02em; pointer-events: none; }
.slot.r1 { border-color: rgba(111, 195, 255, .65); }
.slot.r2 { border-color: rgba(197, 139, 255, .75); box-shadow: inset 0 0 10px rgba(197, 139, 255, .25); }
.slot.r3 { border-color: rgba(255, 179, 71, .85); box-shadow: inset 0 0 12px rgba(255, 179, 71, .3); }
.slot.r4 { border-color: rgba(255, 100, 80, .9); box-shadow: inset 0 0 14px rgba(255, 100, 80, .35); }
.slot.hover, .slot.drop-ok { outline: 2px solid var(--gold-2); outline-offset: -1px; }
.slot.sel { outline: 2px solid var(--teal-2); outline-offset: -1px; }
.slot.dragging img { opacity: .3; }
.slot.target-pick { animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px rgba(111, 224, 210, .6); } }
.bag-grid { display: grid; grid-template-columns: repeat(8, var(--slot)); gap: 4px; }
.bag-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.bag-tabs button { flex: 1; padding: 6px 0; border-radius: 6px 6px 0 0; border: 1px solid #4b3828; border-bottom-color: transparent; background: rgba(0, 0, 0, .3); color: var(--ink-dim); cursor: pointer; font-family: var(--font-title); font-weight: 700; letter-spacing: .1em; }
.bag-tabs button.on { background: rgba(217, 178, 90, .16); color: var(--gold-2); border-color: var(--gold-dark); }
.bag-tabs button.drop-ok { background: rgba(111, 224, 210, .2); }
.bag-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; }
.coin { display: inline-flex; align-items: center; gap: 5px; color: var(--gold-2); font-weight: 700; }
.coin::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1b0, #d9a530 55%, #7a5310); box-shadow: 0 0 0 1px #4a3208; }
.hint { font-size: 11.5px; color: var(--ink-mute); }

#drag-ghost { position: fixed; z-index: 50; width: 48px; height: 48px; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .7)); }
#drag-ghost img { width: 100%; height: 100%; }
#tooltip {
  position: fixed; z-index: 60; max-width: 290px; min-width: 200px; pointer-events: none; padding: 10px 12px; border-radius: 8px;
  background: rgba(14, 9, 6, .96); border: 1px solid var(--gold-dark); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.42;
}
#tooltip.interactive { pointer-events: auto; }
.tt-name { font-family: var(--font-title); font-size: 15.5px; font-weight: 700; margin-bottom: 1px; }
.tt-sub { font-size: 11.5px; color: var(--ink-mute); margin-bottom: 6px; }
.tt-stat { color: var(--ink); }
.tt-bon { color: #8ee6a0; }
.tt-req { color: var(--ink-dim); font-size: 11.5px; margin-top: 4px; }
.tt-req.bad { color: var(--err); }
.tt-desc { color: var(--ink-dim); font-style: italic; margin-top: 4px; }
.tt-sep { height: 1px; background: rgba(217, 178, 90, .25); margin: 6px 0; }
.tt-val { color: var(--gold-2); font-size: 11.5px; margin-top: 4px; }
.tt-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 10px; align-items: center; min-width: 260px; }
.stat-grid .sn { font-family: var(--font-title); font-weight: 700; letter-spacing: .06em; }
.stat-grid .sv { text-align: right; font-weight: 700; color: var(--gold-2); min-width: 32px; }
.plus-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(217, 178, 90, .2); color: var(--gold-2); cursor: pointer; font-weight: 800; }
.plus-btn:disabled { opacity: .2; }
.derived { display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; margin-top: 12px; font-size: 12.5px; }
.derived span:nth-child(odd) { color: var(--ink-dim); }
.derived span:nth-child(even) { text-align: right; font-weight: 700; }

.skill-row { display: flex; gap: 10px; padding: 8px; border-radius: 8px; border: 1px solid #4b3828; margin-bottom: 8px; background: rgba(0, 0, 0, .2); width: 380px; max-width: 86vw; }
.skill-row img { width: 52px; height: 52px; border-radius: 8px; border: 1px solid var(--gold-dark); flex: none; }
.skill-row.locked { opacity: .55; }
.skill-row b { font-family: var(--font-title); color: var(--gold-2); font-size: 15px; }
.skill-row .sd { font-size: 12px; color: var(--ink-dim); line-height: 1.35; }
.skill-row .sm { font-size: 11px; color: var(--ink-mute); margin-top: 3px; }

.npc-dialog { width: min(520px, 94vw); }
.npc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.npc-head canvas { width: 86px; height: 86px; flex: none; border-radius: 50%; border: 2px solid var(--gold-dark); background: radial-gradient(circle, #3b2a1f, #120b08); }
.npc-head .nn { font-family: var(--font-title); font-size: 20px; color: var(--gold-2); }
.npc-head .nt { font-size: 12px; color: var(--ink-mute); letter-spacing: .1em; text-transform: uppercase; }
.npc-say { font-family: var(--font-title); font-style: italic; color: var(--ink); line-height: 1.5; font-size: 14.5px; padding: 8px 12px; border-left: 3px solid var(--gold-dark); background: rgba(0, 0, 0, .2); border-radius: 0 6px 6px 0; }
.quest-box { margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid #4b3828; background: rgba(0, 0, 0, .25); }
.quest-box h3 { margin: 0 0 4px; font-family: var(--font-title); color: var(--gold-2); font-size: 16px; }
.quest-box .rw { margin-top: 6px; font-size: 12px; color: var(--ink-dim); }
.quest-box .rw b { color: var(--gold-2); }
.quest-steps { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12.5px; }
.quest-steps li { padding: 3px 0; color: var(--ink-mute); }
.quest-steps li.done { color: var(--ok); text-decoration: line-through; text-decoration-color: rgba(127, 224, 138, .4); }
.quest-steps li.cur { color: var(--gold-2); font-weight: 700; }

.smith { width: min(640px, 96vw); }
.smith-body { display: grid; grid-template-columns: 230px 1fr; gap: 14px; }
.forge { position: relative; height: 230px; border-radius: 10px; overflow: hidden; border: 1px solid #4b3828; background: #120b08; }
.forge canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.forge .slot { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 60px; height: 60px; }
.forge .res { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--font-title); font-size: 22px; font-weight: 700; letter-spacing: .08em; text-shadow: 0 2px 4px #000; }
.res.success { color: var(--gold-2); }
.res.fail { color: var(--red-2); }
.res.protected { color: var(--teal-2); }
.up-info { font-size: 13px; line-height: 1.6; }
.up-info .big { font-family: var(--font-title); font-size: 20px; color: var(--gold-2); }
.up-info .chance { font-size: 26px; font-weight: 800; }
.chk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; border: 1px solid #4b3828; margin-top: 6px; cursor: pointer; background: rgba(0, 0, 0, .2); }
.chk input { width: 18px; height: 18px; accent-color: var(--gold); }
.chk img { width: 26px; height: 26px; }
.chk.dis { opacity: .45; }
.need { display: flex; align-items: center; gap: 6px; }
.need img { width: 22px; height: 22px; }
.need.bad { color: var(--err); }
.efsun-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(217, 178, 90, .25); }

.shop { width: min(560px, 96vw); }
.shop-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.shop-tabs button { flex: 1; padding: 7px; border-radius: 6px; border: 1px solid #4b3828; background: rgba(0, 0, 0, .3); color: var(--ink-dim); cursor: pointer; font-weight: 700; }
.shop-tabs button.on { color: var(--gold-2); border-color: var(--gold-dark); background: rgba(217, 178, 90, .16); }
.shop-list { display: flex; flex-direction: column; gap: 5px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.shop-item { display: flex; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 7px; border: 1px solid #3c2c20; background: rgba(0, 0, 0, .2); }
.shop-item img { width: 38px; height: 38px; }
.shop-item .nm { flex: 1; min-width: 0; }
.shop-item .nm b { display: block; font-size: 13.5px; }
.shop-item .nm small { color: var(--ink-mute); font-size: 11px; }
.qty { display: flex; align-items: center; gap: 2px; }
.qty button { width: 24px; height: 26px; border-radius: 5px; border: 1px solid #5a4330; background: rgba(0, 0, 0, .3); color: var(--ink); cursor: pointer; }
.qty input { width: 40px; text-align: center; padding: 4px; border-radius: 5px; border: 1px solid #5a4330; background: rgba(0, 0, 0, .35); color: var(--ink); }
.sell-zone { margin-top: 10px; padding: 10px; border-radius: 8px; border: 1px dashed var(--gold-dark); text-align: center; color: var(--ink-dim); font-size: 12.5px; }
.sell-zone.drop-ok { background: rgba(217, 178, 90, .12); border-color: var(--gold-2); }

.ctx-menu { position: fixed; z-index: 55; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 170px; }
.ctx-menu .ttl { font-family: var(--font-title); color: var(--gold-2); text-align: center; padding: 2px 0 4px; }
.modal-back { position: fixed; inset: 0; z-index: 54; background: rgba(0, 0, 0, .45); display: grid; place-items: center; pointer-events: auto; }
.modal { width: min(400px, 92vw); }
.modal p { line-height: 1.5; }

#toasts { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.toast { padding: 6px 14px; border-radius: 6px; background: rgba(14, 9, 6, .9); border: 1px solid var(--gold-dark); font-size: 13px; animation: annIn .25s, annOut .5s ease-in 2.6s forwards; }
.toast.err { color: var(--err); border-color: #7a2a22; }
.toast.ok { color: var(--ok); }

/* ---------- atlatıcı ---------- */
.atl { width: min(420px, 94vw); }
.atl-say { font-family: var(--font-title); font-style: italic; color: var(--ink-dim); margin: 0 0 10px; line-height: 1.45; }
.atl-list { display: flex; flex-direction: column; gap: 6px; }
.atl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid #4b3828; background: rgba(0, 0, 0, .22); }
.atl-row.here { border-color: rgba(111, 224, 210, .5); }
.atl-row.locked { opacity: .6; }
.atl-nm { flex: 1; min-width: 0; }
.atl-nm b { display: block; font-family: var(--font-title); color: #9fe8ff; font-size: 15px; }
.atl-nm small { color: var(--ink-mute); font-size: 11.5px; }
.atl-note { min-height: 1em; margin: 8px 0 0; font-size: 12px; color: var(--err); }

/* ---------- dokunmatik ---------- */
#touch { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.joy { position: absolute; left: 0; bottom: 0; width: 46vw; height: 70vh; pointer-events: auto; }
.joy-base { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(243, 213, 138, .45); background: radial-gradient(circle, rgba(0, 0, 0, .1), rgba(0, 0, 0, .38)); }
.joy-knob { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 236, 190, .9), rgba(217, 178, 90, .75) 60%, rgba(120, 85, 30, .8)); box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.tbtn { position: absolute; pointer-events: auto; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(243, 213, 138, .6); background: radial-gradient(circle at 50% 35%, rgba(70, 45, 28, .85), rgba(15, 9, 6, .85)); box-shadow: 0 3px 10px rgba(0, 0, 0, .6); overflow: hidden; --cd: 0; }
.tbtn::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(0, 0, 0, .7) calc(var(--cd) * 1turn), transparent 0); }
.tbtn img { width: 76%; height: 76%; pointer-events: none; }
.tbtn .cnt { position: absolute; bottom: 2px; right: 50%; transform: translateX(50%); font-size: 10px; font-weight: 800; z-index: 2; text-shadow: 0 1px 2px #000; }
.tbtn.pressed { filter: brightness(1.5); transform: scale(.94); }
.tbtn.locked { filter: grayscale(1) brightness(.5); }

/* Dokunmatik yerleşim: tüm ölçüler ekran YÜKSEKLİĞİNE göre (320–430 px yatay telefonlar dahil) ve
   çentik (safe-area) payları hesaba katılarak. Beceri düğmeleri saldırı düğmesinin çevresinde bir yay üzerinde,
   iksir/toplama düğmeleri dış yayda; hiçbir düğme diğerinin üstüne binmez. */
body.is-touch {
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --A: clamp(60px, 21vh, 104px);
  --K: clamp(40px, 14.2vh, 64px);
  --P: clamp(34px, 11.2vh, 52px);
  --mb: clamp(30px, 9.6vh, 44px);
  --mm: clamp(72px, 23vh, 150px);
  --meW: clamp(148px, 25vw, 250px);
  --bdg: clamp(34px, 11vh, 54px);
  --g: clamp(4px, 1.5vh, 9px);
  --R: calc(var(--A) / 2 + var(--K) / 2 + var(--g));
  --R2: calc(var(--R) + var(--K) / 2 + var(--P) / 2 + var(--g));
  --cxr: calc(12px + var(--sar) + var(--A) / 2);
  --cyb: calc(10px + var(--sab) + var(--A) / 2);
  --slot: clamp(28px, 9.4vh, 44px);
}
body.is-touch.fake-notch { --sal: 44px; --sar: 44px; --sab: 18px; } /* test: çentikli telefon benzetimi */
.is-touch .tbtn.atk { width: var(--A); height: var(--A); right: calc(var(--cxr) - var(--A) / 2); bottom: calc(var(--cyb) - var(--A) / 2); border-color: var(--gold-2); }
.is-touch .tbtn.s0, .is-touch .tbtn.s1, .is-touch .tbtn.s2 { width: var(--K); height: var(--K); }
.is-touch .tbtn.s0 { right: calc(var(--cxr) + var(--R) - var(--K) / 2); bottom: calc(var(--cyb) - var(--K) / 2); }
.is-touch .tbtn.s1 { right: calc(var(--cxr) + var(--R) * .7071 - var(--K) / 2); bottom: calc(var(--cyb) + var(--R) * .7071 - var(--K) / 2); }
.is-touch .tbtn.s2 { right: calc(var(--cxr) - var(--K) / 2); bottom: calc(var(--cyb) + var(--R) - var(--K) / 2); }
.is-touch .tbtn.p0, .is-touch .tbtn.p1, .is-touch .tbtn.pick { width: var(--P); height: var(--P); }
.is-touch .tbtn.p0 { right: calc(var(--cxr) + var(--R2) - var(--P) / 2); bottom: calc(var(--cyb) - var(--P) / 2); }
.is-touch .tbtn.p1 { right: calc(var(--cxr) + var(--R2) * .766 - var(--P) / 2); bottom: calc(var(--cyb) + var(--R2) * .643 - var(--P) / 2); }
.is-touch .tbtn.pick { right: calc(var(--cxr) + var(--R2) * .1736 - var(--P) / 2); bottom: calc(var(--cyb) + var(--R2) * .9848 - var(--P) / 2); }
.is-touch .joy { left: var(--sal); width: 44vw; height: 72vh; }

/* HUD (dokunmatik) */
.is-touch .hud-me { left: calc(8px + var(--sal)); top: calc(6px + var(--sat)); gap: 6px; width: var(--meW); }
.is-touch .hud-badge { width: var(--bdg); height: var(--bdg); font-size: calc(var(--bdg) * .36); flex: none; }
.is-touch .hud-badge small { font-size: 9px; bottom: -6px; }
.is-touch .hud-bars { min-width: 0; flex: 1; gap: 3px; }
.is-touch .hud-name { font-size: clamp(11px, 3.4vh, 14px); }
.is-touch .bar { height: clamp(10px, 3.4vh, 15px); }
.is-touch .bar > span { font-size: clamp(8.5px, 2.7vh, 10.5px); }
.is-touch .hud-buffs { min-height: 0; }
.is-touch .party-frames { left: calc(8px + var(--sal)); top: calc(var(--sat) + var(--bdg) + 22px); gap: 4px; }
.is-touch .pf { width: clamp(118px, 21vw, 176px); padding: 3px 6px; }
.is-touch .pf .pn { font-size: clamp(9.5px, 2.9vh, 11.5px); margin-bottom: 2px; }
.is-touch .pf .bar { height: 6px; }
.is-touch .hud-top-right { right: calc(8px + var(--sar)); top: calc(6px + var(--sat)); gap: 3px; max-width: calc(var(--mm) + 70px); }
.is-touch .minimap { width: var(--mm); height: var(--mm); }
.is-touch .mm-label { width: var(--mm); font-size: clamp(9.5px, 3vh, 13px); line-height: 1.15; }
.is-touch .mm-label small { font-size: clamp(8.5px, 2.6vh, 10.5px); }
.is-touch .tracker { width: auto; max-width: calc(var(--mm) + 64px); padding: 3px 7px 4px 18px; }
.is-touch .tracker h4 { font-size: clamp(10px, 3.1vh, 13.5px); }
.is-touch .tracker .qp { font-size: clamp(10px, 3vh, 12px); margin-top: 1px; }
.is-touch .skillbar, .is-touch .menu-btns .k { display: none; }
.is-touch .menu-btns {
  left: calc(10px + var(--sal) + var(--meW) + 10px); right: calc(10px + var(--sar) + var(--mm) + 14px);
  top: calc(6px + var(--sat)); bottom: auto; justify-content: center; gap: 4px; flex-wrap: nowrap;
}
.is-touch .mbtn { width: var(--mb); height: var(--mb); border-radius: 9px; flex: none; }
.is-touch .mbtn img { width: 68%; height: 68%; }
.more-menu { position: fixed; top: calc(var(--mb, 36px) + 12px + var(--sat, 0px)); left: 50%; transform: translateX(-50%); z-index: 56; display: flex; flex-direction: column; gap: 5px; padding: 8px; min-width: 180px; pointer-events: auto; }
.more-menu .btn { justify-content: flex-start; }
.more-menu img { width: 22px; height: 22px; }
.is-touch .hud-bottom { left: 0; right: 0; bottom: 0; transform: none; gap: 0; pointer-events: none; }
.is-touch .expbar { width: 100%; height: 4px; border-radius: 0; border-width: 1px 0 0; }
.is-touch .expbar > span { display: none; }
.is-touch .announce { top: calc(var(--mb) + 12px + var(--sat)); width: min(70vw, calc(100vw - 2 * (var(--meW) + 20px + max(var(--sal), var(--sar))))); }
.is-touch .ann { overflow-wrap: anywhere; }
.is-touch .ann { font-size: clamp(11.5px, 3.6vh, 15.5px); padding: 4px 12px; }
.is-touch .zone-title b { font-size: clamp(22px, 8vh, 38px); }
.is-touch #toasts, body.is-touch > #toasts { bottom: calc(14px + var(--sab)); max-width: calc(100vw - 2 * (var(--cxr) + var(--R2) + var(--P) / 2 + 12px)); }
.is-touch .toast { font-size: clamp(11px, 3.4vh, 13px); text-align: center; }
.is-touch .chat { display: none; }
.is-touch .chat.open { display: block; left: 50%; transform: translateX(-50%); top: calc(var(--mb) + 14px + var(--sat)); bottom: auto; width: min(420px, 62vw); z-index: 6; }
.is-touch .chat-log { height: clamp(70px, 26vh, 150px); font-size: clamp(10.5px, 3.2vh, 12.5px); }
.is-touch .center-msg { top: 45%; }

@media (max-height: 520px) { .is-touch .bag-foot .hint { display: none; } }
.bag-foot { padding-right: 22px; }
/* Pencereler (dokunmatik): yüksekliğe sığar, gerekirse kendi içinde kayar; kapatma düğmesi hep görünür */
.is-touch #panels .win { max-height: calc(100vh - 10px - var(--sat) - var(--sab)); max-width: calc(100vw - 12px - var(--sal) - var(--sar)); }
.is-touch .win.inv { right: calc(6px + var(--sar)); }
.is-touch .win.left { left: calc(6px + var(--sal)); }
.is-touch .panel-close { position: sticky; float: right; top: 0; margin: -6px -8px 0 6px; width: 32px; height: 32px; }
.is-touch .panel-title { margin-left: 32px; margin-right: 32px; }

/* ---------- yatay ekran uyarısı ---------- */
#rotate { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: radial-gradient(circle at 50% 40%, #3a271c, #0e0907); text-align: center; }
#rotate h2 { font-family: var(--font-title); color: var(--gold-2); letter-spacing: .1em; margin: 18px 0 6px; }
#rotate p { color: var(--ink-dim); margin: 0; }
.rotate-phone { width: 70px; height: 120px; margin: 0 auto; border: 4px solid var(--gold); border-radius: 14px; position: relative; animation: rot 2.2s ease-in-out infinite; }
.rotate-phone::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 14px; height: 4px; margin-left: -7px; border-radius: 2px; background: var(--gold); }
@keyframes rot { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (max-width: 900px) {
  #rotate { display: grid; }
}

/* ---------- küçük ekranlar (telefon yatay) ---------- */
@media (max-height: 520px) {
  :root { --slot: 36px; }
  .paperdoll canvas { min-height: 0; }
  body { font-size: 12.5px; }
  .hud-me { left: calc(8px + env(safe-area-inset-left)); top: 6px; }
  .hud-badge { width: 42px; height: 42px; font-size: 15px; }
  .hud-bars { min-width: 160px; }
  .bar { height: 12px; }
  .minimap { width: 112px; height: 112px; }
  .mm-label { width: 112px; font-size: 11px; }
  .hud-top-right { right: calc(8px + env(safe-area-inset-right)); top: 6px; gap: 4px; }
  .tracker { width: 190px; padding: 4px 8px 5px 20px; }
  .tracker h4 { font-size: 12px; }
  .tracker .qd { display: none; }
  .party-frames { top: 68px; }
  .pf { width: 140px; padding: 3px 6px; }
  .hud-bottom { bottom: 4px; }
  .expbar { width: 40vw; height: 6px; }
  .chat { width: min(300px, 36vw); bottom: auto; top: 112px; }
  .chat-log { height: 110px; font-size: 11.5px; }
  .panel { padding: 10px 12px 12px; }
  .panel-title { font-size: 14px; margin-bottom: 6px; padding-bottom: 5px; }
  .paperdoll { gap: 5px; width: calc(var(--slot) * 2 + 80px); }
  .bag-grid { gap: 3px; }
  .win.inv { right: 6px; }
  .announce { top: 44px; }
  .ann { font-size: 13px; padding: 5px 14px; }
  .zone-title b { font-size: 26px; }
  .smith-body { grid-template-columns: 180px 1fr; }
  .forge { height: 190px; }
  .shop-list { max-height: 180px; }
  .create-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .create-preview { min-height: 220px; }
  .char-card canvas { height: 130px; }
  .char-card.new { min-height: 180px; }
  .brand h1 { font-size: 30px; }
  .brand { margin-bottom: 6px; }
  .auth-card .field { margin-bottom: 6px; }
  .input { padding: 7px 10px; }
  .select-wrap { padding: 10px; }
}

/* Dokunmatik: pencereler kaydırma kabı olduğu için tarayıcının kaydırma hareketini burada da kapat;
   aksi hâlde uzun basıp sürüklerken pointercancel gelir. Uzun listeler yalnız dikey kayar. */
#panels .win, .slot, .bag-grid, .paperdoll, .forge, #touch, .tbtn, .joy { touch-action: none; }
.shop-list, .chat-log { touch-action: pan-y; }
