/* Hearthlight: gold leaf on soot, from the Dragonwilds emblem. The light theme
   ("Vellum") uses the same family in ink. The previous style is in backup/classic/. */

:root {
  --bg: #16110e;
  --surface: #1f1915;
  --raised: #2a221d;
  --raised-2: #342a24;
  --seam: #3b3029;
  --seam-soft: #2c241f;
  --text: #efe4d0;
  --muted: #b5a690;
  --faint: #8a7c6a;
  --gold: #d8a955;
  --gold-bright: #ebc275;
  --gold-ink: #22180b;
  --gold-wash: rgba(216, 169, 85, 0.13);
  --ember: #e5673f;
  --ember-wash: rgba(229, 103, 63, 0.14);
  --moss: #9dc27c;
  --moss-wash: rgba(157, 194, 124, 0.13);
  --frost: #8fb4d8;
  --frost-wash: rgba(143, 180, 216, 0.12);
  --amber: #e2b04a;
  --amber-wash: rgba(226, 176, 74, 0.13);
  --glow-ok: rgba(216, 150, 64, 0.55);
  --glow-busy: rgba(226, 176, 74, 0.4);
  --glow-err: rgba(214, 64, 34, 0.6);
  --log-bg: #100c0a;
  --log-text: #d9cdb8;
  --overlay: rgba(10, 7, 5, 0.66);
  --lift: 0 18px 48px rgba(0, 0, 0, 0.5);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* theme.js sets data-theme from the saved choice or the system setting. */
:root[data-theme="light"] {
  --bg: #efe7da;
  --surface: #f8f3ea;
  --raised: #ebe2d3;
  --raised-2: #e2d7c5;
  --seam: #d6c8b2;
  --seam-soft: #e3d8c7;
  --text: #2b2119;
  --muted: #6b5a48;
  --faint: #948371;
  --gold: #94661a;
  --gold-bright: #7d5410;
  --gold-ink: #fff8ec;
  --gold-wash: rgba(148, 102, 26, 0.12);
  --ember: #b23c22;
  --ember-wash: rgba(178, 60, 34, 0.1);
  --moss: #4f7a2e;
  --moss-wash: rgba(79, 122, 46, 0.12);
  --frost: #2f5f8f;
  --frost-wash: rgba(47, 95, 143, 0.1);
  --amber: #8f620f;
  --amber-wash: rgba(176, 124, 20, 0.12);
  --glow-ok: rgba(201, 140, 50, 0.45);
  --glow-busy: rgba(201, 150, 50, 0.35);
  --glow-err: rgba(190, 60, 30, 0.45);
  --log-bg: #1b1511;
  --log-text: #e4d9c6;
  --overlay: rgba(43, 33, 25, 0.45);
  --lift: 0 18px 44px rgba(60, 40, 20, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--serif); font-weight: 600; }
h2 { font-size: 18px; display: flex; align-items: baseline; gap: 10px; }
p { margin: 0; }
a { color: var(--gold); }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }

/* ---------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 16px;
  border: 1px solid var(--seam); border-radius: 7px;
  background: var(--raised); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--raised-2); border-color: var(--faint); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, .tabs button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover:not(:disabled) { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn.primary:disabled { background: var(--raised); border-color: var(--seam); color: var(--muted); }
.btn.danger { background: transparent; color: var(--ember); border-color: color-mix(in srgb, var(--ember) 45%, var(--seam)); }
.btn.danger:hover:not(:disabled) { background: var(--ember-wash); border-color: var(--ember); }
.btn.danger.solid { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn.danger.solid:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--raised); color: var(--text); border-color: transparent; }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 13px; }
.btn.block { width: 100%; }
.theme-toggle svg { width: 15px; height: 15px; }

input[type="text"], input[type="password"], input[type="search"], input:not([type]), textarea {
  width: 100%; min-height: 40px; padding: 8px 11px;
  border: 1px solid var(--seam); border-radius: 7px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 14px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }
input[readonly] { color: var(--muted); background: var(--raised); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }

/* ---------- login */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse 60% 45% at 50% 38%, var(--ember-wash), transparent 70%), var(--bg);
}
.login-card {
  width: 100%; max-width: 370px; display: grid; gap: 16px; justify-items: stretch;
  background: var(--surface); border: 1px solid var(--seam); border-radius: 14px;
  padding: 32px 26px 26px; box-shadow: var(--lift);
}
.login-card h1 { font-size: 26px; text-align: center; }
.login-card #login-intro { text-align: center; }
.login-mark {
  justify-self: center; width: 64px; height: 64px; border-radius: 14px;
  box-shadow: 0 0 0 1px var(--seam), 0 0 34px var(--glow-ok);
}
.login-card code { color: var(--text); overflow-wrap: anywhere; }
.login-theme { position: fixed; top: 12px; right: 12px; }
.form-error { color: var(--ember); font-size: 14px; min-height: 1.5em; text-align: center; }

/* ---------- frame */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--seam-soft);
}
.topbar-inner, .tabs, .wrap { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.topbar-inner { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { border-radius: 8px; flex: none; box-shadow: 0 0 0 1px var(--seam); }
.brand-text { min-width: 0; }
.brand-title { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 12px 11px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }

.wrap { padding-top: 22px; padding-bottom: 56px; }
main { display: block; }
.tab { display: grid; gap: 18px; }

/* Panels are quiet: a seam and a surface, no shadow. The hero is the only lit thing. */
.card {
  background: var(--surface); border: 1px solid var(--seam-soft); border-radius: 12px;
  padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.spaced { margin-top: 2px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.count {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted);
  min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--raised); text-align: center;
}

/* ---------- status pill & ping */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
[data-tone="ok"] .dot { background: var(--moss); }
[data-tone="busy"] .dot { background: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
[data-tone="err"] .dot { background: var(--ember); }
@keyframes pulse { 50% { opacity: 0.3; } }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--raised); color: var(--muted); white-space: nowrap;
}
.pill[data-tone="ok"] { color: var(--moss); background: var(--moss-wash); }
.pill[data-tone="busy"] { color: var(--amber); background: var(--amber-wash); }
.pill[data-tone="err"] { color: var(--ember); background: var(--ember-wash); }
.ping { font-weight: 500; cursor: help; }

/* ---------- hero: the beacon */
.hero {
  position: relative; overflow: hidden; gap: 22px; padding: 24px;
  border-color: var(--seam);
  background:
    radial-gradient(ellipse 340px 220px at 70px 70px, var(--hero-wash, transparent), transparent 75%),
    var(--surface);
}
.hero[data-tone="ok"] { --hero-wash: var(--gold-wash); --beacon: var(--glow-ok); }
.hero[data-tone="busy"] { --hero-wash: var(--amber-wash); --beacon: var(--glow-busy); }
.hero[data-tone="err"] { --hero-wash: var(--ember-wash); --beacon: var(--glow-err); }
.hero-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.beacon {
  width: 72px; height: 72px; flex: none; border-radius: 16px;
  box-shadow: 0 0 0 1px var(--seam);
  transition: box-shadow 0.6s, filter 0.6s;
  filter: grayscale(0.85) brightness(0.7);
}
.beacon img { width: 100%; height: 100%; border-radius: 16px; display: block; }
.hero[data-tone="ok"] .beacon,
.hero[data-tone="busy"] .beacon,
.hero[data-tone="err"] .beacon { filter: none; box-shadow: 0 0 0 1px var(--seam), 0 0 30px 2px var(--beacon); }
.hero[data-tone="ok"] .beacon { animation: hearth 4.5s ease-in-out infinite; }
.hero[data-tone="err"] .beacon { filter: hue-rotate(-18deg) saturate(1.4); }
@keyframes hearth {
  0%, 100% { box-shadow: 0 0 0 1px var(--seam), 0 0 26px 0 var(--beacon); }
  50% { box-shadow: 0 0 0 1px var(--seam), 0 0 40px 6px var(--beacon); }
}
.hero-title { flex: 1 1 260px; min-width: 0; }
.hero-state { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.hero[data-tone="ok"] .hero-state { color: var(--gold-bright); }
.hero[data-tone="busy"] .hero-state { color: var(--amber); }
.hero[data-tone="err"] .hero-state { color: var(--ember); }
.hero-text { color: var(--muted); margin-top: 6px; max-width: 58ch; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.hero-actions .btn { min-width: 92px; }

/* Facts read as one ruled line, not four boxes. */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--seam-soft); }
.facts > div { padding: 14px 16px 2px; min-width: 0; border-left: 1px solid var(--seam-soft); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-family: var(--serif); font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.card:not(.hero) .facts { border-top: 0; }
.card:not(.hero) .facts > div { padding-top: 4px; }

/* ---------- lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--seam-soft); min-width: 0; }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li.empty { color: var(--muted); }
.player-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--moss); flex: none; box-shadow: 0 0 0 3px var(--moss-wash); }
.activity li { align-items: flex-start; }
.act-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--seam); margin-top: 8px; flex: none; }
.activity li.failed .act-mark { background: var(--ember); }
.act-main { overflow-wrap: anywhere; font-weight: 600; }
.act-detail { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.act-time { color: var(--faint); font-size: 13px; white-space: nowrap; padding-top: 1px; text-align: right; }

/* ---------- meters */
.meters { display: grid; gap: 14px; }
.meter-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.meter-track { height: 6px; background: var(--raised-2); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.5s; }
.meter-fill[data-level="mid"] { background: var(--amber); }
.meter-fill[data-level="high"] { background: var(--ember); }

/* ---------- job banner */
.job {
  margin-bottom: 18px; border: 1px solid var(--seam); border-left: 3px solid var(--amber);
  background: var(--surface); border-radius: 10px; padding: 11px 14px;
}
.job[data-state="ok"] { border-left-color: var(--moss); }
.job[data-state="failed"] { border-left-color: var(--ember); }
.job-row { display: flex; align-items: center; gap: 12px; }
.job-icon { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid var(--amber); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.job[data-state="ok"] .job-icon { animation: none; border: 0; background: var(--moss); }
.job[data-state="failed"] .job-icon { animation: none; border: 0; background: var(--ember); }
@keyframes spin { to { transform: rotate(360deg); } }
.job-text { flex: 1; min-width: 0; }
.job-title { font-weight: 600; font-size: 14.5px; }
.job-msg { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.job[data-state="failed"] .job-msg { color: var(--ember); }
.job-output {
  margin: 10px 0 0; max-height: 280px; overflow: auto; background: var(--log-bg); color: var(--log-text);
  border-radius: 8px; padding: 10px 12px; font: 12px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- logs */
.log-card { gap: 12px; }
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toolbar input[type="search"] { flex: 1 1 220px; width: auto; }
.log {
  height: min(66vh, 720px); overflow: auto; background: var(--log-bg); color: var(--log-text);
  border: 1px solid var(--seam-soft); border-radius: 9px; padding: 10px 0; font: 12px/1.6 var(--mono);
}
.log .ln { padding: 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .ln.warn { color: #e8c37a; }
.log .ln.err { color: #ff9d85; background: rgba(229, 103, 63, 0.09); }
.log .ln.event { color: #b9dc98; }
.log .ln.notice { color: #e8c37a; text-align: center; padding: 6px 14px; }
.log-empty { color: #8a7c6a; padding: 0 14px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 8px 9px; border-bottom: 1px solid var(--seam); white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 11px 8px; border-bottom: 1px solid var(--seam-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions-cell { text-align: right; white-space: nowrap; }
.table td.actions-cell .btn + .btn { margin-left: 4px; }
.table .empty td { color: var(--muted); text-align: center; padding: 20px 8px; }
.world-name { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.badges { display: inline-flex; gap: 5px; flex-wrap: wrap; vertical-align: 2px; margin-left: 7px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--moss-wash); color: var(--moss); }
.badge.warn { background: var(--amber-wash); color: var(--amber); }
.badge.err { background: var(--ember-wash); color: var(--ember); }
.badge.info { background: var(--frost-wash); color: var(--frost); }
.badge.accent { background: var(--gold-wash); color: var(--gold); }

/* ---------- character profiles */
.profiles { display: grid; gap: 18px; }
.profile { gap: 16px; }
.profile-head { display: flex; align-items: flex-start; gap: 16px; }
.profile-name { font-size: 25px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name .badge { font-family: var(--sans); }
.profile-total { display: grid; justify-items: end; line-height: 1.1; color: var(--muted); font-size: 13px; }
.profile-total-num { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--gold-bright); }
.profile .facts { border-top: 1px solid var(--seam-soft); }
.profile .facts > div { padding-top: 12px; }
.skills { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.skill {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  padding: 11px 13px 10px; border-radius: 10px; background: var(--raised); border: 1px solid var(--seam-soft);
}
.skill.untouched { opacity: 0.5; }
.skill-icon {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  color: var(--gold); background: var(--gold-wash);
}
.skill-icon svg { width: 22px; height: 22px; }
.skill-name { font-weight: 600; font-size: 14px; }
.skill-xp { color: var(--muted); font-size: 12.5px; }
.skill-level { font-family: var(--serif); font-size: 25px; font-weight: 600; color: var(--text); min-width: 1.6ch; text-align: right; }
.skill-bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--raised-2); overflow: hidden; }
.skill-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.profile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- callouts */
.callout { border-radius: 9px; padding: 11px 13px; font-size: 14px; border-left: 3px solid transparent; background: var(--raised); }
.callout.warn { background: var(--amber-wash); border-left-color: var(--amber); }
.callout.err { background: var(--ember-wash); border-left-color: var(--ember); margin-bottom: 18px; }
.callout.info { background: var(--frost-wash); border-left-color: var(--frost); }
.failed-alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quiet-link { color: var(--muted); text-decoration-color: var(--seam); text-underline-offset: 3px; }
.quiet-link:hover { color: var(--gold); text-decoration-color: currentColor; }
#worlds-notes { display: grid; gap: 8px; }
#worlds-notes:empty { display: none; }

/* ---------- forms */
.form { display: grid; gap: 18px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field > span { font-size: 14px; font-weight: 600; }
.field .help { color: var(--muted); font-size: 13px; }
.field-check label { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.input-group { display: flex; gap: 6px; }
.input-group input { flex: 1; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.raw { min-height: 340px; font: 13px/1.55 var(--mono); resize: vertical; white-space: pre; }
.prose { display: grid; gap: 8px; color: var(--muted); font-size: 14.5px; max-width: 72ch; }
.prose strong { color: var(--text); }

/* ---------- dialog */
dialog {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--seam); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: var(--lift);
}
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
.dialog-body { display: grid; gap: 12px; padding: 22px; }
.dialog-body h3 { font-size: 21px; }
.dialog-body p { color: var(--muted); font-size: 14.5px; }
.dialog-body p strong { color: var(--text); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; width: min(380px, calc(100vw - 32px)); }
.toast {
  background: var(--raised); border: 1px solid var(--seam); border-left: 3px solid var(--frost); border-radius: 9px;
  padding: 11px 13px; font-size: 14px; box-shadow: var(--lift); transition: opacity 0.3s, transform 0.3s; overflow-wrap: anywhere;
}
.toast.ok { border-left-color: var(--moss); }
.toast.error { border-left-color: var(--ember); }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- small screens */
@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--seam-soft); }
  .form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 10px; }
  .brand { flex: 1 1 auto; }
  .topbar-user #user-name { display: none; }
  .pill { order: 3; }
  .card { padding: 16px; }
  .hero { padding: 18px; }
  .hero-head { gap: 14px; }
  .beacon { width: 52px; height: 52px; }
  .hero-title { flex-basis: 160px; }
  .hero-state { font-size: 30px; }
  .hero-actions { width: 100%; margin-left: 0; }
  .hero-actions .btn { flex: 1; min-width: 0; }
  .hide-sm { display: none; }
  .job-row { flex-wrap: wrap; row-gap: 4px; }
  .job-text { flex-basis: calc(100% - 28px); }
  #job-time { margin-left: 28px; margin-right: auto; }
  .table td.actions-cell { white-space: normal; }
  .table td.actions-cell .btn { margin: 2px 0 2px 4px; }
  .profile { padding: 14px 12px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .skill { padding: 9px 8px 8px; gap: 3px 6px; }
  .skill-icon { width: 20px; height: 20px; background: none; }
  .skill-icon svg { width: 20px; height: 20px; }
  .skill-text { min-width: 0; }
  .skill-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .skill-xp { font-size: 12px; }
  .skill-level { font-size: 21px; }
  .profile-name { font-size: 22px; }
  .profile-total-num { font-size: 28px; }
}
