:root {
  --cork: #855736;
  --paper: #eadcb5;
  --paper-light: #f8f0d3;
  --ink: #34291d;
  --muted: #74654e;
  --green: #52755b;
  --green-dark: #355540;
  --gold: #b77c32;
  --red: #9a4e3c;
  --blue: #4e7180;
  --line: rgba(91, 69, 42, 0.27);
  --shadow: 8px 11px 0 rgba(52, 30, 15, 0.16), 0 20px 45px rgba(47, 27, 14, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 13px 19px, rgba(48, 29, 17, 0.22) 0 1px, transparent 1.7px),
    radial-gradient(circle at 43px 47px, rgba(247, 214, 161, 0.11) 0 1.1px, transparent 1.9px),
    repeating-linear-gradient(19deg, rgba(255, 226, 179, 0.018) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #986942, #75482d 56%, #8c5c38);
  background-size: 82px 64px, 91px 73px, auto, auto;
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid rgba(234, 202, 150, 0.22);
  color: #f1e3c7;
  background: rgba(35, 27, 18, 0.96);
  box-shadow: 0 6px 22px rgba(45, 26, 14, 0.2);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand > span:last-child { display: grid; }
.brand strong { font: 700 1.05rem/1.1 Georgia, serif; letter-spacing: 0.04em; }
.brand small { color: #b8a78a; font-size: 0.55rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.brand-mark { display: grid; width: 38px; height: 38px; border: 1px solid rgba(213, 170, 97, 0.52); border-radius: 50%; color: #d5aa61; background: rgba(211, 165, 85, 0.08); font: 700 1rem Georgia, serif; place-items: center; }
.site-nav { display: flex; justify-content: center; gap: 6px; }
.site-nav a { padding: 8px 10px; color: #c5b494; font-size: 0.75rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { color: #f1e3c7; }
.privacy-badge { padding: 6px 9px; border: 1px solid rgba(213, 170, 97, 0.3); border-radius: 2px; color: #cfb98f; font-size: 0.61rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.page-shell { width: min(1320px, calc(100% - 30px)); margin: 0 auto; padding: 40px 0 110px; }
.palbox-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 34px; margin-bottom: 28px; color: #f3e5c8; }
.palbox-hero h1 { margin: 0 0 8px; font: 700 clamp(3.4rem, 8vw, 7rem)/0.9 Georgia, serif; letter-spacing: -0.055em; }
.palbox-hero > div > p:last-child { max-width: 770px; margin: 0; color: #e0cba7; font: italic 1rem/1.7 Georgia, serif; }
.eyebrow { margin: 0 0 7px; color: #98612c; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.palbox-hero .eyebrow { color: #d3aa68; }
.box-status-note { position: relative; display: grid; min-height: 155px; padding: 34px 22px 20px; color: #514630; background: #d9d078; box-shadow: 6px 8px 0 rgba(49, 27, 13, 0.17); text-align: center; transform: rotate(1deg); place-content: center; }
.pin { position: absolute; top: 11px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8a282, #a14e35 65%, #692d20); box-shadow: 0 2px 3px rgba(50, 27, 14, 0.3); transform: translateX(-50%); }
.box-status-note strong { font: 700 2.5rem/1 Georgia, serif; }
.box-status-note span { font-size: 0.67rem; font-weight: 900; text-transform: uppercase; }
.box-status-note small { margin-top: 8px; color: #716544; font: italic 0.68rem Georgia, serif; }

.empty-palbox, .filter-sheet, .collection-sheet {
  position: relative;
  border: 1px solid rgba(91, 68, 40, 0.36);
  border-radius: 4px 13px 5px 10px;
  background:
    linear-gradient(90deg, transparent 0 38px, rgba(152, 75, 61, 0.055) 39px, transparent 40px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(87, 78, 59, 0.055) 36px),
    linear-gradient(145deg, #f2e7c4, #d9c695);
  box-shadow: var(--shadow);
}
.panel-tape { position: absolute; z-index: 2; top: -11px; left: 50%; width: 94px; height: 24px; background: rgba(222, 200, 151, 0.88); box-shadow: 0 2px 3px rgba(58, 40, 22, 0.12); clip-path: polygon(0 12%, 8% 0, 22% 8%, 38% 1%, 52% 9%, 68% 0, 84% 8%, 100% 2%, 97% 88%, 83% 100%, 65% 91%, 47% 100%, 29% 92%, 12% 100%, 2% 87%); transform: translateX(-50%) rotate(-1deg); }
.empty-palbox { display: grid; max-width: 760px; min-height: 390px; margin: 70px auto 0; padding: 55px; text-align: center; place-items: center; place-content: center; }
.empty-icon { display: grid; width: 82px; height: 82px; margin-bottom: 15px; border: 3px double var(--green-dark); border-radius: 50%; color: var(--green-dark); font: 700 2rem Georgia, serif; place-items: center; }
.empty-palbox h2 { margin: 0 0 12px; font: 700 2.4rem Georgia, serif; }
.empty-palbox > p:not(.eyebrow) { max-width: 560px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 3px 8px 4px 7px; font-size: 0.73rem; font-weight: 900; text-decoration: none; cursor: pointer; }
.button-primary { color: #f8eed3; background: var(--green-dark); }
.button-secondary { border-color: rgba(79, 63, 40, 0.35); color: #574832; background: rgba(252, 245, 215, 0.45); }

.summary-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 28px; }
.summary-strip article { padding: 14px 16px; border: 1px solid rgba(76, 54, 32, 0.22); border-radius: 2px 7px 3px 6px; background: rgba(238, 221, 178, 0.93); box-shadow: 3px 5px 0 rgba(50, 28, 14, 0.12); }
.summary-strip article:nth-child(2) { background: #d7dfb9; }
.summary-strip article:nth-child(3) { background: #e6d5b6; }
.summary-strip article:nth-child(4) { background: #d2dfe0; }
.summary-strip article:nth-child(5) { background: #ddd2df; }
.summary-strip span, .summary-strip strong { display: block; }
.summary-strip span { color: #76664f; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-strip strong { margin-top: 3px; color: var(--green-dark); font: 700 1.55rem Georgia, serif; }
.workspace-grid { display: grid; grid-template-columns: 285px minmax(0, 1fr); align-items: start; gap: 24px; }
.filter-sheet { position: sticky; top: 92px; padding: 29px 22px 24px; }
.filter-heading, .collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 20px; padding-bottom: 13px; border-bottom: 1px dashed var(--line); }
.filter-heading h2, .collection-heading h2 { margin: 0; font: 700 1.45rem Georgia, serif; }
.text-button { padding: 3px; border: 0; color: var(--green-dark); background: transparent; font-size: 0.68rem; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button.light { color: #dac7a4; }
.filter-sheet > label, .filter-pair label { display: grid; gap: 5px; margin-bottom: 13px; }
.filter-sheet label > span, .filter-sheet legend { color: #685a44; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.filter-sheet input[type="search"], .filter-sheet select { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid rgba(83, 67, 43, 0.33); border-radius: 3px 7px 3px 6px; outline: 0; color: var(--ink); background: rgba(255, 251, 229, 0.76); }
.filter-sheet input:focus, .filter-sheet select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(73, 113, 83, 0.13); }
.filter-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-sheet fieldset { display: grid; gap: 7px; margin: 5px 0 15px; padding: 12px; border: 1px dashed var(--line); }
.check-row { display: flex; align-items: center; gap: 8px; color: #544936; font-size: 0.72rem; font-weight: 750; }
.check-row input { accent-color: var(--green-dark); }
.filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.filter-actions a, .filter-actions button { padding: 8px; border: 1px solid rgba(71, 95, 72, 0.3); border-radius: 3px; color: var(--green-dark); background: rgba(80, 118, 90, 0.06); font-size: 0.62rem; font-weight: 900; text-align: center; text-decoration: none; cursor: pointer; }
.collection-sheet { min-width: 0; padding: 30px; }
.collection-heading p { margin: 0; color: var(--muted); font-size: 0.72rem; }
.rarity-key { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; margin: 0.7rem 0 0.9rem; color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.rarity-key span { display: inline-flex; align-items: center; gap: 0.32rem; }
.rarity-key i { width: 0.78rem; height: 0.78rem; border: 1px solid rgba(77, 56, 34, 0.28); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.rarity-key .common i { background: #ecdbad; }
.rarity-key .rare i { background: #c2dde3; }
.rarity-key .epic i { background: #d3bbe1; }
.rarity-key .legendary i { background: #e7bd68; }
.pal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pal-card { position: relative; min-width: 0; border: 1px solid rgba(83, 64, 40, 0.25); border-radius: 4px 10px 4px 8px; background: rgba(255, 250, 226, 0.48); box-shadow: 2px 3px 0 rgba(60, 42, 23, 0.08); overflow: hidden; transition: transform 140ms ease, box-shadow 140ms ease; }
.pal-card.rarity-common { background: linear-gradient(145deg, rgba(248, 235, 199, 0.82), rgba(228, 211, 168, 0.7)); }
.pal-card.rarity-rare { border-color: rgba(67, 112, 132, 0.34); background: linear-gradient(145deg, rgba(213, 232, 235, 0.84), rgba(177, 207, 218, 0.7)); }
.pal-card.rarity-epic { border-color: rgba(113, 80, 143, 0.34); background: linear-gradient(145deg, rgba(230, 218, 238, 0.86), rgba(203, 180, 220, 0.72)); }
.pal-card.rarity-legendary { border-color: rgba(168, 111, 34, 0.44); background: linear-gradient(145deg, rgba(246, 220, 153, 0.9), rgba(220, 174, 91, 0.76)); box-shadow: 0 7px 18px rgba(87, 54, 20, 0.2); }
.pal-card:hover { transform: translateY(-2px); box-shadow: 3px 6px 0 rgba(60, 42, 23, 0.1); }
.pal-card-main { display: grid; grid-template-columns: 82px minmax(0, 1fr); width: 100%; padding: 11px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.pal-portrait { position: relative; align-self: start; }
.pal-portrait img { display: block; width: 76px; height: 76px; object-fit: contain; }
.favorite-mark, .alpha-mark { position: absolute; display: grid; width: 22px; height: 22px; border-radius: 50%; color: #fff8df; font-size: 0.72rem; font-weight: 900; place-items: center; }
.favorite-mark { top: 0; right: 0; background: #b57d2d; }
.alpha-mark { bottom: -1px; left: -1px; width: 30px; height: 26px; border-radius: 0; background: transparent; filter: drop-shadow(0 1px 1px rgba(67, 25, 22, 0.48)); }
.alpha-mark img { display: block; width: 28px; height: auto; image-rendering: auto; }
.pal-card-copy { min-width: 0; padding-left: 9px; }
.pal-card h3 { margin: 3px 0 0; overflow: hidden; font: 700 1rem Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.pal-card h3 small { display: block; margin-bottom: 1px; color: #87613b; font: 800 0.55rem system-ui, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.pal-card-meta { margin: 4px 0 8px; color: var(--muted); font-size: 0.62rem; font-weight: 800; }
.trait-peek { display: flex; gap: 3px; overflow: hidden; }
.trait-peek span { max-width: 105px; padding: 2px 5px; overflow: hidden; border-radius: 3px; color: var(--green-dark); background: rgba(75, 112, 82, 0.1); font-size: 0.53rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.trait-peek .empty-trait { color: #82735e; background: transparent; }
.pal-card-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px dashed var(--line); }
.pal-card-actions button { min-height: 32px; border: 0; color: #675843; background: rgba(255,255,255,0.14); font-size: 0.58rem; font-weight: 900; cursor: pointer; }
.pal-card-actions button + button { border-left: 1px dashed var(--line); }
.pal-card-actions button.active { color: #fff5d9; background: var(--green); }
.no-results { display: grid; min-height: 260px; color: var(--muted); text-align: center; place-content: center; }
.no-results strong { color: #514536; font: 700 1.3rem Georgia, serif; }
.no-results span { margin-top: 5px; font-size: 0.76rem; }

.compare-tray { position: fixed; z-index: 80; right: 20px; bottom: 18px; left: 20px; display: flex; align-items: center; gap: 15px; max-width: 980px; min-height: 72px; margin: auto; padding: 11px 14px 11px 18px; border: 1px solid rgba(221, 184, 123, 0.27); border-radius: 4px 11px 4px 9px; color: #f2dfbd; background: rgba(48, 35, 23, 0.97); box-shadow: 0 12px 35px rgba(31, 18, 10, 0.35); }
.compare-tray > div:first-child { min-width: 0; flex: 1; }
.compare-tray > div > span { display: block; color: #cdb68f; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.compare-chips { display: flex; gap: 5px; margin-top: 5px; overflow-x: auto; }
.compare-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 3px; border: 1px solid rgba(225, 194, 141, 0.2); border-radius: 999px; white-space: nowrap; }
.compare-chip img { width: 24px; height: 24px; object-fit: contain; }
.compare-chip span { font-size: 0.62rem; font-weight: 850; }
.compare-tray .button:disabled { opacity: 0.42; cursor: not-allowed; }

dialog { padding: 0; border: 0; color: var(--ink); background: transparent; }
dialog::backdrop { background: rgba(35, 22, 13, 0.72); backdrop-filter: blur(2px); }
.pal-inspector { width: min(860px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow: auto; border: 10px solid #4a301e; border-radius: 6px; background: #e9dcb5; box-shadow: 0 28px 80px rgba(27, 16, 9, 0.5); }
.dialog-close { position: sticky; z-index: 5; top: 10px; float: right; display: grid; width: 36px; height: 36px; margin: 10px 10px -46px 0; border: 1px solid rgba(71, 52, 30, 0.25); border-radius: 50%; color: #4d3d2a; background: rgba(247, 238, 207, 0.94); font-size: 1.45rem; cursor: pointer; place-items: center; }
.inspector-hero { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 26px; padding: 38px; background: repeating-linear-gradient(0deg, transparent 0 35px, rgba(87,78,59,.055) 36px), linear-gradient(145deg,#f2e7c4,#d9c695); }
.pal-inspector.rarity-rare .inspector-hero { background: linear-gradient(145deg, rgba(213, 232, 235, 0.9), rgba(177, 207, 218, 0.74)); }
.pal-inspector.rarity-epic .inspector-hero { background: linear-gradient(145deg, rgba(230, 218, 238, 0.92), rgba(203, 180, 220, 0.76)); }
.pal-inspector.rarity-legendary .inspector-hero { background: linear-gradient(145deg, rgba(246, 220, 153, 0.94), rgba(220, 174, 91, 0.8)); }
.inspector-portrait { position: relative; display: grid; min-height: 220px; border: 1px solid var(--line); border-radius: 3px 10px 4px 8px; background: rgba(255, 250, 227, 0.45); place-items: center; }
.inspector-portrait::before { position: absolute; top: -10px; left: 50%; width: 82px; height: 22px; background: rgba(220, 198, 151, 0.86); content: ""; transform: translateX(-50%) rotate(-2deg); }
.inspector-portrait img { width: 205px; height: 205px; object-fit: contain; }
.inspector-title h2 { margin: 3px 0 6px; font: 700 clamp(2.2rem, 6vw, 4.4rem)/0.95 Georgia, serif; }
.inspector-title h2 small { display: block; margin-bottom: 6px; color: #896039; font: 800 0.7rem system-ui, sans-serif; letter-spacing: 0.07em; text-transform: uppercase; }
.inspector-meta { color: var(--muted); font-size: 0.72rem; font-weight: 850; }
.inspector-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.inspector-badges span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid rgba(68, 100, 72, 0.25); border-radius: 3px; color: var(--green-dark); background: rgba(76, 114, 84, 0.08); font-size: 0.6rem; font-weight: 900; text-transform: uppercase; }
.inspector-badges .alpha-inline-icon { width: 17px; height: auto; filter: drop-shadow(0 1px 0 rgba(67, 25, 22, 0.28)); }
.inspector-badges img { width: 20px; height: 20px; object-fit: contain; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.inspector-body { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 20px 28px 34px; }
.detail-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 3px 9px 4px 7px; background: rgba(255, 250, 230, 0.4); }
.detail-card:nth-child(4n + 1) { background: rgba(247, 232, 196, 0.54); }
.detail-card:nth-child(4n + 2) { background: rgba(219, 229, 198, 0.54); }
.detail-card:nth-child(4n + 3) { background: rgba(207, 224, 227, 0.52); }
.detail-card:nth-child(4n) { background: rgba(232, 213, 225, 0.5); }
.detail-card.wide { grid-column: 1 / -1; }
.detail-card h3 { margin: 0 0 12px; color: #44382a; font: 700 1.1rem Georgia, serif; }
.trait-list, .move-list { display: grid; gap: 7px; }
.owned-trait + .owned-trait { padding-top: 7px; border-top: 1px dashed var(--line); }
.trait-record, .move-record { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); text-decoration: none; }
.owned-trait .trait-record { border-bottom: 0; }
.trait-plan-link { display: inline-block; margin: 0 0 7px; color: var(--green-dark); font-size: 0.62rem; font-weight: 900; text-underline-offset: 3px; }
.trait-record:last-child, .move-record:last-child { border-bottom: 0; }
.trait-record strong, .move-record strong { color: var(--green-dark); font-size: 0.76rem; }
.trait-record span, .move-record span { color: var(--muted); font-size: 0.64rem; }
.trait-record small { color: #875c2d; font-size: 0.6rem; font-weight: 900; }
.iv-list { display: grid; gap: 10px; }
.iv-row { display: grid; grid-template-columns: 60px 1fr 34px; align-items: center; gap: 8px; color: #5c4f3c; font-size: 0.68rem; font-weight: 850; }
.iv-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(82, 69, 48, 0.13); }
.iv-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7f9a6d, #3f7050); }
.detail-empty { margin: 0; color: var(--muted); font: italic 0.76rem/1.5 Georgia, serif; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.detail-card.wide .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-record { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 7px; border: 1px solid rgba(78, 91, 60, 0.18); border-radius: 3px; background: rgba(83, 116, 77, 0.06); }
.work-record img { width: 32px; height: 32px; object-fit: contain; }
.work-record span { overflow: hidden; color: #5e543f; font-size: 0.62rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.work-record strong { color: var(--green-dark); font-size: 0.62rem; }
.notes-field { display: grid; gap: 6px; }
.notes-field span { color: #665841; font-size: 0.62rem; font-weight: 900; text-transform: uppercase; }
.notes-field textarea { min-height: 92px; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: rgba(255, 252, 235, 0.7); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 0.66rem; }
.danger-button { border: 0; color: #8a4436; background: transparent; font-size: 0.65rem; font-weight: 900; text-decoration: underline; cursor: pointer; }

.comparison-dialog { width: min(1050px, calc(100% - 24px)); max-height: calc(100vh - 30px); overflow: auto; border: 10px solid #49301e; border-radius: 6px; background: #eadcb6; box-shadow: 0 28px 80px rgba(27,16,9,.5); }
.comparison-heading { padding: 30px 32px 18px; }
.comparison-heading h2 { margin: 0; font: 700 2.2rem Georgia, serif; }
.comparison-scroll { padding: 0 28px 32px; overflow-x: auto; }
.comparison-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.comparison-table th, .comparison-table td { padding: 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th { color: #64553f; background: rgba(218, 201, 155, 0.54); font-size: 0.64rem; text-transform: uppercase; }
.comparison-table td { background: rgba(255, 250, 229, 0.38); font-size: 0.72rem; }
.comparison-pal { display: grid; justify-items: center; text-align: center; }
.comparison-pal img { width: 92px; height: 92px; object-fit: contain; }
.comparison-pal strong { font: 700 1rem Georgia, serif; }
.comparison-passives { display: flex; flex-wrap: wrap; gap: 4px; }
.comparison-passives span { padding: 2px 5px; border-radius: 3px; color: var(--green-dark); background: rgba(75,112,82,.1); font-size: .58rem; font-weight: 800; }

.site-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; min-height: 105px; padding: 20px max(24px, calc((100vw - 1320px) / 2)); color: #d7c5a4; background: #2e2116; }
.site-footer div strong { font: 700 1rem Georgia, serif; }
.site-footer p { margin: 3px 0 0; color: #aa987b; font-size: 0.72rem; }
.site-footer small { color: #a89576; font-size: 0.65rem; }

@media (max-width: 1080px) {
  .pal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid { grid-template-columns: 250px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .site-header { grid-template-columns: auto 1fr; padding-inline: 14px; }
  .privacy-badge { display: none; }
  .site-nav { justify-content: flex-end; overflow-x: auto; }
  .palbox-hero { grid-template-columns: 1fr; }
  .box-status-note { width: min(100%, 420px); justify-self: center; }
  .summary-strip { grid-template-columns: repeat(3, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .filter-sheet { position: relative; top: auto; }
  .filter-sheet > label, .filter-sheet fieldset, .filter-pair { max-width: none; }
  .inspector-hero { grid-template-columns: 180px 1fr; padding: 30px 24px; }
  .inspector-portrait { min-height: 180px; }
  .inspector-portrait img { width: 170px; height: 170px; }
}
@media (max-width: 590px) {
  .brand small { display: none; }
  .site-nav a { padding-inline: 6px; font-size: 0.66rem; }
  .site-nav a:nth-child(2) { display: none; }
  .page-shell { width: min(100% - 18px, 1320px); padding-top: 25px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .collection-sheet { padding: 25px 13px; }
  .pal-grid { grid-template-columns: 1fr; }
  .filter-pair { grid-template-columns: 1fr; }
  .inspector-hero { grid-template-columns: 1fr; text-align: center; }
  .inspector-portrait { width: min(100%, 280px); justify-self: center; }
  .inspector-badges, .inspector-actions { justify-content: center; }
  .inspector-body { grid-template-columns: 1fr; padding-inline: 16px; }
  .detail-card.wide { grid-column: auto; }
  .detail-card.wide .work-grid { grid-template-columns: 1fr 1fr; }
  .compare-tray { align-items: stretch; flex-wrap: wrap; }
  .compare-tray > div:first-child { flex-basis: 100%; }
  .site-footer { grid-template-columns: auto 1fr; }
  .site-footer > small { grid-column: 1 / -1; }
}
