/* FOBA visual system. Loaded in <head>, after legacy foundations.
   Scope excludes other RPG systems. No rules, calculations or saved values. */
body.foba-design {
  --ui-bg:#101316; --ui-panel:#191e23; --ui-inset:#13181c;
  --ui-line:#354048; --ui-text:#edf1f3; --ui-muted:#b1bec7;
  --ui-accent:#88dce3; --ui-gold:#e5ca91;
  background:var(--ui-bg); color:var(--ui-text);
  font-family:Inter,Arial,sans-serif; line-height:1.55;
}
body.foba-design :is(.site-main,.helper-section,.foba-container,.rb-container,.gen-container,.foba-list,.view-char-section,.create-char-section) { min-width:0; }
body.foba-design :is(.helper-section,.foba-container,.rb-container,.gen-container,.foba-list,.view-char-section,.create-char-section) *,
body.foba-design :is(.lr-sidebar,.lr-main) * { box-sizing:border-box; }
body.foba-design .site-main { padding-top:20px; }
body.foba-design .content-container { max-width:1320px; padding:12px 0 0; }
body.foba-design .breadcrumbs-wrapper { max-width:1280px; margin-bottom:0; padding:12px 20px 0; }
body.foba-design :is(.helper-section,.foba-container,.rb-container,.gen-container,.foba-list) {
  width:100%; max-width:1280px; margin:0 auto; padding:24px 20px 48px;
}
body.foba-design :is(.helper-header,.foba-module-header,.rb-header,.gen-header) {
  display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; margin:0 0 24px;
}
body.foba-design :is(.page-title,.foba-title,.rb-title,.lr-portal-title) {
  font-family:Inter,Arial,sans-serif; font-size:clamp(1.65rem,2.6vw,2.25rem);
  line-height:1.2; letter-spacing:-.035em; font-weight:700; margin:0;
  color:var(--ui-text); -webkit-text-fill-color:currentColor;
  background:none; text-shadow:none; text-transform:none; overflow-wrap:break-word;
}
body.foba-design :is(h2,h3,h4) { text-wrap:pretty; }
body.foba-design :is(.back-link,.rb-back-btn,.foba-btn-back) {
  flex:none; font:500 .85rem/1.4 Inter,Arial,sans-serif;
  min-height:40px; padding:9px 12px; border:1px solid var(--ui-line);
  border-radius:8px; background:var(--ui-panel); color:var(--ui-muted); text-decoration:none;
}
body.foba-design :is(button,input,select,textarea) { font-family:Inter,Arial,sans-serif; }
body.foba-design :is(input,select,textarea) { max-width:100%; }
body.foba-design :is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--ui-accent); outline-offset:3px; }
body.foba-design :is(input[type=checkbox],input[type=radio]) { min-height:0; accent-color:#62c5d0; }
body.foba-design #social-promo { display:none!important; }
body.foba-design .feedback-fab { width:42px; height:42px; bottom:14px; right:14px; }
/* Catalog: generous content columns, prices never compete with names. */
body.foba-design .helper-section :is(.grid-2,.keywords-grid),
body.foba-design .rb-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:18px; }
body.foba-design .helper-section > .grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
body.foba-design :is(.item-card,.keyword-card,.race-card,.rb-card,.scenario-card,.sheet-card) {
  min-width:0; padding:22px; border:1px solid var(--ui-line); border-radius:12px;
  background:var(--ui-panel); box-shadow:none; height:auto;
  color:var(--ui-text); transform:none; overflow-wrap:break-word;
}
body.foba-design :is(.item-card,.keyword-card,.race-card,.rb-card):hover { transform:none; box-shadow:none; border-color:#52636d; }
body.foba-design :is(.item-header,.keyword-header,.race-header,.rb-card-top) { gap:16px; align-items:flex-start; margin-bottom:16px; }
body.foba-design :is(.item-header h3,.keyword-header h2,.race-header h2,.rb-card-title,.sheet-card h2,.scenario-card h3) {
  min-width:0; margin:0; font:650 1.12rem/1.4 Inter,Arial,sans-serif;
  color:var(--ui-text); letter-spacing:-.015em; text-transform:none; overflow-wrap:break-word;
}
body.foba-design :is(.cost-badge,.rank-badge,.setting-badge,.req-tag,.rb-rank-badge) {
  flex-shrink:0; align-self:flex-start; white-space:normal; max-width:45%;
  padding:5px 8px; font:600 .78rem/1.4 Inter,Arial,sans-serif;
  border-radius:5px; color:var(--ui-accent); background:#22343b;
  border:1px solid #3e5960; box-shadow:none; text-shadow:none;
}
body.foba-design .cost-badge { white-space:nowrap; font-variant-numeric:tabular-nums; }
body.foba-design .fantasy-style :is(.rank-badge,.setting-badge) { color:var(--ui-gold); background:#322c22; border-color:#5a4d36; }
body.foba-design :is(.item-meta,.keyword-meta) { margin:0 0 16px; }
body.foba-design .item-meta .meta-row {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:6px 16px; padding:7px 0; align-items:baseline; border-bottom:1px solid #2b353c;
  font-size:.88rem; line-height:1.5; background:none;
}
body.foba-design .meta-row .label { color:var(--ui-muted); min-width:0; }
body.foba-design .meta-row .value { color:var(--ui-text); min-width:0; text-align:right; overflow-wrap:break-word; }
body.foba-design :is(.item-description,.keyword-description,.feature-content,.rb-card-desc,.race-feature) {
  font:400 .95rem/1.65 Inter,Arial,sans-serif; color:#d2dbe1; overflow-wrap:break-word; padding-top:0;
}
body.foba-design :is(.item-description,.keyword-description) p { margin:0 0 .8em; }
body.foba-design :is(.item-description,.keyword-description) :is(ul,ol) { padding-left:1.25em; }
body.foba-design .special-text { font-weight:650; }
body.foba-design .expandable-trigger {
  width:100%; min-height:44px; padding:11px 0; margin:10px 0 0;
  border:0; border-top:1px solid var(--ui-line); background:none; text-align:left;
  font:600 .9rem/1.5 Inter,Arial,sans-serif; color:var(--ui-accent);
}
body.foba-design .expandable-content { padding-top:12px; }
/* Search, advanced filters, then multi-select categories: same order everywhere. */
body.foba-design .filter-controls { gap:12px; padding:16px; background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:12px; margin:0 0 16px; }
body.foba-design .filter-primary-row { gap:12px; align-items:end; }
body.foba-design .search-container { flex:1 1 280px; }
body.foba-design .foba-ui-sort { flex:0 1 240px; }
body.foba-design :is(.foba-input,.foba-select,.rb-search,.rb-select,.psychotest-input) {
  min-height:44px; padding:10px 12px; border:1px solid #47555e; border-radius:7px;
  background:var(--ui-inset); color:var(--ui-text); font-size:1rem; line-height:1.4;
}
body.foba-design .filter-panel { padding:16px 0 0; background:none; border:0; border-top:1px solid var(--ui-line); gap:16px; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); }
body.foba-design .filter-group { min-width:0; }
body.foba-design .filter-group label { display:block; margin-bottom:6px; font-size:.8rem; color:var(--ui-muted); text-transform:none; }
body.foba-design :is(.filter-toggle-btn,.foba-ui-button,.foba-ui-chip) { border-radius:7px; min-height:40px; font-size:.82rem; background:#242e35; border-color:#42525d; color:var(--ui-text); }
body.foba-design .filter-toggle-btn { min-height:44px; }
body.foba-design .foba-ui-summary { padding-top:12px; gap:10px; }
body.foba-design .foba-ui-count { font-size:.85rem; color:var(--ui-muted); }
body.foba-design .foba-facet { padding:12px 14px; margin-bottom:12px; background:var(--ui-inset); border-color:#303c44; border-radius:10px; }
body.foba-design .foba-facet-head { margin-bottom:10px; gap:12px; }
body.foba-design .foba-facet-title { font-size:.85rem; color:#cdd8df; }
body.foba-design .foba-facet-hint { font-size:.74rem; }
body.foba-design .foba-facet-options { gap:7px; }
body.foba-design .foba-facet-choice { min-height:40px; padding:8px 10px; gap:7px; font-size:.82rem; border-radius:6px; background:#1c252c; border-color:#3b4953; }
body.foba-design .foba-facet-choice.active { color:#d5f6f9; background:#21424a; border-color:#6ac5d0; box-shadow:none; }
body.foba-design .foba-facet-choice[aria-disabled=true] { opacity:.65; }
body.foba-design .foba-facet-count { background:#121c23; font-size:.7rem; min-width:1.8em; }
/* Hub. Two columns on phones, no search. */
body.foba-design #foba-helper-home { padding-top:16px; }
body.foba-design .foba-hub-heading { margin:0 0 28px; }
body.foba-design .foba-hub-heading .page-title { text-align:left; }
body.foba-design .foba-hub-heading p { color:var(--ui-muted); margin:10px 0 0; }
body.foba-design .foba-hub-group { margin:0 0 32px; }
body.foba-design .foba-hub-group > h2 { font:600 .85rem/1.5 Inter,Arial,sans-serif; color:var(--ui-muted); letter-spacing:.04em; margin:0 0 12px; }
body.foba-design #foba-helper-home .grid-2 { grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:12px!important; }
@media(min-width:1051px) { body.foba-design #foba-helper-home .foba-hub-group:nth-of-type(n+3) .grid-2 { grid-template-columns:repeat(3,minmax(0,1fr))!important; } }
body.foba-design #foba-helper-home .tool-card { padding:18px 12px!important; min-height:142px; gap:7px; border-radius:10px; background:var(--ui-panel); border:1px solid var(--ui-line); transform:none; box-shadow:none; }
body.foba-design #foba-helper-home .tool-card:hover { background:#202b32; border-color:#67929b; }
body.foba-design #foba-helper-home .card-icon { font-size:1.6rem!important; margin:0!important; }
body.foba-design #foba-helper-home .tool-card h3 { font:600 .95rem/1.4 Inter,Arial,sans-serif!important; margin:0!important; }
body.foba-design #foba-helper-home .tool-card p { font-size:.8rem!important; line-height:1.5!important; color:var(--ui-muted); margin:0!important; }
/* Rules and reading views. Preserve navigation and public formatting markers. */
body.foba-design .rules-layout { grid-template-columns:270px minmax(0,1fr); gap:24px; align-items:start; }
body.foba-design .rules-sidebar { background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:10px; padding:16px; }
body.foba-design .rules-content { background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:12px; padding:28px; }
body.foba-design :is(.rule-text,.lr-content,.lr-article) { font-family:Inter,Arial,sans-serif; font-size:1rem; line-height:1.8; color:#d5dee4; }
body.foba-design .rule-text :is(h2,h3) { line-height:1.35; margin-block:1.5em .7em; }
body.foba-design .chapter-link { font-size:.85rem; line-height:1.5; border-radius:6px; }
body.foba-design .chapter-nav { margin-top:28px; padding-top:20px; border-top:1px solid var(--ui-line); }
body.foba-design .lr-sidebar { background:var(--ui-panel); border-right-color:var(--ui-line); }
body.foba-design :is(.lr-portal,.lr-article) { max-width:1050px; margin-inline:auto; }
body.foba-design .lr-card { border-radius:12px; box-shadow:none; }
/* Materials, generators and bestiary. */
body.foba-design :is(.sheets-grid,.print-grid,.options-grid,.scenario-grid) { gap:18px; }
body.foba-design .sheet-card { padding:24px; }
body.foba-design :is(.sheet-links,.travel-settings,.gen-tabs) { gap:10px; flex-wrap:wrap; }
body.foba-design :is(.sheet-download,.foba-btn,.roll-btn,.gen-tab,.option-btn) { min-height:44px; font-family:Inter,Arial,sans-serif; white-space:normal; }
body.foba-design .sheet-description { color:var(--ui-muted); line-height:1.6; }
body.foba-design :is(.print-help,.result-card,.gen-panel,.step) { border-radius:12px; }
body.foba-design .gen-panel { background:var(--ui-panel); border:1px solid var(--ui-line); padding:24px; }
body.foba-design .dice-row { gap:14px; padding:14px 0; align-items:center; }
body.foba-design .dice-meaning { min-width:0; line-height:1.6; }
body.foba-design .scenario-card { padding:0; overflow:hidden; }
body.foba-design .scenario-content { padding:20px; }
body.foba-design .rb-badges { gap:8px; flex-wrap:wrap; }
body.foba-design .rb-intro { padding:12px 16px; margin-bottom:16px; border:1px solid var(--ui-line); border-radius:8px; background:var(--ui-panel); box-shadow:none; font-size:.88rem; }
body.foba-design .rb-intro summary { cursor:pointer; min-height:24px; color:var(--ui-muted); font-weight:600; }
body.foba-design .rb-intro-content { padding-top:12px; line-height:1.65; }
body.foba-design .rb-title { flex:1; text-align:left; }
/* Scenario reader keeps its separate progress controls, without global font leakage. */
body.foba-design .foba-scenario { gap:18px; max-width:1280px; margin:0 auto; padding:16px 20px 40px; }
body.foba-design .foba-scenario :is(h2,h3,h4) { font-family:Inter,Arial,sans-serif; text-transform:none; letter-spacing:0; line-height:1.4; color:var(--ui-text); border-bottom:1px solid var(--ui-line); }
body.foba-design .foba-scenario :is(.sidebar,.status-panel) { background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:10px; padding:16px; }
body.foba-design .foba-scenario .main-content { background:none; padding:0; min-width:0; }
body.foba-design .foba-scenario :is(.card,.node-card,.intro-module) { padding:20px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-panel); box-shadow:none; margin-bottom:16px; }
body.foba-design .foba-scenario :is(p,.desc,.clue-text) { font:400 .95rem/1.75 Inter,Arial,sans-serif; color:#d1dce3; }
body.foba-design .foba-scenario .nav-btn { min-height:44px; font:600 .84rem/1.5 Inter,Arial,sans-serif; text-transform:none; padding:10px 12px; }
body.foba-design .foba-scenario .scenario-header { margin:0; padding:12px 16px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-panel); }
body.foba-design .foba-scenario .progress-module h2 { font-size:1rem; }
body.foba-design .foba-scenario .grid-container { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
body.foba-design .foba-scenario-close { display:none; }
@media(min-width:900px) { body.foba-design .foba-scenario { grid-template-columns:190px minmax(0,1fr) 235px; } }
@media(max-width:899px) {
  body.foba-design .foba-scenario { margin-top:0; padding:12px; }
  body.foba-design .foba-scenario .scenario-header { position:static; height:auto; min-height:64px; gap:12px; }
  body.foba-design .foba-scenario .mobile-title { font:600 .88rem/1.4 Inter,Arial,sans-serif; text-transform:none; }
  body.foba-design .foba-scenario .sidebar { top:0; z-index:2100; border-radius:0; }
  body.foba-design .foba-scenario-close { display:block; min-height:44px; padding:10px; margin-bottom:16px; border:1px solid var(--ui-line); background:var(--ui-inset); color:var(--ui-text); border-radius:6px; text-align:left; }
  body.foba-design .foba-scenario .menu-toggle { min-width:40px; min-height:40px; }
}
/* Character sheets. Values have their own fixed-width tracks. */
body.foba-design :is(.view-char-section,.create-char-section) { max-width:1280px!important; padding:20px 20px 48px; color:var(--ui-text); }
body.foba-design .view-char-section .panel { container-type:inline-size; padding:22px; background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:12px; margin-bottom:20px; }
body.foba-design .view-char-section .grid-2-col { grid-template-columns:1.05fr 1fr; gap:20px; align-items:start; }
body.foba-design .view-char-section .panel-title { font:650 1.03rem/1.4 Inter,Arial,sans-serif; color:var(--ui-text); margin:0 0 16px; padding:0 0 12px; border-bottom:1px solid var(--ui-line); letter-spacing:0; }
body.foba-design .view-char-section .skills-view-list { display:grid; grid-template-columns:minmax(0,1fr); gap:0 24px; }
body.foba-design .view-char-section .skills-view-list li {
  display:grid!important; grid-template-columns:minmax(0,1fr) 3ch;
  align-items:center; gap:14px; padding:10px 0!important; min-height:44px;
  border-bottom:1px solid #303b43!important; font-size:.88rem; line-height:1.45;
}
body.foba-design .skills-view-list li span:first-child { min-width:0; white-space:normal; overflow-wrap:break-word; }
body.foba-design .skills-view-list li span:last-child { text-align:right; font-size:1rem; font-variant-numeric:tabular-nums; }
@container (min-width:460px) { body.foba-design .view-char-section .skills-view-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
body.foba-design .view-char-section .kw-v-header { display:flex; align-items:center; gap:12px; padding:14px; min-height:52px; border-radius:7px; font:600 .95rem/1.5 Inter,Arial,sans-serif; background:#20282e; }
body.foba-design .kw-v-name { flex:1; min-width:0; overflow-wrap:break-word; }
body.foba-design .kw-v-rank { flex:none; font-size:.72rem; padding:4px 8px; background:#29444c; color:#bcecf0; }
body.foba-design .kw-v-item { border-color:var(--ui-line); background:var(--ui-inset); border-radius:8px; margin-bottom:10px; overflow:hidden; }
body.foba-design .kw-v-content { padding:16px; color:#ccd8df; font-size:.92rem; line-height:1.7; }
body.foba-design .kw-cat-title { margin:22px 0 12px; font:600 .78rem/1.5 Inter,Arial,sans-serif; letter-spacing:.06em; color:var(--ui-muted); }
body.foba-design .view-char-section .tabs-nav { position:static; padding:6px!important; margin:0 0 20px; border:1px solid var(--ui-line); background:var(--ui-inset); border-radius:10px; gap:6px; }
body.foba-design .view-char-section .tabs-nav .tab-btn { min-height:44px; flex:1 1 125px; padding:10px 12px; font-size:.82rem; text-transform:none; border:0; background:transparent; border-radius:6px; }
body.foba-design .view-char-section .tabs-nav .tab-btn.active { background:#2d4a53; color:#d9f8fa; }
body.foba-design .char-header { background:var(--ui-panel); border:1px solid var(--ui-line); border-radius:12px; box-shadow:none; }
body.foba-design .sheet-counters { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px; }
body.foba-design .sheet-counters input { padding:9px 12px; font-size:1.35rem; min-height:48px; }
body.foba-design .sheet-passives { gap:12px; margin:18px 0; }
body.foba-design .sheet-passives span { display:grid; grid-template-columns:minmax(0,1fr) 3ch; gap:12px; padding:12px; background:var(--ui-inset); font-size:.8rem; }
body.foba-design .sheet-passives strong { text-align:right; }
body.foba-design .sheet-status { color:var(--ui-muted); font-size:.78rem; }
body.foba-design .view-char-section .sheet-panel-head { flex-wrap:nowrap; align-items:center; gap:12px; }
body.foba-design .view-char-section .sheet-panel-head .panel-title { margin:0; padding:0; border:0; }
body.foba-design .sheet-panel-head button { font-size:.82rem; padding:10px 12px; min-height:44px; }
body.foba-design .sheet-item { background:var(--ui-inset); border-color:var(--ui-line); padding:18px; }
body.foba-design .inventory-controls { display:grid!important; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
body.foba-design .inventory-controls textarea { grid-column:1/-1; min-height:110px; }
body.foba-design .create-char-section .char-form-card { padding:26px; border-radius:12px; background:var(--ui-panel); }
body.foba-design .create-char-section .skills-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:10px 22px; }
body.foba-design .create-char-section .skill-item { display:grid; grid-template-columns:minmax(0,1fr) 64px; gap:12px; align-items:center; padding:8px 0; }
body.foba-design .create-char-section .skill-item label { min-width:0; white-space:normal; font-size:.88rem; line-height:1.45; }
body.foba-design .create-char-section .skill-input { width:64px; min-height:44px; text-align:center; }
body.foba-design .create-char-section .section-title { margin:28px 0 16px; color:var(--ui-text); font-size:1.1rem; }
body.foba-design .create-char-section .stats-grid { gap:12px; }
body.foba-design .create-char-section .stat-box { background:var(--ui-inset); border-color:var(--ui-line); }
body.foba-design .create-char-section .keyword-list { border:1px solid var(--ui-line); border-radius:8px; }
body.foba-design .create-char-section .form-actions { margin-top:24px; border-radius:8px; }
body.foba-design .create-char-section .form-actions > div { min-width:0; display:flex; flex-wrap:wrap; gap:10px!important; }
body.foba-design .create-char-section .form-actions :is(button,a) { min-width:0; padding:10px 14px; font-size:.85rem; line-height:1.4; white-space:normal; text-align:center; }
body.foba-design .create-char-section .form-actions > button[type=button] { background:transparent!important; border-color:#775052!important; color:#efb0b2!important; }
body.foba-design .create-char-section .keyword-header { display:grid!important; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start!important; }
body.foba-design .create-char-section .kw-name-text { min-width:0; overflow-wrap:anywhere; }
body.foba-design .create-char-section .ranks-inline { flex:none; }
body.foba-design .create-char-section .ranks-inline label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
body.foba-design:has(.create-char-section) .feedback-fab { bottom:92px; }
@media(max-width:1050px) {
  body.foba-design #foba-helper-home .grid-2 { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
  body.foba-design .helper-section > .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.foba-design .view-char-section .grid-2-col { grid-template-columns:minmax(0,1fr); }
  body.foba-design .rules-layout { grid-template-columns:230px minmax(0,1fr); gap:16px; }
}
@media(max-width:700px) {
  body.foba-design .header-container { gap:8px; padding-inline:12px; }
  body.foba-design .site-header .logo { font-size:14px; white-space:nowrap; }
  body.foba-design .site-header .user-actions { flex-direction:row; flex-wrap:nowrap; gap:2px; }
  body.foba-design .site-header .user-actions .btn:not(.site-login) { padding:8px 5px; font-size:11px; white-space:nowrap; min-height:40px; }
  body.foba-design .site-main { padding-top:8px; }
  body.foba-design :is(.helper-section,.foba-container,.rb-container,.gen-container,.foba-list,.view-char-section,.create-char-section) { padding:16px 12px 40px; }
  body.foba-design :is(.helper-header,.foba-module-header,.rb-header,.gen-header) { gap:10px; margin-bottom:20px; align-items:flex-start; }
  body.foba-design .helper-header { flex-direction:column; }
  body.foba-design :is(.page-title,.foba-title,.rb-title) { font-size:1.65rem; }
  body.foba-design .helper-section :is(.grid-2,.keywords-grid),body.foba-design .helper-section > .grid-3,body.foba-design :is(.rb-grid,.sheets-grid,.print-grid,.scenario-grid) { grid-template-columns:minmax(0,1fr); gap:14px; }
  body.foba-design :is(.item-card,.keyword-card,.race-card,.rb-card,.sheet-card) { padding:18px; }
  body.foba-design .filter-controls { padding:12px; }
  body.foba-design .filter-primary-row { gap:10px; }
  body.foba-design .filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; padding:14px 0 0; }
  body.foba-design .filter-group :is(input,select) { font-size:16px; }
  body.foba-design .filter-group:has(.multi-select-wrapper) { grid-column:1/-1; }
  body.foba-design .foba-ui-count { flex-basis:auto; }
  body.foba-design .foba-ui-sort { flex:1 1 155px; }
  body.foba-design .foba-facet { padding:12px; }
  body.foba-design .foba-facet-choice { min-height:44px; max-width:100%; padding:8px 10px; }
  body.foba-design .foba-facet-hint { margin-left:auto; }
  body.foba-design #foba-helper-home .grid-2 { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:10px!important; }
  body.foba-design #foba-helper-home .tool-card { padding:15px 10px!important; min-height:150px; }
  body.foba-design #foba-helper-home .tool-card h3 { font-size:.88rem!important; }
  body.foba-design #foba-helper-home .tool-card p { font-size:.76rem!important; }
  body.foba-design .foba-hub-heading { margin-bottom:24px; }
  body.foba-design .foba-hub-heading p { font-size:.88rem; }
  body.foba-design .rules-layout { display:block; }
  body.foba-design .rules-content { padding:20px 16px!important; }
  body.foba-design .rules-sidebar { border-radius:0; }
  body.foba-design .rules-content table { display:block; overflow-x:auto; max-width:100%; }
  body.foba-design :is(.options-grid,.travel-settings) { grid-template-columns:minmax(0,1fr); }
  body.foba-design .gen-panel { padding:16px; }
  body.foba-design .dice-row { flex-wrap:wrap; gap:10px; }
  body.foba-design .dice-meaning { flex-basis:100%; }
  body.foba-design .view-char-section .panel { padding:18px; }
  body.foba-design .sheet-counters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.foba-design .sheet-passives { grid-template-columns:minmax(0,1fr); }
  body.foba-design .sheet-quick { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.foba-design .view-char-section .tabs-nav .tab-btn { flex:1 1 95px; font-size:.78rem; }
  body.foba-design .inventory-controls { grid-template-columns:minmax(0,1fr); }
  body.foba-design .create-char-section .char-form-card { padding:16px; }
  body.foba-design .create-char-section .grid-2-col { grid-template-columns:minmax(0,1fr); }
  body.foba-design .create-char-section .form-actions { flex-wrap:wrap; }
  body.foba-design .create-char-section .form-actions > * { flex:1; }
  body.foba-design .create-char-section .form-actions:has(> div) { position:static; flex-direction:column-reverse; align-items:stretch!important; }
  body.foba-design .create-char-section .form-actions > div > * { flex:1 1 110px; }
  body.foba-design .create-char-section .form-actions > div { width:100%; }
}
@media(max-width:380px) {
  body.foba-design .filter-panel { grid-template-columns:minmax(0,1fr); }
  body.foba-design .item-meta .meta-row { gap:10px; }
}
@media(prefers-reduced-motion:reduce) { body.foba-design * { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@media print {
  body.foba-design { background:white; color:#111; }
  body.foba-design :is(.view-char-section,.create-char-section) { max-width:none!important; padding:0; }
  body.foba-design .view-char-section .grid-2-col { display:block; }
  body.foba-design .view-char-section .panel { container-type:normal; background:white; color:#111; border-color:#aaa; break-inside:avoid; }
  body.foba-design .view-char-section .skills-view-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
