:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: rgba(12, 16, 24, 0.84);
  --panel-solid: #121824;
  --line: rgba(184, 255, 58, 0.25);
  --accent: #b8ff3a;
  --accent-dim: #7fb81e;
  --text: #eef2f6;
  --muted: #9aa7b8;
  --danger: #f43f5e;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.hidden { display: none !important; }
.small { font-size: 12px; color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.bar { height: 7px; background: rgba(255, 255, 255, 0.12); border-radius: 4px; overflow: hidden; position: relative; }
.bar > div, .bar > span { display: block; height: 100%; width: 0; background: #4ade80; border-radius: 4px; transition: width 0.15s linear; }
.bar.mini { height: 4px; display: inline-block; width: 60px; vertical-align: middle; }
.bar.xp { height: 3px; margin-top: 4px; }
.bar.xp > div { background: #60a5fa; }
.type {
  display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); margin-right: 3px;
}
.types { margin: 2px 0 4px; }
.lv { color: var(--muted); font-weight: 600; font-size: 0.85em; }
.shiny { color: #ffd84a; }
.alpha { color: #fff; background: #d62c2c; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.status { background: #7c3aed; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 5px; }
.caught { color: #f87171; }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud-tl { position: absolute; top: 10px; left: 10px; padding: 10px 12px; min-width: 210px; }
.rank-row { display: flex; gap: 10px; align-items: center; }
#rank-badge {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: #0b0f14; background: var(--accent);
  box-shadow: 0 0 18px rgba(184, 255, 58, 0.45); font-family: "Arial Black", system-ui, sans-serif;
}
.rank-info { flex: 1; }
.rank-info .small { letter-spacing: 0.2em; font-size: 10px; }
#pts-text { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
#pts-bar { background: var(--accent) !important; }
#pts-bar.ready { animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow { from { filter: brightness(1); } to { filter: brightness(1.6); } }
.stat-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-top: 7px; color: #d4dbe4; }
#money { color: #ffd84a; font-weight: 700; }

#hud-tr { position: absolute; top: 10px; right: 10px; text-align: center; }
#minimap {
  width: 150px; height: 150px; border-radius: 50%; border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.5), 0 6px 20px rgba(0, 0, 0, 0.4); background: #1a1f28; display: block;
}
#loc-label {
  margin-top: 6px; font-size: 12px; font-weight: 700; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 8px; display: inline-block; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#top-btns { position: absolute; top: 200px; right: 12px; display: flex; flex-direction: column; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  font-size: 18px; font-weight: 700;
}
.icon-btn:hover { border-color: var(--accent); }
#help { position: absolute; top: 200px; right: 62px; padding: 12px 14px; font-size: 12px; line-height: 1.55; max-width: 360px; }

#target-panel { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 8px 12px; min-width: 240px; max-width: 340px; }
.tp-name { font-weight: 800; font-size: 14px; }
#tp-hint { margin-top: 4px; color: #86efac; min-height: 0; }

#party-strip { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.ps-slot {
  position: relative; width: 50px; height: 54px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.ps-slot canvas { margin-bottom: 1px; }
.ps-slot .bar.mini { width: 40px; }
.ps-slot.lead { border-color: var(--accent); box-shadow: 0 0 10px rgba(184, 255, 58, 0.4); }
.ps-slot.fainted { opacity: 0.4; filter: grayscale(1); }
.ps-lv { position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 800; color: var(--muted); }

#partner-panel {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 10px; width: min(560px, calc(100vw - 20px));
  display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto auto; gap: 8px 10px;
}
.pp-head { display: flex; gap: 8px; align-items: center; grid-row: 1 / 3; }
.pp-port { width: 56px; height: 56px; border-radius: 10px; background: radial-gradient(circle at 50% 70%, rgba(184, 255, 58, 0.18), transparent 70%); display: grid; place-items: center; flex: none; }
.pp-info { flex: 1; min-width: 0; }
.pp-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-hprow { display: flex; justify-content: space-between; margin-top: 2px; }
.moves { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.move {
  position: relative; overflow: hidden; text-align: left; padding: 5px 8px 5px 26px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: linear-gradient(90deg, var(--tc, #555) 0 5px, rgba(255, 255, 255, 0.06) 5px);
  min-height: 38px;
}
.move .key { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: 12px; color: var(--muted); }
.move .mname { display: block; font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move .mmeta { display: block; font-size: 10px; color: var(--muted); }
.move .cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0, 0, 0, 0.62); pointer-events: none; }
.move.ready { border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.move.queued { box-shadow: inset 0 0 0 2px var(--accent); }
.move.empty { opacity: 0.35; }
.move:active { transform: scale(0.97); }
.mega-row { display: flex; align-items: center; gap: 8px; }
#mega-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #6b4bb8; background: #1c1530; font-weight: 900; color: #9d7bff; flex: none;
}
#mega-btn.ready { background: linear-gradient(135deg, #ff6bd6, #7c3aed, #38bdf8); color: #fff; border-color: #fff; animation: glow 0.6s infinite alternate; }
#mega-btn.active { background: #7c3aed; color: #fff; }
.bar.mega { flex: 1; height: 8px; }
.bar.mega > div { background: linear-gradient(90deg, #7c3aed, #ff6bd6, #38bdf8) !important; }

#toasts { position: absolute; left: 70px; bottom: 150px; display: flex; flex-direction: column; gap: 6px; max-width: min(420px, calc(100vw - 90px)); pointer-events: none !important; }
.toast {
  background: var(--panel); border-left: 3px solid #94a3b8; padding: 7px 11px; border-radius: 8px; font-size: 13px;
  animation: tin 0.25s ease-out; transition: opacity 0.4s, transform 0.4s; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.toast.good { border-left-color: var(--accent); }
.toast.bad { border-left-color: var(--danger); }
.toast.warn { border-left-color: #f59e0b; }
.toast.info { border-left-color: #60a5fa; }
.toast.out { opacity: 0; transform: translateX(-20px); }
@keyframes tin { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }

#banner { position: absolute; left: 0; right: 0; top: 28%; text-align: center; pointer-events: none !important; opacity: 0; }
#banner.show { animation: banner 3s ease-out forwards; }
.banner-title { font-size: clamp(34px, 7vw, 72px); font-weight: 900; font-style: italic; letter-spacing: 0.04em; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.6), 0 0 30px currentColor; font-family: "Arial Black", system-ui, sans-serif; }
.banner-sub { font-size: clamp(14px, 2.4vw, 20px); font-weight: 700; text-shadow: 0 2px 6px #000; margin-top: 4px; padding: 0 16px; }
@keyframes banner {
  0% { opacity: 0; transform: scale(1.4); }
  12% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px); }
}

#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 40; }

/* ---------------- modals ---------------- */
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.modal-wrap {
  position: absolute; inset: 0; background: rgba(4, 6, 10, 0.55); display: grid; place-items: center; pointer-events: auto; padding: 16px;
  animation: fadein 0.15s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: min(560px, 100%); background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.dialog-text { font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; }
.dialog-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.dialog-opts.left { justify-content: flex-start; margin: 14px 0; }
.btn {
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); padding: 9px 16px; border-radius: 10px; font-weight: 700;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: #0b0f14; border-color: var(--accent); }
.btn.danger { border-color: rgba(244, 63, 94, 0.6); color: #fda4af; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.big { padding: 13px 28px; font-size: 17px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.menu {
  width: min(860px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.tabs { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.25); }
.tab { border: none; background: none; padding: 8px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.tab.on { background: var(--accent); color: #0b0f14; }
.tabs .close { margin-left: auto; border: none; background: rgba(255, 255, 255, 0.08); width: 34px; height: 34px; border-radius: 8px; font-size: 16px; }
.money-tag { margin-left: 12px; color: #ffd84a; font-weight: 800; }
.menu-body { padding: 12px; overflow: auto; }
.hint { margin-bottom: 10px; }

.mon-card {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); margin-bottom: 8px;
}
.mon-card.lead { border-color: var(--accent); }
.mon-card.fainted .mc-left { filter: grayscale(1); opacity: 0.5; }
.mc-left { display: grid; place-items: center; }
.mc-name { font-weight: 800; font-size: 15px; }
.lead-tag { background: var(--accent); color: #0b0f14; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 5px; }
.mc-mid .bar { margin: 3px 0; }
.stats { margin-top: 2px; }
.mc-moves { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip {
  border: 1px solid rgba(255, 255, 255, 0.14); background: linear-gradient(90deg, var(--tc, #666) 0 4px, rgba(255, 255, 255, 0.05) 4px);
  padding: 4px 9px 4px 12px; border-radius: 7px; font-size: 12px; text-align: left;
}
.chip span { color: var(--muted); font-size: 11px; }
.chip.add { border-style: dashed; background: none; color: var(--accent); }
.chip.wide { display: block; width: 100%; margin-bottom: 5px; padding: 8px 10px 8px 14px; }
.chip:hover { border-color: var(--accent); }
.mc-act { display: flex; flex-direction: column; gap: 5px; }
.move-list { margin-top: 12px; max-height: 50vh; overflow: auto; }

.bag-list { display: flex; flex-direction: column; gap: 6px; }
.bag-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); margin-bottom: 6px; }
.row-btns { display: flex; gap: 5px; flex: none; }
.key-items h4, .box-col h4 { margin: 16px 0 8px; color: var(--accent); font-size: 13px; letter-spacing: 0.05em; }

.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.dex-cell { background: rgba(255, 255, 255, 0.04); border-radius: 10px; padding: 8px; text-align: center; border: 1px solid transparent; }
.dex-cell canvas { display: block; margin: 0 auto; }
.dex-cell.unseen canvas { filter: brightness(0); opacity: 0.35; }
.dex-cell.seen canvas { filter: grayscale(1) brightness(0.8); }
.dex-cell.caught { border-color: rgba(184, 255, 58, 0.3); }
.dex-name { font-size: 12px; font-weight: 700; margin-top: 3px; }

.trainer-card {
  display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(184, 255, 58, 0.14), rgba(56, 189, 248, 0.1)); border: 1px solid var(--line);
}
.tc-rank { width: 72px; height: 72px; border-radius: 14px; background: var(--accent); color: #0b0f14; font-size: 48px; font-weight: 900; display: grid; place-items: center; font-family: "Arial Black", system-ui, sans-serif; flex: none; }
.tc-name { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.trainer-card .small { margin-top: 2px; }

.box-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.box-mon { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); margin-bottom: 6px; text-align: left; font-size: 13px; }
.box-mon:hover { border-color: var(--accent); }

/* ---------------- title ---------------- */
#title {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(11, 15, 20, 0.35), rgba(11, 15, 20, 0.85) 70%);
  overflow: auto;
}
.title-card { text-align: center; max-width: 760px; width: 100%; }
.logo { margin-bottom: 30px; }
.logo-top { font-size: clamp(16px, 3vw, 22px); letter-spacing: 0.6em; font-weight: 800; color: #ffd84a; text-shadow: 0 2px 0 #1e3a8a; }
.logo-main {
  font-size: clamp(44px, 10vw, 96px); font-weight: 900; font-style: italic; line-height: 1; letter-spacing: 0.02em;
  font-family: "Arial Black", system-ui, sans-serif; color: #fff; text-shadow: 0 5px 0 #000, 0 0 40px rgba(184, 255, 58, 0.35);
}
.logo-main span { color: var(--accent); }
.logo-sub { margin-top: 10px; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; font-size: 12px; }
.title-btns { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.title-btns .btn { min-width: 240px; }
.title-foot { margin-top: 28px; line-height: 1.7; }
.title-card.starter { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.title-card.starter h2 { margin: 0 0 4px; }
.starter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.starter-card { border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.starter-card:hover { border-color: rgba(184, 255, 58, 0.5); }
.starter-card.on { border-color: var(--accent); background: rgba(184, 255, 58, 0.1); box-shadow: 0 0 20px rgba(184, 255, 58, 0.25); }
.name-row { margin-bottom: 16px; }
.name-row input {
  margin-left: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); color: var(--text); font: inherit; width: 160px;
  -webkit-user-select: text; user-select: text;
}

/* ---------------- touch ---------------- */
#touch { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#joy {
  position: absolute; left: 22px; bottom: 26px; width: 124px; height: 124px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.18); pointer-events: auto; touch-action: none;
}
#joy-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(184, 255, 58, 0.5); border: 2px solid var(--accent); }
#tbtns { position: absolute; right: 14px; bottom: 20px; display: grid; grid-template-columns: repeat(3, 58px); gap: 8px; pointer-events: auto; }
.tb {
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); background: rgba(12, 16, 24, 0.7);
  font-size: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; touch-action: none;
}
.tb small { font-size: 9px; margin-top: 3px; color: var(--muted); }
.tb.hot, .tb.on { border-color: var(--accent); box-shadow: 0 0 12px rgba(184, 255, 58, 0.5); }
.tb:active { transform: scale(0.94); }

body.touch #partner-panel { bottom: 158px; grid-template-columns: 1fr; width: min(420px, calc(100vw - 20px)); padding: 6px 8px; gap: 5px; }
body.touch .pp-head { grid-row: auto; }
body.touch .pp-port { width: 38px; height: 38px; }
body.touch .pp-port canvas { width: 38px !important; height: 38px !important; }
body.touch .pp-info .types, body.touch .bar.xp { display: none; }
body.touch .pp-name { font-size: 13px; }
body.touch .moves { grid-template-columns: repeat(4, 1fr); gap: 4px; }
body.touch .move { min-height: 44px; padding: 4px 4px 4px 9px; }
body.touch .move .key, body.touch .move .mmeta { display: none; }
body.touch .move .mname { font-size: 11px; white-space: normal; line-height: 1.15; }
body.touch #toasts { bottom: auto; top: 150px; left: 10px; }
body.touch #party-strip { top: 190px; transform: none; }
body.touch #help { display: none; }

@media (max-width: 720px) {
  #hud-tl { min-width: 0; padding: 7px 9px; }
  #rank-badge { width: 36px; height: 36px; font-size: 22px; }
  .stat-row { font-size: 11px; }
  #minimap { width: 96px; height: 96px; }
  #top-btns { top: 136px; }
  #target-panel { top: auto; bottom: calc(100% - 118px); min-width: 0; width: calc(100vw - 250px); max-width: 260px; padding: 6px 8px; left: auto; right: 116px; transform: none; top: 10px; }
  #partner-panel { grid-template-columns: 1fr; }
  .pp-head { grid-row: auto; }
  .mon-card { grid-template-columns: 64px 1fr; }
  .mc-act { grid-column: 1 / -1; flex-direction: row; }
  .box-cols { grid-template-columns: 1fr; }
  .starter-row { grid-template-columns: 1fr; }
  .starter-card { flex-direction: row; text-align: left; }
  .starter-card canvas { width: 70px !important; height: 70px !important; }
  #party-strip { gap: 4px; }
  .ps-slot { width: 42px; height: 46px; }
}

/* ---------------- accounts & community ---------------- */
input, textarea { -webkit-user-select: text; user-select: text; }
.btn.link { background: none; border-color: transparent; color: var(--muted); font-weight: 600; }
.btn.link:hover:not(:disabled) { color: var(--text); border-color: transparent; text-decoration: underline; }
.title-card .btn.link.small { margin-top: 10px; }
.title-foot b { color: var(--text); }
.panel-card {
  max-width: 560px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.panel-logo { font-family: "Arial Black", system-ui, sans-serif; font-style: italic; font-weight: 900; font-size: 20px; letter-spacing: 0.02em; margin-bottom: 14px; }
.panel-logo span { color: var(--accent); }
.panel-card h2 { margin: 0; font-size: 26px; }
.panel-sub { margin: 6px 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 4px 0 8px; }
.auth-form .btn.big { width: 100%; margin-top: 4px; }
.field { position: relative; display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 700; color: #d4dbe4; }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit; font-size: 16px;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184, 255, 58, 0.18); }
.field input[readonly] { opacity: 0.7; }
.field-eye { position: absolute; right: 8px; bottom: 8px; height: 32px; padding: 0 10px; border-radius: 8px; border: none; background: rgba(255, 255, 255, 0.08); font-size: 12px; font-weight: 700; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--muted); margin-top: -4px; }
.form-error { color: #fda4af; font-size: 13.5px; font-weight: 600; min-height: 0; }
.form-error:empty, .form-note:empty { display: none; }
.form-note { color: #bef264; font-size: 13.5px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
.auth-modal { max-width: 440px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; min-height: 170px; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); transition: border-color 0.15s, transform 0.15s;
}
.slot:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.slot.loading { opacity: 0.6; }
.slot.add { border-style: dashed; color: var(--muted); }
.slot-pic { position: relative; width: 96px; height: 70px; display: flex; justify-content: center; }
.slot-pic .slot-mon { position: absolute; right: 0; bottom: 0; }
.slot-name { font-weight: 800; font-size: 16px; margin-top: 4px; color: var(--text); }
.slot-plus { font-size: 34px; font-weight: 300; color: var(--accent); line-height: 1; }
.slot-when { opacity: 0.8; }
.outfit { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 0 0 14px; flex-wrap: wrap; }
.outfit-preview { width: 96px; height: 96px; border-radius: 16px; background: radial-gradient(circle at 50% 70%, rgba(184, 255, 58, 0.2), rgba(255, 255, 255, 0.03) 70%); display: grid; place-items: center; }
.outfit-pickers { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.swatch-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.swatch-label { width: 50px; font-size: 12px; color: var(--muted); text-align: left; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.swatch.none { background: repeating-linear-gradient(45deg, #333 0 4px, #555 4px 8px); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.subtab { border: 1px solid rgba(255, 255, 255, 0.12); background: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.subtab.on { border-color: var(--accent); color: var(--accent); background: rgba(184, 255, 58, 0.08); }
.board-list { display: flex; flex-direction: column; gap: 6px; }
.board-row {
  display: grid; grid-template-columns: 26px 34px 44px 1fr; align-items: center; gap: 8px; text-align: left; width: 100%;
  padding: 6px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.04);
}
.board-row:hover { border-color: rgba(184, 255, 58, 0.5); }
.board-row.me { border-color: var(--accent); background: rgba(184, 255, 58, 0.07); }
.br-pos { color: var(--muted); font-weight: 800; font-size: 13px; text-align: center; }
.br-rank { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #0b0f14; display: grid; place-items: center; font-weight: 900; font-family: "Arial Black", system-ui, sans-serif; }
.br-pic { width: 44px; height: 40px; display: grid; place-items: center; }
.br-mid { display: flex; flex-direction: column; min-width: 0; }
.br-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; vertical-align: middle; }
.board-empty { padding: 26px 12px; text-align: center; color: var(--muted); line-height: 1.6; }
.board-empty b { color: var(--accent); }
.board-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(184, 255, 58, 0.06); font-size: 13px; margin-bottom: 10px; }
.feed-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.feed-pic { width: 40px; height: 36px; display: grid; place-items: center; font-size: 18px; }
.feed-text { border: none; background: none; text-align: left; font-size: 14px; line-height: 1.35; padding: 2px 0; }
.cheer-btn { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.cheer-btn.on { border-color: #ffd84a; background: rgba(255, 216, 74, 0.14); color: #ffd84a; opacity: 1; }
.cheer-btn:disabled { cursor: default; }
.emote-box { max-width: 380px; }
.emote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.emote-btn { position: relative; height: 58px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); font-size: 26px; }
.emote-btn small { position: absolute; top: 3px; right: 6px; font-size: 10px; color: var(--muted); }
.emote-btn:hover:not(:disabled) { border-color: var(--accent); transform: scale(1.05); }
.emote-btn.small { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
.profile { max-width: 520px; }
.pf-head { display: flex; align-items: center; gap: 12px; }
.pf-info { flex: 1; min-width: 0; }
.pf-name { font-size: 22px; font-weight: 900; }
.pf-rank { width: 58px; height: 58px; font-size: 36px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.pf-stats div { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 8px; text-align: center; }
.pf-stats b { display: block; font-size: 20px; color: var(--accent); }
.pf-stats span { font-size: 11px; color: var(--muted); }
.pf-party { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.pf-mon { text-align: center; background: rgba(255, 255, 255, 0.03); border-radius: 10px; padding: 4px; }
.pf-mon canvas { display: block; margin: 0 auto; }
.pf-cheers { margin-top: 12px; }
.pf-cheer-label { margin-right: auto; align-self: center; }
.profile .dialog-opts { align-items: center; }
.account { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.account h4 { margin: 0 0 6px; color: var(--accent); font-size: 13px; letter-spacing: 0.05em; }
@media (max-width: 720px) {
  #top-btns { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .pf-stats { grid-template-columns: repeat(2, 1fr); }
  .panel-card { padding: 20px 16px 14px; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .outfit { gap: 10px; }
}
