:root {
  color-scheme: dark;
  --bg: #0c0a08;
  --surface: #15120f;
  --surface-2: #1e1a15;
  --surface-3: #2a241d;
  --line: #2e2820;
  --line-strong: #453c31;
  --ink: #f5efe8;
  --ink-2: #b9afa3;
  --ink-3: #978c7f;
  --accent: #ff7a1a;
  --accent-hover: #ff9142;
  --accent-ink: #140b03;
  --accent-wash: rgba(255, 122, 26, 0.13);
  --gain: #3ad585;
  --loss: #ff5c7a;
  --radius: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* --- Rahmen --------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.rail {
  /* dvh berücksichtigt die Browserleisten auf dem Handy, vh dient als Rückfall. */
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 3px; padding: 0 8px; color: #fff; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.brand-hub { padding: 1px 6px; border-radius: 5px; background: var(--accent); color: #000; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500;
}
.rail nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a:hover { background: var(--surface-2); color: var(--ink); }
.rail nav a.active { background: var(--accent-wash); color: var(--accent); }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; text-align: center; }
.rail-account { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--line); }
.rail-logout { display: none; }
.system-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.system-tile { position: relative; padding: 12px 14px; border-radius: 9px; background: var(--surface-2); }
.system-tile .label { font-size: 12px; color: var(--ink-3); }
.system-tile .value { margin-top: 2px; font-size: 18px; font-weight: 650; }
.system-tile .sub { margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.system-tile .health { position: absolute; top: 10px; right: 10px; }
.health { padding: 1px 7px; border-radius: 5px; background: var(--surface-3); font-size: 11px; font-weight: 650; white-space: nowrap; }
.health.ok { color: var(--gain); }
.health.warn { color: #f2c14e; }
.health.bad { color: var(--loss); }
.profile-name { margin-top: 16px; }
.start-capital { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
.start-capital .label { font-size: 12px; color: var(--ink-3); }
.start-capital strong { font-size: 24px; font-weight: 650; }
.account-logout { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.rail-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rail-user strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: var(--surface-3); color: var(--ink-2); font-weight: 650; font-size: 14px;
}
.avatar.small { width: 24px; height: 24px; font-size: 11px; }
.avatar.large { width: 96px; height: 96px; font-size: 34px; }
.player-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.avatar-editor { display: flex; gap: 18px; align-items: flex-start; }
.avatar-controls { flex: 1; min-width: 0; }
.avatar-controls input[type="file"] { width: 100%; font-size: 12px; color: var(--ink-2); }
.danger-link { color: var(--loss); }
.danger-link:hover { color: var(--loss); }
.rail-account .label { font-size: 12px; color: var(--ink-3); }
.rail-account .value { font-size: 17px; font-weight: 650; }
.rail-account .sub { font-size: 12px; margin-top: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px;
  padding: 10px 26px;
  background: rgba(12, 10, 8, 0.94);
  border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 0 1 340px; }
.search input {
  width: 100%; padding: 8px 12px 8px 34px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--accent); }
.search svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; stroke: var(--ink-3); fill: none; stroke-width: 2; stroke-linecap: round; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  max-height: 380px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.selected { background: var(--surface-3); }
.search-results .empty { padding: 12px; color: var(--ink-3); }
.ticker { display: flex; gap: 20px; margin-left: auto; overflow: hidden; }
.ticker a { white-space: nowrap; font-size: 13px; }
.ticker .tick-label { color: var(--ink-3); margin-right: 5px; }
.ticker .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 2px; background: var(--line-strong); }
.ticker .dot.on { background: var(--accent); }

.banner { padding: 8px 26px; background: var(--accent-wash); color: var(--accent-hover); border-bottom: 1px solid var(--line); font-size: 13px; }
.page { padding: 24px 26px 48px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }

/* --- Bausteine ------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.card-head h2 { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.card-body { padding: 14px 18px 18px; }

.btn {
  display: inline-block;
  padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--loss); color: #1c0509; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; padding: 11px; }

.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface-2); border-radius: 8px; }
.seg button { padding: 4px 11px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 550; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--surface-3); color: var(--accent); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.tabs a { padding: 6px 13px; border-radius: 18px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }
.tabs a:hover { border-color: var(--line-strong); color: var(--ink); }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 8px 12px; font-size: 12px; font-weight: 550; color: var(--ink-3); text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
th.right { text-align: right; }
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--ink); }
th button:focus-visible { outline: 2px solid var(--accent); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--surface-2); }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
.title-cell strong { display: block; font-weight: 550; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-cell span { font-size: 12px; color: var(--ink-3); }
.star { padding: 2px; border: 0; background: none; color: var(--ink-3); font-size: 17px; line-height: 1; }
.star:hover { color: var(--ink); }
.star.on { color: var(--accent); }
.spark { display: block; width: 92px; height: 26px; }
.spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linejoin: round; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.tag.buy { color: var(--accent); }
.empty-state { padding: 34px 18px; text-align: center; color: var(--ink-2); }
.empty-state .btn { margin-top: 12px; }

/* --- Depot ---------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: minmax(280px, 1.2fr) repeat(3, minmax(130px, 1fr));
  gap: 1px; margin-bottom: 16px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.hero > div { padding: 18px 20px; background: var(--surface); }
.hero .primary { background: linear-gradient(120deg, #2a1605 0%, var(--surface) 72%); }
.hero .label { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.hero .big { font-size: 38px; line-height: 1.12; font-weight: 650; letter-spacing: -0.02em; }
.hero .big small { font-size: 16px; font-weight: 500; color: var(--ink-2); margin-right: 6px; letter-spacing: 0; }
.hero .stat { font-size: 20px; font-weight: 600; }
.hero .sub { font-size: 13px; margin-top: 3px; }

/* --- Charts --------------------------------------------------------- */
.chart { position: relative; width: 100%; height: 300px; transition: opacity 0.15s; }
.chart.loading { opacity: 0.45; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .endlabel { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ref { stroke: var(--line-strong); stroke-width: 1; }
.chart .hair { stroke: var(--ink-3); stroke-width: 1; }
.chart-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3); text-align: center; padding: 20px; }
.tooltip {
  position: absolute; top: 8px; z-index: 5; pointer-events: none; min-width: 120px;
  padding: 7px 10px; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px;
}
.tooltip .when { color: var(--ink-3); margin-bottom: 2px; }
.tooltip .row { display: flex; align-items: center; gap: 7px; }
.tooltip .key { width: 12px; height: 2px; flex: none; }
.tooltip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tooltip .row span:last-child { color: var(--ink-2); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: 3px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; min-height: 30px; }
.chart + .note { margin-top: 6px; }
details.values { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
details.values summary { cursor: pointer; width: fit-content; color: var(--ink-3); font-size: 12px; }
details.values .table-wrap { max-height: 240px; overflow: auto; margin-top: 6px; }
details.values th:first-child, details.values td:first-child { padding-left: 0; }
details.values td, details.values th { padding: 4px 12px; }

/* --- Titel-Detail --------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.detail-title h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.detail-title .meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.detail-price { text-align: right; white-space: nowrap; }
.detail-price .big { font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -0.015em; }
.detail-price .big small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 5px; letter-spacing: 0; }
.star-btn { display: inline-flex; align-items: center; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 22px; }
.stats .label { font-size: 12px; color: var(--ink-3); }
.stats .value { font-weight: 600; font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--ink-3); }
.note.top { margin-top: 12px; }

.ticket { position: sticky; top: 70px; }
.ticket .card-body { display: flex; flex-direction: column; gap: 12px; }
.side-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: var(--surface-2); border-radius: 9px; }
.side-switch button { padding: 8px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-weight: 650; }
.side-switch button.active { background: var(--accent); color: var(--accent-ink); }
.side-switch button.active.sell { background: var(--ink); color: var(--bg); }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.type-grid button { padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 550; }
.type-grid button:hover { border-color: var(--line-strong); color: var(--ink); }
.type-grid button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.field label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; color: var(--ink-2); }
.field input {
  width: 100%; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px;
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600; }
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; }
.sums { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.sums dt { color: var(--ink-3); }
.sums dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sums .total { color: var(--ink); font-weight: 650; font-size: 15px; }
.form-error { color: var(--loss); font-size: 13px; }
.closed-note { padding: 8px 10px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; }

/* --- Start, Hilfe, Einstellungen ------------------------------------ */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% -10%, #3a1d06 0%, var(--bg) 70%); }
.welcome-card { width: min(470px, 100%); padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.welcome-card .brand { padding: 0; margin-bottom: 18px; font-size: 28px; }
.welcome-card h1 { font-size: 24px; line-height: 1.2; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.01em; }
.welcome-card p { color: var(--ink-2); margin-bottom: 20px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.presets button { padding: 9px 4px; border: 1px solid var(--line); border-radius: 8px; background: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.presets button:hover { border-color: var(--line-strong); }
.presets button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.welcome-card .field { margin-bottom: 14px; }
.welcome-card .note.top { margin: 12px 0 0; }
.auth-switch { display: flex; margin-bottom: 16px; }
.auth-switch button { flex: 1; padding: 7px; }
#auth-error { margin-bottom: 10px; }
#auth-error:empty { margin: 0; }
tr.me { background: var(--accent-wash); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 4px; min-width: 250px; }
.tag.loss { color: var(--loss); }
#form-dialog .field { margin-bottom: 12px; }
#form-dialog p { margin-bottom: 12px; }
#form-dialog .invite-row { margin-bottom: 4px; }
#form-dialog-error:not(:empty) { margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.check input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); }
.password-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.password-form .field { flex: 1 1 200px; }
#pw-error { margin-top: 8px; }
#pw-error:empty { margin: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 18px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { color: var(--accent); }
.faq p { margin-top: 8px; color: var(--ink-2); max-width: 74ch; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-row p { color: var(--ink-2); max-width: 62ch; font-size: 13px; margin-top: 2px; }
.settings-row h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }

dialog {
  width: min(420px, calc(100vw - 32px)); padding: 22px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
dialog h2 { font-size: 17px; margin-bottom: 8px; }
dialog p { color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 11px 14px; background: var(--surface-3); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 13px; }
.toast.error { border-left-color: var(--loss); }
.toast b { display: block; font-weight: 650; }

@media (max-width: 1180px) {
  .ticker a:nth-child(n+3) { display: none; }
  .hero { grid-template-columns: repeat(3, 1fr); }
  .hero .primary { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .shell { grid-template-columns: 62px minmax(0, 1fr); }
  .rail { padding: 16px 8px; }
  .brand-word, .rail nav a span:not(.nav-count), .rail-account { display: none; }
  .brand { justify-content: center; padding: 0; font-size: 15px; }
  .brand-hub { padding: 2px 5px; }
  .rail nav a { justify-content: center; position: relative; }
  .nav-count { position: absolute; top: 1px; right: 1px; min-width: 16px; padding: 0 3px; font-size: 10px; }
  .rail-logout {
    display: flex; justify-content: center; margin-top: auto; padding: 9px 10px;
    border: 0; border-radius: 8px; background: none; color: var(--ink-2);
  }
  .rail-logout:hover { background: var(--surface-2); color: var(--ink); }
  .rail-logout svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .topbar, .page, .banner { padding-left: 14px; padding-right: 14px; }
  .ticker { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero .big { font-size: 32px; }
}
/* --- Handymodus: Navigation unten, kompakte Inhalte ------------------- */
@media (max-width: 700px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40;
    height: auto; flex-direction: row; gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line);
  }
  .rail .brand, .rail-logout { display: none; }
  .rail nav { flex: 1; flex-direction: row; justify-content: space-around; gap: 0; }
  .rail nav a { flex: 1; min-width: 0; padding: 10px 0; }
  .rail nav a svg { width: 22px; height: 22px; }
  .nav-count { top: 3px; right: calc(50% - 20px); }
  .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  .topbar { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .topbar::before {
    content: "Hub"; flex: none; padding: 2px 6px; border-radius: 5px;
    background: var(--accent); color: #000; font-weight: 800; font-size: 15px;
  }
  .search { flex: 1; }
  .page { padding-top: 16px; padding-bottom: 28px; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head h1, .detail-title h1 { font-size: 20px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .tabs a { flex: none; }
  .filter-row { flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .primary, .hero > div:last-child { grid-column: 1 / -1; }
  .hero > div { padding: 12px 14px; }
  .hero .big { font-size: 30px; }
  .hero .stat { font-size: 17px; }
  .hero .sub { font-size: 12px; }
  .detail-title { flex-wrap: wrap; }
  .detail-price { text-align: left; }
  .chart { height: 230px; }
  .m-hide { display: none; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
  td, th { padding-left: 8px; padding-right: 8px; }
  .title-cell strong { max-width: 34vw; }
  .star { padding: 0; }
  .settings-row { flex-wrap: wrap; }
  .invite-row { flex-wrap: wrap; }
  .invite-row .btn { width: 100%; }
  .avatar-editor { flex-direction: column; align-items: center; }
  #toasts { right: 10px; left: 10px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
