/* New folklore games: a warm Catalan room, a paper cipher and a snowy hillside. */
.ng-page{--ng-ink:#3e382e;--ng-accent:#8f4e25;--ng-light:#fbf2df;--ng-line:#d6bd91}
.ng-stjarnan{--ng-ink:#34445b;--ng-accent:#3d5e85;--ng-light:#edf2fa;--ng-line:#b8c8dd}
.ng-999-threp{--ng-ink:#2c4257;--ng-accent:#365b77;--ng-light:#eaf2f7;--ng-line:#a7bdce}
.ng-page *{box-sizing:border-box}
.ng-links{display:flex;flex-wrap:wrap;gap:12px 24px;margin-bottom:24px;font-size:14px}
.ng-links a{color:var(--pine);text-underline-offset:4px}
.ng-workshop{padding:26px;border:1px solid var(--ng-line);border-radius:24px;background:var(--ng-light);box-shadow:0 6px 0 color-mix(in srgb,var(--ng-line) 35%,white)}

.ng-workshop h2{font:700 28px/1.25 Georgia,serif;letter-spacing:-.3px;color:var(--ng-ink);margin:0 0 15px}
.ng-workshop p{font-size:15px;line-height:1.75;margin:0 0 18px}
.ng-workshop button{cursor:pointer;max-width:100%;font-family:inherit;color:var(--ng-ink)}
.ng-workshop .btn{color:#fff;white-space:normal;text-align:center;min-height:46px}
.ng-workshop .btn.secondary{color:var(--pine)}
.ng-workshop button:focus-visible,.ng-page summary:focus-visible,.ng-page input:focus-visible{outline:3px solid #b15b0a;outline-offset:4px}
.ng-workshop button:disabled{opacity:.52;cursor:default}
.ng-progress{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;margin-bottom:24px;color:var(--ng-ink)}
.ng-progress strong{font-size:16px}
.ng-progress>span{font-size:13px}
.ng-progress-dots{display:flex;gap:7px;margin-inline-start:auto}
.ng-progress-dots i{width:15px;height:15px;border-radius:50%;border:1px solid var(--ng-accent);background:#fff}
.ng-progress-dots i.done{background:var(--ng-accent);box-shadow:inset 0 0 0 3px #fff}
.ng-scene{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;border-radius:16px}
.ng-game-layout,.ng-steps-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.ng-game-layout>*,.ng-steps-layout>*,.ng-cipher-banner>*{min-width:0}
.ng-tio-stage{position:relative;align-self:start}
.ng-tio-stage .ng-scene{border:3px solid #a97f52;box-shadow:0 5px 0 #d9c39e}
.ng-stage-bubble{position:relative;margin:-12px auto 0;width:max-content;max-width:90%;padding:10px 22px;background:#fffdf7;border:2px solid #b8864c;border-radius:24px;font:700 22px/1.3 Georgia,serif;text-align:center;box-shadow:0 4px 0 #d9c39e}
.ng-treats{display:flex;justify-content:center;gap:12px;margin:20px 0;color:#cdbb95}
.ng-treats span{font:38px/1 Georgia,serif}
.ng-treats .earned{color:#9b6513;text-shadow:0 2px #fff}
.ng-controls{padding:25px;background:#fff;border-radius:18px;border:1px solid #ffffff;box-shadow:0 3px 0 var(--ng-line)}
.ng-beats{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0}
.ng-beat{display:grid;grid-template-rows:18px 35px 20px;place-items:center;flex:1 0 48px;max-width:66px;min-height:80px;padding:7px 3px;border:1px solid #d7c7a8;border-radius:10px;background:#faf5e9;color:#69583e}
.ng-beat svg{width:32px;height:32px;opacity:0}
.ng-beat.revealed svg{opacity:1}
.ng-beat.now{border:3px solid #9b591f;padding:5px 1px;background:#ffe1a2;box-shadow:0 0 0 2px #fff}
.ng-beat.now svg{opacity:1}
.ng-beat-number{font-size:10px;color:#6e6556}
.ng-beat-name{font-size:11px}
.ng-actions{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;margin:22px 0}
.ng-actions .btn{font-size:14px;padding:11px 17px}
.ng-rhythm-pads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0 14px}
.ng-rhythm-pads button{display:grid;justify-items:center;gap:5px;min-height:120px;padding:12px;background:#fff1ce;border:2px solid #d1a968;border-radius:16px;box-shadow:0 5px 0 #d3b98d;touch-action:manipulation}
.ng-rhythm-pads button:nth-child(2){background:#eaf2e7;border-color:#9aaf8b;box-shadow:0 5px 0 #c3d1b8}
.ng-rhythm-pads button:not(:disabled):active{transform:translateY(3px);box-shadow:0 2px 0 #d3b98d}
.ng-rhythm-pads svg{width:44px;height:44px}
.ng-rhythm-pads strong{font-size:18px}
.ng-rhythm-pads small{font-size:11px;color:#5f6557}
.ng-input-count{font-size:13px!important;min-height:43px;color:#625b4c}
.ng-options{border-top:1px solid #e2dacb;margin-top:20px;padding-top:16px;font-size:14px}
.ng-options summary{cursor:pointer;padding:5px 0;margin-bottom:8px;font-weight:600}
.ng-options label{display:flex;align-items:center;gap:9px;padding:9px 0;min-height:44px}
.ng-options input{width:19px;height:19px;accent-color:var(--ng-accent);flex:none}
.ng-hint{background:#fff6d9;border-inline-start:3px solid #ae7c2f;border-radius:3px 10px 10px 3px;padding:14px 17px;margin-top:15px!important;font-size:14px!important}
.ng-controls>.link-button{padding:10px 0;min-height:44px;font-size:14px}
.ng-about{margin:30px 0 18px;max-width:780px;color:var(--muted);font-size:14px}
.ng-about summary{cursor:pointer;font-weight:600;color:var(--pine);padding:10px 0}
.ng-about p{line-height:1.75;margin:12px 0}
.ng-source-note{font-size:12px;color:var(--muted);margin-top:20px}
.ng-source-note a{text-underline-offset:3px}
.ng-cipher-banner{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:28px;align-items:center;margin-bottom:26px}
.ng-cipher-banner .ng-scene{border:2px solid #7894b5;border-radius:50% 50% 12px 12px}
.ng-cipher-banner p{margin-bottom:0}
.ng-code-paper{background:#fffdf7;border:1px solid #d9c79f;border-radius:8px 20px 20px 20px;padding:25px;margin-bottom:28px;box-shadow:0 5px 0 #d7dfeb}
.ng-code-message{display:flex;flex-wrap:wrap;align-items:start;gap:14px 0;margin-bottom:20px}
.ng-code-word{display:flex;gap:6px;flex-wrap:nowrap;min-width:0}
.ng-word-space{width:22px;flex:none}
.ng-code-token{display:grid;grid-template-rows:40px 30px;place-items:center;gap:5px;width:54px;min-height:85px;padding:5px 4px;border:1px solid #c9d4df;border-bottom:3px solid #aebdcd;background:white;border-radius:8px}
.ng-code-token .ng-symbol{width:36px;height:36px}
.ng-code-token strong{font:700 23px/1.2 Georgia,serif;min-width:27px;text-align:center;border-bottom:1px solid #bac8d6}
.ng-code-token[aria-pressed=true]{background:#fff1c7;border:2px solid #a77824;padding:4px 3px;box-shadow:0 0 0 2px #fff}
.ng-code-token.wrong{border:2px dashed #a43c43;background:#fff0ed}
.ng-code-token:disabled{opacity:1}
.ng-symbol{display:block;width:42px;height:42px;color:#304966}
.ng-selected-code{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14px!important}
.ng-selected-code span{padding:6px;background:#fff1c7;border-radius:8px}
.ng-selected-code .ng-symbol{width:35px;height:35px}
.ng-key-section{padding:24px;background:#fff;border-radius:18px;border:1px solid #cbd7e4}
.ng-key-section h2{font-size:24px}
.ng-key-section p{font-size:14px}
.ng-cipher-key{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:10px}
.ng-cipher-key button{display:grid;justify-items:center;align-content:center;gap:8px;min-height:95px;padding:10px 6px;border:1px solid #b4c6d9;border-radius:10px;background:#f0f5fb}
.ng-cipher-key button strong{font:700 23px/1 Georgia,serif}
.ng-cipher-key button:hover:not(:disabled){background:#fff1c7;border-color:#a77824}
.ng-cipher-key button.hinted{border:3px solid #aa7c2d;background:#fff1c7}
.ng-cipher-key button:disabled{opacity:.8}
.ng-place-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ng-place-choices button{display:grid;justify-items:center;gap:12px;padding:18px 10px;min-height:130px;border:2px solid #bccddd;border-radius:15px;background:#eef4fa;font-size:16px;font-weight:600}
.ng-place-choices svg{width:64px;height:64px}
.ng-place-choices button:hover{background:#fff1c7;border-color:#b28b45}
.ng-success{display:flex;align-items:center;flex-wrap:wrap;gap:18px;margin-top:22px;padding:20px;background:#eef5e6;border:1px solid #b7c8a9;border-radius:13px}
.ng-success strong{font:700 23px/1.4 Georgia,serif;color:#315139;flex:1}
.ng-story-intro,.ng-story-ending,.ng-completion{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:30px;align-items:center}
.ng-story-intro>div,.ng-story-ending>div,.ng-completion>div{background:#fff;padding:26px;border-radius:17px;box-shadow:0 4px 0 var(--ng-line)}
.ng-story-intro .ng-scene,.ng-story-ending .ng-scene,.ng-completion .ng-scene{border:2px solid var(--ng-accent)}
.ng-spark{display:block;font:45px/1 Georgia,serif;color:#9e6a1d;margin-bottom:15px}
.ng-story-scene .ng-scene{border:2px solid #587992;border-radius:15px 15px 0 0}
.ng-story-caption{background:#fff;padding:22px;border-radius:0 0 15px 15px;border:1px solid #c1cfdb;border-top:0}
.ng-story-caption h2{font-size:25px}
.ng-story-caption p{font-size:14px;margin:0}
.ng-stair-numbers{display:flex;gap:6px;align-items:start;direction:ltr;margin:25px 0 30px;padding-bottom:28px}
.ng-stair-numbers>span{flex:1;min-width:0;display:grid;place-items:center;min-height:54px;margin-top:calc(var(--step)*7px);border:1px solid #859eaf;border-bottom:5px solid #70899b;border-radius:6px;background:#e9f0f4;color:#2c4257;font-size:clamp(16px,2.2vw,24px);font-weight:700;font-variant-numeric:tabular-nums}
.ng-stair-numbers>span.missing{background:#fff0c7;border-color:#b28a3e;color:#714b18}
.ng-number-choices{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 24px}
.ng-number-choices button{min-width:75px;min-height:58px;padding:10px 18px;border:2px solid #afc1cf;border-radius:11px;background:#f1f6fa;font:700 24px/1.3 Georgia,serif}
.ng-number-choices button[aria-pressed=true],.ng-rule-choices button[aria-pressed=true]{background:#2e526f;color:white;border-color:#2e526f;box-shadow:0 3px 0 #c1d1df}
.ng-rule-title{font-size:14px!important;font-weight:600;margin-bottom:10px!important}
.ng-rule-choices{display:flex;gap:9px;flex-wrap:wrap}
.ng-rule-choices button{padding:10px 12px;min-height:46px;border:1px solid #afc1cf;border-radius:9px;background:#f1f6fa;font-size:14px}
.ng-equation{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;font:700 31px/1.5 Georgia,serif;direction:ltr;margin:28px 0}
.ng-equation span{display:grid;place-items:center;min-width:54px;min-height:58px;background:#fff0c7;border-bottom:3px solid #b28a3e;border-radius:5px}
.ng-story-choice{max-width:850px;margin:auto}
.ng-story-choice>.ng-scene{max-width:620px;margin:0 auto 25px;border:2px solid #587992}
.ng-story-choice h2{text-align:center}
.ng-story-choice>p{text-align:center}
.ng-story-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:25px}
.ng-story-actions button{min-height:65px;padding:14px;background:#fff;border:2px solid #a7bdce;border-radius:13px;font-size:16px;font-weight:600}
.ng-story-actions button:hover{background:#fff0c7;border-color:#aa7c2d}
@keyframes tio-beat{from{transform:translateY(0)}to{transform:translateY(-4px)}}
.ng-tio-image.ng-pulse{animation:tio-beat .15s ease-out 2 alternate}
@media(max-width:900px){
 .ng-workshop{padding:22px}.ng-game-layout,.ng-steps-layout{gap:22px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .ng-controls{padding:20px}.ng-workshop h2{font-size:26px}.ng-beats{gap:5px}.ng-beat{flex-basis:43px;max-width:56px}
 .ng-code-token{width:48px;grid-template-rows:35px 28px;min-height:78px}.ng-code-token .ng-symbol{width:33px;height:33px}.ng-code-word{gap:4px}.ng-word-space{width:16px}
 .ng-story-intro,.ng-story-ending,.ng-completion{gap:23px}.ng-story-intro>div,.ng-story-ending>div,.ng-completion>div{padding:22px}
}
@media(max-width:700px){
 .ng-game-layout,.ng-steps-layout,.ng-story-intro,.ng-story-ending,.ng-completion{grid-template-columns:minmax(0,1fr);gap:25px}
 .ng-tio-stage{max-width:560px;margin:auto;width:100%}.ng-tio-stage .ng-scene{max-height:320px;object-fit:cover}
 .ng-story-intro>.ng-scene,.ng-story-ending>.ng-scene,.ng-completion>.ng-scene{max-width:550px;margin:auto}
 .ng-story-actions{grid-template-columns:minmax(0,1fr)}
 .ng-story-scene{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:0}
 .ng-story-scene .ng-scene{border-radius:12px 0 0 12px;height:100%;object-fit:cover}.ng-story-caption{border-radius:0 12px 12px 0;border-top:1px solid #c1cfdb;padding:18px}
 .ng-story-caption h2{font-size:23px}
 .ng-stair-numbers>span{font-size:23px}.ng-cipher-banner{gap:20px}
}
@media(max-width:560px){
 .ng-workshop{padding:15px;border-radius:20px}.ng-links{font-size:13px;gap:12px 18px}
 
 .ng-progress{gap:7px 12px;margin-bottom:20px}.ng-progress strong{font-size:15px}.ng-progress>span{font-size:12px}.ng-progress-dots{gap:5px}.ng-progress-dots i{width:12px;height:12px}
 .ng-controls{padding:22px 18px}.ng-workshop h2{font-size:25px}.ng-workshop p{font-size:14px}
 .ng-stage-bubble{font-size:21px;padding:9px 20px}.ng-treats{gap:10px;margin:18px 0 0}.ng-treats span{font-size:33px}
 .ng-rhythm-pads{gap:12px}.ng-rhythm-pads button{min-height:112px}.ng-actions{gap:10px}.ng-actions .btn{font-size:13px;padding:10px 14px}
 .ng-beat{flex-basis:39px;max-width:49px;padding:6px 2px}.ng-beat.now{padding:4px 0}
 .ng-cipher-banner{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:16px}.ng-cipher-banner h2{font-size:23px}.ng-cipher-banner p{font-size:13px;line-height:1.6}
 .ng-code-paper{padding:20px 14px}.ng-code-token{width:clamp(32px,9.6vw,39px);min-height:72px;grid-template-rows:32px 25px;padding:5px 2px}.ng-code-token .ng-symbol{width:30px;height:30px}.ng-code-token strong{font-size:22px;min-width:25px}
 .ng-code-token[aria-pressed=true]{padding:4px 1px}.ng-code-word{gap:3px}.ng-word-space{width:13px}.ng-code-message{row-gap:16px}
 .ng-selected-code{font-size:13px!important}.ng-key-section{padding:21px 16px}.ng-cipher-key{grid-template-columns:repeat(auto-fit,minmax(56px,1fr));gap:9px}
 .ng-cipher-key button{min-height:86px;padding:9px 5px}.ng-cipher-key .ng-symbol{width:37px;height:37px}.ng-cipher-key button strong{font-size:22px}
 .ng-place-choices{gap:9px}.ng-place-choices button{min-height:110px;font-size:14px;padding:13px 6px}.ng-place-choices svg{width:47px;height:47px}
 .ng-story-scene{grid-template-columns:minmax(0,1fr)}.ng-story-scene .ng-scene{height:auto;border-radius:13px 13px 0 0;object-fit:contain}.ng-story-caption{border-top:0;border-radius:0 0 13px 13px;padding:20px}
 .ng-stair-numbers{gap:4px}.ng-stair-numbers>span{font-size:21px;min-height:50px}.ng-number-choices{gap:10px}.ng-number-choices button{min-width:70px;min-height:55px;padding:10px 14px}
 .ng-equation{font-size:27px;gap:8px}.ng-equation span{min-width:44px;min-height:53px}
 .ng-success{padding:17px}.ng-success strong{font-size:22px;flex-basis:100%}
}
@media(max-width:360px){
 .ng-workshop{padding:10px}.ng-controls{padding:20px 14px}.ng-progress-dots{margin-inline-start:0}
 .ng-cipher-banner{grid-template-columns:minmax(0,1fr)}.ng-cipher-banner .ng-scene{max-height:165px;object-fit:cover;border-radius:15px}
 .ng-code-paper{padding:18px 9px}.ng-code-token{width:32px;min-height:66px;grid-template-rows:29px 24px;padding-inline:1px}.ng-code-token .ng-symbol{width:27px;height:27px}.ng-code-token strong{font-size:20px;min-width:23px}.ng-code-token[aria-pressed=true]{padding-inline:0}.ng-code-word{gap:2px}.ng-word-space{width:11px}
 .ng-key-section{padding:18px 13px}.ng-cipher-key{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.ng-cipher-key button{min-width:0}
 .ng-stair-numbers>span{font-size:18px}.ng-rule-choices{gap:7px}.ng-rule-choices button{font-size:13px;padding:10px}
 .ng-number-choices button{min-width:64px;font-size:22px;padding:10px 12px}.ng-equation{font-size:25px}
}
@media(prefers-reduced-motion:reduce){.ng-tio-image.ng-pulse{animation:none}}

.ng-gift-icon{display:block;width:57px;height:57px}
.ng-finish-gift{display:block;margin-bottom:18px}.ng-finish-gift .ng-gift-icon{width:72px;height:72px}
.ng-gift-shelf{margin:20px 0 0;text-align:center;color:#664b22;font-size:12px;font-weight:600}
.ng-gift-row{display:flex;align-items:end;justify-content:center;flex-wrap:wrap;gap:6px;min-height:83px;padding:8px 12px;border-bottom:5px solid #b78d59;border-radius:0 0 12px 12px;background:linear-gradient(transparent,#e9d7b84d)}
.ng-earned-gift:nth-child(even){transform:rotate(5deg)}
.ng-earned-gift:nth-child(odd){transform:rotate(-4deg)}
.ng-gift-shelf>span{display:block;margin-top:9px}
.ng-earned-gift .ng-gift-icon{width:58px;height:58px}
.ng-completion>.ng-tio-stage{padding:0;background:none;box-shadow:none}
.ng-rhythm-pads svg{width:58px;height:58px}
.ng-beat{grid-template-rows:18px 42px 20px;min-height:88px}
.ng-beat svg{width:40px;height:40px}
.ng-code-token{grid-template-rows:58px 30px;min-height:103px}
.ng-code-token .ng-symbol{width:46px;height:56px}
.ng-symbol{width:48px;height:57px}
.ng-selected-code .ng-symbol,.ng-key-current .ng-symbol{width:42px;height:50px}
.ng-cipher-key button{min-height:113px;background:#f6f8fc;border:2px solid #b8c8dd;box-shadow:0 3px 0 #dbe3ee}
@media(max-width:560px){.ng-earned-gift .ng-gift-icon{width:44px;height:44px}.ng-gift-row{min-height:70px;gap:2px;padding-inline:4px}.ng-rhythm-pads svg{width:52px;height:52px}}

.ng-reset{display:flex;justify-content:flex-end;margin-top:24px;padding-top:16px;border-top:1px solid var(--ng-line)}.ng-reset button{min-height:44px;padding:9px 0;font-size:13px;color:var(--ng-accent)}

.ng-key-current{position:sticky;inset-block-start:8px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:10px 14px;background:#fff2cc;border:1px solid #bb944a;border-radius:10px;color:#5e481f;font-size:13px;box-shadow:0 3px 7px #233c5010}.ng-key-current .ng-symbol{width:36px;height:36px;flex:none}

.ng-workshop .ng-inline-feedback{position:static;margin:12px 0 20px;padding:10px 13px;min-height:42px;background:var(--ng-light);border-inline-start:3px solid var(--ng-accent);border-radius:3px 9px 9px 3px;font-size:13px;line-height:1.6;color:var(--ng-ink)}.ng-inline-feedback:empty{display:none}
.ng-code-token .ng-symbol{max-width:100%}
.ng-stjarnan .ng-code-token:disabled,.ng-stjarnan .ng-cipher-key button:disabled{opacity:1}
@media(max-width:560px){
 .ng-code-token .ng-symbol{width:100%;height:52px}
 .ng-cipher-key .ng-symbol{width:40px;height:48px}
}
/* The full alphabet key is independent of the hidden message. */
.ng-key-current>div{display:flex;align-items:center;gap:12px;min-width:0}
.ng-key-current{flex-wrap:wrap;gap:8px 16px}
.ng-key-current button{min-height:44px;font-size:12px;line-height:1.4;padding:8px 12px;white-space:normal}
.ng-key-current .link-button{color:#705122;text-decoration:underline;text-underline-offset:4px}
@media(max-width:560px){.ng-key-current{padding:10px;gap:6px}.ng-key-current>div{gap:8px}.ng-key-current .ng-symbol{width:34px;height:42px}}
.ng-place-choices button{padding:0;gap:0;overflow:hidden;background:#fff;align-content:start}
.ng-place-choices .ng-place-image{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.ng-place-choices button>span{display:block;width:100%;padding:14px 10px;text-align:center}
@media(max-width:600px){.ng-place-choices{gap:10px}.ng-place-choices button{padding:0;min-height:0}.ng-place-choices button>span{padding:12px 4px;font-size:15px}}
