/* Shared component finish, after mode CSS. Daily is the visual reference. */
:is(#tirds-splash,.daily-shell) .guidebutton{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-width:177px;min-height:44px;padding:8px 19px;border:1px solid #b89a67;border-radius:13px;background:linear-gradient(150deg,#fff6e1,#eddbb5);box-shadow:inset 0 1px #fff9e9,0 3px #c8a976;font:500 16px var(--display);color:#67502d;text-decoration:none;transition:transform .2s,background .2s}
:is(#tirds-splash,.daily-shell) .guidebutton svg{width:17px;height:17px}
:is(#tirds-splash,.daily-shell) .guidebutton:hover{transform:translateY(-2px);background:#fff3d6}
:is(#tirds-splash,.daily-shell) .guidebutton:active{transform:translateY(2px);box-shadow:0 1px #c8a976}
:is(#tirds-splash,.daily-shell) .mode-infinite{display:inline-flex;align-items:center;justify-content:center;gap:16px;width:min(260px,100%);min-height:54px;padding:8px 16px;border:1px solid #c7b28c;border-radius:15px;background:#fff7e6;color:#796242;box-shadow:inset 0 1px #fff,0 3px #d6c09b;font:500 20px var(--display);text-decoration:none}
.mode-infinite span{font-size:27px;color:#9a8159}
:is(#tirds-splash,.daily-shell) .mode-infinite:hover{background:#fffbed}
:is(#tirds-splash,.daily-shell) .mode-infinite:active{translate:0 2px;box-shadow:0 1px #d6c09b}
#tirds-splash .t2-play{width:min(370px,100%)}#tirds-splash .t2-play-text{font-size:29px}
.footer-links{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;margin:18px auto 0;color:#9b896c;font:500 12px 'DM Sans',sans-serif}
.footer-links a,.footer-links button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:5px 3px;color:inherit;background:none;border:0;font:inherit;text-decoration:none;cursor:pointer}
.footer-links a:hover,.footer-links button:hover{color:#685437}
.footer-links .admin-cog{width:36px;opacity:.65}.footer-links .admin-cog svg{width:16px;height:16px}
#tirds-splash .splash-footer .footer-links a{margin:0;text-decoration:none}
.footer-links :focus-visible,.mode-infinite:focus-visible,.guidebutton:focus-visible{outline:2px solid #94764b;outline-offset:4px}
body>.footer-links{margin-bottom:32px}
.daily-shell .timebox{display:flex;align-items:center;gap:4px}.daily-shell .timebox>svg{width:13px;height:13px;flex:none}.daily-shell .timebox>svg path{fill:none}
.daily-shell .hintbutton strong{display:inline-flex;align-items:center;gap:4px}
.daily-shell .game-back svg{width:18px;height:18px}
.sound-audition{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.sound-audition button{border:1px solid #d4bf99;border-radius:10px;background:#fff8e9;color:#78613e;padding:9px 5px;font:500 12px 'DM Sans',sans-serif;box-shadow:0 2px #d8c3a0}.sound-audition button:hover{background:#f2e3c6}.sound-audition button:active{translate:0 2px;box-shadow:none}
.sound-options{display:grid;gap:10px;font-size:12px}.sound-options label{display:flex;align-items:center;justify-content:space-between;gap:8px}.sound-options select{max-width:135px;background:#fff7e6;border:1px solid #c8b38d;border-radius:8px;padding:6px;color:#78613e}
@media(max-width:400px){#tirds-splash .t2-play-text{font-size:24px}#tirds-splash .t2-play{gap:9px;padding:0 12px}}
@media(prefers-reduced-motion:reduce){.guidebutton,.mode-infinite{transition:none!important}}

#tirds-splash .splash-footer{text-align:center}
.sound-options input{accent-color:#71864c}.sound-options input[type="checkbox"]{width:18px;height:18px}.sound-options input[type="range"]{max-width:140px}

/* Home navigation shares the date row; puzzle and tutorial retain their own back controls. */
.edition-row{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:6px;width:min(520px,100%);margin:0 auto 8px}
.edition-home{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:36px;color:#8e7856;text-decoration:none;font:600 11px 'DM Sans',sans-serif}
.edition-home svg{width:13px;height:15px;flex:none}.edition-home:hover{color:#57452d}.edition-home:focus-visible{outline:2px solid #94764b;outline-offset:3px;border-radius:6px}
.home .edition-row #edition{justify-self:center;max-width:100%;margin:0;font-size:clamp(10px,3vw,14px);letter-spacing:1px;padding:6px 3px;white-space:nowrap}
@media(max-width:600px){.edition-row{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px}.edition-home{font-size:10px}}

/* Daily welcome: one viewport on ordinary phones, with natural overflow for zoom/short screens. */
.daily-shell>.home{display:flex;flex-direction:column;align-items:center;min-height:min(920px,100svh);box-sizing:border-box;margin:0 auto;padding-top:clamp(16px,3svh,30px);padding-bottom:max(16px,env(safe-area-inset-bottom))}
.home .edition-row{flex:none;margin-bottom:0}
.home .daily-logo{flex:none;margin:clamp(12px,calc((100svh - 600px)*.1),30px) 0 0}
.home .daily-logo .eyebrow{font-size:22px;margin-bottom:17px;translate:0 0}
.home .daily-intro{margin:clamp(18px,3svh,28px) 0 0;font:500 13px/1.4 var(--body);color:#8b7555;text-wrap:balance}
.home .upcoming-triptych{flex:none;margin-top:clamp(22px,4svh,38px)}
.home .upcoming-card{height:clamp(140px,21svh,184px)}
.home:has(.upcoming-triptych) .welcome-actions{flex:none;margin-top:-36px;gap:clamp(16px,3svh,26px)}
.home .daily-rules{flex:none;justify-content:center;gap:9px;max-width:100%;margin:clamp(18px,3svh,28px) 0 0;padding:8px 12px;font-size:12px;line-height:1.4;text-align:center}
.home .welcome-hint-budget .hint-token{width:26px;height:26px}.home .welcome-hint-budget b{font-size:17px}
.home .welcome-footer{margin-top:auto;padding-top:clamp(16px,3svh,26px);flex:none}
.home .welcome-footer .copyright{margin:0;padding:0;line-height:1.4}
.home .welcome-footer .footer-links{margin-top:4px}
@media(max-width:600px){.home .daily-logo .eyebrow{font-size:19px;margin-bottom:15px}.home .daily-intro{font-size:12px}}
@media(max-height:700px){.home .daily-rules{margin-top:16px}.home .welcome-footer{padding-top:14px}.home .upcoming-triptych{margin-top:22px}.home .daily-intro{margin-top:18px}}

.home .welcome-play-cluster{width:100%;flex:none;margin-top:clamp(22px,4svh,38px)}
.home .welcome-play-cluster .upcoming-triptych{margin-top:0}
.home .welcome-actions{width:100%;min-width:0}
.daily-shell>.home{justify-content:space-between}
.home .welcome-footer{margin-top:0}
@media(max-height:620px) and (max-width:600px){.daily-shell>.home{padding-top:12px;padding-bottom:12px}.home .daily-intro{margin-top:14px}.home .welcome-play-cluster{margin-top:18px}.home .upcoming-card{height:124px}.home .upcoming-mini{grid-template-columns:repeat(5,8px);grid-template-rows:repeat(5,8px);gap:2px}.home .daily-rules{margin-top:12px}.home .welcome-footer{padding-top:10px}}

/* Keep the welcome promise and hint allowance together above the card cluster. */
.home .daily-subtitle{flex:none;display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;margin-top:clamp(18px,3svh,28px)}
.home .daily-subtitle .daily-intro{margin:0}
.home .daily-subtitle .daily-rules{margin:0;padding:0;border:0;border-radius:0;background:none;gap:8px;max-width:100%;font-size:12px;line-height:1.5}
.home .daily-subtitle .welcome-hint-budget{flex:none}
.home .daily-subtitle .welcome-hint-budget .hint-token{width:22px;height:22px}
.home .daily-subtitle .welcome-hint-budget b{font-size:14px}
@media(max-height:620px) and (max-width:600px){.home .daily-subtitle{margin-top:14px}}

/* Returning to Daily shows only earned completions; unsolved previews stay blank. */
.home .upcoming-card.solved{background:linear-gradient(145deg,#b4e996,#75c15b);border-color:#79a45b;box-shadow:inset 0 2px #e1ffd3,0 3px 0 #639746}
.home .upcoming-card.solved h2{color:#35552a}
.home .upcoming-card.solved .upcoming-mini i.on{display:grid;place-items:center;background:#fffbea;color:#36582d;font:600 10px/1 var(--display);box-shadow:0 1px #5d8b4599}
.home .edition-row #edition{transform:none;translate:none;font-size:clamp(11px,3.2vw,15px)}
.home .daily-subtitle{margin-top:clamp(18px,3svh,26px)}
.daily-shell>.home{justify-content:flex-start}
.home .welcome-footer{margin-top:auto}
.home .welcome-play-cluster{margin-top:clamp(16px,2.8svh,26px)}
.finish-home{display:inline-flex;align-items:center;gap:9px;min-height:44px;color:#8e7856;text-decoration:none;font:600 13px var(--body)}
.finish-home svg{width:18px;height:18px}.finish-home:hover{color:#57452d}.finish-home:focus-visible{outline:2px solid #94764b;outline-offset:4px;border-radius:6px}
#tirds-splash .mode-infinite{transition:transform .2s,background .2s,box-shadow .2s}
#tirds-splash .mode-infinite:hover{transform:translateY(-2px);background:#fffbed;box-shadow:inset 0 1px #fff,0 5px #d6c09b}
#tirds-splash .mode-infinite:active{transform:none;box-shadow:0 1px #d6c09b}
@media(max-height:620px) and (max-width:600px){.home .upcoming-card.solved .upcoming-mini i.on{font-size:8px}}

/* The label reports the current state; the switch shows the available action. */
.footer-links .sound-toggle{position:relative;gap:7px;padding-right:39px;white-space:nowrap}
.footer-links .sound-toggle::before{content:'';position:absolute;right:0;width:32px;height:18px;border-radius:12px;background:#d5c8b2;border:1px solid #a79579;box-sizing:border-box}
.footer-links .sound-toggle::after{content:'';position:absolute;right:17px;width:12px;height:12px;border-radius:50%;background:#fffcf3;box-shadow:0 1px 2px #65523844;transition:translate .15s}
.footer-links .sound-toggle[aria-checked="true"]::before{background:#66864d;border-color:#526f3c}
.footer-links .sound-toggle[aria-checked="true"]::after{translate:14px 0}
@media(max-width:350px){#tirds-splash .splash-footer{gap:6px;padding-inline:6px}#tirds-splash .footer-links{gap:5px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.footer-links .sound-toggle::after{transition:none}}
