@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Cormorant+Garamond:wght@600;700&family=Creepster&family=Orbitron:wght@500;600;700&family=Permanent+Marker&display=swap');
/* The original illustrated garden remains the free Beatrice theme. */
.shop-tabs{grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr));gap:6px}.shop-tabs button{font-size:.875rem!important}
:root,[data-theme-card]{--theme-display:'Fredoka',sans-serif;--theme-body:'DM Sans',sans-serif;--theme-bg:#f5f6e7;--theme-panel:#fff9e3;--theme-control:#edf0db;--theme-primary:#427c35;--theme-on-primary:#fffbed;--theme-accent:#e6ad35;--theme-ink:#2c4128;--theme-muted:#657257;--theme-edge:#8b9c6e;--theme-radius:14px;--theme-shadow:0 3px 0 #506336;--theme-pattern:radial-gradient(#8b9c6e18 1px,transparent 1px);--theme-pattern-size:12px 12px;--theme-tile:#427c35;--theme-open:#d6ddc6;--theme-clue:#fff9df;--theme-clue-ink:#29492d;--theme-secondary:#ecb3c4;--theme-focus:#ad861d}
:is([data-theme='queen'],[data-theme-card='queen']){--theme-display:'Cormorant Garamond',Georgia,serif;--theme-body:Georgia,serif;--theme-bg:#24122f;--theme-panel:#372142;--theme-control:#503056;--theme-primary:#debb73;--theme-on-primary:#2c1637;--theme-accent:#e4c58b;--theme-ink:#fff1d6;--theme-muted:#cebada;--theme-edge:#af8750;--theme-radius:10px;--theme-shadow:0 3px 0 #13081d,0 0 0 1px #dab97944;--theme-pattern:repeating-linear-gradient(45deg,transparent 0 27px,#e4c58b0b 28px 29px,transparent 30px 55px),repeating-linear-gradient(-45deg,transparent 0 27px,#e4c58b0b 28px 29px,transparent 30px 55px);--theme-pattern-size:80px 80px;--theme-tile:#4f2b5a;--theme-open:#2b1b35;--theme-clue:#f0dcad;--theme-clue-ink:#48214e;--theme-secondary:#895973;--theme-focus:#ffe0a0}
:is([data-theme='graffiti'],[data-theme-card='graffiti']){--theme-display:'Permanent Marker',Impact,sans-serif;--theme-bg:#18252a;--theme-panel:#233338;--theme-control:#33454a;--theme-primary:#37e4cf;--theme-on-primary:#112d2d;--theme-accent:#ff75bb;--theme-ink:#fff6e2;--theme-muted:#b9ceca;--theme-edge:#071d21;--theme-radius:4px 18px 5px 15px;--theme-shadow:4px 4px 0 #080f15;--theme-pattern:radial-gradient(ellipse at 4% 20%,#27e0cd27,transparent 38%),radial-gradient(ellipse at 98% 78%,#ff65b228,transparent 40%),repeating-linear-gradient(0deg,transparent 0 46px,#ffffff07 47px 49px);--theme-pattern-size:auto;--theme-tile:#284a4e;--theme-open:#172c31;--theme-clue:#f9f1d9;--theme-clue-ink:#132c35;--theme-secondary:#824968;--theme-focus:#fc84c5}
:is([data-theme='comic'],[data-theme-card='comic']){--theme-display:'Bangers',Impact,sans-serif;--theme-bg:#f5e9c6;--theme-panel:#fffbee;--theme-control:#fffbee;--theme-primary:#ffe142;--theme-on-primary:#171b2c;--theme-accent:#dd283e;--theme-ink:#171b2c;--theme-muted:#515262;--theme-edge:#171b2c;--theme-radius:3px;--theme-shadow:4px 4px 0 #171b2c;--theme-pattern:radial-gradient(#181b2b22 1px,transparent 1.2px);--theme-pattern-size:7px 7px;--theme-tile:#3fadd4;--theme-open:#dfdabf;--theme-clue:#fff9df;--theme-clue-ink:#171b2c;--theme-secondary:#eea8a5;--theme-focus:#cc2638}
:is([data-theme='scifi'],[data-theme-card='scifi']){--theme-display:'Orbitron',monospace;--theme-body:'DM Sans',sans-serif;--theme-bg:#081625;--theme-panel:#112639;--theme-control:#19364b;--theme-primary:#76eedf;--theme-on-primary:#082b32;--theme-accent:#76eedf;--theme-ink:#d9f4ff;--theme-muted:#96b9cd;--theme-edge:#39718a;--theme-radius:3px 14px 3px 14px;--theme-shadow:0 0 12px #74f6e918,inset 0 0 12px #74f6e906;--theme-pattern:linear-gradient(#72edeb08 1px,transparent 1px),linear-gradient(90deg,#72edeb08 1px,transparent 1px),radial-gradient(ellipse at 80% 0,#1b4159,transparent 55%);--theme-pattern-size:26px 26px,26px 26px,auto;--theme-tile:#14364b;--theme-open:#0b2133;--theme-clue:#1f4660;--theme-clue-ink:#d8ffff;--theme-secondary:#403856;--theme-focus:#74ffee}
:is([data-theme='invasion'],[data-theme-card='invasion']){--theme-display:'Creepster',Impact,sans-serif;--theme-body:'Trebuchet MS',sans-serif;--theme-bg:#201329;--theme-panel:#302039;--theme-control:#44304c;--theme-primary:#b9f344;--theme-on-primary:#1f2130;--theme-accent:#f877c6;--theme-ink:#eaf5ce;--theme-muted:#c0b2cd;--theme-edge:#0f091c;--theme-radius:5px 20px 7px 4px;--theme-shadow:5px 4px 0 #0e0a15;--theme-pattern:repeating-linear-gradient(115deg,transparent 0 48px,#9c46a112 49px 65px,transparent 66px 100px),radial-gradient(ellipse at 50% 0,#543157,transparent 70%);--theme-pattern-size:auto;--theme-tile:#5f7740;--theme-open:#221c30;--theme-clue:#e0ebbd;--theme-clue-ink:#302039;--theme-secondary:#8c4776;--theme-focus:#caff64}
:is([data-theme='blacklight'],[data-theme-card='blacklight']){--theme-display:'Fredoka',sans-serif;--theme-bg:#100d24;--theme-panel:#24183c;--theme-control:#33224f;--theme-primary:#7138ae;--theme-control-ink:#34204b;--theme-on-primary:#fff4ff;--theme-accent:#ed7cd9;--theme-ink:#f5edff;--theme-muted:#cabcdf;--theme-edge:#76539a;--theme-radius:16px;--theme-shadow:0 3px 0 #090719,0 0 10px #8c3dd326;--theme-pattern:radial-gradient(ellipse at 15% 10%,#7336aa32,transparent 55%),radial-gradient(ellipse at 95% 80%,#1cbfd01a,transparent 50%);--theme-pattern-size:auto;--theme-tile:#39204f;--theme-open:#e1d2f2;--theme-clue:#f2e7ff;--theme-clue-ink:#392153;--theme-secondary:#552f78;--theme-focus:#65eff1;--button-cream:url('assets/themes/blacklight/button-secondary.webp');--button-green:url('assets/themes/blacklight/button-primary.webp');--button-honey:url('assets/themes/blacklight/button-accent.webp');--button-rose:url('assets/themes/blacklight/button-accent.webp')}
:is([data-theme='overdrive'],[data-theme-card='overdrive']){--theme-display:'Bangers',Impact,sans-serif;--theme-bg:#25190e;--theme-panel:#392718;--theme-control:#513721;--theme-primary:#9e4317;--theme-control-ink:#4d2b12;--theme-on-primary:#fff4df;--theme-accent:#ffd369;--theme-ink:#fff2d9;--theme-muted:#dbc3a2;--theme-edge:#a97935;--theme-radius:8px 18px 8px 18px;--theme-shadow:3px 3px 0 #140d07;--theme-pattern:repeating-linear-gradient(135deg,transparent 0 42px,#efaf3920 43px 48px,transparent 49px 90px),radial-gradient(ellipse at 80% 0,#78401f44,transparent 70%);--theme-pattern-size:auto;--theme-tile:#855321;--theme-open:#f1ddae;--theme-clue:#fff2d1;--theme-clue-ink:#563315;--theme-secondary:#79502f;--theme-focus:#ffe6a0;--button-cream:url('assets/themes/overdrive/button-secondary.webp');--button-green:url('assets/themes/overdrive/button-primary.webp');--button-honey:url('assets/themes/overdrive/button-accent.webp');--button-rose:url('assets/themes/overdrive/button-accent.webp')}
.theme-active{--ink:var(--theme-ink);--muted:var(--theme-muted);font-family:var(--theme-body);background:var(--theme-bg);color:var(--theme-ink);color-scheme:dark}
[data-theme='comic']{color-scheme:light}
.theme-active .app-shell,.theme-active #desktop{background-color:var(--theme-bg);background-image:var(--theme-pattern);background-size:var(--theme-pattern-size);color:var(--theme-ink)}
.theme-active .desktop-mode{background:var(--theme-bg)}
.theme-active :is(h1,h2,h3,h4,.flower-number,.run-summary strong,.run-row>b),.theme-active button:not(.tile),.theme-active .tile.marker-maybe{font-family:var(--theme-display);letter-spacing:.015em}
.theme-active .primary-button{font-family:var(--theme-display);text-shadow:none}.theme-active .powerup-reserve{font-family:var(--theme-body)}
.theme-active :is(button,summary,.sprite-panel,.info-card){--face:var(--theme-control);--face-ink:var(--theme-control-ink,var(--theme-ink));--face-shadow:var(--theme-shadow);border-radius:var(--theme-radius);color:var(--face-ink)}
.theme-active :is(button,summary,.sprite-panel,.info-card)::before{border:2px solid var(--theme-edge);border-image:none;border-radius:inherit;background:var(--face);box-shadow:var(--face-shadow);inset:0}
.theme-active .info-card{--face:var(--theme-panel);--face-ink:var(--theme-ink);--face-shadow:none}
.theme-active :is(.primary-button,.powerup-nudge,.shop-tabs button[aria-selected='true']){--face:var(--theme-primary);--face-ink:var(--theme-on-primary)}
.theme-active .shop-tabs button[aria-selected='true']{color:var(--theme-on-primary)}
.theme-active :is(.wallet,.powerup-peek,.shop-balance,.shop-item button,.theme-buy){--face:var(--theme-accent);--face-ink:var(--theme-on-primary)}
.theme-active :is(.wallet,.powerup-peek,.shop-balance,.shop-item button,.theme-buy){color:var(--face-ink)}
[data-theme='graffiti'] :is(.wallet,.powerup-peek,.shop-balance,.shop-item button){--face-ink:#28172b}
[data-theme='comic'] :is(.wallet,.powerup-peek,.shop-balance,.shop-item button){--face-ink:#fffbed}
[data-theme='invasion'] :is(.wallet,.powerup-peek,.shop-balance,.shop-item button){--face-ink:#21112d}
[data-theme='blacklight'] :is(.wallet,.powerup-peek,.shop-balance,.shop-item button){--face-ink:#241233}
[data-theme='overdrive'] :is(.wallet,.powerup-peek,.shop-balance,.shop-item button){--face-ink:#492b0d}
.theme-active :is(.shop-balance b,.wallet b){color:inherit}
.theme-active :is(.text-button,.bottom-nav button,.secondary-button){color:var(--face-ink)}
.theme-active :is(.home-guide-links button,.home-goal-heading){--face-ink:var(--theme-ink)}
:is([data-theme='blacklight'],[data-theme='overdrive']) :is(.refill-summary .fine-print,.run-row small){color:var(--theme-control-ink)!important}
.theme-active :is(.eyebrow,.garden-heading .eyebrow,.level-detail,.level-detail span+span,.col-count,.row-count,.gesture-tip,.zoom-controls,.home-record div>span,.desktop-brand small,.tutorial-toolbar,.tutorial-feedback,.app-version){color:var(--theme-muted)}
.theme-active .honey-totals>#reward-label{color:var(--theme-accent)}
.theme-active #outcome-dialog.failure h2{color:var(--theme-accent)}
.theme-active #review-dialog:is([data-kind='hit'],[data-kind='wrong'],[data-kind='correct']) h2{color:var(--theme-accent)}
.theme-active .tracked-upgrade-progress{background:var(--theme-control);border-color:var(--theme-edge);border-radius:var(--theme-radius);color:var(--theme-ink)}
.theme-active .tracked-upgrade-progress>p{color:var(--theme-muted)}
.theme-active .tracked-upgrade-progress progress{background:var(--theme-panel);color:var(--theme-accent)}
.theme-active .tracked-upgrade-progress progress::-webkit-progress-bar{background:var(--theme-panel)}
.theme-active .tracked-upgrade-progress progress::-webkit-progress-value{background:var(--theme-accent)}
.theme-active .tracked-upgrade-progress progress::-moz-progress-bar{background:var(--theme-accent)}
.theme-active .shop-item.tracked-upgrade{outline-color:var(--theme-focus)}
.theme-active :is(dialog>p:not(.shop-balance),.shop-item p,.shop-stock,.run-summary,.run-row small,.empty-runs,.guide-list p,.fine-print,.tutorial-card .eyebrow,.tutorial-card .tutorial-feedback){color:var(--theme-muted)!important}
.theme-active :is(.home-record strong,.run-summary strong){color:var(--theme-ink)}
.theme-active .shop-item .shop-rank{color:var(--theme-muted)}
.theme-active .home-continue .life-heart:not(.is-full){color:var(--theme-on-primary);opacity:.38}.theme-active .life-heart{color:var(--theme-muted)}.theme-active .life-heart.is-full{color:#ec787d}
.theme-active .progress-track{background:var(--theme-control)}.theme-active #safe-progress{background:var(--theme-accent)}
.theme-active dialog{border:2px solid var(--theme-edge);border-radius:var(--theme-radius);background:var(--theme-panel);padding:25px 20px 20px;box-shadow:var(--theme-shadow),var(--ui-dialog-shadow);color:var(--theme-ink)}
.theme-active .changelog-entry{background:var(--theme-control);border-color:var(--theme-edge);color:var(--theme-ink)}
.theme-active dialog::backdrop{background:#060910bb}.theme-active .close-dialog{top:8px;right:8px;width:34px;height:34px;min-height:34px}
.theme-active #flower-dialog{border-image:none}.theme-active .profile-avatar{background:var(--theme-control);border-color:var(--theme-accent)}
.theme-active #restart-button{--face:var(--theme-secondary);color:var(--theme-ink)}.theme-active .reset-progress{color:var(--theme-accent)}
.theme-active .guide-list li::before{background:var(--theme-primary);color:var(--theme-on-primary);font-family:var(--theme-display)}
.theme-active .toast{background:var(--theme-primary);color:var(--theme-on-primary);border:2px solid var(--theme-edge);border-radius:var(--theme-radius)}
.theme-active .tutorial-card{border:2px solid var(--theme-edge);border-radius:var(--theme-radius);background:var(--theme-panel);color:var(--theme-ink);padding:14px 16px;box-shadow:var(--theme-shadow),var(--ui-panel-shadow)}
.theme-active .tutorial-pointer{visibility:hidden}.theme-active .tutorial-card h2{font-size:1.5rem}.theme-active .board .tutorial-clue{color:var(--theme-on-primary);background:var(--theme-primary);border-color:var(--theme-focus)}
.theme-active .tile{--face:var(--theme-tile);--face-shadow:0 2px 0 var(--theme-edge);border-radius:var(--theme-radius);color:var(--theme-ink)}
.theme-active .tile-image{width:88%;height:88%}.theme-active .tile .grass-art{opacity:.8}.theme-active .tile.revealed{background:var(--theme-open);box-shadow:inset 0 0 0 1px var(--theme-edge);color:var(--theme-ink)}
.theme-active .tile.flower{background:var(--theme-clue);color:var(--theme-clue-ink)}.theme-active .flower-number{background:var(--theme-clue);color:var(--theme-clue-ink);border:1px solid var(--theme-edge);border-radius:3px;font-size:1.25rem;min-width:1.15em}
.theme-active .tile:is(.marker-bee,.bee-hit){--face:var(--theme-primary)}.theme-active .tile.marker-maybe{--face:var(--theme-control);color:var(--theme-ink)}
.theme-active .hold-meter{background:var(--theme-primary);border-radius:inherit}.theme-active .tile:is(.holding,.hint-tile,.tutorial-target){outline-color:var(--theme-focus)}
.theme-active .tile.tutorial-evidence{outline-color:var(--theme-focus)}.theme-active .flower-example-cell{--face:var(--theme-open);border-radius:var(--theme-radius)}
.theme-active .flower-example-cell.covered{--face:var(--theme-tile)}.theme-active .flower-example-cell:is(.bee,.bee-mark){--face:var(--theme-primary)}.theme-active .flower-example-cell.flower{--face:var(--theme-clue)}
.theme-active .bee-flip-front{color:var(--theme-ink);font-family:var(--theme-display)}
.theme-active .phone-frame{background:var(--theme-edge);border-color:var(--theme-edge);box-shadow:0 0 0 1px var(--theme-accent),0 25px 70px #0006}.theme-active .phone-frame iframe{background:var(--theme-bg)}
[data-theme='queen'] :is(button,summary,.sprite-panel)::before{border-width:1px;box-shadow:var(--face-shadow),inset 0 0 0 3px #dfbd7014}
[data-theme='graffiti'] .primary-button::before{background-image:linear-gradient(165deg,transparent 80%,#ffffff35 81%,transparent 85%)}
[data-theme='comic'] :is(button,summary,.sprite-panel,.info-card)::before{border-width:2px}[data-theme='comic'] .info-card::before{background-image:radial-gradient(#171b2b10 1px,transparent 1px);background-size:6px 6px}
[data-theme='scifi'] :is(.shop-tabs button,.home-links button,.powerup-name){font-size:.78rem!important}[data-theme='scifi'] .primary-button{font-size:1rem!important}
[data-theme='invasion'] .info-card::before{border-width:3px;box-shadow:inset 4px 0 0 #bbf63e22}
/* Catalog cards preview their own palette, independent of the active theme. */
.shop-section[data-kind='theme'] .shop-items{grid-template-columns:1fr;gap:18px}
.theme-shop-card{overflow:hidden;border:2px solid var(--theme-edge);border-radius:var(--theme-radius);background:var(--theme-panel);color:var(--theme-ink);padding:0 14px 14px;box-shadow:var(--theme-shadow)}
.theme-card-preview{position:relative;display:flex;align-items:center;justify-content:space-around;width:calc(100% + 28px);max-width:none!important;height:146px;margin:0 -14px 12px;padding:10px 16px;background-color:var(--theme-bg)!important;background-image:var(--theme-pattern)!important;background-size:var(--theme-pattern-size)!important;border-radius:0!important;overflow:hidden}
.theme-card-preview::before{display:none}.theme-portrait{width:112px;height:124px;object-fit:contain}.theme-mini-tiles{display:grid;grid-template-columns:repeat(2,42px);gap:7px;transform:rotate(-7deg);padding-bottom:20px}.theme-mini-tiles img{width:42px;height:42px;object-fit:contain;background:var(--theme-tile);border:1px solid var(--theme-edge);border-radius:6px}.theme-mini-tiles img:nth-child(2){background:var(--theme-clue);transform:translateY(20px)}.theme-mini-tiles img:nth-child(3){background:var(--theme-primary)}
.theme-preview-label{position:absolute;right:14px;bottom:10px;color:var(--theme-ink);font:600 .75rem var(--theme-body);border-bottom:1px solid currentColor;padding:3px 1px}
.theme-card-copy h4{font:500 1.7rem/1.1 var(--theme-display);margin:2px 0 7px}.theme-card-copy p{font:.875rem/1.5 var(--theme-body);color:var(--theme-muted);margin:0 0 12px}.theme-ownership{font:600 .6875rem var(--theme-body);text-transform:uppercase;letter-spacing:.12em;color:var(--theme-accent)}
.theme-shop-card .theme-buy{width:100%;padding:12px 8px;font-family:var(--theme-display)!important;color:var(--theme-on-primary)!important;--face:var(--theme-primary)!important;--face-ink:var(--theme-on-primary)!important;background:var(--theme-primary);border:1px solid var(--theme-edge);border-radius:var(--theme-radius);font-size:1rem!important;box-shadow:none}.theme-buy::before{display:none}.theme-shop-card .theme-buy:disabled{opacity:.55}
#theme-preview-dialog>p{margin:10px 0}#theme-preview-dialog .eyebrow{padding-right:38px}#theme-preview-title{margin-bottom:8px}
.theme-sample-portrait{text-align:center;height:115px}.theme-sample-portrait img{height:125px;width:145px;object-fit:contain}.theme-sample-board{padding:14px}.theme-sample-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:min(100%,216px);margin:10px auto 0}.theme-sample-tiles .tile{width:100%;height:auto;aspect-ratio:1;cursor:default}.theme-sample-tiles .flower-number{font-size:1rem}
.theme-active button.lives-count{color:var(--theme-ink);border-radius:5px}.theme-active .lives-count::before{display:none}
.keyboard-navigation :is(button,summary):focus-visible{outline:3px solid var(--theme-focus,#957326);outline-offset:3px}
@media(max-height:730px){.theme-sample-portrait{height:92px}.theme-sample-portrait img{height:100px}.theme-sample-tiles{width:174px}}
@media(max-width:350px){.theme-active dialog{padding:22px 14px 16px}.theme-card-preview{height:132px}.theme-portrait{width:98px;height:108px}.theme-mini-tiles{grid-template-columns:repeat(2,36px)}.theme-mini-tiles img{width:36px;height:36px}.shop-tabs button{padding-inline:3px;font-size:.75rem!important}}

.theme-active .home-continue small{color:var(--theme-on-primary);font-family:var(--theme-body);opacity:.85}
.theme-active .home-record strong{font-family:var(--theme-display)}
.theme-active .theme-sample-tiles .tile.revealed::before{display:none}
@media(max-height:730px){.theme-active .title-screen{gap:10px}}

/* Title lettering is generated artwork. CSS only sizes and positions the images. */
.theme-sample-portrait{display:flex;align-items:center;justify-content:center;gap:6px}
.theme-sample-portrait img{width:100px}
.theme-sample-portrait .theme-sample-logo{width:calc(100% - 106px);max-width:190px;height:100%;object-fit:contain}
/* Generated nine-slice control surfaces keep their illustrated corners at every size. */
:root,[data-theme-card]{--surface-slice:30%}
:is([data-theme='queen'],[data-theme-card='queen']){--button-cream:url('assets/themes/queen/button-secondary.webp');--button-green:url('assets/themes/queen/button-primary.webp');--button-honey:url('assets/themes/queen/button-accent.webp');--button-rose:url('assets/themes/queen/button-accent.webp')}
:is([data-theme='graffiti'],[data-theme-card='graffiti']){--button-cream:url('assets/themes/graffiti/button-secondary.webp');--button-green:url('assets/themes/graffiti/button-primary.webp');--button-honey:url('assets/themes/graffiti/button-accent.webp');--button-rose:url('assets/themes/graffiti/button-accent.webp')}
:is([data-theme='comic'],[data-theme-card='comic']){--surface-slice:20%;--button-cream:url('assets/themes/comic/button-secondary.webp');--button-green:url('assets/themes/comic/button-primary.webp');--button-honey:url('assets/themes/comic/button-accent.webp');--button-rose:url('assets/themes/comic/button-accent.webp')}
:is([data-theme='scifi'],[data-theme-card='scifi']){--button-cream:url('assets/themes/scifi/button-secondary.webp');--button-green:url('assets/themes/scifi/button-primary.webp');--button-honey:url('assets/themes/scifi/button-accent.webp');--button-rose:url('assets/themes/scifi/button-accent.webp')}
:is([data-theme='invasion'],[data-theme-card='invasion']){--button-cream:url('assets/themes/invasion/button-secondary.webp');--button-green:url('assets/themes/invasion/button-primary.webp');--button-honey:url('assets/themes/invasion/button-accent.webp');--button-rose:url('assets/themes/invasion/button-accent.webp')}
[data-theme-card='beatrice']{--button-green:url('assets/ui/button-green.webp');--button-cream:url('assets/ui/button-cream.webp')}
.theme-active :is(button,summary,.sprite-panel):not(.info-card)::before,.theme-shop-card .theme-buy::before{border:solid transparent;border-width:var(--surface-cap);border-image:var(--surface-art) var(--surface-slice,30%) fill / var(--surface-cap) stretch;background:none;box-shadow:var(--surface-shadow,var(--ui-surface-shadow));inset:-2px}
.theme-active .tile::before{inset:-1px}
.theme-active .theme-card-preview::before,.theme-active .lives-count::before,.theme-active .tile.revealed::before{display:none}
.theme-shop-card .theme-buy{--surface-art:var(--button-green);--surface-cap:23px;background:none;border:0;isolation:isolate}
.theme-shop-card .theme-buy::before{display:block}
.theme-active :is(.hint-copy,.run-row:first-child,#restart-button){--surface-art:var(--button-cream)}
.theme-active .flower-number{font-family:var(--theme-body);font-weight:700}
.theme-shop-card.tracked-goal{outline:3px solid var(--theme-focus);outline-offset:-3px}
.theme-shop-card .theme-track{display:block;min-height:40px;margin:0 0 8px;padding:4px 0;font:600 .8rem var(--theme-body)!important;color:var(--theme-ink)}
.theme-shop-card .theme-track::before{display:none}

/* Paint shadows with the surfaces instead of filtering their contents. Safari can
   lose filtered border images and transparent artwork while scrolling a dialog.
   Portraits and icons retain their illustrated shading without extra filter layers. */
:root,[data-theme-card]{--ui-shadow-rgb:30 43 25;--ui-surface-shadow:0 1px 2px -1px rgb(var(--ui-shadow-rgb) / .22),0 3px 4px -1px rgb(var(--ui-shadow-rgb) / .16);--ui-contact-shadow:0 1px 2px rgb(var(--ui-shadow-rgb) / .2);--ui-panel-shadow:0 1px 2px rgb(var(--ui-shadow-rgb) / .2),0 4px 8px rgb(var(--ui-shadow-rgb) / .16);--ui-dialog-shadow:0 3px 4px rgb(var(--ui-shadow-rgb) / .2),0 12px 20px rgb(var(--ui-shadow-rgb) / .2)}
:is([data-theme='queen'],[data-theme-card='queen']){--ui-shadow-rgb:14 5 20}
:is([data-theme='graffiti'],[data-theme-card='graffiti']){--ui-shadow-rgb:3 13 17}
:is([data-theme='comic'],[data-theme-card='comic']){--ui-shadow-rgb:27 24 38}
:is([data-theme='scifi'],[data-theme-card='scifi']){--ui-shadow-rgb:2 8 18}
:is([data-theme='invasion'],[data-theme-card='invasion']){--ui-shadow-rgb:12 4 19}
:is([data-theme='blacklight'],[data-theme-card='blacklight']){--ui-shadow-rgb:5 2 18}
:is([data-theme='overdrive'],[data-theme-card='overdrive']){--ui-shadow-rgb:19 10 3}
:is(button,summary,.sprite-panel,.info-card)::before{border-radius:inherit;box-shadow:var(--surface-shadow,var(--ui-surface-shadow))}
button:active:not(:disabled),summary:active{--surface-shadow:var(--ui-contact-shadow)}
.theme-mini-tiles img,.region-chip,.flower-number{box-shadow:var(--ui-contact-shadow)}
.tile.revealed{box-shadow:inset 0 1px 2px #52633c14,var(--ui-contact-shadow)}
.tile.flower{box-shadow:inset 0 0 0 1px #b7c094,var(--ui-contact-shadow)}
.theme-active .tile.revealed{box-shadow:inset 0 0 0 1px var(--theme-edge),var(--ui-contact-shadow)}
.theme-shop-card{box-shadow:var(--theme-shadow),var(--ui-panel-shadow)}
.profile-avatar{box-shadow:var(--ui-panel-shadow)}
.tutorial-card{box-shadow:var(--ui-panel-shadow)}
dialog{border-radius:18px;box-shadow:var(--ui-dialog-shadow)}
/* Beatrice sprites already contain their shadows. A rectangular CSS shadow
   outlines their transparent padding and creates a pale halo around the art. */
[data-theme='beatrice'] :is(button,summary,.sprite-panel,.info-card)::before{box-shadow:none}
[data-theme='beatrice'] :is(dialog,.tutorial-card){box-shadow:none}

/* Gameplay groups must not inherit a theme's decorative palette or button art. */
.theme-active .region-chip{border:1px solid var(--bed-color);border-radius:10px;background:var(--bed-light);color:var(--bed-ink);font:600 .8125rem/1.2 'DM Sans',system-ui,sans-serif}
.theme-active .region-chip::before{display:none}
.theme-active #flowerbed-dialog{border-image:none}

/* Each ground palette is painted into an asset. Every gameplay state keeps it. */
:root .tile.garden-tile{background:none;box-shadow:none;border:0;color:var(--bed-ink)}
:root .tile.garden-tile::before{display:none}
:root .tile.garden-tile::after{content:'';position:absolute;inset:0;z-index:-1;background:var(--tile-ground) center/100% 100% no-repeat;pointer-events:none;opacity:1}
:root .tile.garden-tile.revealed:not(.flower)::after{opacity:.6}
.tile.garden-tile .bush-art{width:82%;height:82%}

/* Smooth honey splats and dark icon shadows keep game pieces clear. */
[data-theme='overdrive'] .tile.garden-tile :is(.bush-art,.bee-art,.flower-art){filter:drop-shadow(0 1px 1px #120a04) drop-shadow(0 0 2px #120a04e6)}
[data-theme='overdrive'] .tile.garden-tile .bush-art{width:72%;height:72%}
[data-theme='overdrive'] .tile.garden-tile .bee-art{width:74%;height:74%}
:root[data-theme='overdrive'] .tile.garden-tile.revealed:not(.flower)::after{opacity:1}

.theme-mini-tiles img:nth-child(n){background:var(--tile-ground) center/100% 100% no-repeat;border:0}

.maybe-marker{display:grid;place-items:center;width:1.3em;height:1.3em;border-radius:50%;background:var(--bed-light);color:var(--bed-ink);font-weight:500}

/* A clearly labeled preview action sits below the artwork, separate from buying. */
.theme-card-preview{height:184px;padding:10px 16px 52px}
.theme-card-preview .theme-portrait{height:112px}
.theme-card-preview .theme-mini-tiles{padding-bottom:0;transform:rotate(-7deg) translateY(-8px)}
.theme-preview-label{left:14px;right:14px;bottom:10px;display:flex;align-items:center;justify-content:center;gap:9px;min-height:38px;padding:8px 12px;border:1px solid var(--theme-edge);border-radius:8px;background:var(--theme-primary);color:var(--theme-on-primary);box-shadow:0 2px 0 #0003;font:700 .875rem/1.2 var(--theme-body)}
.theme-preview-label svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-preview-label>span{margin-left:auto;font-size:1.1rem}
.theme-preview-label svg{margin-right:auto}
.theme-card-preview:hover .theme-preview-label{outline:2px solid var(--theme-accent);outline-offset:2px}
