:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: #172b25;
  background: #f5f6f1;
  --paper: #fffefa;
  --line: #dbe2d9;
  --muted: #536760;
  --green: #1b5a45;
  --accent: #b54e37;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #8b5135; outline-offset: 3px; }

.wrap { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.masthead { background: #143b30; color: #f5f2de; }
.masthead-inner { display: flex; min-height: 66px; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.06rem; letter-spacing: .12em; font-weight: 700; }
.seal { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #e8a48e; border-radius: 5px; color: #fff5e4; background: #a64431; font: 700 1.2rem/1 "Songti SC", SimSun, serif; letter-spacing: 0; }
.state { max-width: 200px; min-width: 0; overflow: hidden; padding: 5px 11px; border: 1px solid #639080; border-radius: 5px; color: #e5f1e9; font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.mode-nav { display: flex; gap: 7px; margin-left: auto; }
.mode-nav a { color: #edf3e9; padding: 8px 12px; border-radius: 5px; font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mode-nav a:hover, .mode-nav a[aria-current="page"] { background: #2d5143; }

.intro { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-block: 40px 24px; }
h1, h2, p { margin: 0; }
h1 { font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-size: clamp(2.25rem, 5vw, 3.1rem); letter-spacing: .08em; }
h2 { font-size: 1.12rem; }
.intro p, .import-panel p, .results-header p { color: var(--muted); margin-top: 8px; line-height: 1.55; }

.import-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; padding: 23px 26px; background: #eaf0e8; border: 1px solid #cbdacf; border-left: 4px solid var(--green); border-radius: 8px; }
.import-panel label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-actions input { flex: 1 1 144px; min-width: 0; }
.import-panel p.fineprint, .import-panel p.feedback { font-size: .875rem; }
.feedback:empty { display: none; }
.import-panel .feedback[data-kind="error"] { color: #9b3524; font-weight: 600; }
.import-panel .feedback[data-kind="success"] { color: #14563d; font-weight: 600; }
.account-switcher { margin-top: 11px; }
.account-switcher label { flex: 0 0 100%; margin: 0; }
.account-switcher select { flex: 1 1 9rem; min-width: 0; }
.import-panel .button, .account-switcher select { max-width: 100%; }

.button, input, select { min-height: 42px; padding: 8px 12px; border-radius: 5px; border: 1px solid #bfcfc4; }
.button { font-size: .875rem; font-weight: 700; white-space: nowrap; }
.primary { color: #fff; background: var(--green); border-color: var(--green); }
.primary:hover:not(:disabled) { background: #144535; }
.secondary { color: var(--green); background: var(--paper); }
.secondary:hover:not(:disabled) { background: #e7f0e8; }
input, select { color: #172b25; background-color: var(--paper); }
input::placeholder { color: #62736b; }
select { appearance: none; padding-right: 29px; background-image: linear-gradient(45deg, transparent 50%, #50685d 50%), linear-gradient(135deg, #50685d 50%, transparent 50%); background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-block: 18px; }
.stat { display: grid; gap: 5px; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 14px 17px; }
.stat span { font-size: .875rem; color: var(--muted); }
.stat strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; }

.records { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.training-panel { margin-bottom: 18px; }
.training-panel button[aria-pressed="true"] { background: #e5eee6; border-color: #8eb29e; }
.training-collect-note { margin: 0 24px 10px; color: var(--muted); font-size: .875rem; }
.training-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 10px; padding: 0 24px 18px; }
.training-groups section { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f5f7f2; }
.training-groups h3 { margin: 0 0 7px; color: var(--green); font-size: .9rem; }
.training-groups dl { display: grid; gap: 4px; margin: 0; }
.training-groups dl div { display: flex; justify-content: space-between; gap: 4px; font-size: .875rem; }
.training-groups dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.training-groups details { grid-column: 1 / -1; padding: 8px 0; border-top: 1px solid var(--line); }
.training-groups summary { cursor: pointer; font-size: .875rem; font-weight: 700; }
.training-groups ul { display: grid; gap: 5px; max-height: 12em; overflow-y: auto; margin-block: 8px 0; padding-inline-start: 23px; font-size: .875rem; }
.tabs { display: flex; gap: 20px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { flex: 0 0 auto; min-height: 50px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: none; padding: 8px 6px 5px; font-weight: 700; }
.tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--accent); }
.tabs button:focus-visible { outline-offset: -4px; }
.results-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 19px 24px; }
.results-header p { font-size: .875rem; margin-top: 5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { font-size: .875rem; }
.filters input { width: 200px; max-width: 100%; }

.empty { text-align: center; padding: 25px 16px 34px; border-top: 1px solid var(--line); margin-inline: 24px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 6px; background: #eaf0e8; color: var(--green); font: 700 1.45rem/1 "Songti SC", SimSun, serif; }
.empty p { color: var(--muted); margin-top: 6px; font-size: .875rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; line-height: 1.5; }
thead { color: #334d42; background: #edf2eb; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
th { white-space: nowrap; }
td:first-child { min-width: 120px; }
td { overflow-wrap: anywhere; }
.item-id { display: block; color: var(--muted); font-size: .8125rem; }
.tag { display: inline-block; border-radius: 4px; padding: 1px 6px; white-space: nowrap; background: #edf0eb; }
.tag.yes { color: #23563f; background: #e3efe4; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 24px; font-size: .875rem; color: var(--muted); }
.pagination > div { display: flex; gap: 8px; }
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: 16px; }
.guide-sidebar { max-height: 710px; padding: 12px; overflow-y: auto; }
.guide-group { display: grid; gap: 2px; margin: 0 0 10px; padding: 0; }
.guide-group:last-child { margin-bottom: 0; }
.guide-group h2 { margin: 6px 8px 4px; color: var(--muted); font-size: .875rem; }
.guide-group button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 4px; background: none; color: #172b25; font-size: .875rem; text-align: left; }
.guide-group button:hover, .guide-group button[aria-pressed="true"] { background: #eaf0e8; color: var(--green); }
.guide-group button[aria-pressed="true"] { font-weight: 700; }
.guide-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.guide-mobile { display: none; }
.guide-results .results-header { min-height: 90px; }
.guide-results .empty { padding-block: 30px; }
.guide-retry { display: block; margin: 12px auto 0; }
.guide-name { display: inline; border: 0; padding: 0; background: none; color: var(--green); font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: #9bb4a5; text-underline-offset: 3px; }
.guide-name:hover { text-decoration-color: currentColor; }
.guide-results td:first-child { min-width: 122px; }
.guide-detail td { padding-block: 14px; background: #f2f5ef; }
.guide-detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 10px 16px; margin: 0; }
.guide-detail dl > div { min-width: 0; }
.guide-detail dt { color: var(--muted); font-size: .85rem; }
.guide-detail dd { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.guide-detail .guide-wide { grid-column: 1 / -1; }
.guide-cell-wrap { white-space: pre-line; }
.amber-account-link { display: block; margin-top: 9px; color: var(--green); text-underline-offset: 3px; }
.chef-disk-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px 18px; padding: 16px 24px; border-top: 1px solid var(--line); }
.chef-disk-card h3 { margin: 0; font-size: 1.13rem; }
.disk-chef { display: grid; align-content: center; gap: 6px; min-width: 0; }
.disk-chef > div:first-child, .chef-card-info { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; }
.disk-level, .chef-card-info .tag { color: var(--green); font-size: .875rem; }
.disk-level { display: inline-flex; align-items: center; gap: 4px; }
.disk-level select, .chef-training-select { min-height: 32px; padding: 3px 25px 3px 6px; font-size: .8125rem; }
.chef-card-equipment { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-width: 0; padding: 9px 12px; border: 1px solid #cddbd0; border-radius: 7px; background: #eef4ed; }
.chef-card-equipment > div { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.chef-card-equipment strong { display: block; font-size: 1.05rem; margin-block: 3px; }
.chef-disk-card .button { min-height: 35px; padding: 5px 9px; }
.disk-slot-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.disk-slot { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 70px; padding: 9px 10px; border: 1px solid #d4ded6; border-radius: 7px; background: #f2f5ef; overflow-wrap: anywhere; }
.disk-slot-label { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); }
.disk-slot-label::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--slot-color, #a77437); }
.disk-tone-1 { --slot-color: #b15348; background: #faf0ed; border-color: #e7d3cb; }
.disk-tone-2 { --slot-color: #428269; background: #edf4ed; border-color: #d1e1d4; }
.disk-tone-3 { --slot-color: #4d76a1; background: #eef3f8; border-color: #d4e0eb; }
.disk-tone-0 { background: #fbf5e6; border-color: #e8d9b8; }
.disk-slot strong { font-size: .9rem; }
.disk-slot-detail, .disk-suits { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.disk-suits { grid-column: 1 / -1; }
.disk-change { justify-self: start; min-height: 27px; padding: 1px 5px; border: 0; border-radius: 3px; color: var(--green); background: transparent; font-size: .825rem; text-decoration: underline; text-underline-offset: 3px; }
.disk-change:hover { background: #dfecdf; }
.amber-editor { box-sizing: border-box; width: min(470px, calc(100% - 28px)); padding: 20px; border: 1px solid var(--line); border-radius: 8px; color: #172b25; background: var(--paper); }
.amber-editor::backdrop { background: #143b306b; }
.amber-editor form { display: grid; gap: 9px; }
.amber-editor label, .amber-editor p { font-size: .875rem; }
.amber-editor p { color: var(--muted); line-height: 1.5; }
.amber-editor-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.amber-editor-head p { margin: 4px 0; }
.amber-editor select[size] { appearance: auto; width: 100%; background-image: none; padding-right: 8px; }
.amber-editor-actions { display: flex; justify-content: space-between; gap: 8px; }
.amber-editor-preview { min-height: 1.3em; }
.chef-profile-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chef-profile-points label { display: grid; gap: 4px; }
.chef-profile-points input { width: 100%; min-width: 0; padding-inline: 7px; }
.chef-base-gathering { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(28px, 1fr)); gap: 5px; color: var(--green); font-size: .875rem; }
.chef-base-gathering span { display: grid; align-items: center; min-width: 0; padding: 5px 3px; border-radius: 4px; background: #edf2eb; text-align: center; overflow-wrap: anywhere; }
.chef-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chef-profile-fields label, .chef-equipment-fields { display: grid; gap: 5px; min-width: 0; }
.chef-profile-fields select, .chef-equipment-fields select { min-width: 0; }
.chef-equipment-fields { gap: 8px; margin-block: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #eef4ed; }
.priority-harvest { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.priority-harvest summary { margin: 0 0 6px; font-size: .95rem; }
.priority-harvest ol { margin: 0; padding-inline-start: 1.5rem; }
.priority-harvest li { margin-block: 9px; padding-inline-start: 2px; }
.priority-harvest li > span { display: block; margin-block-start: 3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.collection-mode { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-width: 0; margin: 0; padding: 16px 24px; border: 0; border-bottom: 1px solid var(--line); }
.collection-mode label { position: relative; cursor: pointer; }
.collection-mode input { position: absolute; opacity: 0; width: 1px; min-height: 0; padding: 0; }
.collection-mode span { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-weight: 700; }
.collection-mode input:checked + span { background: #e5eee6; border-color: #abc8b5; color: var(--green); }
.collection-mode input:focus-visible + span { outline: 3px solid #8b5135; outline-offset: 2px; }
.collection-mode > button { margin-inline-start: auto; min-height: 0; }
.collection-all-status { margin: 12px 24px 0; color: var(--muted); font-size: .875rem; }
.collection-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 18px 24px 0; }
.collection-fields label { display: grid; gap: 5px; min-width: 0; font-size: .875rem; font-weight: 700; }
.collection-fields select { width: 100%; font-weight: 400; }
.collection-filters-panel { min-width: 0; margin: 12px 24px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.collection-filters-panel legend { color: var(--green); font-weight: 700; padding-inline: 5px; }
.collection-filters-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.collection-exclusion { min-width: 0; padding: 7px 9px; border-radius: 5px; background: #f4f6f1; font-size: .875rem; }
.collection-exclusion summary, .collection-config summary, .collection-breakdown summary { color: var(--green); font-weight: 700; cursor: pointer; }
.collection-exclusion[open] summary { margin-bottom: 8px; }
.collection-exclusion input[type="search"] { display: block; width: 100%; margin: 4px 0 9px; }
.collection-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-block: 6px; }
.collection-chips:empty { display: none; }
.collection-chips .button { min-height: 28px; padding: 2px 6px; }
.collection-excluded-list { max-height: 200px; overflow: auto; }
.collection-bulk-exclusions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.collection-gift-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-top: 8px; }
.collection-gift-controls summary { padding-block: 8px; color: var(--green); font-weight: 700; cursor: pointer; font-size: .875rem; }
.collection-gift-list { padding-left: 22px; margin-block: 4px; max-height: 220px; overflow: auto; font-size: .875rem; color: var(--muted); }
.collection-gift-list li { margin-block: 3px; }
.collection-excluded-list label, .collection-config-fields label:has(input) { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.collection-excluded-list input[type="checkbox"], .collection-config-fields input[type="checkbox"] { min-height: 0; accent-color: var(--green); }
.collection-config { margin: 12px 24px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.collection-config-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 8px; font-size: .875rem; }
.collection-config select { min-height: 34px; margin-left: 6px; }
#collection-config-note, #collection-setup-note { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.collection-default-equip, .collection-area-bulk, .collection-harvest-options { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.collection-default-equip label, .collection-area-bulk label, .collection-harvest-options label { display: flex; align-items: center; gap: 6px; }
.collection-default-equip input { min-height: 34px; width: 145px; }
.collection-default-equip select { margin-left: 0; max-width: 210px; }
.collection-area-bulk { margin-block: 12px 10px; font-size: .875rem; }
.collection-area-bulk .button { min-height: 34px; }
.collection-area-setup-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; }
.collection-area-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; min-width: 0; padding: 6px 8px; border-left: 3px solid #a5b8a6; border-radius: 4px; background: #f4f6f1; font-size: .875rem; }
.collection-area-setting strong { min-width: 3.2em; color: var(--green); }
.collection-area-setting label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.collection-area-setting select { margin-left: 0; padding-block: 3px; }
.collection-harvest-options { margin-bottom: 6px; color: var(--green); font-size: .875rem; }
.collection-harvest-options input { min-height: 0; accent-color: var(--green); }
.collection-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px 20px; }
.collection-actions p, .collection-source { font-size: .875rem; color: var(--muted); line-height: 1.55; }
.collection-buttons { display: flex; gap: 8px; }
.collection-joint { min-width: 0; margin: 0 24px 18px; padding: 8px 12px 12px; border: 1px solid var(--line); border-radius: 6px; }
.collection-joint legend { color: var(--green); font-weight: 700; padding-inline: 5px; }
.collection-joint-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.collection-joint-actions label { display: flex; align-items: center; gap: 6px; font-size: .875rem; }
.collection-joint-actions input { min-height: 0; accent-color: var(--green); }
.collection-priorities { display: grid; grid-template-columns: repeat(auto-fit, minmax(106px, 1fr)); gap: 8px; margin-top: 12px; }
.collection-priorities label { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 7px; background: #f4f6f1; border-radius: 5px; font-size: .875rem; }
.collection-priorities select { min-height: 32px; padding-block: 3px; }
#collection-priority-panel p { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.collection-results { margin-top: 16px; }
.collection-board { margin-top: 16px; }
.collection-board .results-header { padding-bottom: 10px; }
.collection-plan-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.collection-plan-actions select { max-width: min(100%, 16rem); }
.collection-plan-status { margin: 0 24px 10px; color: var(--muted); font-size: .875rem; }
.collection-plan-status[data-kind="error"] { color: #8a392c; }
.collection-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 24px 18px; }
:root {
  --collection-zone-veg: #69826d;
  --collection-zone-meat: #a36958;
  --collection-zone-fish: #4e7c8e;
  --collection-zone-creation: #a38344;
  --collection-zone-jade: #6f7aa0;
  --collection-zone-condiment: #936f52;
  --collection-origin-gift: #875643;
  --collection-origin-obtainable: #306779;
  --collection-jade-red: #a74747;
  --collection-jade-yellow: #87671b;
  --collection-jade-blue: #3e679d;
  --collection-jade-green: #3b7556;
  --collection-jade-pink: #994e6a;
  --collection-jade-black: #494b50;
}
.collection-zone .collection-jade-title {
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--jade-title-tone);
  background: color-mix(in srgb, var(--jade-title-tone) 12%, #fff);
}
.collection-zone { --zone-color: var(--collection-zone-veg); min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-top: 3px solid var(--zone-color); border-radius: 6px; background: #f4f6f1; }
.collection-zone[data-type="meat"] { --zone-color: var(--collection-zone-meat); }
.collection-zone[data-type="fish"] { --zone-color: var(--collection-zone-fish); }
.collection-zone[data-type="creation"] { --zone-color: var(--collection-zone-creation); }
.collection-zone[data-type="jade"] { --zone-color: var(--collection-zone-jade); }
.collection-zone[data-type="condiment"] { --zone-color: var(--collection-zone-condiment); }
.collection-zone[data-locked] { border-color: #adcab7; background: #e8f1e8; }
.collection-zone-header, .collection-zone-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.collection-zone-header { justify-content: space-between; }
.collection-zone h3 { margin: 0; font-size: 1rem; }
.collection-zone-type { color: var(--muted); font-size: .8125rem; }
.collection-zone-material { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8125rem; }
.collection-zone-material select { padding-inline: 6px 22px; }
.collection-zone select { max-width: 100%; min-height: 34px; margin: 4px 0; padding-block: 4px; }
.collection-zone-info { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; color: var(--muted); font-size: .8125rem; }
.collection-zone-info span { padding: 2px 7px; border-radius: 4px; background: #e5ede4; color: var(--green); }
.collection-zone-roster { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.collection-zone-roster summary { color: var(--green); cursor: pointer; font-size: .8125rem; font-weight: 700; }
.collection-zone-members { display: grid; gap: 4px; list-style: none; padding: 0; margin: 7px 0 0; }
.collection-zone-members li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 2px 6px; border-radius: 4px; background: #e9efe6; font-size: .8125rem; }
.collection-zone-members .collection-member-actions { justify-content: flex-end; margin: 0; column-gap: 1px; }
.collection-member-gear { min-width: 0; }
.collection-member-gear-button { display: flex; align-items: center; gap: 5px; width: 100%; min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: left; }
.collection-member-gear-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.collection-member-gear span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-member-gear span:first-child { flex: 0 1 auto; }
.collection-member-gear span + span { border-left: 1px solid #b7c7ba; padding-left: 5px; }
.collection-member-gear .collection-member-suit { color: var(--green); font-weight: 600; }
.collection-origin-gift { color: var(--collection-origin-gift); }
.collection-origin-obtainable { color: var(--collection-origin-obtainable); }
.collection-image-modes, .collection-unique-equipment { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; }
.collection-unique-equipment .button { min-height: 27px; padding: 3px 7px; font-size: .8125rem; }
.collection-unique-equipment .button[aria-pressed="true"] { background: #e1ede4; border-color: #a3bfaa; }
.collection-image-modes label { display: inline-flex; gap: 5px; align-items: center; }
.collection-image-modes input { min-height: 0; accent-color: var(--green); }
#collection-member-gear-detail { white-space: pre-line; }
.collection-chef-pin { padding: 3px 4px; border: 0; border-radius: 3px; background: transparent; color: var(--green); font: inherit; font-size: .8rem; text-decoration: underline; }
.collection-chef-pin[aria-pressed="true"] { font-weight: 700; background: #d1e5d6; }
.collection-member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin-top: 4px; }
.collection-chef-remove, .collection-chef-exclude { color: #8a392c; }
.collection-chef-remove:disabled, .collection-chef-exclude:disabled { opacity: .55; }
.collection-zone-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.collection-zone-actions .button { min-height: 33px; padding: 4px 7px; }
#collection-status[data-kind="success"] { color: #14563d; }
#collection-status[data-kind="partial"] { color: #8b5330; }
.collection-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 24px 16px; }
.collection-metrics > div { display: grid; gap: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #edf2eb; }
.collection-metrics span { font-size: .8125rem; color: var(--muted); }
.collection-metrics strong { font-size: 1.125rem; }
.collection-yield-metrics > div { background: #e5eee6; border-color: #c9dacc; }
#collection-veg-output[open] > summary { margin-bottom: 8px; }
.collection-harvest-table { table-layout: fixed; min-width: 660px; }
.collection-harvest-table :is(th, td) { padding-inline: 14px; text-align: center; }
.collection-harvest-table :is(th, td):first-child { text-align: left; }
.collection-harvest-table :is(th, td):not(:first-child) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.collection-team-table td:first-child, .collection-team-table tbody td:nth-child(3) { min-width: 110px; }
.collection-team-table tbody td:nth-child(4) { min-width: 190px; }
.collection-team-table td:nth-child(6) { font-weight: 700; white-space: nowrap; }
.collection-results tfoot { background: #edf2eb; }
.collection-results tfoot td { font-weight: 700; white-space: nowrap; }
.collection-slot td { height: 42px; color: var(--muted); }
.collection-slot td:first-child { font-size: .8125rem; }
.collection-breakdown { padding: 12px 24px 14px; font-size: .875rem; }
.collection-breakdown ul { margin-block: 8px; padding-inline-start: 18px; line-height: 1.65; }
.collection-breakdown p { margin-top: 5px; color: var(--muted); line-height: 1.55; }
.collection-result-edit { display: block; margin: 5px 0 0; }
.collection-editor-search { display: grid; gap: 5px; margin-top: 12px; }
.collection-editor-search input { width: 100%; }
#collection-editor-fields { display: grid; gap: 9px; margin-block: 10px; }
#collection-editor-fields label { display: grid; gap: 4px; }
#collection-editor-fields select { width: 100%; }
.collection-editor-live { padding: 8px; background: #edf2eb; border-radius: 5px; }
.collection-source { padding: 0 24px 14px; }
.collection-source a { color: var(--green); text-underline-offset: 3px; }
.jade-base-table { margin-top: 16px; }
.jade-base-table summary { padding: 15px 24px; color: var(--green); font-weight: 700; cursor: pointer; }
.food-guide-content { padding: 0 24px 18px; }
.food-guide-controls, .food-guide-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .875rem; }
.food-guide-controls label { display: flex; align-items: center; gap: 5px; }
.food-guide-controls input[type="number"] { width: 86px; }
.food-guide-controls input[type="checkbox"] { min-height: 0; accent-color: var(--green); }
.food-guide-chart { display: grid; gap: 8px; margin: 14px 0; }
.food-guide-legend span { display: flex; align-items: center; gap: 5px; }
.food-guide-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--material-color); }
.food-guide-bar-row { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) minmax(80px, auto); gap: 8px; align-items: center; font-size: .8125rem; }
.food-guide-bar { display: flex; height: 16px; overflow: hidden; border-radius: 3px; background: #eef1ec; }
.food-guide-bar span { flex: 0 0 auto; }
#food-guide-table th, #food-guide-table td { min-width: 110px; white-space: nowrap; }
.jade-base-table > p { padding: 0 24px 12px; color: var(--muted); font-size: .875rem; }
.jade-base-table td { font-variant-numeric: tabular-nums; }
footer { padding: 18px 0 24px; color: var(--muted); font-size: .875rem; }
footer a { color: var(--green); text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 780px) {
  .import-panel { grid-template-columns: 1fr; gap: 16px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-sidebar { display: none; }
  .guide-mobile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); font-size: .875rem; }
}

@media (max-width: 980px) {
  .collection-bulk-exclusions .collection-gift-controls { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .masthead-inner { column-gap: 8px; }
  .masthead .state { display: none; }
  .mode-nav { gap: 2px; }
  .mode-nav a { padding-inline: 8px; }
  .intro { padding-block: 26px 18px; align-items: start; }
  .intro p { font-size: .875rem; }
  .import-panel { padding: 17px 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 10px 12px; }
  .tabs { padding: 0 12px; gap: 11px; }
  .tabs button { font-size: .875rem; }
  .results-header, .pagination { padding: 14px; }
  .filters { width: 100%; }
  .filters input { flex: 1 1 140px; width: 0; min-width: 0; }
  .guide-mobile { padding-inline: 14px; }
  .guide-results table { width: 100%; }
  .guide-results th, .guide-results td { padding-inline: 8px; font-size: .875rem; }
  .chef-disk-card { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; padding-inline: 14px; }
  .chef-card-equipment { grid-column: 1 / -1; }
  .disk-chef { gap: 6px; }
  .disk-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-mode, .collection-fields, .collection-actions, .collection-metrics, .collection-source { padding-inline: 14px; }
  .collection-fields, .collection-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .collection-buttons > button { flex: 1 1 auto; padding-inline: 8px; }
  .collection-buttons { flex-wrap: wrap; }
  .collection-bulk-exclusions, .collection-gift-controls { grid-template-columns: minmax(0, 1fr); }
  .collection-zones { grid-template-columns: 1fr; padding-inline: 14px; }
  .collection-area-setup-list { grid-template-columns: 1fr; }
  .collection-config, .collection-filters-panel, .collection-joint { margin-inline: 14px; }
  .collection-breakdown { padding-inline: 14px; }
  .food-guide-content { padding-inline: 14px; }
  .collection-plan-status, .collection-all-status { margin-inline: 14px; }
  .collection-results th, .collection-results td { padding-inline: 8px; }
  .empty { margin-inline: 14px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
}

@media (max-width: 460px) {
  .masthead-inner { padding-block: 8px; flex-wrap: wrap; gap: 4px; }
  .brand { gap: 7px; font-size: .9375rem; letter-spacing: .05em; }
  .mode-nav { width: 100%; justify-content: space-between; margin-left: 0; }
  .mode-nav a { padding-inline: 7px; }
  .collection-zone-members li { grid-template-columns: auto minmax(0, 1fr); gap: 2px 6px; }
  .collection-zone-members .collection-member-actions { grid-column: 1 / -1; }
}
