/* =====================================================================
   LUMI: KINETIC SKIES — interface styles
   ===================================================================== */
:root {
  --bg: #050b16; --panel: rgba(9, 15, 28, .84); --panel2: rgba(16, 26, 46, .78); --line: rgba(140, 190, 255, .14); --line2: rgba(140, 190, 255, .28);
  --text: #e8f0fb; --dim: #8fa5c4; --dim2: #5d7394;
  --teal: #3fe0c8; --cyan: #5fd8ff; --gold: #ffd98a; --ember: #ff7a45; --red: #ff4d5f; --green: #52e0a8; --violet: #b48aff;
  --hp: #ff5468; --en: #4ac8ff; --xp: #b48aff; --shield: #9ae8ff;
  --r-common: #c8d2e0; --r-uncommon: #52e0a8; --r-rare: #5fb8ff; --r-epic: #c08aff; --r-legendary: #ffab4a;
  --font-h: 'Rajdhani', system-ui, sans-serif; --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; user-select: none; -webkit-user-select: none; }
canvas#gl { display: block; position: fixed; inset: 0; }
button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }
.h { font-family: var(--font-h); letter-spacing: .06em; }
.hidden { display: none !important; }
.gold { color: var(--gold); } .teal { color: var(--teal); } .dim { color: var(--dim); } .red { color: var(--red); } .green { color: var(--green); }
.rc-0 { color: var(--r-common); } .rc-1 { color: var(--r-uncommon); } .rc-2 { color: var(--r-rare); } .rc-3 { color: var(--r-epic); } .rc-4 { color: var(--r-legendary); }
svg.ic { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }

/* ---------------------------- screens ---------------------------- */
.screen { position: fixed; inset: 0; z-index: 50; display: none; }
.screen.show { display: flex; }
#title { flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 18%, rgba(40, 90, 160, .55), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(120, 60, 200, .25), transparent 55%), linear-gradient(#050b18, #03070f); }
#title::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff6, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff7, transparent), radial-gradient(1px 1px at 85% 60%, #fff5, transparent), radial-gradient(1px 1px at 10% 85%, #fff6, transparent), radial-gradient(1px 1px at 55% 45%, #fff4, transparent); background-size: 600px 400px; opacity: .6; animation: drift 120s linear infinite; }
@keyframes drift { to { background-position: 600px 400px; } }
.brand { font-family: var(--font-h); font-weight: 700; font-size: clamp(38px, 6.4vw, 78px); letter-spacing: .18em; text-indent: .18em; line-height: 1;
  background: linear-gradient(100deg, #ff7a45, #ffd98a 32%, #9ef0e0 58%, #5fd8ff 76%, #b48aff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(80, 160, 255, .35)); position: relative; }
.brand-sub { font-size: 11.5px; letter-spacing: .55em; text-indent: .55em; color: #9bb4d6; text-transform: uppercase; margin: 14px 0 34px; position: relative; }
.card { position: relative; width: min(390px, 92vw); padding: 26px 28px; background: var(--panel); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.card h3 { font-family: var(--font-h); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.field { width: 100%; padding: 12px 14px; margin-bottom: 10px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(3, 8, 18, .7); color: var(--text); font-size: 14px; outline: none; transition: border .15s; }
.field:focus { border-color: var(--teal); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--text); font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(63, 224, 200, .07); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(100deg, #3fe0c8, #5fd8ff); color: #042a26; border: none; }
.btn.primary:hover { box-shadow: 0 8px 26px rgba(63, 224, 200, .35); color: #042a26; filter: brightness(1.08); }
.btn.danger { border-color: rgba(255, 77, 95, .45); color: #ff8a96; } .btn.danger:hover { background: rgba(255, 77, 95, .1); color: #ffb0b8; }
.btn.small { padding: 6px 10px; font-size: 11px; letter-spacing: .1em; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.err { min-height: 18px; font-size: 12px; color: #ff8a96; margin-bottom: 6px; }
#menuNotice { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -16px); z-index: 90; max-width: min(460px, 90vw); padding: 11px 18px; border-radius: 12px; background: rgba(42, 8, 16, .95); border: 1px solid #ff5d72; color: #ffdce1; font-size: 14px; line-height: 1.35; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#menuNotice.show { opacity: 1; transform: translate(-50%, 0); }
#menuNotice.ok { background: rgba(8, 32, 26, .95); border-color: #3fe0c8; color: #dafff5; }
.field.bad { border-color: #ff5d72 !important; box-shadow: 0 0 0 2px rgba(255, 93, 114, .28); animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.credits p { margin: 4px 0 12px; font-size: 13px; line-height: 1.5; color: #cfdcef; } .credits a { color: var(--gold); }
.hc-note { font-size: 11.5px; line-height: 1.4; color: #ffb38a; margin: -2px 0 10px; }
.hc-note:empty { display: none; }
.char-row.dead { filter: grayscale(1); opacity: .6; }
.meta .hc, .hcskull { color: #ff8a4d; } .meta .fallen { color: #ff5d72; }
#death .btn { pointer-events: auto; margin-top: 16px; }
.drag-hint { position: absolute; right: 0; bottom: 18px; width: calc(100% - min(380px, 40vw)); text-align: center; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(220, 235, 255, .55); pointer-events: none; text-shadow: 0 1px 4px #000; }
.swap { margin-top: 14px; font-size: 12px; color: var(--dim); text-align: center; } .swap a { color: var(--teal); cursor: pointer; text-decoration: underline; }
.note { margin-top: 18px; font-size: 11px; color: var(--dim2); line-height: 1.6; text-align: center; position: relative; }

/* character select / creation */
#select, #create { background: linear-gradient(90deg, rgba(3, 7, 15, .92) 0%, rgba(3, 7, 15, .55) 38%, transparent 62%); }
.side { position: relative; width: min(470px, 100vw); height: 100%; padding: 36px 34px; display: flex; flex-direction: column; overflow-y: auto; }
.side .brand { font-size: 34px; text-align: left; text-indent: 0; }
.side .brand-sub { text-indent: 0; margin: 8px 0 22px; letter-spacing: .4em; }
.char-list { display: flex; flex-direction: column; gap: 10px; }
.char-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: all .15s; }
.char-row:hover { border-color: var(--line2); transform: translateX(3px); }
.char-row.sel { border-color: var(--teal); background: rgba(63, 224, 200, .08); box-shadow: inset 3px 0 0 var(--teal); }
.char-row .av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: radial-gradient(circle at 35% 30%, #fff4, transparent 60%), var(--cc, #3fe0c8); box-shadow: 0 0 18px var(--cc); color: #04121a; }
.char-row .nm { font-family: var(--font-h); font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.char-row .meta { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.char-row .x { margin-left: auto; opacity: .4; padding: 6px; border-radius: 6px; } .char-row .x:hover { opacity: 1; color: var(--red); background: rgba(255, 77, 95, .1); }
.char-new { padding: 14px; border: 1px dashed var(--line2); border-radius: 12px; text-align: center; color: var(--dim); cursor: pointer; font-family: var(--font-h); letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }
.char-new:hover { color: var(--teal); border-color: var(--teal); }
.sel-actions { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.acct { position: fixed; top: 20px; right: 26px; z-index: 60; font-size: 12px; letter-spacing: .15em; color: var(--dim); text-transform: uppercase; }
.acct b { color: var(--gold); } .acct a { color: var(--teal); cursor: pointer; margin-left: 12px; }
.lbl { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); margin: 14px 0 8px; font-family: var(--font-h); font-weight: 600; }
.class-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cls { padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; text-align: center; transition: all .15s; }
.cls:hover { border-color: var(--line2); } .cls.sel { border-color: var(--cc); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px var(--cc) inset; }
.cls .ci { font-size: 22px; color: var(--cc); } .cls .cn { font-family: var(--font-h); font-weight: 700; font-size: 12px; margin-top: 4px; letter-spacing: .04em; }
.cls-info { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: #cfdcef; }
.cls-info .role { font-family: var(--font-h); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cls-info .abils { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cls-info .ab { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.diff-pips { display: inline-flex; gap: 3px; margin-left: 8px; } .diff-pips i { width: 7px; height: 7px; border-radius: 2px; background: #2a3a55; } .diff-pips i.on { background: var(--gold); }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.sw { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4) inset; }
.sw.sel { border-color: #fff; transform: scale(1.1); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); font-size: 12px; cursor: pointer; } .opt.sel { border-color: var(--teal); color: var(--teal); }
#loading { flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #0b1a33, #03070f); z-index: 80; }
#loading .bar { width: min(420px, 80vw); height: 4px; background: rgba(255, 255, 255, .08); border-radius: 4px; overflow: hidden; margin-top: 22px; }
#loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--cyan)); transition: width .2s; }
#loading .tip { margin-top: 16px; color: var(--dim); font-size: 13px; max-width: 520px; text-align: center; line-height: 1.6; }

/* ------------------------------ HUD ------------------------------ */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; opacity: 0; transition: opacity .6s; }
#hud.on { opacity: 1; }
#hud2d { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9; } /* stretch the hi-dpi canvas to the viewport */
.panel { background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px; }
/* player frame */
#pframe { position: absolute; left: 18px; top: 16px; display: flex; gap: 12px; align-items: center; }
#pframe .por { position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: var(--cc, #3fe0c8); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .15), rgba(8, 14, 26, .9) 70%); border: 2px solid var(--cc, #3fe0c8); box-shadow: 0 0 20px rgba(0, 0, 0, .5), 0 0 14px var(--ccg, rgba(63, 224, 200, .3)); }
#pframe .lvl { position: absolute; right: -6px; bottom: -4px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: linear-gradient(#ffd98a, #e89a3a); color: #3a2205; font-family: var(--font-h); font-weight: 700; font-size: 15px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
#pframe .bars { width: 250px; }
#pframe .nm { font-family: var(--font-h); font-weight: 700; font-size: 17px; letter-spacing: .05em; text-shadow: 0 2px 6px #000; }
#pframe .nm small { color: var(--gold); font-weight: 500; font-size: 13px; margin-left: 6px; }
.bar { position: relative; height: 16px; border-radius: 5px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; margin-top: 4px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; transition: width .18s; }
.bar .lag { background: rgba(255, 255, 255, .35); transition: width .6s .15s; }
.bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-shadow: 0 1px 2px #000; }
.bar.hp i.f { background: linear-gradient(#ff7a88, var(--hp)); }
.bar.hp i.sh { background: repeating-linear-gradient(135deg, rgba(154, 232, 255, .8) 0 4px, rgba(154, 232, 255, .5) 4px 8px); }
.bar.en { height: 9px; } .bar.en i.f { background: linear-gradient(#8ad8ff, var(--en)); }
#buffs { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; max-width: 330px; }
.buff { position: relative; width: 30px; height: 30px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 15px; color: var(--gold); }
.buff .t { position: absolute; bottom: -12px; left: 0; right: 0; text-align: center; font-size: 9.5px; color: var(--dim); }
/* target / boss */
#tframe { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: 320px; text-align: center; }
#tframe .tn { font-family: var(--font-h); font-weight: 700; font-size: 16px; text-shadow: 0 2px 6px #000; }
#tframe .tn .lv { display: inline-block; min-width: 26px; margin-right: 6px; padding: 0 4px; border-radius: 5px; font-size: 13px; background: rgba(0, 0, 0, .5); }
#tframe .tag { font-size: 10px; letter-spacing: .2em; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.tag.elite { background: rgba(255, 217, 138, .15); color: var(--gold); border: 1px solid rgba(255, 217, 138, .4); } .tag.rare { background: rgba(192, 138, 255, .15); color: #d8b8ff; border: 1px solid rgba(192, 138, 255, .4); } .tag.boss { background: rgba(255, 77, 95, .15); color: #ff9aa6; border: 1px solid rgba(255, 77, 95, .4); }
#bossbar { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); width: min(620px, 70vw); text-align: center; }
#bossbar .bn { font-family: var(--font-h); font-weight: 700; font-size: 20px; letter-spacing: .2em; color: #ffc0c8; text-shadow: 0 0 20px rgba(255, 60, 90, .5), 0 2px 6px #000; }
#bossbar .bar { height: 14px; border-color: rgba(255, 77, 95, .4); } #bossbar .bar i.f { background: linear-gradient(#ff6a7a, #c82a4a); }
/* activity */
#actHud { position: absolute; left: 50%; top: 118px; transform: translateX(-50%); min-width: 340px; padding: 10px 16px; text-align: center; }
#actHud .at { font-family: var(--font-h); font-weight: 700; letter-spacing: .2em; color: var(--gold); font-size: 15px; }
#actHud .as { font-size: 12px; color: #cfdcef; margin-top: 3px; }
#actHud .bar { height: 5px; margin-top: 7px; } #actHud .bar i.f { background: linear-gradient(90deg, var(--teal), var(--cyan)); }
/* minimap + zone */
#mapwrap { position: absolute; right: 18px; top: 16px; width: 196px; text-align: center; }
#zone { font-family: var(--font-h); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 8px #000; margin-bottom: 2px; }
#zone2 { font-size: 10.5px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; text-shadow: 0 1px 4px #000; margin-bottom: 6px; }
#mm { position: relative; width: 180px; height: 180px; margin: 0 auto; border-radius: 50%; overflow: hidden; border: 2px solid rgba(160, 200, 255, .3); box-shadow: 0 0 0 4px rgba(8, 14, 26, .6), 0 10px 30px rgba(0, 0, 0, .5); background: rgba(6, 12, 22, .75); }
#mm canvas { width: 100%; height: 100%; }
#mmInfo { margin-top: 6px; font-size: 10.5px; color: var(--dim); letter-spacing: .1em; text-shadow: 0 1px 4px #000; }
#mmInfo b { color: var(--text); }
/* quest tracker */
#tracker { position: absolute; right: 18px; top: 262px; width: 270px; }
.tq { padding: 9px 12px; margin-bottom: 6px; border-left: 3px solid var(--gold); }
.tq .qn { font-family: var(--font-h); font-weight: 700; font-size: 14.5px; color: var(--gold); letter-spacing: .03em; text-shadow: 0 1px 4px #000; }
.tq.story .qn::before { content: '◆ '; color: var(--ember); }
.tq .qo { font-size: 12px; color: #d0dcee; margin-top: 3px; line-height: 1.45; text-shadow: 0 1px 3px #000; }
.tq .qo.done { color: var(--green); text-decoration: line-through; opacity: .75; }
.tq .qr { font-size: 11.5px; color: var(--teal); margin-top: 3px; }
.tq .lvl { float: right; font-size: 11px; color: var(--dim); }
/* action bar */
#bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
#prompt { margin-bottom: 12px; padding: 7px 14px; border-radius: 10px; font-family: var(--font-h); font-weight: 600; font-size: 15px; letter-spacing: .06em; background: var(--panel); border: 1px solid var(--line2); display: flex; align-items: center; gap: 10px; }
.key { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--gold); color: var(--gold); font-family: var(--font-h); font-weight: 700; font-size: 13px; background: rgba(0, 0, 0, .4); box-shadow: 0 2px 0 rgba(255, 217, 138, .25); }
#castbar { width: 300px; margin-bottom: 12px; text-align: center; }
#castbar .cl { font-size: 11.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; text-shadow: 0 1px 4px #000; }
#castbar .bar { height: 9px; } #castbar .bar i.f { background: linear-gradient(90deg, #ffd98a, #ffab4a); }
#abar { display: flex; gap: 6px; padding: 7px; border-radius: 14px; }
.slot { position: relative; width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(rgba(30, 44, 70, .9), rgba(10, 18, 32, .95)); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 24px; color: #cfe6ff; overflow: hidden; }
.slot.sep { margin-left: 10px; }
.slot .k { position: absolute; left: 4px; top: 2px; font-size: 10px; font-weight: 700; color: var(--dim); font-family: var(--font-h); }
.slot .n { position: absolute; right: 4px; bottom: 2px; font-size: 11px; font-weight: 700; color: var(--text); text-shadow: 0 1px 2px #000; }
.slot .cd { position: absolute; inset: 0; background: conic-gradient(rgba(3, 6, 12, .78) var(--p, 0%), transparent 0); }
.slot .cdt { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-h); font-weight: 700; font-size: 17px; color: #fff; text-shadow: 0 1px 3px #000; }
.slot.locked { opacity: .35; } .slot.noen { box-shadow: inset 0 0 0 2px rgba(74, 200, 255, .5); } .slot.noen svg { opacity: .45; }
.slot.ult { border-color: rgba(255, 217, 138, .5); } .slot.ult::after { content: ''; position: absolute; inset: 0; border-radius: 10px; box-shadow: inset 0 0 14px rgba(255, 217, 138, .25); }
.slot.flash { animation: sflash .3s; } @keyframes sflash { 50% { box-shadow: 0 0 20px var(--teal); } }
#xpbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .6); }
#xpbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8a5aff, #c08aff); transition: width .3s; box-shadow: 0 0 10px #a07aff; }
#xpbar b { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 10px; color: var(--dim); letter-spacing: .1em; text-shadow: 0 1px 3px #000; }
#money { position: absolute; right: 18px; bottom: 16px; font-family: var(--font-h); font-weight: 700; font-size: 16px; color: var(--gold); text-shadow: 0 2px 6px #000; }
/* ship hud */
#shipHud { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 18px; align-items: flex-end; }
.gauge { width: 190px; }
.gauge .gl { font-size: 10.5px; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; display: flex; justify-content: space-between; }
.gauge .bar { height: 10px; }
#spd { font-family: var(--font-h); font-weight: 700; font-size: 34px; text-align: center; line-height: 1; text-shadow: 0 2px 8px #000; }
#spd small { font-size: 12px; color: var(--dim); letter-spacing: .2em; display: block; }
.wsel { display: flex; gap: 5px; justify-content: center; margin-top: 6px; }
.wsel span { font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-family: var(--font-h); font-weight: 700; letter-spacing: .08em; }
.wsel span.on { color: var(--teal); border-color: var(--teal); }
/* crosshair */
#cross { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#cross .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 0 6px rgba(0, 0, 0, .8); }
#cross .ring { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); transition: all .12s; }
#cross.enemy .dot { background: #ff6a7a; } #cross.enemy .ring { border-color: rgba(255, 90, 110, .6); width: 24px; height: 24px; }
#cross .draw { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 50%; background: conic-gradient(var(--gold) var(--p, 0%), transparent 0); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); opacity: .9; }
#hitm { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%) rotate(45deg); opacity: 0; transition: opacity .15s; }
#hitm::before, #hitm::after { content: ''; position: absolute; background: #fff; }
#hitm::before { left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; -webkit-mask: linear-gradient(#000 35%, transparent 35% 65%, #000 65%); mask: linear-gradient(#000 35%, transparent 35% 65%, #000 65%); }
#hitm::after { top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; -webkit-mask: linear-gradient(90deg, #000 35%, transparent 35% 65%, #000 65%); mask: linear-gradient(90deg, #000 35%, transparent 35% 65%, #000 65%); }
#hitm.crit::before, #hitm.crit::after { background: var(--ember); }
#breath { position: absolute; left: 50%; top: calc(50% + 46px); transform: translateX(-50%); width: 140px; }
#breath .bar { height: 7px; } #breath .bar i.f { background: linear-gradient(90deg, #7ad8ff, #c8f0ff); }
/* banners + toasts */
#banner { position: absolute; left: 24px; top: 32vh; width: min(440px, calc(100vw - 48px)); box-sizing: border-box; padding: 12px 16px; border-left: 2px solid rgba(255, 217, 138, .75); background: linear-gradient(90deg, rgba(9, 15, 28, .76), rgba(9, 15, 28, .32) 78%, transparent); text-align: left; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; pointer-events: none; }
#banner.show { opacity: 1; transform: translateY(0); }
#banner .b1 { font-family: var(--font-h); font-weight: 700; font-size: 34px; letter-spacing: .32em; text-indent: .32em; text-shadow: 0 0 30px rgba(95, 216, 255, .5), 0 3px 10px #000; }
#banner .b2 { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: #cfdcef; margin-top: 6px; text-shadow: 0 1px 6px #000; }
#banner::before, #banner::after { content: ''; display: block; height: 1px; width: 70%; margin: 8px 0; background: linear-gradient(90deg, rgba(255, 217, 138, .6), transparent); }
#region { position: absolute; left: 50%; top: 14vh; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 1s; }
#region.show { opacity: 1; }
#region .r1 { font-family: var(--font-h); font-weight: 700; font-size: 26px; letter-spacing: .2em; color: var(--gold); text-shadow: 0 2px 10px #000; }
#region.hostile .r1 { color: #ff6a78; }
#region .r2 { font-size: 12px; letter-spacing: .25em; color: #cfdcef; text-transform: uppercase; text-shadow: 0 1px 6px #000; margin-top: 3px; }
#toasts { position: absolute; right: 18px; bottom: 50px; width: 330px; display: flex; flex-direction: column-reverse; gap: 6px; }
.toast { padding: 8px 12px; font-size: 12.5px; border-left: 3px solid var(--teal); animation: tin .3s ease-out; line-height: 1.4; }
.toast.out { animation: tout .5s forwards; }
.toast .ti { font-weight: 700; }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } } @keyframes tout { to { opacity: 0; transform: translateX(30px); } }
#msg { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); font-size: 14px; font-weight: 600; color: #ffe0a0; text-shadow: 0 2px 6px #000; opacity: 0; transition: opacity .3s; text-align: center; }
#msg.show { opacity: 1; }
#levelup { position: absolute; left: 50%; top: 30vh; transform: translateX(-50%) scale(.8); opacity: 0; text-align: center; transition: all .5s; }
#levelup.show { opacity: 1; transform: translateX(-50%) scale(1); }
#levelup .l1 { font-family: var(--font-h); font-weight: 700; font-size: 44px; letter-spacing: .3em; background: linear-gradient(#fff4c0, #ffab4a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(255, 180, 80, .6)); }
#levelup .l2 { font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: #fff0d0; }
#lore { position: absolute; left: 22px; top: 50%; transform: translateY(-50%) translateX(-20px); width: 320px; padding: 18px 20px; opacity: 0; transition: all .5s; border-left: 3px solid var(--violet); }
#lore.show { opacity: 1; transform: translateY(-50%); }
#lore .lt { font-family: var(--font-h); font-weight: 700; letter-spacing: .15em; color: #d8c0ff; font-size: 14px; margin-bottom: 8px; }
#lore .lb { font-size: 13px; line-height: 1.65; color: #d4def0; font-style: italic; }
/* chat */
#chat { position: absolute; left: 18px; bottom: 16px; width: 380px; pointer-events: none; }
#chatLog { max-height: 180px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 12.5px; line-height: 1.5; }
#chatLog div { text-shadow: 0 1px 3px #000, 0 0 6px #000; animation: tin .2s; } #chatLog div.old { opacity: 0; transition: opacity 2s; }
#chatLog .who { font-weight: 700; } #chatLog .sys { color: #ffd98a; } #chatLog .emo { color: #b8c8e0; font-style: italic; }
#chatIn { width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(3, 8, 18, .85); color: var(--text); outline: none; font-size: 13px; pointer-events: auto; display: none; }
#chatIn.show { display: block; }
#mpChip { position: absolute; left: 18px; top: 116px; font-size: 11px; letter-spacing: .12em; color: #9ef0ff; text-shadow: 0 1px 4px #000; font-weight: 600; }
/* fishing */
#fishui { position: absolute; left: 50%; top: 50%; transform: translate(120px, -50%); width: 46px; height: 250px; padding: 4px; }
#fishui .track { position: relative; width: 26px; height: 100%; border-radius: 8px; background: linear-gradient(#0b3a5a, #062030); overflow: hidden; float: left; }
#fishui .zone { position: absolute; left: 2px; right: 2px; border-radius: 6px; background: rgba(82, 224, 168, .45); border: 1px solid #52e0a8; }
#fishui .fish { position: absolute; left: 50%; width: 22px; height: 22px; transform: translate(-50%, 50%); font-size: 18px; color: #ffd24d; display: grid; place-items: center; }
#fishui .prog { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 8px; border-radius: 4px; background: rgba(0, 0, 0, .5); overflow: hidden; }
#fishui .prog i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#ffd24d, #52e0a8); }
/* hurt vignette / fade */
#fade { position: fixed; inset: 0; background: #02060d; opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 70; }
#death { position: fixed; inset: 0; z-index: 45; display: none; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(60, 0, 10, .35), rgba(0, 0, 0, .75)); }
#death.show { display: flex; }
#death .d1 { font-family: var(--font-h); font-weight: 700; font-size: 48px; letter-spacing: .3em; color: #ff8a96; text-shadow: 0 0 30px rgba(255, 60, 80, .5); }
#death .d2 { color: #d0d8e8; margin-top: 10px; letter-spacing: .15em; }

/* floating text */
#floatLayer { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.ft { position: absolute; left: 0; top: 0; font-family: var(--font-h); font-weight: 700; font-size: 20px; color: #fff4d0; text-shadow: 0 2px 3px #000, 0 0 8px rgba(0, 0, 0, .6); white-space: nowrap; will-change: transform; }
.ft-crit { font-size: 28px; color: #ffb040; text-shadow: 0 0 12px rgba(255, 120, 40, .8), 0 2px 3px #000; }
.ft-heal { color: #6affb0; } .ft-xp { color: #c8a8ff; font-size: 17px; } .ft-miss { color: #cfe0f5; font-size: 16px; } .ft-shield { color: var(--shield); font-size: 16px; }
.ft-dot { color: #ff9a7a; font-size: 15px; } .ft-pet { color: #9ae8ff; font-size: 16px; } .ft-loot { color: #ffe08a; font-size: 15px; } .ft-player { color: #ff6a7a; }

/* ------------------------------ windows ------------------------------ */
.win { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; width: min(980px, 96vw); max-height: 88vh; display: none; flex-direction: column; background: rgba(7, 12, 23, .93); backdrop-filter: blur(18px); border: 1px solid var(--line2); border-radius: 18px; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); pointer-events: auto; animation: wpop .18s ease-out; }
.win.show { display: flex; }
@keyframes wpop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
.win-h { display: flex; align-items: center; gap: 14px; padding: 16px 22px 0; }
.win-h h2 { font-family: var(--font-h); font-size: 20px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.win-h .x { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--dim); border: 1px solid transparent; font-size: 18px; }
.win-h .x:hover { color: var(--text); border-color: var(--line2); }
.tabs { display: flex; gap: 4px; padding: 12px 22px 0; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 16px; font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); } .tab.on { color: var(--teal); border-bottom-color: var(--teal); }
.win-b { padding: 18px 22px 22px; overflow-y: auto; min-height: 200px; }
.win-b::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 8px; } .win-b::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: rgba(140, 190, 255, .2); border-radius: 4px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .cols3 { display: grid; grid-template-columns: 250px 1fr 240px; gap: 20px; }
.sect { font-family: var(--font-h); font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); margin: 4px 0 10px; display: flex; align-items: center; gap: 8px; }
.sect::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* paper doll */
.doll { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.eslot, .bslot { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line2); background: linear-gradient(rgba(24, 36, 60, .8), rgba(8, 14, 26, .9)); display: grid; place-items: center; font-size: 26px; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.eslot:hover, .bslot:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--line2), 0 6px 16px rgba(0, 0, 0, .4); }
.eslot .sl { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 9px; letter-spacing: .12em; color: var(--dim2); text-transform: uppercase; }
.eslot.empty { color: #2e3e5a; }
.r-b0 { border-color: #6a7488 !important; } .r-b1 { border-color: var(--r-uncommon) !important; box-shadow: inset 0 0 14px rgba(82, 224, 168, .12); } .r-b2 { border-color: var(--r-rare) !important; box-shadow: inset 0 0 16px rgba(95, 184, 255, .16); }
.r-b3 { border-color: var(--r-epic) !important; box-shadow: inset 0 0 18px rgba(192, 138, 255, .22); } .r-b4 { border-color: var(--r-legendary) !important; box-shadow: inset 0 0 22px rgba(255, 171, 74, .3); animation: lpulse 2.4s infinite; }
@keyframes lpulse { 50% { box-shadow: inset 0 0 28px rgba(255, 171, 74, .45), 0 0 12px rgba(255, 171, 74, .3); } }
.bslot .up { position: absolute; top: 3px; right: 5px; font-size: 10px; font-weight: 700; color: var(--gold); }
.bslot .il { position: absolute; bottom: 2px; right: 5px; font-size: 10px; color: var(--dim); }
.bag { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.bslot.empty { opacity: .45; cursor: default; }
.stat-list { font-size: 13px; }
.stat-list .sr { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(140, 190, 255, .06); }
.stat-list .sr b { color: var(--text); font-weight: 600; } .stat-list .sr span { color: var(--dim); }
.attr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; }
.attr .an { flex: 1; font-weight: 700; font-family: var(--font-h); letter-spacing: .08em; } .attr .an small { display: block; font-family: var(--font); font-weight: 400; font-size: 10.5px; color: var(--dim); letter-spacing: 0; }
.attr .av { font-family: var(--font-h); font-weight: 700; font-size: 18px; color: var(--gold); min-width: 30px; text-align: right; }
.plus { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(63, 224, 200, .5); background: rgba(63, 224, 200, .1); color: var(--teal); font-weight: 800; cursor: pointer; font-size: 16px; }
.plus:disabled { opacity: .25; cursor: default; }
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.mat { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: 12px; }
.mat .mi { font-size: 16px; } .mat .mc { margin-left: auto; font-family: var(--font-h); font-weight: 700; font-size: 14px; }
/* tooltip */
#tip { position: fixed; z-index: 90; pointer-events: none; display: none; min-width: 220px; max-width: 300px; padding: 12px 14px; border-radius: 12px; background: rgba(5, 10, 20, .97); border: 1px solid var(--line2); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); font-size: 12.5px; line-height: 1.55; }
#tip .tn { font-family: var(--font-h); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
#tip .tr { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
#tip .ts { color: #d8e4f4; } #tip .ts b { color: var(--text); } #tip .leg { color: var(--r-legendary); margin-top: 6px; } #tip .cmp { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; }
#tip .up { color: var(--green); } #tip .dn { color: var(--red); } #tip .hint { margin-top: 8px; color: var(--dim2); font-size: 11px; }
/* skills */
.skill { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); margin-bottom: 8px; }
.skill .si { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(rgba(30, 44, 70, .9), rgba(10, 18, 32, .95)); border: 1px solid var(--line2); color: var(--cc); flex: none; }
.skill.locked { opacity: .45; } .skill .sn { font-family: var(--font-h); font-weight: 700; font-size: 16px; } .skill .sn small { color: var(--dim); font-size: 12px; margin-left: 8px; letter-spacing: .1em; }
.skill .sd { font-size: 12.5px; color: #cfdcef; margin-top: 3px; line-height: 1.45; } .skill .sm { font-size: 11px; color: var(--dim); margin-top: 4px; }
.pips { display: flex; gap: 3px; margin-top: 5px; } .pips i { width: 14px; height: 5px; border-radius: 2px; background: #2a3a55; } .pips i.on { background: var(--teal); }
/* quests & codex lists */
.list-row { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; margin-bottom: 6px; cursor: pointer; }
.list-row:hover { border-color: var(--line2); } .list-row.sel { border-color: var(--teal); background: rgba(63, 224, 200, .06); }
.list-row .ln { font-weight: 700; font-family: var(--font-h); font-size: 15px; } .list-row .ls { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.qd-body { font-size: 13.5px; line-height: 1.65; color: #d4def0; }
.qd-body .obj { margin: 4px 0; } .qd-body .obj.done { color: var(--green); }
.codex-e { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; font-size: 12.5px; line-height: 1.55; color: #cfdcef; }
.codex-e b { color: var(--teal); font-family: var(--font-h); font-size: 14px; letter-spacing: .04em; }
.ach { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; }
.ach .ai { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(255, 217, 138, .1); color: var(--gold); flex: none; }
.ach.lock { opacity: .4; } .ach.lock .ai { color: var(--dim); background: rgba(255, 255, 255, .04); }
/* shop */
.shop-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; border: 1px solid transparent; }
.shop-row:hover { border-color: var(--line2); }
.shop-row .sic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; border: 1px solid var(--line2); background: rgba(10, 18, 32, .9); flex: none; }
.shop-row .snm { flex: 1; } .shop-row .snm b { font-family: var(--font-h); font-size: 15px; } .shop-row .snm small { display: block; font-size: 11.5px; color: var(--dim); }
.price { font-family: var(--font-h); font-weight: 700; color: var(--gold); min-width: 70px; text-align: right; }
/* map */
#mapCanvas { width: 100%; border-radius: 12px; background: #050b16; display: block; cursor: crosshair; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--dim); }
.map-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--c); vertical-align: 0; }
.planet-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; border: 1px solid transparent; cursor: pointer; }
.planet-card:hover { border-color: var(--line2); } .planet-card .pd { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset -6px -6px 12px rgba(0, 0, 0, .5), 0 0 12px var(--c); background: var(--c); }
/* dialog */
#dialog { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); width: min(760px, 94vw); z-index: 31; display: none; padding: 20px 24px; border-left: 4px solid var(--gold); pointer-events: auto; background: rgba(7, 12, 23, .94); backdrop-filter: blur(16px); border-radius: 16px; border-top: 1px solid var(--line2); border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
#dialog.show { display: block; animation: tin .2s; }
#dialog .dn { font-family: var(--font-h); font-weight: 700; letter-spacing: .24em; font-size: 14px; color: var(--gold); text-transform: uppercase; }
#dialog .dt { font-size: 15.5px; line-height: 1.7; color: #eaf1fb; margin: 10px 0 14px; min-height: 48px; }
#dialog .dq { font-size: 12.5px; color: var(--dim); margin-bottom: 10px; } #dialog .dq b { color: var(--teal); }
#dialog .dopts { display: flex; flex-direction: column; gap: 6px; }
.dopt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; text-align: left; }
.dopt:hover { border-color: var(--teal); color: var(--teal); }
.dopt .dk { font-family: var(--font-h); font-weight: 700; color: var(--dim); min-width: 18px; } .dopt .qm { color: var(--gold); font-weight: 800; }
/* settings */
.set-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; font-size: 13px; }
.set-row span { flex: 1; } .set-row input[type=range] { flex: 1.4; accent-color: var(--teal); } .set-row b { width: 52px; text-align: right; color: var(--gold); font-size: 12px; }
.set-row select { background: rgba(0, 0, 0, .4); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; }
.set-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal); }
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; font-size: 12.5px; color: #cfdcef; }
.keys div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(140, 190, 255, .06); } .keys b { color: var(--gold); font-family: var(--font-h); }
/* pause */
#pause { position: fixed; inset: 0; z-index: 40; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(2, 6, 14, .72); backdrop-filter: blur(6px); pointer-events: auto; }
#pause.show { display: flex; }
#pause .btn { width: 280px; }
#pause .pt { font-family: var(--font-h); font-size: 22px; font-weight: 700; letter-spacing: .5em; text-indent: .5em; color: #cfdcef; margin-bottom: 14px; }
/* emote wheel */
#emotes { position: fixed; inset: 0; z-index: 35; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 14, .35); pointer-events: auto; }
#emotes.show { display: flex; }
#emotes .ring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px; border-radius: 18px; background: rgba(7, 12, 23, .92); border: 1px solid var(--line2); }
#emotes button { width: 96px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; font-family: var(--font-h); font-weight: 700; letter-spacing: .1em; font-size: 12px; }
#emotes button:hover { border-color: var(--teal); color: var(--teal); }
/* end screen */
#ending { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(40, 20, 80, .6), rgba(2, 4, 12, .94)); pointer-events: auto; }
#ending.show { display: flex; }
#ending h1 { font-family: var(--font-h); font-size: clamp(34px, 6vw, 70px); letter-spacing: .2em; background: linear-gradient(100deg, #ffab4a, #ffd98a, #3fe0c8, #b48aff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#ending p { max-width: 620px; margin: 18px 0 26px; font-size: 15px; line-height: 1.8; color: #cfdcef; }
/* touch */
#touch { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: none; }
body.mobile #touch { display: block; }
.tstick { position: absolute; left: 26px; bottom: 30px; width: 136px; height: 136px; border-radius: 50%; background: rgba(120, 180, 230, .1); border: 2px solid rgba(120, 210, 255, .3); pointer-events: auto; touch-action: none; }
.tstick .nub { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(95, 216, 255, .35); border: 2px solid rgba(159, 232, 216, .6); }
.tlook { position: absolute; top: 0; right: 0; bottom: 0; left: 45%; pointer-events: auto; touch-action: none; }
.tbtns { position: absolute; right: 16px; bottom: 22px; display: grid; grid-template-columns: repeat(3, 62px); gap: 10px; pointer-events: none; }
.tb { pointer-events: auto; width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(120, 210, 255, .4); background: rgba(8, 20, 34, .6); color: #cfe6ff; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--font-h); letter-spacing: .05em; }
.tb:active { background: rgba(95, 216, 255, .3); } .tb.big { border-color: var(--gold); color: var(--gold); }
.ttop { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; }
.ttop .tb { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; }
body.mobile #abar .k, body.mobile #chat { display: none; }
@media (max-width: 900px) { #tracker { width: 210px; top: 230px; } #mm { width: 140px; height: 140px; } #mapwrap { width: 150px; } #pframe .bars { width: 180px; } .cols, .cols3 { grid-template-columns: 1fr; } .class-grid { grid-template-columns: repeat(5, 1fr); } .slot { width: 44px; height: 44px; font-size: 20px; } }
#fileWarn { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: #050b16; color: #cfdcef; text-align: center; padding: 30px; line-height: 1.8; }

/* account security bits */
.pwmeter { height: 20px; display: flex; align-items: center; gap: 8px; margin: -4px 0 8px; }
.pwmeter i { flex: 1; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--pw, #ff4d5f) var(--w, 0%), rgba(255,255,255,.08) var(--w, 0%)); }
.pwmeter span { font-size: 11px; color: var(--dim); min-width: 64px; text-align: right; letter-spacing: .06em; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); margin: 2px 0 12px; cursor: pointer; user-select: none; }
.remember input { accent-color: var(--teal); }
.note.online { color: #9ef0a8; } .note.offline { color: #ffd98a; }

/* appearance editor */
.swc { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed var(--line2); display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--dim); font-weight: 700; }
.swc input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; }
.swc:hover { border-color: var(--teal); color: var(--teal); }
.rng { width: 100%; accent-color: var(--teal); margin: 2px 0 4px; }
.lbl .lv { float: right; color: var(--teal); letter-spacing: .05em; }
.wardrobe { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 22px; }
.wardrobe .wbview { border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 60%, rgba(95,216,255,.12), rgba(0,0,0,.35)); min-height: 420px; display: flex; align-items: flex-end; justify-content: center; padding: 14px; color: var(--dim); font-size: 12px; text-align: center; }

/* wardrobe: slide the panel aside so the hero is visible */
.win.wardrobe-mode { left: 24px; transform: translate(0, -50%); width: min(430px, 92vw); }
@media (max-width: 800px) { .win.wardrobe-mode { left: 50%; transform: translate(-50%, -50%); } }

/* =====================================================================
   INTERFACE v3 — framed RPG windows, a WoW-style character sheet with
   your live hero in the middle, 3D item icons, quest cards, Lumi's Guide.
   ===================================================================== */
:root { --frame: rgba(255, 217, 138, .34); --frame2: rgba(255, 217, 138, .12); --glass: rgba(8, 13, 25, .94); --glass2: rgba(14, 22, 40, .9); }
/* ---- window frame: double border, gilded corners, header band ---- */
.win { background: linear-gradient(180deg, rgba(20, 30, 54, .96), var(--glass) 90px); border: 1px solid var(--frame); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 0 5px rgba(12, 18, 32, .85), 0 0 0 6px var(--frame2), 0 40px 110px rgba(0, 0, 0, .65); }
.win::before, .win::after { content: ''; position: absolute; width: 26px; height: 26px; pointer-events: none; border: 2px solid var(--gold); opacity: .8; }
.win::before { left: -4px; top: -4px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.win::after { right: -4px; bottom: -4px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }
.win-h { padding: 14px 20px 12px; background: linear-gradient(90deg, rgba(255, 217, 138, .10), rgba(255, 217, 138, 0) 55%); border-bottom: 1px solid var(--frame2); border-radius: 14px 14px 0 0; }
.win-h h2 { font-size: 21px; text-shadow: 0 2px 12px rgba(255, 190, 90, .35); }
.win-h h2::before { content: '✦ '; color: var(--ember); font-size: 15px; vertical-align: 2px; }
.win-h .x { border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); }
.win-h .x:hover { border-color: var(--red); color: #ffb0b8; background: rgba(255, 77, 95, .08); }
.tabs { gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--frame2); background: rgba(0, 0, 0, .18); }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; margin: 0; background: rgba(255, 255, 255, .02); }
.tab:hover { border-color: var(--line2); }
.tab.on { color: #1a1206; background: linear-gradient(100deg, #ffd98a, #ffb86a); border-color: transparent; box-shadow: 0 4px 14px rgba(255, 184, 106, .25); }
.sect { color: #b9c8de; }
.sect::after { background: linear-gradient(90deg, var(--frame2), transparent); }
.shop-row { transition: background .12s, border-color .12s; }
.shop-row:hover { background: rgba(255, 217, 138, .05); }

/* ---- item icons ---- */
img.iico { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); pointer-events: none; image-rendering: auto; }
.bslot img.iico { width: 92%; height: 92%; }
.sic img.iico { width: 100%; height: 100%; }
.eslot, .bslot { background: radial-gradient(circle at 50% 38%, rgba(60, 84, 128, .55), rgba(10, 16, 30, .95) 72%); }
.r-b1.bslot, .r-b1.eslot { background: radial-gradient(circle at 50% 38%, rgba(82, 224, 168, .22), rgba(10, 16, 30, .95) 72%); }
.r-b2.bslot, .r-b2.eslot { background: radial-gradient(circle at 50% 38%, rgba(95, 184, 255, .26), rgba(10, 16, 30, .95) 72%); }
.r-b3.bslot, .r-b3.eslot { background: radial-gradient(circle at 50% 38%, rgba(192, 138, 255, .3), rgba(10, 16, 30, .95) 72%); }
.r-b4.bslot, .r-b4.eslot { background: radial-gradient(circle at 50% 38%, rgba(255, 171, 74, .34), rgba(10, 16, 30, .95) 72%); }
#tip img.tip-ico { float: right; width: 64px; height: 64px; margin: -2px -4px 4px 10px; border-radius: 10px; border: 1px solid var(--line2); background: radial-gradient(circle at 50% 38%, rgba(60, 84, 128, .5), rgba(10, 16, 30, .95) 72%); }
.toast img.toast-ico { width: 30px; height: 30px; vertical-align: middle; margin: -6px 6px -6px -4px; }

/* ---- character sheet ---- */
.sheet { display: grid; grid-template-columns: 210px 1fr 210px 380px; gap: 14px; min-height: 520px; }
.sheet-col { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; padding: 4px 0; }
.sheet-slot { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.sheet-col.r .sheet-slot { flex-direction: row-reverse; text-align: right; }
.sheet-slot .eslot { width: 64px; min-width: 64px; height: 64px; aspect-ratio: auto; font-size: 26px; }
.sheet-slot .eslot .up { position: absolute; top: 3px; right: 5px; font-size: 10px; font-weight: 700; color: var(--gold); }
.ss-l { min-width: 0; line-height: 1.25; }
.ss-l b { display: block; font-family: var(--font-h); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-l small { font-size: 10.5px; color: var(--dim); letter-spacing: .04em; }
.sheet-portrait { position: relative; display: flex; flex-direction: column; justify-content: space-between; border-radius: 14px; border: 1px solid var(--frame2); cursor: grab;
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0) 38%, rgba(4, 8, 16, .55) 80%), linear-gradient(180deg, rgba(4, 8, 16, .35), rgba(4, 8, 16, 0) 30%, rgba(4, 8, 16, 0) 60%, rgba(4, 8, 16, .75)); }
.sheet-portrait:active { cursor: grabbing; }
.sp-top { text-align: center; padding: 12px 8px 0; text-shadow: 0 2px 8px #000; }
.sp-name { font-family: var(--font-h); font-weight: 700; font-size: 24px; letter-spacing: .1em; color: var(--gold); }
.sp-sub { font-family: var(--font-h); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.sp-gs { position: absolute; right: 10px; top: 64px; text-align: right; text-shadow: 0 2px 8px #000; }
.sp-gs small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.sp-gs b { font-family: var(--font-h); font-size: 26px; color: #fff; }
.sp-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.sp-ah { grid-column: 1 / -1; font-family: var(--font-h); font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.sp-ah .pts { color: #1a1206; background: var(--gold); border-radius: 999px; padding: 1px 8px; letter-spacing: .08em; animation: lpulse 2s infinite; }
.sp-attrs .attr { margin: 0; padding: 6px 8px; background: rgba(8, 14, 26, .82); border: 1px solid var(--line); gap: 7px; }
.sp-attrs .attr .ai { color: var(--gold); font-size: 15px; }
.sp-attrs .attr .an { font-size: 12.5px; }
.sp-attrs .attr .av { font-size: 16px; min-width: 22px; }
.sheet-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sbox { padding: 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.sbox .sect { margin-top: 0; }
.sbox .sect .btn { margin-left: auto; }
.sect .cap { width: 70px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; display: inline-block; }
.sect .cap i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.sheet .bag { grid-template-columns: repeat(6, 1fr); gap: 5px; }
.hint2 { font-size: 11px; margin-top: 8px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.st-g { min-width: 0; }
.st-g:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.st-g:first-child .st-h { grid-column: 1 / -1; }
.st-h { font-family: var(--font-h); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 6px 0 2px; opacity: .85; }
.st { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 12.5px; border-bottom: 1px dashed rgba(140, 190, 255, .07); }
.st .st-i { color: var(--dim2); font-size: 13px; }
.st .st-n { color: var(--dim); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st b { font-weight: 700; color: var(--text); font-family: var(--font-h); font-size: 14px; }
.st-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-h); font-weight: 700; font-size: 15px; }
.st-foot .consw { margin-left: auto; display: flex; gap: 10px; }
.st-foot .cons { cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.st-foot .cons b { color: var(--text); font-size: 13px; }
/* the window steps aside so the hero shows through the portrait */
.win.sheet-mode { width: min(1180px, 97vw); background: linear-gradient(180deg, rgba(20, 30, 54, .9), rgba(8, 13, 25, .55) 110px, rgba(8, 13, 25, .5)); backdrop-filter: none; }
.win.sheet-mode .win-b { overflow: visible; }
@media (max-width: 1100px) { .sheet { grid-template-columns: 180px 1fr 180px 330px; } .sheet-slot .eslot { width: 54px; min-width: 54px; height: 54px; } }

/* ---- NPC dialog quest card ---- */
.qcard { margin: 2px 0 6px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 217, 138, .05); border: 1px solid var(--frame2); }
.qc-h { font-family: var(--font-h); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.qc-s { font-family: var(--font-h); font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); margin: 10px 0 4px; }
.qc-o { font-size: 13.5px; color: #e4ecf8; padding: 2px 0; } .qc-o.done { color: var(--green); } .qc-o b { color: var(--gold); margin-left: 4px; }
.qc-r { display: flex; flex-wrap: wrap; gap: 6px; }
.rw { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .03em; }
.rw.xp { color: var(--xp); } .rw.cr { color: var(--gold); }
#dialog { background: linear-gradient(180deg, rgba(18, 28, 50, .97), rgba(8, 13, 25, .97)); border: 1px solid var(--frame); border-left: 4px solid var(--gold); box-shadow: 0 0 0 5px rgba(12, 18, 32, .8), 0 30px 80px rgba(0, 0, 0, .6); }
#dialog .dq { color: var(--dim); }

/* ---- quest tracker extras ---- */
.tq .qo.warn { color: #ffb86a; font-size: 11.5px; }
.tq .qo.travel { color: #8fe0ff; font-size: 11.5px; }
.tq.sugg { border-left-color: #fff1b8; background: rgba(40, 32, 8, .72); }
.tq.sugg .qn { color: #fff1b8; }
.tq .qm, .tq.sugg .qm { color: #ffd24d; font-weight: 900; margin-right: 4px; }

/* ---- Lumi's Guide ---- */
#guide { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%) translateY(8px); width: min(520px, 90vw); padding: 12px 16px 14px; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
  background: linear-gradient(180deg, rgba(28, 22, 50, .94), rgba(12, 10, 26, .94)); border: 1px solid rgba(180, 138, 255, .45); box-shadow: 0 0 0 4px rgba(12, 10, 26, .6), 0 16px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(150, 110, 255, .2); z-index: 5; }
#guide.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#guide.good { border-color: var(--green); }
#guide .gh { display: flex; align-items: center; gap: 6px; font-family: var(--font-h); font-weight: 700; font-size: 12px; letter-spacing: .24em; color: #d8c0ff; }
#guide .gh .gi { color: var(--gold); }
#guide .gh .gs { color: var(--dim); letter-spacing: .08em; }
#guide .gh .gx { margin-left: auto; font-size: 10.5px; letter-spacing: .1em; color: var(--dim2); cursor: pointer; text-decoration: underline; }
#guide .gh .gx:hover { color: var(--text); }
#guide .gt { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: #f0eaff; }
.tut-hl { outline: 2px solid var(--gold) !important; outline-offset: 3px; animation: tuthl 1.1s ease-in-out infinite; position: relative; z-index: 4; }
@keyframes tuthl { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 217, 138, .0), 0 0 18px rgba(255, 217, 138, .55); } 50% { box-shadow: 0 0 0 6px rgba(255, 217, 138, .18), 0 0 30px rgba(255, 217, 138, .85); } }
/* character sheet fit: compact bag & stats so it fits a 720p screen; HUD hides behind it */
.sheet { min-height: 0; height: min(560px, calc(88vh - 150px)); }
.sheet .bag { grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sheet .bslot { border-radius: 8px; }
.sheet .bslot .il { font-size: 9px; bottom: 1px; right: 3px; }
.stats { grid-template-columns: 1fr 1fr 1fr; gap: 2px 12px; }
.st-g:first-child { grid-column: auto; display: block; }
.st { font-size: 11.5px; padding: 2px 0; } .st b { font-size: 12.5px; } .st .st-i { display: none; }
.sheet-side { overflow-y: auto; }
.win.sheet-mode .win-b { overflow: hidden; padding-bottom: 14px; }
body.sheet-open #hud > *:not(#toasts) { opacity: 0 !important; transition: opacity .2s; }
/* one dock: abilities on the left, every window's shortcut in a compact grid on the right */
#abar { align-items: center; pointer-events: auto; }
.ab-slots { display: flex; gap: 6px; }
.ab-menu { display: grid; grid-template-columns: repeat(5, 38px); grid-auto-rows: 24px; gap: 4px; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line2); }
.ab-menu .mb { display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 7px; font-size: 13px; color: #c9d6ea; cursor: pointer; border: 1px solid var(--line); background: rgba(255, 255, 255, .035); transition: all .12s; }
.ab-menu .mb:hover { color: var(--gold); border-color: var(--frame); background: rgba(255, 217, 138, .1); }
.ab-menu .mb kbd, .wk { font-family: var(--font-h); font-weight: 700; font-size: 9.5px; line-height: 1; padding: 1px 3px; border-radius: 3px; background: rgba(0, 0, 0, .5); border: 1px solid var(--line2); color: var(--gold); }
.wk { font-size: 10px; padding: 2px 4px; }
/* flying: the ship HUD takes the middle, the menu stays as a slim strip */
#abar.ship { padding: 4px 6px; }
#abar.ship .ab-slots { display: none; }
#abar.ship .ab-menu { grid-template-columns: repeat(11, 38px); margin: 0; padding: 0; border: none; }
@media (max-width: 1200px) { .slot { width: 46px; height: 46px; font-size: 21px; } .ab-menu { grid-template-columns: repeat(5, 34px); grid-auto-rows: 21px; } }
.wk { font-size: 12px; vertical-align: 3px; margin-left: 6px; letter-spacing: 0; text-shadow: none; }
body.mobile .wk { display: none; }
/* login extras & recovery card */
.auth-opts { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; }
.auth-opts .remember { margin: 0; }
#authForgot { margin-top: 6px; font-size: 12.5px; }
#recModal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; background: rgba(2, 5, 12, .78); backdrop-filter: blur(6px); }
#recModal.hidden { display: none; }
.rec-card { width: min(460px, 92vw); text-align: left; }
.rec-card p { font-size: 13px; line-height: 1.55; margin: 6px 0 12px; }
.rec-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.rec-code { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .08em; text-align: center; padding: 14px 10px; border-radius: 10px; border: 1px dashed var(--gold); color: var(--gold); background: rgba(255, 217, 138, .06); user-select: all; -webkit-user-select: all; }
.rec-btns { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }

/* build window: sub-tabs, cards, housing */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.st2 { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-family: var(--font-h); font-weight: 700; letter-spacing: .1em; font-size: 12.5px; text-transform: uppercase; color: var(--dim); cursor: pointer; }
.st2:hover { color: var(--text); border-color: var(--line2); } .st2.on { color: #1a1206; background: linear-gradient(100deg, #ffd98a, #ffb86a); border-color: transparent; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; }
.bcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); transition: border-color .12s, transform .12s; }
.bcard:hover { border-color: var(--frame); transform: translateY(-1px); }
.bcard.feature { border-color: var(--frame); background: linear-gradient(100deg, rgba(255, 217, 138, .08), var(--glass2)); }
.bc-ic { width: 46px; height: 46px; min-width: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: var(--teal); background: rgba(63, 224, 200, .08); border: 1px solid var(--line); }
.bc-img, .sic-img { width: 54px; height: 54px; min-width: 54px; border-radius: 10px; background: radial-gradient(circle at 50% 40%, rgba(60, 84, 128, .5), rgba(10, 16, 30, .95) 72%); border: 1px solid var(--line); object-fit: contain; }
.sic-img { width: 40px; height: 40px; min-width: 40px; }
.bc-b { flex: 1; min-width: 0; line-height: 1.35; }
.bc-b b { font-family: var(--font-h); font-size: 15px; } .bc-b small { display: block; font-size: 11.5px; color: var(--dim); }
.bc-cost { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.cost { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; color: #d8e4f4; } .cost.red { color: #ff8a96; }
.empty-note { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 12px; border: 1px dashed var(--line2); color: var(--dim); font-size: 13.5px; line-height: 1.6; }
.empty-note > svg { font-size: 30px; color: var(--gold); } .empty-note b { color: var(--text); }
.home-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--frame); background: linear-gradient(100deg, rgba(255, 217, 138, .1), rgba(14, 22, 40, .9)); }
.home-hero .hh-ic { font-size: 34px; color: var(--gold); } .home-hero b { font-family: var(--font-h); font-size: 20px; display: block; } .home-hero small { color: var(--dim); font-size: 12.5px; } .home-hero .btn { margin-left: auto; }
.opt .chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .4); }

/* =====================================================================
   INTERFACE v4 — every window in the style of the character sheet:
   framed glass cards, gold section rules, hero headers, tiles and chips.
   ===================================================================== */
.win-b { background: radial-gradient(ellipse at 50% 0%, rgba(255, 217, 138, .04), transparent 60%); }
.sect { font-size: 11.5px; color: var(--gold); opacity: .92; }
.lbl { color: #b9c8de; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-family: var(--font-h); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line2); color: var(--dim); background: rgba(0, 0, 0, .25); margin-right: 6px; }
.chip.w { color: #9ef0ff; border-color: rgba(95, 216, 255, .35); } .chip.s { color: var(--ember); border-color: rgba(255, 122, 69, .4); } .chip.r { color: var(--teal); border-color: rgba(63, 224, 200, .45); }

/* rows become cards (shop, travel, activities, station, build lists) */
.shop-row { position: relative; background: linear-gradient(100deg, rgba(24, 34, 58, .92), rgba(12, 18, 32, .92)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 7px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.shop-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--frame); opacity: .0; transition: opacity .12s; }
.shop-row:hover { border-color: var(--frame); background: linear-gradient(100deg, rgba(40, 46, 66, .95), rgba(16, 22, 38, .95)); }
.shop-row:hover::before { opacity: 1; }
.shop-row .sic { width: 46px; height: 46px; min-width: 46px; border-radius: 11px; background: radial-gradient(circle at 50% 38%, rgba(60, 84, 128, .55), rgba(10, 16, 30, .95) 72%); }
.shop-row .snm b { font-size: 15.5px; letter-spacing: .02em; }
.price { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 217, 138, .08); border: 1px solid rgba(255, 217, 138, .25); min-width: 0; }

/* skills */
.hero-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--frame); background: radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--cc) 22%, transparent), transparent 60%), linear-gradient(100deg, rgba(26, 36, 60, .95), rgba(12, 18, 32, .95)); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.hc-ic { width: 76px; height: 76px; min-width: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; color: var(--cc); background: radial-gradient(circle, color-mix(in srgb, var(--cc) 30%, transparent), rgba(8, 12, 22, .9) 70%); border: 2px solid color-mix(in srgb, var(--cc) 60%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--cc) 35%, transparent); }
.hc-b { flex: 1; min-width: 0; } .hc-n { font-family: var(--font-h); font-weight: 700; font-size: 26px; letter-spacing: .08em; color: #fff; }
.hc-r { font-family: var(--font-h); font-weight: 600; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--cc); }
.hc-p { font-size: 13px; color: #d6e2f2; margin-top: 6px; line-height: 1.5; } .hc-p b { color: var(--gold); }
.hc-pts { text-align: center; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .3); } .hc-pts b { display: block; font-family: var(--font-h); font-size: 30px; line-height: 1; color: var(--dim); } .hc-pts small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hc-pts.on { border-color: var(--gold); animation: lpulse 2s infinite; } .hc-pts.on b { color: var(--gold); }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: linear-gradient(160deg, rgba(26, 36, 60, .95), rgba(11, 16, 30, .95)); border: 1px solid var(--line); transition: border-color .12s, transform .12s; }
.ab-card:hover { border-color: color-mix(in srgb, var(--cc) 55%, transparent); transform: translateY(-1px); }
.ab-card.ult { border-color: rgba(255, 171, 74, .45); background: linear-gradient(160deg, rgba(60, 40, 20, .9), rgba(14, 14, 26, .95)); grid-column: 1 / -1; }
.ab-card.locked { opacity: .5; filter: grayscale(.5); }
.ab-ic { position: relative; width: 58px; height: 58px; min-width: 58px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; color: var(--cc); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--cc) 28%, transparent), rgba(8, 12, 22, .95) 72%); border: 1px solid color-mix(in srgb, var(--cc) 45%, transparent); }
.ab-ic kbd { position: absolute; right: -5px; bottom: -5px; font-family: var(--font-h); font-weight: 700; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #0a0f1c; border: 1px solid var(--line2); color: var(--gold); }
.ab-b { flex: 1; min-width: 0; } .ab-n { font-family: var(--font-h); font-weight: 700; font-size: 16.5px; }
.ult-tag { margin-left: 8px; font-size: 10px; letter-spacing: .16em; color: #ffab4a; border: 1px solid rgba(255, 171, 74, .5); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.ab-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--dim); margin: 3px 0 5px; } .ab-meta span { display: inline-flex; align-items: center; gap: 3px; }
.ab-d { font-size: 12.5px; color: #cfdcef; line-height: 1.45; }
.ab-card .plus { align-self: center; }
.pips i { width: 16px; height: 6px; } .pips i.on { background: linear-gradient(90deg, var(--gold), #ffb86a); box-shadow: 0 0 6px rgba(255, 200, 100, .5); }

/* journal */
.hub-intro, .hub-head, .hub-event { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hub-intro { margin-bottom: 14px; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-panel, .hub-station { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(155deg, rgba(24, 34, 58, .82), rgba(12, 18, 32, .9)); }
.hub-panel .sect { margin-bottom: 8px; }
.hub-event { padding: 9px 0; }
.hub-event b, .hub-main b, .hub-head b { display: block; font-family: var(--font-h); color: #fff3d0; }
.hub-event small, .hub-main small, .hub-head small, .hub-job small, .hub-progress small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--dim); }
.hub-actions { display: flex; gap: 6px; flex-shrink: 0; }
.hub-row, .hub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hub-row { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.hub-main { min-width: 0; }
.hub-main small { color: var(--dim); }
.hub-station { margin-top: 8px; padding: 9px; background: rgba(0, 0, 0, .14); }
.hub-job { padding-top: 8px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); }
.hub-job b { font-size: 12.5px; }
.hub-job small { color: #cfdcef; }
.hub-job small.dim { color: var(--dim); }
.hub-progress { margin-top: 9px; }
.hub-progress .bar { height: 5px; margin-top: 5px; }
.hub-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hub-worlds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.hub-world { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .18); color: var(--dim); font-size: 10.5px; cursor: pointer; }
.hub-world.done { color: var(--teal); border-color: rgba(63, 224, 200, .3); }
@media (max-width: 760px) { .hub-grid { grid-template-columns: 1fr; } .hub-goals { grid-template-columns: 1fr; } .hub-intro { align-items: flex-start; } }
.qrow { position: relative; background: linear-gradient(100deg, rgba(24, 34, 58, .9), rgba(12, 18, 32, .9)); border: 1px solid var(--line); border-radius: 12px; }
.qrow.story { border-left: 3px solid var(--ember); }
.qrow.sel { border-color: var(--gold); background: linear-gradient(100deg, rgba(60, 50, 26, .6), rgba(12, 18, 32, .92)); }
.qrow .ln { display: flex; align-items: center; gap: 8px; } .qrow.story .ln { color: #ffc48a; }
.lvp { margin-left: auto; font-size: 11px; font-family: var(--font-h); font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(63, 224, 200, .12); color: var(--teal); } .lvp.hard { background: rgba(255, 77, 95, .12); color: #ff8a96; }
.qdetail { padding: 4px 6px; }
.qd-title { font-family: var(--font-h); font-weight: 700; font-size: 28px; letter-spacing: .03em; color: #fff3d0; text-shadow: 0 2px 14px rgba(255, 190, 90, .25); }
.qd-sub { margin: 6px 0 12px; }
.qd-text { font-style: italic; color: #e0e8f6; font-size: 14px; line-height: 1.65; margin-bottom: 12px; padding-left: 12px; border-left: 2px solid var(--frame); }
.codex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codex-e { margin: 0; background: linear-gradient(160deg, rgba(24, 34, 58, .9), rgba(12, 18, 32, .9)); border: 1px solid var(--line); border-radius: 12px; }
.ce-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .ce-h > svg { color: var(--gold); font-size: 16px; }
.codex-e.k-bestiary .ce-h > svg { color: #ff8a96; } .codex-e.k-wildlife .ce-h > svg { color: var(--green); } .codex-e.k-anomaly .ce-h > svg { color: var(--violet); }
.ce-d { font-size: 12.5px; color: #cfdcef; line-height: 1.5; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach { margin: 0; align-items: flex-start; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(24, 34, 58, .9), rgba(12, 18, 32, .9)); }
.ach.got { border-color: rgba(255, 217, 138, .45); background: linear-gradient(160deg, rgba(60, 50, 26, .55), rgba(12, 18, 32, .92)); } .ach.got .ai { color: var(--gold); box-shadow: 0 0 16px rgba(255, 200, 100, .3); }
.an2 { font-family: var(--font-h); font-weight: 700; font-size: 15px; } .ad2 { font-size: 12px; color: var(--dim); margin-top: 2px; } .at2 { font-size: 11px; color: var(--gold); margin-top: 3px; letter-spacing: .04em; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(24, 34, 58, .9), rgba(12, 18, 32, .9)); }
.tile .ti2 { color: var(--gold); font-size: 18px; opacity: .85; } .tile b { font-family: var(--font-h); font-size: 24px; color: #fff; line-height: 1.1; } .tile small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

/* settings */
.set-row { background: linear-gradient(100deg, rgba(24, 34, 58, .85), rgba(12, 18, 32, .85)); border: 1px solid var(--line); border-radius: 11px; }
.set-row:hover { border-color: var(--line2); }
.keys { gap: 6px 14px; } .keys div { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); } .keys b { font-family: var(--font-h); padding: 1px 8px; border-radius: 6px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line2); }
.opt { border-radius: 999px; padding: 6px 13px; background: rgba(255, 255, 255, .03); transition: all .12s; } .opt:hover { border-color: var(--line2); } .opt.sel { color: #1a1206; background: linear-gradient(100deg, #ffd98a, #ffb86a); border-color: transparent; font-weight: 700; }
.sw { width: 28px; height: 28px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5) inset, 0 2px 6px rgba(0, 0, 0, .3); } .sw.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), 0 0 12px rgba(255, 217, 138, .6); }

/* map */
#mapCanvas { border: 1px solid var(--frame2); box-shadow: 0 10px 30px rgba(0, 0, 0, .4) inset; }
.map-legend { padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }

/* pause & emotes */
#pause { background: radial-gradient(ellipse at 50% 40%, rgba(40, 60, 100, .5), rgba(2, 5, 12, .88)); }
#pause .pt { font-size: 30px; color: var(--gold); text-shadow: 0 2px 20px rgba(255, 190, 90, .35); }
#pause .btn { width: 300px; padding: 13px 18px; border-color: var(--frame2); background: linear-gradient(100deg, rgba(26, 36, 60, .95), rgba(12, 18, 32, .95)); }
#pause .btn:hover { border-color: var(--gold); color: var(--gold); }
#emotes .ring { border: 1px solid var(--frame); box-shadow: 0 0 0 5px rgba(12, 18, 32, .8), 0 30px 80px rgba(0, 0, 0, .6); background: linear-gradient(180deg, rgba(20, 30, 54, .96), rgba(8, 13, 25, .96)); }
#emotes button { font-family: var(--font-h); font-weight: 700; letter-spacing: .1em; color: #d8e4f4; background: linear-gradient(160deg, rgba(26, 36, 60, .9), rgba(11, 16, 30, .9)); }
#emotes button:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* shop header & tooltip polish */
#tip { border: 1px solid var(--frame); box-shadow: 0 0 0 4px rgba(12, 18, 32, .7), 0 16px 40px rgba(0, 0, 0, .6); background: linear-gradient(180deg, rgba(20, 28, 48, .98), rgba(6, 10, 20, .98)); }
body.mobile .ab-grid, body.mobile .codex-grid { grid-template-columns: 1fr; }
body.mobile .hero-card { flex-wrap: wrap; } body.mobile .hc-ic { width: 56px; height: 56px; min-width: 56px; font-size: 28px; }

.vendor-hero { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--frame); background: linear-gradient(100deg, rgba(255, 217, 138, .1), rgba(14, 22, 40, .92)); }
.vh-ic { width: 52px; height: 52px; min-width: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: var(--gold); background: radial-gradient(circle, rgba(255, 217, 138, .22), rgba(8, 12, 22, .9) 70%); border: 1px solid var(--frame); }
.vh-b { flex: 1; } .vh-b b { font-family: var(--font-h); font-size: 20px; display: block; } .vh-b small { color: var(--dim); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.vh-purse { font-family: var(--font-h); font-weight: 700; font-size: 18px; color: var(--gold); padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 217, 138, .3); }

/* ---- furniture stash, market pieces, room building ---- */
.stash-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.stash-it { position: relative; width: 62px; height: 62px; border-radius: 12px; border: 1px solid var(--frame2); background: radial-gradient(circle at 50% 40%, rgba(60, 84, 128, .5), rgba(10, 16, 30, .95) 72%); cursor: pointer; }
.stash-it img { width: 100%; height: 100%; object-fit: contain; }
.stash-it b { position: absolute; right: 4px; bottom: 2px; font-family: var(--font-h); font-size: 13px; color: var(--teal); text-shadow: 0 1px 3px #000; }
.stash-it:hover { border-color: var(--gold); }
.bcard.market { border-color: rgba(255, 217, 138, .45); background: linear-gradient(100deg, rgba(255, 217, 138, .07), var(--glass2)); }
.rooms-hero { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--frame); background: linear-gradient(100deg, rgba(63, 224, 200, .08), rgba(14, 22, 40, .9)); }
.rh-grid { min-width: 154px; display: grid; place-items: center; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.rh-b { flex: 1; display: flex; flex-direction: column; gap: 8px; } .rh-b b { font-family: var(--font-h); font-size: 20px; } .rh-b small { color: var(--dim); line-height: 1.5; }
.rh-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--teal); } .rh-b .btn { align-self: flex-start; }
.tool-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tc { padding: 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.tc kbd { align-self: flex-start; font-family: var(--font-h); font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: 5px; background: rgba(0, 0, 0, .5); border: 1px solid var(--frame2); color: var(--gold); }
.tc b { font-family: var(--font-h); font-size: 15px; } .tc small { color: var(--dim); font-size: 12px; line-height: 1.45; }
body.mobile .tool-cards { grid-template-columns: 1fr; } body.mobile .rooms-hero { flex-direction: column; align-items: stretch; }
/* room building: the active tool, on screen */
#roomHud { position: fixed; z-index: 13; left: 50%; top: 84px; transform: translateX(-50%); display: none; gap: 6px; padding: 6px; border-radius: 14px; pointer-events: auto; }
#roomHud.show { display: flex; }
#roomHud .rt { padding: 7px 12px; border-radius: 10px; font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .04em; color: #c9d6ea; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; display: flex; gap: 6px; align-items: center; }
#roomHud .rt.on { color: #1a1206; background: var(--gold); border-color: var(--gold); }
#roomHud .rt kbd { font-size: 10px; padding: 1px 4px; border-radius: 3px; background: rgba(0, 0, 0, .35); }
#roomHud .rt.done { color: var(--text); border-color: var(--frame2); }

/* ---- wardrobe v2: a tidy side panel, the hero framed in the free space ---- */
.win.wardrobe-mode { width: min(470px, 92vw); max-height: 88vh; background: linear-gradient(180deg, rgba(20, 30, 54, .95), rgba(8, 13, 25, .9)); }
.ward-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ward-head > div:first-child { flex: 1; } .ward-head b { font-family: var(--font-h); font-size: 20px; letter-spacing: .06em; display: block; } .ward-head small { font-family: var(--font-h); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; }
.ward-cam { display: flex; gap: 4px; } .ward-cam .btn { min-width: 34px; font-size: 16px; padding: 4px 8px; }
.ward-card { padding: 10px 12px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.ward-card .wc-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; } .ward-card .wc-h b { font-family: var(--font-h); font-size: 15px; color: var(--gold); letter-spacing: .06em; } .ward-card .wc-h small { color: var(--dim); font-size: 11.5px; }
.ward-card .lbl:first-of-type { margin-top: 2px; }
.ward-card .opt.off { opacity: .45; }
.ward-foot { font-size: 11.5px; margin-top: 4px; }
/* ---- skiff tab ---- */
.win.skiff-mode { width: min(1000px, 96vw); }
.skiff-tab { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.sk-view { position: relative; min-height: 360px; border-radius: 14px; border: 1px solid var(--frame2); overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(60, 110, 170, .35), rgba(6, 10, 20, .95) 70%), linear-gradient(180deg, #0b1426, #050810); }
.sk-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.sk-name { position: absolute; left: 14px; top: 12px; pointer-events: none; text-shadow: 0 2px 8px #000; } .sk-name b { display: block; font-family: var(--font-h); font-size: 24px; letter-spacing: .1em; color: var(--gold); } .sk-name small { color: var(--dim); }
.sk-hint { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--dim2); letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.sk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.sks { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--glass2); border: 1px solid var(--line); } .sks span { color: var(--cyan); font-size: 18px; } .sks small { color: var(--dim); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; } .sks b { font-family: var(--font-h); font-size: 16px; }
.hull-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.hull { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; transition: all .12s; } .hull b { display: block; font-family: var(--font-h); font-size: 14.5px; } .hull small { color: var(--dim); font-size: 11px; line-height: 1.3; display: block; }
.hull:hover { border-color: var(--frame); } .hull.sel { border-color: var(--gold); background: rgba(255, 217, 138, .1); } .hull.sel b { color: var(--gold); }
body.mobile .skiff-tab { grid-template-columns: 1fr; } body.mobile .sk-view { min-height: 220px; }

/* =================== title & menus v2: a view from orbit =================== */
#title { flex-direction: column; align-items: stretch; justify-content: center; overflow: hidden; background: radial-gradient(ellipse at 72% 8%, rgba(70, 120, 220, .32), transparent 55%), radial-gradient(ellipse at 8% 70%, rgba(150, 80, 230, .2), transparent 50%), linear-gradient(#040a17, #02050c 80%); }
.t-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.t-planet { position: absolute; border-radius: 50%; display: block; }
/* the world below: a huge curve of planet with a glowing rim of atmosphere */
.t-planet.p1 { width: 190vmax; height: 190vmax; left: 50%; top: 74vh; margin-left: -95vmax; background: radial-gradient(circle at 50% 3%, #5aa0e8 0%, #2f6fb8 6%, #184580 14%, #0a2346 26%, #050f20 40%);
  box-shadow: 0 0 0 2px rgba(150, 220, 255, .55), 0 -6px 50px rgba(120, 200, 255, .55), 0 -40px 180px rgba(80, 150, 255, .35); animation: tbreathe 9s ease-in-out infinite; }
.t-planet.p1::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 3.2%, rgba(255, 255, 255, .025) 3.2% 3.6%); mix-blend-mode: screen; }
.t-planet.p2 { width: 13vmin; height: 13vmin; right: 5vw; top: 5vh; background: radial-gradient(circle at 32% 30%, #ffc27a, #e0662a 45%, #5a1a0a 78%); box-shadow: 0 0 40px rgba(255, 130, 60, .35); animation: tfloat 16s ease-in-out infinite; }
.t-planet.p3 { width: 7vmin; height: 7vmin; left: 5vw; top: 9vh; background: radial-gradient(circle at 35% 30%, #b8fff0, #3fc8b0 50%, #0a3a3a 85%); box-shadow: 0 0 26px rgba(63, 224, 200, .35); animation: tfloat 12s ease-in-out infinite reverse; }
.t-planet.p3 b { position: absolute; left: -45%; top: 38%; width: 190%; height: 24%; border-radius: 50%; border: 2px solid rgba(200, 255, 245, .45); transform: rotate(-18deg); }
.t-planet.p4 { width: 3.5vmin; height: 3.5vmin; left: 30vw; top: 9vh; background: radial-gradient(circle at 35% 30%, #e8d8ff, #8a6ad8 55%, #2a1a4a); opacity: .85; }
@keyframes tfloat { 50% { transform: translateY(-12px); } }
@keyframes tbreathe { 50% { box-shadow: 0 0 0 2px rgba(150, 220, 255, .65), 0 -8px 70px rgba(120, 200, 255, .65), 0 -50px 200px rgba(80, 150, 255, .42); } }
.t-shoot { position: absolute; width: 140px; height: 1.5px; background: linear-gradient(90deg, transparent, #fff); opacity: 0; transform: rotate(-24deg); animation: tshoot 9s linear infinite; }
.t-shoot.s1 { left: 58vw; top: 12vh; } .t-shoot.s2 { left: 18vw; top: 32vh; animation-delay: 3.4s; } .t-shoot.s3 { left: 76vw; top: 40vh; animation-delay: 6.6s; }
@keyframes tshoot { 0% { opacity: 0; translate: 0 0; } 2% { opacity: .9; } 8% { opacity: 0; translate: -260px 120px; } 100% { opacity: 0; translate: -260px 120px; } }
.t-skiff { position: absolute; width: 90px; left: -120px; top: 56vh; filter: drop-shadow(0 0 10px rgba(122, 240, 255, .5)); animation: tskiff 26s linear infinite 2s; }
@keyframes tskiff { 0% { transform: translate(0, 0) rotate(-4deg); } 45% { transform: translate(62vw, -12vh) rotate(-8deg); } 55% { transform: translate(74vw, -14vh) rotate(-3deg); } 100% { transform: translate(140vw, -24vh) rotate(-10deg); } }
.t-wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(30px, 6vw, 90px); padding: 20px 28px 70px; flex-wrap: wrap; }
.t-hero { max-width: 520px; }
.t-hero .brand { text-align: left; text-indent: 0; font-size: clamp(40px, 5.6vw, 76px); }
.t-hero .brand-sub { text-align: left; text-indent: 0; margin: 12px 0 22px; letter-spacing: .5em; }
.t-studio { font-size: 12px; letter-spacing: .12em; color: #8fa3c4; margin: -12px 0 20px; }
.t-studio b { color: #cfe0f6; font-weight: 600; }
.t-crest { display: flex; align-items: center; gap: 12px; color: var(--gold); margin-bottom: 12px; width: 220px; }
.t-crest i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 217, 138, .7)); } .t-crest i:last-child { background: linear-gradient(90deg, rgba(255, 217, 138, .7), transparent); }
.t-crest span { font-size: 14px; text-shadow: 0 0 12px rgba(255, 217, 138, .8); }
.t-crest.small { width: 160px; margin-bottom: 6px; }
.t-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.t-feats li { position: relative; padding-left: 22px; color: #c9d8ee; font-size: 15px; letter-spacing: .02em; }
.t-feats li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.t-feats b { color: var(--gold); font-family: var(--font-h); font-size: 17px; }
/* the login card wears the same gold frame as the in-game windows */
.card.t-card { width: min(410px, 92vw); padding: 28px 30px 24px; background: linear-gradient(180deg, rgba(20, 30, 54, .92), rgba(8, 13, 25, .94)); border: 1px solid var(--frame); box-shadow: 0 0 0 5px rgba(12, 18, 32, .75), 0 0 0 6px rgba(255, 217, 138, .18), 0 30px 90px rgba(0, 0, 0, .6); }
.card.t-card::before, .card.t-card::after { content: ''; position: absolute; width: 26px; height: 26px; border: 2px solid var(--gold); pointer-events: none; }
.card.t-card::before { left: -7px; top: -7px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.card.t-card::after { right: -7px; bottom: -7px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
.card.t-card h3 { font-size: 15px; color: var(--gold); letter-spacing: .32em; text-align: center; margin-bottom: 18px; }
.card.t-card .field { background: rgba(4, 8, 16, .7); border-color: var(--line2); }
.card.t-card .field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 217, 138, .15); }
.card.t-card #authGo { margin-top: 6px; padding: 13px; font-size: 16px; letter-spacing: .14em; }
.t-foot { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; z-index: 1; font-size: 12px; color: var(--dim2); }
.t-foot .note { margin: 0; }
/* character select & creation: a framed panel over the living scene */
.side.framed { margin: 18px 0 18px 18px; height: calc(100% - 36px); border-radius: 18px; background: linear-gradient(180deg, rgba(20, 30, 54, .9), rgba(8, 13, 25, .86)); border: 1px solid var(--frame); box-shadow: 0 0 0 5px rgba(12, 18, 32, .6), 0 30px 80px rgba(0, 0, 0, .5); padding: 26px 26px; }
.side.framed .brand { color: var(--gold); font-size: 30px; }
.side.framed .char-row { background: rgba(255, 255, 255, .035); }
.side.framed .char-row.sel { border-color: var(--gold); background: rgba(255, 217, 138, .08); box-shadow: inset 3px 0 0 var(--gold); }
.side.framed #playBtn, .side.framed #ncCreate { padding: 14px; font-size: 16px; letter-spacing: .12em; }
@media (max-width: 860px) { .t-hero { text-align: center; } .t-hero .brand, .t-hero .brand-sub { text-align: center; } .t-crest { margin: 0 auto 10px; } .t-feats { display: none; } .t-wrap { padding-top: 10px; } }
body.mobile .t-feats { display: none; } body.mobile .t-hero .brand { font-size: 38px; } body.mobile .t-wrap { gap: 14px; padding-bottom: 40px; }
body.mobile .side.framed { margin: 0; height: 100%; border-radius: 0; }
/* narrow Courier panels (wardrobe): tabs wrap into tidy pills instead of squashing */
.win.wardrobe-mode .tabs { flex-wrap: wrap; gap: 5px; padding: 10px 14px; }
.win.wardrobe-mode .tab { padding: 5px 11px; font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
.tab { white-space: nowrap; }
.sk-view { align-self: start; height: min(440px, 62vh); position: sticky; top: 0; }
body.mobile .sk-view { height: 220px; position: relative; }

/* ---- spellbook: bar editor and talents ---- */
.bar-edit { display: flex; gap: 8px; flex-wrap: wrap; }
.be { position: relative; width: 92px; height: 78px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 22px; color: #cfe6ff; text-align: center; padding: 4px; }
.be small { font-size: 10.5px; line-height: 1.15; color: var(--dim); font-family: var(--font-h); letter-spacing: .03em; }
.be kbd { position: absolute; left: 5px; top: 4px; font-family: var(--font-h); font-size: 10px; font-weight: 700; color: var(--gold); }
.be.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 217, 138, .25), inset 0 0 18px rgba(255, 217, 138, .12); }
.be.shut { opacity: .45; cursor: default; } .be.ult { cursor: default; border-color: rgba(255, 217, 138, .45); }
.ab-card.onbar { box-shadow: inset 3px 0 0 var(--cc); }
.ab-card .btn.small { margin-top: 6px; }
.tal-rows { display: flex; flex-direction: column; gap: 8px; }
.tal-row { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; align-items: stretch; }
.tal-row.shut { opacity: .5; }
.tal-lv { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-h); font-weight: 700; color: var(--gold); border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.tal { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass2); cursor: pointer; transition: all .12s; }
.tal b { display: block; font-family: var(--font-h); font-size: 14.5px; } .tal small { color: var(--dim); font-size: 12px; }
.tal:hover { border-color: var(--frame); } .tal.on { border-color: var(--gold); background: rgba(255, 217, 138, .1); } .tal.on b { color: var(--gold); }
body.mobile .tal-row { grid-template-columns: 1fr; } body.mobile .be { width: 72px; height: 66px; }
.slot.empty { opacity: .4; }
.cls { position: relative; } .cls-new { position: absolute; top: -6px; right: -4px; font-style: normal; font-family: var(--font-h); font-size: 9px; font-weight: 700; letter-spacing: .1em; padding: 1px 5px; border-radius: 999px; background: var(--gold); color: #1a1206; }

/* ---- level locks ---- */
.lk { display: inline-flex; align-items: center; font-style: normal; font-family: var(--font-h); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: var(--gold); border: 1px solid rgba(255, 217, 138, .4); white-space: nowrap; }
.sw.locked { position: relative; opacity: .55; cursor: not-allowed; display: grid; place-items: center; }
.sw.locked .lk { transform: scale(.85); }
.swc.locked { display: grid; place-items: center; opacity: .7; cursor: not-allowed; }
.hull.locked { opacity: .55; cursor: not-allowed; }
.swc.locked { overflow: visible; } .swc.locked .lk { font-size: 8px; padding: 0 3px; }

/* ---- Halo Station's Skiff Bay / read-only showroom ---- */
/* skill tree (Kinetic Arts): a column per school, its nodes in tiers joined by a thin line */
.arts-hero { --cc: var(--teal); margin-bottom: 12px; }
.art-tag { color: var(--cc); border-color: color-mix(in srgb, var(--cc) 55%, transparent); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; align-items: start; }
.art-col { display: flex; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 12%, rgba(14, 22, 40, .92)), rgba(9, 14, 26, .94) 120px); }
.art-sch { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .art-sch b { display: block; font-family: var(--font-h); font-size: 17px; letter-spacing: .08em; color: var(--sc); } .art-sch small { display: block; font-size: 11px; color: var(--dim); line-height: 1.3; }
.art-sch > div { flex: 1; min-width: 0; } .art-sch em { font-style: normal; font-family: var(--font-h); font-weight: 700; color: var(--dim); font-size: 13px; }
.as-ic { width: 34px; height: 34px; min-width: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; color: var(--sc); border: 1px solid color-mix(in srgb, var(--sc) 50%, transparent); background: rgba(0, 0, 0, .35); }
.art-tier { display: grid; grid-template-columns: 1fr; gap: 6px; } .art-tier.t1 { padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--sc) 35%, transparent); }   /* the two side branches */
.art-link { display: block; width: 2px; height: 10px; margin: 0 auto; background: color-mix(in srgb, var(--sc) 45%, transparent); }
.art-node { padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 16, 30, .85); cursor: pointer; transition: border-color .12s, transform .12s, opacity .12s; min-width: 0; }
.art-node:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--sc) 60%, transparent); }
.art-node .an-h { display: flex; align-items: center; gap: 6px; } .art-node .an-h b { font-family: var(--font-h); font-size: 14.5px; line-height: 1.1; }
.art-node .an-ic { font-size: 17px; color: var(--sc); display: inline-grid; }
.art-node .an-t { font-size: 10px; letter-spacing: .12em; color: var(--dim); margin: 3px 0 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.art-node .an-d { font-size: 11.5px; color: #cfdcef; line-height: 1.38; }
.art-node .an-s { margin-top: 5px; font-size: 10.5px; letter-spacing: .06em; color: var(--dim); display: flex; align-items: center; gap: 4px; }
.art-node.pass { background: rgba(10, 16, 30, .7); border-style: dashed; }
.art-node.open { border-color: color-mix(in srgb, var(--sc) 55%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--sc) 22%, transparent); } .art-node.open .an-s { color: var(--sc); }
.art-node.have { border-color: var(--sc); border-style: solid; background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 24%, rgba(14, 22, 40, .95)), rgba(10, 16, 30, .95)); } .art-node.have .an-s { color: var(--sc); }
.art-node.shut { opacity: .55; } .art-node.shut .an-d { color: var(--dim); }
.art-node .an-s a { color: var(--dim); text-decoration: underline; cursor: pointer; } .art-node .an-s a:hover { color: var(--red); }
.art-node .an-bar { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; } .art-node .an-bar small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-right: 2px; }
.art-node .an-bar button { min-width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .35); color: var(--text); font-family: var(--font-h); font-weight: 700; font-size: 13px; cursor: pointer; }
.art-node .an-bar button.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 35%, transparent); color: #fff; }
/* per-class trees: three paths, each tier labelled; the capstone stands out */
.art-grid.paths { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.art-grid.paths .art-tier.t1 { padding-left: 0; border-left: 0; }
.art-tl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--sc) 70%, var(--dim)); margin: 2px 2px 0; }
.art-tier.t3 .art-node { border-width: 1.5px; border-style: solid; border-color: color-mix(in srgb, var(--sc) 45%, transparent); }
.art-tier.t3 .art-node.have { box-shadow: 0 0 16px color-mix(in srgb, var(--sc) 35%, transparent); }
.halo-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--frame); background: linear-gradient(100deg, rgba(255, 217, 138, .1), rgba(14, 22, 40, .9)); }
.halo-note > svg { font-size: 26px; color: var(--gold); flex: none; } .halo-note b { display: block; font-family: var(--font-h); font-size: 15px; color: var(--gold); } .halo-note small { color: var(--dim); font-size: 12px; }
.ro .hull, .ro .sw, .ro .swc { cursor: default; pointer-events: none; }

/* ---- sleeping in your bed ---- */
#sleepFade { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #03060c; opacity: 0; pointer-events: none; transition: opacity .9s ease; }
#sleepFade.show { opacity: 1; }
#sleepFade b { font-family: var(--font-h); font-size: 26px; color: #e8f0fb; letter-spacing: .04em; }
#sleepFade small { color: var(--dim); font-size: 13px; }

/* ---- Wardrobe → Fairy ---- */
.fairy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.fc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 12px; border: 1px solid var(--frame); background: rgba(14, 22, 40, .7); cursor: pointer; text-align: center; transition: border-color .15s, transform .15s; }
.fc:hover { transform: translateY(-1px); border-color: rgba(255, 217, 138, .5); }
.fc.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 18px rgba(255, 217, 138, .18); }
.fc i { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 14px var(--g, #ffe2a0), 0 0 4px #fff inset; }
.fc b { font-size: 12.5px; line-height: 1.15; } .fc small { font-size: 11px; color: var(--dim); }
.fc.locked { cursor: default; opacity: .55; } .fc.locked i { filter: grayscale(.8) brightness(.6); box-shadow: none; }

/* ---- parties, players window, chat lines ---- */
#partyFrame { position: absolute; left: 18px; top: 152px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
#partyFrame .pm { display: flex; align-items: center; gap: 7px; width: 200px; padding: 5px 8px; border-radius: 10px; background: rgba(8, 14, 26, .72); border: 1px solid rgba(255, 217, 138, .28); }
#partyFrame .pm.away { opacity: .6; }
.pm-c { width: 10px; height: 10px; border-radius: 50%; background: var(--cc, #3fe0c8); box-shadow: 0 0 8px var(--cc, #3fe0c8); flex: none; }
.pm-b { flex: 1; min-width: 0; } .pm-b b { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: #ffe6b0; white-space: nowrap; overflow: hidden; } .pm-b small { color: var(--dim); font-weight: 500; font-size: 11px; }
.pm-hp { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .5); margin-top: 3px; overflow: hidden; } .pm-hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a6a, #ff8a7a); }
.soc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--frame); background: rgba(14, 22, 40, .6); margin-bottom: 6px; }
.soc-row .snm { flex: 1; min-width: 0; } .soc-row .snm b { display: block; } .soc-row .snm small { color: var(--dim); font-size: 12px; }
.soc-row.ask { border-color: var(--gold); background: linear-gradient(100deg, rgba(255, 217, 138, .12), rgba(14, 22, 40, .8)); }
.soc-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.soc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 12px; }
#chatLog .sys { font-style: italic; } #chatLog .wh { color: #e0a8ff; }
@media (max-width: 760px) { #partyFrame { top: 92px; left: 10px; } #partyFrame .pm { width: 160px; } }

/* ---- bug report form ---- */
#bugForm { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(3, 6, 12, .55); padding: 16px; }
#bugForm.show { display: flex; }
#bugForm .bf-card { width: min(520px, 100%); padding: 18px; border-radius: 16px; }
#bugForm .bf-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-h); font-size: 20px; color: var(--gold); } #bugForm .x { cursor: pointer; opacity: .7; }
#bugForm p { font-size: 13px; margin: 8px 0 10px; }
#bugForm textarea { width: 100%; min-height: 130px; resize: vertical; border-radius: 10px; border: 1px solid var(--frame); background: rgba(6, 10, 20, .8); color: var(--text); padding: 10px; font: inherit; font-size: 14px; box-sizing: border-box; }
#bugForm .bf-f { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; }

/* ---- backups ---- */
.modal-bg { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(3, 6, 12, .6); padding: 16px; }
.modal-bg.show { display: flex; }
.modal-card { width: min(540px, 100%); max-height: 86vh; overflow: auto; padding: 18px; border-radius: 16px; }
.modal-card .bf-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-h); font-size: 19px; color: var(--gold); } .modal-card .x { cursor: pointer; opacity: .7; }
.bk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--frame); border-radius: 10px; margin-bottom: 6px; color: var(--text); }
.bk-row small { display: block; color: var(--dim); font-size: 12px; }
.char-row .x.bk + .x { margin-left: 0; } .char-row .x.bk:hover { color: var(--gold); background: rgba(255, 217, 138, .1); }
.char-rec { text-align: center; font-size: 12.5px; color: var(--dim); padding: 6px; cursor: pointer; } .char-rec:hover { color: var(--gold); }

#evChip { position: absolute; left: 18px; top: 132px; font-size: 11.5px; letter-spacing: .06em; color: #bfe8ff; text-shadow: 0 1px 4px #000; font-weight: 600; max-width: 340px; }
#hudInfoStack { position: absolute; left: 18px; top: 132px; width: min(340px, 34vw); display: flex; flex-direction: column; gap: 6px; }
#hudInfoStack > #evChip, #hudInfoStack > #tracker, #hudInfoStack > #actHud { position: static; left: auto; right: auto; top: auto; transform: none; width: auto; max-width: none; min-width: 0; }
#hudInfoStack > #actHud { padding: 9px 12px; text-align: left; }
@media (max-width: 900px) { #hudInfoStack { width: min(270px, 32vw); } }
@media (max-width: 760px) { #evChip { top: 110px; left: 10px; font-size: 10.5px; max-width: 60vw; } #partyFrame { top: 128px; } }

/* ---- fairy: name and wings ---- */
.fairy-name { display: flex; gap: 8px; margin-top: 6px; }
.fairy-name input { flex: 1; min-width: 0; border-radius: 10px; border: 1px solid var(--frame); background: rgba(6, 10, 20, .8); color: var(--text); padding: 8px 10px; font: inherit; }
.fairy-grid.wings .fc small { font-size: 10.5px; line-height: 1.2; }
.wg { width: 44px !important; height: 30px !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; position: relative; }
.wg::before, .wg::after { content: ''; position: absolute; top: 3px; width: 20px; height: 22px; background: linear-gradient(135deg, #fff, #bfe8ff 55%, rgba(255, 200, 250, .5)); opacity: .9; }
.wg::before { left: 1px; border-radius: 80% 10% 60% 30%; transform: rotate(-12deg); } .wg::after { right: 1px; border-radius: 10% 80% 30% 60%; transform: rotate(12deg); }
.wg-pixie::before, .wg-pixie::after { height: 24px; background: radial-gradient(ellipse at 50% 50%, rgba(240, 255, 220, .55) 0 45%, #d8f0b0 70%, #aef0ff 92%); box-shadow: 0 0 6px rgba(170, 240, 255, .8); }
.wg-butterfly::before, .wg-butterfly::after { border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff 0 18%, #d8e8ff 19% 60%, #5a4a78 61%); }
.wg-petal::before, .wg-petal::after { border-radius: 50% 0; background: linear-gradient(135deg, #fff, #ffc0dc); }
.wg-moth::before, .wg-moth::after { border-radius: 30% 30% 60% 60%; background: radial-gradient(circle at 60% 45%, #3a3050 0 12%, #fff 13% 22%, #d8d0c8 23%); }
.wg-flame::before, .wg-flame::after { border-radius: 60% 10% 70% 20%; background: linear-gradient(0deg, #ff4a2a, #ffb04a 50%, #fff4b0); }
.wg-crystal::before, .wg-crystal::after { border-radius: 0; clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); background: linear-gradient(135deg, #fff, #9ae8ff); }
.wg-starlight::before, .wg-starlight::after { background: radial-gradient(circle at 30% 30%, #fff 0 8%, transparent 9%), radial-gradient(circle at 65% 60%, #fff 0 7%, transparent 8%), linear-gradient(135deg, #d8e0ff, #9a7aff); }
.fc.locked .wg { filter: grayscale(1) brightness(.5); }

/* ---- live 3D portrait in the player frame ---- */
#pPor { overflow: visible; }
#pPor canvas#pCv { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
#pPor.live #pIcon { display: none; }
#pPor .lvl { z-index: 3; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }

/* skiff HUD above the shortcut bar, not on top of it */
#shipHud { bottom: 96px; }
body.mobile #shipHud { bottom: 20px; }
/* flying on PC: Lumi's guide moves up out of the way of the skiff HUD */
body.flying:not(.mobile) #guide { bottom: auto; top: 64px; }
/* the level: a badge hanging below the portrait circle (never clipped by it) and "Lv N" beside the name */
#pPor .lvl { right: auto; left: 50%; bottom: -15px; transform: translateX(-50%); }
#pframe .nm .plv { color: var(--gold); font-size: .78em; font-weight: 700; margin-left: 4px; letter-spacing: .04em; }
body.mobile #pframe #pPor .lvl { right: auto; left: 50%; bottom: -17px; transform: translateX(-50%); min-width: 22px; height: 18px; font-size: 11px; }
body.mobile #pframe #pPor { width: 48px; height: 48px; }

#tracker .tqh { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: max-content; min-width: 112px; margin-left: auto; pointer-events: auto; cursor: pointer; font-family: var(--font-h); font-weight: 700; font-size: 13px; letter-spacing: .16em; color: var(--gold); text-align: right; padding: 7px 10px; border: 1px solid rgba(255, 217, 138, .5); border-radius: 8px; background: rgba(7, 12, 23, .94); box-shadow: 0 3px 12px rgba(0, 0, 0, .45); user-select: none; }
#tracker .tqh:hover { background: rgba(30, 27, 20, .98); border-color: var(--gold); }
#tracker .tqh b { color: var(--gold); transition: transform .15s; }
#tracker.min .tqh b { display: inline-block; transform: rotate(-90deg); }
#tracker.min .tq { display: none !important; }

/* ---- performance ----
   backdrop-filter re-blurs the 3D view behind every panel on every frame. Over a live WebGL canvas
   that's a full-screen GPU cost (worst on Retina Macs and in Safari) for an effect the near-opaque
   panels barely show. Menus keep it; while playing, the panels just get a little more opaque. */
body.ingame .panel, body.ingame .win, body.ingame #dialog { backdrop-filter: none; -webkit-backdrop-filter: none; }
body.ingame .panel { background: rgba(9, 15, 28, .9); }
#perfForm { z-index: 72; }
#perfForm textarea { width: 100%; min-height: 70px; resize: vertical; border-radius: 10px; border: 1px solid var(--frame); background: rgba(6, 10, 20, .8); color: var(--text); padding: 10px; font: inherit; font-size: 14px; box-sizing: border-box; }
#perfForm p { font-size: 13px; margin: 8px 0 10px; }
#perfForm .bf-f { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.pf-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pf-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pf-stats span { font-size: 12.5px; color: var(--dim); border: 1px solid var(--frame); border-radius: 8px; padding: 4px 8px; }
.pf-stats b { color: var(--text); }
.pf-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12.5px; }
.pf-foot a { color: var(--dim); cursor: pointer; } .pf-foot a:hover { color: var(--gold); }
#fpsMeter { position: fixed; left: 50%; top: 6px; transform: translateX(-50%); z-index: 60; font: 600 11px/1.2 ui-monospace, Menlo, monospace; color: #9fe8b0; background: rgba(0, 0, 0, .45); padding: 2px 6px; border-radius: 6px; pointer-events: none; }
#fpsMeter.meh { color: #ffd98a; } #fpsMeter.bad { color: #ff6a7a; }

/* ---- skiff bay: per-hull stats ---- */
.hstat { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-top: 6px; }
.hstat span { display: flex; align-items: center; gap: 2px; font-size: 9.5px; letter-spacing: .06em; color: var(--dim); }
.hstat em { font-style: normal; width: 38px; }
.hstat i { width: 5px; height: 7px; border-radius: 1px; background: rgba(255, 255, 255, .12); }
.hstat i.on { background: var(--teal, #3fe0c8); }
.hull small.htrait { display: block; margin-top: 4px; color: var(--gold); font-size: 10.5px; }
#authLoad { font-size: 12.5px; color: var(--dim); text-align: center; margin: 2px 0 6px; }
#authLoad.err-load { color: #ff8a8a; }
#glWarn { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 96; width: min(640px, 94vw); padding: 10px 34px 10px 14px; border-radius: 12px; background: rgba(60, 14, 22, .94); border: 1px solid #ff6a7a; color: #ffe6ea; font-size: 13px; line-height: 1.4; }
#glWarn a { position: absolute; right: 10px; top: 8px; cursor: pointer; opacity: .8; }
/* downed (dead, or the skiff destroyed): the HUD and touch controls step aside */
body.downed #hud > *:not(#toasts), body.downed #touch { opacity: 0 !important; pointer-events: none !important; transition: opacity .4s; }
/* controller: the menu cursor, and a ring round whatever it would click */
#padCursor { position: fixed; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #ffd98a; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 217, 138, .6); pointer-events: none; z-index: 100000; display: none; will-change: transform; }
#padCursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #ffd98a; }
.pad-hot { outline: 2px solid rgba(255, 217, 138, .85) !important; outline-offset: 2px; }
