:root {
  --bg: #1b1026;
  --panel: rgba(30, 20, 45, 0.92);
  --panel-solid: #241634;
  --accent: #ffb3c7;
  --accent2: #9d7bff;
  --gold: #ffd36b;
  --text: #f3ecff;
  --muted: #b5a6cf;
  --good: #7ee787;
  --warn: #ff7b7b;
  --radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: radial-gradient(circle at 50% -10%, #3a2452, #1b1026 60%);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  position: relative;
  /* Fill most of the browser on desktop (was capped at 1100x720 ≈ 60% of a big
     monitor). Larger caps + near-viewport sizing make the game use the window. */
  width: min(94vw, 1366px);
  height: min(92vh, 900px);
  background: linear-gradient(180deg, #23163a, #19102a);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* ---- phone/tablet: fill the screen edge-to-edge, drop the desktop frame ---- */
@media (max-width: 820px), (pointer: coarse) {
  #stage { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  /* respect notches / home indicator */
  #hud { padding-top: max(10px, env(safe-area-inset-top)); }
  #tabbar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .move-bar { bottom: max(20px, env(safe-area-inset-bottom)); }
  /* tab bar: fit all 6 tabs on narrow screens, scroll if truly too tight */
  #tabbar { gap: 3px; padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom)); justify-content: space-between; overflow-x: auto; }
  .tab { min-width: 0; flex: 1 1 0; padding: 7px 2px; font-size: 0.68rem; border-radius: 10px; gap: 1px; }
  .tab .ico { font-size: 1.1rem; }
  .fab { width: 56px; height: 56px; font-size: 1.4rem; }
  .move { width: 60px; height: 60px; }
  .hud-pill { padding: 5px 9px; font-size: 0.8rem; gap: 4px; }
  #hud { gap: 7px; padding-left: 8px; padding-right: 8px; }
}
/* very narrow: hide the long scene-title so pills never overflow */
@media (max-width: 460px) { .scene-title { display: none; } }

canvas { display: block; width: 100%; height: 100%; }

/* ---------- Top HUD ---------- */
#hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  z-index: 20;
  pointer-events: none;
}
#hud > * { pointer-events: auto; }

.hud-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.hud-pill .ico { font-size: 1.05rem; }
.hud-spacer { flex: 1; }

.scene-title {
  background: var(--panel);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------- Bottom tab bar ---------- */
#tabbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  padding: 10px;
  z-index: 20;
}
.tab {
  background: var(--panel);
  border: none;
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 72px;
}
.tab .ico { font-size: 1.3rem; }
.tab:hover { color: var(--text); transform: translateY(-2px); }
.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1b1026;
}

/* ---------- Floating action buttons (yard) ---------- */
#yard-actions {
  position: absolute; right: 14px; bottom: 86px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 20;
}
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1b1026;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  transition: transform 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.94); }
.fab small { display:block; font-size: 0.5rem; font-weight: 700; }

/* ---------- Panels (overlays) ---------- */
.panel {
  position: absolute; inset: 0;
  background: rgba(10, 6, 18, 0.72);
  backdrop-filter: blur(4px);
  z-index: 40;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.panel.open { display: flex; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.card {
  background: var(--panel-solid);
  border-radius: var(--radius);
  padding: 22px;
  width: min(560px, 94%);
  max-height: 86%;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.07);
}
.card h2 { font-size: 1.3rem; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.card-close {
  float: right; cursor: pointer; font-size: 1.4rem; color: var(--muted);
  line-height: 1; margin: -4px -4px 0 0;
}
.card-close:hover { color: var(--text); }

/* stat bars */
.stat-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.stat-row .label { width: 70px; font-size: 0.85rem; color: var(--muted); }
.bar { flex: 1; height: 12px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; transition: width 0.4s; }
.bar.hp > span { background: linear-gradient(90deg, #ff9db0, #ff6b8a); }
.bar.xp > span { background: linear-gradient(90deg, var(--accent2), #c3a6ff); }
.bar.aff > span { background: linear-gradient(90deg, #ffd36b, #ff8ab0); }
.stat-row .val { width: 46px; text-align: right; font-size: 0.8rem; font-weight: 700; }

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1b1026; border: none; padding: 10px 18px; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: 0.9rem; transition: transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.ghost { background: rgba(255,255,255,0.08); color: var(--text); }
.btn.gold { background: linear-gradient(135deg, var(--gold), #ffb347); }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* collection grid */
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.dex-cell {
  background: rgba(255,255,255,0.05); border-radius: 12px; padding: 10px; text-align: center;
  cursor: pointer; transition: transform 0.12s; position: relative; border: 1px solid transparent;
}
.dex-cell:hover { transform: translateY(-3px); border-color: var(--accent2); }
.dex-cell.locked { opacity: 0.4; filter: grayscale(1); }
.dex-cell canvas { width: 72px; height: 60px; margin: 0 auto; }
.dex-cell .name { font-size: 0.82rem; font-weight: 700; margin-top: 4px; }
.dex-cell .rarity { font-size: 0.72rem; margin-top: 2px; }
.badge-count {
  position: absolute; top: 6px; right: 6px; background: var(--accent2); color: #fff;
  border-radius: 999px; font-size: 0.7rem; padding: 1px 7px; font-weight: 700;
}

.rarity-N { color: #c9c9c9; }
.rarity-R { color: #7ab8ff; }
.rarity-SR { color: #c08bff; }
.rarity-SSR { color: var(--gold); }

/* roster chips */
.roster { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.roster .chip {
  background: rgba(255,255,255,0.06); border-radius: 10px; padding: 6px 10px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; font-size: 0.82rem; border: 1px solid transparent;
}
.roster .chip.sel { border-color: var(--accent); background: rgba(255,179,199,0.15); }
.roster .chip canvas { width: 40px; height: 34px; }

/* toast */
#toasts { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast {
  background: var(--panel); padding: 8px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4); animation: toastIn 0.3s ease; white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px);} to {opacity:1; transform: translateY(0);} }

/* ---------- real-time battle arena UI ---------- */
#battle-ui { position: absolute; inset: 0; z-index: 15; display: none; pointer-events: none; }
#battle-ui.on { display: block; }
.btn small { display: block; font-size: 0.6rem; font-weight: 700; opacity: 0.85; }

.battle-topbar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; pointer-events: auto;
  background: var(--panel); padding: 6px 10px 6px 16px; border-radius: 999px; font-weight: 800;
}
.tiny-btn { padding: 5px 12px; font-size: 0.78rem; }
.battle-hint {
  position: absolute; top: 50px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.82rem; background: rgba(20,12,30,0.5); padding: 4px 14px; border-radius: 999px;
  white-space: nowrap;
}
/* First-fight coach: emphasise the guidance line and pulse the taught control. */
.battle-hint.coach-hint {
  background: rgba(255,165,80,0.92); color: #3a2410; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(255,210,150,0.8), 0 4px 16px rgba(255,150,60,0.5);
}
.move.coach-pulse, #ult-btn.coach-pulse {
  animation: coachPulse 0.9s ease-in-out infinite;
  box-shadow: 0 0 0 3px #ffd36b, 0 0 18px 4px rgba(255,200,90,0.75); z-index: 5;
}
@keyframes coachPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* team slots top-left */
#team-slots { position: absolute; top: 56px; left: 14px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.team-slot {
  position: relative; width: 54px; background: var(--panel); border-radius: 12px; padding: 4px;
  cursor: pointer; border: 2px solid transparent; transition: transform 0.1s;
}
.team-slot:hover { transform: scale(1.05); }
.team-slot canvas { width: 46px; height: 40px; display: block; margin: 0 auto; }
.team-slot.active { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,211,107,0.5); }
.team-slot.fainted { filter: none; opacity: 1; }
.team-slot .slot-key { position: absolute; top: 2px; left: 4px; font-size: 0.7rem; font-weight: 800; color: var(--gold); }
.team-slot .slot-hp { height: 5px; background: rgba(255,255,255,0.15); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.team-slot .slot-hp > span { display: block; height: 100%; background: #7ee787; transition: width 0.2s, background 0.2s; }
/* thin ult meter under the HP bar; glows gold when full */
.team-slot .slot-ult { height: 3px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.team-slot .slot-ult > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#9d7bff,#ffd36b); transition: width 0.15s; }
.team-slot.ult-ready { box-shadow: 0 0 10px rgba(255,211,107,0.7); }
.team-slot.ult-ready .slot-ult > span { animation: ultGlow 0.8s ease-in-out infinite; }
@keyframes ultGlow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }
/* low HP: urgent pulse so you notice a cat about to faint */
.team-slot.low-hp { animation: lowHpPulse 0.7s ease-in-out infinite; }
@keyframes lowHpPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); } 50% { box-shadow: 0 0 10px 2px rgba(255,107,107,0.7); } }

/* ultimate meter */
#ult-wrap { position: absolute; top: 56px; right: 14px; width: 130px; pointer-events: none; text-align: right; }
.ult-label { font-size: 0.72rem; color: var(--gold); font-weight: 800; }
.ult-track { height: 10px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; margin-top: 3px; }
#ult-bar { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #9d7bff, #ffd36b); transition: width 0.15s; }

/* move bar (bottom) */
.move-bar {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; pointer-events: auto;
}
.move {
  position: relative; width: 62px; height: 62px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--panel); color: var(--text); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35); transition: transform 0.08s;
}
.move:hover { transform: translateY(-2px); }
.move:active { transform: scale(0.94); }
.move .mv-icon { font-size: 1.5rem; }
.move .mv-k { font-size: 0.58rem; font-weight: 700; color: var(--muted); }
.move.ult { background: linear-gradient(135deg, #5b4a86, #2c2444); opacity: 0.55; }
.move.ult.ready { opacity: 1; background: linear-gradient(135deg, #9d7bff, #ffd36b); color: #1b1026; animation: ultpulse 0.9s infinite; }
@keyframes ultpulse { 0%,100% { box-shadow: 0 0 0 rgba(255,211,107,0.6);} 50% { box-shadow: 0 0 18px rgba(255,211,107,0.8);} }
.move.cooling { filter: grayscale(0.5) brightness(0.7); }
.move .cd {
  position: absolute; inset: 0; background: rgba(10,6,18,0.6);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; color: #fff;
}

/* intro — Morrow Wish warm watercolor storybook */
#intro { position:absolute; inset:0; z-index: 80;
  background: linear-gradient(180deg, #aee0f5 0%, #d9ecf2 30%, #fbf0d8 62%, #f4e3b8 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 14px; text-align:center; padding: 24px; overflow:hidden; }
#intro-stars { position:absolute; inset:0; z-index:0; width:100%; height:100%; pointer-events:none; }
#intro > *:not(#intro-stars) { position:relative; z-index:1; }
#intro p { color: #7a5a3a; max-width: 460px; line-height: 1.65; font-weight:600;
  background: rgba(255,250,238,0.55); border-radius: 14px; padding: 10px 16px; backdrop-filter: blur(2px); }
#intro p b { color: #c6892f; }

/* studio badge */
.studio-badge { display:flex; flex-direction:column; align-items:center; gap:2px; margin-bottom: 2px; animation: badgeIn 1s ease; }
.studio-moon { font-size: 1.5rem; filter: drop-shadow(0 2px 6px rgba(200,140,40,0.4)); animation: moonFloat 4s ease-in-out infinite; }
.studio-text { font-size: 1.15rem; font-weight: 800; letter-spacing: 2px; color: #8a5a2a; }
.studio-wish { color: #d99a3a; }
.studio-tag { font-size: 0.62rem; letter-spacing: 5px; color: #a9823f; opacity: 0.95; }
@keyframes moonFloat { 0%,100%{ transform: translateY(0) rotate(-6deg);} 50%{ transform: translateY(-6px) rotate(6deg);} }
@keyframes badgeIn { from{ opacity:0; transform:translateY(-14px);} to{ opacity:1; transform:none;} }

/* cursive-ish brown logo with gold underline swoosh */
.game-logo { position:relative; font-size: 3.1rem; font-weight: 900; letter-spacing: 1px; line-height:1.05;
  font-family: "Brush Script MT", "Snell Roundhand", "STKaiti", "KaiTi", "PingFang SC", cursive;
  color: #6b4423; text-shadow: 0 2px 0 rgba(255,255,255,0.5), 0 6px 14px rgba(150,100,40,0.25);
  animation: logoIn 1.1s cubic-bezier(.2,.9,.3,1.3); padding-bottom: 8px; }
.game-logo::after { content:''; position:absolute; left:18%; right:18%; bottom:-2px; height:5px; border-radius:999px;
  background: linear-gradient(90deg, transparent, #f0b84a 20%, #ffd36b 50%, #f0b84a 80%, transparent); }
.game-logo .logo-en { display:block; font-family: "PingFang SC", system-ui, sans-serif; font-size: 0.82rem; letter-spacing: 6px; margin-top: 10px;
  color: #a9823f; font-weight: 700; text-shadow:none; }
@keyframes logoIn { from{ opacity:0; transform: scale(0.8) translateY(10px);} to{ opacity:1; transform:none;} }
#intro .btn.gold { box-shadow: 0 6px 18px rgba(214,154,58,0.4); }
#intro .btn.ghost { background: rgba(255,250,238,0.6); color:#8a5a2a; }
#intro.hide { display:none; }

/* tiny studio footer stamp used in-game */
.studio-stamp { position:absolute; bottom: 6px; right: 12px; z-index: 25; font-size: 0.62rem;
  letter-spacing: 2px; color: rgba(255,255,255,0.28); pointer-events:none; }

.hidden { display: none !important; }
.tiny { font-size: 0.75rem; color: var(--muted); }
.center { text-align: center; }

/* ---- Gambit (AI策略) editor ---- */
.gb-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0; }
.gb-tab { background:rgba(255,255,255,0.08); border:none; color:var(--muted); padding:6px 12px; border-radius:8px; font-weight:700; cursor:pointer; font-size:0.82rem; }
.gb-tab.sel { background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#1b1026; }
#gb-list { display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow-y:auto; }
.gb-row { display:flex; align-items:center; gap:6px; background:rgba(255,255,255,0.05); border-radius:10px; padding:6px 8px; }
.gb-num { width:18px; height:18px; flex:none; border-radius:50%; background:var(--accent2); color:#fff; font-size:0.7rem; font-weight:800; display:flex; align-items:center; justify-content:center; }
.gb-if,.gb-then { color:var(--muted); font-size:0.82rem; flex:none; }
.gb-row select { flex:1; background:#2a1f3d; color:var(--text); border:1px solid rgba(255,255,255,0.12); border-radius:7px; padding:5px 6px; font-size:0.82rem; }
.gb-del { flex:none; background:rgba(255,120,120,0.18); color:#ff9b9b; border:none; width:24px; height:24px; border-radius:6px; cursor:pointer; font-weight:800; }
.gb-del:hover { background:rgba(255,120,120,0.35); }

/* ---- Workshop (工坊) + Welcome-back ---- */
.st-list { display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow-y:auto; }
.st-row { display:flex; align-items:center; gap:10px; background:rgba(255,255,255,0.05); border-radius:12px; padding:8px 10px; }
.st-ico { font-size:1.8rem; flex:none; width:34px; text-align:center; }
.st-main { flex:1; min-width:0; }
.st-name { font-weight:700; font-size:0.9rem; }
.st-bar { height:7px; background:rgba(255,255,255,0.12); border-radius:4px; overflow:hidden; margin:3px 0; }
.st-bar > span { display:block; height:100%; background:linear-gradient(90deg,#7ee7c4,#56ccf2); transition:width .3s; }
.st-btns { display:flex; flex-direction:column; gap:4px; flex:none; }
.st-btns .tiny-btn { padding:4px 8px; font-size:0.72rem; }
.chip.busy { opacity:0.45; filter:grayscale(0.6); }
.wb-list { display:flex; flex-direction:column; gap:4px; margin:10px 0; }
.wb-visitor { background:rgba(255,255,255,0.05); border-radius:8px; padding:5px 10px; font-size:0.85rem; text-align:center; }
.wb-visitor.rare { background:rgba(255,211,107,0.18); color:var(--gold); }

/* ---- Evolution row (cat detail) ---- */
.evo-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px;
  background:linear-gradient(135deg, rgba(157,123,255,0.12), rgba(255,211,107,0.08)); border:1px solid rgba(157,123,255,0.25); border-radius:12px; padding:8px 12px; }
.evo-row.ready { border-color:var(--gold); box-shadow:0 0 14px rgba(255,211,107,0.25); }
.evo-info { font-size:0.88rem; }

/* ---- Skill loadout editor ---- */
.sk-list { display:flex; flex-direction:column; gap:10px; max-height:58vh; overflow-y:auto; }
.sk-slot { background:rgba(255,255,255,0.05); border-radius:12px; padding:8px 10px; }
.sk-slot-label { font-weight:800; font-size:0.85rem; margin-bottom:6px; color:var(--gold); }
.sk-opts { display:flex; flex-wrap:wrap; gap:6px; }
.sk-chip { background:rgba(255,255,255,0.08); border:1.5px solid transparent; color:var(--text);
  border-radius:9px; padding:6px 9px; font-size:0.82rem; font-weight:700; cursor:pointer;
  display:flex; align-items:center; gap:4px; transition:all .1s; }
.sk-chip .tiny { font-weight:400; opacity:0.75; }
.sk-chip:hover { background:rgba(255,255,255,0.14); transform:translateY(-1px); }
.sk-chip.on { border-color:var(--gold); background:linear-gradient(135deg,rgba(255,211,107,0.25),rgba(157,123,255,0.15)); }
/* 一键配装 (build-type) row: a subtle divider + the "suggested" tag reads as a hint. */
.sk-slot.build-row { border-bottom:1px dashed rgba(255,255,255,0.12); padding-bottom:8px; margin-bottom:4px; }
.sk-chip.build-chip .tiny { color:var(--gold); opacity:0.95; margin-left:3px; }
/* 升级链 badge: marks a tier2 skill as the upgrade of a base skill. */
.sk-chip .sk-up { color:#9fe0b0; opacity:0.95; margin-left:2px; font-weight:600; }

/* ===== Morrow Wish integration (on top of v36 game CSS) ===== */
/* Back-to-site link floats above the full-viewport game. */
.cb-home { position: fixed; top: 12px; left: 12px; z-index: 2147482000;
  font: 700 12px/1 system-ui, sans-serif; letter-spacing: 0.02em; color: #f3ecff; text-decoration: none;
  white-space: nowrap; background: rgba(30,20,45,0.92); border: 1px solid rgba(255,179,199,0.5);
  border-radius: 999px; padding: 9px 13px; box-shadow: 0 2px 12px rgba(0,0,0,0.35); backdrop-filter: blur(6px); }
.cb-home:hover { background: rgba(50,34,74,0.95); }
.cb-home:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
/* Shared /lang.js + studio-audio.js floating controls, clear of the HUD row. */
.mw-language-float { top: 12px !important; right: 12px !important; bottom: auto !important; z-index: 2147482000 !important; }
.mw-audio-fixed { position: fixed !important; top: 50px !important; right: 12px !important; bottom: auto !important; z-index: 2147482000 !important; }
@media (max-width: 700px) {
  .mw-language-float { top: 10px !important; right: 10px !important; bottom: auto !important; }
  .mw-audio-fixed { top: 48px !important; right: 10px !important; }
  .cb-home { top: 10px; left: 10px; padding: 7px 10px; font-size: 11px; }
}
/* 30-second onboarding card on the intro screen. */
.intro-guide { width: min(520px, 92vw); margin: 2px auto; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 16px; padding: 14px 16px; text-align: left; }
.intro-guide-title { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 2px;
  color: #c6892f; text-align: center; margin-bottom: 10px; }
.intro-steps { display: flex; flex-direction: column; gap: 9px; }
.intro-step { display: flex; align-items: flex-start; gap: 11px; }
.intro-step-ico { font-size: 1.5rem; line-height: 1.1; flex: none; width: 30px; text-align: center; }
.intro-step b { display: block; font-size: 0.9rem; color: #5a3d1e; margin-bottom: 2px; }
.intro-step p { font-size: 0.8rem; color: #7a5a3a; line-height: 1.45; margin: 0; }
@media (max-width: 480px) { .intro-step-ico { font-size: 1.25rem; } .intro-step b { font-size: 0.85rem; } .intro-step p { font-size: 0.75rem; } }
/* Intro cat gallery canvas (owner addition) — neutral framing that suits v36's light intro. */
.intro-cat-gallery { width: min(570px, 94vw); max-width: 100%; height: clamp(92px,18vh,147px);
  position: relative; flex: 0 0 auto; margin: 2px auto; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,236,210,0.25));
  border: 1px solid rgba(214,154,58,0.25); box-shadow: inset 0 -12px 22px rgba(120,80,40,0.08); }
#intro-cats { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 4px 7px rgba(40,24,20,0.2)); }
.intro-cat-glint { position: absolute; top: 9px; right: 26px; color: #ffd36b; filter: drop-shadow(0 0 8px rgba(255,211,107,0.6)); }

/* Touch usability ONLY for Cat Bond; existing game artwork and other games are unchanged. */
#game-root{height:100dvh}
#stage{height:min(92dvh,900px)}   /* match the enlarged desktop stage (was 720px) */
#scene{touch-action:none;-webkit-user-select:none;user-select:none}
#intro-stars{pointer-events:none}
#intro-start,.dex-cell,#tabbar button,#yard-actions button,.move-bar button{touch-action:manipulation}
.cb-mobile-only{display:none}
#start-error[hidden]{display:none!important}
#start-error{color:#ffdfce;font-size:12px;font-weight:700;max-width:310px;text-align:center;padding:9px}
@media (max-width:700px){
 #game-root{height:100dvh;width:100vw}
 #stage{height:100dvh;width:100vw;border-radius:0;box-shadow:none}
 #intro{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;justify-content:flex-start;padding-bottom:max(32px,env(safe-area-inset-bottom,0px))}
 #intro #intro-start{position:relative;z-index:2;flex:0 0 auto;min-height:50px}
 #intro #intro-reset{position:relative;z-index:2;flex:0 0 auto}
 #hud{gap:5px;padding:6px 8px}
 #hud .hud-pill{gap:3px;font-size:11px;padding:5px 7px;white-space:nowrap}
 #hud .hud-pill .ico{font-size:13px}
 #hud .scene-title{display:none}
 #tabbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;justify-content:stretch;padding:6px max(4px,env(safe-area-inset-right,0px)) max(7px,env(safe-area-inset-bottom,0px));width:100%}
 #tabbar .tab{min-width:0;width:100%;font-size:clamp(9px,2.65vw,12px);min-height:47px;padding:5px 2px;line-height:1.1;border-radius:9px}
 #tabbar .tab .ico{font-size:clamp(16px,4.5vw,21px)}
 #yard-actions{right:8px;bottom:64px;gap:7px}
 #yard-actions .fab{width:47px;height:47px;font-size:21px;min-width:44px;min-height:44px}
 #panel{padding:10px}
 #panel>.card{width:min(520px,calc(100vw - 20px));max-height:calc(100dvh - 32px);overflow-y:auto;-webkit-overflow-scrolling:touch}
 #panel .dex-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 #panel .dex-cell{min-width:0;min-height:90px;touch-action:manipulation}
 #panel .dex-cell canvas{max-width:100%}
 .cb-desktop-only{display:none}
 .cb-mobile-only{display:inline}
 #battle-ui .battle-hint{font-size:11px;max-width:94%;white-space:normal;line-height:1.3}
 #battle-ui .move-bar{bottom:max(14px,env(safe-area-inset-bottom,0px));gap:5px;width:min(94%,400px);justify-content:flex-end}
 #battle-ui .move{width:clamp(43px,12vw,60px);height:clamp(45px,12vw,60px);min-width:43px}
}


/* Keep the six phone tabs usable when a non-mandatory panel is open. */
@media(max-width:700px){
 #tabbar{z-index:51}
 #panel.open:not([data-mandatory="true"]){bottom:max(59px,env(safe-area-inset-bottom,0px));z-index:40}
 #panel.open[data-mandatory="true"]{inset:0;z-index:70}
 #stage:has(#panel.open[data-mandatory="true"]) #tabbar{pointer-events:none;opacity:.45}
}

/* ===== Cat Bond: cozy garden visual system (isolated to this game) ===== */
/* The previous violet UI fought the illustrated garden and made menus feel
   like a separate game. Keep the existing mechanics and all cat artwork. */
:root{
  --bg:#eef2e9;
  --panel:rgba(255,251,242,.95);
  --panel-solid:#fffaf0;
  --accent:#b8d9c4;
  --accent2:#e7bdb0;
  --gold:#d4a453;
  --text:#3c463d;
  --muted:#716f67;
  --good:#4b9b73;
  --warn:#ca7370;
  --radius:20px;
}
html,body{background:#eaf1e8;color:var(--text)}
#stage{background:#e3ead9;box-shadow:0 16px 50px rgba(67,77,52,.19),inset 0 0 0 1px rgba(89,102,75,.1)}
/* Light, legible in-game information that doesn't cover the cats. */
#hud{top:43px;gap:7px;justify-content:center}
.hud-pill,.scene-title{
  color:#4e5b4c;background:rgba(255,252,243,.92);
  border:1px solid rgba(116,142,107,.19);
  box-shadow:0 3px 12px rgba(69,91,69,.1);
  backdrop-filter:blur(8px);
}
.hud-pill{font-weight:800}
#tabbar{gap:6px;padding-bottom:max(10px,env(safe-area-inset-bottom,0px));}
.tab{
  color:#5d7160;background:rgba(255,252,244,.94);
  border:1px solid rgba(104,137,112,.16);
  box-shadow:0 4px 14px rgba(71,93,70,.13);
  backdrop-filter:blur(9px);
}
.tab.active{background:linear-gradient(135deg,#d0e7d5,#f3ddd0);color:#3f604b;border-color:#aac9b5}
.tab:focus-visible,.fab:focus-visible,.btn:focus-visible,.move:focus-visible,.dex-cell:focus-visible{outline:3px solid #578b6b;outline-offset:2px}
.fab{
  background:linear-gradient(145deg,#fffaf0,#e4efe1);
  border:1.5px solid #d3dfcb;
  color:#45664d;
  box-shadow:0 5px 14px rgba(55,83,59,.19);
}
.fab:nth-child(2){background:#e5f1df}
.fab:nth-child(3){background:#fff1e0}
.fab:nth-child(4){background:#f6e1d9}
.fab:active,.tab:active{transform:scale(.95)}
.panel{background:rgba(50,67,53,.32);backdrop-filter:blur(5px)}
.card{
  background:linear-gradient(160deg,#fffdf7,#f8f3e8);
  border:1px solid #e1dccb;
  box-shadow:0 20px 55px rgba(46,59,44,.23);
  color:var(--text);
}
.card h2{color:#475c48}
.card .sub{color:#767268}
.card-close{color:#647d69;min-height:34px;min-width:34px;text-align:center}
.bar,.team-slot .slot-hp,.ult-track,.st-bar{background:rgba(111,139,105,.17)}
.btn{background:linear-gradient(135deg,#d1e6d2,#e9d0bc);color:#37503f;border:1px solid rgba(90,127,93,.13)}
.btn.gold{background:linear-gradient(135deg,#f6dca4,#e9bc79);color:#5a472f}
.btn.ghost{background:#edf2e8;color:#4d6352;border:1px solid #d5dfd1}
.dex-cell,.roster .chip,.gb-row,.st-row,.wb-visitor,.sk-slot{
  background:rgba(232,239,224,.66);border:1px solid rgba(113,144,112,.14);
}
.dex-cell:hover{background:#eaf3e8;border-color:#98bba0}
.dex-cell.locked{opacity:.64}
.roster .chip.sel{border-color:#7faf88;background:#e0eddd}
.rarity-N{color:#6e786e}
.gb-tab,.sk-chip{background:#e8eee4;color:#536752}
.gb-tab.sel,.sk-chip.on{background:#d9e9d6;color:#3f5b49;border-color:#8fb69b}
.gb-row select{background:#fffdf6;color:#3b5144;border:1px solid #d7e1d3}
.gb-del{background:#f5ded7;color:#ae5d56}
.toast{color:#3c563f;border:1px solid #d5e2d2;box-shadow:0 4px 15px rgba(53,74,54,.16);max-width:90vw;white-space:normal;text-align:center}
.battle-topbar,.team-slot{background:rgba(255,251,242,.94);color:#405441;border:1px solid #d5e1d3;box-shadow:0 5px 14px rgba(52,69,52,.14)}
.battle-hint{background:rgba(255,252,243,.94);color:#506250;border:1px solid #d4ddcc}
.ult-label{color:#755f33}
.move{background:rgba(255,251,244,.96);border:1px solid #d2dfd0;color:#4d624f;box-shadow:0 3px 12px rgba(54,75,51,.2)}
.move .mv-k{color:#6c7569}
.move.ult{background:#ecdebd;color:#5d4b38;opacity:.76}
.move.ult.ready{background:linear-gradient(135deg,#f6dba9,#eebf79);color:#59452c}
.move .cd{background:rgba(58,77,61,.64)}
.studio-stamp{color:rgba(64,77,57,.48);text-shadow:0 1px #fff}
/* The opening screen now shares the yard's sage, cream, peach palette. */
#intro{
  background:radial-gradient(ellipse at 50% 10%,rgba(255,255,245,.94) 0,transparent 62%),
    linear-gradient(180deg,#dbeedb 0%,#e7f1e8 42%,#f6efdd 100%);
  color:#445849;
}
#intro p{color:#596b58;background:rgba(255,252,244,.72);box-shadow:0 2px 10px rgba(74,94,70,.06)}
#intro p b{color:#668c69}
#intro .intro-step p{padding:0;margin:0;background:transparent;box-shadow:none;backdrop-filter:none}
.studio-text{color:#55705a}.studio-wish{color:#be9271}
.studio-tag{color:#6a8268;letter-spacing:2px}
.game-logo{
  color:#4e6952;text-shadow:0 2px 0 #fff,0 5px 10px rgba(71,104,77,.12);
  font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-weight:900;letter-spacing:3px;
}
.game-logo::after{background:linear-gradient(90deg,transparent,#9fbfa0 20%,#d0e6c9 70%,transparent)}
.game-logo .logo-en{color:#82917a;font-size:.78rem;letter-spacing:5px}
.intro-cat-gallery{
  background:linear-gradient(180deg,rgba(255,253,242,.6),rgba(215,231,204,.6));
  border:1px solid rgba(132,169,128,.28);
  box-shadow:0 9px 22px rgba(87,111,80,.09),inset 0 -8px 20px rgba(150,175,121,.12);
}
.intro-cat-glint{color:#8cad91;filter:none}
.intro-guide{background:rgba(255,253,246,.76);border:1px solid #d8e6d3;box-shadow:0 4px 15px rgba(82,108,80,.07)}
.intro-guide-title{color:#66876a}
.intro-step b{color:#4a6550}
#intro #intro-start{background:linear-gradient(135deg,#a7ceb1,#d7e8c9);border:1px solid #a4c5a4;color:#345640;box-shadow:0 5px 16px rgba(84,125,86,.18)}
#intro #intro-reset{background:transparent;border-color:transparent;color:#6c7c6c;box-shadow:none}
.cb-home{background:rgba(255,251,241,.92);color:#466049;border:1px solid #c8d9c7;box-shadow:0 3px 10px rgba(69,92,67,.13)}
.cb-home:hover{background:#fffef6}
@media(max-width:700px){
 #stage{background:#e4ede0}
 #hud{top:calc(env(safe-area-inset-top,0px) + 45px);padding:4px 7px;justify-content:flex-start;gap:4px}
 #hud .hud-pill{padding:5px 6px;font-size:11px}
 #tabbar{padding:5px max(5px,env(safe-area-inset-right,0px)) max(7px,env(safe-area-inset-bottom,0px));background:linear-gradient(0deg,rgba(241,247,236,.68),transparent)}
 #tabbar .tab{background:#fffaf0;color:#607461;min-height:46px;box-shadow:0 2px 8px rgba(56,86,57,.1)}
 #tabbar .tab.active{background:#dcebd7;color:#3e614a}
 #yard-actions{bottom:calc(62px + env(safe-area-inset-bottom,0px));gap:7px}
 #intro{gap:9px;padding:calc(env(safe-area-inset-top,0px) + 15px) 15px calc(env(safe-area-inset-bottom,0px) + 20px)}
 .studio-badge{margin:0}
 .studio-moon{font-size:1.1rem}
 .studio-text{font-size:.85rem}
 .studio-tag{font-size:.55rem}
 .game-logo{font-size:clamp(1.85rem,8.6vw,2.65rem);letter-spacing:1px;padding:0}
 .game-logo .logo-en{font-size:.65rem;margin-top:4px}
 .intro-cat-gallery{height:clamp(96px,18vh,132px);border-radius:22px;flex:0 0 auto}
 #intro>p{font-size:.85rem;line-height:1.48;padding:7px 11px}
 #intro .intro-guide{order:10;padding:10px 12px;margin:0;width:100%;flex:0 0 auto}
 #intro #intro-start{order:9;width:min(100%,320px);min-height:48px;flex:0 0 auto}
 #intro #intro-reset{order:11;font-size:.75rem;flex:0 0 auto}
 .intro-steps{gap:6px}.intro-step{gap:7px}.intro-step-ico{width:23px}
 #intro .intro-step p{font-size:.75rem;line-height:1.35}
 .battle-topbar{top:calc(env(safe-area-inset-top,0px) + 9px);max-width:96%;gap:5px;padding:4px 7px 4px 9px;font-size:12px;white-space:nowrap}
 #battle-ui .battle-hint{top:calc(env(safe-area-inset-top,0px) + 52px)}
 #battle-ui .move-bar{bottom:max(15px,env(safe-area-inset-bottom,0px))}
 #panel>.card{border-radius:20px}
}
@media(max-width:380px){
 #hud .hud-pill{font-size:10px;padding:4px 5px}
 #intro>p{font-size:.78rem}
 .battle-topbar{gap:3px}
}


/* Cat Bond illustrated battle layout polish v41 */
#battle-ui .battle-topbar{
  background:rgba(255,250,240,.96);
  color:#415d47;
  border:1px solid rgba(125,157,125,.3);
  box-shadow:0 8px 28px rgba(74,91,73,.16);
  padding:8px 12px;
  min-height:46px;
  backdrop-filter:blur(12px);
}
#battle-ui #wild-name{font-size:clamp(12px,1.7vw,17px);color:#435f4b;font-weight:900}
#battle-ui #btn-auto{background:#e6efdc;color:#46704f;border:1px solid #c2d8bc}
#battle-ui #btn-flee{background:#f7e4d6;color:#805f50;border:1px solid #ead0be}
#battle-ui .battle-hint{
  background:rgba(255,251,242,.84);
  border:1px solid rgba(131,153,125,.18);
  box-shadow:0 3px 12px rgba(83,91,73,.09);
  color:#576a54;
  backdrop-filter:blur(8px);
  text-align:center;
  max-width:85%;
  padding:5px 12px;
}
#battle-ui .team-slot{
  background:rgba(255,251,242,.91);
  border:1px solid #cddbc7;
  box-shadow:0 5px 15px rgba(66,88,65,.15);
  border-radius:15px;
}
#battle-ui .team-slot.active{border:2px solid #86ba9d;box-shadow:0 0 0 3px rgba(132,188,154,.19)}
#battle-ui .team-slot .slot-key{color:#568368}
#battle-ui .team-slot .slot-hp{background:rgba(100,143,110,.17)}
#battle-ui #ult-wrap{
  background:rgba(255,251,240,.92);
  border:1px solid #d7dfc8;
  border-radius:13px;
  padding:7px 9px;
  box-shadow:0 4px 13px rgba(68,83,62,.1);
}
#battle-ui #ult-bar{background:linear-gradient(90deg,#9bcba7,#e4b86d)}
#battle-ui .move{
  background:rgba(255,251,243,.97);
  border:1.5px solid #d6dfcd;
  border-radius:17px;
  box-shadow:0 5px 16px rgba(74,86,69,.16);
  transition:transform .12s,box-shadow .16s,background .16s;
  color:#405744;
}
#battle-ui .move:hover{box-shadow:0 8px 20px rgba(67,94,72,.22)}
#battle-ui .move:active{transform:scale(.91)}
#battle-ui .move .mv-k{font-size:clamp(9px,1vw,11px);font-weight:800;color:#6c7466}
#battle-ui .move .mv-icon{font-size:clamp(19px,2vw,25px)}
#battle-ui .move.ult{background:linear-gradient(160deg,#f6e3b7,#edd2a3);border-color:#e0c9a0}
#battle-ui .move.ult.ready{background:linear-gradient(145deg,#f5d58d,#ebbb75);border-color:#dba75c}
#battle-ui .move.cooling{filter:saturate(.55);opacity:.75}
@media(max-width:700px){
 #battle-ui .battle-topbar{
  width:auto;max-width:calc(100% - 20px);
  top:calc(env(safe-area-inset-top,0px) + 7px);
  padding:6px 8px;gap:5px;min-height:41px;
 }
 #battle-ui #wild-name{font-size:12px}
 #battle-ui .battle-topbar .tiny-btn{font-size:11px;padding:5px 7px;min-height:32px}
 #battle-ui .battle-hint{top:calc(env(safe-area-inset-top,0px) + 49px);font-size:10px;max-width:92%}
 #battle-ui #team-slots{left:6px;top:calc(env(safe-area-inset-top,0px) + 100px);gap:4px}
 #battle-ui .team-slot{width:48px;padding:3px}
 #battle-ui .team-slot canvas{width:40px;height:34px}
 #battle-ui #ult-wrap{right:5px;top:calc(env(safe-area-inset-top,0px) + 101px);width:108px}
 #battle-ui .move-bar{width:min(92%,400px);gap:6px;right:7px;left:auto;transform:none;justify-content:flex-end}
 #battle-ui .move{width:clamp(44px,12vw,57px);height:clamp(50px,13vw,60px);flex:0 0 auto}
}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui .battle-hint{display:none}
 #battle-ui .team-slot{width:42px}
 #battle-ui .team-slot canvas{width:34px;height:30px}
 #battle-ui .move-bar{bottom:6px}
 #battle-ui .move{width:47px;height:47px}
}

/* Keep landscape meadow controls clear of links and side safe-area notches. */
@media (orientation:landscape) and (max-height:520px) {
  body.cb-exploring .cb-home,
  body.cb-exploring .mw-language-float,
  body.cb-exploring .mw-audio-fixed { display:none!important; }
  #game-root,#stage { width:100vw;height:100dvh; }
}


/* Cat Bond: shared music / effects dock inside the playable stage. */
#stage>.mw-audio-dock{
  position:absolute!important;
  top:calc(env(safe-area-inset-top,0px) + 52px)!important;
  right:max(9px,env(safe-area-inset-right,0px))!important;
  left:auto!important;
  bottom:auto!important;
  display:flex!important;
  width:auto!important;
  max-width:calc(100% - 24px)!important;
  z-index:130!important;
  align-items:center!important;
  gap:6px!important;
  margin:0!important;
}
#stage>.mw-audio-dock button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  min-height:36px!important;
  white-space:nowrap!important;
  font-size:11px!important;
  line-height:1.2!important;
  padding:7px 10px!important;
  background:rgba(255,250,240,.96)!important;
  color:#506852!important;
  border:1px solid #c5d6bf!important;
  box-shadow:0 3px 12px rgba(58,80,60,.13)!important;
  pointer-events:auto;
}
#stage>.mw-audio-dock button[aria-pressed="false"]{
  opacity:.72!important;background:rgba(240,239,229,.94)!important;
}
#stage>.mw-audio-dock button:focus-visible{
  outline:3px solid #6d9e83!important;outline-offset:2px!important;
}
@media(max-width:700px){
 #stage>.mw-audio-dock{
   top:calc(env(safe-area-inset-top,0px) + 83px)!important;
   right:max(8px,env(safe-area-inset-right,0px))!important;
   gap:4px!important;
 }
 #stage>.mw-audio-dock button{
   font-size:10px!important;min-height:35px!important;padding:6px 8px!important;
 }
}
@media(orientation:landscape) and (max-height:530px){
 #stage>.mw-audio-dock{
   top:calc(env(safe-area-inset-top,0px) + 45px)!important;
 }
 #stage>.mw-audio-dock button{font-size:10px!important;min-height:32px!important;padding:5px 7px!important}
}

/* Frictionless new-player capture hint; game world remains unchanged. */
#intro .intro-guide{padding:11px 15px;width:auto;max-width:92vw;margin:1px auto;background:rgba(255,251,239,.82);color:#61452f;font-size:.96rem;font-weight:850;text-align:center}
#first-quest{position:absolute;z-index:25;top:calc(96px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);width:max-content;max-width:min(92%,450px);padding:9px 14px;border:2px solid #f1d5a3;border-radius:999px;background:rgba(255,251,235,.95);box-shadow:0 5px 18px #4a332c30;color:#654632;font:800 13px/1.35 system-ui,sans-serif;text-align:center;pointer-events:none}
#first-quest[hidden]{display:none!important}
@media(max-width:600px){#first-quest{top:calc(96px + env(safe-area-inset-top,0px));max-width:calc(100% - 24px);font-size:12px;line-height:1.25;padding:7px 10px;border-radius:14px;overflow-wrap:anywhere}#intro{gap:9px;padding:14px}#intro .intro-guide{font-size:.8rem}}

/* CrazyGames-specific iframe: only the playable game, not a portal to our site.
   Fullscreen belongs to the host. The ordinary Morrow Wish page is unchanged. */
html.cb-cg,html.cb-cg body{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;overscroll-behavior:none}
html.cb-cg #game-root{width:100%;height:100%;height:100dvh}
html.cb-cg #stage{width:100%;height:100%;border-radius:0;box-shadow:none}
html.cb-cg .cb-home,html.cb-cg #mw-fullscreen-toggle{display:none!important}
html.cb-cg .panel{padding:clamp(6px,2vh,14px)}
html.cb-cg .card{max-height:94%;max-width:min(540px,98%);padding:clamp(10px,2vh,22px);overscroll-behavior:contain}
/* CrazyGames shares the same player-facing Start Adventure intro.
   The button begins play on demand; compact landscape iframes can scroll. */
html.cb-cg #intro{overflow-y:auto;overscroll-behavior:contain}
/* CrazyGames touch view: long-press/double-tap should not select game text. */
html.cb-cg body,html.cb-cg #game-root{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.cb-cg .mw-language-float{z-index:22!important;top:6px!important;right:6px!important}
html.cb-cg .mw-audio-fixed{z-index:22!important;top:46px!important;right:6px!important}
@media(max-height:500px){
  html.cb-cg .battle-hint{top:45px;font-size:11px;max-width:70vw;overflow:hidden;text-overflow:ellipsis}
  html.cb-cg .battle-topbar{top:4px;padding:4px 10px;max-width:95vw}
  html.cb-cg #team-slots{top:45px}
  html.cb-cg #first-quest{top:calc(92px + env(safe-area-inset-top,0px));font-size:11px;padding:6px 10px}
}

/* Battle rank turns skillful captures into visible progression. */
#panel .cat-highlight-card .battle-grade{display:flex;align-items:center;gap:12px;
  border-radius:17px;padding:10px 15px;margin:10px auto;max-width:390px;
  background:#e5eee3;border:1px solid #cbddca;color:#385d49;box-shadow:inset 0 1px 0 #fff8}
#panel .cat-highlight-card .battle-grade>b{font:900 38px/.95 system-ui,sans-serif;
  min-width:47px;text-align:center;color:#548568}
#panel .cat-highlight-card .battle-grade strong{display:block;font-size:14px}
#panel .cat-highlight-card .battle-grade small{display:block;font-size:12px;line-height:1.5;color:#607a69}
#panel .cat-highlight-card .battle-grade.grade-S{background:linear-gradient(120deg,#fff0c3,#f5dbbd);border-color:#dabc72}
#panel .cat-highlight-card .battle-grade.grade-S>b{color:#ac752c}
#panel .cat-highlight-card .battle-grade.grade-A>b{color:#477f61}
#panel .cat-highlight-card .sighting-badge{display:block;width:max-content;max-width:85%;
  margin:0 auto 8px;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:900;
  color:#566c5b;background:#eaf2e7;border:1px solid #d1dfca}
#panel .cat-highlight-card .sighting-badge.rarity-R{color:#317498;background:#e5f3fc}
#panel .cat-highlight-card .sighting-badge.rarity-SR{color:#8856ab;background:#efe7fa}
#panel .cat-highlight-card .sighting-badge.rarity-SSR{color:#906023;background:#fff0c1}

/* A visible, reachable collection objective after the first wild cat. */
#collection-goal{position:absolute;z-index:24;top:65px;left:50%;transform:translateX(-50%);
  max-width:min(92%,470px);width:max-content;padding:8px 14px;
  border:1px solid #dfc4a1;border-radius:999px;background:rgba(255,248,234,.93);
  box-shadow:0 5px 16px #3a2a2622;color:#654632;font:800 12px/1.4 system-ui,sans-serif;
  text-align:center;pointer-events:none}
#collection-goal[hidden]{display:none!important}
.collection-reward{margin:8px auto;color:#ffe79b;font-weight:800;line-height:1.6}
@media(max-width:600px),(max-height:500px){
  #collection-goal{top:62px;font-size:11px;padding:6px 10px}
}

/* Battle control language: always display the active mode, not the next action. */
#battle-ui #btn-auto{font-size:12px;font-weight:900;min-height:36px;border:2px solid #9dbca0;
  background:#f2f4ed;color:#496551;padding:7px 11px;white-space:nowrap;transition:background .15s}
#battle-ui #btn-auto.is-auto{background:linear-gradient(135deg,#c9efd6,#a8dabb);
  border-color:#49956c;color:#215e43;box-shadow:0 0 0 3px #76cba64d,0 5px 14px #43836542}
#battle-ui #btn-auto:focus-visible{outline:3px solid #266a4d;outline-offset:3px}
#battle-ui .battle-hint.auto-active{border-color:#8ac2a4;background:#ecf7ed;color:#275d42}
#battle-ui .move .mv-name{font:900 12px/1 system-ui,sans-serif;color:#395b46}
#battle-ui #mv-dodge{background:#e8f1fb;border-color:#9fc5e5}
#battle-ui #mv-dodge .mv-icon{font-size:20px;line-height:1}
#battle-ui #mv-dodge .mv-k{font-size:10px;color:#52758e}
#battle-ui #mv-dodge.cooling{opacity:.65}
@media(max-width:480px){#battle-ui #btn-auto{font-size:10px;padding:7px 8px}}

/* Portrait dimensions are CSS pixels; real-kittens.js now draws a DPR backing. */
#cp-wild{width:160px!important;height:120px!important;max-width:100%;object-fit:contain}
#cr{width:180px!important;height:140px!important;max-width:100%;object-fit:contain}
.roster .chip canvas{width:40px!important;height:34px!important;flex:none}
#team-slots canvas{width:46px!important;height:40px!important}

/* A single visible path into collect / bond / explore progression. */
#collection-goal{pointer-events:auto;cursor:pointer;transition:box-shadow .15s}
#collection-goal:hover{box-shadow:0 7px 19px #3a2a2650}
#collection-goal:focus-visible{outline:3px solid #5a8d70;outline-offset:3px}
.journey-paths{display:grid;gap:10px;margin:15px 0 2px}
.journey-path{display:flex;align-items:center;gap:10px;padding:10px;border-radius:14px;
 background:rgba(255,255,255,.075);border:1px solid rgba(245,224,203,.18)}
.journey-icon{font-size:24px;flex:0 0 32px;text-align:center}
.journey-copy{flex:1;min-width:0}
.journey-copy b{font-size:14px;color:#f5e6d4}
.journey-copy p{font-size:12px;line-height:1.45;color:#cdc3d5;margin:3px 0 7px}
.journey-progress{width:100%;height:6px;border-radius:8px;background:#ffffff26;overflow:hidden}
.journey-progress>span{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#9accac,#ebcf8b)}
.journey-path .btn{font-size:12px;padding:9px 12px;flex:0 0 auto;min-width:55px}
@media(max-width:480px){.journey-path{padding:8px;gap:7px}.journey-copy b{font-size:12px}
 .journey-copy p{font-size:11px}.journey-path .btn{padding:8px 9px;min-width:48px}}

/* Battle HUD must remain readable in narrow, rotated CrazyGames frames. */
@media(max-width:520px){
  #battle-ui .battle-topbar{left:6px;right:6px;transform:none;width:auto;max-width:none;
    display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px;padding:5px 6px}
  #battle-ui #wild-name{min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
  #battle-ui #btn-auto{font-size:10px;padding:6px 6px;max-width:155px;min-width:0}
  #battle-ui #btn-flee{font-size:10px;padding:6px 5px}
  #battle-ui .battle-hint{top:57px;max-width:calc(100% - 16px);font-size:10px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #battle-ui .move .mv-name{font-size:11px}
}
@media(min-height:550px){
  #cp-wild{width:188px!important;height:144px!important;
    border:1px solid #b8d1c3;border-radius:18px!important;
    background:linear-gradient(145deg,#eff9f0,#e1edf7)!important;
    box-shadow:inset 0 0 0 2px #ffffffa0}
  #cr{width:200px!important;height:156px!important}
}

/* New-player screens share the bright, illustrated garden palette instead of
   suddenly switching to dark purple panels. Other management screens remain as-is. */
#panel>.card.cat-highlight-card{
 background:linear-gradient(152deg,#fffaf0 0%,#f3f7ed 63%,#f0e5dd 100%);
 color:#385347;border:1.5px solid #ddceb0;
 box-shadow:0 22px 62px rgba(19,48,32,.27);
}
#panel .cat-highlight-card h2,#panel .cat-highlight-card h3{color:#395d4a}
#panel .cat-highlight-card .sub,#panel .cat-highlight-card .tiny{color:#647b69}
#panel .cat-highlight-card .card-close{color:#5b7567}
#panel .cat-highlight-card .btn{background:#dceada;color:#365645;border:1px solid #bbd4c0}
#panel .cat-highlight-card .btn.gold{background:linear-gradient(135deg,#f5dc93,#f1bc77);
 color:#493523;border:1px solid #d6ac70;font-weight:900}
#panel .cat-highlight-card .btn.ghost{background:rgba(255,255,255,.7);border:1px solid #ccdacd;color:#506d5c}
#panel .cat-highlight-card .dex-cell{font-family:inherit;color:#3d5948;
 background:rgba(255,255,255,.74);border:1.5px solid #d8d9c4;box-shadow:0 4px 12px #4a69420d;
 border-radius:15px;min-width:0}
#panel .cat-highlight-card .dex-cell:hover,#panel .cat-highlight-card .dex-cell:focus-visible{
 border-color:#75ad8d;box-shadow:0 5px 15px #47956c25;outline:none}
#panel .cat-highlight-card .dex-cell .name{color:#315340}
#panel .cat-highlight-card .rarity-N{color:#647366}
#panel .cat-highlight-card .rarity-R{color:#366d9a}
#panel .cat-highlight-card .rarity-SR{color:#744ba7}
#panel .cat-highlight-card .rarity-SSR{color:#996d2f}
#panel .cat-highlight-card .roster .chip{background:#ffffffbb;color:#425f4b;border:1px solid #d0ddcb}
#panel .cat-highlight-card .roster .chip.sel{background:#d9edda;border-color:#65a883}
#panel .cat-highlight-card .journey-path{background:#ffffffb9;border:1px solid #d8e3d5}
#panel .cat-highlight-card .journey-copy b{color:#385847}
#panel .cat-highlight-card .journey-copy p{color:#607766}
#panel .cat-highlight-card .journey-progress{background:#dbe7db}
#panel .cat-highlight-card .collection-reward{color:#82622e}
#panel .cat-starter-card .dex-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#panel .cat-starter-card .dex-cell{padding:9px 6px}
@media(max-width:360px){#panel .cat-starter-card .dex-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Golden Paw: first S per breed is a collectible, not another disposable coin.
   Medal frames are permanently visible in the codex and owned-cat roster. */
#panel .dex-cell.golden-paw{position:relative;
  border:2px solid #c99b48!important;
  background:linear-gradient(150deg,#fff7df,#f8e8c7 80%,#fdf5e6);
  box-shadow:0 3px 0 #b78b3b2e,0 4px 16px #b78b3b27}
#panel .dex-cell.golden-paw .name{color:#77511c;font-weight:900}
#panel .golden-paw-stamp,#panel .battle-best-stamp{position:absolute;right:5px;top:5px;
  display:block;padding:2px 7px;border-radius:999px;
  background:linear-gradient(140deg,#ffdf83,#eeb661);color:#5a3a12;border:1px solid #d0a252;
  box-shadow:0 2px 6px #89672a40;font:900 11px/1.4 system-ui,sans-serif;z-index:2}
#panel .battle-best-stamp{background:#ecf3eb;color:#49695a;border-color:#bed1bf}
#panel .mastery-summary{display:grid;gap:6px;margin:10px 0 14px;padding:12px 14px;
  background:linear-gradient(135deg,#fff5d7,#eaf4e8);border:1px solid #dcc591;
  border-radius:14px;color:#514c36}
#panel .mastery-summary b{font-size:15px;color:#916526}
#panel .mastery-summary span{font-size:12px;line-height:1.5}
#panel .mastery-summary small{font-weight:850;font-size:11px;color:#59836c}
/* 元素反应图鉴 (reaction codex) */
#panel .reaction-codex{margin-top:16px;border:1px solid #d9c6a6;border-radius:14px;
  background:linear-gradient(135deg,#fbf6ec,#eef2ea);padding:4px 12px;color:#4a4636}
#panel .reaction-codex summary{cursor:pointer;padding:9px 2px;display:flex;align-items:center;
  justify-content:space-between;gap:8px;list-style:none;font-size:14px}
#panel .reaction-codex summary::-webkit-details-marker{display:none}
#panel .reaction-codex .rx-hint{margin:2px 0 10px;opacity:.8;line-height:1.5}
#panel .reaction-list{display:grid;gap:5px;padding-bottom:10px}
#panel .rx-row{display:grid;grid-template-columns:1fr auto auto auto;align-items:center;gap:7px;
  font-size:12px;padding:5px 8px;background:rgba(255,255,255,.55);border-radius:9px}
#panel .rx-row.rx-counter{background:rgba(150,170,195,.16)}
#panel .rx-tag{display:flex;align-items:center;gap:4px;font-weight:700}
#panel .rx-chip{padding:1px 6px;border-radius:7px;border:1px solid;font-size:11px;color:#3a3630}
#panel .rx-plus{opacity:.55}
#panel .rx-arrow{opacity:.5}
#panel .rx-name{font-weight:800;color:#6a4b96;white-space:nowrap}
#panel .rx-mult{font-weight:850;font-variant-numeric:tabular-nums}
#panel .rx-mult.up{color:#c2622c}
#panel .rx-mult.down{color:#5b7fa6}
#panel .mastery-detail{background:#f3e7ca;border:1px solid #cfb879;border-radius:12px;
  color:#8c6428;font-weight:800;font-size:12px;padding:8px 11px;margin:9px 0}
#panel .cat-highlight-card .golden-paw-unlock{margin:11px auto;max-width:450px;
  padding:11px 15px;border:2px solid #ddb35c;border-radius:16px;
  background:linear-gradient(130deg,#fff0b8,#ffe7c3,#f0f7d9);
  color:#74511e;box-shadow:0 7px 17px #b9944933;text-align:center}
#panel .golden-paw-unlock strong{font-weight:950;font-size:15px}
#panel .golden-paw-unlock p{font-size:12px;margin:5px 0 6px;line-height:1.5}
#panel .golden-paw-unlock small{font-size:11px;font-weight:800;color:#7f7752}
#panel .journey-master-row{display:flex;align-items:center;gap:10px;justify-content:space-between;
  padding:11px 12px;background:linear-gradient(110deg,#fff2cb,#e8f3dc);
  border:1px solid #dbcc9d;border-radius:13px;color:#6f512a}
#panel .journey-master-row b{font-size:13px}
#panel .journey-master-row p{font-size:11px;line-height:1.5;margin:4px 0 0}
#panel .journey-master-row .btn{flex:none;font-size:11px;padding:7px 11px}
@media(max-width:480px){#panel .journey-master-row{gap:7px;padding:9px}
 #panel .journey-master-row p{font-size:10px}#panel .mastery-summary{padding:9px 11px}}

/* A calm, uncrowded yard: rotate visitors without removing any saved cats. */
#yard-cat-switch{position:absolute;z-index:21;left:12px;bottom:65px;
 padding:9px 12px;border:1.5px solid #d9c499;border-radius:999px;
 background:rgba(255,250,233,.94);color:#614e33;box-shadow:0 4px 16px #3b4d382b;
 font:800 12px/1.3 system-ui,sans-serif;max-width:min(56%,330px);
 cursor:pointer;touch-action:manipulation;white-space:normal;text-align:left}
#yard-cat-switch[hidden],body.cb-exploring #yard-cat-switch{display:none!important}
#yard-cat-switch:hover{background:#fff6dc;border-color:#c7a671}
#yard-cat-switch:focus-visible{outline:3px solid #5eab80;outline-offset:2px}
@media(max-width:700px){#yard-cat-switch{bottom:max(65px,env(safe-area-inset-bottom) + 57px);
 left:7px;font-size:11px;padding:7px 9px;max-width:54%}}
@media(max-height:440px){#yard-cat-switch{bottom:55px;left:7px;font-size:10px;padding:6px 8px}}

/* Collapsed breed roster: short, readable list regardless of collection size. */
#panel .breed-group{position:relative;cursor:pointer}
#panel .breed-group-count{display:block;position:absolute;left:7px;top:6px;
 padding:2px 7px;border-radius:999px;background:#e2ebdf;color:#3e694e;
 border:1px solid #b9d1bc;font:900 11px/1.3 system-ui;z-index:2}
#panel .breed-group:focus-visible{outline:3px solid #64ad82;outline-offset:2px}
#panel .breed-member-list{display:grid;gap:7px;margin:14px 0}
#panel .breed-member{display:flex;align-items:center;gap:10px;width:100%;
 padding:7px 12px;border:1px solid #d4dfcd;border-radius:13px;
 background:#fffaf0;color:#375344;text-align:left;cursor:pointer;
 font-family:inherit;touch-action:manipulation}
#panel .breed-member:hover,#panel .breed-member:focus-visible{
 border-color:#68a981;background:#e9f7ea;outline:none}
#panel .breed-member canvas{flex:0 0 68px;width:68px;height:56px}
#panel .breed-member span:nth-child(2){flex:1;min-width:0}
#panel .breed-member strong{display:block;font-size:14px}
#panel .breed-member small{display:block;font-size:11px;color:#61776b;line-height:1.5}
#panel .reunion-reward{margin:8px auto;max-width:430px;padding:10px 13px;
 border:1px solid #b5d5b9;background:#e9f5e7;color:#3b694c;
 border-radius:12px;font-weight:750;font-size:12px;line-height:1.6}
@media(max-width:450px){#panel .breed-member{gap:7px;padding:5px 8px}
 #panel .breed-member canvas{width:57px;height:47px;flex-basis:57px}}

/* Mastery challenge results use the illustrated cat-card style throughout. */
#panel .mastery-challenge-note{font-size:12px;line-height:1.6;
 color:#516b56;background:#eef5e9;border:1px solid #d4e1d0;
 padding:10px 13px;border-radius:12px;margin:9px auto;max-width:440px}
#panel #mc-cat{width:180px;height:140px;max-width:100%;object-fit:contain}

/* Battle controls: compact help trigger and a paused accessible instruction sheet. */
#battle-ui .battle-help-trigger{min-width:49px;max-width:76px;white-space:nowrap;
 font-size:11px;padding:5px 7px;background:#f4f7e9;color:#4b654c;border:1px solid #bfd5ba}
#battle-ui .battle-help-sheet[hidden]{display:none!important}
#battle-ui .battle-help-sheet{position:absolute;inset:0;z-index:30;
 display:flex;justify-content:center;align-items:center;padding:12px;pointer-events:auto;
 background:rgba(27,39,36,.58);backdrop-filter:blur(5px)}
#battle-ui .battle-help-content{position:relative;width:min(92vw,530px);max-height:min(92%,660px);
 overflow:auto;overscroll-behavior:contain;border-radius:20px;padding:20px 22px 15px;
 border:1px solid #d4c7a9;background:linear-gradient(155deg,#fffaf1,#e9f1e5);
 box-shadow:0 16px 50px #102d2c66;color:#304f43}
#battle-ui .battle-help-content h3{font-size:19px;margin:0 0 10px;padding-right:30px}
#battle-ui .battle-help-close{position:absolute;right:10px;top:8px;border:0;
 background:#ffffffa0;color:#385748;border-radius:50%;width:32px;height:32px;
 font-size:25px;line-height:1;cursor:pointer}
#battle-ui .battle-help-section{border:1px solid #d6e3d0;background:#ffffff8e;
 padding:9px 12px;border-radius:13px;margin:9px 0}
#battle-ui .battle-help-section.preferred{background:#e8f2e2;border-color:#9abca6}
#battle-ui .battle-help-section>b{font-size:13px}
#battle-ui .battle-help-section p{font-size:12px;line-height:1.5;margin:4px 0}
#battle-ui .battle-help-note{font-size:11px;line-height:1.5;color:#567064}
#battle-ui #battle-help-start{display:block;margin:9px auto 0}
@media(max-width:520px){
 #battle-ui .battle-topbar{grid-template-columns:minmax(0,1fr) auto auto auto;gap:3px}
 #battle-ui .battle-help-trigger{font-size:10px;padding:5px 5px;min-width:34px;max-width:51px}
 #battle-ui .battle-help-content{padding:12px 14px;max-height:94%}
 #battle-ui .battle-help-content h3{font-size:16px;margin-bottom:5px}
 #battle-ui .battle-help-section{padding:7px 9px;margin:6px 0}
 #battle-ui .battle-help-section p{font-size:11px;margin:3px 0}
}

/* Explain money and passive production before the player sees a station list. */
#panel .work-earn-header{margin:10px 0 14px;padding:13px;border-radius:15px;background:linear-gradient(120deg,#fff0c8,#ebf5df);border:1px solid #ddc88a;color:#66502f}
#panel .work-earn-header>strong{display:block;font-size:16px;color:#765020}
#panel .work-earn-header>p{font-size:12px;line-height:1.6;margin:6px 0 10px}
#panel .work-earn-stats{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:11px}
#panel .work-earn-stats>span{display:grid;gap:3px;flex:1 1 85px;padding:8px 9px;border-radius:10px;background:#fffaf1d9;border:1px solid #e6dcc1;font-size:10px}
#panel .work-earn-stats b{font-size:14px;color:#526e45}
#panel .work-earn-header>.btn{margin:3px 6px 5px 0;max-width:100%}
#panel .work-section-intro{color:#627765;font-size:11px;line-height:1.5;margin:10px 0}
#panel .workshop-row{border-radius:14px;padding:12px 9px;margin:7px 0;border:1px solid #d9e2d6}
#panel .workshop-row.work-money{background:#fff2d9;border:2px solid #e8c77c}
#panel .work-usage{font-size:11px;line-height:1.4;margin:3px 0;color:#5a735e}
#panel .work-income{font-size:12px;line-height:1.5;color:#4b6852}
#panel .work-income b{font-size:13px;color:#795e2f}
#panel .work-employee{font-size:11px;color:#6b7964;line-height:1.5;margin:4px 0}
#panel .work-pending{font-size:12px;color:#536c56}
#panel .work-pending>b{color:#a96c23;font-weight:900}
#panel .workshop-row .st-btns .btn{white-space:normal}
#panel .workshop-row .st-btns small{display:block;font-size:9px;margin-top:2px}
#panel .work-nursery-title{margin:12px 0 7px;font-size:15px;color:#52674e}
#panel .skill-progression-note,#panel .skill-discovery{font-size:11px;line-height:1.6;padding:7px 10px;border-radius:10px;background:#edf5e8;color:#536950;border:1px solid #cbdec8;margin:9px 0}
#battle-ui #ult-btn .mv-name{font-size:11px;font-weight:900;color:#5b4b7e;display:block;max-width:72px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:520px){#battle-ui #ult-btn .mv-name{font-size:10px;max-width:55px}#panel .workshop-row{padding:8px 6px}#panel .work-earn-header{padding:10px}}

/* Cat Bond introduction: readable adventures, matching the light sage storybook palette.
   The previous near-transparent cream cards and pale type were unreadable. */
#intro .intro-features{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:9px;width:min(440px,100%);max-width:440px;margin:8px auto 9px;text-align:left;flex:0 0 auto}
#intro .intro-features span{display:flex;align-items:center;min-height:46px;padding:10px 13px;border-radius:13px;
 background:rgba(255,253,246,.96);border:1.5px solid #a8c4ad;color:#284d38;
 box-shadow:0 3px 10px rgba(56,91,57,.10);
 font-size:14px;font-weight:850;line-height:1.45;letter-spacing:.01em;text-shadow:none}
#intro .intro-guide{margin:7px auto 9px;font-size:13px;max-width:480px}
#panel .cat-skill-roadmap,#panel .skill-roadmap{padding:9px 11px;margin:9px 0;
 border-radius:11px;background:#f2f8e6;color:#576e44;
 border:1px solid #c9d8ac;font-size:12px;line-height:1.55;font-weight:650}
#panel .skill-reveal-card{display:grid;gap:5px;margin:10px auto;
 max-width:440px;border:2px solid #d4b46b;padding:12px 14px;
 border-radius:16px;text-align:center;
 background:linear-gradient(130deg,#fff2c9,#e4f4e5);color:#6c5839}
#panel .skill-reveal-card b{color:#a36b24;font-size:15px}
#panel .skill-reveal-card span{font-size:13px;font-weight:800}
#panel .skill-reveal-card small{font-size:11px;line-height:1.5}
@media(max-width:700px){
 #intro{padding-top:max(54px,calc(env(safe-area-inset-top,0px) + 44px));overflow-y:auto;justify-content:flex-start;overscroll-behavior:contain}
 #intro .intro-features{width:100%;max-width:440px;gap:7px;margin:6px auto 7px}
 #intro .intro-features span{font-size:13px;min-height:45px;padding:9px 10px}
 #intro .intro-guide{order:8;margin:4px auto 6px;font-size:12px;line-height:1.5}
 #intro #intro-start{order:9}
 #intro #intro-reset{order:11}
}
@media(max-width:390px){#intro .intro-features{gap:6px;margin:5px auto}
 #intro .intro-features span{font-size:12.5px;min-height:44px;padding:8px 9px}}
@media(max-height:620px){#intro{overflow-y:auto;justify-content:flex-start;gap:7px}
 #intro .intro-cat-gallery{height:clamp(74px,15vh,108px);flex:0 0 auto}
 #intro .intro-features{margin-top:4px;margin-bottom:5px}}
/* This is a real button, not a noninteractive hint: it opens the adventure routes. */
#collection-goal{pointer-events:auto;cursor:pointer;touch-action:manipulation;white-space:normal;
 border-width:2px;background:#fff9ea;color:#425f47;min-height:36px;
 box-shadow:0 5px 16px #3a2a2622,0 0 0 2px #ffffffbb;transition:transform .15s,background .15s}
#collection-goal:hover{background:#e7f2e4;transform:translateX(-50%) translateY(-2px)}
#collection-goal:active{transform:translateX(-50%) scale(.98)}
#collection-goal:focus-visible{outline:3px solid #357e58;outline-offset:3px}
#intro #intro-reset{font-size:11px;min-height:36px;padding:7px 12px;opacity:.86}
#intro #intro-reset.cb-reset-armed{opacity:1;background:#fff2df;border:1.5px solid #b45e44;color:#853c2c;font-weight:800}
#panel .first-adventure-tip{border:1px solid #bfd7b8;background:#f0f7e9;color:#426349;
 border-radius:12px;padding:9px 12px;font-weight:750;font-size:13px;line-height:1.55;margin:8px auto;max-width:410px}

/* Cat Bond's signature friendship mechanic and optional story discoveries. */
#yard-surprise{position:absolute;z-index:26;left:50%;bottom:calc(96px + env(safe-area-inset-bottom,0px));
 transform:translateX(-50%);max-width:88%;min-height:42px;white-space:normal;cursor:pointer;
 border:2px solid #c99861;border-radius:999px;background:#fff7da;color:#5f4c2c;
 box-shadow:0 5px 20px #46392735;padding:9px 15px;font:850 13px/1.35 system-ui,sans-serif;pointer-events:auto}
#yard-surprise[hidden],#duo-burst[hidden]{display:none!important}
#duo-burst{position:absolute;z-index:22;right:14px;bottom:101px;max-width:min(45vw,240px);min-height:42px;
 padding:8px 13px;border:2px solid #d3b1db;border-radius:15px;background:linear-gradient(135deg,#fff4df,#edddf1);
 color:#694a76;box-shadow:0 4px 16px #28203950;font:850 12px/1.4 system-ui,sans-serif;
 pointer-events:auto;touch-action:manipulation;cursor:pointer;white-space:normal}
#duo-burst:disabled{opacity:.75}#duo-burst.ready{border-color:#a764a3;
 background:linear-gradient(135deg,#ffd0aa,#e8b4e9);color:#56305c;animation:duoPulse 1.1s ease-in-out infinite}
@keyframes duoPulse{50%{box-shadow:0 0 22px #edb9e799;transform:translateY(-2px)}}
#duo-burst:focus-visible,#yard-surprise:focus-visible{outline:3px solid #287a51;outline-offset:3px}
.duo-adventure,.duo-unlock,.work-first-pay{margin:10px auto;padding:12px;border-radius:14px;border:2px solid #dcb68e;
 background:linear-gradient(115deg,#fff1d8,#f4edff);color:#65523a;line-height:1.5}
.duo-adventure{display:flex;justify-content:space-between;align-items:center;gap:9px}
.duo-unlock p{font-size:13px;line-height:1.55;margin:6px 0;color:#65523a}
.work-first-pay p{font-size:13px;line-height:1.5;margin:6px 0}
.yard-surprise-story{max-width:450px;margin:auto;text-align:center;display:grid;gap:10px;color:#4b604d}
.yard-surprise-story p{font-size:15px;line-height:1.6}
.yard-surprise-icon{font-size:65px;line-height:1.3;filter:drop-shadow(0 5px 9px #5d524044)}
.secret-reward{padding:10px;border:1px solid #d2c79b;background:#fff9e6;border-radius:11px;font-weight:850}
.duo-panel{display:grid;gap:10px;max-width:490px;margin:auto;color:#4b604d}
.duo-picker{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.duo-picker label{font-size:13px;font-weight:800;min-width:0}
.duo-picker select{display:block;width:100%;margin-top:6px;min-width:0;padding:10px 8px;
 border:1.5px solid #bbcfb5;border-radius:9px;background:#fffaf0;color:#3e5b45;font-size:14px}
.duo-relation{display:grid;gap:7px;text-align:center;padding:12px;border-radius:14px;
 background:#fdf3e5;border:1px solid #e5d6b9;color:#634f3d}
.duo-relation strong{font-size:19px;color:#875e8c}
.duo-meter{height:13px;background:#eadcdb;border-radius:99px;overflow:hidden}
.duo-meter span{display:block;height:100%;background:linear-gradient(90deg,#efb77d,#b48bd9);border-radius:99px}
@media(max-width:600px){#duo-burst{right:8px;bottom:max(91px,calc(env(safe-area-inset-bottom,0px) + 83px));
 font-size:11px;min-height:39px;padding:7px 10px;max-width:46vw}
 #yard-surprise{bottom:max(92px,calc(env(safe-area-inset-bottom,0px) + 86px));font-size:12px}}
@media(orientation:landscape) and (max-height:530px){#duo-burst{bottom:65px;right:8px;min-height:32px;padding:5px 9px;font-size:10px}
 #yard-surprise{bottom:57px;left:49%;max-width:44%}}

.duo-secret-story{padding:12px;border:1px solid #d7b98f;border-radius:12px;background:#fff7dc;color:#684f49;text-align:left;font-size:12px;font-weight:850;line-height:1.55}
.duo-secret-story span{display:block;margin-top:5px;font-size:13px;color:#526752;font-weight:650;line-height:1.6}

/* Real skill labels and explicit current duo feedback, matching Cat Bond's sage palette. */
#battle-ui .move-bar .move{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;overflow:visible}
#battle-ui .move-bar .mv-name{display:block;max-width:100%;font-size:clamp(10px,1.1vw,12px);font-weight:900;
 line-height:1.12;color:#365c46;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#battle-ui .move-bar .mv-k{display:block;font-size:10px;color:#75836b;font-weight:800;line-height:1.1}
#battle-ui .move-bar .mv-icon{line-height:1.1}
#battle-ui .move-bar .newly-learned{border:2.5px solid #b582ed;box-shadow:0 0 13px #d5b5fb9a}
#battle-ui .move-new-tag{position:absolute;z-index:3;right:-6px;top:-10px;padding:2px 5px;
 border-radius:6px;background:#714eaa;color:#fff;font:900 9px/1 system-ui}
#yard-duo-status{position:absolute;z-index:24;top:clamp(86px,14vh,135px);left:9px;
 max-width:min(70vw,330px);min-height:34px;padding:7px 11px;background:#fff8e7;border:2px solid #c896b9;
 border-radius:13px;color:#755277;font:850 12px/1.3 system-ui;box-shadow:0 3px 13px #5e40552e;cursor:pointer}
#yard-duo-status[hidden]{display:none!important}
.duo-active-status{display:inline-block;background:#e4f1de;border:1px solid #99c59c;color:#386c42;
 border-radius:8px;font-weight:900;padding:5px 8px;margin:3px}
.duo-team-hint{background:#f9ecff;border-radius:9px;padding:8px 10px;color:#815e8c;font-size:12px;font-weight:850}
#cp-roster .duo-member{border:2px solid #dbb5dc;background:#fff0f7}
@media(max-width:700px){#battle-ui .move-bar .mv-name{font-size:10px;max-width:52px}
 #battle-ui .move-bar .mv-k{font-size:9px}
 #yard-duo-status{top:calc(env(safe-area-inset-top,0px) + 79px);left:6px;font-size:11px;max-width:67vw}}
@media(max-height:530px) and (orientation:landscape){#battle-ui .move-bar .mv-icon{font-size:17px}
 #battle-ui .move-bar .mv-name{font-size:9px;max-width:47px}
 #battle-ui .move-bar .mv-k{font-size:8px}
 #yard-duo-status{top:calc(env(safe-area-inset-top,0px) + 44px);max-width:45vw;min-height:28px;padding:4px 8px}}

/* Combat VFX stays inside the canvas; the duo control remains touch-accessible. */
#battle-ui #duo-burst.ready{border-width:3px;background:linear-gradient(125deg,#ffe2a9,#e8b3fa);
 box-shadow:0 0 22px #eec3fa8a,0 4px 13px #674c6966}

#panel .rare-lore{padding:10px 13px;border:1px solid #d9cfae;border-radius:11px;background:#fff7e7;
 font-size:13px;line-height:1.65;color:#5e6650;margin:8px auto}
#panel .rare-lore.unlocked{background:#f8ecff;border-color:#c1a9d5;color:#725283}
#panel .rare-lore.locked{background:#edf2e9;color:#718070}

/* Five-region navigation stays inside the game frame. */
#fab-map.map-fab{width:63px;height:64px;border-radius:17px;display:flex;flex-direction:column;gap:1px;
 background:linear-gradient(135deg,#f7efc7,#b5d5ad);border:2px solid #b8a36a;
 color:#355543;font-size:24px;box-shadow:0 6px 17px #424e4159}
#fab-map.map-fab small{font:900 12px/1.1 system-ui}
#map-index{position:absolute;right:9px;top:calc(env(safe-area-inset-top,0px) + 8px);z-index:23;
 border:2px solid #d2b56b;border-radius:10px;background:#fff7df;color:#4e654c;
 padding:8px 11px;font:850 12px system-ui;cursor:pointer}
#map-index[hidden]{display:none!important}
#panel .map-chooser{max-width:505px;margin:auto;color:#405b4a}
#panel .map-chooser h2{font-size:clamp(15px,2vw,20px);color:#36583f;margin:0 22px 5px 0}
#panel .map-chooser>p{font:650 11px/1.5 system-ui;margin:0 0 8px;color:#597263}
#panel .map-destination-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#panel .map-destination{min-width:0;width:100%;display:flex;align-items:center;gap:6px;
 padding:9px 7px;border:1.5px solid #a6c3ad;border-radius:11px;background:#edf6e9;
 color:#345943;text-align:left;cursor:pointer}
#panel .map-destination.locked{background:#f1efe9;border-color:#d2d0c6;cursor:default;opacity:.8}
#panel .map-destination-icon{flex:0 0 24px;font-size:22px}
#panel .map-destination-info{display:grid;min-width:0;flex:1;gap:2px}
#panel .map-destination-info strong{font:850 12px/1.2 system-ui}
#panel .map-destination-info small{font:650 10px/1.35 system-ui;white-space:normal;color:#6c7d6c}
#panel .map-destination-enter{font:800 10px/1.1 system-ui;flex:0 0 auto}
#panel .map-instructions{background:#e9efe2;border-radius:10px;padding:8px;color:#526b58}
#panel .map-chooser .btn-row{gap:8px;margin-top:8px}
#panel .map-chooser .btn{font-size:12px;padding:7px 11px}
@media(max-width:520px){#fab-map.map-fab{width:59px;height:59px}
#panel .map-destination-list{gap:5px}
#panel .map-destination{padding:7px 5px;gap:4px}
#panel .map-destination-icon{font-size:18px;flex-basis:18px}
#panel .map-destination-info strong{font-size:11px}
#panel .map-destination-info small{font-size:9px}}
@media(max-height:530px) and (orientation:landscape){#panel .map-destination-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
#panel .map-destination{padding:5px 5px}
#panel .map-chooser>p{margin-bottom:5px}
#panel .map-instructions{padding:5px;margin:5px 0;font-size:10px}
#panel .map-chooser .btn-row{margin-top:5px}}

#panel .grade-explain,#panel .mastery-grade-hint{display:block;color:#556955;font:700 11px/1.5 system-ui;margin-top:5px}

/* High-contrast, responsive destination chooser inside the actual dark panel. */
#panel .card:has(.map-chooser){background:#fbf8eb;border:2px solid #b8cca9;color:#395a42;
 box-shadow:0 20px 60px #0f1e1a8a}
#panel .card:has(.map-chooser) .card-close{color:#6a7469}
#panel .card:has(.map-chooser) .btn.ghost{background:#e3e9de;color:#47644c}
#panel .map-destination.available:hover,#panel .map-destination.available:focus-visible{
 border-color:#4c9860;box-shadow:0 0 0 2px #8cc59d55;outline:none}
#scene{touch-action:none;user-select:none}
body.cb-exploring #scene{cursor:grab}

/* Landscape gamepad: put yard actions in a compact horizontal strip above the tabs.
   The audio dock sits at the upper-right; a tall vertical FAB stack overlaps it. */
@media (orientation:landscape) and (max-height:530px){
  #yard-actions{display:flex;flex-direction:row;align-items:center;
    right:max(8px,env(safe-area-inset-right,0px));bottom:max(96px,calc(env(safe-area-inset-bottom,0px) + 93px));
    gap:6px;z-index:32}
  #yard-actions .fab{width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px}
  #fab-map.map-fab{width:50px;height:46px;min-width:50px;min-height:46px;font-size:20px;
    border-radius:12px}
  #fab-map.map-fab small{font-size:9px;line-height:1}
}


/* Mobile overlays: reserve the common top utility row and keep a genuinely
   tappable close control OUTSIDE the scrollable card. Applies to workshop,
   adventure journal, codex, roster, store and every other optional panel. */
#panel.open:not([data-mandatory="true"])>.panel-dismiss{
  position:absolute;z-index:5;top:7px;right:max(10px,env(safe-area-inset-right,0px));
  display:grid;place-items:center;box-sizing:border-box;
  width:44px;height:44px;min-width:44px;min-height:44px;
  border:1.5px solid #b9cdb5;border-radius:13px;
  background:#fffdf7;color:#315641;box-shadow:0 3px 12px #304a3d33;
  font:800 27px/1 system-ui;cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
#panel>.panel-dismiss:focus-visible{outline:3px solid #5b9473;outline-offset:2px}
#panel.open:not([data-mandatory="true"]) .card>.card-close{display:none!important}
#panel:not(.open)>.panel-dismiss,#panel[data-mandatory="true"]>.panel-dismiss{display:none!important}
@media(max-width:700px){
 #panel.open:not([data-mandatory="true"]){
  top:calc(env(safe-area-inset-top,0px) + 46px)!important;
  bottom:max(61px,calc(env(safe-area-inset-bottom,0px) + 52px))!important;
  left:0;right:0;box-sizing:border-box;
  padding:54px 9px 8px!important;
  align-items:stretch!important;justify-content:center!important;
  overflow:hidden!important;overscroll-behavior:contain;
 }
 #panel.open:not([data-mandatory="true"])>.card{
  box-sizing:border-box!important;min-height:0!important;
  max-height:100%!important;overflow-y:auto!important;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 }
 #panel.open:not([data-mandatory="true"])>.panel-dismiss{
  top:5px;right:max(10px,env(safe-area-inset-right,0px));
 }
}
/* Only the common top-right controls can render music/effects in Cat Bond.
   The obsolete audio-dock used stronger #stage>.mw-audio-dock selectors and
   could otherwise draw two giant duplicate buttons over the game. */
#stage>#mw-audio-dock,#stage>.mw-audio-dock{
 display:none!important;visibility:hidden!important;pointer-events:none!important;
}

/* The utility toolbar sits over the game on BOTH landscape phones and desktop.
   Keep optional panel close controls below it, regardless of screen width. */
#panel.open:not([data-mandatory="true"]){
 top:calc(env(safe-area-inset-top,0px) + 46px);
}
@media(orientation:landscape) and (pointer:coarse){
 #panel.open:not([data-mandatory="true"]){
  top:calc(env(safe-area-inset-top,0px) + 44px)!important;
  bottom:max(54px,calc(env(safe-area-inset-bottom,0px) + 48px))!important;
  padding:44px 8px 6px!important;
  align-items:stretch!important;overflow:hidden!important;
 }
 #panel.open:not([data-mandatory="true"])>.card{
  min-height:0!important;max-height:100%!important;
  overflow-y:auto!important;-webkit-overflow-scrolling:touch;
 }
 #panel.open:not([data-mandatory="true"])>.panel-dismiss{
  top:2px;right:max(9px,env(safe-area-inset-right,0px));
  width:40px;height:40px;min-height:40px;min-width:40px;
 }
}

/* Elemental duo guide stays readable in the small phone partnership sheet. */
#panel .duo-relation .duo-art-description{
 margin:4px 0 8px;padding:9px 12px;border-radius:10px;
 background:#edf4e8;color:#47654b;font:750 12px/1.5 system-ui,sans-serif;
 border:1px solid #cedfc8;white-space:normal;overflow-wrap:anywhere;
}
@media(max-width:700px) and (max-height:490px){
 #panel.open:not([data-mandatory="true"]){padding-top:45px!important}
 #panel.open:not([data-mandatory="true"])>.panel-dismiss{width:38px;height:38px;min-width:38px;min-height:38px}
}

/* Garden-only notices must never intercept battle buttons or popup dismissal. */
#stage:has(#battle-ui.on) #collection-goal,
#stage:has(#panel.open) #collection-goal,
#stage:has(#battle-ui.on) #first-quest {display:none!important}


/* Capture-prep mode choice: large, accessible touch targets, selected at a
   glance. The first encounter recommends auto but never forces it. */
#panel .capture-mode-picker{
 min-width:0;margin:12px 0 10px;padding:10px 12px 11px;
 border:1px solid #cbdcc6;border-radius:15px;background:#f5f8ed;
}
#panel .capture-mode-picker legend{color:#345c41;font-weight:900;font-size:14px;padding:0 5px}
#panel .capture-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#panel .capture-mode-option{min-width:0;min-height:87px;padding:11px 9px;
 display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:5px;
 text-align:left;border:2px solid #dae4d6;border-radius:12px;
 background:#fffefa;color:#48604f;cursor:pointer;touch-action:manipulation}
#panel .capture-mode-option.selected{
 border-color:#61aa7a;background:#e3f3df;box-shadow:0 0 0 2px #82bf8c22;
}
#panel .capture-mode-option strong{font:900 13px/1.3 system-ui,sans-serif;color:#315640}
#panel .capture-mode-option strong small{font:750 10px/1 system-ui;color:#7b753d}
#panel .capture-mode-option span{font:650 11px/1.5 system-ui,sans-serif;color:#687968}
#panel .capture-mode-option:focus-visible{outline:3px solid #659e80;outline-offset:2px}
#panel .capture-mode-note{font:700 11px/1.55 system-ui;color:#687d65;margin:9px 2px 0}
/* 克制预警: pre-battle matchup read — colour-codes whether the squad counters the wild */
#panel .matchup-read{font:750 12px/1.5 system-ui;margin:-6px 2px 14px;padding:7px 11px;border-radius:10px;border:1px solid transparent}
#panel .matchup-read.mu-good{color:#2f7d4f;background:rgba(126,231,135,.16);border-color:rgba(126,231,135,.5)}
#panel .matchup-read.mu-hint{color:#2f6a9e;background:rgba(86,204,242,.14);border-color:rgba(86,204,242,.45)}
#panel .matchup-read.mu-warn{color:#b26a1c;background:rgba(255,176,60,.15);border-color:rgba(255,176,60,.5)}
#panel .matchup-read.mu-neutral{color:#6a6478;background:rgba(150,140,170,.12);border-color:rgba(150,140,170,.35)}
@media(max-width:410px){
 #panel .capture-mode-picker{padding:9px 7px}
 #panel .capture-mode-options{gap:6px}
 #panel .capture-mode-option{min-height:83px;padding:9px 7px}
 #panel .capture-mode-option strong{font-size:12px}
}
/* Tutorial lives inside the existing battle-help pause sheet: it cannot
   cover the arena while the fight clock or hostile AI is running. */
#battle-ui .battle-tutorial-progress{display:flex;gap:6px;margin:6px 0 13px}
#battle-ui .battle-tutorial-progress span{height:5px;border-radius:999px;flex:1;background:#e1e9d7}
#battle-ui .battle-tutorial-progress .filled{background:#80b88a}
#battle-ui .battle-tutorial-step{padding:15px 13px}
#battle-ui .battle-tutorial-step>b{font-size:17px;color:#355744}
#battle-ui .battle-tutorial-step p{font-size:14px;line-height:1.65;margin:9px 0 0}
#battle-ui .battle-tutorial-skip{display:block;margin:8px auto 0;padding:7px 12px;
 font:700 12px/1.2 system-ui;border:0;background:transparent;
 color:#617468;text-decoration:underline;cursor:pointer;touch-action:manipulation}
#battle-ui .battle-tutorial-skip:focus-visible{outline:2px solid #609676}
@media(max-height:540px){
 #battle-ui .battle-tutorial-step{padding:8px 10px}
 #battle-ui .battle-tutorial-step p{font-size:12px;line-height:1.45}
 #battle-ui .battle-tutorial-progress{margin:3px 0 7px}
}


/* Mobile MANUAL combat: one thumb drives the floating left joystick; the
   other operates a compact 2-row set of actions on the right. Basic claws
   persist after one tap, leaving a free thumb for skills and dodge. */
#battle-touch-joystick{display:none;pointer-events:none}
@media(pointer:coarse){
 #battle-ui.touch-manual #battle-touch-joystick{
   display:grid;place-items:center;position:absolute;z-index:23;
   left:73px;top:auto;bottom:max(39px,env(safe-area-inset-bottom,0px) + 30px);
   width:102px;height:102px;border-radius:50%;
   transform:translate(-50%,-50%);
   background:radial-gradient(circle at 48% 44%,#fffdf5a1,#c7e2c45e);
   border:2px solid #aad4b5a6;
   box-shadow:inset 0 0 0 19px #d9e9d53b,0 3px 15px #334e5e24;
 }
 #battle-touch-joystick .battle-touch-nub{
   width:39px;height:39px;border-radius:50%;
   background:linear-gradient(150deg,#f9fced,#b9ddbd);
   border:2px solid #81b18e;box-shadow:0 3px 8px #41574645;
   will-change:transform;
 }
 #battle-touch-joystick .battle-touch-label{
   position:absolute;bottom:-18px;font:800 11px/1.2 system-ui;
   color:#375846;text-shadow:0 1px 2px white;white-space:nowrap
 }
 #battle-ui.touch-manual #battle-touch-joystick.active{
   background:radial-gradient(circle at center,#e0f3da95,#b2dbcb7c);
   border-color:#8ac69b
 }
 #battle-ui .move-bar{
   display:grid!important;grid-template-columns:repeat(3,minmax(0,52px))!important;
   grid-template-rows:repeat(2,52px)!important;
   justify-content:end!important;align-items:center!important;
   width:auto!important;max-width:none!important;
   right:max(8px,env(safe-area-inset-right,0px))!important;
   left:auto!important;
   bottom:max(13px,env(safe-area-inset-bottom,0px) + 9px)!important;
   gap:5px!important;pointer-events:auto!important;
 }
 #battle-ui .move-bar .move{
   width:52px!important;height:52px!important;min-width:52px!important;
   min-height:52px!important;padding:4px!important;
   display:flex;flex-direction:column;align-items:center;justify-content:center;
   border-radius:13px!important;font-size:11px!important;
 }
 #battle-ui #mv-q{grid-column:1;grid-row:1}
 #battle-ui #mv-e{grid-column:2;grid-row:1}
 #battle-ui #mv-basic{grid-column:3;grid-row:1}
 #battle-ui #mv-dodge{grid-column:2;grid-row:2}
 #battle-ui #ult-btn{grid-column:3;grid-row:2}
 #battle-ui #mv-basic.auto-firing{
   border:2px solid #55a57c!important;
   background:#cbe9d3!important;color:#284b3e!important;
   box-shadow:0 0 0 2px #69bd8540,0 3px 11px #33583d27!important
 }
 #battle-ui .move-bar .mv-k{font-size:10px!important;line-height:1.1}
 #battle-ui .move-bar .mv-name{font-size:10px!important;white-space:nowrap;max-width:48px;overflow:hidden;text-overflow:ellipsis}
 #battle-ui .move-bar .mv-icon{font-size:17px!important;line-height:1.1}
 #battle-ui .battle-hint{
   max-width:calc(100% - 14px)!important;
   pointer-events:none!important;
 }
}
@media(pointer:coarse) and (max-height:470px){
 #battle-ui .move-bar{grid-template-rows:repeat(2,43px)!important;grid-template-columns:repeat(3,46px)!important;gap:3px!important}
 #battle-ui .move-bar .move{width:46px!important;height:43px!important;min-width:46px!important;min-height:43px!important}
 #battle-ui.touch-manual #battle-touch-joystick{width:80px;height:80px;left:65px;bottom:17px}
 #battle-touch-joystick .battle-touch-nub{width:33px;height:33px}
 #battle-ui .move-bar .mv-name{font-size:9px!important}
}


/* Battle HUD v2 — no stacked banners over the fighting area. The site tools
   occupy row one; a compact, single-line fight header occupies row two.
   Health is visible in the fight header, not under unrelated garden UI. */
#stage:has(#battle-ui.on) #hud,
#stage:has(#battle-ui.on) #collection-goal,
#stage:has(#battle-ui.on) #first-quest,
#stage:has(#battle-ui.on) #yard-duo-status,
#stage:has(#battle-ui.on) #yard-surprise,
#stage:has(#battle-ui.on) #yard-cat-switch,
#stage:has(#battle-ui.on) #map-index,
#stage:has(#battle-ui.on) #yard-actions{display:none!important}
#battle-ui .battle-topbar{
  left:10px;right:10px;top:calc(env(safe-area-inset-top,0px) + 48px);
  transform:none;width:auto;max-width:none;box-sizing:border-box;
  display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;
  align-items:center;gap:6px;padding:4px 6px 4px 10px;
  min-height:39px;border-radius:13px;
}
#battle-ui .battle-enemy-summary{min-width:0;max-width:100%;display:flex;flex-direction:column;gap:4px}
#battle-ui #wild-name{font-size:12px;line-height:1.1;display:block;max-width:100%;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#battle-ui .battle-enemy-track{height:7px;background:#d3dfd1;border-radius:999px;overflow:hidden;
  border:1px solid #bccdb8;min-width:52px;max-width:100%;box-sizing:border-box}
#battle-ui #battle-enemy-hp-fill{height:100%;width:100%;display:block;
  background:linear-gradient(90deg,#e67d72,#edae84);transition:width .16s}
#battle-ui .battle-topbar .tiny-btn{min-height:32px;max-width:none;white-space:nowrap;
  padding:4px 7px;font:800 11px/1.15 system-ui,sans-serif}
#battle-ui .battle-help-trigger{min-width:33px;max-width:45px}
#battle-ui .battle-hint{display:none!important}
#battle-ui #team-slots{
  display:flex;flex-direction:row;align-items:flex-start;gap:5px;
  left:9px;right:auto;top:calc(env(safe-area-inset-top,0px) + 100px);
  width:auto;max-width:calc(100% - 132px);z-index:2
}
#battle-ui .team-slot{width:42px;min-width:42px;max-width:42px;padding:2px;box-sizing:border-box;
  border-radius:9px;display:flex;flex-direction:column}
#battle-ui .team-slot canvas{width:34px!important;height:29px!important}
#battle-ui .team-slot .slot-hp{height:5px;margin-top:2px}
#battle-ui .team-slot .slot-key{font-size:9px;top:1px;left:2px}
#battle-ui #ult-wrap{
  top:calc(env(safe-area-inset-top,0px) + 100px);
  right:9px;left:auto;width:103px;
  padding:4px 7px;box-sizing:border-box;
  border-radius:9px;z-index:2;line-height:1.1
}
#battle-ui #ult-wrap .ult-track{height:6px;margin-top:3px}
#battle-ui #ult-wrap .ult-label{font-size:10px}
@media(max-width:700px),(pointer:coarse){
 #battle-ui .battle-topbar{
   left:6px!important;right:6px!important;
   top:calc(env(safe-area-inset-top,0px) + 48px)!important;
   max-width:none!important;width:auto!important;
   grid-template-columns:minmax(0,1fr) auto auto auto!important;
   padding:3px 5px 3px 8px!important;gap:4px!important;
   min-height:38px!important
 }
 #battle-ui #wild-name{font-size:11px!important}
 #battle-ui .battle-topbar .tiny-btn{
   font-size:10px!important;padding:5px 6px!important;
   min-height:32px!important;max-width:80px
 }
 #battle-ui #team-slots{
   top:calc(env(safe-area-inset-top,0px) + 95px)!important;
   left:7px!important;display:flex!important;flex-direction:row!important;
   max-width:calc(100% - 117px)!important;gap:3px!important
 }
 #battle-ui #ult-wrap{
   top:calc(env(safe-area-inset-top,0px) + 95px)!important;
   right:7px!important;left:auto!important;width:95px!important
 }
}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui .battle-topbar{top:calc(env(safe-area-inset-top,0px) + 43px)!important;
   min-height:34px!important}
 #battle-ui #team-slots{top:calc(env(safe-area-inset-top,0px) + 84px)!important}
 #battle-ui #ult-wrap{top:calc(env(safe-area-inset-top,0px) + 84px)!important}
 #battle-ui .team-slot{width:35px;min-width:35px;max-width:35px}
 #battle-ui .team-slot canvas{width:28px!important;height:25px!important}
 #battle-ui #battle-help-toggle{min-width:30px!important}
}
html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui .battle-topbar{
 top:calc(env(safe-area-inset-top,0px) + 48px)!important
}
html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #team-slots,
html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #ult-wrap{
 top:calc(env(safe-area-inset-top,0px) + 95px)!important
}

/* Single surviving battle-health row, with all buttons and the health bar
   inside the same compact card. No second status banner crosses the arena. */
#battle-ui .battle-topbar{
 grid-template-rows:40px!important;
 grid-template-columns:minmax(0,1fr) auto auto auto!important;
 border-radius:12px!important;
 min-height:0!important;
 padding:3px 7px!important;
}
#battle-ui .battle-enemy-summary{
 grid-column:1;grid-row:1;min-width:0;align-self:center;
 display:flex;flex-direction:column;justify-content:center;gap:5px;
}
#battle-ui #wild-name{
 grid-column:auto!important;grid-row:auto!important;font-size:12px!important;
 display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#battle-ui .battle-enemy-track{height:9px!important;width:100%;min-width:55px}
#battle-ui #battle-help-toggle{grid-column:2;grid-row:1}
#battle-ui #btn-auto{grid-column:3;grid-row:1}
#battle-ui #btn-flee{grid-column:4;grid-row:1}
#battle-ui .battle-hint{display:none!important}
#battle-ui #team-slots{
 top:calc(env(safe-area-inset-top,0px) + 99px)!important;
 max-width:calc(100% - 126px)!important;
}
#battle-ui #ult-wrap{top:calc(env(safe-area-inset-top,0px) + 99px)!important}
@media(max-width:520px){
 #battle-ui .battle-topbar .battle-top-label{display:none!important}
 #battle-ui #battle-help-toggle,#battle-ui #btn-flee{
   min-width:30px!important;width:30px!important;padding:0!important
 }
 #battle-ui #btn-auto{min-width:67px!important;max-width:85px!important;padding:2px 4px!important}
}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui .battle-topbar{grid-template-rows:32px!important;
   top:calc(env(safe-area-inset-top,0px) + 43px)!important}
 #battle-ui #team-slots,#battle-ui #ult-wrap{
   top:calc(env(safe-area-inset-top,0px) + 84px)!important;
 }
}

/* The sixth mobile action occupies the free bottom-left grid cell. */
#battle-ui #mv-lock{display:none}
@media(pointer:coarse){
 #battle-ui.touch-manual #mv-lock{
  display:flex!important;grid-column:1;grid-row:2;
  background:#edf0fa;border-color:#b9bddf;color:#505d83;
 }
 #battle-ui.touch-manual #mv-lock.locked{
  background:#fff0cb;border:2px solid #e1b958;
  box-shadow:0 0 0 2px #f5cf7247;
 }
}


/* Combat text is an unobtrusive SINGLE-LINE ticker beneath the top HUD,
   never a stack of skill labels hiding cats, enemy HP, or touch controls. */
#stage:has(#battle-ui.on) #toasts{
 top:calc(env(safe-area-inset-top,0px) + 86px)!important;
 left:50%!important;transform:translateX(-50%)!important;
 width:min(64%,270px)!important;max-height:23px!important;
 overflow:hidden!important;pointer-events:none!important;
}
#stage:has(#battle-ui.on) .toast-battle{
 display:block;box-sizing:border-box;width:100%;max-width:100%;
 padding:3px 8px!important;margin:0!important;
 background:rgba(252,249,240,.89)!important;
 border:1px solid #cad9c9!important;border-radius:10px!important;
 font:750 11px/1.3 system-ui,sans-serif!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
 box-shadow:0 2px 9px #32443822!important;
}
@media(max-width:640px){
 #stage:has(#battle-ui.on) #toasts{
  top:calc(env(safe-area-inset-top,0px) + 83px)!important;
  width:min(68%,220px)!important;
 }
}
#yard-duo-status.needs-reconcile{
 border:2px solid #dc9566!important;background:#fff2e3!important;
 color:#773e2c!important;box-shadow:0 3px 13px #78433145!important;
}
/* A disagreement is a persistent objective, not a vanishing toast. Keep
   the action legible on a phone and do not animate/fade it away. */
#yard-duo-status.needs-reconcile{
 min-height:44px!important;max-width:min(82vw,335px)!important;
 padding:9px 12px!important;font:850 12px/1.45 system-ui!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
 text-align:left!important;opacity:1!important;visibility:visible!important;
 transition:none!important;animation:none!important;touch-action:manipulation;
}
#yard-duo-status.needs-reconcile:focus-visible{
 outline:3px solid #c97849;outline-offset:2px;
}
@media(max-width:700px){
 #yard-duo-status.needs-reconcile{max-width:min(82vw,330px)!important;font-size:12px!important}
}


/* Expedition squad selector stays reachable inside the world map and each region. */
#map-squad{position:absolute;right:133px;top:calc(env(safe-area-inset-top,0px) + 8px);
 z-index:23;border:2px solid #acd1b4;border-radius:10px;background:#f2f9ee;color:#385846;
 padding:8px 10px;font:850 12px system-ui;min-height:40px;cursor:pointer;touch-action:manipulation}
#map-squad[hidden],#stage:has(#battle-ui.on) #map-squad{display:none!important}
#panel .map-squad-heading{font-size:15px;color:#48634d;margin:12px 0 6px}
#panel .map-squad-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
 gap:8px;max-height:min(41vh,280px);overflow:auto;padding:3px;overscroll-behavior:contain}
#panel .map-squad-choice{display:flex;gap:6px;align-items:center;min-height:70px;text-align:left;
 border:2px solid #d4e3d2;border-radius:13px;background:#fffcf5;color:#425a4b;
 padding:5px 7px;cursor:pointer;touch-action:manipulation;min-width:0}
#panel .map-squad-choice.sel{background:#e3f2db;border-color:#6da981;box-shadow:0 0 0 1px #a8d5b3}
#panel .map-squad-choice:focus-visible{outline:3px solid #397653;outline-offset:1px}
#panel .map-squad-choice canvas{flex:0 0 54px;width:54px;height:47px;object-fit:contain}
#panel .map-squad-choice span{min-width:0;overflow-wrap:anywhere}
#panel .map-squad-choice strong{display:block;font:850 12px/1.35 system-ui}
#panel .map-squad-choice small{display:block;font:700 10px/1.35 system-ui;color:#67836d}
#panel .map-squad-count{text-align:right;font:800 12px/1.5 system-ui;color:#4b7959;margin:5px 2px 9px}
@media(max-width:380px){#map-squad{right:117px;padding:7px;font-size:11px}
 #panel .map-squad-roster{grid-template-columns:repeat(2,minmax(0,1fr))}
 #panel .map-squad-choice{flex-direction:column;justify-content:center;text-align:center}}
@media(max-height:530px) and (orientation:landscape){
 #map-squad{top:calc(env(safe-area-inset-top,0px) + 6px)}
 #panel .map-squad-roster{max-height:25vh}}
/* Show the live interactive manual lesson over the battle instead of hiding it. */
#battle-ui .battle-hint.coach-hint{display:block!important;position:absolute!important;
 top:calc(env(safe-area-inset-top,0px) + 157px)!important;left:50%;right:auto;
 z-index:19;max-width:min(92%,460px)!important;width:max-content;
 white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
 transform:translateX(-50%);text-align:center;font-size:clamp(12px,2.8vw,15px)!important;
 line-height:1.45;padding:9px 12px;border-radius:12px;pointer-events:none}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui .battle-hint.coach-hint{top:calc(env(safe-area-inset-top,0px) + 133px)!important;
  max-width:68%!important;font-size:12px!important;padding:5px 8px}}

/* Keep-which-cat chooser (post-explore-win squad trim) */
.keep-grid{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:12px 0}
.keep-cat{display:flex;flex-direction:column;align-items:center;gap:2px;width:92px;padding:8px 6px;
 border-radius:14px;border:2px solid #d9c3b0;background:#fff7ef;cursor:pointer;transition:transform .1s,border-color .1s,box-shadow .1s}
.keep-cat:hover{transform:translateY(-2px)}
.keep-cat.on{border-color:#ffb43c;box-shadow:0 0 0 2px #ffd36b88,0 6px 16px #d9992a44;background:#fff2db}
.keep-cat canvas{width:54px;height:46px}
.keep-cat .keep-name{font:700 12px/1.2 system-ui,sans-serif;color:#6a4a2a}
.keep-cat .keep-hp{font:600 11px/1.2 system-ui,sans-serif;color:#9a7a55}

/* Paired-kitten expedition journal, compact even on landscape phones. */
.duo-memory-album{margin:14px 0 4px;padding:12px 14px;border:1px solid rgba(220,167,180,.42);background:linear-gradient(130deg,rgba(255,244,235,.10),rgba(235,206,230,.12));border-radius:14px}
.duo-memory-album>strong{display:block;font-size:14px;line-height:1.5}
.duo-memory-album>.tiny{margin:6px 0 10px;line-height:1.5}
.duo-memory-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.duo-memory-stamp{display:flex;min-width:0;min-height:54px;flex-direction:column;align-items:center;justify-content:center;border:1px solid rgba(204,180,186,.4);border-radius:11px;background:rgba(255,247,238,.12);font-size:19px}
.duo-memory-stamp.found{border-color:rgba(255,216,142,.8);background:rgba(255,219,160,.18)}
.duo-memory-stamp.missing{color:#bcaab5;opacity:.66}
.duo-memory-stamp small{font-size:10px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 1px;text-align:center}
.duo-discovery-names{font-weight:700;color:#f4c0d0}
@media (max-width:540px){.duo-memory-album{padding:9px}.duo-memory-grid{gap:4px}.duo-memory-stamp{min-height:46px;font-size:17px}.duo-memory-stamp small{font-size:9px}}

/* Duo lineup clarity and tactical bench, November 2026. */
#battle-ui #team-slots{display:flex!important;flex-direction:row!important;
 align-items:flex-start!important;gap:8px!important;left:10px!important;
 top:calc(env(safe-area-inset-top,0px) + 99px)!important;
 max-width:calc(100% - 132px)!important;width:auto!important;z-index:6!important}
#battle-ui .team-slot{width:78px!important;min-width:78px!important;max-width:78px!important;
 height:auto!important;padding:5px 5px 6px!important;box-sizing:border-box!important;
 border:2px solid #bfd4b9!important;border-radius:14px!important;
 background:#fffaf0f5!important;color:#345042!important;display:flex!important;
 flex-direction:column!important;align-items:center!important;gap:2px!important;
 box-shadow:0 4px 12px #37564728!important;touch-action:manipulation}
#battle-ui .team-slot canvas{width:64px!important;height:53px!important;
 object-fit:contain!important;flex-shrink:0!important}
#battle-ui .team-slot .slot-key{font-size:11px!important;line-height:1.2;
 padding:1px 4px;background:#fff3cf;border-radius:6px;z-index:1}
#battle-ui .team-slot .slot-name{display:block;font:800 11px/1.2 system-ui,sans-serif;
 max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#battle-ui .team-slot .slot-hp{display:block;width:100%!important;height:9px!important;
 margin-top:2px!important;border:1px solid #a6bdad;border-radius:7px;background:#dce4d9}
#battle-ui .team-slot .slot-hp-value{display:block!important;
 font:800 10px/1.15 system-ui,sans-serif;color:#496355}
#battle-ui .team-slot .slot-ult{display:none!important}
#battle-ui .team-slot.active{border-color:#dba755!important;
 box-shadow:0 0 0 2px #f8d78d,0 5px 13px #6146283d!important}
#battle-ui .team-slot:focus-visible,#battle-ui .bench-slot:focus-visible{
 outline:3px solid #387753;outline-offset:2px}
#battle-ui #bench-slots{position:absolute;z-index:6;pointer-events:auto;display:flex;
 align-items:center;gap:6px;top:calc(env(safe-area-inset-top,0px) + 208px);
 left:10px;max-width:calc(100% - 125px)}
#battle-ui #bench-slots[hidden]{display:none!important}
#battle-ui #bench-slots .bench-caption{font:900 10px/1.1 system-ui;color:#335a49;
 padding:3px 5px;background:#fff9e8ed;border:1px solid #c4d7bd;border-radius:6px}
#battle-ui .bench-slot{position:relative;width:43px;height:55px;min-width:43px;
 display:flex;flex-direction:column;align-items:center;gap:0;border-radius:10px;
 padding:3px 2px 2px;touch-action:manipulation;cursor:pointer;
 border:1px solid #bbd4bb;background:#fffaf0ee;box-shadow:0 2px 8px #254f4b26}
#battle-ui .bench-slot canvas{width:37px;height:34px;display:block}
#battle-ui .bench-slot .bench-number{position:absolute;top:-4px;left:-3px;
 font:900 9px/1.2 system-ui;color:#4a5f51;background:#fdf0ce;
 padding:1px 3px;border-radius:6px}
#battle-ui .bench-slot .bench-health{font:800 9px/1.1 system-ui;color:#355d43}
#battle-ui .bench-slot.cooling{opacity:.76}
#battle-ui #ult-wrap{z-index:5!important}
.battle-order{margin:10px 0 14px;padding:11px;border:1px solid #b8d2bb;
 border-radius:14px;background:#f3f8ef;color:#385446}
.battle-order>strong{font-size:14px}.battle-order>p{font-size:12px;line-height:1.4;
 margin:5px 0 9px;color:#627469}
.battle-order-items{display:flex;flex-direction:column;gap:4px}
.battle-order-item{display:flex;align-items:center;gap:7px;min-height:34px;
 background:#fff;border:1px solid #d8e3d4;border-radius:9px;padding:3px 6px}
.battle-order-item.field{background:#fff8df;border-color:#e8d39d}
.battle-order-role{font:900 11px/1.1 system-ui;min-width:64px;color:#57745b}
.battle-order-name{font:800 12px/1.2 system-ui;flex:1;min-width:0;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle-order-item button{min-width:30px;min-height:29px;border:1px solid #b9d0ba;
 background:#f6f8f3;border-radius:7px;cursor:pointer}
.battle-order-item button:disabled{opacity:.3;cursor:default}
#cp-roster .chip.sel{position:relative}
#cp-roster .chip.sel::after{content:attr(data-order-role);position:absolute;
 top:1px;right:3px;font:800 10px/1.2 system-ui;background:#fff0b4;
 color:#665334;border-radius:5px;padding:2px 4px;pointer-events:none}
@media(max-width:700px),(pointer:coarse){
 #battle-ui #team-slots{left:7px!important;gap:5px!important;
  top:calc(env(safe-area-inset-top,0px) + 99px)!important;
  max-width:calc(100% - 106px)!important}
 #battle-ui .team-slot{width:66px!important;min-width:66px!important;max-width:66px!important;
  padding:4px!important;gap:1px!important}
 #battle-ui .team-slot canvas{width:54px!important;height:46px!important}
 #battle-ui .team-slot .slot-hp{height:8px!important}
 #battle-ui .team-slot .slot-hp-value{font-size:9px!important}
 #battle-ui #bench-slots{top:calc(env(safe-area-inset-top,0px) + 196px);
  left:7px;gap:4px;max-width:calc(100% - 107px)}
 #battle-ui .bench-slot{width:39px;min-width:39px;height:51px}
 #battle-ui .bench-slot canvas{width:34px;height:31px}
 #battle-ui #ult-wrap{right:7px!important;width:95px!important}
}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui #team-slots{top:calc(env(safe-area-inset-top,0px) + 84px)!important}
 #battle-ui .team-slot{width:59px!important;min-width:59px!important;max-width:59px!important}
 #battle-ui .team-slot canvas{width:48px!important;height:36px!important}
 #battle-ui .team-slot .slot-name{font-size:9px}
 #battle-ui #bench-slots{top:calc(env(safe-area-inset-top,0px) + 171px)}
}
html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #team-slots{
 top:calc(env(safe-area-inset-top,0px) + 99px)!important}
@media(max-height:530px) and (orientation:landscape){
 html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #team-slots{
  top:calc(env(safe-area-inset-top,0px) + 84px)!important}
}

/* Cat Bond: the paused first manual preflight teaches both touch and keyboard. */
#battle-ui .battle-device-guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;margin:8px 0}
#battle-ui .battle-device-item{background:#fffaf1;border:1px solid #ccd9c8;border-radius:12px;
  padding:10px 11px;color:#375345}
#battle-ui .battle-device-item.preferred{border:2px solid #81b399;background:#eef8ee}
#battle-ui .battle-device-item strong{font:850 12px/1.2 system-ui,sans-serif}
#battle-ui .battle-device-item p{font:500 12px/1.48 system-ui,sans-serif;margin:6px 0 0}
#battle-ui #battle-coach-card[hidden]{display:none!important}
#battle-ui #battle-coach-card{position:absolute;z-index:13;pointer-events:none;
  left:12px;bottom:175px;max-width:min(45%,300px);padding:9px 11px;
  border:1px solid #9dbb9d;border-radius:12px;background:#fff7e4ed;
  box-shadow:0 5px 15px #263c3255;color:#335444;
  font:750 12px/1.38 system-ui,sans-serif}
@media(max-width:520px){
 #battle-ui .battle-device-guide{grid-template-columns:1fr;gap:5px}
 #battle-ui .battle-device-item{padding:7px 9px}
 #battle-ui .battle-device-item p{font-size:11px;line-height:1.4;margin-top:3px}
 #battle-ui #battle-coach-card{bottom:175px;left:6px;max-width:47%;font-size:11px}
}
@media(orientation:landscape) and (max-height:530px){
 #battle-ui .battle-device-guide{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #battle-ui #battle-coach-card{bottom:130px;left:6px;max-width:38%;font-size:10px;padding:5px 7px}
}

/* Bond progression: care for two cats to change their combat behavior. */
.duo-personality-list{display:grid;gap:4px;margin:7px 0 10px}
.duo-personality-list p{margin:0!important;padding:5px 8px;border-radius:7px;
 background:#eef5e8;border-left:3px solid #9fc5a5;font-size:11px;line-height:1.35}
.duo-move-evolution{display:grid;gap:5px;margin:9px 0 12px}
.duo-move-evolution>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;
 border:1px solid #d9e0d5;border-radius:9px;background:#f0f0e8;
 padding:6px 8px;color:#7f877c;opacity:.8}
.duo-move-evolution>div.unlocked{border-color:#afd2a9;background:#eaf5e9;
 color:#345847;opacity:1}
.duo-move-evolution b{font-size:12px;white-space:nowrap}
.duo-move-evolution span{font-size:11px;line-height:1.35}

/* Short landscape: preserve thumb-sized skills and unclutter the fighting area. */
@media(pointer:coarse) and (max-height:470px) and (orientation:landscape){
 #battle-ui .move-bar{grid-template-rows:repeat(2,48px)!important;
  grid-template-columns:repeat(3,48px)!important;gap:4px!important}
 #battle-ui .move-bar .move{width:48px!important;height:48px!important;
  min-width:48px!important;min-height:48px!important;border-radius:12px!important}
 #battle-ui.touch-manual #battle-touch-joystick{width:86px!important;height:86px!important;
  left:70px!important;bottom:24px!important}
 #battle-touch-joystick .battle-touch-label{bottom:-14px}
 #battle-ui #bench-slots{left:7px!important;
  top:calc(env(safe-area-inset-top,0px) + 157px)!important;
  gap:4px!important;max-width:calc(100% - 118px)!important}
 #battle-ui #bench-slots:not(.is-open) .bench-slot{display:none!important}
 #battle-ui #bench-slots .bench-caption{min-height:46px!important;
  min-width:47px!important;font-size:11px!important;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  background:#f5fff0f5!important;border:2px solid #94bea0!important}
 #battle-ui #bench-slots.is-open{flex-wrap:wrap!important;max-width:212px!important;
  background:#fff8eef5;border-radius:12px;padding:4px!important;
  box-shadow:0 5px 18px #22382c55}
 #battle-ui .bench-slot{min-width:46px!important;width:46px!important;height:54px!important}
}
@media(pointer:coarse) and (max-width:360px){
 #battle-ui .move-bar .move{min-width:50px!important;min-height:50px!important}
}

/* Readable cooldowns: never mask the entire Q/E icon and skill name with
   a dark number. A small corner badge shows remaining seconds instead. */
#battle-ui .move-bar .move.cooling{
 filter:none!important;opacity:.80!important;
 border-color:#9db4aa!important;background:#eff1ec!important;
}
#battle-ui .move-bar .move .cd{
 position:absolute!important;inset:auto!important;
 top:-7px!important;right:-5px!important;left:auto!important;bottom:auto!important;
 min-width:27px!important;width:auto!important;
 height:20px!important;min-height:20px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 padding:1px 4px!important;box-sizing:border-box!important;
 background:#516b61!important;color:#fff!important;
 border:1.5px solid #fffdf5!important;border-radius:10px!important;
 font:900 11px/1 system-ui,sans-serif!important;
 text-shadow:none!important;z-index:7!important;
 box-shadow:0 2px 5px #2d3c3866!important;pointer-events:none!important
}
@media(pointer:coarse) and (max-height:470px){
 #battle-ui .move-bar .move .cd{
  top:-6px!important;right:-3px!important;
  min-width:26px!important;height:19px!important;font-size:10px!important
 }
}

/* Explore maps must not inherit floating garden quests, collection bubbles,
   shop actions, or yard-surprise cards. Keep the map-specific controls and
   the region's own in-canvas discovery prompts visible. */
body.cb-exploring #first-quest,
body.cb-exploring #collection-goal,
body.cb-exploring #yard-duo-status,
body.cb-exploring #yard-surprise,
body.cb-exploring #yard-cat-switch,
body.cb-exploring #yard-actions,
body.cb-exploring #hud,
body.cb-exploring #tabbar{
 display:none!important;
}

/* Map navigation goes below the permanent studio toolbar instead of hiding
   beneath fullscreen, language and audio buttons. The region HUD is drawn
   at a separately calculated safe height in worldmap.js. */
body.cb-exploring #map-index{
 top:calc(env(safe-area-inset-top,0px) + 58px)!important;
 right:8px!important;min-height:40px;
}
body.cb-exploring #map-squad{
 top:calc(env(safe-area-inset-top,0px) + 58px)!important;
 min-height:40px;
}
@media(max-height:530px) and (orientation:landscape){
 body.cb-exploring #map-index,
 body.cb-exploring #map-squad{
   /* #stage is vertically shifted a few px in short mobile landscape.
      Use a proper toolbar gap in screen coordinates, not a 1px overlap. */
   top:calc(env(safe-area-inset-top,0px) + 66px)!important;
   min-height:36px;
 }
}

/* Prebattle party choices: show actual cat level, rarity, element, power,
   offensive/agility stats and carried HP without requiring a detail modal. */
#panel .map-squad-roster{grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr));
 max-height:min(45vh,360px);align-content:start}
#panel .map-squad-choice,#panel #cp-roster .chip{
 position:relative;display:flex;align-items:center;gap:9px;min-width:0;
 min-height:96px;text-align:left;border:2px solid #d6e2d4;
 background:#fffdf8;color:#385245;border-radius:13px;padding:9px;
 box-sizing:border-box;cursor:pointer;touch-action:manipulation;
 transition:border-color .13s,background-color .13s}
#panel .map-squad-choice.sel,#panel #cp-roster .chip.sel{
 border-color:#72a583;background:#edf8e9}
#panel #cp-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr));
 align-content:start;gap:8px;max-height:min(40vh,355px);overflow-y:auto;
 padding:4px;overscroll-behavior:contain;margin:8px 0 13px}
#panel .map-squad-choice canvas,#panel #cp-roster .chip canvas{
 width:58px!important;height:50px!important;flex:0 0 58px;
 object-fit:contain;align-self:center}
#panel .map-squad-choice .squad-cat-info,#panel #cp-roster .chip .squad-cat-info{
 display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;
 width:100%;font:700 11px/1.3 system-ui,sans-serif;overflow-wrap:anywhere}
#panel .squad-cat-info>strong{display:block;font:850 13px/1.25 system-ui,sans-serif;
 color:#304e3c;padding-right:25px}
#panel .squad-statline{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}
#panel .squad-statline-primary{font-size:11px}
#panel .squad-statline-secondary{color:#536d5e;font-size:11px}
#panel .squad-level{font-weight:900;color:#365e47}
#panel .squad-rarity{font-weight:850;padding:2px 5px;border-radius:5px;
 background:#f2f0fb}
#panel .squad-rarity.rarity-N{color:#5a665c;background:#ebeee9}
#panel .squad-rarity.rarity-R{color:#356ca3;background:#e5f1ff}
#panel .squad-rarity.rarity-SR{color:#8256ae;background:#f0e8fb}
#panel .squad-rarity.rarity-SSR{color:#97651e;background:#fff2cc}
#panel .squad-health-warning{display:block;color:#b36047;font-weight:750;font-size:10px}
#panel .squad-duplicate{font-size:10px;color:#748476}
#panel .battle-order-name{white-space:normal;line-height:1.25}
#panel .battle-order-name small{display:block;color:#6f8372;font-size:10px;margin-top:3px}
#panel .map-squad-choice:focus-visible,#panel #cp-roster .chip:focus-visible{
 outline:3px solid #427b60;outline-offset:2px}
@media(max-width:620px){
 #panel .map-squad-roster,#panel #cp-roster{grid-template-columns:minmax(0,1fr)}
 #panel .map-squad-choice,#panel #cp-roster .chip{min-height:85px;padding:7px 9px}
 #panel .map-squad-choice canvas,#panel #cp-roster .chip canvas{
  width:50px!important;height:46px!important;flex-basis:50px}
 #panel .map-squad-roster{max-height:35vh}
 #panel #cp-roster{max-height:32vh}
}
@media(max-height:480px) and (orientation:landscape){
 #panel .map-squad-roster,#panel #cp-roster{max-height:28vh}
}

/* ---------------- REVIEW: CLEAN YARD CONTROLS & PLACE MODE --------------- */
/* An unrelated all-purpose marquee should never block the painted garden. */
#collection-goal{display:none!important}
#yard-actions #yard-duo-status{
 position:absolute!important;inset:auto 0 calc(100% + 9px) auto!important;
 z-index:35!important;width:max-content;max-width:min(248px,68vw);
 padding:9px 12px;min-height:42px;border:2px solid #c495b7;
 border-radius:15px;background:linear-gradient(135deg,#fff8ec,#f7eaf7);
 color:#704d70;font:850 12px/1.3 system-ui;box-shadow:0 6px 19px #65476530;
 text-align:center;white-space:normal;cursor:pointer;
}
#yard-actions #yard-duo-status:hover{background:#fbedf5;transform:translateY(-2px)}
#yard-actions #yard-duo-status:focus-visible{outline:3px solid #7561a5}
#yard-quick-links{
 position:absolute;z-index:29;left:clamp(8px,2%,16px);bottom:88px;
 display:flex;flex-direction:row;gap:7px;max-width:48%;
}
#yard-quick-links button{
 border:1.5px solid #b4c7ad;border-radius:12px;
 background:#fffaf0e9;color:#4b6a50;min-height:43px;
 font:900 clamp(11px,1.3vw,14px)/1.2 system-ui;
 box-shadow:0 3px 12px #46553c20;padding:8px 10px;cursor:pointer;
}
#yard-quick-links button:focus-visible{outline:3px solid #46754c;outline-offset:2px}
#yard-quick-links button:hover{background:#eaf3e4}
#yard-placement-dock{
 position:absolute;z-index:66;left:50%;bottom:calc(77px + env(safe-area-inset-bottom,0px));
 transform:translateX(-50%);width:min(92%,460px);
 display:grid;gap:9px;padding:13px 16px;
 background:rgba(255,249,235,.97);color:#53664f;
 border:2px solid #a0c7a4;border-radius:17px;
 box-shadow:0 13px 40px #28352458;text-align:center;
}
#yard-placement-dock[hidden]{display:none!important}
#yard-placement-status{font:850 clamp(12px,2vw,15px)/1.45 system-ui}
.yard-placement-actions{display:flex;gap:9px;justify-content:center}
.yard-placement-actions button{min-height:44px;border-radius:11px;border:1px solid #a9c1a6;
 font:900 14px system-ui;padding:8px 16px;cursor:pointer;flex:1}
#yard-placement-cancel{background:#fff;color:#6d7373}
body.cb-placing-building #yard-actions,
body.cb-placing-building #yard-quick-links,
body.cb-placing-building #tabbar {opacity:.18;pointer-events:none}
body.cb-placing-building #scene{cursor:crosshair}
#stage:has(#battle-ui.on) #yard-quick-links,
#stage:has(#panel.open) #yard-quick-links,
body.cb-exploring #yard-quick-links,
body.cb-exploring #yard-placement-dock{display:none!important}
@media(max-width:650px){
 #yard-quick-links{left:7px;bottom:calc(116px + env(safe-area-inset-bottom,0px));
  flex-direction:column;gap:5px;max-width:36%}
 #yard-quick-links button{font-size:10px;min-height:37px;padding:6px 8px}
 #yard-actions #yard-duo-status{font-size:11px;max-width:min(238px,68vw);min-height:40px}
 #tabbar .tab .nav-caption{font-size:clamp(8px,2.25vw,11px);text-align:center}
 #yard-placement-dock{bottom:calc(66px + env(safe-area-inset-bottom,0px));
  padding:10px 12px;gap:7px}
}
@media(orientation:landscape) and (max-height:530px){
 #yard-quick-links{bottom:calc(95px + env(safe-area-inset-bottom,0px));left:8px;
  flex-direction:row;max-width:45%}
 #yard-quick-links button{min-height:36px}
 #yard-actions #yard-duo-status{bottom:calc(100% + 8px)!important;max-width:min(48vw,280px)}
 #yard-placement-dock{bottom:calc(61px + env(safe-area-inset-bottom,0px));padding:7px 12px}
}

/* Duo is understandable before the player chooses a pair. */
#panel .duo-skill-identity{
  display:grid;gap:8px;padding:12px 12px 10px;border-radius:16px;
  border:1px solid #e1ccdc;background:linear-gradient(148deg,#fff9ee,#f2e9fb 62%,#e9f5ed);
  text-align:center;
}
#panel .duo-skill-kicker{font:850 10px/1.35 system-ui;letter-spacing:.11em;color:#926ca0}
#panel .duo-skill-identity>strong{font:900 clamp(16px,3vw,21px)/1.3 system-ui;color:#744a83}
#panel #duo-skill-canvas{display:block;width:100%;aspect-ratio:16/9;
  border:1px solid #f3e8ef;border-radius:12px;background:#e9e3f4}
#panel .duo-skill-identity>.duo-art-description{margin:0;font-size:12px;line-height:1.5}
#panel .duo-skill-unlock{font-size:12px;line-height:1.5;font-weight:750}
#panel .duo-skill-unlock.locked{color:#8d7284}
#panel .duo-skill-unlock.unlocked{color:#397f68}
@media(max-width:520px){
 #panel .duo-skill-identity{padding:8px;gap:5px}
 #panel #duo-skill-canvas{aspect-ratio:16/10}
}


/* Cat Bond unlocked duo gallery: no dropdowns, no locked-skill spoilers.
 * Each visible card belongs to a saved pair with actual trust >= 20.
 * The canvas image is the very same continuous duo painting as in battle. */
#panel>.card:has(.duo-panel){width:min(790px,calc(100vw - 24px));max-width:min(790px,calc(100vw - 24px))}
#panel .duo-panel{max-width:none;margin:0 auto;gap:12px}
#panel .duo-unlocked-section{display:grid;gap:9px}
#panel .duo-unlocked-section>h3{margin:0;font:850 clamp(15px,2.4vw,19px)/1.25 system-ui;color:#695679}
#panel .duo-unlocked-section>h3 small{font-weight:750;color:#887b91}
#panel .duo-unlocked-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:10px}
#panel .duo-unlocked-card{width:100%;min-width:0;min-height:0;padding:7px;
 border:1.5px solid #dac9d8;border-radius:15px;
 background:linear-gradient(150deg,#fffcf7,#f4edfa);
 color:#4c4956;cursor:pointer;text-align:left;display:grid;gap:7px;
 box-shadow:0 3px 14px #947a9b16;transition:border-color .18s,box-shadow .18s}
#panel .duo-unlocked-card.chosen,
#panel .duo-unlocked-card:hover{border-color:#9c83bd;box-shadow:0 4px 18px #8e76b63c}
#panel .duo-unlocked-card:focus-visible{outline:3px solid #8a73af;outline-offset:2px}
#panel .duo-gallery-thumb{display:block;width:100%;height:auto;aspect-ratio:16/9;
 border-radius:10px;background:linear-gradient(130deg,#ebdcf3,#e2f2ed)}
#panel .duo-card-body{padding:1px 5px 6px;display:grid;gap:3px}
#panel .duo-card-body strong{font:800 clamp(13px,2vw,15px)/1.35 system-ui;color:#60516f}
#panel .duo-card-body b{font:900 clamp(14px,2.2vw,17px)/1.35 system-ui;color:#7a508b}
#panel .duo-card-body small{font:500 12px/1.5 system-ui;color:#6d6171}
#panel .duo-card-trust{font:750 12px/1.45 system-ui;color:#4b876c}
#panel .duo-new-pair-toggle{justify-self:start;font-size:13px;min-height:40px}
#panel .duo-empty{padding:17px 15px;border:1px dashed #d1c2d7;
 border-radius:13px;background:#fff9f1;color:#73647a;line-height:1.65}
#panel .duo-direct-chooser{display:grid;gap:8px;padding:13px 14px;
 border:1px solid #d7c8d5;border-radius:13px;background:#fffaf2}
#panel .duo-direct-chooser>p{margin:0}
#panel .duo-direct-chooser>strong{font:800 12px/1.4 system-ui;color:#655274}
#panel .duo-cat-chip-list{display:flex;flex-wrap:wrap;gap:6px;max-height:116px;
 overflow:auto;scrollbar-width:thin}
#panel .duo-cat-chip{border:1px solid #c3b3cb;border-radius:10px;
 background:#fffdf9;color:#5d5369;min-height:38px;padding:7px 10px;
 font:700 12px system-ui;cursor:pointer;touch-action:manipulation}
#panel .duo-cat-chip.selected{background:#eee4f7;border-color:#9b7cbc;color:#614178}
#panel .duo-cat-chip:focus-visible{outline:3px solid #8a73af}
#panel .duo-relation{padding:clamp(10px,2vw,18px)}
@media(max-width:520px){
 #panel>.card:has(.duo-panel){width:calc(100vw - 16px);max-width:calc(100vw - 16px)}
 #panel .duo-unlocked-grid{grid-template-columns:1fr}
 #panel .duo-gallery-thumb{max-height:196px;object-fit:cover}
 #panel .duo-panel{gap:9px}
 #panel .duo-unlocked-card{grid-template-columns:minmax(0,42%) minmax(0,1fr);gap:8px;align-items:center}
 #panel .duo-unlocked-card .duo-gallery-thumb{aspect-ratio:3/4;height:100%;min-height:120px}
 #panel .duo-card-body strong{font-size:12px}
 #panel .duo-card-body b{font-size:14px}
 #panel .duo-card-body small{font-size:11px}
}


/* Cat Bond: each earned duo move has one illustrated card; the lower section is
   relationship management and a journal of 13 genuine, per-pair memories. */
#panel .duo-relation-heading{margin:0;font:850 15px/1.35 system-ui;color:#735e81}
#panel .duo-current-pair{font:800 16px/1.35 system-ui;color:#6c5c76}
#panel .duo-memory-album{width:100%;margin:8px 0;padding:12px;border-radius:15px;
 background:linear-gradient(140deg,#fffaf1,#f0f8ed 70%,#f8f0fa);
 border:1px solid #dfd6cd;color:#5f5865;text-align:left}
#panel .duo-memory-album>strong{color:#665476}
#panel .duo-memory-album .tiny{color:#807381}
#panel .duo-memory-group-title{display:block;margin:10px 0 6px;font:800 12px/1.3 system-ui;color:#74667d}
#panel .duo-memory-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
#panel .duo-memory-grid.duo-memory-moments{grid-template-columns:repeat(3,minmax(0,1fr))}
#panel .duo-memory-stamp{font-family:inherit;cursor:pointer;min-height:70px;
 background:#fffdf7;border:1px solid #ded5d1;color:#665775;padding:6px 4px}
#panel .duo-memory-stamp.found{background:linear-gradient(145deg,#fff8eb,#f6f2fa);border-color:#d5bc9b}
#panel .duo-memory-stamp.missing{opacity:.65;background:#f2eeeb;cursor:default}
#panel .duo-memory-stamp.found:focus-visible{outline:2px solid #9279b0;outline-offset:2px}
#panel .duo-memory-stamp[aria-pressed=true]{border-color:#a68bc5;box-shadow:0 0 0 2px #cbb4e04f}
#panel .duo-memory-stamp .duo-memory-icon{font-size:19px;line-height:1.3}
#panel .duo-memory-stamp small{color:inherit;max-width:100%;white-space:normal;
 line-height:1.3;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
#panel .duo-memory-note{min-height:39px;margin-top:10px;padding:10px 12px;border-radius:11px;
 background:#fffdf8;border:1px solid #ebdfd3;line-height:1.6;font-size:12px;color:#6b5c70}
#panel .shop-qty-options{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#panel .shop-qty-options>.btn{min-height:40px;min-width:58px}
#panel .shop-bulk-list{display:grid;gap:8px}
#panel .shop-bulk-item{display:flex;justify-content:space-between;align-items:center;
 gap:10px;min-height:48px;text-align:left;border-radius:12px;background:#fffaf4;color:#534d65}
#panel .shop-bulk-item small{font-size:12px;white-space:nowrap;color:#7a5c63}
#panel .shop-bulk-item:disabled{opacity:.55;cursor:not-allowed}
#panel .cb-lazy-training{margin-top:7px;flex-wrap:wrap}
#panel .cb-train-note{margin:5px 0 10px;font-size:11px;color:#7b7277}
@media(max-width:540px){
 #panel .duo-memory-grid{gap:5px}
 #panel .duo-memory-stamp{min-height:66px;padding:5px 2px}
 #panel .duo-memory-stamp small{font-size:9px}
 #panel .shop-bulk-item{flex-wrap:wrap}
 #panel .shop-bulk-item small{white-space:normal}
 #panel .shop-qty-options>.btn{flex:1}
}


/* PREMIUM CAT BOND CONCEPT PANEL · pastel illustrated game UI.
   This styling is applied to the ACTUAL build/duo controls, not screenshots. */
#panel .cb-blueprint-heading{display:flex;align-items:center;gap:12px;padding:8px 12px 12px;
 margin:-2px 0 6px;border-bottom:1px solid #e7d8cc}
#panel .cb-blueprint-heading>span{width:46px;height:46px;flex:none;border-radius:50%;
 display:grid;place-items:center;font:900 29px/1 Georgia,serif;color:#a47d94;
 background:radial-gradient(circle,#fff9e9,#f3e6f4);border:2px solid #e2cdd9;
 box-shadow:inset 0 2px 7px #fff,0 4px 9px #8b7a8422}
#panel .cb-blueprint-heading h2{margin:0;color:#67596c;font:850 clamp(20px,3vw,28px)/1.3 system-ui}
#panel .cb-blueprint-heading small{color:#8a7e86;letter-spacing:.05em;font-size:11px}
#panel:has(.cb-build-blueprint-card) .card{width:min(710px,calc(100vw - 18px));
 max-width:min(710px,calc(100vw - 18px));
 background:linear-gradient(145deg,#fffdf6,#f9f6f1 40%,#f2f7ec)}
#panel .cb-build-blueprint-card{display:grid;grid-template-columns:142px minmax(0,1fr) auto;
 gap:12px;align-items:center;border:1px solid #ded6c8;border-radius:18px;
 padding:11px;background:linear-gradient(135deg,#fffefa,#f4f6ed);
 box-shadow:0 7px 18px #69796a12, inset 0 1px #ffffff}
#panel .cb-build-blueprint-card .st-ico{display:none}
#panel .cb-build-blueprint-card .cb-build-thumb{display:block;width:142px;height:108px;
 object-fit:contain;border-radius:14px;border:1px solid #d8e4d2;
 background:#f2f7ec;box-shadow:inset 0 2px 10px #7eae8e18}
#panel .cb-build-blueprint-card .st-main{min-width:0}
#panel .cb-build-blueprint-card .st-name{color:#546e57;font-size:clamp(14px,2vw,17px);font-weight:850}
#panel .cb-build-blueprint-card .work-usage{line-height:1.55;color:#736e66;font-size:12px}
#panel .cb-build-blueprint-card .work-income{font-weight:750;color:#856d58}
#panel .cb-build-blueprint-card [data-build]{border-radius:12px;min-height:47px;
 color:#fff;border:1px solid #598b71;background:linear-gradient(125deg,#78aa86,#508d78);
 box-shadow:0 4px 12px #67937435;font-weight:850;min-width:98px}
#panel .cb-build-blueprint-card [data-build]:disabled{opacity:.55}
#yard-placement-dock{background:linear-gradient(145deg,#fffef8ec,#f3f9edf7 66%,#f8f2f3f7);
 border:2px solid #b3c9b0;box-shadow:0 9px 35px #35493832, inset 0 1px #fff;
 border-radius:21px;backdrop-filter:blur(14px);color:#55705b}
#yard-placement-dock .cb-placement-heading{display:flex;align-items:center;justify-content:center;gap:10px;
 padding:2px 4px 6px;border-bottom:1px solid #d6e2d0}
#yard-placement-dock .cb-placement-seal{font:900 28px Georgia,serif;color:#7bab88;
 display:grid;place-items:center;width:43px;height:43px;border-radius:50%;
 background:#fff7ee;box-shadow:0 0 0 2px #d9e5d5}
#yard-placement-dock .cb-placement-heading-text{display:grid;text-align:left;gap:2px}
#yard-placement-dock .cb-placement-heading-text strong{font:850 14px/1.3 system-ui;color:#56705d}
#yard-placement-dock .cb-placement-heading-text small{font:550 11px/1.4 system-ui;color:#818b7b}
#panel .duo-panel>h2{color:#76617b;font:850 clamp(22px,3vw,30px)/1.28 system-ui;
 text-shadow:0 1px #fff8f4;letter-spacing:.015em}
#panel .duo-unlocked-section{padding:13px;border:1px solid #e4d7d0;border-radius:21px;
 background:linear-gradient(140deg,#fffaf4,#f4f8f0 50%,#f7f0f8);
 box-shadow:inset 0 1px #fff,0 8px 25px #725f7212}
#panel .duo-unlocked-card{position:relative;overflow:hidden;padding:8px;
 background:linear-gradient(145deg,#fffefd,#fff7ed 42%,#f5f5f6);
 border:2px solid #e2c9d7;border-radius:18px;
 box-shadow:0 7px 19px #8b658421, inset 0 1px #fff}
#panel .duo-unlocked-card.chosen{border-color:#b4cba5;
 background:linear-gradient(145deg,#fffefa,#edf7ec);
 box-shadow:0 0 0 2px #d6e8cfb0,0 9px 24px #6c987c27}
#panel .duo-unlocked-card::after{content:'✦';position:absolute;right:17px;top:9px;
 font:18px Georgia,serif;color:#ffeed1ba;pointer-events:none;
 text-shadow:0 1px 3px #a9ae9b9c}
#panel .duo-unlocked-card .duo-gallery-thumb{border:1px solid #f0e8dc;
 border-radius:12px;box-shadow:inset 0 -12px 25px #aac4aa2d;
 background:linear-gradient(120deg,#e6ecf3,#f8eddd 55%,#e6f0e7)}
#panel .duo-card-body{padding:3px 5px 7px;gap:5px}
#panel .duo-card-body strong{color:#5e7d68;font-size:14px}
#panel .duo-card-body b{color:#86637f;font-size:16px}
#panel .duo-card-body small{color:#747579;line-height:1.6}
#panel .duo-card-trust{display:inline-flex;align-items:center;justify-self:start;
 border-radius:999px;padding:3px 9px;background:#e7f2e2;color:#54806a;
 border:1px solid #c5dfc3;font-size:11px}
#battle-ui #duo-burst{--duo-charge:0%;display:flex;align-items:center;gap:8px;
 padding:8px 11px 10px;max-width:min(44vw,248px);min-height:53px;
 border-radius:17px;color:#526e5c;white-space:normal;
 border:2px solid #b5cdb6;background:linear-gradient(135deg,#fff9e9,#f4f6ed 55%,#efe6f4);
 box-shadow:0 5px 18px #405a4a42, inset 0 1px #fff;overflow:hidden}
#battle-ui #duo-burst[hidden]{display:none!important}
#battle-ui #duo-burst:disabled{filter:saturate(.76);opacity:.82;cursor:not-allowed}
#battle-ui #duo-burst.ready{border-color:#9bcbad;color:#365f4d;
 background:linear-gradient(125deg,#fff6df,#e2f1e2 60%,#ebedff);
 box-shadow:0 0 0 2px #fff6eb99,0 5px 18px #55866d75;
 animation:cbPremiumDuoReady 1.5s ease-in-out infinite}
@keyframes cbPremiumDuoReady{50%{box-shadow:0 0 0 3px #f6eedc,0 6px 25px #84b89688}}
#battle-ui #duo-burst .duo-burst-emblem{display:grid;place-items:center;flex:none;
 width:33px;height:33px;border:1px solid #d6dcbf;border-radius:50%;
 background:radial-gradient(circle,#fffef6 10%,#e8f5e2 85%);
 box-shadow:inset 0 2px 5px #ffffff,0 2px 5px #748d7933;
 color:#8b9e72;font:900 23px Georgia,serif}
#battle-ui #duo-burst .duo-burst-label{flex:1;min-width:0;font:850 12px/1.3 system-ui;
 text-align:left;z-index:1;letter-spacing:.012em}
#battle-ui #duo-burst .duo-burst-track{position:absolute;left:49px;right:11px;bottom:5px;
 height:4px;border-radius:999px;background:#d2dccd;overflow:hidden}
#battle-ui #duo-burst .duo-burst-track i{display:block;width:var(--duo-charge);
 height:100%;background:linear-gradient(90deg,#87bdab,#d4bd8a);
 border-radius:999px;transition:width .16s ease-out}
@media(max-width:600px){
 #panel .cb-build-blueprint-card{grid-template-columns:92px minmax(0,1fr);gap:9px;padding:8px}
 #panel .cb-build-blueprint-card .cb-build-thumb{width:92px;height:96px;grid-row:span 2}
 #panel .cb-build-blueprint-card .st-btns{grid-column:2;justify-self:start}
 #panel .cb-build-blueprint-card [data-build]{min-height:40px;min-width:110px}
 #yard-placement-dock .cb-placement-heading{gap:8px}
 #yard-placement-dock .cb-placement-heading-text small{font-size:10px}
 #battle-ui #duo-burst{max-width:min(47vw,220px);min-height:48px;padding:6px 8px 9px;gap:6px;
 border-radius:14px}
 #battle-ui #duo-burst .duo-burst-emblem{width:28px;height:28px;font-size:19px}
 #battle-ui #duo-burst .duo-burst-label{font-size:10px}
 #battle-ui #duo-burst .duo-burst-track{left:43px;right:9px}
}
@media(orientation:landscape) and (max-height:530px){
 #battle-ui #duo-burst{min-height:35px;padding:3px 7px 7px}
 #battle-ui #duo-burst .duo-burst-emblem{width:23px;height:23px;font-size:16px}
 #battle-ui #duo-burst .duo-burst-label{font-size:10px}
 #battle-ui #duo-burst .duo-burst-track{height:3px;left:37px;bottom:2px}
 #yard-placement-dock .cb-placement-heading{display:none}
}

/* Visual QA correction: one owned duo must NOT inflate a single watercolor
   painting into the entire modal, and mobile canvases must keep their
   natural 16:9 proportions (no squeezed cats). */
#panel .duo-unlocked-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,265px),1fr));align-items:start}
#panel .duo-unlocked-card .duo-gallery-thumb{display:block;max-height:none;aspect-ratio:16/9!important;
 width:100%;height:auto!important;object-fit:contain!important}
@media(max-width:520px){
 #panel .duo-unlocked-grid{grid-template-columns:minmax(0,1fr)}
 #panel .duo-unlocked-card{display:grid;grid-template-columns:minmax(0,1fr);gap:5px}
 #panel .duo-unlocked-card .duo-gallery-thumb{width:100%;height:auto!important;
  aspect-ratio:16/9!important;min-height:0!important;max-height:none!important}
 #panel .duo-unlocked-card .duo-card-body{padding:6px 8px 8px}
}

/* 2026-11-22 Cat Bond · cozy, high-contrast navigation and storybook intro.
   Single/Duo are INSIDE the bottom Cats tab; no floating skill or duo strips. */
#yard-quick-links,#yard-duo-status{display:none!important}
#cat-duo-dot{position:absolute;top:-4px;right:-7px;width:10px;height:10px;border-radius:50%;
 background:#f38e8e;box-shadow:0 0 0 2px #fff8ed,0 0 0 4px #eab8a8}
#cat-duo-dot[hidden]{display:none!important}
#tabbar{background:linear-gradient(0deg,rgba(254,249,235,.98),rgba(254,249,235,.91))!important;
 border-top:1px solid #e3d8bd;box-shadow:0 -6px 28px #83674e17;gap:6px}
#tabbar .tab{color:#60705c;background:#fffdf8;border:1px solid #e5e4d7;
 box-shadow:0 2px 8px #4f664512}
#tabbar .tab.active{color:#375d49;background:linear-gradient(145deg,#def1dc,#f7e9d9);
 border-color:#a8cfb3;box-shadow:0 3px 11px #67855a21}
#panel .cat-hub-tabs{display:flex;gap:8px;padding:5px;margin:0 24px 16px 0;
 background:#eef2e9;border:1px solid #d9e2d2;border-radius:16px}
#panel .cat-hub-tabs button{flex:1;min-width:0;min-height:44px;padding:9px 10px;
 border:1px solid transparent;background:transparent;border-radius:12px;
 color:#667b6a;font:800 14px/1.2 system-ui,"PingFang SC",sans-serif;cursor:pointer}
#panel .cat-hub-tabs button[aria-selected="true"]{background:#fffdf7;border-color:#d4dfcf;
 color:#365d4b;box-shadow:0 3px 12px #5c776525}
#panel .cat-hub-tabs button:focus-visible{outline:3px solid #6c9a7b}
#panel .cat-new-skill{position:absolute;z-index:2;top:4px;left:3px;
 background:linear-gradient(110deg,#fff0be,#fce1d8);color:#82572f;
 border:1px solid #ebcb89;border-radius:11px;padding:3px 6px;font:900 10px/1.2 system-ui}
#panel .breed-group{position:relative}
#intro{
 isolation:isolate;
 background:radial-gradient(circle at 83% 14%,#fff9e8 0 7%,transparent 19%),
  linear-gradient(178deg,#f9f2e9 0%,#f6edec 37%,#e4f0e0 72%,#d4e9d1 100%);
 color:#375743;position:absolute;overflow-x:hidden;gap:12px;
}
#intro::before{
 content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
 background:
 radial-gradient(ellipse at 9% 99%,#bddbbf 0 22%,transparent 22.3%),
 radial-gradient(ellipse at 92% 99%,#c8e5c9 0 25%,transparent 25.3%),
 radial-gradient(ellipse at 48% 112%,#e3efd4 0 31%,transparent 31.3%),
 radial-gradient(circle at 13% 16%,#fffefd 0 2.5px,transparent 4px),
 radial-gradient(circle at 79% 26%,#fdfefa 0 3px,transparent 5px);
 opacity:.9;
}
#intro::after{
 content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
 background:
 radial-gradient(circle at 11% 77%,#eb9fa8 0 2px,transparent 3px),
 radial-gradient(circle at 15% 81%,#f8c7a6 0 3px,transparent 4px),
 radial-gradient(circle at 85% 81%,#f5cf91 0 3px,transparent 4px),
 radial-gradient(circle at 89% 75%,#edafb6 0 3px,transparent 4px),
 radial-gradient(circle at 5% 88%,#fff9e4 0 5px,transparent 6px),
 radial-gradient(circle at 95% 88%,#fff9e4 0 5px,transparent 6px);
 opacity:.92;
}
#intro .studio-badge{gap:1px}
#intro .studio-text{font-weight:900;letter-spacing:.19em;color:#688d75;font-size:13px}
#intro .studio-wish{color:#b07b7e}
#intro .studio-tag{color:#947a78;letter-spacing:.18em;font-weight:800;font-size:10px}
#intro .studio-moon{filter:drop-shadow(0 4px 6px #d1ac7855)}
#intro .game-logo{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
 font-weight:950;font-size:clamp(34px,5.5vw,60px);line-height:1.12;letter-spacing:.08em;
 color:#3c6454;text-shadow:0 2px #fffdf5,0 7px 22px #537c5c33}
#intro .game-logo::after{left:27%;right:27%;height:4px;
 background:linear-gradient(90deg,transparent,#f2bf99,#dca5ad,#afcfb1,transparent)}
#intro .game-logo .logo-en{margin-top:6px;font-weight:900;color:#b18b86;letter-spacing:.26em}
#intro .intro-cat-gallery{
 width:min(730px,94vw);height:clamp(152px,25vh,250px);border-radius:35px;
 background:radial-gradient(ellipse at 52% 60%,#fffdf8c9,transparent 72%),
 linear-gradient(180deg,#fff7eceb 0%,#f3ebebed 50%,#c8e3c5e8 100%);
 border:2px solid #ffffffd9;box-shadow:0 13px 28px #64836930,inset 0 -18px 25px #8eaf8822;
 overflow:hidden;flex:0 0 auto;margin:5px auto 1px;
}
#intro .intro-cat-gallery::after{
 content:"";position:absolute;z-index:0;bottom:-15%;left:-5%;right:-5%;height:38%;
 background:radial-gradient(ellipse at 55% 88%,#b2d5ab 0 49%,transparent 50%),
 linear-gradient(0deg,#beddb0 0%,transparent 93%);opacity:.66;pointer-events:none;
}
#intro #intro-cats{position:relative;z-index:1;width:100%;height:100%;object-fit:contain;
 filter:drop-shadow(0 6px 8px #5a6d4b38)}
#intro .intro-gallery-caption{position:absolute;z-index:2;bottom:8px;left:50%;
 transform:translateX(-50%);white-space:nowrap;
 background:#fffaf0ef;color:#6f8168;font:800 clamp(9px,1.7vw,12px)/1.3 system-ui;
 padding:5px 13px;border-radius:999px;border:1px solid #edf0dd;
 box-shadow:0 3px 11px #68806d19}
#intro .intro-cat-glint{z-index:3;right:16px;top:11px;color:#eab47d}
#intro>p:not(#start-error){background:transparent;color:#59725f;box-shadow:none;
 font-size:clamp(13px,1.65vw,17px);font-weight:750;padding:3px 11px;
 max-width:650px;line-height:1.6}
#intro .intro-features{max-width:550px;width:min(550px,100%);gap:9px;margin:5px auto}
#intro .intro-features span{min-height:45px;border-radius:14px;
 background:#fffdf8e8;border:1.4px solid #dce7d6;
 color:#4f705c;box-shadow:0 4px 13px #69836614;
 font-size:clamp(11px,1.5vw,14px);font-weight:800;padding:8px 14px}
#intro .intro-guide{background:#fcf3e7db;border:1px solid #ead9c9;color:#8b746b;
 border-radius:999px;box-shadow:none;font-size:12px;padding:7px 15px}
#intro #intro-start{background:linear-gradient(120deg,#7ebf99,#aad8b4)!important;
 border:1px solid #72ae89!important;color:#fffef7!important;
 box-shadow:0 8px 22px #5283683d!important;border-radius:16px!important;
 font-size:clamp(15px,2vw,19px)!important;font-weight:900!important;min-height:52px}
#intro #intro-start:hover{filter:brightness(1.035);transform:translateY(-1px)}
#intro #intro-reset{background:none!important;font-size:11px;color:#7c8579}
@media(max-width:650px){
 #intro{padding:calc(42px + env(safe-area-inset-top,0px)) 11px
 calc(18px + env(safe-area-inset-bottom,0px));gap:8px;justify-content:flex-start;overflow-y:auto}
 #intro .game-logo{font-size:clamp(29px,9.5vw,44px)}
 #intro .game-logo .logo-en{font-size:10px;margin-top:4px}
 #intro .intro-cat-gallery{width:min(96vw,540px);height:clamp(125px,22vh,205px);
 border-radius:23px;min-height:0}
 #intro .intro-features{gap:7px}
 #intro .intro-features span{font-size:clamp(10px,2.65vw,13px);min-height:42px;padding:7px 8px}
 #intro .intro-guide{border-radius:14px;font-size:11px;padding:7px 10px}
 #intro>p:not(#start-error){font-size:12px;line-height:1.45;padding:0 6px}
 #intro #intro-start{width:min(94%,350px);min-height:48px}
 #panel .cat-hub-tabs{margin-right:20px}
}
@media(max-height:660px){
 #intro .intro-cat-gallery{height:clamp(105px,21vh,185px)}
 #intro .intro-features span{min-height:36px}
 #intro .intro-guide{margin:2px auto}
}


/* 2026-11-21 STORYBOOK GARDEN: intentionally translucent navigation canvas.
   The yard painting stays visible through the toolbar; each action is its own
   distinct, high-contrast pastel button. No giant white plate over the scene. */
:root{
 --cb-blush:#f6c7d2;--cb-lilac:#e8d8f5;--cb-butter:#fae5ae;
 --cb-sky:#d6e9f8;--cb-mint:#d6ebdf;--cb-ink:#60536d;
}
#stage{background:linear-gradient(150deg,#e6d8ef,#f9e6db 51%,#e5ddd4)!important}
#tabbar{
 background:transparent!important;
 background-image:none!important;
 border:0!important;box-shadow:none!important;
 isolation:isolate;
 padding:8px clamp(8px,1.5vw,18px) max(12px,env(safe-area-inset-bottom,0px))!important;
 gap:clamp(5px,1vw,12px)!important;
}
#tabbar .tab{
 position:relative;min-width:0;
 border:1.5px solid #ffffffd6!important;
 border-radius:19px!important;color:#5f506b!important;
 background:linear-gradient(158deg,#fff8f3df,#f1e5f1d9)!important;
 box-shadow:0 4px 0 #a68a9a26,0 9px 18px #6c607a1b,inset 0 2px 2px #fffdf9bd!important;
 backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
 font-weight:850;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
 text-shadow:0 1px 0 #ffffffbd;
}
#tabbar .tab:nth-child(1){background:linear-gradient(155deg,#f9eaffef,#e7d5f6e6)!important}
#tabbar .tab:nth-child(2){background:linear-gradient(155deg,#ffefdce9,#f9dfbae8)!important}
#tabbar .tab:nth-child(3){background:linear-gradient(155deg,#e9f5ffed,#d5e6f6e6)!important}
#tabbar .tab:nth-child(4){background:linear-gradient(155deg,#fff0f5ed,#f6d6e4e6)!important}
#tabbar .tab:nth-child(5){background:linear-gradient(155deg,#ecf9f1ed,#d9ebdce6)!important}
#tabbar .tab.active{
 color:#624772!important;border-color:#c79ac5!important;
 background:linear-gradient(145deg,#f8d7e9f5,#ecdbfaf5)!important;
 box-shadow:0 0 0 2px #fff8f0bd,0 4px 0 #ad7fa22e,0 7px 16px #8c608c30!important;
 transform:translateY(-2px);
}
#tabbar .tab:focus-visible,
#yard-actions .fab:focus-visible,
#panel button:focus-visible,
#intro button:focus-visible{
 outline:3px solid #ad84b8!important;outline-offset:3px;
}
#tabbar .tab .ico{filter:drop-shadow(0 1px 1px #fff9efcc)}
#yard-actions{gap:9px}
#yard-actions .fab{
 background:linear-gradient(155deg,#ffedebf7,#edc7def7)!important;
 border:2px solid #fff3eff0!important;
 color:#66536a!important;border-radius:19px!important;
 box-shadow:0 5px 0 #987e902c,0 11px 18px #5a53642d,inset 0 2px 5px #fffdfcc2!important;
 text-shadow:0 1px 0 #fff8ef;
 backdrop-filter:blur(8px);
 transition:transform .15s,box-shadow .15s!important;
}
#yard-actions .fab:nth-child(1){background:linear-gradient(145deg,#ecf5ffee,#c6dff2f0)!important;border-color:#f4fbff!important}
#yard-actions .fab:nth-child(2){background:linear-gradient(145deg,#fff1dff0,#f5d7bdf2)!important;border-color:#fff6ec!important}
#yard-actions .fab:nth-child(3){background:linear-gradient(145deg,#f5e4ffee,#e0cbf0f0)!important;border-color:#fff3ff!important}
#yard-actions .fab:nth-child(4){background:linear-gradient(145deg,#ffe7eff0,#f4c6d3f2)!important;border-color:#fff6f7!important}
#yard-actions .fab:nth-child(5){background:linear-gradient(145deg,#fff6d9ed,#f6e1b7f0)!important;border-color:#fffaf1!important}
#yard-actions .fab:hover{transform:translateY(-2px) scale(1.03)}
#yard-actions .fab:active{transform:translateY(2px) scale(.97);box-shadow:0 2px 9px #73627525!important}
#fab-map.map-fab{border-radius:20px!important;color:#665577!important}
#fab-map.map-fab small{font-size:11px;letter-spacing:.04em}
#hud .hud-pill,.scene-title{
 color:#695369!important;background:#fff2f0bf!important;
 border:1.5px solid #ffffffd9!important;border-radius:16px!important;
 box-shadow:0 3px 13px #866f8240!important;
 backdrop-filter:blur(9px);
}
#hud .hud-pill:nth-child(2){background:#edf2ffbd!important}
#first-quest{
 color:#704f6e;background:#fff1f0e0!important;
 border:1.5px solid #fff6f0!important;border-radius:18px!important;
 box-shadow:0 7px 18px #8a69802c!important;backdrop-filter:blur(10px);
}
#intro{
 background:radial-gradient(circle at 79% 14%,#fff4d8b8 0 11%,transparent 27%),
 linear-gradient(164deg,#e8e3f6 0%,#f9dfeb 33%,#fff1e3 65%,#e3ecdc 100%)!important;
}
#intro::before{
 background:radial-gradient(ellipse at 12% 110%,#e9c8e3 0 19%,transparent 19.5%),
 radial-gradient(ellipse at 88% 111%,#d8d1eb 0 24%,transparent 24.5%),
 radial-gradient(ellipse at 50% 119%,#f4e0d1 0 31%,transparent 31.5%)!important;
}
#intro::after{
 background:radial-gradient(circle at 10% 76%,#f0adc2 0 3px,transparent 4px),
 radial-gradient(circle at 18% 85%,#fff8e5 0 3px,transparent 4px),
 radial-gradient(circle at 89% 79%,#d4b4e9 0 3px,transparent 4px),
 radial-gradient(circle at 78% 89%,#f8cba1 0 4px,transparent 5px)!important;
}
#intro .intro-cat-gallery{
 background:radial-gradient(ellipse at 50% 54%,#fff9eacb,transparent 76%),
 linear-gradient(160deg,#f9e8ece3,#e8ddf0c9 55%,#f7e8daca)!important;
 border:2px solid #fff8f3d9!important;
 box-shadow:0 10px 25px #a58baa30!important;
}
#intro .intro-cat-gallery::after{
 background:radial-gradient(ellipse at 55% 89%,#e3cfe2 0 50%,transparent 50.5%),
 linear-gradient(0deg,#ebd7e1 0%,transparent 93%)!important;
}
#intro .intro-features span{
 background:#fff8f14d!important;
 border:1px solid #fff9f3b8!important;
 box-shadow:none!important;
 backdrop-filter:blur(4px);color:#715875!important;
}
#intro .intro-guide{background:#fff6ef88!important;border-color:#fffaf3c7!important;color:#795b77!important}
#intro .game-logo{color:#765977!important;text-shadow:0 2px #fff9f4,0 8px 19px #866d9733!important}
#intro .logo-en{color:#a480a3!important}
#intro #intro-start{
 color:#5d4165!important;border:2px solid #fff6f0!important;
 background:linear-gradient(135deg,#f8cddd,#e3d2f7 56%,#f9e5c1)!important;
 border-radius:23px!important;
 box-shadow:0 5px 0 #b487ac40,0 13px 22px #896b8e32!important;
}
#intro #intro-start:active{transform:translateY(2px)}
#panel .card{
 border:1.5px solid #fff6ed!important;
 border-radius:23px;
 background:linear-gradient(145deg,#fff9f2f5,#f7eef9f3 50%,#f2f6ecf3)!important;
 color:#65556e;box-shadow:0 20px 45px #77627a55;
}
#panel .btn,
#panel button:not(.card-close):not(.panel-dismiss):not(.duo-unlocked-card):not(.cat-card):not(.dex-cell),
#yard-placement-dock button{
 border-radius:15px;
 box-shadow:0 3px 0 #8a738123;
}
#panel .btn.gold,
#panel .btn:not(.ghost),#panel .capture-mode-option[aria-checked="true"]{
 color:#654c66!important;
 background:linear-gradient(135deg,#f9d1dc,#e4d5f6)!important;
 border:1.5px solid #e9c1d9!important;
}
#panel .btn.ghost{background:#f6ecf7db;color:#66546e}
#panel .cat-hub-tabs{
 background:#f5eafaab!important;border:1px solid #ead7ee!important;border-radius:18px!important;
}
#panel .cat-hub-tabs button[aria-selected="true"]{
 background:linear-gradient(135deg,#fff4f5,#f0e4ff)!important;border-color:#dec7e8!important;
 color:#725372!important;
}
#panel .card-close,#panel .panel-dismiss{
 color:#664e69!important;background:#fcebf6ed!important;
 border:2px solid #fff8f6!important;border-radius:50%!important;
 box-shadow:0 3px 9px #7c647b30!important;
}
#yard-placement-dock{
 background:linear-gradient(145deg,#fff9f5e9,#f2e5f8e6)!important;
 border:2px solid #fff6eac2!important;color:#715c72!important;
 backdrop-filter:blur(10px);border-radius:22px!important;
}
#yard-placement-dock #yard-placement-cancel{background:#f7eff4!important;color:#725671!important}
@media(max-width:700px){
 #tabbar{gap:4px!important;padding:5px 5px max(8px,env(safe-area-inset-bottom,0px))!important}
 #tabbar .tab{border-radius:13px!important;min-height:48px;padding:5px 2px}
 #tabbar .tab .ico{font-size:clamp(16px,4.7vw,21px)}
 #yard-actions .fab{border-radius:15px!important}
 #first-quest{top:calc(100px + env(safe-area-inset-top,0px))!important;left:50%;max-width:calc(100vw - 20px)}
 #hud{top:calc(45px + env(safe-area-inset-top,0px))!important}
}
@media(orientation:landscape) and (max-height:530px){
 #tabbar .tab{min-height:39px;padding:3px 2px}
 #first-quest{top:calc(88px + env(safe-area-inset-top,0px))!important;max-width:min(63vw,440px)}
}
@media(prefers-reduced-motion:reduce){
 #tabbar .tab,#yard-actions .fab{transition:none!important}
}

/* Paw-print button details: tiny non-interactive marks, accessible labels
   unchanged; silhouettes fit inside controls even on 320px screens. */
#tabbar .tab,#yard-actions .fab{isolation:isolate}
#tabbar .tab::after,#yard-actions .fab::after{
 content:"";position:absolute;pointer-events:none;
 width:14px;height:14px;right:3px;bottom:3px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23896a91'%3E%3Cpath d='M21 41c1-5 6-10 11-10s10 5 11 10c5 3 6 8 3 11-2 3-6 4-10 2-3-2-5-2-8 0-6 4-12 0-12-6 0-3 2-5 5-7Z'/%3E%3Cellipse cx='13' cy='29' rx='6' ry='8' transform='rotate(-24 13 29)'/%3E%3Cellipse cx='25' cy='20' rx='6' ry='9' transform='rotate(-8 25 20)'/%3E%3Cellipse cx='40' cy='20' rx='6' ry='9' transform='rotate(11 40 20)'/%3E%3Cellipse cx='52' cy='30' rx='6' ry='8' transform='rotate(24 52 30)'/%3E%3C/g%3E%3C/svg%3E");
 background-size:contain;background-repeat:no-repeat;background-position:center;
 opacity:.29;transform:rotate(-18deg);transition:opacity .15s,transform .15s;
}
#tabbar .tab:nth-child(1)::after{opacity:.53;right:4px;bottom:4px;width:17px;height:17px}
#tabbar .tab:nth-child(1)::before{
 content:"";position:absolute;pointer-events:none;
 top:-6px;left:15%;width:70%;height:14px;z-index:-1;
 background:#ead4f2;border:1.5px solid #fff5f4;
 clip-path:polygon(0% 100%,8% 0%,32% 65%,68% 65%,92% 0%,100% 100%);
}
#yard-actions .fab::after{width:18px;height:18px;bottom:2px;right:2px;opacity:.26}
#yard-actions #fab-play::after,#yard-actions #fab-seek::after{opacity:.48}
#tabbar .tab:active::after,#yard-actions .fab:active::after{
 opacity:.66;transform:rotate(-8deg) scale(.84);
}
#panel .btn.gold,#panel .btn.primary,#yard-placement-confirm{
 position:relative;
}
#panel .btn.gold::after,#panel .btn.primary::after,
#yard-placement-confirm::after{
 content:"";display:inline-block;vertical-align:-2px;
 width:15px;height:15px;margin-left:6px;pointer-events:none;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23896a91'%3E%3Cpath d='M21 41c1-5 6-10 11-10s10 5 11 10c5 3 6 8 3 11-2 3-6 4-10 2-3-2-5-2-8 0-6 4-12 0-12-6 0-3 2-5 5-7Z'/%3E%3Cellipse cx='13' cy='29' rx='6' ry='8' transform='rotate(-24 13 29)'/%3E%3Cellipse cx='25' cy='20' rx='6' ry='9' transform='rotate(-8 25 20)'/%3E%3Cellipse cx='40' cy='20' rx='6' ry='9' transform='rotate(11 40 20)'/%3E%3Cellipse cx='52' cy='30' rx='6' ry='8' transform='rotate(24 52 30)'/%3E%3C/g%3E%3C/svg%3E");
 background-size:contain;background-position:center;background-repeat:no-repeat;
 opacity:.55;
}
@media(max-width:420px){
 #tabbar .tab::after{width:11px;height:11px;bottom:2px;right:1px}
 #tabbar .tab:nth-child(1)::after{width:13px;height:13px;right:2px}
 #yard-actions .fab::after{width:14px;height:14px}
}


/* 2026-11-21: real intro collision fix. The caption is a separate flex child
   AFTER the cat gallery, never a floating layer across illustrated paws. */
#intro > .intro-cat-gallery{margin-bottom:0!important;}
#intro > .intro-gallery-caption{
 position:static!important;inset:auto!important;left:auto!important;bottom:auto!important;
 transform:none!important;z-index:1;display:block;flex:0 0 auto;
 align-self:center;max-width:min(92%,490px);width:max-content;
 margin:0 auto 3px;padding:6px 16px;
 background:rgba(255,248,243,.72);border:1px solid #ffffffb5;
 border-radius:999px;box-shadow:0 3px 11px #8c719321;
 color:#775f7d;font:850 clamp(12px,2.1vw,16px)/1.45 system-ui,sans-serif;
 white-space:normal;text-align:center;overflow-wrap:anywhere;
}
@media(max-width:650px){
 #intro > .intro-cat-gallery{margin-bottom:0!important}
 #intro > .intro-gallery-caption{font-size:clamp(11px,3.3vw,14px);padding:5px 12px;
   max-width:calc(100% - 24px);margin:0 auto 2px}
}
@media(max-height:620px){
 #intro > .intro-gallery-caption{padding:4px 10px;font-size:12px;margin:0 auto}
}

/* Every earned duo tile is a direct viewer action, not a pair selector. */
#panel .duo-unlocked-card{
 cursor:pointer;touch-action:manipulation;transition:transform .18s,box-shadow .18s,border-color .18s;
}
#panel .duo-unlocked-card:hover{transform:translateY(-2px)}
#panel .duo-unlocked-card:active{transform:translateY(1px) scale(.992)}
#panel .duo-unlocked-card:focus-visible{outline:3px solid #a07ebe;outline-offset:3px}
#panel .duo-card-watch{display:inline-flex;align-items:center;justify-content:center;
 width:fit-content;max-width:100%;gap:6px;min-height:29px;
 border-radius:999px;padding:5px 11px;
 font:850 12px/1.25 system-ui,sans-serif;
 color:#724e7b;background:linear-gradient(115deg,#f9e5f1,#eee2fd);
 border:1px solid #d9bfdc;box-shadow:0 2px 5px #9b829525;
}
#panel .duo-unlocked-card:hover .duo-card-watch{background:#f6d9ed}
#panel .duo-unlocked-card .duo-gallery-thumb{
 aspect-ratio:16/9!important;width:100%;height:auto!important;
 border-radius:13px;object-fit:contain;filter:contrast(1.07) saturate(1.07);
 background:linear-gradient(150deg,#fffbf4,#f1e9f5 48%,#e7f0ea);
}

/* Accessible, same-page animation viewer. Close is always above its iframe,
   including narrow portrait phones with safe-area cutouts. */
#cb-duo-viewer{
 position:fixed;inset:0;z-index:2147482500;display:flex;
 align-items:center;justify-content:center;padding:clamp(9px,2.5vw,22px);
 background:rgba(36,25,46,.67);backdrop-filter:blur(9px);
}
#cb-duo-viewer[hidden]{display:none!important}
#cb-duo-viewer .cb-duo-viewer-shell{
 width:min(920px,100%);max-height:calc(100dvh - 18px);
 position:relative;overflow:hidden;border-radius:23px;
 border:2px solid #fff9ef;box-shadow:0 22px 70px #24142d85;
 background:linear-gradient(155deg,#fff8ef,#f2e9fa);
 padding:48px 9px 8px;display:flex;flex-direction:column;
}
#cb-duo-viewer .cb-duo-viewer-close{
 position:absolute;z-index:2;top:8px;right:10px;
 width:38px;height:38px;border-radius:50%;
 border:2px solid #f6f0ec;background:#f7e1f0;
 color:#684d70;font:bold 25px/1 system-ui;cursor:pointer;
 box-shadow:0 3px 8px #9b82942b;
}
#cb-duo-viewer .cb-duo-viewer-close:focus-visible{
 outline:3px solid #8d73a2;outline-offset:2px;
}
#cb-duo-viewer .cb-duo-viewer-title{
 position:absolute;top:11px;left:18px;right:58px;text-align:left;
 color:#735c7d;font:850 clamp(13px,2.2vw,18px)/1.3 system-ui;
 overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
#cb-duo-viewer iframe{
 border:0;display:block;width:100%;
 height:min(73dvh,660px);min-height:250px;border-radius:16px;
 background:#f7f0e9;
}
@media(max-width:600px){
 #cb-duo-viewer{padding:7px}
 #cb-duo-viewer .cb-duo-viewer-shell{padding:47px 5px 5px;border-radius:16px;
   max-height:calc(100dvh - 14px)}
 #cb-duo-viewer iframe{height:min(75dvh,590px);min-height:280px}
 #cb-duo-viewer .cb-duo-viewer-close{right:7px}
 #cb-duo-viewer .cb-duo-viewer-title{left:12px}
}


/* Intro framing 2026-11-21: CTA stays in the first visible viewport even on
   short windows. The painted kittens use the same full-body CatArt shapes;
   reduce the empty top rather than clipping their ears or feet. */
#intro{
 justify-content:flex-start!important;
 gap:clamp(5px,.85vh,9px)!important;
 padding:clamp(42px,5.8vh,58px) 12px max(13px,env(safe-area-inset-bottom,0px))!important;
 overflow-x:hidden!important;overflow-y:auto!important;
 overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
 scroll-padding-top:clamp(42px,5.8vh,58px);
}
#intro > .intro-cat-gallery{
 width:min(720px,94vw)!important;
 height:clamp(120px,19vh,182px)!important;
 max-height:182px!important;
 flex-shrink:0!important;
 margin:0 auto!important;
}
#intro #intro-cats{object-fit:contain!important}
#intro > .intro-gallery-caption{margin:1px auto 0!important;padding:5px 14px!important}
#intro .studio-badge{flex-shrink:0}
#intro .game-logo{margin:0 auto!important;line-height:1.06!important}
#intro .game-logo .logo-en{margin-top:2px!important}
#intro > p:not(#start-error){margin:0 auto!important;padding:0 8px!important;line-height:1.4!important}
#intro #intro-start{
 order:0!important;display:block!important;visibility:visible!important;
 flex:0 0 auto!important;align-self:center;
 min-height:50px!important;
 margin:3px auto!important;
 padding:10px 30px!important;
}
#intro .intro-features{order:1!important;margin:3px auto!important}
#intro .intro-guide{order:2!important;margin:0 auto!important}
#intro #intro-reset{order:3!important;margin:0 auto!important}
#intro #start-error{order:4!important}
@media(max-width:700px){
 #intro{
   padding:calc(43px + env(safe-area-inset-top,0px)) 10px
    calc(13px + env(safe-area-inset-bottom,0px))!important;
   gap:6px!important;
 }
 #intro > .intro-cat-gallery{
  width:min(96vw,540px)!important;
  height:clamp(109px,18vh,155px)!important;
  max-height:155px!important;
 }
 #intro .game-logo{font-size:clamp(29px,8vw,41px)!important}
 #intro .game-logo .logo-en{font-size:10px!important}
 #intro #intro-start{
   width:min(90%,330px)!important;min-height:48px!important;
   padding:10px 14px!important;order:0!important;
 }
 #intro .intro-features span{min-height:38px!important;padding:6px 9px!important}
 #intro > p:not(#start-error){font-size:12px!important}
 #intro > .intro-gallery-caption{font-size:clamp(11px,3.1vw,13px)!important}
}
@media(max-height:680px){
 #intro{gap:5px!important}
 #intro > .intro-cat-gallery{height:clamp(108px,17vh,146px)!important}
 #intro .game-logo{font-size:clamp(27px,5vh,42px)!important}
 #intro .intro-features span{min-height:36px!important}
 #intro #intro-start{min-height:46px!important}
}
@media(max-height:480px) and (orientation:landscape){
 #intro > .intro-cat-gallery{height:110px!important;width:min(580px,80vw)!important}
 #intro .intro-features{max-width:420px!important}
 #intro #intro-start{width:min(300px,85%)!important}
}


/* 2026-11-21: one clear visual hierarchy on the Cat Bond first screen.
   Title + kittens introduce the game; the ONLY primary action comes directly
   next, before the small tagline, secondary copy and noninteractive features. */
#intro{
 --intro-berry:#865080;
 --intro-ink:#57435e;
}
#intro .studio-badge{
 opacity:.78!important;
 transform:scale(.88);
 transform-origin:center;
 margin:0 auto!important;
}
#intro .game-logo{
 color:#65466e!important;
 font-weight:950!important;
 letter-spacing:.055em!important;
 text-shadow:0 2px 0 #fff8f2,0 6px 16px #89709225!important;
}
#intro .game-logo .logo-en{
 color:#987da0!important;
 font-size:.20em!important;
 letter-spacing:.23em!important;
 font-weight:750!important;
}
#intro > .intro-cat-gallery{
 border-color:#fff9f2!important;
 box-shadow:0 8px 20px #93789722,inset 0 2px 4px #fffaf9b0!important;
}
#intro #intro-start{
 /* Override the old low-contrast pastel gold-button skin. */
 order:0!important;
 display:inline-flex!important;
 align-items:center;justify-content:center;gap:9px;
 position:relative;z-index:3;
 width:min(370px,86vw)!important;
 min-width:0!important;
 min-height:62px!important;
 padding:13px 24px!important;
 margin:8px auto 6px!important;
 color:#fff9f6!important;
 font:950 clamp(20px,3.2vw,25px)/1.2 "PingFang SC","Microsoft YaHei",system-ui,sans-serif!important;
 letter-spacing:.08em;
 text-shadow:0 2px 2px #5e386080!important;
 background:linear-gradient(125deg,#9c547f 0%,#7853a5 50%,#65569e 100%)!important;
 border:3px solid #fff7f3!important;
 border-radius:22px!important;
 box-shadow:0 6px 0 #72507f57,0 13px 26px #7852775c,
  inset 0 1px 3px #fff6f18e!important;
 cursor:pointer;
 transition:transform .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
#intro #intro-start::before{
 content:"🐾";display:inline-block;
 font-size:clamp(20px,3vw,25px);line-height:1;
 filter:drop-shadow(0 2px 2px #5e3a6b44);
}
#intro #intro-start::after{
 content:"›";
 font:900 28px/1 system-ui,sans-serif;
 opacity:.95;margin-left:1px;
}
#intro #intro-start:hover{
 filter:brightness(1.09)!important;
 transform:translateY(-2px)!important;
 box-shadow:0 8px 0 #72507f57,0 17px 28px #78527767!important;
}
#intro #intro-start:active{
 filter:brightness(.98)!important;
 transform:translateY(3px)!important;
 box-shadow:0 2px 0 #72507f57,0 5px 12px #78527744!important;
}
#intro #intro-start:focus-visible{
 outline:3px solid #e6be6e!important;
 outline-offset:3px!important;
}
#intro > .intro-gallery-caption{
 /* This should read as a subtitle, NOT a competing call-to-action. */
 position:static!important;inset:auto!important;transform:none!important;
 color:#806985!important;
 background:transparent!important;
 border:0!important;box-shadow:none!important;
 font:725 clamp(11px,1.55vw,13px)/1.4 system-ui,sans-serif!important;
 padding:1px 4px!important;
 margin:0 auto!important;
 white-space:normal!important;
}
#intro > p:not(#start-error){
 color:#7a6c79!important;
 font-size:clamp(11px,1.5vw,13px)!important;
 font-weight:550!important;
 line-height:1.5!important;
 max-width:570px!important;
}
#intro .intro-features{
 width:min(510px,100%)!important;
 gap:6px!important;
 margin:5px auto 0!important;
}
#intro .intro-features span{
 background:#fffaf18a!important;
 border:1px solid #f5eaf0b8!important;
 box-shadow:none!important;
 color:#827385!important;
 font-size:clamp(10px,1.3vw,12px)!important;
 font-weight:670!important;
 line-height:1.35!important;
 min-height:34px!important;
 padding:6px 10px!important;
}
#intro .intro-guide{
 max-width:500px!important;
 border:0!important;
 border-radius:10px!important;
 background:transparent!important;
 color:#8c7e8b!important;
 box-shadow:none!important;
 font-size:clamp(10px,1.2vw,12px)!important;
 padding:2px 5px!important;
}
#intro .intro-guide strong{font-weight:650!important}
#intro #intro-reset{
 font-size:11px!important;
 opacity:.75;
}
@media(max-width:700px){
 #intro #intro-start{
  width:min(325px,88vw)!important;
  min-height:55px!important;
  padding:11px 15px!important;
  margin:5px auto 4px!important;
  font-size:clamp(18px,5vw,22px)!important;
  border-radius:18px!important;
 }
 #intro .intro-cat-gallery{margin-bottom:0!important}
 #intro > .intro-gallery-caption{font-size:11px!important}
 #intro .intro-features span{min-height:33px!important;padding:6px 7px!important}
 #intro > p:not(#start-error){font-size:11.5px!important}
}
@media(max-height:610px){
 #intro #intro-start{min-height:49px!important;margin:3px auto!important}
 #intro .intro-features{margin:2px auto!important}
 #intro .intro-gallery-caption{padding:0!important}
}
@media(prefers-reduced-motion:reduce){
 #intro #intro-start{transition:none!important}
}


/* Post-capture adventure guide, independent of the full-size intro cats.
   Compact walkthrough, real target highlights; optional and save-backed. */
#first-quest.is-tour{
 position:absolute!important;
 top:calc(108px + env(safe-area-inset-top,0px))!important;
 left:50%!important;
 transform:translateX(-50%)!important;
 z-index:26!important;
 display:flex!important;
 flex-direction:column;
 align-items:stretch;
 gap:7px;
 width:min(422px,calc(100% - 28px))!important;
 max-width:calc(100% - 28px)!important;
 padding:12px 14px 13px!important;
 pointer-events:auto!important;
 text-align:left!important;
 white-space:normal!important;
 border-radius:19px!important;
 border:2px solid #fffaf5!important;
 background:linear-gradient(135deg,rgba(255,248,240,.96),rgba(242,230,250,.97))!important;
 color:#655269!important;
 box-shadow:0 10px 25px #4c315a35,0 0 0 1px #cdaac670!important;
 backdrop-filter:blur(10px);
}
#first-quest.is-tour[hidden]{display:none!important}
#first-quest .cb-guide-head{
 display:flex;justify-content:space-between;align-items:center;gap:10px;
}
#first-quest .cb-guide-progress{
 color:#a2739b;
 font:850 10px/1.3 system-ui,sans-serif;
 letter-spacing:.07em;
}
#first-quest .cb-guide-title{
 display:block;
 color:#6f4c78;
 font:900 clamp(15px,2vw,17px)/1.32 system-ui,sans-serif;
}
#first-quest .cb-guide-message{
 margin:0!important;
 padding:0!important;
 color:#67576b!important;
 font:550 clamp(12px,1.6vw,13px)/1.5 system-ui,sans-serif;
 background:transparent!important;
 box-shadow:none!important;
 text-align:left!important;
}
#first-quest .cb-guide-action{
 align-self:flex-start;
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 min-height:37px;padding:7px 16px;
 border:1.5px solid #fff6f3;border-radius:13px;
 background:linear-gradient(115deg,#9c608c,#815a9b);
 box-shadow:0 3px 0 #755a8033,0 6px 13px #71447b2b;
 color:white;font:850 13px/1.4 system-ui,sans-serif;
 cursor:pointer;touch-action:manipulation;
}
#first-quest .cb-guide-action span{font-size:20px;line-height:1}
#first-quest .cb-guide-action:hover{filter:brightness(1.07)}
#first-quest .cb-guide-action:active{transform:translateY(2px)}
#first-quest .cb-guide-skip{
 border:0;background:transparent;color:#948398;
 font:650 11px/1.4 system-ui,sans-serif;
 padding:5px 2px 5px 9px;min-height:26px;
 cursor:pointer;touch-action:manipulation;
}
#first-quest .cb-guide-skip:hover{text-decoration:underline}
#first-quest button:focus-visible,#guide-help:focus-visible{
 outline:3px solid #e8be7b;outline-offset:3px;
}
#guide-help{
 position:absolute;top:calc(112px + env(safe-area-inset-top,0px));left:12px;
 z-index:26;min-width:72px;min-height:36px;
 display:inline-flex;align-items:center;justify-content:center;
 border-radius:13px;border:1.5px solid #fff4ed;
 background:rgba(255,246,239,.84);
 color:#785e83;font:750 12px/1.25 system-ui,sans-serif;
 box-shadow:0 3px 10px #785c8529;
 cursor:pointer;touch-action:manipulation;
}
#guide-help[hidden]{display:none!important}
/* Highlight the actual Cats / Workshop tab or Map / Play control, rather
   than placing another blocking instruction over the game. */
#stage .cb-guide-target{
 outline:3px solid #dd97be!important;
 outline-offset:3px!important;
 border-color:#c889b6!important;
 animation:cb-tour-glow 1.5s ease-in-out infinite;
}
@keyframes cb-tour-glow{
 0%,100%{filter:brightness(1);box-shadow:0 0 0 4px #f8c9e149!important}
 50%{filter:brightness(1.1);box-shadow:0 0 0 8px #f7c4e382!important}
}
@media(max-width:700px){
 #first-quest.is-tour{
  top:calc(108px + env(safe-area-inset-top,0px))!important;
  width:calc(100% - 20px)!important;
  max-width:calc(100% - 20px)!important;
  border-radius:15px!important;
  padding:9px 11px 10px!important;
  gap:5px;
 }
 #first-quest .cb-guide-title{font-size:14px}
 #first-quest .cb-guide-message{font-size:12px}
 #first-quest .cb-guide-action{min-height:35px;font-size:12px}
 #guide-help{top:calc(108px + env(safe-area-inset-top,0px));left:9px}
}
@media(orientation:landscape) and (max-height:520px){
 #first-quest.is-tour{
  top:calc(87px + env(safe-area-inset-top,0px))!important;
  left:10px!important;transform:none!important;
  width:min(370px,54vw)!important;
  max-width:min(370px,54vw)!important;
  gap:4px;padding:7px 9px!important;
 }
 #first-quest .cb-guide-title{font-size:13px}
 #first-quest .cb-guide-message{font-size:11px}
 #first-quest .cb-guide-action{min-height:30px;padding:4px 11px}
}
@media(prefers-reduced-motion:reduce){
 #stage .cb-guide-target{animation:none!important}
}


/* Battle skill legibility: label every move; tooltip floats outside buttons,
   never clipped by the action-button overflow, never intercepts attacks. */
#battle-ui .move .mv-name{
 display:block!important;max-width:100%;width:100%;
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font:900 clamp(10px,1.3vw,12px)/1.15 system-ui,sans-serif!important;
 color:#374b46!important;text-align:center;padding:0 2px;
}
#battle-ui #mv-basic .mv-name{color:#835378!important}
#battle-ui .move .mv-k{font:800 clamp(9px,1vw,10px)/1.1 system-ui,sans-serif!important}
#battle-ui .move{justify-content:center;gap:3px!important;min-height:60px}
#battle-ui .move:focus-visible{
 outline:3px solid #986aa5!important;outline-offset:3px;z-index:9;
}
#battle-ui #battle-skill-tooltip,
#battle-ui #battle-skill-guide{
 color:#624f67;background:linear-gradient(145deg,#fffaf3f7,#f4eafbf5);
 border:1.5px solid #fef6ef;border-radius:17px;
 box-shadow:0 9px 29px #382a4960;
 backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
#battle-ui #battle-skill-tooltip{
 position:absolute;z-index:42;left:50%;transform:translateX(-50%);
 bottom:calc(98px + env(safe-area-inset-bottom,0px));
 max-width:calc(100% - 20px);width:min(360px,92vw);
 padding:11px 15px;text-align:left;pointer-events:none;
}
#battle-ui #battle-skill-tooltip[hidden],
#battle-ui #battle-skill-guide[hidden]{display:none!important}
#battle-ui #battle-skill-tooltip strong{
 display:block;font:900 15px/1.3 system-ui;color:#774d83;
}
#battle-ui #battle-skill-tooltip p{
 margin:5px 0!important;line-height:1.5!important;
 font-size:12.5px!important;color:#625467!important;
}
#battle-ui #battle-skill-tooltip small{font:750 11px/1.3 system-ui;color:#917c91}
#battle-ui #battle-skill-info-toggle{
 display:none;position:absolute;z-index:30;
 /* Keep touch help under the top HUD, never over the action grid. */
 right:max(8px,env(safe-area-inset-right,0px) + 8px);
 top:calc(149px + env(safe-area-inset-top,0px));bottom:auto;
 min-height:35px;padding:7px 12px;
 color:#6b5478;background:rgba(255,245,238,.96);
 border:1.5px solid #dfcce3;border-radius:999px;
 font:850 12px/1.1 system-ui;cursor:pointer;
 box-shadow:0 3px 10px #6a507035;pointer-events:auto;
}
#battle-ui #battle-skill-info-toggle:focus-visible,
#battle-ui #battle-skill-guide-close:focus-visible{
 outline:3px solid #986aa5;outline-offset:2px;
}
#battle-ui #battle-skill-guide{
 position:absolute;z-index:46;right:max(8px,env(safe-area-inset-right,0px) + 8px);
 top:calc(190px + env(safe-area-inset-top,0px));bottom:auto;
 width:min(420px,calc(100% - 16px));
 /* Scroll the expanded help above both rows of combat buttons. */
 max-height:min(46dvh,335px,calc(100dvh - 360px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
 padding:11px 14px 13px;
 overflow:auto;overscroll-behavior:contain;pointer-events:auto;
}
#battle-ui #battle-skill-guide h3{
 margin:0 28px 9px 0;font:900 15px/1.3 system-ui;color:#6b4b78;
}
#battle-ui #battle-skill-guide-close{
 position:absolute;top:6px;right:7px;display:grid;place-items:center;
 width:31px;height:31px;border-radius:50%;
 border:1px solid #e2cde4;background:#f9ebf4;color:#75587c;
 font:900 23px/1 system-ui;cursor:pointer;
}
#battle-ui .battle-skill-guide-row{
 border-top:1px solid #dbcfe2; padding:7px 0;
}
#battle-ui .battle-skill-guide-row strong{display:block;font:850 12px/1.35 system-ui}
#battle-ui .battle-skill-guide-row p{
 margin:2px 0!important;font:500 11.5px/1.45 system-ui!important;
 color:#65596a!important;
}
#battle-ui .battle-skill-guide-row small{font:700 10px/1.3 system-ui;color:#8c7790}
@media(hover:none), (pointer:coarse){
 #battle-ui #battle-skill-info-toggle{display:inline-flex}
 #battle-ui #battle-skill-tooltip{display:none!important}
}
@media(max-width:700px){
 #battle-ui .move{min-height:53px;gap:1px!important;padding:3px 1px!important}
 #battle-ui .move .mv-name{font-size:10px!important;line-height:1.15}
 #battle-ui .move .mv-icon{font-size:19px!important}
 #battle-ui .move .mv-k{font-size:9px!important}
 #battle-ui #battle-skill-info-toggle{
   top:calc(147px + env(safe-area-inset-top,0px));bottom:auto;padding:6px 10px;min-height:33px;
 }
 #battle-ui #battle-skill-guide{top:calc(186px + env(safe-area-inset-top,0px));bottom:auto}
}
@media(max-height:520px) and (orientation:landscape){
 #battle-ui #battle-skill-info-toggle{top:calc(112px + env(safe-area-inset-top,0px));bottom:auto}
 #battle-ui #battle-skill-guide{top:calc(151px + env(safe-area-inset-top,0px));bottom:auto;max-height:min(42dvh,calc(100dvh - 265px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)))}
 #battle-ui #battle-skill-tooltip{bottom:calc(82px + env(safe-area-inset-bottom,0px))}
}

/* Visible, accurate skill inspection in the existing pre-battle choice panel.
   Starts expanded for the first fight and collapses thereafter; no new modal. */
#panel .prebattle-skills{
 display:block;margin:10px 0 13px;padding:8px 10px;
 border:1.5px solid #d9c6e2;border-radius:15px;
 background:linear-gradient(150deg,#fff7e9,#f5e8f8 80%);
 color:#5d4c67;box-shadow:0 3px 12px #89719119;
}
#panel .prebattle-skills summary{
 display:flex;justify-content:space-between;align-items:center;
 gap:9px;cursor:pointer;font:900 13px/1.4 system-ui;
 color:#745481;list-style:revert;padding:4px 2px;
}
#panel .prebattle-skills summary:focus-visible{outline:3px solid #aa83b0;outline-offset:2px}
#panel .prebattle-skills summary small{font:650 10px/1.2 system-ui;color:#96809b;flex-shrink:0}
#panel .prebattle-skills-tip{
 margin:5px 0 9px!important;padding:0!important;
 font:600 11.5px/1.45 system-ui!important;
 color:#826f86!important;background:transparent!important;
}
#panel .prebattle-skills-body{
 max-height:min(31vh,235px);overflow-y:auto;
 overscroll-behavior:contain;padding:1px 3px 3px;
}
#panel .prebattle-cat-skills{
 padding:7px 0;border-top:1px solid #ead9e9;
}
#panel .prebattle-cat-skills h4{
 margin:0 0 5px;font:900 12.5px/1.3 system-ui;color:#65466f;
}
#panel .prebattle-cat-skills h4 small{font:600 10px/1.3 system-ui;color:#98859a}
#panel .prebattle-skill-row{
 display:flex;gap:9px;align-items:start;padding:4px 0;
}
#panel .prebattle-skill-key{
 flex:0 0 43px;max-width:43px;white-space:nowrap;
 border-radius:7px;background:#ead5ef;color:#745382;
 padding:3px;font:900 10px/1.3 system-ui;text-align:center;
}
#panel .prebattle-skill-row>div{min-width:0;flex:1}
#panel .prebattle-skill-row strong{font:850 12px/1.35 system-ui;color:#56405f}
#panel .prebattle-skill-row p{
 padding:0!important;margin:1px 0 2px!important;
 font:500 11px/1.4 system-ui!important;color:#63586b!important;
 background:transparent!important;box-shadow:none!important;
}
#panel .prebattle-skill-row small{font:700 10px/1.3 system-ui;color:#917d95}
@media(max-width:530px){
 #panel .prebattle-skills{padding:7px 8px;margin:8px 0}
 #panel .prebattle-skills summary{font-size:12px;gap:5px}
 #panel .prebattle-skills summary small{font-size:9px}
 #panel .prebattle-skills-body{max-height:min(29vh,200px)}
}

/* Compact pre-battle setup: optional team, rewards and difficulty fold away. */
#panel .prep-advanced{display:block;margin:8px 0;padding:8px 11px;border:1px solid #d8cce1;border-radius:13px;background:#fffaf0;color:#66516d}
#panel .prep-advanced>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font:800 12px/1.35 system-ui}
#panel .prep-advanced>summary::-webkit-details-marker,#panel .prebattle-skills>summary::-webkit-details-marker{display:none}
#panel .prep-advanced>summary::after,#panel .prebattle-skills>summary::after{content:"⌄";font:900 18px/1 system-ui;color:#8a6e98;flex:none}
#panel .prep-advanced[open]>summary::after,#panel .prebattle-skills[open]>summary::after{transform:rotate(180deg)}
#panel .prep-advanced>summary:focus-visible{outline:3px solid #b58bc2;outline-offset:3px}
#panel .prep-advanced>summary span{font:650 11px/1.35 system-ui;color:#7c7181;text-align:right;min-width:0;overflow-wrap:anywhere}
#panel .prep-advanced .capture-mode-picker{margin:9px 0 0}
#panel .prep-team-details .roster,#panel .prep-team-details .map-squad-roster{margin-top:9px}
#panel .prep-team-details .battle-order{margin-bottom:3px}
#panel .prebattle-skills{margin:8px 0;padding:8px 11px}
#panel .prebattle-skills summary{list-style:none}
#panel .prebattle-skills summary small{margin-left:auto}
#panel .prebattle-skills-body{max-height:none;overflow:visible;padding:8px 0 2px}
#panel .prebattle-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#panel .prebattle-control-item{display:flex;flex-direction:column;gap:2px;min-width:0;padding:7px 9px;background:#fffdf9;border:1px solid #eadfeb;border-radius:9px}
#panel .prebattle-control-item b{font:850 11.5px/1.4 system-ui;color:#64496b}
#panel .prebattle-control-item span{font:550 11px/1.42 system-ui;color:#706478}
#panel .prebattle-actions{position:sticky;bottom:0;z-index:4;padding:9px 2px 5px;margin-top:8px;background:linear-gradient(to bottom,rgba(255,249,239,0),#fff8ef 22%)}
#panel .prebattle-actions .btn.gold{flex:1 1 165px;min-height:44px}
#panel .prebattle-actions .btn.ghost{min-height:44px}
@media(max-width:440px){
 #panel .prep-advanced{padding:8px}
 #panel .prebattle-control-grid{grid-template-columns:1fr}
 #panel .prebattle-actions{gap:7px}
 #panel .prebattle-actions .btn{padding:9px 12px}
}


/* Growth ceremony: responsive animated illustrated before/after. */
.cb-growth-ceremony {text-align:center;max-width:520px;margin:0 auto;padding:4px 4px 12px;color:#475266}
.cb-growth-ceremony .cb-growth-overline {font-size:.73rem;text-transform:uppercase;letter-spacing:.16em;font-weight:800;color:#a17d83;margin:2px 0 6px}
.cb-growth-ceremony h2 {font-size:clamp(1.35rem,4vw,1.85rem);color:#72566c;margin:4px 0 8px}
.cb-growth-stage-names {display:flex;align-items:center;justify-content:center;gap:16px;font-weight:800;color:#8d6f7d}
.cb-growth-stage-names b {font-size:1.55rem;color:#d4a564}
#cb-growth-canvas {display:block;width:min(100%,360px);height:auto;aspect-ratio:18/11;max-height:220px;margin:4px auto 0}
.cb-growth-ceremony h3 {margin:4px 0;color:#79576a;font-size:1.22rem}
.cb-growth-caption {margin:7px auto 10px;font-size:.9rem;line-height:1.5;max-width:390px}
.cb-growth-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px auto 14px}
.cb-growth-stat {border-radius:9px;background:#fff6ed;color:#725a61;padding:8px 2px;font-size:.74rem;white-space:nowrap}
.cb-growth-stat strong {color:#af8054}
.cb-growth-ceremony #cb-growth-done {min-width:164px;min-height:43px;font-weight:800}
@media(max-width:420px) {.cb-growth-ceremony {padding:0 1px 8px}.cb-growth-stats {gap:4px}.cb-growth-stat {font-size:.68rem}}


/* Cat Bond mobile interaction clearance: duo ultimate and yard placement (2026-11-21). */
/* The two-row touch attack grid owns the bottom-right corner. Duo is a
   separate battle action in the upper-right, below the HP/skill-help HUD. */
@media (max-width:700px), (pointer:coarse) {
  #battle-ui #duo-burst {
    top:calc(197px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;
    right:max(8px,env(safe-area-inset-right,0px) + 8px)!important;
    left:auto!important;
    max-width:min(44vw,188px)!important;
    min-height:44px;
    padding:5px 8px 8px;
    box-sizing:border-box;
  }
  #battle-ui #duo-burst .duo-burst-label {
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    font-size:clamp(10px,2.8vw,12px);
    line-height:1.18;
  }
  /* The skill guide is temporary; keep its scroll sheet tappable. */
  #battle-ui:has(#battle-skill-guide:not([hidden])) #duo-burst {
    visibility:hidden;pointer-events:none;
  }

  /* During yard placement the only HUD occupies a short strip at the top,
     outside the lower-ground area where players tap or drag structures. */
  body.cb-placing-building #yard-placement-dock {
    top:calc(102px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    width:min(92%,344px);
    padding:8px 10px 9px;
    gap:6px;
    border-radius:15px!important;
    box-sizing:border-box;
  }
  body.cb-placing-building #yard-placement-dock .cb-placement-heading {
    display:none!important;
  }
  body.cb-placing-building #yard-placement-status {
    font:800 11px/1.35 system-ui,sans-serif;
  }
  body.cb-placing-building .yard-placement-actions {gap:7px}
  body.cb-placing-building .yard-placement-actions button {
    min-height:42px;
    padding:6px 9px;
    font:850 12px/1.2 system-ui,sans-serif;
    border-radius:10px!important;
    touch-action:manipulation;
  }
  body.cb-placing-building #first-quest,
  body.cb-placing-building #guide-help,
  body.cb-placing-building #yard-cat-switch,
  body.cb-placing-building #yard-duo-status {
    display:none!important;
  }
}
/* Landscape combat: center the duo control between the team HUD and the
   right-hand attack grid; it cannot cover the thumb joystick or skill keys. */
@media (orientation:landscape) and (max-height:530px) {
  #battle-ui #duo-burst {
    top:calc(112px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    max-width:min(32vw,178px)!important;
    min-height:35px;
    padding:4px 7px 7px;
  }
  body.cb-placing-building #yard-placement-dock {
    top:calc(83px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;
    left:auto;
    right:max(7px,env(safe-area-inset-right,0px) + 7px);
    transform:none;
    width:min(43vw,270px);
    padding:5px 7px;
    gap:4px;
  }
  body.cb-placing-building .yard-placement-actions button {
    min-height:36px;padding:4px 7px;
  }
}


/* Exploration has its own compact menu, independent of the hidden yard tabbar.
   On 320px portrait the menu sits to the right of the left-side region HUD,
   rather than adding a third top-row button or covering the player's cat. */
#map-menu{
 position:absolute;z-index:24;right:max(8px,env(safe-area-inset-right,0px));
 top:calc(env(safe-area-inset-top,0px) + 111px);
 min-height:42px;min-width:83px;padding:8px 11px;
 border:2px solid #e6c58c;border-radius:12px;
 background:linear-gradient(135deg,#fffaf0,#f4e7cf);
 box-shadow:0 3px 12px #343b3440;color:#465945;
 font:850 13px/1.2 system-ui,sans-serif;cursor:pointer;
 touch-action:manipulation;
}
#map-menu[hidden],#stage:has(#battle-ui.on) #map-menu{display:none!important}
#map-menu:focus-visible{outline:3px solid #537c65;outline-offset:2px}
#panel .explore-menu{width:min(100%,600px);margin:auto;color:#415c48}
#panel .explore-menu h2{font:900 clamp(19px,3vw,24px)/1.3 system-ui,sans-serif;margin:0 45px 5px 0}
#panel .explore-menu h3{font:850 14px/1.3 system-ui,sans-serif;margin:13px 0 8px}
#panel .explore-menu-location{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 12px;
 padding:8px 10px;background:#f0f5eb;border-radius:11px;font:700 12px/1.4 system-ui,sans-serif}
#panel .explore-menu-location span{white-space:nowrap}
#panel .explore-cat-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#panel .explore-cat{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:10px 8px;
 border:1.5px solid #d7e4d5;border-radius:13px;background:#fffdf8}
#panel .explore-cat canvas{width:68px!important;height:64px!important;flex:0 0 68px;object-fit:contain}
#panel .explore-cat-summary{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;
 font:700 11px/1.4 system-ui,sans-serif}
#panel .explore-cat-summary strong{font:850 14px/1.2 system-ui,sans-serif;overflow-wrap:anywhere}
#panel .explore-cat-summary small{font:650 11px/1.35 system-ui,sans-serif;color:#68806d}
#panel .explore-cat-skills{display:flex;flex-wrap:wrap;gap:4px;margin:3px 0}
#panel .explore-cat-skills span{padding:3px 6px;border-radius:6px;
 background:#e9f1e4;color:#4e6a53;font:750 10px/1.25 system-ui,sans-serif}
#panel .explore-cat-buttons{display:flex;flex-wrap:wrap;gap:5px}
#panel .explore-cat-buttons button{min-height:35px;padding:6px 8px;border:1px solid #a6c9ae;
 border-radius:9px;background:#edf5e9;color:#315b42;font:800 11px/1.3 system-ui,sans-serif;
 cursor:pointer;touch-action:manipulation}
#panel .explore-cat-buttons button:last-child{background:#f7ebfa;border-color:#d3b9df;color:#694e80}
#panel .explore-menu-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#panel .explore-menu-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;
 min-width:0;min-height:70px;gap:5px;padding:8px 4px;border:1.5px solid #d6e5d6;border-radius:12px;
 background:#f6f9f1;color:#3e624b;font:800 11px/1.35 system-ui,sans-serif;
 cursor:pointer;touch-action:manipulation;text-align:center}
#panel .explore-menu-actions button span:first-child{font-size:23px;line-height:1.1}
#panel .explore-menu-actions button:focus-visible,#panel .explore-cat-buttons button:focus-visible{
 outline:3px solid #5c9981;outline-offset:2px}
#panel .explore-menu-tip{margin:12px 0 0;font:650 11px/1.5 system-ui,sans-serif;color:#718171}
@media(max-width:650px){
 #panel .explore-cat-list{grid-template-columns:minmax(0,1fr)}
 #panel .explore-menu-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
 #panel .explore-menu-actions button{min-height:61px}
}
@media(max-width:360px){
 #map-menu{min-width:76px;padding:8px 7px}
 #panel .explore-cat{padding:7px}
 #panel .explore-cat canvas{width:56px!important;height:53px!important;flex-basis:56px}
 #panel .explore-menu-actions{gap:5px}
}
@media(max-height:530px) and (orientation:landscape){
 #map-menu{top:calc(env(safe-area-inset-top,0px) + 105px);min-height:36px}
 #panel .explore-cat-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 #panel .explore-menu-actions button{min-height:53px}
}

/* Battle HUD: one coherent segmented tool rail, with text-only reserves. */
#battle-ui .battle-topbar{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:7px!important;padding:4px 8px!important
}
#battle-ui .battle-tools{
  grid-column:2;grid-row:1;display:inline-flex;align-items:stretch;
  gap:0;flex:0 0 auto;padding:2px;border-radius:10px;
  background:rgba(231,240,227,.85);border:1px solid rgba(132,159,133,.25)
}
#battle-ui .battle-tools .tiny-btn{
  grid-column:auto!important;grid-row:auto!important;display:inline-flex;
  align-items:center;justify-content:center;min-height:31px!important;
  min-width:34px!important;width:auto!important;max-width:140px!important;
  margin:0!important;padding:3px 9px!important;white-space:nowrap;
  border:0!important;border-radius:7px!important;
  background:transparent!important;box-shadow:none!important;color:#4b6655!important;
  font:800 11px/1.2 system-ui,sans-serif!important
}
#battle-ui .battle-tools .tiny-btn + .tiny-btn{
  border-left:1px solid rgba(109,143,118,.25)!important;
  border-top-left-radius:0!important;border-bottom-left-radius:0!important
}
#battle-ui .battle-tools #btn-auto.is-auto{
  background:#d7ebdb!important;color:#286447!important
}
#battle-ui .battle-tools .tiny-btn:hover{background:rgba(255,255,255,.85)!important}
#battle-ui .battle-tools .tiny-btn:focus-visible{
  outline:2px solid #479471!important;outline-offset:-2px!important
}
#battle-ui #bench-slots{
  left:9px;top:calc(env(safe-area-inset-top,0px) + 196px);
  flex-direction:column;align-items:flex-start;gap:3px;
  max-width:min(174px,calc(100% - 130px))
}
#battle-ui #bench-slots:not(.is-open) .bench-slot{display:none!important}
#battle-ui #bench-slots .bench-caption{
  min-width:80px!important;width:auto!important;min-height:28px!important;
  display:inline-flex;align-items:center;justify-content:center;
  padding:5px 9px!important;border-radius:9px!important;
  border:1px solid #bed5c4!important;
  background:rgba(251,252,245,.95)!important;
  box-shadow:0 2px 8px rgba(57,83,65,.1);cursor:pointer;
  color:#3d6652!important;font:800 11px/1.15 system-ui,sans-serif!important
}
#battle-ui #bench-slots.is-open{
  align-items:stretch;flex-wrap:nowrap!important;gap:3px!important;
  max-width:min(174px,calc(100% - 130px))!important;
  padding:5px!important;background:rgba(255,251,243,.97)!important;
  border:1px solid #d0decf;border-radius:12px;
  box-shadow:0 7px 20px rgba(43,73,55,.17);
  max-height:min(208px,55dvh);overflow-y:auto;overscroll-behavior:contain
}
#battle-ui #bench-slots .bench-slot{
  box-sizing:border-box;position:relative;display:flex;flex-direction:row;
  justify-content:space-between;align-items:center;gap:5px;
  width:100%!important;min-width:0!important;
  height:32px!important;min-height:32px!important;padding:4px 6px!important;
  border:1px solid #d5e3d4;border-radius:8px;
  box-shadow:none;background:#fffdf8
}
#battle-ui #bench-slots .bench-slot .bench-number{
  position:static;flex:none;min-width:15px;text-align:center;
  font:800 10px/1.2 system-ui;color:#557564;background:#eaf1e6;
  padding:3px;border-radius:5px
}
#battle-ui #bench-slots .bench-slot .bench-name{
  display:block;flex:1;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;text-align:left;
  font:750 11px/1.2 system-ui;color:#3f5748
}
#battle-ui #bench-slots .bench-slot .bench-health{
  flex:none;font:750 10px/1.2 system-ui;color:#65836d
}
@media(max-width:520px){
 #battle-ui .battle-topbar{gap:4px!important;padding:3px 5px!important}
 #battle-ui .battle-tools .tiny-btn{
   min-width:31px!important;padding:3px 5px!important;font-size:10px!important
 }
 #battle-ui .battle-tools #btn-auto{min-width:62px!important;max-width:85px!important}
 #battle-ui .battle-tools .battle-top-label{display:none!important}
}
@media(max-height:530px) and (orientation:landscape){
 #battle-ui #bench-slots{
   top:calc(env(safe-area-inset-top,0px) + 156px)!important;
   max-width:166px!important;gap:3px!important
 }
 #battle-ui #bench-slots .bench-caption{
   min-height:28px!important;min-width:80px!important;
   border:1px solid #bed5c4!important
 }
 #battle-ui #bench-slots.is-open{
   max-width:166px!important;max-height:min(150px,45dvh);
   flex-wrap:nowrap!important;padding:4px!important
 }
 #battle-ui #bench-slots .bench-slot{
   min-width:0!important;width:100%!important;
   height:31px!important;min-height:31px!important
 }
}

/* Expedition navigation v2: one restrained, accessible row below the studio
   utility toolbar. Previously the three buttons were independently positioned
   (including an extra menu row), producing a ragged map overlay. */
#stage #map-actions{
  position:absolute;
  z-index:29;
  top:calc(env(safe-area-inset-top,0px) + 55px);
  right:max(8px,env(safe-area-inset-right,0px));
  left:auto;
  width:min(382px,calc(100% - 16px));
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1.16fr) minmax(0,1.13fr) minmax(0,.79fr);
  align-items:stretch;
  gap:4px;
  padding:4px;
  border:1px solid rgba(133,151,128,.28);
  border-radius:15px;
  background:rgba(255,251,243,.91);
  box-shadow:0 4px 16px rgba(48,67,51,.15);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  pointer-events:auto;
}
#stage #map-actions[hidden],
#stage #map-actions:has(> #map-index[hidden]),
#stage:has(#battle-ui.on) #map-actions{display:none!important}
#stage #map-actions > button,
body.cb-exploring #stage #map-actions > button{
  position:relative!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;
  box-sizing:border-box!important;
  display:flex;
  align-items:center;justify-content:center;
  width:100%!important;min-width:0!important;
  height:41px!important;min-height:41px!important;max-height:41px!important;
  margin:0!important;padding:6px 4px!important;
  border:1px solid #d8dfd3!important;
  border-radius:11px!important;
  background:#f7f7f0!important;
  color:#48634f!important;
  box-shadow:none!important;
  font:800 clamp(11px,1.35vw,12.5px)/1.15 system-ui,sans-serif!important;
  text-align:center;white-space:nowrap;
  cursor:pointer;touch-action:manipulation;
  transition:background-color .15s ease, border-color .15s ease;
}
#stage #map-actions > #map-squad{background:#e5f3e5!important;border-color:#aed0b7!important;color:#355a45!important}
#stage #map-actions > #map-index{background:#fff2d7!important;border-color:#e5cd91!important;color:#615640!important}
#stage #map-actions > #map-menu{background:#f4eef6!important;border-color:#dfcfe3!important;color:#65506b!important}
#stage #map-actions > button:hover{filter:brightness(.97)}
#stage #map-actions > button:active{filter:brightness(.94)}
#stage #map-actions > button:focus-visible{outline:3px solid #6c9e81!important;outline-offset:2px!important;z-index:1}
@media(max-width:520px){
  #stage #map-actions{
    left:50%;right:auto;
    transform:translateX(-50%);
    width:min(382px,calc(100% - 14px));
    top:calc(env(safe-area-inset-top,0px) + 52px);
  }
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{
    font-size:clamp(10.5px,3vw,12px)!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;
  }
}
@media(max-width:360px){
  #stage #map-actions{gap:3px;padding:3px;border-radius:13px}
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{padding:5px 1px!important;font-size:10.5px!important}
}
@media(orientation:landscape) and (max-height:530px){
  #stage #map-actions{top:calc(env(safe-area-inset-top,0px) + 57px);right:max(7px,env(safe-area-inset-right,0px));left:auto;transform:none;width:min(365px,calc(100% - 14px));padding:3px}
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{height:35px!important;min-height:35px!important;max-height:35px!important}
}
@media(prefers-reduced-motion:reduce){#stage #map-actions > button{transition:none}}

/* Combat squad: put bench BELOW the entire live team row. Absolute offsets were
   covering the second cat's HP on desktop and both phone orientations. */
#stage #battle-ui #battle-squad-rail{
 position:absolute;z-index:7;left:10px;right:auto;bottom:auto;
 top:calc(env(safe-area-inset-top,0px) + 99px);
 max-width:calc(100% - 132px);width:max-content;
 display:flex;flex-direction:column;align-items:flex-start;gap:2px;
 pointer-events:none
}
#stage #battle-ui #battle-squad-rail #team-slots{
 position:relative!important;inset:auto!important;
 top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 transform:none!important;margin:0!important;
 width:max-content!important;max-width:100%!important;min-width:0;
 flex-direction:row!important;align-items:flex-start!important;
 pointer-events:auto
}
#stage #battle-ui #battle-squad-rail #bench-slots{
 position:relative!important;inset:auto!important;
 top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 transform:none!important;margin:0!important;
 box-sizing:border-box;flex:0 0 auto;max-width:100%!important;
 pointer-events:auto
}
#stage #battle-ui #battle-squad-rail #bench-slots[hidden]{display:none!important}
#stage #battle-ui #battle-squad-rail #bench-slots.is-open{
 width:min(174px,100%);max-width:100%!important;
 max-height:min(205px,calc(100dvh - 275px));overflow-y:auto
}
#stage #battle-ui #battle-squad-rail .bench-caption{
 min-height:29px!important;min-width:80px!important
}
/* A fainted cat is recognizable by empty HP and warm muted card trim.
   Never grayscale/dim its face: keep the actual coat, eyes, and artwork. */
#stage #battle-ui .team-slot.fainted{
 filter:none!important;opacity:1!important;
 background:#f8f5ef!important;border-color:#d9cac0!important;
}
#stage #battle-ui .team-slot.fainted canvas,
#stage #battle-ui .team-slot canvas{filter:none!important;opacity:1!important}
#stage #battle-ui .team-slot.fainted .slot-hp-value{color:#906c5f!important}
@media(max-width:700px),(pointer:coarse){
 #stage #battle-ui #battle-squad-rail{
  left:7px;top:calc(env(safe-area-inset-top,0px) + 99px);
  max-width:calc(100% - 106px);gap:2px
 }
}
@media(max-height:530px) and (orientation:landscape){
 #stage #battle-ui #battle-squad-rail{
  top:calc(env(safe-area-inset-top,0px) + 84px);
  max-width:calc(100% - 112px);gap:2px
 }
 #stage #battle-ui #battle-squad-rail #bench-slots.is-open{
  max-height:min(140px,calc(100dvh - 205px))
 }
}
html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #battle-squad-rail{
 top:calc(env(safe-area-inset-top,0px) + 99px)
}
@media(max-height:530px) and (orientation:landscape){
 html[data-mw-fullscreen-game="cat-bond"] #stage #battle-ui #battle-squad-rail{
  top:calc(env(safe-area-inset-top,0px) + 84px)
 }
}

/* Cat Bond panel breadcrumb navigation */
#panel .panel-nav{
  display:flex;align-items:center;min-height:44px;
  margin:0 42px 10px 0;padding:0;
  position:sticky;top:-22px;z-index:4;
  pointer-events:none;
}
#panel .panel-nav .panel-back{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;max-width:100%;padding:9px 14px;
  background:#eaf4e7;color:#385f48;border:1px solid #b5d2bc;
  border-radius:12px;font:800 13px/1.3 system-ui,sans-serif;
  cursor:pointer;touch-action:manipulation;pointer-events:auto;
  box-shadow:0 3px 9px rgba(43,86,57,.09);
}
#panel .panel-nav .panel-back:hover{background:#dcefdc}
#panel .panel-nav .panel-back:focus-visible{outline:3px solid #639f7b;outline-offset:2px}
#panel .card:has(.panel-nav) #sk-back,
#panel .card:has(.panel-nav) #tr-back,
#panel .card:has(.panel-nav) #breed-back,
#panel .card:has(.panel-nav) #duo-return{display:none}
@media(max-width:520px){
  #panel .panel-nav{top:-12px;margin:0 37px 8px 0}
  #panel .panel-nav .panel-back{min-height:44px;padding:9px 11px;font-size:12px}
}


/* Difficulty-aware post-battle recovery and direct fish healing on the map. */
#panel .explore-health-rule{margin:7px 0 10px;padding:8px 11px;border:1px solid #cadcc5;border-radius:11px;background:#f4f9ee;color:#49674f;font:650 12px/1.5 system-ui,sans-serif}
#panel .explore-cat-buttons button.explore-fish-heal{flex:1 1 100%;background:#eaf6ed;border-color:#a7cfad;color:#3b7251;font-weight:800;min-height:37px;white-space:normal;text-align:center}
#panel .explore-cat-buttons button.explore-fish-heal:disabled{opacity:.53;cursor:not-allowed;background:#f5f5f1;color:#717f72}
#panel .battle-recovery{margin:12px 0;padding:12px 14px;border:1px solid #b7d7bb;border-radius:13px;background:linear-gradient(135deg,#f1f9ef,#fbf6e9);color:#405e49;font:600 12px/1.5 system-ui,sans-serif}
#panel .battle-recovery-title{display:block;font:850 15px/1.3 system-ui,sans-serif;color:#345c42}
#panel .battle-recovery p{margin:5px 0 8px;line-height:1.55}
#panel .battle-recovery-team{display:flex;flex-wrap:wrap;gap:5px 9px}
#panel .battle-recovery-cat{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid #d8e6d4;border-radius:8px;background:rgba(255,255,255,.72);white-space:normal}
#panel .battle-recovery-cat b{color:#29734b}
@media(max-width:440px){#panel .battle-recovery{padding:10px}#panel .battle-recovery-team{flex-direction:column;align-items:flex-start}}


/* 2026-11-21: keep duo cast reachable at the same top-right HUD anchor
   on desktop and phones. It must never share the bottom-right skill grid. */
#stage #battle-ui #duo-burst{
  top:calc(env(safe-area-inset-top,0px) + 197px)!important;
  bottom:auto!important;
  right:max(10px,calc(env(safe-area-inset-right,0px) + 8px))!important;
  left:auto!important;
  transform:none!important;
  max-width:min(38vw,206px)!important;
  z-index:24;
}
@media(max-width:700px),(pointer:coarse){
  #stage #battle-ui #duo-burst{max-width:min(44vw,188px)!important}
}
@media(orientation:landscape) and (max-height:530px){
  #stage #battle-ui #duo-burst{
    top:calc(env(safe-area-inset-top,0px) + 155px)!important;
    right:max(8px,calc(env(safe-area-inset-right,0px) + 8px))!important;
    left:auto!important;
    transform:none!important;
    max-width:min(30vw,164px)!important;
    min-height:35px;
  }
}

/* Map controls belong to the compact top-right utilities, not a full-width
   translucent banner that covers the illustrated world. */
#stage #map-actions{
  top:calc(env(safe-area-inset-top,0px) + 55px);
  right:max(8px,env(safe-area-inset-right,0px));
  left:auto;
  transform:none;
  display:flex;
  grid-template-columns:none;
  align-items:center;
  gap:5px;
  width:max-content!important;
  max-width:calc(100% - 16px);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
#stage #map-actions > button,
body.cb-exploring #stage #map-actions > button{
  flex:0 0 auto;
  width:auto!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  box-shadow:0 2px 8px rgba(45,63,48,.14)!important;
  font-size:12px!important;
}
@media(max-width:520px){
  #stage #map-actions{
    top:calc(env(safe-area-inset-top,0px) + 52px);
    left:auto;
    right:max(7px,env(safe-area-inset-right,0px));
    transform:none;
    width:max-content!important;
  }
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{
    height:42px!important;min-height:42px!important;max-height:42px!important;
    padding:7px 8px!important;
    font-size:clamp(10px,2.8vw,12px)!important;
  }
}
@media(max-width:360px){
  #stage #map-actions{gap:4px;padding:0}
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{
    padding:6px 5px!important;
    font-size:10px!important;
  }
}
@media(orientation:landscape) and (max-height:530px){
  #stage #map-actions{
    top:calc(env(safe-area-inset-top,0px) + 57px);
    right:max(7px,env(safe-area-inset-right,0px));
    left:auto;transform:none;
    width:max-content!important;
  }
  #stage #map-actions > button,
  body.cb-exploring #stage #map-actions > button{
    height:35px!important;min-height:35px!important;max-height:35px!important;
    padding:5px 8px!important;
  }
}


/* Cat-raising menu: clear Level / Training / Bonding group hierarchy. */
#panel #cat-detail .cb-grow{margin-top:14px;padding:10px;border:1px solid #d6e1d4;border-radius:16px;background:rgba(255,255,255,.53)}
#panel #cat-detail .cb-grow-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#panel #cat-detail .cb-grow-section{display:flex;flex-direction:column;min-width:0;padding:12px;border:1px solid #dbe4da;border-radius:13px;background:#fffdf9}
#panel #cat-detail .cb-grow-section:nth-child(2){background:#f8f7fc;border-color:#e0dae9}
#panel #cat-detail .cb-grow-interact{grid-column:1/-1;background:#fcf7f1;border-color:#e9dacf}
#panel #cat-detail .cb-grow-section h3{font-size:14px;line-height:1.3;margin:0;font-weight:850;color:#425c4c}
#panel #cat-detail .cb-grow-help{color:#7a877a;font-size:11px;line-height:1.45;margin:4px 0 10px}
#panel #cat-detail .cb-grow-action{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:100%;min-width:0;margin:0;padding:9px 7px;border-radius:10px;text-align:center;white-space:normal;line-height:1.3;box-shadow:none;overflow-wrap:anywhere;min-height:48px}
#panel #cat-detail .cb-grow-action strong{font-size:13px;font-weight:800}
#panel #cat-detail .cb-grow-action small{font-size:10px;line-height:1.4;font-weight:600;opacity:.85}
#panel #cat-detail .cb-grow-section>.cb-grow-action{margin-top:auto}
#panel #cat-detail .cb-grow-interactions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#panel #cat-detail .cb-grow-more{margin-top:10px;border-top:1px solid #e2e9de;padding-top:5px}
#panel #cat-detail .cb-grow-more summary{cursor:pointer;color:#53725c;font-size:12px;line-height:1.5;font-weight:750;padding:6px 3px;list-style-position:inside}
#panel #cat-detail .cb-grow-advanced{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding-top:7px}
#panel #cat-detail .cb-grow-advanced .cb-grow-action{background:#f7f8f5;color:#48644f;border:1px solid #d7e2d7}
#panel #cat-detail .cb-grow-skills{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;margin-top:9px;padding:11px 13px;border:1px solid #bdd5c1;border-radius:11px;background:#deeddf;color:#42644b;cursor:pointer;text-align:left;font-size:13px;font-weight:800}
#panel #cat-detail .cb-grow-skills:hover{background:#d1e6d3}
#panel #cat-detail .cb-grow-action:focus-visible,#panel #cat-detail .cb-grow-skills:focus-visible,#panel #cat-detail .cb-grow-more summary:focus-visible{outline:2px solid #568c68;outline-offset:2px}
@media(max-width:520px){#panel #cat-detail .cb-grow{padding:8px}#panel #cat-detail .cb-grow-grid{gap:7px}#panel #cat-detail .cb-grow-section{padding:9px 7px}#panel #cat-detail .cb-grow-action{padding:8px 5px}#panel #cat-detail .cb-grow-action strong{font-size:12px}#panel #cat-detail .cb-grow-advanced{grid-template-columns:1fr}#panel #cat-detail .cb-grow-interactions{gap:5px}}
@media(max-width:340px){#panel #cat-detail .cb-grow-grid{grid-template-columns:1fr}#panel #cat-detail .cb-grow-interact{grid-column:auto}}


/* Encounter preparation: one reliable touch/trackpad scrolling surface and
   an always-visible footer. Never let the sticky CTA cover lineup controls. */
#panel.open > .card.prebattle-dialog{
  position:relative;display:flex;flex-direction:column;box-sizing:border-box;
  height:min(780px,100%);max-height:100%!important;min-height:0;
  overflow:hidden!important;
}
#panel .prebattle-dialog > .card-close{position:absolute;top:8px;right:14px;z-index:3}
#panel .prebattle-dialog > .prebattle-scroll{
  flex:1 1 auto;min-height:0;min-width:0;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
  scrollbar-gutter:stable;padding:2px 5px 16px 1px;
}
#panel .prebattle-dialog > .prebattle-scroll:focus-visible{
  outline:2px solid #a887b7;outline-offset:-2px;border-radius:9px;
}
#panel .prebattle-dialog > .prebattle-actions{
  position:static!important;bottom:auto!important;z-index:1;flex:0 0 auto;
  margin:0!important;padding:11px 0 max(3px,env(safe-area-inset-bottom,0px));
  border-top:1px solid #e8dce7;
  background:linear-gradient(180deg,#fff8f0 0%,#fff9f1 100%);
}
/* The roster itself must NOT trap wheel/touch scrolling inside the dialog. */
#panel .prebattle-dialog .map-squad-roster,
#panel .prebattle-dialog #cp-roster{
  max-height:none!important;overflow:visible!important;overscroll-behavior:auto;
}
#panel .prebattle-dialog .battle-order{margin:9px 0 7px;padding:9px}
#panel .prebattle-dialog .battle-order-item{min-height:42px;gap:7px}
#panel .prebattle-dialog .battle-order-item button{
  min-width:42px;min-height:40px;font-size:19px;font-weight:900;
  touch-action:manipulation;flex-shrink:0;
}
#panel .prebattle-dialog .map-squad-choice.sel::after{
  content:attr(data-order-role);position:absolute;top:3px;right:4px;
  border-radius:6px;padding:3px 6px;background:#fff0bb;color:#695338;
  font:900 10px/1.2 system-ui;pointer-events:none;
}
#panel .prebattle-dialog .map-squad-count{text-align:left;margin:9px 2px 6px}
@media(max-width:700px), (pointer:coarse){
  #panel.open > .card.prebattle-dialog{
    height:100%!important;max-height:100%!important;
    padding:12px 10px 7px!important;
  }
  #panel .prebattle-dialog .battle-order-item button{min-width:44px;min-height:44px}
  #panel .prebattle-dialog .prebattle-scroll{padding-right:4px}
}
@media(orientation:landscape) and (max-height:530px){
  #panel.open > .card.prebattle-dialog{padding:6px 9px 5px!important}
  #panel .prebattle-dialog > .prebattle-actions{padding:4px 0 2px}
  #panel .prebattle-dialog .battle-order-item{min-height:34px}
  #panel .prebattle-dialog .battle-order-item button{min-height:36px}
}

/* Skill-help left; cooldown and duo-charge form one right-side HUD column. */
#stage #battle-ui #battle-skill-info-toggle{
 display:inline-flex!important;align-items:center;justify-content:center;
 left:max(9px,calc(env(safe-area-inset-left,0px) + 9px))!important;
 right:auto!important;bottom:auto!important;
 top:calc(env(safe-area-inset-top,0px) + 236px)!important;
 min-height:38px;padding:7px 12px;background:rgba(255,250,241,.96);
 color:#506d59;border-color:#c5d6c7;box-shadow:0 4px 13px #3949392b;
}
#stage #battle-ui #battle-skill-guide,#stage #battle-ui #battle-skill-tooltip{
 left:max(9px,calc(env(safe-area-inset-left,0px) + 9px))!important;
 right:auto!important;bottom:auto!important;transform:none!important;
 width:min(375px,calc(100% - 18px));box-sizing:border-box;
}
#stage #battle-ui #battle-skill-guide{
 top:calc(env(safe-area-inset-top,0px) + 281px)!important;
 max-height:min(48dvh,calc(100dvh - 345px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
}
#stage #battle-ui #battle-skill-tooltip{
 top:calc(env(safe-area-inset-top,0px) + 281px)!important;
 width:min(310px,calc(100% - 18px));
}
#stage #battle-ui #ult-wrap,#stage #battle-ui #duo-burst{
 box-sizing:border-box;left:auto!important;bottom:auto!important;transform:none!important;
 right:max(9px,calc(env(safe-area-inset-right,0px) + 9px))!important;
 width:min(34vw,146px)!important;max-width:min(34vw,146px)!important;
 border:1.5px solid #b8ccbb;border-radius:13px;
 background:linear-gradient(135deg,rgba(255,250,241,.98),rgba(239,246,237,.97));
 box-shadow:0 4px 13px #3949392b;
}
#stage #battle-ui #ult-wrap{
 top:calc(env(safe-area-inset-top,0px) + 99px)!important;
 min-height:38px;padding:5px 8px!important;display:flex;
 flex-direction:column;justify-content:center;text-align:left;
}
#stage #battle-ui #ult-wrap .ult-label{
 display:block;color:#536d5a;font:850 11px/1.1 system-ui,sans-serif;
}
#stage #battle-ui #ult-wrap .ult-track{
 width:100%;height:4px;margin-top:5px;background:#dce4d8;
}
#stage #battle-ui #duo-burst{
 top:calc(env(safe-area-inset-top,0px) + 145px)!important;
 min-height:48px;padding:5px 7px 10px;gap:5px;
}
#stage #battle-ui #duo-burst .duo-burst-emblem{width:25px;height:25px;font-size:17px}
#stage #battle-ui #duo-burst .duo-burst-label{
 font:850 clamp(10px,1.2vw,12px)/1.2 system-ui,sans-serif;
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 overflow:hidden;overflow-wrap:anywhere;
}
#stage #battle-ui #duo-burst .duo-burst-track{
 height:4px;left:38px;right:8px;bottom:4px;background:#dce4d8;
}
@media(max-width:700px),(pointer:coarse){
 #stage #battle-ui #duo-burst{min-height:46px;padding:5px 7px 9px;}
 #stage #battle-ui #duo-burst .duo-burst-emblem{width:23px;height:23px;font-size:17px;}
 #stage #battle-ui #duo-burst .duo-burst-track{left:36px;right:8px;}
 #stage #battle-ui #battle-skill-info-toggle{
  top:calc(env(safe-area-inset-top,0px) + 230px)!important;
 }
 #stage #battle-ui #battle-skill-guide,#stage #battle-ui #battle-skill-tooltip{
  top:calc(env(safe-area-inset-top,0px) + 274px)!important;
 }
}
@media(orientation:landscape) and (max-height:530px){
 #stage #battle-ui #ult-wrap{
  top:calc(env(safe-area-inset-top,0px) + 84px)!important;
  min-height:33px;padding:4px 7px!important;
 }
 #stage #battle-ui #duo-burst{
  top:calc(env(safe-area-inset-top,0px) + 123px)!important;
  min-height:44px;padding:4px 7px 8px;
 }
 #stage #battle-ui #battle-skill-info-toggle{
  /* Landscape: roster + bench occupy the left edge, joystick the lower left.
     Put help in the unused gap immediately beside the team (still left half). */
  top:calc(env(safe-area-inset-top,0px) + 128px)!important;
  left:clamp(160px,29vw,246px)!important;
  min-height:33px;padding:5px 10px;
 }
 #stage #battle-ui #battle-skill-guide{
  top:calc(env(safe-area-inset-top,0px) + 45px)!important;
  width:min(360px,48vw);
  max-height:calc(100dvh - 100px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
 }
 #stage #battle-ui #battle-skill-tooltip{
  top:calc(env(safe-area-inset-top,0px) + 45px)!important;
  width:min(310px,48vw);
 }
}


/* Quarrel storybook v2 — readable in the actual game AND the recorded trailer. */
#panel.open:has(.duo-quarrel-story){align-items:center!important;justify-content:center!important}
#panel.open > .card:has(.duo-quarrel-story){
 box-sizing:border-box!important;width:min(510px,calc(100% - 20px))!important;
 min-height:0!important;height:auto!important;max-height:100%!important;
 padding:clamp(14px,2.3vw,24px)!important;overflow-x:hidden!important;
 overflow-y:auto!important;overscroll-behavior-y:contain;
 border:2px solid #efc5c5;background:linear-gradient(165deg,#fffcf5,#fff0e9 58%,#f6edf7);
 box-shadow:0 18px 55px rgba(65,42,60,.28);
}
#panel .duo-quarrel-story{width:100%;max-width:465px;margin:0 auto;display:flex;flex-direction:column;
 align-items:center;gap:10px;text-align:center;color:#5b4857}
#panel .duo-quarrel-story .duo-quarrel-eyebrow{font:850 10px/1.4 system-ui,sans-serif;
 letter-spacing:.14em;color:#a36782}
#panel .duo-quarrel-story h2{font:850 clamp(20px,3.3vw,27px)/1.23 system-ui,sans-serif;
 color:#62435d;margin:0;letter-spacing:-.02em}
#panel .duo-quarrel-cats{display:flex;align-items:center;justify-content:center;gap:clamp(8px,4vw,22px);width:100%}
#panel .duo-quarrel-cats figure{margin:0;min-width:0;display:flex;flex-direction:column;
 align-items:center;gap:5px;flex:0 1 136px}
#panel .duo-quarrel-cats canvas{display:block;width:clamp(86px,22vw,116px);height:clamp(86px,22vw,116px);
 max-width:100%;object-fit:contain;border:2px solid #efd8d6;border-radius:23px;
 background:radial-gradient(circle at 50% 30%,#fffdfa,#f3e7e1)}
#panel .duo-quarrel-cats figcaption{font:850 13px/1.35 system-ui,sans-serif;max-width:100%;
 overflow-wrap:anywhere;color:#614f61}
#panel .duo-quarrel-heart{font:900 33px/1 system-ui,sans-serif;color:#cc91a3;flex:0 0 auto}
#panel .duo-quarrel-vignette{width:100%;box-sizing:border-box;padding:14px 17px;
 border-radius:15px;border:1px solid #f2d1cf;background:rgba(255,255,255,.76)}
#panel .duo-quarrel-vignette p{margin:0;font:600 clamp(14px,2.5vw,16px)/1.65 system-ui,sans-serif;
 color:#644e59;text-wrap:pretty}
#panel .duo-quarrel-story .duo-quarrel-help{font:750 13px/1.5 system-ui,sans-serif;
 margin:0;color:#82627a}
#panel .duo-quarrel-actions{width:100%;margin:1px 0 0;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
#panel .duo-quarrel-actions .btn{min-height:44px;padding:11px 18px;font-size:14px;flex:1 1 140px}
#panel .duo-quarrel-footnote{font:550 11px/1.45 system-ui,sans-serif;color:#937e8a;margin:0}
@media(max-width:520px){
 #panel.open>.card:has(.duo-quarrel-story){padding:15px 13px!important}
 #panel .duo-quarrel-story{gap:8px}
 #panel .duo-quarrel-vignette{padding:11px 12px}
}
@media(orientation:landscape) and (max-height:530px){
 #panel.open>.card:has(.duo-quarrel-story){padding:8px 13px!important}
 #panel .duo-quarrel-story{gap:5px}
 #panel .duo-quarrel-story h2{font-size:19px}
 #panel .duo-quarrel-cats canvas{width:65px;height:65px;border-radius:14px}
 #panel .duo-quarrel-heart{font-size:24px}
 #panel .duo-quarrel-vignette{padding:7px 11px}
 #panel .duo-quarrel-vignette p{font-size:12px;line-height:1.42}
 #panel .duo-quarrel-actions .btn{min-height:36px;padding:6px 10px;font-size:12px}
 #panel .duo-quarrel-footnote{font-size:10px}
}



/* Cat Bond: actual equipped-skill guide belongs immediately left of fullscreen. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions #battle-skill-info-toggle{
  display:none!important;position:relative!important;inset:auto!important;
  align-items:center!important;justify-content:center!important;
  width:auto!important;min-width:34px!important;max-width:110px!important;
  height:34px!important;min-height:34px!important;max-height:34px!important;
  box-sizing:border-box!important;flex:0 0 auto!important;padding:0 9px!important;margin:0!important;
  border:1px solid #c4d5c4!important;border-radius:9px!important;
  background:#fffaf1!important;color:#46624d!important;
  box-shadow:0 2px 5px #34293b20!important;
  font:850 12px/1 system-ui,sans-serif!important;
  cursor:pointer!important;pointer-events:auto!important;white-space:nowrap!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#battle-ui.on) #cb-header-actions #battle-skill-info-toggle{display:inline-flex!important}
html[data-mw-fullscreen-game="cat-bond"] #cb-header-actions #battle-skill-info-toggle:focus-visible{outline:3px solid #6ca27e!important;outline-offset:2px!important}
#stage #battle-ui #battle-skill-guide{
  left:auto!important;right:max(9px,calc(env(safe-area-inset-right,0px) + 9px))!important;
  top:calc(env(safe-area-inset-top,0px) + 45px)!important;
  width:min(375px,calc(100% - 18px))!important;
  max-height:min(65dvh,calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 125px))!important;
}
@media(max-width:540px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions #battle-skill-info-toggle{
   width:34px!important;min-width:34px!important;max-width:34px!important;padding:0!important;font-size:0!important
 }
 html[data-mw-fullscreen-game="cat-bond"] #cb-header-actions #battle-skill-info-toggle::before{content:"ⓘ";font:900 18px/1 system-ui,sans-serif!important}
}
@media(orientation:landscape) and (max-height:530px){
 #stage #battle-ui #battle-skill-guide{
  top:calc(env(safe-area-inset-top,0px) + 43px)!important;
  max-height:calc(100dvh - 98px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
 }
}

/* One exploration menu in the top utility row; legacy secondary toolbar hidden. */
#stage #map-actions,body.cb-exploring #stage #map-actions{display:none!important}
body:has(#intro.hide) #cb-home{display:none!important}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu{
  position:relative!important;inset:auto!important;transform:none!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:auto!important;min-width:65px!important;height:34px!important;min-height:34px!important;
  max-height:34px!important;margin:0 2px 0 0!important;padding:0 8px!important;
  border:1px solid #d8c8dd!important;border-radius:9px!important;
  background:#f5edf7!important;color:#64526e!important;
  box-shadow:0 2px 5px #34293b20!important;
  font:850 12px/1 system-ui,sans-serif!important;
  white-space:nowrap!important;touch-action:manipulation!important;pointer-events:auto!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu[hidden],
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#battle-ui.on) #cb-header-actions > #map-menu{display:none!important}
@media(max-width:380px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu{
  width:34px!important;min-width:34px!important;max-width:34px!important;padding:0!important;font-size:0!important
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu::before{
  content:"☰";font:900 18px/1 system-ui,sans-serif!important
 }
}

/* Fixed: the map's Yard return always owns the far-left corner.
   Settings + menu remain on the RIGHT, with reserved space even at 320px. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
  display:none!important;position:relative!important;inset:auto!important;
  box-sizing:border-box!important;align-items:center!important;justify-content:center!important;
  flex:0 0 auto!important;width:118px!important;min-width:0!important;height:34px!important;
  padding:0 9px!important;margin:0!important;border-radius:9px!important;
  border:1px solid #e6b8c6!important;background:rgba(36,26,51,.95)!important;
  box-shadow:0 2px 6px #34293b28!important;color:#fff!important;
  font:800 12px/1 system-ui,sans-serif!important;white-space:nowrap!important;
  touch-action:manipulation!important;pointer-events:auto!important;cursor:pointer!important;
}
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage:not(:has(#battle-ui.on)) #cb-header #cb-yard-return{
  display:inline-flex!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return:focus-visible{
  outline:3px solid #f2c1d1!important;outline-offset:2px!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{
  min-width:0!important;max-width:calc(100% - 126px)!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #mw-game-settings{
  margin:0!important;
}
@media(max-width:420px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
   width:82px!important;padding:0 3px!important;font-size:11px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{
   gap:2px!important;max-width:calc(100% - 88px)!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu{
   width:34px!important;min-width:34px!important;max-width:34px!important;
   padding:0!important;font-size:0!important;margin:0!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu::before{
   content:"☰";font:900 18px/1 system-ui,sans-serif!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #mw-game-settings{
   gap:2px!important;
 }
}
@media(max-width:340px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
   width:76px!important;font-size:10px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{
   max-width:calc(100% - 79px)!important;
 }
}

/* Resource counters share the SAME row as the exploration menu.
   The movable HUD keeps its live #coins/#fish text and has no separate line. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud{
 position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;
 margin:0 2px 0 0!important;padding:0!important;width:auto!important;height:34px!important;
 max-width:none!important;min-width:0!important;flex:0 1 auto!important;
 display:flex!important;align-items:center!important;justify-content:flex-end!important;
 gap:3px!important;z-index:auto!important;pointer-events:none!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-spacer,
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .scene-title{
 display:none!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill{
 box-sizing:border-box!important;min-width:0!important;max-width:none!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 gap:3px!important;margin:0!important;padding:4px 6px!important;
 height:32px!important;min-height:32px!important;border-radius:9px!important;
 font:850 11px/1 system-ui,sans-serif!important;white-space:nowrap!important;
 box-shadow:0 2px 5px #34293b20!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill .ico{
 font-size:13px!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage:not(:has(#battle-ui.on)) #cb-header-actions > #hud.hidden,
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage:not(:has(#battle-ui.on)) #cb-header-actions > #hud{
 display:flex!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#battle-ui.on) #cb-header-actions > #hud,
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#intro:not(.hide)) #cb-header-actions > #hud{
 display:none!important;
}
@media(max-width:700px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud{gap:2px!important;margin-right:0!important;}
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill{
  gap:2px!important;padding:3px 4px!important;height:30px!important;min-height:30px!important;font-size:10px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill .ico{font-size:11px!important}
}
@media(max-width:420px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
  width:52px!important;min-width:52px!important;padding:0 2px!important;font-size:0!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return::before{
  content:"←";font:900 20px/1 system-ui,sans-serif!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{
  max-width:calc(100% - 55px)!important;gap:2px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill{
  padding:2px 3px!important;gap:1px!important;font-size:9px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill span:not(.ico){
  max-width:30px!important;min-width:0!important;overflow:hidden!important;
  text-overflow:ellipsis!important;font-variant-numeric:tabular-nums;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > .mw-fullscreen-toggle{
  width:30px!important;min-width:30px!important;max-width:30px!important;
  height:32px!important;min-height:32px!important;max-height:32px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #map-menu{
  width:30px!important;min-width:30px!important;max-width:30px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #mw-game-settings button{
  width:26px!important;min-width:26px!important;height:30px!important;min-height:30px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #mw-game-settings .mw-settings-language{
  width:28px!important;min-width:28px!important;font-size:9px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #mw-game-settings{gap:1px!important;}
}
@media(max-width:340px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{width:34px!important;min-width:34px!important}
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{max-width:calc(100% - 37px)!important}
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud .hud-pill span:not(.ico){max-width:24px!important}
}

/* Preserve an explicit, readable Yard label even on small phones. */
@media(max-width:420px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
  width:78px!important;min-width:78px!important;font-size:11px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return::before{content:none!important}
}
@media(max-width:340px){
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
  width:60px!important;min-width:60px!important;font-size:10px!important;
 }
 html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions{
  max-width:calc(100% - 62px)!important;
 }
}

/* Stable right-edge toolbar on BOTH the yard and the exploration map.
   The left-side yard-return / opening home link retain their own slot. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header{
  justify-content:flex-end!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-yard-return{
  margin-right:auto!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-header-actions{
  margin-left:auto!important;justify-content:flex-end!important;
  flex-wrap:nowrap!important;max-width:min(100%,calc(100% - 126px))!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #hud{
  margin-left:0!important;flex-shrink:1!important;overflow:hidden!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#intro:not(.hide)) #cb-header-actions > #map-menu{
  display:none!important;
}
@media(max-width:420px){
  html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-header-actions{
    max-width:calc(100% - 84px)!important;
  }
}
@media(max-width:340px){
  html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header #cb-header-actions{
    max-width:calc(100% - 62px)!important;
  }
}
/* Hide the untranslated initial Cat Bond DOM until the English display layer is ready. */
html[lang="en"]:not(.cb-i18n-ready) #game-root{visibility:hidden}

/* Permanent 5-tab yard navigation: no do-nothing current-Yard tab.
   The top-right utility rail is flush right in the yard; in maps it
   reserves the independent left Back to Yard space. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
}
html[data-mw-fullscreen-game="cat-bond"] body:not(.cb-exploring) #stage #cb-header #cb-yard-return{
  display:none!important;
}
html[data-mw-fullscreen-game="cat-bond"] body:not(.cb-exploring) #stage #cb-header #cb-header-actions{
  flex:0 1 auto!important;margin-left:auto!important;max-width:100%!important;
}
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage #cb-header #cb-header-actions{
  margin-left:auto!important;max-width:calc(100% - 126px)!important;
}
@media(max-width:420px){
  html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage #cb-header #cb-header-actions{
    max-width:calc(100% - 84px)!important;
  }
}
@media(max-width:340px){
  html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage #cb-header #cb-header-actions{
    max-width:calc(100% - 64px)!important;
  }
}

/* User-facing phone toolbar: gameplay guide immediately precedes Menu.
   No more detached '? 玩法' bubble floating on the left of the yard. */
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #guide-help{
  display:inline-flex!important;position:relative!important;
  top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
  inset:auto!important;transform:none!important;z-index:auto!important;
  box-sizing:border-box!important;align-items:center!important;justify-content:center!important;
  min-width:52px!important;width:auto!important;height:34px!important;min-height:34px!important;
  max-height:34px!important;margin:0!important;padding:0 7px!important;
  border-radius:9px!important;border:1px solid #dfcfe3!important;
  background:#fff7ef!important;color:#69556e!important;
  font:850 12px/1 system-ui,sans-serif!important;box-shadow:0 2px 5px #34293b20!important;
  white-space:nowrap!important;flex:0 0 auto!important;pointer-events:auto!important;
}
html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #guide-help[hidden],
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage #cb-header-actions > #guide-help,
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#battle-ui.on) #cb-header-actions > #guide-help,
html[data-mw-fullscreen-game="cat-bond"] #stage:has(#intro:not(.hide)) #cb-header-actions > #guide-help{
  display:none!important;
}
/* Exploration map carries its own named region and progress HUD. Resource chips
   duplicate the yard display and overlap the separate left 'Back to Yard' control. */
/* The older :not(:has(#battle-ui.on)) HUD override has more IDs than
   ordinary map styles; this rule must win that specificity contest. */
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage:not(:has(#battle-ui.on)) #cb-header #cb-header-actions > #hud,
html[data-mw-fullscreen-game="cat-bond"] body.cb-exploring #stage:not(:has(#battle-ui.on)) #cb-header #cb-header-actions > #hud.hidden{
  display:none!important;
}
@media(max-width:420px){
  html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #guide-help{
    min-width:43px!important;padding:0 4px!important;font-size:11px!important;
  }
}
@media(max-width:340px){
  html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #guide-help{
    min-width:28px!important;max-width:28px!important;width:28px!important;
    font-size:0!important;padding:0!important;
  }
  html[data-mw-fullscreen-game="cat-bond"] #stage #cb-header-actions > #guide-help:not([hidden])::before{
    content:"?";font:900 18px/1 system-ui,sans-serif!important;
  }
}

/* User-confirmed GOLD currency uses our own artwork, not OS-specific emoji. */
.cb-gold-coin{display:inline-block;width:1.08em;height:1.08em;vertical-align:-.18em;object-fit:contain;flex:none;filter:drop-shadow(0 1px 1px #86602a44)}
#hud .hud-pill .cb-gold-coin{width:16px;height:16px;vertical-align:middle}

/* Enemy poise is intentionally more prominent than HP in both battle HUDs.
   This block changes presentation ONLY, never resource balance. */
#battle-ui .battle-enemy-summary{
  gap:2px!important;justify-content:center;min-width:0
}
#battle-ui .battle-topbar{grid-template-rows:minmax(42px,auto)!important}
#battle-ui .battle-enemy-track{
  height:6px!important;min-height:6px;flex:none
}
#battle-ui .battle-poise-row{
  display:flex;align-items:center;gap:4px;width:100%;min-width:0
}
#battle-ui .battle-poise-label{
  flex:none;min-width:22px;font:850 9px/1 system-ui,sans-serif;
  color:#987024;white-space:nowrap
}
#battle-ui .battle-poise-track{
  display:block;flex:1 1 auto;min-width:20px;height:6px!important;
  border-radius:999px;border:1px solid #c7a866;box-sizing:border-box;
  background:#e9dfc7;overflow:hidden
}
#battle-ui #battle-enemy-poise-fill{
  display:block;width:100%;height:100%;border-radius:inherit;
  background:linear-gradient(90deg,#d29c37,#f1d26b);
  transition:width .13s linear
}
#battle-ui .battle-poise-track.is-staggered{
  border-color:#da7a70;background:#f4dcdb;
  box-shadow:0 0 0 1px #e89e8e66
}
#battle-ui .battle-poise-track.is-staggered #battle-enemy-poise-fill{
  background:linear-gradient(90deg,#bb625c,#e6a49b)
}
#battle-ui .battle-topbar{min-height:46px!important}
@media(max-width:520px){
  #battle-ui .battle-enemy-summary{gap:2px!important}
  #battle-ui .battle-poise-label{font-size:8px;min-width:18px}
}

/* Duo creation belongs near the top on phones; the form stays compact and
   independent cat lists keep their place when the player chooses either cat. */
#panel .duo-chooser-selection{font:850 13px/1.4 system-ui;color:#67516d;
 text-align:center;padding:5px 8px;background:#f7eef8;border-radius:9px}
#panel .duo-chooser-confirm{width:100%;min-height:46px;touch-action:manipulation}
#panel .duo-cat-chip-list{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
@media(max-width:520px){
 #panel .duo-direct-chooser{padding:10px;gap:7px}
 #panel .duo-cat-chip-list{max-height:98px;align-content:flex-start}
 #panel .duo-cat-chip{min-height:42px;padding:7px 11px}
 #panel .duo-chooser-confirm{min-height:48px}
}


/* Cat profile: show the TRUE combat stats and a clearly bounded secondary
   school. Keep short labels readable on 320px phone dialogs. */
#panel #cat-detail .cat-detail-combat-stats{
  margin-top:12px;padding:12px;border:1px solid #d6e1d4;
  border-radius:14px;background:rgba(255,253,246,.82);color:#47604e;
}
#panel #cat-detail .cat-detail-combat-stats h3{
  font:850 14px/1.3 system-ui,sans-serif;margin:3px 0 9px;color:#3e604b;
}
#panel #cat-detail .cat-detail-combat-stats h3:not(:first-child){margin-top:13px}
#panel #cat-detail .cat-detail-element-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;
  font-size:13px;line-height:1.6;
}
#panel #cat-detail .cat-detail-element-row span{
  padding:5px 8px;background:#f4f4ea;border:1px solid #e0e6d7;border-radius:9px;
}
#panel #cat-detail .cat-detail-side-hint{
  font-size:11px;line-height:1.65;margin:7px 0 11px;color:#6c7e6d;
}
#panel #cat-detail .cat-detail-stat-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;
}
#panel #cat-detail .cat-detail-stat-grid .stat-row{
  min-width:0;display:flex;align-items:center;gap:6px;margin:0;
}
#panel #cat-detail .cat-detail-stat-grid .stat-row .label{
  min-width:30px;width:auto;flex:0 0 auto;font-size:11px;
}
#panel #cat-detail .cat-detail-stat-grid .stat-row .bar{min-width:0;flex:1;}
#panel #cat-detail .cat-detail-stat-grid .stat-row .val{width:auto;min-width:20px;}
#panel #cat-detail .cat-detail-metric{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  min-width:0;padding:8px 10px;border-radius:9px;background:#f4f7ee;
  border:1px solid #e3eadf;font-size:11px;line-height:1.5;
}
#panel #cat-detail .cat-detail-metric strong{
  font-size:13px;color:#385747;font-variant-numeric:tabular-nums;
}
@media(max-width:360px){
  #panel #cat-detail .cat-detail-combat-stats{padding:9px}
  #panel #cat-detail .cat-detail-stat-grid{gap:6px}
  #panel #cat-detail .cat-detail-metric{padding:6px 7px}
}

/* The selected lawn spot builds in one gesture, not via a separate modal. */
body.cb-placing-building #yard-placement-cancel{
  flex:0 0 auto;min-width:105px;max-width:140px;justify-self:center;
}
@media (min-width:701px) and (pointer:fine){
  body.cb-placing-building #yard-placement-dock{
    top:calc(76px + env(safe-area-inset-top,0px));
    bottom:auto;width:min(92%,440px);padding:10px 14px;gap:6px;
  }
  body.cb-placing-building #yard-placement-dock .cb-placement-heading{display:none}
}


/* CrazyGames yard: retain the *official website's TWO DIFFERENT docks*.
   Five named navigation tabs belong in the bottom-centre horizontal strip;
   ONLY the five small icon-only garden actions belong on the right edge.
   Do not change the hierarchy into two tall right-side columns. */
html.cb-cg #stage #cg-yard-dock{
  position:absolute!important;
  inset:0!important;
  top:0!important;bottom:0!important;left:0!important;right:0!important;
  display:block!important;
  transform:none!important;
  width:100%!important;height:100%!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;padding:0!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  z-index:30;
  pointer-events:none!important;
}
html.cb-cg #stage #cg-yard-dock > #tabbar{
  position:absolute!important;
  top:auto!important;right:auto!important;
  bottom:max(7px,env(safe-area-inset-bottom,0px))!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
  align-items:stretch!important;
  gap:clamp(3px,.65vw,7px)!important;
  width:max-content!important;max-width:calc(100% - 76px)!important;
  min-width:0!important;height:auto!important;
  margin:0!important;padding:0!important;
  border:0!important;box-shadow:none!important;
  background:transparent!important;background-image:none!important;
  isolation:auto!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
html.cb-cg #stage #cg-yard-dock > #yard-actions{
  position:absolute!important;
  top:auto!important;left:auto!important;
  right:max(8px,env(safe-area-inset-right,0px))!important;
  bottom:max(73px,calc(env(safe-area-inset-bottom,0px) + 73px))!important;
  transform:none!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
  align-items:stretch!important;
  flex-wrap:nowrap!important;
  gap:5px!important;
  width:max-content!important;max-width:none!important;
  height:auto!important;
  margin:0!important;padding:0!important;
  border:0!important;box-shadow:none!important;
  background:transparent!important;background-image:none!important;
  overflow:visible!important;
  isolation:auto!important;
  pointer-events:auto!important;
}
html.cb-cg #cg-yard-dock #tabbar .tab{
  position:relative!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  width:clamp(42px,7vw,78px)!important;
  min-width:0!important;max-width:none!important;
  height:clamp(48px,5.4vw,59px)!important;
  min-height:0!important;max-height:none!important;
  padding:4px 3px!important;
  gap:2px!important;
  border-radius:13px!important;
  font:850 clamp(9px,1vw,12px)/1.1 system-ui,sans-serif!important;
  white-space:nowrap!important;
}
html.cb-cg #cg-yard-dock #tabbar .tab .ico{
  font-size:clamp(17px,1.8vw,23px)!important;
  line-height:1!important;
}
html.cb-cg #cg-yard-dock #yard-actions .fab,
html.cb-cg #cg-yard-dock #fab-map.map-fab{
  box-sizing:border-box!important;
  display:flex!important;
  flex:0 0 auto!important;
  justify-content:center!important;align-items:center!important;
  width:clamp(42px,4.8vw,54px)!important;
  min-width:0!important;max-width:none!important;
  height:clamp(42px,4.8vw,54px)!important;
  min-height:0!important;max-height:none!important;
  padding:2px!important;border-radius:13px!important;
  font-size:clamp(18px,2vw,23px)!important;
}
html.cb-cg #cg-yard-dock #fab-map.map-fab{flex-direction:column!important;gap:0!important}
html.cb-cg #cg-yard-dock #fab-map.map-fab small{
  font-size:9px!important;line-height:1.05!important;white-space:nowrap!important;
}
/* Keep the bottom tab row clear of the separate right-side garden rail on
   small phones and thin portrait iframes. Do not stack the five tabs vertically. */
@media(max-width:560px){
  html.cb-cg #stage #cg-yard-dock > #tabbar{
    left:calc(50% - 23px)!important;
    gap:3px!important;
    max-width:calc(100% - 60px)!important;
  }
  html.cb-cg #cg-yard-dock #tabbar .tab{
    width:clamp(42px,calc((100vw - 94px)/5.5),65px)!important;
    height:48px!important;font-size:9px!important;
    padding:3px 1px!important;
  }
  html.cb-cg #cg-yard-dock #tabbar .tab .ico{font-size:18px!important}
  html.cb-cg #stage #cg-yard-dock > #yard-actions{
    right:5px!important;bottom:64px!important;gap:4px!important;
  }
  html.cb-cg #cg-yard-dock #yard-actions .fab,
  html.cb-cg #cg-yard-dock #fab-map.map-fab{
    width:44px!important;height:46px!important;font-size:19px!important;
  }
}
@media(max-height:470px) and (orientation:landscape){
  html.cb-cg #stage #cg-yard-dock > #tabbar{bottom:5px!important;gap:4px!important}
  html.cb-cg #cg-yard-dock #tabbar .tab{
    height:45px!important;padding:2px 3px!important;
  }
  html.cb-cg #stage #cg-yard-dock > #yard-actions{
    bottom:58px!important;gap:3px!important;
  }
  html.cb-cg #cg-yard-dock #yard-actions .fab,
  html.cb-cg #cg-yard-dock #fab-map.map-fab{
    height:42px!important;min-height:42px!important;
  }
}

/* CrazyGames combat status and permanent portal utility row, v1.
   Own this ONE layout in portal mode: no inherited absolute offsets for the
   enemy HP/poise, active cats, reserves, ultimate or duo charge. */
html.cb-cg #stage #cg-top-tools{
  position:absolute!important;
  top:max(6px,env(safe-area-inset-top,0px))!important;
  right:max(7px,env(safe-area-inset-right,0px))!important;
  left:auto!important;bottom:auto!important;
  display:flex!important;justify-content:flex-end;align-items:center;
  /* Above gameplay, but BELOW modal overlays (z40), so popups stay usable. */
  z-index:32!important;
  max-width:calc(100% - 14px);
  box-sizing:border-box;pointer-events:none;
}
html.cb-cg #stage #cg-top-tools #cb-header-actions{
  display:flex!important;justify-content:flex-end!important;align-items:center!important;
  gap:4px!important;max-width:100%;min-width:0;pointer-events:auto!important;
}
html.cb-cg #stage #cg-top-tools #map-menu{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  position:relative!important;inset:auto!important;transform:none!important;
  box-sizing:border-box!important;
  width:auto!important;min-width:54px!important;
  height:34px!important;min-height:34px!important;max-height:34px!important;
  padding:0 8px!important;margin:0!important;
  border:1px solid #d9c8dd!important;border-radius:9px!important;
  background:#f5edf7!important;color:#64526e!important;
  box-shadow:0 2px 5px #34293b20!important;
  font:850 11px/1 system-ui,sans-serif!important;
  white-space:nowrap;cursor:pointer;pointer-events:auto!important;
}
html.cb-cg #stage #cg-top-tools #map-menu[hidden],
html.cb-cg #stage:has(#battle-ui.on) #cg-top-tools #map-menu{
  display:none!important;
}
html.cb-cg #stage #cg-top-tools #mw-game-settings{
  position:relative!important;inset:auto!important;
  pointer-events:auto!important;margin:0!important;
}
@media(max-width:480px){
  html.cb-cg #stage #cg-top-tools #map-menu{
    min-width:35px!important;width:35px!important;
    font-size:0!important;padding:0!important;
  }
  html.cb-cg #stage #cg-top-tools #map-menu::before{
    content:"☰";font:900 19px/1 system-ui,sans-serif;
  }
  html.cb-cg #stage #cg-top-tools #cb-header-actions{gap:2px!important}
}

html.cb-cg #stage #battle-ui #cg-battle-hud{
  position:absolute!important;
  top:calc(max(6px,env(safe-area-inset-top,0px)) + 43px)!important;
  left:max(7px,env(safe-area-inset-left,0px))!important;
  right:max(7px,env(safe-area-inset-right,0px))!important;
  bottom:auto!important;
  box-sizing:border-box;
  display:flex!important;flex-direction:column!important;
  align-items:stretch!important;gap:8px!important;
  width:auto!important;max-width:none!important;
  z-index:18!important;pointer-events:none!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar{
  position:relative!important;inset:auto!important;transform:none!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto!important;
  align-items:center!important;gap:6px!important;
  width:100%!important;max-width:100%!important;
  height:auto!important;min-height:48px!important;
  padding:7px 9px!important;margin:0!important;
  box-sizing:border-box!important;border-radius:12px!important;
  pointer-events:auto!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar .battle-enemy-summary{
  grid-column:1!important;grid-row:1!important;
  width:100%!important;min-width:0!important;
  align-self:center!important;
  display:flex!important;flex-direction:column!important;gap:5px!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar .battle-tools{
  grid-column:2!important;grid-row:1!important;
  max-width:min(52vw,240px)!important;
  min-width:0!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-lower{
  display:flex!important;flex-direction:row!important;
  align-items:flex-start!important;justify-content:space-between!important;
  gap:clamp(6px,1.2vw,12px)!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  pointer-events:none!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #battle-squad-rail{
  position:relative!important;inset:auto!important;transform:none!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  display:flex!important;flex:1 1 auto!important;
  align-items:flex-start!important;flex-direction:column!important;gap:6px!important;
  width:auto!important;max-width:calc(100% - 104px)!important;min-width:0!important;
  margin:0!important;padding:0!important;pointer-events:none!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #battle-squad-rail #team-slots{
  position:relative!important;inset:auto!important;transform:none!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  height:auto!important;display:flex!important;flex-direction:row!important;
  flex-wrap:wrap!important;gap:clamp(4px,.8vw,8px)!important;
  margin:0!important;padding:0!important;
  pointer-events:auto!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #battle-squad-rail #bench-slots{
  position:relative!important;inset:auto!important;transform:none!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  width:auto!important;max-width:100%!important;
  margin:0!important;padding:0!important;
  pointer-events:auto!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #battle-squad-rail #bench-slots.is-open{
  max-height:min(190px,35dvh)!important;
  padding:5px!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges{
  position:relative!important;inset:auto!important;
  flex:0 0 clamp(94px,15vw,145px)!important;
  display:flex!important;flex-direction:column!important;gap:7px!important;
  width:clamp(94px,15vw,145px)!important;
  max-width:40%!important;min-width:0!important;
  box-sizing:border-box!important;pointer-events:none!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #ult-wrap,
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #duo-burst{
  position:relative!important;inset:auto!important;transform:none!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  display:flex!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;pointer-events:auto!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #duo-burst[hidden]{
  display:none!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #ult-wrap{
  min-height:40px!important;
  flex-direction:column!important;align-items:stretch!important;
  text-align:left!important;padding:6px 8px!important;
}
html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #duo-burst{
  min-height:46px!important;align-items:center!important;justify-content:center!important;
  padding:6px 8px 11px!important;
}
@media(max-width:520px){
  html.cb-cg #stage #battle-ui #cg-battle-hud{
    left:5px!important;right:5px!important;gap:6px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar{
    min-height:51px!important;padding:6px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges{
    flex-basis:94px!important;width:94px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud #battle-squad-rail{
    max-width:calc(100% - 100px)!important;
  }
}
@media(max-height:530px) and (orientation:landscape){
  html.cb-cg #stage #battle-ui #cg-battle-hud{
    top:calc(max(5px,env(safe-area-inset-top,0px)) + 40px)!important;
    gap:5px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar{
    min-height:43px!important;padding:5px 7px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #ult-wrap{
    min-height:36px!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud #cg-battle-charges #duo-burst{
    min-height:41px!important;
  }
}


/* CrazyGames compact portrait combat header, v2: do not squeeze enemy HP and
   the three battle controls into the same 390px row. Both stack in normal flow,
   pushing the squad and gauges below the complete header automatically. */
@media(max-width:520px){
  html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    row-gap:6px!important;
    min-height:0!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar .battle-enemy-summary{
    grid-row:1!important;grid-column:1!important;
    min-width:0!important;width:100%!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud > .battle-topbar .battle-tools{
    grid-row:2!important;grid-column:1!important;
    justify-self:end!important;
    max-width:100%!important;
  }
}


/* CrazyGames: compact desktop hotkeys; full names remain readable,
   but the skills must not dominate the lower half of the playfield.
   Keep genuinely touchable 3x2 controls for touch-screen players. */
html.cb-cg #stage #battle-ui .move-bar{
  position:absolute!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  bottom:max(7px,env(safe-area-inset-bottom,0px))!important;
  width:max-content!important;
  max-width:calc(100% - 14px)!important;
  height:auto!important;
  box-sizing:border-box!important;
  align-items:flex-end!important;
  justify-content:center!important;
  gap:clamp(4px,.55vw,7px)!important;
  margin:0!important;
  padding:2px!important;
  z-index:26!important;
  pointer-events:auto!important;
}
html.cb-cg #stage #battle-ui .move-bar .move{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  width:clamp(62px,6.5vw,80px)!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  min-height:64px!important;
  max-height:none!important;
  padding:4px 3px!important;
  border-radius:12px!important;
  gap:2px!important;
  overflow:visible!important;
  white-space:normal!important;
}
html.cb-cg #stage #battle-ui .move-bar .mv-name,
html.cb-cg #stage #battle-ui .move-bar #ult-btn .mv-name{
  display:block!important;
  flex:0 0 auto!important;
  position:relative!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  font:850 clamp(9.5px,.8vw,11px)/1.11 system-ui,sans-serif!important;
  text-align:center!important;
}
html.cb-cg #stage #battle-ui .move-bar .mv-icon{
  display:block!important;
  flex:0 0 auto!important;
  font-size:clamp(17px,1.55vw,21px)!important;
  line-height:1!important;
}
html.cb-cg #stage #battle-ui .move-bar .mv-k{
  display:block!important;
  flex:0 0 auto!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-overflow:clip!important;
  font:800 9px/1.08 system-ui,sans-serif!important;
}
@media(pointer:coarse){
  html.cb-cg #stage #battle-ui .move-bar{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,clamp(56px,15vw,68px)))!important;
    grid-template-rows:repeat(2,minmax(66px,max-content))!important;
    grid-auto-rows:minmax(66px,max-content)!important;
    width:max-content!important;
    max-width:calc(100% - 10px)!important;
    left:auto!important;
    right:max(7px,env(safe-area-inset-right,0px))!important;
    transform:none!important;
    bottom:max(6px,env(safe-area-inset-bottom,0px))!important;
    align-items:stretch!important;
    justify-content:end!important;
    gap:4px!important;
  }
  html.cb-cg #stage #battle-ui .move-bar .move{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:66px!important;
    max-height:none!important;
    padding:4px 2px!important;
    gap:2px!important;
    border-radius:11px!important;
  }
  html.cb-cg #stage #battle-ui .move-bar .mv-name,
  html.cb-cg #stage #battle-ui .move-bar #ult-btn .mv-name{
    font-size:9.5px!important;
    line-height:1.1!important;
    overflow-wrap:anywhere!important;
  }
  html.cb-cg #stage #battle-ui .move-bar .mv-icon{font-size:19px!important}
  html.cb-cg #stage #battle-ui .move-bar .mv-k{
    font-size:8.5px!important;
    line-height:1.1!important;
  }
}
@media(max-height:470px) and (pointer:coarse) and (orientation:landscape){
  html.cb-cg #stage #battle-ui .move-bar{
    grid-template-rows:repeat(2,minmax(60px,max-content))!important;
    grid-auto-rows:minmax(60px,max-content)!important;
  }
  html.cb-cg #stage #battle-ui .move-bar .move{
    min-height:60px!important;
    padding:3px 2px!important;
    gap:1px!important;
  }
  html.cb-cg #stage #battle-ui .move-bar .mv-icon{font-size:17px!important}
  html.cb-cg #stage #battle-ui .move-bar .mv-name{font-size:9px!important}
  html.cb-cg #stage #battle-ui .move-bar .mv-k{font-size:8px!important}
}

/* CrazyGames compact battle help control: icon-only on phones. Game.js sets
   this button's textContent to "? Controls", so the old 30px CSS width caused
   that text to spill underneath the Auto button. Keep its full accessible name
   in aria-label, and render only the visible '?' at narrow widths. */
@media(max-width:520px){
  html.cb-cg #stage #battle-ui #cg-battle-hud .battle-tools #battle-help-toggle{
    flex:0 0 36px!important;
    width:36px!important;min-width:36px!important;max-width:36px!important;
    height:32px!important;min-height:32px!important;
    overflow:hidden!important;
    margin:0!important;padding:0!important;
    font-size:0!important;line-height:0!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  html.cb-cg #stage #battle-ui #cg-battle-hud .battle-tools #battle-help-toggle::before{
    content:"?"!important;
    display:inline-block!important;
    font:900 19px/1 system-ui,sans-serif!important;
    color:#4b6655!important;
  }
}

/* Context ownership: the five Cat Bond menu tabs and five garden actions
   belong ONLY on the playable yard. Never force them visible in world-map
   scenes, during battles, or over the Start Adventure screen.
   Keep #cg-top-tools / #cb-header-actions independent and always available;
   exploration's top Menu and all language/audio/share utilities stay put. */
html.cb-cg #stage:has(#intro:not(.hide)) #cg-yard-dock,
html.cb-cg #stage:has(#battle-ui.on) #cg-yard-dock,
html.cb-cg body.cb-exploring #stage #cg-yard-dock{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
/* The same ownership rule applies to the original website. Previous late
   fullscreen-specific CSS could override the scene's .hidden class. */
#stage:has(#intro:not(.hide)) #tabbar,
#stage:has(#intro:not(.hide)) #yard-actions,
#stage:has(#battle-ui.on) #tabbar,
#stage:has(#battle-ui.on) #yard-actions,
body.cb-exploring #stage #tabbar,
body.cb-exploring #stage #yard-actions{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
/* An unobtrusive destructive action inside Menu, never another floating FAB. */
#panel .explore-menu #cb-menu-reset{
  display:block;width:auto;min-width:0;max-width:100%;
  margin:10px 0 0 auto;padding:5px 9px;
  background:#fff7f4;border:1px solid #e2c9c7;border-radius:9px;
  color:#95736b;font:750 11px/1.25 system-ui,sans-serif;
  box-shadow:none;cursor:pointer;
}
#panel .explore-menu #cb-menu-reset.cb-reset-armed{
  color:#862e2e;background:#ffe9e3;border-color:#b85d56;
  font-weight:850;
}
#panel .explore-menu #cb-menu-reset:focus-visible{
  outline:2px solid #b85d56;outline-offset:2px;
}

