.cat-room {padding:0;overflow:hidden;background:var(--green)}
.room-tools {padding:14px 18px;display:flex;justify-content:space-between;align-items:center;gap:9px;color:var(--green-ink)}
.room-tools button {white-space:nowrap}
.game-section {margin-top:24px}
.game-tiles {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.game-tiles .tile {padding:14px;min-height:132px}
.game-tiles .tile strong {font-size:1rem}
.game-tiles .tile small {font-size:.83rem}
.game-shell {display:grid;gap:13px}
.game-top {display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted)}
.game-top p {font-size:.92rem}
.game-option {display:flex;align-items:center;gap:8px;flex:none;font-size:.88rem}
.game-stats {display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted)}
#game-stats {display:flex;flex-wrap:wrap;gap:7px}
#game-stats span {display:flex;align-items:center;gap:7px;background:var(--paper);padding:5px 10px;border:1px solid var(--line);border-radius:10px}
#game-stats small {font-size:.81rem}
#game-stats b {font-size:.93rem;color:var(--ink)}
#game-state {font-size:.85rem}
.game-controls {display:flex;flex-wrap:wrap;gap:7px}
.arena {position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--line);border-radius:17px}
.arena.paused::after {content:"已暂停";position:absolute;inset:0;background:#14243c7d;color:#fff;display:grid;place-items:center;font-size:1.4rem;font-weight:750;z-index:10}
.catch-avatar {width:clamp(53px,10%,87px);height:20%;display:grid;place-items:end center;position:absolute;bottom:2%;left:50%;transform:translateX(-50%);z-index:3;pointer-events:none}
.catch-avatar img {height:100%;width:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 3px 6px #171d46a0)}
.catch-items {position:absolute;inset:0;pointer-events:none;overflow:hidden}
.fall-item {position:absolute;transform:translate(-50%,-50%);color:#d9eaff}
.fall-item .icon {width:25px;height:25px;fill:#bddef8;filter:drop-shadow(0 0 6px #e6f3ff85)}
.fall-item.golden .icon {width:31px;height:31px;fill:#f6ca63;stroke:#fff0b1;filter:drop-shadow(0 0 7px #ffe09eac)}
.catch-float {position:absolute;bottom:17%;color:#fff0b1;z-index:6;font-weight:850;font-size:1.4rem;pointer-events:none}
.catch-float.pop {animation:loft .5s ease both}
@keyframes loft {to{transform:translateY(-25px);opacity:.15}}
.arena-match {background:color-mix(in srgb,var(--lilac) 70%,var(--paper));display:grid;place-items:center;padding:11px}
.match-grid {width:min(100%,450px);display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;touch-action:none}
.match-tile {appearance:none;aspect-ratio:1;width:100%;display:grid;place-items:center;border:1px solid #23324729;background:#fff;border-radius:11px;color:#57677a;padding:5px;box-shadow:0 2px 0 #2332471c;transition:transform .14s,opacity .15s}
.match-tile .icon {width:72%;height:72%;stroke-width:1.5}
.match-tile.picked {outline:2px solid var(--outline);outline-offset:1px;transform:scale(.90)}
.match-tile.type-0 {background:#f8e2a5;color:#91611f}.match-tile.type-0 .icon {fill:#ecba58}
.match-tile.type-1 {background:#d8e7f9;color:#4e6f9d}.match-tile.type-1 .icon {fill:#bfd7f7}
.match-tile.type-2 {background:#e6e1ef;color:#716284}.match-tile.type-2 .icon {fill:#fff}
.match-tile.type-3 {background:#f4dce3;color:#905067}.match-tile.type-3 .icon {fill:#eab8c8}
.match-tile.type-4 {background:#dcead9;color:#507450}.match-tile.type-4 .icon {fill:#a5c39a}
.match-tile.type-5 {background:#f8e3d3;color:#955c37}.match-tile.type-5 .icon {fill:#eec9ac}
.match-tile.vanish {opacity:.18;transform:scale(.6)}
.match-tile.drop {animation:drop .19s ease both}
@keyframes drop {from {transform:translateY(-21%);opacity:.52}}
.arena-boxes {background:radial-gradient(ellipse at top,#edf3e5,#bfceb0);padding:23px 12px 16px}
.boxes-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:auto;max-width:675px}
.box-hole {position:relative;isolation:isolate;aspect-ratio:1.19;min-height:84px;background:transparent;border:0;overflow:hidden}
.box-shadow,.box-front,.box-flap,.peek {position:absolute;left:11%;right:11%}
.box-shadow {height:11%;bottom:5%;border-radius:50%;background:#82947567}
.box-front {display:grid;place-items:center;height:39%;bottom:11%;background:linear-gradient(100deg,#d6b28e,#bd9166);border:1px solid #906446;border-radius:5px 4px 10px 10px;color:#865e42;z-index:3;box-shadow:inset 0 1px #fae1b9}
.box-front .icon {width:20%;height:65%}
.box-flap {height:10%;bottom:47%;left:7%;right:7%;border-radius:12px 12px 3px 3px;background:#a27c56;transform:skewX(-15deg);z-index:-1}
.peek {height:70%;bottom:13%;display:grid;place-items:end center;transform:translateY(69%);transition:transform .16s ease;z-index:2;overflow:hidden;clip-path:inset(0 0 14% 0)}
.peek img {width:100%;height:100%;object-fit:contain;object-position:bottom}
.box-hole.peeked .peek {transform:translateY(-41%);clip-path:inset(0)}
.box-hole.caught .box-front {background:#eed28b;box-shadow:0 0 18px #fff0a4}
.arena-memory {padding:13px;background:color-mix(in srgb,var(--gold) 75%,var(--paper))}
.memory-blank {min-height:220px;display:grid;place-content:center;justify-items:center;gap:10px;color:var(--gold-ink)}
.memory-blank .icon {width:52px;height:52px}
.memory-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;max-width:625px;margin:auto}
.memory-grid.memory-6,.memory-grid.memory-12 {grid-template-columns:repeat(6,minmax(0,1fr))}
.memory-card {border:0;position:relative;padding:0;background:none;aspect-ratio:9/16;perspective:520px;min-width:0}
.memory-back,.memory-front {position:absolute;inset:0;border-radius:10px;overflow:hidden;backface-visibility:hidden;transition:transform .29s ease}
.memory-back {display:grid;place-items:center;color:#eed49d;background:radial-gradient(ellipse at top left,#5c7897,#2d4865 62%,#233b54);border:1px solid #a19373;box-shadow:inset 0 0 0 4px #e5d0a71c,inset 0 0 0 5px #e5d0a72e}
.memory-back .icon {width:44%;height:auto;transform:translateX(-7%);fill:#f0d68e27}
.memory-back .icon + .icon {position:absolute;top:31%;right:27%;width:18%;fill:currentColor}
.memory-front {transform:rotateY(180deg);background:var(--paper);border:1px solid var(--blue-strong)}
.memory-front img {width:100%;height:100%;object-fit:contain}
.memory-card.flipped .memory-back {transform:rotateY(-180deg)}
.memory-card.flipped .memory-front {transform:rotateY(0)}
.memory-card.paired .memory-front {outline:2px solid #b9a56b;outline-offset:1px}
.memory-gallery {margin:15px auto 0;max-width:625px}
.memory-gallery h3 {margin-bottom:8px}
.memory-gallery>div {display:grid;grid-template-columns:repeat(auto-fill,minmax(63px,1fr));gap:8px}
.memory-gallery button {min-width:0;display:grid;justify-items:center;gap:5px;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:4px;font-size:.82rem}
.memory-gallery img {width:100%;aspect-ratio:9/16;object-fit:contain;border-radius:6px}
.art-zoom {border:1px solid var(--line);border-radius:15px;background:var(--paper);color:var(--ink);max-width:94vw;max-height:94dvh;padding:8px}
.art-zoom>div {display:flex;justify-content:space-between;align-items:center;padding:0 4px}
.art-zoom>img {max-height:78dvh;width:auto;margin:auto}
.art-zoom::backdrop {background:#152337a3}
@media(max-width:620px) {
  .room-tools {align-items:flex-start;flex-direction:column;padding:11px}
  .room-tools .stack-line {gap:6px;width:100%}
  .room-tools .btn {flex:1;min-width:0;padding:7px 5px;font-size:.9rem}
  .room-tools .btn .icon {width:16px}
  .game-tiles {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .game-tiles .tile {min-height:108px;padding:10px 12px}
  .game-tiles .tile small {font-size:.75rem}
  .game-top {flex-wrap:wrap;gap:6px}
  .game-stats {align-items:flex-start;flex-direction:column;gap:4px}
  #game-stats {gap:4px}
  #game-stats span {padding:4px 6px}
  .game-controls .btn {font-size:.84rem;padding:7px 9px}
  .arena-match {padding:6px}
  .match-grid {gap:4px}
  .match-tile {border-radius:7px;padding:2px}
  .arena-memory {padding:7px}
  .memory-grid,.memory-grid.memory-6,.memory-grid.memory-12 {grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .memory-back,.memory-front {border-radius:7px}
}
