/* Seed library pages (/seeds/, /collections/, /seed/). Loaded after styles.css
   and uses only its variables, so the three theme states carry over. Mobile
   first: one column under 700px, the QR only from 900px up. */

/* One text-only token of its own: the 11px "near spawn" chip. --in-range (#1f9a4e)
   is 3.22:1 on the light ground, under WCAG AA; this is the same hue darkened to
   4.54:1. Dark keeps --in-range's value (#79df8b, 11.7:1). styles.css tokens are
   shared with the landing page and are not changed. */
:root{--near-text:#197e40}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--near-text:#79df8b}}
:root[data-theme="dark"]{--near-text:#79df8b}

.lib-wrap{max-width:820px;padding:28px 20px 48px}
.lib-wrap.wide{max-width:980px /* /seeds/ and collections: map, seed, rating and three distance columns */}
.lib h1{font-size:clamp(24px,5vw,34px);line-height:1.2;margin:4px 0 10px;overflow-wrap:anywhere}
.lib .section-title{margin:28px 0 10px}
.seed-title .seed-code{font-size:.9em}
.seed-code{font-family:var(--font-mono);font-weight:700;letter-spacing:.01em;overflow-wrap:anywhere;word-break:break-all}
.lib-summary,.lib-intro,.lib-about{color:var(--muted);font-size:16px;line-height:1.55;margin:0 0 16px}
.lib-about{color:var(--text)}
/* 44px tap target for inline prose links without moving the text: the padding
   adds hit height, the matching negative margin gives the space back, so the
   paragraph's line spacing is unchanged (mobile_check reads the anchor's own box). */
.prose-link{display:inline-block;padding-block:13px;margin-block:-13px;color:var(--accent)}
.lib-empty{color:var(--muted);font-style:normal;margin:0 0 12px}

/* seed page title row: the seed and its one button, Copy */
.seed-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 20px;align-items:center;margin:0 0 4px}
.seed-head h1{margin:4px 0 0}
.seed-head .btn{min-height:48px}
.copy-btn{cursor:pointer}
/* Open in Seedscout: Android only (a script unhides it). .btn's display outranks the browser's own
   [hidden] rule, so hidden needs saying; it sits under Copy in the button column. */
.open-app[hidden]{display:none}
.seed-head .open-app{grid-column:2}
.seed-fallback{width:100%;font:inherit;font-family:var(--font-mono);padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);margin:0 0 12px}
@media (max-width:640px){
  .seed-head{grid-template-columns:1fr}
  .seed-head .btn{justify-self:stretch}
  .seed-head .open-app{grid-column:auto}
}

/* rating and collection tags. Tags are 14px: --accent is 3.5:1 on the light
   ground, so it may not carry text under 14px. */
.seed-meta{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;margin:0 0 16px}
.rating{display:inline-flex;align-items:baseline;gap:7px;min-height:36px;padding:7px 13px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface);font-size:13.5px;color:var(--muted)}
.rating b{color:var(--text);font-size:15px;font-variant-numeric:tabular-nums}
.tag{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface);color:var(--accent);font-size:14px;text-decoration:none}
.tag:hover{border-color:var(--accent-deep)}
.tag-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}

/* map, its caption, the legend of every marker on it, and the QR beside the legend */
.seed-map{margin:0 0 10px}
.seed-map img{display:block;width:100%;height:auto;border-radius:10px;border:1px solid var(--border)}
.seed-map figcaption{color:var(--muted);font-size:13px;line-height:1.55;margin:6px 0 0}
.map-under{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start;margin:0 0 6px}
.map-legend{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:0}
.map-legend li{display:inline-flex;align-items:center;gap:8px;padding:5px 13px 5px 5px;border:1px solid var(--border);border-radius:999px;
  background:var(--surface);font-size:13.5px;color:var(--text)}
.map-legend li span{color:var(--muted);font-family:var(--font-mono);font-size:12.5px}
/* the app's own marker: a disc in the feature's colour, dark ring, white glyph */
.disc{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;border:2px solid #0b0f12;background:var(--fc);color:#fff;box-shadow:0 0 0 1px var(--border)}
.disc svg{width:15px;height:15px;--ground:var(--fc)}
.disc.sm{width:22px;height:22px;border-width:1.5px;vertical-align:-5px;margin-right:8px}
.disc.sm svg{width:12px;height:12px}
.disc.spawn{border-radius:3px;width:14px;height:14px;border:2px solid #0b0f12;background:#fff;margin:0 7px;box-shadow:none}
/* QR, desktop widths only: fixed dark modules on a fixed white tile in every theme */
.qr-card{display:none}
.qr-svg{flex:none;width:104px;height:104px;background:#fff;border-radius:6px;border:0}
.qr-note{font-size:12.5px;color:var(--muted)}
@media (min-width:900px){
  .map-under{grid-template-columns:minmax(0,1fr) auto;gap:24px}
  .qr-card{display:flex;align-items:center;gap:12px;padding:10px 14px 10px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface);
    color:var(--muted);font-size:12.5px;line-height:1.45;max-width:250px}
}

/* the /seed/ resolver's actions row */
.lib-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin:0 0 18px}
.lib-actions .btn{min-height:44px}

/* facts tables, grouped: structures, biomes, the Nether */
.facts-sub{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--muted);margin:18px 0 0;padding:0 0 6px;border-bottom:1px solid var(--border)}
.facts{width:100%;border-collapse:collapse;font-size:15px;margin:0 0 8px}
.facts th{text-align:left;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:6px 0;border-bottom:1px solid var(--border)}
.facts td{padding:9px 8px 9px 0;border-bottom:1px solid var(--border-soft);vertical-align:top}
.facts td:nth-child(2),.facts td:nth-child(3){font-family:var(--font-mono);font-size:13px;color:var(--muted);white-space:nowrap}
.facts td:last-child{text-align:right;padding-right:0}
.facts .near{display:inline-block;margin-left:6px;font-size:11px;font-weight:600;color:var(--near-text)}
.facts .dir{color:var(--muted)}
.facts td:first-child{white-space:normal}
@media (max-width:480px){
  .facts thead{display:none}
  .facts tr{display:grid;grid-template-columns:1fr auto;padding:8px 0;border-bottom:1px solid var(--border-soft)}
  .facts td{display:block;border:0;padding:1px 0}
  .facts td:first-child{grid-column:1/-1}
  .facts td:nth-child(2){white-space:normal}
}

/* similar seeds under More like this */
.similar{list-style:none;margin:0;padding:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.similar a{display:grid;gap:2px;min-height:44px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);text-decoration:none;color:var(--text)}
.similar a:hover{border-color:var(--accent-deep)}
.similar code{color:var(--accent);font-family:var(--font-mono);font-weight:700;font-size:14px;overflow-wrap:anywhere}
.similar span{color:var(--muted);font-size:13px}

/* more like this, collection and index lists */
.more{list-style:none;margin:0;padding:0}
.more li{border-bottom:1px solid var(--border-soft)}
.more a{display:block;min-height:44px;padding:11px 0;color:var(--accent);text-decoration:none}
.more a:hover{text-decoration:underline}
.seed-list,.collection-list{list-style:none;margin:0 0 12px;padding:0}
.seed-list li,.collection-list li{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border-soft)}
.seed-list li .row-seed,.collection-list li a{font-size:15px}
.seed-list li .row-seed a,.collection-list li a{display:inline-flex;align-items:center;min-height:44px;color:var(--accent);text-decoration:none}
.seed-list li .row-seed a:hover,.collection-list li a:hover{text-decoration:underline}
.seed-index li>a{display:inline-flex;align-items:center;padding-block:10px;margin-block:-10px;color:var(--accent);text-decoration:none}
.seed-index li>a:hover{text-decoration:underline}
.row-summary{grid-column:1;color:var(--muted);font-size:14px;line-height:1.45}
.seed-list li .row-rating{grid-column:2;grid-row:1;color:var(--muted);font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.seed-list li .copy-btn{grid-column:2;grid-row:1/span 2;min-height:44px;padding:0 14px}
.collection-list li .row-summary{grid-column:2;grid-row:1;white-space:nowrap}
@media (max-width:480px){
  .seed-list li{grid-template-columns:1fr}
  .seed-list li .copy-btn{grid-column:1;grid-row:auto;justify-self:start}
}

/* the catalogue page's static lists: the edition heading carries its game version as a label */
.ed-version{display:inline-block;margin-left:6px;padding:2px 10px;border:1px solid var(--border);border-radius:999px;font-size:14px;font-weight:600;color:var(--muted);vertical-align:middle}

/* collection page chrome: its rule, its size, the way back to the whole catalogue */
.lib-rule{color:var(--text);font-size:15px;line-height:1.5;margin:0 0 10px}
.lib-kicker{display:flex;flex-wrap:wrap;gap:6px 18px;color:var(--muted);font-size:14px;margin:0 0 16px}
.lib-kicker b{color:var(--text)}
.back-link{display:inline-flex;align-items:center;min-height:44px;color:var(--accent);font-size:14px;text-decoration:none}
.back-link:hover{text-decoration:underline}

/* collection filters */
.filters{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 16px}
.filter-group{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:14px;text-decoration:none;cursor:pointer}
.chip.active,.chip[aria-pressed="true"]{border-color:var(--accent);color:var(--accent)}

/* reserved ad slots: fixed height, nothing moves when they fill */
.ad{display:flex;align-items:center;justify-content:center;overflow:hidden;contain:strict;margin:14px 0}
.ad-top{height:100px}
.ad-end{height:250px;margin-top:24px}

/* the share-link resolver page */
/* Side padding stays: a bare `padding:40px 0` here cancelled .lib-wrap's and put the text and the
   Copy button against the screen edge on a phone. */
.resolver{text-align:center;padding:40px 20px}
.resolver .seed-code{display:block;font-size:clamp(18px,5vw,28px);margin:12px 0 18px}
.resolver .badges{justify-content:center;margin:18px 0}
.resolver .lib-actions{justify-content:center}
/* .lib-actions is display:flex, which outranks the browser's own [hidden] rule: without this the
   Copy button showed while the seed was still being looked up and on a link with no valid seed. */
.lib-actions[hidden]{display:none}

/* the seed catalogue (/seeds/ and every collection page, web/catalogue.js). Scoped under .cat and
   laid out with a container query, so the same markup works in the page column and on a phone. */
.cat{container-type:inline-size;color:var(--text);font-size:15px;line-height:1.45}
.cat *{box-sizing:border-box}
.cat button,.cat select{font:inherit}
.cat-controls{display:grid;gap:14px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);margin:0 0 4px}
.cat-field{display:grid;gap:6px;min-width:0}
.cat-label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--muted)}
.cat-chips{display:flex;flex-wrap:wrap;gap:8px}
.cat-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:999px;
  border:1px solid var(--border);background:var(--surface-2);color:var(--text);font-size:14px;cursor:pointer}
.cat-chip:hover{border-color:var(--accent-deep)}
.cat-chip[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:transparent;box-shadow:inset 0 0 0 1px var(--accent)}
.cat-chip:focus-visible,.cat-select:focus-visible,.cat-sortbtn:focus-visible,.cat-copy:focus-visible,.cat-more:focus-visible,a.cat-seed:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cat-chip .cat-glyph{width:18px;height:18px;flex:none}
.cat-select{min-height:44px;min-width:0;width:100%;padding:0 12px;border-radius:8px;border:1px solid var(--border);
  background:var(--surface-2);color:var(--text);font-size:14px}
.cat-inline{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.cat-status{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;align-items:center;margin:18px 0 6px;font-size:14px;color:var(--muted)}
.cat-status b{color:var(--text)}
.cat-intro{margin:14px 0 0;padding:12px 14px;border-left:3px solid var(--accent);background:var(--surface);border-radius:0 8px 8px 0;font-size:14px;color:var(--muted)}
.cat-intro b{color:var(--text)}
.cat-list{margin:0;padding:0}
.cat-head,.cat-item{display:grid;grid-template-columns:var(--cols);gap:14px;align-items:center}
.cat-head{padding:0;border-bottom:1px solid var(--border);font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--muted)}
.cat-head>span{display:flex;align-items:center;min-height:44px}
.cat-sortbtn{white-space:nowrap;display:inline-flex;align-items:center;gap:5px;min-height:44px;padding:0;background:none;border:0;color:inherit;
  letter-spacing:inherit;text-transform:inherit;font-weight:inherit;font-size:inherit;cursor:pointer;text-align:left}
.cat-sortbtn::after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;opacity:.35}
.cat-sortbtn[aria-pressed="true"]{color:var(--accent)}
.cat-sortbtn[aria-pressed="true"]::after{opacity:1}
.cat-num{justify-content:flex-end;text-align:right}
.cat-item{padding:10px 0;border-bottom:1px solid var(--border-soft)}
.cat-thumb{display:grid;place-items:center;width:112px;aspect-ratio:112/65;border-radius:6px;overflow:hidden;border:1px solid var(--border);background:var(--surface-2)}
.cat-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.cat-main{min-width:0}
.cat-seed{font-family:var(--font-mono);font-weight:700;font-size:15px;letter-spacing:.01em;overflow-wrap:anywhere;color:var(--text)}
a.cat-seed{display:inline-flex;align-items:center;min-height:44px;color:var(--accent);text-decoration:none}
a.cat-seed:hover{text-decoration:underline}
.cat-sum{display:block;color:var(--muted);font-size:13.5px;margin-top:-6px}
.cat-score{font-variant-numeric:tabular-nums}
.cat-score b{font-size:15px;color:var(--text)}
.cat-score small{display:block;font-size:12px;color:var(--muted)}
.cat-dists{display:contents}
.cat-dist{font-family:var(--font-mono);font-size:14px;text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}
.cat-dist .cat-dist-l{display:none}
.cat-dist.is-sort{color:var(--accent);font-weight:700}
.cat-dist.is-none{color:var(--muted)}
.cat-copy{min-height:44px;padding:0 14px;border-radius:6px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  font-weight:700;font-size:13px;letter-spacing:.02em;text-transform:uppercase;cursor:pointer}
.cat-copy:hover{border-color:var(--accent-deep);color:var(--accent)}
.cat-foot{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:16px 0 0;color:var(--muted);font-size:14px}
.cat-more{min-height:48px;padding:0 20px;border-radius:6px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font-weight:700;font-size:14px;cursor:pointer}
.cat-more:hover{border-color:var(--accent-deep);color:var(--accent)}
.cat-empty{padding:28px 0;color:var(--muted)}
.cat-note{margin:14px 0 0;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);font-size:14px;color:var(--text)}

/* collections as cards (/collections/ and under the catalogue) */
.cat-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:0 0 12px;padding:0;list-style:none}
.cat-card{display:grid;gap:4px;align-content:start;width:100%;height:100%;min-height:44px;padding:14px;border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text);text-align:left;text-decoration:none}
.cat-card:hover{border-color:var(--accent-deep)}
.cat-card b{font-size:15px;color:var(--accent)}
.cat-card span{font-size:13px;color:var(--muted)}
.cat-card i{font-style:normal;font-size:13px;font-weight:700;color:var(--muted)}

/* narrow: rows become cards */
@container (max-width:719px){
  .cat-inline{grid-template-columns:1fr}
  .cat-head{display:none}
  .cat-item{grid-template-columns:96px minmax(0,1fr);grid-template-areas:"thumb main" "score dists" "copy copy";gap:8px 12px;padding:12px 0}
  .cat-thumb{grid-area:thumb;width:96px;align-self:start;margin-top:6px}
  .cat-main{grid-area:main}
  .cat-score{grid-area:score}
  .cat-dists{grid-area:dists;display:flex;flex-wrap:wrap;gap:6px;align-content:start}
  .cat-dist{padding:4px 9px;border-radius:999px;border:1px solid var(--border);font-size:12.5px;text-align:left}
  .cat-dist .cat-dist-l{display:inline;font-family:var(--font-ui);color:var(--muted);margin-right:4px}
  .cat-dist.is-sort{border-color:var(--accent)}
  .cat-copy{grid-area:copy;width:100%}
  .cat-foot{flex-direction:column;align-items:stretch}
  .cat-more{width:100%}
}
