@font-face{font-family:system-rounded;src:local('PingFang SC')}
*{box-sizing:border-box}
:root{--ink:#354839;--muted:#64715e;--sage:#668168;--pale:#e6eadb;--paper:#f7f3e8;--line:#dedecf;--orange:#d29a50;--serif:Georgia,'Songti SC',serif}
body{margin:0;background:#e5e6d9;color:var(--ink);font-family:system-rounded,-apple-system,BlinkMacSystemFont,'Noto Sans SC',sans-serif;font-size:14px;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
button,a,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;touch-action:manipulation}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bb6d32;outline-offset:3px}button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}a{color:inherit}
.app{max-width:480px;margin:0 auto;min-height:100svh;background:var(--paper);position:relative;padding-bottom:108px;box-shadow:0 0 70px #344c2f14}.topbar{padding:16px 20px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;gap:8px;align-items:center;text-decoration:none;font-size:17px;font-weight:800;letter-spacing:1px}.brand small{display:block;font-size:9px;letter-spacing:2px;font-weight:400;margin-top:4px;color:var(--muted)}.brand-mark{width:39px;height:43px;background:#dfe7d7;border-radius:15px;display:grid;place-items:center;transform:rotate(-7deg)}.brand-mark svg{width:31px;fill:#f7f3e8;stroke:#5b735b;stroke-width:1.5}.wallet{display:flex;gap:6px;align-items:center}.wallet button{height:44px;display:flex;align-items:center;gap:5px;padding:0 8px;background:#eeeadc;border:1px solid #e5dfcb;border-radius:16px;font-size:12px}.wallet b{font-variant-numeric:tabular-nums}.wallet-unit{display:none}.coin,.universal{display:inline-grid;place-items:center;background:#edcd80;color:#836228;border:1px solid #c6a35d;border-radius:100%;font-size:9px;width:19px;height:19px}.universal{color:#646287;background:#d9d4e7;border-color:#b8b1ce}
.page{padding:0 18px}.page:not(.active){display:none}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:14px 0 10px;gap:10px}.eyebrow{font-size:10px;letter-spacing:.8px;color:#74816b}h1{font-size:21px;line-height:1.4;letter-spacing:.3px;font-weight:650;margin:4px 0 0}h2{font-size:16px;margin:0 0 7px}p{line-height:1.7}.icon-button{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;flex-shrink:0}
.cabinet-toolbar{display:flex;justify-content:space-between;gap:6px;font-size:10px;margin-bottom:4px;align-items:center}.cabinet-toolbar>span{display:flex;align-items:center;gap:5px;color:#5c7259}.cabinet-toolbar i{width:5px;height:5px;background:#739368;border-radius:50%}.cabinet-toolbar button{display:flex;align-items:center;gap:3px;padding:6px 0;min-height:44px}.cabinet-toolbar svg{width:15px;height:15px}
.machine-wrap{position:relative;aspect-ratio:354/355;border-radius:23px;overflow:hidden;background:#557166;border:2px solid #38534b;box-shadow:0 11px 0 #304b43,0 17px 25px #33483d2e;isolation:isolate}.machine-wrap canvas{display:block;width:100%;height:100%;touch-action:pan-y}.machine-hud{position:absolute;left:10%;right:10%;top:7.7%;height:9%;display:flex;align-items:center;justify-content:space-between;color:#edcf7d;pointer-events:none;font-size:8px;font-weight:800}.machine-hud span{display:flex;align-items:center;gap:5px}.machine-hud i{width:5px;height:5px;border-radius:50%;background:#e8c768;box-shadow:0 0 8px #e8c768}.machine-hud b{font-size:13px;color:#ead6a0;letter-spacing:1.4px}.collect-prize{position:absolute;left:13.5%;bottom:6.6%;width:32%;height:9.5%;border:2px solid #f0cf74;border-radius:8px;background:#17302be8;box-shadow:0 0 18px #f0cf7480;color:#eadbaf;z-index:3;display:flex;align-items:center;justify-content:center;gap:4px;font-size:9px;animation:hatchPulse 1.2s ease-in-out infinite}.collect-prize svg{width:15px;height:15px}.collect-prize[hidden]{display:none}.grab-stage{position:static;color:#788368;font-size:10px;text-align:center;margin:9px 0 0;letter-spacing:.2px;min-height:16px}
.target-bar{display:flex;align-items:center;min-height:53px;padding:4px 1px;gap:8px}.target-avatar{width:42px;height:42px;display:grid;place-items:center;flex-shrink:0}.target-avatar canvas{width:44px;height:44px}.target-copy{flex:1;min-width:0}.target-copy strong{font-size:12px;display:block}.target-copy small{font-size:9px;color:var(--muted);display:block;margin-top:4px}.soft-button{border:1px solid #bccbb7;border-radius:12px;min-height:44px;padding:7px 10px;font-size:11px;color:#4a6549;background:#eef0e3}.target-bar .soft-button{font-size:10px;padding:7px 9px}
.control-deck{position:relative;border:2px solid #435f56;border-radius:16px;padding:23px 10px 12px;display:flex;justify-content:space-between;align-items:center;gap:9px;background:#607a70;color:#f3ead8;box-shadow:inset 0 2px 0 #91a497,0 6px 0 #3d5a50}.deck-label{position:absolute;top:6px;left:12px;right:12px;display:flex;align-items:center;gap:5px;color:#bfd0bd;font:700 7px ui-monospace,monospace;letter-spacing:1px}.deck-label span{margin-right:auto}.deck-label i{width:4px;height:4px;border-radius:50%;background:#d9b85f}.deck-label i:nth-of-type(2){background:#cf7955}.deck-label i:nth-of-type(3){background:#8cb399}.assist-area{width:68px;flex-shrink:0}.assist-button{width:68px;display:flex;align-items:center;flex-direction:column;padding:0;color:#f3ead8}.stack-icon{display:grid;place-items:center;width:40px;height:37px;border-radius:10px;background:#46645a;margin-bottom:4px;border:1px solid #82998d}.stack-icon svg{width:29px;height:29px;color:#e0bf70}.assist-button strong{font-size:10px}.assist-button small{font-size:7px;line-height:1.5;color:#cbd6c8;text-align:center;margin-top:2px}.assist-button.selected .stack-icon{background:#7a653e;box-shadow:0 0 0 2px #e0bf70}.assist-area .text-button{color:#f3ead8}
.dpad{display:grid;grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px;gap:0;touch-action:none;background:#3b5a51;border-radius:46px;box-shadow:inset 0 3px 7px #243f386f,0 2px 0 #91a497;padding:0}.dpad button{display:grid;place-items:center;padding:0;border-radius:11px;user-select:none;-webkit-user-select:none;touch-action:none;color:#d8e2d5}.dpad button svg{width:24px;height:24px;stroke-width:2.5}.dpad button:active,.dpad button.pressed{background:#aabca4;color:#354839}.dpad button[data-dir=up]{grid-column:2}.dpad button[data-dir=left]{grid-row:2;grid-column:1}.dpad button[data-dir=right]{grid-row:2;grid-column:3}.dpad button[data-dir=down]{grid-row:3;grid-column:2}.dpad>span{grid-row:2;grid-column:2;place-self:center;width:25px;height:25px;border:3px solid #9fb19c;border-radius:50%;display:grid;place-items:center}.dpad>span i{width:9px;height:9px;border-radius:50%;background:#d8bd70}.grab-button{background:#cf7852;color:#fff7e8;border-radius:50%;width:88px;height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 6px 0 #92503a,0 9px 12px #253c3538;border:4px solid #e5aa7f;flex-shrink:0}.grab-button:active{transform:translateY(3px);box-shadow:0 3px 0 #92503a}.grab-button svg{width:25px;height:25px}.grab-button strong{font-size:14px}.grab-button small{font-size:8px;opacity:.9}
.daily-strip{display:flex;align-items:center;justify-content:space-between;padding:14px 0 5px;gap:8px}.tiny-label{font-size:9px;color:var(--muted);letter-spacing:.6px}.daily-strip strong{display:block;font-size:10px;font-weight:500;margin-top:4px}.daily-strip button{font-size:10px;min-height:44px}
.bottom-nav{display:flex;position:fixed;bottom:0;width:min(100%,480px);z-index:10;background:#f9f6edee;backdrop-filter:blur(16px);padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #dedfcf;justify-content:space-around;box-shadow:0 -5px 30px #4c533707}.bottom-nav button{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;color:#959d8d;font-size:10px;width:64px;min-height:49px;padding:4px 0;border-radius:16px}.bottom-nav button[aria-current=page]{color:#4d6b4d;background:#e9eddf}.bottom-nav svg{width:25px;height:25px}.bottom-nav i{position:absolute;right:15px;top:3px;width:5px;height:5px;background:#ca8751;border-radius:50%}.build-note{font-size:8px;text-align:center;color:#8c9281;letter-spacing:.4px;margin:15px 0 0}
.count-pill{border:1px solid #d9decb;background:#edf0e2;padding:8px 10px;border-radius:16px;font-size:11px;white-space:nowrap}.collection-intro{padding:21px 20px;border-radius:20px;background:#e3eadb;position:relative;overflow:hidden}.collection-intro h2{font-size:20px}.collection-intro p{margin:6px 0 15px;font-size:11px;color:var(--muted)}.collection-progress{height:5px;background:#cbd8c2;border-radius:4px}.collection-progress i{display:block;height:100%;width:0;background:#75926c;border-radius:4px;transition:width .4s}.filters{display:flex;gap:8px;margin:20px 0 18px;flex-wrap:wrap}.filters button{border:1px solid #dddfd1;border-radius:20px;padding:8px 13px;min-height:44px;font-size:11px}.filters .selected{background:#617b5f;color:#fff;border-color:#617b5f}.pet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.pet-tile{border:1px solid #e0e0d4;background:#fdfaf2;border-radius:18px;padding:9px 5px 12px;position:relative;text-align:center;min-width:0}.pet-tile canvas{width:100%;aspect-ratio:1;display:block}.pet-tile strong{font-size:11px;display:block;margin-top:2px}.pet-tile .pet-status{font-size:8px;color:#7c8374;margin-top:5px;display:block}.pet-tile.unowned{background:#efeee4}.pet-tile.unowned canvas{filter:saturate(.78) contrast(.96);opacity:1}.rarity{position:absolute;top:9px;left:9px;font-size:8px;letter-spacing:.5px;color:#727e69}.rarity.sr{color:#918359}.rarity.ssr{color:#ac7838}.pet-tile .owned-check{position:absolute;top:7px;right:8px;color:#668463;font-size:9px}.section-footnote{text-align:center;font-size:10px;color:#7d8574;margin:23px 0}.empty{padding:30px 12px;color:var(--muted);font-size:12px;text-align:center;grid-column:1/-1}
.home-scene{position:relative;aspect-ratio:354/380;border-radius:22px;overflow:hidden;background:#e7e0cf;border:1px solid #ddd6c5}.home-scene canvas{display:block;width:100%;height:100%;touch-action:pan-y}.home-scene-tag{position:absolute;top:15px;left:15px;border:1px solid #ffffff88;background:#ffffff66;padding:6px 10px;border-radius:20px;color:#747256;font-size:9px;letter-spacing:1px}.home-bubble{position:absolute;bottom:28%;left:20%;right:20%;text-align:center;background:#fff9e9;border:1px solid #e9dabb;padding:9px;border-radius:15px;font-size:11px;box-shadow:0 4px 12px #82634210;pointer-events:none}.home-note{text-align:center;margin:21px 0 24px}.home-note h2{font-size:17px}.home-note p{font-size:11px;color:var(--muted);margin:6px 0}.subheading{display:flex;justify-content:space-between;align-items:center;margin:23px 0 13px}.subheading h2{font-size:14px;margin:0}.subheading>span{font-size:9px;color:var(--muted)}.text-button{color:#567750;text-decoration:underline;text-underline-offset:4px;font-size:10px;min-height:44px}.resident-list{display:flex;gap:8px;flex-wrap:wrap}.resident{display:flex;align-items:center;background:#e9eadd;border-radius:15px;padding:4px 8px 4px 2px;gap:3px;font-size:10px}.resident canvas{width:40px;height:40px}
.card-pack-banner{display:flex;align-items:center;background:#e1e8d7;border:1px solid #d5dfc8;border-radius:22px;padding:22px 14px;gap:18px;margin-top:20px}.card-pack-banner>div:last-child{flex:1}.card-pack-banner h2{font-size:17px;margin-top:6px}.card-pack-banner p{font-size:10px;color:#66725a;line-height:1.8;margin:8px 0 15px}.pack-art{position:relative;width:102px;height:140px;flex-shrink:0}.pack-art span{position:absolute;width:76px;height:109px;background:#c4d1b6;border:2px solid #f7f1da;outline:1px solid #aeb99b;border-radius:12px;left:9px;top:13px;transform:rotate(-16deg)}.pack-art span:nth-child(2){transform:rotate(12deg);background:#e6d8b4;left:24px;top:19px}.pack-art span:nth-child(3){transform:rotate(-4deg);top:25px;left:16px;background:#638062;display:grid;place-items:center;box-shadow:2px 5px 8px #3c492f24}.pack-art svg{fill:#d5cc95;width:47px;height:47px}.primary-button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;background:#5f7c5d;border:1px solid #5f7c5d;color:#fff8e9;padding:11px 15px;border-radius:13px;font-size:12px;min-height:44px}.primary-button small{font-size:9px;font-weight:400;opacity:.8}.card-purchase{display:flex;align-items:center;justify-content:space-between;padding:16px 2px;border-bottom:1px solid var(--line);gap:10px}.card-purchase strong{font-size:12px}.card-purchase p{font-size:9px;color:var(--muted);margin:5px 0 0}.info-note{font-size:10px;color:#83744e;background:#efe7d3;padding:9px 12px;border-radius:9px;line-height:1.7}.cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.skill-card{position:relative;background:#fcf8ee;border:1px solid #d8dfcc;border-radius:16px;padding:14px 12px;text-align:left;min-height:156px;display:flex;flex-direction:column;align-items:flex-start}.skill-card .card-icon{width:33px;height:33px;display:grid;place-items:center;margin-bottom:11px;color:#70896a}.skill-card .card-icon svg{width:32px;height:32px}.skill-card strong{font-size:12px}.skill-card p{font-size:9px;line-height:1.7;color:var(--muted);margin:7px 0 0}.skill-card .card-stock{position:absolute;top:12px;right:12px;background:#e9ecdf;color:#68805a;border-radius:10px;padding:3px 6px;font-size:9px}.skill-card[data-owned=false]{opacity:.58}.skill-card.selected{border:2px solid #6c8a60;background:#eef1df}
dialog{border:none;width:calc(100% - 32px);max-width:430px;max-height:88svh;border-radius:27px;background:var(--paper);color:var(--ink);padding:26px 22px 24px;box-shadow:0 20px 80px #24352240;overscroll-behavior:contain}dialog::backdrop{background:#2b382b77;backdrop-filter:blur(5px)}.modal-close{position:absolute;right:10px;top:8px;width:44px;height:44px;font-size:24px;color:#8a927e;z-index:5}.modal-heading{font-size:22px;margin:10px 0 10px;text-align:center}.modal-copy{text-align:center;color:var(--muted);font-size:12px;line-height:1.8}.modal-art{width:160px;height:160px;display:block;margin:5px auto;position:relative;z-index:2}.modal-kicker{text-align:center;font-size:10px;color:#9f7a46;letter-spacing:2px;margin-top:12px}.modal-actions{display:flex;gap:10px;margin-top:20px}.modal-actions>button{flex:1;min-height:45px}.result-metrics{display:flex;justify-content:center;gap:15px;font-size:10px;color:var(--muted);margin:12px 0}.result-metrics b{display:block;font-size:15px;color:var(--ink);margin-bottom:5px;text-align:center}.rule-table{border-collapse:collapse;width:100%;font-size:11px;margin:16px 0}.rule-table td,.rule-table th{border-bottom:1px solid var(--line);text-align:left;padding:8px 5px}.rule-table th{color:#778268;font-weight:500}.rules-copy{font-size:11px;line-height:1.9;color:#606f56}.rules-copy h3{color:var(--ink);font-size:14px;margin-top:22px}.calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.calc-grid label{font-size:10px;display:flex;flex-direction:column;gap:4px}.calc-grid input,.calc-grid select{width:100%;min-height:35px;border:1px solid #ccd4bf;border-radius:8px;padding:6px;background:#fffaf0;color:var(--ink)}.calc-answer{font-size:30px;display:block;text-align:center;margin:15px;color:#5d7e52}.task-row{display:flex;justify-content:space-between;align-items:center;padding:15px 0;border-bottom:1px solid var(--line);font-size:12px;gap:10px}.task-row small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.task-row .reward{font-size:11px;color:#8e793e}.task-row:last-child{border:0}.detail-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;padding:10px 0;border-bottom:1px solid var(--line)}
#toast{position:fixed;z-index:100;bottom:100px;left:50%;transform:translateX(-50%);background:#374a36f2;color:#fff9e9;max-width:min(88%,410px);width:max-content;border-radius:14px;padding:12px 18px;font-size:12px;text-align:center;box-shadow:0 4px 15px #253b2720;line-height:1.7}.card-reveal{margin:24px auto;width:155px;min-height:200px;border-radius:17px;background:#668362;border:5px double #dcd6ad;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff6d9;box-shadow:0 12px 22px #40533b26;animation:cardReveal .6s ease-out}.card-reveal svg{width:60px;height:60px;fill:none;stroke:#ebe4ba;stroke-width:1.4;margin-bottom:16px}.card-reveal strong{font-size:16px}.card-reveal small{font-size:10px;opacity:.75;margin-top:9px}.screen-error{padding:40px 20px;color:#69482d;line-height:1.9}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.prize-reveal{position:relative;width:238px;height:218px;margin:4px auto 0;display:grid;place-items:center;perspective:650px;overflow:hidden}.prize-reveal::before{content:"";position:absolute;width:176px;height:176px;border-radius:50%;background:#8b9d8360;box-shadow:0 0 0 16px #c1b98531,0 0 0 33px #8b9d831d}.prize-reveal.rarity-sr::before{background:#c9a3574d}.prize-reveal.rarity-ssr::before{background:#c7774c4d;box-shadow:0 0 0 16px #c9a35730,0 0 0 33px #66816824}.prize-reveal .modal-art{width:190px;height:190px;transform-origin:50% 82%;animation:prizeLift .75s cubic-bezier(.18,.86,.28,1.16),prizeFloat 3.2s ease-in-out .75s infinite;filter:drop-shadow(0 14px 8px #304b4335)}.reveal-ring{position:absolute;width:160px;height:32px;border:3px solid #d9b55d;border-radius:50%;bottom:29px;animation:ringOpen .75s ease-out}.reveal-rarity{position:absolute;z-index:3;top:13px;right:17px;display:grid;place-items:center;min-width:40px;height:27px;padding:0 9px;border-radius:10px;background:#526f63;color:#f0d789;font-size:11px;font-weight:900}.reveal-pedestal{position:absolute;bottom:16px;width:132px;height:24px;border-radius:50%;background:#557369;box-shadow:0 7px 0 #3d5b52}.prize-reveal>p{position:absolute;z-index:3;bottom:0;margin:0;font-size:9px;color:#697362}.attempt-art{height:170px;display:grid;place-items:center}
@keyframes hatchPulse{50%{box-shadow:0 0 28px #f0cf74aa;background:#25463fe8}}@keyframes cardReveal{0%{transform:rotateY(90deg) scale(.8);opacity:0}100%{transform:none;opacity:1}}@keyframes prizeLift{0%{transform:translateY(66px) scale(.62) rotateY(-18deg);opacity:0}65%{opacity:1}100%{transform:translateY(0) scale(1)}}@keyframes prizeFloat{50%{transform:translateY(-5px) rotateY(4deg)}}@keyframes ringOpen{0%{transform:scale(.35);opacity:0}100%{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Keep the primary touch controls comfortably tappable on short phones. */
.target-bar{min-height:45px;padding-top:2px;padding-bottom:2px}
@media(max-width:360px){.dpad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px}}
@media(max-height:780px){#page-machine .machine-wrap{width:min(100%,calc(100svh - 480px));min-width:256px}.dpad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px}}
@media(max-height:700px){#page-machine .machine-wrap{width:min(100%,250px);min-width:0}}
@media(max-width:360px){.page{padding:0 13px}.topbar{padding:15px 14px 7px}.brand{font-size:15px}.wallet{gap:4px}.wallet button{padding:0 6px;font-size:11px}h1{font-size:20px}.control-deck{gap:7px;padding-inline:7px}.assist-area,.assist-button{width:58px}.dpad{grid-template-columns:40px 40px 40px;grid-template-rows:40px 40px 40px}.grab-button{width:82px;height:82px}.pet-grid{gap:7px}.card-pack-banner{gap:10px;padding:17px 10px}.pack-art{width:91px}}
@media(max-height:780px){#page-machine .machine-wrap{width:min(100%,calc(100svh - 470px));min-width:274px;margin:0 auto}.topbar{padding-top:9px;padding-bottom:4px}.brand small{font-size:8px}.grab-stage{margin-top:5px}.control-deck{padding-top:20px;padding-bottom:8px}.dpad{grid-template-columns:38px 38px 38px;grid-template-rows:38px 38px 38px}.grab-button{width:78px;height:78px}}
@media(max-height:700px){#page-machine .machine-wrap{width:min(100%,260px);min-width:0;margin:0 auto}#page-machine .target-bar{display:none}#page-machine .section-heading{margin:0}#page-machine .grab-stage{font-size:9px;margin-top:3px}.topbar{padding-top:6px}.daily-strip{display:none}}
@media(max-width:360px){.dpad{grid-template-columns:44px 44px 44px!important;grid-template-rows:44px 44px 44px!important}}
@media(max-height:780px){#page-machine .machine-wrap{width:min(100%,calc(100svh - 480px))!important;min-width:256px!important}.dpad{grid-template-columns:44px 44px 44px!important;grid-template-rows:44px 44px 44px!important}}
@media(max-height:700px){#page-machine .machine-wrap{width:min(100%,250px)!important;min-width:0!important}}
.grab-stage{min-height:8px}
.control-deck{transform:translateY(-3px)}
/* Keep one clear machine label; the cabinet light is the status cue. */
.machine-hud b{font-size:11px;letter-spacing:1.2px}
.machine-hud span{width:8px}
.deck-label span{font-family:system-rounded,-apple-system,BlinkMacSystemFont,'Noto Sans SC',sans-serif;font-size:9px;letter-spacing:.3px}
/* Warm material pass for the collection cards, matching the supplied plush reference. */
.pet-tile{background:#f5f0df;border-color:#ded8c6;box-shadow:0 4px 0 #e7e0cf}
.pet-tile.unowned{background:#efecdf}
.pet-tile canvas{filter:saturate(.95) drop-shadow(0 5px 4px #7a72532a)}
.pet-status{letter-spacing:.1px}
/* Retain the simplified layout with the original sage palette. */
.brand small{letter-spacing:.5px}
.deck-label{justify-content:flex-end}
.collection-intro h2{font-size:16px}.collection-intro p{margin-bottom:12px}
.pet-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.pet-tile,.pet-tile.unowned{border-radius:24px;padding:16px 10px}
.collection-art{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 7px 6px #7a725320)}
.collection-art.modal-art{width:180px;height:180px}
.pet-tile strong{font-size:13px}.pet-tile .pet-status{font-size:10px;color:var(--muted)}
.english-name{display:block;font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.4;letter-spacing:0}
.learning-card{background:#e3eadb;border-radius:18px;padding:15px 18px;margin:15px 0}
.learning-card .english-name{margin:0}.learning-card h3{display:flex;align-items:baseline;gap:12px;margin:12px 0}
.learning-card h3 span:first-child{font-size:23px}.learning-card h3 span:last-child{font-size:13px;font-weight:500}
.learning-card p{font-size:13px;line-height:1.6;margin:5px 0}

.collection-selects{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:10px;margin:0 0 18px}.collection-selects label{font-size:11px;color:var(--muted);min-width:0}.collection-selects select{display:block;width:100%;min-height:44px;margin-top:7px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);padding:7px;font-size:12px}
/* Machine v4: quiet sage upholstery, readable Chinese, physical controls. */
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;line-height:1.55}
.topbar{padding:12px 18px 8px}.brand{font-size:16px;letter-spacing:0}.brand small{font-size:11px}.brand-mark{width:34px;height:37px}.wallet{gap:4px}.wallet button{padding:0 7px;font-size:13px}.wallet b{font-weight:650}.page{padding:0 16px}.section-heading{margin:8px 0}.section-heading h1{font-size:22px}.cabinet-toolbar{margin:5px 0 10px;font-size:12px}.cabinet-toolbar button{font-size:12px;min-height:36px}
#page-machine .machine-wrap{width:100%!important;min-width:0!important;border:0;border-radius:24px;box-shadow:0 8px 18px #35483920;background:#c6d1b5}
.machine-hud{top:6%;left:18%;right:18%;justify-content:center;color:#4b654d}.machine-hud span{display:none}.machine-hud b{font-size:16px;color:#4b654d;letter-spacing:2px}
.grab-stage{font-size:12px!important;line-height:1.5;min-height:22px;color:#4e6250;margin:9px 0 0}.target-bar{display:flex!important;min-height:49px;gap:6px;margin:0 0 8px}.target-copy strong{font-size:13px}.target-copy small{font-size:11px;margin-top:1px}.target-avatar{width:34px;height:38px}.target-avatar canvas{width:36px;height:36px}.target-bar .soft-button{font-size:12px;padding:6px;min-height:40px}.soft-button:disabled{opacity:.65}
.control-deck{transform:none;min-height:153px;border:1px solid #a8bba4;border-radius:20px;padding:7px 14px 10px;gap:10px;background:linear-gradient(155deg,#e4e9d9,#c7d4bc);box-shadow:inset 0 2px 1px #fff9,0 5px 0 #a3b69d,0 9px 16px #3b553019;color:#405941}.deck-label{display:none}.assist-area,.assist-button{width:68px}.assist-button{color:#405941;min-height:88px}.assist-button strong{font-size:12px}.assist-button small{font-size:10px;color:#546a51}.stack-icon{background:#71866a;border-color:#afbd9b;width:38px;height:43px}.assist-button.selected .stack-icon{background:#637e56;box-shadow:0 0 0 2px #caaa58}
.grab-button{position:relative;width:94px;height:108px;border:0;background:none!important;box-shadow:none!important;color:#554223;gap:0;border-radius:16px;justify-content:flex-end;padding:0 0 2px}.grab-button img{position:absolute;top:0;left:0;width:100%;height:76px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 3px #6a5c3338)}.grab-button strong{font-size:17px;position:relative;line-height:1.4}.grab-button small{font-size:11px;position:relative;opacity:1}.grab-button:active{transform:translateY(3px)}.grab-button:disabled{opacity:.65}
.daily-strip{padding-top:14px}.tiny-label{font-size:11px}.daily-strip strong,.daily-strip button{font-size:12px}.bottom-nav{padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}.bottom-nav button{font-size:12px;min-height:48px}.build-note{font-size:10px}.modal-copy,.rules-copy,.info-note{font-size:13px}.skill-card p{font-size:12px}.skill-card strong{font-size:14px}.skill-card .card-stock{font-size:11px}.card-pack-banner p,.card-purchase p,.subheading>span{font-size:12px}.primary-button{font-size:14px}.primary-button small{font-size:12px}.section-footnote{font-size:12px}.collection-selects label{font-size:12px}.collect-prize{left:9%;bottom:5.4%;width:25%;height:11%;font-size:11px}
@media(max-height:740px){.brand small{display:none}#page-machine .section-heading{display:none}.topbar{padding-top:7px;padding-bottom:4px}.cabinet-toolbar{margin-bottom:5px}#page-machine .machine-wrap{width:min(100%,calc(100svh - 380px))!important;margin:auto}.control-deck{min-height:128px;padding-block:3px}.grab-stage{margin-top:6px}.target-bar{margin-bottom:4px;min-height:42px}.daily-strip{display:none}}
@media(max-width:370px){.page{padding-inline:12px}.brand{font-size:14px}.wallet button{font-size:12px;padding:0 5px}.control-deck{padding-inline:8px;gap:5px}.assist-area,.assist-button{width:60px}}
.grab-button img{height:67px;top:2px}.grab-button strong{font-size:16px}.assist-button small{line-height:1.45}.control-deck{min-height:144px}.machine-wrap{overflow:hidden}
@media(min-height:741px) and (max-height:860px){#page-machine .machine-wrap{width:min(100%,calc(100svh - 460px))!important;margin:auto}.topbar{padding-top:8px}.section-heading{margin:2px 0}.control-deck{min-height:140px}}

@media(max-height:740px){.control-deck{min-height:128px}}

/* Match the unwarped source cabinet proportions and the original collection hatch. */
#page-machine .machine-wrap{aspect-ratio:1470/1605}
.collect-prize{left:18%;bottom:6.5%;width:35%;height:14%;background:#183125b8;border-color:#d8c88d}
@media(max-height:740px){#page-machine .machine-wrap{width:min(100%,calc((100svh - 380px)*.916))!important}}
@media(min-height:741px) and (max-height:860px){#page-machine .machine-wrap{width:min(100%,calc((100svh - 460px)*.916))!important}}


@keyframes cardArm{0%{transform:scale(.94);filter:brightness(1)}35%{transform:scale(1.08);filter:brightness(1.25);box-shadow:0 0 0 3px #d9b55d88,0 0 24px #d9b55d88}70%{transform:scale(1.02);filter:brightness(1.08);box-shadow:0 0 0 2px #d9b55d55,0 0 13px #d9b55d55}100%{transform:none;filter:none;box-shadow:none}}
@keyframes cardIconPulse{0%{transform:rotate(-8deg) scale(.8)}45%{transform:rotate(8deg) scale(1.18)}100%{transform:none}}
.assist-button.card-armed{animation:cardArm 1.1s cubic-bezier(.2,.8,.2,1)}.assist-button.card-armed .stack-icon{animation:cardIconPulse 1.1s ease-out}

/* Organic rarity reveal: each prize gets its own soft plush palette and stitched halo. */
dialog:has(.prize-reveal){background:#f7f2e7;border:1px solid #ded4bb;box-shadow:0 24px 70px #273a2b38,0 0 0 7px #f7f2e799;}
.prize-reveal{--reveal-bg:#dfe8d2;--reveal-edge:#8da487;--reveal-accent:#c9a357;background:radial-gradient(circle at 50% 38%,#ffffff72,transparent 42%),var(--reveal-bg);border:10px solid var(--reveal-edge);border-radius:46% 54% 49% 51%/48% 46% 54% 52%;box-shadow:inset 0 0 0 5px #ffffff55,inset 0 -16px 22px #40533b18,0 8px 0 #536b5740,0 14px 22px #304b4328;overflow:visible;}
.prize-reveal::after{content:"";position:absolute;inset:-15px;border:4px dotted var(--reveal-accent);border-radius:50%;opacity:.72;filter:blur(.25px);animation:plushStitch 2.4s ease-in-out infinite;pointer-events:none;}
.prize-reveal::before{background:var(--reveal-edge);opacity:.22;box-shadow:0 0 0 16px var(--reveal-accent)22,0 0 0 33px var(--reveal-edge)12;}
.prize-reveal.rarity-n{--reveal-bg:#dfe8d2;--reveal-edge:#789276;--reveal-accent:#d2b96c}.prize-reveal.rarity-r{--reveal-bg:#d9e9e3;--reveal-edge:#568d86;--reveal-accent:#d0a75b}.prize-reveal.rarity-sr{--reveal-bg:#e1dced;--reveal-edge:#7664a2;--reveal-accent:#c49bde}.prize-reveal.rarity-ssr{--reveal-bg:#f0d8c7;--reveal-edge:#a86651;--reveal-accent:#e4ad62}
.prize-reveal .reveal-rarity{background:var(--reveal-edge);color:#fff8e9;border:2px solid var(--reveal-accent);box-shadow:0 3px 0 #304b4330}.prize-reveal .reveal-pedestal{background:var(--reveal-edge);box-shadow:0 7px 0 color-mix(in srgb,var(--reveal-edge) 75%,#1f352c)}
.result-metrics{padding:10px 8px;border-radius:16px;background:#ebe6d8;border:1px solid #d9cfb8;box-shadow:inset 0 1px #fff9}.result-metrics b{color:#425b48}.prize-reveal>p{background:#f7f2e7d9;padding:2px 8px;border-radius:8px}
@keyframes plushStitch{50%{transform:scale(1.025) rotate(1deg);opacity:.48}}

/* Direction button controls. */
.direction-control{flex:1;min-width:132px;display:grid;justify-items:center}.control-deck{gap:6px;padding-inline:8px}
