/* ===== Johnny's Palworld Companion 5000 — dark liquid glass + subtle RGB ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07090f;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8ecf4;
  --muted: #8b93a7;
  --accent: #6ea8ff;
}

html { color-scheme: dark; }
/* stop mobile pull-to-refresh from reloading the app on a slightly-dragged tap */
html, body { overscroll-behavior-y: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  padding: 18px clamp(10px, 3vw, 40px) 60px;
  overflow-x: hidden;
}

/* ---- floating RGB blobs behind the glass ----
   no blur filter needed: the radial gradient is already soft, and a filter-free
   layer with translate-only animation costs the GPU almost nothing */
.bg-blobs { position: fixed; inset: 0; z-index: -1; opacity: .5; overflow: hidden; }
.blob { position: absolute; width: 52vw; height: 52vw; border-radius: 50%; will-change: transform; }
.b1 { background: radial-gradient(circle, rgba(43,108,255,.8) 0%, rgba(43,108,255,.25) 35%, transparent 62%); top: -14%; left: -10%; animation: drift1 30s ease-in-out infinite alternate; }
.b2 { background: radial-gradient(circle, rgba(138,43,255,.75) 0%, rgba(138,43,255,.22) 35%, transparent 62%); bottom: -20%; right: -12%; animation: drift2 36s ease-in-out infinite alternate; }
.b3 { background: radial-gradient(circle, rgba(0,200,160,.6) 0%, rgba(0,200,160,.18) 35%, transparent 62%); top: 33%; left: 42%; width: 34vw; height: 34vw; animation: drift3 42s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vw, 8vh); } }
@keyframes drift2 { to { transform: translate(-10vw, -6vh); } }
@keyframes drift3 { to { transform: translate(-14vw, 10vh); } }

/* ---- glass surfaces ---- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* perf: small repeated cards skip the expensive per-element backdrop blur —
   solid translucent fill looks the same over the dark bg and is ~free to render */
.pal-card.glass, .child-card.glass, .step.glass {
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: rgba(20, 24, 39, 0.62);
}
.pal-card { content-visibility: auto; contain-intrinsic-size: auto 110px; }

/* ---- top bar ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: .3px; }
.sub { color: var(--muted); font-size: .82rem; }
.center { text-align: center; margin: 10px 0; }

.rgb-ring { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; }
.rgb-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px;
  background: conic-gradient(from var(--a, 0deg), #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.rgb-ring img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; transition: opacity .8s ease, transform .8s cubic-bezier(.34,1.56,.64,1); }

.tab-emoji { font-size: 1.05rem; line-height: 1; vertical-align: -2px; }

.world-badge {
  background: linear-gradient(90deg, #4aa7ff, #b06bff, #47e891);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700; letter-spacing: .6px; animation: hueflow 10s linear infinite;
}
.meta-bit {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text);
  font-size: .74rem; padding: 3px 11px; border-radius: 999px; margin-left: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.meta-bit .ico { width: 12px; height: 12px; color: var(--accent); opacity: .9; }

.rgb-text {
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueflow 8s linear infinite;
}
@keyframes hueflow { to { background-position: 300% 0; } }

/* ---- buttons / inputs ---- */
.btn {
  background: var(--glass-strong); color: var(--text); border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 12px; cursor: pointer; font-size: .9rem;
  transition: all .18s ease; backdrop-filter: blur(8px); user-select: none; display: inline-block;
}
.btn:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-1px); }
.btn.primary { border-color: transparent; position: relative; background:
  linear-gradient(var(--bg), var(--bg)) padding-box,
  linear-gradient(120deg, #4aa7ff, #b06bff, #47e891) border-box;
  border: 1.5px solid transparent; }
.btn.primary:hover { box-shadow: 0 0 18px rgba(110, 130, 255, .35); }
.btn.ghost { opacity: .85; }
.btn.danger:hover { background: rgba(255, 80, 80, .25); }

.input {
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); color: var(--text);
  padding: 9px 14px; border-radius: 12px; font-size: .9rem; outline: none; min-width: 140px;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110, 168, 255, .15); }
.grow { flex: 1; }

.ico {
  width: 16px; height: 16px; display: inline-block; vertical-align: -3px;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
h2 .ico { width: 18px; height: 18px; margin-right: 5px; color: var(--accent); }
.ico-img { width: 18px; height: 18px; vertical-align: -4px; }
.arrow .ico { width: 18px; height: 18px; }

.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 10px; }
.big { font-size: 1.4rem; color: var(--muted); }

/* ---- tabs ---- */
.tabs { display: flex; gap: 6px; margin: 14px 0; padding: 6px; position: sticky; top: 10px; z-index: 50; }
.tab {
  flex: 1; background: transparent; border: none; color: var(--muted); font-size: .95rem;
  padding: 10px; border-radius: 12px; cursor: pointer; transition: all .2s;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.06); }
.tab.active { color: var(--text); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--border), 0 0 14px rgba(110,130,255,.15); }

.tab-panel { display: none; animation: fadein .25s ease; }
.tab-panel.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.panel { padding: 18px; margin-bottom: 16px; position: relative; }
.topbar, .tabs { position: relative; }
/* Siri-style slow rainbow ring around the big glass surfaces */
.panel::before, .topbar::before, .tabs::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .38; pointer-events: none; animation: spin 16s linear infinite;
}
/* the blur gives every panel its own stacking context — lift whichever panel
   has an open picker dropdown so it floats over the panels below it */
.panel:has(.dropdown.open) { z-index: 300; }
.panel h2 { font-size: 1.05rem; margin-bottom: 4px; }
.panel .sub { margin-bottom: 12px; }

/* ---- pal box grid ---- */
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-top: 12px; }
.pal-card { padding: 12px; display: flex; gap: 10px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.pal-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.45); }
/* Siri ring on hover — animated only while hovered, so 80 cards cost nothing */
.pal-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.pal-card:hover::before { opacity: .9; animation: spin 4s linear infinite; }
.pal-card { position: relative; }
.pal-card img.pal-icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.05); flex-shrink: 0; }
.pal-card .info { min-width: 0; }
.pal-card .name { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-card .meta { font-size: .75rem; color: var(--muted); margin: 2px 0 6px; }
.badge { display: inline-block; font-size: .68rem; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.09); margin: 1px 3px 1px 0; }
.badge.owner { background: linear-gradient(120deg, rgba(74,167,255,.25), rgba(176,107,255,.25)); border: 1px solid rgba(120,150,255,.3); }
/* per-player colors: 0 Oshimo (blue-purple), 1 Alt0153, 2 CrystalRose, 3 ElleFaux, 4 SyPunk */
.oc-0.badge.owner, .chip.on.oc-0 { background: linear-gradient(120deg, rgba(74,167,255,.28), rgba(176,107,255,.28)); border-color: rgba(120,150,255,.45); }
.oc-1.badge.owner, .chip.on.oc-1 { background: linear-gradient(120deg, rgba(255,170,60,.28), rgba(255,95,45,.28)); border-color: rgba(255,150,70,.45); }
.oc-2.badge.owner, .chip.on.oc-2 { background: linear-gradient(120deg, rgba(255,110,160,.28), rgba(255,55,95,.28)); border-color: rgba(255,110,150,.45); }
.oc-3.badge.owner, .chip.on.oc-3 { background: linear-gradient(120deg, rgba(52,215,150,.26), rgba(0,190,215,.26)); border-color: rgba(60,210,185,.45); }
.oc-4.badge.owner, .chip.on.oc-4 { background: linear-gradient(120deg, rgba(255,70,220,.26), rgba(140,70,255,.3)); border-color: rgba(225,85,255,.45); }
.badge.alpha { background: rgba(255, 90, 90, .22); border: 1px solid rgba(255,90,90,.4); }
.badge.lucky { background: rgba(255, 215, 90, .18); border: 1px solid rgba(255,215,90,.4); }
.badge.p4 { background: rgba(255,195,113,.2); border: 1px solid rgba(255,195,113,.35); }
/* passive quality glows (matches in-game tiers: red bad → gold → legendary → special) */
.badge.pr1, .chip.pr1 { box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.badge.pr2, .chip.pr2 { box-shadow: 0 0 0 1px rgba(255,224,130,.35), 0 0 6px rgba(255,215,90,.18); color: #ffe9b0; }
.badge.pr3, .chip.pr3 { box-shadow: 0 0 0 1px rgba(255,205,70,.55), 0 0 8px rgba(255,195,60,.35); color: #ffdf8a; }
/* rank 4 = rainbow tier (Legend etc.), rank 5 = ultra tier with animated rainbow */
.badge.pr4, .chip.pr4 {
  border: 1px solid transparent;
  background: linear-gradient(rgba(22,26,42,.88), rgba(22,26,42,.88)) padding-box,
              linear-gradient(120deg, #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff) border-box;
  box-shadow: 0 0 9px rgba(170,140,255,.35); color: #fff; font-weight: 600;
}
.badge.pr5, .chip.pr5 {
  border: 1.5px solid transparent;
  background: linear-gradient(rgba(22,26,42,.85), rgba(22,26,42,.85)) padding-box,
              linear-gradient(120deg, #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff, #ff5f6d) border-box;
  background-size: 100% 100%, 300% 100%;
  box-shadow: 0 0 14px rgba(190,150,255,.55); color: #fff; font-weight: 700;
  animation: hueflow 5s linear infinite;
}
/* selection ring for passive chips whose background is taken over by tier styling */
.chip.on { outline: 2px solid rgba(110,168,255,.9); outline-offset: 1px; }
.badge.prneg, .chip.prneg { box-shadow: 0 0 0 1px rgba(255,95,95,.5), 0 0 8px rgba(255,85,85,.3); color: #ff9d9d; }
.badge.iv { background: rgba(71,232,145,.12); }
.gender-f { color: #ff8fb3; } .gender-m { color: #7db4ff; }

/* ---- chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: .8rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); transition: all .15s;
}
.chip:hover { background: rgba(255,255,255,.13); }
.chip.on { background: linear-gradient(120deg, rgba(74,167,255,.35), rgba(176,107,255,.35)); border-color: rgba(120,150,255,.5); }

/* ---- pal picker ---- */
.picker { position: relative; min-width: 230px; }
/* target picker matches the passives button width; fills the panel on mobile */
#picker-target { width: 100%; max-width: 355px; }
.picker .sel { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.picker .sel img { width: 34px; height: 34px; border-radius: 9px; }
.picker .dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 320px; overflow-y: auto;
  z-index: 100; background: rgba(15, 18, 30, 0.92); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 14px; display: none;
}
.picker .dropdown.open { display: block; }
.picker .opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: .88rem; }
.picker .opt:hover { background: rgba(110, 168, 255, .15); }
.picker .opt img { width: 30px; height: 30px; border-radius: 8px; }
.picker .opt .dex { color: var(--muted); font-size: .72rem; margin-left: auto; }

/* ---- breeding layout ---- */
.breeding-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.breeding-cols .wide { grid-column: 1 / -1; }
@media (max-width: 980px) { .breeding-cols { grid-template-columns: 1fr; } }

.result-area { margin-top: 14px; }
.child-card { display: flex; align-items: center; gap: 14px; padding: 14px; }
.child-card img { width: 64px; height: 64px; border-radius: 16px; }
.arrow { color: var(--muted); font-size: 1.3rem; }

.step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 8px; flex-wrap: wrap; }
.step .num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem;
  background: linear-gradient(120deg, rgba(74,167,255,.4), rgba(176,107,255,.4)); flex-shrink: 0;
}
.step .pal-mini { display: inline-flex; align-items: center; gap: 6px; }
.step .pal-mini img { width: 36px; height: 36px; border-radius: 10px; }
.step .cond { width: 100%; font-size: .76rem; color: #ffc371; }
/* two-tier discovery cards: parents / dashed divider / what hatches */
.combo-card {
  border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.03);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 10px;
}
.combo-card .combo-parents { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* each parent (icon + name + owner badge) moves as one unbreakable unit */
.parent-unit { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.combo-card .combo-parents img, .combo-card .combo-result img { width: 34px; height: 34px; border-radius: 9px; }
.combo-card .plus { color: var(--muted); }
.combo-card .combo-result {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed rgba(255, 255, 255, 0.14);
}
.badge.new { background: linear-gradient(120deg, rgba(74,167,255,.35), rgba(71,232,145,.35)); border: 1px solid rgba(110,200,180,.4); font-weight: 600; margin-left: auto; }
@media (min-width: 700px) {
  /* one row, clustered left with breathing room before the hatch result */
  .combo-card { display: flex; align-items: center; gap: 34px; }
  .combo-card .combo-result {
    margin-top: 0; padding-top: 0; border-top: none;
    border-left: 1px dashed rgba(255, 255, 255, 0.14); padding-left: 20px;
  }
  .combo-card .badge.new { margin-left: 4px; }
}

#combos-result { max-height: 520px; overflow-y: auto; }
.combo-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: .86rem; }
.combo-row:nth-child(odd) { background: rgba(255,255,255,.04); }
.combo-row img { width: 30px; height: 30px; border-radius: 8px; }
.combo-row .owners { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }

.passives-box { margin: 14px 0; font-size: .85rem; }
.passives-box summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 355px;
  padding: 10px 16px; border-radius: 12px; color: var(--text); font-size: .9rem;
  background: linear-gradient(rgba(255,255,255,.07), rgba(255,255,255,.07)) padding-box,
              linear-gradient(120deg, rgba(74,167,255,.55), rgba(176,107,255,.55), rgba(71,232,145,.55)) border-box;
  border: 1px solid transparent; transition: box-shadow .2s, background .2s;
}
.passives-box summary::-webkit-details-marker { display: none; }
.passives-box summary:hover { box-shadow: 0 0 16px rgba(110,130,255,.3); }
.passives-box[open] summary { box-shadow: 0 0 16px rgba(110,130,255,.25); margin-bottom: 10px; }
.ps-count { font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: linear-gradient(120deg, rgba(74,167,255,.4), rgba(176,107,255,.4)); display: none; }
.ps-count.show { display: inline-block; }
.passives-box .input { width: 100%; margin-bottom: 8px; }
/* padding keeps the quality glows from being clipped by the scroll edges */
.passives-box .chips { max-height: 230px; overflow-y: auto; padding: 6px 4px 10px; }

.badge.work { background: rgba(74,167,255,.16); border: 1px solid rgba(74,167,255,.35); color: #a8d0ff; }

/* ---- pal inspector modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 14, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 18px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative; width: min(480px, 100%); max-height: 86vh; overflow-y: auto;
  padding: 22px; animation: fadein .2s ease;
}
.modal-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), #ff5f6d, #ffc371, #47e891, #4aa7ff, #b06bff, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .45; pointer-events: none; animation: spin 12s linear infinite;
}
.modal-close { position: absolute; top: 14px; right: 14px; opacity: .6; cursor: pointer; background: none; border: none; color: var(--text); }
.modal-close:hover { opacity: 1; }
.modal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.modal-head img { width: 76px; height: 76px; border-radius: 18px; background: rgba(255,255,255,.05); }
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-section { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.12); }
#modal-breed { margin-top: 18px; width: 100%; }

.iv-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.iv-label { width: 58px; font-size: .78rem; color: var(--muted); }
.iv-track { flex: 1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.iv-fill { height: 100%; border-radius: 6px; }
.iv-val { width: 30px; text-align: right; font-size: .8rem; }

/* ---- what's-new ticker (header, always live) ---- */
.ticker {
  display: inline-flex; align-items: center; gap: 10px; max-width: 350px;
  padding: 7px 16px 7px 12px; border-radius: 999px; font-size: .8rem; line-height: 1.35;
  border: 1.5px solid transparent;
  background: linear-gradient(rgba(20, 24, 39, 0.7), rgba(20, 24, 39, 0.7)) padding-box,
              linear-gradient(120deg, rgba(74,167,255,.55), rgba(176,107,255,.55)) border-box;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: opacity .35s ease, transform .35s ease;
}
.ticker.fade { opacity: 0; transform: translateY(5px); }
.ticker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #3ddc84; box-shadow: 0 0 8px rgba(61, 220, 132, 0.8);
  animation: pulse 2.2s ease-in-out infinite;
}
.ticker img { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.07); flex-shrink: 0; }
.ticker .tk-body { display: flex; flex-direction: column; }
.ticker .ago { color: var(--muted); font-size: .67rem; margin-top: 1px; }
.ticker .badge { padding: 1px 6px; font-size: .62rem; }
.ticker.oc-0 { background: linear-gradient(rgba(20,24,39,.7), rgba(20,24,39,.7)) padding-box, linear-gradient(120deg, rgba(74,167,255,.6), rgba(176,107,255,.6)) border-box; }
.ticker.oc-1 { background: linear-gradient(rgba(20,24,39,.7), rgba(20,24,39,.7)) padding-box, linear-gradient(120deg, rgba(255,170,60,.6), rgba(255,95,45,.6)) border-box; }
.ticker.oc-2 { background: linear-gradient(rgba(20,24,39,.7), rgba(20,24,39,.7)) padding-box, linear-gradient(120deg, rgba(255,110,160,.6), rgba(255,55,95,.6)) border-box; }
.ticker.oc-3 { background: linear-gradient(rgba(20,24,39,.7), rgba(20,24,39,.7)) padding-box, linear-gradient(120deg, rgba(52,215,150,.6), rgba(0,190,215,.6)) border-box; }
.ticker.oc-4 { background: linear-gradient(rgba(20,24,39,.7), rgba(20,24,39,.7)) padding-box, linear-gradient(120deg, rgba(255,70,220,.6), rgba(140,70,255,.6)) border-box; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: rgba(20, 25, 40, .95); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 20px; font-size: .88rem; transition: transform .25s ease; z-index: 999;
  backdrop-filter: blur(10px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---- players strip (topbar) ---- */
.players-strip {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; width: 100%;
  font-size: .8rem; margin-top: 10px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.players-strip:empty { display: none; }
.metrics-line {
  display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-right: 14px; margin-right: 4px; border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.stat { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: .78rem; white-space: nowrap; }
.stat .ico { width: 13px; height: 13px; color: var(--accent); opacity: .9; }
.stat.good .ico { color: #3ddc84; }
.stat.warn .ico { color: #ffc371; }
.stat.bad .ico { color: #ff7a7a; }
.player-chip {
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.09);
}
.player-chip.online {
  color: var(--text); font-weight: 600;
  background: rgba(61, 220, 132, 0.09); border-color: rgba(61, 220, 132, 0.35);
}
.player-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px rgba(61,220,132,.8); animation: pulse 2.2s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 50% { opacity: .45; } }
.player-chip .plvl { font-size: .7rem; color: var(--muted); font-weight: 400; }

.show-more { grid-column: 1 / -1; justify-self: center; margin: 10px auto 4px; }

/* ---- footer ---- */
.footer { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 28px; opacity: .7; }

/* ---- mobile ---- */
@media (max-width: 640px) {
  .combo-row { flex-wrap: wrap; row-gap: 4px; }
  .combo-row .owners { margin-left: 0; width: 100%; }
  .step .pal-mini { max-width: 100%; }
  .panel { padding: 14px; }
}
.breeding-cols > .panel, .result-area { min-width: 0; }
.combo-row span { overflow-wrap: anywhere; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }
