/* Dekaron Online control panel (server/admin/web). Dark, plain CSS, no build step, no external fonts or CDN. */
:root {
  --bg: #08070c;
  --bg-2: #0c0a12;
  --panel: #121019;
  --panel-2: #17141f;
  --panel-3: #1e1a29;
  --hover: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --line-gold: rgba(226, 184, 102, .32);
  --text: #ece7f5;
  --dim: #aaa2bb;
  --faint: #716a84;
  --gold: #e2b866;
  --gold-2: #f6da9c;
  --gold-deep: #9a6d2c;
  --violet: #a68bff;
  --violet-2: #cbbcff;
  --violet-deep: #3b2470;
  --ok: #5fd08f;
  --warn: #f2b957;
  --err: #ff7b7b;
  --info: #72b6ff;
  --ok-bg: rgba(95, 208, 143, .12);
  --warn-bg: rgba(242, 185, 87, .12);
  --err-bg: rgba(255, 123, 123, .12);
  --info-bg: rgba(114, 182, 255, .12);
  --violet-bg: rgba(166, 139, 255, .13);
  --gold-bg: rgba(226, 184, 102, .12);
  --r: 14px;
  --r-sm: 9px;
  --r-xs: 6px;
  --shadow: 0 16px 44px rgba(0, 0, 0, .45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --side: 256px;
  --top: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(110, 70, 220, .10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(226, 184, 102, .06), transparent 60%);
  background-attachment: fixed;
  color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.hidden { display: none !important; }
::selection { background: rgba(166, 139, 255, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .18); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ---------------------------------------------------------------- boot + sign in */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 400px; padding: 32px 28px 26px; border-radius: 20px; background: linear-gradient(180deg, rgba(30, 26, 41, .92), rgba(18, 16, 25, .96));
  border: 1px solid var(--line-gold); box-shadow: var(--shadow), 0 0 80px rgba(110, 70, 220, .12); display: flex; flex-direction: column; gap: 16px;
}
.login-card .emblem { width: 64px; height: 64px; margin: 0 auto 2px; filter: drop-shadow(0 6px 22px rgba(166, 139, 255, .35)); }
.login-card h1 { text-align: center; font-family: var(--display); font-size: 26px; letter-spacing: .04em; }
.login-card h1 .magic { color: var(--violet-2); font-style: italic; font-weight: 500; margin-right: 6px; }
.login-card h1 .dek { color: var(--gold); }
.login-card .sub { text-align: center; color: var(--dim); margin-top: -10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.login-card .hint { text-align: center; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100%; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: rgba(12, 10, 18, .92);
  border-right: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand svg { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 3px 12px rgba(166, 139, 255, .3)); }
.brand .word { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand .word b { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
.brand .word b i { color: var(--violet-2); font-weight: 500; margin-right: 5px; }
.brand .word b span { color: var(--gold); }
.brand .word small { color: var(--faint); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.nav-group { padding: 14px 10px 6px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: var(--r-sm); color: var(--dim);
  cursor: pointer; user-select: none; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item.on { background: linear-gradient(90deg, rgba(226, 184, 102, .14), rgba(226, 184, 102, .03)); color: var(--gold-2); }
.nav-item.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav-item .count { margin-left: auto; min-width: 22px; padding: 0 7px; height: 20px; border-radius: 10px; background: var(--panel-3); color: var(--dim); font-size: 11.5px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-item .count:empty { display: none; }
.nav-item .count.hot { background: var(--ok-bg); color: var(--ok); }
.nav-item .count.alert { background: var(--warn-bg); color: var(--warn); }
.nav-item .count.bad { background: var(--err-bg); color: var(--err); }
.side-foot { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.side-foot b { color: var(--dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; min-height: var(--top); display: flex; align-items: center; gap: 14px; padding: 10px 26px;
  background: rgba(8, 7, 12, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.page-head { min-width: 0; flex: 1; }
.page-head h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head p { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--panel-3); }
.icon-btn svg { width: 19px; height: 19px; }
.only-mobile { display: none; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--dim); font: 600 12.5px var(--font); cursor: pointer; white-space: nowrap;
}
.status-pill:hover { background: var(--panel-3); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status-pill.running { color: var(--ok); border-color: rgba(95, 208, 143, .35); }
.status-pill.running .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(95, 208, 143, .16); animation: pulse 2.4s ease-in-out infinite; }
.status-pill.starting, .status-pill.stopping, .status-pill.preparing { color: var(--warn); border-color: rgba(242, 185, 87, .35); }
.status-pill.starting .dot, .status-pill.stopping .dot, .status-pill.preparing .dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
.status-pill.crashed { color: var(--err); border-color: rgba(255, 123, 123, .4); }
.status-pill.crashed .dot { background: var(--err); }
@keyframes pulse { 50% { opacity: .45; } }
.who { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 5px; border-radius: 19px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: 500 13px var(--font); }
.who:hover { background: var(--panel-3); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #1b1426; background: linear-gradient(135deg, var(--gold-2), var(--gold-deep)); text-transform: uppercase; flex: none; }
.banner-area { padding: 0 26px; }
.banner { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid; font-size: 13.5px; flex-wrap: wrap; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner .grow { flex: 1; min-width: 200px; }
.banner.warn { background: var(--warn-bg); border-color: rgba(242, 185, 87, .32); color: #f8dca6; }
.banner.err { background: var(--err-bg); border-color: rgba(255, 123, 123, .32); color: #ffc4c4; }
.banner.info { background: var(--info-bg); border-color: rgba(114, 182, 255, .3); color: #cfe5ff; }
.banner.ok { background: var(--ok-bg); border-color: rgba(95, 208, 143, .3); color: #c4f1d6; }
.banner.inline { margin-top: 0; }
.content { padding: 22px 26px 60px; min-width: 0; }
.content.loading { opacity: .55; pointer-events: none; transition: opacity .2s; }

/* ---------------------------------------------------------------- layout helpers */
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.tight { gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; min-width: 0; align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.g-side-l { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.75fr); }
.span-2 { grid-column: span 2; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.err-text { color: var(--err); }
.gold-text { color: var(--gold); }
.violet-text { color: var(--violet-2); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sep { height: 1px; background: var(--line); margin: 4px 0; }
.section-title { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .12em; text-transform: uppercase; }

/* ---------------------------------------------------------------- cards and tiles */
.card { background: linear-gradient(180deg, rgba(23, 20, 31, .94), rgba(18, 16, 25, .94)); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 56px; }
.card-head .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--gold-bg); color: var(--gold); flex: none; }
.card-head .ic svg { width: 17px; height: 17px; }
.card-head .titles { min-width: 0; flex: 1; }
.card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--faint); font-size: 12.5px; }
.card-head .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 16px 18px; min-width: 0; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card.accent { border-color: var(--line-gold); }
.card.danger-zone { border-color: rgba(255, 123, 123, .28); }
.card.danger-zone .card-head .ic { background: var(--err-bg); color: var(--err); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 15px 16px 14px; border-radius: var(--r); background: linear-gradient(180deg, rgba(30, 26, 41, .9), rgba(20, 17, 28, .9)); border: 1px solid var(--line); min-width: 0; }
.tile.link { cursor: pointer; }
.tile.link:hover { border-color: var(--line-2); }
.tile .k { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; font-weight: 500; }
.tile .k svg { width: 16px; height: 16px; flex: none; }
.tile .v { font-size: 25px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 14px; color: var(--faint); font-weight: 500; margin-left: 4px; }
.tile .s { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .bar { margin-top: 6px; }
.tile.gold .k svg { color: var(--gold); } .tile.violet .k svg { color: var(--violet); } .tile.green .k svg { color: var(--ok); }
.tile.blue .k svg { color: var(--info); } .tile.red .k svg { color: var(--err); } .tile.amber .k svg { color: var(--warn); }
.tile.warn { border-color: rgba(242, 185, 87, .38); background: linear-gradient(180deg, rgba(60, 44, 20, .55), rgba(20, 17, 28, .9)); }
.tile.bad { border-color: rgba(255, 123, 123, .38); background: linear-gradient(180deg, rgba(64, 24, 28, .55), rgba(20, 17, 28, .9)); }
.bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.bar.violet > i { background: linear-gradient(90deg, var(--violet-deep), var(--violet)); }
.bar.ok > i { background: linear-gradient(90deg, #2f8a58, var(--ok)); }
.bar.warn > i { background: linear-gradient(90deg, #9a6d2c, var(--warn)); }
.bar.err > i { background: linear-gradient(90deg, #8a2f2f, var(--err)); }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 9px 18px; font-size: 13.5px; align-items: baseline; }
.kv > :nth-child(odd) { color: var(--faint); }
.kv > :nth-child(even) { min-width: 0; overflow-wrap: anywhere; }
.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px; }
.hero .big { font-family: var(--display); font-size: 25px; letter-spacing: .02em; }
.hero .grow p { color: var(--dim); }
.hero .hic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-3); color: var(--faint); flex: none; }
.hero .hic svg { width: 26px; height: 26px; }
.hero .hic.ok { background: var(--ok-bg); color: var(--ok); } .hero .hic.bad { background: var(--err-bg); color: var(--err); } .hero .hic.warn { background: var(--warn-bg); color: var(--warn); }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist .ck { display: flex; align-items: center; gap: 10px; }
.checklist .ck svg { width: 18px; height: 18px; flex: none; }
.checklist .ck.yes svg { color: var(--ok); }
.checklist .ck.no svg { color: var(--err); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--panel-3); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, opacity .12s, transform .05s; user-select: none;
}
.btn:hover { background: #2a2438; border-color: rgba(255, 255, 255, .2); text-decoration: none; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: linear-gradient(180deg, #ecc677, #c99a47); border-color: #e2b866; color: #1c1408; }
.btn.primary:hover { background: linear-gradient(180deg, #f5d48e, #d6a852); color: #1c1408; }
.btn.violet { background: linear-gradient(180deg, #8f72f0, #6c4fd0); border-color: #a68bff; color: #fff; }
.btn.violet:hover { background: linear-gradient(180deg, #9d83f5, #7a5edb); }
.btn.success { background: rgba(95, 208, 143, .14); border-color: rgba(95, 208, 143, .45); color: var(--ok); }
.btn.success:hover { background: rgba(95, 208, 143, .24); color: var(--ok); }
.btn.danger { background: rgba(255, 123, 123, .12); border-color: rgba(255, 123, 123, .45); color: var(--err); }
.btn.danger:hover { background: rgba(255, 123, 123, .22); color: var(--err); }
.btn.danger.solid { background: linear-gradient(180deg, #e46a6a, #b84444); color: #fff; border-color: #ff8a8a; }
.btn.warn { background: rgba(242, 185, 87, .12); border-color: rgba(242, 185, 87, .45); color: var(--warn); }
.btn.warn:hover { background: rgba(242, 185, 87, .22); color: var(--warn); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.8px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.xs svg { width: 14px; height: 14px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 31px; } .btn.xs.icon { width: 26px; }
.btn.block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading svg { visibility: hidden; }
.btn.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--gold-2); animation: spin .7s linear infinite; }
.btn-group { display: inline-flex; gap: 4px; flex-wrap: nowrap; }

/* ---------------------------------------------------------------- forms */
input, select, textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: rgba(8, 7, 12, .55); color: var(--text);
  font: 14px var(--font); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
textarea.code { font: 12.5px/1.5 var(--mono); min-height: 380px; white-space: pre; }
select { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: #17141f; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 184, 102, .16); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--gold); padding: 0; flex: none; }
input[type="range"] { padding: 0; height: 24px; accent-color: var(--gold); background: none; border: none; box-shadow: none; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input.bad, select.bad, textarea.bad { border-color: var(--err); box-shadow: 0 0 0 3px rgba(255, 123, 123, .14); }
input.sm, select.sm { height: 31px; font-size: 13px; padding: 0 9px; }
select.sm { padding-right: 26px; }
input.num-in { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .lab { font-size: 12.5px; font-weight: 600; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.field > .lab .req { color: var(--gold); }
.field > .hint, .hint { color: var(--faint); font-size: 12.3px; line-height: 1.45; }
.field > .err { color: var(--err); font-size: 12.3px; }
.field > .err:empty { display: none; }
.field.dirty > .lab { color: var(--gold-2); }
.field.dirty > .lab::after { content: "changed"; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-left: 6px; }
details > summary { list-style: revert; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.form-error { color: var(--err); font-size: 13px; }
.form-error:empty { display: none; }
.form-error:not(:empty) { padding: 9px 12px; border-radius: var(--r-xs); background: var(--err-bg); border: 1px solid rgba(255, 123, 123, .3); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text); user-select: none; }
.check small { color: var(--faint); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 12px; background: rgba(255, 255, 255, .12); position: relative; transition: background .15s; flex: none; border: 1px solid var(--line-2); }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #d8d2e4; transition: transform .15s, background .15s; }
.switch input:checked + .track { background: rgba(95, 208, 143, .35); border-color: rgba(95, 208, 143, .6); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--ok); }
.switch input:focus-visible + .track { outline: 2px solid var(--violet); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }
.switch .sw-text { display: flex; flex-direction: column; }
.switch .sw-text small { color: var(--faint); font-size: 12.3px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(8, 7, 12, .55); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { height: 29px; padding: 0 12px; border: none; border-radius: 7px; background: none; color: var(--dim); font: 600 12.8px var(--font); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--gold-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 0 0 1px var(--line-2); }
.seg button .n { margin-left: 6px; color: var(--faint); font-weight: 500; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; height: 44px; padding: 0 14px; border: none; background: none; color: var(--dim); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--gold-2); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); }
.tabs button .n { margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: var(--panel-3); color: var(--faint); font-size: 11px; }
.search { position: relative; min-width: 260px; }
.search svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 34px; }
.search.sm input { height: 31px; font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.savebar {
  position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line-gold);
  background: rgba(30, 25, 40, .96); box-shadow: var(--shadow); backdrop-filter: blur(10px); flex-wrap: wrap;
}
.savebar .grow { color: var(--dim); }
.savebar.clean { display: none; }
.savebar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(226, 184, 102, .18); flex: none; }

/* ---------------------------------------------------------------- badges and chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--panel-3); color: var(--dim); border: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.badge + .badge, b + .badge, span + .badge, a + .badge, .name + .badge { margin-left: 6px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(95, 208, 143, .3); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(242, 185, 87, .3); }
.badge.err { background: var(--err-bg); color: var(--err); border-color: rgba(255, 123, 123, .3); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: rgba(114, 182, 255, .3); }
.badge.violet { background: var(--violet-bg); color: var(--violet-2); border-color: rgba(166, 139, 255, .32); }
.badge.gold { background: var(--gold-bg); color: var(--gold-2); border-color: var(--line-gold); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--dim); font: 12.5px var(--font); cursor: pointer; max-width: 100%; }
.chip:hover { color: var(--text); border-color: var(--line-gold); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; min-width: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); background: rgba(14, 12, 20, .6); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--dim); }
.tbl th .arrow { margin-left: 4px; color: var(--gold); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.sel { background: rgba(226, 184, 102, .06); }
.tbl td.actions { text-align: right; white-space: nowrap; }
.tbl td.actions > * + * { margin-left: 4px; }
.tbl td.tight, .tbl th.tight { width: 1%; white-space: nowrap; }
.tbl .name { font-weight: 600; color: var(--text); }
.tbl .sub { display: block; color: var(--faint); font-size: 12px; }
.tbl.compact td { padding: 7px 12px; }
.tbl.compact th { padding: 8px 12px; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl input, .tbl select { height: 32px; font-size: 13px; }
.tbl tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.hpbar { width: 80px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.hpbar i { display: block; height: 100%; background: linear-gradient(90deg, #b84444, var(--err)); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; flex-wrap: wrap; }
.pager .btn-group { gap: 6px; align-items: center; }
.empty { padding: 42px 18px; text-align: center; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .eic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-3); color: var(--faint); margin-bottom: 6px; }
.empty .eic svg { width: 22px; height: 22px; }
.empty h4 { color: var(--text); font-size: 15px; }
.empty .row { justify-content: center; margin-top: 10px; }
.empty.sm { padding: 22px 14px; }
.skeleton { display: flex; flex-direction: column; gap: 16px; }
.skeleton .sk { border-radius: var(--r); background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------------------------------------------- menus, pickers */
.menu { position: fixed; z-index: 90; min-width: 200px; padding: 6px; border-radius: 11px; background: #1d1828; border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-radius: 7px; background: none; color: var(--text); font: 13.5px var(--font); text-align: left; cursor: pointer; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
.menu button svg { width: 16px; height: 16px; color: var(--dim); flex: none; }
.menu button.danger { color: var(--err); }
.menu button.danger svg { color: var(--err); }
.menu button:disabled { opacity: .4; cursor: not-allowed; }
.menu .menu-sep { height: 1px; margin: 5px 4px; background: var(--line); }
.menu .menu-head { padding: 6px 10px 4px; color: var(--faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.picker { position: relative; min-width: 0; }
.drop { position: fixed; z-index: 140; max-height: 300px; overflow-y: auto; padding: 5px; border-radius: 10px; background: #1d1828; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.drop .opt { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; cursor: pointer; min-width: 0; }
.drop .opt:hover, .drop .opt.on { background: rgba(226, 184, 102, .1); }
.drop .opt .id { font: 12px var(--mono); color: var(--gold); flex: none; min-width: 54px; }
.drop .opt .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop .opt small { flex: 0 1 auto; max-width: 48%; color: var(--faint); padding-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop .none { padding: 10px; color: var(--faint); font-size: 13px; }

/* ---------------------------------------------------------------- dialogs and toasts */
dialog.dialog { padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: #16131f; color: var(--text); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow); overflow: hidden; }
dialog.dialog.wide { width: min(860px, calc(100vw - 24px)); }
dialog.dialog::backdrop { background: rgba(4, 3, 8, .66); backdrop-filter: blur(3px); }
dialog.dialog[open] { animation: pop .14s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.dlg-form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-bg); color: var(--gold); flex: none; }
.dlg-head .ic.danger { background: var(--err-bg); color: var(--err); }
.dlg-head .ic svg { width: 18px; height: 18px; }
.dlg-head h3 { font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dlg-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-body .intro { color: var(--dim); white-space: pre-line; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); flex-wrap: wrap; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #1d1828; border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: slidein .18s ease-out; font-size: 13.5px; }
.toast .tic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.toast .tic svg { width: 14px; height: 14px; }
.toast.ok .tic { background: var(--ok-bg); color: var(--ok); } .toast.ok { border-color: rgba(95, 208, 143, .3); }
.toast.err .tic { background: var(--err-bg); color: var(--err); } .toast.err { border-color: rgba(255, 123, 123, .35); }
.toast.warn .tic { background: var(--warn-bg); color: var(--warn); } .toast.warn { border-color: rgba(242, 185, 87, .3); }
.toast.info .tic { background: var(--info-bg); color: var(--info); }
.toast .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .tx b { display: block; margin-bottom: 2px; }
.toast .x { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.toast .x:hover { color: var(--text); }
.toast .act { margin-top: 8px; }
.toast.out { opacity: 0; transform: translateX(16px); transition: opacity .2s, transform .2s; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- console, charts, feeds */
.console { height: 520px; overflow: auto; padding: 10px 0; background: #07060b; font: 12.3px/1.6 var(--mono); border-radius: 0 0 var(--r) var(--r); }
.console.short { height: 250px; }
.console .l { display: flex; gap: 10px; padding: 0 14px; }
.console .l:hover { background: rgba(255, 255, 255, .03); }
.console .t { color: var(--faint); flex: none; }
.console .src { flex: none; width: 58px; color: var(--violet); }
.console .src.server { color: var(--info); } .console .src.prepare { color: var(--gold); }
.console .msg { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.console .l.warn .msg { color: var(--warn); } .console .l.error .msg { color: var(--err); }
.console .empty-log { padding: 20px 14px; color: var(--faint); }
.chart-wrap { position: relative; }
svg.chart { width: 100%; height: 170px; display: block; }
svg.chart.small { height: 92px; }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11.5px; margin-top: 6px; gap: 8px; flex-wrap: wrap; }
.legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--dim); font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.feed { display: flex; flex-direction: column; }
.feed .it { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start; min-width: 0; }
.feed .it:last-child { border-bottom: none; }
.feed .it .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--panel-3); color: var(--dim); }
.feed .it .ico svg { width: 15px; height: 15px; }
.feed .it .ico.bad { background: var(--err-bg); color: var(--err); } .feed .it .ico.good { background: var(--ok-bg); color: var(--ok); } .feed .it .ico.gold { background: var(--gold-bg); color: var(--gold); }
.feed .it .bd { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.feed .it .bd .t { color: var(--faint); font-size: 12px; }

/* ---------------------------------------------------------------- items, gear, bag, live map */
.item-icon { width: 40px; height: 40px; border-radius: 8px; background: #0b0a10; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 10px; font-weight: 700; color: var(--faint); text-transform: uppercase; }
.item-icon img { width: 100%; height: 100%; object-fit: contain; }
.item-icon.sm { width: 32px; height: 32px; border-radius: 6px; }
.item-icon.xs { width: 24px; height: 24px; border-radius: 5px; font-size: 8px; }
.item-icon.empty-slot { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 6px, transparent 6px 12px); }
.item-icon.premium { border-color: rgba(166, 139, 255, .55); }
.item-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.item-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.item-card .item-icon { width: 52px; height: 52px; }
.item-card .bd { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.item-card .lines { color: var(--faint); font-size: 12px; }
.item-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.item-cell .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.gear-slot { display: flex; gap: 10px; align-items: center; padding: 9px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.gear-slot .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bag-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); gap: 3px; max-width: 520px; }
.bag-cell { aspect-ratio: 1; border-radius: 5px; background: #0b0a10; border: 1px solid var(--line); }
.bag-item { position: relative; z-index: 1; border-radius: 6px; }
.bag-item .item-icon { width: 100%; height: 100%; border-radius: 6px; }
.bag-count { position: absolute; right: 3px; bottom: 1px; font: 700 11px var(--font); text-shadow: 0 0 3px #000, 0 0 2px #000; }
.map-box { position: relative; width: 100%; max-width: 760px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); }
.map-box img { width: 100%; display: block; }
.mk { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #000; }
.mk.pl { background: var(--gold); cursor: pointer; z-index: 3; }
.mk.pl i { position: absolute; left: 12px; top: -6px; font: 600 11px var(--font); font-style: normal; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; white-space: nowrap; }
.mk.bot { background: var(--info); width: 8px; height: 8px; z-index: 2; }
.mk.npc { background: var(--ok); width: 6px; height: 6px; border-width: 1px; z-index: 1; }
.mk.static { position: static; display: inline-block; transform: none; margin: 0 4px 0 10px; vertical-align: middle; }
.title-list { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 320px; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8, 7, 12, .4); }
.title-list label { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; min-width: 0; }
.title-list label:hover { background: var(--hover); }
.title-list label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-list .tl { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.title-list .tl span, .title-list .tl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-list small { color: var(--faint); font-size: 11.5px; }
.cmd-list { max-height: 640px; overflow-y: auto; }
.cmd-cat { position: sticky; top: 0; z-index: 1; padding: 8px 16px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); background: rgba(18, 16, 25, .98); border-bottom: 1px solid var(--line); }
.cmd { padding: 9px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cmd:hover { background: var(--hover); }
.cmd.on { background: rgba(226, 184, 102, .09); box-shadow: inset 3px 0 0 var(--gold); }
.cmd b { font-family: var(--mono); font-size: 13px; color: var(--gold-2); }
.cmd div { color: var(--faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-preview { padding: 10px 12px; border-radius: 8px; background: #07060b; border: 1px solid var(--line); font: 13px var(--mono); color: var(--gold-2); overflow-wrap: anywhere; }
.history { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.history .h { padding: 8px 10px; border-radius: 8px; background: rgba(8, 7, 12, .5); border: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; }
.history .h .ok { color: var(--ok); } .history .h .err { color: var(--err); }
.json { margin: 0; padding: 14px 16px; max-height: 560px; overflow: auto; background: #07060b; border-radius: 0 0 var(--r) var(--r); font: 12px/1.5 var(--mono); color: var(--dim); white-space: pre; }

/* ---------------------------------------------------------------- Deka Pass */
.pass-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; padding: 20px 22px; align-items: center; }
.pass-hero .season { font-family: var(--display); font-size: 30px; letter-spacing: .03em; line-height: 1.1; }
.pass-hero .season span { color: var(--gold); }
.pass-hero .dates { color: var(--dim); margin-top: 4px; }
.pass-hero .row { margin-top: 10px; }
.pass-hero .big-left { text-align: right; }
.pass-hero .big-left .n { font-size: 36px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.pass-hero .big-left .l { color: var(--faint); font-size: 12.5px; margin-top: 4px; }
.pass-hero .progress { grid-column: 1 / -1; }
.pass-hero .progress .bar { height: 8px; }
.pass-hero .progress .ends { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; gap: 10px; }
.reward-strip { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.reward-strip .lv { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.reward-strip .lv .n { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .06em; }
.reward-strip .lv .pair { display: flex; gap: 6px; }
.reward-cell { display: flex; align-items: center; gap: 8px; min-width: 250px; }
.reward-cell .picker { flex: 1; min-width: 150px; }
.reward-cell input.cnt { width: 70px; text-align: right; flex: none; }
.lvl-badge { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 7px; background: var(--gold-bg); color: var(--gold-2); font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line-gold); }
.mission-name { min-width: 190px; }
.mission-name .gm { color: var(--faint); font-size: 11.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.cat-pair { display: flex; gap: 6px; min-width: 270px; }
.cat-pair select { min-width: 0; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--dim); min-width: 220px; }
.meter .bar { flex: 1; min-width: 80px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .g-side, .g-side-l { grid-template-columns: minmax(0, 1fr); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(280px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); background: #0c0a12; }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .only-mobile { display: grid; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .content { padding: 16px 16px 60px; }
  .banner-area { padding: 0 16px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .g3, .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px; }
  .tile .v { font-size: 20px; }
  .page-head h1 { font-size: 17px; }
  .page-head p { display: none; }
  .who .nm { display: none; }
  .who { padding: 0 4px; }
  .status-pill .txt { display: none; }
  .status-pill { padding: 0 12px; }
  .card-head { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .toolbar { padding: 10px 12px; }
  .search { min-width: 0; flex: 1 1 100%; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .console { height: 420px; }
  .pass-hero { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .pass-hero .big-left { text-align: left; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .kv > :nth-child(even) { margin-bottom: 9px; }
  .toasts { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .bag-grid { gap: 2px; }
  .dlg-body { padding: 16px; }
  .savebar { bottom: 8px; }
  .hero { padding: 16px; }
}

/* Dekaron Online: live game data page (pages-gamedata.js) - spawn dots over the map picture */
.spawn-map { cursor: crosshair; max-width: none; }
.spawn-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ff5a5a; border: 1px solid rgba(0, 0, 0, .7); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); cursor: pointer; }
.spawn-dot.on { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--gold); box-shadow: 0 0 0 4px rgba(226, 184, 102, .35); z-index: 2; }
textarea.code { font: 12px/1.45 var(--mono); width: 100%; min-width: 220px; }
