/* Styles of the gabrielepunk_77 panel: light theme by default, grayscale dark theme
   (automatic from the system, or forced with <html data-theme="light|dark">). */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #8b8b94;
  --primary: #18181b;
  --primary-hover: #2e2e33;
  --on-primary: #fafafa;
  --ring: rgba(24, 24, 27, .14);
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px -14px rgba(0, 0, 0, .16);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .3);
  --console-bg: #111113;
  --console-text: #e4e4e7;
  --console-dim: #8b8b94;
  --radius: 14px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --surface: #121212;
    --surface-2: #191919;
    --surface-3: #232323;
    --border: #242424;
    --border-strong: #333333;
    --text: #ededed;
    --text-2: #a1a1a1;
    --text-3: #6b6b6b;
    --primary: #ededed;
    --primary-hover: #ffffff;
    --on-primary: #0a0a0a;
    --ring: rgba(237, 237, 237, .16);
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --blue: #60a5fa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .8);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .9);
    --console-bg: #070707;
    --console-text: #d4d4d4;
    --console-dim: #6b6b6b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #191919;
  --surface-3: #232323;
  --border: #242424;
  --border-strong: #333333;
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #6b6b6b;
  --primary: #ededed;
  --primary-hover: #ffffff;
  --on-primary: #0a0a0a;
  --ring: rgba(237, 237, 237, .16);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #60a5fa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .8);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .9);
  --console-bg: #070707;
  --console-text: #d4d4d4;
  --console-dim: #6b6b6b;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ring); }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; row-gap: 6px; }
.stack { display: grid; gap: 6px; align-content: center; } /* title line + text line under it */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

svg.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 15px !important; height: 15px !important; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-weight: 500; white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s, opacity .15s, transform .15s var(--spring);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:focus-visible, .input:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--ring);
}
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: color-mix(in srgb, var(--red) 9%, var(--surface)); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.btn-solid-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-solid-danger:hover { background: color-mix(in srgb, var(--red) 85%, #000); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--text-3) var(--text-3) var(--text-3) transparent;
  animation: spin .7s linear infinite;
}
.btn-primary.loading::after { border-color: var(--on-primary) var(--on-primary) var(--on-primary) transparent; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }

/* ------------------------------------------------------------------ form controls */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--text-3); }
input[type="number"].input { appearance: textfield; -moz-appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button, input[type="number"].input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
select.input { padding-right: 32px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 36px; }
.input-icon > .icon-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }

.switch { position: relative; display: inline-flex; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3);
  border: 1px solid var(--border-strong); transition: background .2s, border-color .2s;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--spring), background .2s;
}
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--on-primary); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.switch input:disabled + span { opacity: .4; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px; }
.check > input[type="checkbox"] {
  appearance: none; position: relative; flex: none; width: 18px; height: 18px; margin: 0; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface);
  transition: background .15s, border-color .15s;
}
.check > input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.check > input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px;
  border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check > input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.check > input[type="checkbox"]:disabled { cursor: default; opacity: .5; }
.check:has(> input:disabled) { cursor: default; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 500;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ cards, badges, bars */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h2 { flex: 1; }
.card-body { padding: 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge .icon { width: 12px; height: 12px; }
.badge.green { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.badge.amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.badge.red { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.badge.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.badge.solid { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--text); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.bar.warn > span { background: var(--amber); }
.bar.danger > span { background: var(--red); }

.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 13px;
}
.notice .icon { margin-top: 1px; }
.notice.amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.notice.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 13px;
  text-transform: uppercase; user-select: none; box-shadow: inset 0 0 0 1px var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.square { border-radius: 8px; image-rendering: pixelated; }
.avatar.xl { width: 96px; height: 96px; font-size: 34px; }

.empty { display: grid; place-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty .icon { width: 32px; height: 32px; stroke-width: 1.5; }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* ------------------------------------------------------------------ status */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: currentColor; opacity: 0; }
[data-state="online"] .dot { background: var(--green); color: var(--green); }
[data-state="starting"] .dot, [data-state="stopping"] .dot { background: var(--amber); color: var(--amber); }
[data-state="offline"] .dot { background: var(--red); color: var(--red); }
[data-state="online"] .dot::after, [data-state="starting"] .dot::after, [data-state="stopping"] .dot::after { animation: pulse 2s ease-out infinite; }
.status-pill { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ app layout */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px; border-right: 1px solid var(--border); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--border); }
.brand strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 12px; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-label { padding: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px;
  color: var(--text-2); text-decoration: none; font-weight: 500; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.nav-item.active .icon { color: var(--text); }
.me {
  display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 6px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2);
}
.me .who { flex: 1; min-width: 0; }
.me .who strong { display: block; font-size: 13px; }
.me .who small { display: block; font-size: 12px; color: var(--text-3); }
.me a { text-decoration: none; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  height: 64px; padding: 0 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px);
}
.topbar h1 { font-size: 17px; flex: 1; }
.menu-btn { display: none; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px; display: grid; gap: 20px; align-content: start; }
.page > div:empty { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head > .grow { flex: 1 1 260px; }
.page-head > .input-icon, .row > .input-icon { width: 260px; }
.page-head .grow p { color: var(--text-2); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ dashboard */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; padding: 24px; flex-wrap: wrap; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(600px 200px at 0% 0%, var(--surface-2), transparent 70%);
}
.hero > * { position: relative; }
.hero-icon { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-title h2 { font-size: 20px; }
.motd { margin-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: pre-wrap; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat { padding: 18px 20px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-left: 4px; }
.stat-sub { font-size: 12px; color: var(--text-3); }
.spark { width: 100%; height: 38px; margin-top: 6px; display: block; overflow: visible; }
.spark path.line { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark path.area { fill: var(--text); opacity: .07; stroke: none; }
.spark path.guide { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }

.resource { display: grid; gap: 8px; }
.resource + .resource { margin-top: 18px; }
.resource-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.resource-head span:first-of-type { flex: 1; color: var(--text-2); font-weight: 500; }
.resource-head b { font-weight: 600; font-variant-numeric: tabular-nums; }

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.player-tile {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.player-tile .avatar { width: 40px; height: 40px; border-radius: 8px; box-shadow: 0 0 0 1px var(--border-strong); }
.player-tile .stack { gap: 2px; min-width: 0; }
.player-tile strong { font-size: 14px; font-weight: 600; }
.player-tile small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.player-tile .dot { width: 6px; height: 6px; background: var(--green); }
button.player-tile { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.player-tile.clickable {
  transition: border-color .2s, background .2s, transform .25s var(--spring), box-shadow .25s;
}
.player-tile.clickable:hover { border-color: var(--border-strong); background: var(--surface-3); transform: translateY(-2px); box-shadow: var(--shadow); }
.player-tile.clickable:active { transform: scale(.98); }
.player-tile.clickable:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.player-tile.loading { opacity: .6; cursor: progress; }
.tile-arrow { margin-left: auto; color: var(--text-3); transition: transform .25s var(--spring), color .2s; }
.player-tile.clickable:hover .tile-arrow { transform: translateX(3px); color: var(--text); }
.player-tile .stack { flex: 1; }
.empty.compact { padding: 22px 12px; gap: 8px; font-size: 13px; }
.empty.compact .icon { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ console */
.console-card { display: flex; flex-direction: column; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 420px; overflow: hidden; }
.console {
  flex: 1; overflow: auto; padding: 14px 16px; margin: 0;
  background: var(--console-bg); color: var(--console-text);
  font: 12.5px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word;
}
.console .line { display: block; }
.console .ts { color: var(--console-dim); }
.console .warn { color: #fbbf24; }
.console .error { color: #f87171; }
.console .sent { color: #a5b4fc; }
.console-input { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--console-bg); border-top: 1px solid #222; }
.console-input .prompt { color: var(--console-dim); font-family: var(--mono); padding-left: 8px; }
.console-input input {
  flex: 1; height: 36px; border: 0; outline: 0; background: transparent; color: var(--console-text); font: 13px var(--mono);
}
.console-input input::placeholder { color: #555; }
.console-input .btn { background: #1d1d1f; border-color: #2c2c2e; color: #e4e4e7; box-shadow: none; }
.console-input .btn:hover { background: #2a2a2d; }
.console-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------------ tables and lists */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table td:first-child { width: 100%; max-width: 0; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.table .clickable { cursor: pointer; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-cell .icon { color: var(--text-3); }
.name-cell.dir .icon { color: var(--text); }

.breadcrumb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 13.5px; }
.breadcrumb button { border: 0; background: none; padding: 4px 8px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.breadcrumb button:hover { background: var(--surface-2); color: var(--text); }
.breadcrumb button:last-child { color: var(--text); }
.breadcrumb .icon { width: 14px; height: 14px; color: var(--text-3); }

.dropzone { position: relative; }
.dropzone.dragging::after {
  content: attr(data-label); position: absolute; inset: 8px; display: grid; place-items: center; z-index: 5;
  border: 2px dashed var(--text-3); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 88%, transparent);
  font-weight: 600; color: var(--text-2);
}

/* ------------------------------------------------------------------ plugins, users */
.plugin { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.plugin-head { display: flex; align-items: flex-start; gap: 12px; }
.plugin-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.plugin-desc { color: var(--text-2); font-size: 13px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plugin-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.plugin.disabled .plugin-head, .plugin.disabled .plugin-desc { opacity: .5; }

.user-card { display: grid; gap: 16px; padding: 18px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; }

.prop-row { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.prop-row:last-child { border-bottom: 0; }
.prop-key { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
.prop-row .input { width: min(340px, 50%); height: 34px; }
.prop-row.changed .prop-key::after { content: " •"; color: var(--amber); }
.save-bar {
  position: sticky; bottom: 20px; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px;
  border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  box-shadow: var(--shadow-lg); animation: rise .2s ease-out;
}
.save-bar > .icon { color: var(--amber); }
.save-bar .btn { box-shadow: none; }

.log-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.log-list { max-height: calc(100vh - 180px); overflow-y: auto; padding: 6px; }
.log-item { display: grid; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; }
.log-item:hover { background: var(--surface-2); }
.log-item.active { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.log-item strong { font-size: 13px; font-weight: 500; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-item small { color: var(--text-3); font-size: 12px; }
.log-view { height: calc(100vh - 180px); min-height: 360px; border-radius: var(--radius); }

.timeline { display: grid; }
.event { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.event:last-child { border-bottom: 0; }
.event .when { width: 150px; flex: none; color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.event .what { flex: 1; min-width: 0; }
.event .what b { font-weight: 600; }
.event .detail { color: var(--text-3); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-avatar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ player sheet (inventory like in the game) */
.player-sheet { display: grid; gap: 18px; color: var(--text); --slot: 44px; }
.sheet-head { display: flex; align-items: center; gap: 14px; }
.sheet-avatar { width: 56px !important; height: 56px !important; border-radius: 12px !important; }
.stat-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.stat-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.loc-card { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.loc-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.loc-head .icon-btn { margin: -6px -6px -6px 0; }
.loc-coords { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.inv-section { display: grid; gap: 10px; }
.inv-section h3 { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.inventory { display: flex; flex-wrap: wrap; gap: 14px; }
.equipment { display: grid; grid-template-columns: var(--slot); gap: 4px; align-content: start; }
.equipment .offhand { margin-top: 8px; }
.inv-main { display: grid; gap: 10px; align-content: start; }
.slot-grid { display: grid; grid-template-columns: repeat(9, var(--slot)); gap: 4px; }
.slot {
  position: relative; display: grid; place-items: center; width: var(--slot); height: var(--slot);
  border-radius: 6px; background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
  outline: none; transition: background .12s;
}
.slot[tabindex]:hover, .slot[tabindex]:focus-visible { background: var(--border-strong); }
.slot.selected { box-shadow: inset 0 0 0 2px var(--text-2); }
.slot.armor:empty::before, .slot.offhand:empty::before { content: ""; width: 40%; height: 40%; border-radius: 4px; border: 2px dashed var(--border-strong); }
.slot-icon { position: relative; width: 76%; height: 76%; }
.slot-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; image-rendering: pixelated; }
.slot-icon.foliage img:first-child { filter: sepia(1) saturate(3.2) hue-rotate(50deg) brightness(.82); }
.slot-head { width: 70% !important; height: 70% !important; border-radius: 3px !important; box-shadow: none !important; }
.slot-svg { width: 62% !important; height: 62% !important; color: var(--text-2); stroke-width: 1.8; }
.slot-fallback { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; }
.slot-count {
  position: absolute; right: 3px; bottom: 1px; font: 700 12px/1 var(--mono); color: #fff;
  text-shadow: 1px 1px 0 #3f3f3f, -1px 0 0 rgba(0, 0, 0, .4); pointer-events: none;
}
.slot-durability { position: absolute; left: 12%; right: 12%; bottom: 3px; height: 3px; background: #000; border-radius: 1px; pointer-events: none; }
.slot-durability > span { display: block; height: 100%; border-radius: 1px; }
.slot.glint .slot-icon::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; border-radius: 2px;
  background: linear-gradient(115deg, transparent 30%, rgba(168, 85, 247, .55) 45%, transparent 60%) 0 0 / 250% 250%;
  animation: glint 3s linear infinite;
}
.item-tip {
  position: fixed; z-index: 300; display: grid; gap: 2px; max-width: 280px; padding: 8px 10px; pointer-events: none;
  border-radius: 8px; background: #160b22f2; border: 2px solid #2b0f5c; color: #f4f4f5; font-size: 13px; box-shadow: var(--shadow-lg);
}
.item-tip .custom { font-style: italic; color: #7dd3fc; }
.item-tip .ench { color: #c4b5fd; }
.item-tip .faint { color: #a1a1aa; }
.item-tip .tip-title { margin-top: 4px; color: #d4d4d8; font-weight: 600; }
.item-tip .tip-id { margin-top: 2px; color: #71717a; font: 11px var(--mono); }
.modal.large { width: min(920px, 100%); }
@keyframes glint { to { background-position: -250% -250%; } }

/* ------------------------------------------------------------------ overlays */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); animation: fade .15s ease-out;
}
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.wide { width: min(1100px, 100%); height: calc(100vh - 32px); height: calc(100dvh - 32px); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.modal-head h2 { flex: 1; font-size: 16px; }
.modal-body { padding: 14px 20px 4px; display: grid; gap: 14px; overflow: auto; color: var(--text-2); }
.modal.wide .modal-body { flex: 1; padding-bottom: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; }
.editor {
  width: 100%; height: 100%; min-height: 300px; resize: none; border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  background: var(--console-bg); color: var(--console-text); font: 12.5px/1.6 var(--mono); tab-size: 4; outline: none;
}

.dropdown { position: relative; }
.menu {
  position: fixed; z-index: 150; min-width: 200px; padding: 5px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: pop .12s ease-out;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--text);
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--red); }
.menu button.active::after { content: "✓"; margin-left: auto; color: var(--text-2); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: slide .25s cubic-bezier(.2, .9, .3, 1.1);
}
.toast .icon { margin-top: 1px; }
.toast.success .icon { color: var(--green); }
.toast.error .icon { color: var(--red); }
.toast p { flex: 1; word-break: break-word; }
.toast small { display: block; color: var(--text-3); font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; margin-top: 2px; }
.toast { cursor: pointer; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .2s; }

/* ------------------------------------------------------------------ login */
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login-body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 50% -10%, var(--surface-3), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  opacity: .7;
}
.login-corner { position: fixed; top: 16px; right: 16px; display: flex; gap: 6px; }
.login-card { width: min(400px, 100%); padding: 32px; border-radius: 20px; box-shadow: var(--shadow); animation: rise .35s ease-out; }
.login-logo { display: grid; justify-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.login-logo img { width: 64px; height: 64px; border-radius: 16px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.login-logo h1 { font-size: 21px; }
.login-logo p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.login-form { display: grid; gap: 14px; }
.form-error { min-height: 0; color: var(--red); font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.form-error:empty { display: none; }
.login-foot { margin-top: 22px; text-align: center; color: var(--text-3); font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength span { height: 4px; border-radius: 99px; background: var(--surface-3); transition: background .2s; }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] span:nth-child(-n+2) { background: var(--amber); }
.strength[data-score="3"] span:nth-child(-n+3) { background: var(--green); }
.strength[data-score="4"] span { background: var(--green); }

/* ------------------------------------------------------------------ Minecraft text colors (MOTD) */
.mc-0 { color: #000; } .mc-1 { color: #0000aa; } .mc-2 { color: #00aa00; } .mc-3 { color: #00aaaa; }
.mc-4 { color: #aa0000; } .mc-5 { color: #aa00aa; } .mc-6 { color: #ffaa00; } .mc-7 { color: #aaaaaa; }
.mc-8 { color: #555; } .mc-9 { color: #5555ff; } .mc-a { color: #55ff55; } .mc-b { color: #29b6c6; }
.mc-c { color: #ff5555; } .mc-d { color: #ff55ff; } .mc-e { color: #d9a400; } .mc-f { color: var(--text); }
.mc-l { font-weight: 700; } .mc-o { font-style: italic; } .mc-n { text-decoration: underline; } .mc-m { text-decoration: line-through; }
.mc-k { filter: blur(2.5px); }

/* ------------------------------------------------------------------ motion (subtle; off with "reduce motion") */
/* Page sections, and data replacing a loading placeholder (see clear() in core.js), come in one after another.
   "backwards": the animation does not keep overriding the element (hover effects) once it has ended. */
.page > *, .reveal, .reveal > .grid > *, .reveal.grid > *, .reveal tbody > tr { animation: rise .4s var(--ease-out) backwards; }
.page > :nth-child(2), .reveal:nth-child(2), .reveal > .grid > :nth-child(2), .reveal.grid > :nth-child(2), .reveal tbody > tr:nth-child(2) { animation-delay: 35ms; }
.page > :nth-child(3), .reveal:nth-child(3), .reveal > .grid > :nth-child(3), .reveal.grid > :nth-child(3), .reveal tbody > tr:nth-child(3) { animation-delay: 70ms; }
.page > :nth-child(4), .reveal:nth-child(4), .reveal > .grid > :nth-child(4), .reveal.grid > :nth-child(4), .reveal tbody > tr:nth-child(4) { animation-delay: 105ms; }
.page > :nth-child(5), .reveal:nth-child(5), .reveal > .grid > :nth-child(5), .reveal.grid > :nth-child(5), .reveal tbody > tr:nth-child(5) { animation-delay: 140ms; }
.page > :nth-child(6), .reveal:nth-child(6), .reveal > .grid > :nth-child(6), .reveal.grid > :nth-child(6), .reveal tbody > tr:nth-child(6) { animation-delay: 175ms; }
.page > :nth-child(7), .reveal:nth-child(7), .reveal > .grid > :nth-child(7), .reveal.grid > :nth-child(7), .reveal tbody > tr:nth-child(7) { animation-delay: 210ms; }
.page > :nth-child(8), .reveal:nth-child(8), .reveal > .grid > :nth-child(8), .reveal.grid > :nth-child(8), .reveal tbody > tr:nth-child(8) { animation-delay: 245ms; }
.page > :nth-child(9), .reveal:nth-child(9), .reveal > .grid > :nth-child(9), .reveal.grid > :nth-child(9), .reveal tbody > tr:nth-child(9) { animation-delay: 280ms; }
.page > :nth-child(10), .reveal:nth-child(10), .reveal > .grid > :nth-child(10), .reveal.grid > :nth-child(10), .reveal tbody > tr:nth-child(10) { animation-delay: 315ms; }
.page > :nth-child(11), .reveal:nth-child(11), .reveal > .grid > :nth-child(11), .reveal.grid > :nth-child(11), .reveal tbody > tr:nth-child(11) { animation-delay: 350ms; }
.page > :nth-child(12), .reveal:nth-child(12), .reveal > .grid > :nth-child(12), .reveal.grid > :nth-child(12), .reveal tbody > tr:nth-child(12) { animation-delay: 385ms; }
.page > :nth-child(n+13), .reveal tbody > tr:nth-child(n+13) { animation-delay: 420ms; }
.notice, .player-tile { animation: rise .3s var(--ease-out) backwards; }
.login-form:not([hidden]) { animation: rise .35s var(--ease-out) backwards; }
.login-logo img { animation: pop .5s var(--spring) backwards; }
.console .line.new { animation: line-in .35s var(--ease-out); }
.item-tip { animation: pop .12s ease-out; }
.menu { transform-origin: top right; }
.app.nav-open::after { animation: fade .2s ease-out; }
.modal-backdrop.closing { animation: fade-out .16s ease forwards; pointer-events: none; }
.modal-backdrop.closing .modal { animation: pop-out .16s ease forwards; }

/* Small feedback on things you touch. */
.icon-btn { transition: background .15s, color .15s, transform .2s var(--spring); }
.icon-btn:active { transform: scale(.9); }
.nav-item { position: relative; }
.nav-item::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--text); transform: scaleY(0); transition: transform .3s var(--spring);
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item .icon { transition: transform .25s var(--spring); }
.nav-item:hover .icon { transform: scale(1.1); }
.check > input[type="checkbox"]:checked::after { animation: check-pop .25s var(--spring); }
.stat, .plugin, .user-card, .loc-card { transition: border-color .25s; }
.stat:hover, .plugin:hover, .user-card:hover { border-color: var(--border-strong); }
.slot { transition: background .12s, transform .2s var(--spring); }
.slot[tabindex]:hover { transform: translateY(-2px); }
.hero-icon { transition: transform .4s var(--spring); }
.hero:hover .hero-icon { transform: rotate(-4deg) scale(1.05); }
.dot, .badge, .status-pill { transition: background-color .3s, color .3s, border-color .3s; }
.sheet-skeleton { height: 64px; }
.sheet-skeleton:last-child { height: 180px; }

/* Theme switch: colors cross-fade for a moment (class set by setTheme in core.js). */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, box-shadow .35s ease !important;
}

/* ------------------------------------------------------------------ animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes slide { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.97); } }
@keyframes line-in { from { opacity: 0; transform: translateX(-4px); } }
@keyframes check-pop { from { transform: rotate(45deg) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 270px;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .4); }
  .sidebar { height: 100vh; height: 100dvh; }
  .menu-btn { display: inline-grid; margin-left: -6px; }
  .topbar { padding: 0 16px; gap: 6px; }
  .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 20px 16px; gap: 16px; }
  .input, .console-input input, .editor { font-size: 16px; } /* smaller text makes iOS zoom in on focus */
  .icon-btn.sm { width: 34px; height: 34px; }
  .card-header, .card-body, .card-pad { padding: 16px; }
  .table th, .table td { padding: 10px 12px; }
  .page-head > .input-icon, .row > .input-icon { width: 100%; }
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented button { flex: none; }
  .hero { padding: 18px; gap: 16px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .console-card { height: calc(100vh - 104px); height: calc(100dvh - 104px); min-height: 360px; }
  .log-view { height: 65vh; height: 65dvh; min-height: 300px; }
  .prop-row { padding: 10px 16px; }
  .save-bar { bottom: 12px; padding: 10px 10px 10px 14px; gap: 8px; }
  .save-bar > .icon { display: none; }
  .toasts { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .modal-head { padding: 16px 16px 0; }
  .player-sheet { --slot: min(44px, calc((100vw - 96px) / 9)); }  /* 9 slots fit the dialog width */
  .inventory { flex-direction: column; }
  .equipment { grid-template-columns: repeat(5, var(--slot)); }
  .equipment .offhand { margin: 0 0 0 8px; }
  .modal-body { padding: 12px 16px 4px; }
  .modal-foot { padding: 14px 16px 16px; }
  .grid-2, .log-layout { grid-template-columns: minmax(0, 1fr); }
  .log-list { max-height: 260px; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .prop-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .prop-row .input { width: 100%; }
  .prop-row:has(> .switch) { flex-direction: row; align-items: center; } /* switches stay on the right */
  .login-corner { top: 10px; right: 10px; }
  .hero-icon { width: 52px; height: 52px; }
  .event { flex-wrap: wrap; }
  .event .when { width: auto; }
  .login-card { padding: 24px; }
  .status-pill .label { display: none; }
}
