[hidden]{display:none!important}
body.hub-active .site-header .brand{font-size:30px;line-height:1.12}
body.hub-active .site-header .brand span{max-width:none}
@media(max-width:759px){body.hub-active .site-header .brand{font-size:24px;gap:7px;letter-spacing:-.5px}body.hub-active .site-header .brand span{max-width:128px}}
@media(max-width:359px){body.hub-active .site-header .brand{font-size:21px}body.hub-active .site-header .brand span{max-width:110px}}
body.home-rotation-active{height:100dvh;overflow:hidden}
body.home-rotation-active .app-shell{height:100dvh;min-height:0}
body.home-rotation-active .site-header,body.home-rotation-active .site-footer{display:none}
#home-rotation-notice{height:100%;display:grid;place-items:center;text-align:center;padding:20px}
#home-rotation-notice p{max-width:570px;margin:0;color:var(--ink);font-size:clamp(20px,4vw,28px);line-height:1.5;font-weight:700}
.trace-heading{flex-wrap:wrap}
.trace-choice{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
.trace-shuffle{font-size:12px;gap:6px}
.trace-shuffle[aria-pressed=true]{border-color:#84a275;background:#e4efdc}

/* Give portrait drawing the available viewport, keeping all actions visible. */
body.tracing-active{height:100dvh;overflow:hidden;overscroll-behavior:none}
body.tracing-active .app-shell{height:100dvh;min-height:0;padding:max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.tracing-active .site-header{height:56px;min-height:56px;flex:none}
.tracing-active .site-footer{display:none}
.tracing-active #main{min-height:0;min-width:0}
.tracing-active #portrait-game{height:100%;min-height:0}
.tracing-active .trace-game{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:8px;height:100%;width:100%;min-height:0;margin:0 auto}
.tracing-active .trace-heading{min-width:0;margin:0;gap:6px}
.tracing-active .trace-heading>div:first-child{display:none}
.tracing-active .trace-choice{width:100%;margin:0;justify-content:space-between;flex-wrap:nowrap;gap:6px}
.tracing-active .trace-alphabet-button{min-height:44px;padding:8px 11px;font-size:12px}
.tracing-active .trace-levels{margin:0;gap:6px}
.tracing-active .trace-levels button{min-height:44px;font-size:11px;padding:6px 4px;gap:5px;border-radius:12px}
.tracing-active .level-number{width:22px;height:22px;font-size:11px}
.tracing-active .trace-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:6px;min-height:0;align-items:stretch}
.tracing-active .trace-letter-info{flex-direction:row;min-height:44px;gap:10px;text-align:left}
.tracing-active .trace-model{width:44px;height:46px;font-size:30px;border-radius:12px;flex:none;box-shadow:none}
.tracing-active .trace-letter-copy h2{font-size:16px;margin:0 0 3px}
.tracing-active .trace-letter-copy p{font-size:12px;line-height:1.3;max-width:none}
.tracing-active .trace-word-picture{display:none}
.tracing-active .drawing-board{height:100%;min-height:0;border-radius:20px;box-shadow:none}
.tracing-active .trace-progress-row{margin:0;min-height:32px;font-size:12px;line-height:1.3;gap:8px}
.tracing-active .trace-progress-row progress{width:75px;height:7px}
.tracing-active .trace-actions{min-height:44px;gap:6px;flex-wrap:nowrap}
.tracing-active .trace-clear{min-height:44px;padding:6px 0;font-size:12px;gap:4px;white-space:nowrap}
.tracing-active .trace-forward{min-width:0;gap:6px;justify-content:flex-end}
.tracing-active .trace-check,.tracing-active .trace-actions .next-button{min-height:44px;min-width:0;padding:8px 9px;font-size:12px;gap:5px;border-radius:12px;white-space:nowrap;box-shadow:none}
.tracing-active .trace-actions .next-button svg{width:16px;height:16px}
.tracing-active .trace-finish{display:flex;height:100%;min-height:0;margin:0 auto;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.tracing-active .trace-finish h1{font-size:clamp(24px,6vw,38px);margin:0}
.tracing-active .trace-finish p{font-size:13px;line-height:1.3;margin:0}
.tracing-active .trace-flower-letters{gap:5px;margin:4px auto;max-width:350px}
.tracing-active .trace-flower-letters span{width:30px;height:33px;font-size:19px;border-radius:9px}
.tracing-active .trace-finish .primary-button{min-height:44px;font-size:15px;padding:8px 16px}
@media(max-height:600px) and (orientation:portrait){
  .tracing-active .site-header{height:48px;min-height:48px}
  .tracing-active .trace-game{gap:6px}
  .tracing-active .trace-letter-copy h2{display:none}
  .tracing-active .trace-progress-row{min-height:28px}
  .tracing-active .trace-finish .eyebrow,.tracing-active .trace-finish p{display:none}
}

/* Only the secret game owns the landscape viewport. Portrait DOM stays alive. */
body.secret-active{height:100dvh;overflow:hidden;overscroll-behavior:none}
body.secret-active .app-shell{height:100dvh;min-height:0;max-width:none;width:100%;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
body.secret-active .site-header,body.secret-active .site-footer{display:none}
body.secret-active #main,body.secret-active #secret-game{height:100%;min-height:0;min-width:0}
.secret-active .linked-game{height:100%;width:100%;max-width:none;margin:0;min-height:0}
.secret-active .game-heading,.secret-active .game-bottom,.secret-active .linked-panel-heading{display:none}
.secret-active .linked-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;height:100%;width:100%;min-height:0}
.secret-active .game-stage{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;height:100%;padding:8px;border-radius:20px}
.secret-active .linked-levels{display:flex;align-items:center;gap:6px;height:40px;flex:none;justify-content:flex-start}
.secret-active .linked-levels button{width:40px;height:40px;flex:none;padding:0;border:1px solid #cbd9c1;border-radius:10px;background:#f8faf3;color:#526748;font:inherit;font-weight:700;font-size:17px;line-height:1;cursor:pointer}
.secret-active .linked-levels button[aria-pressed=true]{background:#5c8050;border-color:#5c8050;color:#fff;box-shadow:0 2px 0 #45663b}
.secret-active .linked-levels button:focus-visible{outline:3px solid #dfa95e;outline-offset:2px}
.secret-active .object-grid{flex:1;min-height:0;width:100%;max-width:none;margin:0;gap:8px}
.secret-active .object-card{min-height:0;height:100%;padding:5px;gap:4px;border-radius:15px;box-shadow:none;overflow:hidden}
.secret-active .object-card .illustration{flex:1 1 0;min-height:0;max-height:none;max-width:100%;width:100%;height:100%;aspect-ratio:auto}
.secret-active .object-word{display:none}
.secret-active .letter-slot{height:clamp(30px,12dvh,44px);width:clamp(32px,13dvh,46px);font-size:25px;border-radius:10px;flex-shrink:0}
.secret-active .object-card.matched .letter-slot{font-size:28px}
.secret-active .matched-badge{width:23px;height:23px;font-size:13px;right:5px;top:5px}
.secret-active .object-card.drawn{border-color:#6e9b62;background:#e6f2dc}
.secret-active .letter-tray{--tile-size:clamp(42px,18dvh,72px);flex:none;min-height:0;height:calc(var(--tile-size) + 6px);margin:0;gap:18px;flex-wrap:nowrap}
.secret-active .letter-token{width:var(--tile-size);height:var(--tile-size);font-size:clamp(28px,10dvh,46px);border-radius:14px}
.secret-active .linked-drawing-panel{height:100%;min-width:0;min-height:0;padding:8px;border:1px solid #dfe7d5;border-radius:20px;background:#edf2e5}
.secret-active #linked-drawing{height:100%;min-height:0}
.secret-active .compact-trace{display:grid;grid-template-rows:minmax(0,1fr) 40px;gap:6px;height:100%;min-height:0;margin:0}
.secret-active .drawing-board{height:100%;min-height:0;border-radius:16px;box-shadow:none}
.secret-active .trace-progress-row{position:absolute}
.secret-active .trace-actions{display:flex;gap:4px;min-height:0;height:40px;align-items:center;justify-content:flex-end;flex-wrap:nowrap}
.secret-active .trace-model{width:30px;height:36px;flex-shrink:0;margin-right:auto;font-size:25px;line-height:1;border-radius:9px;box-shadow:none}
.secret-active .trace-clear{width:36px;min-width:36px;height:40px;padding:0;justify-content:center}
.secret-active .trace-clear span{font-size:26px}
.secret-active .trace-check,.secret-active .trace-actions .next-button{min-height:36px;min-width:58px;max-width:100%;padding:6px 7px;font-size:11px;border-radius:10px;gap:3px;white-space:nowrap;box-shadow:none}
.secret-active .trace-actions .next-button svg{width:13px;height:13px}
.secret-active .linked-waiting{height:100%;min-height:0;display:grid;place-items:center}
.secret-active .linked-waiting>span{font-size:clamp(50px,30dvh,110px);color:#a4b58e}
.secret-active .end-screen{height:100%;min-height:0;max-width:760px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);grid-template-rows:1fr auto 1fr;gap:10px 20px;align-items:center;text-align:left}
.secret-active .end-screen .end-art{grid-column:1;grid-row:1/4;width:100%;height:100%;max-height:100%;margin:0}
.secret-active .end-screen h1{grid-column:2;grid-row:1;align-self:end;font-size:clamp(23px,8dvh,38px);margin:0;line-height:1.1}
.secret-active .end-screen p,.secret-active .garden-recap{display:none}
.secret-active .end-screen .primary-button{grid-column:2;grid-row:2;justify-self:start;font-size:15px;min-height:44px;padding:8px 16px;gap:12px}
@media(max-width:600px){
  .secret-active .action-label{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden;white-space:nowrap}
  .secret-active .trace-check,.secret-active .trace-actions .next-button{min-width:36px;padding:6px}
  .secret-active .trace-check .action-symbol{font-size:17px}
}
@media(max-width:759px){.trace-choice .trace-alphabet-button{font-size:12px;padding:8px 10px;min-height:42px}.trace-heading{gap:10px}}

/* A quiet book cover on the first wide-screen visit. */
.garden-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;margin:24px auto 40px;max-width:680px}
.garden-cover img{width:clamp(180px,36vmin,340px);height:auto;display:block}
.garden-cover h1{font-size:clamp(30px,5vw,54px);line-height:1.12;margin:0;color:#40573b}
.garden-cover .primary-button{margin-top:4px}
@media(max-height:580px) and (orientation:landscape){.garden-cover{margin:12px auto 20px;gap:10px}.garden-cover img{width:clamp(100px,31dvh,180px)}.garden-cover h1{font-size:30px}.garden-cover .primary-button{min-height:44px;padding:8px 22px}}

.secret-active .linked-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;height:48px;gap:5px}.secret-active .linked-levels button{display:flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:0;height:46px;padding:4px;border-width:2px;font-size:11px;line-height:1.2}.linked-level-icon{width:27px;height:27px;flex:none}.secret-active .linked-levels button span{min-width:0;text-align:left}.secret-active .linked-levels button[aria-pressed=true]{outline:2px solid #c2d9a9;outline-offset:1px}@media(max-width:600px){.secret-active .linked-levels button{font-size:10px;gap:3px}.linked-level-icon{width:24px;height:24px}}

.trace-levels button .linked-level-icon{width:30px;height:30px;flex:none}.trace-levels button span{min-width:0;text-align:left;line-height:1.2}.trace-levels button{min-width:0}.trace-levels button[aria-pressed=true]{outline:2px solid #c2d9a9;outline-offset:1px}@media(max-width:759px){.trace-levels button .linked-level-icon{width:26px;height:26px}.tracing-active .trace-levels button{min-height:46px}}@media(max-width:359px){.trace-levels button .linked-level-icon{width:24px;height:24px}}

/* KrupīC: larger mascot and a compact playful wordmark. */
/* The wordmark grows into the space left by the parent controls. */
.site-header .brand{min-width:0;gap:8px;flex:1}
.site-header .brand-toad{width:60px;height:60px;object-fit:contain;flex:none;border-radius:16px}
.site-header .brand-wordmark{display:block;flex:1;min-width:0;width:0;height:auto;max-height:72px;object-fit:contain;object-position:left center}
.site-header .header-actions{flex:none}
body.hub-active .site-header{min-height:164px}
body.hub-active .site-header .brand-toad{width:90px;height:90px}
body.hub-active .site-header .brand-wordmark{max-height:150px}
@media(max-width:759px){
 .site-header{gap:10px}
 .site-header .brand{gap:5px}
 .site-header .brand-toad{width:45px;height:45px}
 .site-header .brand-wordmark{max-height:56px}
 .header-actions{gap:6px}
 body.hub-active .site-header{min-height:100px}
 body.hub-active .site-header .brand-toad{width:56px;height:56px}
 body.hub-active .site-header .brand-wordmark{max-height:88px}
}
@media(max-width:359px){
 .site-header{gap:7px}
 .site-header .brand-toad,body.hub-active .site-header .brand-toad{width:43px;height:43px}
 .site-header .brand{gap:4px}
 .header-actions{gap:4px}
}
body.tracing-active .site-header .brand-toad,body.numbers-active .site-header .brand-toad,body.memory-active .site-header .brand-toad,body.counting-active .site-header .brand-toad{max-height:calc(100% - 6px);max-width:42px}
body.tracing-active .site-header .brand-wordmark,body.numbers-active .site-header .brand-wordmark,body.memory-active .site-header .brand-wordmark,body.counting-active .site-header .brand-wordmark{max-height:42px}

/* Full-width home branding keeps the lettering at about 80% of the mascot height. */
body.hub-active .site-header{display:grid;grid-template-columns:minmax(0,1fr);row-gap:0;min-height:0;padding-top:10px;padding-bottom:16px}
body.hub-active .site-header .brand{width:100%;container-type:inline-size;gap:8px}
body.hub-active .site-header .brand-toad{width:clamp(56px,19cqw,90px);height:clamp(56px,19cqw,90px)}
body.hub-active .site-header .brand-wordmark{max-height:clamp(72px,24.3cqw,115px)}
body.hub-active .header-actions{justify-self:end}
#home-rotation-notice{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:24px;align-items:center}
#home-rotation-notice img{display:block;object-fit:contain;width:min(32vw,300px);height:min(72dvh,330px);min-height:0;justify-self:center}
@media(max-height:450px) and (orientation:landscape){#home-rotation-notice{padding:12px;gap:12px}#home-rotation-notice p{font-size:clamp(18px,3vw,25px)}}

/* Compact parent support entry alongside the settings control. */
.site-header .header-actions{align-items:center}
.site-header .header-support{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:72px;min-width:72px;height:54px;min-height:54px;padding:5px 4px;border-radius:15px;border:1.5px solid #d5b69c;background:#fae5d8;color:#965d44;box-shadow:0 2px 0 #ead5c3}
.site-header .header-support .support-heart{width:25px;height:25px;fill:#fff8f1}
.site-header .header-support span{font-size:10px;font-weight:800;line-height:1.2;letter-spacing:0;white-space:nowrap}
.site-header .header-support:hover{background:#f5d8c5}
.site-header .header-support:active{transform:translateY(1px);box-shadow:none}
