/* Image guide modules share the existing dark / light palette. */
.gc-guide { display:grid; gap:22px; min-width:0; }
.gc-jump-links { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.gc-jump-links button { min-height:40px; padding:8px 14px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface); color:var(--ink); font-size:12px; cursor:pointer; }
.gc-jump-links button:hover { border-color:var(--accent-border); color:var(--accent); background:var(--tint); }
.gc-jump-links span { margin-left:3px; color:var(--faint); font-size:11px; }
.gc-section { min-width:0; container:guide-section / inline-size; border:1px solid var(--border); border-radius:12px; background:var(--surface); overflow:hidden; }
.gc-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 20px 15px; }
.gc-section-head h2 { margin:0; font-size:17px; font-weight:650; line-height:1.55; color:var(--ink); }
.gc-section-head p { margin:6px 0 0; font-size:12px; line-height:1.8; color:var(--muted); }
.gc-count { flex-shrink:0; margin-top:3px; padding:3px 8px; border:1px solid var(--border); border-radius:5px; color:var(--muted); font-size:11px; line-height:1.7; font-variant-numeric:tabular-nums; }
.gc-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; padding:0 20px 16px; }
.gc-search { display:flex; align-items:center; gap:9px; flex:1 1 240px; min-width:0; min-height:42px; padding:0 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-input); }
.gc-search:focus-within { border-color:var(--accent-border); outline:2px solid var(--focus); outline-offset:1px; }
.gc-search svg { flex:0 0 17px; width:17px; height:17px; fill:none; stroke:var(--faint); stroke-width:1.6; }
.gc-search input { width:100%; min-width:0; min-height:40px; padding:9px 0; border:0; outline:0; border-radius:0; background:transparent; color:var(--ink); font-size:12px; box-shadow:none; }
.gc-search input:focus { border:0; outline:0; }
.gc-select-label { display:flex; flex-direction:column; gap:4px; min-width:105px; max-width:230px; color:var(--muted); font-size:10px; }
.gc-select-label select { min-width:0; width:100%; min-height:42px; padding:9px 28px 9px 10px; border:1px solid var(--border-strong); border-radius:6px; background-color:var(--surface-input); color:var(--ink); font-size:12px; }
.gc-reset { min-height:42px; padding:9px 12px; border:1px solid var(--border); border-radius:6px; background:var(--surface-raised); color:var(--muted); font-size:12px; cursor:pointer; }
.gc-reset:hover { border-color:var(--accent-border); color:var(--accent); }

/* One bounded surface contains every matching card; no hidden detail pages. */
.gc-card-scroll { max-width:100%; max-height:860px; max-height:min(72svh,860px); overflow:auto; overscroll-behavior-inline:contain; overscroll-behavior-y:auto; scrollbar-gutter:stable; border-top:1px solid var(--border); background:var(--soft); }
.gc-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:12px; padding:16px; min-width:0; }
.gc-card { min-width:0; margin:0; border:1px solid var(--border-strong); border-radius:10px; background:var(--surface); overflow:hidden; }
.gc-card[hidden] { display:none!important; }
.gc-card-top { display:flex; align-items:center; gap:12px; min-width:0; padding:14px; }
.gc-card-heading { display:flex; flex:1; flex-direction:column; gap:7px; min-width:0; }
.gc-card-title-line { display:flex; align-items:flex-start; gap:8px; min-width:0; }
.gc-card-title-line h3 { flex:1; min-width:0; margin:0; color:var(--ink); font-size:14px; font-weight:650; line-height:1.55; overflow-wrap:anywhere; }
.gc-card-title-line>.gc-grade { flex-shrink:0; margin-top:2px; }
.gc-card-meta { color:var(--muted); font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
.gc-card-meta .gc-cell-stack { flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px; }
.gc-card-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 12px; min-width:0; margin:0; padding:0 14px 4px; }
.gc-fields-4,.gc-fields-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.gc-fields-1,.gc-fields-0 { grid-template-columns:minmax(0,1fr); }
.gc-card-field { min-width:0; padding:11px 0; border-top:1px solid var(--border); }
.gc-card-field dt { margin:0; color:var(--muted); font-size:10px; line-height:1.6; font-weight:400; overflow-wrap:anywhere; }
.gc-card-field dd { min-width:0; margin:5px 0 0; color:var(--ink); font-size:12px; line-height:1.7; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.gc-field-wide { grid-column:1/-1; }
.gc-field-metric dd { font-size:18px; font-weight:650; line-height:1.5; letter-spacing:-.25px; }
.gc-card-weapons .gc-field-metric dd,.gc-card-attachments .gc-field-metric dd { font-size:16px; }
.gc-cell-stack { display:flex; flex-direction:column; gap:3px; min-width:0; }
.gc-cell-stack small { color:var(--muted); font-size:10px; font-weight:400; line-height:1.65; letter-spacing:0; }
.gc-card-title-line .gc-cell-stack small { font-size:11px; }
.gc-numeric { font-variant-numeric:tabular-nums; }
.gc-positive>span { color:var(--accent); }
.gc-negative>span { color:var(--coral); }
.gc-muted { color:var(--muted); }
.gc-grade { display:inline-block; padding:2px 6px; border:1px solid var(--border-strong); border-radius:4px; color:var(--muted); font-size:10px; font-weight:500; line-height:1.5; white-space:nowrap; }
.gc-grade-3 { color:var(--blue); border-color:color-mix(in srgb,var(--blue) 35%,var(--border)); }
.gc-grade-4 { color:var(--purple); border-color:color-mix(in srgb,var(--purple) 35%,var(--border)); }
.gc-grade-5 { color:var(--amber); border-color:color-mix(in srgb,var(--amber) 35%,var(--border)); }
.gc-grade-6,.gc-grade-7 { color:var(--coral); border-color:color-mix(in srgb,var(--coral) 35%,var(--border)); }

/* A shared media frame for direct images, atlas tiles and neutral missing-image plates. */
.gc-media { position:relative; display:inline-flex; flex:0 0 80px; align-items:center; justify-content:center; width:80px; height:80px; min-width:0; border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--surface-input); vertical-align:middle; isolation:isolate; }
.gc-media-empty { color:var(--faint); font-size:20px; line-height:1; opacity:.45; }
.gc-media-has-image .gc-media-empty { visibility:hidden; }
.gc-object-image { position:absolute; inset:5px; width:calc(100% - 10px); height:calc(100% - 10px); max-width:none; object-fit:contain; object-position:center; }
.gc-sprite-image { position:absolute; flex-shrink:0; background-repeat:no-repeat; }
svg.gc-sprite-image { inset:4px; width:calc(100% - 8px); height:calc(100% - 8px); max-width:none; display:block; overflow:hidden; fill:none; stroke:none; }
.gc-weapon-media { flex-basis:125px; width:125px; height:80px; }
.gc-card-items .gc-media,.gc-card-keys .gc-media { flex-basis:76px; width:76px; height:76px; }
.gc-ingredient-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; margin:0; padding:0; list-style:none; }
.gc-ingredient-grid>li { display:flex; align-items:center; gap:8px; min-width:0; margin:0; padding:0; }
.gc-ingredient-art { position:relative; display:flex; flex:0 0 44px; width:44px; height:44px; }
.gc-ingredient-image { flex-basis:44px; width:44px; height:44px; border-radius:6px; }
.gc-ingredient-quantity { position:absolute; right:-2px; bottom:-2px; min-width:19px; padding:1px 3px; border:1px solid var(--border-strong); border-radius:4px; background:var(--surface-raised); color:var(--ink); font-size:10px; line-height:1.4; font-variant-numeric:tabular-nums; font-weight:550; }
.gc-ingredient-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.gc-ingredient-copy strong { color:var(--ink); font-size:11px; line-height:1.6; font-weight:500; overflow-wrap:anywhere; }
.gc-ingredient-copy small { color:var(--muted); font-size:10px; line-height:1.5; font-variant-numeric:tabular-nums; }
.gc-duration-block { display:flex; flex-direction:column; gap:7px; color:var(--ink); font-size:11px; }
.gc-duration-chips { display:flex; flex-wrap:wrap; gap:5px; }
.gc-duration-chips small { display:inline-block; padding:2px 7px; border:1px solid var(--border); border-radius:4px; background:var(--surface-input); color:var(--muted); font-size:10px; line-height:1.6; }

/* Full task conditions remain visible, with real reward artwork only. */
.gc-card-tasks .gc-card-top { padding:16px 14px; }
.gc-card-tasks .gc-card-title-line h3 { font-size:15px; }
.gc-card-tasks .gc-card-title-line .gc-cell-stack { gap:5px; }
.gc-cell-list { display:flex; flex-direction:column; gap:7px; margin:0; padding:0; list-style:none; }
.gc-cell-list li { margin:0; padding:0; line-height:1.85; }
.gc-requirements { margin:0 0 10px; padding:8px 10px; border-left:2px solid var(--amber); background:var(--surface-raised); color:var(--amber); font-size:11px; }
.gc-reward-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:0; list-style:none; }
.gc-reward-grid>li { display:flex; align-items:center; gap:7px; min-width:0; padding:6px; border:1px solid var(--border); border-radius:6px; background:var(--surface-input); }
.gc-reward-image { flex-basis:34px; width:34px; height:34px; border:0; border-radius:4px; }
.gc-reward-grid>li>span:last-child { min-width:0; color:var(--ink); font-size:10px; line-height:1.65; overflow-wrap:anywhere; }
.gc-scroll-hint { margin:0; padding:9px 20px; border-top:1px solid var(--border); color:var(--muted); font-size:10px; line-height:1.7; }
.gc-scroll-hint[hidden] { display:none; }
.gc-footnote { margin:0; padding:11px 20px; border-top:1px solid var(--border); color:var(--faint); font-size:10px; line-height:1.8; }
.gc-empty { padding:28px 20px; border-top:1px solid var(--border); color:var(--muted); text-align:center; font-size:12px; }
.gc-empty[hidden] { display:none; }
.gc-compact .gc-card-scroll { max-height:none; }

@media(max-width:1100px) { .gc-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@container guide-section (max-width:1080px) { .gc-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@container guide-section (max-width:610px) {
  .gc-card-grid { grid-template-columns:minmax(0,1fr); gap:11px; padding:12px; }
  .gc-grid-items { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gc-card-items .gc-card-top { flex-direction:column; align-items:stretch; gap:9px; padding:11px; }
  .gc-card-items .gc-media { align-self:center; flex-basis:70px; width:70px; height:70px; }
  .gc-card-items .gc-card-heading { gap:5px; }
  .gc-card-items .gc-card-title-line { flex-wrap:wrap; gap:5px; }
  .gc-card-items .gc-card-title-line h3 { flex-basis:100%; font-size:12px; }
  .gc-card-items .gc-card-title-line>.gc-grade { margin-top:0; }
  .gc-card-items .gc-card-fields { padding:0 11px 1px; }
  .gc-card-items .gc-field-metric dd { font-size:18px; }
}
@container guide-section (max-width:335px) {
  .gc-grid-items { grid-template-columns:minmax(0,1fr); }
  .gc-card-items .gc-card-top { flex-direction:row; align-items:center; }
  .gc-card-items .gc-card-title-line h3 { flex-basis:auto; }
  .gc-card-items .gc-card-title-line { flex-wrap:nowrap; }
  .gc-card-fields { column-gap:9px; }
  .gc-field-metric dd { font-size:16px; }
  .gc-ingredient-grid { gap:9px; }
  .gc-ingredient-art { flex-basis:38px; width:38px; height:38px; }
  .gc-ingredient-image { flex-basis:38px; width:38px; height:38px; }
}
@media(max-width:720px) {
  .gc-guide { gap:16px; }
  .gc-section { border-radius:9px; }
  .gc-section-head { gap:10px; padding:16px 14px 12px; }
  .gc-section-head h2 { font-size:16px; }
  .gc-section-head p { font-size:11px; line-height:1.75; }
  .gc-count { font-size:10px; padding:3px 6px; }
  .gc-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:0 14px 14px; }
  .gc-search { grid-column:1/-1; min-height:44px; }
  .gc-search input { min-height:44px; font-size:16px; }
  .gc-select-label { min-width:0; max-width:none; gap:4px; }
  .gc-select-label select { min-height:44px; font-size:16px; padding-right:22px; }
  .gc-reset { align-self:end; min-height:44px; font-size:12px; }
  .gc-jump-links { gap:8px; }
  .gc-jump-links button { min-height:44px; padding:9px 12px; }
  .gc-jump-links span { font-size:10px; }
  .gc-card-scroll { max-height:720px; max-height:min(72svh,720px); }
  .gc-card-title-line h3 { font-size:14px; }
  .gc-scroll-hint,.gc-footnote { padding:10px 14px; font-size:10px; }
}
@media(prefers-reduced-motion:reduce) { .gc-guide * { scroll-behavior:auto; } }

/* Compact browsing: rows contain the comparison facts; detail stays one click away. */
.gc-dense .gc-section-head { align-items:center; padding:14px 16px 11px; }
.gc-dense .gc-section-head h2 { font-size:16px; }
.gc-dense .gc-filters { gap:8px; padding:0 16px 12px; align-items:center; }
.gc-dense .gc-select-label { flex-direction:row; align-items:center; gap:6px; min-width:0; max-width:215px; }
.gc-dense .gc-select-label>span { white-space:nowrap; }
.gc-dense .gc-search { flex:1 1 200px; min-height:36px; }
.gc-dense .gc-search input { min-height:34px; padding:6px 0; }
.gc-dense .gc-select-label select { min-height:36px; padding-top:6px; padding-bottom:6px; font-size:11px; }
.gc-dense .gc-reset { min-height:36px; padding:6px 10px; font-size:11px; }
.gc-dense .gc-card-scroll { max-height:min(72svh,800px); }
.gc-mini-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; padding:12px; align-items:stretch; }
.gc-mini-card { display:flex; gap:10px; align-items:center; min-width:0; min-height:94px; padding:11px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); color:var(--ink); text-align:left; cursor:pointer; font:inherit; transition:border-color .15s,background .15s; }
.gc-mini-card:hover { border-color:var(--accent-border); background:var(--tint); }
.gc-mini-card:focus-visible,.gc-ammo-table button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.gc-mini-card[hidden],.gc-ammo-table tr[hidden] { display:none!important; }
.gc-mini-card>.gc-mini-image { flex:0 0 56px; width:56px; height:56px; border:0; border-radius:6px; background:var(--surface-input); }
.gc-mini-copy { display:flex; flex:1; flex-direction:column; gap:4px; min-width:0; }
.gc-mini-title { display:flex; align-items:flex-start; gap:6px; min-width:0; }
.gc-mini-title>strong { font-size:12px; line-height:1.6; font-weight:600; overflow-wrap:anywhere; }
.gc-quality-dot { display:inline-block; flex:0 0 7px; width:7px; height:7px; margin-top:6px; background:var(--faint); transform:rotate(45deg); border:0; border-radius:1px; }
.gc-quality-dot.gc-grade-2 { background:#74a86d; }
.gc-quality-dot.gc-grade-3 { background:var(--blue); }
.gc-quality-dot.gc-grade-4 { background:var(--purple); }
.gc-quality-dot.gc-grade-5 { background:var(--amber); }
.gc-quality-dot.gc-grade-6 { background:var(--coral); }
.gc-mini-type { font-size:10px; line-height:1.5; color:var(--muted); }
.gc-mini-facts { display:flex; flex-wrap:wrap; gap:4px 8px; color:var(--muted); font-size:10px; line-height:1.6; }
.gc-mini-facts:empty { display:none; }
.gc-mini-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; margin-top:1px; }
.gc-mini-bottom>b { font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.5; white-space:nowrap; }
.gc-mini-bottom>.gc-cell-stack { font-size:13px; font-weight:600; line-height:1.5; white-space:nowrap; }
.gc-mini-bottom>.gc-cell-stack small { display:none; }
.gc-footprint { display:inline-flex; align-items:center; gap:5px; font-size:9px; line-height:1.2; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.gc-footprint>span:last-child small { font-size:9px; }
.gc-footprint-grid { display:inline-grid; grid-template-columns:repeat(var(--slot-cols),4px); grid-template-rows:repeat(var(--slot-rows),4px); gap:1px; align-items:stretch; }
.gc-footprint-grid i { display:block; width:4px; height:4px; background:var(--muted); opacity:.65; }
.gc-type-chips { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; }
.gc-type-chips button { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 9px; border:1px solid var(--border); border-radius:5px; color:var(--muted); background:var(--surface); font-size:11px; cursor:pointer; }
.gc-type-chips button b { font-weight:400; opacity:.7; font-size:10px; font-variant-numeric:tabular-nums; }
.gc-type-chips button[aria-pressed=true] { background:var(--tint); color:var(--accent); border-color:var(--accent-border); }
.gc-type-filter-hidden { display:none!important; }
.gc-ammo-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; color:var(--ink); font-variant-numeric:tabular-nums; }
.gc-ammo-table thead { position:sticky; top:0; z-index:2; background:var(--surface-raised); }
.gc-ammo-table th,.gc-ammo-table td { border:0; border-bottom:1px solid var(--border); padding:9px 10px; vertical-align:middle; text-align:right; font-weight:400; }
.gc-ammo-table thead th { padding:10px; font-size:10px; color:var(--muted); }
.gc-ammo-table tr>*:first-child { width:44%; text-align:left; }
.gc-ammo-table tr>*:nth-child(2) { width:10%; }
.gc-ammo-table tr>*:nth-child(3),.gc-ammo-table tr>*:nth-child(4) { width:12%; }
.gc-ammo-table tr>*:last-child { width:22%; }
.gc-ammo-table tbody tr:hover { background:var(--tint); }
.gc-ammo-table button { display:flex; align-items:center; gap:10px; min-height:30px; width:100%; padding:0; color:var(--ink); text-align:left; border:0; background:transparent; font:inherit; cursor:pointer; }
.gc-ammo-table button>span:last-child { overflow-wrap:anywhere; font-size:12px; line-height:1.5; }
.gc-ammo-table .gc-ammo-image { flex:0 0 30px; width:30px; height:30px; border:0; border-radius:4px; }
.gc-ammo-table .gc-cell-stack { display:block; white-space:nowrap; font-size:12px; }
.gc-ammo-table .gc-cell-stack small { display:none; }
.gc-ammo-table .gc-grade { padding:1px 4px; font-size:10px; white-space:nowrap; }
.gc-guide dialog.gc-detail-dialog { width:min(500px,calc(100vw - 28px)); max-width:calc(100vw - 28px); max-height:88svh; box-sizing:border-box; margin:auto; padding:22px; color:var(--ink); background:var(--surface); border:1px solid var(--border-strong); border-radius:14px; box-shadow:0 18px 80px #0005; overflow:auto; overscroll-behavior:contain; }
.gc-guide dialog.gc-detail-dialog::backdrop { background:#05090f99; backdrop-filter:blur(3px); }
/* The close control stays in the dialog scrollport without adding a header row. */
.gc-detail-close { position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:center; width:44px; height:44px; min-height:44px; margin:0 0 -44px auto; padding:0; border:1px solid var(--border); border-radius:7px; background:var(--surface-raised); color:var(--muted); font-size:24px; cursor:pointer; }
.gc-detail-title { display:flex; align-items:flex-start; gap:9px; min-height:44px; padding-right:56px; }
.gc-detail-title h2 { margin:0; font-size:19px; line-height:1.5; font-weight:650; }
.gc-detail-title p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.gc-detail-hero { display:flex; flex-direction:column; align-items:center; gap:7px; margin:16px 0 12px; }
.gc-detail-hero>.gc-media,.gc-detail-image { width:200px; height:130px; flex-basis:130px; background:transparent; border:0; }
.gc-detail-hero strong { font-size:22px; font-weight:650; font-variant-numeric:tabular-nums; }
.gc-detail-hero strong small { font-size:11px; font-weight:400; color:var(--muted); }
.gc-detail-strip { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:9px 0 12px; color:var(--muted); font-size:11px; }
.gc-detail-strip .gc-footprint { font-size:12px; }
.gc-detail-strip .gc-footprint-grid { grid-template-columns:repeat(var(--slot-cols),5px); grid-template-rows:repeat(var(--slot-rows),5px); }
.gc-detail-strip .gc-footprint-grid i { width:5px; height:5px; }
.gc-detail-facts { display:grid; margin:4px 0 0; gap:0; }
.gc-detail-facts>div { display:flex; align-items:baseline; justify-content:space-between; gap:20px; padding:9px 0; border-top:1px solid var(--border); }
.gc-detail-facts dt { color:var(--muted); font-size:12px; line-height:1.8; flex-shrink:0; }
.gc-detail-facts dd { margin:0; text-align:right; color:var(--ink); font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.gc-detail-description { margin:14px 0 0; color:var(--muted); font-size:12px; line-height:1.9; }
.gc-detail-source { margin:16px 0 0; padding-top:11px; border-top:1px solid var(--border); color:var(--faint); font-size:10px; line-height:1.8; }
.gc-effects { list-style:none; padding:0; margin:2px 0 14px; display:grid; gap:0; }
.gc-effects li { display:flex; gap:7px; padding:7px 0; font-size:12px; line-height:1.7; border-top:1px solid var(--border); }
.gc-effects li>span { flex:0 0 14px; font-weight:650; }
.gc-effect-positive { color:var(--accent); }
.gc-effect-negative { color:var(--coral); }
@media(max-width:720px) {
  .gc-dense .gc-section-head { padding:12px 12px 10px; }
  .gc-dense .gc-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:0 12px 10px; }
  .gc-dense .gc-search { min-height:44px; }
  .gc-dense .gc-search input { min-height:44px; font-size:16px; }
  .gc-dense .gc-select-label { max-width:none; }
  .gc-dense .gc-select-label>span { display:none; }
  .gc-dense .gc-select-label select { min-height:44px; font-size:16px; }
  .gc-dense .gc-reset { min-height:44px; font-size:12px; }
  .gc-dense .gc-filters:has(.gc-select-label:nth-of-type(3)) { position:relative; }
  .gc-dense .gc-filters:has(.gc-select-label:nth-of-type(3)) .gc-search { margin-right:55px; }
  .gc-dense .gc-filters:has(.gc-select-label:nth-of-type(3)) .gc-reset { position:absolute; right:12px; top:0; width:48px; }
  .gc-dense .gc-card-scroll { max-height:min(74svh,720px); }
  .gc-mini-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:9px; }
  .gc-mini-card { align-items:flex-start; min-height:112px; padding:9px 8px; gap:7px; }
  .gc-mini-card:not(.en-location-card) { display:grid; grid-template-columns:38px minmax(0,1fr); gap:3px 7px; align-content:start; }
  .gc-mini-card>.gc-mini-image { flex-basis:38px; width:38px; height:45px; grid-column:1; grid-row:1 / 3; }
  .gc-mini-card>.gc-mini-copy { display:contents; }
  .gc-mini-title { grid-column:2; gap:4px; }
  .gc-mini-title>strong { font-size:11px; line-height:1.6; }
  .gc-mini-title .gc-quality-dot { flex-basis:5px; width:5px; height:5px; margin-top:6px; }
  .gc-mini-type,.gc-mini-facts { font-size:9px; }
  .gc-mini-type { grid-column:2; }
  .gc-mini-facts,.gc-mini-copy>.en-fish-places { grid-column:1 / -1; }
  .gc-mini-bottom { grid-column:1 / -1; flex-direction:row; align-items:center; gap:4px; }
  .gc-mini-bottom>b,.gc-mini-bottom>.gc-cell-stack { font-size:12px; }
  .gc-footprint { gap:4px; font-size:8px; }
  .gc-footprint>span:last-child small { font-size:8px; }
  .gc-mini-card .gc-footprint-grid { grid-template-columns:repeat(var(--slot-cols),3px); grid-template-rows:repeat(var(--slot-rows),3px); }
  .gc-mini-card .gc-footprint-grid i { width:3px; height:3px; }
  .gc-type-chips { flex-wrap:nowrap; overflow:auto; scrollbar-width:thin; padding:0 12px 10px; }
  .gc-type-chips button { flex-shrink:0; min-height:44px; }
  .gc-ammo-table th,.gc-ammo-table td { padding:7px 4px; }
  .gc-ammo-table thead th { padding:9px 4px; font-size:9px; }
  .gc-ammo-table button { gap:5px; min-height:34px; }
  .gc-ammo-table button>span:last-child { font-size:10px; }
  .gc-ammo-table .gc-ammo-image { flex-basis:22px; width:22px; height:26px; }
  .gc-ammo-table .gc-cell-stack { font-size:10px; }
  .gc-ammo-table .gc-grade { padding:1px 3px; font-size:9px; }
  .gc-guide dialog.gc-detail-dialog { padding:18px; }
  .gc-detail-title h2 { font-size:17px; }
}
@media(prefers-reduced-motion:reduce) { .gc-mini-card { transition:none; } }

/* All item codex categories use the accepted collection grid and inspector. */
body[data-page^='codex/'] .app-main > .hero { display:none; }
.gc-guide .gc-gallery { border:0; border-radius:0; background:transparent; overflow:visible; }
.gc-gallery .gc-section-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,620px); align-items:center; gap:20px; padding:0 0 20px; }
.gc-gallery-heading { display:flex; align-items:baseline; gap:20px; min-width:0; }
.gc-gallery .gc-section-head h2 { margin:0; font-size:clamp(36px,3.4vw,48px); font-weight:900; line-height:1.08; letter-spacing:-1.5px; }
.gc-gallery .gc-count { margin:0; padding:0; border:0; color:var(--muted); font-size:16px; font-weight:650; line-height:1.4; white-space:nowrap; }
.gc-gallery .gc-search { width:100%; min-height:48px; box-sizing:border-box; border-radius:0; background:transparent; }
.gc-gallery .gc-search input { min-height:46px; font:400 15px/1.4 var(--font-sans,system-ui,sans-serif); }
.gc-gallery .gc-search svg { width:20px; height:20px; flex-basis:20px; }
.gc-gallery-filters { display:flex; align-items:center; gap:12px; margin:0 0 18px; min-width:0; }
.gc-gallery .gc-type-chips { flex:1; flex-wrap:nowrap; gap:0; min-width:0; margin:0; padding:0 0 4px; overflow:auto; scrollbar-width:thin; }
.gc-gallery .gc-type-chips button { flex-shrink:0; display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:9px 15px; border:1px solid var(--border); border-radius:0; background:transparent; color:var(--ink); font:500 14px/1.4 var(--font-sans,system-ui,sans-serif); }
.gc-gallery .gc-type-chips button+button { border-left:0; }
.gc-gallery .gc-type-chips button b { font-size:11px; opacity:.65; }
.gc-gallery .gc-type-chips button[aria-pressed=true] { color:var(--accent-ink,#070807); background:var(--accent); border-color:var(--accent); font-weight:750; }
.gc-gallery .gc-select-label { display:flex; flex:0 0 150px; flex-direction:row; align-items:center; gap:10px; min-width:0; max-width:none; font-size:13px; white-space:nowrap; }
.gc-gallery .gc-select-label[hidden] { display:none; }
.gc-gallery .gc-select-label select { min-height:44px; border-radius:0; appearance:none; padding:9px 12px; background:transparent; font:500 14px/1.4 var(--font-sans,system-ui,sans-serif); }
.gc-gallery .gc-reset { flex:0 0 108px; min-height:44px; border-radius:0; color:var(--ink); background:transparent; font:500 14px/1.4 var(--font-sans,system-ui,sans-serif); }
.gc-gallery-workspace { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(300px,1fr); gap:16px; align-items:start; min-width:0; }
.gc-gallery-results { min-width:0; }
.gc-gallery .gc-card-scroll { height:clamp(510px,calc(100svh - 300px),900px); max-height:none; border:0; background:transparent; overscroll-behavior-y:auto; }
.gc-gallery .gc-gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0; align-items:stretch; }
.gc-gallery .gc-gallery-card { position:relative; display:flex; flex-direction:column; align-items:stretch; gap:0; min-height:208px; padding:12px; border:1px solid var(--border); border-radius:0; background:var(--surface); box-shadow:none; color:var(--ink); }
.gc-gallery .gc-gallery-card:hover { border-color:var(--accent); }
.gc-gallery .gc-gallery-card.is-selected { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.gc-gallery .gc-gallery-card>.gc-mini-image { flex:0 0 126px; width:100%; height:126px; margin:0 0 5px; border:0; border-radius:0; background:transparent; }
.gc-gallery .gc-gallery-card>.gc-mini-copy { display:flex; flex-direction:column; flex:1; gap:4px; width:100%; }
.gc-gallery .gc-mini-title { display:block; }
.gc-gallery .gc-mini-title>strong { display:block; font-size:17px; line-height:1.3; font-weight:750; }
.gc-gallery .gc-mini-type { color:var(--muted); font-size:12px; line-height:1.4; }
.gc-gallery .gc-mini-facts { font-size:11px; line-height:1.5; }
.gc-gallery .gc-mini-facts>span { display:flex; align-items:baseline; gap:3px; }
.gc-gallery .gc-mini-bottom { align-items:flex-end; gap:5px; margin-top:auto; }
.gc-gallery .gc-mini-bottom>b,.gc-gallery .gc-mini-bottom>.gc-cell-stack { font-family:var(--font-mono,ui-monospace,monospace); font-size:19px; line-height:1.3; font-weight:700; letter-spacing:-.5px; }
.gc-gallery .gc-mini-bottom .gc-footprint { font-size:11px; }
.gc-gallery .gc-mini-bottom .gc-footprint>span:last-child small { font-size:10px; }
.gc-gallery .gc-footprint-grid { grid-template-columns:repeat(var(--slot-cols),3px); grid-template-rows:repeat(var(--slot-rows),3px); }
.gc-gallery .gc-footprint-grid i { width:3px; height:3px; }
.gc-gallery-rarity { --gallery-rarity:#8d9388; display:inline-flex; align-items:center; gap:7px; flex-shrink:0; color:inherit; font-size:12px; line-height:1.4; white-space:nowrap; }
.gc-gallery-rarity::before { content:""; width:5px; height:20px; background:var(--gallery-rarity); }
.gc-gallery-rarity[data-grade="2"] { --gallery-rarity:#67a861; }
.gc-gallery-rarity[data-grade="3"] { --gallery-rarity:#4b9de8; }
.gc-gallery-rarity[data-grade="4"] { --gallery-rarity:#b74ade; }
.gc-gallery-rarity[data-grade="5"] { --gallery-rarity:#e4ab32; }
.gc-gallery-rarity[data-grade="6"],.gc-gallery-rarity[data-grade="7"] { --gallery-rarity:#f33b51; }
.gc-gallery-card>.gc-gallery-rarity { position:absolute; top:11px; left:12px; z-index:1; }
.gc-gallery-detail { --ink:var(--marathon-paper-ink,#10120e); --muted:var(--marathon-paper-muted,#5e635a); --faint:var(--marathon-paper-muted,#5e635a); --border:var(--marathon-paper-border,#bcc0b7); position:sticky; top:calc(var(--topbar-height,64px) + 20px); max-height:clamp(510px,calc(100svh - 300px),900px); min-width:0; box-sizing:border-box; overflow:auto; padding:24px; background:var(--marathon-paper,#f2f3eb); color:var(--ink); scrollbar-width:thin; }
.gc-gallery-detail[hidden] { display:none; }
.gc-gallery-detail-content .gc-gallery-kicker { margin:0 0 14px; font-size:13px; line-height:1.5; color:var(--muted); }
.gc-gallery-detail-content .gc-detail-title { justify-content:space-between; align-items:flex-start; gap:14px; padding-right:0; min-height:0; }
.gc-gallery-detail-content .gc-detail-title>div { min-width:0; }
.gc-gallery-detail-content .gc-detail-title h2 { margin:0; font-size:clamp(26px,2.5vw,38px); font-weight:900; line-height:1.18; letter-spacing:-.8px; color:var(--ink); overflow-wrap:anywhere; }
.gc-gallery-detail-content .gc-detail-title>.gc-gallery-rarity { margin-top:8px; }
.gc-gallery-detail-content .gc-detail-hero { display:flex; align-items:stretch; gap:0; margin:8px 0 14px; }
.gc-gallery-detail-content .gc-detail-hero>.gc-media { flex:0 0 240px; width:100%; height:240px; margin:0 0 16px; border:0; border-radius:0; background:transparent; }
.gc-gallery-detail-content .gc-gallery-price-label { display:block; padding-top:13px; border-top:1px solid var(--border); font-size:14px; line-height:1.5; color:var(--muted); }
.gc-gallery-detail-content .gc-detail-hero>strong { display:block; margin-top:5px; font-family:var(--font-mono,ui-monospace,monospace); font-size:clamp(28px,3vw,44px); font-weight:750; line-height:1.2; letter-spacing:-1px; color:var(--ink); overflow-wrap:anywhere; }
.gc-gallery-detail-content .gc-detail-hero>strong small { color:inherit; font-family:var(--font-sans,system-ui,sans-serif); font-size:14px; font-weight:500; letter-spacing:0; white-space:nowrap; }
.gc-gallery-detail-content .gc-detail-facts { margin:0; }
.gc-gallery-detail-content .gc-detail-facts>div { padding:10px 0; gap:15px; }
.gc-gallery-detail-content .gc-detail-facts dt,.gc-gallery-detail-content .gc-detail-facts dd { font-size:14px; }
.gc-gallery-detail-content .gc-detail-strip { font-size:13px; }
.gc-gallery-detail-content .gc-detail-source { font-size:11px; line-height:1.65; }
.gc-gallery-detail .gc-effect-positive { color:#366512; }
.gc-gallery-detail .gc-effect-negative { color:#9e3636; }
.gc-gallery.is-empty .gc-gallery-workspace { grid-template-columns:minmax(0,1fr); }
.gc-gallery.is-empty .gc-card-scroll { display:none; }
.gc-gallery .gc-empty { padding:60px 20px; border:1px solid var(--border); font-size:14px; }
[data-gc-page^="codex/"] dialog.gc-detail-dialog,[data-gc-page^="codex/"] .gc-detail-close { border-radius:0; }
.gc-detail-dialog .gc-gallery-detail-content .gc-detail-title { padding-right:45px; }
.gc-detail-dialog .gc-gallery-detail-content .gc-detail-title>.gc-gallery-rarity { display:none; }
@media(min-width:961px) and (max-width:1220px) {
  .gc-gallery-workspace { grid-template-columns:minmax(0,1.65fr) minmax(290px,1fr); gap:12px; }
  .gc-gallery .gc-gallery-card>.gc-mini-image { height:108px; flex-basis:108px; }
  .gc-gallery .gc-gallery-card { padding:10px; min-height:192px; }
  .gc-gallery .gc-mini-title>strong { font-size:15px; }
  .gc-gallery .gc-mini-bottom>b,.gc-gallery .gc-mini-bottom>.gc-cell-stack { font-size:16px; }
  .gc-gallery-detail { padding:20px; }
  .gc-gallery-detail-content .gc-detail-hero>.gc-media { height:210px; flex-basis:210px; }
  .gc-gallery-detail-content .gc-detail-hero>strong { font-size:30px; }
}
@media(max-width:960px) {
  .gc-gallery-workspace { grid-template-columns:minmax(0,1fr); }
  .gc-gallery .gc-gallery-detail { display:none; }
  .gc-gallery .gc-card-scroll { height:auto; max-height:none; overflow:visible; scrollbar-gutter:auto; }
  .gc-gallery .gc-section-head { grid-template-columns:minmax(0,1fr); gap:16px; }
  .gc-gallery-filters { flex-wrap:wrap; gap:10px; }
  .gc-gallery .gc-type-chips { flex-basis:100%; }
  .gc-gallery .gc-select-label { flex:1; max-width:240px; }
  .gc-gallery .gc-reset { flex-basis:100px; margin-left:auto; }
}
@media(max-width:720px) {
  .gc-gallery .gc-section-head { padding-bottom:14px; }
  .gc-gallery-heading { gap:14px; }
  .gc-gallery .gc-section-head h2 { font-size:36px; letter-spacing:-1px; }
  .gc-gallery .gc-count { font-size:14px; }
  .gc-gallery .gc-search { min-height:46px; padding:0 11px; }
  .gc-gallery .gc-search input { min-height:44px; font-size:14px; }
  .gc-gallery-filters { margin-bottom:12px; }
  .gc-gallery .gc-type-chips button { padding:9px 13px; font-size:13px; }
  .gc-gallery .gc-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .gc-gallery .gc-gallery-card { display:flex; flex-direction:column; align-items:stretch; min-height:0; padding:10px; gap:0; }
  .gc-gallery .gc-gallery-card>.gc-mini-image { display:block; flex:0 0 112px; width:100%; height:112px; margin:0 0 6px; }
  .gc-gallery .gc-gallery-card>.gc-mini-copy { display:flex; flex-direction:column; gap:4px; }
  .gc-gallery .gc-mini-title>strong { font-size:14px; line-height:1.4; }
  .gc-gallery .gc-mini-type,.gc-gallery .gc-mini-facts { font-size:11px; line-height:1.5; }
  .gc-gallery .gc-mini-bottom { align-items:flex-start; flex-direction:column; gap:4px; margin-top:auto; }
  .gc-gallery .gc-mini-bottom>b,.gc-gallery .gc-mini-bottom>.gc-cell-stack { font-size:17px; }
  .gc-gallery-card>.gc-gallery-rarity { top:9px; left:10px; font-size:11px; }
  .gc-gallery-card>.gc-gallery-rarity::before { width:4px; height:16px; }
  .gc-gallery-detail-content .gc-detail-hero>.gc-media { height:220px; flex-basis:220px; }
}

/* Manufacturing and exchange cards share a compact comparison surface.
   Variable-length materials and durations use the existing detail dialog. */
.gc-production-section .gc-section-head { padding:16px 16px 12px; }
.gc-production-section .gc-section-head h2 { font-size:16px; }
.gc-production-section .gc-filters { padding:0 16px 14px; }
.gc-production-section .gc-card-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); align-items:stretch; gap:12px; padding:14px; }
.gc-production-card { display:grid; grid-template-rows:auto 1fr auto; border-radius:9px; }
.gc-production-card .gc-card-top { min-height:92px; box-sizing:border-box; gap:12px; padding:14px; }
.gc-production-card .gc-card-top>.gc-media { flex:0 0 64px; width:64px; height:64px; }
.gc-production-card .gc-card-title-line h3 { font-size:14px; line-height:1.5; }
.gc-production-card .gc-card-title-line .gc-cell-stack { gap:5px; }
.gc-production-card .gc-card-title-line .gc-cell-stack small { font-size:11px; line-height:1.5; }
.gc-production-card .gc-card-fields { align-content:start; gap:0 12px; padding:0 14px; }
.gc-production-card .gc-card-field { padding:10px 0 12px; }
.gc-production-card .gc-field-metric dd,.gc-production-detail .gc-field-metric dd { font-size:18px; line-height:1.45; letter-spacing:-.25px; }
.gc-production-card .gc-field-metric .gc-cell-stack>span,.gc-production-detail .gc-field-metric .gc-cell-stack>span { white-space:nowrap; }
.gc-production-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; padding:10px 14px; border-top:1px solid var(--border); background:var(--surface-input); }
.gc-production-meta { min-width:0; color:var(--muted); font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
.gc-production-footer button { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; gap:8px; min-height:38px; padding:7px 10px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; font-size:11px; cursor:pointer; }
.gc-production-footer button span { color:var(--muted); font-size:10px; white-space:nowrap; }
.gc-production-footer button:hover { color:var(--accent); border-color:var(--accent-border); background:var(--tint); }
.gc-production-footer button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.gc-production-detail-product { display:flex; align-items:center; gap:12px; padding:16px 0 12px; }
.gc-production-detail-product>.gc-media { flex:0 0 72px; width:72px; height:72px; }
.gc-production-detail .gc-card-fields { gap:0 12px; padding:0; }
.gc-production-detail-condition,.gc-production-detail-materials { padding-top:14px; margin-top:3px; border-top:1px solid var(--border); }
.gc-production-detail h3 { margin:0 0 10px; color:var(--ink); font-size:12px; line-height:1.65; font-weight:600; }
.gc-production-detail h3 span { margin-left:6px; color:var(--muted); font-size:10px; font-weight:400; }
.gc-production-detail-materials { margin-top:14px; }
.gc-production-detail .gc-ingredient-grid { gap:12px; }
@media(max-width:720px) {
  .gc-production-section .gc-section-head { padding:14px 12px 10px; }
  .gc-production-section .gc-filters { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:end; padding:0 12px 12px; }
  .gc-production-section .gc-search { grid-column:1/-1; }
  .gc-production-section .gc-select-label select { min-height:44px; padding-right:10px; }
  .gc-production-section .gc-reset { align-self:end; min-height:44px; white-space:nowrap; }
  .gc-production-section .gc-card-grid { gap:10px; padding:10px; }
  .gc-production-card .gc-card-top { gap:10px; padding:12px; min-height:88px; }
  .gc-production-card .gc-card-fields { column-gap:9px; padding:0 12px; }
  .gc-production-card .gc-field-metric dd,.gc-production-detail .gc-field-metric dd { font-size:17px; }
  .gc-production-footer { padding:9px 12px; }
  .gc-production-footer button { min-height:44px; }
  .gc-production-detail .gc-card-fields { column-gap:9px; }
}
