/* Shared visual system. Layout contracts, hidden states and domain status colours stay in feature styles. */
:root {
  --ink: #070708;
  --panel: #171719;
  --panel2: #242427;
  --line: #3b3b41;
  --text: #f3f2ef;
  --muted: #aaa8b1;
  --lime: #cfb998;
  --bronze: #cfb998;
  --theme-inset: clamp(22px, 4vw, 64px);
  --theme-border: #515057;
  --theme-card: linear-gradient(145deg, #26262955, transparent 60%), #171719;
}
body { color-scheme: dark; }
.app-view, .login-view { background: var(--ink); }
/* A quiet, repeated watermark sits behind content, without intercepting clicks. */
.app-view > main:not(.map-layout) { position: relative; isolation: isolate; }
.app-view > main:not(.map-layout)::before {
  content: "";
  position: fixed;
  inset: var(--header) 0 0 var(--nav-width);
  z-index: -1;
  pointer-events: none;
  background: url("assets/kollektivet-logo-transparent.png") 52px -20px / 360px 298px repeat;
  filter: grayscale(1);
  opacity: .03;
}
.app-view button, dialog button { transition: background .16s, border-color .16s, color .16s; }
.app-view button:focus-visible, dialog button:focus-visible, .login-view button:focus-visible {
  outline: 2px solid #e2ceb0;
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select {
  background-color: #09090b;
  border-color: #49494f;
  border-radius: 4px;
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: #929292; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--bronze); box-shadow: 0 0 0 2px #cfb99812; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--bronze); }
label { color: #c3c3c3; }
.primary-btn { background: #cfb998; color: #181818; border: 1px solid #cfb998; min-height: 44px; font-size: 12px; }
.primary-btn:hover { background: #e2ceb0; border-color: #e2ceb0; }
.ghost-btn { background: #242427; color: #e0e0e0; border: 1px solid #49494f; min-height: 44px; font-size: 12px; }
.ghost-btn:hover { background: #323232; border-color: #8a7b5f; }
.primary-btn:disabled, .ghost-btn:disabled { opacity: .5; cursor: not-allowed; }
.close-btn, .square-btn, .icon-btn { border-color: #49494f; background: #262626; color: #d6d6d6; }
.close-btn:hover, .square-btn:hover, .icon-btn:hover { border-color: var(--bronze); color: var(--bronze); }
.eyebrow { font: 600 10px/1.5 Inter, sans-serif; letter-spacing: 1.6px; color: var(--bronze); }
h1, h2, h3 { text-wrap: balance; }
h2 { font-weight: 600; }
table { font-variant-numeric: tabular-nums; }
th { background: #222222; color: #c9b594; font-size: 10px; letter-spacing: 1px; border-color: var(--line); }
td { border-color: var(--line); }
tbody tr:hover { background-color: #cfb99806; }

/* The frame and navigation. */
.topbar { background: #101012; border-color: #414148; box-shadow: 0 3px 18px #0005; }
.wordmark { letter-spacing: .6px; }
.wordmark img { filter: drop-shadow(0 3px 8px #0004); }
.user-copy strong { font-size: 12px; font-weight: 600; }
.user-copy small { color: #a0a0a0; font-size: 10px; }
.profile-trigger { border-color: #7f7259; background: #262626; color: var(--bronze); }
.main-nav { background: #101012; border-right-color: #414148; padding-top: 22px; gap: 3px; }
.main-nav .nav-btn { border-radius: 4px; color: #a5a5a5; font-size: 11px; }
.main-nav .nav-btn:hover { background: #232323; color: #f3f2ef; }
.main-nav .nav-btn.active { background: #2b2620; border-color: #7c6a52; color: #fff4dd; box-shadow: inset 3px 0 #cfb998; }
.main-nav .nav-icon { color: inherit; }
.main-nav { box-shadow: 5px 0 22px #0003; }

/* Common page headers, matching Darkchats. */
.app-view > :is(.admin-view,.meetings-view,.profile-view,.economy-view,.crafting-view,.gangs-view,.intelligence-view,.bm-view,.laundering-view,.robbery-view,.armory-view,.trader-view,.garage-view,.members-view) {
  padding: 40px var(--theme-inset) 64px;
  background: radial-gradient(ellipse at 95% 0, #302b2040, transparent 42%), var(--ink);
  height: calc(100vh - var(--header));
  height: calc(100dvh - var(--header));
  min-height: 0;
  max-width: none;
  overflow: auto;
}
.app-view > main > :is(.admin-head,.meetings-head,.profile-head,.economy-head,.crafting-head,.gangs-head,.intelligence-head,.bm-head,.laundering-head,.robbery-head,.armory-head,.trader-head,.garage-head,.members-head) {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0 0 30px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.app-view > main > :is(header,.admin-head,.meetings-head)::after { content: ""; position: absolute; width: 72px; height: 2px; background: var(--bronze); bottom: -1px; left: 0; pointer-events: none; }
.app-view > main > :is(header,.admin-head,.meetings-head) > div { min-width: 0; }
.app-view > main > :is(header,.admin-head,.meetings-head) h1 {
  margin: 0;
  color: #f3f2ef;
  font: 700 clamp(42px, 5.3vw, 76px)/.98 'Barlow Condensed', sans-serif;
  letter-spacing: -.5px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.app-view > main > :is(header,.admin-head,.meetings-head) h1::after { content: "."; color: var(--bronze); }
.app-view > main > :is(header,.admin-head,.meetings-head) .eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; }
.app-view > main > :is(header,.admin-head,.meetings-head) .eyebrow::before { content: ""; width: 5px; height: 5px; flex: none; background: var(--bronze); }
.app-view > main > :is(header,.admin-head,.meetings-head) > div > p:last-child:not(.eyebrow) { margin: 17px 0 0; max-width: 650px; color: #a9a9a9; font-size: 12px; line-height: 1.8; }
:is(.economy-actions,.crafting-actions,.gang-toolbar,.armory-head-actions,.garage-head-actions,.intelligence-head-actions,.laundering-head-actions) { flex-wrap: wrap; gap: 9px; }
:is(.crafting-section-head,.robbery-history-head,.laundering-section-head,.section-head) { gap: 18px; flex-wrap: wrap; }
:is(.crafting-section-head,.robbery-history-head,.laundering-section-head,.section-head) h2 { font-size: 29px; }
:is(.crafting-section-head,.robbery-history-head,.laundering-section-head,.section-head) p { color: var(--muted); font-size: 12px; line-height: 1.7; }

/* Overview: a masthead and a compact directory of real, permitted destinations. */
.home-view { padding: 44px var(--theme-inset) 64px; background: radial-gradient(ellipse at 90% 0,#302b2040,transparent 45%),var(--ink); }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 130px; max-width: 1380px; margin: 0 auto 34px; padding: 0 0 34px; border-bottom: 1px solid var(--line); text-align: left; }
.home-hero::after { content: ""; width: 72px; height: 2px; position: absolute; left: 0; bottom: -1px; background: var(--bronze); }
.home-hero .home-logo { grid-column: 2; grid-row: 1 / 4; align-self: center; width: 124px; height: 124px; margin: 0; opacity: .9; }
.home-hero .eyebrow { grid-column: 1; grid-row: 1; margin: 0 0 18px; }
.home-hero h1 { grid-column: 1; grid-row: 2; font-size: clamp(54px,7vw,98px); line-height: .95; letter-spacing: -.5px; }
.home-hero h1::after { content: "."; color: var(--bronze); }
.home-hero > p:last-child { grid-column: 1; grid-row: 3; margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.home-navigation { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; width: 100%; max-width: 1380px; }
.home-card { width: 100%; height: auto; min-height: 135px; display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; gap: 16px; padding: 22px; border-color: var(--line); border-radius: 5px; background: var(--theme-card); }
.home-card:hover { transform: none; background: #252525; border-color: #847556; }
.home-card-number { font: 11px Consolas,monospace; color: #b6a07b; align-self: start; margin-top: 3px; }
.home-card strong { color: #ececdf; font: 600 28px/1.1 'Barlow Condensed',sans-serif; }
.home-card small { margin-top: 9px; font-size: 11px; line-height: 1.7; color: #a5a5a5; }
.home-card-arrow { font-size: 21px; }

/* Panels retain their feature-specific grids and interactions. */
:is(.warehouse-card,.gang-card,.garage-card,.trader-card,.robbery-card,.robbery-run-card,.weekly-card,.debt-card,.manual-debt-card,.calculator-card,.money-column,.finance-history,.intel-index,.intel-detail,.gang-detail,.bm-order-summary,.bm-history-card,.laundering-gang-card,.laundering-entry,.preset-card,.profile-section,.member-category) {
  border-color: var(--line);
  border-radius: 5px;
  background: var(--theme-card);
  box-shadow: inset 0 1px #ffffff05, 0 8px 22px #0003;
}
:is(.warehouse-card,.gang-card,.garage-card,.laundering-gang-card):hover { border-color: #847556; background: #252525; }
:is(.warehouse-card,.gang-card,.laundering-gang-card).active { border-color: var(--bronze); background: #282828; box-shadow: inset 3px 0 var(--bronze); }
:is(.warehouse-card,.gang-card) strong { font-size: 29px; }
:is(.warehouse-card,.gang-card,.garage-card,.trader-card,.robbery-card) p { color: #afafaf; line-height: 1.7; }
:is(.garage-card,.trader-card,.robbery-card) h2 { color: #eeeddf; font-size: 31px; }
:is(.material-total,.laundering-summary article,.armory-summary > button,.bm-analytics-summary article,.stats-row > div) { background: var(--theme-card); border: 1px solid var(--line); border-radius: 5px; }
:is(.material-total,.laundering-summary article,.armory-summary > button) { padding: 20px; }
:is(.material-total,.laundering-summary article,.armory-summary > button) small { color: #a8a8a8; font: 600 10px/1.5 Inter,sans-serif; letter-spacing: 1px; }
:is(.material-total,.laundering-summary article,.armory-summary > button) strong { color: #e0c69f; font-family: 'Barlow Condensed',sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
:is(.garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters,.bm-toolbar,.laundering-filters) { padding: 18px; border: 1px solid var(--line); border-radius: 5px; background: #141416; gap: 14px; }
:is(.garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters,.bm-toolbar,.laundering-filters) label { color: #acacac; font: 500 11px/1.5 Inter,sans-serif; letter-spacing: .3px; text-transform: none; }
:is(.garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters,.bm-toolbar,.laundering-filters) input,
:is(.garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters,.bm-toolbar,.laundering-filters) select { min-height: 42px; font-size: 12px; }
:is(.economy-tabs,.gang-tabs,.bm-tabs) { gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: #111113; overflow-x: auto; }
:is(.economy-tab,.gang-tab,.bm-tabs button) { white-space: nowrap; min-height: 42px; border-radius: 3px; font-size: 12px; }
:is(.economy-tab,.gang-tab,.bm-tabs button).active { background: #2e2821; border-color: var(--bronze); color: #f0e2cb; }

/* Finance, stock and trade. */
.balance-card { border-color: #60553e; border-radius: 5px; background: linear-gradient(115deg,#23201c,#171719); }
.finance-balance-summary > div { padding: 26px; border-color: #474734; }
.finance-balance-metric.projected { background: #232326; }
.balance-card strong { color: #e1c79f; font-variant-numeric: tabular-nums; }
.money-column header, .weekly-card-head { background: #222222; border-bottom-color: var(--line); border-radius: 4px 4px 0 0; }
.money-entry { border-color: #303030; }
:is(.finance-edit,.edit-user,.recipe-edit,.bm-edit-product,.intel-profile-button) { border: 1px solid #49494f; border-radius: 3px; background: #242427; color: #dfdfdf; }
.material-totals { gap: 12px; border: 0; }
.material-total { border-left: 2px solid #9b8865; }
.material-total .material-thumb-empty { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border: 1px dashed #4f4f4f; border-radius: 4px; color: #a8a8a8; font-size: 16px; }
.calculator-card { padding: 24px; }
.calculator-fields { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.recipe-list { border-color: var(--line); }
.warehouse-grid,.gang-grid,.garage-vehicle-grid,.trader-grid { gap: 16px; }
.bm-order-summary { min-width: 0; border-color: #62573f; }
.bm-total { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; padding: 18px; background: #09090b; border-color: #514831; border-radius: 4px; }
.bm-total span { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.bm-total strong { min-width: 0; color: #e0c69f; text-align: left; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bm-product-row label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.bm-unit-price,.bm-line-total { min-width: 0; overflow-wrap: anywhere; }
.laundering-summary { gap: 14px; }
.laundering-profile-tools { padding: 24px; border: 1px solid #62573f; border-radius: 5px; background: #141416; }
.laundering-customer,.laundering-rate { border-color: var(--line); background: #0b0b0d; }
.laundering-empty { border: 1px dashed #474747; border-radius: 5px; background: #14141650; }

/* Directories, profiles, meetings and operations. */
.intel-index-head { background: #242424; border-color: var(--line); color: #d6c19e; }
.intel-person-row { border-color: #303030; }
.intel-person-row:hover,.intel-person-row.active { background: #292929; }
.intel-avatar,.intel-profile-placeholder,.large-avatar { background: #282828; color: #cebc98; border-color: #625a42; }
.intel-section,.intel-profile-head { border-color: var(--line); }
.intel-facts article,.intel-vehicles article,.intel-timeline article > div { background: #0b0b0d; border-color: #393939; border-radius: 4px; }
.intel-profile-head h2 { font-size: 38px; }
.intel-detail-empty { color: var(--muted); }
.intel-detail-empty h2 { color: var(--text); }
.intel-trust i.filled { background: #cfb998; }
#membersDirectoryPanel { max-width: none; }
#membersDirectoryPanel .member-card { background: var(--theme-card); border-color: var(--line); border-radius: 5px; }
#membersDirectoryPanel .member-card:hover { background: #252525; border-color: #847556; }
#membersDirectoryPanel .member-card-photo { border-color: #645a43; background-color: #272727; }
.members-summary span { background: #212121; border-color: var(--line); border-radius: 4px; }
.member-category { padding: 22px; margin-top: 22px; }
.member-category > header { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.member-category > header h2 { font-size: 30px; }
.member-category > header > span { color: #d6c09c; }
.meetings-layout { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; min-height: 520px; margin-top: 8px; }
.meeting-index { background: #141416; border-color: var(--line); }
.index-label { background: #222222; border-color: var(--line); }
.meeting-list-item { border-color: #303030; }
.meeting-list-item.active,.meeting-list-item:hover { background: #292929; }
.meeting-detail { background: #151515; padding: 30px; }
.minutes-header,.agenda-item { border-color: var(--line); }
.minutes-section li { background: #222222; }
.meeting-empty { min-height: 360px; }
.profile-content { width: 100%; padding-top: 8px; max-width: 1200px; }
.profile-section { padding: 28px; margin-top: 20px; }
.profile-identity { border-color: var(--line); }
.robbery-card section,.robbery-run-details { border-color: var(--line); }
.robbery-run-card { border-left: 2px solid #a38f6a; }
.armory-summary > button:hover { border-color: #a38f6a; }
.armory-table-wrap,.user-table-wrap { border: 1px solid var(--line); border-radius: 5px; overflow: auto; background: #171719; }
.stats-row { gap: 12px; border: 0; }
.admin-navigation,.preset-admin { border-color: var(--line); }

/* Keep feature surfaces neutral while retaining warning and status colours. */
.bm-category > header,.index-label { background: #222225; }
.bm-empty,.recipe-card,.ingredient-result:not(.missing),.robbery-accordion-body { background: #141416; }
.robbery-accordion-head:hover,.robbery-accordion-head:focus-visible { background: #232326; }
.darkchats-view { --dc-line: var(--line); --dc-muted: var(--muted); background: var(--ink); }
.darkchat-card { background: var(--theme-card); box-shadow: inset 0 1px #ffffff05, 0 8px 22px #0003; }
.darkchat-contact-icon { background: #28231e; border-color: #625443; }
.darkchat-access { background: #09090b; border-color: #625443; }
.darkchat-access-heading { background: #24201b; border-color: #494038; }
.darkchat-credentials > div + div { border-color: #303036; }
.darkchat-credentials dt,.darkchat-label { color: #b6b3bd; }
.darkchat-purpose p,.darkchat-note-details summary { color: #bbb8c2; }
.darkchat-card-foot,.darkchats-page-foot { border-color: var(--line); color: #a8a4af; }
.darkchat-card-foot strong { color: #ccc8d2; }
.darkchat-search input { background: #141416; }
.darkchat-search input::placeholder { color: #a19da8; }
.darkchat-empty { background: #14141680; border-color: #46424b; }
.darkchat-dialog input,.darkchat-dialog textarea { background: #09090b; border-color: #49494f; }

/* Map chrome only: canvas, markers, controls and gestures keep their geometry. */
.map-layout .side-panel,.map-layout .detail-panel { background: #131315; border-color: var(--line); }
.map-layout .panel-heading { padding-top: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.map-layout .panel-heading h2 { font-size: 33px; }
.map-selector-wrap { background: #202020; border-color: #5a523a; border-radius: 4px; }
.pin-item { border-color: #303030; }
.pin-item:hover,.pin-item.active { background: #292929; }
.map-meta,.map-tip,.map-controls { background: #131315ed; border-color: #61563d; border-radius: 4px; }
.map-meta,.map-tip { color: #c8b796; }
.map-controls button { border-color: #3c3c3c; }
.map-controls button:hover { background: #2d2d2d; }
.map-layout .panel-foot { border-color: var(--line); color: #a7a7a7; }

/* Forms and confirmation share the same surface, without changing modal sizes. */
dialog:has(> form), dialog:has(> .credential-box) { background: #171719; border-color: #625841; border-radius: 5px; box-shadow: 0 30px 90px #0009; }
dialog::backdrop { background: #090909cc; backdrop-filter: blur(5px); }
dialog form > .modal-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
dialog form > .modal-head h2 { font-size: 36px; }
dialog form > .modal-head .eyebrow { margin-bottom: 8px; }
dialog .modal-actions { border-top: 1px solid var(--line); padding-top: 20px; gap: 9px; flex-wrap: wrap; }
dialog .modal-actions button { min-height: 44px; }
dialog :is(.field-grid,.field-grid > label,.field-grid input) { min-width: 0; }
dialog :is(.robbery-form-section,.attendance-editor,.agenda-editor,.profile-section) { border-color: var(--line); }
.credential { border-color: #7d6a48; background: #111111; border-radius: 4px; }
.kollektiv-confirm-dialog { border-color: #625841; background: #171719; }
.kollektiv-confirm-message { color: #b8b8b8; }
.toast { background: #e3d3b7; color: #161616; border: 1px solid #b39c72; box-shadow: 0 10px 30px #0004; }

/* The entry screen belongs to the same system. */
.login-brand { background: radial-gradient(ellipse at 50% 42%,#3a332047,transparent 60%),#070708; border-color: #373737; }
.login-panel { background: #171719; }
.login-brand .brand-logo { filter: drop-shadow(0 18px 30px #0005); }
.login-brand .brand-copy,.login-brand .system-status { color: #c8b18a; }
.login-panel .auth-heading .eyebrow { color: #cfb998; }
.login-panel .auth-heading h2 { font-size: 42px; }
.login-panel .auth-heading > p:last-child { font-size: 12px; line-height: 1.7; color: #ababab; }
.login-panel .auth-form label { font-size: 11px; letter-spacing: .3px; }
.login-panel .auth-form > .primary-btn { min-height: 47px; }
.login-panel input:not([type="checkbox"]) { min-height: 46px; }
.login-brand::after { background: url("assets/kollektivet-logo-transparent.png") 20px 10px / 360px 298px repeat; opacity: .03; filter: grayscale(1); pointer-events: none; }

/* Responsive rules keep every control reachable as available content narrows. */
@media (min-width: 1700px) {
  :root { --theme-inset: max(64px,calc((100vw - var(--nav-width) - 1380px)/2)); }
}
@media (max-width: 1350px) {
  .bm-calculator { grid-template-columns: minmax(0,1fr); }
  .bm-order-summary { position: static; }
}
@media (max-width: 1200px) {
  .armory-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .economy-columns { grid-template-columns: minmax(0,1fr); }
  .home-navigation { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-card { padding: 20px; }
  .app-view > main > :is(header,.admin-head,.meetings-head) h1 { font-size: 57px; }
  .intel-toolbar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .intel-toolbar label:first-child { grid-column: 1 / -1; }
  .intel-layout { grid-template-columns: minmax(220px,.8fr) minmax(0,1.2fr); }
}
@media (max-width: 950px) {
  .app-view > main > :is(header,.admin-head,.meetings-head) { align-items: flex-start; flex-direction: column; }
  .app-view > main > :is(header,.admin-head,.meetings-head) h1 { font-size: 50px; }
  .home-hero { grid-template-columns: minmax(0,1fr) 85px; }
  .home-hero .home-logo { width: 80px; height: 90px; }
  .home-hero h1 { font-size: 65px; }
  .intel-layout,.meetings-layout,.profile-section { grid-template-columns: minmax(0,1fr); }
  .meeting-index { border-right: 0; border-bottom: 1px solid var(--line); }
  .meeting-list { max-height: 250px; overflow: auto; }
  .intel-person-list { max-height: 290px; }
  .intel-profile-head { grid-template-columns: 80px minmax(0,1fr); }
  .intel-profile-actions { grid-column: 1 / -1; }
  .garage-filters,.armory-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .laundering-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-layout, .map-layout:has(.detail-panel:not(.hidden)) { grid-template-columns: minmax(0,1fr); grid-template-rows: 380px minmax(380px,1fr); overflow: auto; }
  .map-layout .side-panel { position: static; transform: none; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .map-layout .panel-heading { padding: 18px 20px; margin-bottom: 12px; }
  .map-layout .detail-panel { position: absolute; right: 0; top: var(--header); bottom: 0; width: min(340px,calc(100vw - var(--nav-width))); }
}
@media (max-width: 700px) {
  :root { --theme-inset: 16px; --nav-width: 0px; }
  .main-nav { bottom: auto; width: 100%; height: 62px; flex-direction: row; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .main-nav .nav-btn { flex: 0 0 auto; grid-template-columns: 20px auto; gap: 8px; min-height: 40px; }
  .main-nav .nav-btn > span:last-child { white-space: nowrap; }
  .main-nav .nav-btn.active { box-shadow: inset 0 -2px var(--bronze); }
  .app-view > main { margin-top: 62px; height: calc(100vh - var(--header) - 62px) !important; height: calc(100dvh - var(--header) - 62px) !important; }
  .app-view > main:not(.map-layout)::before { top: calc(var(--header) + 62px); background-size: 270px 224px; opacity: .025; }
  .map-layout .detail-panel { top: calc(var(--header) + 62px); width: min(340px,100%); }
  .app-view > :is(.admin-view,.meetings-view,.profile-view,.economy-view,.crafting-view,.gangs-view,.intelligence-view,.bm-view,.laundering-view,.robbery-view,.armory-view,.trader-view,.garage-view,.members-view) { padding-top: 26px; padding-bottom: 40px; }
  .app-view > main > :is(header,.admin-head,.meetings-head) { gap: 20px; padding-bottom: 24px; margin-bottom: 23px; }
  .app-view > main > :is(header,.admin-head,.meetings-head) h1 { font-size: clamp(30px,6.7vw,46px); }
  .app-view > main > :is(header,.admin-head,.meetings-head) > div > p:last-child:not(.eyebrow) { font-size: 11px; margin-top: 13px; }
  .app-view > main > :is(header,.admin-head,.meetings-head) .eyebrow { font-size: 8px; letter-spacing: .8px; margin-bottom: 12px; }
  :is(.crafting-actions,.gang-toolbar,.armory-head-actions,.garage-head-actions,.intelligence-head-actions) { display: flex; width: 100%; }
  :is(.crafting-actions,.gang-toolbar,.armory-head-actions,.garage-head-actions,.intelligence-head-actions) > * { max-width: 100%; flex: 1 1 auto; }
  .primary-btn,.ghost-btn { padding: 11px 13px; font-size: 11px; }
  .home-view { padding: 26px var(--theme-inset) 40px; }
  .home-hero { display: block; margin-bottom: 24px; padding-bottom: 24px; }
  .home-hero .home-logo { width: 62px; height: 62px; margin: 0 0 18px; }
  .home-hero h1 { font-size: clamp(34px,7.8vw,54px); overflow-wrap: anywhere; }
  .home-navigation { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .home-card { min-height: 116px; padding: 18px 14px; gap: 10px; grid-template-columns: 18px minmax(0,1fr) 14px; }
  .home-card strong { font-size: 26px; }
  .home-card small { font-size: 10px; }
  .home-card-number { font-size: 9px; }
  .home-hero .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .member-category { padding: 14px; }
  .member-category > header { flex-wrap: wrap; gap: 12px; }
  .profile-section { padding: 18px 14px; }
  .meeting-detail { padding: 22px 14px; }
  .intel-profile-head { padding: 18px 14px; gap: 14px; }
  .intel-section { padding: 18px 14px; }
  .calculator-card { padding: 18px 14px; }
  .finance-balance-summary > div { padding: 20px; }
  .laundering-profile-tools { padding: 18px 14px; }
  .stats-row { grid-template-columns: minmax(0,1fr); }
  dialog form > .modal-head h2 { font-size: 30px; }
}
@media (max-width: 520px) {
  .garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters,.laundering-summary,.armory-summary,.calculator-fields { grid-template-columns: minmax(0,1fr); }
  .intel-toolbar label:first-child { grid-column: auto; }
  .garage-filters,.armory-toolbar,.intel-toolbar,.trader-filters { padding: 13px; }
  .economy-actions { flex-direction: column; }
  .money-entry { grid-template-columns: minmax(0,1fr) auto; padding: 15px 12px; gap: 10px; }
  .money-entry time { grid-column: 1 / -1; }
  .garage-vehicle-grid,.gang-grid,.warehouse-grid,.trader-grid { grid-template-columns: minmax(0,1fr); }
  .member-category > header h2 { font-size: 24px; overflow-wrap: anywhere; }
  dialog form { padding: 22px 18px; }
  dialog .field-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .app-view button, dialog button { transition: none; }
}
