/* Planet Zoo 2 look: the official palette (named after animals on planetzoogame.com),
   parchment panels with torn edges and olive tab labels like the in-game dialogs, set in
   Signika on a dark backdrop. */
@font-face { font-family: "Signika"; src: url("fonts/Signika-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Signika"; src: url("fonts/Signika-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Signika"; src: url("fonts/Signika-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --zebra: #fff2dd; --zebra-d: #e6dac7; --paper: #efe1c8; --paper-2: #e2d2b6; --paper-line: #cdb999;
  --snake: #8a9751; --snake-d: #596944; --snake-dd: #46532f; --snake-l: #b9c48a;
  --bear: #725b4b; --bear-d: #333029; --bear-dd: #22201b; --bear-ddd: #191815;
  --toucan: #ffb859; --toucan-d: #eb8c4a;
  --flamingo: #ffc5c4; --flamingo-d: #e77c98; --flamingo-dd: #b8506b;
  --parrot: #569890; --parrot-d: #1c7265;
  --shark: #6f88c1; --shark-d: #3b4c68;
  --ink: var(--bear-d); --ink-2: var(--bear); --ink-3: #9a8571;
  --font: "Signika", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 8px 22px rgb(0 0 0 / .38), 0 2px 4px rgb(0 0 0 / .25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--zebra); font: 15px/1.4 var(--font);
  background:
    radial-gradient(1100px 650px at 12% -8%, rgb(89 105 68 / .42), transparent 62%),
    radial-gradient(900px 620px at 105% 108%, rgb(28 114 101 / .22), transparent 60%),
    radial-gradient(700px 500px at 60% 40%, rgb(114 91 75 / .16), transparent 70%),
    var(--bear-dd);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
a { color: var(--snake-d); }

/* ---------- parchment panel ---------- */
.card { position: relative; isolation: isolate; padding: 30px 20px 20px; color: var(--ink); }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: var(--radius);
  background: var(--zebra); box-shadow: var(--shadow);
}
.card::after {
  content: ""; position: absolute; inset: 9px; z-index: -1; border-radius: 6px;
  background:
    radial-gradient(180px 110px at 88% 14%, rgb(255 255 255 / .35), transparent 70%),
    radial-gradient(220px 150px at 8% 92%, rgb(114 91 75 / .09), transparent 70%),
    radial-gradient(90px 70px at 70% 80%, rgb(114 91 75 / .06), transparent 70%),
    var(--paper);
  filter: url(#torn);
}
.card + .card { margin-top: 26px; }

.tab-label {
  position: absolute; top: -12px; left: 14px; z-index: 2; margin: 0;
  padding: 6px 18px 7px 14px; transform: rotate(-1.6deg);
  background: var(--snake-d); color: #fff; font: 700 15px/1 var(--font); letter-spacing: .01em;
  clip-path: polygon(0 6%, 100% 0, 95% 100%, 2% 94%); box-shadow: 0 2px 0 var(--snake-dd);
  text-shadow: 0 1px 0 rgb(0 0 0 / .25);
}
.tab-label--big { position: static; display: inline-block; font-size: 22px; padding: 10px 26px 11px 18px; }
.sub-head {
  margin: 18px 0 10px; padding-bottom: 3px; border-bottom: 3px solid var(--snake-d);
  color: var(--snake-d); font: 700 13px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase;
}
.sub-head:first-child { margin-top: 0; }

/* ---------- header ---------- */
.top {
  display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  padding: 22px clamp(16px, 3vw, 36px) 8px;
}
.brand { display: grid; gap: 10px; max-width: 900px; justify-items: start; }
.what { margin: 0; color: var(--zebra-d); font-size: 15px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.storage-warning {
  margin: 8px clamp(16px, 3vw, 36px) 0; padding: 10px 14px; border-radius: 10px;
  background: var(--toucan-d); color: var(--bear-ddd);
}

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px;
  padding: 6px 16px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-weight: 700; font-size: 14px; transition: filter .12s, transform .06s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--toucan); outline-offset: 2px; }
.btn--primary { background: var(--snake-d); color: var(--zebra); box-shadow: inset 0 -3px 0 var(--snake-dd), 0 1px 0 rgb(255 255 255 / .3); }
.btn--primary:hover { filter: brightness(1.12); }
.btn--ghost { background: rgb(255 242 221 / .08); color: var(--zebra); box-shadow: inset 0 0 0 2px rgb(255 242 221 / .25); }
.btn--ghost:hover { background: rgb(255 242 221 / .16); }
.btn--soft { background: var(--zebra); color: var(--snake-d); box-shadow: inset 0 0 0 2px var(--snake); }
.btn--soft:hover { background: #fff; }
.btn--danger { background: var(--flamingo-dd); color: #fff; box-shadow: inset 0 -3px 0 #8f3a51; }
.btn--small { min-height: 28px; padding: 3px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: 16px;
}
.icon-btn:hover { background: rgb(114 91 75 / .14); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--toucan-d); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--zebra); color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--paper-line);
}
.chip[aria-pressed="true"] { background: var(--snake-d); color: var(--zebra); box-shadow: inset 0 -2px 0 var(--snake-dd); }

.seg { display: inline-flex; border-radius: 999px; padding: 3px; background: var(--paper-2); gap: 2px; }
.seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 3px 11px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--snake-d); color: var(--zebra); }
.seg button:disabled { opacity: .45; cursor: default; }

input[type="search"], input[type="text"], input[type="number"] {
  border: 2px solid var(--paper-line); border-radius: 10px; background: var(--zebra); padding: 7px 11px; color: var(--ink);
}
input[type="search"]:focus, input[type="text"]:focus, input[type="number"]:focus { outline: none; border-color: var(--snake); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--snake-d); width: 16px; height: 16px; }

/* ---------- layout ---------- */
.layout {
  display: grid; gap: 28px 26px; align-items: start;
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-areas: "plans editor" "plans picker";
  padding: 26px clamp(16px, 3vw, 36px) 30px;
}
.plans { grid-area: plans; position: sticky; top: 18px; }
.editor { grid-area: editor; min-width: 0; }
.picker { grid-area: picker; min-width: 0; }
@media (min-width: 1500px) {
  .layout { grid-template-columns: 270px minmax(0, 1.35fr) minmax(380px, 1fr); grid-template-areas: "plans editor picker"; }
  .picker { position: sticky; top: 18px; max-height: calc(100vh - 36px); display: flex; flex-direction: column; }
  .picker .species-grid { overflow: auto; flex: 1; padding-right: 4px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "plans" "editor" "picker"; gap: 30px; }
  .plans { position: relative; top: auto; }
  .plans .plan-list { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; }
  .plans .plan-list > li { min-width: 210px; flex: 0 0 auto; }
}

/* ---------- plan list ---------- */
.plan-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.plan-item {
  position: relative; display: grid; gap: 6px; padding: 10px 10px 10px 12px; border-radius: 10px; cursor: pointer;
  background: var(--zebra); box-shadow: inset 0 0 0 2px var(--paper-line);
}
.plan-item:hover { box-shadow: inset 0 0 0 2px var(--snake); }
.plan-item[aria-current="true"] { box-shadow: inset 0 0 0 3px var(--snake-d); background: #fff8ec; }
.plan-item-head { display: flex; gap: 6px; align-items: center; }
.plan-item-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-item-meta { font-size: 12.5px; color: var(--ink-2); }
.mini-heads { display: flex; flex-wrap: wrap; gap: 2px; }
.mini-heads img { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); }
.plan-empty { color: var(--ink-3); font-size: 13px; }

/* ---------- editor ---------- */
.plan-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-name {
  flex: 1 1 260px; min-width: 0; font-size: 24px !important; font-weight: 700; padding: 4px 10px !important;
  background: transparent !important; border-color: transparent !important; color: var(--ink);
}
.plan-name:hover { border-color: var(--paper-line) !important; }
.plan-name:focus { background: var(--zebra) !important; border-color: var(--snake) !important; }
.kind-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px;
  background: var(--snake-d); color: var(--zebra); font-weight: 700; font-size: 13px;
}
.kind-badge img { width: 22px; height: 22px; }
.kind-badge--aquarium { background: var(--shark-d); }
.kind-badge--aviary { background: var(--parrot-d); }
.plan-actions { display: flex; gap: 4px; }

.residents { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.resident {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: var(--zebra); box-shadow: inset 0 0 0 2px var(--paper-line);
}
.resident--warn { box-shadow: inset 0 0 0 2px var(--toucan-d); }
.head {
  width: 56px; height: 56px; border-radius: 50%; padding: 0; border: 3px solid var(--snake);
  background: radial-gradient(circle at 50% 35%, #fffaf0, var(--paper-2)); cursor: pointer; overflow: hidden;
}
.head img { width: 100%; height: 100%; }
.res-name { font-weight: 700; font-size: 16px; line-height: 1.15; }
.res-sub { font-size: 12.5px; color: var(--ink-2); }
.res-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--paper-2); padding: 2px; }
.stepper button {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--snake-d); color: var(--zebra);
  font-weight: 700; cursor: pointer; line-height: 1;
}
.stepper input { width: 46px; text-align: center; border: 0 !important; background: transparent !important; padding: 2px !important; font-weight: 700; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.res-tags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); }
.tag--thrive { background: #dfe8bf; color: var(--snake-dd); }
.tag--warn { background: #ffe0bf; color: #8a4a12; }
.tag--bad { background: var(--flamingo); color: #7a2440; }
.tag img { width: 14px; height: 14px; }

.empty-plan { display: grid; justify-items: center; gap: 10px; padding: 18px 8px 8px; text-align: center; color: var(--ink-2); }
.empty-plan img { width: 160px; opacity: .9; }

/* stat rows, styled like the official Zoopedia's habitat builder */
.stack { margin-top: 26px; }
.grid-2 { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 26px; align-items: start; }
.stat-rows { display: grid; gap: 6px; margin: 0; }
.stat {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 5px 10px 5px 5px; border-radius: 10px; background: var(--zebra);
}
.stat-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--snake); display: grid; place-items: center; }
.stat-icon img { width: 30px; height: 30px; }
.stat-icon--warn { background: var(--toucan-d); }
.stat-icon--bad { background: var(--flamingo-dd); }
.stat-icon--blue { background: var(--shark); }
.stat dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.stat dd { margin: 0; font-weight: 700; font-size: 16px; text-align: right; }
.stat .by { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); text-transform: none; letter-spacing: 0; }

.plot-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 4px 2px 6px; }
.plot-number { font-size: 54px; line-height: .95; font-weight: 700; color: var(--snake-d); }
.plot-number small { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.plot-detail { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.plot-detail b { color: var(--ink); }
.plot-options { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.plot-options input[type="range"] { accent-color: var(--snake-d); width: 120px; vertical-align: middle; }

.rects { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.rect {
  width: 100%; border: 0; color: var(--ink);
  display: grid; gap: 6px; justify-items: center; align-content: start; padding: 10px 8px 8px; border-radius: 12px;
  background: var(--zebra); box-shadow: inset 0 0 0 2px var(--paper-line); text-align: center; cursor: pointer;
}
.rect:hover { box-shadow: inset 0 0 0 2px var(--snake); }
.rect[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--snake-d); background: #fff8ec; }
.rect svg { width: 100%; max-width: 130px; height: 100px; }
.rect-dims { font-weight: 700; font-size: 17px; }
.rect-meta { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.rect-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--snake-d); min-height: 14px; }

.space-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; }
.space-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 600; text-align: right; padding: 0 6px; }
.space-table th:first-child, .space-table td:first-child { text-align: left; }
.space-table td { background: var(--zebra); padding: 5px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.space-table td:first-child { border-radius: 8px 0 0 8px; }
.space-table td:last-child { border-radius: 0 8px 8px 0; }
.space-table tr.total td { background: var(--snake-d); color: var(--zebra); font-weight: 700; }
.space-table tr.alt td { background: var(--paper-2); font-weight: 600; }
.space-table .zero { color: var(--ink-3); }
.table-wrap { overflow-x: auto; }

.materials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--zebra); box-shadow: inset 0 0 0 2px var(--paper-line); }
.mat .g { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--snake-d); color: var(--zebra); font-size: 11px; }
.mat--climb { box-shadow: inset 0 0 0 2px var(--toucan); }
.note { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; }
.note--warn { color: #8a4a12; }

.biome-row { display: flex; flex-wrap: wrap; gap: 6px; }
.biome { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; background: var(--zebra); font-size: 13px; font-weight: 600; }
.biome img { width: 26px; height: 26px; }

.thrive-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.thrive-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--zebra); font-size: 13.5px; }
.thrive-list img { width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); }

/* ---------- picker ---------- */
.picker-tools { display: grid; gap: 10px; }
.picker-tools input[type="search"] { width: 100%; }
.picker-note { margin: 10px 0 6px; font-size: 13px; color: var(--ink-2); min-height: 18px; }
.species-grid > li { position: relative; }
.nw { white-space: nowrap; }
.species-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sp-card {
  position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 2px 10px; align-items: center;
  width: 100%; padding: 7px 34px 7px 7px; border: 0; border-radius: 12px; text-align: left; cursor: pointer;
  background: var(--zebra); box-shadow: inset 0 0 0 2px var(--paper-line); color: var(--ink);
}
.sp-card:hover { box-shadow: inset 0 0 0 2px var(--snake); }
.sp-card--thrive { box-shadow: inset 0 0 0 2px var(--snake); background: #f7f5df; }
.sp-card--blocked { opacity: .55; cursor: not-allowed; filter: grayscale(.6); }
.sp-card img { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, var(--paper-2)); grid-row: span 2; }
.sp-name { font-weight: 700; font-size: 14px; line-height: 1.15; }
.sp-meta { font-size: 11.5px; color: var(--ink-2); line-height: 1.25; }
.sp-meta b { color: var(--snake-dd); }
.sp-meta .bad { color: #9a3050; }
.sp-info {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2); font: 700 13px/1 var(--font); cursor: pointer;
}
.sp-info:hover { background: var(--snake-d); color: var(--zebra); }
.leaf { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- modals ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(760px, calc(100vw - 24px)); width: 100%; color: var(--ink); }
.modal--small { max-width: 420px; }
.modal::backdrop { background: rgb(18 17 14 / .72); backdrop-filter: blur(2px); }
.modal .card { padding: 34px 24px 22px; max-height: calc(100vh - 40px); overflow: auto; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.sp-detail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
.sp-detail-art { width: 100%; max-width: 220px; align-self: start; filter: drop-shadow(0 4px 6px rgb(51 48 41 / .25)); }
.sp-detail h3 { margin: 0; font-size: 26px; line-height: 1.1; }
.sp-detail .sci { margin: 2px 0 10px; font-style: italic; color: var(--ink-2); }
.terrain-row { display: grid; grid-template-columns: 28px 110px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 13px; }
.terrain-row img { width: 26px; height: 26px; border-radius: 6px; }
.bar { position: relative; height: 10px; border-radius: 999px; background: var(--paper-2); }
.bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--snake); }
.rel-heads { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-heads button { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--zebra); font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.rel-heads img { width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2); }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 640px) {
  .sp-detail { grid-template-columns: minmax(0, 1fr); }
  .sp-detail-art { max-width: 160px; justify-self: center; }
  .plot-number { font-size: 44px; }
  .resident { grid-template-columns: 48px minmax(0, 1fr); }
  .head { width: 48px; height: 48px; }
  .res-controls { grid-column: 1 / -1; justify-content: flex-start; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .terrain-row { grid-template-columns: 26px 92px minmax(0, 1fr) 62px; }
}

/* ---------- footer ---------- */
.foot { padding: 0 clamp(16px, 3vw, 36px) 36px; color: #b9ad98; font-size: 12.5px; max-width: 1200px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--snake-l); }

/* ---------- wildlife reserve roles ---------- */
.reserve-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.reserve-pick select {
  border: 2px solid var(--paper-line); border-radius: 999px; background: var(--zebra); color: var(--ink);
  padding: 4px 12px; font-weight: 700; cursor: pointer;
}
.reserve-pick select:focus { outline: none; border-color: var(--snake); }
.reserve-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(200px, 300px); gap: 12px; align-items: center; }
.reserve-head .pin { width: 56px; height: 56px; object-fit: contain; }
.reserve-title { display: grid; gap: 2px; }
.reserve-title b { font-size: 20px; }
.reserve-title span { font-size: 13px; color: var(--ink-2); }
.meter { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.meter b { font-size: 22px; color: var(--snake-d); }
.meter .bar { height: 12px; background: var(--paper-2); }
.meter .bar span { background: var(--snake-d); }
.meter-sub { font-size: 12px; }
.eco-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eco-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--zebra); color: var(--ink-3); font-weight: 600; font-size: 13px; box-shadow: inset 0 0 0 2px var(--paper-line);
  text-decoration: line-through;
}
.eco-chip img { width: 26px; height: 26px; opacity: .5; filter: grayscale(1); }
.eco-chip[aria-pressed="true"] { color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 2px var(--snake); }
.eco-chip[aria-pressed="true"] img { opacity: 1; filter: none; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.role {
  display: grid; grid-template-columns: 26px minmax(170px, 260px) minmax(0, 1fr); gap: 4px 10px; align-items: center;
  padding: 7px 10px; border-radius: 10px; background: var(--zebra); box-shadow: inset 0 0 0 2px var(--toucan);
}
.role--done { box-shadow: inset 0 0 0 2px var(--snake); background: #f4f2dc; }
.role-check {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; color: var(--zebra);
  box-shadow: inset 0 0 0 2px var(--toucan-d); background: #fff;
}
.role--done .role-check { background: var(--snake-d); box-shadow: none; }
.role-main { display: grid; gap: 3px; min-width: 0; }
.role-main b { font-size: 14.5px; }
.role-ecos { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-2); }
.role-ecos img { width: 20px; height: 20px; }
.role-ecos span { margin-left: 4px; }
.role-fill { min-width: 0; }
.role-by { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--snake-dd); font-weight: 600; }
.role-by img { width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2); }
.rel-heads .other-habitat { opacity: .6; background: var(--paper-2); }
.combos { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: combo; }
.combo {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 10px;
  border-radius: 12px; background: var(--zebra); box-shadow: inset 0 0 0 2px var(--snake);
}
.combo-heads { display: flex; flex-wrap: wrap; gap: 3px; }
.combo-heads img { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, var(--paper-2)); border: 2px solid var(--snake); }
.combo-heads img.have { border-color: var(--bear); opacity: .75; }
.combo-meta { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.combo-meta b { color: var(--snake-dd); }
.combo-names { display: block; font-size: 12px; margin-top: 2px; }
.combo .btn { grid-column: 2; grid-row: 1 / span 2; }
.fills { color: var(--parrot-d); font-weight: 700; }
@media (max-width: 760px) {
  .reserve-head { grid-template-columns: 48px minmax(0, 1fr); }
  .meter { grid-column: 1 / -1; }
  .role { grid-template-columns: 26px minmax(0, 1fr); }
  .role-fill { grid-column: 1 / -1; }
  .combo { grid-template-columns: minmax(0, 1fr); }
  .combo .btn { grid-column: 1; grid-row: auto; justify-self: start; }
}
.combo-open { display: block; font-size: 12px; margin-top: 2px; color: #8a4a12; }
.combo-open--none { color: var(--snake-dd); font-weight: 700; }
.combo-wait { display: block; font-size: 12px; margin-top: 2px; color: var(--flamingo-dd); }

/* ---------- terrain and plants ---------- */
.mix-status { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; }
.mix-status.ok { background: #dfe8bf; color: var(--snake-dd); }
.mix-status.warn { background: #ffe0bf; color: #8a4a12; }
.mix { display: grid; gap: 6px; }
.mix-row { display: grid; grid-template-columns: 28px 150px minmax(0, 1fr) 120px; gap: 10px; align-items: center; font-size: 13.5px; }
.mix-row img { width: 26px; height: 26px; border-radius: 6px; }
.mix-row img.plant-icon { background: var(--snake); padding: 3px; border-radius: 50%; }
.mix-row--child .mix-name { padding-left: 12px; color: var(--ink-2); }
.mix-row--child img { width: 20px; height: 20px; margin-left: 6px; }
.mix-bar { height: 12px; }
.mix-bar span { background: var(--snake); }
.mix-bar span.clash { background: var(--flamingo-d); }
.mix-bar i { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--bear-d); }
.mix-val { display: grid; text-align: right; line-height: 1.15; }
.mix-val b { font-size: 14px; }
.mix-val small { font-size: 11px; color: var(--ink-2); }
.terrain-cost { color: #8a4a12; font-weight: 600; }
.terrain-cost.ok { color: var(--snake-dd); font-weight: 400; }
.combo-terrain { display: block; font-size: 12px; margin-top: 2px; color: #8a4a12; font-weight: 600; }
.combo-terrain.ok { color: var(--snake-dd); }
.tol-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.tol-pick select { border: 2px solid var(--paper-line); border-radius: 999px; background: var(--zebra); color: var(--ink); padding: 3px 10px; font-weight: 600; }
@media (max-width: 640px) { .mix-row { grid-template-columns: 24px 92px minmax(0, 1fr) 76px; } }
