:root {
  --bg: #16181b;
  --side: #1c1f23;
  --panel: #212529;
  --raise: #292d33;
  --well: #121416;
  --line: #31363d;
  --line-soft: #292d33;
  --text: #dedcd5;
  --text-2: #c3c1ba;
  --muted: #8b9098;
  --faint: #5f656d;
  --accent: #4fae9a;
  --accent-ink: #0c1a16;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-fg: var(--accent);
  --danger: #d9534b;
  --danger-soft: rgba(217, 83, 75, .14);
  --warn: #d9a548;
  --warn-soft: rgba(217, 165, 72, .14);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --line-hover: #454c55;
  --hover: #30353c;
  --row-hover: #262a30;
  --danger-text: #ec8a83;
  --r: 6px; --r-sm: 4px; --r-lg: 8px;
  --zoom: 1;
  --console-size: 12.5px;
  color-scheme: dark;
}
/* themes: only the colors that differ from the default (Deepslate) */
:root[data-theme="midnight"] {
  --bg: #0e1218; --side: #121821; --panel: #161c26; --raise: #1e2531; --well: #0a0d12;
  --line: #28313f; --line-soft: #1f2733; --text: #dce3ec; --text-2: #b4bfcd; --muted: #8794a6; --faint: #5a6677;
  --line-hover: #3a4658; --hover: #263040; --row-hover: #1b2330;
}
:root[data-theme="nether"] {
  --bg: #1a1214; --side: #20161a; --panel: #271b20; --raise: #31232a; --well: #140d10;
  --line: #44313a; --line-soft: #36262d; --text: #eadfdb; --text-2: #cdbdb8; --muted: #a08d8c; --faint: #6f5d5e;
  --line-hover: #5d4450; --hover: #3b2a32; --row-hover: #2f2127;
}
:root[data-theme="light"] {
  --bg: #eceff2; --side: #e2e6ea; --panel: #ffffff; --raise: #f1f3f6; --well: #f7f8fa;
  --line: #ccd2d9; --line-soft: #e3e7eb; --text: #1b2127; --text-2: #38424c; --muted: #5b6671; --faint: #8a939d;
  --line-hover: #aeb7c1; --hover: #e4e8ec; --row-hover: #f3f5f8;
  --danger: #c23e36; --danger-text: #b3342d; --warn: #9c6a12;
  --accent-fg: color-mix(in srgb, var(--accent) 62%, #000);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { zoom: var(--zoom); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 224px minmax(0, 1fr); height: calc(100vh / var(--zoom)); }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.brand-mark, .logo-pv { width: 28px; height: 28px; flex: none; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); overflow: hidden; display: grid; place-items: center; }
.brand-mark svg, .logo-pv svg { width: 100%; height: 100%; display: block; }
.brand-mark.img, .logo-pv.img { background: transparent; }
.brand-mark img, .logo-pv img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark.pixel img, .logo-pv.pixel img { image-rendering: pixelated; }
.brand-letter { font-weight: 700; font-size: 16px; line-height: 1; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.logo-opt { padding: 5px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raise); cursor: pointer; display: grid; }
.logo-opt:hover { border-color: var(--line-hover); }
.logo-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.logo-opt .logo-pv { width: 34px; height: 34px; }
.logo-opt .brand-letter { font-size: 19px; }
.logos .btn { margin-left: 4px; }
.brand-name { font-weight: 600; font-size: 15px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { color: var(--text); background: var(--raise); }
.nav a[aria-current="page"] { color: var(--text); background: var(--raise); box-shadow: inset 2px 0 0 var(--accent); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.side-foot { margin-top: auto; padding: 0 8px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.top h1 { font-size: 17px; font-weight: 600; margin-right: auto; }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--faint); }
.state[data-s="online"] .dot { background: var(--accent); }
.state[data-s="starting"] .dot, .state[data-s="stopping"] .dot { background: var(--warn); animation: blink 1s steps(2, start) infinite; }
.state[data-s="offline"] .dot { background: var(--danger); }
@keyframes blink { 50% { opacity: .25; } }
.controls { display: flex; gap: 8px; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 28px; }
.view.fill { display: flex; flex-direction: column; overflow: hidden; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raise); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--line-hover); background: var(--hover); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, white); border-color: color-mix(in srgb, var(--accent) 86%, white); }
.btn.danger { color: var(--danger-text); border-color: rgba(217, 83, 75, .45); background: transparent; }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover:not(:disabled) { color: var(--text); background: var(--raise); border-color: transparent; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; }
.btn svg { width: 15px; height: 15px; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; height: 34px; padding: 0 10px; background: var(--well); border: 1px solid var(--line); border-radius: var(--r); }
textarea { height: auto; padding: 9px 10px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
label.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-weight: 500; }
.field small, .hint { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; background: var(--raise); color: var(--muted); }
.chip.ok { background: var(--accent-soft); color: var(--accent-fg); }
.chip.bad { background: var(--danger-soft); color: var(--danger-text); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- console view ---------- */
.stats { display: flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 14px; flex: none; overflow: hidden; }
.stat { flex: 1; padding: 11px 16px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 19px; font-weight: 600; margin-top: 1px; white-space: nowrap; }
.stat .v small { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.meter { height: 3px; background: var(--well); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .6s; }
.meter i.hot { background: var(--warn); }
.console-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; }
.term { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--well); overflow: hidden; }
.log { flex: 1; overflow: auto; padding: 10px 14px; font: var(--console-size) / 1.55 var(--mono); }
.log div { white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.log .warn { color: var(--warn); }
.log .err { color: var(--danger-text); }
.log .sys { color: var(--accent-fg); }
.cmd { display: flex; align-items: center; border-top: 1px solid var(--line); background: var(--panel); }
.cmd span { padding: 0 0 0 14px; color: var(--accent-fg); font: 13px var(--mono); }
.cmd input { border: 0; background: transparent; height: 38px; font-family: var(--mono); font-size: 13px; box-shadow: none !important; }
.jump { position: absolute; right: 22px; bottom: 56px; }
.roster { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.roster h3 { font-size: 13px; font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.roster ul { list-style: none; margin: 0; padding: 4px 0; overflow: auto; }
.roster li a { display: block; padding: 6px 14px; color: var(--text); text-decoration: none; }
.roster li a:hover { background: var(--raise); }
.empty { padding: 26px 18px; color: var(--muted); text-align: center; line-height: 1.5; }

/* ---------- tables ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--row-hover); }
td.r, th.r { text-align: right; }
td.act { text-align: right; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }

/* ---------- files ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-right: auto; font-weight: 500; }
.crumbs button { background: none; border: 0; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; color: var(--muted); }
.crumbs button:hover { background: var(--raise); color: var(--text); }
.crumbs button:last-child { color: var(--text); }
.crumbs i { color: var(--faint); font-style: normal; }
.fname { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fname svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.fname.dir svg { color: var(--warn); }
.fname button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.fname button:hover { color: var(--accent-fg); }
.dropzone { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); display: grid; place-items: center; z-index: 50; pointer-events: none; }
.dropzone div { border: 2px dashed var(--accent); border-radius: 10px; padding: 44px 64px; font-size: 18px; font-weight: 500; }
.progress { height: 6px; border-radius: var(--r-sm); background: var(--well); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; width: 0; }
.uploads { margin-bottom: 14px; padding: 12px 14px; display: grid; gap: 8px; }

/* ---------- versions ---------- */
.current { display: flex; gap: 22px; align-items: center; padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.current .k { font-size: 12.5px; color: var(--muted); }
.current .v { font-size: 16px; font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; margin-bottom: -1px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.vitem { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.vitem.cur { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--panel); }
.vitem .id { font-weight: 600; }
.vitem .note { font-size: 12px; color: var(--muted); }
.install-bar { padding: 14px 18px; margin-bottom: 18px; border-color: var(--accent); }

/* ---------- players drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); background: var(--side); border-left: 1px solid var(--line); z-index: 40; overflow: auto; box-shadow: -18px 0 40px rgba(0, 0, 0, .35); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; position: sticky; top: 0; background: var(--side); border-bottom: 1px solid var(--line); z-index: 1; }
.drawer header h2 { font-size: 18px; }
.drawer section { padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.drawer h3 { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.avatar { width: 42px; height: 42px; border-radius: var(--r); flex: none; image-rendering: pixelated; background: var(--raise); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini { width: 100%; font-size: 13px; }
.mini td, .mini th { padding: 6px 0; border: 0; border-bottom: 1px solid var(--line-soft); }
.mini tr:last-child td { border-bottom: 0; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .35); }

/* ---------- dialogs, toasts, forms ---------- */
dialog.pfull { font-size: 15.5px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
dialog.wide { width: min(860px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8, 9, 10, .6); }
dialog form { display: flex; flex-direction: column; }
.d-head { padding: 18px 20px 6px; }
.d-head h2 { font-size: 16px; }
.d-body { padding: 8px 20px 16px; display: grid; gap: 14px; }
.d-foot { padding: 12px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.editor { width: 100%; height: min(60vh, 520px); font: 13px/1.5 var(--mono); background: var(--well); white-space: pre; tab-size: 2; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--raise); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: var(--r); max-width: 360px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.toast.err { border-left-color: var(--danger); }
.form { max-width: 680px; display: grid; gap: 22px; }
.form section { display: grid; gap: 14px; padding: 18px 20px; }
.form h2 { font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- login ---------- */
.gate { min-height: calc(100vh / var(--zoom)); display: grid; place-items: center; padding: 20px; }
.gate form, .gate .gate-form { width: min(380px, 100%); display: grid; gap: 16px; }
.gate .brand { padding: 0 0 4px; }
.gate h1 { font-size: 22px; }
.err-text { color: var(--danger-text); min-height: 18px; font-size: 13px; }


/* ---------- plugins ---------- */
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbox input { padding-left: 33px; }
.toolbar select { width: auto; min-width: 170px; }
.catbar { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; }
.fchip:hover { color: var(--text); border-color: var(--line-hover); }
.fchip[aria-pressed="true"] { color: var(--accent-fg); border-color: var(--accent); background: var(--accent-soft); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-width: 0; }
.pcard:hover { border-color: var(--line-hover); }
.phead { display: flex; align-items: center; gap: 12px; }
.phead h3 { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phead .grow { min-width: 0; }
.picon { width: 48px; height: 48px; border-radius: var(--r-lg); object-fit: cover; background: var(--raise); flex: none; }
svg.avatar { border-radius: var(--r-lg); flex: none; }
.pdesc { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.pfoot { display: flex; align-items: center; gap: 14px; margin-top: auto; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pstat { display: inline-flex; align-items: center; gap: 5px; }
.pstat svg { width: 14px; height: 14px; }
.pcats { display: flex; gap: 5px; margin-left: auto; }
.plink { display: inline-flex; padding: 6px; border-radius: var(--r); color: var(--muted); }
.plink:hover { background: var(--raise); color: var(--text); }
.plink svg { width: 16px; height: 16px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid rgba(217, 165, 72, .45); background: var(--warn-soft); border-radius: var(--r); }
.pact .btn { min-width: 76px; }
.pcard { cursor: pointer; }
.ptitle { all: unset; cursor: pointer; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptitle:hover { color: var(--accent-fg); }
.ptitle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.pcard .pdesc { cursor: pointer; }
/* ---------- plugin detail view ---------- */
dialog.pfull { width: min(1180px, calc(100vw / var(--zoom) - 32px)); height: calc(100dvh / var(--zoom) - 32px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
dialog.pfull[open] { display: flex; }
dialog.pfull.max { width: calc(100vw / var(--zoom)); height: calc(100dvh / var(--zoom)); max-width: none; border-radius: 0; border: 0; }
.pfull-head { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.pfull-head .btn { height: 38px; padding: 0 16px; font-size: 15px; }
.pfull-head .pact .btn { min-width: 96px; }
.pfull-head h2 { font-size: 22px; font-weight: 650; }
.pfull-head .grow { min-width: 0; flex: 1 1 200px; }
.pfull-scroll { overflow: auto; flex: 1; padding: 20px; }
.pfull-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; max-width: 1100px; margin: 0 auto; }
.plead { font-size: 17px; color: var(--text-2); margin-bottom: 14px; }
.pgallery { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; }
.pgallery[hidden] { display: none; }
.pgallery a { flex: none; }
.pgallery img { height: 220px; width: auto; border-radius: var(--r); border: 1px solid var(--line); display: block; background: var(--raise); }
.pbody { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.pbody > * + * { margin-top: .8em; }
.pbody h1, .pbody h2 { font-size: 1.35em; font-weight: 650; margin-top: 1.4em; padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.pbody h3, .pbody h4, .pbody h5, .pbody h6 { font-size: 1.08em; font-weight: 650; margin-top: 1.2em; }
.pbody img { max-width: 100%; height: auto; border-radius: var(--r); vertical-align: middle; }
.pbody ul, .pbody ol { padding-left: 1.4em; }
.pbody li + li { margin-top: .25em; }
.pbody a[href] { color: var(--accent-fg); text-decoration: underline; text-underline-offset: 2px; }
.pbody code { font-family: var(--mono); font-size: .9em; background: var(--raise); padding: 1px 5px; border-radius: 4px; }
.pbody pre { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; }
.pbody pre code { background: none; padding: 0; }
.pbody blockquote { border-left: 3px solid var(--line-hover); padding-left: 14px; color: var(--text-2); }
.pbody hr { border: 0; border-top: 1px solid var(--line); }
.pbody table { border-collapse: collapse; display: block; overflow-x: auto; }
.pbody th, .pbody td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.pbody th { background: var(--raise); }
.pside { position: sticky; top: 0; }
.pside h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.facts { display: grid; gap: 10px; margin: 0 0 16px; }
.fact { display: flex; justify-content: space-between; gap: 14px; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.fact dt { color: var(--muted); flex: none; }
.fact dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.plinks { display: grid; gap: 8px; margin-bottom: 14px; }
.plinks a { font-size: 15px; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-fg); }
.plinks svg { width: 16px; height: 16px; }
@media (max-width: 820px) { .pfull-grid { grid-template-columns: 1fr; } .pside { position: static; } dialog.pfull, dialog.pfull.max { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; } }
@media (max-width: 820px) { .pgrid { grid-template-columns: 1fr; } }

@media (max-width: 820px) {
  html { zoom: 1; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100vh; }
  .side { flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); gap: 8px; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; } .brand-sub, .side-foot { display: none; }
  .nav { flex-direction: row; } .nav a { padding: 7px 10px; } .nav a span:not(.count) { display: none; }
  .top, .view { padding-left: 14px; padding-right: 14px; }
  .console-wrap { grid-template-columns: 1fr; } .roster { display: none; }
  .view.fill { min-height: 80vh; }
  .stats { flex-wrap: wrap; } .stat { flex: 1 1 45%; } .stat + .stat { border-left: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
/* source switch + filters on the plugin page */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); padding: 2px; background: var(--well); margin-bottom: 12px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 5px 14px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--raise); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.filters { display: flex; gap: 22px; flex-wrap: wrap; margin: 12px 0 14px; }
@media (max-width: 820px) { .panel { overflow-x: auto; } .panel table { min-width: 560px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- appearance settings ---------- */
.look-row { display: grid; gap: 8px; }
.look-row > span { font-weight: 500; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.theme { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 8px; cursor: pointer; text-align: left; display: grid; gap: 7px; }
.theme:hover { border-color: var(--line-hover); }
.theme[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme .pv { height: 44px; border-radius: var(--r-sm); display: grid; grid-template-columns: 26% 1fr; overflow: hidden; border: 1px solid rgba(128, 128, 128, .25); }
.theme .pv i { display: block; }
.theme .pv b { display: grid; align-content: center; gap: 4px; padding: 0 8px; }
.theme .pv b::before, .theme .pv b::after { content: ""; height: 5px; border-radius: 2px; background: var(--c-line); }
.theme .pv b::after { width: 55%; background: var(--c-acc); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }
.swatches input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }

/* ---------- modpacks */
.packnow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.packnow .grow { min-width: 200px; }
.packnow .k { font-size: 12.5px; color: var(--muted); }
.packinfo { display: grid; gap: 12px; margin-top: 14px; }
.packfacts { margin: 0; }
.packsteps { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); font-size: 13.5px; }
.skipped summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.skipped p { margin-top: 6px; }
.notice.bad { border-color: rgba(217, 83, 75, .5); background: var(--danger-soft); }
.d-head.row { gap: 10px; }

/* ---------- error states */
.crash { max-width: 620px; margin: 40px auto; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); display: grid; gap: 12px; }
.crash-code { font: 600 12.5px var(--mono); letter-spacing: .08em; color: var(--accent-fg); }
.crash h2 { font-size: 20px; }
.crash-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.crash-details pre { margin: 8px 0 0; padding: 10px 12px; background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r); font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; color: var(--text-2); }
a.btn { text-decoration: none; }

/* modpack upload */
.packdrop { padding: 12px 16px; margin-bottom: 14px; border-style: dashed; transition: border-color .12s, background .12s; }
.packdrop .row { gap: 10px; align-items: center; }
.packdrop svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.packdrop .btn svg { color: inherit; }
.packdrop .progress { margin-top: 10px; }
.packdrop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel, transparent)); }

/* ---------- setup wizard */
.view.wiz-view { display: flex; justify-content: center; }
.wiz { width: 100%; max-width: 760px; padding: 0; overflow: visible; align-self: flex-start; }
.wiz-head { padding: 18px 26px 0; border-bottom: 1px solid var(--line); }
.wiz-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wiz-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.wiz-steps button { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 12px 12px 0; margin-right: 14px; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wiz-steps button:disabled { cursor: default; color: var(--faint); }
.wiz-steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--line); background: var(--well); }
.wiz-steps li.on button { color: var(--text); border-bottom-color: var(--accent); }
.wiz-steps li.on .n { border-color: var(--accent); color: var(--accent-fg); }
.wiz-steps li.done button { color: var(--text-2); }
.wiz-steps li.done .n { background: var(--accent-soft); border-color: transparent; color: var(--accent-fg); }
.wiz-body { padding: 24px 26px 8px; }
.wiz-body:last-child { padding-bottom: 26px; }
.wiz-body h2 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.01em; }
.wiz-sub { margin: 0 0 20px; max-width: 60ch; }
.wiz-fields { display: grid; gap: 18px; max-width: 560px; }
.wiz-fields .seg { margin-bottom: 0; flex-wrap: wrap; }
.wiz-row { display: flex; gap: 22px; flex-wrap: wrap; }
.wiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 26px; margin-top: 18px; border-top: 1px solid var(--line); }
.wiz-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.wiz-type { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--well); color: var(--text); font: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.wiz-type:hover { border-color: var(--line-hover); }
.wiz-type[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.wiz-type-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wiz-version { margin-top: 20px; max-width: 340px; }
.wiz-summary { margin: 0 0 18px; }
.wiz-summary .link-btn { margin-left: 8px; font-size: 12.5px; }
.wiz-checks { display: grid; gap: 12px; }
.wiz-progress { height: 8px; margin: 6px 0 14px; }
.wiz-progress.bad i { background: var(--danger); }
.wiz-addr { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--well); padding: 14px 16px; margin-bottom: 18px; }
.wiz-addr .k { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.wiz-addr code { font: 600 17px var(--mono); color: var(--text); overflow-wrap: anywhere; }
.wiz-addr .hint { margin: 10px 0 0; }
.wiz-next { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 600px) { .wiz-next { grid-template-columns: 1fr; } }
.wiz-next a { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); text-decoration: none; }
.wiz-next a:hover { border-color: var(--line-hover); background: var(--row-hover); }
.wiz-again { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--well); margin-bottom: 4px; }
@media (max-width: 600px) { .wiz-head, .wiz-body, .wiz-foot { padding-left: 16px; padding-right: 16px; } }

/* loading placeholders for catalogue grids */
.pcard.skel { pointer-events: none; gap: 10px; }
.skel i { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--raise) 0%, var(--hover) 50%, var(--raise) 100%); background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; }
.skel .sk-icon { width: 48px; height: 48px; border-radius: var(--r); flex: none; }
.skel .sk-line { height: 10px; margin: 6px 0; }
.skel .w60 { width: 60%; height: 13px; } .skel .w30 { width: 30%; } .skel .w80 { width: 80%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
