/* Zoo comparison page (extends style.css) */
body.zoo { background: linear-gradient(180deg, #bfe7ff 0%, #e6f6ff 50%, #fff1d6 100%); }
.zoo-head {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px; z-index: 5;
}
.zoo-head .back { display: grid; place-items: center; text-decoration: none; }
.zoo-title {
  flex: 1; display: flex; flex-direction: column; line-height: 1.2;
  background: var(--card); padding: 6px 14px; border-radius: 16px; box-shadow: var(--shadow);
}
.zoo-title small { color: var(--muted); font-size: 12px; }
.icon-btn.on { background: #ffe0cc; }
.zoo-filters {
  position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 56px); left: 12px; right: 12px;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; z-index: 5; padding: 2px;
}
.zoo-filters::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  box-shadow: 0 3px 10px rgba(120,70,40,.12); border: 2px solid transparent;
}
.chip-btn.on { border-color: var(--accent); background: #fff1e8; }
/* 🎲 mix bar (js/zoo.js renderMix): a second chip row under the filters */
.zoo-mix { top: calc(max(10px, env(safe-area-inset-top)) + 96px); align-items: center; }
body:not(.mix-open) .zoo-mix { display: none; }
.zoo-mix .mix-hint {
  flex: none; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgba(74, 59, 53, .72); padding: 5px 10px; border-radius: 999px;
}
.zoo-mix .mix-ctl { background: #fff7d6; }
.zoo-mix .chip-btn:active { transform: scale(.94); }
.zoo-mix .chip-btn:disabled { opacity: .45; }
/* 👁️ eyes bar (js/zoo.js renderEyes): under the mix bar when that is open, else in its place */
body:not(.mix-open) .zoo-eyes { display: flex; }
body.mix-open .zoo-eyes { top: calc(max(10px, env(safe-area-inset-top)) + 136px); }
.zoo-eyes[hidden] { display: none !important; }
#zi-look { color: var(--ink); font-weight: 600; }
.zoo-tag {
  position: absolute; left: 0; top: 0; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: rgba(255,255,255,.88); padding: 1px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.zoo-tag.fav::after { content: ' ❤️'; }
.pack-label {
  position: absolute; left: 0; top: 0; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgba(74, 59, 53, .72); padding: 3px 10px; border-radius: 10px;
}
body.no-labels .zoo-tag { visibility: hidden; }
.zoo-anims {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; gap: 6px; background: var(--card); padding: 8px; border-radius: 20px; box-shadow: var(--shadow);
  max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
}
.zoo-anims button {
  flex: none; display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 14px; background: var(--card-2);
}
.zoo-anims button span { font-size: 20px; }
.zoo-anims button.on { background: #ffe0cc; outline: 2px solid var(--accent); }
.zoo-info {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px);
  width: min(520px, calc(100% - 24px)); background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 14px;
  animation: slideUp .25s ease; z-index: 6;
}
.zi-top { display: flex; align-items: center; gap: 10px; }
.zi-top img { width: 52px; height: 52px; object-fit: contain; border-radius: 14px; background: var(--card-2); }
.zi-id { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zi-id b { font-size: 18px; }
.zi-id small { color: var(--muted); font-size: 12px; }
.zi-id .chips { justify-content: flex-start; }
.fav-btn { font-size: 26px; width: 44px; height: 44px; border-radius: 50%; }
.fav-btn:active { transform: scale(.85); }
.zi-clips-label { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.zi-clips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.zi-clips .chip-btn { box-shadow: none; background: var(--card-2); }

/* panels you can drag (js/zoo.js dragPanel): a grip on top, the title row drags too · ▾ folds it to its title */
.pt-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line, #e6d6cc); margin: -4px auto 6px; cursor: grab; touch-action: none; position: relative; }
.pt-grip::before { content: ''; position: absolute; inset: -10px -30px; } /* a bigger finger target */
.zoo-info .zi-top { cursor: grab; touch-action: none; }
.zoo-info .zi-top button, .zoo-info .zi-top select { cursor: pointer; touch-action: manipulation; }
.zoo-info.moved { animation: none; }
.zoo-info.folded > :not(.zi-top):not(.pt-grip) { display: none !important; }
.pt-fold { font-size: 14px; }
/* 🧩 parts panel (js/zoo.js renderParts): tabs · the pieces of the animal as chips · the picker for the one chosen */
.pt-tabs { display: flex; gap: 6px; margin: 10px 0 6px; }
.pt-tabs button { flex: 1; padding: 6px 8px; border-radius: 12px; background: var(--card-2); font-size: 13px; font-weight: 700; border: 2px solid transparent; }
.pt-tabs button.on { border-color: var(--accent); background: #fff1e8; }
.parts-host { max-height: min(38vh, 340px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.pt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.pt-count { flex: 1; min-width: 7em; font-size: 12px; color: var(--muted); }
.parts-host .chip-btn { box-shadow: none; background: var(--card-2); padding: 5px 10px; }
.parts-host .chip-btn:disabled { opacity: .45; }
.pt-group { font-size: 12px; font-weight: 700; color: var(--muted); margin: 8px 0 4px; }
.pt-fam { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.pt-fam > b { flex: none; width: 6.4em; font-size: 12px; line-height: 1.7; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.pt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 2px solid transparent; font-size: 12.5px; font-weight: 600; }
.pt-chip.on { border-color: #e2447f; background: #ffe6f0; }
.pt-chip .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.25); flex: none; }
.pt-edit { position: sticky; bottom: 0; margin-top: 8px; padding: 8px 10px; border-radius: 14px; background: #fff7d6; box-shadow: 0 -6px 12px -8px rgba(120,70,40,.3); }
.pt-edit-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.pt-edit-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pt-edit-row:last-child { margin-bottom: 0; }
.pt-edit select { flex: 1; min-width: 8em; font: inherit; font-size: 14px; padding: 4px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.pt-hint, .pt-none { font-size: 12px; color: var(--muted); padding: 8px 2px; }
.pt-chip.locked { background: #eef3ff; }
