:root{color-scheme:light;--paper:#faf9f6;--white:#fff;--ink:#37323b;--quiet:#78717c;--border:#ded9df;--border-strong:#c7c0c9;--plum:#72576c;--focus:#90778b;--mint:#b3e2cd;--peach:#fdcdac;--blue:#cbd5e8;--pink:#f4cae4}
*{box-sizing:border-box}html{font-family:'Rubik',system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--paper);-webkit-tap-highlight-color:transparent}body{margin:0;min-height:100svh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.page{width:min(100% - 36px,686px);margin:0 auto;padding:25px 0 35px;min-height:100svh;display:flex;flex-direction:column}.site-top{display:flex;justify-content:space-between;align-items:center;min-height:56px;border-bottom:1px solid var(--border);padding:0 0 17px}.brand{display:flex;align-items:center;gap:12px;font-size:clamp(1.3rem,3vw,1.65rem);font-weight:700;letter-spacing:-.045em}.brand-mark{display:grid;grid-template-columns:repeat(2,9px);gap:3px;transform:rotate(-10deg)}.brand-mark span{width:9px;height:9px;border:1px solid #776a7c}.brand-mark span:nth-child(1){background:var(--mint)}.brand-mark span:nth-child(2){background:var(--peach)}.brand-mark span:nth-child(3){background:var(--blue)}.brand-mark span:nth-child(4){background:var(--pink)}.test-tag{font-size:.69rem;color:var(--quiet);border:1px solid var(--border);padding:5px 8px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;border-radius:2px}
.home-list{display:grid;gap:12px;margin-top:clamp(25px,7vw,49px)}.game-link{display:flex;align-items:center;gap:17px;padding:15px 16px;background:var(--white);border:1px solid var(--border);border-radius:3px;transition:border-color .12s ease,background .12s ease;min-height:100px}.game-link:hover,.game-link:focus-visible{border-color:#8e718e;background:#fffefe}.game-symbol{width:61px;height:61px;flex:0 0 61px;border:1px solid rgba(55,50,59,.18);border-radius:2px;display:grid;place-items:center;background:var(--mint)}.game-symbol svg{width:47px;height:47px;overflow:visible}.g-alpha .game-symbol{background:#eee5ef}.g-color .game-symbol{background:#f8f3f6}.g-magnet5 .game-symbol{background:#dce9e8}.g-magnet6 .game-symbol{background:#e7e8f4}.game-copy{flex:1;min-width:0}.game-title{font-weight:650;font-size:clamp(1.02rem,4vw,1.18rem);letter-spacing:-.026em;line-height:1.3}.game-description{font-size:.81rem;color:var(--quiet);margin-top:4px;line-height:1.4}.completed-stars{font-size:1.55rem;line-height:1;color:#bc8cba;white-space:nowrap;letter-spacing:-.19em;transform:rotate(-8deg);min-width:34px;text-align:right}.completed-stars[hidden]{display:none}
.footer{margin-top:auto;padding-top:46px;display:grid;justify-items:center;gap:13px}.footer::before{content:'';height:1px;width:100%;background:var(--border);margin-bottom:12px}.footer-link{border:0;background:transparent;color:var(--plum);font-size:.86rem;font-weight:600;padding:3px 12px}.footer-link:hover{text-decoration:underline}.support{color:var(--quiet);font-size:.76rem;text-align:center}.support-link{font-weight:500;color:var(--plum)}.support-placeholder{color:#8f8990}
.game-heading{font-size:clamp(1.17rem,4vw,1.55rem);font-weight:650;letter-spacing:-.045em;line-height:1.18;max-width:100%;margin:0}.icon-strip{display:flex;align-items:center;gap:7px}.icon-btn{display:grid;place-items:center;width:41px;height:41px;border:1px solid transparent;border-radius:2px;background:transparent;color:var(--ink);padding:7px}.icon-btn:hover,.icon-btn[aria-expanded=true]{background:#f0edf0;border-color:var(--border)}.icon-btn svg{display:block;width:22px;height:22px;stroke-width:1.8}.icon-btn.close{margin-left:2px}.game-area{width:100%;flex:1;padding:12px 0 0}.game-meta{display:flex;justify-content:space-between;align-items:center;gap:14px;min-height:32px;margin:2px 0 12px}.puzzle-counter{font-size:.74rem;letter-spacing:.02em;font-weight:500;color:var(--quiet)}.clock{font-variant-numeric:tabular-nums;font-size:.82rem;color:var(--plum);display:flex;align-items:center;gap:7px}.clock svg{width:15px;height:15px;stroke-width:2}.game-frame{display:block;width:100%;height:600px;min-height:220px;border:0;overflow:hidden;background:transparent;transition:height .08s ease}.bottom-actions{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;padding:9px 0 15px}.action-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:107px;padding:12px 13px;border:1px solid var(--border-strong);border-radius:3px;color:var(--ink);background:#fff;font-size:.82rem;font-weight:600;min-height:43px}.action-btn:hover:not(:disabled){background:#f4f1f4;border-color:#8d7891}.action-btn svg{width:17px;height:17px;stroke-width:2}.action-btn.test-next{border-color:var(--plum);background:var(--plum);color:#fff}.action-btn.test-next:hover{background:#60465a}
.help-wrap{position:relative}.help-menu{position:absolute;right:0;top:44px;z-index:20;background:#fff;border:1px solid var(--border-strong);width:210px;padding:5px;border-radius:3px;box-shadow:0 9px 20px rgba(30,20,30,.08)}.help-menu[hidden]{display:none}.menu-action{border:0;background:white;display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:13px 10px;font-size:.85rem;color:var(--ink);border-radius:2px}.menu-action:hover{background:#f6f2f5}.menu-action svg{width:18px;height:18px}.menu-action:disabled{opacity:.55}.solution-ribbon{background:#f0eaf0;border:1px solid #d3c4d6;padding:13px;display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px;font-size:.85rem}.solution-ribbon[hidden]{display:none}.small-btn{border:1px solid #b9a6bd;background:#fff;color:#49354e;border-radius:2px;padding:9px 11px;font-size:.75rem;font-weight:600;white-space:nowrap}
.modal{border:1px solid #bfb4c0;border-radius:3px;width:min(100% - 32px,510px);max-height:min(82vh,750px);padding:0;background:#fff;color:var(--ink);box-shadow:0 16px 60px rgba(20,12,23,.15)}.modal::backdrop{background:rgba(32,25,35,.42)}.modal-inner{padding:27px 27px 25px}.modal-heading{font-size:1.4rem;letter-spacing:-.035em;font-weight:650;margin:0 0 16px}.modal-body{line-height:1.6;font-size:.89rem}.modal-body p{margin:0 0 12px}.modal-body ol{padding-left:23px}.modal-body li{margin:9px 0}.modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:23px}.primary-btn,.secondary-btn{border-radius:2px;font-size:.84rem;font-weight:600;min-height:42px;padding:10px 17px}.primary-btn{color:#fff;border:1px solid var(--plum);background:var(--plum)}.primary-btn:hover{background:#60465a}.secondary-btn{background:#fff;border:1px solid var(--border-strong);color:var(--ink)}.secondary-btn:hover{background:#f8f4f7}.form-field{display:grid;gap:7px;margin:12px 0}.form-field label{font-size:.79rem;font-weight:600}.form-field textarea,.form-field input,.form-field select{min-height:41px;border:1px solid var(--border-strong);padding:10px 11px;border-radius:2px;width:100%;background:#fff;color:var(--ink)}.form-field textarea{min-height:120px;resize:vertical}.honeypot{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.win-fx{position:fixed;inset:0;pointer-events:none;z-index:50;display:grid;place-items:center}.win-fx[hidden]{display:none}.win-time{z-index:2;background:rgba(250,249,246,.94);border:1px solid var(--border);padding:13px 25px;border-radius:3px;font-size:clamp(2rem,8vw,3.5rem);font-weight:700;color:var(--plum);font-variant-numeric:tabular-nums;letter-spacing:-.06em;animation:win-in .45s ease both}.fx-spark{position:absolute;font-size:23px;left:var(--left);top:var(--top);color:var(--c);animation:burst 2.2s ease-out both;animation-delay:var(--delay)}@keyframes burst{0%{opacity:0;transform:scale(.2) rotate(-25deg)}20%{opacity:1;transform:scale(1.5) rotate(7deg)}75%{opacity:.9;transform:translate(var(--dx),var(--dy)) scale(1.1) rotate(70deg)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.4) rotate(120deg)}}@keyframes win-in{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-width:520px){.page{width:min(100% - 26px,686px);padding-top:15px}.site-top{padding-bottom:11px}.game-link{min-height:91px;padding:11px 12px;gap:12px}.game-symbol{width:54px;height:54px;flex-basis:54px}.game-symbol svg{width:42px;height:42px}.game-description{font-size:.75rem}.icon-strip{gap:0}.icon-btn{width:40px}.game-area{padding-top:8px}.bottom-actions{gap:6px}.action-btn{min-width:95px;padding:11px 9px;font-size:.78rem}.modal-inner{padding:20px}.solution-ribbon{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}}

.theme-line{margin:6px 0 11px;display:flex;align-items:baseline;justify-content:space-between;gap:8px}.theme-line[hidden]{display:none}.theme-line strong{font-size:1.12rem;font-weight:650;letter-spacing:-.025em}.theme-line span{font-size:.76rem;color:#817888;white-space:nowrap}@media(max-width:440px){.theme-line{align-items:flex-start;flex-direction:column;gap:2px}}

/* Revision: concise puzzle listings and stable embedded game sizing. */
.game-link{min-height:83px;gap:15px;padding:12px 14px}
.game-copy{display:flex;align-items:center;min-height:54px}
.game-description{display:none!important}
.game-frame{transition:none;height:660px}
/* Theme follows the device and keeps the game accents intact. */
:root[data-theme="dark"]{color-scheme:dark;--paper:#1c1b20;--white:#28262d;--ink:#f1edf2;--quiet:#b8afb9;--border:#48424d;--border-strong:#726879;--plum:#b9a4b3;--focus:#cbb4c3}html[data-theme="dark"],[data-theme="dark"] body{background:var(--paper);color:var(--ink)}[data-theme="dark"] .game-link{background:#29262d;border-color:#514952}[data-theme="dark"] .game-link:hover,[data-theme="dark"] .game-link:focus-visible{background:#332d36;border-color:#b18ab5}[data-theme="dark"] .game-symbol{border-color:#736b75}[data-theme="dark"] .brand-mark span{border-color:#a49aa5}[data-theme="dark"] .icon-btn{color:var(--ink)}[data-theme="dark"] .icon-btn:hover,[data-theme="dark"] .icon-btn[aria-expanded=true]{background:#363039;border-color:#605664}[data-theme="dark"] .clock{color:#ddc0dd}[data-theme="dark"] .action-btn{background:#302c33;border-color:#706775;color:var(--ink)}[data-theme="dark"] .action-btn:hover:not(:disabled){background:#433c47;border-color:#ba91bf}[data-theme="dark"] .action-btn.test-next,[data-theme="dark"] .primary-btn{background:#755b70;color:#fff;border-color:#a68b9e}[data-theme="dark"] .action-btn.test-next:hover,[data-theme="dark"] .primary-btn:hover{background:#82677c}[data-theme="dark"] .help-menu,[data-theme="dark"] .menu-action,[data-theme="dark"] .modal{background:#29262e;color:var(--ink);border-color:var(--border-strong)}[data-theme="dark"] .menu-action:hover{background:#3b3540}[data-theme="dark"] .secondary-btn,[data-theme="dark"] .small-btn{background:#302c33;color:var(--ink);border-color:var(--border-strong)}[data-theme="dark"] .secondary-btn:hover{background:#403742}[data-theme="dark"] .modal-body,[data-theme="dark"] .modal-body p,[data-theme="dark"] .modal-body li{color:var(--ink)}[data-theme="dark"] .form-field textarea,[data-theme="dark"] .form-field input,[data-theme="dark"] .form-field select{background:#302c33;color:var(--ink);border-color:var(--border-strong)}[data-theme="dark"] .solution-ribbon{background:#39303e;border-color:#6a5a72;color:var(--ink)}[data-theme="dark"] .footer-link,[data-theme="dark"] .support-link{color:#dcb9df}[data-theme="dark"] .support-placeholder,[data-theme="dark"] .support{color:#b8afb9}[data-theme="dark"] .win-time{background:#29262eea;border-color:#736978;color:#f3d5f0}[data-theme="dark"] .theme-line span{color:#bcb1c3}

@media(max-width:520px){.game-link{min-height:77px;padding:11px 12px}.game-copy{min-height:51px}}

/* Sunflower Games identity */
.site-logo{display:block;width:44px;height:44px;object-fit:contain;flex:none}
.brand{gap:10px}.site-top{padding-bottom:12px}
.game-symbol svg{width:53px;height:53px}.g-alpha .game-symbol{background:#f5edf5}
.fx-sunflower{position:absolute;pointer-events:none;width:clamp(17px,4vw,37px);height:auto;left:var(--left);top:var(--top);opacity:0;animation:sunflower-burst 2.35s ease-out both;animation-delay:var(--delay)}
@keyframes sunflower-burst{0%{opacity:0;transform:scale(.3) rotate(0deg)}25%{opacity:.82;transform:scale(1.05) rotate(12deg)}75%{opacity:.73;transform:translate(var(--dx),var(--dy)) scale(1) rotate(var(--rot))}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.6) rotate(var(--rot))}}
.site-shift[hidden]{display:none}
.is-alpha .site-shift{display:inline-flex}
.is-alpha .bottom-actions{display:grid;grid-template-columns:1fr 1.18fr 1fr;gap:7px;max-width:520px;margin:auto;padding:6px 0 12px}
.is-alpha .bottom-actions .action-btn{min-width:0;min-height:40px;padding:9px 7px}
.is-alpha .bottom-actions .test-next{grid-column:1/-1;justify-self:center;min-width:145px;min-height:34px;padding:7px 12px;font-size:.75rem}
@media(max-width:520px){.site-logo{width:40px;height:40px}.game-symbol svg{width:46px;height:46px}.game-meta{margin-bottom:6px}.theme-line{margin:2px 0 4px}.theme-line strong{font-size:.97rem}.is-alpha .game-area{padding-top:3px}.is-alpha .bottom-actions{padding-top:3px}.site-top{min-height:48px;padding-bottom:7px}.game-heading{font-size:1.2rem}}
[data-theme="dark"] .g-alpha .game-symbol{background:#3c3440}
@media(prefers-reduced-motion:reduce){.fx-sunflower{animation:none!important;opacity:.8}}

/* Keep the theme name, but no duplicate word-count helper text. */
.theme-line #theme-goal{display:none!important}

/* v4: sunflower solved indicator (no star text), serene completion effect. */
.completed-stars{display:block;width:34px;height:34px;min-width:34px;object-fit:contain;opacity:.61;transform:none;filter:none}
.completed-stars[hidden]{display:none}
.fx-spark{animation:gentle-glimmer 4.4s ease-in-out both!important;transform:none!important}
.fx-sunflower{animation:gentle-sunflower 4.4s ease-in-out both!important;transform:none!important}
.win-time{animation:time-fade 1.2s ease-in-out both}
@keyframes gentle-glimmer{0%,100%{opacity:0;transform:translate(calc(var(--dx) * .12),calc(var(--dy) * .12)) scale(.88) rotate(-10deg)}38%,66%{opacity:.86;transform:translate(calc(var(--dx) * .55),calc(var(--dy) * .55)) scale(1) rotate(8deg)}}
@keyframes gentle-sunflower{0%,100%{opacity:0;transform:translate(calc(var(--dx) * .08),calc(var(--dy) * .08)) scale(.86) rotate(calc(var(--rot) * .15))}40%,68%{opacity:.66;transform:translate(calc(var(--dx) * .38),calc(var(--dy) * .38)) scale(1) rotate(calc(var(--rot) * .55))}}
@keyframes time-fade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.fx-spark,.fx-sunflower{animation:none!important;opacity:.75!important}}

/* v7: sparkling rather than drifting or bursting: larger, sparse, stationary stars. */
.fx-spark{
  animation:twinkle-in-place var(--twinkle-duration,3.4s) ease-in-out both!important;
  animation-delay:var(--delay)!important;
  transform-origin:center center;
  line-height:1;
  filter:drop-shadow(0 0 2px rgba(255,255,255,.16));
}
.fx-sunflower{
  animation:flower-in-place var(--twinkle-duration,3.7s) ease-in-out both!important;
  animation-delay:var(--delay)!important;
}
@keyframes twinkle-in-place {
  0%,100%{opacity:0;transform:scale(.87)}
  35%,62%{opacity:.94;transform:scale(1.04)}
}
@keyframes flower-in-place {
  0%,100%{opacity:0;transform:scale(.93)}
  36%,64%{opacity:.65;transform:scale(1)}
}
@media(prefers-reduced-motion:reduce){.fx-spark,.fx-sunflower{animation:none!important;opacity:.8!important}}

/* Alphabet Themed: avoid blank overflow below the test controls. */
.is-alpha .page { padding-bottom: max(4px, env(safe-area-inset-bottom)); }

/* Smallest Magnet choice uses the same neutral icon surface as its siblings. */
.g-magnet4 .game-symbol{background:#dce9e8}
/* Simple, dedicated feedback page. All context fields are hidden. */
.feedback-section{width:min(100%,520px);margin:clamp(28px,6vw,52px) auto 0}
.feedback-form .form-field{margin:0 0 18px}
.feedback-form .form-field textarea{min-height:190px;line-height:1.5}
.feedback-actions{display:flex;justify-content:flex-end;margin-top:22px}
.game-feedback-footer{display:flex;justify-content:center;padding:10px 0 0}
.feedback-success{margin:auto 0;text-align:center;font-size:clamp(1.18rem,4vw,1.5rem);font-weight:500;line-height:1.4}
@media(max-width:520px){.feedback-section{margin-top:25px}.feedback-form .form-field textarea{min-height:170px}}

/* Provisional owner-restoration layout; exact homepage mockup is missing. */
body[data-page="home"] .site-top { border: 0; }
body[data-page="home"] .page { max-width: 520px; padding-bottom: 18px; }
.home-list { gap: 3px; margin-top: 20px; }
.game-link { min-height: 72px; padding: 9px 12px; border: 0; background: transparent; border-radius: 0; }
.game-symbol, .g-alpha .game-symbol, .g-magnet4 .game-symbol, .g-magnet5 .game-symbol, .g-magnet6 .game-symbol { border: 0; background: transparent; }
.game-symbol { width: 54px; height: 54px; flex-basis: 54px; }
.game-symbol svg { width: 48px; height: 48px; }
.game-symbol .approved-game-icon-image{display:block;width:48px;height:48px;max-width:100%;object-fit:contain;image-rendering:auto}
.garden-entry { display: flex; justify-content: center; margin-top: 18px; }
.garden-entry a { display: grid; place-items: center; min-width: 48px; min-height: 48px; }
.footer { padding-top: 16px; gap: 0; }
.footer::before { display: none; }
.prose { line-height: 1.7; margin-top: 24px; }
.calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; margin: 18px 0; }
.calendar button { min-height: 44px; border: 1px solid var(--border); background: transparent; color: var(--ink); position: relative; }
.calendar button[aria-pressed="true"] { border-color: var(--plum); }
.calendar img { width: 18px; height: 18px; vertical-align: middle; }
.calendar-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.calendar-controls button { min-width: 44px; min-height: 44px; color: var(--ink); background: transparent; border: 1px solid var(--border); }
/* Author display rules must not override the shell's public/testing visibility. */
.action-btn[hidden] { display: none !important; }

/* Alphabet Shift: clean sage controls and theme-first mobile presentation.
   Other games retain their existing toolbar and controls. */
.is-alpha .game-meta{display:none!important}
.is-alpha .theme-line{display:block!important;margin:3px auto 10px!important;text-align:center}
.is-alpha .theme-line strong{display:block;font-size:clamp(1.05rem,4vw,1.22rem)!important;
 font-weight:600;letter-spacing:-.025em;color:var(--ink)}
.is-alpha .theme-line[hidden]{display:none!important}
.is-alpha .bottom-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:6px!important;max-width:450px;margin:2px auto!important;padding:5px 0 10px!important}
.is-alpha .bottom-actions #next{grid-column:1/-1;justify-self:center}
.is-alpha .bottom-actions #next[hidden]{display:none!important}
.is-alpha .bottom-actions #restart{display:inline-flex!important}
 .is-alpha .bottom-actions #undo,.is-alpha .bottom-actions #shift,.is-alpha .bottom-actions #restart{
 display:inline-flex!important;background:#f3f1eb!important;border:1px solid #d9d8cf!important;
 color:#30332d!important;font-weight:600}
.is-alpha .bottom-actions .action-btn{min-height:43px!important;min-width:0!important;
 border-radius:3px!important;padding:9px 7px!important;box-shadow:none!important}
.is-alpha .game-area{padding-top:3px}
.is-alpha .help-menu #alpha-restart[hidden]{display:none!important}
@media(max-width:420px){
 .is-alpha .bottom-actions{gap:6px!important}
 .is-alpha .theme-line{margin:2px auto 7px!important}
}
[data-theme="dark"] .is-alpha .bottom-actions #undo,[data-theme="dark"] .is-alpha .bottom-actions #shift,[data-theme="dark"] .is-alpha .bottom-actions #restart{
   background:#353b33!important;color:#e8eade!important;border-color:#646e5d!important}
 

/* Keep the three lower actions on one row on small screens. */
@media(max-width:420px){
 .is-alpha .bottom-actions .action-btn{font-size:.72rem!important;gap:4px!important;padding:8px 4px!important}
 .is-alpha .bottom-actions .action-btn svg{width:19px!important;height:19px!important;flex-shrink:0}
}
@media(max-width:350px){
 .is-alpha .bottom-actions .action-btn{font-size:.71rem!important;gap:0!important}
 .is-alpha .bottom-actions .action-btn svg{width:16px!important;height:16px!important;display:block!important;flex-shrink:0}
}

/* New family only; existing game/home styling stays unchanged. */
.is-wordslide .game-meta{display:none}
.is-wordslide .game-area{padding-top:clamp(8px,2svh,16px)}
@media(max-height:680px){.is-wordslide .game-area{padding-top:6px}}
@media(max-width:520px){.is-wordslide .game-frame{width:min(100%,max(280px,calc(100svh - 360px)));margin-inline:auto}}
.g-wordslide .game-symbol{background:transparent}

/* 4 Nov playtest: Covalent already has a title and variant labels. */
.is-covalent .game-meta{display:none!important}
/* 4 Nov playtest feedback: shared date/Daily label is redundant on these games. */
.is-patchwork .game-meta,.is-magnet4 .game-meta,.is-magnet5 .game-meta,
.is-magnet6 .game-meta,.is-covalent .game-meta{display:none!important}

.solved-message{
 text-align:center;color:var(--ink);font:650 clamp(16px,4.5vw,21px)/1.35 Rubik,system-ui,sans-serif;
 margin:8px auto 0;padding:5px 10px;min-height:28px;
}
.solved-message[hidden]{display:none!important}
/* One real sunflower centered on the viewport; explicit transform overrides
   historical .fx-sunflower{transform:none!important} shell styling. */
.win-fx{position:fixed;inset:0;width:100%;height:100dvh;display:block;overflow:hidden}
.fx-sunflower.main-flower{
 position:absolute!important;left:50%!important;top:50%!important;
 width:clamp(132px,38vw,198px)!important;max-width:52vw!important;height:auto!important;
 transform:translate(-50%,-50%)!important;z-index:1;
 animation:centered-logo-fade 2.9s ease-in-out both!important;
}
.fx-spark{
 position:absolute!important;left:var(--left)!important;top:var(--top)!important;
 transform:translate(-50%,-50%)!important;z-index:2;
 color:var(--c)!important;animation:solid-sparkle-twinkle 2.725s ease-in-out both!important;
 animation-delay:var(--delay)!important;
}
@keyframes centered-logo-fade{0%,100%{opacity:0}18%,77%{opacity:.44}}
@keyframes solid-sparkle-twinkle{
 0%,100%{opacity:0}20%{opacity:.58}38%{opacity:.75}55%{opacity:.92}74%{opacity:.68}
}
@media(prefers-reduced-motion:reduce){
 .fx-sunflower.main-flower{animation:none!important;opacity:.44!important}
 .fx-spark{animation:none!important;opacity:.8!important}
}

/* Keep the persistent completion label from pushing phone controls off-screen. */
@media(max-width:520px){
 .solved-message{margin:3px auto 0;padding:2px 6px;min-height:0;font-size:clamp(14px,4vw,17px);line-height:1.2}
 .is-wordslide .solved-message{margin:0 auto;padding:1px 6px}
}


/* Five-game homepage: owner mockup has one family card per game and small
   real-board variant choices. This does not affect the embedded game shells. */
body[data-page="home"] .page{width:min(100% - 32px,540px)}
body[data-page="home"] .site-top{padding-bottom:9px}
body[data-page="home"] .home-list{display:grid;gap:11px;margin:19px 0 0}
body[data-page="home"] .home-single,
body[data-page="home"] .garden-entry a,
body[data-page="home"] .home-game-group{
  border:1px solid #a59ba5;background:transparent;border-radius:7px;
  color:var(--ink);box-shadow:none
}
body[data-page="home"] .home-single{
  display:flex;min-height:77px;padding:10px 13px;align-items:center;gap:15px
}
/* Keep keyboard focus visible, but do not leave sticky hover shading on touchscreens. */
body[data-page="home"] .home-single:focus-visible,
body[data-page="home"] .home-group-heading:focus-visible{
  background:rgba(126,98,130,.055)
}
@media (hover: hover) and (pointer: fine){
  body[data-page="home"] .home-single:hover,
  body[data-page="home"] .home-group-heading:hover{
    background:rgba(126,98,130,.055)
  }
}
body[data-page="home"] .home-group-heading{
  display:flex;gap:15px;align-items:center;min-height:69px;padding:9px 13px;
  border-radius:2px;color:var(--ink)
}
body[data-page="home"] .home-group-heading .game-symbol,
body[data-page="home"] .home-single .game-symbol{
  display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;
  background:transparent!important;border:0!important
}
body[data-page="home"] .home-group-heading .game-symbol svg,
body[data-page="home"] .home-single .game-symbol svg{width:46px;height:46px}
body[data-page="home"] .home-group-heading .game-title{flex:1;min-width:0}
body[data-page="home"] .home-variants{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;padding:0 12px 12px
}
body[data-page="home"] .g-covalent .home-variants{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-page="home"] .home-variant{
  position:relative;min-width:0;min-height:79px;padding:7px 3px 6px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;background:transparent;border:1px solid #b5adb6;border-radius:3px;
  font-size:.8rem;font-weight:500;color:var(--ink);text-align:center
}
body[data-page="home"] .home-variant:focus-visible{
  border-color:#785f81;background:rgba(126,98,130,.075)
}
@media (hover: hover) and (pointer: fine){
  body[data-page="home"] .home-variant:hover{
    border-color:#785f81;background:rgba(126,98,130,.075)
  }
}
body[data-page="home"] .home-option-icon{width:35px;height:35px;display:grid;place-items:center}
body[data-page="home"] .home-option-icon svg{width:34px;height:34px;overflow:visible}
body[data-page="home"] .home-group-heading .completed-stars,
body[data-page="home"] .home-single .completed-stars{
  width:30px;height:30px;min-width:30px;opacity:.60
}
body[data-page="home"] .home-variant .completed-stars{
  position:absolute;right:3px;top:3px;width:14px;height:14px;min-width:14px;opacity:.67
}
body[data-page="home"] .garden-entry{margin-top:15px}
body[data-page="home"] .garden-entry a{
  padding:0;min-width:78px;min-height:76px;display:grid;place-items:center
}
body[data-page="home"] .garden-entry img{width:78px;height:76px;object-fit:contain}
body[data-page="home"] .footer{padding-top:10px}
body[data-page="home"] .footer-link{font-weight:500}
@media(max-width:420px){
  body[data-page="home"] .page{width:min(100% - 26px,540px)}
  body[data-page="home"] .home-list{gap:9px;margin-top:13px}
  body[data-page="home"] .home-group-heading{min-height:60px;padding:7px 10px}
  body[data-page="home"] .home-single{min-height:69px;padding:7px 10px}
  body[data-page="home"] .home-variants{gap:6px;padding:0 9px 9px}
  body[data-page="home"] .home-variant{min-height:70px;padding:5px 2px;font-size:.74rem}
  body[data-page="home"] .home-option-icon{width:30px;height:30px}
  body[data-page="home"] .home-option-icon svg{width:29px;height:29px}
}
[data-theme="dark"] body[data-page="home"] .home-single,[data-theme="dark"] body[data-page="home"] .garden-entry a,[data-theme="dark"] body[data-page="home"] .home-game-group{
    border-color:#837485;background:transparent
  }
[data-theme="dark"] body[data-page="home"] .home-variant{border-color:#6b606d}
@media (hover: hover) and (pointer: fine){
  [data-theme="dark"] body[data-page="home"] .home-variant:hover{border-color:#bc9cc2}
}


.wordslide-rules{overflow:hidden}
.wordslide-rules .modal-inner{display:flex;flex-direction:column;max-height:min(calc(82vh - 2px),748px)}
.wordslide-rules .modal-heading,.wordslide-rules .modal-actions{flex-shrink:0}
.wordslide-rules .modal-heading:focus{outline:none}
.wordslide-rules .modal-body{overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-inline:4px}
.wordslide-rules .modal-body:focus-visible{outline:2px solid var(--border-strong);outline-offset:-2px}
.wordslide-rules .modal-actions{margin-top:12px}
.wordslide-rules figure{margin:0;padding:0 0 16px;text-align:center}
.wordslide-rules figure+figure{border-top:1px solid var(--border-strong);padding-top:16px}
.wordslide-rules figure:last-child{padding-bottom:4px}
.wordslide-rules img,.wordslide-rules video{display:block;width:100%;height:auto;margin:auto}
.wordslide-rules figcaption{margin-top:8px}


/* Polarity's three scrollable picture-rules: normal 4x4 board framing and
   real magnet colors. Each illustration plays once on entering the viewport. */
.polarity-rules{overflow:hidden}
.polarity-rules .modal-inner{display:flex;flex-direction:column;max-height:min(calc(82vh - 2px),748px)}
.polarity-rules .modal-heading,.polarity-rules .modal-actions{flex-shrink:0}
.polarity-rules .modal-heading:focus{outline:none}
.polarity-rules .modal-body{
  overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
  padding-inline:3px
}
.polarity-rules .modal-body:focus-visible{outline:2px solid var(--border-strong);outline-offset:-2px}
.polarity-rules .modal-actions{margin-top:12px}
.polarity-rules .pt-scene{margin:0;padding:0 0 20px;text-align:center}
.polarity-rules .pt-scene+.pt-scene{border-top:1px solid var(--border);padding-top:18px}
.polarity-rules .pt-scene:last-child{padding-bottom:5px}
.polarity-rules .pt-scene figcaption{
  font-size:.91rem;line-height:1.48;font-weight:500;
  max-width:365px;margin:11px auto 0;color:var(--ink)
}
.pt-illustration{
  width:100%;max-width:365px;margin:0 auto;padding:13px 17px 15px;
  border:1px solid var(--border);border-radius:3px;background:#fbfafb
}
.pt-layout{
  display:grid;grid-template-columns:27px minmax(0,1fr);
  grid-template-rows:26px minmax(0,1fr);gap:4px;
  max-width:312px;margin:0 auto
}
.pt-column-sums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;grid-column:2;grid-row:1}
.pt-row-sums{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));gap:4px;grid-column:1;grid-row:2}
.pt-sum{display:grid;place-items:center;font-size:clamp(.83rem,3.2vw,1rem);
  font-weight:700;line-height:1;color:#45404e;font-variant-numeric:tabular-nums}
.pt-sum.pt-already-met{opacity:.35}
.pt-grid{
  grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(0,1fr));gap:4px;aspect-ratio:1;
  position:relative;isolation:isolate
}
.pt-cell{position:relative;min-width:0;min-height:0;background:#f7f8fa;
  border:1px solid #e7e6eb;border-radius:4px;overflow:hidden}
.pt-face{
  position:absolute;inset:-1px;display:grid;place-items:center;
  border:1px solid transparent;border-radius:4px;font-weight:750;
  font-family:Rubik,system-ui,sans-serif;font-size:clamp(22px,5.9vw,33px);
  line-height:1
}
.pt-positive{background:#f8e7e9;color:#b45b65}
.pt-negative{background:#e7f0f8;color:#527eaa}
.pt-scene .pt-appear,.pt-scene .pt-old,.pt-scene .pt-new{opacity:0}
.pt-pair-outline{position:absolute;z-index:2;left:calc(25% + 1px);top:calc(25% + 1px);
  width:calc(50% - 2px);height:calc(25% - 2px);
  border:1.75px solid #735777;border-radius:4px;pointer-events:none;opacity:0}
.pt-warning{position:absolute;inset:0;width:100%;height:100%;z-index:3;opacity:0;
  pointer-events:none;filter:none}
.pt-scene.pt-play[data-step="1"] .pt-appear,
.pt-scene.pt-play[data-step="3"] .pt-early{
  animation:pt-face-in .42s ease-out .85s both
}
.pt-scene.pt-play[data-step="3"] .pt-late{
  animation:pt-face-in .42s ease-out 2.25s both
}
.pt-scene.pt-play .pt-pair-outline{animation:pt-mark-in .4s ease-out 1.5s both}
.pt-scene.pt-play .pt-old{animation:pt-wrong-face 4.7s linear both}
.pt-scene.pt-play .pt-new{animation:pt-fixed-face 4.7s linear both}
.pt-scene.pt-play .pt-warning{animation:pt-clash-mark 4.7s linear both}
.pt-scene.pt-play[data-step="3"] .pt-row-clue.pt-sum-to-meet{
  animation:pt-clue-fade .55s ease-out 1.45s both
}
.pt-scene.pt-play[data-step="3"] .pt-col-clue.pt-sum-to-meet{
  animation:pt-clue-fade .55s ease-out 2.90s both
}
@keyframes pt-face-in{
  from{opacity:0;transform:scale(.67)}
  to{opacity:1;transform:scale(1)}
}
@keyframes pt-mark-in{from{opacity:0}to{opacity:1}}
@keyframes pt-clue-fade{from{opacity:1}to{opacity:.35}}
@keyframes pt-wrong-face{
  0%,12%{opacity:0}21%,61%{opacity:1}70%,100%{opacity:0}
}
@keyframes pt-fixed-face{
  0%,68%{opacity:0}77%,100%{opacity:1}
}
@keyframes pt-clash-mark{
  0%,12%{opacity:0}21%,61%{opacity:1}70%,100%{opacity:0}
}
.pt-scene.pt-reduced .pt-appear,.pt-scene.pt-reduced .pt-pair-outline{opacity:1}
.pt-scene.pt-reduced[data-step="2"] .pt-old,
.pt-scene.pt-reduced[data-step="2"] .pt-warning{opacity:1}
.pt-scene.pt-reduced[data-step="2"] .pt-new{opacity:0}
.pt-scene.pt-reduced[data-step="3"] .pt-sum-to-meet{opacity:.35}
@media(max-width:420px){
 .pt-illustration{padding:10px 10px 12px}
 .pt-layout{grid-template-columns:24px minmax(0,1fr);grid-template-rows:23px minmax(0,1fr);gap:3px}
 .pt-grid,.pt-column-sums,.pt-row-sums{gap:3px}
 .polarity-rules .pt-scene figcaption{font-size:.86rem}
}
[data-theme="dark"] .pt-illustration{background:#302c34}[data-theme="dark"] .pt-cell{background:#37343b;border-color:#625b67}[data-theme="dark"] .pt-positive{background:#523942;color:#efadb6}[data-theme="dark"] .pt-negative{background:#324455;color:#b2d1f0}[data-theme="dark"] .pt-sum{color:#ece6ef}

@media(prefers-reduced-motion:reduce){
 .polarity-rules .pt-scene *, .polarity-rules .pt-scene *::before,
 .polarity-rules .pt-scene *::after{animation:none!important;transition:none!important}
}


/* Patchwork: two real-color boards, vertically scrollable; no replay control.
   Green pin counts independently colored pieces, not underlying cells. */
.patchwork-rules{overflow:hidden}
.patchwork-rules .modal-inner{display:flex;flex-direction:column;max-height:min(calc(82vh - 2px),748px)}
.patchwork-rules .modal-heading,.patchwork-rules .modal-actions{flex-shrink:0}
.patchwork-rules .modal-heading:focus{outline:none}
.patchwork-rules .modal-body{
  overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
  padding-inline:4px
}
.patchwork-rules .modal-body:focus-visible{
  outline:2px solid var(--border-strong);outline-offset:-2px
}
.patchwork-rules .modal-actions{margin-top:12px}
.patchwork-rules .pwt-scene{margin:0;padding:0 0 18px;text-align:center}
.patchwork-rules .pwt-scene+.pwt-scene{
  border-top:1px solid var(--border);padding-top:18px
}
.patchwork-rules .pwt-scene:last-child{padding-bottom:4px}
.patchwork-rules .pwt-scene figcaption{
  color:var(--ink);font-weight:500;font-size:.9rem;line-height:1.52;
  max-width:376px;margin:10px auto 0
}
.pwt-artboard{
  --pwt-blank:#faf9f6;background:var(--pwt-blank);border:1px solid var(--border);border-radius:3px;
  width:100%;max-width:372px;margin:0 auto;padding:8px 16px
}
.pwt-board{display:block;width:100%;max-width:320px;height:auto;margin:auto}
.pwt-inline-pin{
  width:24px;height:24px;display:inline-grid;vertical-align:middle;place-items:center;
  background:#b3e2cd;border:1.4px solid #716a75;border-radius:50%;
  color:#342e37;font:700 14px Rubik,system-ui,sans-serif;
  margin:0 3px;line-height:1
}
.pwt-tap{opacity:0;pointer-events:none;transform-box:fill-box;transform-origin:center}
.pwt-scene.pwt-play[data-step="1"] .pwt-cycle-tile{
  animation:pwt-color-cycle 5.35s steps(1,end) .45s both
}
.pwt-scene.pwt-play[data-step="1"] .pwt-tap{
  animation:pwt-five-taps 5.35s ease-in-out .45s both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-fill-tile{
  animation:pwt-fill-green .4s ease-out 1.35s both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-tap{
  animation:pwt-single-tap .5s ease-in-out 1.15s both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-pin{
  animation:pwt-pin-complete .5s ease-out 2.05s both
}
@keyframes pwt-color-cycle{
   0%,16%{fill:var(--pwt-blank)}
   17%,33%{fill:#b3e2cd}
   34%,50%{fill:#fdcdac}
   51%,67%{fill:#cbd5e8}
   68%,100%{fill:#f4cae4}
}
@keyframes pwt-five-taps{
   0%,11%,20%,28%,37%,45%,54%,62%,71%,100%{opacity:0;transform:scale(.65)}
   13%,30%,47%,64%,74%{opacity:.88;transform:scale(1.25)}
}
@keyframes pwt-fill-green{
  from{fill:var(--pwt-blank)}
  to{fill:#b3e2cd}
}
@keyframes pwt-single-tap{
  0%,100%{opacity:0;transform:scale(.65)}
  45%{opacity:.9;transform:scale(1.25)}
}
@keyframes pwt-pin-complete{from{opacity:1}to{opacity:.55}}
.pwt-scene.pwt-reduced[data-step="1"] .pwt-cycle-tile{fill:#f4cae4}
.pwt-scene.pwt-reduced[data-step="2"] .pwt-fill-tile{fill:#b3e2cd}
.pwt-scene.pwt-reduced[data-step="2"] .pwt-pin{opacity:.55}
@media(max-width:420px){
 .pwt-artboard{padding:6px 9px}
 .patchwork-rules .pwt-scene figcaption{font-size:.85rem}
 .pwt-inline-pin{width:22px;height:22px;font-size:13px}
}
[data-theme="dark"] .pwt-artboard{--pwt-blank:#302e36}[data-theme="dark"] .pwt-tile[fill="#faf9f6"]{fill:var(--pwt-blank)}[data-theme="dark"] .pwt-scene.pwt-reduced[data-step="2"] .pwt-fill-tile{fill:#b3e2cd}[data-theme="dark"] .pwt-scene.pwt-reduced[data-step="1"] .pwt-cycle-tile{fill:#f4cae4}

@media(prefers-reduced-motion:reduce){
 .patchwork-rules .pwt-scene *, .patchwork-rules .pwt-scene *::before,
 .patchwork-rules .pwt-scene *::after{animation:none!important;transition:none!important}
}


/* Covalent's first-play picture rules are true-radii SVG examples, not daily boards. */
.covalent-rules{overflow:hidden}
.covalent-rules .modal-inner{
  display:flex;flex-direction:column;max-height:min(calc(82vh - 2px),748px)
}
.covalent-rules .modal-heading,.covalent-rules .modal-actions{flex-shrink:0}
.covalent-rules .modal-heading:focus{outline:none}
.covalent-rules .modal-body{
  overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-inline:4px
}
.covalent-rules .modal-body:focus-visible{
  outline:2px solid var(--border-strong);outline-offset:-2px
}
.covalent-rules .modal-actions{margin-top:12px}
.covalent-rules .cvt-scene{margin:0;padding:0 0 18px;text-align:center}
.covalent-rules .cvt-scene+.cvt-scene{
  border-top:1px solid var(--border);padding-top:18px
}
.covalent-rules .cvt-scene:last-child{padding-bottom:4px}
.covalent-rules .cvt-scene figcaption{
  font-size:.9rem;line-height:1.52;color:var(--ink);font-weight:500;
  max-width:375px;margin:10px auto 0
}
.cvt-illustration{
  --cvt-background:#faf9f6;--cvt-surface:#fff;--cvt-line:#d6d1d7;
  --cvt-grid:#dad6dc;--cvt-text:#292832;
  background:var(--cvt-background);border:1px solid var(--border);
  border-radius:3px;width:100%;max-width:372px;margin:0 auto;padding:8px 16px
}
.cvt-board{display:block;width:100%;height:auto;max-width:320px;margin:0 auto}
.cvt-board-fill{fill:var(--cvt-surface);stroke:var(--cvt-line);stroke-width:1.5}
.cvt-grid{stroke:var(--cvt-grid);stroke-width:1;fill:none}
.cvt-arc{fill:none;stroke-width:3;stroke-linecap:round}
.cvt-arc-draw{stroke-dasharray:100;stroke-dashoffset:100}
.cvt-dashed-arc{stroke-dasharray:8 7;opacity:0}
.cvt-center{
  fill:var(--cvt-background);stroke:#77727c;stroke-width:2
}
.cvt-center-used{fill:var(--cvt-point-color);stroke:var(--cvt-point-color)}
.cvt-center-emerging{fill:var(--cvt-background);stroke:#77727c}
.cvt-node{fill:var(--cvt-surface);stroke:var(--cvt-line);stroke-width:1.3}
.cvt-clue-label{
  font:700 17px Rubik,system-ui,sans-serif;fill:var(--cvt-text);
  text-anchor:middle;dominant-baseline:central
}
.cvt-clue-met .cvt-clue-label{opacity:.45}
.cvt-counter{
  font:600 14px Rubik,system-ui,sans-serif;fill:var(--cvt-text)
}
.cvt-counter-new{opacity:0}
.cvt-scene.cvt-play .cvt-arc-draw{
  animation:cvt-arc-draw 1.2s ease-out .7s both
}
.cvt-scene.cvt-play .cvt-center-emerging{
  animation:cvt-center-activate .36s ease-out .55s both
}
.cvt-scene.cvt-play[data-step="1"] .cvt-counter-old{animation:cvt-counter-out .25s ease-out 1.6s both}
.cvt-scene.cvt-play[data-step="1"] .cvt-counter-new{animation:cvt-counter-in .3s ease-out 1.6s both}
.cvt-scene.cvt-play[data-step="2"] .cvt-clue-fade .cvt-clue-label{
  animation:cvt-clue-met .45s ease-out 2s both
}
.cvt-scene.cvt-play[data-step="2"] .cvt-counter-old{
  animation:cvt-counter-out .25s ease-out 2s both
}
.cvt-scene.cvt-play[data-step="2"] .cvt-counter-new{
  animation:cvt-counter-in .3s ease-out 2s both
}
.cvt-scene.cvt-play[data-step="3"] .cvt-dashed-arc{
  animation:cvt-arc-dashed-in .6s ease-out .85s both
}
.cvt-scene.cvt-play[data-step="3"] .cvt-center-emerging{
  animation:cvt-center-activate .35s ease-out .8s both
}
.cvt-scene.cvt-play[data-step="3"] .cvt-counter-old{
  animation:cvt-counter-out .25s ease-out 1.6s both
}
.cvt-scene.cvt-play[data-step="3"] .cvt-counter-new{
  animation:cvt-counter-in .3s ease-out 1.6s both
}
@keyframes cvt-arc-draw{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes cvt-center-activate{
  from{fill:var(--cvt-background);stroke:#77727c}
  to{fill:var(--cvt-point-color);stroke:var(--cvt-point-color)}
}
@keyframes cvt-clue-met{from{opacity:1}to{opacity:.45}}
@keyframes cvt-counter-out{from{opacity:1}to{opacity:0}}
@keyframes cvt-counter-in{from{opacity:0}to{opacity:1}}
@keyframes cvt-arc-dashed-in{from{opacity:0}to{opacity:1}}
.cvt-scene.cvt-reduced .cvt-arc-draw{stroke-dashoffset:0}
.cvt-scene.cvt-reduced .cvt-dashed-arc{opacity:1}
.cvt-scene.cvt-reduced .cvt-center-emerging{
  fill:var(--cvt-point-color);stroke:var(--cvt-point-color)
}
.cvt-scene.cvt-reduced[data-step="2"] .cvt-clue-fade .cvt-clue-label{opacity:.45}
.cvt-scene.cvt-reduced .cvt-counter-old{opacity:0}
.cvt-scene.cvt-reduced .cvt-counter-new{opacity:1}
@media(max-width:420px){
  .cvt-illustration{padding:6px 9px}
  .covalent-rules .cvt-scene figcaption{font-size:.85rem}
}
[data-theme="dark"] .cvt-illustration{
    --cvt-background:#1e1c21;--cvt-surface:#242127;
    --cvt-line:#504954;--cvt-grid:#47434c;--cvt-text:#f5f1f6
  }

@media(prefers-reduced-motion:reduce){
  .covalent-rules .cvt-scene *, .covalent-rules .cvt-scene *::before,
  .covalent-rules .cvt-scene *::after{
    animation:none!important;transition:none!important
  }
}


/* Tutorial review corrections: the x replaces the obsolete purple Play button. */
#rules-dialog .modal-inner{position:relative}
#rules-dialog .modal-heading{padding-right:48px}
#rules-dialog #rules-close{
 position:absolute;right:10px;top:9px;z-index:3;
 width:42px;height:42px;display:grid;place-items:center;
 padding:8px;min-width:42px;min-height:42px;border:1px solid transparent;
 border-radius:2px;background:transparent;color:var(--ink)
}
#rules-dialog #rules-close svg{display:block;width:22px;height:22px}
#rules-dialog #rules-close:hover{
 background:color-mix(in srgb,var(--ink) 8%,transparent);border-color:var(--border)
}
#rules-dialog #rules-close:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}
@media(max-width:520px){
 #rules-dialog #rules-close{right:6px;top:5px}
}
/* Polarity: every frame has the real clue strips; repeat the explanations
   with readable holds instead of stopping once. */
.pt-scene.pt-play[data-step="1"] .pt-appear,
.pt-scene.pt-play[data-step="3"] .pt-early{
 animation:pt-loop-appear 6.5s ease-out 0s infinite both
}
.pt-scene.pt-play[data-step="3"] .pt-late{
 animation:pt-loop-late 6.5s ease-out 0s infinite both
}
.pt-scene.pt-play .pt-pair-outline{animation:pt-loop-outline 6.5s ease-out infinite both}
.pt-scene.pt-play .pt-old,.pt-scene.pt-play .pt-new,.pt-scene.pt-play .pt-warning{
 animation-duration:6.5s;animation-iteration-count:infinite
}
.pt-scene.pt-play[data-step="3"] .pt-row-clue.pt-sum-to-meet{
 animation:pt-loop-row-clue 6.5s linear infinite both
}
.pt-scene.pt-play[data-step="3"] .pt-col-clue.pt-sum-to-meet{
 animation:pt-loop-col-clue 6.5s linear infinite both
}
@keyframes pt-loop-appear{
 0%,8%,100%{opacity:0;transform:scale(.8)}
 18%,88%{opacity:1;transform:scale(1)}
 96%{opacity:0;transform:scale(1)}
}
@keyframes pt-loop-late{
 0%,40%,100%{opacity:0;transform:scale(.8)}
 51%,88%{opacity:1;transform:scale(1)}
 96%{opacity:0;transform:scale(1)}
}
@keyframes pt-loop-outline{0%,20%,100%{opacity:0}27%,88%{opacity:1}96%{opacity:0}}
@keyframes pt-loop-row-clue{0%,58%,100%{opacity:1}65%,88%{opacity:.35}95%{opacity:1}}
@keyframes pt-loop-col-clue{0%,55%,100%{opacity:1}62%,88%{opacity:.35}95%{opacity:1}}
/* Patchwork uses actual 6x6 grouped pieces, not 25 separate rectangles.
   Both examples show all seven real numbered pins. */
.pwt-artboard{--pwt-blank:#faf9f6}
.pwt-board .pwt-piece{
 stroke:#716a75;stroke-width:1.1;stroke-linejoin:round;
 vector-effect:non-scaling-stroke
}
.pwt-board .pwt-fixed{fill:#a5a5a9}
.pwt-board .pwt-real-pin text{
 font:700 15px Rubik,system-ui,sans-serif;fill:#342e37;
 text-anchor:middle;dominant-baseline:central
}
.pwt-board .pwt-met-pin{opacity:.55}
.pwt-scene.pwt-play[data-step="1"] .pwt-cycle-piece{
 animation:pwt-loop-colors 7s steps(1,end) infinite both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-complete-piece{
 animation:pwt-loop-mint 6s ease-out infinite both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-highlight-pin{
 animation:pwt-loop-pin 6s ease-out infinite both
}
.pwt-scene.pwt-play[data-step="1"] .pwt-tap{
 animation:pwt-loop-taps 7s ease-in-out infinite both
}
.pwt-scene.pwt-play[data-step="2"] .pwt-tap{
 animation:pwt-loop-tap 6s ease-in-out infinite both
}
@keyframes pwt-loop-colors{
 0%,12%,100%{fill:var(--pwt-blank)}
 18%,34%{fill:#b3e2cd}
 38%,51%{fill:#fdcdac}
 56%,69%{fill:#cbd5e8}
 74%,89%{fill:#f4cae4}
 94%{fill:var(--pwt-blank)}
}
@keyframes pwt-loop-mint{
 0%,19%,100%{fill:var(--pwt-blank)}
 27%,89%{fill:#b3e2cd}
 98%{fill:var(--pwt-blank)}
}
@keyframes pwt-loop-pin{
 0%,31%,100%{opacity:1}
 40%,89%{opacity:.55}
 98%{opacity:1}
}
@keyframes pwt-loop-taps{
 0%,14%,25%,35%,47%,57%,70%,80%,92%,100%{opacity:0;transform:scale(.72)}
 17%,38%,60%,83%{opacity:.85;transform:scale(1.25)}
}
@keyframes pwt-loop-tap{
 0%,12%,36%,100%{opacity:0;transform:scale(.7)}
 22%{opacity:.9;transform:scale(1.3)}
}
.pwt-scene.pwt-reduced[data-step="1"] .pwt-cycle-piece{fill:#b3e2cd}
.pwt-scene.pwt-reduced[data-step="2"] .pwt-complete-piece{fill:#b3e2cd}
.pwt-scene.pwt-reduced[data-step="2"] .pwt-highlight-pin{opacity:.55}
[data-theme="dark"] .pwt-artboard{--pwt-blank:#302e36}
/* Covalent: a circle grows in radius *from its perimeter center*; unlike
   stroke-dash animations, the arc does not trace around a finished curve. */
.cvt-real-arc{fill:none;stroke-linecap:round}
.cvt-grow-arc{r:0px}
.cvt-scene.cvt-play .cvt-grow-arc{
 animation:cvt-radius-expand 6.5s ease-in-out infinite both
}
.cvt-real-center{fill:var(--cvt-background);stroke:#77727c;stroke-width:2}
.cvt-real-center.cvt-real-used{
 fill:var(--cvt-center-color);stroke:var(--cvt-center-color)
}
.cvt-scene.cvt-play .cvt-new-center{
 animation:cvt-center-loop 6.5s ease-in-out infinite both
}
.cvt-real-node circle{
 fill:var(--cvt-surface);stroke:var(--cvt-line);stroke-width:1.3
}
.cvt-real-node text{
 font:700 17px Rubik,system-ui,sans-serif;fill:var(--cvt-text);
 text-anchor:middle;dominant-baseline:central
}
.cvt-real-node.cvt-satisfied:not(.cvt-node-fading) text{opacity:.45}
.cvt-scene.cvt-play .cvt-node-fading text{
 animation:cvt-node-loop 6.5s ease-out infinite both
}
.cvt-scene.cvt-play .cvt-counter-old{
 animation:cvt-counter-old-loop 6.5s linear infinite both
}
.cvt-scene.cvt-play .cvt-counter-new{
 animation:cvt-counter-new-loop 6.5s linear infinite both
}
/* Expand from the center, hold, then vanish while still at full radius.
   Reset to radius 0 only while invisible at the next cycle's start. */
@keyframes cvt-radius-expand{
 0%{r:0px;opacity:0}
 1%,10%{r:0px;opacity:1}
 35%,88%{r:var(--cvt-radius);opacity:1}
 89%,100%{r:var(--cvt-radius);opacity:0}
}
@keyframes cvt-center-loop{
 0%,10%,100%{fill:var(--cvt-background);stroke:#77727c}
 24%,87%{fill:var(--cvt-center-color);stroke:var(--cvt-center-color)}
 96%{fill:var(--cvt-background);stroke:#77727c}
}
@keyframes cvt-node-loop{
 0%,39%,100%{opacity:1}
 48%,87%{opacity:.45}
 96%{opacity:1}
}
@keyframes cvt-counter-old-loop{
 0%,39%,100%{opacity:1}
 48%,87%{opacity:0}
 96%{opacity:1}
}
@keyframes cvt-counter-new-loop{
 0%,39%,100%{opacity:0}
 48%,87%{opacity:1}
 96%{opacity:0}
}
.cvt-scene.cvt-reduced .cvt-grow-arc{r:var(--cvt-radius)}
.cvt-scene.cvt-reduced .cvt-new-center{
 fill:var(--cvt-center-color);stroke:var(--cvt-center-color)
}
.cvt-scene.cvt-reduced .cvt-node-fading text{opacity:.45}
.cvt-scene.cvt-reduced .cvt-counter-old{opacity:0}
.cvt-scene.cvt-reduced .cvt-counter-new{opacity:1}

/* Word Slide board -> slide -> board: separate visual phases without
   looping the MP4 directly, so both stills receive a deliberate hold. */
.ws-slide-demonstration{position:relative;width:100%;max-width:390px;margin:0 auto}
.wordslide-rules .ws-slide-demonstration>[hidden]{display:none!important}
.ws-slide-demonstration img,.ws-slide-demonstration video{
  display:block;width:100%;height:auto;aspect-ratio:390 / 332;margin:0 auto
}


/* Review pass: real 4×4 Polarity bank puzzle, gentle fixed-pole key. */
.polarity-rules .pt-cell.pt-given{
 background:#f3eaf0;
 box-shadow:none;
}
.polarity-rules .pt-cell.pt-given .pt-face{background:#f3eaf0}
[data-theme="dark"] .polarity-rules .pt-cell.pt-given,
[data-theme="dark"] .polarity-rules .pt-cell.pt-given .pt-face{background:#514451}
.polarity-rules .pt-fixed-note,
.patchwork-rules .pwt-fixed-note{
 display:inline;margin:0;font:inherit;line-height:inherit;
 font-weight:inherit;color:inherit
}
/* The first magnet joins the real given pole at row 2, column 3
   to the placed negative pole at row 3, column 3. */
.polarity-rules .pt-pair-outline.pt-vertical-outline{
 left:calc(50% + 1px);top:calc(25% + 1px);
 width:calc(25% - 2px);height:calc(50% - 2px);
}
.pt-scene.pt-play[data-step="3"] .pt-sum.pt-early-met{
 animation:pt-loop-early-clue 6.5s linear infinite both;
}
@keyframes pt-loop-early-clue{
 0%,25%,100%{opacity:1}
 34%,88%{opacity:.35}
 95%{opacity:1}
}
.pt-scene.pt-reduced .pt-sum-to-meet,
.pt-scene.pt-reduced .pt-early-met{opacity:.35}

/* Enlarged site-wide celebration: the real sunflower stays central while
   the sparse filled sparkles spread farther across phones and desktops. */
.win-fx .fx-sunflower.main-flower{
 width:clamp(205px,50vmin,360px)!important;
 max-width:min(78vw,440px)!important;
}
.win-fx .fx-spark{font-size:var(--spark-size)!important}
@media(max-width:420px){
 .win-fx .fx-sunflower.main-flower{width:clamp(205px,54vmin,290px)!important}
}

/* Patchwork colored numbered hint references match the game's circular pins. */
.patchwork-hint-pin{display:inline-grid;place-items:center;vertical-align:middle;width:25px;height:25px;margin:0 .12em;border-radius:50%;border:1.4px solid #756779;line-height:1;font:700 13px Rubik,system-ui,sans-serif}
.patchwork-hint-pin[data-color="green"]{background:#b3e2cd;color:#2e4c43}
.patchwork-hint-pin[data-color="orange"]{background:#fdcdac;color:#5b3b29}
.patchwork-hint-pin[data-color="blue"]{background:#cbd5e8;color:#303c58}
.patchwork-hint-pin[data-color="pink"]{background:#f4cae4;color:#5f3556}
[data-theme="dark"] .patchwork-hint-pin{border-color:#b8a8bf}
/* Approved sage hint controls. */
.hint-modal{width:min(calc(100% - 32px),430px)}
.hint-modal .modal-inner{position:relative;padding-top:23px}
.hint-modal .modal-heading{padding-right:36px}
.hint-modal-close{position:absolute;right:13px;top:10px;width:36px;height:36px;display:grid;place-items:center;border:0;background:transparent;color:var(--ink);font:inherit;font-size:1.65rem;line-height:1;cursor:pointer;border-radius:2px}
.hint-modal-close:focus-visible,.hint-spoiler-box:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.hint-spoiler{margin:0 0 16px}
.hint-spoiler:last-child{margin-bottom:0}
.hint-spoiler-label{font-size:.9rem;font-weight:600;line-height:1.3;margin:0 0 8px}
.hint-spoiler-box{display:flex;width:100%;min-height:45px;align-items:center;justify-content:center;padding:10px 12px;border:1px solid #527154;border-radius:2px;background:#527154;color:#fff;cursor:pointer;font:inherit;font-size:.94rem}
.hint-spoiler-box:not(.is-revealed):hover{background:#456248}
.hint-spoiler-box.is-revealed{background:#f2efe9;border-color:#dad5ce;color:#29272c;font-weight:600;cursor:default;letter-spacing:.035em}
[data-theme="dark"] .hint-spoiler-box.is-revealed{background:#37343b;border-color:#605a65;color:var(--ink)}
.covalent-hint[open]{position:fixed;left:50%;right:auto;top:auto;bottom:max(15px,env(safe-area-inset-bottom));transform:translateX(-50%);margin:0;max-width:min(350px,calc(100% - 28px));z-index:45;box-shadow:0 9px 35px rgba(20,12,23,.18)}
.covalent-hint .modal-inner{padding:17px 50px 16px 18px}
.covalent-hint .modal-heading{font-size:1rem;margin:0 0 5px}
.covalent-hint .modal-body{font-size:.85rem;line-height:1.45}
.covalent-hint .modal-body p{margin:0}

/* Polarity uses the same at-a-glance variant choice as Patchwork and Covalent. */
.polarity-variant-nav{display:flex;justify-content:center;gap:5px;margin:4px auto 9px}
.polarity-variant-nav[hidden]{display:none}
.polarity-variant-nav a{display:grid;place-items:center;min-height:44px;min-width:83px;padding:6px 18px;border:1px solid var(--border-strong);border-radius:2px;background:transparent;color:var(--ink);font-size:.875rem;font-weight:500}
.polarity-variant-nav a:hover{background:var(--white)}
.polarity-variant-nav a[aria-current="page"]{background:#e6dce9;border-color:#735d7b}
[data-theme="dark"] .polarity-variant-nav a[aria-current="page"]{background:#514257;border-color:#c9b4d2}

/* Review-only 6×6 game has no owner-approved tutorial yet. */
body.is-star #information-btn[hidden]{display:none!important}

/* Tutorial/hint popovers stay clear of the toolbar and allow outside interactions. */
body[data-page="game"] #rules-dialog[open],body[data-page="game"] #hint-dialog[open]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;z-index:80}
body[data-page="game"].is-star #hint-dialog[open]{
 position:static;
 transform:none;
 margin:0 auto 18px;
}

/* Homepage site navigation: keep the footer theme control as a second entry point. */
.home-nav-wrap{position:relative;flex:0 0 auto}
.home-menu-toggle{width:44px;height:44px}
.home-menu-toggle svg{display:block;width:23px;height:23px}
.home-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:40;width:min(230px,calc(100vw - 32px));max-height:70svh;overflow-y:auto;padding:6px;border:1px solid var(--border-strong);border-radius:4px;background:var(--white);color:var(--ink);box-shadow:0 9px 22px rgba(30,20,30,.12)}
.home-menu[hidden]{display:none}
.home-menu>a,.home-menu-theme{display:flex;align-items:center;min-height:44px;padding:10px 12px;font-size:.9rem;font-weight:500;color:var(--ink);text-decoration:none;border-radius:3px}
.home-menu>a:focus-visible{background:#f6f2f5}
@media(hover:hover) and (pointer:fine){.home-menu>a:hover{background:#f6f2f5}}
.home-menu-theme{justify-content:space-between;gap:12px;margin-top:4px;padding-top:12px;border-top:1px solid var(--border);border-radius:0;cursor:pointer}
.home-menu-theme input{width:19px;height:19px;margin:0;accent-color:var(--plum);cursor:pointer}
.home-menu-theme:focus-within{outline:2px solid var(--focus);outline-offset:-2px}
[data-theme="dark"] .home-menu>a:focus-visible{background:#3b3540}
@media(hover:hover) and (pointer:fine){[data-theme="dark"] .home-menu>a:hover{background:#3b3540}}


/* Discreet site identity above each puzzle title: fits the existing game toolbar. */
/* Match the homepage's actual header width (including its 520px page cap).
   Keep the wider puzzle body unchanged. Both logos sit in the same 44px row. */
body[data-page="game"] .site-top{gap:8px;width:min(calc(100vw - 32px),520px);align-self:center;align-items:flex-start}
body[data-page="game"] .game-brand-home{align-self:flex-start}
body[data-page="game"] .icon-strip{min-height:44px;align-self:flex-start}
@media(max-width:520px){body[data-page="game"] .site-top{width:calc(100vw - 26px)}}
.game-title-stack{display:flex;align-items:center;justify-content:flex-start;gap:9px;flex:1;min-width:0}
.game-title-copy{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0}
.game-brand{font-size:.75rem;line-height:1.1;font-weight:500;color:var(--quiet);white-space:nowrap}
.game-brand-home{display:grid;place-items:center;width:44px;height:44px;min-width:44px;flex:none;border-radius:3px}
.game-brand-home:focus-visible{outline:3px solid var(--focus);outline-offset:1px}
.game-brand-logo{display:block;width:44px;height:44px;object-fit:contain}
@media(max-width:520px){.game-brand{font-size:.72rem}.game-title-stack{gap:6px}.game-brand-logo{width:40px;height:40px}}

/* Owner-approved Star artwork; switch with the site theme, not the OS theme. */
.star-approved-icon{display:block;width:48px;height:48px;max-width:100%;max-height:100%;background:url("/assets/star-approved-light.webp") center/111% auto no-repeat}
[data-theme="dark"] .star-approved-icon{background-image:url("/assets/star-approved-dark.webp")}
.garden-archive-icon .star-approved-icon{width:100%;height:100%}

/* Archive-only date uses the original puzzle-counter styling and position. */
body[data-page="game"] .game-meta.is-archive-meta{display:flex!important}
body[data-page="game"] .game-meta[hidden]{display:none!important}

/* Star has no clue headers; leave comfortable space above its board. */
body.is-star .game-area{padding-top:clamp(20px,4.5svh,42px)}

.completion-links{display:flex;flex-direction:column;align-items:center;gap:10px;padding:1px 8px 20px;font-size:.83rem;text-align:center}
.completion-links[hidden]{display:none!important}
.completion-links a{display:inline-flex;align-items:center;justify-content:center;gap:7px;color:var(--ink);text-decoration:underline;text-underline-offset:3px;min-height:25px}
.completion-links a:hover{color:var(--plum)}
.completion-links img{width:28px;height:28px;object-fit:contain;flex-shrink:0}

