/* PixelCity Minecraft console — data-terminal direction.
   Ground #171719, cards one step darker, a 56px icon rail, selection marked by a
   1px accent line, figures in tabular digits. Accent is the server's own grass
   green rather than the dealt blue (see report). */

@layer tokens, base, shell, components, responsive;

@layer tokens {
  :root {
    --ground: #171719;
    --surface: #131217;
    --raised: #212023;
    --border: #26262a;
    --rule: #1e1d21;
    --text: #ffffff;
    --muted: #8a8c92;
    --accent: #79a86a;
    --positive: #44a282;
    --negative: #e5566f;
    --warning: #d9a441;

    --radius: 6px;
    --rail: 56px;
    --gap: 24px;
    --pad: 32px;
    --control: 34px;

    --fs-title: 26px;
    --fs-section: 20px;
    --fs-kpi: 20px;
    --fs-body: 13px;
    --fs-small: 13px;

    --sans: "Public Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
    --shadow: 0 12px 28px rgba(0, 0, 0, .2);
  }
}

@layer base {
  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    height: 100%;
    background: var(--ground);
    color: var(--text);
    font: var(--fs-body)/1.5 var(--sans);
    -webkit-font-smoothing: antialiased;
  }

  body { overflow: hidden; }

  [hidden] { display: none !important; }

  h1, h2, p, dl, dd, ul { margin: 0; }
  ul { padding: 0; list-style: none; }

  button, input, textarea { font: inherit; color: inherit; }

  :focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
  }

  ::selection { background: #2c3a2a; color: var(--text); }

  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .meta { color: var(--muted); font-size: var(--fs-small); }
  .spacer { flex: 1; }
}

/* ---------- login gate ---------- */

@layer components {
  .gate {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--ground);
    z-index: 30;
  }

  .gate-card {
    width: min(340px, calc(100vw - 32px));
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .gate-mark {
    display: block;
    width: 32px;
    height: 32px;
    margin-bottom: 20px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    position: relative;
  }

  .gate-mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    background: var(--accent);
    opacity: .85;
  }

  .gate-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
  .gate-sub { color: var(--muted); font-size: var(--fs-small); margin: 4px 0 22px; }

  .field { display: block; margin-bottom: 16px; }
  .field span {
    display: block;
    margin-bottom: 6px;
    font-size: var(--fs-small);
    color: var(--muted);
  }

  .field input, .input, .cmd-input, textarea {
    width: 100%;
    height: var(--control);
    padding: 0 10px;
    background: var(--ground);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    outline: none;
  }

  .field input:focus, .input:focus { border-color: var(--accent); }

  .gate-error {
    min-height: 16px;
    margin-top: 12px;
    font-size: var(--fs-small);
    color: var(--negative);
  }

  /* ---------- buttons ---------- */

  .btn, .btn-primary {
    height: var(--control);
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: var(--fs-body);
    font-weight: 500;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, opacity .12s ease;
  }

  .btn:hover:not(:disabled) { background: var(--raised); border-color: #34343a; }

  .btn-primary {
    background: var(--text);
    border-color: var(--text);
    color: #101014;
  }

  .btn-primary:hover:not(:disabled) { opacity: .88; }

  .btn:disabled, .btn-primary:disabled { opacity: .4; cursor: not-allowed; }

  .btn.small, .btn-primary.small { height: 28px; padding: 0 10px; font-size: var(--fs-small); }

  .upload { display: inline-flex; align-items: center; cursor: pointer; }

  /* ---------- shell ---------- */

  .shell {
    display: grid;
    grid-template-columns: var(--rail) 1fr;
    height: 100vh;
  }

  .rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    background: var(--ground);
    border-right: 1px solid var(--border);
  }

  .rail-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font: 600 11px/1 var(--mono);
    letter-spacing: .04em;
  }

  .rail-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .rail-item {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .rail-item svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .rail-item:hover { color: var(--text); background: var(--raised); }

  /* The style's move: the active item is a 1px accent line on the rail edge. */
  .rail-item.is-active { color: var(--text); }
  .rail-item.is-active::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--accent);
  }

  .rail-exit { margin-top: auto; }

  .canvas {
    min-width: 0;
    height: 100vh;
    overflow: auto;
    padding: var(--pad);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
  }

  .canvas > * { flex: 0 0 auto; }

  /* ---------- title ---------- */

  .titlebar {
    display: flex;
    align-items: flex-start;
    gap: var(--gap);
  }

  .crumb {
    color: var(--muted);
    font-size: var(--fs-small);
    margin-bottom: 8px;
  }

  .crumb span { padding: 0 6px; color: #4b4b51; }

  .titlebar h1 {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--raised);
    color: var(--muted);
    font-size: var(--fs-small);
    font-weight: 500;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5b5b62;
  }

  .status.is-up { color: #d8d8dc; }
  .status.is-up .status-dot { background: var(--positive); }
  .status.is-down { color: #f0c3cb; }
  .status.is-down .status-dot { background: var(--negative); }

  .meta { margin-top: 8px; color: var(--muted); font-size: var(--fs-body); }

  .title-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
  }

  /* ---------- summary row ---------- */

  .summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .summary .cell {
    padding: 16px 20px;
    border-left: 1px solid var(--rule);
    min-width: 0;
  }

  .summary .cell:first-child { border-left: 0; }

  .cell-label { color: var(--muted); font-size: var(--fs-small); margin-bottom: 6px; }
  .cell-value {
    font-size: var(--fs-kpi);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    line-height: 1.2;
  }
  .cell-value .unit { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 4px; }
  .cell-note { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }

  .slots { display: flex; gap: 3px; margin-top: 10px; }
  .slots i {
    flex: 1;
    height: 3px;
    background: #2a2a30;
    border-radius: 1px;
  }
  .slots i.on { background: var(--accent); }

  /* ---------- panels ---------- */

  .panel { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }

  .split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: var(--gap);
    align-items: stretch;
  }

  .side { display: flex; flex-direction: column; gap: var(--gap); }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rule);
    min-height: 52px;
  }

  .card-head h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  .head-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* ---------- console ---------- */

  .console-card { min-height: 420px; }

  .console {
    flex: 1;
    margin: 0;
    padding: 12px 16px;
    overflow: auto;
    min-height: 260px;
    max-height: 52vh;
    background: #0e0d10;
    font: 12.5px/1.6 var(--mono);
    color: #c8c8ce;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 0;
  }

  .ln { display: block; }
  .ln.warn { color: var(--warning); }
  .ln.error { color: var(--negative); }
  .ln.echo { color: var(--accent); }
  .ln.out { color: #b6cdb1; }
  .ln.sys { color: var(--muted); }

  .cmdbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--rule);
  }

  .cmdbar .prompt { color: var(--accent); font-family: var(--mono); }

  .cmd-input {
    flex: 1;
    height: 32px;
    font-family: var(--mono);
    font-size: 12.5px;
    background: var(--ground);
  }

  .check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: var(--fs-small);
    white-space: nowrap;
  }

  .check input { accent-color: var(--accent); }

  .filter { width: 148px; height: 28px; font-size: var(--fs-small); }

  /* ---------- people / facts ---------- */

  .people li, .players li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rule);
    min-height: 44px;
  }

  .people li:last-child, .players li:last-child { border-bottom: 0; }

  .avatar {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--raised);
    color: #d6d6da;
    font: 600 11px/1 var(--mono);
  }

  .who { min-width: 0; }
  .who strong { display: block; font-weight: 500; font-size: var(--fs-body); }
  .who span { color: var(--muted); font-size: var(--fs-small); }

  .row-actions { margin-left: auto; display: flex; gap: 6px; }

  .empty {
    padding: 16px;
    color: var(--muted);
    font-size: var(--fs-body);
  }

  .facts { padding: 6px 0; }
  .facts > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 16px;
    font-size: var(--fs-body);
  }
  .facts dt { color: var(--muted); }
  .facts dd { text-align: right; font-variant-numeric: tabular-nums; }

  /* ---------- lists and tables ---------- */

  .list-card { overflow: hidden; }

  .crumb-path {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--mono);
    font-size: var(--fs-small);
    color: var(--muted);
    flex-wrap: wrap;
  }

  .crumb-path button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    font: inherit;
  }

  .crumb-path button:hover { color: var(--text); background: var(--raised); }
  .crumb-path .sep { color: #3a3a40; }

  .table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-body);
  }

  .table th {
    text-align: left;
    padding: 8px 16px;
    color: var(--muted);
    font-size: var(--fs-small);
    font-weight: 400;
    border-bottom: 1px solid var(--rule);
  }

  .table th.num, .table td.num { text-align: right; }

  .table td {
    padding: 0 16px;
    height: 42px;
    border-bottom: 1px solid var(--rule);
    font-variant-numeric: tabular-nums;
  }

  .table tr:last-child td { border-bottom: 0; }
  .table tbody tr:hover td { background: #17161a; }

  .file-name {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .file-name button {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
  }

  .file-name button:hover { color: var(--accent); }

  .glyph {
    width: 14px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
  }

  .is-off { color: var(--muted); text-decoration: line-through; }

  .num, .mono { font-variant-numeric: tabular-nums; }

  .foot-note {
    padding: 10px 16px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: var(--fs-small);
  }

  .banner {
    margin: 12px 16px 0;
    padding: 8px 10px;
    border: 1px solid #3a3320;
    background: #221e12;
    color: #e8d9a8;
    border-radius: 4px;
    font-size: var(--fs-small);
  }

  .mods li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rule);
    min-height: 48px;
  }

  .mods li:last-child { border-bottom: 0; }

  .mod-name { font-size: var(--fs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mod-sub { color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }

  .switch {
    position: relative;
    width: 34px;
    height: 18px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--ground);
    cursor: pointer;
  }

  .switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #55555c;
    transition: transform .14s ease, background .14s ease;
  }

  .switch.on { border-color: #3d5c36; }
  .switch.on::after { transform: translateX(16px); background: var(--accent); }
  .switch:disabled { opacity: .45; cursor: not-allowed; }

  /* ---------- editor ---------- */

  .editor {
    width: min(980px, calc(100vw - 48px));
    max-height: 86vh;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .editor::backdrop { background: rgba(0, 0, 0, .6); }

  .editor-head, .editor-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
  }

  .editor-head { border-bottom: 1px solid var(--rule); }
  .editor-head strong { font-size: var(--fs-body); font-weight: 500; }
  .editor-foot { border-top: 1px solid var(--rule); }

  .editor textarea {
    display: block;
    width: 100%;
    height: 58vh;
    padding: 14px 16px;
    background: #0e0d10;
    border: 0;
    border-radius: 0;
    color: #d4d4da;
    font: 12.5px/1.6 var(--mono);
    resize: vertical;
    outline: none;
  }

  .editor a.btn { text-decoration: none; display: inline-flex; align-items: center; }

  .title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  /* ---------- player workspace ---------- */

  .roster {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
  }

  .roster li { display: flex; }

  .player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #131217;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 210px;
  }

  .player-row:hover { border-color: #35343c; background: #17161a; }
  .player-row.is-active { border-color: var(--accent); background: #17161a; }

  .mini-hp {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 64px;
    flex: 0 0 auto;
  }
  .mini-hp-track { flex: 1; height: 3px; background: #2a2a30; border-radius: 1px; overflow: hidden; }
  .mini-hp-track i { display: block; height: 100%; background: #7ad17a; }
  .mini-hp b {
    font: 400 11px/1 var(--mono);
    color: var(--muted);
    width: 16px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .mini-hp.is-low b { color: var(--negative); }
  .mini-hp.is-low .mini-hp-track i { background: var(--negative); }

  .player-body { padding: 16px; display: flex; flex-direction: column; gap: 20px; }

  .vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .vital { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .vital-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .vital-label { color: var(--muted); font-size: var(--fs-small); }
  .vital-value { font-size: var(--fs-small); font-variant-numeric: tabular-nums; }

  .bar {
    height: 4px;
    background: #2a2a30;
    border-radius: 1px;
    overflow: hidden;
  }
  .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
  .vital.health .bar i { background: #7ad17a; }
  .vital.food .bar i { background: #d8b56a; }
  .vital.xp .bar i { background: #7ac6d1; }
  .bar i.is-low { background: var(--negative); }

  .detail-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    gap: 28px;
    align-items: start;
  }

  .detail-main, .detail-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

  .player-facts { padding: 0; }
  .player-facts > div { padding: 5px 0; border-bottom: 1px solid #1d1c21; }
  .player-facts > div:last-child { border-bottom: 0; }
  .player-facts .select { height: 26px; padding: 0 6px; font-size: var(--fs-small); }

  .inv-head { display: flex; align-items: baseline; gap: 10px; }
  .inv-head h3 { font-size: var(--fs-body); font-weight: 500; }

  .inv-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 4px;
  }

  .inv-slot {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #131217;
    color: #c9c9d0;
    font: 400 12px/1.2 var(--mono);
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .inv-slot.is-empty { background: #100f13; border-color: #222128; }
  .inv-slot.is-selected { border-color: var(--accent); }
  .inv-count {
    position: absolute;
    right: 2px;
    bottom: 0;
    padding: 0 2px;
    color: #fff;
    background: #0d0d10;
    border-radius: 2px;
    font-size: 11px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }

  .inv-extra { display: flex; flex-wrap: wrap; gap: 6px; }
  .inv-chip {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--muted);
    font-size: var(--fs-small);
  }

  .player-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .btn.danger { color: #e79a9a; border-color: #4a2a2a; }
  .btn.danger:hover { background: #2a1717; border-color: #6a3535; }

  .player-forms { display: flex; flex-direction: column; gap: 8px; }
  .mini-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .mini-label { color: var(--muted); font-size: var(--fs-small); width: 74px; flex: 0 0 auto; }
  .mini-form .input { height: 28px; font-size: var(--fs-small); flex: 1; min-width: 70px; }
  .mini-form .coord { flex: 0 0 68px; min-width: 0; }

  #playerDetailMeta.is-error { color: var(--negative); }

  /* ---------- settings ---------- */

  .settings { padding: 4px 0 8px; }

  .settings-group { padding: 14px 16px 6px; border-bottom: 1px solid var(--rule); }
  .settings-group:last-child { border-bottom: 0; }

  .settings-head h3 { font-size: var(--fs-body); font-weight: 500; }
  .settings-head .note { color: var(--muted); font-size: var(--fs-small); margin-top: 2px; }

  .settings-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
    margin-top: 10px;
  }

  .setting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #1d1c21;
    min-height: 40px;
  }

  .setting-name { font-size: var(--fs-body); }
  .setting-control { display: flex; justify-content: flex-end; }
  .setting-control .input { width: 100%; height: 28px; font-size: var(--fs-small); }
  .setting-help { grid-column: 1 / -1; color: var(--muted); font-size: 11px; margin-top: -4px; }

  .toggle {
    appearance: none;
    width: 34px;
    height: 18px;
    border-radius: 9px;
    background: #2a2a30;
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
  }
  .toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b8b93;
    transition: transform .15s ease, background .15s ease;
  }
  .toggle:checked { background: color-mix(in srgb, var(--accent) 28%, #2a2a30); border-color: color-mix(in srgb, var(--accent) 55%, #2a2a30); }
  .toggle:checked::after { transform: translateX(16px); background: var(--accent); }

  .banner { display: flex; align-items: center; gap: 10px; }
  .banner .spacer { flex: 1; }
}

/* ---------- phone ---------- */

@layer responsive {
  @media (max-width: 1080px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .summary { grid-template-columns: repeat(2, 1fr); }
    .summary .cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
    .summary .cell:nth-child(4) { border-top: 1px solid var(--rule); }
  }

  @media (max-width: 720px) {
    .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 52px; }
    .canvas {
      grid-row: 1;
      padding: 18px 16px;
      gap: 16px;
    }
    .rail {
      grid-row: 2;
      flex-direction: row;
      justify-content: space-around;
      gap: 0;
      border-right: 0;
      border-top: 1px solid var(--border);
      padding: 0 8px;
    }
    .rail-mark { display: none; }
    .rail-nav { flex-direction: row; justify-content: space-around; }
    .rail-item { width: 44px; height: 44px; }
    .rail-item.is-active::after {
      right: 10px;
      left: 10px;
      top: auto;
      bottom: 2px;
      width: auto;
      height: 1px;
    }
    .rail-exit { margin-top: 0; }
    .titlebar { flex-direction: column; gap: 14px; }
    .title-actions { margin-left: 0; width: 100%; }
    .title-actions .btn-primary { flex: 1; }
    .titlebar h1 { font-size: 22px; }
    .summary { grid-template-columns: 1fr 1fr; }
    .card-head { flex-wrap: wrap; }
    .head-tools { margin-left: 0; width: 100%; }
    .filter { flex: 1; width: auto; }
    .console { max-height: none; min-height: 220px; }
    .table th:nth-child(3), .table td:nth-child(3) { display: none; }
    .editor textarea { height: 46vh; }
    .vitals { grid-template-columns: 1fr 1fr; gap: 12px; }
    .detail-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .player-row { min-width: 0; flex: 1; }
    .inv-grid { gap: 3px; }
    .inv-slot { font-size: 11px; }
    .settings-fields { grid-template-columns: minmax(0, 1fr); }
    .setting { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .player-body { padding: 14px; gap: 14px; }
  }
}
