/* HavenFall Workshop: gunmetal, chrome and guild gold, taken from the HavenFall crest. */
:root {
  --iron: #12171e; --iron-2: #161c24; --plate: #1b222c; --plate-2: #212a35; --plate-3: #283240;
  --seam: #2b3441; --seam-2: #3a4555;
  --silver: #e4e9ef; --ash: #98a4b3; --dim: #6b7685;
  --gold: #e2b553; --gold-hi: #f7dd96; --gold-deep: #a57b2a; --gold-wash: rgba(226, 181, 83, .1); --gold-edge: rgba(226, 181, 83, .42);
  --gain: #6fd39a; --loss: #e07880;
  --e1: #63d68f; --e2: #5fb3ef; --e3: #b48cf2; --e4: #f0c84f;
  --chrome: linear-gradient(135deg, #f3f6f9 0%, #9aa6b4 38%, #e8edf2 52%, #d7ab4c 70%, #f6dc94 100%);
  --serif: "Marcellus", "Trajan Pro", Georgia, serif;
  --sans: "Barlow", system-ui, sans-serif;
  --nums: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --r-lg: 18px; --r: 12px; --r-sm: 8px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; color: var(--silver); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 70% -120px, rgba(226,181,83,.07), transparent 70%), radial-gradient(900px 600px at -10% 10%, rgba(120,150,190,.06), transparent 70%), var(--iron); background-attachment: fixed; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: .01em; }
.muted { color: var(--ash); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { flex: none; }
code { font-size: 13px; background: var(--plate-2); border: 1px solid var(--seam); padding: 1px 6px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; } input[type=number] { -moz-appearance: textfield; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--seam-2); border-radius: 10px; border: 3px solid var(--iron); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 28px;
  background: rgba(18, 23, 30, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--seam); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-edge) 30%, rgba(228,233,239,.35) 60%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--silver); flex: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1; letter-spacing: .04em; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; color: var(--ash); font-size: 12px; letter-spacing: .02em; margin-top: 3px; }
.topnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.topnav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; text-decoration: none; color: var(--ash); font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--silver); background: var(--plate); }
.topnav a.on { color: var(--iron); background: var(--chrome); font-weight: 600; }
.topnav a.is-soon { color: var(--dim); }
.topnav a.is-soon.on { color: var(--iron); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.server { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 12px; border-radius: 20px; border: 1px solid var(--seam); color: var(--ash); }
.server select { appearance: none; background: none; border: none; outline: none; padding: 0 8px 0 2px; cursor: pointer; color: var(--silver); }
.server select option { background: var(--plate); }
.me { position: relative; }
.me-btn { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px 0 4px; border-radius: 22px; border: 1px solid var(--seam); background: var(--plate); cursor: pointer; position: relative; }
.me-btn:hover { border-color: var(--seam-2); }
.me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none; background: linear-gradient(140deg, #3a3020, #1d1a15); color: var(--gold); font-weight: 700; box-shadow: 0 0 0 1px var(--gold-edge); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.avatar-lg { width: 46px; height: 46px; font-size: 18px; }
.badge-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #211806; font-size: 11px; font-weight: 700; margin-left: auto; }
.badge-n.dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 3px var(--iron); }
.menu { position: absolute; right: 0; top: 50px; width: 230px; background: var(--plate-2); border: 1px solid var(--seam-2); border-radius: var(--r); padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45); animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--seam); margin-bottom: 6px; } .menu-who small { display: block; color: var(--ash); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); background: none; border: none; color: var(--silver); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--plate-3); }
.preview-banner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 9px 20px; font-size: 13.5px; color: var(--gold-hi); background: var(--gold-wash); border-bottom: 1px solid var(--gold-edge); }
.main { max-width: 1480px; margin: 0 auto; padding: 34px 28px 90px; }
.page { animation: enter .3s ease-out; }
@keyframes enter { from { opacity: 0; } }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 21px; border: 1px solid var(--seam-2); background: var(--plate-2); cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--plate-3); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-gold { border: none; color: #211806; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c99a3c); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 18px rgba(226,181,83,.18); }
.btn-gold:hover { background: linear-gradient(180deg, #fbe7ad, #ebc163 55%, #d3a446); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 24px rgba(226,181,83,.28); }
.btn-ghost { background: none; border-color: transparent; color: var(--gold-hi); }
.btn-ghost:hover { background: var(--gold-wash); }
.btn-danger { color: var(--loss); } .btn-danger:hover { border-color: var(--loss); background: rgba(224,120,128,.08); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.loading .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-discord { width: 100%; height: 50px; border: none; border-radius: 25px; background: #5865f2; color: #fff; font-size: 16px; }
.btn-discord:hover { background: #4f5be0; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: none; background: none; color: var(--ash); cursor: pointer; }
.icon-btn:hover { background: var(--plate-3); color: var(--silver); }
.link { background: none; border: none; padding: 0; color: var(--gold-hi); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 22px; background: var(--iron-2); border: 1px solid var(--seam); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px; border: none; background: none; color: var(--ash); cursor: pointer; font-weight: 500; white-space: nowrap; }
.seg button:hover { color: var(--silver); }
.seg button.on { background: var(--plate-3); color: var(--silver); box-shadow: inset 0 0 0 1px var(--seam-2); }
.seg.wide { margin-bottom: 18px; }
.count-n { margin-left: 4px; padding: 0 7px; border-radius: 10px; background: var(--plate-3); font-size: 12px; color: var(--ash); }
.seg button.on .count-n { background: var(--gold); color: #211806; }
.spinner { width: 26px; height: 26px; margin: 40px auto; border-radius: 50%; border: 2px solid var(--seam-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.spinner.big { width: 38px; height: 38px; }

/* ---------- item art ---------- */
.art { position: relative; display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 14px;
  background: radial-gradient(circle at 50% 30%, #2c3644, #181e27 75%); box-shadow: inset 0 0 0 1px var(--seam-2); }
.art img { width: 118%; height: 118%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.art.e1 { box-shadow: inset 0 0 0 1px rgba(99,214,143,.6), inset 0 0 18px rgba(99,214,143,.18); }
.art.e2 { box-shadow: inset 0 0 0 1px rgba(95,179,239,.6), inset 0 0 18px rgba(95,179,239,.2); }
.art.e3 { box-shadow: inset 0 0 0 1px rgba(180,140,242,.6), inset 0 0 18px rgba(180,140,242,.22); }
.art.e4 { box-shadow: inset 0 0 0 1px rgba(240,200,79,.65), inset 0 0 18px rgba(240,200,79,.22); }
.art-xl { width: 132px; height: 132px; border-radius: 26px; }
.art-lg { width: 76px; height: 76px; border-radius: 16px; }
.art-sm { width: 46px; height: 46px; border-radius: 11px; }
.art-xs { width: 38px; height: 38px; border-radius: 9px; }

/* ---------- hero ---------- */
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.hero h1 { font-size: 46px; line-height: 1.05; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 8px 0 0; color: var(--ash); font-size: 16px; }
.pick { position: relative; width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 26px 32px; text-align: left; cursor: pointer;
  border-radius: var(--r-lg); border: 1px solid transparent; overflow: hidden;
  background: linear-gradient(120deg, #222b37, #1a2029 55%, #241f16) padding-box, linear-gradient(120deg, rgba(228,233,239,.5), rgba(152,164,179,.15) 40%, var(--gold-edge) 75%, var(--gold)) border-box; transition: transform .2s; }
.pick:hover { transform: translateY(-1px); }
.pick:hover .pick-glow { opacity: 1; }
.pick-glow { position: absolute; inset: -40% auto -40% -10%; width: 50%; background: radial-gradient(closest-side, rgba(226,181,83,.22), transparent); opacity: .8; transition: opacity .3s; pointer-events: none; }
.pick-body { display: grid; gap: 6px; min-width: 0; position: relative; }
.pick-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; font-size: 14px; }
.pick-name { font-family: var(--serif); font-size: 34px; line-height: 1.1; color: var(--silver); }
.ench { font-style: normal; font-family: var(--nums); font-weight: 600; font-size: .7em; } .ench.e1 { color: var(--e1); } .ench.e2 { color: var(--e2); } .ench.e3 { color: var(--e3); } .ench.e4 { color: var(--e4); }
.pick-meta { color: var(--ash); }
.pick-stats { display: flex; gap: 34px; position: relative; }
.stat { display: grid; text-align: right; } .stat b { font-family: var(--nums); font-weight: 600; font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat small { color: var(--ash); font-size: 13px; }
.stat.big b { font-size: 44px; color: var(--gold-hi); text-shadow: 0 0 28px rgba(226,181,83,.3); }
.empty-pick { grid-template-columns: auto 1fr; cursor: default; color: var(--ash); } .empty-pick h2 { color: var(--silver); font-size: 26px; margin-bottom: 4px; } .empty-pick p { margin: 0; }
.empty-pick:hover { transform: none; } .empty-pick > .ic { color: var(--gold); }
.fresh { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13.5px; margin: 12px 4px 0; }

/* ---------- resource strip ---------- */
.ores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 30px 0 18px; }
.ore { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--seam); background: var(--plate); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.ore:hover { border-color: var(--seam-2); background: var(--plate-2); }
.ore.on { border-color: var(--gold-edge); background: linear-gradient(180deg, #262a2a, var(--plate)); box-shadow: inset 0 -2px 0 var(--gold); }
.ore-text { min-width: 0; } .ore-text b { display: block; font-weight: 600; } .ore-text small { display: block; color: var(--ash); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gold { color: var(--gold-hi); }

/* ---------- setup chips ---------- */
.setup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: var(--r-lg); background: var(--iron-2); border: 1px solid var(--seam); margin-bottom: 22px; }
.chip-set { display: grid; text-align: left; padding: 7px 14px; border-radius: 10px; border: 1px solid transparent; background: var(--plate); cursor: pointer; transition: border-color .15s; }
.chip-set:hover { border-color: var(--seam-2); }
.chip-set small { color: var(--dim); font-size: 12px; line-height: 1.2; } .chip-set b { font-weight: 600; font-size: 14px; }
.setup .btn-ghost { margin-left: auto; }

/* ---------- bench: board + ticket ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; }
.board { padding: 24px 26px 22px; border-radius: var(--r-lg); background: var(--plate); border: 1px solid var(--seam); min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.board-head h2 { font-size: 28px; } .board-head p { margin: 4px 0 0; font-size: 14px; }
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; }

.map { display: grid; grid-template-columns: 48px repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
.map-corner { }
.map-col { text-align: center; font-family: var(--nums); font-weight: 600; color: var(--ash); padding-bottom: 4px; font-size: 14px; }
.map-col.e1 { color: var(--e1); } .map-col.e2 { color: var(--e2); } .map-col.e3 { color: var(--e3); } .map-col.e4 { color: var(--e4); }
.map-row { display: grid; place-items: center start; font-family: var(--serif); font-size: 18px; color: var(--ash); }
.cell { --h: 0; position: relative; display: grid; align-content: center; gap: 1px; min-height: 68px; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; text-align: left; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: transform .12s, border-color .12s, box-shadow .12s; }
.cell:hover { transform: translateY(-2px); border-color: rgba(228,233,239,.35); z-index: 1; }
.cell-v { font-family: var(--nums); font-weight: 600; font-size: 19px; line-height: 1.15; }
.cell-s { font-size: 12.5px; opacity: .75; }
.cell.gain { background: color-mix(in oklab, #c4922f calc(var(--h) * 88%), #232b36); color: #f5f1e6; box-shadow: inset 0 1px 0 rgba(255,240,200, calc(var(--h) * .25)); }
.cell.gain .cell-v { color: color-mix(in oklab, #fff6d8 calc(var(--h) * 100%), var(--gain)); }
.cell.loss { background: color-mix(in oklab, #6e2c33 calc(var(--h) * 100%), #1f2630); color: #e8c9cc; }
.cell.loss .cell-v { color: var(--loss); }
.cell.nodata { background: repeating-linear-gradient(135deg, #1a2029 0 7px, #1e252f 7px 14px); color: var(--dim); box-shadow: inset 0 0 0 1px var(--seam); }
.cell.nodata .cell-v { font-family: var(--sans); font-weight: 500; font-size: 14px; }
.cell.void { background: transparent; border: 1px dashed rgba(58,69,85,.45); cursor: default; }
.cell.picked { border-color: var(--silver); box-shadow: 0 0 0 3px rgba(228,233,239,.14), 0 10px 22px rgba(0,0,0,.35); }
.cell.rise { animation: rise .45s cubic-bezier(.2,.7,.3,1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; color: var(--dim); font-size: 13px; }
.lg { width: 22px; height: 12px; border-radius: 4px; display: inline-block; } .lg + .lg { margin-left: -4px; }
.lg.loss { background: #5c2a31; } .lg.gain.lo { background: #4b4330; margin-left: 10px; } .lg.gain.hi { background: #b9892c; } .lg.nodata { background: repeating-linear-gradient(135deg, #1a2029 0 3px, #2a323d 3px 6px); margin-left: 10px; }

.list-wrap { overflow-x: auto; margin: 0 -8px; }
.list { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.list th { text-align: right; font-weight: 500; color: var(--ash); font-size: 13.5px; padding: 8px 12px 12px; border-bottom: 1px solid var(--seam); cursor: pointer; white-space: nowrap; user-select: none; }
.list th.l, .list td.l { text-align: left; }
.list th:hover, .list th.sorted { color: var(--gold-hi); }
.list td { text-align: right; padding: 9px 12px; border-bottom: 1px solid rgba(43,52,65,.6); font-family: var(--nums); font-size: 16px; white-space: nowrap; }
.list tr[data-pick] { cursor: pointer; } .list tbody tr:hover { background: var(--plate-2); }
.list tr.picked { background: var(--gold-wash); box-shadow: inset 3px 0 0 var(--gold); }
.rec { display: flex; align-items: center; gap: 12px; font-family: var(--sans); } .rec b { display: block; font-weight: 600; font-size: 15px; } .rec small { color: var(--ash); font-size: 13px; }
.pos { color: var(--gain); } .neg { color: var(--loss); }

/* ticket (detail pane) */
.ticket { position: sticky; top: 92px; padding: 24px; border-radius: var(--r-lg); background: linear-gradient(180deg, var(--plate-2), var(--plate) 220px); border: 1px solid var(--seam); max-height: calc(100vh - 112px); overflow-y: auto; }
.t-head { display: flex; gap: 16px; align-items: center; }
.t-head h3 { font-size: 24px; line-height: 1.15; } .t-head p { margin: 4px 0 0; font-size: 14px; }
.t-tier { font-family: var(--nums); font-weight: 600; color: var(--ash); } .t-tier.e1 { color: var(--e1); } .t-tier.e2 { color: var(--e2); } .t-tier.e3 { color: var(--e3); } .t-tier.e4 { color: var(--e4); }
.t-result { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; margin: 20px 0 6px; border-radius: var(--r); overflow: hidden; background: var(--seam); }
.t-result div { background: var(--iron-2); padding: 12px 14px; } .t-result small { display: block; color: var(--ash); font-size: 13px; }
.t-result b { font-family: var(--nums); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-result.pos div:first-child b { color: var(--gold-hi); } .t-result.neg b { color: var(--loss); }
.hint { display: flex; gap: 8px; align-items: center; color: var(--gold-hi); font-size: 14px; margin: 12px 0 0; }
.ticket h4 { margin: 22px 0 10px; font-size: 15px; font-weight: 600; } .ticket h4 .muted { font-weight: 400; }
.t-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.t-name { flex: 1; min-width: 0; } .t-name b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .t-name small { color: var(--ash); font-size: 12.5px; }
.pf { display: grid; justify-items: end; gap: 2px; }
.pf input { width: 112px; height: 38px; padding: 0 12px; text-align: right; font-family: var(--nums); font-size: 17px; font-weight: 600; background: var(--iron); border: 1px solid var(--seam-2); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
.pf input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.pf input.manual { border-color: var(--gold-edge); color: var(--gold-hi); }
.pf input.need { border-color: rgba(224,120,128,.55); }
.pf.static { font-family: var(--nums); font-size: 17px; font-weight: 600; color: var(--ash); }
.age { font-size: 12px; color: var(--dim); } .age.aging { color: #c2ae7d; } .age.old, .age.none { color: #e0a160; } .age.edited { color: var(--gold); }
.t-lines { border-radius: var(--r); background: var(--iron-2); padding: 6px 16px; }
.tl { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; } .tl b { font-family: var(--nums); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.tl.pos b { color: var(--gain); } .tl.neg b { color: var(--loss); }
.tl.total { border-top: 1px solid var(--seam); margin-top: 4px; padding-top: 10px; font-weight: 600; } .tl.total b { font-size: 20px; } .tl.total.pos b { color: var(--gold-hi); }
.t-focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.t-focus div { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--seam); } .t-focus small { display: block; color: var(--ash); font-size: 12.5px; } .t-focus b { font-family: var(--nums); font-size: 18px; font-weight: 600; }
.t-max { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--gold-wash); border: 1px solid var(--gold-edge); font-size: 14px; color: var(--gold-hi); }
.t-max b { font-family: var(--nums); font-size: 18px; }

/* ---------- drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(6, 9, 13, .55); backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--plate); border-left: 1px solid var(--seam-2);
  box-shadow: -24px 0 60px rgba(0,0,0,.4); transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.7,.3,1); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--seam); }
.dr-head h2 { font-size: 24px; }
.dr-body { overflow-y: auto; padding: 4px 22px 40px; }
.dr-body section { padding: 18px 0; border-bottom: 1px solid var(--seam); } .dr-body section:last-child { border-bottom: none; }
.dr-body h3 { font-size: 19px; margin-bottom: 12px; color: var(--gold-hi); }
.f { display: block; margin-bottom: 12px; } .f > span:first-child { display: block; font-size: 13.5px; color: var(--ash); margin-bottom: 5px; }
.input { display: flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 10px; background: var(--iron); border: 1px solid var(--seam-2); }
.input:focus-within, .select:focus-within select { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.input input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-family: var(--nums); font-size: 17px; font-weight: 600; }
.input em { font-style: normal; color: var(--dim); font-size: 13px; }
.select { position: relative; display: block; }
.select select { appearance: none; width: 100%; height: 42px; padding: 0 38px 0 14px; border-radius: 10px; background: var(--iron); border: 1px solid var(--seam-2); outline: none; cursor: pointer; }
.select .ic { position: absolute; right: 12px; top: 13px; color: var(--ash); pointer-events: none; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.switch-row small { display: block; color: var(--dim); font-size: 13px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--seam-2); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--silver); transition: transform .2s; }
.switch input:checked + i { background: var(--gold); } .switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.dr-note { color: var(--ash); font-size: 14px; margin: 6px 0 0; } .dr-note b { color: var(--gold-hi); }
.spec-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.spec { display: grid; gap: 4px; text-align: center; } .spec span { color: var(--ash); font-size: 13px; }
.spec input { width: 100%; height: 42px; text-align: center; border-radius: 10px; background: var(--iron); border: 1px solid var(--seam-2); font-family: var(--nums); font-size: 17px; font-weight: 600; outline: none; }
.spec input:focus { border-color: var(--gold); }

/* ---------- pages ---------- */
.page-title { max-width: 760px; margin-bottom: 28px; }
.page-title h1 { font-size: 44px; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.page-title p { color: var(--ash); font-size: 16px; line-height: 1.6; margin: 10px 0 0; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.spec-card { padding: 18px 20px 14px; border-radius: var(--r-lg); background: var(--plate); border: 1px solid var(--seam); }
.spec-card header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.spec-card h3 { font-size: 21px; } .spec-card small { color: var(--ash); font-size: 13px; }
.spec-bar { display: grid; grid-template-columns: 30px 1fr 62px; align-items: center; gap: 12px; padding: 5px 0; }
.spec-bar > span:first-child { color: var(--ash); font-family: var(--nums); font-weight: 600; }
.track { height: 6px; border-radius: 3px; background: var(--iron); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi)); transition: width .25s; }
.spec-bar input { height: 34px; width: 62px; text-align: center; border-radius: 8px; background: var(--iron); border: 1px solid var(--seam-2); font-family: var(--nums); font-weight: 600; font-size: 16px; outline: none; }
.spec-bar input:focus { border-color: var(--gold); }
.note { margin-top: 20px; }
.roster { display: grid; gap: 10px; }
.member-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--r); background: var(--plate); border: 1px solid var(--seam); }
.member-row.pending { border-color: var(--gold-edge); background: linear-gradient(90deg, rgba(226,181,83,.07), var(--plate) 45%); }
.who { flex: 1; min-width: 0; } .who b { font-size: 16px; } .who small { display: flex; align-items: center; gap: 8px; color: var(--ash); font-size: 13.5px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--seam-2); color: var(--ash); }
.tag.gold { color: var(--gold-hi); border-color: var(--gold-edge); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ash); border-radius: var(--r-lg); border: 1px dashed var(--seam-2); } .empty-state .ic { color: var(--dim); }
.soon { max-width: 560px; margin: 70px auto; text-align: center; }
.soon-ic { display: inline-grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; color: var(--gold); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-edge); margin-bottom: 18px; }
.soon h1 { font-size: 40px; } .soon p { color: var(--silver); font-size: 17px; line-height: 1.6; } .soon p.muted { color: var(--ash); font-size: 15px; }

/* ---------- gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px; }
.gate-card { width: min(440px, 100%); text-align: center; padding: 40px 36px 34px; border-radius: 24px; border: 1px solid transparent;
  background: linear-gradient(180deg, #1f2731, #171d25) padding-box, linear-gradient(160deg, rgba(228,233,239,.45), rgba(58,69,85,.4) 45%, var(--gold-edge)) border-box; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.gate-logo { width: 128px; margin-bottom: 18px; filter: drop-shadow(0 10px 26px rgba(226,181,83,.22)); }
.gate h1 { font-size: 30px; margin-bottom: 10px; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate p { color: var(--ash); line-height: 1.6; margin: 0 0 24px; } .gate p b { color: var(--silver); }
.gate-ic { width: 54px; height: 54px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: var(--gold); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.gate-ic.red { color: var(--loss); background: rgba(224,120,128,.08); box-shadow: inset 0 0 0 1px rgba(224,120,128,.4); }
.gate-actions { display: flex; gap: 10px; justify-content: center; }
.gate-foot { color: var(--dim); font-size: 13px; }

/* toasts */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; justify-items: center; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 22px; background: var(--plate-3); border: 1px solid var(--seam-2); box-shadow: 0 14px 34px rgba(0,0,0,.4); font-size: 14.5px; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: none; }
.toast.success .ic { color: var(--gain); } .toast.error .ic { color: var(--loss); } .toast.info .ic { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) { .ores { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pick-stats { gap: 22px; } }
@media (max-width: 1100px) {
  .bench { grid-template-columns: 1fr; } .ticket { position: static; max-height: none; }
  .pick { grid-template-columns: auto 1fr; } .pick-stats { grid-column: 1 / -1; justify-content: flex-start; } .stat { text-align: left; }
  .topnav a span { display: none; } .topnav a { padding: 0 12px; } .me-name { display: none; }
}
@media (max-width: 700px) {
  .topbar { padding: 0 14px; gap: 10px; } .brand span { display: none; } .server select { width: 80px; }
  .main { padding: 22px 14px 80px; } .hero h1 { font-size: 34px; } .hero-top { flex-wrap: wrap; }
  .pick-stats { flex-wrap: wrap; gap: 14px 24px; } .stat b { font-size: 22px; }
  .t-result b { font-size: 19px; } .t-result div { padding: 10px; }
  .pick { padding: 20px; gap: 16px; } .art-xl { width: 84px; height: 84px; } .pick-name { font-size: 24px; } .stat.big b { font-size: 32px; }
  .ores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { padding: 18px 14px; } .map { grid-template-columns: 36px repeat(var(--cols), minmax(0, 1fr)); gap: 4px; }
  .cell { min-height: 56px; padding: 6px; } .cell-v { font-size: 14px; } .cell-s { display: none; }
  .member-row { flex-wrap: wrap; } .actions { width: 100%; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
