/* Roundhouse app UI kit — local styles on top of design tokens. */

* { box-sizing: border-box; }

.rh-app {
  font-family: var(--font-body);
  color: var(--fg-2);
  background: var(--rh-obsidian);
  min-height: 100%;
  width: 100%;
}

/* Phone frame ----------------------------------------------- */
.phone {
  width: 390px;
  height: 844px;
  margin: 0 auto;
  background: var(--rh-obsidian);
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 8px #07070a;
}
.phone-status {
  height: 44px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 22px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: 0.04em;
}
.phone-status .dots { display:flex; gap:4px; align-items:center; }
.phone-status .dot { width:14px; height:9px; border-radius:2px; background:var(--rh-bone-100); }
.phone-screen {
  position: absolute;
  top: 44px; bottom: 0; left: 0; right: 0;
  overflow-y: auto;
  background: var(--rh-obsidian);
}
.phone-screen::-webkit-scrollbar { width: 0; }

/* Top bar ---------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--rh-obsidian);
  position: sticky; top: 0; z-index: 10;
}
.topbar-logo { display: flex; align-items: center; gap: 10px; }
.topbar-logo img { height: 26px; width: auto; }
.topbar-name { font-family: var(--font-stencil); font-size: var(--type-title-size); font-weight: 900; color: var(--fg-1); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.topbar-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 44px; height: 44px;
  background: transparent; border: 1px solid transparent;
  border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--rh-bone-300);
  cursor: pointer; transition: all 120ms ease;
}
.icon-btn:hover { background: var(--rh-brass-tint-08); color: var(--rh-bone-100); border-color: var(--border-default); }
.icon-btn:active { background: var(--bg-pressed); }

/* Bottom tabs ----------------------------------------------- */
.bottom-tabs {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 72px;
  background: var(--rh-obsidian-900);
  border-top: 1px solid var(--rh-brass-tint-32);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: 12px;
  padding-top: 8px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-1);
  background: transparent; border: 0;
  color: var(--fg-4);
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  font-weight: var(--type-label-weight);
  min-height: 44px;
}
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--rh-brass);
  outline-offset: 2px;
}
.tab.active { color: var(--rh-bone-100); }
.tab.active::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--rh-mark);
  background: none;
}
.rh-tri {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--rh-mark);
  flex: 0 0 auto;
}
.tab svg { color: currentColor; }

/* Screen content -------------------------------------------- */
.screen { padding: var(--space-4); padding-bottom: 96px; }
.screen-hero {
  padding: 6px 0 14px;
}
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  letter-spacing: var(--type-label-track);
  color: var(--fg-3);
  text-transform: uppercase;
  font-weight: var(--type-label-weight);
}
.hero-title {
  font-family: var(--font-stencil);
  font-size: var(--type-display-size) !important;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--fg-1);
  margin: 0 0 var(--space-3);
}
.hero-title .red { color: var(--rh-danger); }
.hero-sub {
  font-family: var(--font-body);
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight);
  color: var(--fg-3);
}

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: var(--space-3) 0;
}
.section-head .h,
.section-head .more {
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  letter-spacing: var(--type-label-track);
  color: var(--fg-3);
  text-transform: uppercase;
  font-weight: var(--type-label-weight);
}
.section-head .more { cursor: pointer; color: var(--fg-1); }

/* Cards ------------------------------------------------------
   v3.5: cards lift more deliberately off the page. Deeper outer shadow
   for the "lifting" feel, brighter inset highlight at the top edge so
   cards read as gently illuminated surfaces. */
.card {
  background: var(--rh-surface);
  border: 1px solid var(--rh-line);
  border-radius: var(--radius-2);
  padding: var(--space-3);
  box-shadow: var(--shadow-1);
}
.card.brass {
  border-color: var(--rh-line);
  box-shadow: var(--shadow-1);
}
.card + .card { margin-top: var(--space-3); }

/* Buttons --------------------------------------------------- */
.btn {
  font-family: var(--font-ui);
  font-weight: var(--type-label-weight);
  text-transform: uppercase;
  letter-spacing: var(--type-label-track);
  font-size: var(--type-label-size);
  cursor: pointer;
  border: none;
  border-radius: 2px;
  padding: 14px 18px;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  transition: all 120ms ease;
}
/* Large primary CTAs (Start Range Trip, End & Save, Save gun, etc.) */
.btn-lg { font-size: var(--type-label-size); padding: 14px 18px; letter-spacing: var(--type-label-track); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { background: var(--action); }
.btn-secondary:disabled:hover { background: transparent; }
.btn-primary { background: var(--action); color: var(--rh-on-hero); }
.btn-primary:hover { background: var(--action-hover); }
.btn-primary:active { background: var(--action-pressed); transform: scale(0.98); }
.btn-secondary { background: transparent; color: var(--rh-bone-100); border: 1px solid var(--rh-brass); }
.btn-secondary:hover { background: var(--rh-brass-tint-08); border-color: var(--rh-brass-400); }
.btn-ghost { background: transparent; color: var(--rh-bone); padding: 14px 8px; }
.btn-block { width: 100%; }

/* Badges ---------------------------------------------------- */
.badge {
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 2px;
  line-height: 1;
  border: 1px solid var(--border-default);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; }
.badge.ready    { background: transparent; color: var(--rh-success); border-color: var(--rh-success); }
.badge.due      { background: transparent; color: var(--rh-warn); border-color: var(--rh-warn); }
.badge.attention { background: transparent; color: var(--rh-danger); border-color: var(--rh-danger); }
.badge.low      { background: transparent; color: var(--rh-warn); border-color: var(--rh-warn); }
.badge.verified { background: transparent; color: var(--rh-success); border-color: var(--rh-success); }

/* Chips ----------------------------------------------------- */
.chip {
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
  padding: 12px 16px;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  line-height: 1;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated-2);
  color: var(--rh-bone-300);
  cursor: pointer;
}
.chip.on { background: var(--rh-brass); border-color: var(--rh-brass); color: var(--rh-on-accent); }
button.chip {
  appearance: none;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-ui);
}

/* Chip grid — equal-width selector chips that fill the row, wrapping into
   rows. Default 3 columns; override --chip-cols inline for other counts.
   Use for fixed option selectors (type, caliber, condition, etc.). */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(var(--chip-cols, 3), 1fr);
  gap: var(--space-3);
}
.chip-grid .chip {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

/* Misc ------------------------------------------------------ */
.wedge {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--rh-dusty-red);
  display: inline-block;
}
.divider {
  height: 1px; background: var(--border-hairline); margin: var(--space-3) 0;
}
.numeric { font-family: var(--font-display); font-size: var(--type-display-size); font-weight: var(--type-display-weight); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--fg-1); line-height: 1; }

/* Stat tile grid ------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.stat-tile {
  background: var(--rh-surface);
  border: 1px solid var(--rh-line);
  border-radius: var(--radius-2);
  padding: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.stat-tile .k { font-family: var(--font-ui); font-size: var(--type-label-size); letter-spacing: var(--type-label-track); color: var(--fg-3); text-transform: uppercase; font-weight: var(--type-label-weight); }
.stat-tile .v { font-family: var(--font-display); font-size: var(--type-display-size); font-weight: var(--type-display-weight); line-height: 1; color: var(--fg-1); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.stat-tile .sub { font-family: var(--font-ui); font-size: var(--type-label-size); letter-spacing: var(--type-label-track); color: var(--fg-3); text-transform: uppercase; font-weight: var(--type-label-weight); }

/* Home, section bands, sheets. Gap inside these is --space-3, same as between them. */
.rh-hero {
  position: relative;
  overflow: hidden;
  margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-3);
  padding: var(--space-4);
  background-color: var(--rh-plate);
  background-image: url('/assets/brand/grain.png');
  background-size: 96px 96px;
  color: var(--rh-stone);
}
.rh-hero-mark {
  position: absolute;
  z-index: 0;
  right: 6px;
  top: 8px;
  height: 112px;
  width: auto;
  pointer-events: none;
}
.rh-hero-speed {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 14px;
  width: 62%;
  height: 78px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.2) 12%, rgba(212,176,114,0.85) 86%, transparent 100%) 0 8px / 46% 1px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.15) 18%, rgba(212,176,114,0.95) 100%) 0 20px / 68% 2px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.55) 72%, transparent 100%) 10px 34px / 40% 1px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.45) 80%, transparent 100%) 0 48px / 52% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(212,176,114,0.7)) 6px 62px / 34% 1px no-repeat;
}
.rh-hero h1,
.rh-hero-tag,
.rh-tell { position: relative; z-index: 1; }
.rh-hero h1 {
  font-family: var(--font-stencil);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rh-stone);
  margin: 0 0 var(--space-2);
  max-width: 70%;
}
.rh-hero-kicker {
  display: block;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 4px;
}
.rh-wordmark { display: block; height: 32px; width: auto; max-width: 100%; }
.rh-wordmark-inline { display: block; height: 16px; width: auto; }
.rh-hero-tag {
  margin: 0 0 var(--space-3);
  max-width: 78%;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rh-brass-hero);
}
.rh-hero-tag span { color: var(--rh-mark-on-hero); }
.rh-strip {
  flex: 0 0 64px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 4px 0 10px;
  background-color: var(--rh-plate);
  background-image: url('/assets/brand/grain.png');
  background-size: 96px 96px;
  color: var(--rh-stone);
  position: relative;
  overflow: hidden;
  z-index: 6;
}
.rh-strip-speed {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.18) 18%, rgba(212,176,114,0.55) 70%, transparent 100%) 0 18px / 42% 1px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(212,176,114,0.12) 30%, rgba(212,176,114,0.4) 100%) 8% 32px / 36% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(212,176,114,0.35)) 0 46px / 28% 1px no-repeat;
}
.rh-strip > * { position: relative; z-index: 1; }
.rh-strip-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin: 0 6px 0 2px;
  display: block;
}
.rh-strip .rh-tell {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  background: #fff;
  gap: 2px;
}
.rh-strip .rh-tell input::placeholder {
  color: #6E747A;
  opacity: 1;
}
.rh-strip .icon-btn {
  color: var(--rh-stone);
  width: 44px;
  height: 44px;
  background: transparent;
  border-color: transparent;
}
.rh-strip .icon-btn:hover,
.rh-strip .icon-btn:active {
  color: #fff;
  background: transparent;
  border-color: transparent;
}
.rh-strip .icon-btn:focus-visible { outline-color: var(--rh-stone); }
.rh-alert-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rh-mark-on-hero);
  box-shadow: 0 0 0 2px var(--rh-plate);
}
.tab-seal-wrap { display: inline-flex; width: 26px; height: 26px; }
.tab-seal { width: 26px; height: 26px; display: block; }
.tab-seal-light { display: none; }
:root[data-theme="dark"] .tab-seal-dark { display: none; }
:root[data-theme="dark"] .tab-seal-light { display: block; }
.bottom-tabs .tab.tab-center { color: var(--rh-bone-100); }
.rh-tagline {
  margin: 0 0 var(--space-3);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rh-brass);
  line-height: 1.3;
}
.rh-tagline span { color: var(--rh-mark); }
.rh-tell {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  background: var(--rh-surface);
  color: var(--fg-1);
  border-radius: var(--radius-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
}
.rh-next, .rh-band-action, .rh-btn, .rh-btn-primary {
  font-family: var(--font-ui);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
}
.rh-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  margin: 0 0 var(--space-3);
  padding: 0 var(--space-3);
  border-radius: var(--radius-2);
  border: 2px solid var(--rh-hero);
  background: var(--rh-surface);
  color: var(--fg-1);
  cursor: pointer;
  text-align: left;
}
.rh-next-label { display: inline-flex; align-items: center; gap: var(--space-2); }
.rh-home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.rh-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  height: 100%;
  min-height: 44px;
  gap: var(--space-3);
  background: var(--rh-surface);
  color: var(--fg-1);
  border: 1px solid var(--rh-line);
  border-left: 3px solid var(--rh-ink, var(--rh-hero));
  border-radius: var(--radius-2);
  padding: var(--space-3);
  cursor: pointer;
}
.rh-tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); width: 100%; }
.rh-badge {
  max-width: 68%;
  background: var(--rh-hero);
  color: var(--rh-on-hero);
  border-radius: var(--radius-1);
  font-family: var(--font-stencil);
  font-size: var(--type-label-size);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  padding: 3px 7px;
  text-align: right;
}
.rh-recent { margin-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-3); }
.rh-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.rh-recent-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--rh-line);
  border-radius: var(--radius-2);
  background: var(--rh-surface);
  color: var(--fg-1);
  cursor: pointer;
  text-align: left;
}
.rh-band {
  position: relative;
  overflow: hidden;
  background: var(--rh-surface);
  color: var(--fg-1);
  border: 1px solid var(--rh-line);
  border-left: 3px solid var(--rh-range);
  border-radius: var(--radius-2);
  padding: var(--space-3);
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rh-band::before {
  content: '';
  position: absolute;
  left: var(--space-3);
  top: 28px;
  width: 88px;
  height: 16px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(176,138,78,0.55)) 0 3px / 70% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(176,138,78,0.4)) 8px 10px / 46% 1px no-repeat;
}
.rh-band-kicker { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.rh-band-title {
  position: relative;
  font-family: var(--font-stencil);
  font-size: var(--type-title-size);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.rh-stencil-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-stencil);
  font-size: var(--type-title-size);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.rh-band-action {
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-2);
  color: var(--rh-on-fill);
  cursor: pointer;
}
.rh-sheet {
  width: 100%;
  max-height: 92%;
  overflow: auto;
  background: var(--bg);
  color: var(--fg-1);
  border-radius: var(--radius-2) var(--radius-2) 0 0;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rh-sheet-card {
  background: var(--rh-surface);
  border: 1px solid var(--rh-line);
  border-radius: var(--radius-2);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rh-field {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-2);
  border: 1px solid var(--rh-line);
  background: var(--rh-surface);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  padding: var(--space-3);
}
.rh-btn, .rh-btn-primary {
  min-height: 44px;
  flex: 1;
  border-radius: var(--radius-2);
  cursor: pointer;
}
.rh-btn { border: 1px solid var(--rh-line); background: var(--rh-surface); color: var(--fg-1); }
.rh-btn-primary { border: 0; background: var(--rh-mark); color: var(--rh-on-fill); }
.rh-btn-primary:disabled { opacity: 0.45; }

/* ---- Light theme: soften shadows tuned for the dark system ---- */
:root[data-theme="light"] .card {
  box-shadow: 0 1px 2px rgba(20,20,28,0.06), 0 6px 18px rgba(20,20,28,0.08);
}
:root[data-theme="light"] .card.brass {
  box-shadow: 0 1px 2px rgba(20,20,28,0.06), 0 8px 22px rgba(20,20,28,0.10), 0 0 0 1px var(--rh-brass-tint-08);
}
:root[data-theme="light"] .stat-tile {
  box-shadow: 0 1px 2px rgba(20,20,28,0.05);
}

/* =============================================================
   CLAIM PACKET — a printable copy rendered outside the phone frame
   (#rh-print, mounted by the Claim packet screen). On paper the app
   is hidden and the tokens are re-pointed to a light ink palette, so
   the same component prints cleanly.
   ============================================================= */
#rh-print { display: none; }
@media print {
  #root { display: none !important; }
  html, body { background: #fff !important; }
  #rh-print {
    display: block;
    --fg-1: #15151A; --fg-2: #24232A; --fg-3: #3C3A42;
    --rh-bone-300: #3C3A42; --rh-bone-500: #6A675F;
    --rh-brass-400: #7A6330; --rh-green: #4E7A3E; --rh-red-soft: #C0392B;
    --border-hairline: rgba(20,20,28,0.16);
    color: #15151A; background: #fff;
  }
  #rh-print .cp-item { break-inside: avoid-page; page-break-inside: avoid; }
  #rh-print .cp-img  { break-inside: avoid; page-break-inside: avoid; }
  @page { margin: 14mm; }
}

/* Home hub: four boxes, red + at the cross, recent underneath. */
.hub-screen { background: var(--rh-obsidian-700); }
.hub-date {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 10px;
}
.hub-square {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 340px;
}
.hub-box {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--rh-surface);
  color: var(--fg-1);
  border: 1px solid var(--rh-line);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  overflow: auto;
}
.hub-box.nw { align-items: flex-start; text-align: left; padding: 12px 46px 40px 12px; }
.hub-box.ne { align-items: flex-end; text-align: right; padding: 12px 12px 40px 46px; }
.hub-box.sw { align-items: flex-start; text-align: left; padding: 40px 46px 12px 12px; }
.hub-box.se { align-items: flex-end; text-align: right; padding: 40px 12px 12px 46px; }
.hub-kicker {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hub-num {
  font-family: var(--font-stencil);
  font-weight: 900;
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--fg-1);
  margin-top: 6px;
}
.hub-unit, .hub-note, .hub-link, .hub-alert, .hub-line, .hub-recent-label, .hub-recent-date, .hub-recent-title, .hub-recent-sub, .hub-recent-empty {
  font-family: var(--font-ui);
}
.hub-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  line-height: 1.2;
}
.hub-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  line-height: 1.3;
  margin-top: 4px;
}
.hub-link, .hub-alert {
  border: 0;
  background: transparent;
  padding: 6px 0;
  min-height: 32px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rh-mark);
  text-align: inherit;
}
.hub-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-top: 6px;
}
.hub-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  line-height: 1.3;
}
.hub-line.hub-alert { min-height: 28px; padding: 2px 0; }
.hub-box.ne .hub-lines, .hub-box.se .hub-lines { align-items: stretch; }
.hub-plus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 0;
  background: var(--rh-mark);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  padding: 0 0 3px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(163, 40, 28, 0.35);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.hub-recent { margin-top: 16px; }
.hub-recent-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.hub-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hub-recent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--rh-line);
  border-radius: 14px;
  background: var(--rh-surface);
  color: var(--fg-1);
  cursor: pointer;
  text-align: left;
}
.hub-recent-date {
  flex: 0 0 52px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
  padding-top: 2px;
}
.hub-recent-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-recent-title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.hub-recent-sub { font-size: 12px; font-weight: 500; color: var(--fg-3); line-height: 1.3; }
.hub-recent-empty {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--rh-surface);
  border: 1px solid var(--rh-line);
  color: var(--fg-3);
  font-size: 14px;
  font-weight: 500;
}

/* Gear: guns first, then the rest. The total is a header. */
.gear-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.gear-total-k {
  font-family: var(--font-stencil);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-1);
}
.gear-total-n {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 4px;
}
.gear-add, .gear-block-h button, .gear-empty button {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rh-mark);
  background: transparent;
  border: 0;
  min-height: 44px;
  cursor: pointer;
  padding: 0;
}
.gear-guns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gear-gun, .gear-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--rh-line);
  background: var(--rh-surface);
  color: var(--fg-1);
  text-align: left;
  cursor: pointer;
}
.gear-photo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--rh-obsidian-500);
  display: block;
}
.gear-gun-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gear-gun-name, .gear-row > span:first-child {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.gear-gun-cal, .gear-row-meta, .gear-gun-rds span, .gear-none, .gear-empty {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
}
.gear-gun-rds {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-1);
  flex: 0 0 auto;
}
.gear-empty { padding: 8px 2px; }
.gear-block { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.gear-block-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gear-block-h h2 {
  font-family: var(--font-stencil);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gear-row { justify-content: space-between; }
.gear-none { margin: 0; }
