:root {
  --ink: #fff7e6;
  --dim: #b9c2d9;
  --gold: #ffc53d;
  --gold-dark: #c98a00;
  --good: #4cd964;
  --bad: #ff4d4d;
  --panel: #232a44;
  --panel-2: #1a1f35;
  --edge: #0b0e1a;
  --blue: #3d8bff;
  --display: 'Lilita One', 'Arial Black', sans-serif;
  --body: 'Fredoka', 'Trebuchet MS', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #12141c; color: var(--ink); font-family: var(--body); font-weight: 600; }
canvas { display: block; }
[hidden] { display: none !important; }
button { font-family: inherit; }

/* outlined game text */
.outline, .logo, .panel-title, #aim, .popup, .banner-title, #storm-caption, .big {
  text-shadow: -2px -2px 0 var(--edge), 2px -2px 0 var(--edge), -2px 2px 0 var(--edge), 2px 2px 0 var(--edge), 0 4px 0 var(--edge);
}

/* ---------- full screens ---------- */
.screen {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; gap: 14px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(30,40,80,0.55), rgba(5,6,12,0.85));
}
.screen.dim { background: rgba(6, 8, 16, 0.62); backdrop-filter: blur(4px); }
#loading { background: #12141c; }
.loading-text { font-family: var(--display); color: var(--dim); letter-spacing: 0.06em; animation: pulse 0.9s ease-in-out infinite alternate; }

.logo {
  font-family: var(--display); font-size: clamp(54px, 12vw, 120px); line-height: 0.85; color: var(--gold);
  transform: rotate(-3deg); letter-spacing: 0.02em;
}
.logo span { display: block; color: #fff; font-size: 0.72em; }
.tagline { margin: 0; color: var(--dim); font-size: 17px; max-width: 520px; }
.hint { margin: 10px 0 0; color: #6b7491; font-size: 13px; }
.eyebrow { color: var(--gold); font-family: var(--display); letter-spacing: 0.12em; font-size: 14px; }

.menu-stack { display: flex; flex-direction: column; gap: 10px; width: min(320px, 100%); margin-top: 6px; }

/* chunky 3D game buttons */
.gbtn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; padding: 13px 18px 11px; border: 3px solid var(--edge); border-radius: 14px; cursor: pointer;
  background: linear-gradient(#ffd666, var(--gold)); color: #3a2400;
  font-family: var(--display); font-size: 22px; letter-spacing: 0.03em; text-transform: uppercase;
  box-shadow: 0 6px 0 var(--edge), inset 0 3px 0 rgba(255,255,255,0.5), inset 0 -4px 0 rgba(0,0,0,0.15);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.1s;
}
.gbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--edge), inset 0 3px 0 rgba(255,255,255,0.5), inset 0 -4px 0 rgba(0,0,0,0.15); filter: brightness(1.06); }
.gbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--edge), inset 0 3px 0 rgba(255,255,255,0.4); }
.gbtn.alt { background: linear-gradient(#6aa8ff, var(--blue)); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.gbtn.danger { background: linear-gradient(#ff7a7a, #e23b3b); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.gbtn.small { font-size: 17px; padding: 9px 16px 8px; width: auto; display: inline-flex; }
.gbtn small { font-family: var(--body); font-size: 12px; text-transform: none; letter-spacing: 0; opacity: 0.8; margin-top: 2px; }

.panel-card {
  background: linear-gradient(var(--panel), var(--panel-2)); border: 4px solid var(--edge); border-radius: 20px;
  padding: 22px 26px; width: min(420px, 100%); box-shadow: 0 10px 0 var(--edge), inset 0 3px 0 rgba(255,255,255,0.08);
  display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: calc(100vh - 32px); overflow: auto;
}
.panel-card.wide { width: min(620px, 100%); align-items: stretch; }
.panel-title { margin: 0; font-family: var(--display); font-size: 40px; color: #fff; font-weight: 400; }
.status { margin: 0; min-height: 20px; color: var(--good); font-size: 14px; }

/* settings */
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; padding: 10px; border: 3px solid var(--edge); border-radius: 12px; background: #2f3758; color: var(--dim);
  font-family: var(--display); font-size: 18px; cursor: pointer;
}
.tab.on { background: var(--gold); color: #3a2400; }
.tab-body { text-align: left; }
.tab-body h4 { margin: 14px 0 6px; font-family: var(--display); color: var(--gold); letter-spacing: 0.06em; font-weight: 400; }
.row {
  display: grid; grid-template-columns: 1fr minmax(120px, 220px) 48px; align-items: center; gap: 12px;
  padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); margin-bottom: 5px; font-size: 15px;
}
.row.fixed, .row.bind { grid-template-columns: 1fr auto; }
.row output { text-align: right; color: var(--gold); font-family: var(--display); }
input[type=range] { width: 100%; accent-color: var(--gold); }
input.toggle { appearance: none; width: 52px; height: 28px; border-radius: 14px; background: #3a4366; border: 3px solid var(--edge); position: relative; cursor: pointer; justify-self: end; grid-column: 2 / 4; }
input.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #c7cde0; transition: left 0.12s; }
input.toggle:checked { background: var(--good); }
input.toggle:checked::after { left: 26px; background: #fff; }
.bindbtn {
  min-width: 96px; padding: 6px 12px; border: 3px solid var(--edge); border-radius: 10px; background: #fff3d6; color: #3a2400;
  font-family: var(--display); font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 var(--edge);
}
.bindbtn.waiting { background: var(--gold); animation: pulse 0.5s infinite alternate; }
#binds-reset { margin-top: 8px; }
#options-back { align-self: center; margin-top: 8px; }

kbd {
  display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 7px; border: 2px solid var(--edge);
  background: #fff3d6; color: #3a2400; font: 400 14px/1.4 var(--display); text-align: center; box-shadow: 0 3px 0 var(--edge);
}
kbd.mouse { background: #d6e6ff; }

.stats { display: grid; gap: 6px; width: 100%; margin: 4px 0 8px; }
.stats div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.05); }
.stats span { color: var(--dim); }
.stats b { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 18px; }

/* ---------- dialogue boxes (story + Dale) ---------- */
.dialog-panel {
  position: relative; background: linear-gradient(#fffaf0, #f3e6c8); color: #2b2113; border: 4px solid var(--edge);
  border-radius: 18px; padding: 26px 24px 18px; box-shadow: 0 8px 0 var(--edge), inset 0 -5px 0 rgba(0,0,0,0.08);
  text-align: left; font-size: 18px; line-height: 1.5;
}
.dialog-panel.big { width: min(640px, 100%); }
.nameplate {
  position: absolute; top: -18px; left: 18px; padding: 4px 14px; border: 3px solid var(--edge); border-radius: 10px;
  background: #e2483d; color: #fff; font-family: var(--display); font-size: 16px; letter-spacing: 0.06em; box-shadow: 0 3px 0 var(--edge);
}
.dialog-body { min-height: 3em; white-space: pre-line; }
.dialog-body b { color: #b3261e; }
.dialog-foot { display: flex; justify-content: flex-end; margin-top: 12px; }

#dialog {
  position: absolute; left: 50%; top: 84px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  font-size: 16px; padding: 20px 18px 14px; animation: rise 0.2s ease-out;
}
#dialog::after { content: '▼'; position: absolute; right: 14px; bottom: 6px; font-size: 12px; animation: pulse 0.6s infinite alternate; }

#storm-caption {
  position: fixed; top: 16%; left: 0; right: 0; text-align: center; z-index: 10; pointer-events: none;
  font-family: var(--display); font-size: clamp(42px, 10vw, 96px); color: #fff; letter-spacing: 0.08em;
  animation: shake 0.12s infinite;
}
@keyframes shake { 0% { transform: translate(0,0) rotate(-1deg); } 50% { transform: translate(3px,-2px) rotate(1deg); } 100% { transform: translate(-2px,2px) rotate(-1deg); } }
@keyframes pulse { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 4; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.38) 100%); }
.hud-panel {
  position: absolute; background: linear-gradient(rgba(35,42,68,0.92), rgba(26,31,53,0.92)); border: 3px solid var(--edge);
  border-radius: 14px; padding: 10px 14px; box-shadow: 0 5px 0 rgba(11,14,26,0.85);
}
.top-left { top: 14px; left: 14px; min-width: 260px; }
.stat-line { display: flex; align-items: baseline; gap: 8px; }
.big { font-family: var(--display); font-size: 34px; color: #fff; line-height: 1; }
.of { color: var(--dim); font-size: 14px; }
.bar { height: 14px; background: #10131f; border: 2px solid var(--edge); border-radius: 8px; margin: 8px 0; overflow: hidden; }
#hud-bar {
  height: 100%; width: 0; transition: width 0.3s;
  background: repeating-linear-gradient(-45deg, #4cd964 0 10px, #3bbf52 10px 20px);
}
.chips { display: flex; gap: 6px; }
.chip { padding: 3px 9px; border-radius: 8px; background: rgba(255,255,255,0.07); font-size: 14px; color: var(--dim); }
.chip b { color: #fff; font-family: var(--display); font-weight: 400; font-size: 16px; }
.chip.gold b { color: var(--gold); }
#hud-combo { margin-top: 6px; font-family: var(--display); color: var(--good); font-size: 18px; letter-spacing: 0.04em; }
#hud-combo:empty { display: none; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.6); border-radius: 2px; }
#crosshair i:first-child { left: 8px; top: 2px; width: 2px; height: 14px; }
#crosshair i:last-child { top: 8px; left: 2px; width: 14px; height: 2px; }

#aim-wrap { position: absolute; left: 0; right: 0; top: calc(50% + 22px); text-align: center; }
#aim { font-family: var(--display); font-size: 22px; color: #fff; }
#aim .count { color: var(--gold); margin-left: 6px; }
#aim .count.done { color: var(--good); }
#aim-sub { margin-top: 6px; font-size: 15px; color: #fff; text-shadow: 0 2px 2px #000; }
#aim-sub .warn { color: var(--bad); font-family: var(--display); }
#aim-sub .ok { color: var(--good); font-family: var(--display); }

#popups { position: absolute; inset: 0; }
.popup {
  position: absolute; top: calc(50% - 30px); transform: translateX(-50%); font-family: var(--display); font-size: 34px;
  animation: popup 1.1s ease-out forwards;
}
.popup.good { color: var(--gold); }
.popup.bad { color: var(--bad); font-size: 30px; }
@keyframes popup { 0% { transform: translate(-50%, 10px) scale(0.6); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -70px) scale(1); opacity: 0; } }

#hotbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hand-label { font-family: var(--display); font-size: 17px; color: #fff; text-shadow: 0 2px 0 var(--edge), 0 0 6px #000; text-align: center; }
.hslots { display: flex; gap: 5px; padding: 6px; background: rgba(11,14,26,0.75); border: 3px solid var(--edge); border-radius: 12px; }
.hslot { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.12); display: grid; place-items: center; }
.hslot.full { background: rgba(255,255,255,0.18); border-color: var(--gold); }
.hslot { position: relative; }
.hslot .pic { width: 30px; height: 30px; }
.hslot em { position: absolute; left: 3px; top: 0; font: 400 10px/1.2 var(--display); font-style: normal; color: rgba(255,255,255,0.7); }
.hslot.sel { border-color: #fff; background: rgba(255,197,61,0.45); transform: translateY(-4px) scale(1.08); box-shadow: 0 0 10px rgba(255,197,61,0.8); }
.hand-label small { font-family: var(--body); font-size: 11px; opacity: 0.7; margin-left: 6px; }
#hud-cart { padding: 3px 12px; border-radius: 9px; background: var(--gold); color: #3a2400; border: 3px solid var(--edge); font-size: 14px; }
#hud-cart i { font-style: normal; opacity: 0.75; }

#stamina { position: absolute; left: 50%; bottom: 112px; width: 200px; margin-left: -100px; height: 10px; background: #10131f; border: 2px solid var(--edge); border-radius: 6px; overflow: hidden; }
#stamina-fill { height: 100%; width: 100%; background: #7fd3ff; }
#stamina-fill.low { background: var(--bad); }

#notices { position: absolute; left: 50%; bottom: 135px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; width: min(520px, 90vw); }
.notice {
  padding: 7px 16px; border-radius: 12px; border: 3px solid var(--edge); background: #fff3d6; color: #3a2400; font-size: 15px;
  box-shadow: 0 4px 0 var(--edge); animation: pop 0.18s ease-out; transition: opacity 0.4s;
}
.notice.bad { background: #ffd6d6; }
.notice.out { opacity: 0; }
@keyframes pop { from { transform: scale(0.7); } }

#banner { position: absolute; top: 22%; left: 0; right: 0; text-align: center; opacity: 0; }
#banner.show { animation: banner 2.6s ease-out forwards; }
.banner-title { font-family: var(--display); font-size: clamp(34px, 6vw, 56px); color: var(--gold); }
.banner-sub { font-family: var(--display); font-size: 22px; color: #fff; text-shadow: 0 2px 0 var(--edge); }
@keyframes banner { 0% { opacity: 0; transform: scale(0.5); } 12% { opacity: 1; transform: scale(1.1); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

#radar { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); text-align: center; }
#radar-arrow { font-size: 34px; color: var(--good); transition: transform 0.15s; text-shadow: 0 2px 0 var(--edge); display: inline-block; transform-origin: center; }
#radar-dist { font-family: var(--display); font-size: 15px; text-shadow: 0 2px 0 var(--edge); }

#checklist { top: 5vh; left: 50%; transform: translateX(-50%); width: min(1000px, 94vw); max-height: 90vh; overflow: auto; pointer-events: auto; z-index: 8; background: rgba(11,14,26,0.95); }
#checklist h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; color: var(--gold); }
.check-row { display: grid; grid-template-columns: 12px 1fr 60px 52px; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
.check-row .swatch { width: 12px; height: 12px; border-radius: 3px; }
.check-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.check-bar i { display: block; height: 100%; background: var(--good); }
.check-row span:last-child { text-align: right; }
.check-row.done { color: var(--good); }

#fps { position: absolute; right: 12px; bottom: 10px; font-family: var(--display); font-size: 14px; color: var(--good); text-shadow: 0 2px 0 var(--edge); }

#flash { position: absolute; inset: 0; opacity: 0; }
#flash.good { animation: flash 0.35s ease-out; box-shadow: inset 0 0 120px rgba(76,217,100,0.55); }
#flash.bad { animation: flash 0.45s ease-out; box-shadow: inset 0 0 160px rgba(255,77,77,0.7); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

/* ---------- GM shop ---------- */
.panel-card.shop { width: min(1100px, 100%); align-items: stretch; }
.shop-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.portrait { position: relative; width: 74px; height: 74px; flex: none; border: 4px solid var(--edge); border-radius: 16px; background: #7fb3e8; overflow: hidden; }
.p-face { position: absolute; left: 17px; top: 14px; width: 40px; height: 44px; border-radius: 45%; background: #d9a77c; border: 3px solid var(--edge); }
.p-face::before, .p-face::after { content: ''; position: absolute; top: 15px; width: 5px; height: 6px; border-radius: 50%; background: var(--edge); }
.p-face::before { left: 9px; } .p-face::after { right: 9px; }
.p-hair { position: absolute; left: 15px; top: 8px; width: 44px; height: 16px; border-radius: 10px 10px 4px 4px; background: #6b6b6b; border: 3px solid var(--edge); z-index: 1; }
.p-tie { position: absolute; left: 30px; bottom: -6px; width: 14px; height: 20px; background: #b3261e; border: 3px solid var(--edge); border-radius: 3px; }
.shop-talk { position: relative; flex: 1; background: #fffaf0; color: #2b2113; border: 3px solid var(--edge); border-radius: 14px; padding: 18px 14px 10px; }
.shop-talk .nameplate { font-size: 13px; top: -15px; }
.quote { margin: 0; font-size: 16px; }
.wallet { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border: 3px solid var(--edge); border-radius: 14px; background: var(--panel-2); }
.wallet span { font-family: var(--display); font-size: 34px; color: var(--gold); line-height: 1; }
.wallet small { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; }
#menu-tree { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; margin: 10px 0; text-align: left; }
.branch h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--gold); letter-spacing: 0.05em; }
.node {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; margin-bottom: 9px; padding: 10px 12px;
  border-radius: 12px; border: 3px solid var(--edge); background: #2f3758; color: var(--ink); font: inherit; box-shadow: 0 4px 0 var(--edge);
}
.node-name { font-family: var(--display); font-weight: 400; font-size: 16px; }
.node-desc { font-size: 13px; color: var(--dim); font-weight: 500; }
.node-cost { font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--gold); }
.node.buy { background: #3a4a7a; cursor: pointer; }
.node.buy:hover { transform: translateY(-2px); background: #46598f; }
.node.buy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.node.owned { background: #24543a; }
.node.owned .node-cost { color: var(--good); }
.node.poor .node-cost { color: var(--bad); }
.node.locked { opacity: 0.45; }
.node.locked .node-cost { color: var(--dim); font-family: var(--body); font-size: 12px; }
#menu-close { align-self: center; }

@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; }
  .top-left { min-width: 0; }
  .shop-head { flex-wrap: wrap; }
}

/* ---------- online: Crew Shift ---------- */
.gbtn.crew { background: linear-gradient(#7ee08d, #3fbf55); color: #0f3a1a; }

.panel-card.lobby { width: min(640px, 100%); }
.lobby h4 { margin: 10px 0 6px; font-family: var(--display); color: var(--gold); letter-spacing: 0.06em; font-weight: 400; text-align: left; }
.row.field { grid-template-columns: 170px 1fr; text-align: left; }
.row.field > span { display: flex; flex-direction: column; }
.row.field small { color: var(--dim); font-size: 12px; font-weight: 500; }
.row.field input:not([type]) , .row.field input[type=text] {
  width: 100%; padding: 8px 12px; border: 3px solid var(--edge); border-radius: 10px; background: #fff3d6; color: #3a2400;
  font: 600 17px var(--body); outline: none;
}
.row.field input:focus { box-shadow: 0 0 0 3px var(--gold); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch-btn { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--edge); cursor: pointer; box-shadow: 0 3px 0 var(--edge); transition: transform 0.08s; }
.swatch-btn:hover { transform: translateY(-2px); }
.swatch-btn.on { outline: 3px solid #fff; outline-offset: 2px; }
.face-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.face-prev, .crew-face {
  width: 64px; height: 64px; border-radius: 12px; border: 4px solid var(--gold); background: #e0ac82 center/cover no-repeat;
  box-shadow: 0 3px 0 var(--edge); flex: none;
}
.face-prev.empty, .crew-face.empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='21' cy='29' r='4' fill='%232b2113'/%3E%3Ccircle cx='43' cy='29' r='4' fill='%232b2113'/%3E%3Cpath d='M21 40 Q32 50 43 40' stroke='%232b2113' stroke-width='3.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.gbtn.upload { cursor: pointer; }
.lobby-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 6px; }
.lobby-actions #lb-join { width: auto; min-width: 200px; }
#lobby-room { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
#lobby-room[hidden] { display: none !important; }
#lb-code { color: #fff; }
.crew-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.crew-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px;
  border-radius: 14px; background: rgba(255,255,255,0.05); border: 3px solid var(--c); animation: rise-in 0.25s ease-out;
}
.crew-card .crew-face { border-color: var(--c); }
.crew-name { font-family: var(--display); font-size: 18px; color: #fff; word-break: break-word; }
.crew-name small { font-family: var(--body); font-size: 12px; color: var(--dim); }
.crew-tag { position: absolute; top: -10px; right: -6px; padding: 1px 8px; border-radius: 8px; border: 2px solid var(--edge); background: var(--gold); color: #3a2400; font: 400 12px var(--display); }
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.size-btn {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 6px; border: 3px solid var(--edge); border-radius: 12px;
  background: #2f3758; color: var(--dim); cursor: pointer; box-shadow: 0 3px 0 var(--edge);
}
.size-btn b { font: 400 17px var(--display); color: #fff; }
.size-btn small { font-size: 12px; }
.size-btn.on { background: var(--gold); color: #3a2400; }
.size-btn.on b { color: #3a2400; }
#lb-leave { align-self: center; }
.status.bad { color: var(--bad); }
@keyframes rise-in { from { transform: translateY(10px); opacity: 0; } }

/* in-game leaderboard + feed (top right) */
#board { top: 14px; right: 14px; width: 230px; padding: 8px 12px; }
#board h3 { margin: 0 0 6px; display: flex; justify-content: space-between; font: 400 18px var(--display); color: var(--gold); }
#board h3 span { color: #fff; }
.board-row { display: grid; grid-template-columns: 16px 12px 1fr auto auto; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 7px; font-size: 14px; }
.board-row.me { background: rgba(255,197,61,0.16); }
.board-row .rank { color: var(--dim); font-size: 12px; }
.board-row i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--edge); }
.board-row .bname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row b { font: 400 16px var(--display); color: #fff; }
.board-row small { font-size: 12px; color: var(--dim); }
#feed { position: absolute; top: 14px; right: 258px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: 360px; }
#board[hidden] + #feed { right: 14px; }
.feed-line {
  padding: 4px 10px; border-radius: 9px; background: rgba(11,14,26,0.78); border: 2px solid var(--edge); font-size: 14px;
  animation: rise-in 0.2s ease-out; transition: opacity 0.5s;
}
.feed-line.out { opacity: 0; }

/* online results */
.stats .awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 8px; }
.stats .award { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 3px solid var(--c); }
.award small { color: var(--gold); font: 400 13px var(--display); letter-spacing: 0.05em; text-transform: uppercase; }
.award b { color: #fff; font-size: 20px; }
.award span { color: var(--dim); font-size: 13px; }
table.results { width: 100%; border-collapse: collapse; font-size: 15px; }
.results th { color: var(--dim); font-weight: 500; font-size: 12px; text-align: left; padding: 4px 8px; }
.results td { padding: 6px 8px; border-top: 1px solid rgba(255,255,255,0.07); text-align: left; }
.results td i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--edge); margin-right: 6px; vertical-align: -1px; }
.results tr.me td { background: rgba(255,197,61,0.12); }
#win .panel-card { width: min(560px, 100%); }

@media (max-width: 700px) {
  .row.field { grid-template-columns: 1fr; }
  .sizes { grid-template-columns: repeat(2, 1fr); }
  #feed { right: 14px; top: 200px; }
}

/* item pictures in the HUD */
img.pic { width: 28px; height: 28px; vertical-align: middle; margin-right: 6px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
.hslot img.pic { margin: 0; }
#aim img.pic { width: 34px; height: 34px; background: rgba(255,255,255,0.92); border-radius: 50%; border: 2px solid var(--edge); padding: 1px; }
#aim-sub img.pic { width: 22px; height: 22px; margin: 0 4px; }
.hand-label img.pic { width: 26px; height: 26px; background: rgba(255,255,255,0.92); border-radius: 50%; padding: 1px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
#checklist h3 small { font-family: var(--body); font-size: 13px; color: #fff; opacity: 0.7; margin-left: 10px; }
.check-items { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 3px 0 4px 0; }
.check-items span { position: relative; aspect-ratio: 1; border-radius: 7px; background: rgba(255,255,255,0.9); display: grid; place-items: center; cursor: pointer; border: 2px solid transparent; }
.check-items span:hover { border-color: var(--gold); transform: scale(1.12); z-index: 1; }
.check-items span.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold), 0 0 10px var(--gold); }
.check-items span img.pic { width: 86%; height: 86%; margin: 0; filter: none; }
.check-items span i { position: absolute; right: 1px; bottom: 0; font: 600 9px/1 var(--body); font-style: normal; color: #1b1b1b; background: rgba(255,255,255,0.85); border-radius: 3px; padding: 0 1px; }
.check-items span.ok { background: var(--good); }
.check-items span.ok i { background: none; color: #fff; }
#track { position: absolute; top: 140px; left: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; max-width: 280px; padding: 8px 12px; background: rgba(11,14,26,0.8); border: 3px solid var(--edge); border-radius: 12px; color: #fff; font-size: 15px; }
#track small { width: 100%; font: 600 10px/1 var(--body); letter-spacing: 1.5px; color: var(--gold); }
#track em { width: 100%; font-style: normal; font-size: 12px; opacity: 0.75; }
#track span { color: var(--gold); font-family: var(--display); }
#track span.ok { color: var(--good); }
