@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #f1f2ef;
  --white: #ffffff;
  --ink: #252632;
  --purple: #342744;
  --muted: #777973;
  --orange: #d95531;
  --line: #d7d8d3;
  --soft: #e8e9e4;
  --success: #557160;
  --danger: #b23f32;
  --body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, select, textarea { border-radius: 2px; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
button:focus:not(:focus-visible) { outline: none; }
a { color: var(--purple); text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin-top: 0; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: #ead5ce; color: var(--purple); }

.topbar { min-height: 90px; display: flex; align-items: center; gap: 28px; padding: 0 44px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--purple); }
.brand-wordmark { display: block; flex-shrink: 0; width: 176px; height: auto; }
.edition-label, .version-tag { font: 10px var(--mono); color: var(--muted); letter-spacing: .6px; }
.edition-label span, .version-tag span { margin-inline: 5px; color: var(--orange); }
.edition-label { display: flex; align-items: center; gap: 10px; color: var(--purple); }
.edition-label strong { font: 600 48px/.9 var(--display); letter-spacing: -1px; }
.edition-label span { color: var(--muted); font: 9px/1.6 var(--mono); margin: 0; }
.topbar nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-button { min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--ink); font-size: 12px; }
.nav-button:hover { color: var(--orange); }
.nav-button > span { margin-left: 6px; font: 10px var(--mono); color: var(--muted); }
.page { max-width: 1380px; padding: 27px 44px 0; margin: auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 25px; }
.eyebrow { margin: 0 0 6px; font: 10px var(--mono); color: var(--muted); letter-spacing: .8px; }
.page-heading h1 { margin: 0; color: var(--purple); font: 600 34px/1.05 var(--display); }
.page-heading p:last-child { margin-bottom: 0; font-size: 12px; color: var(--muted); max-width: 630px; line-height: 1.7; }
.free-label { white-space: nowrap; margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.free-label i { display: inline-block; width: 4px; height: 4px; margin-right: 4px; background: var(--orange); }
.workspace { display: grid; grid-template-columns: 276px minmax(0, 1fr); align-items: start; gap: 34px; }
.sidebar, .main-column { min-width: 0; }
.mobile-settings-toggle { display: none; }
.settings-section { padding: 20px 0 24px; border-top: 1px solid var(--line); }
.settings-section:first-child { border-top: 3px solid var(--purple); padding-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; color: var(--purple); font: 600 24px/1.05 var(--display); }
.section-heading p { color: var(--muted); font-size: 12px; margin: 8px 0 0; line-height: 1.65; }
.section-heading p strong { color: var(--ink); font-weight: 500; }
.step-index { flex: 0 0 auto; color: #a4a69e; font: 10px var(--mono); padding-top: 3px; }
.field-label { display: block; font-size: 11px; font-weight: 500; margin-bottom: 7px; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
label { display: block; font-size: 11px; font-weight: 500; }
select, input[type='search'] { display: block; width: 100%; min-height: 44px; margin-top: 5px; padding: 8px 10px; border: 1px solid #bfc1ba; background: white; font-size: 12px; }
select { cursor: pointer; }
select:hover, input[type='search']:hover { border-color: var(--purple); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.field-pair select { font-family: var(--mono); }
.position-court { position: relative; width: 100%; aspect-ratio: 1.18; margin: 8px 0 11px; background: #e7e8e2; border: 1px solid #c9cbc3; overflow: hidden; }
.court-art { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #aaada3; stroke-width: 1; pointer-events: none; }
.court-caption { position: absolute; bottom: 6px; left: 0; width: 100%; text-align: center; color: #979a8e; font: 7px var(--mono); letter-spacing: .5px; pointer-events: none; }
#positionPicker { position: absolute; inset: 0; }
#positionPicker [data-position]:not([data-position='ANY']) { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--purple); background: #fff; color: var(--purple); transform: translate(-50%, -50%); font: 600 12px var(--mono); }
#positionPicker [data-position='PG'] { left: 50%; top: 80%; }
#positionPicker [data-position='SG'] { left: 18%; top: 64%; }
#positionPicker [data-position='SF'] { left: 82%; top: 48%; }
#positionPicker [data-position='PF'] { left: 26%; top: 26%; }
#positionPicker [data-position='C'] { left: 50%; top: 21%; }
#positionPicker [data-position]:hover { border-color: var(--orange); color: var(--orange); }
#positionPicker [data-position].active { background: var(--orange); border-color: var(--orange); color: white; }
.all-position { min-height: 36px; padding: 6px 10px; border: 1px solid #bfc1ba; background: transparent; color: var(--purple); font: 10px var(--mono); }
.position-court .all-position { position: absolute; top: 9px; right: 9px; z-index: 1; }
.all-position.active { background: var(--purple); border-color: var(--purple); color: white; }
.position-picker:not(#positionPicker) { display: grid; grid-template-columns: 1.2fr repeat(5, 1fr); gap: 3px; }
.position-picker:not(#positionPicker) button { min-height: 44px; padding: 0; border: 1px solid var(--line); background: white; font: 10px var(--mono); }
.position-picker:not(#positionPicker) button.active { color: white; background: var(--purple); border-color: var(--purple); }
.counter { display: grid; grid-template-columns: 44px 1fr 44px; border-bottom: 1px solid var(--purple); }
.counter button { height: 54px; padding: 0; border: 0; background: transparent; color: var(--purple); font-size: 23px; }
.counter button:hover { color: var(--orange); background: var(--soft); }
.counter input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 0; text-align: center; color: var(--purple); font: 600 42px var(--display); -moz-appearance: textfield; }
.counter input::-webkit-inner-spin-button { appearance: none; }
.specialist { margin-top: 12px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.specialist summary { display: flex; align-items: center; min-height: 44px; gap: 8px; font-size: 11px; }
.specialist summary::before { content: '+'; color: var(--orange); font: 16px var(--mono); }
.specialist[open] summary::before { content: '−'; }
.specialist summary span { margin-left: auto; color: var(--orange); font: 11px var(--mono); }
#specialInputs { display: grid; gap: 8px; margin-top: 12px; }
.special-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.special-row input { width: 58px; min-height: 44px; border: 1px solid var(--line); background: white; padding: 8px; text-align: center; font: 12px var(--mono); }
.caps-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; }
.caps-total strong { font: 600 26px var(--display); color: var(--purple); }
.caps-total + .field-label { margin-top: 18px; }
.starter-section { border-top: 1px solid var(--line); padding-top: 19px; }
.starter-section h3 { margin: 0 0 7px; color: var(--muted); font: 10px var(--mono); }
.starter-section > button { position: relative; display: grid; width: 100%; min-height: 61px; padding: 10px 27px 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; text-align: left; }
.starter-section button span { font-size: 13px; font-weight: 500; }
.starter-section button small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.starter-section button b { position: absolute; right: 0; top: 18px; font-weight: 400; font-size: 18px; color: var(--orange); }
.starter-section button:hover span { color: var(--orange); }

.shade-player-section { min-width: 0; margin-bottom: 20px; padding: 20px 26px 16px; border-top: 3px solid var(--purple); background: var(--white); }
.shade-player-section .section-heading { margin-bottom: 16px; }
.shade-player-section .eyebrow { margin: 0 0 6px; font: 10px var(--mono); color: var(--muted); letter-spacing: .8px; }
.shade-player-section h2 { font-size: 29px; }
.shade-player-section .section-heading p:not(.eyebrow) { max-width: 570px; }
.shade-player-count { flex-shrink: 0; display: grid; place-items: center; min-width: 49px; min-height: 30px; margin-top: 0; border-bottom: 2px solid var(--orange); color: var(--purple); font: 11px var(--mono); }
.shade-player-section > label { color: var(--muted); }
#shadePlayerSearch { min-width: 0; min-height: 46px; margin-top: 6px; border-color: #bfc1ba; }
#shadePlayerSearch:disabled { background: var(--paper); color: var(--muted); }
#shadePlayerSearch[aria-expanded='true'] { border-color: var(--purple); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.shade-player-options { max-height: 272px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--purple); border-top: 0; background: white; scrollbar-width: thin; }
.shade-player-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 47px; gap: 14px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--purple); text-align: left; font-size: 13px; }
.shade-player-option:last-child { border-bottom: 0; }
.shade-player-option > span { min-width: 0; overflow-wrap: anywhere; }
.shade-player-option strong { font-weight: 500; }
.shade-player-option small { display: block; margin-top: 2px; color: var(--muted); font: 10px var(--mono); }
.shade-player-option b { flex-shrink: 0; color: var(--orange); font: 17px var(--mono); }
.shade-player-option:hover, .shade-player-option[aria-selected='true'], .shade-player-option.active { background: var(--paper); }
.shade-player-option:hover strong, .shade-player-option[aria-selected='true'] strong { color: var(--orange); }
.shade-player-option:focus-visible { position: relative; outline-offset: -3px; z-index: 1; }
.shade-player-options > .muted, .shade-player-empty { margin: 0; padding: 13px 12px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.shade-player-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.shade-player-selected:not(:empty) { margin-top: 12px; }
.shade-player-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; gap: 5px; padding: 0 0 0 11px; border: 1px solid #cdc7d1; background: #f3f1f4; color: var(--purple); font-size: 12px; line-height: 1.45; }
.shade-player-chip > span { min-width: 0; overflow-wrap: anywhere; }
.shade-player-chip button { flex-shrink: 0; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 19px; }
.shade-player-chip button:hover { color: var(--orange); }
.shade-player-note { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.65; }

.target-editor { background: var(--white); border-top: 3px solid var(--purple); padding: 23px 26px 6px; }
.target-editor h2 { font-size: 29px; }
.editor-tools { display: flex; align-items: center; gap: 17px; }
.text-button { min-height: 44px; padding: 4px 0; background: none; border: 0; border-radius: 0; color: var(--purple); font-size: 11px; text-decoration: underline; text-decoration-color: #bbb6bd; text-underline-offset: 4px; }
.text-button:hover { color: var(--orange); text-decoration-color: var(--orange); }
.goal-strip { display: flex; align-items: flex-start; gap: 15px; border-block: 1px solid var(--line); padding: 10px 0; }
.goal-strip-label { flex-shrink: 0; font: 10px var(--mono); color: var(--muted); padding-top: 6px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-width: 0; }
.muted { color: #8c8f86; font-size: 11px; padding-block: 5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; color: var(--ink); font-size: 11px; }
.chip b { font: 500 11px var(--mono); color: var(--orange); }
.chip button { min-width: 26px; min-height: 29px; padding: 0; border: 0; background: none; color: #aaa9a2; font-size: 17px; }
.chip button:hover { color: var(--orange); }
.category-tabs { display: flex; gap: 23px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.category-tabs button { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 5px; min-height: 59px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; }
.category-tabs button::after { position: absolute; content: ''; bottom: 0; left: 0; right: 0; height: 2px; background: transparent; }
.category-tabs button.active { color: var(--purple); font-weight: 600; }
.category-tabs button.active::after { background: var(--orange); }
.category-tabs button:hover { color: var(--orange); }
.tab-count { color: var(--orange); font: 9px var(--mono); }
.attribute-rows { padding-top: 2px; }
.attribute-row { position: relative; display: grid; grid-template-columns: 192px minmax(0, 1fr) 108px; align-items: center; gap: 23px; min-height: 87px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.attribute-row:last-child { border-bottom: 0; }
.attribute-row.has-target::before { content: ''; position: absolute; left: -26px; top: 20px; bottom: 20px; width: 3px; background: var(--orange); }
.attribute-name { grid-column: 1; grid-row: 1; }
.attribute-name label { font-size: 14px; font-weight: 500; }
.attribute-name small { display: block; margin-top: 4px; font-size: 10px; color: #94968e; }
.has-target .attribute-name small { color: var(--orange); }
.attribute-control { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.attribute-control input { width: 77px; min-height: 51px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--purple); text-align: center; padding: 0 0 2px; font: 600 36px/1 var(--display); -moz-appearance: textfield; }
.attribute-control input::-webkit-inner-spin-button { appearance: none; }
.attribute-control input::placeholder { color: #c3c5bd; }
.attribute-control input[aria-invalid='true'] { border-color: var(--danger); color: var(--danger); }
.attribute-clear { width: 28px; min-height: 44px; padding: 0; border: 0; background: none; color: #aaa9a2; font-size: 18px; }
.attribute-clear:hover { color: var(--orange); }
.attribute-clear:disabled { color: #dadbd5; }
.attribute-range { grid-column: 2; grid-row: 1; width: 100%; }
.attribute-range input { width: 100%; height: 20px; margin: 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--orange); }
.attribute-range input::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.attribute-range input::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; background: var(--purple); border: 0; border-radius: 50%; margin-top: -4px; }
.attribute-range input::-moz-range-track { height: 2px; background: var(--line); }
.attribute-range input::-moz-range-thumb { width: 10px; height: 10px; background: var(--purple); border: 0; border-radius: 50%; }
.has-target .attribute-range input::-webkit-slider-thumb { background: var(--orange); }
.has-target .attribute-range input::-moz-range-thumb { background: var(--orange); }
.attribute-caption { display: flex; justify-content: space-between; font: 9px var(--mono); color: #a2a49c; margin-top: 1px; }

.requirements-section { background: white; padding-inline: 26px; }
.requirements-section details { border-top: 1px solid var(--line); }
.requirements-section summary { display: flex; align-items: center; gap: 14px; min-height: 56px; font-size: 13px; }
.requirements-section summary > span:first-child { flex: 1; }
.requirements-section summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.requirements-section summary::after { content: '+'; color: var(--orange); font: 20px var(--mono); }
.requirements-section details[open] > summary::after { content: '−'; }
.count-tag { color: #999b93; font: 11px var(--mono); }
.requirement-body { padding: 0 0 22px; }
.field-triple { display: grid; grid-template-columns: minmax(0, 1fr) 145px 67px; gap: 10px; align-items: end; }
.secondary-button, .icon-button { min-height: 44px; padding: 9px 13px; border: 1px solid #b9b9b3; background: transparent; color: var(--purple); font-size: 11px; }
.secondary-button:hover, .icon-button:hover { border-color: var(--orange); color: var(--orange); }
.secondary-button.selected { color: white; background: var(--purple); border-color: var(--purple); }
.requirement-body .chips { margin-top: 12px; }
.animation-matches { display: grid; margin-top: 10px; max-height: 285px; overflow-y: auto; }
.animation-option { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 12px; }
.animation-option strong { font-weight: 500; }
.animation-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.animation-option b { color: var(--orange); font: 18px var(--mono); }
.animation-option:hover strong { color: var(--orange); }
.search-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 26px; background: white; border-top: 1px solid var(--line); border-bottom: 3px solid var(--purple); }
.search-bar strong { display: block; color: var(--purple); font-size: 13px; font-weight: 500; }
#searchSub { display: block; margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; flex-shrink: 0; min-height: 47px; padding: 10px 21px; border: 1px solid var(--purple); background: var(--purple); color: white; font-weight: 500; font-size: 13px; }
.primary-button span { font: 20px var(--body); }
.primary-button:hover { background: #493955; border-color: #493955; }
.primary-button:disabled { background: var(--soft); border-color: var(--soft); color: #a6a89f; }

.results-section { margin-top: 35px; scroll-margin-top: 20px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.results-heading h2 { font: 600 28px/1.1 var(--display); color: var(--purple); margin: 0; }
.empty-results { display: flex; align-items: center; gap: 24px; padding: 24px 0; border-block: 1px solid var(--line); min-height: 185px; }
.court-drawing { width: 155px; flex-shrink: 0; fill: none; stroke: #c6c8be; stroke-width: 1; }
.court-drawing .court-ball { stroke: var(--orange); }
.empty-results h3 { margin: 0; font-size: 14px; font-weight: 500; }
.empty-results p { font-size: 12px; line-height: 1.75; color: var(--muted); max-width: 390px; margin: 0; }
.notice { margin-bottom: 17px; padding: 10px 12px; border-left: 2px solid var(--purple); background: #e6e7e2; color: var(--muted); font-size: 11px; line-height: 1.65; }
.notice.error { color: var(--danger); background: #f7e9e3; border-color: var(--danger); }
.progress-box { padding: 0 0 20px; }
.progress-box > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }
.progress-box strong { font-weight: 500; color: var(--purple); }
.progress-track { height: 3px; background: var(--line); margin: 5px 0 12px; }
.progress-track > div { height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.progress-box p { color: var(--muted); font: 10px var(--mono); margin: 0; }
.result-grid { display: grid; grid-template-columns: 217px minmax(0, 1fr); align-items: start; gap: 22px; }
.build-list { display: flex; flex-direction: column; min-width: 0; border-top: 2px solid var(--purple); }
.build-option { position: relative; display: grid; grid-template-columns: 24px 1fr; width: 100%; padding: 14px 8px 14px 0; gap: 4px 7px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.build-option.active { background: #e3e4de; }
.build-option.active::before { content: ''; position: absolute; left: -5px; top: 0; bottom: 0; width: 3px; background: var(--orange); }
.build-rank { grid-column: 1; grid-row: 1 / 5; padding-top: 2px; color: #93968c; font: 10px var(--mono); }
.option-title { grid-column: 2; font: 600 23px/1 var(--display); color: var(--purple); }
.option-title b { margin-left: 5px; font-weight: 500; }
.option-meta, .option-stats, .option-caps { grid-column: 2; font-size: 10px; color: var(--muted); }
.option-meta { font: 9px var(--mono); margin-top: 4px; }
.option-stats { margin-top: 5px; }
.option-stats b { font: 500 11px var(--mono); color: var(--purple); }
.option-stats i { font-style: normal; color: #aaada3; margin-inline: 3px; }
.option-caps { margin-top: 7px; color: #935d43; }
.option-caps small { margin-left: 7px; color: #93968c; font-size: 9px; }
.build-option:hover .option-title { color: var(--orange); }
.build-detail { min-width: 0; background: white; border-top: 2px solid var(--purple); }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 23px; }
.detail-position { display: block; color: var(--muted); font: 9px var(--mono); margin-bottom: 5px; }
.detail-header h3 { margin: 0; font: 600 37px/1 var(--display); color: var(--purple); }
.detail-header h3 small { font: 10px var(--mono); color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.detail-actions button { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.detail-actions .icon-button { min-width: 34px; padding-inline: 7px; font-size: 16px; }
.body-specs { display: grid; grid-template-columns: 1fr 1.1fr 1.3fr; border-block: 1px solid var(--line); margin-inline: 23px; padding-block: 14px; gap: 17px; }
.body-specs small { display: block; color: #96988f; font: 8px var(--mono); }
.body-specs strong { display: block; font: 500 19px var(--mono); color: var(--purple); margin-top: 5px; }
.body-specs strong span { display: block; font: 9px var(--body); color: var(--muted); margin-top: 2px; }
.plan-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 13px 23px; font-size: 10px; color: var(--muted); }
.plan-summary strong { color: var(--purple); font: 500 13px var(--mono); }
.plan-summary .goals-met { color: var(--success); font-size: 9px; }
.verification-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-inline: 23px; padding: 8px 0 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.verification-line strong { color: var(--purple); font-weight: 500; margin-right: 8px; }
.verification-line .text-button { min-height: 32px; font: 9px var(--mono); }
.selected-requirements { padding: 17px 0; margin-inline: 23px; border-top: 1px solid var(--line); }
.selected-requirements h4 { margin: 0 0 10px; color: var(--purple); font: 600 21px var(--display); }
.requirement-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edeee7; padding-block: 8px; font-size: 11px; }
.requirement-check span { min-width: 0; overflow-wrap: anywhere; }
.requirement-check small { display: block; color: var(--muted); font: 8px/1.65 var(--mono); margin-bottom: 3px; }
.requirement-check b { color: var(--success); font: 500 13px var(--mono); }
.table-wrap { max-width: 100%; overflow-x: auto; }
.attribute-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.attribute-table thead th { padding: 12px 8px; background: #f4f5f1; color: #8b8e83; font: 8px var(--mono); text-align: right; border-block: 1px solid var(--line); white-space: nowrap; }
.attribute-table thead th:first-child { text-align: left; padding-left: 23px; }
.attribute-table thead th:last-child { padding-right: 23px; }
.attribute-table .table-group th { text-align: left; font: 9px var(--mono); color: var(--muted); padding: 15px 23px 8px; border-bottom: 1px solid #eeefe9; background: #fafbf7; }
.attribute-table th[scope='row'] { text-align: left; padding: 9px 8px 9px 23px; min-width: 183px; font-size: 10px; font-weight: 400; border-bottom: 1px solid #edeee7; }
.attribute-table th[scope='row'] > small { font: 8px var(--mono); color: var(--orange); margin-left: 6px; white-space: nowrap; }
.attribute-table td { padding: 9px 8px; text-align: right; font: 10px var(--mono); border-bottom: 1px solid #edeee7; color: #76786f; }
.attribute-table td:last-child { padding-right: 23px; }
.attribute-table tr.requested-stat { background: #fdf9f5; }
.attribute-table .breaker-cell { color: #a56549; font-size: 9px; }
.breaker-cell small { display: block; margin-top: 2px; font: 8px var(--mono); color: var(--orange); }
.attribute-table .final-cell { color: var(--purple); font-size: 13px; font-weight: 500; }
.final-cell span { color: var(--success); font: 8px var(--body); margin-left: 4px; }
.stat-meter { position: relative; height: 3px; margin-top: 6px; background: #edeee8; overflow: hidden; }
.stat-base, .stat-gain { position: absolute; top: 0; height: 100%; }
.stat-base { left: 0; background: var(--purple); }
.stat-gain { background: var(--orange); }
.breaker-plan, .detail-badges { margin-inline: 23px; padding-block: 18px; border-top: 1px solid var(--line); }
.breaker-plan > .section-heading { align-items: center; margin-bottom: 9px; }
.breaker-plan h4, .detail-badges h4 { color: var(--purple); font: 600 21px var(--display); margin: 0; }
.breaker-plan .text-button { min-height: 32px; font-size: 10px; }
.breaker-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-block: 9px; font-size: 11px; }
.breaker-row strong { font-weight: 500; }
.breaker-row > div:first-child > small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.breaker-reason { width: 100%; margin: 3px 0 1px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.ladder-steps { display: flex; align-items: center; gap: 6px; color: var(--purple); font: 11px var(--mono); }
.ladder-steps .after-step { color: var(--orange); }
.ladder-steps small { font-size: 8px; color: #b3a093; }
.detail-badges .field-help { margin: 7px 0 14px; font-size: 10px; }
.badge-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.badge-tag { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edeee7; padding-block: 6px; font-size: 9px; color: #77796e; }
.badge-tag b { flex-shrink: 0; font: 8px var(--mono); color: #a29f93; }
.badge-tag.tier-2 b { color: #a98744; }
.badge-tag.tier-3 b { color: var(--purple); }

.badge-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 16px 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.badge-item { display: flex; flex-direction: column; align-items: center; min-width: 0; margin: 0; padding: 0 2px; color: var(--ink); text-align: center; }
button.badge-item { min-height: 44px; border: 0; background: transparent; }
.badge-emblem { display: block; flex: 0 0 auto; width: 64px; height: 72px; margin: 0 auto 6px; object-fit: contain; }
.badge-item figcaption { width: 100%; min-width: 0; }
.badge-name { display: -webkit-box; width: 100%; min-height: 31px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); font: 500 11px/1.4 var(--body); }
.badge-tier { display: block; margin-top: 4px; color: var(--muted); font: 9px/1.5 var(--mono); }
.result-footnote { color: var(--muted); font-size: 10px; margin: 15px 0 0; line-height: 1.7; }
#longerSearch { margin-top: 12px; font-size: 10px; }
.compare-section { margin-top: 24px; border-top: 2px solid var(--purple); padding: 16px 0; }
.compare-section h3 { color: var(--purple); font: 600 25px var(--display); margin: 0; }
.compare-section > .section-heading { align-items: center; margin-bottom: 10px; }
.compare-section table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 11px; background: white; }
.compare-section th, .compare-section td { text-align: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.compare-section th:first-child { text-align: left; font-weight: 500; }
.compare-section thead th { font-size: 12px; color: var(--purple); background: #e9eae5; font-weight: 500; }
.compare-section th small, .compare-section td small { display: block; font: 9px var(--mono); color: var(--muted); margin-top: 4px; }
.compare-section td strong { font: 500 15px var(--mono); color: var(--purple); }
.footer { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 35px; padding: 20px 0 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer b { color: var(--orange); font-weight: 400; margin-inline: 3px; }
.footer .text-button { font-size: 10px; }
.creator-credit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.creator-link { display: inline-flex; align-items: center; min-height: 44px; padding: 2px 4px; color: var(--purple); font-weight: 500; }
a.creator-link { text-decoration: none; }
a.creator-link:hover { color: var(--orange); text-decoration: underline; }
.dialog { width: min(620px, calc(100% - 32px)); max-width: none; max-height: 86vh; padding: 0; border: 1px solid var(--purple); border-radius: 3px; background: white; color: var(--ink); }
.dialog::backdrop { background: #25263266; }
.dialog-heading { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: white; z-index: 1; }
.dialog-heading h2 { font: 600 29px var(--display); color: var(--purple); margin: 0; }
.dialog-heading button { min-width: 44px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--muted); font-size: 24px; }
.dialog-heading button:hover { color: var(--orange); }
.dialog-body { padding: 23px 27px 29px; font-size: 13px; line-height: 1.85; }
.dialog-body p { color: var(--muted); margin-bottom: 16px; }
.dialog-body p:last-child { margin-bottom: 0; }
.dialog-body strong { color: var(--ink); font-weight: 500; }
.dialog-body ol, .dialog-body ul { padding-left: 20px; color: var(--muted); }
.dialog-body li { padding-left: 4px; margin-bottom: 12px; }
.dialog-body h3 { color: var(--purple); font: 600 23px var(--display); margin: 20px 0 7px; }
.saved-row { display: flex; align-items: center; gap: 9px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.saved-row > div { flex: 1; }
.saved-row strong { display: block; font: 600 25px var(--display); color: var(--purple); }
.saved-row small { display: block; font: 9px var(--mono); color: var(--muted); margin-top: 4px; }
.saved-row .icon-button { min-width: 44px; font-size: 17px; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 2px; background: var(--purple); color: white; font-size: 12px; }

@media (min-width: 1600px) { .topbar { padding-inline: max(44px, calc((100% - 1292px) / 2)); } }
@media (max-width: 1180px) {
  .topbar { padding-inline: 28px; }
  .page { padding-inline: 28px; }
  .workspace { grid-template-columns: 248px minmax(0, 1fr); gap: 25px; }
  .attribute-row { grid-template-columns: 159px minmax(0, 1fr) 100px; gap: 18px; }
  .category-tabs { gap: 20px; }
  .result-grid { grid-template-columns: 190px minmax(0, 1fr); gap: 17px; }
  .body-specs { margin-inline: 18px; gap: 12px; }
  .body-specs strong { font-size: 17px; }
  .detail-header { padding-inline: 18px; }
  .detail-actions button { padding-inline: 7px; font-size: 9px; }
  .attribute-table th[scope='row'] { min-width: 158px; padding-left: 18px; }
  .attribute-table .table-group th, .attribute-table thead th:first-child { padding-left: 18px; }
  .attribute-table td:last-child, .attribute-table thead th:last-child { padding-right: 18px; }
  .breaker-plan, .detail-badges { margin-inline: 18px; }
}
@media (max-width: 1000px) {
  .version-tag { display: none; }
  .workspace { grid-template-columns: 226px minmax(0, 1fr); gap: 22px; }
  .target-editor { padding-inline: 22px; }
  .requirements-section { padding-inline: 22px; }
  .attribute-row { grid-template-columns: 141px minmax(0, 1fr) 88px; gap: 14px; }
  .attribute-control input { width: 61px; font-size: 34px; }
  .attribute-name label { font-size: 12px; }
  .attribute-row.has-target::before { left: -22px; }
  .search-bar { padding-inline: 22px; gap: 14px; }
  .primary-button { padding-inline: 16px; gap: 15px; font-size: 12px; }
  .result-grid { grid-template-columns: 1fr; gap: 18px; }
  .build-list { display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 1px; scrollbar-width: thin; }
  .build-option { flex: 0 0 160px; padding: 14px 10px 14px 7px; border-bottom: 0; border-right: 1px solid var(--line); }
  .build-option.active::before { left: 0; top: auto; height: 3px; bottom: 0; width: 100%; }
  .detail-actions button { font-size: 10px; }
  .footer { justify-content: center; }
}
@media (max-width: 790px) {
  .topbar { min-height: 76px; padding-inline: 20px; gap: 18px; }
  .topbar nav { gap: 14px; }
  .nav-button { font-size: 11px; }
  .page { padding: 24px 20px 0; }
  .page-heading { display: block; padding-bottom: 23px; }
  .free-label { display: block; margin-top: 11px; }
  .workspace { grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
  .target-editor { padding: 22px 18px 6px; }
  .target-editor .section-heading { flex-wrap: wrap; gap: 4px; }
  .target-editor h2 { font-size: 26px; }
  .editor-tools { width: 100%; justify-content: space-between; }
  .section-heading p { font-size: 11px; }
  .goal-strip { display: block; }
  .goal-strip-label { display: block; padding-top: 0; margin-bottom: 5px; }
  .category-tabs { gap: 20px; }
  .category-tabs button { min-height: 53px; font-size: 11px; }
  .attribute-row { grid-template-columns: minmax(0, 1fr) 96px; gap: 0 12px; padding-block: 15px; }
  .attribute-control { grid-column: 2; }
  .attribute-range { grid-column: 1 / -1; grid-row: 2; margin-top: 7px; }
  .attribute-name label { font-size: 13px; }
  .attribute-row.has-target::before { left: -18px; }
  .requirements-section { padding-inline: 18px; }
  .requirements-section summary { font-size: 12px; }
  .requirements-section summary small { font-size: 10px; }
  .field-triple { grid-template-columns: minmax(0, 1fr) 105px; }
  .field-triple .secondary-button { grid-column: 1 / -1; }
  .search-bar { padding: 17px 18px; }
  .search-bar strong { font-size: 11px; }
  #searchSub { font-size: 9px; }
  .primary-button { padding-inline: 13px; font-size: 11px; gap: 8px; }
  .empty-results { flex-direction: column; align-items: flex-start; gap: 15px; }
  .court-drawing { width: 126px; }
}
@media (max-width: 650px) {
  .page-heading { padding-bottom: 15px; }
  .workspace { gap: 16px; }
  .topbar { padding-inline: 16px; gap: 10px; }
  .nav-button { font-size: 12px; line-height: 1.25; }
  .topbar nav { gap: 11px; }
  .page { padding: 22px 16px 0; }
  .page-heading h1 { font-size: 32px; }
  .page-heading p:last-child { font-size: 12px; }
  .edition-label { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .mobile-settings-toggle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; width: 100%; min-height: 52px; padding: 12px 15px; border: 1px solid var(--line); border-left: 3px solid var(--purple); background: #e8e9e4; text-align: left; }
  .mobile-settings-toggle > span { min-width: 0; font: 11px var(--mono); }
  .mobile-settings-toggle > span > small { display: block; color: var(--muted); font: 11px var(--body); letter-spacing: .3px; margin-bottom: 4px; }
  #mobileSettingsSummary { display: block; font: 12px/1.5 var(--mono); color: var(--purple); }
  .mobile-settings-toggle > b { flex-shrink: 0; font-size: 12px; font-weight: 500; }
  .mobile-settings-toggle[aria-expanded='true'] { border-left-color: var(--orange); }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .sidebar[data-mobile-collapsed='true'] { display: none; }
  select, input[type='search'], .special-row input { font-size: 16px; }
  .settings-section { padding-top: 20px; }
  .settings-section:nth-child(2) { border-top: 3px solid var(--purple); }
  .position-court { aspect-ratio: 1.18; max-height: 220px; }
  .section-heading h2 { font-size: 23px; }
  .position-court .all-position { top: 7px; right: 7px; padding-inline: 7px; font-size: 9px; }
  #positionPicker [data-position]:not([data-position='ANY']) { width: 39px; height: 39px; font-size: 10px; }
  .field-pair { gap: 8px; }
  .field-help { font-size: 11px; }
  .specialist summary { font-size: 11px; gap: 5px; }
  .counter { grid-template-columns: 36px 1fr 36px; }
  .starter-section { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 17px; padding-block: 18px 0; }
  .starter-section h3, .starter-section > .field-help { grid-column: 1 / -1; }
  .starter-section > button { min-height: 73px; padding-right: 0; }
  .starter-section button span { font-size: 11px; padding-right: 16px; }
  .starter-section button small { font-size: 10px; line-height: 1.5; }
  .starter-section button b { top: 10px; font-size: 15px; }
  .target-editor { padding-top: 23px; }
  .target-editor > .section-heading { flex-wrap: nowrap; gap: 15px; margin-bottom: 17px; }
  .editor-tools { width: auto; }
  .editor-tools .step-index { display: none; }
  .editor-tools .text-button { white-space: normal; max-width: 61px; text-align: right; font-size: 10px; }
  .goal-strip { display: flex; }
  .goal-strip-label { padding-top: 6px; }
  .eyebrow, .goal-strip-label { font-size: 11px; }
  .category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; overflow: visible; padding-block: 7px; }
  .category-tabs button { justify-content: center; min-height: 44px; font-size: 12px; }
  .chip button, .attribute-clear { min-width: 44px; min-height: 44px; }
  .attribute-control { gap: 0; }
  .attribute-control input { width: 50px; }
  .attribute-row { grid-template-columns: 155px minmax(0, 1fr) 90px; gap: 15px; }
  .attribute-name label { font-size: 14px; }
  .attribute-name small, .attribute-caption, .chip { font-size: 11px; }
  .attribute-control { grid-column: 3; }
  .attribute-range { grid-column: 2; grid-row: 1; margin-top: 0; }
  .requirements-section summary { font-size: 13px; }
  .search-bar strong { font-size: 12px; }
  .search-bar { padding-bottom: calc(17px + env(safe-area-inset-bottom, 0px)); }
  #searchSub { font: 11px/1.5 var(--body); }
  .requirements-section summary small, .result-footnote, .notice { font-size: 11px; }
  .primary-button { font-size: 12px; min-height: 46px; }
  .empty-results { flex-direction: row; align-items: center; }
  .results-heading h2 { font-size: 26px; }
  .body-specs strong { font-size: 19px; }
  .attribute-table th[scope='row'] { min-width: 180px; }
  .verification-line, .selected-requirements { margin-inline: 18px; }
  .verification-line, .verification-line .text-button, .requirement-check small, .breaker-reason { font-size: 11px; }
  .requirement-check { font-size: 12px; }
  .option-meta, .option-stats, .option-caps, .option-caps small { font-size: 11px; }
  .option-stats i { margin-inline: 1px; }
  .option-caps small { display: block; margin-left: 0; margin-top: 3px; }
  .body-specs small { font-size: 10px; }
  .body-specs > div > small { min-height: 28px; line-height: 1.3; }
  .plan-summary, .plan-summary .goals-met, .badge-tag, .badge-tag b, .detail-badges .field-help { font-size: 11px; }
  .ladder-steps { font-size: 12px; }
  .ladder-steps small, .breaker-row > div:first-child > small, .saved-row small, .footer { font-size: 11px; }
  .detail-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; padding-block: 18px; }
  .detail-position { white-space: nowrap; font-size: 11px; }
  .detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) 44px; width: 100%; gap: 7px; }
  .detail-actions button { min-height: 44px; min-width: 44px; font-size: 12px; padding-inline: 7px; white-space: nowrap; }
  .verification-line .text-button, .breaker-plan .text-button { min-height: 44px; }
  .toast { right: 16px; bottom: 16px; }
}
@media (max-width: 450px) {
  .topbar { min-height: 71px; gap: 8px; }
  .topbar nav { gap: 10px; }
  .nav-button { font-size: 12px; }
  .nav-button > span { font-size: 9px; margin-left: 3px; }
  .page { padding-inline: 12px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .settings-section:nth-child(2) { border-top: 1px solid var(--line); }
  .position-court { aspect-ratio: 1.5; max-height: 220px; }
  #positionPicker [data-position]:not([data-position='ANY']) { width: 44px; height: 44px; font-size: 12px; }
  .field-pair { margin-top: 18px; gap: 12px; }
  .field-help { font-size: 11px; }
  .starter-section { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 11px; }
  .starter-section > button { min-height: 70px; padding-right: 0; }
  .starter-section button span { font-size: 11px; padding-right: 14px; }
  .starter-section button small { font-size: 10px; }
  .starter-section button b { font-size: 15px; top: 10px; }
  .starter-section > .field-help { margin-top: 10px; }
  .goal-strip { display: block; }
  .attribute-row { grid-template-columns: minmax(0, 1fr) 94px; gap: 0 12px; }
  .attribute-control { grid-column: 2; }
  .attribute-range { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }
  .attribute-control input { font-size: 36px; }
  .search-bar { gap: 10px; padding-inline: 16px; }
  .search-bar strong { font-size: 11px; }
  #searchSub { font-size: 11px; }
  .primary-button { font-size: 11px; padding-inline: 12px; gap: 9px; }
  .results-heading { gap: 12px; }
  .results-heading .text-button { font-size: 10px; }
  .empty-results { flex-direction: column; align-items: flex-start; }
  .detail-header { gap: 15px; padding-inline: 16px; }
  .detail-actions { gap: 7px; }
  .detail-actions button { font-size: 12px; padding-inline: 7px; }
  .detail-header h3 { font-size: 34px; }
  .body-specs { margin-inline: 16px; gap: 10px; }
  .body-specs strong { font-size: 16px; }
  .body-specs small { font-size: 11px; }
  .verification-line, .selected-requirements { margin-inline: 16px; }
  .plan-summary { padding-inline: 16px; }
  .attribute-table { table-layout: fixed; }
  .attribute-table th[scope='row'] { width: 45%; min-width: 0; padding-left: 16px; font-size: 11px; overflow-wrap: anywhere; }
  .attribute-table thead th:first-child { width: 45%; }
  .attribute-table thead th:not(:first-child) { width: 18.333%; }
  .attribute-table th[scope='row'] > small { display: block; font-size: 10px; margin: 3px 0 0; }
  .attribute-table .table-group th, .attribute-table thead th:first-child { padding-left: 16px; }
  .attribute-table thead th { font: 600 11px var(--display); letter-spacing: 0; padding-inline: 3px; }
  .attribute-table td { padding-inline: 6px; font-size: 12px; }
  .attribute-table .breaker-cell, .attribute-table .breaker-cell small { font-size: 10px; }
  .attribute-table td:last-child, .attribute-table thead th:last-child { padding-right: 16px; }
  .breaker-plan, .detail-badges { margin-inline: 16px; }
  .badge-list { grid-template-columns: 1fr; }
  .dialog { width: calc(100% - 24px); }
  .dialog-heading { padding-inline: 20px; }
  .dialog-body { padding-inline: 20px; }
  .saved-row { gap: 7px; }
}
@media (pointer: coarse) {
  .chip button { min-width: 44px; min-height: 44px; }
  .attribute-clear { min-width: 44px; }
  .attribute-control { gap: 0; }
  .attribute-control input { width: 50px; }
  .attribute-range input { height: 44px; }
  #positionPicker [data-position]:not([data-position='ANY']) { min-width: 44px; min-height: 44px; }
  .all-position, .detail-actions button, .verification-line .text-button, .breaker-plan .text-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* Range limits and a fixed-build workbench follow the same scouting sheet. */
.language-select { width: 63px; min-height: 38px; margin: 0; padding: 6px; border-color: var(--line); background: transparent; font: 12px var(--mono); }
.mobile-goals-toggle { display: none; }
.planner-tools { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; color: var(--muted); font: 10px var(--mono); }
.planner-tools .text-button { font: 12px var(--body); }
.range-explanation { font-size: 11px !important; }
.attribute-row { grid-template-columns: 170px minmax(0, 1fr) 300px; gap: 20px; }
.attribute-name { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; }
.attribute-name label, .attribute-name small { grid-column: 1; }
.attribute-name .attribute-clear { grid-column: 2; grid-row: 1 / 3; width: 44px; }
.attribute-name .attribute-clear:disabled { visibility: hidden; }
.attribute-values { grid-column: 3; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.attribute-values > div { min-width: 0; }
.attribute-values .attribute-control { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 0; }
.attribute-values .attribute-control input { width: 100%; min-width: 0; }
.value-label { display: block; padding-bottom: 4px; text-align: center; color: var(--muted); font: 11px var(--body); }
.attribute-step { width: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--purple); font: 400 22px/1 var(--body); cursor: pointer; touch-action: manipulation; }
.attribute-step:hover:not(:disabled) { border-color: var(--line); background: var(--paper); color: var(--orange); }
.attribute-step:active:not(:disabled) { background: var(--line); }
.attribute-step:disabled { color: #cbc9c3; cursor: default; }
.maximum-control { min-width: 0; }
.maximum-control input { min-height: 51px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: center; color: var(--purple); font: 600 27px var(--display); -moz-appearance: textfield; }
.maximum-control input::-webkit-inner-spin-button { appearance: none; }
.maximum-control input::placeholder { color: #a4a69e; }
.maximum-control input[aria-invalid='true'] { border-color: var(--danger); color: var(--danger); }
.compare-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.compare-controls label { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: 12px; cursor: pointer; }
.compare-controls input { width: 18px; height: 18px; accent-color: var(--purple); }
.compare-section td.best-value { color: var(--orange); font-weight: 600; }
.compare-section .compare-group th { padding-top: 16px; color: var(--purple); font-weight: 600; }
.compare-section .compare-note { margin-top: 10px; font-size: 11px; color: var(--muted); }
.import-dialog { max-width: 800px; }
.import-dialog .dialog-body { padding-top: 18px; }
.import-dialog summary { cursor: pointer; min-height: 44px; color: var(--purple); }
.import-dialog textarea { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); background: var(--paper); resize: vertical; font: 12px/1.6 var(--mono); }
.import-source-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 12px; }
.file-import { display: block; max-width: 220px; min-height: 44px; font-size: 12px; color: var(--purple); }
.file-import input { display: block; max-width: 100%; margin-top: 5px; font-size: 11px; }
.import-budget { border-block: 1px solid var(--line); padding-block: 12px; margin: 18px 0; }
.import-budget-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.import-budget-grid input { display: block; width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--line); background: white; font: 16px var(--mono); }
.import-body { display: flex; flex-wrap: wrap; gap: 10px 20px; border-bottom: 3px solid var(--purple); padding: 18px 0; color: var(--purple); }
.import-body strong { font: 600 28px var(--display); }
.import-body span { align-self: center; font-size: 12px; }
.import-status { margin-block: 16px; }
.import-plan-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.import-plan-table th { text-align: left; font-size: 11px; font-weight: 500; }
.import-plan-table th:first-child { width: 43%; }
.import-plan-table td { border-bottom: 1px solid var(--line); padding-block: 5px; font: 12px var(--mono); }
.import-plan-table td:first-child { font: 12px var(--body); }
.import-plan-table select { width: 62px; margin: 0; font-size: 16px; }
.import-plan-table .changed-value { color: var(--orange); font-weight: 600; }
.import-effects { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.import-effects:empty { display: none; }
.import-effects h3 { font: 600 24px var(--display); color: var(--purple); }
.import-effects h4 { margin: 14px 0 8px; font-size: 12px; }
.import-effects p, .import-effects li { font-size: 12px; line-height: 1.7; }
.import-effects ul { padding-left: 18px; }
.import-effect-gain { color: var(--success); }
.import-effect-loss { color: var(--danger); }
.analysis-goal-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; }
.analysis-goal-toggle input { width: 18px; height: 18px; accent-color: var(--purple); }
.import-plan-table .table-group td { padding-top: 18px; color: var(--purple); font-weight: 600; }
.breaker-plan > .secondary-button { margin-top: 12px; }
@media (max-width: 1100px) {
  .attribute-row { grid-template-columns: minmax(0, 1fr) 300px; gap: 8px 15px; }
  .attribute-values { grid-column: 2; }
  .attribute-range { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }
}
@media (max-width: 650px) {
  .goal-strip { display: block; padding-block: 5px; }
  .goal-strip-label { display: none; }
  .mobile-goals-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 44px; width: 100%; padding: 0; border: 0; background: none; color: var(--purple); font: 12px var(--body); }
  .mobile-goals-toggle b { margin-left: 5px; font: 12px var(--mono); color: var(--orange); }
  .goal-strip #targetChips { display: none; }
  .goal-strip[data-mobile-expanded='true'] #targetChips { display: flex; }
  .topbar { display: grid; grid-template-columns: 1fr auto; padding-block: 12px 5px; gap: 6px; }
  .brand-wordmark { width: 150px; }
  .topbar nav { grid-column: 1 / -1; width: 100%; margin-left: 0; justify-content: space-between; }
  .nav-button { font-size: 12px; }
  .language-select { font-size: 16px; min-height: 44px; }
  .planner-tools { align-items: flex-start; font-size: 9px; }
  .planner-tools .text-button { font-size: 12px; text-align: right; }
  .attribute-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 16px; }
  .attribute-name { grid-column: 1; grid-row: 1; }
  .attribute-values { grid-column: 1; grid-row: 2; width: 100%; gap: 12px; }
  .attribute-range { grid-column: 1; grid-row: 3; }
  .attribute-values .attribute-control input { width: 100%; font-size: 32px; }
  .value-label { font-size: 11px; }
  .maximum-control input { font-size: 30px; }
  .attribute-name label { overflow-wrap: anywhere; }
  .import-source-actions { flex-wrap: wrap; }
  .import-source-actions .primary-button { min-height: 44px; }
  .import-dialog textarea { font-size: 16px; }
  .import-budget-grid { grid-template-columns: 1fr 1fr; }
  .import-plan-table th:first-child { width: 40%; }
  .import-plan-table th { font-size: 10px; }
  .import-plan-table td:first-child { font-size: 11px; overflow-wrap: anywhere; }
  .import-plan-table select { width: 51px; padding-inline: 4px; }
  .compare-controls { flex-wrap: wrap; }
}

/* Player registry: compact scouting records, with test status kept visible. */
.planner-modes { display: flex; align-items: stretch; gap: 25px; }
.planner-modes button { min-height: 44px; padding: 6px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font: 500 14px var(--body); }
.planner-modes button[aria-pressed='true'] { color: var(--purple); border-bottom-color: var(--orange); }
.planner-modes button:hover { color: var(--orange); }
.legends-section { min-width: 0; padding-top: 12px; }
.legends-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 17px 0 21px; border-top: 3px solid var(--purple); }
.legends-heading h2 { margin: 0 0 8px; color: var(--purple); font: 600 34px/1.1 var(--display); }
.legends-heading p { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.library-status { flex-shrink: 0; padding-left: 12px; border-left: 2px solid var(--orange); color: #aa5036; font: 11px/1.6 var(--mono); }
.legend-verification-note { margin: 0 0 19px; padding: 11px 14px; border-left: 2px solid var(--orange); background: #e8e9e4; color: var(--muted); font-size: 12px; line-height: 1.7; }
.legend-verification-note strong { color: var(--purple); font-weight: 500; }
.legend-toolbar { display: flex; align-items: center; gap: 11px; margin-bottom: 23px; min-width: 0; }
.legend-toolbar > label { flex: 1 1 300px; min-width: 0; color: var(--muted); font-size: 12px; }
.legend-toolbar input { flex: 1 1 300px; width: auto; min-width: 0; margin: 0; background: white; }
.legend-toolbar label input { width: 100%; margin-top: 5px; }
.legend-toolbar > div, .legend-filters { display: flex; align-items: stretch; gap: 5px; }
.legend-toolbar [data-legend-filter] { flex-shrink: 0; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: none; color: var(--muted); font-size: 12px; }
.legend-toolbar [data-legend-filter][aria-pressed='true'], .legend-toolbar [data-legend-filter].active { color: var(--purple); border-bottom-color: var(--orange); }
.legend-toolbar [data-legend-filter]:hover { color: var(--orange); }
.legend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; align-items: stretch; }
.legend-card { display: flex; flex-direction: column; min-width: 0; padding: 19px 20px 17px; background: white; border-top: 2px solid var(--purple); }
.legend-card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 33px; }
.legend-card-head > span { color: var(--muted); font: 11px/1.6 var(--mono); }
.legend-card-head > small { color: var(--muted); font: 10px/1.6 var(--mono); }
.legend-player { display: flex; align-items: center; gap: 12px; min-height: 49px; margin-top: 5px; }
.legend-monogram { color: #c1bcc6; font: 600 34px/1 var(--display); letter-spacing: -.5px; }
.legend-card h3 { margin: 8px 0 3px; color: var(--purple); font: 600 29px/1.1 var(--display); }
.legend-player .legend-monogram { flex: 0 0 39px; }
.legend-player h3 { margin: 0; }
.legend-kind { display: block; color: var(--muted); font-size: 11px; }
.legend-body-line { margin: 14px 0 0; padding-block: 11px; border-block: 1px solid var(--line); color: var(--purple); font: 11px/1.7 var(--mono); overflow-wrap: anywhere; }
.legend-key-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding-block: 15px; border-bottom: 1px solid var(--line); }
.legend-key-stats > div { min-width: 0; }
.legend-key-stats dl { margin: 0; min-width: 0; }
.legend-key-stats dt { color: var(--muted); font-size: 11px; line-height: 1.45; min-height: 31px; }
.legend-key-stats dd { margin: 6px 0 0; color: var(--purple); font: 500 22px/1 var(--mono); }
.legend-shades { padding-top: 16px; }
.legend-shades h4 { margin: 0 0 8px; color: var(--muted); font: 10px var(--mono); letter-spacing: .4px; }
.legend-shades h4 small { font: 11px var(--body); letter-spacing: 0; margin-left: 9px; }
.legend-shades ol { padding: 0; margin: 0; list-style: none; counter-reset: shade; }
.legend-shades li { display: flex; gap: 10px; padding-block: 4px; color: var(--ink); font-size: 13px; }
.legend-shades li::before { counter-increment: shade; content: counter(shade, decimal-leading-zero); flex: 0 0 17px; color: #a2a49c; font: 9px/1.8 var(--mono); }
.legend-shades li.intended-shade { color: var(--orange); font-weight: 500; }
.legend-status { display: grid; gap: 3px; margin-top: auto; margin-bottom: 0; padding-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.legend-status strong { color: var(--purple); font-weight: 500; }
.legend-status > span { color: #a5543c; font-size: 11px; }
.legend-status.game-verified strong, .legend-status.game-verified > span { color: var(--success); }
.legend-status .pending, .legend-status small { display: block; color: #a5543b; font-size: 11px; }
.legend-card-actions { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 15px; }
.legend-card-actions button { width: 100%; min-height: 44px; padding: 8px 9px; border: 1px solid var(--line); background: none; color: var(--purple); font-size: 12px; line-height: 1.5; }
.legend-card-actions [data-open-legend] { border-color: var(--purple); }
.legend-card-actions button:hover { border-color: var(--orange); color: var(--orange); }
.legend-grid > .muted, .legend-grid > .notice { grid-column: 1 / -1; padding-block: 20px; }
.player-directory-card { border-top-color: #c1bcc6; }
.player-directory-card .legend-player { margin-block: 12px 19px; }
.player-directory-card h3 { font-size: 25px; overflow-wrap: anywhere; }
.player-directory-card .legend-card-head { flex-wrap: wrap; gap: 3px 10px; min-height: 25px; }
.player-directory-card .legend-card-actions { margin-top: auto; padding-top: 0; }
.legend-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 25px; padding-top: 16px; border-top: 1px solid var(--line); }
.legend-pagination .field-help { margin: 0; font: 11px/1.6 var(--mono); }
.legend-pagination button { min-height: 44px; padding: 10px 16px; }

.shade-summary { padding: 15px 23px; border-top: 1px solid var(--line); }
.shade-summary h4 { margin: 0 0 9px; color: var(--purple); font: 600 21px var(--display); }
.shade-summary p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 8px 0 0; }
.shade-summary > div { display: flex; flex-wrap: wrap; gap: 4px 13px; }
.shade-summary ol { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 0; margin: 0; list-style: none; counter-reset: computed-shade; }
.shade-summary li { display: flex; gap: 7px; font-size: 13px; color: var(--purple); }
.shade-summary li::before { counter-increment: computed-shade; content: counter(computed-shade, decimal-leading-zero); color: #9b9d93; font: 10px/1.9 var(--mono); }
.shade-summary li.target-shade { color: var(--orange); font-weight: 500; }
.shade-name { display: inline-block; padding-block: 3px; font-size: 12px; color: var(--purple); }
.shade-name.target-shade { color: var(--orange); font-weight: 500; }
.shade-summary small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 7px; }
.shade-summary h4 small { display: inline; margin: 0 0 0 10px; font: 11px var(--body); }

@media (max-width: 1100px) {
  .legend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .legends-heading { align-items: flex-start; }
  .library-status { max-width: 195px; }
}
@media (max-width: 650px) {
  .planner-tools { flex-direction: column; align-items: stretch; gap: 4px; }
  .planner-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .planner-modes button { min-height: 44px; font-size: 13px; }
  .planner-tools > .text-button { align-self: flex-end; min-height: 44px; }
  .legends-section { padding-top: 5px; }
  .legends-heading { display: block; padding-top: 20px; }
  .legends-heading h2 { font-size: 30px; }
  .legends-heading p { font-size: 12px; }
  .library-status { display: block; max-width: none; margin-top: 15px; font: 12px/1.6 var(--body); }
  .legend-toolbar { flex-wrap: wrap; gap: 10px; }
  .legend-toolbar > label { flex-basis: 100%; width: 100%; }
  .legend-toolbar input { flex-basis: 100%; width: 100%; font-size: 16px; }
  .legend-toolbar > div, .legend-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .legend-toolbar [data-legend-filter] { flex: 1 1 0; min-width: 0; padding-inline: 5px; font-size: 12px; }
  .legend-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .legend-card { padding: 18px 18px 16px; }
  .legend-card-head > small, .legend-kind { font-size: 11px; }
  .legend-key-stats dt { font-size: 12px; }
  .legend-key-stats dd { font-size: 23px; }
  .legend-status { padding-top: 14px; font-size: 12px; }
  .legend-card-actions button { min-height: 44px; font-size: 12px; }
  .legend-pagination { flex-wrap: wrap; gap: 10px; }
  .legend-pagination button { font-size: 12px; }
  .shade-summary { padding-inline: 18px; }
  .shade-summary h4 { font-size: 22px; }
  .shade-name { font-size: 12px; }
}
@media (max-width: 450px) {
  .shade-summary { padding-inline: 16px; }
}

@media (max-width: 1000px) {
  .shade-player-section { padding-inline: 22px; }
}
@media (max-width: 790px) {
  .shade-player-section { padding-inline: 18px; }
  .shade-player-section h2 { font-size: 26px; }
}
@media (max-width: 650px) {
  .shade-player-section { margin-bottom: 16px; padding-top: 21px; }
  .shade-player-section .section-heading { gap: 14px; margin-bottom: 15px; }
  .shade-player-count { min-width: 43px; margin-top: 3px; }
  #shadePlayerSearch { font-size: 16px; }
  .shade-player-options { max-height: 240px; }
  .shade-player-section .field-help, .shade-player-note { font-size: 12px; }
  .shade-player-chip { max-width: 100%; font-size: 13px; }
  .badge-gallery { gap: 15px 9px; }
  .badge-name { font-size: 11px; }
  .badge-tier { font-size: 10px; }
}
