/* ==========================================================================
   Goldmeadow Vale — UI skin
   Dark lacquered panels, gold trim, glossy bars, beveled slots.
   ========================================================================== */
:root {
  --gold: #e2c172;
  --gold-hi: #fff0b8;
  --gold-lo: #8a6430;
  --gold-dk: #3a2810;
  --ink: #0b0806;
  --panel-a: rgba(38, 29, 20, 0.94);
  --panel-b: rgba(13, 10, 7, 0.95);
  --text: #f1e8d4;
  --text-dim: #b9ab90;
  --title-font: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body-font: 'Alegreya Sans', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* reusable "gold-trimmed panel" border: dark edge, gold rim, dark gap, faint inner gold */
  --trim: inset 0 0 0 1px #000, inset 0 0 0 2px var(--gold-lo), inset 0 0 0 3px #1a120a, inset 0 0 0 4px rgba(226, 193, 114, 0.18), inset 0 0 24px rgba(0, 0, 0, 0.55);
  --drop: 0 6px 22px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 220, 150, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; font-family: var(--body-font); color: var(--text); user-select: none; font-size: 14px; }
#game canvas { display: block; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.35); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #6a4c22, #b08a48, #6a4c22); border-radius: 5px; border: 1px solid #000; }
* { scrollbar-color: #8a6a32 rgba(0, 0, 0, 0.35); scrollbar-width: thin; }

/* money */
.gold, .silver, .copper { font-weight: 700; white-space: nowrap; }
.gold::after, .silver::after, .copper::after { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-left: 2px; box-shadow: inset 0 -1px 1px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .7); }
.gold { color: #ffd84a; } .gold::after { background: radial-gradient(circle at 35% 30%, #fff4a0, #e8b81a 55%, #8a6400); }
.silver { color: #e4e4ec; } .silver::after { background: radial-gradient(circle at 35% 30%, #fff, #b8bcc8 55%, #5a5e68); }
.copper { color: #f0a870; } .copper::after { background: radial-gradient(circle at 35% 30%, #ffd2a8, #c07038 55%, #5a2a10); }

/* ---------- shared panel + window chrome ---------- */
.panel, .win, .frame, #actionBar, #tooltip, #continueBox, .classCard, #moneyBar {
  background: var(--noise), linear-gradient(180deg, var(--panel-a), var(--panel-b));
  box-shadow: var(--trim), var(--drop);
  border-radius: 9px;
}
.win { position: absolute; display: none; padding: 0 16px 16px; min-width: 200px; }
/* corner rivets */
.win::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 9px;
  background:
    radial-gradient(circle at 7px 7px, var(--gold-hi) 0 1px, var(--gold) 1.5px 2.6px, #000 3.2px, transparent 3.8px),
    radial-gradient(circle at calc(100% - 7px) 7px, var(--gold-hi) 0 1px, var(--gold) 1.5px 2.6px, #000 3.2px, transparent 3.8px),
    radial-gradient(circle at 7px calc(100% - 7px), var(--gold-hi) 0 1px, var(--gold) 1.5px 2.6px, #000 3.2px, transparent 3.8px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), var(--gold-hi) 0 1px, var(--gold) 1.5px 2.6px, #000 3.2px, transparent 3.8px); }
.win h2 {
  margin: 0 -16px 12px; padding: 12px 44px 10px 18px; font-family: var(--title-font); font-size: 17px; font-weight: 700; letter-spacing: .6px;
  color: var(--gold); text-shadow: 0 1px 0 #000, 0 0 10px rgba(0, 0, 0, .9);
  background: linear-gradient(180deg, rgba(120, 80, 30, .35), rgba(60, 38, 14, .15) 60%, transparent), linear-gradient(90deg, transparent, rgba(226, 193, 114, .12), transparent);
  border-radius: 9px 9px 0 0; position: relative;
}
.win h2::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 15%, var(--gold) 50%, var(--gold-lo) 85%, transparent); }
.win h3 { margin: 4px 0 8px; font-family: var(--title-font); font-size: 16px; color: var(--gold); text-shadow: 0 1px 0 #000; }
.win h4 { margin: 14px 0 6px; font-family: var(--title-font); font-size: 13px; letter-spacing: .5px; color: var(--gold); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.win h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-lo), transparent); }
.close { position: absolute; z-index: 2; right: 10px; top: 9px; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; font-weight: 700; color: #ffd9b0; text-shadow: 0 1px 0 #000;
  background: radial-gradient(circle at 40% 30%, #c0392b, #6a120c 70%, #3a0804); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), inset 0 1px 1px rgba(255, 255, 255, .35), 0 2px 4px rgba(0, 0, 0, .6); }
.close:hover { filter: brightness(1.3); }
.qtext { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.6; color: #3a2a14; padding: 12px 14px; border-radius: 4px;
  background: radial-gradient(ellipse at 30% 20%, #f4e6c4, #e2cc9c 70%, #c8ad78); box-shadow: inset 0 0 18px rgba(110, 70, 20, .45), 0 0 0 1px #5a4020, 0 2px 6px rgba(0, 0, 0, .5); }
.btns { margin-top: 14px; display: flex; gap: 8px; }
.tt-dim { color: var(--text-dim); font-size: 12px; }

/* buttons */
.btn {
  position: relative; cursor: pointer; font-family: var(--title-font); font-weight: 700; font-size: 13px; letter-spacing: .4px;
  color: #ffe39a; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, .8);
  padding: 8px 18px; border-radius: 5px; border: 1px solid #000;
  background: linear-gradient(180deg, #b32c1c 0%, #7c160c 48%, #5a0d06 52%, #6e140a 100%);
  box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 2px rgba(0, 0, 0, .5), inset 0 2px 0 2px rgba(255, 190, 140, .25), 0 2px 5px rgba(0, 0, 0, .6);
  transition: filter .12s, transform .08s;
}
.btn:hover { filter: brightness(1.22) saturate(1.1); }
.btn:active { transform: translateY(1px); filter: brightness(.9); }
.btn.big { padding: 11px 30px; font-size: 16px; }

/* ---------- create screen ---------- */
#createScreen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50;
  background: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55) 60%, rgba(0, 0, 0, .9)); }
#createScreen h1 { font-family: var(--title-font); font-size: 64px; font-weight: 700; margin: 0; letter-spacing: 3px;
  background: linear-gradient(180deg, #fff6d0 0%, #f2d27a 40%, #b8822e 62%, #f5dc94 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3a2208) drop-shadow(0 0 18px rgba(0, 0, 0, .9)); }
#createScreen .sub { font-family: Georgia, serif; font-style: italic; color: #ecdfbf; margin: 4px 0 28px; text-shadow: 0 1px 4px #000; display: flex; align-items: center; gap: 14px; }
#createScreen .sub::before, #createScreen .sub::after { content: ''; width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
#createScreen .sub::after { transform: scaleX(-1); }
#classCards { display: flex; gap: 22px; }
.classCard { width: 280px; padding: 20px 20px 16px; cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s; filter: saturate(.75) brightness(.9); }
.classCard:hover { transform: translateY(-4px); filter: none; }
.classCard.sel { filter: none; transform: translateY(-4px); box-shadow: var(--trim), 0 0 0 2px var(--gold), 0 0 28px rgba(226, 193, 114, .55), var(--drop); }
.ccIcon { width: 84px; height: 84px; margin: -2px auto 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 30%, #3a2c1c, #0c0906 75%); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold-lo), 0 0 0 5px #000, inset 0 0 14px #000, 0 4px 10px rgba(0, 0, 0, .7); }
.ccIcon .svgi { width: 56px !important; height: 56px !important; }
.ccName { font-family: var(--title-font); font-weight: 700; font-size: 24px; text-align: center; margin: 6px 0 10px; text-shadow: 0 2px 0 #000; }
.ccDesc { font-size: 14px; line-height: 1.5; color: #d8ccb4; min-height: 84px; }
.ccRes { margin-top: 10px; font-size: 13px; color: var(--text-dim); padding-top: 8px; border-top: 1px solid rgba(226, 193, 114, .2); }
.createRow { margin-top: 26px; display: flex; gap: 12px; align-items: center; }
#charName, #serverPass { padding: 10px 14px; font-size: 17px; font-family: var(--title-font); color: #fff4d0; width: 240px; border-radius: 5px; outline: none;
  background: linear-gradient(180deg, #0a0806, #1c150e); border: 1px solid #000; box-shadow: inset 0 0 0 1px var(--gold-lo), inset 0 2px 6px rgba(0, 0, 0, .8); }
#charName:focus, #serverPass:focus { box-shadow: inset 0 0 0 1px var(--gold), inset 0 2px 6px rgba(0, 0, 0, .8), 0 0 10px rgba(226, 193, 114, .35); }
#charName::placeholder, #serverPass::placeholder { color: #7a6a50; }
#continueBox { margin-top: 20px; text-align: center; padding: 14px 22px; }
#continueText { margin-bottom: 10px; color: #ffe9a8; font-family: Georgia, serif; }
.credits { position: absolute; bottom: 12px; font-size: 12px; color: #b8ab90; text-shadow: 0 1px 2px #000; letter-spacing: .4px; }

/* ---------- HUD ---------- */
#hud { display: none; position: fixed; inset: 0; pointer-events: none; }
#hud .ia { pointer-events: auto; }

/* unit frames */
.frame { position: absolute; width: 262px; padding: 8px 10px 8px 66px; min-height: 64px; }
.frame .portrait { position: absolute; left: -6px; top: 50%; margin-top: -32px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 32%, #4a3a26, #120d08 72%);
  box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold), 0 0 0 5px #5a3e14, 0 0 0 6px #000, inset 0 0 14px #000, 0 3px 10px rgba(0, 0, 0, .8); transition: box-shadow .3s; }
.frame .portrait .svgi { width: 42px; height: 42px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.frame .lvl { position: absolute; left: 34px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #ffe39a; text-shadow: 0 1px 0 #000;
  background: radial-gradient(circle at 40% 30%, #4a3a26, #0c0906); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 2px 4px rgba(0, 0, 0, .7); }
.frame .nm { font-size: 14px; font-weight: 700; margin: 0 0 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 #000, 0 0 4px #000; letter-spacing: .2px; }
#pFrame { left: 22px; top: 18px; }
#pFrame.combat .portrait { box-shadow: 0 0 0 2px #000, 0 0 0 4px #e03a2a, 0 0 0 5px #5a1008, 0 0 0 6px #000, inset 0 0 14px #000, 0 0 16px rgba(255, 50, 30, .7); }
#pFrame.combat .nm::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; vertical-align: 1px; transform: rotate(45deg); background: #e33; box-shadow: 0 0 6px #f44; }
#tFrame { left: 312px; top: 18px; display: none; }
#tFrame.elite .portrait { box-shadow: 0 0 0 2px #000, 0 0 0 5px var(--gold), 0 0 0 6px #fff3b0, 0 0 0 7px #5a3e14, 0 0 0 8px #000, inset 0 0 14px #000, 0 0 18px rgba(255, 210, 90, .55); }
#tElite { position: absolute; left: 2px; top: 2px; z-index: 2; font-family: var(--title-font); font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 1px 5px; display: none; color: #2a1a04;
  background: linear-gradient(180deg, #fff3b0, #e2b44a 55%, #9a6a1a); border-radius: 3px; box-shadow: 0 0 0 1px #000, 0 2px 3px rgba(0, 0, 0, .6); }

.bar { position: relative; height: 17px; margin-bottom: 3px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(180deg, #050403, #1a1510); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px rgba(226, 193, 114, .22), inset 0 2px 4px rgba(0, 0, 0, .9); }
.bar .fill { height: 100%; transition: width .18s ease-out; position: relative; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .35); }
.bar::after { content: ''; position: absolute; inset: 1px 1px 50% 1px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04)); pointer-events: none; }
.bar span { position: absolute; inset: 0; z-index: 1; font-size: 11px; font-weight: 700; text-align: center; line-height: 17px; color: #fff; text-shadow: 0 0 2px #000, 1px 1px 0 #000; letter-spacing: .3px; }
#pHp { background: linear-gradient(180deg, #7cf06a, #2fb52a 45%, #137a12); }
.res-mana { background: linear-gradient(180deg, #7fb0ff, #2e62e0 45%, #12307a) !important; }
.res-rage { background: linear-gradient(180deg, #ff8a7a, #d42a1e 45%, #6e0e08) !important; }
.res-stam { background: linear-gradient(180deg, #ffe08a, #d8a21e 45%, #7a5208) !important; }
/* action combat: the crosshair, stamina and a mage's charge */
#crosshair { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; display: none; }
body.aiming #crosshair { display: block; }
#crosshair i { position: absolute; left: 13px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.7), 0 0 6px rgba(0,0,0,.6); transition: transform .08s; }
#crosshair::before, #crosshair::after { content: ''; position: absolute; border: 2px solid rgba(255,255,255,.75); border-radius: 50%; inset: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); opacity: .5; }
#crosshair::after { display: none; }
#crosshair.foe::before { border-color: #ff6a4a; opacity: .9; }
#crosshair.foe i { background: #ff8a6a; }
#crosshair.hitmark i { animation: hitmark .18s ease-out; }
@keyframes hitmark { 0% { transform: scale(3.2); background: #ffd27a; } 100% { transform: scale(1); } }
#crosshair.hurt::before { animation: hurtflash .3s ease-out; }
@keyframes hurtflash { 0% { border-color: #ff2a1a; inset: -6px; opacity: 1; } 100% { inset: 3px; } }
#chargeRing { position: absolute; inset: -6px; border-radius: 50%; opacity: 0; -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
#stamBar { position: absolute; left: 50%; top: calc(50% + 34px); width: 120px; margin-left: -60px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.55); border: 1px solid rgba(0,0,0,.8); overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .4s; }
#stamBar > div { height: 100%; background: linear-gradient(180deg, #ffe08a, #d8a21e); }
#stamBar.low > div { background: linear-gradient(180deg, #ff9a6a, #d8401e); }
#stamBar.winded > div { background: repeating-linear-gradient(-45deg, #d8401e 0 5px, #8a2a12 5px 10px); }
#clickHint { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); color: #f0e6d0; font-size: 14px; background: rgba(0,0,0,.45); padding: 6px 14px; border-radius: 6px; pointer-events: none; display: none; text-shadow: 1px 1px 0 #000; }
#tCast { display: none; height: 13px; margin-top: 4px; }
#tCast .fill { background: linear-gradient(180deg, #ffe680, #f0aa20 50%, #9a5a00); }
#tCast span { font-size: 10px; line-height: 13px; }

.auras { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; padding-bottom: 6px; }
.aura { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; position: relative; border-radius: 4px;
  background: radial-gradient(circle at 40% 30%, #3a3428, #0d0b08); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #3aa83a, 0 0 4px rgba(60, 200, 60, .35); }
.aura.debuff { box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #d0302a, 0 0 4px rgba(220, 40, 30, .45); }
.aura span { position: absolute; bottom: -11px; font-size: 10px; font-weight: 700; color: #ffe970; text-shadow: 1px 1px 0 #000, -1px 0 0 #000; }

/* action bar + xp */
#bottom { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
#actionBar { display: flex; gap: 5px; padding: 8px 10px; position: relative; border-radius: 10px; }
#actionBar::before, #actionBar::after { content: ''; position: absolute; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 42% 38%, #ffb8a0 0 1.5px, #d8402c 2.5px 4.5px, #5a0a04 6px, #000 6.6px 7.2px, #fff0b8 7.8px, #e2c172 9px, #8a6430 12px, #000 12.6px, transparent 13.2px);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8)); }
#actionBar::before { left: -16px; }
#actionBar::after { right: -16px; }
.ab { width: 52px; height: 52px; position: relative; border-radius: 6px; cursor: pointer; overflow: hidden;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px #5a4220, 0 0 0 3px #000, 0 3px 5px rgba(0, 0, 0, .7); transition: box-shadow .12s, transform .08s; }
.ab::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .06) 38%, transparent 40%), radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .55), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 0 8px rgba(0, 0, 0, .7); }
.ab:hover { box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 0 3px #000, 0 0 12px rgba(255, 220, 120, .55); }
.ab.pressed { transform: scale(0.92); }
.ab-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ab-icon .svgi { width: 78%; height: 78%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .75)); }
.ab-cd { position: absolute; inset: 0; display: none; z-index: 1; }
.ab-cdtext { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff6c0; text-shadow: 0 0 3px #000, 0 0 3px #000, 1px 1px 0 #000; }
.ab-key { position: absolute; z-index: 3; top: 2px; right: 4px; font-size: 11px; font-weight: 800; color: #f0f0f0; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.ab-lock { display: none; position: absolute; inset: 0; z-index: 3; background: rgba(0, 0, 0, 0.78); color: #b8a888; font-size: 12px; font-weight: 700; align-items: flex-end; justify-content: center; padding-bottom: 3px; }
.ab.locked .ab-lock { display: flex; }
.ab.locked .ab-lock::before { content: 'Lv '; }
.ab.locked .ab-icon { filter: grayscale(1); }
.ab.unusable .ab-icon { filter: brightness(0.45) saturate(.6); }
.ab.nores .ab-icon { filter: brightness(0.5) sepia(1) hue-rotate(180deg) saturate(3); }
.ab.auto { box-shadow: 0 0 0 1px #000, 0 0 0 2px #ffd700, 0 0 0 3px #000, 0 0 14px 2px rgba(255, 215, 0, .7); animation: autoPulse 1.2s ease-in-out infinite; }
@keyframes autoPulse { 50% { box-shadow: 0 0 0 1px #000, 0 0 0 2px #fff3a0, 0 0 0 3px #000, 0 0 20px 4px rgba(255, 215, 0, .85); } }

#xpBar { width: 620px; height: 13px; position: relative; border-radius: 7px; overflow: hidden;
  background: linear-gradient(180deg, #050403, #17120c); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px var(--gold-lo), 0 0 0 2px #000, inset 0 2px 4px rgba(0, 0, 0, .9), 0 2px 6px rgba(0, 0, 0, .6); }
#xpFill { height: 100%; background: linear-gradient(180deg, #e7a2ff, #9b3ee0 45%, #4a1478); transition: width .4s ease-out; box-shadow: 0 0 8px rgba(190, 110, 255, .6); }
#xpBar::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%), repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), rgba(0, 0, 0, .7) calc(5% - 1px) 5%); }
#xpText { position: absolute; inset: 0; z-index: 1; font-size: 10px; font-weight: 700; text-align: center; line-height: 13px; text-shadow: 1px 1px 0 #000, 0 0 3px #000; }

/* cast bar */
#castBar { display: none; position: absolute; bottom: 136px; left: 50%; transform: translateX(-50%); width: 300px; height: 22px; border-radius: 5px; overflow: hidden;
  background: linear-gradient(180deg, #050403, #17120c); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px var(--gold), 0 0 0 2px #000, 0 0 0 3px rgba(226, 193, 114, .35), 0 4px 12px rgba(0, 0, 0, .7); }
#castFill { height: 100%; background: linear-gradient(180deg, #fff2a0, #f3b828 45%, #a86a00); position: relative; }
#castFill::after { content: ''; position: absolute; right: -3px; top: -4px; bottom: -4px; width: 8px; background: radial-gradient(ellipse, #fff 0, rgba(255, 240, 180, .8) 30%, transparent 70%); }
#castBar::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 50%); }
#castBar.fail #castFill { background: linear-gradient(180deg, #ff7a6a, #c0201a 50%, #6a0a06); width: 100% !important; }
#castText { position: absolute; inset: 0; z-index: 1; text-align: center; font-size: 13px; font-weight: 700; line-height: 22px; color: #fff; text-shadow: 1px 1px 0 #000, 0 0 4px #000; }

/* minimap */
#mmWrap { position: absolute; right: 16px; top: 12px; width: 196px; display: flex; flex-direction: column; align-items: center; }
#zoneName { font-family: var(--title-font); font-weight: 700; color: var(--gold); font-size: 13px; letter-spacing: .5px; text-shadow: 0 1px 0 #000; margin-bottom: 6px; z-index: 2; position: relative;
  padding: 4px 18px 5px; min-width: 130px; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, #2e2216, #0e0a06); border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000, 0 3px 6px rgba(0, 0, 0, .7); }
#mmRing { position: relative; width: 196px; height: 196px; border-radius: 50%; padding: 8px;
  background: conic-gradient(from 200deg, #6a4a1c, #f2d68a, #8a6430, #3a2810, #c8a050, #f8e6a8, #6a4a1c);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000, 0 5px 14px rgba(0, 0, 0, .75); }
#mmRing::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; box-shadow: 0 0 0 1px #000; pointer-events: none; }
#mmRing::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; box-shadow: inset 0 0 18px rgba(0, 0, 0, .85), inset 0 0 3px #000; pointer-events: none; }
#minimap { width: 180px; height: 180px; border-radius: 50%; display: block; }
#mmN { position: absolute; left: 50%; top: -2px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; font-family: var(--title-font); font-size: 11px; font-weight: 700; color: #ffe9a8;
  display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 40% 30%, #4a3a26, #0c0906); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo); text-shadow: 0 1px 0 #000; }
#coords { margin-top: -8px; z-index: 2; position: relative; font-size: 11px; font-weight: 700; color: #e8dcc0; text-shadow: 0 1px 0 #000; padding: 1px 10px;
  background: linear-gradient(180deg, #2e2216, #0e0a06); border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo); }

/* micro menu + money */
#menuBar { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 5px; padding: 5px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 22, 14, .85), rgba(8, 6, 4, .85)); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px rgba(226, 193, 114, .25), 0 3px 10px rgba(0, 0, 0, .6); }
#menuBar div { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
  background: radial-gradient(circle at 50% 30%, #4a3824, #18110a 80%); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo), inset 0 1px 0 1px rgba(255, 230, 170, .15); transition: box-shadow .12s, transform .08s; }
#menuBar div:hover { box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold), 0 0 10px rgba(255, 220, 120, .5); transform: translateY(-1px); }
#menuBar .svgi { width: 24px; height: 24px; }
#moneyBar { position: absolute; right: 16px; bottom: 64px; padding: 5px 12px; border-radius: 6px; font-size: 13px; }

/* chat */
#chatLog { position: absolute; left: 16px; bottom: 26px; width: 430px; height: 196px; overflow-y: auto; padding: 8px 10px; font-size: 13.5px; border-radius: 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .18) 40%, rgba(0, 0, 0, .22)); box-shadow: none; transition: background .3s; }
#chatLog:hover { box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .15); background: linear-gradient(180deg, rgba(10, 8, 5, .55), rgba(10, 8, 5, .7)); }
.msg { text-shadow: 1px 1px 0 #000, 0 0 3px #000; line-height: 1.4; }
.msg.sys { color: #ffeb6a; } .msg.xp { color: #c39cff; } .msg.loot { color: #6cf05a; } .msg.quest { color: #ffd200; }
.msg.level { color: #ffe26a; font-weight: bold; }
.msg.general { color: #ffc8a8; } .msg.say { color: #fff; } .msg.emote { color: #ff9a50; } .msg.whisper { color: #ff8cff; }
.msg.cmb-out { color: #ddd; } .msg.cmb-in { color: #ff7a7a; }
#chatInput { display: none; position: absolute; left: 16px; bottom: 228px; width: 430px; padding: 7px 10px; font-size: 13.5px; font-family: var(--body-font); color: #fff; outline: none; border-radius: 5px; border: 1px solid #000;
  background: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(20, 15, 10, .85)); box-shadow: inset 0 0 0 1px var(--gold), 0 0 10px rgba(226, 193, 114, .3); }
#chatHint { position: absolute; left: 20px; bottom: 6px; font-size: 11px; color: #9a8c70; text-shadow: 0 1px 0 #000; }

/* quest tracker */
#tracker { position: absolute; right: 16px; top: 262px; width: 260px; font-size: 13px; text-shadow: 1px 1px 0 #000, 0 0 4px #000, 0 0 2px #000; }
#tracker:empty { display: none; }
/* world events: a panel above the quest tracker */
#eventPanel { position: absolute; right: 16px; top: 262px; width: 260px; padding: 8px 10px 9px; border-radius: 6px; font-size: 13px;
  background: linear-gradient(180deg, rgba(60, 28, 8, .82), rgba(30, 16, 6, .78)); border: 1px solid #b8642a; box-shadow: 0 0 12px rgba(255, 120, 40, .25); text-shadow: 1px 1px 0 #000; display: none; }
#eventPanel .evHead { display: flex; align-items: center; gap: 7px; }
#eventPanel .evIcon { width: 22px; height: 22px; flex: none; }
#eventPanel .evName { color: #ffb050; font-weight: 700; font-size: 14px; line-height: 1.15; }
#eventPanel .evPlace { color: #c8a888; font-size: 11px; }
#eventPanel .evText { color: #f0e6d0; margin-top: 6px; }
#eventPanel .evBar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(0, 0, 0, .8); margin-top: 4px; overflow: hidden; }
#eventPanel .evBar > div { height: 100%; background: linear-gradient(180deg, #ffc060, #d8701a); transition: width .3s; }
#eventPanel .evBar.hp > div { background: linear-gradient(180deg, #8ae070, #3a9a2a); }
#eventPanel .evBar.burn > div { background: linear-gradient(180deg, #ff7a4a, #b02a10); }
#eventPanel .evSub { color: #d8c8b0; font-size: 11px; margin-top: 5px; }
#eventPanel .evTime { color: #c8a888; font-size: 11px; float: right; margin-top: 6px; }
#eventPanel.done .evText { color: #ffd860; font-weight: 700; }
#eventPanel.failed .evText { color: #ff7a6a; font-weight: 700; }

.trTitle { font-family: var(--title-font); font-weight: 700; color: var(--gold); font-size: 14px; letter-spacing: .6px; margin-bottom: 6px; padding-bottom: 3px; display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid; border-image: linear-gradient(90deg, var(--gold), transparent) 1; }
.trTitle .svgi { width: 18px; height: 18px; }
.trQ { margin-bottom: 8px; } .trName { color: #ffd200; font-weight: 700; } .trName.done { color: #6f6; }
.trName.done::after { content: ' ✓'; }
.trObj { color: #e2dccb; padding-left: 10px; } .odone { color: #8f8; }

/* center texts */
#errorText { position: absolute; top: 120px; width: 100%; text-align: center; color: #ff3a2a; font-size: 18px; font-weight: 800; text-shadow: 1px 1px 0 #000, 0 0 6px #000; opacity: 0; transition: opacity .3s; }
#toast { position: absolute; top: 152px; width: 100%; text-align: center; color: #ffd200; font-size: 17px; font-weight: 700; text-shadow: 1px 1px 0 #000, 0 0 6px #000; opacity: 0; transition: opacity .4s; }
#bigText { position: absolute; top: 27%; width: 100%; text-align: center; font-family: var(--title-font); font-weight: 700; font-size: 52px; letter-spacing: 2px; opacity: 0; transition: opacity .6s, transform .6s; transform: scale(.8);
  background: linear-gradient(180deg, #fffbe0, #ffd860 45%, #c07a18 60%, #ffe8a0); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #2a1604) drop-shadow(0 0 14px rgba(0, 0, 0, .85)); }
#bigText.show { opacity: 1; transform: scale(1); }
#zoneText { position: absolute; top: 17%; width: 100%; text-align: center; font-family: var(--title-font); opacity: 0; transition: opacity 1s; }
#zoneText .z1 { font-size: 44px; font-weight: 700; letter-spacing: 2px; background: linear-gradient(180deg, #fff6d0, #f2d27a 50%, #b8822e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #2a1604) drop-shadow(0 0 12px rgba(0, 0, 0, .9)); }
#zoneText .z2 { font-size: 20px; color: #fff; text-shadow: 0 0 10px #000, 1px 1px 0 #000; letter-spacing: 1px; }

/* nameplates */
#plates, #floaters { position: absolute; inset: 0; overflow: hidden; }
.plate { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; font-size: 12px; font-weight: 700; text-shadow: 1px 1px 0 #000, 0 0 3px #000, 0 0 2px #000; will-change: transform; }
.plate .pl { font-size: 11px; }
.plate.mob .pn { color: #ff5a4a; }
.plate.npc .pn { color: #6f6; font-size: 13px; } .plate .pt { color: #cfc; font-size: 11px; font-weight: 400; font-style: italic; }
.plate .pbar { width: 84px; height: 8px; margin: 2px auto 0; border-radius: 2px; overflow: hidden; background: #1a0604; box-shadow: 0 0 0 1px #000, inset 0 1px 2px rgba(0, 0, 0, .8); position: relative; }
.plate .pbar::after { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent); }
.plate .pfill { height: 100%; background: linear-gradient(180deg, #ff6a5a, #c81e14 50%, #7a0c06); }
.plate.targeted .pbar { width: 100px; box-shadow: 0 0 0 1px #000, 0 0 0 2px #fff, 0 0 8px rgba(255, 255, 255, .6); }
.plate.targeted .pn { font-size: 13px; }
.plate.targeted .pn::before, .plate.targeted .pn::after { content: ''; display: inline-block; border: 5px solid transparent; vertical-align: 0; }
.plate.targeted .pn::before { border-left-color: #fff; border-right-width: 0; margin-right: 5px; }
.plate.targeted .pn::after { border-right-color: #fff; border-left-width: 0; margin-left: 5px; }
.plate.dead .pn { color: #999; } .plate.dead .pbar { display: none; }
.plate .pcast { display: none; width: 84px; height: 6px; margin: 2px auto 0; border-radius: 2px; overflow: hidden; background: #111; box-shadow: 0 0 0 1px #000; }
.plate .pcfill { height: 100%; background: linear-gradient(180deg, #ffe680, #f0aa20); }
.plate.bot .pn { color: #6ab8ff; } .plate.bot .pt { color: #a8d0ff; } .plate.bot .pbar { width: 64px; height: 5px; }
.plate.escort .pn { color: #6f6; } .plate.escort .pbar { width: 80px; }
.plate.escort .pfill { background: linear-gradient(180deg, #7cf06a, #2fb52a 50%, #137a12); }
.plate.bot .pfill { background: linear-gradient(180deg, #7cf06a, #2fb52a 50%, #137a12); }
#onlineBox { display: block; margin: 10px auto 0; color: #bfe8c8; font-size: 14px; cursor: pointer; user-select: none; }
#onlineBox input { vertical-align: middle; accent-color: #5aff8a; }
#serverPass { margin: 8px auto 0; font-size: 15px; padding: 7px 12px; }
.plate.friend .pn { color: #6aff9a; text-shadow: 0 0 6px rgba(80,255,140,0.35), 0 1px 2px #000; } .plate.friend .pt { color: #b8ffd0; }
.plate.tapped .pn { color: #aaa; } .plate.tapped .pfill { background: linear-gradient(180deg, #bbb, #777 50%, #444); }
.bubble { display: none; max-width: 230px; margin: 0 auto 7px; padding: 6px 11px; color: #2a1c0c; border-radius: 10px; font-size: 12.5px; font-weight: 600; text-shadow: none; white-space: normal; position: relative; line-height: 1.35;
  background: linear-gradient(180deg, #fffaf0, #f0e4c8); box-shadow: 0 0 0 1px #6a5030, 0 3px 8px rgba(0, 0, 0, .5); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #f0e4c8; filter: drop-shadow(0 1px 0 #6a5030); }

/* floating combat text */
.floater { position: absolute; left: 0; top: 0; font-family: var(--body-font); font-weight: 900; font-size: 22px; color: #fff; white-space: nowrap; will-change: transform;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 6px rgba(0, 0, 0, .8); }
.floater.fire { color: #ff9a30; } .floater.frost { color: #8fd8ff; } .floater.nature { color: #8f8; }
.floater.dot { font-size: 17px; } .floater.crit { font-size: 28px; color: #ffef50; }
.floater.pdmg { color: #ff3a3a; font-size: 19px; } .floater.heal { color: #3f3; } .floater.miss { color: #ddd; font-size: 16px; }
.floater.xp { color: #d2a2ff; font-size: 16px; }

/* ---------- windows ---------- */
.slot { width: 44px; height: 44px; position: relative; border-radius: 6px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 35%, #2a2218, #0c0a07); box-shadow: inset 0 0 0 1px #000, inset 0 2px 6px rgba(0, 0, 0, .9), 0 0 0 1px rgba(226, 193, 114, .16); }
.slot .ic { position: absolute; inset: 2px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--q, #6d6352); background: radial-gradient(circle at 45% 35%, #4a4030, #15120e 80%);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 8px var(--qg, transparent), 0 0 4px var(--qg, transparent); }
.slot .ic::after { content: ''; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; background: linear-gradient(160deg, rgba(255, 255, 255, .18), transparent 40%); }
.slot .ic.empty { border-color: transparent; background: transparent; box-shadow: none; }
.slot .ic.empty::after { display: none; }
.slot .cnt { position: absolute; z-index: 1; right: 3px; bottom: 1px; font-size: 12px; font-weight: 800; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.slot.unusable .ic { background: radial-gradient(circle, #7a1a14, #2a0806); }
#bagWin { right: 16px; bottom: 112px; width: 282px; }
#bagGrid { display: grid; grid-template-columns: repeat(5, 46px); gap: 5px; justify-content: center; padding: 8px; border-radius: 6px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); }
#bagGrid .slot { cursor: pointer; }
#bagGrid .slot:hover { box-shadow: inset 0 0 0 1px #000, 0 0 0 1px var(--gold), 0 0 8px rgba(255, 220, 120, .5); }
#bagMoney { margin-top: 10px; text-align: right; }
#charWin { left: 16px; top: 120px; width: 460px; }
#charSlots { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; }
.eqrow { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 4px; border-radius: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent); }
.eqslot { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
#charStats { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 13px; padding: 10px 12px; border-radius: 6px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .15); }
#charStats div { display: flex; justify-content: space-between; color: var(--text-dim); } #charStats b { color: #fff; }
#questWin { left: 50%; top: 80px; transform: translateX(-50%); width: 680px; }
#questWin .cols { display: flex; gap: 14px; }
#qlList { width: 230px; max-height: 450px; overflow-y: auto; padding: 4px; border-radius: 6px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .15); }
.qlItem { padding: 6px 8px; cursor: pointer; font-size: 13px; color: #ffd200; border-radius: 4px; }
.qlItem:hover { background: rgba(255, 220, 140, 0.08); } .qlItem.sel { background: linear-gradient(90deg, rgba(255, 210, 0, .22), rgba(255, 210, 0, .04)); box-shadow: inset 2px 0 0 #ffd200; }
#qlDetail { flex: 1; max-height: 450px; overflow-y: auto; font-size: 13.5px; padding-right: 4px; }
#qlDetail .btn { margin-top: 12px; }
#npcWin { left: 30px; top: 120px; width: 400px; max-height: 76vh; overflow-y: auto; font-size: 14px; }
.npcOpt { padding: 7px 8px; cursor: pointer; border-radius: 4px; color: #ffe9a8; display: flex; align-items: center; gap: 6px; }
.npcOpt:hover { background: linear-gradient(90deg, rgba(255, 220, 140, .16), transparent); }
.qi { display: inline-flex; justify-content: center; width: 18px; font-weight: 800; font-family: var(--title-font); font-size: 17px; text-shadow: 1px 1px 0 #000, 0 0 4px rgba(0, 0, 0, .8); }
.qi.y { color: #ffd200; } .qi.g { color: #aaa; }
.rewards { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; }
.reward { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 6px; cursor: pointer; background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent); box-shadow: inset 0 0 0 1px transparent; }
.reward:hover { box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .35); }
.reward.sel { background: linear-gradient(90deg, rgba(255, 210, 0, .2), transparent); box-shadow: inset 0 0 0 1px var(--gold); }
.vendor { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.vItem { display: flex; gap: 8px; align-items: center; font-size: 12px; cursor: pointer; padding: 4px; border-radius: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent); }
.vItem:hover { box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .4); }
#lootWin { left: 50%; top: 40%; width: 240px; transform: translate(-270px, -50%); }
.lootItem { display: flex; gap: 10px; align-items: center; padding: 4px; cursor: pointer; border-radius: 6px; font-size: 13px; margin-bottom: 4px; background: linear-gradient(90deg, rgba(0, 0, 0, .4), transparent); }
.lootItem:hover { box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .45); }
#mapWin { left: 50%; top: 50%; transform: translate(-50%, -50%); }
#mapHint { margin-top: 8px; text-align: center; font-size: 12px; color: #b8a888; }
#worldMap { cursor: grab; width: min(800px, 80vh); height: min(800px, 80vh); display: block; border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--gold-lo), 0 0 0 4px #000, inset 0 0 30px #000; }
#helpWin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 580px; font-size: 14px; line-height: 1.6; }
#helpWin table { width: 100%; border-collapse: collapse; } #helpWin tr:nth-child(odd) td { background: rgba(0, 0, 0, .25); }
#helpWin td { padding: 3px 8px; vertical-align: top; } #helpWin td:first-child { color: var(--gold); font-weight: 700; white-space: nowrap; width: 170px; }
#deathWin { left: 50%; top: 30%; transform: translateX(-50%); text-align: center; width: 320px; padding-top: 18px; box-shadow: var(--trim), 0 0 40px rgba(160, 10, 0, .45), var(--drop); }
#deathWin p { font-family: var(--title-font); font-size: 20px; color: #e8d8c0; margin: 4px 0 18px; text-shadow: 0 2px 0 #000; }

/* icons */
.svgi { width: 82%; height: 82%; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)); overflow: visible; }
.aura .svgi { width: 86%; height: 86%; }
.qi .svgi { display: inline-block; vertical-align: -3px; width: 17px; height: 17px; }

/* gamepad focus */
.padfocus { outline: 2px solid #ffd870 !important; outline-offset: 2px; box-shadow: 0 0 14px rgba(255, 216, 112, .7) !important; border-radius: 6px; }
#helpWin .padhelp { display: none; } body.pad #helpWin .padhelp { display: table; } body.pad #helpWin .kbhelp { display: none; }
.padhint { margin-top: 10px; color: #cfc2a6; font-size: 12px; text-shadow: 0 1px 2px #000; }

/* tooltip */
#tooltip { position: fixed; display: none; z-index: 100; max-width: 310px; padding: 9px 12px; font-size: 13px; line-height: 1.45; pointer-events: none; border-radius: 7px;
  background: linear-gradient(180deg, rgba(14, 18, 40, .97), rgba(6, 8, 20, .97));
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #8f8fa8, inset 0 0 0 3px #1a1a28, 0 6px 18px rgba(0, 0, 0, .75); }
.tt-title { font-size: 15px; font-weight: 800; margin-bottom: 2px; } .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tt-gold { color: #ffd200; } .tt-green { color: #1eff00; }
#tooltip .tt-dim { margin-top: 2px; }
.padDiag { white-space: pre-wrap; font-size: 12px; line-height: 1.45; color: #cfe8ff; background: rgba(0, 0, 0, .4); padding: 6px 10px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .15); user-select: text; }
.padDiag.small { margin-top: 8px; max-width: 640px; text-align: center; color: #cfc2a6; background: rgba(0, 0, 0, .45); }
#fps { position: fixed; left: 50%; top: 6px; transform: translateX(-50%); z-index: 60; display: none; pointer-events: none; padding: 3px 10px; border-radius: 5px;
  font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; color: #e8dcc0; text-align: center; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .3); }

/* professions */
#profWin { left: 50%; top: 70px; transform: translateX(-50%); width: 720px; }
#profWin .cols { display: flex; gap: 14px; }
#profList { width: 250px; max-height: 520px; overflow-y: auto; padding: 4px; border-radius: 6px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(226, 193, 114, .15); }
#profDetail { flex: 1; max-height: 520px; overflow-y: auto; font-size: 13.5px; }
.profHead { display: flex; align-items: center; gap: 8px; padding: 6px 6px 2px; font-weight: 800; color: var(--gold); font-family: var(--title-font); font-size: 13px; letter-spacing: .4px; cursor: pointer; border-radius: 4px; }
.profHead .svgi { width: 22px; height: 22px; flex-shrink: 0; }
.profHead.sel, .profHead:hover { background: rgba(255, 220, 140, .08); }
.skillbar { position: relative; height: 12px; margin: 2px 6px 8px 36px; border-radius: 3px; overflow: hidden; background: #0a0806; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px rgba(226, 193, 114, .2); }
.skillbar .fill { height: 100%; background: linear-gradient(180deg, #8ad0ff, #2a6ad8 50%, #123a7a); }
.skillbar span { position: absolute; inset: 0; text-align: center; font-size: 10px; font-weight: 800; line-height: 12px; text-shadow: 1px 1px 0 #000; }
.recipe { padding: 4px 8px 4px 36px; cursor: pointer; font-size: 13px; border-radius: 4px; display: flex; justify-content: space-between; }
.recipe:hover { background: rgba(255, 220, 140, .07); } .recipe.sel { background: linear-gradient(90deg, rgba(255, 210, 0, .18), transparent); box-shadow: inset 2px 0 0 #ffd200; }
.recipe .cnt { color: #ccc; font-size: 12px; }
.mats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0 10px; }
.mat { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent); font-size: 12.5px; }
.mat .have { font-weight: 800; } .mat .have.short { color: #ff5a4a; }
.profEmpty { color: var(--text-dim); padding: 10px; line-height: 1.5; }
.craftRow { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.craftRow input { width: 56px; padding: 6px; text-align: center; font-weight: 800; color: #fff4d0; border-radius: 4px; border: 1px solid #000; background: #0a0806; box-shadow: inset 0 0 0 1px var(--gold-lo); }
.msg.skill { color: #6ab8ff; }
.voiceBtn { display: inline-flex; vertical-align: -3px; margin-left: 8px; cursor: pointer; opacity: .75; }
.voiceBtn:hover { opacity: 1; }
.voiceBtn .svgi { width: 18px; height: 18px; }

/* settings */
#optWin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 620px; max-width: calc(100vw - 32px); }
#optTabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--gold-lo); }
.optTab { cursor: pointer; font-family: var(--title-font); font-weight: 700; font-size: 13px; letter-spacing: .4px; color: var(--text-dim); padding: 7px 14px 6px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--gold-dk); border-bottom: none; border-radius: 6px 6px 0 0; margin-bottom: -1px; }
.optTab:hover { color: var(--text); }
.optTab.sel { color: var(--gold-hi); background: linear-gradient(180deg, rgba(120, 85, 35, .45), rgba(38, 29, 20, .95)); border-color: var(--gold-lo); }
#optBody { display: flex; flex-direction: column; min-height: 290px; }
.optRow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 8px; border-radius: 4px; }
.optRow:nth-child(odd) { background: rgba(0, 0, 0, .22); }
.optLabel { font-weight: 700; color: var(--text); min-width: 0; }
.optHint { font-weight: 400; font-size: 12px; color: var(--text-dim); margin-top: 1px; line-height: 1.35; }
.optSeg { display: flex; flex-shrink: 0; border-radius: 5px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-dk); overflow: hidden; }
.optBtn { cursor: pointer; min-width: 58px; padding: 6px 12px; font: 700 13px var(--body-font); color: var(--text-dim); background: linear-gradient(180deg, #2a2118, #17110b); border: none; border-left: 1px solid #000; }
.optBtn:first-child { border-left: none; }
.optBtn:hover { color: var(--text); background: linear-gradient(180deg, #3a2e20, #211810); }
.optBtn.sel { color: #ffe9a8; text-shadow: 0 1px 0 #000; background: linear-gradient(180deg, #a8761e, #6e4a10); box-shadow: inset 0 1px 0 rgba(255, 230, 160, .35); }
.optRange { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.optRange input[type=range] { width: 170px; accent-color: var(--gold); cursor: pointer; }
.optStep { cursor: pointer; width: 26px; height: 26px; border-radius: 50%; font: 700 16px/1 var(--body-font); color: var(--gold-hi); background: linear-gradient(180deg, #3a2e20, #17110b); border: 1px solid #000; box-shadow: 0 0 0 1px var(--gold-dk); }
.optStep:hover { filter: brightness(1.3); }
.optVal { width: 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-hi); font-weight: 700; }
.optTab:focus-visible, .optBtn:focus-visible, .optStep:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 1px; }
