:root {
  --navy: #1b2340; --navy2: #243056; --navy3: #2f3d6b; --ink: #1d1a16;
  --parch: #f6ecd6; --parch2: #ecdcb8; --parch3: #dcc596; --line: #b8955a;
  --gold: #f2c14e; --gold2: #d99a1e; --red: #e0504a; --blue: #4d8fe6; --green: #58b368; --violet: #9b7ae8;
  --text: #2b2418; --muted: #7a6a52; --white: #fffaf0;
  --r-common: #d7d0c2; --r-uncommon: #7bd88f; --r-rare: #6db3ff; --r-epic: #c58bff; --r-legendary: #ffb347;
  --shadow: 0 6px 24px rgba(10, 12, 30, .45);
  --font-px: 'Pixelify Sans', system-ui, sans-serif;
  --font: 'Nunito', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f1426; color: var(--text); font-family: var(--font); font-size: 14px; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }

/* ---------- buttons & form ---------- */
.btn { border: 2px solid #0e1430; background: linear-gradient(#3a5fb8, #26448f); color: #fff; font-weight: 800; padding: 9px 16px; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 0 #0e1430; font-size: 14px; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.btn:disabled { filter: grayscale(.7) brightness(.8); cursor: not-allowed; }
.btn.gold { background: linear-gradient(#ffd66b, #e9a321); color: #3a2605; border-color: #5a3a06; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #5a3a06; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); box-shadow: none; }
.btn.red { background: linear-gradient(#ef6b62, #c53b35); border-color: #5a1210; }
.btn.green { background: linear-gradient(#6fcf7f, #3f9a52); border-color: #174a22; }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.big { padding: 13px 22px; font-size: 17px; width: 100%; font-family: var(--font-px); letter-spacing: .5px; }
input, select { border: 2px solid var(--line); background: #fffaf0; border-radius: 9px; padding: 9px 11px; color: var(--text); outline: none; }
input:focus, select:focus { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(242,193,78,.3); }
.stack { display: flex; flex-direction: column; gap: 9px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fine { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.err { color: var(--red); font-weight: 800; min-height: 18px; margin-top: 8px; font-size: 13px; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-size: 11px; font-weight: 800; }
.pill.cls { background: rgba(242,193,78,.25); color: var(--gold); }

/* ---------- front ---------- */
.front { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; overflow-y: auto; }
#frontBg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; image-rendering: pixelated; }
/* login background: the cinematic town loop (poster image first, video when it can play) */
.front-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0; transition: opacity 1.2s ease; background: #1b1633 url(/media/login-loop.jpg) center / cover no-repeat; }
.front-video.on { opacity: 1; }
.front-shade { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, rgba(15,12,30,.15) 0%, rgba(15,12,30,.55) 70%, rgba(15,12,30,.75) 100%); }
.front-card { width: min(420px, 100%); background: var(--parch); border: 3px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow), inset 0 0 0 3px var(--parch2); position: relative; }
.front-card.wide { width: min(640px, 100%); }
.logo { text-align: center; font-family: var(--font-px); line-height: .95; margin-bottom: 6px; }
.logo-top { display: block; font-size: 64px; letter-spacing: 6px; font-weight: 700; color: var(--navy); text-shadow: 0 3px 0 var(--gold), 0 5px 0 #5a3a06; }
.logo-sub { display: block; font-size: 16px; letter-spacing: 5px; color: var(--gold2); margin-top: 6px; font-weight: 700; }
.tagline { text-align: center; color: var(--muted); margin: 8px 0 18px; font-style: italic; }
.or { text-align: center; margin: 12px 0; color: var(--muted); position: relative; }
.or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line); }
.or span { background: var(--parch); padding: 0 10px; position: relative; font-size: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-head h2, .front-card h3 { font-family: var(--font-px); color: var(--navy); margin: 0; }
.front-card h3 { font-size: 16px; margin: 14px 0 8px; }
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.char-slot { background: var(--parch2); border: 2px solid var(--line); border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: center; cursor: pointer; position: relative; min-height: 84px; }
.char-slot.on { border-color: var(--gold2); background: #fff3d0; box-shadow: 0 0 0 3px rgba(242,193,78,.4); }
.char-slot canvas { width: 56px; height: 56px; image-rendering: pixelated; background: rgba(0,0,0,.06); border-radius: 8px; }
.char-slot .cs-name { font-weight: 800; }
.char-slot .cs-sub { font-size: 12px; color: var(--muted); }
.char-slot .del { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: var(--muted); font-size: 14px; }
.char-slot.empty { justify-content: center; color: var(--muted); font-weight: 800; border-style: dashed; }
.look-pick { display: flex; gap: 8px; margin-bottom: 8px; }
.look-pick canvas { width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 10px; image-rendering: pixelated; cursor: pointer; background: var(--parch2); }
.look-pick canvas.on { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(242,193,78,.4); }
.create { background: var(--parch2); border-radius: 12px; padding: 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-bottom: 14px; }
.chan { border: 2px solid var(--line); background: #fffaf0; border-radius: 9px; padding: 6px; text-align: center; cursor: pointer; font-weight: 800; font-size: 12px; }
.chan.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chan small { display: block; font-weight: 600; opacity: .75; }
.chan .load { height: 4px; background: rgba(0,0,0,.12); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.chan .load i { display: block; height: 100%; background: var(--green); }
.front-foot { color: #cdd6f4; font-size: 12px; }
.front-foot a { color: var(--gold); }

/* ---------- game ---------- */
.game { position: fixed; inset: 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; }

.hud-card { position: absolute; left: 10px; top: 10px; display: flex; gap: 8px; background: linear-gradient(#26345f, #1a2446); border: 2px solid #c9a24f; border-radius: 12px; padding: 7px; box-shadow: var(--shadow); color: #fff; width: 290px; z-index: 5; }
.portrait { width: 58px; height: 58px; border-radius: 9px; background: #3b4a7a; border: 2px solid #c9a24f; overflow: hidden; flex: none; }
.portrait canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.hud-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hud-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { position: relative; height: 14px; background: #10162c; border-radius: 7px; overflow: hidden; border: 1px solid #0b0f20; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width .2s; }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 13px; font-weight: 800; text-shadow: 0 1px 1px #000; }
.bar.hp i { background: linear-gradient(#ff7b6e, #d6392f); }
.bar.sp i { background: linear-gradient(#78b4ff, #2f6fd6); }
.bar.mini { height: 6px; flex: 1; }
.bar.exp i { background: linear-gradient(#ffe38a, #e0a82a); }
.bar.jexp i { background: linear-gradient(#b8f08f, #54b047); }
.exp-row { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: #cfd8ff; }
.buff-row { position: absolute; left: 12px; top: 92px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 290px; z-index: 5; }
.buff { background: rgba(20,26,50,.85); border: 1px solid #c9a24f; color: #fff; border-radius: 6px; padding: 1px 5px; font-size: 10px; font-weight: 800; }
.buff.bad { border-color: #e0504a; color: #ffb4ae; }

.menu { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; z-index: 6; background: rgba(20,26,50,.55); padding: 4px; border-radius: 14px; backdrop-filter: blur(4px); }
.menu button { position: relative; background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; padding: 3px 6px; border-radius: 10px; min-width: 50px; }
.menu button:hover, .menu button.on { background: rgba(242,193,78,.2); }
.menu .ico { font-size: 22px; line-height: 1.1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.menu em { font-style: normal; font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.badge { position: absolute; top: 0; right: 2px; background: var(--red); color: #fff; font-size: 10px; border-radius: 999px; padding: 0 5px; font-weight: 800; }
.badge:empty { display: none; }
.badge.soft { background: #3f9a52; }

.minimap { position: absolute; top: 10px; right: 10px; background: #1a2446; border: 2px solid #c9a24f; border-radius: 12px; padding: 5px; z-index: 5; box-shadow: var(--shadow); }
.minimap canvas { display: block; width: 160px; height: 120px; border-radius: 7px; image-rendering: pixelated; background: #000; }
.mm-foot { display: flex; gap: 6px; align-items: center; color: #fff; font-size: 11px; font-weight: 800; margin-top: 4px; }
.mm-foot #mmName { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pill.ch { background: var(--navy3); border: 1px solid #c9a24f; }

.quest { position: absolute; right: 10px; top: 168px; width: 220px; z-index: 4; }
.quest .q { background: rgba(246,236,214,.94); border: 2px solid var(--line); border-radius: 10px; padding: 7px 9px; font-size: 12px; box-shadow: var(--shadow); }
.quest .q b { color: var(--navy); font-family: var(--font-px); font-size: 13px; }
.quest .q p { margin: 3px 0 0; color: var(--text); }
.quest .daily { margin-top: 6px; }
.dq { margin-top: 5px; }
.dq-t { display: flex; justify-content: space-between; gap: 6px; font-weight: 700; }
.dq.ready .dq-t { color: #2e7d32; } .dq.claimed { opacity: .5; }
.dq-bar { height: 5px; margin-top: 2px; background: #d8c8a4; border: 0; }
.dq-bar i { background: linear-gradient(#ffe38a, #e0a82a); }
.dq .btn { margin-top: 4px; width: 100%; }

.target { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); background: rgba(20,26,50,.88); border: 2px solid #c9a24f; border-radius: 10px; color: #fff; padding: 4px 10px; min-width: 220px; z-index: 5; text-align: center; font-size: 12px; }
.target .bar { margin: 3px 0; height: 9px; }
.target #tLv { margin-left: 6px; opacity: .8; }
.target #tInfo { font-size: 11px; opacity: .8; }

.castbar { position: absolute; left: 50%; bottom: 190px; transform: translateX(-50%); width: 220px; height: 16px; background: #10162c; border: 2px solid #c9a24f; border-radius: 8px; overflow: hidden; z-index: 6; }
.castbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#b89bff, #6f4fd6); }
.castbar span { position: absolute; inset: 0; color: #fff; text-align: center; font-size: 11px; font-weight: 800; line-height: 13px; }

.chat { position: absolute; left: 10px; bottom: calc(10px + var(--safe-b)); width: 420px; max-width: calc(100vw - 20px); background: rgba(16,22,44,.82); border: 2px solid #3d4d80; border-radius: 12px; z-index: 5; color: #e8ecff; display: flex; flex-direction: column; }
.chat.min .chat-log, .chat.min .chat-in { display: none; }
.chat-tabs { display: flex; gap: 2px; padding: 4px 4px 0; overflow-x: auto; }
.chat-tabs button { background: none; border: 0; color: #9fb0e8; font-weight: 800; font-size: 11px; padding: 3px 7px; border-radius: 7px 7px 0 0; white-space: nowrap; }
.chat-tabs button.on { background: #2f3d6b; color: #fff; }
.chat-tabs .chat-min { margin-left: auto; }
.chat-log { height: 132px; overflow-y: auto; padding: 4px 8px; font-size: 12px; line-height: 1.45; }
.chat-log div { word-break: break-word; }
.chat-log .who { font-weight: 800; color: #bfe0ff; cursor: pointer; }
.chat-log .who.gm { color: #ffd54f; } .chat-log .c-gm { color: #fff3c4; }
.gm-badge { display: inline-block; background: #ffd54f; color: #2a1d00; font-weight: 900; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 4px; margin: 0 4px 0 2px; vertical-align: 1px; letter-spacing: .5px; }
.chat-log .c-system { color: #ffb86b; } .chat-log .c-boss { color: #ff7ab6; font-weight: 800; } .chat-log .c-loot { color: #9ee6a8; }
.chat-log .c-world .tag { color: #7fd1ff; } .chat-log .c-party .tag { color: #9dff9d; } .chat-log .c-guild { color: #9fe7ff; } .chat-log .c-guild .tag { color: #6fd0ff; } .chat-log .c-whisper { color: #ffb4ff; } .chat-log .c-map .tag { color: #fff; }
.chat-log .tag { font-weight: 800; margin-right: 4px; }
.chat-in { display: flex; gap: 4px; padding: 5px; }
.chat-in select { padding: 5px; border-radius: 7px; background: #2f3d6b; color: #fff; border-color: #3d4d80; font-size: 12px; }
.chat-in input { flex: 1; min-width: 0; padding: 6px 9px; border-radius: 7px; background: #0f1530; color: #fff; border-color: #3d4d80; font-size: 13px; }
.chat-in #chatTo { flex: none; width: 70px; }

.actions { position: absolute; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 6; display: flex; align-items: flex-end; gap: 10px; }
.hotbar { display: grid; grid-template-columns: repeat(5, 48px); gap: 5px; }
.slot { width: 48px; height: 48px; border-radius: 11px; background: rgba(20,26,50,.8); border: 2px solid #4a5b92; position: relative; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; user-select: none; }
.slot:hover { border-color: #c9a24f; }
.slot canvas, .slot img { width: 36px; height: 36px; image-rendering: pixelated; }
.slot .k { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 800; opacity: .7; }
.slot .n { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.slot .cd { position: absolute; inset: 0; background: rgba(0,0,0,.6); border-radius: 9px; transform-origin: bottom; }
.slot.nosp { filter: grayscale(.8) brightness(.7); }
.auto-btn { width: 70px; height: 70px; border-radius: 50%; border: 3px solid #c9a24f; background: radial-gradient(#3b4f8f, #1a2446); color: #fff; font-family: var(--font-px); font-weight: 700; font-size: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); line-height: 1; }
.auto-btn small { font-size: 10px; font-family: var(--font); font-weight: 800; margin-top: 3px; color: #9fb0e8; max-width: 64px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.auto-btn.on { background: radial-gradient(#ffd66b, #e0901e); color: #3a2605; animation: pulse 1.6s infinite; }
.auto-btn.on small { color: #3a2605; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(242,193,78,.6), var(--shadow); } 50% { box-shadow: 0 0 0 10px rgba(242,193,78,0), var(--shadow); } }
.atk-btn { width: 84px; height: 84px; border-radius: 50%; border: 3px solid #c9a24f; background: radial-gradient(#e0504a, #7a1c18); color: #fff; font-size: 36px; box-shadow: var(--shadow); display: none; }

.joy { position: absolute; left: 24px; bottom: calc(170px + var(--safe-b)); width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(rgba(255,255,255,.12), rgba(255,255,255,.04)); border: 2px solid rgba(255,255,255,.25); z-index: 6; display: none; touch-action: none; }
.joy-knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(#fff6d8, #c9a24f); box-shadow: 0 3px 10px rgba(0,0,0,.4); }

.toast-box { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 30; pointer-events: none; }
.toast { background: rgba(246,236,214,.97); border: 2px solid var(--line); border-radius: 10px; padding: 6px 14px; font-weight: 800; box-shadow: var(--shadow); animation: tin .25s ease-out; font-size: 13px; }
.toast.big { font-family: var(--font-px); font-size: 22px; color: var(--navy); background: linear-gradient(#fff3c4, #ffd66b); }
.toast.bad { color: var(--red); }
@keyframes tin { from { transform: translateY(-8px); opacity: 0; } }

.death { position: absolute; inset: 0; background: rgba(40,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 40; }
.death-card { background: var(--parch); border: 3px solid var(--line); border-radius: 16px; padding: 22px; width: min(360px, 90vw); text-align: center; box-shadow: var(--shadow); }
.death-card h2 { font-family: var(--font-px); color: var(--red); margin: 0 0 8px; }
.net-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(20,26,50,.9); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 50; font-weight: 800; }
.hud-foot { position: absolute; left: 440px; bottom: calc(12px + var(--safe-b)); color: #cfd8ff; font-size: 11px; font-weight: 700; z-index: 4; text-shadow: 0 1px 2px #000; opacity: .8; }

/* ---------- panels ---------- */
.panel-layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.panel { position: absolute; pointer-events: auto; background: var(--parch); border: 3px solid var(--line); border-radius: 16px; box-shadow: var(--shadow), inset 0 0 0 2px var(--parch2); display: flex; flex-direction: column; max-height: calc(100vh - 110px); width: 440px; max-width: calc(100vw - 16px); left: 50%; top: 84px; transform: translateX(-50%); animation: pin .15s ease-out; }
.panel.wide { width: 620px; }
.panel.side-l { left: 12px; transform: none; }
.panel.side-r { left: auto; right: 12px; transform: none; }
@keyframes pin { from { opacity: 0; margin-top: -6px; } }
.panel-head { display: flex; align-items: center; gap: 8px; background: linear-gradient(#2c3a6a, #1f2a52); color: #fff; padding: 8px 12px; border-radius: 12px 12px 0 0; border-bottom: 3px solid var(--line); cursor: move; user-select: none; }
.panel-head h3 { margin: 0; font-family: var(--font-px); font-size: 18px; flex: 1; letter-spacing: .5px; }
.panel-head .x { background: linear-gradient(#ef6b62, #c53b35); border: 2px solid #5a1210; color: #fff; width: 30px; height: 30px; border-radius: 8px; font-weight: 800; }
.panel-body { padding: 12px; overflow-y: auto; }
.panel-tabs { display: flex; gap: 4px; padding: 8px 12px 0; flex-wrap: wrap; }
.panel-tabs button { border: 2px solid var(--line); background: var(--parch2); border-radius: 9px 9px 0 0; padding: 5px 10px; font-weight: 800; color: var(--muted); font-size: 12px; }
.panel-tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.sec { background: var(--parch2); border: 2px solid var(--parch3); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.sec h4 { margin: 0 0 8px; font-family: var(--font-px); color: var(--navy); font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.kv { display: flex; justify-content: space-between; font-size: 13px; }
.kv b { color: var(--navy); }
.stat-row { display: grid; grid-template-columns: 44px 1fr 38px 34px; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--parch3); }
.stat-row .sn { font-family: var(--font-px); font-weight: 700; color: var(--navy); }
.stat-row .sv { font-weight: 800; font-size: 15px; }
.stat-row .sv small { color: var(--green); font-size: 12px; }
.stat-row .sc { font-size: 11px; color: var(--muted); text-align: right; }
.plus { width: 30px; height: 26px; border-radius: 7px; border: 2px solid #174a22; background: linear-gradient(#6fcf7f, #3f9a52); color: #fff; font-weight: 800; }
.plus:disabled { filter: grayscale(1) opacity(.5); }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; cursor: pointer; user-select: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold2); }
.help { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

.skill { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 7px; border-radius: 10px; background: #fffaf0; border: 2px solid var(--parch3); margin-bottom: 6px; }
.skill.locked { opacity: .55; }
.skill .si { width: 40px; height: 40px; border-radius: 9px; background: var(--navy2); display: flex; align-items: center; justify-content: center; }
.skill .si canvas, .skill .si img { width: 32px; height: 32px; image-rendering: pixelated; }
.skill .sname { font-weight: 800; }
.skill .sdesc { font-size: 12px; color: var(--muted); }
.skill .slv { font-family: var(--font-px); font-weight: 700; color: var(--navy); text-align: center; font-size: 13px; }
.skill .sbtns { display: flex; gap: 4px; align-items: center; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 5px; }
.it { aspect-ratio: 1; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 9px; position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.it:hover, .it.on { border-color: var(--gold2); }
.it canvas, .it img { width: 34px; height: 34px; image-rendering: pixelated; }
.it .q { position: absolute; right: 3px; bottom: 0; font-size: 11px; font-weight: 800; color: var(--text); text-shadow: 0 0 2px #fff; }
.it .rf { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 800; color: var(--gold2); }
.it.r-uncommon { box-shadow: inset 0 0 0 2px var(--r-uncommon); } .it.r-rare { box-shadow: inset 0 0 0 2px var(--r-rare); } .it.r-epic { box-shadow: inset 0 0 0 2px var(--r-epic); } .it.r-legendary { box-shadow: inset 0 0 0 2px var(--r-legendary); }
.it.empty { cursor: default; opacity: .5; }
.it.eqd::after { content: 'E'; position: absolute; top: 1px; right: 3px; font-size: 10px; font-weight: 800; color: var(--blue); }
.detail { background: #fffaf0; border: 2px solid var(--parch3); border-radius: 12px; padding: 10px; margin-top: 10px; }
.detail .dn { font-weight: 800; font-size: 15px; }
.detail .dt { font-size: 12px; color: var(--muted); }
.detail .dl { font-size: 13px; margin: 6px 0; }
.detail .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rn-common { color: #6b6152; } .rn-uncommon { color: #2e9c48; } .rn-rare { color: #2d78d6; } .rn-epic { color: #8f4fe0; } .rn-legendary { color: #e08a12; }

.eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.eq-slot { display: flex; gap: 8px; align-items: center; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 10px; padding: 5px; cursor: pointer; min-height: 52px; }
.eq-slot .it { width: 40px; flex: none; }
.eq-slot small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 800; }

.list { display: flex; flex-direction: column; gap: 5px; }
.lrow { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 10px; padding: 5px 8px; }
.lrow .it { width: 40px; }
.lrow .price { font-weight: 800; color: var(--navy); white-space: nowrap; }
.lrow small { color: var(--muted); display: block; font-size: 11px; }
.coin { font-weight: 800; }
.coin.s::before { content: '●'; color: #b8c2d6; margin-right: 3px; }
.coin.g::before { content: '●'; color: var(--gold); margin-right: 3px; }
.wallet { display: flex; gap: 12px; font-weight: 800; }

.book { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.book table { width: 100%; border-collapse: collapse; }
.book td { padding: 2px 4px; }
.book .bid td:first-child { color: var(--green); font-weight: 800; }
.book .ask td:first-child { color: var(--red); font-weight: 800; }
.chart { width: 100%; height: 120px; background: var(--navy); border-radius: 10px; display: block; }
.trade-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-box .sec { margin: 0; }
.trade-box input { width: 100%; margin: 4px 0; }

.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#wheel { width: 240px; height: 240px; }
.pool { font-family: var(--font-px); font-size: 24px; color: var(--gold2); text-shadow: 0 2px 0 #5a3a06; }

.bot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.bot-grid label { font-size: 12px; font-weight: 700; display: flex; flex-direction: column; gap: 3px; }
.bot-grid input[type=range] { width: 100%; accent-color: var(--gold2); border: 0; padding: 0; background: none; }
.bot-state { font-family: var(--font-px); font-size: 16px; color: var(--navy); }
.skill-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.big-toggle { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.big-toggle .btn { min-width: 110px; }

.npc-intro { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.npc-intro canvas { width: 64px; height: 64px; image-rendering: pixelated; background: var(--parch2); border-radius: 12px; border: 2px solid var(--parch3); }
.npc-intro p { margin: 0; font-style: italic; }
.class-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 12px; padding: 8px; margin-bottom: 8px; }
.class-card canvas { width: 56px; height: 56px; image-rendering: pixelated; }
.class-card b { font-family: var(--font-px); font-size: 16px; color: var(--navy); }
.class-card p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.map-list .lrow { grid-template-columns: 1fr auto auto; }
.party-m { display: flex; justify-content: space-between; align-items: center; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 10px; padding: 6px 9px; margin-bottom: 5px; }

/* ---------- mobile ---------- */
@media (max-width: 820px), (pointer: coarse) {
  .joy { display: block; }
  .atk-btn { display: block; }
  .menu { top: auto; bottom: calc(6px + var(--safe-b)); left: 50%; transform: translateX(-50%); gap: 0; padding: 2px; flex-wrap: nowrap; max-width: calc(100vw - 8px); overflow-x: auto; }
  .menu button { min-width: 40px; padding: 2px 3px; }
  .menu .ico { font-size: 18px; }
  .menu em { font-size: 9px; }
  .hud-card { width: 220px; padding: 5px; }
  .portrait { width: 44px; height: 44px; }
  .minimap canvas { width: 110px; height: 82px; }
  .quest { top: 128px; width: 170px; }
  .quest .q { font-size: 11px; }
  .buff-row { top: 76px; }
  .chat { width: min(300px, calc(100vw - 16px)); bottom: auto; top: 136px; left: 8px; background: rgba(16,22,44,.55); }
  .chat-log { height: 64px; font-size: 11px; }
  .chat-tabs button { padding: 2px 5px; font-size: 10px; }
  .chat.min { width: auto; }
  .actions { bottom: calc(62px + var(--safe-b)); right: 8px; flex-direction: column-reverse; align-items: flex-end; }
  .actions-row { display: flex; gap: 8px; align-items: flex-end; }
  .hotbar { grid-template-columns: repeat(5, 42px); }
  .hotbar .slot:nth-child(n+6) { display: none; }
  .slot { width: 42px; height: 42px; }
  .joy { bottom: calc(70px + var(--safe-b)); }
  .castbar { bottom: 260px; }
  .panel { top: 8px; max-height: calc(100vh - 80px); }
  .hud-foot { display: none; }
  .target { top: 64px; min-width: 180px; }
}
.quest-btn { display: none; }
@media (max-width: 520px) {
  .hud-card { width: 190px; }
  .hud-name .pill.cls { display: none; }
  .quest { display: none; top: 176px; width: calc(100vw - 24px); left: 12px; right: auto; }
  .quest.show { display: block; z-index: 15; }
  .quest-btn { display: block; position: absolute; right: 12px; top: 130px; z-index: 16; width: 40px; height: 40px; border-radius: 10px; border: 2px solid #c9a24f; background: #1a2446; font-size: 20px; }
  .chat { width: calc(100vw - 150px); }
}

/* quests & crafting */
.quest-card { background: #fffaf0; border: 2px solid var(--parch3); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.quest-card.ready { border-color: #58b368; box-shadow: 0 0 0 2px rgba(88,179,104,.25); }
.quest-card p { margin: 4px 0; font-size: 13px; font-style: italic; color: var(--text); }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qhead b { font-family: var(--font-px); color: var(--navy); font-size: 14px; }
.qgoal { font-size: 12px; font-weight: 700; color: var(--muted); }
.qgoal.ok { color: #2e7d32; }
.qgoal.ok::before { content: '✓ '; }
.recipe .needs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.need { font-size: 11px; font-weight: 800; background: #f3e3c3; border-radius: 6px; padding: 1px 6px; color: #9a3b2f; }
.need.ok { color: #2e7d32; background: #e3f3df; }

.class-card.pet-out { border-color: #f2c14e; box-shadow: 0 0 0 2px rgba(242,193,78,.35); }

/* guild */
.guild-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.guild-head canvas { width: 56px; height: 56px; image-rendering: pixelated; }
.guild-head h3 { margin: 0; font-family: var(--font-px); color: var(--navy); }
.guild-bar { height: 8px; background: #d9dcef; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.guild-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fb3ff, #9fe7ff); }
.guild-m { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 5px 6px; border-bottom: 1px solid rgba(0,0,0,.08); }
.guild-m .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #aab; margin-right: 5px; }
.guild-m .dot.on { background: #3fcf5f; }
.guild-m .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.guild-tabs { display: flex; gap: 4px; margin: 8px 0; }
.guild-tabs button.on { background: var(--navy); color: #fff; }
.em-pick { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.em-pick button { padding: 3px 7px; font-size: 11px; }
.em-pick button.on { outline: 2px solid var(--navy); }
.gskill { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 6px; border-bottom: 1px solid rgba(0,0,0,.08); }

/* skill tree */
.stree { position: relative; margin: 4px 0 10px; background: radial-gradient(ellipse at top, #fffaf0, #f3e6c8); border: 2px solid var(--parch3); border-radius: 12px; }
.stree svg { position: absolute; inset: 4px 0 0 0; width: 100%; height: calc(100% - 4px); pointer-events: none; }
.stree svg path { fill: none; stroke: #b9a988; stroke-width: 3; stroke-dasharray: 5 4; }
.stree svg path.on { stroke: #3f9a52; stroke-dasharray: none; }
.stree-req { position: absolute; transform: translateX(-50%); font-size: 9px; font-weight: 800; color: #9a8a6a; background: #fffaf0; padding: 0 3px; border-radius: 4px; }
.stree-req.on { color: #2f7a40; }
.snode { position: absolute; width: 74px; margin-left: -37px; top: 0; padding-top: 6px; text-align: center; cursor: pointer; }
.snode .si { position: relative; width: 44px; height: 44px; margin: 0 auto; border-radius: 10px; background: var(--navy2); display: flex; align-items: center; justify-content: center; border: 2px solid #1b2340; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.snode .si canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.snode .slv { position: absolute; bottom: -7px; right: -8px; font-size: 9px; background: #1b2340; color: #fff; border-radius: 6px; padding: 1px 4px; font-family: var(--font-px); }
.snode .spas { position: absolute; top: -6px; left: -6px; font-style: normal; font-size: 9px; font-weight: 800; background: #7a6a4a; color: #fff; border-radius: 50%; width: 15px; height: 15px; line-height: 15px; }
.snode .sn { font-size: 10px; font-weight: 800; line-height: 1.1; margin-top: 8px; color: var(--navy); }
.snode .sx { font-size: 8.5px; color: #a0522d; line-height: 1.1; }
.snode.locked .si { filter: grayscale(1) brightness(.75); }
.snode.locked .sn { color: #9a8a6a; }
.snode.learned .si { border-color: #f2c14e; }
.snode.up .si { animation: snode-glow 1.2s ease-in-out infinite; }
.snode.sel .si { outline: 3px solid #4fb3ff; outline-offset: 2px; }
@keyframes snode-glow { 50% { box-shadow: 0 0 12px 3px #7dff9a; } }
.sdetail .needs { font-size: 11px; margin-top: 3px; }
.sdetail .need { display: inline-block; margin: 1px 3px; padding: 0 5px; border-radius: 5px; background: #f8d7d0; color: #8a2a1a; }
.sdetail .need.ok { background: #d6f2da; color: #20622e; }
.sdetail small { color: var(--muted); font-weight: 600; }
.snode.job2 .si { background: #4a2f6b; }
.snode.job2 .sn { color: #5a2f7a; }

/* in-game dialogs */
.dlg-back { position: fixed; inset: 0; z-index: 200; background: rgba(12, 10, 24, .55); display: flex; align-items: center; justify-content: center; animation: fadein .12s ease-out; backdrop-filter: blur(1px); }
.dlg { width: 340px; max-width: calc(100vw - 32px); background: var(--parch); border: 3px solid var(--line); border-radius: 16px; box-shadow: var(--shadow), inset 0 0 0 2px var(--parch2); animation: pin .15s ease-out; overflow: hidden; }
.dlg-head { background: linear-gradient(#2c3a6a, #1f2a52); color: #fff; padding: 9px 14px; font-family: var(--font-px); font-size: 17px; border-bottom: 3px solid var(--line); }
.dlg.danger .dlg-head { background: linear-gradient(#b8453e, #8a2a25); }
.dlg-body { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink, #2b2418); font-weight: 700; }
.dlg-icon { image-rendering: pixelated; } .dlg-emoji { font-size: 34px; }
.dlg-inrow { display: flex; gap: 6px; align-items: center; justify-content: center; }
.dlg-input { width: 140px; text-align: center; font-weight: 800; font-size: 15px; padding: 6px; border-radius: 8px; border: 2px solid var(--line); background: #fffaf0; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 14px 14px; }
.dlg-foot .btn { min-width: 90px; }
@keyframes fadein { from { opacity: 0; } }
canvas.dlg-icon, img.dlg-icon { width: 56px; height: 56px; }

/* world map */
.panel.worldmap { width: 700px; }
.wm-canvas { width: 100%; height: auto; image-rendering: pixelated; border: 3px solid var(--line); border-radius: 10px; display: block; touch-action: manipulation; }
.wm-info { margin-top: 8px; background: #fffaf0; border: 2px solid var(--parch3); border-radius: 10px; padding: 8px 10px; }
.wm-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .wm-head b { font-family: var(--font-px); font-size: 17px; color: var(--navy); margin-right: 4px; }
.wm-mobs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; font-size: 12px; color: var(--muted); }
.wm-mob { background: #efe4c8; border-radius: 6px; padding: 1px 6px; color: #5a4a2a; font-weight: 700; } .wm-mob.boss { background: #f8d7d0; color: #8a2a1a; }
.wm-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.travel-pill { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: auto; background: linear-gradient(#2c3a6a, #1f2a52); color: #fff; border: 2px solid #ffd54f; border-radius: 20px; padding: 5px 12px; font-weight: 800; font-size: 13px; box-shadow: 0 3px 0 rgba(0,0,0,.3); cursor: pointer; }
.travel-pill b { color: #ffd54f; } .travel-pill span { margin-left: 6px; opacity: .7; }

/* hat maker try-on mirror */
.hat-mirror { position: sticky; top: -12px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 10px; padding: 10px; border-radius: 12px; cursor: pointer;
  background: radial-gradient(ellipse at center, #fff8e6 0%, #f0dcb0 70%); border: 3px solid var(--line); box-shadow: inset 0 0 0 2px #fff3d0; }
.hm-fig { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hm-fig canvas { width: 96px; height: 96px; image-rendering: pixelated; }
.hm-fig.try canvas { width: 128px; height: 128px; filter: drop-shadow(0 0 8px rgba(255, 213, 79, .7)); }
.hm-fig small { font-weight: 800; color: var(--navy); font-size: 12px; }
.hm-arrow { font-size: 22px; color: #b8860b; font-weight: 800; }
.recipe { cursor: pointer; } .recipe.sel { outline: 3px solid #ffd54f; outline-offset: -2px; background: #fff6d8; }

/* player drop-down menu */
.pmenu { position: fixed; z-index: 150; min-width: 190px; background: var(--parch); border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; animation: pin .12s ease-out; }
.pmenu-head { padding: 4px 8px 6px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.pmenu-head b { font-size: 15px; } .pmenu-head b.gm { color: #b8860b; } .pmenu-head small { color: var(--muted); font-weight: 700; }
.pmenu-head .gm-badge { align-self: flex-start; margin: 0 0 2px; }
.pmenu button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font: 800 14px var(--font, "Nunito", sans-serif); color: var(--ink, #2b2238); cursor: pointer; }
.pmenu button:hover { background: rgba(0,0,0,.07); } .pmenu button.danger { color: #c0392b; }
/* trade window */
.trade-box .tr-side { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 10px; padding: 8px; background: rgba(255,255,255,.35); }
.trade-box .tr-side.locked { border-color: #d4a017; background: rgba(255,213,79,.18); }
.trade-box .tr-side h4 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; }
.tr-state { font-size: 12px; color: var(--muted); } .tr-state.lock { color: #b8860b; } .tr-state.ok { color: #2e9d4a; }
.tr-list { font-size: 12px; margin: 6px 0; min-height: 16px; }

/* server (region) picker on the login card */
.server-pick { margin: 10px 0 12px; } .server-pick h3 { margin: 0 0 6px; font-size: 14px; }
.servers { display: flex; flex-direction: column; gap: 6px; }
.srv { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.45); cursor: pointer; text-align: left; }
.srv.on { border-color: #d4a017; background: rgba(255,213,79,.25); cursor: default; } .srv.off { opacity: .55; }
.srv b { font-size: 14px; } .srv small { grid-column: 1 / -1; color: var(--muted); font-weight: 700; font-size: 11px; }
.srv .ms { font-weight: 900; font-size: 13px; } .ms.good { color: #2e9d4a; } .ms.mid { color: #c98a00; } .ms.bad { color: #c0392b; }
.srv-tag { font-size: 12px; color: var(--muted); font-weight: 800; margin-left: 6px; }

/* region tag on character slots, server choice for new characters, ban screen */
.char-slot { position: relative; } .char-slot .rg { font-weight: 800; }
.char-slot .mv { position: absolute; right: 6px; top: 30px; background: none; border: 0; font-size: 15px; cursor: pointer; color: var(--muted); } .char-slot .mv:hover { color: #b8860b; }
.region-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 800; font-size: 13px; } .region-row select { flex: 1; }
.ban-title { text-align: center; color: #c0392b; margin: 8px 0; }
.ban-box { background: rgba(192,57,43,.08); border: 2px solid rgba(192,57,43,.35); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.ban-label { font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.ban-reason, .ban-until { font-weight: 800; margin-bottom: 4px; }
#banCard textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 8px; border: 2px solid var(--line); background: #fffaf0; }

.char-slot > div { padding-right: 22px; min-width: 0; } .char-slot .cs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* party box: clean crystal glass on the left */
.party-hud { position: absolute; left: 10px; top: 150px; width: 190px; display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 14px; z-index: 6;
  background: linear-gradient(160deg, rgba(210,235,255,.22), rgba(140,180,255,.10)); border: 1px solid rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -8px 18px rgba(120,170,255,.12), 0 6px 18px rgba(10,20,50,.35); backdrop-filter: blur(6px) saturate(1.3); -webkit-backdrop-filter: blur(6px) saturate(1.3); }
.ph-head { display: flex; gap: 6px; align-items: center; font: 800 11px "Nunito", sans-serif; color: #eef6ff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ph-head > span:first-child { flex: 1; letter-spacing: .5px; } .ph-mode { opacity: .85; } .ph-exp.ok { color: #9dff9d; } .ph-exp.bad { color: #ff8a80; cursor: help; }
.ph-m { padding: 4px 6px; border-radius: 9px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); cursor: pointer; }
.ph-m:hover { background: rgba(255,255,255,.2); } .ph-m.me { border-color: rgba(255,230,140,.6); } .ph-m.away { opacity: .5; } .ph-m.dead { filter: grayscale(1); }
.ph-name { font: 800 12px "Nunito", sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-name small { font-weight: 700; color: #cfe3ff; } .ph-flag { color: #ff5a4d; cursor: help; }
.ph-bar { height: 5px; border-radius: 3px; background: rgba(0,0,0,.35); margin-top: 3px; overflow: hidden; } .ph-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.ph-bar.hp i { background: linear-gradient(90deg, #4cd964, #9dff9d); } .ph-bar.sp i { background: linear-gradient(90deg, #3b82f6, #8fc7ff); }
@media (max-width: 820px) { .party-hud { top: auto; bottom: 150px; width: 150px; } }
.party-exp { padding: 6px 10px; border-radius: 8px; font-weight: 800; font-size: 13px; margin-bottom: 8px; } .party-exp.ok { background: rgba(46,157,74,.12); color: #2e7d32; } .party-exp.bad { background: rgba(192,57,43,.12); color: #c0392b; }
.party-loot { margin-bottom: 6px; font-size: 13px; } .party-loot select { max-width: 100%; }
/* quest Go button, bound items */
.q-head { display: flex; align-items: center; gap: 8px; } .q-head b { flex: 1; } .q-go { padding: 2px 10px; font-size: 12px; }
.it .bd { position: absolute; left: 1px; bottom: 0; font-size: 9px; }
/* tutorial */
.tut-back { position: fixed; inset: 0; background: rgba(8,10,24,.62); z-index: 300; } .tut-back.clear { background: transparent; }
.tut-spot { position: fixed; z-index: 301; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(8,10,24,.62), 0 0 0 3px #ffd54f, 0 0 24px 6px rgba(255,213,79,.6); pointer-events: none; transition: all .25s; }
.tut-arrow { position: fixed; z-index: 303; font-size: 32px; color: #ffd54f; text-shadow: 0 2px 6px rgba(0,0,0,.6); pointer-events: none; animation: tutbob .8s ease-in-out infinite alternate; }
@keyframes tutbob { from { translate: 0 -4px; } to { translate: 0 4px; } }
.tut-card { position: fixed; z-index: 302; background: var(--parch, #f6ecd6); border: 3px solid var(--line, #b8955a); border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.tut-card h3 { margin: 2px 0 6px; } .tut-card p { margin: 0 0 12px; line-height: 1.45; font-weight: 600; }
.tut-n { font-size: 11px; font-weight: 900; color: var(--muted, #8a7a60); } .tut-btns { display: flex; gap: 6px; justify-content: flex-end; }

.quest-done-note { background: rgba(46,157,74,.12); color: #2e7d32; border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 13px; margin: 6px 0; }

/* login alternatives, wallet picker, account rows */
.login-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.wp-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; } .wp-item { display: flex; align-items: center; gap: 10px; justify-content: flex-start; text-decoration: none; }
.wp-item img { width: 24px; height: 24px; border-radius: 6px; } .wp-note { margin-top: 6px; }
.acc-rows > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }

/* Gold Shop */
.prem-badge { color: #ffd54f; font-weight: 900; margin-right: 3px; }
.dep-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dep-pack { display: flex; flex-direction: column; gap: 2px; padding: 10px; } .dep-pack small { font-weight: 700; opacity: .75; }
.dep-req { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; } .dep-qr svg { width: 180px; height: 180px; background: #fff; border-radius: 10px; }
@media (max-width: 600px) { .dep-req { grid-template-columns: 1fr; } }
.dep-status { font-weight: 900; } .dep-status.credited { color: #2e9d4a; } .dep-status.review { color: #b8860b; } .dep-status.expired { color: #c0392b; }
.dep-manual { margin-top: 10px; } .dep-manual summary { cursor: pointer; font-weight: 800; }
