/* STARFALL ONLINE v3.0 — styles for the guide, activity dock, HUD controls, GM console, premium market,
   redesigned guild / party / dungeon / tower / Season Pass / achievements / mount windows, drop cards,
   rare-drop celebration, emotes, arena, events, storage and gathering. Loaded after pixel.css. */
:root { --v3-gold: #fbbf24; --v3-ink: #0b0816; --v3-card: rgba(15, 12, 34, .78); --v3-card2: rgba(35, 28, 64, .85); }

.pxi { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.pxe { font-size: 26px; line-height: 1; flex: none; }
kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border: 1px solid #6d5fb8; border-bottom-width: 3px; border-radius: 4px; background: #231c40; color: #fde68a; font: 600 11px/1.5 'Kanit', sans-serif; text-align: center; }

/* ---------------------------------------------------------------- shared hero banner */
.v3-hero { display: flex; align-items: center; gap: 12px; margin: -2px 0 10px; padding: 10px 12px; background: linear-gradient(100deg, rgba(76, 29, 149, .55), rgba(30, 27, 75, .35) 60%, transparent), var(--px-dither); border: 2px solid #4c3d8f; box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .18), 0 3px 0 var(--v3-ink); }
.v3-hero .pxi { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 #000); }
.v3-hm { flex: 1; min-width: 0; }
.v3-title { font: 700 17px/1.3 'Kanit', sans-serif; color: #fde68a; text-shadow: 0 2px 0 #000; }
.v3-sub { font-size: 12px; color: #c7d2fe; line-height: 1.5; }

/* ---------------------------------------------------------------- guide */
.guide { display: flex; flex-direction: column; gap: 10px; }
.guide-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.guide-dot { width: 40px; height: 40px; font-size: 20px; border: 2px solid #4c3d8f; background: #1e1840; cursor: pointer; filter: grayscale(.6); transition: transform .1s; }
.guide-dot.on { filter: none; border-color: var(--v3-gold); background: #3b2f78; transform: translateY(-2px); box-shadow: 0 3px 0 #000; }
.guide-page { min-height: 300px; padding: 12px 14px; background: var(--v3-card); border: 1px solid #3b3270; }
.guide-h { font: 700 19px 'Kanit', sans-serif; color: #fde68a; margin-bottom: 10px; text-shadow: 0 2px 0 #000; }
.guide-page p { font-size: 13px; line-height: 1.7; margin: 8px 0; }
.gd-lead { color: #e0e7ff; text-align: center; }
.guide-page .sf-logo { margin: 0 auto 6px; }
.gd-steps { display: grid; gap: 6px; }
.gd-steps > div { display: flex; gap: 10px; align-items: center; padding: 7px 10px; background: rgba(76, 29, 149, .25); border-left: 3px solid var(--v3-gold); font-size: 13px; }
.gd-steps b:first-child { display: grid; place-items: center; width: 24px; height: 24px; flex: none; background: var(--v3-gold); color: #1a1026; font-family: 'Kanit'; }
.gd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-card { padding: 9px 11px; background: var(--v3-card2); border: 1px solid #4c3d8f; font-size: 12.5px; line-height: 1.7; }
.gd-card h4 { margin: 0 0 6px; color: #fde68a; font: 600 14px 'Kanit'; }
.gd-classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gd-cls { padding: 7px; border: 1px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 28%, transparent), transparent); font-size: 12px; }
.gd-cls b { display: block; color: #fff; }
.gd-cls small { color: #cbd5e1; font-size: 11px; line-height: 1.4; }
.guide-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guide-foot label { margin-right: auto; }

/* ---------------------------------------------------------------- activity dock */
#act-dock { position: absolute; top: 10px; right: 204px; z-index: 6; display: grid; grid-template-columns: repeat(2, 46px); gap: 5px; }
#act-dock .dock-head { grid-column: 1 / -1; height: 18px; border: 0; background: #2d2456; color: #fde68a; cursor: pointer; font-weight: 700; box-shadow: var(--px-frame-sm); }
.dock-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 44px; padding: 2px; border: 0; cursor: pointer; color: var(--text); background: linear-gradient(#2d2456, #1a1531); box-shadow: var(--px-frame-sm); transition: transform .1s, filter .15s; }
.dock-btn .pxi { width: 24px; height: 24px; }
.dock-btn span { font: 600 9px/1.15 'Kanit', sans-serif; white-space: nowrap; }
.dock-btn:hover { filter: brightness(1.25); transform: translateX(-2px); }
.dock-btn.on { background: linear-gradient(#5b3fae, #2d2456); }
.dock-btn.on span { color: #fde68a; }
.dock-sys { background: linear-gradient(#1f2937, #111827); }
.dock-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #475569; color: #fff; font: 700 10px/16px 'Kanit'; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--v3-ink); }
.dock-badge.hot { background: #ef4444; animation: v3pulse 1.4s infinite; }
#act-dock.min .dock-btn { display: none; }
#act-dock.min { grid-template-columns: 26px; }
@keyframes v3pulse { 50% { transform: scale(1.18); } }
#hud.no-dock #act-dock, #hud.no-qt #quest-tracker, #hud.no-bot #bot-panel, #hud.no-bot #gift-btn { display: none !important; }
#hud.no-mm #minimap-box { display: none !important; }
#hud.no-mm #act-dock { right: 10px; }
#close-all { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 70; padding: 5px 14px; border: 0; background: #7f1d1d; color: #fff; font: 600 12px 'Kanit'; cursor: pointer; box-shadow: var(--px-frame-sm); }
#hud-restore { display: none; position: fixed; top: 10px; right: 10px; z-index: 90; padding: 6px 12px; border: 0; background: #2d2456; color: #fde68a; font: 600 13px 'Kanit'; cursor: pointer; box-shadow: var(--px-frame-sm); }
body.hud-hidden #hud > *:not(#panels):not(#npc-dialog):not(#prompts):not(#death-overlay):not(#duel-overlay):not(#joystick):not(#mobile-actions):not(#skillbar):not(#gather-bar) { visibility: hidden; }
body.hud-hidden #hud-restore { display: block; }

/* ---------------------------------------------------------------- inventory / storage */
.inv-v3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; padding: 6px 8px; background: rgba(13, 148, 136, .14); border: 1px dashed #0f766e; }
.st-hero .st-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-grid { max-height: 46vh; overflow-y: auto; }

/* ---------------------------------------------------------------- gathering bar */
#gather-bar { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(15, 12, 34, .92); box-shadow: var(--px-frame-sm); pointer-events: none; }
#gather-bar.hidden { display: none; }
.gb-ico { font-size: 20px; }
.gb-track { width: 160px; height: 10px; background: #0b0816; border: 1px solid #4c3d8f; }
.gb-fill { width: 0; height: 100%; background: linear-gradient(90deg, #22c55e, #fde047); }
.gb-txt { font: 600 12px 'Kanit'; color: #fde68a; }

/* ---------------------------------------------------------------- drop cards */
#loot-feed .loot-item { display: none !important; }
.drop-card { display: flex; align-items: center; gap: 8px; min-width: 190px; max-width: 290px; padding: 4px 10px 4px 4px; background: linear-gradient(90deg, rgba(15, 12, 34, .95), rgba(30, 27, 60, .85)); border-left: 3px solid #64748b; box-shadow: 0 2px 0 #000, inset 0 0 0 1px rgba(255, 255, 255, .06); animation: dcIn .28s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .5s, transform .5s; }
.drop-card.out { opacity: 0; transform: translateX(30px); }
.drop-card.g1 { border-left-color: #4ade80; } .drop-card.g2 { border-left-color: #60a5fa; } .drop-card.g3 { border-left-color: #c084fc; }
.drop-card.g4 { border-left-color: #fb923c; } .drop-card.g5 { border-left-color: #ff2a5f; }
.drop-card.rare { background: linear-gradient(90deg, rgba(120, 53, 15, .95), rgba(30, 27, 60, .9)); box-shadow: 0 0 14px rgba(251, 146, 60, .6), 0 2px 0 #000; }
.drop-card.mate { opacity: .92; border-left-style: dashed; }
.drop-card.gold, .drop-card.title { min-width: 0; padding: 4px 10px; }
.dc-ico { position: relative; width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: #0b0816; border: 1px solid #334155; }
.dc-ico.g2 { border-color: #60a5fa; } .dc-ico.g3 { border-color: #c084fc; box-shadow: 0 0 6px #c084fc; } .dc-ico.g4 { border-color: #fb923c; box-shadow: 0 0 8px #fb923c; } .dc-ico.g5 { border-color: #ff2a5f; box-shadow: 0 0 10px #ff2a5f; }
.dc-ico img { width: 30px; height: 30px; }
.dc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dc-txt small { font-size: 10px; color: #a5b4fc; }
.dc-txt b { font: 600 13px 'Kanit', sans-serif; overflow-wrap: anywhere; }
.dc-txt i { font-style: normal; font-size: 10.5px; }
.dc-q { color: #fde68a; }
.dc-cardtag { color: #f472b6; }
.dc-gold { font: 700 13px 'Kanit'; color: #fbbf24; }
.dc-title { font: 600 12.5px 'Kanit'; color: #fde68a; }
@keyframes dcIn { from { opacity: 0; transform: translateX(40px) scale(.9); } }

/* ---------------------------------------------------------------- rare-drop celebration */
#rare-pop { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; background: radial-gradient(circle, rgba(0, 0, 0, .35), rgba(0, 0, 0, .8)); }
#rare-pop.show { display: grid; animation: rpFade .3s; }
.rp-rays { position: absolute; width: 900px; height: 900px; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 45%, transparent) 0 8deg, transparent 8deg 22deg); border-radius: 50%; mask: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); animation: rpSpin 12s linear infinite; }
.rp-card { position: relative; width: min(380px, 92vw); padding: 18px 18px 16px; text-align: center; background: var(--px-dither), linear-gradient(#2d2456, #120d26); box-shadow: var(--px-frame), 0 0 60px color-mix(in srgb, var(--rc) 70%, transparent); animation: rpPop .5s cubic-bezier(.2, 1.6, .4, 1); }
.rp-top { font: 700 20px 'Kanit'; color: var(--rc); text-shadow: 0 2px 0 #000, 0 0 16px var(--rc); letter-spacing: .5px; }
.rp-ico { width: 96px; height: 96px; margin: 12px auto; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent), transparent 70%); animation: rpFloat 2s ease-in-out infinite; }
.rp-ico img { width: 84px; height: 84px; filter: drop-shadow(0 0 10px var(--rc)); }
.rp-name { font: 700 19px 'Kanit'; text-shadow: 0 2px 0 #000; }
.rp-sub { font-size: 12px; color: #c7d2fe; margin: 2px 0 8px; }
.rp-stats { max-height: 160px; overflow-y: auto; margin-bottom: 12px; padding: 6px 8px; text-align: left; background: rgba(0, 0, 0, .3); font-size: 12px; }
.rp-stats .tt-title, .rp-stats .tt-sub { display: none; }
.rp-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rp-confetti i { position: absolute; top: -12px; left: var(--x); width: 7px; height: 11px; background: hsl(var(--h), 90%, 60%); animation: rpDrop 2.6s var(--d) linear infinite; }
@keyframes rpSpin { to { transform: rotate(360deg); } }
@keyframes rpPop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
@keyframes rpFloat { 50% { transform: translateY(-6px); } }
@keyframes rpFade { from { opacity: 0; } }
@keyframes rpDrop { to { transform: translateY(105vh) rotate(720deg); } }

/* ---------------------------------------------------------------- milestone / announce / profile */
.ms-card { text-align: center; max-width: 420px; }
.ms-ico { font-size: 54px; filter: drop-shadow(0 0 14px #fbbf24); animation: rpFloat 1.8s infinite; }
.ms-card p { font-size: 13.5px; line-height: 1.7; }
#gm-announce { position: absolute; top: 64px; left: 50%; z-index: 80; display: none; align-items: center; gap: 12px; max-width: min(640px, 92vw); padding: 10px 18px; transform: translateX(-50%); background: linear-gradient(90deg, #7c2d12, #b45309 50%, #7c2d12); color: #fff; box-shadow: var(--px-frame-sm), 0 0 30px rgba(251, 191, 36, .5); cursor: pointer; }
#gm-announce.show { display: flex; animation: rpPop .5s cubic-bezier(.2, 1.4, .4, 1); }
#gm-announce .ga-ico { font-size: 26px; }
#gm-announce small { display: block; font-size: 11px; color: #fde68a; }
#gm-announce b { font: 600 15px 'Kanit'; overflow-wrap: anywhere; }
.pc-card { max-width: 700px; }
.pc-img { display: block; width: 100%; image-rendering: auto; box-shadow: 0 4px 0 #000; margin: 8px 0; }
.char-v3 { margin-top: 10px; padding: 8px; background: rgba(76, 29, 149, .18); border: 1px solid #4c3d8f; }
.cv3-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.cv3-chip { padding: 3px 8px; background: #231c40; border: 1px solid #5b51a8; font-size: 12px; }
.cv3-life { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; }
.rb-box { margin-top: 8px; padding: 8px 10px; background: linear-gradient(90deg, rgba(180, 83, 9, .35), rgba(76, 29, 149, .3)); border: 1px solid #b45309; display: grid; gap: 4px; }
.rb-h { font: 700 15px 'Kanit'; color: #fde68a; }

/* ---------------------------------------------------------------- emotes */
#emote-btn { padding: 4px 8px; font-size: 16px; }
#mob-emote { font-size: 20px; }
#emote-pop { position: fixed; z-index: 300; width: min(300px, 94vw); padding: 8px; background: var(--px-dither), linear-gradient(#231c40, #1a1531); box-shadow: var(--px-frame-sm); }
#emote-pop.hidden { display: none; }
.ep-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.ep-tabs button { flex: 1; padding: 5px; border: 1px solid #4c3d8f; background: #1a1531; color: var(--text); cursor: pointer; font: 600 12px 'Kanit'; }
.ep-tabs button.on { background: #4c3d8f; color: #fde68a; }
.ep-tabs .ep-x { flex: none; width: 30px; }
.ep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ep-grid button { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border: 1px solid #332a5e; background: #120d26; color: var(--text); cursor: pointer; }
.ep-grid button:hover { background: #2d2456; transform: translateY(-1px); }
.ep-grid span { font-size: 22px; line-height: 1.2; }
.ep-grid small { font-size: 10px; color: #c7d2fe; }

/* ---------------------------------------------------------------- events */
.ev-mults { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-mult { display: flex; flex-direction: column; align-items: center; padding: 8px; background: var(--v3-card); border: 1px solid #334155; }
.ev-mult span { font-size: 22px; } .ev-mult b { font: 700 20px 'Kanit'; color: #cbd5e1; } .ev-mult small { font-size: 11px; color: var(--dim); }
.ev-mult.up { border-color: #22c55e; background: rgba(21, 128, 61, .2); } .ev-mult.up b { color: #86efac; }
.ev-list { display: grid; gap: 6px; }
.ev-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--v3-card); border: 1px solid #2d2456; }
.ev-row.on { border-color: #fbbf24; background: linear-gradient(90deg, rgba(180, 83, 9, .35), var(--v3-card)); }
.ev-ico { font-size: 28px; }
.ev-main { flex: 1; min-width: 0; }
.ev-tags { display: flex; gap: 4px; margin-top: 3px; } .ev-tags span { padding: 1px 6px; background: #231c40; border: 1px solid #5b51a8; font-size: 11px; color: #fde68a; }
.ev-when { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; text-align: right; }
.ev-live { color: #4ade80; font-weight: 700; animation: v3pulse 1.6s infinite; }

/* ---------------------------------------------------------------- arena */
.arena-hero { display: flex; gap: 14px; align-items: center; padding: 12px; background: linear-gradient(110deg, color-mix(in srgb, var(--tc) 35%, #120d26), #120d26 70%); border: 2px solid var(--tc); box-shadow: 0 0 18px color-mix(in srgb, var(--tc) 45%, transparent); }
.arena-badge { width: 76px; height: 76px; display: grid; place-items: center; font-size: 44px; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 55%, transparent), transparent 70%); animation: rpFloat 2.4s infinite; }
.arena-info { flex: 1; }
.arena-tier { font: 700 22px 'Kanit'; color: var(--tc); text-shadow: 0 2px 0 #000; }
.arena-bar { position: relative; height: 16px; margin-top: 6px; background: #0b0816; border: 1px solid #4c3d8f; }
.arena-bar div { height: 100%; background: linear-gradient(90deg, var(--tc), #fde68a); }
.arena-bar span { position: absolute; inset: 0; font: 600 10.5px/16px 'Kanit'; text-align: center; text-shadow: 0 1px 0 #000; }
.arena-q { width: 100%; margin: 10px 0 6px; }
.arena-rules { padding: 6px 8px; background: rgba(0, 0, 0, .25); line-height: 1.6; }
.arena-tiers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.arena-t { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent); background: #120d26; font-size: 11px; opacity: .7; }
.arena-t span { font-size: 20px; } .arena-t.on { opacity: 1; background: color-mix(in srgb, var(--tc) 25%, #120d26); box-shadow: 0 0 10px var(--tc); }
.arena-result { text-align: center; padding: 14px 26px; background: rgba(15, 12, 34, .92); box-shadow: var(--px-frame); }
.arena-result.win .ar-big { color: #fde047; } .arena-result.lose .ar-big { color: #f87171; }
.ar-big { font: 700 36px 'Kanit'; text-shadow: 0 3px 0 #000; } .ar-delta { font: 600 15px 'Kanit'; } .ar-gold { color: #fbbf24; font-weight: 700; }

/* ---------------------------------------------------------------- party board */
.pb-hero button { margin-left: auto; }
.pb-form { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pb-form input { flex: 1; min-width: 160px; }
.pb-list { display: grid; gap: 6px; }
.pb-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--v3-card); border-left: 4px solid var(--c); }
.pb-row.own { background: rgba(76, 29, 149, .3); }
.pb-cls { font-size: 26px; }
.pb-main { flex: 1; min-width: 0; font-size: 13px; }
.pb-tag { padding: 1px 6px; background: #231c40; border: 1px solid #5b51a8; font-size: 11px; }
.pb-text { margin: 3px 0; color: #fef3c7; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- wardrobe */
.wd { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.wd-left { text-align: center; padding: 8px; background: radial-gradient(circle at 50% 40%, rgba(124, 58, 237, .35), transparent 70%); }
.wd-slot { margin-bottom: 8px; }
.wd-sh { display: flex; gap: 8px; align-items: center; font: 600 13px 'Kanit'; color: #fde68a; margin-bottom: 4px; }
.wd-items { display: flex; gap: 4px; flex-wrap: wrap; }
.wd-it { width: 42px; height: 42px; padding: 2px; border: 2px solid #332a5e; background: #120d26; cursor: pointer; }
.wd-it img { width: 34px; height: 34px; }
.wd-it.on { border-color: var(--v3-gold); box-shadow: 0 0 8px var(--v3-gold); }

/* ---------------------------------------------------------------- GM console */
.adm-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; padding: 8px 10px; background: linear-gradient(90deg, #7f1d1d, #1e1b4b); }
.adm-head > div:nth-child(2) { flex: 1; } .adm-head b { display: block; font: 700 16px 'Kanit'; color: #fde68a; } .adm-head small { color: #fecaca; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-bottom: 10px; }
.adm-card { display: flex; flex-direction: column; padding: 8px; background: var(--v3-card); border: 1px solid #334155; }
.adm-card span { font-size: 18px; } .adm-card b { font: 700 18px 'Kanit'; color: #f1f5f9; } .adm-card small { font-size: 11px; color: var(--dim); }
.adm-card.ok { border-color: #22c55e; } .adm-card.ok b { color: #86efac; } .adm-card.bad { border-color: #ef4444; }
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-bar { display: grid; grid-template-columns: 110px 1fr 30px; gap: 6px; align-items: center; font-size: 12px; margin-bottom: 3px; }
.adm-bar div { height: 10px; background: #0b0816; } .adm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #fde047); }
.adm-ev { padding: 3px 6px; background: rgba(21, 128, 61, .2); margin-bottom: 3px; font-size: 12px; }
.adm-log { max-height: 50vh; overflow-y: auto; font-size: 12px; } .adm-log > div { padding: 3px 0; border-bottom: 1px solid #231c40; }
.adm-op { padding: 0 5px; background: #4c1d95; font-size: 11px; }
.adm-search { display: flex; gap: 6px; margin-bottom: 8px; } .adm-search input { flex: 1; }
.adm-split { display: grid; grid-template-columns: 290px 1fr; gap: 10px; }
.adm-list { max-height: 62vh; overflow-y: auto; display: grid; gap: 3px; align-content: start; }
.adm-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: var(--v3-card); cursor: pointer; border-left: 3px solid transparent; }
.adm-row:hover { background: #2d2456; } .adm-row.sel { border-left-color: var(--v3-gold); background: #3b2f78; }
.adm-cls { font-size: 20px; } .adm-rm { min-width: 0; font-size: 13px; }
.adm-b { margin-left: 4px; padding: 0 5px; font-size: 10px; background: #334155; } .adm-b.on { background: #15803d; } .adm-b.gm { background: #b45309; } .adm-b.ban { background: #b91c1c; } .adm-b.mute { background: #6b21a8; }
.adm-insp { max-height: 66vh; overflow-y: auto; padding-right: 4px; }
.ai-head { display: flex; gap: 10px; padding: 8px; margin-bottom: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, #120d26), #120d26); border: 1px solid var(--c); font-size: 12.5px; line-height: 1.6; }
.ai-ico { font-size: 34px; } .ai-name { font: 700 17px 'Kanit'; color: #fff; }
.adm-warn { margin-top: 4px; padding: 3px 6px; background: rgba(185, 28, 28, .4); } .adm-warn.mute { background: rgba(107, 33, 168, .4); }
.adm-insp details { margin-bottom: 6px; background: var(--v3-card); border: 1px solid #2d2456; }
.adm-insp summary { padding: 6px 8px; cursor: pointer; font: 600 13px 'Kanit'; color: #fde68a; background: #231c40; }
.ai-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; padding: 5px 8px; }
.ai-row input, .ai-row select, .ai-row textarea { min-width: 0; flex: 1 1 120px; }
.adm-bag { padding: 4px 8px; }
.adm-eq { padding: 0 8px 6px; display: grid; gap: 3px; } .adm-eqr { display: grid; grid-template-columns: 70px 1fr auto; gap: 6px; align-items: center; font-size: 12px; }
.adm-box { padding: 10px; margin-bottom: 10px; background: var(--v3-card); border: 1px solid #2d2456; display: grid; gap: 6px; }
.adm-box textarea, .adm-box input { width: 100%; box-sizing: border-box; }
.adm-table { display: grid; gap: 3px; max-height: 36vh; overflow-y: auto; margin-bottom: 10px; }
.adm-tr { display: grid; grid-template-columns: 28px 1.4fr 1fr 1fr 1fr auto; gap: 6px; align-items: center; padding: 4px 6px; background: var(--v3-card); font-size: 12px; }
.adm-tr img { width: 26px; height: 26px; }

/* ---------------------------------------------------------------- premium market */
.mk-banner { position: relative; display: flex; align-items: center; gap: 14px; margin: -4px 0 8px; padding: 12px 14px; overflow: hidden; background: linear-gradient(105deg, #78350f, #b45309 35%, #4c1d95 75%, #1e1b4b); box-shadow: inset 0 0 0 2px rgba(253, 230, 138, .35), 0 3px 0 #000; }
.mk-banner::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .06) 22px 26px); pointer-events: none; animation: mkShine 6s linear infinite; }
@keyframes mkShine { to { background-position: 200px 0; } }
.mk-logo .sf-logo { transform: scale(.9); transform-origin: left center; }
.mk-title { flex: 1; } .mk-title b { display: block; font: 700 22px 'Kanit'; color: #fef3c7; text-shadow: 0 2px 0 #451a03, 0 0 12px rgba(251, 191, 36, .6); } .mk-title span { font: 600 11px 'Kanit'; letter-spacing: 3px; color: #fde68a; }
.mk-stats { display: grid; gap: 4px; text-align: right; font-size: 13px; z-index: 1; } .mk-stats > div { padding: 2px 10px; background: rgba(0, 0, 0, .35); }
.mk-bar { display: flex; gap: 6px; margin-bottom: 6px; } .mk-bar input { flex: 1; min-width: 0; }
.mk-cats { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.mk-cat { padding: 4px 10px; border: 1px solid #4c3d8f; background: #120d26; color: var(--text); cursor: pointer; font: 600 12px 'Kanit'; }
.mk-cat.on { background: linear-gradient(#b45309, #78350f); border-color: #fbbf24; color: #fff; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.mk-card { display: flex; gap: 10px; align-items: center; padding: 7px 8px; background: linear-gradient(90deg, rgba(35, 28, 64, .9), rgba(15, 12, 34, .9)); border: 1px solid #332a5e; border-left: 3px solid #64748b; transition: transform .1s, box-shadow .15s; }
.mk-card:hover { transform: translateY(-1px); box-shadow: 0 3px 0 #000; }
.mk-card.g1 { border-left-color: #4ade80; } .mk-card.g2 { border-left-color: #60a5fa; } .mk-card.g3 { border-left-color: #c084fc; box-shadow: inset 0 0 12px rgba(192, 132, 252, .15); } .mk-card.g4 { border-left-color: #fb923c; box-shadow: inset 0 0 14px rgba(251, 146, 60, .2); } .mk-card.g5 { border-left-color: #ff2a5f; box-shadow: inset 0 0 16px rgba(255, 42, 95, .25); }
.mk-ico { flex: none; cursor: help; }
.mk-info { flex: 1; min-width: 0; } .mk-name { font: 600 14px 'Kanit'; overflow-wrap: anywhere; } .mk-sub { font-size: 11.5px; color: #c7d2fe; } .mk-seller { font-size: 11px; color: var(--dim); }
.mk-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.mk-price { font-size: 14px; } .mk-price b { color: #fbbf24; font-family: 'Kanit'; } .mk-unit, .mk-avg { font-size: 10.5px; color: var(--dim); }
.mk-deal { font-size: 10.5px; color: #cbd5e1; } .mk-deal.good { color: #4ade80; } .mk-deal.bad { color: #f87171; }
.mk-sell { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-sell-form { display: grid; gap: 8px; align-content: start; padding: 10px; background: var(--v3-card); border: 1px solid #4c3d8f; }
.mk-prev { display: flex; gap: 10px; align-items: center; }
.mk-hist { padding: 6px; background: rgba(0, 0, 0, .25); }
.mk-chart { display: flex; align-items: flex-end; gap: 3px; height: 50px; margin-top: 4px; } .mk-chart i { flex: 1; background: linear-gradient(#fde047, #b45309); min-height: 3px; }
.slot.sel { outline: 2px solid var(--v3-gold); outline-offset: 1px; }

/* ---------------------------------------------------------------- guild */
.gd-hero { display: flex; gap: 14px; align-items: center; padding: 12px; margin: -2px 0 8px; background: linear-gradient(110deg, #1e3a8a, #312e81 45%, #120d26); box-shadow: inset 0 0 0 2px rgba(147, 197, 253, .25), 0 3px 0 #000; }
.gd-emblem { position: relative; width: 84px; height: 84px; flex: none; padding: 4px; background: #0b0816; box-shadow: 0 0 0 2px #fbbf24, 0 0 16px rgba(251, 191, 36, .45); }
.gd-emblem img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.gd-emblem.big { width: 96px; height: 96px; }
.gd-up { position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fbbf24; cursor: pointer; font-size: 15px; box-shadow: 0 2px 0 #000; }
.gd-hm { flex: 1; min-width: 0; display: grid; gap: 5px; }
.gd-name { font: 700 21px 'Kanit'; color: #fff; text-shadow: 0 2px 0 #000; overflow-wrap: anywhere; }
.gd-lv { padding: 1px 8px; background: linear-gradient(#fde047, #b45309); color: #1a1026; font-size: 13px; vertical-align: middle; }
.gd-xp { position: relative; height: 14px; background: #0b0816; border: 1px solid #3b82f6; } .gd-xp div { height: 100%; background: linear-gradient(90deg, #38bdf8, #a78bfa); } .gd-xp span { position: absolute; inset: 0; text-align: center; font: 600 10px/14px 'Kanit'; }
.gd-chips { display: flex; gap: 4px; flex-wrap: wrap; } .gd-chips span { padding: 1px 7px; background: rgba(0, 0, 0, .35); font-size: 11.5px; }
.gd-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 5px; max-height: 44vh; overflow-y: auto; }
.gd-m { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: var(--v3-card); border-left: 3px solid var(--c); opacity: .7; }
.gd-m.on { opacity: 1; } .gd-mc { font-size: 22px; } .gd-mm { flex: 1; min-width: 0; font-size: 13px; } .gd-ma { display: flex; gap: 2px; }
.gd-raids { display: grid; gap: 8px; }
.gd-raid { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid #4c3d8f; background: linear-gradient(90deg, rgba(76, 29, 149, .4), var(--v3-card)); }
.gd-raid.r-h { background: linear-gradient(90deg, rgba(3, 105, 161, .45), var(--v3-card)); } .gd-raid.r-x { background: linear-gradient(90deg, rgba(153, 27, 27, .5), var(--v3-card)); border-color: #b91c1c; }
.gd-raid.done { filter: grayscale(.5); }
.gd-rboss { width: 56px; height: 56px; image-rendering: pixelated; background: rgba(0, 0, 0, .3); } .gd-rm { flex: 1; min-width: 0; }
.gd-empty { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--v3-card); }
.gd-perks-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-top: 10px; font-size: 11.5px; } .gd-perks-list > div { display: grid; padding: 4px 6px; background: var(--v3-card); } .gd-perks-list b { color: #fde68a; }

/* ---------------------------------------------------------------- party */
.pt-invite { display: flex; gap: 6px; margin-bottom: 6px; } .pt-invite input { flex: 1; }
.pt-suggest { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.pt-sg { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid #4c3d8f; background: #120d26; color: var(--text); cursor: pointer; font-size: 12px; }
.pt-sg i { font-style: normal; font-size: 10px; padding: 0 4px; background: #231c40; color: #a5b4fc; } .pt-sg:hover { background: #2d2456; }
.pt-members { display: grid; gap: 5px; }
.pt-m { display: flex; gap: 10px; align-items: center; padding: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, #120d26), #120d26); border-left: 4px solid var(--c); }
.pt-m.dead { filter: grayscale(.8); } .pt-mc { font-size: 26px; } .pt-mm { flex: 1; min-width: 0; font-size: 13px; } .pt-mm .bar { margin-top: 3px; }
.pt-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pt-opts label { display: grid; gap: 3px; font-size: 12px; color: var(--dim); }
.pt-feed { max-height: 180px; overflow-y: auto; display: grid; gap: 2px; padding: 4px; background: rgba(0, 0, 0, .25); }
.pf { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; padding: 2px 4px; } .pf small { margin-left: auto; color: var(--dim); font-size: 10.5px; }
.pf-it { display: inline-flex; align-items: center; gap: 2px; } .pf-it img { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- dungeons */
.dg2-list { display: grid; gap: 8px; }
.dg2 { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid #4c3d8f; background: linear-gradient(100deg, var(--dg-a, #14532d) 0%, rgba(15, 12, 34, .92) 55%); box-shadow: 0 2px 0 #000; }
.dg2.th-forest { --dg-a: #166534; } .dg2.th-desert { --dg-a: #92400e; } .dg2.th-snow { --dg-a: #075985; } .dg2.th-volcano { --dg-a: #9a3412; } .dg2.th-swamp { --dg-a: #3f6212; } .dg2.th-sky { --dg-a: #0369a1; } .dg2.th-abyss { --dg-a: #4c1d95; } .dg2.th-meadow { --dg-a: #15803d; }
.dg2.lock { filter: grayscale(.7) brightness(.8); }
.dg2-art { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; background: radial-gradient(circle, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55)); border: 1px solid rgba(255, 255, 255, .15); }
.dg2-art img { width: 56px; height: 56px; image-rendering: pixelated; }
.dg2-lv { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 0 5px; background: #0b0816; color: #fde68a; font: 600 10px 'Kanit'; white-space: nowrap; }
.dg2-main { flex: 1; min-width: 0; }
.dg2-name { font: 700 16px 'Kanit'; color: #fff; text-shadow: 0 2px 0 #000; }
.dg2-meta { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; } .dg2-meta span { padding: 0 6px; background: rgba(0, 0, 0, .35); font-size: 11px; }
.dg2-rec { font-size: 12px; } .dg2-stars { color: #fde047; letter-spacing: 1px; } .dg2-stars i { color: #475569; font-style: normal; }
.dg2-btns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
/* v3.13 dungeon difficulty */
.dg2-diffs { display: flex; gap: 4px; margin: 5px 0 2px; flex-wrap: wrap; }
.dg2-diff { padding: 1px 10px; font: 700 12px 'Kanit', sans-serif; color: var(--dc); background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .18); border-bottom: 2px solid var(--dc); cursor: pointer; white-space: nowrap; }
.dg2-diff i { font-style: normal; color: #fde047; margin-left: 4px; font-size: 10px; letter-spacing: 0; }
.dg2-diff.on { background: var(--dc); color: #0b0816; box-shadow: 0 0 10px var(--dc); } .dg2-diff.on i { color: #0b0816; }
.dg2-diff.lock { opacity: .55; }
.dg2.df-hard { border-color: #fb923c; } .dg2.df-hell { border-color: #f87171; box-shadow: 0 0 12px rgba(248, 113, 113, .35), 0 2px 0 #000; }
.dg2.lock { opacity: 1; filter: none; } .dg2.lock .dg2-art, .dg2.lock .dg2-meta { opacity: .6; } .dg2-btns .tt-bad { max-width: 150px; font-size: 11.5px; text-align: center; }

/* ---------------------------------------------------------------- tower */
.tw-prog { position: relative; height: 16px; margin-bottom: 8px; background: #0b0816; border: 1px solid #b45309; } .tw-prog div { height: 100%; background: linear-gradient(90deg, #b45309, #fde047); } .tw-prog span { position: absolute; inset: 0; text-align: center; font: 600 11px/16px 'Kanit'; }
.tw { display: grid; gap: 3px; max-height: 56vh; overflow-y: auto; padding: 0 16px; background: linear-gradient(90deg, #292524 0 12px, transparent 12px calc(100% - 12px), #292524 calc(100% - 12px)); }
.tw-f { display: flex; gap: 10px; align-items: center; padding: 6px 8px; background: linear-gradient(#44403c, #292524); border: 1px solid #57534e; }
.tw-f.done { background: linear-gradient(#1c3a28, #14281d); border-color: #15803d; opacity: .85; }
.tw-f.next { background: linear-gradient(#78350f, #451a03); border-color: #fbbf24; box-shadow: 0 0 14px rgba(251, 191, 36, .45); }
.tw-f.lock { opacity: .55; }
.tw-f.boss .tw-n b { color: #f87171; }
.tw-n { width: 42px; display: flex; flex-direction: column; align-items: center; } .tw-n b { font: 700 20px 'Kanit'; color: #fde68a; } .tw-n small { font-size: 10px; color: var(--dim); }
.tw-mob { width: 40px; height: 40px; image-rendering: pixelated; } .tw-m { flex: 1; min-width: 0; }
/* v3.11: 100 floors in ten halls */
.tw { max-height: 44vh; position: relative; }
.tw-f.champ .tw-n b { color: #c4b5fd; } .tw-f.here { outline: 2px solid #f87171; outline-offset: -2px; opacity: 1; }
.tw-n small { white-space: nowrap; } .tw-rw { color: #fde68a; } .tw-now { font-size: 18px; }
.tw-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.tw-start { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; font: 700 16px 'Kanit', sans-serif; line-height: 1.25; } .tw-start small { font: 500 11.5px 'Sarabun', sans-serif; opacity: .95; } .tw-chip { padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-weight: 700; }
.tw-from { display: flex; align-items: center; gap: 6px; } .tw-from input { width: 64px; padding: 4px 6px; text-align: center; background: #0b0816; color: #fde68a; border: 1px solid #57534e; border-radius: 4px; font-size: 14px; }
.tw-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px; background: linear-gradient(90deg, #7f1d1d, #451a03); border: 1px solid #f87171; } .tw-live b { color: #fde047; font-size: 17px; }
.tw-rules { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 8px; } .tw-rules span { padding: 2px 8px; font-size: 11.5px; color: #e7e5e4; background: rgba(0, 0, 0, .35); border: 1px solid #57534e; border-radius: 999px; }
.tw-halls { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-bottom: 6px; }
.tw-hall { display: flex; flex-direction: column; align-items: center; padding: 3px 0; background: #292524; color: #e7e5e4; border: 1px solid #57534e; border-bottom: 3px solid var(--tc); cursor: pointer; font-family: inherit; }
.tw-hall b { font-size: 12px; } .tw-hall small { font-size: 9.5px; color: var(--tc); white-space: nowrap; }
.tw-hall.on { background: #78350f; border-color: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, .4); } .tw-hall.lock { opacity: .55; } .tw-hall.done small { color: #86efac; }
.tw-hall-name { margin: 0 0 4px; font: 700 13px 'Kanit', sans-serif; color: #fde68a; }
@media (max-width: 640px) { .tw-halls { grid-template-columns: repeat(5, 1fr); } .tw { max-height: 38vh; } .tw-rw { font-size: 11px; } }

/* ---------------------------------------------------------------- season pass */
.sp-hero { display: flex; align-items: center; gap: 12px; margin: -4px 0 8px; padding: 12px 14px; background: linear-gradient(110deg, #0c4a6e, #4c1d95 50%, #831843); box-shadow: inset 0 0 0 2px rgba(125, 211, 252, .3), 0 3px 0 #000; }
.sp-logo .sf-logo { transform: scale(.85); transform-origin: left center; }
.sp-hm { flex: 1; min-width: 0; }
.sp-kicker { font: 700 11px 'Kanit'; letter-spacing: 4px; color: #7dd3fc; }
.sp-name { font: 700 22px 'Kanit'; color: #fff; text-shadow: 0 2px 0 #000, 0 0 14px rgba(192, 132, 252, .6); }
.sp-sub { font-size: 12px; color: #e0e7ff; }
.sp-tier { display: flex; flex-direction: column; align-items: center; width: 74px; padding: 4px; background: rgba(0, 0, 0, .35); border: 2px solid #fbbf24; }
.sp-tier b { font: 700 30px/1 'Kanit'; color: #fde047; } .sp-tier small { font-size: 10px; color: #fde68a; }
.sp-bar { position: relative; height: 18px; margin-bottom: 10px; background: #0b0816; border: 1px solid #38bdf8; }
.sp-bar div { height: 100%; background: linear-gradient(90deg, #38bdf8, #a78bfa, #f472b6); } .sp-bar span { position: absolute; inset: 0; text-align: center; font: 600 11px/18px 'Kanit'; text-shadow: 0 1px 0 #000; }
.sp-sect { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 5px; font-family: 'Kanit'; color: #fde68a; }
.sp-missions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.sp-m { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: var(--v3-card); border: 1px solid #1e3a8a; font-size: 12px; }
.sp-m.done { border-color: #15803d; background: rgba(21, 128, 61, .2); } .sp-mi { font-size: 20px; } .sp-mm { flex: 1; min-width: 0; } .sp-mm .bar div { background: #38bdf8; } .sp-m.done .sp-mm .bar div { background: #4ade80; }
.sp-mn { font-weight: 700; } .sp-mx { padding: 0 5px; background: #0c4a6e; color: #7dd3fc; font-size: 11px; }
.sp-track { display: flex; gap: 6px; overflow-x: auto; padding: 8px 4px 10px; scroll-behavior: smooth; background: linear-gradient(transparent 46%, rgba(56, 189, 248, .25) 46% 54%, transparent 54%); }
.sp-t { flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 5px; background: linear-gradient(#1e1b4b, #120d26); border: 2px solid #334155; opacity: .8; }
.sp-t.open { opacity: 1; border-color: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, .5); animation: v3pulse 2s infinite; }
.sp-t.got { opacity: 1; border-color: #15803d; background: linear-gradient(#14532d, #0b1f14); }
.sp-t.mid { border-width: 3px; } .sp-t.big { flex-basis: 128px; background: linear-gradient(#78350f, #451a03); border-color: #f59e0b; }
.sp-t.cur { transform: translateY(-4px); box-shadow: 0 0 0 2px #38bdf8, 0 6px 0 #000; }
.sp-tn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #0b0816; border: 2px solid #38bdf8; font: 700 13px 'Kanit'; color: #fff; }
.sp-t.big .sp-tn { border-color: #fde047; color: #fde047; }
.sp-tr { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 44px; }
.pr { display: inline-flex; align-items: center; gap: 1px; padding: 1px 4px; background: rgba(0, 0, 0, .35); font-size: 10.5px; } .pr img { width: 18px; height: 18px; } .pr em { font-style: normal; } .pr.pt { color: #fde68a; }
.sp-ts { font-size: 11px; color: var(--dim); } .sp-ts.ok { color: #4ade80; }

/* ---------------------------------------------------------------- achievements & mounts */
.ach-hero { display: flex; gap: 14px; align-items: center; margin: -2px 0 8px; padding: 10px 12px; background: linear-gradient(110deg, #713f12, #1e1b4b 70%); box-shadow: inset 0 0 0 2px rgba(253, 224, 71, .25), 0 3px 0 #000; }
.ach-hero > div:nth-child(2) { flex: 1; }
.ach-ring { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#fde047 calc(var(--p) * 1%), #1e1b4b 0); box-shadow: 0 0 0 3px #0b0816; }
.ach-ring b { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #120d26; font: 700 14px 'Kanit'; color: #fde68a; }
.ach-row { border-left: 3px solid #334155; background: var(--v3-card); } .ach-row.ready { border-left-color: #fbbf24; box-shadow: inset 0 0 14px rgba(251, 191, 36, .2); } .ach-row.claimed { border-left-color: #15803d; opacity: .75; }
.mt-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -2px 0 8px; padding: 10px 12px; background: linear-gradient(110deg, #78350f, #365314 60%, #120d26); box-shadow: inset 0 0 0 2px rgba(253, 230, 138, .3), 0 3px 0 #000; }
.mt-logo .sf-logo { transform: scale(.85); transform-origin: left center; }
.mt-bm { flex: 1; min-width: 160px; }
.mt-nav { animation: v3pulse 2s infinite; }
.mt-here { padding: 4px 10px; background: rgba(21, 128, 61, .4); font-size: 12px; }

/* ---------------------------------------------------------------- touch-friendly close buttons, mobile layout */
#panels .panel-x, #npc-dialog .panel-x { min-width: 30px; min-height: 30px; }
@media (hover: none) { #panels .panel-x, #npc-dialog .panel-x { min-width: 40px; min-height: 40px; font-size: 18px; } }
@media (max-width: 900px) {
  #act-dock { right: 142px; top: 6px; grid-template-columns: repeat(2, 38px); gap: 3px; }
  .dock-btn { height: 36px; } .dock-btn .pxi { width: 20px; height: 20px; } .dock-btn span { font-size: 7.5px; }
  #hud.no-mm #act-dock { right: 56px; }
  #hud.qt-mobile #quest-tracker { display: block !important; top: auto; bottom: 150px; right: auto; left: 8px; width: 200px; max-height: 26vh; z-index: 7; }
  #gather-bar { bottom: 190px; }
  .gd-cols, .gd-grid, .st-cols, .mk-sell, .adm-2col, .adm-split, .wd, .pt-opts, .sp-missions { grid-template-columns: 1fr; }
  .gd-classes { grid-template-columns: repeat(2, 1fr); }
  .arena-tiers { grid-template-columns: repeat(3, 1fr); }
  .mk-grid { grid-template-columns: 1fr; max-height: 48vh; }
  .adm-list { max-height: 28vh; }
  .adm-tr { grid-template-columns: 26px 1fr 1fr auto; } .adm-tr span:nth-of-type(3), .adm-tr small { display: none; }
  .mk-banner, .sp-hero, .gd-hero { flex-wrap: wrap; }
  .mk-logo, .sp-logo, .mt-logo { display: none; }
  .drop-card { min-width: 0; max-width: 72vw; }
  #close-all { top: auto; bottom: 64px; }
}
@media (max-width: 540px) {
  #act-dock { right: 134px; grid-template-columns: repeat(2, 32px); }
  .dock-btn { height: 32px; } .dock-btn span { display: none; }
  .dg2 { flex-wrap: wrap; } .dg2-btns { flex-direction: row; width: 100%; } .dg2-btns .btn { flex: 1; }
  .ev-mults { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .sp-t { flex-basis: 92px; }
}

/* ---------------------------------------------------------------- v3.0 phone fixes: names and chat text were cut off */
@media (max-width: 900px) {
  .hud-name { white-space: normal; overflow: visible; line-height: 1.35; padding-top: 1px; }
  #hud-name { font-size: 13px; overflow-wrap: anywhere; }
  #hud-class { display: none; }
  #chat-form #emote-btn { display: none; }
  #chat.kb #chat-form #emote-btn { display: inline-block; }
  #chat-log { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
  #chat-input { min-width: 90px; }
}
@media (max-width: 900px) and (orientation: landscape) and (max-height: 560px) {
  #chat { width: min(310px, 40vw); }
  #chat-log { height: 66px; }
  #act-dock { top: 52px; grid-template-columns: repeat(2, 34px); gap: 3px; }
  .dock-btn { height: 32px; } .dock-btn span { display: none; } .dock-btn .pxi { width: 22px; height: 22px; }
}

/* ---------------------------------------------------------------- v3.1 Premium promotion window & Premium tab */
.pm-wrap { position: relative; display: grid; place-items: center; max-width: 94vw; }
.pm-rays { position: absolute; width: 760px; height: 760px; border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(251, 191, 36, .22) 0 7deg, transparent 7deg 20deg); mask: radial-gradient(circle, #000 18%, transparent 62%); -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); animation: rpSpin 18s linear infinite; }
#modal .pm-card { position: relative; width: min(560px, 94vw); max-height: 92dvh; overflow-y: auto; padding: 16px 18px 12px; background: var(--px-dither), radial-gradient(circle at 50% 0%, rgba(251, 191, 36, .28), transparent 55%), linear-gradient(#3b1d6e, #160d33 60%, #0d0822) !important; box-shadow: var(--px-frame), 0 0 60px rgba(251, 191, 36, .35) !important; animation: rpPop .45s cubic-bezier(.2, 1.5, .4, 1); }
.pm-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; background: #7f1d1d; color: #fff; font-size: 16px; cursor: pointer; box-shadow: var(--px-frame-sm); z-index: 2; }
.pm-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin-bottom: 10px; }
.pm-kicker { font: 700 12px 'Kanit', sans-serif; letter-spacing: 6px; background: linear-gradient(90deg, #fde68a, #f59e0b, #fef3c7, #f59e0b, #fde68a); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pmShine 3s linear infinite; }
.pm-title { font: 700 28px/1.2 'Kanit', sans-serif; color: #fff7d6; text-shadow: 0 3px 0 #451a03, 0 0 18px rgba(251, 191, 36, .7); }
.pm-title.sm { font-size: 20px; }
.pm-sub { font-size: 12.5px; color: #e9d5ff; }
@keyframes pmShine { to { background-position: -200% 0; } }
.pm-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.pm-perk { display: flex; gap: 8px; align-items: center; padding: 7px 9px; background: rgba(15, 12, 34, .7); border: 1px solid rgba(251, 191, 36, .35); }
.pm-perk span { font-size: 22px; filter: drop-shadow(0 0 6px rgba(251, 191, 36, .6)); }
.pm-perk b { display: block; font: 600 13px 'Kanit'; color: #fde68a; }
.pm-perk small { font-size: 11px; color: #cbd5e1; line-height: 1.35; }
.pm-perks.mini { grid-template-columns: repeat(2, auto); gap: 4px; margin: 0; }
.pm-perks.mini .pm-perk { padding: 3px 7px; } .pm-perks.mini .pm-perk span { font-size: 15px; } .pm-perks.mini .pm-perk b { font-size: 11.5px; }
.pm-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.pm-plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 12px; text-align: center; background: linear-gradient(#2d2456, #160d33); box-shadow: inset 0 0 0 2px #6d5fb8, 0 3px 0 #000; overflow: hidden; }
.pm-plan.best { background: linear-gradient(#78350f, #3b1305); box-shadow: inset 0 0 0 2px #fbbf24, 0 0 18px rgba(251, 191, 36, .45), 0 3px 0 #000; animation: v3glow 2.4s ease-in-out infinite; }
@keyframes v3glow { 50% { box-shadow: inset 0 0 0 2px #fde68a, 0 0 28px rgba(251, 191, 36, .75), 0 3px 0 #000; } }
.pm-best { position: absolute; top: 0; left: 0; right: 0; padding: 1px 0; background: #fbbf24; color: #1a1026; font: 700 11px 'Kanit'; }
.pm-ribbon { position: absolute; top: 18px; right: -30px; width: 100px; transform: rotate(35deg); background: #dc2626; color: #fff; font: 700 12px/20px 'Kanit'; box-shadow: 0 2px 0 #000; }
.pm-days { margin-top: 6px; font: 700 20px 'Kanit'; color: #fff; }
.pm-price { font-size: 16px; } .pm-price b { font: 700 26px 'Kanit'; color: #7dd3fc; text-shadow: 0 2px 0 #000; }
.pm-reg { font-size: 11px; color: #cbd5e1; } .pm-reg s { color: #f87171; }
.pm-buy { width: 100%; margin-top: 4px; }
.pm-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.pm-foot b { color: #7dd3fc; }
.pm-note { margin-top: 6px; font-size: 10.5px; color: #94a3b8; text-align: center; }
.premium-banner.pm-banner { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 12px 14px; border: 0; border-radius: 0; background: radial-gradient(circle at 20% 0%, rgba(251, 191, 36, .3), transparent 60%), linear-gradient(110deg, #4c1d95, #1e1b4b); box-shadow: inset 0 0 0 2px rgba(251, 191, 36, .45), 0 3px 0 #000; }
.pm-banner .pm-bm { display: grid; gap: 2px; }
.pm-banner .pm-perks.mini { grid-column: 1 / -1; }
.pm-banner .sf-logo { transform: scale(.85); transform-origin: left center; }
@media (max-width: 600px) {
  .pm-perks, .pm-plans { grid-template-columns: 1fr; }
  .pm-title { font-size: 22px; }
  .premium-banner.pm-banner { grid-template-columns: 1fr; }
  .pm-banner .pm-bl { display: none; }
}
.pm-foot label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* ---------------------------------------------------------------- v3.2 god weapon shop cards */
.god-item-card { position: relative; background: radial-gradient(circle at 50% 0%, rgba(255, 42, 95, .18), transparent 60%), linear-gradient(#231c40, #120d26) !important; box-shadow: inset 0 0 0 1px rgba(255, 42, 95, .35), 0 2px 0 #000; }
.god-item-card.mine { box-shadow: inset 0 0 0 2px #fbbf24, 0 0 16px rgba(251, 191, 36, .45), 0 2px 0 #000; }
.gic-icon { width: 56px; height: 56px; margin: 0 auto 4px; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 42, 95, .45), transparent 70%); animation: rpFloat 2.4s ease-in-out infinite; }
.gic-icon img { width: 52px; height: 52px; filter: drop-shadow(0 0 6px rgba(255, 42, 95, .8)); }
.gic-you { padding: 0 5px; background: #fbbf24; color: #1a1026; font-size: 10px; vertical-align: middle; }

/* ---------------------------------------------------------------- v3.4 backups (GM) */
.adm-backup { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.adm-bk-list { flex: 1; min-width: 220px; font-size: 12px; }
.adm-bk-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid #231c40; }
.adm-bk-list small { color: #94a3b8; white-space: nowrap; }

/* ---------------------------------------------------------------- v3.4 arena seasons */
.as-box { margin: 10px 0; padding: 10px; background: linear-gradient(#1b1438, #120d26); border: 2px solid #3b2f6b; box-shadow: inset 0 0 0 1px #000; }
.as-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.as-head b { color: #fde68a; font-size: 15px; } .as-head span { color: #c4b5fd; font-size: 12px; }
.as-note { margin: 6px 0; padding: 5px 8px; font-size: 12px; background: rgba(245, 158, 11, .12); border-left: 3px solid #f59e0b; }
.as-note.ok { background: rgba(74, 222, 128, .1); border-left-color: #4ade80; }
.as-rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px; }
.as-rw { display: flex; gap: 6px; align-items: center; padding: 5px 6px; background: #120d26; border: 1px solid color-mix(in srgb, var(--tc) 45%, #231c40); font-size: 12px; }
.as-rw > span { font-size: 20px; } .as-rw b { color: var(--tc); display: block; } .as-rw small { color: #cbd5e1; font-size: 10.5px; line-height: 1.35; display: block; }
.as-rw.on { border: 2px solid var(--tc); box-shadow: 0 0 12px color-mix(in srgb, var(--tc) 55%, transparent); background: color-mix(in srgb, var(--tc) 14%, #120d26); }
.as-top { margin-top: 6px; color: #cbd5e1; line-height: 1.5; }
.as-frame { margin-top: 6px; color: #67e8f9; font-size: 12px; }
.as-last { margin-top: 8px; } .as-lt { color: #fde68a; font-weight: bold; font-size: 13px; margin-bottom: 3px; }
.as-lr { display: flex; gap: 6px; align-items: center; padding: 3px 6px; font-size: 13px; } .as-lr small { margin-left: auto; color: #c4b5fd; }
.as-hist { margin-top: 6px; color: #94a3b8; }

/* ---------------------------------------------------------------- v3.4 password */
.pw-card { display: flex; flex-direction: column; gap: 8px; min-width: min(340px, 90vw); }
.pw-title { font-size: 16px; font-weight: bold; color: #fde68a; }
.pw-card input { width: 100%; box-sizing: border-box; }
.pw-msg { color: #94a3b8; } .pw-msg.ok { color: #4ade80; } .pw-msg.bad { color: #f87171; }

/* ---------------------------------------------------------------- v3.4 castle siege */
.siege { display: flex; flex-direction: column; gap: 10px; }
.sg-hero { display: flex; gap: 14px; align-items: center; padding: 14px; background: linear-gradient(115deg, #3b1d0e, #1a1030 55%, #0b0716); border: 2px solid #b45309; box-shadow: 0 0 20px rgba(245, 158, 11, .25), inset 0 0 0 1px #000; position: relative; overflow: hidden; }
.sg-hero.live { border-color: #ef4444; box-shadow: 0 0 24px rgba(239, 68, 68, .45), inset 0 0 0 1px #000; animation: sgGlow 2s infinite; }
@keyframes sgGlow { 50% { box-shadow: 0 0 34px rgba(239, 68, 68, .7), inset 0 0 0 1px #000; } }
.sg-castle { position: relative; width: 84px; height: 72px; flex: none; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(253, 230, 138, .35), transparent 70%); }
.sg-castle b { font-size: 50px; filter: drop-shadow(0 3px 0 #000); animation: rpFloat 3s ease-in-out infinite; }
.sg-castle i { position: absolute; width: 3px; height: 3px; background: #fde68a; box-shadow: 0 0 6px #fde68a; animation: v3pulse 1.6s infinite; }
.sg-castle i:nth-child(1) { left: 8px; top: 10px; } .sg-castle i:nth-child(2) { right: 10px; top: 4px; animation-delay: .5s; } .sg-castle i:nth-child(3) { right: 4px; bottom: 12px; animation-delay: 1s; }
.sg-hm { flex: 1; min-width: 0; }
.sg-name { font-size: 20px; font-weight: bold; color: #fde68a; text-shadow: 0 2px 0 #000; letter-spacing: .5px; }
.sg-owner { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; flex-wrap: wrap; }
.sg-emb { width: 24px; height: 24px; image-rendering: pixelated; border: 1px solid #fbbf24; background: #0b0716; }
.sg-emb.none { display: inline-grid; place-items: center; font-size: 14px; }
.sg-status { font-size: 13px; color: #e2e8f0; }
.sg-live { color: #fff; background: #dc2626; padding: 0 6px; font-weight: bold; animation: v3pulse 1.2s infinite; }
.sg-core { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.sg-core > span { white-space: nowrap; color: #fca5a5; }
.sg-bar { position: relative; flex: 1; height: 18px; background: #1e1b2e; border: 2px solid #000; }
.sg-bar > div { height: 100%; background: linear-gradient(#fb7185, #be123c); transition: width .3s; }
.sg-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 11px; text-shadow: 0 1px 0 #000; }
.sg-join { animation: v3pulse 1.6s infinite; }
.sg-top { display: flex; flex-direction: column; gap: 3px; }
.sg-tr { display: grid; grid-template-columns: 20px minmax(90px, 160px) 1fr auto; gap: 6px; align-items: center; font-size: 12px; }
.sg-tr > span { color: #fde68a; font-weight: bold; } .sg-tr > div { height: 8px; background: #1e1b2e; } .sg-tr > div i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.sg-card { padding: 8px 10px; background: #120d26; border: 1px solid #3b2f6b; font-size: 12px; }
.sg-card ul { margin: 4px 0 0; padding-left: 16px; line-height: 1.55; color: #cbd5e1; }
.sg-ct { font-weight: bold; color: #fde68a; font-size: 13px; }
.sg-treasury { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: rgba(245, 158, 11, .1); border: 1px solid #b45309; font-size: 13px; }
.sg-treasury b { color: #fde047; }
.sg-hist > div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #231c40; font-size: 12px; } .sg-hist small { color: #94a3b8; }
#siege-bar { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 30; width: min(520px, 92vw); padding: 6px 10px; background: rgba(20, 8, 16, .88); border: 2px solid #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, .45); pointer-events: none; font-size: 12px; }
#siege-bar.hidden { display: none; }
.sb-row { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; } .sb-row b { color: #fde68a; } .sb-mine { color: #4ade80; font-weight: bold; }
.sb-core { position: relative; height: 14px; margin-top: 4px; background: #1e1b2e; border: 1px solid #000; }
.sb-core > div { height: 100%; background: linear-gradient(#fb7185, #be123c); transition: width .3s; }
.sb-core em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 10.5px; text-shadow: 0 1px 0 #000; }
.sb-top { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; color: #cbd5e1; font-size: 11px; }
@media (max-width: 700px) { #siege-bar { top: 48px; font-size: 11px; } .sg-castle { width: 60px; height: 56px; } .sg-castle b { font-size: 36px; } .sg-name { font-size: 17px; } }

/* ---------------------------------------------------------------- v3.5 HD-2D (hd2d.js) */
#game3d { position: fixed; inset: 0; width: 100vw; height: 100vh; display: none; image-rendering: pixelated; }
body.hd2d #game3d { display: block; }
#hd-fx { position: fixed; inset: 0; pointer-events: none; display: none; }
body.hd2d #hd-fx { display: block; }
.hd-dof { position: absolute; left: 0; right: 0; -webkit-backdrop-filter: blur(1.6px); backdrop-filter: blur(1.6px); }
.hd-dof.top { top: 0; height: 20%; -webkit-mask-image: linear-gradient(#000 0%, rgba(0,0,0,.55) 45%, transparent 100%); mask-image: linear-gradient(#000 0%, rgba(0,0,0,.55) 45%, transparent 100%); }
.hd-dof.bot { bottom: 0; height: 16%; -webkit-mask-image: linear-gradient(transparent 0%, rgba(0,0,0,.55) 55%, #000 100%); mask-image: linear-gradient(transparent 0%, rgba(0,0,0,.55) 55%, #000 100%); }
body.hd-nodof .hd-dof { display: none; }
.hd-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 58%, rgba(8, 4, 20, .38) 100%); }
.hd-haze { position: absolute; left: 0; right: 0; top: 0; height: 32%; background: linear-gradient(var(--haze, rgba(210, 230, 255, .14)), transparent); }

/* ---------------------------------------------------------------- v3.5 siege countdown · GM stats */
#event-ticker-login { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.evt-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: linear-gradient(90deg, rgba(245, 158, 11, .18), rgba(18, 13, 38, .6)); border: 1px solid #b45309; }
.evt-row > span { font-size: 22px; } .evt-row b { display: block; color: #fde68a; font-size: 13px; } .evt-row small { color: #cbd5e1; font-size: 11.5px; }
.evt-row.arena { background: linear-gradient(90deg, rgba(192, 132, 252, .16), rgba(18, 13, 38, .6)); border-color: #7c3aed; }
.evt-row.live { border-color: #ef4444; animation: sgGlow 2s infinite; }
#siege-chip { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 25; padding: 4px 12px; font: inherit; font-size: 12px; color: #fde68a; background: rgba(20, 12, 36, .88); border: 2px solid #b45309; cursor: pointer; white-space: nowrap; }
#siege-chip.hidden { display: none; }
#siege-chip.soon { border-color: #f59e0b; animation: v3pulse 1.4s infinite; }
#siege-chip.live { color: #fff; background: rgba(127, 29, 29, .9); border-color: #ef4444; animation: v3pulse 1.2s infinite; }
body.hud-hidden #siege-chip { visibility: hidden; }
@media (max-width: 700px) { #siege-chip { top: 48px; font-size: 11px; } }
.st-bars { display: flex; gap: 3px; align-items: flex-end; height: 110px; padding: 4px 2px 0; background: #0f0b20; border: 1px solid #231c40; overflow-x: auto; }
.st-bars.tall { height: 150px; }
.st-col { flex: 1; min-width: 14px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.st-stack { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.st-stack i { position: absolute; bottom: 0; width: 70%; background: linear-gradient(#a78bfa, #6d28d9); }
.st-stack i.b2 { width: 90%; background: rgba(74, 222, 128, .55); }
.st-bars:not(.tall) .st-stack i.b2 { background: rgba(167, 139, 250, .3); }
.st-col em { font-style: normal; font-size: 10px; color: #e2e8f0; }
.st-col small { font-size: 9.5px; color: #94a3b8; white-space: nowrap; height: 13px; }
.st-note { margin-top: 4px; font-size: 12px; color: #fde68a; }
.st-h { display: flex; flex-direction: column; gap: 3px; }
.st-hr { display: grid; grid-template-columns: minmax(80px, 130px) 1fr auto; gap: 6px; align-items: center; font-size: 12px; }
.st-hr > div { height: 9px; background: #1e1b2e; } .st-hr > div i { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #6366f1); }
.st-hr b { font-weight: normal; color: #cbd5e1; font-size: 11px; }
.st-tbl { width: 100%; border-collapse: collapse; font-size: 12px; } .st-tbl th, .st-tbl td { padding: 3px 5px; border-bottom: 1px solid #231c40; text-align: center; } .st-tbl th { color: #c4b5fd; font-weight: normal; }

/* ---------------------------------------------------------------- v3.7 story scenes · region banners */
#story-scene { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center; padding: 0 12px 110px; background: linear-gradient(transparent 45%, rgba(6, 3, 16, .55)); }
#story-scene.show { display: flex; }
.ss-card { width: min(720px, 100%); background: linear-gradient(#1b1438f2, #0f0b20f2); border: 2px solid #b45309; box-shadow: 0 0 0 2px #000, 0 10px 40px rgba(0, 0, 0, .6); padding: 10px 14px; animation: ssIn .25s ease-out; }
@keyframes ssIn { from { transform: translateY(16px); opacity: 0; } }
.ss-title { font-size: 12px; color: #fbbf24; letter-spacing: .5px; margin-bottom: 6px; }
.ss-body { display: flex; gap: 12px; align-items: flex-start; }
.ss-portrait { flex: none; width: 84px; height: 110px; background: radial-gradient(circle at 50% 40%, rgba(253, 230, 138, .25), transparent 70%); border: 1px solid #3b2f6b; }
.ss-portrait canvas { image-rendering: pixelated; }
.ss-main { flex: 1; min-width: 0; }
.ss-name { font-weight: bold; color: #fde68a; font-size: 15px; } .ss-name small { color: #c4b5fd; font-weight: normal; font-size: 11px; }
.ss-text { margin-top: 4px; min-height: 60px; font-size: 15px; line-height: 1.6; color: #f1f5f9; }
#story-scene.narr .ss-text { font-style: italic; color: #e9d5ff; text-align: center; }
.ss-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 6px; } .ss-foot span { margin-right: auto; color: #94a3b8; font-size: 11px; }
#area-banner { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); z-index: 40; pointer-events: none; text-align: center; opacity: 0; }
#area-banner.show { animation: abShow 3.4s ease forwards; }
@keyframes abShow { 0% { opacity: 0; transform: translate(-50%, 8px); } 12% { opacity: 1; transform: translate(-50%, 0); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.ab-name { font-size: 26px; font-weight: bold; color: #fef3c7; text-shadow: 0 2px 0 #000, 0 0 18px rgba(251, 191, 36, .55); letter-spacing: 1px; white-space: nowrap; }
.ab-sub { font-size: 13px; color: #e2e8f0; text-shadow: 0 1px 0 #000; margin-top: 2px; }
.ab-line { height: 2px; width: 260px; margin: 6px auto; background: linear-gradient(90deg, transparent, #fbbf24, transparent); }
@media (max-width: 700px) { .ab-name { font-size: 19px; } .ab-line { width: 180px; } #story-scene { padding-bottom: 150px; } .ss-portrait { display: none; } .ss-text { font-size: 14px; } }

/* ======================================================================
   v3.9 Starlight Mall · Premium · HUD badge
   ====================================================================== */
.prem-badge { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff7ed; border: 1px solid #f9a8d4; border-radius: 6px; padding: 0 6px; font-weight: 800; font-size: 11px; cursor: pointer; white-space: nowrap; box-shadow: 0 0 8px rgba(236, 72, 153, .45); }
.prem-badge.neck { background: linear-gradient(135deg, #b45309, #d97706); border-color: #fde68a; box-shadow: 0 0 8px rgba(251, 191, 36, .45); }
.prem-badge.off { background: #2a2350; color: #c4b5fd; border-color: #4c1d95; box-shadow: none; }
.prem-badge:hover { filter: brightness(1.2); }
.mall-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px;
  background: linear-gradient(120deg, #3b0764 0%, #831843 55%, #7c2d12 100%); border: 1px solid #f9a8d4; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.mall-brand b { font-family: 'Kanit'; font-size: 18px; color: #fdf2f8; text-shadow: 0 2px 0 rgba(0,0,0,.45); display: block; }
.mall-brand small { color: #fbcfe8; }
.mall-status { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mall-chip { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.35); color: #e9d5ff; border: 1px solid rgba(255,255,255,.18); }
.mall-chip.on { background: linear-gradient(135deg, #a21caf, #db2777); color: #fff; border-color: #f9a8d4; }
.mall-chip.neck { background: linear-gradient(135deg, #b45309, #d97706); border-color: #fde68a; }
.mall-tabs { flex-wrap: wrap; }
.mall-prem-hero { text-align: center; padding: 16px 12px 14px; border-radius: 14px; margin-bottom: 10px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(253, 224, 71, .35), transparent 60%), linear-gradient(160deg, #4c1d95, #1e1b4b 70%); border: 1px solid #c4b5fd; }
.mp-kicker { color: #fde68a; letter-spacing: 4px; font-size: 12px; font-weight: 800; }
.mp-title { font-family: 'Kanit'; font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 #3b0764, 0 0 22px rgba(244, 114, 182, .7); }
.mp-sub { color: #ddd6fe; font-size: 13px; margin: 2px 0 8px; }
.mp-price { font-size: 20px; color: #fde68a; margin-bottom: 8px; }
.mp-price b { font-size: 28px; color: #fff; }
.mp-price s { color: #a5b4fc; font-size: 15px; margin-left: 4px; }
.mp-first { display: inline-block; background: #dc2626; color: #fff; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-right: 6px; animation: mpPulse 1.4s ease-in-out infinite alternate; }
@keyframes mpPulse { from { box-shadow: 0 0 0 rgba(248,113,113,.0); } to { box-shadow: 0 0 14px rgba(248,113,113,.9); } }
.mp-buy { font-size: 15px; padding: 8px 22px; }
.mall-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.mall-perk { display: flex; gap: 8px; align-items: center; background: #1a1538; border: 1px solid #3b2f7a; border-radius: 10px; padding: 7px 9px; }
.mall-perk > span { font-size: 22px; }
.mall-perk b { display: block; color: #fde68a; }
.mall-perk small { color: #a5b4fc; }
.mall-fashion { display: grid; grid-template-columns: 190px 1fr; gap: 10px; align-items: start; }
.mall-fit { position: sticky; top: 0; text-align: center; padding: 10px 8px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, rgba(244, 114, 182, .28), transparent 65%), linear-gradient(180deg, #221a4d, #120e2b); border: 1px solid #7c3aed; }
.mall-fit canvas { image-rendering: pixelated; display: block; margin: 0 auto 4px; }
.mf-name { font-family: 'Kanit'; font-size: 15px; color: #fdf2f8; font-weight: 700; }
.mf-theme { margin: 2px 0 4px; }
.mf-stats { font-size: 12.5px; margin-bottom: 6px; }
.mf-act { margin-bottom: 6px; }
.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.mall-card { background: linear-gradient(180deg, #1f1947, #15112f); border: 1px solid #3b2f7a; border-radius: 12px; padding: 6px; text-align: center; cursor: pointer; transition: transform .12s, border-color .12s; }
.mall-card:hover { transform: translateY(-2px); border-color: #f472b6; }
.mall-card.sel { border-color: #fde68a; box-shadow: 0 0 0 2px rgba(253, 230, 138, .35), 0 0 16px rgba(244, 114, 182, .35); }
.mall-card.worn { background: linear-gradient(180deg, #3b1d5e, #1d1238); }
.mc-cv { image-rendering: pixelated; display: block; margin: 0 auto; }
.mc-name { font-size: 12px; font-weight: 700; color: #fdf2f8; line-height: 1.25; min-height: 30px; }
.mc-stat { font-size: 10.5px; }
.mc-price { font-size: 13px; color: #fde68a; font-weight: 800; margin-top: 2px; }
.mc-tag { font-size: 11px; padding: 1px 6px; border-radius: 999px; }
.mc-tag.own { background: #312e81; color: #c7d2fe; }
.mc-tag.worn { background: #be185d; color: #fff; }
.mall-neck-note { background: #1a1538; border: 1px solid #b45309; color: #fde68a; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.mall-neck-card .gic-icon img { width: 48px; height: 48px; }
@media (max-width: 700px) { .mall-fashion { grid-template-columns: 1fr; } .mall-fit { position: static; } .mp-title { font-size: 24px; } }

/* v3.16 — name banner of an ultimate skill (js/vfx.js) */
#ult-banner { position: fixed; left: 50%; top: 20%; z-index: 45; pointer-events: none; display: none; align-items: center; gap: 14px; white-space: nowrap; --c: #fbbf24; transform: translateX(-50%); }
#ult-banner.show { display: flex; animation: ultIn 1.5s cubic-bezier(.2, .9, .2, 1) forwards; }
#ult-banner b { font-size: clamp(22px, 3.3vw, 40px); font-weight: 900; font-style: italic; letter-spacing: .05em; line-height: 1.5; padding: 0 .12em; color: #fff; background: linear-gradient(180deg, #fff 35%, var(--c) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .8)) drop-shadow(0 0 3px rgba(0, 0, 0, .9)) drop-shadow(0 0 14px var(--c)); }
#ult-banner small { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: .5em; color: #fff; opacity: .9; text-shadow: 0 1px 2px #000, 0 0 8px var(--c); }
#ult-banner i { display: block; width: clamp(36px, 9vw, 130px); height: 2px; background: linear-gradient(90deg, transparent, var(--c), #fff); box-shadow: 0 0 10px var(--c); }
#ult-banner i:last-child { transform: scaleX(-1); }
@keyframes ultIn {
  0% { opacity: 0; transform: translateX(-50%) scale(1.7) skewX(-12deg); }
  13% { opacity: 1; transform: translateX(-50%) scale(1) skewX(-6deg); }
  72% { opacity: 1; transform: translateX(-50%) scale(1.03) skewX(-6deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.12) skewX(-6deg); }
}
body.ui-touch #ult-banner { top: 15%; }
