/* ── Ironhold design tokens — dark stone, emerald, ember ── */
:root {
  --bg: #0b1220;
  --bg-deep: #070c16;
  --panel: rgba(255, 255, 255, .045);
  --panel-hi: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #eef3fa;
  --muted: #93a0b8;
  --dim: #6b778d;
  --primary: #15803d;
  --primary-lite: #4ade80;
  --accent: #d97706;
  --accent-lite: #fbbf24;
  --danger: #dc2626;
  --danger-lite: #f87171;
  --steel: #93c5fd;
  --wood: #c08457;
  --stone: #a8b3c4;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%, rgba(21, 128, 61, .28), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(217, 119, 6, .14), transparent 65%),
    var(--bg-deep);
  background-attachment: fixed;
}
button { font-family: inherit; }
::selection { background: rgba(217, 119, 6, .35); }

/* ── Shell / layout ── */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem 5rem; }
.wrap { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; }
.between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }
.small { font-size: .8rem; }
.tiny { font-size: .72rem; }
.mono { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: .35rem; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(7, 12, 22, .94), rgba(7, 12, 22, .78));
  border-bottom: 1px solid var(--border);
}
.topbar-in { max-width: 1240px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; color: #052012;
  background: linear-gradient(140deg, var(--primary-lite), var(--primary));
  box-shadow: 0 6px 20px rgba(21, 128, 61, .45);
}
.day-chip {
  display: flex; align-items: center; gap: .5rem; padding: .35rem .75rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  font-size: .78rem; font-weight: 600;
}
.season-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Resource strip ── */
.res-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.res-cell {
  display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel); min-width: 0;
  transition: border-color .2s, background .2s;
}
.res-cell:hover { border-color: var(--border-strong); background: var(--panel-hi); }
.res-ico { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; }
.res-val { font-weight: 700; font-size: .95rem; }
.res-net { font-size: .7rem; font-weight: 600; }
.up { color: var(--primary-lite); }
.down { color: var(--danger-lite); }

/* ── Bars & pills ── */
.bar-wrap { width: 100%; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar-wrap, .bar { transition: width .35s ease, background .3s; }
.bar { height: 100%; border-radius: 999px; }
.bar-primary { background: linear-gradient(90deg, #15803d, #4ade80); }
.bar-accent { background: linear-gradient(90deg, #b45309, #fbbf24); }
.bar-danger { background: linear-gradient(90deg, #991b1b, #f87171); }
.bar-steel { background: linear-gradient(90deg, #1d4ed8, #93c5fd); }
.pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem;
  border-radius: 999px; font-size: .7rem; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
}
.pill-good { color: var(--primary-lite); border-color: rgba(74, 222, 128, .35); background: rgba(21, 128, 61, .16); }
.pill-bad { color: var(--danger-lite); border-color: rgba(248, 113, 113, .35); background: rgba(220, 38, 38, .14); }
.pill-warn { color: var(--accent-lite); border-color: rgba(251, 191, 36, .35); background: rgba(217, 119, 6, .15); }
.pill-steel { color: var(--steel); border-color: rgba(147, 197, 253, .3); background: rgba(29, 78, 216, .16); }

/* ── Cost chips ── */
.cost { display: flex; flex-wrap: wrap; gap: .3rem; }
.cost-chip {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem;
  padding: .12rem .45rem; border-radius: 6px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border); color: var(--muted);
}
.cost-chip.ok { color: #cfe6d6; }
.cost-chip.short { color: var(--danger-lite); border-color: rgba(248, 113, 113, .3); background: rgba(220, 38, 38, .1); }
.cost-short { opacity: .8; font-size: .68rem; }

/* ── Panel ── */
.panel {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
  backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
.panel-pad { padding: 1rem 1.1rem; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .8rem 1.1rem; border-bottom: 1px solid var(--border);
}
.panel-title { display: flex; align-items: center; gap: .5rem; font-weight: 650; font-size: .92rem; letter-spacing: -.01em; }
.panel-title svg { color: var(--primary-lite); }
.grid-cards { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.grid-2 { display: grid; gap: .9rem; grid-template-columns: 1.35fr 1fr; align-items: start; }
.grid-3 { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 999px; font-size: .83rem; font-weight: 650;
  cursor: pointer; border: 1px solid transparent; color: var(--text); background: var(--panel-hi);
  transition: transform .15s ease, box-shadow .15s ease, background .2s, border-color .2s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--border-strong); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #15803d, #22c55e); color: #04170c;
  box-shadow: 0 6px 22px rgba(21, 128, 61, .35);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 30px rgba(34, 197, 94, .45); }
.btn-accent { background: linear-gradient(135deg, #b45309, #f59e0b); color: #1a0e02; box-shadow: 0 6px 22px rgba(217, 119, 6, .35); }
.btn-danger { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; box-shadow: 0 6px 22px rgba(220, 38, 38, .35); }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-hi); }
.btn-sm { padding: .32rem .7rem; font-size: .76rem; }
.btn-ico { padding: .34rem; width: 30px; height: 30px; border-radius: 9px; }
.btn.is-active { background: linear-gradient(135deg, #15803d, #4ade80); color: #04170c; border-color: transparent; }
.btn-focus { outline: 2px solid var(--accent-lite); outline-offset: 2px; }

/* ── Tabs ── */
.app { position: relative; }
.shell { max-width: 1240px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.tabbar {
  display: flex; gap: .3rem; padding: .3rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  backdrop-filter: blur(12px); overflow-x: auto; scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .9rem; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: color .2s, background .2s, transform .15s;
}
.tab:hover { color: var(--text); background: var(--panel-hi); }
.tab.on {
  color: #04170c; background: linear-gradient(135deg, #15803d, #34d399);
  box-shadow: 0 6px 20px rgba(21, 128, 61, .35);
}
.tab-badge {
  font-size: .68rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: var(--text);
}
.tab.on .tab-badge { background: rgba(0, 0, 0, .25); color: #eafff2; }
.tab-badge.warn { background: rgba(217, 119, 6, .3); color: var(--accent-lite); }
.tab-badge.bad { background: rgba(220, 38, 38, .3); color: var(--danger-lite); }
.view { animation: fadeUp .32s ease; }
.foot {
  display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: .74rem; color: var(--dim);
}

/* ── Chips / filters ── */
.chip-row { display: flex; gap: .3rem; flex-wrap: wrap; }
.chip {
  padding: .22rem .62rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
  cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.on { background: rgba(21, 128, 61, .28); border-color: rgba(74, 222, 128, .45); color: #d6ffe4; }

/* ── Hold map tiles ── */
.hold-map { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .6rem .45rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  text-align: center; transition: transform .18s ease, border-color .2s, box-shadow .2s;
  animation: fadeUp .4s ease backwards;
}
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.tile svg { color: var(--primary-lite); }
.tile-name { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.tile-lvl {
  position: absolute; top: .25rem; right: .3rem; font-size: .62rem; font-weight: 700;
  color: var(--accent-lite);
}
.tile.tier-defense svg { color: var(--steel); }
.tile.tier-military svg { color: var(--danger-lite); }
.tile.tier-food svg { color: #86efac; }
.tile.tier-economy svg { color: var(--accent-lite); }
.tile.tier-industry svg { color: var(--wood); }
.tile.tier-culture svg { color: #c4b5fd; }

/* ── Building cards ── */
.bcard, .ucard {
  display: flex; flex-direction: column; gap: .55rem; padding: .85rem;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel);
  transition: transform .18s ease, border-color .2s, box-shadow .2s, background .2s;
}
.bcard:hover, .ucard:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.bcard.is-built { background: linear-gradient(180deg, rgba(21, 128, 61, .12), rgba(255, 255, 255, .03)); border-color: rgba(74, 222, 128, .22); }
.bcard.is-blocked { opacity: .72; }
.ucard.is-owned { background: linear-gradient(180deg, rgba(217, 119, 6, .12), rgba(255, 255, 255, .03)); border-color: rgba(251, 191, 36, .22); }
.ucard.is-locked { opacity: .66; }
.bcard-ico {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border); color: var(--primary-lite);
}
.bcard-name { font-weight: 650; font-size: .9rem; letter-spacing: -.01em; }
.bcard-text { line-height: 1.45; min-height: 2.6em; }
.bcard-foot { align-items: center; gap: .5rem; flex-wrap: wrap; }
.pips { display: flex; gap: 3px; }
.pips i { width: 12px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); display: block; }
.pips i.on { background: linear-gradient(90deg, #15803d, #4ade80); }
.warn-text { color: var(--accent-lite); }
.count-badge {
  font-weight: 700; font-size: .95rem; padding: .1rem .5rem; border-radius: 8px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--border);
}

/* ── Stats / records ── */
.stat-row { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem;
  padding: .6rem .7rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
}
.stat b { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.stat-ico { color: var(--primary-lite); margin-bottom: .15rem; }
.record-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.record-grid > div {
  display: flex; flex-direction: column; gap: .1rem; padding: .55rem .6rem;
  border-radius: var(--radius-sm); background: rgba(255, 255, 255, .035); border: 1px solid var(--border);
}
.record-grid b { font-size: 1.05rem; }
.record-grid svg { color: var(--accent-lite); }

/* ── Jobs ── */
.job-row {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .035);
  transition: border-color .2s, background .2s;
}
.job-row:hover { border-color: var(--border-strong); background: var(--panel-hi); }
.job-ico { color: var(--primary-lite); display: grid; place-items: center; }
.job-count { min-width: 22px; text-align: center; font-weight: 700; }
.stepper {
  display: flex; align-items: center; gap: .15rem; padding: .15rem .25rem;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(0, 0, 0, .2);
}
.stepper .btn-ico { width: 24px; height: 24px; border-radius: 7px; }
.stepper.sm .btn-ico { width: 21px; height: 21px; }
.unit-strip { display: flex; gap: .5rem; flex-wrap: wrap; }
.unit-chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem;
  border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04);
  font-size: .78rem;
}

/* ── Callouts ── */
.callout {
  display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .7rem; border-radius: var(--radius-sm);
  background: rgba(29, 78, 216, .12); border: 1px solid rgba(147, 197, 253, .22); color: #dbeafe;
}
.callout svg { flex: 0 0 auto; margin-top: .1rem; color: var(--steel); }
.callout.warn { background: rgba(217, 119, 6, .13); border-color: rgba(251, 191, 36, .28); color: #fde9c8; }
.callout.warn svg { color: var(--accent-lite); }

/* ── Journal ── */
.journal { list-style: none; display: flex; flex-direction: column; gap: .3rem; max-height: 62vh; overflow-y: auto; }
.jrow {
  display: grid; grid-template-columns: 42px 20px 1fr; align-items: start; gap: .5rem;
  padding: .45rem .55rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .03);
  border-left: 3px solid var(--border-strong); font-size: .84rem;
  animation: fadeUp .3s ease backwards;
}
.jday { font-size: .68rem; color: var(--dim); font-weight: 700; padding-top: .15rem; }
.jico { color: var(--muted); display: grid; place-items: center; padding-top: .1rem; }
.j-good { border-left-color: #22c55e; } .j-good .jico { color: var(--primary-lite); }
.j-bad { border-left-color: #ef4444; background: rgba(220, 38, 38, .07); } .j-bad .jico { color: var(--danger-lite); }
.j-warn { border-left-color: #f59e0b; background: rgba(217, 119, 6, .07); } .j-warn .jico { color: var(--accent-lite); }
.j-info { border-left-color: #64748b; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2.5rem 1rem;
  color: var(--dim); border: 1px dashed var(--border-strong); border-radius: var(--radius);
}

/* ── Trade / season ── */
.trade-row { padding: .5rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .035); }
.season-tile {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 600;
  padding: .18rem .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--dim);
}
.season-tile.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.citadel { border-color: rgba(220, 38, 38, .28); background: linear-gradient(180deg, rgba(220, 38, 38, .09), rgba(255, 255, 255, .03)); }
.citadel .panel-title svg { color: var(--danger-lite); }

/* ── Wrap helpers ── */
.wrap-row { flex-wrap: wrap; }
.speed-group { display: inline-flex; gap: .2rem; padding: .15rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(0, 0, 0, .22); }
.speed-btn { border: none; background: transparent; }
.speed-btn.is-active { background: linear-gradient(135deg, #15803d, #4ade80); color: #04170c; }
.cycle { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: .15rem; }
.cycle-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #4ade80); transition: width .12s linear; }

/* ── Modal ── */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem;
  background: rgba(4, 8, 15, .74); backdrop-filter: blur(6px); animation: fadeIn .2s ease;
}
.modal {
  width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #101a2c, #0a1220); box-shadow: var(--shadow-lg);
  animation: popUp .28s cubic-bezier(.2, .9, .3, 1.2);
}
.modal h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; letter-spacing: -.02em; }
.modal h3 { font-size: 1.05rem; font-weight: 700; }
.modal h4 { display: flex; align-items: center; gap: .35rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-lite); margin-bottom: .25rem; }
.small-modal { max-width: 430px; }
.help-modal { max-width: 640px; }
.help-grid { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.help-grid > div { padding: .7rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255, 255, 255, .035); }
.end-modal { text-align: center; align-items: center; max-width: 520px; }
.end-modal.win { border-color: rgba(74, 222, 128, .4); box-shadow: 0 0 60px rgba(21, 128, 61, .3); }
.end-modal.lose { border-color: rgba(248, 113, 113, .35); }
.end-ico {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .1), transparent 70%); border: 1px solid var(--border-strong);
}
.end-modal.win .end-ico { color: var(--accent-lite); }
.end-modal.lose .end-ico { color: var(--danger-lite); }
.end-grid { width: 100%; text-align: left; }
.end-actions { display: flex; gap: .55rem; justify-content: flex-end; flex-wrap: wrap; }

/* ── Toasts ── */
.toast-wrap {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 70;
  display: flex; flex-direction: column; gap: .45rem; max-width: min(340px, 90vw);
}
.toast {
  display: flex; align-items: center; gap: .5rem; padding: .6rem .85rem; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 500; backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
  animation: slideIn .28s ease; border: 1px solid var(--border);
}
.toast-good { background: rgba(21, 128, 61, .22); border-color: rgba(74, 222, 128, .35); color: #d7ffe4; }
.toast-bad { background: rgba(185, 28, 28, .24); border-color: rgba(248, 113, 113, .4); color: #ffe0e0; }
.toast-warn { background: rgba(180, 83, 9, .24); border-color: rgba(251, 191, 36, .4); color: #ffeed2; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popUp { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Focus visibility ── */
button:focus-visible, .chip:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-lite); outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .res-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { padding: .75rem .8rem 3rem; }
  .topbar-in { padding: .6rem .8rem; }
  .help-grid { grid-template-columns: 1fr; }
  .res-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hold-map { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .tab span:not(.tab-badge) { display: none; }
  .tab { padding: .5rem .7rem; }
  .modal { padding: 1.1rem; }
  .brand { font-size: .95rem; }
  .jrow { grid-template-columns: 34px 18px 1fr; font-size: .8rem; }
  .toast-wrap { left: .8rem; right: .8rem; bottom: .8rem; max-width: none; }
  .end-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .res-strip { grid-template-columns: 1fr; }
  .res-cell { padding: .45rem .55rem; }
}

/* ── Inline SVG icons ── */
.ic { flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.btn .ic, .pill .ic, .chip .ic, .tab .ic { pointer-events: none; }
.hide-sm { display: inline-flex; align-items: center; }
.boot { display: grid; place-items: center; min-height: 60dvh; color: var(--muted); font-family: var(--font); }
body { overflow-y: scroll; }
@media (max-width: 720px) { .hide-sm { display: none; } }
