:root {
  --bg:#faf8f1;--paper:#fffefa;--white:#fff;--ink:#2e4a68;--muted:#526d82;--line:#dce7ea;
  --blue:#e2f1fa;--blue-strong:#326d9e;--navy:#2e4a68;--gold:#fff3bc;--gold-ink:#775619;
  --green:#dde8d6;--green-ink:#45684e;--rose:#f9e8e4;--rose-ink:#9a4f56;--lilac:#eeeaf9;--lilac-ink:#685a86;
  --hero:#e0f1fb;--outline:#4583bd;--primary:#3b75a9;--primary-text:#fff;--ice:#b7d6e9;
  --glint:#fedd6b;--shadow:0 4px 18px #386d9420;
}
:root[data-theme=night] {
  --bg:#15263b;--paper:#20344c;--white:#263d55;--ink:#e8f3fc;--muted:#b7cce0;--line:#39566c;
  --blue:#253f59;--blue-strong:#b6dbf7;--navy:#d6e8f9;--gold:#4b402d;--gold-ink:#f8dfa3;
  --green:#2c4542;--green-ink:#d1e7ce;--rose:#4e3845;--rose-ink:#ffc5c4;--lilac:#3d3a58;--lilac-ink:#e1d7f5;
  --hero:#243f5b;--primary:#a3caff;--primary-text:#20354d;--ice:#426683;--glint:#fcec97;--shadow:none;
}
body {font-feature-settings:"kern"}
.topbar {background:var(--bg);border:0;box-shadow:0 1px 0 var(--line)}
.top-inner {height:60px;max-width:1066px;padding-inline:24px}
.brand {font-weight:720;letter-spacing:.045em}
.brand-mark {background:#1c3150}
.brand-mark img {width:100%;height:100%;display:block}
.top-actions .icon-btn {color:var(--blue-strong)}
.nav-link {font-weight:630}
#main {width:min(1018px,calc(100% - 48px));padding:22px 0 46px;min-height:auto}
.page {max-width:870px}
.page-head {margin:0 0 15px}
.page-head h1 {font-size:clamp(1.6rem,4.2vw,2.1rem);font-weight:700;letter-spacing:.02em}
.btn,.chip,.icon-btn {border-radius:13px;font-weight:600}
.btn.primary,[data-theme=night] .btn.primary {background:var(--primary);border-color:transparent;color:var(--primary-text)}
.btn.primary:hover {filter:brightness(.95)}
.btn:active,.chip:active,.tile:active,.icon-btn:active {transform:scale(.97)}
.panel {box-shadow:none}
.icon {stroke-width:1.65}
.home {gap:14px;max-width:1018px}
.home .hero {display:grid;min-height:258px;padding:29px 29px 22px;grid-template-columns:minmax(0,1fr) minmax(168px,.53fr);grid-template-rows:1fr auto;border-radius:27px;background:linear-gradient(115deg,var(--paper),var(--hero) 67%,var(--ice));border:0;box-shadow:var(--shadow)}
.hero::before {display:none}
.hero-content {width:auto;padding:0;align-self:center;grid-column:1}
.hero h1 {font-size:clamp(2.1rem,5.4vw,3.65rem);font-weight:760;letter-spacing:.065em;margin:0 0 10px}
.hero-meta {font-weight:550;margin:0;letter-spacing:.02em}
.hero-meta .icon {color:#99732d;fill:#fcec97}
.hero-art {inset:7px 3% 6px 58%;z-index:0}
.hero-art img {height:100%;width:100%;max-width:100%;right:0;object-position:center;filter:drop-shadow(0 3px 5px #407b9e35)}
.hero-orbit {width:64%;height:77%;right:18%;bottom:9%;border-radius:50%;background:#ffffff60;border:1px solid #ffffffa6}
.hero-orbit::before,.hero-orbit::after {display:none}
.hero-art .art-moon {right:18%;top:12%;width:26px;height:26px;color:#987024;fill:#fcec97}
.hero-art .a {left:15%;top:29%;width:17px;height:17px}
.hero-art .b {right:12%;top:42%;width:13px;height:13px}
.hero-search {grid-column:1;z-index:2;max-width:530px;align-self:end;margin-top:12px}
.search-box {box-shadow:none;border-radius:15px;gap:9px;padding:4px 4px 4px 12px}
.search-box input {padding:8px 0}
.hero-search .btn {height:39px;min-height:39px;border-radius:11px}
.home-core {display:grid;grid-template-columns:1.16fr 1fr;gap:12px}
.home-shortcuts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.home .tile {box-shadow:none;border:1px solid transparent;min-width:0}
.home .tile:hover {border-color:color-mix(in srgb,var(--blue-strong) 40%,transparent)}
.home .wide {min-height:108px;padding:13px 17px;gap:5px}
.home .wide strong {font-size:1.17rem}
.home .wide .badge-icon {width:35px;height:35px;border-radius:12px}
.home .wide .badge-icon .icon {width:18px;height:18px}
.home .wide.gold {background:linear-gradient(120deg,var(--gold),color-mix(in srgb,var(--gold) 72%,var(--paper)))}
.home .mini {min-height:76px;display:grid;grid-template-columns:auto 1fr;align-content:center;align-items:center;gap:3px 10px;padding:9px 11px;border-radius:17px}
.home .mini small {grid-column:2}
.home .mini .tile-end {display:none}
.home .mini .badge-icon {grid-row:span 2}
.home .mini strong {font-size:.95rem}
.home .home-cat {min-height:88px;padding:14px 17px;display:grid;grid-template-columns:auto 1fr;align-content:center;align-items:center;gap:4px 12px}
.home-cat .badge-icon {grid-row:span 2}
.home-cat small {grid-column:2}
.home .tile-cat {height:115px;position:absolute;right:7%;bottom:-13px}
.home .home-cat .tile-end {top:calc(50% - 8px)}
.home-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.home .home-row {min-height:65px;display:grid;grid-template-columns:auto 1fr;align-content:center;align-items:center;gap:3px 9px;padding:9px 12px;border-radius:14px;background:var(--paper);border-color:var(--line)}
.home-row strong {font-size:.95rem}
.home-row .badge-icon {width:32px!important;height:32px!important;background:var(--blue);border:0;grid-row:span 2}
.home-row.gold .badge-icon {background:var(--gold)}
.home-row small {grid-column:2;font-size:.78rem}
.home-row .tile-end {right:9px;top:calc(50% - 8px)}
.home-row .tile-end .icon {width:15px;height:15px}
.library-page .page-head {margin-bottom:10px}
.library-page .search-box {border-color:var(--ice)}
.library-page .search-box input {font-size:1rem}
.library-page .tool-row {margin:9px 0 6px}
.library-page .tool-row>.icon-btn {width:42px;height:40px}
.library-page .tool-row .btn,.library-page .select {min-height:39px;background:var(--paper);border-color:var(--line)}
.library-page .quick {margin:4px 0 0;display:flex;flex-wrap:wrap;gap:5px;overflow:visible;padding:0}
.library-page .quick .chip {min-height:33px;padding:4px 8px;background:transparent;white-space:nowrap}
.library-page .quick .chip[aria-pressed=true] {background:var(--gold);color:var(--gold-ink);border-color:transparent}
.applied-filters {display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:7px 0 3px}
.applied-filters .chip {min-height:30px;background:var(--blue);border:0;color:var(--blue-strong);padding:4px 8px}
.applied-filters .icon {width:13px;height:13px}
.applied-filters .clear-filters {min-height:30px;border:0;background:none;color:var(--blue-strong);font-weight:600}
.results-bar {display:flex;justify-content:space-between;align-items:center;margin-top:5px;min-height:35px}
.results-bar .small {min-height:34px;border:0;background:var(--blue);color:var(--blue-strong)}
.index {margin:5px 0 10px;gap:4px}
.index .chip {background:var(--paper);border-color:transparent;min-width:33px;min-height:34px}
.index .chip[aria-pressed=true] {background:var(--gold);border-color:transparent;color:var(--gold-ink)}
.index-collapsed {display:none}
.song-link strong {font-weight:650}
.song-link small {font-size:.82rem}
.song-row {min-height:59px;border-color:var(--line)}
.song-row .icon-btn {color:var(--blue-strong)}
.song-row .icon-btn.heart[aria-pressed=true] {color:var(--rose-ink)}
.song-row .credit-caption {color:var(--muted);opacity:.87}
.compact .credit-caption {display:none}
.list-panel {box-shadow:none;border-radius:16px}
.sheet {overscroll-behavior:contain;box-shadow:0 18px 65px #14385636}
.sheet-head {border:0;padding:8px 13px 8px 17px}
.sheet-head h2 {font-weight:700}
.sheet-body {padding:10px 16px 17px}
.sheet-foot {padding:9px 15px}
.sheet[data-kind=filter] {width:min(610px,100%);max-height:min(90dvh,630px);overflow:hidden}
.sheet[data-kind=filter] .sheet-body {padding:0 12px}
.sheet[data-kind=filter] .sheet-foot {align-items:center}
.filter-layout {display:grid;grid-template-columns:minmax(0,112px) minmax(0,1fr);gap:10px;height:min(56dvh,436px)}
.filter-tabs {display:flex;flex-direction:column;overflow:auto;background:var(--bg);padding:5px;border-radius:13px;scrollbar-width:thin}
.filter-tabs button {display:flex;align-items:center;justify-content:space-between;text-align:left;gap:2px;min-height:39px;flex:none;border:0;border-radius:9px;background:none;padding:5px 7px;font-size:.87rem;color:var(--ink)}
.filter-tabs button[aria-pressed=true] {background:var(--blue);color:var(--blue-strong);font-weight:720}
.filter-tabs span:not(:empty) {border-radius:20px;padding:0 4px;background:var(--gold);color:var(--gold-ink);font-size:.7rem}
.filter-pane {display:flex;flex-direction:column;min-width:0}
#filter-options {overflow:auto;flex:1;padding:4px 2px 8px;scrollbar-width:thin}
.option-tags {display:flex;align-content:flex-start;flex-wrap:wrap;gap:6px;min-width:0}
.option-tags .chip {min-width:0;max-width:100%;white-space:normal;text-align:left;color:var(--ink);padding:6px 10px;min-height:36px}
.option-label {min-width:0;overflow-wrap:anywhere}
.option-tags .long-option {flex-basis:100%;justify-content:space-between}
.option-tags .chip[aria-pressed=true] {background:var(--blue);border-color:var(--outline);color:var(--blue-strong)}
.option-search {display:flex;align-items:center;gap:6px;margin:2px 2px 8px;padding:4px 8px;border:1px solid var(--line);border-radius:10px;color:var(--blue-strong)}
.option-search .icon {width:17px;height:17px}
.option-search input {flex:1;min-width:0;border:none;background:none;padding:5px 0;outline:none;color:var(--ink)}
.option-search:focus-within {border-color:var(--outline)}

.draft-count {font-size:.87rem;color:var(--muted);white-space:nowrap}
.account-link {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;padding:9px;border:1px solid var(--line);border-radius:14px;background:var(--bg);margin:0 0 8px}
.account-link:last-child {border-bottom:1px solid var(--line);margin:0}
.account-link:hover {background:var(--blue)}
.account-name {gap:7px;white-space:nowrap;font-weight:650;font-size:clamp(.81rem,4vw,1rem)}
.account-name .badge-icon {width:32px;height:32px;border:0;background:var(--blue)}
.account-name .badge-icon .icon {width:17px}
.account-open {display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;min-height:36px;border-radius:9px;padding:5px 8px;background:var(--blue);color:var(--blue-strong);font-weight:620;font-size:.86rem}
.account-open .icon {width:15px;height:15px}
.draw-stage {position:relative;isolation:isolate;height:clamp(163px,32vw,248px);overflow:hidden;border-radius:20px;background:radial-gradient(ellipse at 33% 96%,var(--paper),transparent 60%),linear-gradient(120deg,var(--blue),var(--ice));display:flex;align-items:center}
.draw-stage::after {content:"";position:absolute;left:13%;bottom:-38%;width:82%;height:72%;border:1px solid #ffffff80;border-radius:50%;z-index:-1}
.draw-figure {position:absolute;right:12%;height:94%;bottom:2%;width:43%;object-fit:contain;filter:drop-shadow(0 4px 7px #254b7441)}
.deck {position:absolute;perspective:620px;left:20%;width:clamp(63px,14%,103px);height:57%;display:grid;place-items:center}
.deck-leaf,.deck-center {position:absolute;inset:0;border-radius:13px;border:1px solid #fcf6d9;background:#b5dbf1;box-shadow:0 5px 12px #346a941c}
.deck-leaf:first-child {transform:rotate(-15deg) translateX(-11%)}
.deck-leaf:nth-child(2) {transform:rotate(15deg) translateX(11%);background:#f8e8a8}
.deck-card {position:absolute;inset:0;transform-style:preserve-3d;transition:transform .32s ease-in-out}
.deck-center {display:grid;place-items:center;color:#5b84a5;background:#f8fcff;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.deck-center.deck-front {transform:rotateY(180deg);align-content:center;gap:5px;padding:6px;background:#fff3cc;color:#395675;text-align:center}
.deck-front .icon {width:19px;fill:none}
.deck-title {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-width:100%;overflow-wrap:anywhere;font-size:.68rem;line-height:1.3;font-weight:700}
.has-draw .deck-card {transform:rotateY(180deg)}
.drawing .deck-card {animation:lift-deck .48s ease both}
.redrawing .deck-card {animation:return-deck .48s ease both}
.revealed .deck-card {animation:reveal-card .25s ease-out both}
@keyframes lift-deck {0%{transform:rotateY(0)}45%{transform:rotateY(22deg) rotateZ(-4deg)}100%{transform:rotateY(90deg)}}
@keyframes return-deck {from{transform:rotateY(180deg)}to{transform:rotateY(90deg)}}
@keyframes reveal-card {from{transform:rotateY(90deg)}to{transform:rotateY(180deg)}}
.deck-center .icon {width:42%;height:auto;fill:#fcec97}
.deck-center .icon+.icon {position:absolute;width:22%;top:33%;right:22%;color:#a27528;fill:#fedd6b}
.draw-glints {position:absolute;inset:0;pointer-events:none;color:#956b24}
.draw-glints .icon {position:absolute;top:13%;left:17%;width:15px;height:15px;fill:#fedd6b}
.draw-glints .icon:nth-child(2) {top:auto;bottom:21%;left:46%;width:13px;height:13px}
.draw-glints .icon:nth-child(3) {left:auto;right:17%;top:13%;width:19px;height:19px}
.drawing .deck {animation:shuffle-card .48s ease both}
.drawing .draw-figure {animation:show-draw .48s ease both}
.revealed .draw-glints {animation:draw-flash .55s ease both}
@keyframes shuffle-card {0%,100%{transform:none}28%{transform:translateY(-8%) rotate(-9deg)}65%{transform:translateY(2%) rotate(10deg) scale(.9)}}
@keyframes show-draw {42%{transform:translateY(-5%) rotate(3deg)}}
@keyframes draw-flash {from{transform:scale(.75);opacity:.2}45%{transform:scale(1.06)}}
.draw-options {padding:10px 0 7px}
.draw-options .stack-line {gap:6px}
.draw-options select {font-size:.91rem;min-height:38px}
.draw-meta {display:flex;gap:6px;justify-content:space-between;align-items:center;margin:7px 0;color:var(--muted);font-size:.86rem}
.draw-meta label {display:inline-flex;align-items:center;gap:4px}
.draw-meta input {width:17px;height:17px}
.draw-actions {display:flex;align-items:center;gap:7px}
.draw-actions .primary {min-width:125px}
.result-list:empty {display:none}
.random-experience .draw {border:1px solid var(--ice);border-radius:13px;background:var(--paper);overflow:hidden}
.random-page {max-width:660px}
.volume-slider {max-width:110px;accent-color:var(--primary)}
@media(max-width:620px) {
  .top-inner {padding:env(safe-area-inset-top) 10px 0;min-height:51px;height:calc(51px + env(safe-area-inset-top));gap:6px}
  .brand {gap:6px}.brand-mark {width:31px;height:31px}
  #main {width:calc(100% - 22px);padding:11px 0 calc(66px + env(safe-area-inset-bottom))}
  .bottom-nav {padding:3px max(7px,env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))}
  .bottom-nav .nav-link {min-height:45px;border-radius:15px}
  .bottom-nav .nav-link[aria-current=page] .icon {stroke-width:2}
  .home {gap:8px}
  .home .hero {min-height:172px;padding:14px 11px 10px;gap:4px;grid-template-columns:1fr 89px;grid-template-rows:1fr auto;border-radius:20px}
  .hero h1 {font-size:clamp(1.77rem,8vw,2.55rem);margin-bottom:6px}
  .hero-meta {font-size:.76rem}
  .hero-art {inset:5px 1% 53px 66%}
  .hero-art img {height:100%}
  .hero-art .art-moon {width:16px;height:16px;right:4%;top:16%}
  .hero-art .a {width:12px;height:12px}
  .hero-art .b {right:6%;width:9px;height:9px}
  .hero-search {grid-column:span 2;margin:0}
  .hero-search .btn {min-height:36px;height:36px}
  .home-core,.home-shortcuts,.home-links {gap:6px}
  .home .wide {min-height:92px;padding:9px 11px;border-radius:16px}
  .home .wide strong {font-size:1.02rem}
  .home .wide .badge-icon {width:31px;height:31px}
  .home .mini {min-height:58px;padding:5px 3px;grid-template-columns:1fr;justify-items:center;gap:3px;border-radius:13px;text-align:center}
  .home .mini .badge-icon {grid-row:auto;width:27px;height:27px;border:0}
  .home .mini .badge-icon .icon {width:15px;height:15px}
  .home .mini small {grid-column:auto}
  .home .mini strong,.home-row strong {font-size:.84rem}
  .home .home-cat {min-height:70px;padding:8px 10px;border-radius:15px}
  .home .home-cat .tile-cat {height:89px;right:13%;bottom:-10px}
  .home-links {grid-template-columns:minmax(0,1fr)}
  .home .home-row:first-child {grid-column:span 2}
  .home .home-row {min-height:45px;padding:5px 7px;gap:2px 6px}
  .home .home-row:first-child small {grid-column:2}
  .home-row .tile-end {right:6px}
  .home-row .badge-icon {height:28px!important;width:28px!important}
  .home-row .badge-icon .icon {width:15px}
  .library-page .quick .chip {min-height:32px;padding:4px 7px;font-size:.78rem}
  .filter-layout {grid-template-columns:91px minmax(0,1fr);gap:6px;max-height:55dvh}
  .filter-tabs button {font-size:.81rem;min-height:37px}
  .sheet {max-height:86dvh}
  .sheet-foot .btn {font-size:.79rem;padding-inline:7px;gap:3px}
  .sheet-foot .btn .icon {width:16px}
  .draft-count {font-size:.75rem}
  .draw-stage {height:146px}
  .draw-figure {right:8%}
  .deck {left:20%}
}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;white-space:nowrap;clip-path:inset(50%);margin:-1px}
.cottage-page {max-width:810px}
.cat-room {border-radius:22px}
.room-scene {position:relative;isolation:isolate;overflow:hidden;aspect-ratio:3/2;background:#eee4d8}
.room-backdrop {display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.room-photo-hit {position:absolute;z-index:4;top:16%;height:17.4%;width:13.8%;left:60.1%;translate:-50%;min-width:40px;min-height:36px;border:0;border-radius:5px;background:transparent}
.room-photo-hit[data-cat=room-photo-party] {left:74.4%;top:17.1%;width:10.4%;height:16%}
.room-photo-hit:focus-visible {outline:2px solid var(--outline);outline-offset:2px}
.room-photo {display:grid;justify-items:center;padding-bottom:10px}
.room-photo img {display:block;width:auto;max-width:100%;max-height:65dvh;border-radius:13px}
.cat-shadow {position:absolute;left:50%;top:91.5%;width:29%;height:7%;translate:-50% -50%;pointer-events:none;background:radial-gradient(ellipse closest-side,#5c483b53,#71574525 58%,transparent)}
.asleep .cat-shadow {width:35%}
.cat-target {position:absolute;z-index:3;left:50%;bottom:6.5%;width:40%;height:56%;translate:-50%;padding:0;border:0;background:transparent;touch-action:pan-y}
.cat-target img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;transform-origin:center bottom;animation:cat-breathe 3.3s ease-in-out infinite}
.cat-target img[data-art=cat-sitting] {left:9%}
.cat-target img[data-art=cat-resting],.cat-target img[data-art=cat-sleep] {left:7%}
.cat-target .cat-old {z-index:-1;animation:fade-cat .24s ease both}
.cat-target .cat-new {animation:cat-fade-in .26s ease both,cat-breathe 3.3s .28s ease-in-out infinite}
.cat-target img[data-art=cat-jump].cat-new {animation:cat-pounce .49s ease both}
.asleep .cat-target .cat-new {animation:cat-fade-in .26s ease both,cat-breathe 4.6s .28s ease-in-out infinite}
.room-toy {position:absolute;z-index:4;left:17%;bottom:6%;width:10%;min-width:40px;height:9%;min-height:25px;border:1px solid #b78e5c65;border-radius:48%;transform:rotate(-12deg);display:grid;place-items:center;background:#f4ddb3;color:#825c48;box-shadow:0 2px 3px #74564329}
.room-toy .icon {width:55%;height:72%;max-height:23px}
.room-prop {position:absolute;pointer-events:none;z-index:5;width:15%;aspect-ratio:1}
.room-prop .prop-icon {width:100%;height:100%;filter:drop-shadow(0 2px 3px #67553435)}
.room-prop.prop-pet {left:40%;top:28%;animation:pet-motion 1.72s ease both}
.room-prop.prop-feed {top:51.5%;left:46.2%;width:14%;animation:feed-motion 1.78s ease both}
.room-prop.prop-play {left:var(--toy-x,62%);top:38%;margin-inline-start:-5%;transition:left .15s ease;animation:toy-in 2.65s ease both}
.prop-play .prop-icon {animation:toy-swing .85s ease-in-out infinite;transform-origin:77% 86%}
.cat-effect {position:absolute;left:56%;top:37%;z-index:6;color:#a85960;pointer-events:none}
.asleep .cat-effect {top:54%}
.cat-effect .icon {display:block;width:24px;height:24px;opacity:0;fill:#f3b9ab;animation:cat-pop .7s ease both}
.cat-effect .little {width:16px;height:16px;margin-left:23px;animation-delay:.1s}
.sleep-z {position:absolute;top:0;left:0;font-style:normal;font-size:1.4rem;color:#315d84;animation:sleep-drift 3s ease-in-out infinite}
.sleep-z+.sleep-z {left:19px;top:-9px;font-size:.86rem;animation-delay:.8s}
.room-tools {padding:5px 10px 8px;display:block}
.room-tray {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cat-tool {display:flex;align-items:center;justify-content:center;gap:6px;min-height:50px;padding:3px 6px;background:var(--paper);border:1px solid var(--line);border-radius:13px;font-size:.86rem;color:var(--green-ink)}
.cat-tool .prop-icon {width:39px;height:39px;flex:none}
.cat-tool[aria-current=true],.cat-tool:hover {background:var(--gold);color:var(--gold-ink)}
.game-tiles {gap:8px}.game-tiles .tile {min-height:72px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px;padding:7px 9px}
.game-tiles .tile-end {display:none}.game-tiles .tile strong {font-size:.9rem}
.game-section {margin-top:17px}
@keyframes fade-cat {to{opacity:0}}
@keyframes cat-breathe {50%{transform:scaleY(1.016)}}
@keyframes cat-fade-in {from{opacity:0}to{opacity:1}}
@keyframes cat-pounce {from{opacity:.4}40%{transform:translateY(-12px)}}
@keyframes pet-motion {0%{opacity:0;transform:translate(62%,-37%) rotate(22deg)}24%{opacity:1;transform:rotate(3deg)}43%,63%{transform:translate(-13%,4%) rotate(-10deg)}54%,74%{transform:translate(8%,0) rotate(4deg)}100%{transform:translate(51%,-35%) rotate(19deg);opacity:0}}
@keyframes feed-motion {0%{opacity:0;transform:translate(62%,30%) rotate(14deg)}38%,70%{opacity:1;transform:none}82%{transform:translate(-3%,2%) rotate(-4deg)}100%{transform:translate(44%,34%);opacity:0}}
@keyframes toy-in {0%{opacity:0;transform:translate(80%,15%)}16%,83%{opacity:1;transform:none}100%{opacity:0;transform:translate(36%,25%)}}
@keyframes toy-swing {35%{transform:rotate(-30deg)}70%{transform:rotate(17deg)}}
@keyframes sleep-drift {0%,100%{transform:translateY(7px);opacity:.35}58%{transform:translateY(-7px);opacity:.84}}
@keyframes cat-pop {from{opacity:0;transform:translateY(6px) scale(.6)}39%{opacity:1}to{opacity:0;transform:translate(11px,-24px) rotate(12deg)}}
@media(max-width:620px) {
  .game-tiles .tile {min-height:59px}
  .room-tray {gap:4px}
  .cat-tool {gap:2px;padding-inline:2px;font-size:.77rem}
  .cat-tool .prop-icon {width:32px;height:32px}
}
@media(prefers-reduced-motion:reduce){
  .room-prop {animation:none!important}
  .room-prop .prop-icon {animation:none!important}
}
[data-motion=off] .room-prop,[data-motion=off] .room-prop .prop-icon {animation:none!important}
.game-page {max-width:720px}
.game-mode #bottom {display:none}
.game-mode #main {padding-bottom:calc(14px + env(safe-area-inset-bottom))}
.game-shell {border:0;padding:12px;gap:8px;background:none}
.game-page .page-head {margin-bottom:6px}
.game-top {gap:6px}
.game-top p {font-size:.86rem}
.game-option select {min-height:34px;font-size:.82rem}
.game-top:has(.game-option) p {flex:1}
.game-stats {min-height:27px;flex-direction:row;align-items:center}
#game-stats {gap:4px}
#game-stats span {border:0;background:var(--blue);padding:4px 8px;border-radius:20px}
#game-stats small {font-size:.76rem}
#game-state {font-size:.76rem;line-height:1.15;text-align:right}
.game-controls .btn {min-height:36px;padding:5px 10px}
.settlement {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;border-radius:14px;background:var(--gold);color:var(--gold-ink);padding:9px}
.settlement[hidden] {display:none}
.settlement h2 {font-size:1.01rem;margin:0}
.score-summary {display:flex;gap:4px 8px;flex-wrap:wrap;font-size:.78rem;margin-top:3px}
.result-mark {display:grid;place-items:center;width:39px;height:39px;border-radius:13px;color:#966725;background:#fff8d9;animation:reveal .45s ease both}
.result-mark svg {fill:#fedd6b}
.arena {border:0;overscroll-behavior:contain}
.arena.paused::after {background:#18334a9a}
.catch-avatar img {filter:drop-shadow(0 3px 4px #4c759b55)}
.catch-avatar.star-hop img {animation:catch-hop .30s ease both}
.catch-float {color:#684a1b;background:#fff0b4;border-radius:20px;display:flex;align-items:center;gap:4px;padding:2px 6px;font-size:.95rem}
.catch-float:empty {display:none}
.catch-float svg {color:#9e6d26;fill:#fedd6b;width:15px;height:15px}
.catch-float small {font-size:.75rem;white-space:nowrap}
.fall-item .icon {stroke:#ad7826;fill:#fff3ad;filter:drop-shadow(0 0 6px #fff2ae)}
.fall-item.golden .icon {stroke:#aa6729;fill:#fedd6b}
@keyframes catch-hop {40%{transform:translateY(-6px) rotate(-3deg)}}
.arena-match {padding:10px;background:linear-gradient(128deg,var(--lilac),var(--blue))}
.match-tile {box-shadow:0 2px #294a6120,inset 0 1px #ffffffb0;border:1px solid #4f65882b;position:relative}
.match-tile .icon {stroke-width:1.55}
.match-tile.picked {outline:2px solid #7b6229;outline-offset:-3px;background:#fff0a6;transform:scale(.96);z-index:2}
.match-tile.vanish::after {content:"";position:absolute;inset:2px;background:#fff1aa73;border-radius:9px}
.match-tile.type-5 {background:#f7e4d9;color:#ad664f}
.match-tile.type-5 .icon {fill:#f4b7a3}
.match-pop {position:absolute;top:8px;left:50%;z-index:4;pointer-events:none;opacity:0;border-radius:20px;padding:4px 9px;color:#805519;background:#fff3b8;font-size:.83rem;font-weight:700}
.match-pop .icon {width:15px;height:15px;fill:#fedd6b}
.match-pop.active {animation:match-points .62s ease both}
@keyframes match-points {0%{transform:translate(-50%,6px);opacity:0}30%{opacity:1}100%{transform:translate(-50%,-8px);opacity:0}}
.arena-boxes {display:grid;place-items:center;background:linear-gradient(155deg,var(--blue),var(--green));padding:0}
.arena-boxes .garden-stage {aspect-ratio:864/1394;position:relative;isolation:isolate;overflow:hidden;touch-action:manipulation}
.garden-art,.garden-hits {position:absolute;inset:0;width:100%;height:100%;display:block}
.garden-cat[visibility=hidden] {visibility:hidden;display:none}
.garden-hit {position:absolute;margin:0;padding:0;border:0;border-radius:12px;background:none;touch-action:none}
.garden-hit:focus-visible {outline:2px dashed #5f4114;outline-offset:-3px}
.garden-score {opacity:0;position:absolute;z-index:2;pointer-events:none;color:#754c1a;background:#fff4b5;
  border-radius:18px;padding:2px 7px;white-space:nowrap;transform:translateX(-50%);font-weight:700;font-size:.84rem}
.garden-score .icon {width:15px;height:15px;fill:#fedd6b}
.garden-score.active {animation:match-points .44s ease both}
.arena-memory {background:linear-gradient(120deg,var(--blue),var(--gold));padding:8px}
.memory-grid {width:min(100%,560px);gap:7px}
.memory-card {aspect-ratio:9/16}
.memory-back {border:1px solid #88abc3;background:linear-gradient(142deg,#e8f5fc,#a9d2eb);color:#45749c;box-shadow:inset 0 0 0 3px #fff7,inset 0 0 0 4px #f5fdff7d}
.memory-back .icon {fill:#fcec97;stroke:#9b7b44}
.memory-back .icon+.icon {fill:#fedd6b;stroke:#ad8037}
.memory-card.paired .memory-front {outline:2px solid #e6b542;box-shadow:0 0 6px #f5d56c;outline-offset:0}
.memory-card.paired .memory-front::after {content:"";position:absolute;inset:0;box-shadow:inset 0 0 18px #fff6bc;animation:paired-glow .42s ease both}
.memory-card.mismatch .memory-front {border:2px solid #d78369}
[data-theme=night] .memory-back {background:linear-gradient(142deg,#a1c9e5,#709dc6)}
@keyframes paired-glow {to{opacity:0}}
@media(max-width:620px) {
  .game-shell {padding:3px 0;gap:6px}
  .game-page .page-head h1 {font-size:1.48rem}
  .game-page .page-actions .icon-btn {width:39px;min-width:39px;height:39px}
  .game-top {flex-wrap:nowrap}
  .game-option {font-size:.72rem;gap:3px}
  .game-option select {padding-inline:5px 19px;max-width:140px;min-height:32px}
  .game-top p {font-size:.76rem;line-height:1.24}
  .game-controls .btn {min-height:36px}
  .game-controls .icon {width:15px;height:15px}
  .match-grid {max-width:374px;width:min(100%,calc(100svh - 172px));min-width:min(100%,245px);gap:4px}
  .arena-match {padding:5px}
  .memory-grid,.memory-grid.memory-6,.memory-grid.memory-12 {gap:5px}
  .memory-grid.memory-6 {grid-template-columns:repeat(6,minmax(0,1fr))}
  .memory-grid.memory-12 {grid-template-columns:repeat(5,minmax(0,1fr))}
  .memory-grid.memory-4 {width:min(100%,314px)}
  .memory-grid.memory-8 {width:min(100%,333px)}
  .memory-grid.memory-12 {width:min(100%,370px)}
}
@media(min-width:480px) and (max-width:620px) {
  .memory-grid.memory-12 {grid-template-columns:repeat(6,minmax(0,1fr))}
}
.home {grid-template-columns:minmax(0,1fr)}
.home > * {grid-column:1}
.home .home-cat {grid-column:1}
.home .home-cat .tile-cat {height:101%;bottom:-1px}
@media(max-width:620px) {
  .home .home-cat .tile-cat {height:101%;bottom:-1px}
  .home .home-row .tile-end {display:none}
  .game-mode .topbar {display:none}
  .game-mode #main {padding-top:max(8px,env(safe-area-inset-top))}
}
.home-core>.tile.wide,.home-shortcuts>.tile.mini,.home-links>.tile.home-row {grid-column:auto}

.home .home-core > .tile.wide {grid-column:1}
.home .home-core > .tile.wide + .tile.wide {grid-column:2}
@media(max-width:620px) {
  .home .home-core > .tile.wide,.home .home-core > .tile.wide+.tile.wide {min-height:90px}
}
