/* The 3D courtyard is the game surface; the HTML layer provides accessible controls. */
.cw-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:8px 0 24px}.cw-heading h1{font-size:clamp(2rem,3.3vw,3.2rem);margin-bottom:0}.cw-heading .eyebrow{margin-bottom:9px;color:#8e5428}.cw-heading>.sq-button{font-size:14px;flex-shrink:0}.cw-game{border:3px solid #173c50;border-radius:24px;overflow:hidden;box-shadow:7px 8px 0 #bcd6dd;background:#174459;isolation:isolate}.cw-topbar{padding:17px 23px;display:flex;justify-content:space-between;align-items:center;gap:18px;background:#173f53;color:#fff7dc;border-bottom:2px solid #102c3d}.cw-title{display:flex;gap:13px;align-items:center;min-width:0}.cw-title>span{font-size:35px;color:#ffd771}.cw-title strong{display:block;font-family:var(--display);font-size:22px;line-height:1.2;font-weight:500}.cw-title small{font-size:13px;display:block;margin-top:6px;color:#d3e9ed;line-height:1.45}.cw-tools{display:flex;gap:10px;flex-shrink:0}.cw-button{min-width:44px;min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 17px;border:2px solid #173c50;border-radius:12px;background:#fffaf0;color:#173c50;font:900 15px/1.4 var(--sans);cursor:pointer;text-decoration:none;box-shadow:0 3px 0 #173c5044}.cw-button:hover{background:#e4f5fb}.cw-button.cw-primary{background:#ffdb6a}.cw-button.cw-primary:hover{background:#ffe797}.cw-button[aria-disabled=true]{cursor:default;opacity:.75}.cw-tools .cw-button{font-size:13px;background:#2c5b6d;color:#fff7df;border-color:#a9c7cc;box-shadow:none}.cw-tools .cw-button:hover{background:#416e7e}.cw-viewport{position:relative;width:100%;height:640px;overflow:hidden;background:#b5e4ec}.cw-viewport canvas{display:block;width:100%;height:100%;outline-offset:-5px!important;touch-action:none}.cw-world-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.cw-world-label{position:absolute;transform:translate(-50%,-100%);pointer-events:auto;min-height:44px;min-width:44px;background:#fffcf0eb;color:#173c50;border:2px solid #345a6a;border-radius:11px;box-shadow:0 3px 0 #254b5733;padding:5px 10px;font:900 11px/1.25 var(--sans);max-width:145px;text-align:center;white-space:normal;cursor:pointer}.cw-world-label>span{display:block;font-size:10px;line-height:1;margin-top:4px;color:#b37d23}.cw-person-label{background:#214b5de8;color:#fff9e9;border-color:#fff9e9}.cw-person-label>span{color:#ffdb69}.cw-room-label{font-size:10px;max-width:105px;background:#fff3cdd9;padding:4px 7px}.cw-scroll-label{font-size:25px;background:#ffe295;border-color:#906b32;width:48px;height:48px;border-radius:50%;padding:3px;box-shadow:0 0 0 5px #ffe39a55,0 3px 0 #755a37;z-index:2}.cw-scroll-label>span{display:inline;font-size:12px}.cw-world-label:hover{filter:brightness(1.1);border-color:#21495d}.cw-welcome{position:absolute;left:38px;top:32px;bottom:32px;width:400px;background:#fffbedf2;border:3px solid #244d5e;border-radius:24px;padding:28px 28px 22px;box-shadow:6px 7px 0 #244d5e33;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.cw-chapter{display:block;font-size:10px;letter-spacing:1.5px;font-weight:900;color:#825523;line-height:1.5}.cw-welcome h2{font-size:3.1rem;margin:13px 0 14px;line-height:1.03}.cw-welcome p{font-size:16px;line-height:1.55;max-width:330px;margin:0}.cw-welcome-cast{display:flex;align-items:flex-end;justify-content:center;width:100%;height:151px;margin:10px 0 5px}.cw-welcome-cast img{width:30%;height:122px;object-fit:contain}.cw-welcome-cast img:nth-child(2){height:155px;width:40%}.cw-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;margin-top:22px}.cw-welcome .cw-actions{margin-top:5px;gap:10px;width:100%}.cw-welcome .cw-actions button:first-child{flex:1}.cw-welcome-note{font-size:11px;align-self:center;color:#4c6670;margin-top:16px;font-weight:800}.cw-loading{position:absolute;inset:0;display:grid;place-items:center;z-index:5;background:#e5f3ef;font-family:var(--display);font-size:26px;color:#224b5c}.cw-quest-pill{position:absolute;top:18px;left:18px;display:flex;align-items:center;gap:12px;padding:13px 18px;background:#fff9e6ed;border:2px solid #214c5e;border-radius:14px;box-shadow:3px 4px 0 #244d5e33;pointer-events:none;max-width:calc(100% - 36px)}.cw-quest-pill>span{font-size:32px;color:#956e32}.cw-quest-pill strong{display:block;font-size:17px;font-family:var(--display)}.cw-quest-pill div>span{display:block;font-size:12px;font-weight:900;color:#5d6a64}.cw-bubble{position:absolute;bottom:107px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(590px,calc(100% - 36px));padding:13px 19px 13px 58px;background:#fffcecf0;color:#173d50;border:2px solid #315667;border-radius:18px;box-shadow:0 4px 0 #32586944;pointer-events:none;z-index:3}.cw-bubble img{position:absolute;left:2px;bottom:0;width:55px;height:76px;object-fit:contain}.cw-bubble p{font-size:14px;line-height:1.5;margin:0}.cw-controls{position:absolute;bottom:18px;left:18px;right:18px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;pointer-events:none}.cw-controls button{pointer-events:auto}.cw-dpad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,43px);gap:5px}.cw-dpad button{width:48px;height:44px;background:#fff9ebdf;border:2px solid #224d5d;border-radius:10px;box-shadow:0 3px 0 #244d5e55;font-size:24px;font-weight:900;line-height:1;touch-action:none;user-select:none;-webkit-user-select:none}.cw-dpad button:active{background:#ffdd72}.cw-dpad button:first-child{grid-column:2}.cw-dpad button:nth-child(2){grid-column:1;grid-row:2}.cw-dpad button:nth-child(3){grid-column:2;grid-row:2}.cw-dpad button:nth-child(4){grid-column:3;grid-row:2}.cw-action-controls{display:flex;gap:12px;align-items:flex-end}.cw-action-controls .cw-button{background:#fff9ebe8;max-width:210px;min-height:50px}.cw-action-controls .cw-primary{background:#ffdc6a}.cw-bottom-bar{padding:12px 20px;display:flex;justify-content:space-between;align-items:center;gap:18px;background:#173f53;color:#d8e8e9;font-size:12px}.cw-bottom-bar kbd{font:800 11px var(--sans);background:#2b596a;border:1px solid #6c929e;border-radius:5px;padding:3px 5px;color:#fff7e1}.cw-bottom-bar .cw-button{font-size:13px;padding:8px 14px;flex-shrink:0}.cw-below{display:flex;justify-content:space-between;gap:24px;margin-top:28px;align-items:center}.cw-below p{font-size:14px;line-height:1.7;margin:0}.cw-below a{font-size:13px;min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:4px;flex-shrink:0}.cw-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;pointer-events:none}.cw-dialog{width:680px;max-width:calc(100% - 28px);max-height:calc(100dvh - 44px);padding:28px;background:#fffbee;border:3px solid #173c50;border-radius:24px;color:#173c50;box-shadow:8px 10px 0 #142f4566;overflow:auto;overscroll-behavior:contain}.cw-dialog::backdrop{background:#132f4777;backdrop-filter:blur(3px)}.cw-dialog-close{position:absolute;right:12px;top:12px;width:44px;height:44px;min-width:44px;min-height:44px;border:2px solid #2c5263;border-radius:50%;font-size:28px;line-height:1;background:#fffdf1;color:#173c50;z-index:2}.cw-dialog-head{display:flex;align-items:center;gap:16px;margin:0 32px 15px 0}.cw-dialog-head img{width:83px;height:108px;object-fit:contain;flex-shrink:0}.cw-dialog-head h2{font-family:var(--display);font-size:2.25rem;line-height:1.05;margin:9px 0 0}.cw-dialog p{font-size:16px;line-height:1.65;margin:0 0 18px}.cw-dialog h3{font-size:1.6rem;line-height:1.35}.cw-dialog .cw-note{font-size:14px}.cw-quote-scroll{padding:23px 25px;border:2px solid #c5a363;border-top:8px solid #dabb7d;border-bottom:8px solid #dabb7d;border-radius:14px;background:#fff3d5;margin:20px 0}.cw-dialog .cw-verse{font:700 21px/1.7 var(--sans);color:#163c50;margin:0;border:0;padding:0}.cw-dialog .cw-reference{font-size:17px;font-weight:900;margin:16px 0 5px}.cw-dialog .cw-translation{font-size:11px;margin:0}.cw-dialog-feedback:empty{display:none}.cw-dialog-feedback:not(:empty){background:#e1f0f2;border:2px solid #8ab5c4;border-radius:12px;padding:13px 16px;font-size:15px;line-height:1.6;margin:22px 0 0}.cw-dialog .cw-actions .cw-button{flex-grow:1}.cw-equal .cw-button{flex:1}.cw-phrase-slots{list-style:none;padding:0;margin:20px 0;display:grid;gap:10px}.cw-phrase-slots li{border:2px dashed #a8b8a4;background:#f5f2dd;border-radius:10px;overflow:hidden}.cw-phrase-slots li>span{display:block;padding:14px 16px;font-size:14px;color:#536d72}.cw-phrase-slots button{width:100%;min-height:48px;text-align:left;border:0;padding:14px 16px;background:#ffe79e;color:#153f50;font:800 17px/1.6 var(--sans)}.cw-phrase-slots small{display:block;font-size:11px;margin-top:8px}.cw-piece-bank{display:flex;flex-wrap:wrap;gap:12px}.cw-piece-bank button{min-height:48px;border:2px solid #214b5d;border-radius:11px;padding:12px 16px;background:#e6f2f3;color:#153f50;font:800 17px/1.5 var(--sans);text-align:left;box-shadow:2px 3px 0 #23495c33}.cw-lanterns{display:flex;justify-content:center;gap:24px}.cw-lanterns span{display:grid;place-items:center;width:55px;height:65px;border:3px solid #5b7172;border-radius:20px 20px 8px 8px;background:#d8e2dd;color:#657b7d;font-size:32px}.cw-lanterns span.lit{background:#ffdb61;color:#644712;border-color:#a3772f;box-shadow:0 0 22px #ffd76188}.cw-blank{display:inline-block;background:#d7eaf0;border-bottom:3px solid #234b60;border-radius:7px;min-width:70px;text-align:center;font-size:18px;padding:0 7px}.cw-word-choice{border:2px solid #a4c1c6;border-radius:14px;padding:13px 17px 19px;margin:16px 0;display:flex;gap:12px;flex-wrap:wrap;min-width:0}.cw-word-choice legend{font-size:14px;font-weight:900;padding:0 7px}.cw-word-choice .cw-button{flex:1}.cw-room-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:22px}.cw-room-choice{background:#e3f0ec;border:2px solid #345f69;border-radius:15px;padding:20px 15px;min-height:110px;color:#173c50;text-align:left;display:grid;grid-template-columns:35px 1fr;column-gap:10px;align-items:center}.cw-room-choice:nth-child(2n){background:#ffedbe}.cw-room-choice>span{grid-row:1/3;font-size:33px}.cw-room-choice strong{font:500 20px/1.15 var(--display)}.cw-room-choice small{font-size:11px;margin-top:9px}.cw-quest-list{display:grid;gap:12px;margin:20px 0}.cw-verse-choice{min-height:65px;border:2px solid #426271;border-radius:12px;background:#ffefc8;padding:14px 18px;color:#173c50;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left}.cw-verse-choice strong{font-size:18px;font-family:var(--display);font-weight:500}.cw-verse-choice span{font-size:12px}.cw-satchel-list{display:grid;gap:13px;padding-left:23px;font-size:17px;line-height:1.6}.cw-dialog details{margin-top:18px;padding:18px;background:#e5f0ed;border-radius:12px}.cw-dialog summary{min-height:44px;font-size:15px;cursor:pointer}.cw-dialog details .cw-verse{font-size:18px}.cw-quiet{display:flex;min-height:44px;align-items:center;margin-top:18px;font-size:14px;text-decoration:underline}.cw-big-shield{margin:5px auto 20px;width:105px;height:119px;display:grid;place-items:center;border:5px solid #856133;border-radius:20px 20px 50% 50%;background:#ffdc72;color:#795324;font-size:60px;box-shadow:0 0 0 5px #ffedae}.cw-dialog .cw-reward-copy{text-align:center;font-family:var(--display);font-size:24px;line-height:1.2}.cw-award{padding:14px;background:#ffdf86;border-radius:12px;border:2px solid #a3772f;font-weight:900}.cw-reflect{padding:22px;background:#e3efec;border-radius:15px;border:2px solid #a4c4c4;margin:23px 0}.cw-reflect h3{font-size:1.55rem;margin:12px 0}.cw-reflect p{font-size:13px;margin:0}.cw-dialog .cw-comic-link{font-size:13px;margin-top:20px}.cw-comic-link a{text-decoration:underline;display:inline-flex;min-height:44px;align-items:center}.cw-fallback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:30px;text-align:center;background:#e2f2ed}.cw-fallback h2{font-size:2.5rem;max-width:600px}.cw-fallback p{max-width:520px;font-size:18px}.cw-game [hidden]{display:none!important}.cw-dialog button:focus-visible,.cw-dialog a:focus-visible,.cw-dialog summary:focus-visible,.cw-game button:focus-visible,.cw-game canvas:focus-visible{outline:3px solid #075d7a;outline-offset:4px;box-shadow:0 0 0 4px white}.cw-dialog button,.cw-dialog a{touch-action:manipulation}
@media(min-width:1500px){.scripture-game:has(.cw-game){max-width:1500px}.cw-viewport{height:700px}}
@media(max-width:1000px){.cw-heading h1{font-size:2.5rem}.cw-welcome{left:24px;top:24px;bottom:24px;width:340px;padding:23px}.cw-welcome h2{font-size:2.7rem}.cw-welcome p{font-size:15px}.cw-topbar{padding:15px}.cw-tools .cw-button{font-size:12px;padding:9px 11px}.cw-title strong{font-size:20px}.cw-bottom-bar>span{font-size:11px}.cw-key-instructions{display:none}.cw-bottom-bar .cw-touch-instructions{display:block}.cw-below{flex-direction:column;align-items:flex-start;gap:10px}}
@media(max-width:650px){.cw-heading{align-items:flex-start;gap:12px;margin-top:8px;margin-bottom:20px;flex-direction:column}.cw-heading h1{font-size:2.25rem}.cw-heading .eyebrow{font-size:10px}.cw-heading>.sq-button{font-size:12px;padding:8px 13px;min-height:44px;box-shadow:2px 3px 0 var(--ink)}.cw-game{border-radius:18px;box-shadow:4px 5px 0 #bcd6dd}.cw-topbar{flex-wrap:wrap;padding:13px;gap:12px}.cw-title{gap:9px;width:100%}.cw-title strong{font-size:21px}.cw-title small{font-size:12px}.cw-title>span{font-size:29px}.cw-tools{width:100%;justify-content:space-between}.cw-tools .cw-button{padding:8px 15px;min-height:44px}.cw-viewport{height:590px}.cw-welcome{left:14px;right:14px;top:17px;bottom:17px;width:auto;padding:23px 19px;background:#fffbedef}.cw-welcome h2{font-size:2.8rem}.cw-welcome p{font-size:15px}.cw-welcome .cw-chapter{font-size:9px;letter-spacing:1px}.cw-welcome-cast{height:130px;margin-top:12px}.cw-welcome-cast img{height:107px}.cw-welcome-cast img:nth-child(2){height:135px}.cw-welcome .cw-actions{flex-wrap:nowrap}.cw-welcome .cw-button{font-size:13px;padding:10px 12px}.cw-quest-pill{top:12px;left:12px;padding:9px 12px;gap:9px}.cw-quest-pill>span{font-size:24px}.cw-quest-pill strong{font-size:16px}.cw-quest-pill div>span{font-size:11px}.cw-person-label{font-size:9px;max-width:96px;padding:5px}.cw-room-label{max-width:84px;font-size:8px}.cw-world-label{min-width:44px;min-height:44px}.cw-scroll-label{font-size:24px}.cw-controls{left:10px;right:10px;bottom:14px;gap:10px}.cw-dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px}.cw-dpad button{width:44px;height:44px}.cw-action-controls{flex-direction:column;gap:8px;align-items:stretch;width:calc(100% - 144px);max-width:170px}.cw-action-controls .cw-button{font-size:11px;min-height:44px;padding:7px 8px;line-height:1.3}.cw-bubble{bottom:123px;padding:11px 13px 11px 45px;max-width:calc(100% - 24px);width:calc(100% - 24px);border-radius:14px}.cw-bubble p{font-size:12px;line-height:1.45}.cw-bubble img{width:43px;height:65px}.cw-bottom-bar{padding:11px 12px;gap:13px}.cw-bottom-bar>span{font-size:10px;line-height:1.5}.cw-bottom-bar .cw-button{font-size:11px;padding:8px 10px}.cw-below p{font-size:13px}.cw-below a{font-size:12px}.cw-dialog{padding:21px 17px;border-radius:18px;max-height:calc(100dvh - 24px)}.cw-dialog-head{gap:10px;margin-right:20px}.cw-dialog-head img{width:57px;height:89px}.cw-dialog-head h2{font-size:1.85rem}.cw-dialog .cw-chapter{font-size:9px;letter-spacing:.8px}.cw-dialog-close{right:8px;top:8px;font-size:25px}.cw-dialog p{font-size:15px}.cw-quote-scroll{padding:17px 15px}.cw-dialog .cw-verse{font-size:18px}.cw-dialog .cw-translation{font-size:10px}.cw-dialog .cw-button{font-size:13px;padding:10px 12px}.cw-dialog .cw-actions{gap:10px}.cw-dialog .cw-note{font-size:12px}.cw-phrase-slots button,.cw-piece-bank button{font-size:15px;padding:12px}.cw-phrase-slots li>span{font-size:13px}.cw-room-menu{gap:10px}.cw-room-choice{padding:15px 11px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:135px}.cw-room-choice>span{font-size:24px}.cw-room-choice strong{font-size:17px}.cw-room-choice small{font-size:10px;margin-top:0}.cw-verse-choice{padding:12px 14px;flex-wrap:wrap;gap:5px}.cw-verse-choice strong{font-size:19px}.cw-verse-choice span{font-size:11px}.cw-reflect{padding:18px}.cw-reflect h3{font-size:1.4rem}.cw-dialog .cw-reward-copy{font-size:22px}.cw-word-choice{padding:11px;gap:9px}.cw-fallback{padding:22px}.cw-fallback h2{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.cw-game *,.cw-dialog *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.cw-touch-instructions{display:none}

.cw-continue{min-height:44px;border:0;background:none;color:#173c50;text-decoration:underline;font-size:12px;font-weight:800;align-self:center;margin-top:4px;padding:6px}
.cw-welcome:has(.cw-continue) .cw-welcome-cast{height:110px}.cw-welcome:has(.cw-continue) .cw-welcome-cast img{height:95px}.cw-welcome:has(.cw-continue) .cw-welcome-cast img:nth-child(2){height:115px}.cw-welcome:has(.cw-continue) .cw-welcome-note{margin-top:5px}

/* Walk the castle at character height. */
.cw-topbar{flex-wrap:wrap}.cw-tools{flex-wrap:wrap;align-items:center}.cw-view-switch{display:flex;gap:0;border:1px solid #9ab4be;border-radius:11px;overflow:hidden}.cw-view-switch .cw-button{border:0;border-radius:0;min-height:44px;font-size:14px}.cw-view-switch .cw-button[aria-pressed=true]{background:#ffdb6a;color:#173c50}.cw-viewport{height:clamp(580px,72vh,800px)}.cw-viewport canvas{cursor:grab}.cw-viewport canvas:active{cursor:grabbing}.cw-location{position:absolute;top:16px;right:18px;background:#173f53df;border:1px solid #afcbd0;border-radius:12px;padding:12px 16px;color:#fff5dc;font-size:14px;font-weight:800;pointer-events:none}.cw-crosshair{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:500 22px Arial;color:#fffbe5;text-shadow:0 1px 3px #153e4b;pointer-events:none}.cw-look-controls{display:flex;gap:8px;pointer-events:auto}.cw-look-controls button{width:48px;height:48px;border:2px solid #244d60;border-radius:12px;background:#fff9ebed;color:#244d60;font-size:29px;touch-action:none;cursor:pointer}.cw-controls{align-items:flex-end}.cw-bubble{bottom:125px}.cw-person-label{font-size:14px}.cw-room-label{font-size:13px}.cw-welcome h2{font-size:2.8rem}.cw-game button:focus-visible{outline:3px solid #11708e;outline-offset:3px;box-shadow:0 0 0 5px white}
@media(max-width:760px){.cw-topbar{gap:12px}.cw-tools{width:100%;gap:8px}.cw-view-switch{margin-right:auto}.cw-tools .cw-button{font-size:12px;padding:8px 10px}.cw-location{top:90px;right:12px;font-size:12px;padding:9px 12px}.cw-viewport{height:600px}.cw-controls{flex-wrap:wrap;gap:10px}.cw-look-controls{position:absolute;left:0;bottom:106px}.cw-look-controls button{width:44px;height:44px}.cw-bubble{bottom:172px;max-width:calc(100% - 24px)}.cw-action-controls{margin-left:auto;width:calc(100% - 145px)}.cw-person-label{font-size:12px}.cw-welcome h2{font-size:2.45rem}.cw-welcome .cw-chapter{font-size:10px}.cw-welcome-note{font-size:12px}}
.cw-controls{display:grid;grid-template-columns:154px minmax(0,1fr);align-items:end}.cw-look-controls{position:absolute;left:0;bottom:108px}.cw-action-controls{justify-self:end;margin-left:0;width:auto}.cw-bubble{bottom:187px}
@media(max-width:760px){.cw-controls{grid-template-columns:138px minmax(0,1fr);gap:10px}.cw-dpad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px}.cw-dpad button{width:44px;height:44px}.cw-action-controls{width:auto;max-width:170px;flex-direction:column}.cw-look-controls{bottom:106px}.cw-bubble{bottom:179px}}
.cw-viewport{height:clamp(440px,calc(100dvh - 210px),740px)}
@media(max-width:650px){.cw-tools{display:grid;grid-template-columns:1fr 1fr;width:100%}.cw-view-switch{grid-column:1/-1;width:100%}.cw-view-switch .cw-button{flex:1;font-size:14px}.cw-tools>.cw-button{font-size:13px}.cw-viewport{height:clamp(430px,calc(100dvh - 275px),640px)}.cw-welcome{padding:18px}.cw-welcome h2{font-size:2.25rem}.cw-welcome-cast{height:105px}.cw-welcome-cast img{height:92px}.cw-welcome-cast img:nth-child(2){height:108px}.cw-welcome-note{margin-top:10px}.cw-welcome p{font-size:15px}.cw-welcome:has(.cw-continue) .cw-welcome-cast{height:75px}.cw-welcome:has(.cw-continue) .cw-welcome-cast img{height:70px}.cw-welcome:has(.cw-continue) .cw-welcome-cast img:nth-child(2){height:83px}}
.cw-welcome{overflow:auto}.cw-welcome>*{flex-shrink:0}

/* Match instructions to the input device, including small desktop windows. */
.cw-bottom-bar .cw-key-instructions{display:inline;line-height:1.9}.cw-bottom-bar .cw-touch-instructions{display:none}
@media(pointer:fine){.cw-viewport canvas,.cw-viewport canvas:active{cursor:crosshair}.cw-viewport[data-mouse-look=locked] canvas{cursor:none}}
@media(pointer:coarse){.cw-bottom-bar .cw-key-instructions{display:none}.cw-bottom-bar .cw-touch-instructions{display:inline}}

/* The kingdom hunt: a readable quest HUD, map, and tangible scroll inventory. */
.cw-game{border-color:#103c4b;background:#103c4b;box-shadow:7px 8px 0 #81afb4}.cw-topbar{background:#123f50}.cw-title strong{color:#ffe18a}.cw-welcome{background:#fffbedf7;top:22px;bottom:22px}.cw-welcome .cw-welcome-cast{height:108px}.cw-welcome .cw-welcome-cast img{height:95px}.cw-welcome .cw-welcome-cast img:nth-child(2){height:118px}.cw-welcome .cw-quiet{background:transparent;border:0;box-shadow:none;min-height:36px;padding:5px;font-size:13px;width:100%}.cw-welcome-note{text-align:center;line-height:1.5}
.cw-minimap{position:absolute;right:16px;top:16px;width:148px;padding:6px;background:#163f4ded;border:2px solid #efdaa0;border-radius:16px;color:#fff5d9;box-shadow:0 4px 0 #11313c55;cursor:pointer}.cw-map{width:100%;height:auto;display:block;overflow:visible}.cw-minimap>span{display:block;font-size:12px;font-weight:800;margin:3px 0}.cw-map-player{transform-box:view-box}.cw-location{top:195px;right:16px;padding:8px 11px;font-size:12px;max-width:180px;text-align:right;background:#174554dc}.cw-trail{position:absolute;top:108px;left:18px;display:flex;align-items:center;gap:10px;max-width:calc(100% - 195px);padding:10px 13px;background:#173f50eb;color:#fff5dc;border:1px solid #ecc975;border-radius:13px;pointer-events:none}.cw-trail>span{font-size:29px;font-weight:900;color:#ffda5e;line-height:1;display:block}.cw-trail strong,.cw-trail small{display:block}.cw-trail strong{font-size:14px}.cw-trail small{font-size:12px;margin-top:3px;line-height:1.4}.cw-quest-pill{max-width:calc(100% - 195px);background:#fff3cce8}.cw-quest-pill strong{font-size:15px}.cw-quest-pill div>span{font-size:12px}.cw-pickup-prompt{position:absolute;top:calc(50% + 28px);left:50%;transform:translateX(-50%);padding:9px 14px;background:#ffe18a;color:#273e42;font-weight:900;border:2px solid #6c5328;border-radius:10px;font-size:14px;white-space:nowrap;pointer-events:none}.cw-scroll-label{width:auto;min-width:68px;height:auto;font-size:26px;padding:7px 12px;border-radius:14px;background:#fff0ae;box-shadow:0 0 0 5px #ffe39a66,0 4px 0 #805b2e}.cw-scroll-label>span{display:block;font-size:12px;font-weight:900;line-height:1.3}.cw-scroll-label.is-near{background:#ffe26b;border-color:#553c20;box-shadow:0 0 0 6px #ffe27688,0 4px 0 #805b2e}.cw-bubble{bottom:205px;max-width:min(530px,calc(100% - 36px))}.cw-bubble p{font-size:14px}.cw-action-controls{flex-direction:column;gap:8px}.cw-action-controls .cw-button{min-height:44px;padding:8px 15px;font-size:14px}.cw-action-controls [data-cw=jump]{background:#bee9e1}.cw-look-controls{bottom:108px}.cw-bottom-bar{padding:12px 16px}.cw-key-instructions{max-width:740px}
.cw-quest-progress{background:#f5edcf;border-top:2px solid #1e4a58;padding:14px 20px;display:flex;gap:22px;align-items:center;justify-content:space-between}.cw-stages{display:flex;gap:16px;list-style:none;margin:0;padding:0;color:#6a776b}.cw-stages li{display:flex;gap:7px;align-items:center;font-size:15px;font-weight:900;line-height:1.2}.cw-stages li>span{font-size:12px;max-width:66px;font-weight:800}.cw-stages .is-current{color:#94610b}.cw-stages .is-current>span{color:#3e3d27}.cw-stages .is-done{color:#287457}.cw-inventory-strip{display:flex;gap:6px;align-items:center}.cw-pocket{width:48px;min-height:56px;border:2px dashed #acac8f;border-radius:10px;background:#e8e3c7;color:#7a816e;padding:4px}.cw-pocket>span{display:block;font-size:23px;font-weight:800}.cw-pocket>small{display:block;font-size:10px;font-weight:800}.cw-pocket.is-filled{border:2px solid #ae7928;background:#ffdf82;color:#614622;box-shadow:0 2px 0 #d4a84c}.cw-inventory-strip>.cw-button{font-size:13px;max-width:145px}
.cw-mission-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.cw-mission-steps>div{background:#e8efdf;border:1px solid #b9ceb7;border-radius:13px;padding:16px}.cw-mission-steps b{display:grid;place-items:center;width:30px;height:30px;background:#20566a;color:#ffdf79;border-radius:50%;margin-bottom:10px}.cw-mission-steps strong,.cw-mission-steps span{display:block;line-height:1.5}.cw-mission-steps strong{font-size:15px}.cw-mission-steps span{font-size:13px;margin-top:4px}.cw-dialog details{padding:12px 16px;border:1px solid #cfc6a6;border-radius:12px;margin:18px 0}.cw-dialog summary{cursor:pointer;font-weight:800}.cw-map-layout{display:grid;grid-template-columns:1fr 1fr;gap:25px;align-items:center;margin:20px 0 28px}.cw-map-large{max-height:300px}.cw-map-legend p{font-size:14px;line-height:1.8}.cw-quest-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px}.cw-quest-card{position:relative;display:flex;text-align:left;align-items:flex-start;gap:14px;padding:18px;border:2px solid #c4cab3;border-top:7px solid var(--quest-color);border-radius:15px;background:#fffdf2;cursor:pointer;color:#204657;min-height:195px}.cw-quest-card:hover{border-color:#326477;background:#f2f4df}.cw-quest-card img{width:52px;height:83px;object-fit:contain;object-position:top}.cw-quest-card small,.cw-quest-card strong,.cw-quest-card span>span,.cw-quest-card b{display:block}.cw-quest-card small{font-size:12px;color:#657451;margin-bottom:7px}.cw-quest-card strong{font:400 21px/1.2 var(--display)}.cw-quest-card span>span{font-size:13px;line-height:1.5;margin:10px 0}.cw-quest-card b{font-size:13px;color:#276c76}.cw-quest-number{position:absolute;left:24px;top:110px;width:26px;height:26px;border-radius:50%;background:var(--quest-color);font-weight:900;text-align:center;line-height:26px}.cw-inventory-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:20px 0}.cw-inventory-card{padding:20px;border:2px solid #c9a657;border-radius:13px;background:#fff0be;box-shadow:0 4px 0 #d5ba78}.cw-inventory-card>span{font-size:28px;color:#9e711f}.cw-inventory-card p{font-size:17px;line-height:1.55;margin:10px 0}.cw-inventory-card small{font-size:12px;line-height:1.5;display:block}.cw-inventory-card.is-missing{background:#edf0e1;border:2px dashed #bdc6ac;box-shadow:none;color:#5f735c}.cw-inventory-card.is-missing p{font-size:14px}.cw-inventory-card .cw-button{font-size:13px;padding:6px 12px;margin-top:10px}.cw-phrase-slots li>span{border:2px dashed #b9c5a5;background:#edf1df;border-radius:12px}.cw-piece-bank button{background:#ffe6a2;border:2px solid #af8135;box-shadow:0 3px 0 #b69354;font-size:16px}
@media(max-width:900px){.cw-quest-progress{flex-direction:column;gap:13px}.cw-stages{width:100%;justify-content:space-around}.cw-inventory-strip{flex-wrap:wrap;justify-content:center}.cw-minimap{width:118px}.cw-location{top:164px}.cw-trail,.cw-quest-pill{max-width:calc(100% - 164px)}.cw-trail{left:14px}}
@media(max-width:650px){.cw-minimap{width:90px;right:10px;top:12px;padding:4px;border-radius:10px}.cw-minimap>span{font-size:10px}.cw-location{top:124px;right:10px;font-size:11px;max-width:96px;padding:6px}.cw-quest-pill{left:10px;top:12px;max-width:calc(100% - 119px);padding:10px;gap:6px}.cw-quest-pill>span{display:none}.cw-quest-pill strong{font-size:14px}.cw-trail{top:89px;left:10px;max-width:calc(100% - 119px);padding:9px;gap:7px}.cw-trail strong{font-size:12px}.cw-trail small{font-size:11px}.cw-trail>span{font-size:23px}.cw-scroll-label{min-width:56px;font-size:22px;padding:5px 8px}.cw-scroll-label>span{font-size:11px}.cw-bubble{bottom:189px;padding:10px 12px 10px 50px;max-width:calc(100% - 22px)}.cw-bubble p{font-size:12px}.cw-bubble img{width:46px}.cw-stages{gap:7px}.cw-stages li{font-size:14px;gap:4px}.cw-stages li>span{font-size:10px;max-width:48px}.cw-quest-progress{padding:12px}.cw-pocket{width:42px;min-height:49px}.cw-mission-steps{grid-template-columns:1fr;gap:8px;margin:16px 0}.cw-mission-steps>div{padding:12px 14px 12px 54px;position:relative}.cw-mission-steps b{position:absolute;left:12px;top:15px}.cw-mission-steps span{margin-top:2px}.cw-map-layout{grid-template-columns:1fr;gap:10px}.cw-map-legend{font-size:14px}.cw-map-legend p{margin:5px 0}.cw-quest-cards,.cw-inventory-cards{grid-template-columns:1fr}.cw-quest-card{min-height:160px}.cw-inventory-card{padding:14px}.cw-welcome h2{font-size:2.1rem}.cw-welcome .cw-welcome-cast{height:85px}.cw-welcome .cw-welcome-cast img{height:76px}.cw-welcome .cw-welcome-cast img:nth-child(2){height:90px}.cw-welcome-note{font-size:11px}.cw-welcome .cw-actions{gap:8px}.cw-welcome .cw-actions>.cw-button{font-size:14px}.cw-pickup-prompt{font-size:12px;padding:7px 10px}}

/* The visible aim point matches both locked and free-cursor pickup rays. */
.cw-crosshair{width:32px;height:32px;display:grid;place-items:center;border:3px solid #fffdf1;border-radius:50%;background:#12313e55;box-shadow:0 0 0 2px #143444,0 2px 8px #0006;z-index:4;color:#173c50;text-shadow:none;opacity:1}
.cw-crosshair::before{content:'';width:6px;height:6px;border-radius:50%;background:#fffdf1;box-shadow:0 0 0 1px #143444}
.cw-crosshair>span{display:none;font:900 22px/1 Arial}
.cw-crosshair.is-ready{width:38px;height:38px;border-color:#fff5c6;background:#ffdc60;box-shadow:0 0 0 3px #493a1b,0 0 0 7px #ffe26b66}
.cw-crosshair.is-ready::before{display:none}.cw-crosshair.is-ready>span{display:block}
.cw-pickup-prompt{z-index:4;max-width:calc(100% - 16px);text-align:center;background:#fff9e8;box-shadow:0 2px 8px #0003}
.cw-pickup-prompt.is-ready{background:#ffe18a}.cw-scroll-label.is-aimed{outline:3px solid #fffdf1;outline-offset:3px}
@media(pointer:fine){.cw-viewport[data-aim-visible=true] canvas,.cw-viewport[data-aim-visible=true] .cw-scroll-label.is-aimed{cursor:none}}

/* An atlas large enough to read, and optional riddle help that leaves exploration in charge. */
.cw-map-dialog{width:960px}.cw-map-layout{grid-template-columns:minmax(0,2fr) minmax(190px,1fr);gap:28px}.cw-map-large{height:min(530px,calc(100dvh - 260px));max-height:530px;filter:drop-shadow(0 6px 10px #3e482c22)}
.cw-riddle{padding:24px;background:#eaf0df;border:2px solid #abc1a0;border-radius:16px;margin:18px 0;display:flex;gap:16px;align-items:flex-start}.cw-riddle>span{color:#9a7535;font-size:36px;line-height:1}.cw-riddle p{font:500 23px/1.55 var(--display);margin:0}.cw-clue-help{border-left:4px solid #c9a458;background:#f6eccf;padding:18px;border-radius:5px 12px 12px 5px}.cw-clue-help p{margin:8px 0 14px}.cw-scroll-label{min-width:58px;font-size:21px;box-shadow:0 2px 5px #243c3933}.cw-scroll-label.is-near{box-shadow:0 0 0 3px #ffe27666,0 3px 0 #805b2e}
@media(max-width:650px){.cw-map-layout{grid-template-columns:1fr}.cw-map-large{height:auto;max-height:none}.cw-riddle{padding:18px;gap:10px}.cw-riddle p{font-size:20px}}
/* Discovery controls and a persistent collection, separate from Scripture pieces. */
.cw-tools{flex-wrap:wrap;justify-content:flex-end;gap:7px}.cw-tools .cw-button{padding:8px 11px}
.cw-climb-button{background:#ffdf88!important;border-color:#8a5d28;box-shadow:0 0 0 3px #ffdf8860}
.cw-action-controls{flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:65%}.cw-action-controls .cw-button{font-size:13px;padding:8px 12px;min-height:44px}
.cw-treasure-label{background:#ffe6a0;border-color:#926a28;border-radius:50%;width:49px;height:49px;font-size:22px;padding:2px;box-shadow:0 0 0 4px #ffdb7c33}.cw-treasure-label span{font-size:9px}
.cw-collection-totals{display:flex;gap:16px;margin:20px 0}.cw-collection-totals strong{flex:1;background:#ffebae;border:2px solid #bba167;border-radius:16px;padding:18px;font-size:26px;text-align:center}.cw-collection-totals small{display:block;font-size:12px;margin-top:5px}
.cw-collection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:22px}.cw-collection-card{border:2px dashed #a6b7a9;border-radius:15px;padding:18px;background:#edf0df}.cw-collection-card.is-found{background:#fff0bb;border:2px solid #c3a454}.cw-collection-card>span{display:block;font-size:30px;color:#947234;margin-bottom:9px}.cw-collection-card small{font-size:11px;font-weight:800}.cw-collection-card h3{font-size:20px;margin:7px 0 12px}.cw-collection-card p,.cw-collection-card summary{font-size:13px;line-height:1.6}.cw-collection-card summary{cursor:pointer;min-height:44px}.cw-collection-award{padding:16px;background:#284f58;color:#ffeaa7;border-radius:12px;margin-bottom:20px;text-align:center;font-weight:900}
@media(max-width:650px){.cw-topbar{gap:10px}.cw-tools{justify-content:flex-start}.cw-tools .cw-button{font-size:11px;padding:6px 8px}.cw-action-controls{max-width:50%;gap:5px}.cw-action-controls .cw-button{font-size:11px;padding:5px 9px;min-height:44px}.cw-collection-grid{grid-template-columns:1fr}.cw-collection-totals{gap:8px}.cw-collection-totals strong{padding:12px;font-size:22px}}

/* A field journal for stories, discoveries, and earned badges. */
.cw-journal-heading{padding:8px 35px 0 0}.cw-journal-heading h2{font:400 clamp(1.9rem,5vw,2.65rem)/1.1 var(--display);margin:10px 0 12px}.cw-journal-heading p{color:#46636a}
.cw-journal-totals{display:flex;gap:12px;padding:18px 20px;border-radius:14px;background:#204f59;color:#f9edd2;margin:22px 0}.cw-journal-totals span{flex:1;font-size:13px}.cw-journal-totals b{display:block;font:400 29px var(--display);color:#ffdc7a;margin-bottom:4px}
.cw-story-cards{display:grid;gap:12px}.cw-story-card{display:flex;gap:16px;align-items:center;text-align:left;padding:17px;border:2px solid #b5bc9a;border-radius:16px;background:#f2f1db;color:#193f4e;cursor:pointer;min-width:0}.cw-story-card:hover{background:#fff0b6;border-color:#9c783a}.cw-story-card>img{width:62px;height:100px;object-fit:contain}.cw-story-card>span{flex:1;min-width:0}.cw-story-card small{display:block;font:900 10px/1.6 var(--sans);letter-spacing:.7px;color:#576b42}.cw-story-card strong{display:block;font:400 23px/1.2 var(--display);margin:7px 0}.cw-story-card span>span{font:600 13px/1.6 var(--sans)}.cw-story-card>b{font-size:24px}.cw-story-card.is-complete{background:#e5efd9;border-color:#799d71}
.cw-journal-hints{display:flex;gap:16px;align-items:center;border-block:1px solid #d4c8a7;padding:20px 0;margin:24px 0}.cw-journal-hints>div{flex:1}.cw-journal-hints p{font-size:13px;line-height:1.6;margin:5px 0 0}.cw-journal-hints button{flex-shrink:0}.cw-journal-hints button[aria-pressed=true]{background:#ffdf88}
.cw-story-badges{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0 26px}.cw-story-badge{text-align:center;border:2px dashed #b7b999;border-radius:15px;background:#eeeeda;padding:18px 8px;display:flex;flex-direction:column;gap:9px}.cw-story-badge>span{font-size:38px;color:#789177}.cw-story-badge strong{font:900 13px/1.4 var(--sans)}.cw-story-badge small{font:600 11px/1.5 var(--sans)}.cw-story-badge.is-earned{border:2px solid #b28c43;background:#fff0b8}.cw-story-badge.is-earned>span{color:#9a651b}
.cw-discovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 22px}.cw-discovery{padding:18px;border:1px solid #c4c6a8;border-radius:12px;background:#f1f1df}.cw-discovery small{font:800 10px/1.6 var(--sans);text-transform:uppercase;letter-spacing:.6px;color:#596b4c}.cw-discovery h4{font:400 21px/1.25 var(--display);margin:8px 0}.cw-discovery.is-found{background:#e8f0dc;border-color:#9eb990}.cw-discovery p,.cw-discovery summary{font-size:13px;line-height:1.6}.cw-discovery p{margin:10px 0 0}.cw-discovery details{padding:0;border:0;margin:8px 0 0}.cw-discovery summary{min-height:44px;align-content:center}
.cw-story-steps{list-style:none;padding:0;display:grid;gap:12px;margin:24px 0}.cw-story-steps li{display:flex;align-items:center;gap:12px;font:700 15px/1.5 var(--sans);color:#566d64}.cw-story-steps b{width:32px;height:32px;display:grid;place-items:center;background:#e4e6d1;border:1px solid #b8c4a8;border-radius:50%;flex-shrink:0}.cw-story-steps .is-current{color:#173c50}.cw-story-steps .is-current b{background:#ffdf85;border-color:#be913f}.cw-story-steps .is-done{color:#34764b}.cw-story-objective{padding:18px 20px;border:2px solid #9fbb9d;border-radius:14px;background:#e9efdb}.cw-story-objective>small{display:block;font:900 10px var(--sans);letter-spacing:1px;margin-bottom:8px}.cw-story-objective>strong{font:400 23px/1.3 var(--display)}.cw-story-objective details{margin:14px 0 0;background:#fffbee}
.cw-supply-list{list-style:none;padding:0;display:grid;gap:10px}.cw-supply-list>li{padding:14px 17px;background:#fff0c8;border:1px solid #ccb16f;border-radius:11px}.cw-supply-list small{display:block;margin-top:7px;color:#44684a}.cw-supply-list details{margin:8px 0 0;padding:9px 0 0;border:0}.cw-supply-list summary,.cw-supply-list p{font-size:14px}.cw-supply-list summary{min-height:36px;align-content:center}.cw-supply-list p{margin:6px 0}.cw-region-checklist{list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:14px}.cw-story-earned{text-align:center;padding:24px;border:2px solid #bd9444;border-radius:20px;background:#ffecae;margin:22px 0}.cw-story-earned>span{display:block;font-size:68px;color:#8c651c}.cw-story-earned strong{font:400 28px var(--display)}.cw-story-earned p{margin:12px 0 0}.cw-story-label{background:#fff0b2;border-color:#aa7d39;font-size:20px;min-width:70px;max-width:145px}.cw-story-label>span{font-size:11px;line-height:1.3;color:#5c4623}.cw-story-label.is-aimed{outline:3px solid #fffbed;outline-offset:3px}
@media(max-width:650px){.cw-story-card{gap:10px;padding:13px}.cw-story-card>img{width:46px;height:83px}.cw-story-card strong{font-size:21px}.cw-journal-hints{align-items:flex-start;flex-direction:column;gap:12px}.cw-story-badges{gap:6px}.cw-story-badge{padding:13px 5px}.cw-story-badge strong{font-size:11px}.cw-story-badge small{font-size:10px}.cw-discovery-grid{grid-template-columns:1fr}.cw-region-checklist{grid-template-columns:1fr}.cw-journal-totals{padding:15px;gap:10px}}

/* (Character messages used to sit in the upper-left; they're the box along the bottom now: see the end.) */
.cw-bubble{top:18px;left:18px;bottom:auto;transform:none;width:400px;max-width:calc(100% - 195px);padding:13px 16px 13px 58px}
.cw-bubble img{top:8px;bottom:auto;max-height:calc(100% - 16px)}
@media(max-width:650px){
 .cw-bubble{top:12px;left:10px;width:calc(100% - 20px);max-width:none;padding:10px 12px 10px 50px}
}

/* Pause-menu settings: time of day, graphics and sound. */
.cw-settings{margin:18px 0 6px;padding:14px 16px;border:2px dashed #cdb98a;border-radius:16px;background:#fff6dc;display:grid;gap:8px}
.cw-settings h3{margin:0 0 2px;font-size:15px;color:#6b5230;letter-spacing:.04em;text-transform:uppercase}
.cw-bible-notice{margin:2px 2px 0;font-size:11px;line-height:1.45;color:#6b5a3a}
.cw-settings .cw-button{justify-content:flex-start;text-align:left;width:100%}
/* Festival adventures: a step checklist, reward toasts, friendly world labels and the journal's festival section */
.cw-tracker{position:absolute;left:18px;top:176px;width:268px;max-width:calc(100% - 195px);padding:11px 14px 10px;background:#fff9e6eb;border:2px solid #214c5e;border-radius:14px;box-shadow:3px 4px 0 #244d5e2e;color:#173d50;pointer-events:none;z-index:2}
.cw-tracker small{display:block;font:900 10px/1.4 var(--sans);letter-spacing:.07em;color:#9a6c35}
.cw-tracker strong{display:block;font:400 17px/1.2 var(--display);margin:2px 0 7px}
.cw-tracker ol{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.cw-tracker li{display:flex;gap:8px;align-items:baseline;font:700 12.5px/1.35 var(--sans);color:#6a7771}
.cw-tracker li b{flex:none;width:13px;text-align:center;color:#a2aaa4}
.cw-tracker li.is-current{color:#173d50;font-weight:900}.cw-tracker li.is-current b{color:#cf8a1d}
.cw-tracker li.is-done{color:#5d7f58}.cw-tracker li.is-done b{color:#4a8a45}
.cw-toast{position:absolute;left:50%;top:21%;transform:translateX(-50%);display:flex;gap:14px;align-items:center;width:max-content;min-width:250px;max-width:min(440px,calc(100% - 32px));padding:14px 22px 14px 18px;background:linear-gradient(#fffcee,#ffefbf);border:2px solid #d4a043;border-radius:18px;box-shadow:0 5px 0 #9a6c3540,0 12px 34px #0003;color:#173d50;pointer-events:none;z-index:5;opacity:0}
.cw-toast.is-showing{animation:cw-toast 3.4s ease both}
.cw-toast>span{font-size:36px;line-height:1;color:#cf8a1d}
.cw-toast strong{display:block;font:400 21px/1.2 var(--display)}
.cw-toast small{display:block;font:700 13px/1.4 var(--sans);color:#5b6a63;margin-top:3px}
@keyframes cw-toast{0%{opacity:0;transform:translate(-50%,16px) scale(.92)}9%{opacity:1;transform:translate(-50%,0) scale(1.04)}15%{transform:translate(-50%,0) scale(1)}84%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-12px)}}
.cw-festival-label{background:#fdeef2;border-color:#b0647a;font-size:18px;min-width:70px}
.cw-festival-label>span{font-size:11px;line-height:1.3;color:#7a3f52}
.cw-festival-label.is-aimed{outline:3px solid #fffbed;outline-offset:3px}
.cw-journal-lede{margin:-4px 0 14px;color:#46636a;font-size:14px;line-height:1.5}
.cw-dialog h3 small{font:800 13px var(--sans);color:#8a7a52;margin-left:6px}
.cw-journal-totals{flex-wrap:wrap}
.cw-story-card.is-locked{background:#f4f1e6;border-style:dashed;border-color:#c4b58e}
.cw-story-card.is-locked>img{filter:saturate(.55)}
.cw-story-badges{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}
.cw-story-steps .is-done{color:#4d7248}.cw-story-steps .is-done b{background:#d9ecd0;border-color:#8fb584;color:#3d7a37}
.cw-dialog-celebrate .cw-story-earned{animation:cw-earned .7s cubic-bezier(.2,1.4,.4,1) both}
.cw-dialog-celebrate .cw-story-earned>span{animation:cw-earned-icon 1.6s ease-in-out .4s 2}
@keyframes cw-earned{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes cw-earned-icon{0%,100%{transform:rotate(0) scale(1)}30%{transform:rotate(-10deg) scale(1.15)}60%{transform:rotate(8deg) scale(1.1)}}
@media(prefers-reduced-motion:reduce){.cw-toast.is-showing{animation:cw-toast-fade 3.4s linear both}.cw-dialog-celebrate .cw-story-earned,.cw-dialog-celebrate .cw-story-earned>span{animation:none}}
@keyframes cw-toast-fade{0%,88%{opacity:1}100%{opacity:0}}
@media(max-width:900px){.cw-tracker{max-width:calc(100% - 164px);left:14px}}
@media(max-width:650px){.cw-tracker{top:150px;left:10px;width:auto;max-width:calc(100% - 119px);padding:7px 10px}.cw-tracker strong{font-size:13px;margin-bottom:3px}.cw-tracker li:not(.is-current){display:none}.cw-toast{top:30%;min-width:0;padding:11px 15px;gap:10px}.cw-toast strong{font-size:17px}.cw-toast>span{font-size:28px}}
/* Playing together: other knights' name tags and bubbles, the room panel, the phrase picker and the join form */
.cw-knight-tags{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.cw-knight-tag{position:absolute;left:0;top:0;display:flex;flex-direction:column;align-items:center;gap:5px;will-change:transform}
.cw-knight-name{font:800 12px/1 var(--sans);padding:5px 9px;border-radius:999px;background:#fffcf0eb;color:#173c50;border:2px solid var(--knight,#173c50);box-shadow:0 2px 0 #173c5026;white-space:nowrap}
.cw-knight-say{position:relative;max-width:220px;padding:7px 11px;background:#fff;border:2px solid #173c50;border-radius:14px;color:#173c50;font:700 13px/1.3 var(--sans);text-align:center;box-shadow:0 3px 0 #173c5033;animation:cw-say .25s ease-out both}
.cw-knight-say::after{content:'';position:absolute;left:50%;bottom:-8px;width:12px;height:12px;background:#fff;border-right:2px solid #173c50;border-bottom:2px solid #173c50;transform:translateX(-50%) rotate(45deg)}
.cw-knight-say.is-emote{font-size:28px;line-height:1;padding:5px 9px}
@keyframes cw-say{from{transform:translateY(6px) scale(.9);opacity:0}}
.cw-together{position:absolute;right:16px;top:244px;width:292px;padding:10px 12px;background:#fff9e6f0;border:2px solid #214c5e;border-radius:14px;box-shadow:3px 4px 0 #244d5e2e;color:#173d50;z-index:3}
.cw-together-head{display:flex;gap:9px;align-items:center}
.cw-together-head small{display:block;font:900 10px/1.4 var(--sans);letter-spacing:.06em;color:#9a6c35}
.cw-together-head strong{display:block;font:400 16px/1.2 var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-together-head span{display:block;font:700 11.5px/1.4 var(--sans);color:#5b6a63}
.cw-knight-dot{display:inline-block;flex:none;width:14px;height:14px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #173c5055;vertical-align:-2px;margin-right:5px}
.cw-chat-log{list-style:none;margin:8px 0;padding:7px 0 0;border-top:1px solid #e3d6b5;display:grid;gap:3px;font:600 12.5px/1.35 var(--sans)}
.cw-chat-log li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-chat-log:empty{display:none}
.cw-together-head>div{flex:1;min-width:0}
.cw-together-leave{align-self:flex-start;min-height:32px;padding:4px 10px;border:2px solid #b9a67f;border-radius:999px;background:transparent;color:#6b5230;font:800 11.5px var(--sans);cursor:pointer}
.cw-together-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.cw-together-actions .cw-button{width:100%;justify-content:center;padding:7px 8px;font-size:12.5px;line-height:1.2;min-height:40px}
.cw-together-actions .cw-button[disabled]{opacity:.6;cursor:not-allowed}
.cw-phrases{position:absolute;left:50%;bottom:118px;transform:translateX(-50%);width:min(600px,calc(100% - 24px));padding:14px 14px 10px;background:#fffbee;border:3px solid #173c50;border-radius:18px;box-shadow:6px 8px 0 #142f4555;z-index:5}
.cw-phrase-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-right:34px}
.cw-phrase-tabs button{min-height:36px;padding:6px 11px;border:2px solid #b8c4a8;border-radius:999px;background:#f2f1db;color:#173c50;font:800 12.5px var(--sans);cursor:pointer}
.cw-phrase-tabs button[aria-selected="true"]{background:#ffdf85;border-color:#be913f}
.cw-phrase-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:7px;margin-top:11px}
.cw-phrase-list button{min-height:44px;padding:8px 10px;border:2px solid #345a6a;border-radius:12px;background:#fff;color:#173c50;font:700 13.5px/1.25 var(--sans);text-align:left;cursor:pointer}
.cw-phrase-list button:hover,.cw-phrase-list button:focus-visible{background:#fff0b6}
.cw-phrase-list.is-emotes{grid-template-columns:repeat(auto-fill,minmax(64px,1fr))}
.cw-phrase-list.is-emotes button{font-size:28px;text-align:center}
.cw-phrase-note{min-height:18px;margin:8px 2px 0;font:700 12.5px var(--sans);color:#9a4b2f}
.cw-phrase-close{position:absolute;top:9px;right:10px;width:36px;height:36px;border:2px solid #173c50;border-radius:50%;background:#fff;font-size:20px;line-height:1;cursor:pointer}
.cw-join{margin:18px 0 6px}
.cw-join label{display:block;font:900 12px var(--sans);letter-spacing:.05em;text-transform:uppercase;color:#6b5230;margin-bottom:8px}
.cw-join-row{display:flex;gap:10px;flex-wrap:wrap}
.cw-join input{flex:1;min-width:170px;min-height:52px;padding:8px 14px;border:3px solid #173c50;border-radius:14px;font:800 26px/1 var(--sans);letter-spacing:.22em;text-transform:uppercase;color:#173c50;background:#fff}
.cw-report-list{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px}
@media(max-width:900px){.cw-together{top:215px;right:12px;width:262px}}
@media(max-height:680px){.cw-chat-log{display:none}}
@media(max-width:650px){.cw-key-hint{display:none}.cw-together{top:148px;left:10px;right:auto;bottom:auto;width:min(250px,calc(100% - 120px));padding:7px 9px}.cw-together-head small,#cw-knight-count,.cw-chat-log{display:none}.cw-together-head strong{font-size:13.5px}.cw-together-actions .cw-button{min-height:36px;font-size:11.5px;padding:5px 6px}.cw-viewport:has(.cw-phrases:not([hidden])) .cw-together{visibility:hidden}.cw-viewport:has(.cw-together:not([hidden])) .cw-tracker{display:none}.cw-phrases{bottom:112px}.cw-phrase-list{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.cw-knight-say{animation:none}}
/* Minecraft-style touch controls on tablets and phones: a see-through D-pad on the left (slide your thumb
   across it; forward diagonals appear while walking forward; the center sprints) and big Jump / Use keys
   on the right. Drag anywhere else to look around. Mouse-and-keyboard computers keep the classic buttons. */
.cw-mc-pad,.cw-mc-right{display:none}
.cw-fullscreen-button span{font-size:1.05em}
@media(pointer:coarse){
 .cw-controls{inset:0;display:block;pointer-events:none}
 .cw-dpad,.cw-look-controls,.cw-classic-only{display:none!important}
 .cw-mc-pad{--mc:62px;display:grid;grid-template-columns:repeat(3,var(--mc));grid-template-rows:repeat(3,var(--mc));gap:5px;position:absolute;left:16px;bottom:16px;z-index:6;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
 .cw-mc-pad span{display:grid;place-items:center;border-radius:6px;border:2px solid rgba(255,255,255,.62);background:rgba(18,24,30,.36);box-shadow:inset 0 -4px 0 rgba(0,0,0,.28),0 1px 3px rgba(0,0,0,.25);color:#fff;font:800 calc(var(--mc)*.36)/1 system-ui,sans-serif;text-shadow:0 2px 0 rgba(0,0,0,.45);transition:background-color .06s,opacity .15s,transform .06s}
 .cw-mc-pad [data-mc=up]::before{content:'▲'}.cw-mc-pad [data-mc=down]::before{content:'▼'}.cw-mc-pad [data-mc=left]::before{content:'◀'}.cw-mc-pad [data-mc=right]::before{content:'▶'}
 .cw-mc-pad [data-mc=upleft]::before{content:'◤'}.cw-mc-pad [data-mc=upright]::before{content:'◥'}
 .cw-mc-pad .cw-mc-gap{visibility:hidden}
 .cw-mc-pad [data-mc=upleft],.cw-mc-pad [data-mc=upright]{opacity:0;transform:scale(.9)}
 .cw-mc-pad.is-forward [data-mc=upleft],.cw-mc-pad.is-forward [data-mc=upright]{opacity:1;transform:none}
 .cw-mc-pad .cw-mc-sneak{font-size:calc(var(--mc)*.19);letter-spacing:.06em;text-transform:uppercase;background:rgba(18,24,30,.22)}
 .cw-mc-pad span.is-active{background:rgba(255,255,255,.45);transform:translateY(2px);box-shadow:inset 0 -1px 0 rgba(0,0,0,.2)}
 .cw-mc-pad.is-sneaking .cw-mc-sneak{background:rgba(255,205,70,.7);color:#3a2a00;text-shadow:none}
 .cw-mc-right{display:flex;flex-direction:column;align-items:flex-end;gap:12px;position:absolute;right:16px;bottom:16px;z-index:6;pointer-events:auto}
 .cw-mc-button{display:grid;place-items:center;align-content:center;gap:3px;width:88px;height:88px;padding:0;border-radius:8px;border:2px solid rgba(255,255,255,.66);background:rgba(18,24,30,.36);box-shadow:inset 0 -5px 0 rgba(0,0,0,.28),0 1px 3px rgba(0,0,0,.25);color:#fff;font:800 30px/1 system-ui,sans-serif;text-shadow:0 2px 0 rgba(0,0,0,.45);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
 .cw-mc-button small{font:800 11px/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}
 .cw-mc-button.is-active{background:rgba(255,255,255,.45);transform:translateY(2px);box-shadow:inset 0 -1px 0 rgba(0,0,0,.2)}
 .cw-mc-use{width:72px;height:72px;font-size:26px}
 .cw-mc-button:focus-visible{outline:3px solid #ffd65a;outline-offset:2px}
 /* Door, climb and clue buttons stack above the big keys. */
 .cw-action-controls{position:absolute;right:16px;bottom:200px;width:auto;max-width:190px;margin:0;flex-direction:column;align-items:stretch;gap:8px;pointer-events:auto}
}
@media(pointer:coarse) and (max-height:560px){
 .cw-mc-pad{--mc:50px;left:10px;bottom:10px;gap:4px}
 .cw-mc-right{right:10px;bottom:10px;gap:8px}.cw-mc-button{width:70px;height:70px;font-size:24px}.cw-mc-use{width:58px;height:58px;font-size:21px}
 .cw-action-controls{right:10px;bottom:150px}.cw-action-controls .cw-button{min-height:36px;padding:6px 10px;font-size:12px}
 .cw-location{display:none}
}
/* Full screen (and the iPhone stand-in that fills the window): the game takes the whole screen, with a
   compact top bar, and the hint bar below the view is trimmed down. */
html.cw-lock-scroll,html.cw-lock-scroll body{overflow:hidden;overscroll-behavior:none}
.cw-game:fullscreen,.cw-game.is-immersive{display:flex;flex-direction:column;width:100vw;height:100vh;height:100dvh;border:0;border-radius:0;box-shadow:none;margin:0}
.cw-game:-webkit-full-screen{display:flex;flex-direction:column;width:100vw;height:100vh;border:0;border-radius:0}
.cw-game.is-immersive{position:fixed;inset:0;z-index:1000}
.cw-game:fullscreen .cw-viewport,.cw-game.is-immersive .cw-viewport{flex:1 1 auto;height:auto;min-height:0}
.cw-game:-webkit-full-screen .cw-viewport{flex:1 1 auto;height:auto;min-height:0}
.cw-game:fullscreen .cw-topbar,.cw-game.is-immersive .cw-topbar{padding:8px 12px;gap:10px}
.cw-game:fullscreen .cw-bottom-bar,.cw-game.is-immersive .cw-bottom-bar{padding:6px 12px}
.cw-game:fullscreen .cw-bottom-bar>span,.cw-game.is-immersive .cw-bottom-bar>span{display:none!important}
@media(max-height:560px){
 .cw-game:fullscreen .cw-title,.cw-game.is-immersive .cw-title{display:none}
 .cw-game:fullscreen .cw-topbar,.cw-game.is-immersive .cw-topbar{flex-wrap:nowrap;overflow-x:auto;padding:5px 8px}
 .cw-game:fullscreen .cw-tools,.cw-game.is-immersive .cw-tools{flex-wrap:nowrap;width:auto}
 .cw-game:fullscreen .cw-tools .cw-button,.cw-game.is-immersive .cw-tools .cw-button{min-height:34px;padding:5px 9px;font-size:12px;white-space:nowrap}
 .cw-game:fullscreen .cw-bottom-bar,.cw-game.is-immersive .cw-bottom-bar{display:none}
}
/* Lord Porky's duel: a bar across the top (hearts, round, tip, helmet bops), big round banners, a red
   flash when Sir Bacon is bonked, and Swing / Shield keys on touch screens. */
.cw-duel{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:5;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;width:min(660px,calc(100% - 28px));padding:8px 14px;background:#fffcecf0;color:#173d50;border:2px solid #315667;border-radius:16px;box-shadow:0 4px 0 #32586944;pointer-events:none}
.cw-duel-side{display:flex;align-items:center;gap:8px;font-size:24px;line-height:1;letter-spacing:2px;white-space:nowrap}
.cw-duel-side img{width:40px;height:48px;object-fit:contain}
.cw-duel-side #cw-duel-hearts{color:#d0453a}.cw-duel-side #cw-duel-dings{color:#e0a310}
.cw-duel-mid{display:grid;justify-items:center;gap:2px;text-align:center;min-width:0}
.cw-duel-mid strong{font:800 15px/1.2 var(--display,inherit);letter-spacing:.06em;text-transform:uppercase}
.cw-duel-mid small{font-size:13px;line-height:1.3}
.cw-duel-mid .cw-key-hint{font-size:11px;opacity:.75}
.cw-duel-banner{position:absolute;top:38%;left:50%;transform:translate(-50%,-50%);z-index:6;display:grid;justify-items:center;gap:6px;padding:16px 30px;background:#173d50e8;color:#fff7d6;border:3px solid #ffd65a;border-radius:20px;text-align:center;pointer-events:none;animation:cw-banner-in .28s ease-out}
.cw-duel-banner strong{font-size:clamp(28px,5vw,46px);line-height:1;letter-spacing:.02em}
.cw-duel-banner small{font-size:15px;max-width:34ch}
@keyframes cw-banner-in{from{transform:translate(-50%,-50%) scale(.8);opacity:0}}
.cw-viewport.is-hurt::after{content:'';position:absolute;inset:0;z-index:4;pointer-events:none;box-shadow:inset 0 0 90px 30px rgba(210,40,30,.55)}
.cw-game.is-dueling .cw-trail,.cw-game.is-dueling .cw-tracker,.cw-game.is-dueling .cw-quest-pill,.cw-game.is-dueling .cw-location,.cw-game.is-dueling .cw-bubble{display:none!important}
.cw-mc-swing,.cw-mc-shield,.cw-mc-dodge{display:none!important}
@media(pointer:coarse){
 .cw-duel-mid .cw-key-hint{display:none}
 .cw-game.is-dueling .cw-mc-use{display:none}
 .cw-game.is-dueling .cw-mc-swing,.cw-game.is-dueling .cw-mc-shield,.cw-game.is-dueling .cw-mc-dodge{display:grid!important}
 .cw-mc-swing{background:rgba(160,40,30,.45)}.cw-mc-shield{background:rgba(190,140,20,.45)}.cw-mc-dodge{background:rgba(40,110,170,.45)}
 .cw-game.is-dueling .cw-mc-right{flex-direction:row;align-items:flex-end}
}
@media(max-width:640px){.cw-duel{gap:8px;padding:6px 10px}.cw-duel-side{font-size:18px;letter-spacing:1px}.cw-duel-side img{width:30px;height:36px}.cw-duel-mid small{display:none}}
/* Phones held upright: the duel bar spans the screen under the top buttons (the ring needs no map), and the
   four fight buttons sit in a 2 × 2 block so they and the move pad both fit. */
@media(pointer:coarse) and (max-width:560px){
 .cw-game.is-dueling .cw-minimap{display:none}
 .cw-game.is-playing .cw-duel{width:calc(100% - 20px);gap:6px;padding:5px 8px}
 .cw-duel-side{font-size:16px;letter-spacing:0}.cw-duel-side img{display:none}.cw-duel-mid strong{font-size:12px}
 .cw-game.is-dueling .cw-mc-pad{--mc:50px;gap:4px;left:calc(10px + env(safe-area-inset-left))}
 .cw-game.is-dueling .cw-mc-right{display:grid;grid-template-columns:repeat(2,64px);gap:8px;right:calc(10px + env(safe-area-inset-right))}
 .cw-game.is-dueling .cw-mc-button{width:64px;height:64px;font-size:22px}
}
/* Phones on their side, not full screen: while playing, the frame fits the window so the buttons along its
   bottom stay on screen (its border is 3px each side). */
@media(pointer:coarse) and (max-height:560px){.cw-game.is-playing:not(.is-fullscreen) .cw-viewport{height:calc(100dvh - 6px)}}
.cw-duel-help{margin:14px 0;padding:14px 18px;background:#fff6d8;border:2px solid #e3c76f;border-radius:14px}
.cw-duel-help ul{margin:8px 0 6px;padding-left:20px;display:grid;gap:6px}
/* Porky's level: three big choices, the chosen one highlighted. */
.cw-duel-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 0;padding:0;border:0}
.cw-duel-levels legend{margin-bottom:8px;padding:0;font-weight:800}
.cw-duel-levels .cw-button{display:grid;justify-items:center;align-content:center;gap:3px;min-height:64px;padding:8px 10px;text-align:center;white-space:normal}
.cw-duel-levels .cw-button small{font-size:12px;font-weight:600;line-height:1.25;opacity:.85}
@media(max-width:560px){.cw-duel-levels{grid-template-columns:1fr}.cw-duel-levels .cw-button{min-height:48px}}
/* Lord Porky's torn map and cipher wheel in the journal. */
.cw-challenge{display:grid;gap:14px;margin:4px 0 18px}
.cw-torn-map{width:100%;max-width:560px;height:auto;border-radius:12px;border:3px solid #6b5332;box-shadow:0 4px 0 #6b533255;background:#e9d5a6}
.cw-cipher{display:grid;gap:10px;padding:14px 16px;background:#fff6d8;border:2px dashed #b3924f;border-radius:14px}
.cw-cipher small{font-weight:800;letter-spacing:.08em;color:#8e5428}
.cw-cipher-text{display:block;font:700 15px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;word-break:break-word;white-space:normal;color:#5a2b00}
.cw-cipher-text.is-decoded{color:#173d50;background:#fffcec;border-radius:10px;padding:8px 10px}
.cw-cipher-wheel{display:flex;align-items:center;justify-content:center;gap:14px}
.cw-cipher-wheel span{font-weight:700}.cw-cipher-wheel b{display:inline-block;min-width:2ch;text-align:center;font-size:20px}
.cw-duel-only{display:none}.cw-game.is-dueling .cw-duel-only{display:inline-flex}
@media(pointer:coarse){.cw-game.is-dueling .cw-duel-only{display:none}}
/* Phones: everything but the play controls tucks away. The top bar folds into a ☰ menu, the minimap
   shrinks, and the checklist, hint bar and place label step aside, so the kingdom gets the screen. */
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-game{position:relative}
 .cw-topbar,.cw-bottom-bar,.cw-tracker,.cw-location,.cw-quest-progress,.cw-quest-pill{display:none!important}
 .cw-phone-only{display:inline-flex}
 .cw-minimap{width:84px;top:8px;right:8px;padding:4px;border-radius:12px}
 .cw-minimap span{display:none}
 .cw-bubble{top:8px;left:60px;right:auto;width:auto;max-width:calc(100% - 170px);padding:7px 10px 7px 40px;font-size:12px;line-height:1.35;border-radius:12px}
 .cw-bubble img{width:30px}
 .cw-trail{top:58px;left:8px;max-width:46%;padding:6px 9px;gap:7px;font-size:11px}
 .cw-trail small{display:none}
 .cw-together{top:auto;bottom:10px;left:50%;right:auto;transform:translateX(-50%);width:min(300px,42%);padding:6px 9px;font-size:12px}
 .cw-together .cw-chat-log{display:none}
 .cw-action-controls .cw-button[data-cw="guide"]{display:none}
 .cw-action-controls{bottom:190px}
 .cw-duel{top:8px;width:min(520px,calc(100% - 200px))}
}
/* Hide and seek: the round banner, and the seeker's no-peeking cover while everyone hides. */
.cw-hideseek{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:5;display:grid;justify-items:center;gap:2px;min-width:220px;max-width:min(560px,calc(100% - 300px));padding:8px 16px;background:#173f53ee;color:#fff7d6;border:2px solid #ffd65a;border-radius:14px;text-align:center;pointer-events:none}
.cw-hideseek strong{font-size:18px;letter-spacing:.02em}.cw-hideseek small{font-size:13px;color:#e8f1e8}
.cw-hs-cover{position:absolute;inset:0;z-index:2;display:grid;place-content:center;justify-items:center;gap:10px;background:radial-gradient(circle at 50% 45%,#23566d,#0d2530 70%);color:#fff7d6;text-align:center;padding:20px}
.cw-hs-cover strong{font-size:clamp(24px,4vw,40px)}.cw-hs-cover span{font-size:clamp(64px,14vw,140px);font-weight:900;line-height:1;color:#ffd65a}.cw-hs-cover small{font-size:16px}
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){.cw-hideseek{top:58px;max-width:60%;min-width:0;padding:5px 10px}.cw-hideseek strong{font-size:14px}.cw-hideseek small{font-size:11px}}
/* The round banner steps below a speech bubble so the two never overlap. */

/* Full screen on phones runs under the notch and home bar (viewport-fit=cover); everything you touch or
   read keeps clear of them. The insets are zero everywhere else. */
@media(pointer:coarse){
 .cw-mc-pad{left:calc(16px + env(safe-area-inset-left));bottom:calc(16px + env(safe-area-inset-bottom))}
 .cw-mc-right{right:calc(16px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom))}
 .cw-action-controls{right:calc(16px + env(safe-area-inset-right));bottom:calc(200px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse) and (max-height:560px){
 .cw-mc-pad{left:calc(10px + env(safe-area-inset-left));bottom:calc(10px + env(safe-area-inset-bottom))}
 .cw-mc-right{right:calc(10px + env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom))}
 .cw-action-controls{right:calc(10px + env(safe-area-inset-right));bottom:calc(150px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-minimap{top:calc(8px + env(safe-area-inset-top));right:calc(8px + env(safe-area-inset-right))}
 .cw-bubble{top:calc(8px + env(safe-area-inset-top));left:calc(60px + env(safe-area-inset-left))}
 .cw-trail{top:calc(58px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left))}
 .cw-together{bottom:calc(10px + env(safe-area-inset-bottom))}
 .cw-action-controls{bottom:calc(190px + env(safe-area-inset-bottom))}
 .cw-duel{top:calc(8px + env(safe-area-inset-top))}
 .cw-hideseek{top:calc(58px + env(safe-area-inset-top))}

}
/* Minecraft-style play: once play starts, the bars around the game step aside and everything lives in the
   game menu (Esc, or the ☰ button). Computers drop the on-screen walking buttons for the keyboard and mouse. */
.cw-menu-button{display:none}
.cw-game.is-playing .cw-topbar,.cw-game.is-playing .cw-bottom-bar{display:none!important}
.cw-game.is-playing .cw-menu-button{display:grid;place-items:center;position:absolute;top:16px;left:16px;z-index:20;width:44px;height:44px;padding:0;border-radius:10px;border:2px solid rgba(255,255,255,.7);background:rgba(18,32,40,.55);color:#fff;font:700 22px/1 system-ui,sans-serif;box-shadow:0 2px 6px rgba(0,0,0,.3);cursor:pointer}
.cw-game.is-playing .cw-menu-button:hover{background:rgba(18,32,40,.8)}
.cw-game.is-playing .cw-quest-pill,.cw-game.is-playing .cw-bubble{left:72px}
.cw-game.is-playing .cw-bubble{max-width:calc(100% - 251px)}
@media(max-width:650px){.cw-game.is-playing .cw-menu-button{top:12px;left:10px}.cw-game.is-playing .cw-quest-pill{left:62px;max-width:calc(100% - 171px)}.cw-game.is-playing .cw-bubble{left:62px;width:calc(100% - 72px);max-width:none}}
@media(pointer:fine){.cw-game.is-playing .cw-dpad,.cw-game.is-playing .cw-look-controls,.cw-game.is-playing [data-cw="jump"],.cw-game.is-playing [data-cw="interact"].is-idle,.cw-game.is-playing .cw-action-controls [data-cw="guide"]{display:none}}
.cw-together .cw-chat-log{display:none}
/* F1 hides everything but the world, as in Minecraft. */
.cw-game.is-hud-hidden .cw-viewport>:not(canvas):not(.cw-hs-cover):not(.cw-loading):not(.cw-chat-dock),.cw-game.is-hud-hidden .cw-chat{visibility:hidden}
/* Chat: lines fade at the bottom left; the bar opens beneath them. On touch screens the lines sit up top,
   clear of the D-pad, and the bar opens over the controls. */
.cw-chat-dock{display:contents}
.cw-chat{position:absolute;left:10px;top:112px;z-index:5;display:grid;width:min(420px,calc(100% - 20px));margin:0;padding:0;list-style:none;pointer-events:none;font:600 13px/1.45 var(--sans)}
.cw-chat:empty{display:none}
.cw-chat li{padding:2px 8px;background:rgba(0,0,0,.45);color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.6);overflow-wrap:anywhere}
.cw-chat:not(.is-open) li:nth-last-child(n+4){display:none}
.cw-chat-name{color:var(--knight,#fff);font-weight:800}
.cw-chat .is-system{color:#eceff1}.cw-chat .is-join{color:#ffe066}.cw-chat .is-error{color:#ff9e80}.cw-chat .is-typed{color:#b0bec5}
@media(pointer:fine){
 .cw-chat-dock{display:flex;flex-direction:column;justify-content:flex-end;gap:8px;position:absolute;left:12px;bottom:12px;z-index:5;width:min(560px,calc(100% - 24px));pointer-events:none}
 .cw-chat-dock .cw-chat{position:static;width:auto;max-width:460px;font-size:14px}
 .cw-chat-dock .cw-kingdom-chip{position:static;transform:none;align-self:flex-start;pointer-events:auto}
 .cw-chat-dock .cw-chat:not(.is-open) li:nth-last-child(n+4){display:block}
 .cw-chat-dock .cw-phrases{position:relative;left:auto;bottom:auto;transform:none;width:auto;pointer-events:auto}
}
.cw-phrases{background:rgba(12,18,24,.8);border:2px solid rgba(255,255,255,.35);border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.35);color:#fff}
.cw-phrase-tabs button{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.35);color:#fff}
.cw-phrase-tabs button[aria-selected="true"]{background:#ffd65a;border-color:#ffd65a;color:#1d2a30}
.cw-phrase-list button{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.28);color:#fff}
.cw-phrase-list button:hover,.cw-phrase-list button:focus-visible,.cw-phrase-list .is-picked{background:rgba(255,214,90,.28);border-color:#ffd65a}
.cw-chat-option{display:grid;gap:2px;align-content:center}.cw-chat-option small{font:600 11.5px/1.3 var(--sans);color:#cfd8dc}
.cw-chat-empty{grid-column:1/-1;margin:4px 2px;color:#e0e0e0;font:600 13px/1.4 var(--sans)}
.cw-phrase-note{color:#ffab91}.cw-phrase-note:empty{display:none}
.cw-chat-bar{margin-top:10px}
.cw-chat-bar input{box-sizing:border-box;width:100%;min-height:40px;padding:8px 12px;border:2px solid rgba(255,255,255,.5);border-radius:6px;background:rgba(0,0,0,.55);color:#fff;font:600 15px var(--sans)}
.cw-chat-bar input::placeholder{color:#b0bec5}.cw-chat-bar input:focus{outline:none;border-color:#ffd65a}
.cw-phrase-close{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.6);color:#fff}
/* F3 coordinates and the Tab list of knights. */
.cw-debug{position:absolute;left:8px;top:68px;z-index:6;display:grid;justify-items:start;gap:1px;pointer-events:none;font:600 13px/1.35 ui-monospace,Menlo,Consolas,monospace}
.cw-debug span{padding:1px 6px;background:rgba(0,0,0,.5);color:#fff}
.cw-player-list{position:absolute;top:70px;left:50%;transform:translateX(-50%);z-index:7;min-width:220px;padding:8px 14px;background:rgba(0,0,0,.62);color:#fff;border-radius:6px;font:600 14px/1.5 var(--sans);pointer-events:none}
.cw-player-list ul{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:2px}
/* The game menu and the controls list. */
.cw-game-menu h2{margin:0 0 4px;font-size:1.6rem}.cw-game-menu>.cw-note{margin:0 0 14px}
.cw-game-menu kbd{display:inline-block;min-width:1.6em;padding:2px 7px;border:1.5px solid #173c50;border-bottom-width:3px;border-radius:6px;background:#fff;color:#173c50;font:700 12px ui-monospace,Menlo,monospace;text-align:center;white-space:nowrap}
.cw-menu-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;text-align:left}
.cw-menu-item kbd{font-size:11px;padding:1px 6px;border-bottom-width:2px;opacity:.75}
.cw-menu-back{justify-content:center;gap:12px;margin-bottom:12px;font-size:1.05rem}
.cw-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
@media(max-width:480px){.cw-menu-grid{grid-template-columns:1fr}}
@media(pointer:coarse){.cw-menu-item kbd{display:none}}
.cw-controls-table{width:100%;border-collapse:collapse;margin:8px 0 16px;font-size:.95rem}
.cw-controls-table th{text-align:left;white-space:nowrap;padding:6px 14px 6px 0;vertical-align:top;font-weight:400}
.cw-controls-table td{padding:6px 0}.cw-controls-table tr+tr{border-top:1px solid #e6dcc0}
/* Phones keep the ☰ button in the corner (clear of the notch) and the speech bubble beside it. */
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-game.is-playing .cw-menu-button{top:calc(8px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left))}
 .cw-game.is-playing .cw-bubble{left:calc(60px + env(safe-area-inset-left));width:auto;max-width:calc(100% - 170px)}
}
/* Touch screens: Minecraft's row of small buttons at the top middle (emotes, chat, pause and the game menu).
   The speech bubble, round banner and duel bar make room for it, and chat lines sit above the D-pad. */
.cw-touch-top{display:none}
.cw-emote-bar{position:absolute;top:calc(56px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:21;display:flex;gap:6px;padding:6px;background:rgba(12,18,24,.8);border:2px solid rgba(255,255,255,.35);border-radius:10px}
.cw-emote-bar button{width:44px;height:44px;padding:0;border:0;border-radius:8px;background:rgba(255,255,255,.12);font-size:26px;line-height:1;cursor:pointer}
.cw-emote-bar button:hover,.cw-emote-bar button:focus-visible{background:rgba(255,214,90,.35)}
@media(pointer:coarse){
 .cw-game.is-playing .cw-menu-button{display:none}
 .cw-game.is-playing .cw-touch-top{display:flex;gap:6px;position:absolute;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:20}
 .cw-top-button{display:grid;place-items:center;width:46px;height:40px;padding:0;border-radius:8px;border:2px solid rgba(255,255,255,.7);background:rgba(18,32,40,.55);color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);touch-action:manipulation}
 .cw-top-button svg{width:22px;height:22px}
 .cw-top-button[aria-expanded="true"]{background:rgba(255,214,90,.55)}
 .cw-game.is-playing .cw-quest-pill,.cw-game.is-playing .cw-bubble{left:18px}
 .cw-game.is-playing .cw-bubble{max-width:calc(50% - 94px)}
 .cw-game.is-playing .cw-hideseek,.cw-game.is-playing .cw-duel{top:calc(58px + env(safe-area-inset-top))}
 .cw-chat{top:auto;left:calc(16px + env(safe-area-inset-left));bottom:calc(228px + env(safe-area-inset-bottom));width:min(380px,calc(100% - 32px));font-size:12.5px}
 .cw-chat.is-open li:nth-last-child(n+7){display:none}
}
/* Phones on their side: the speech bubble shares the top row, left of the buttons. */
@media(pointer:coarse) and (max-height:560px){
 .cw-game.is-playing .cw-bubble{top:calc(8px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));width:auto;max-width:calc(50% - 88px - env(safe-area-inset-left))}
 .cw-chat{left:calc(10px + env(safe-area-inset-left));bottom:calc(184px + env(safe-area-inset-bottom));width:min(340px,40%);font-size:11.5px}
 .cw-chat.is-open li:nth-last-child(n+5){display:none}
}
/* Phones held upright: it sits just under them. */
@media(pointer:coarse) and (max-width:560px){
 .cw-game.is-playing .cw-bubble{top:calc(58px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));width:auto;max-width:calc(100% - 108px)}
}
/* While picking an emote, the speech bubble steps aside. With chat open on a touch screen, the controls
   hide (as in Minecraft), the chat bar sits at the bottom, and recent lines show up top. */
.cw-viewport:has(.cw-emote-bar:not([hidden])) .cw-bubble{visibility:hidden}
@media(pointer:coarse){
 .cw-phrases{z-index:8;bottom:calc(12px + env(safe-area-inset-bottom))}
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-controls,.cw-viewport:has(.cw-phrases:not([hidden])) .cw-bubble{visibility:hidden}
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-chat{bottom:auto;top:calc(56px + env(safe-area-inset-top))}
}
/* While picking an emote the speech bubble steps aside. With chat open on a touch screen the controls
   step aside too (as in Minecraft): the chat bar sits at the bottom, above everything, and recent lines
   show up top. */
.cw-viewport:has(.cw-emote-bar:not([hidden])) .cw-bubble{visibility:hidden}
@media(pointer:coarse){
 .cw-phrases{z-index:8;bottom:calc(12px + env(safe-area-inset-bottom))}
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-controls,.cw-viewport:has(.cw-phrases:not([hidden])) .cw-bubble{visibility:hidden}
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-chat{bottom:auto;top:calc(56px + env(safe-area-inset-top))}
}
/* The armor of God: the animal-pairs game at Noah's ark, the library's five books, and the journal's pieces. */
.cw-pairs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:420px;margin:14px auto}
.cw-pair{aspect-ratio:1;border:3px solid #6b4a2c;border-radius:14px;background:#8a5a33;color:#fff6dc;font:700 min(9vw,40px)/1 system-ui,sans-serif;cursor:pointer;box-shadow:inset 0 -5px 0 rgba(0,0,0,.25)}
.cw-pair.is-up{background:#fff6dc;color:inherit}.cw-pair.is-matched{background:#dff0d0;border-color:#4f8a3a;cursor:default}
.cw-pair:focus-visible{outline:3px solid #ffd65a;outline-offset:2px}
.cw-book-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:14px 0;padding:0;list-style:none}
.cw-book-row li{min-height:54px;display:grid;place-items:center;border:2px dashed #b9a57e;border-radius:8px;color:#9a8a6a;font-weight:800;text-align:center;font-size:13px;padding:4px}
.cw-book-row li.is-placed{border:2px solid #6b4a2c;background:#8e3b2f;color:#fff6dc}
.cw-books{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.cw-book{min-height:48px;padding:8px 14px;border:2px solid #4a321d;border-radius:6px;background:#2f5e8e;color:#fff6dc;font:800 15px/1.2 Georgia,serif;cursor:pointer;box-shadow:inset 0 -4px 0 rgba(0,0,0,.25)}
.cw-book:nth-child(2n){background:#3f7a3a}.cw-book:nth-child(3n){background:#9a6b2a}.cw-book[disabled]{opacity:.35;cursor:default}
.cw-armor{display:grid;justify-items:start;gap:4px}.cw-armor-icon{width:40px;height:40px;color:#b8b0a0}.cw-armor.is-found .cw-armor-icon{color:#d9a52b}
/* The comics: a whisper from the dark tunnel, and answers stacked one per line. */
.cw-whisper{margin:6px 0 14px;padding:16px 20px;border-radius:18px;background:#26312b;color:#dcefe0;font-style:italic;font-size:18px;line-height:1.5;box-shadow:inset 0 0 22px rgba(120,190,140,.25)}
.cw-actions.cw-stack{flex-direction:column;flex-wrap:nowrap;align-items:stretch}
.cw-actions.cw-stack .cw-button{text-align:left;justify-content:flex-start;white-space:normal}
/* A quest's closing verse, set apart from the friend's words. */
.cw-story-verse{margin:-2px 0 16px;padding:10px 16px;border-left:4px solid #d9b25c;border-radius:8px;background:#fff3d2;font-style:italic;line-height:1.55}
/* Talking to the King: the puppets' lines, and Porky's scroll read one fancy word at a time. */
.cw-puppet-line{background:#3d2450;color:#f6e7ff;box-shadow:inset 0 0 22px rgba(224,176,80,.3)}
.cw-scroll-text{margin:0 0 10px;padding:10px 14px;border-radius:10px;background:#efe2c2;color:#6b4a2c;font-family:Georgia,serif;font-style:italic;line-height:1.5}
.cw-scroll-read{min-height:48px;padding:12px 16px;border-radius:12px;background:#f7ecd2;border:2px dashed #c9a86a;font-size:18px;line-height:1.6}
.cw-scroll-read b{color:#5b2d73}
.cw-words{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.cw-words .cw-button{min-height:44px;padding:8px 12px}
/* The Easy Way Out: press and hold to stand strong; the bar fills while you hold. */
.cw-hold{position:relative;overflow:hidden;width:100%;min-height:64px;margin-top:6px;font-size:18px;touch-action:none;user-select:none;-webkit-user-select:none}
.cw-hold-fill{position:absolute;inset:0;background:#f2c14e;opacity:.6;transform:scaleX(0);transform-origin:left;pointer-events:none}
.cw-hold-label{position:relative;pointer-events:none}
.cw-practice,.cw-journey{position:absolute;z-index:25;left:16px;top:74px;width:min(330px,calc(100% - 32px));padding:14px 16px;background:#fffced;color:#193e50;border:2px solid #193e50;border-radius:16px;box-shadow:0 4px 0 #193e5033}
.cw-practice small{display:block;color:#775932;font-size:11px;font-weight:800;letter-spacing:.08em}
.cw-practice strong,.cw-journey strong{display:block;font-size:20px;line-height:1.25;margin-top:4px}
.cw-practice p,.cw-journey span{display:block;font-size:14px;line-height:1.4;margin:7px 0 0}
.cw-practice .cw-actions{margin-top:10px;gap:8px}
.cw-practice .cw-button{padding:8px 10px;min-height:44px;font-size:13px}
.cw-practice .cw-quiet{border:0;box-shadow:none;text-decoration:underline;background:transparent}
.cw-game.is-practicing .cw-tracker,.cw-game.is-practicing .cw-trail,.cw-game.is-practicing .cw-quest-pill,.cw-game.is-practicing .cw-minimap,.cw-game.is-practicing .cw-bubble{display:none!important}
.cw-game.is-practicing .cw-practice{display:block!important}
.cw-game.is-practicing .cw-practice[hidden]{display:none!important}
@media(max-width:600px){.cw-practice,.cw-journey{left:8px;top:58px;width:calc(100% - 16px);padding:10px 12px;max-width:350px}.cw-practice strong,.cw-journey strong{font-size:17px}.cw-practice p,.cw-journey span{font-size:12px}.cw-practice .cw-actions{margin-top:7px}}

.cw-game:not(.is-playing) .cw-key-instructions{display:none}
.cw-game.is-practicing .cw-pickup-prompt,.cw-game.is-practicing .cw-quest-progress{display:none!important}

.cw-place-finder{margin-top:18px}.cw-place-finder label{display:block;font-weight:800;margin-bottom:8px}.cw-place-finder select{width:100%;min-height:44px;padding:8px;border:2px solid #8a9b87;border-radius:8px;background:#fffef2;color:#173f4e;font:inherit}.cw-place-finder p{font-size:14px;line-height:1.6}.cw-place-finder select:focus-visible{outline:3px solid #237eb7;outline-offset:3px}

.cw-map-side .cw-place-finder{margin:0 0 22px}@media(max-width:650px){.cw-map-side{display:contents}.cw-map-layout>.cw-map{grid-row:2}.cw-map-side>.cw-place-finder{grid-row:1;margin:0}.cw-map-side>.cw-map-legend{grid-row:3}.cw-map-dialog .cw-dialog-close{position:sticky;top:0;float:right;right:auto;margin:-12px -8px 0 8px}}

/* Fishing and bug catching (castle-catch-play.js): the status line, the floating Cast / Catch button, a nap's
   fade, the Fish & Bugs book, the catch card and the rod and net gift notes. */
.cw-catch-hud{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;width:max-content;max-width:calc(100% - 150px);padding:10px 22px;background:#173f50eb;color:#fff5dc;border:2px solid #ecc975;border-radius:20px;text-align:center;pointer-events:none;z-index:4}
.cw-catch-hud[hidden]{display:none}
.cw-catch-hud strong{font:400 21px/1.2 var(--display)}.cw-catch-hud small{font:800 13px/1.3 var(--sans);color:#ffe7a8}.cw-catch-hud small:empty{display:none}
.cw-catch-hud.is-bite{background:linear-gradient(#ffe48a,#f6b941);color:#173f50;border-color:#fffbe8;box-shadow:0 0 0 5px #ffd76a66,0 8px 26px #0005;animation:cw-catch-bite .45s ease-in-out infinite alternate}.cw-catch-hud.is-bite strong{font-size:30px}.cw-catch-hud.is-bite small{color:#173f50}
/* (while fishing, its words take the bottom of the screen: the scroll, letter and need chips step aside) */
.cw-game:has(.cw-catch-hud:not([hidden])) :is(.cw-need-chip,.cw-letter-chip){display:none!important}
.cw-catch-hud.is-reel{border-color:#9fe0c0}.cw-catch-hud.is-pull{background:#7a2d2aeb;border-color:#ffb49a}.cw-catch-hud.is-miss{background:#3b4d57eb}
@keyframes cw-catch-bite{from{transform:translateX(-50%) scale(1)}to{transform:translateX(-50%) scale(1.07)}}
.cw-catch-meter{display:block;width:180px;height:10px;margin-top:5px;border-radius:6px;background:#0d2a36;overflow:hidden}.cw-catch-meter[hidden]{display:none}.cw-catch-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#8fd6a8,#f2c75a);transition:width .12s}
.cw-catch-label{z-index:4;min-width:92px;background:#eef8f2;border-color:#3f7f6a;font-size:13px}
.cw-catch-fade{position:absolute;inset:0;background:#0b141a;z-index:9;pointer-events:none;opacity:0}.cw-catch-fade.is-on{animation:cw-catch-nap 1.9s ease-in-out both}
@keyframes cw-catch-nap{0%{opacity:0}35%,60%{opacity:1}100%{opacity:0}}
.cw-catch-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 14px}
.cw-catch-today{margin:0 0 12px;padding:9px 14px;border-radius:12px;background:#fff3c8;color:#5b4416;font:700 14px/1.5 var(--sans)}.cw-catch-today b{margin-right:6px;text-transform:uppercase;font-size:11px;letter-spacing:.7px;color:#8e5428}
.cw-catch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:0 0 14px}
.cw-catch-card{padding:10px 12px;border:1px solid #c4c6a8;border-radius:14px;background:#eceee2;text-align:center}.cw-catch-card.is-found{background:#f4f8ea;border-color:#9eb990}
.cw-catch-card h4{font:400 18px/1.2 var(--display);margin:4px 0 2px}.cw-catch-card small{font:800 12px/1.3 var(--sans);color:#b37d23;letter-spacing:1px}.cw-catch-card p{margin:6px 0 0;font:600 12px/1.45 var(--sans)}.cw-catch-card details{margin:6px 0 0;padding:8px 10px;text-align:left}.cw-catch-card summary{font:800 12px/1.6 var(--sans);cursor:pointer}
.cw-catch-pic{background:#dfeee9;border-radius:10px;padding:4px}.cw-catch-card:not(.is-found) .cw-catch-pic{background:#d9dcd0}
.cw-catch-art{display:block;width:100%;height:auto;max-height:110px}
/* A painted picture (castle-catch.js CATCH_ART) sits in the drawing's 3:2 frame; uncaught, it's a soft silhouette. */
img.cw-catch-art{aspect-ratio:3/2;object-fit:contain;margin:0 auto}img.cw-catch-art.is-dark{filter:brightness(0) opacity(.4)}
/* The book's pages of twenty, and the button on to the next page. */
.cw-catch-pages{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}.cw-catch-pages small{font:800 12px/1 var(--sans);opacity:.8;margin-left:4px}
.cw-catch-next{display:flex;justify-content:center;margin:-4px 0 14px}
/* Gifts for friends: the kept fish and bugs to choose from, and the gift being given. */
.cw-gift-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px;margin:4px 0 14px;padding:2px}
.cw-gift-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 10px;border:2px solid #9eb990;border-radius:14px;background:#f4f8ea;font:inherit;color:inherit;cursor:pointer;text-align:center}
.cw-gift-card:hover,.cw-gift-card:focus-visible{border-color:#b37d23;background:#fffbe6;outline:none;transform:translateY(-1px)}
.cw-gift-card .cw-catch-pic{width:100%}.cw-gift-card .cw-catch-art{max-height:54px}.cw-gift-card strong{font:400 16px/1.2 var(--display)}.cw-gift-card small{font:800 12px/1.3 var(--sans);color:#6a7a52}
.cw-gift-given{max-width:220px;margin:4px auto 8px;padding:8px;border-radius:18px;background:radial-gradient(circle at 50% 45%,#fffbe6,#dff0ea)}.cw-gift-given .cw-catch-art{max-height:130px}
.cw-catch-where{color:#4f6158}
.cw-catch-story{font-style:italic;color:#3f5a4b}.cw-catch-fact+.cw-catch-story{text-align:center}
.cw-catch-totals{font:600 14px/1.6 var(--sans);margin:0 0 6px}
.cw-catch-sets{list-style:none;padding:0;margin:6px 0 14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px}.cw-catch-sets li{padding:8px 12px;border-radius:10px;background:#eef0e2;font:700 14px/1.4 var(--sans)}.cw-catch-sets li.is-done{background:#fff0b6;color:#7a4f12}.cw-catch-sets b{margin-right:6px;color:#b37d23}.cw-catch-sets small{color:#6a7a64}
.cw-catch-notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin:6px 0 14px}.cw-catch-notes article{padding:12px 14px;border-radius:12px;background:#f7efd8;border:1px dashed #c9a96a}.cw-catch-notes article.is-missing{opacity:.65}.cw-catch-notes strong{font:400 18px/1.3 var(--display)}.cw-catch-notes p{margin:6px 0 0;font-size:14px;line-height:1.55}
.cw-catch-level{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:8px 0}.cw-catch-level legend{font:800 13px/1.6 var(--sans);margin-bottom:6px}
.cw-catch-locked{display:flex;gap:18px;align-items:center;padding:18px;margin:6px 0 14px;border-radius:16px;background:#f2f1db;border:2px dashed #b5bc9a}.cw-catch-locked .cw-catch-art{width:150px;flex-shrink:0}.cw-catch-locked strong{font:400 22px/1.25 var(--display)}.cw-catch-locked p{margin:8px 0 12px;font-size:15px;line-height:1.55}
.cw-catch-reveal{max-width:360px;margin:6px auto 4px;padding:10px;border-radius:18px;background:radial-gradient(circle at 50% 45%,#fffbe6,#dff0ea)}.cw-catch-reveal .cw-catch-art{max-height:190px}
.cw-catch-note{padding:18px 22px;background:#f7efd8;border:2px dashed #c9a96a;font:600 17px/1.6 var(--sans);color:#4a3a1c;text-align:left}
.cw-catch-stats{text-align:center;font:700 16px/1.5 var(--sans);margin:6px 0}.cw-catch-stats b{font:400 26px/1 var(--display);color:#173f50}.cw-catch-stats span{color:#b37d23;letter-spacing:1px}
.cw-catch-fact{font-size:15px;line-height:1.6;text-align:center}
.cw-catch-set{margin:10px auto;padding:10px 16px;border-radius:14px;background:linear-gradient(#fffcee,#ffe9a8);border:2px solid #d4a043;font:400 21px/1.3 var(--display);color:#7a4f12;text-align:center;max-width:420px}
.cw-catch-gift{display:flex;gap:16px;align-items:center;margin:14px 0;padding:14px 16px;border-radius:16px;background:linear-gradient(#f4fbf5,#e2f1e6);border:2px solid #8fbf9d}.cw-catch-gift .cw-catch-art{width:120px;flex-shrink:0}.cw-catch-gift strong{font:400 21px/1.3 var(--display);color:#1f5a46}.cw-catch-gift p{margin:6px 0 0}
.cw-catch-nap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.cw-catch-nap .cw-button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-height:64px}.cw-catch-nap small{font:600 12px/1.4 var(--sans);opacity:.85}
.cw-story-reward{display:block;margin-top:6px;font:800 12px/1.5 var(--sans);color:#3f7f6a}p.cw-story-reward{font-size:14px}
.cw-catch-entry .cw-catch-art{width:84px;flex-shrink:0}.cw-catch-entry.is-locked{opacity:.85;border-style:dashed}
@media(prefers-reduced-motion:reduce){.cw-catch-hud.is-bite{animation:none}.cw-catch-fade.is-on{animation:none;opacity:0}.cw-catch-meter i{transition:none}}
@media(max-width:650px){.cw-catch-hud{max-width:calc(100% - 24px);padding:8px 14px}.cw-catch-hud strong{font-size:18px}.cw-catch-hud.is-bite strong{font-size:24px}.cw-catch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cw-catch-locked{flex-direction:column;text-align:center}.cw-catch-nap{grid-template-columns:1fr}.cw-catch-gift{flex-direction:column;text-align:center}}
@media(pointer:coarse){.cw-catch-hud{bottom:calc(16px + env(safe-area-inset-bottom));max-width:calc(100% - 440px)}}
@media(pointer:coarse) and (max-width:650px){.cw-catch-hud{top:calc(112px + env(safe-area-inset-top));bottom:auto;max-width:calc(100% - 24px)}}
/* A catch, cheered on: a word for the run, the picture bouncing in (then a happy flop), a NEW or RECORD stamp,
   stars popping in one by one, and the book's bar filling toward the next set (castle-catch-book.js). */
.cw-catch-cheer,#cw-dialog p.cw-catch-cheer{margin:0 0 2px;text-align:center;font:400 2.2rem/1.05 var(--display);color:#c0641e;animation:cw-cheer-in .55s cubic-bezier(.2,1.5,.4,1) both}
.cw-catch-reveal{position:relative}.cw-catch-reveal .cw-catch-art{max-height:150px}
@media(max-height:560px){.cw-catch-reveal .cw-catch-art{max-height:96px}#cw-dialog p.cw-catch-cheer{font-size:1.7rem}}
.cw-catch-reveal .cw-catch-art{animation:cw-catch-in .7s cubic-bezier(.2,1.6,.4,1) both,cw-catch-flop 1.1s ease-in-out .75s 2}
.cw-catch-stamp{position:absolute;top:10px;right:12px;padding:5px 11px;border:3px solid #c43d2f;border-radius:10px;background:#fffbeacc;color:#c43d2f;font:900 17px/1 var(--sans);letter-spacing:1px;transform:rotate(12deg);animation:cw-stamp .45s cubic-bezier(.3,1.6,.5,1) .6s both}
.cw-catch-stamp.is-record{border-color:#2f7a3c;color:#2f7a3c}
.cw-catch-stats span i{display:inline-block;font-style:normal;animation:cw-star .45s cubic-bezier(.3,1.9,.5,1) both;animation-delay:calc(.65s + var(--i) * .14s)}
.cw-catch-progress{max-width:380px;margin:10px auto 4px;text-align:center;font:700 14px/1.4 var(--sans);color:#173f50}
.cw-catch-progress em{font-style:normal;color:#2f7a3c;font-weight:900}
.cw-catch-bar{height:14px;margin:6px 0 4px;background:#e8efe9;border:2px solid #173f50;border-radius:999px;overflow:hidden}
.cw-catch-bar i{display:block;height:100%;width:var(--to);min-width:6px;background:linear-gradient(90deg,#ffd65a,#f2a93b);border-radius:999px;animation:cw-catch-fill .9s ease-out .9s both}
.cw-catch-progress small{display:block;font-size:13.5px;font-weight:600;color:#3f5a4b}
@keyframes cw-cheer-in{from{transform:scale(.5);opacity:0}}
@keyframes cw-catch-in{0%{transform:translateY(30px) scale(.3) rotate(-14deg);opacity:0}70%{transform:translateY(-6px) scale(1.1) rotate(4deg);opacity:1}100%{transform:none}}
@keyframes cw-catch-flop{0%,100%{transform:rotate(0)}30%{transform:rotate(-7deg)}70%{transform:rotate(7deg)}}
@keyframes cw-stamp{0%{transform:scale(2.6) rotate(-12deg);opacity:0}100%{transform:scale(1) rotate(12deg);opacity:1}}
@keyframes cw-star{0%{transform:scale(0) rotate(-90deg)}100%{transform:none}}
@keyframes cw-catch-fill{from{width:var(--from)}to{width:var(--to)}}
/* The catch floating up from the water or the net with "+1", and "Cast again!" pulsing at the dock. */
.cw-catch-pop{position:absolute;z-index:6;display:flex;align-items:center;gap:6px;padding:4px 14px 4px 6px;background:#fffbea;border:2px solid #173f50;border-radius:999px;box-shadow:0 4px 0 #17304f33;color:#173f50;font:900 20px/1 var(--sans);white-space:nowrap;pointer-events:none;transform:translate(-50%,-50%);animation:cw-catch-float 1.7s ease-out both}
.cw-catch-pop .cw-catch-art{width:52px;height:36px;max-height:none}
.cw-catch-pop.is-new{background:#ffe680}.cw-catch-pop.is-record{background:#d9f2d3}
@keyframes cw-catch-float{0%{transform:translate(-50%,-10%) scale(.3);opacity:0}14%{transform:translate(-50%,-70%) scale(1.15);opacity:1}24%{transform:translate(-50%,-80%) scale(1)}78%{opacity:1}100%{transform:translate(-50%,-300%);opacity:0}}
.cw-catch-label.is-again{background:#ffe680;border-color:#a8781f;animation:cw-again 1s ease-in-out infinite}
@keyframes cw-again{50%{transform:translate(-50%,-100%) scale(1.12)}}
@media(prefers-reduced-motion:reduce){.cw-catch-cheer,.cw-catch-reveal .cw-catch-art,.cw-catch-stamp,.cw-catch-stats span i,.cw-catch-bar i,.cw-catch-label.is-again{animation:none}.cw-catch-pop{animation:cw-catch-fade 1.7s linear both;transform:translate(-50%,-140%)}}
@keyframes cw-catch-fade{0%,80%{opacity:1}100%{opacity:0}}
/* Touch play: taps and double-taps steer the game (a double-tap on ▲ sprints), so nothing on the game screen
   selects as text, opens the Copy menu or flashes a highlight. Dialogs, typed answers and chat stay selectable. */
.cw-game{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.cw-game .cw-dialog,.cw-game input,.cw-game textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
/* The inventory (castle-inventory.js), dressed like Minecraft's: a stone-grey panel of sunken slots, raised tabs,
   white item counts in the corner, and the chosen item described beside the grid (below it on narrow phones). */
#cw-dialog:has(.cw-inv){width:860px}
.cw-inv{display:flex;flex-direction:column;gap:10px}
.cw-inv-head{display:flex;align-items:center;gap:12px;padding-right:48px}
#cw-dialog .cw-inv-head h2{margin:0;font:400 2rem/1 var(--display)}
.cw-inv-rank{padding:4px 11px;border:2px solid #9cc68d;border-radius:999px;background:#e7f3e2;font-weight:800;font-size:14px;white-space:nowrap}
.cw-inv-tabs{display:flex;flex-wrap:wrap;gap:5px;padding:2px 0 3px}
.cw-inv-tabs::-webkit-scrollbar{display:none}
.cw-inv-tab{flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 11px;border:2px solid #373737;border-radius:4px;background:#8b8b8b;color:#fff;font:800 14px/1 var(--sans);text-shadow:1px 1px 0 #3f3f3f;box-shadow:inset 2px 2px 0 #b5b5b5,inset -2px -2px 0 #555}
.cw-inv-tab small{font-weight:700;opacity:.9}
.cw-inv-tab[aria-selected="true"]{background:#c6c6c6;color:#2b2b2b;text-shadow:none;box-shadow:inset 2px 2px 0 #fff,inset -2px -2px 0 #555}
.cw-inv-body{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px;align-items:start}
.cw-inv-panels{padding:8px;border:3px solid #373737;border-radius:5px;background:#c6c6c6;box-shadow:inset 3px 3px 0 #fff,inset -3px -3px 0 #555}
#cw-dialog p.cw-inv-note{margin:0 0 8px;color:#2b2b2b;font-size:14px;line-height:1.35}
.cw-inv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(54px,1fr));gap:4px}
.cw-inv-slot{position:relative;aspect-ratio:1;display:grid;place-items:center;min-width:0;padding:6px;border:0;border-radius:0;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;line-height:1;cursor:pointer}
.cw-inv-slot>span{display:grid;place-items:center;width:100%;height:100%;font-size:28px}
.cw-inv-slot svg,.cw-inv-slot .cw-catch-art,.cw-inv-slot .cw-armor-icon,.cw-inv-art svg,.cw-inv-art .cw-catch-art{width:100%;height:100%;max-height:none}
.cw-inv-slot .cw-decor-icon,.cw-inv-art .cw-decor-icon{width:100%;height:100%;border-radius:4px;background-color:transparent}
.cw-inv-slot .cw-armor-icon,.cw-inv-art .cw-armor-icon{color:#d9a52b}
.cw-inv-slot.is-locked>span{opacity:.35;filter:grayscale(1) brightness(.8)}
.cw-inv-slot.is-locked::after{content:'?';position:absolute;inset:0;display:grid;place-items:center;color:#f4f4f4;font:900 22px/1 var(--sans);text-shadow:2px 2px 0 #3f3f3f}
.cw-inv-slot b{position:absolute;right:4px;bottom:3px;color:#fff;font:900 15px/1 var(--sans);text-shadow:2px 2px 0 #3f3f3f}
.cw-inv-slot[aria-pressed="true"]{background:#a6a6a6;outline:3px solid #fff;outline-offset:-3px}
.cw-inv-slot:focus-visible,.cw-inv-tab:focus-visible{outline:3px solid #ffd65a;outline-offset:-3px}
.cw-inv-emoji{font-size:30px;line-height:1}
.cw-inv-footer{margin-top:10px}
.cw-inv-detail{display:grid;gap:8px;padding:12px;border:2px solid #c9a657;border-radius:12px;background:#fff0be;box-shadow:0 4px 0 #d5ba78}
.cw-inv-art{display:grid;place-items:center;width:76px;height:76px;padding:8px;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff}
.cw-inv-art .cw-inv-emoji{font-size:44px}
.cw-inv-about strong{display:block;font-size:18px;line-height:1.2}
.cw-inv-about small{display:block;margin-top:2px;color:#7a5a1d;font-weight:800}
#cw-dialog .cw-inv-about p{margin:6px 0 0;font-size:15px;line-height:1.4}
.cw-inv-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.cw-inv-actions .cw-button{min-height:40px;padding:8px 12px;font-size:14px}
#cw-dialog p.cw-inv-empty{margin:0;color:#5b6b70}
@media(max-width:650px){.cw-inv-body{grid-template-columns:1fr}.cw-inv-detail{grid-template-columns:64px 1fr;align-items:start}.cw-inv-art{width:64px;height:64px}}
/* The Lamps of the Kingdom (castle-lamps-layout.js): five flame cups per lamp, lit ones glowing. */
.cw-lamp-flames{display:flex;gap:7px;justify-content:center}
.cw-lamp-flames i{width:18px;height:24px;border-radius:50% 50% 45% 45%/60% 60% 40% 40%;background:#d8d2c2;box-shadow:inset 0 -3px 0 #b7ae98}
.cw-lamp-flames i.is-lit{background:radial-gradient(circle at 50% 70%,#fff6c8 0 22%,#ffc44d 45%,#f07d22 80%);box-shadow:0 0 10px #ffb84d,0 0 22px #ffd27a88;animation:cw-flicker 1.6s ease-in-out infinite alternate}
.cw-lamp-flames i.is-lit:nth-child(2){animation-delay:-.4s}.cw-lamp-flames i.is-lit:nth-child(3){animation-delay:-.9s}.cw-lamp-flames i.is-lit:nth-child(4){animation-delay:-1.2s}
@keyframes cw-flicker{to{transform:scale(1.08,1.14) translateY(-1px);filter:brightness(1.12)}}
.cw-lamp-note{display:grid;gap:6px;justify-items:center;margin:14px 0;padding:16px;border:2px solid #e3b453;border-radius:16px;background:linear-gradient(#fff6d6,#ffe9b0);text-align:center;box-shadow:0 4px 0 #d9b56a}
.cw-lamp-note strong{font:400 1.45rem/1.15 var(--display);color:#8a4b12}
#cw-dialog .cw-lamp-note p{margin:0}
#cw-dialog p.cw-lamp-verse{margin-top:4px;font-style:italic;color:#5b3d12}.cw-lamp-verse span{display:block;font-style:normal;font-weight:800;font-size:.85em}
.cw-lamp-note small{font-weight:800;color:#7a5a1d}
.cw-lamp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.cw-lamp-card{display:grid;gap:6px;justify-items:center;padding:12px 8px;border:2px solid #cfc6b0;border-radius:13px;background:#eeebe2;text-align:center;filter:saturate(.6)}
.cw-lamp-card.is-lit{border-color:#e3b453;background:#fff3cf;filter:none}
.cw-lamp-card.is-blazing{border-color:#e0a72e;background:linear-gradient(#fff9e3,#ffe7a3);box-shadow:0 0 0 3px #ffe18a,0 0 18px #ffd34f88}
#cw-dialog .cw-lamp-card h4{margin:0;font-size:15px}.cw-lamp-card small{font-size:12px;color:#5b6b63}
@media(max-width:560px){.cw-lamp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.cw-lamp-flames i.is-lit{animation:none}}
/* Bible Story Trials (castle-trials-layout.js): the storybook sits low over the scene, so the place where the story
   happens shows above it. Night cards are a starry sky; the promise is said by tapping its phrases in order. */
#cw-dialog.cw-dialog-story{margin:auto auto 18px;width:660px;max-height:min(72dvh,600px);border-color:#8a5a2b;box-shadow:6px 8px 0 #3b2a1466}
#cw-dialog.cw-dialog-story::backdrop{background:#0a141e22;backdrop-filter:none}
.cw-story h2{margin:.15em 0 .45em;font:400 1.9rem/1.1 var(--display)}
#cw-dialog p.cw-story-text{margin:0 0 12px;font-size:1.18rem;line-height:1.55}
#cw-dialog p.cw-story-verse{margin:6px 0 14px;padding:12px 14px;border-left:5px solid #f2c14e;border-radius:8px;background:#fff3cf;font-size:1.1rem;font-style:italic;line-height:1.5}
.cw-story-verse span{display:block;margin-top:6px;font-size:.85rem;font-style:normal;font-weight:800;color:#7a5a1d}
.cw-story-dots{display:flex;gap:7px;justify-content:center;margin:4px 0 10px}
.cw-story-dots i{width:8px;height:8px;border-radius:50%;background:#d8cfb6}.cw-story-dots i.is-here{background:#c9952f;transform:scale(1.35)}
#cw-dialog.cw-dialog-story:has(.cw-story-night){border-color:#f2c14e;background:radial-gradient(1px 1px at 12% 20%,#fff 99%,#0000),radial-gradient(1.5px 1.5px at 78% 14%,#fff 99%,#0000),radial-gradient(1px 1px at 55% 30%,#fffbe0 99%,#0000),radial-gradient(1px 1px at 90% 42%,#fff 99%,#0000),linear-gradient(#13254a,#22406e);color:#f4ecd8}
.cw-story-night .cw-chapter{color:#ffd34f}#cw-dialog .cw-story-night h2{color:#fff6dc}
#cw-dialog .cw-story-night p.cw-story-verse{background:#fff6dc1a;color:#fff6dc}.cw-story-night .cw-story-verse span{color:#ffd34f}
.cw-promise-slots{display:grid;gap:6px;margin:8px 0;padding:0;list-style:none}
.cw-promise-slots li{padding:5px 12px;border:2px dashed #cbbd96;border-radius:10px;color:#9b8c66;font-size:.95rem;line-height:1.3}
.cw-promise-slots li.is-placed{border-style:solid;border-color:#e3b453;background:#fff3cf;color:#173c50;font-weight:700}
.cw-promise-tiles{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.cw-promise-tile.is-hint{box-shadow:0 0 0 3px #ffd34f,0 0 16px #ffd34f;animation:cw-flicker 1s ease-in-out infinite alternate}
.cw-story-shout{text-align:center}.cw-story-shout .cw-actions{justify-content:center}
.cw-button.cw-shout-button{padding:14px 44px;font-size:1.7rem;animation:cw-shout .8s ease-in-out infinite alternate}
@keyframes cw-shout{to{transform:scale(1.08)}}
/* Night turns to morning between the days of the march. */
.cw-game.is-dawn .cw-viewport::after{content:'';position:absolute;inset:0;z-index:15;pointer-events:none;background:radial-gradient(circle at 50% 120%,#ffd38a 0,#1b2c52 62%);animation:cw-dawn 1.8s ease-out forwards}
@keyframes cw-dawn{to{opacity:0}}
/* A story's choices, one big button each. */
.cw-choice-list{display:grid;gap:8px;margin:6px 0 12px}
.cw-button.cw-choice{justify-content:flex-start;min-height:46px;padding:10px 16px;text-align:left;font-size:1.02rem}
/* Jonah: a storm sweeps over the river (rain and a dark sky), and inside the great fish it's deep, dark water. */
.cw-game.is-storm .cw-viewport::before{content:'';position:absolute;inset:0;z-index:14;pointer-events:none;background:repeating-linear-gradient(105deg,#ffffff00 0 11px,#dfefff55 11px 12px),linear-gradient(#1b2a3fcc,#2d4560aa);background-size:120px 120px,100% 100%;animation:cw-rain .35s linear 14,cw-storm 5s ease-out forwards}
@keyframes cw-rain{to{background-position:-40px 120px,0 0}}
@keyframes cw-storm{0%,70%{opacity:1}100%{opacity:0}}
.cw-game.is-fish .cw-viewport::before{content:'';position:absolute;inset:0;z-index:14;pointer-events:none;background:radial-gradient(circle at 30% 70%,#ffffff22 0 3px,#0000 4px),radial-gradient(circle at 70% 40%,#ffffff1a 0 5px,#0000 6px),radial-gradient(circle at 50% 50%,#1e4a52ee,#06161bf5 75%);background-size:180px 220px,260px 300px,100% 100%;animation:cw-bubbles 6s linear infinite}
@keyframes cw-bubbles{to{background-position:0 -220px,0 -300px,0 0}}
@media(prefers-reduced-motion:reduce){.cw-game.is-storm .cw-viewport::before{animation:cw-storm 5s ease-out forwards}.cw-game.is-fish .cw-viewport::before{animation:none}}
.cw-trial-list{display:grid;gap:10px;margin:12px 0 18px}
.cw-trial-card{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:12px;border:2px solid #cfc6b0;border-radius:13px;background:#eef2f6}
.cw-trial-card.is-done{border-color:#e3b453;background:#fff3cf}.cw-trial-book{font-size:30px;text-align:center}
#cw-dialog .cw-trial-card h4{margin:0}.cw-trial-card small{font-weight:700;color:#5b6b63}#cw-dialog .cw-trial-card p{margin:2px 0 0;font-size:14px}
@media(max-width:560px){.cw-trial-card{grid-template-columns:36px 1fr}.cw-trial-card .cw-button{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.cw-game.is-dawn .cw-viewport::after{animation-duration:.01s}.cw-button.cw-shout-button,.cw-promise-tile.is-hint{animation:none}}
/* Phones held sideways are short: a smaller title, and the slots scroll inside their panel. */
@media(max-height:560px){#cw-dialog.cw-dialog-story{max-height:calc(100dvh - 16px);margin-bottom:8px}.cw-promise-tiles{gap:6px;margin:6px 0}.cw-button.cw-promise-tile{min-height:36px;padding:5px 12px;font-size:.92rem}.cw-promise-slots li{padding:3px 10px;font-size:.85rem}.cw-choice-list{gap:6px}.cw-button.cw-choice{min-height:38px;padding:6px 14px;font-size:.95rem}#cw-dialog p.cw-story-text{font-size:1rem;line-height:1.42}.cw-story h2{font-size:1.4rem}#cw-dialog .cw-inv-head h2{font-size:1.5rem}.cw-inv-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.cw-inv{gap:7px}.cw-inv-tab{min-height:36px;padding:5px 9px}.cw-inv-panels{max-height:calc(100dvh - 170px);overflow:auto}.cw-inv-detail{max-height:calc(100dvh - 170px);overflow:auto}.cw-inv-art{width:60px;height:60px}}
/* The public kingdom: how many knights are online nearby, at the bottom of the screen (tap for the list). */
.cw-kingdom-chip{position:absolute;left:50%;bottom:14px;z-index:12;transform:translateX(-50%);display:flex;align-items:center;gap:6px;min-height:36px;padding:6px 14px;border:2px solid #efdaa0;border-radius:999px;background:#163f4ded;color:#fff5d9;font:800 13px/1 var(--sans);box-shadow:0 3px 0 #11313c55;cursor:pointer}
.cw-kingdom-list{display:grid;gap:6px;margin:10px 0 14px;padding:0;list-style:none}.cw-kingdom-list li{display:flex;align-items:center;gap:8px;font-weight:700}
/* The Sword of the Spirit (castle-sword.js): a blade that fills with light as the verse is said back. */
.cw-sword{position:relative;height:26px;margin:6px 0 14px;padding-left:46px}
.cw-sword::before{content:'';position:absolute;left:0;top:7px;width:30px;height:12px;border-radius:4px;background:linear-gradient(#c9952f,#8a5a2b);box-shadow:30px -6px 0 -2px #c9952f,30px 6px 0 -2px #c9952f}
.cw-sword i{display:block;height:100%;border:2px solid #7c8a94;border-radius:3px 14px 14px 3px;background:linear-gradient(90deg,#fff6c8 0,#ffd34f calc(var(--sharp)*100%),#dfe5e8 calc(var(--sharp)*100%));box-shadow:0 0 calc(var(--sharp)*18px) #ffd34f;transition:box-shadow .3s}
.cw-sword.is-done i{animation:cw-shine 1.2s ease-in-out infinite alternate}
@keyframes cw-shine{to{box-shadow:0 0 28px #ffd34f,0 0 50px #fff3c4}}
#cw-dialog p.cw-sword-verse{display:flex;flex-wrap:wrap;gap:6px 6px;align-items:center;margin:0 0 12px;font-size:1.15rem;line-height:1.5}
.cw-sword-verse .is-said{font-weight:800;color:#173c50}
.cw-sword-verse .is-hidden{display:inline-block;width:calc(var(--w)*.62em);height:1.05em;border-radius:6px;background:#e3dcc7}
#cw-dialog p.cw-sword-ask{margin:0 0 6px;font-weight:800;color:#7a5a1d}
.cw-sword-options{display:grid;gap:8px;margin-bottom:10px}
.cw-button.cw-sword-option{justify-content:flex-start;gap:10px;min-height:46px;font-size:1.05rem;text-align:left}
.cw-sword-option kbd{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:6px;background:#173c50;color:#fff;font:800 12px var(--sans)}
.cw-sword-option.is-hint{box-shadow:0 0 0 3px #ffd34f,0 0 16px #ffd34f;animation:cw-flicker 1s ease-in-out infinite alternate}
.cw-quote-scroll.cw-sword-verse-ref{padding:12px 20px;margin:12px 0}.cw-sword-verse-ref .cw-reference{margin:4px 0 0}
#cw-dialog p.cw-sword-note{margin:0 0 8px;padding:8px 12px;border-radius:10px;background:#fff1c2;font-weight:800}
#cw-dialog p.cw-sword-stars{margin:0;text-align:center;font-size:2rem;letter-spacing:4px;color:#e0a72e}
@media(pointer:coarse){.cw-sword-option kbd{display:none}}
/* A phone held sideways: a small heading, and the choices side by side so they all fit without scrolling. */
@media(max-height:560px){#cw-dialog:has(.cw-sword){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-sword) .cw-dialog-head{margin-bottom:4px}#cw-dialog:has(.cw-sword) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-sword) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 .cw-sword{height:20px;margin:2px 0 8px}#cw-dialog p.cw-sword-verse{gap:4px 5px;margin-bottom:6px;font-size:1rem;line-height:1.35}#cw-dialog p.cw-sword-ask{margin-bottom:4px;font-size:.92rem}
 .cw-sword-options{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px;margin-bottom:6px}.cw-button.cw-sword-option{min-height:40px;padding:6px 12px;font-size:.98rem}#cw-dialog p.cw-sword-note{margin-bottom:4px;padding:4px 10px;font-size:.88rem}
 #cw-dialog:has(.cw-sword) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-sword) .cw-actions .cw-button{min-height:40px;padding:6px 12px}#cw-dialog p.cw-sword-stars{font-size:1.6rem}
 #cw-dialog:has(.cw-sword-intro){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-sword-intro) .cw-dialog-head{margin-bottom:4px}#cw-dialog:has(.cw-sword-intro) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-sword-intro) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 #cw-dialog p.cw-sword-intro,#cw-dialog:has(.cw-sword-intro) p.cw-story-verse{margin-bottom:6px;font-size:.92rem;line-height:1.4}.cw-quote-scroll.cw-sword-verse-ref{padding:6px 14px;margin:6px 0}#cw-dialog:has(.cw-sword-intro) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-sword-intro) .cw-actions .cw-button{min-height:40px;padding:6px 12px}}
@media(prefers-reduced-motion:reduce){.cw-sword.is-done i,.cw-sword-option.is-hint{animation:none}}
/* Making a lamp blaze: a row of five flames for the verses said, and the trailing … when only the opening is asked. */
.cw-lamp-flames.cw-blaze-row{justify-content:center;margin:4px 0 10px}
.cw-sword-verse .cw-sword-more{font-weight:800;color:#9a8a68}
#cw-dialog p.cw-blaze-count{text-align:center;font-weight:800;color:#7a5a1d}
/* A phone held sideways: the lamp's screens fit without scrolling (small heading, the verse in smaller type). */
@media(max-height:560px){#cw-dialog:has(.cw-blaze-row){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-blaze-row) .cw-dialog-head{margin-bottom:2px}#cw-dialog:has(.cw-blaze-row) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-blaze-row) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 .cw-lamp-flames.cw-blaze-row{margin:0 0 4px}#cw-dialog:has(.cw-blaze-row) p.cw-sword-stars{font-size:1.3rem;line-height:1.2}
 #cw-dialog:has(.cw-blaze-row) .cw-quote-scroll{padding:8px 14px;margin:6px 0;border-top-width:5px;border-bottom-width:5px}#cw-dialog:has(.cw-blaze-row) .cw-verse{font-size:15px;line-height:1.45}#cw-dialog:has(.cw-blaze-row) .cw-reference{font-size:14px;margin:4px 0 0}
 #cw-dialog:has(.cw-blaze-row) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-blaze-row) .cw-actions .cw-button{min-height:40px;padding:6px 12px}}
/* Truth strikes in Lord Porky's duel: two pips for the Sword of the Spirit's charge, a glowing button once it's
   ready, and the verse cards that answer his fib. */
.cw-duel-charge{display:inline-flex;gap:4px;margin-top:2px}
.cw-duel-charge i{width:12px;height:12px;border-radius:50%;border:2px solid #c9952f;background:#fff6dc}
.cw-duel-charge i.is-on{background:#ffd34f;box-shadow:0 0 8px #ffd34f}
#cw-duel.is-truth-ready #cw-duel-tip,#cw-duel.is-truth-ready .cw-key-hint{display:none}
.cw-duel-truth{display:flex;margin:4px auto 0;align-items:center;gap:8px;min-height:44px;padding:8px 18px;border:2px solid #8a5a1d;border-radius:999px;background:linear-gradient(#fff3c4,#ffd34f);color:#173c50;font:900 15px/1 var(--sans);box-shadow:0 0 0 4px #ffe18a88,0 0 22px #ffd34f;cursor:pointer;pointer-events:auto;animation:cw-flicker 1s ease-in-out infinite alternate}
.cw-duel-truth kbd{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:6px;background:#173c50;color:#fff;font:800 12px var(--sans)}
@media(pointer:coarse){.cw-duel-truth kbd{display:none}}
.cw-truth-cards{display:grid;gap:10px;margin:12px 0}
.cw-truth-card{display:grid;gap:4px;min-height:56px;padding:12px 16px;border:2px solid #214b5d;border-radius:13px;background:#fffaf0;color:#173c50;text-align:left;font:700 15px/1.45 var(--sans);box-shadow:0 3px 0 #173c5033;cursor:pointer}
.cw-truth-card strong{font:900 16px/1.2 var(--sans);color:#7a5a1d}
.cw-truth-card:hover{background:#e4f5fb}
.cw-truth-card.is-hint{box-shadow:0 0 0 3px #ffd34f,0 0 16px #ffd34f;animation:cw-flicker 1s ease-in-out infinite alternate}
@media(max-height:560px){#cw-dialog:has(.cw-truth-cards){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-truth-cards) .cw-dialog-head{margin-bottom:2px}#cw-dialog:has(.cw-truth-cards) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-truth-cards) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 #cw-dialog:has(.cw-truth-cards) p.cw-conversation{margin-bottom:4px;font-size:.92rem}.cw-truth-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:6px 0}.cw-truth-card{align-content:start;gap:2px;min-height:0;padding:7px 9px;font-size:12px;line-height:1.3}.cw-truth-card strong{font-size:13px}
 #cw-dialog:has(.cw-truth-cards) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-truth-cards) .cw-actions .cw-button{min-height:40px;padding:6px 12px}.cw-duel-truth{min-height:38px;padding:5px 14px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.cw-duel-truth,.cw-truth-card.is-hint{animation:none}}
/* Chapter title cards: a region's name in big letters as Sir Bacon walks in, then gone. */
.cw-chapter-card{position:absolute;left:50%;top:20%;z-index:4;transform:translateX(-50%);display:grid;justify-items:center;gap:6px;width:max-content;max-width:calc(100% - 32px);padding:12px 34px;border-top:2px solid #ffd77199;border-bottom:2px solid #ffd77199;background:radial-gradient(closest-side,#0f2b3a99,#0f2b3a00);color:#fff8e1;text-align:center;text-shadow:0 2px 10px #000a,0 0 2px #000c;pointer-events:none}
.cw-chapter-card .cw-chapter{color:#ffd771;font-size:12px;letter-spacing:3px}
.cw-chapter-card strong{font:500 clamp(2.1rem,5vw,3.4rem)/1.05 var(--display)}
.cw-chapter-card small{font:800 14px/1.4 var(--sans)}
.cw-chapter-card.is-showing{animation:cw-chapter-in 3s ease both}
@keyframes cw-chapter-in{0%{opacity:0;transform:translate(-50%,10px)}12%{opacity:1;transform:translate(-50%,0)}78%{opacity:1}100%{opacity:0}}
@media(max-height:560px){.cw-chapter-card{top:16%;padding:8px 24px}.cw-chapter-card strong{font-size:2rem}.cw-chapter-card small{font-size:12px}}
@media(prefers-reduced-motion:reduce){.cw-chapter-card.is-showing{animation:none}}
.cw-lamp-card .cw-chapter{font-size:9px;letter-spacing:1.2px;line-height:1.3}
.cw-lamp-card .cw-lamp-story{color:#5d6a64;font-weight:700}.cw-lamp-card .cw-lamp-story.is-done{color:#2f7a3a}
/* The royal scrolls: every verse learned, on parchment, chapter by chapter. */
.cw-royal-scroll{max-height:min(48vh,420px);overflow:auto;margin:10px 0;padding:6px 20px 14px;border:2px solid #c5a363;border-top:8px solid #dabb7d;border-bottom:8px solid #dabb7d;border-radius:14px;background:#fff3d5;overscroll-behavior:contain}
.cw-royal-scroll section{padding:10px 0;border-bottom:1px dashed #d8c08a}.cw-royal-scroll section:last-child{border-bottom:0}
#cw-dialog .cw-royal-scroll h3{margin:4px 0 8px;font:500 1.3rem/1.2 var(--display);color:#173c50}.cw-royal-scroll h3 .cw-chapter{margin-bottom:2px}
.cw-royal-scroll blockquote{margin:0 0 10px;padding:0;border:0}
#cw-dialog .cw-royal-scroll blockquote p{margin:0;font:700 16px/1.55 var(--sans);color:#163c50}
.cw-royal-scroll cite{display:block;margin-top:2px;font:900 13px var(--sans);font-style:normal;color:#7a5a1d}.cw-royal-scroll cite span{color:#e0a72e}
#cw-dialog p.cw-royal-missing{margin:0 0 6px;font-size:13px;color:#9a8a68;font-style:italic}
@media(max-height:560px){#cw-dialog:has(.cw-royal-scroll){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-royal-scroll) .cw-dialog-head{margin-bottom:2px}#cw-dialog:has(.cw-royal-scroll) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-royal-scroll) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 #cw-dialog:has(.cw-royal-scroll) p.cw-conversation{margin-bottom:4px;font-size:.9rem;line-height:1.4}.cw-royal-scroll{max-height:calc(100dvh - 220px);margin:4px 0;padding:2px 14px 8px;border-top-width:5px;border-bottom-width:5px}#cw-dialog .cw-royal-scroll blockquote p{font-size:14px}
 #cw-dialog:has(.cw-royal-scroll) .cw-translation{margin:0}#cw-dialog:has(.cw-royal-scroll) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-royal-scroll) .cw-actions .cw-button{min-height:40px;padding:6px 12px}}
/* Tending low flames: the verses to say again. */
.cw-tend-list{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:4px 0 12px;padding:0;list-style:none}
.cw-tend-list li{padding:5px 12px;border:2px solid #e3b453;border-radius:999px;background:#fff3cf;font-weight:800;color:#7a5a1d}
.cw-lamp-card .cw-lamp-low{color:#b5541c;font-weight:800}
/* Friends' letters: an envelope chip when one arrives, and the letter on paper. */
.cw-letter-chip{position:absolute;left:50%;bottom:58px;z-index:12;transform:translateX(-50%);display:flex;align-items:center;gap:8px;min-height:40px;padding:6px 16px;border:2px solid #8a5a1d;border-radius:999px;background:#fff3cf;color:#5a3a12;font:900 14px/1 var(--sans);box-shadow:0 3px 0 #8a5a1d55,0 0 16px #ffd34f88;cursor:pointer;animation:cw-flicker 1.2s ease-in-out infinite alternate}
.cw-letter-chip span{font-size:20px}
.cw-letter{margin:10px 0 14px;padding:16px 22px;border:1px solid #d8c08a;border-radius:6px;background:repeating-linear-gradient(#fffaf0 0 27px,#efe2c2 27px 28px);box-shadow:2px 3px 0 #d8c08a66;transform:rotate(-.4deg)}
#cw-dialog .cw-letter p{margin:0 0 10px;font:600 16px/1.75 var(--sans);color:#3d2a12}
#cw-dialog .cw-letter p.cw-letter-sign{margin:4px 0 0;text-align:right;font-style:italic;font-weight:800}
@media(max-height:560px){.cw-letter-chip{bottom:52px;min-height:36px;font-size:13px}.cw-letter{padding:10px 16px;margin:6px 0 8px}#cw-dialog .cw-letter p{font-size:14px;line-height:1.55;margin-bottom:6px}#cw-dialog:has(.cw-letter) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-letter){padding:12px 16px}}
@media(prefers-reduced-motion:reduce){.cw-letter-chip{animation:none}}
/* A season’s greeting (castle-seasons.js) fits a phone held sideways. */
@media(max-height:560px){#cw-dialog:has(.cw-season){padding:12px 16px;max-height:calc(100dvh - 16px)}#cw-dialog:has(.cw-season) .cw-dialog-head{margin-bottom:2px}#cw-dialog:has(.cw-season) .cw-dialog-head img{width:40px;height:52px}#cw-dialog:has(.cw-season) .cw-dialog-head h2{font-size:1.35rem;margin-top:2px}
 #cw-dialog p.cw-season{margin-bottom:4px;font-size:.88rem;line-height:1.4}#cw-dialog:has(.cw-season) .cw-quote-scroll{padding:8px 14px;margin:6px 0;border-top-width:5px;border-bottom-width:5px}#cw-dialog:has(.cw-season) .cw-verse{font-size:14px;line-height:1.45}#cw-dialog:has(.cw-season) .cw-reference{font-size:13px;margin:4px 0 0}#cw-dialog:has(.cw-season) .cw-note{margin-bottom:4px;font-size:12px}#cw-dialog:has(.cw-season) .cw-actions{margin-top:6px}#cw-dialog:has(.cw-season) .cw-actions .cw-button{min-height:40px;padding:6px 12px}}
/* The phone vignette (castle-world.js): the same soft edges castle-post.js draws on computers. */
.cw-vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 115% 100% at 50% 50%,transparent 48%,#0002 78%,#0004 100%)}
/* "You need…": what a locked moment needs and who has it; tap to light the way. */
.cw-need-chip{position:absolute;left:50%;bottom:58px;z-index:13;transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:calc(100% - 32px);min-height:44px;padding:7px 16px 7px 10px;border:2px solid #173c50;border-radius:14px;background:#fffaf0;color:#173c50;text-align:left;box-shadow:0 3px 0 #173c5055,0 0 0 4px #ffd34f66;cursor:pointer;animation:cw-need-in .35s ease}
.cw-need-icon{font-size:24px;line-height:1}.cw-need-words strong{display:block;font:900 14px/1.25 var(--sans)}.cw-need-words small{display:block;font:800 12px/1.3 var(--sans);color:#7a5a1d}
.cw-letter-chip.is-under-need{visibility:hidden}
@keyframes cw-need-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-height:560px){.cw-need-chip{bottom:52px;min-height:40px;padding:5px 12px 5px 8px}.cw-need-words strong{font-size:13px}.cw-need-words small{font-size:11px}}
@media(prefers-reduced-motion:reduce){.cw-need-chip{animation:none}}
.cw-need-chip.is-note{cursor:default}
/* Words for young readers (2026-10-10; castle-voice.js, castle-words.js). Talk and story text scale with Bigger
   words (--tx: 100%, 120% or 140%), and nothing a child must read is under 14px. Scripture is never smaller than the
   talk around it. A phone held sideways gets a compact window whose buttons stay in view. While Read to me reads,
   the sentence is lightly marked and the word being said is marked more strongly. The `.cw-game[data-words]` prefix
   lets these sizes win over the older per-window rules above. */
.cw-game{--tx:1}.cw-game[data-words="120"]{--tx:1.2}.cw-game[data-words="140"]{--tx:1.4}
.cw-game[data-words] #cw-dialog .cw-conversation,.cw-game[data-words] #cw-dialog p.cw-story-text,.cw-game[data-words] #cw-dialog .cw-letter p,.cw-game[data-words] #cw-dialog .cw-riddle p,.cw-game[data-words] #cw-dialog p.cw-reward-copy,.cw-game[data-words] #cw-dialog .cw-feedback,.cw-game[data-words] #cw-dialog-content>p:not(.cw-note):not(.cw-translation):not(.cw-rank-line){font-size:calc(19px*var(--tx));line-height:1.55}
.cw-game[data-words] #cw-dialog .cw-verse{font-size:calc(22px*var(--tx));line-height:1.6}
.cw-game[data-words] #cw-dialog p.cw-story-verse{font-size:calc(19px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-royal-scroll blockquote p{font-size:calc(18px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-reference{font-size:calc(17px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-translation{font-size:13px}
.cw-game[data-words] #cw-dialog .cw-chapter{font-size:calc(12.5px*var(--tx));letter-spacing:1px}
.cw-game[data-words] #cw-dialog .cw-note{font-size:calc(15px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-story-card strong{font-size:calc(17px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-actions .cw-button,.cw-game[data-words] #cw-dialog .cw-choice{min-height:48px;font-size:calc(16px*var(--tx))}
.cw-game[data-words] .cw-bubble p{font-size:calc(17px*var(--tx));line-height:1.4;padding-right:20px}
.cw-game[data-words] .cw-toast strong{font-size:calc(21px*var(--tx))}
.cw-game[data-words] .cw-toast small{font-size:calc(15px*var(--tx));color:#4c5a54}
.cw-game[data-words] .cw-chapter-card small{font-size:calc(15px*var(--tx))}
.cw-game[data-words] .cw-need-words strong{font-size:calc(15px*var(--tx))}.cw-game[data-words] .cw-need-words small{font-size:calc(13.5px*var(--tx))}
.cw-game[data-words] .cw-tracker li{font-size:calc(14px*var(--tx));color:#4f5d57}
.cw-game[data-words] .cw-hideseek small{font-size:calc(14px*var(--tx))}
@media(max-height:560px){
 .cw-game[data-words] #cw-dialog .cw-conversation,.cw-game[data-words] #cw-dialog p.cw-story-text,.cw-game[data-words] #cw-dialog .cw-letter p,.cw-game[data-words] #cw-dialog .cw-riddle p,.cw-game[data-words] #cw-dialog p.cw-reward-copy,.cw-game[data-words] #cw-dialog .cw-feedback,.cw-game[data-words] #cw-dialog-content>p:not(.cw-note):not(.cw-translation):not(.cw-rank-line){font-size:calc(18px*var(--tx));line-height:1.5;margin-bottom:8px}
 .cw-game[data-words] #cw-dialog .cw-verse{font-size:calc(20px*var(--tx));line-height:1.5}
 .cw-game[data-words] #cw-dialog .cw-note{font-size:calc(14px*var(--tx));margin-bottom:6px}
 .cw-game[data-words] .cw-bubble p{font-size:calc(16px*var(--tx))}
 .cw-game[data-words] .cw-toast small{font-size:calc(14px*var(--tx))}
 .cw-game[data-words] #cw-dialog .cw-actions .cw-button,.cw-game[data-words] #cw-dialog .cw-choice{min-height:44px;font-size:min(calc(16px*var(--tx)),19px);padding-block:6px}
 /* The compact window: a small portrait and title, and the buttons held at the bottom while the words scroll. */
 .cw-game[data-words] #cw-dialog{padding:12px 16px;max-height:calc(100dvh - 16px)}
 .cw-game[data-words] #cw-dialog .cw-dialog-head{gap:10px;margin:0 104px 6px 0}
 .cw-game[data-words] #cw-dialog .cw-dialog-head img{width:44px;height:56px}
 .cw-game[data-words] #cw-dialog .cw-dialog-head h2{font-size:1.45rem;margin-top:2px}
 .cw-dialog-hear .cw-hear-label{display:none}
}
/* A window's last row of buttons stays in view while its words scroll, at every size. */
.cw-game[data-words] #cw-dialog-content>.cw-actions:last-child,.cw-game[data-words] #cw-dialog .cw-story>.cw-actions:last-child{position:sticky;bottom:0;z-index:1;padding:10px 0 4px;background:linear-gradient(#fffbee00,#fffbee 24%)}
.cw-game[data-words] #cw-dialog:has(.cw-story-night) .cw-story>.cw-actions:last-child{background:linear-gradient(#22406e00,#22406e 24%)}
.cw-game[data-words] #cw-dialog .cw-scroll-steps strong{font-size:calc(17px*var(--tx))}.cw-game[data-words] #cw-dialog .cw-scroll-steps span{font-size:calc(15px*var(--tx))}
.cw-game[data-words] #cw-dialog .cw-story-card strong+span{font-size:calc(15px*var(--tx))}.cw-game[data-words] #cw-dialog .cw-story-card small{font-size:12.5px}
/* Hear it, beside every window's close button; pressed while it reads. */
.cw-dialog-hear{position:absolute;right:62px;top:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;height:44px;min-width:44px;justify-content:center;padding:0 14px;border:2px solid #2c5263;border-radius:22px;background:#fffdf1;color:#173c50;font:900 15px/1 var(--sans);cursor:pointer}
.cw-dialog-hear[aria-pressed=true]{background:#ffdb6a;border-color:#a8741c}
.cw-dialog-hear:hover{background:#fff3cf}
.cw-game[data-words] #cw-dialog .cw-dialog-head{margin-right:170px}
.cw-game[data-words] #cw-dialog .cw-story>.cw-chapter,.cw-game[data-words] #cw-dialog .cw-story>h2,.cw-game[data-words] #cw-dialog .cw-reader>.cw-chapter,.cw-game[data-words] #cw-dialog .cw-talk-log>.cw-chapter{margin-right:170px}
@media(max-height:560px){.cw-dialog-hear{right:58px;top:8px;padding:0}.cw-game[data-words] #cw-dialog .cw-dialog-head,.cw-game[data-words] #cw-dialog .cw-story>.cw-chapter,.cw-game[data-words] #cw-dialog .cw-story>h2,.cw-game[data-words] #cw-dialog .cw-reader>.cw-chapter,.cw-game[data-words] #cw-dialog .cw-talk-log>.cw-chapter{margin-right:104px}}
@media(max-width:650px){.cw-dialog-hear{right:56px;top:8px;padding:0}.cw-dialog-hear .cw-hear-label{display:none}.cw-game[data-words] #cw-dialog .cw-dialog-head,.cw-game[data-words] #cw-dialog .cw-story>.cw-chapter,.cw-game[data-words] #cw-dialog .cw-story>h2{margin-right:100px}}
/* The word being read. */
.cw-w.is-reading{background:#fff1b8;box-shadow:0 0 0 2px #fff1b8;border-radius:3px}
.cw-w.is-said{background:#ffe27a;box-shadow:0 0 0 2px #ffe27a;border-radius:3px}
.cw-story-night .cw-w.is-reading{background:#ffffff1c;box-shadow:0 0 0 2px #ffffff1c}
.cw-story-night .cw-w.is-said{background:#ffd34f;color:#13254a;box-shadow:0 0 0 2px #ffd34f}
/* Bubbles can be held (their clock stops) and tapped (kept on screen, and read again). */
.cw-game .cw-bubble{pointer-events:auto;cursor:pointer;touch-action:manipulation}
.cw-bubble-hear{position:absolute;right:9px;bottom:7px;font-size:14px;line-height:1;opacity:.75}
.cw-bubble.is-pinned{border-color:#a8741c;box-shadow:0 4px 0 #32586944,0 0 0 3px #ffd34f99}
/* Toasts come in, then stay until the game takes them away (their time follows their words). */
.cw-toast.is-showing{animation:cw-toast-in .45s ease both}
@keyframes cw-toast-in{0%{opacity:0;transform:translate(-50%,16px) scale(.92)}60%{opacity:1;transform:translate(-50%,0) scale(1.04)}100%{opacity:1;transform:translate(-50%,0) scale(1)}}
@media(prefers-reduced-motion:reduce){.cw-toast.is-showing{animation:none;opacity:1}}
/* Today's scroll from King Dunno waits in a chip; above the letter chip when both are waiting. */
.cw-scroll-chip{animation:cw-chip-nudge 1.4s ease-in-out 2}
@keyframes cw-chip-nudge{0%,100%{box-shadow:0 3px 0 #8a5a1d55,0 0 16px #ffd34f88}50%{box-shadow:0 3px 0 #8a5a1d55,0 0 26px #ffd34fcc}}
.cw-viewport:has(#cw-letter:not([hidden])) .cw-scroll-chip{bottom:106px}
.cw-viewport:has(#cw-need:not([hidden])) .cw-scroll-chip{visibility:hidden}
@media(max-height:560px){.cw-viewport:has(#cw-letter:not([hidden])) .cw-scroll-chip{bottom:96px}}
@media(prefers-reduced-motion:reduce){.cw-scroll-chip{animation:none}}
/* "Who's reading?" */
.cw-reader{text-align:center}
.cw-reader h2{font:500 2.2rem/1.1 var(--display);margin:6px 0 0}
.cw-reader-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 10px}
.cw-reader-choice{display:grid;justify-items:center;align-content:center;gap:10px;min-height:150px;padding:18px 10px;border:3px solid #2c5263;border-radius:20px;background:#fffdf1;color:#173c50;cursor:pointer;box-shadow:0 4px 0 #2c526333}
.cw-reader-choice>span{font-size:48px;line-height:1}
.cw-reader-choice strong{font:500 calc(19px*var(--tx))/1.2 var(--display)}
.cw-reader-choice:hover,.cw-reader-choice:focus-visible{background:#fff3cf;border-color:#a8741c}
.cw-reader-choice.is-chosen{background:#ffe9a6}
@media(max-height:560px){.cw-reader h2{font-size:1.6rem}.cw-reader-choices{margin:10px 0 6px;gap:10px}.cw-reader-choice{min-height:0;padding:12px 8px;gap:6px}.cw-reader-choice>span{font-size:34px}}
@media(max-width:480px){.cw-reader-choices{grid-template-columns:1fr}.cw-reader-choice{min-height:0;grid-auto-flow:column;justify-content:start;padding:12px 16px}}
/* The Talk log: "What did they say?" */
.cw-talk-log h2{font:500 2rem/1.1 var(--display);margin:4px 0 10px}
.cw-log-list{list-style:none;margin:10px 0;padding:0;display:grid;gap:10px}
.cw-log-entry{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:start;padding:10px 12px;border:1px solid #e3d6b0;border-radius:14px;background:#fffdf3}
.cw-log-entry.is-news{background:#fff6d8}
.cw-log-entry img{width:44px;height:56px;object-fit:contain}
.cw-log-icon{display:grid;place-items:center;width:44px;height:44px;font-size:24px;color:#cf8a1d}
.cw-log-entry strong{display:block;font:500 calc(16px*var(--tx))/1.2 var(--display)}
.cw-game[data-words] #cw-dialog .cw-log-entry p{margin:2px 0 0;font-size:calc(17px*var(--tx));line-height:1.45}
.cw-log-hear{display:grid;place-items:center;width:44px;height:44px;border:2px solid #2c5263;border-radius:50%;background:#fffdf1;font-size:18px;cursor:pointer}
/* The talk box (2026-10-10): a friend's window docks low, with a light backdrop, so the friend stays in view above
   it. Their words come a page at a time (▼ turns the page); the choices appear after the last page. */
.cw-game[data-words] #cw-dialog.cw-talk-box{margin:auto auto 16px;width:min(760px,calc(100% - 24px));max-height:min(64dvh,600px);padding:16px 22px 14px}
#cw-dialog.cw-talk-box::backdrop{background:#0a141e1c;backdrop-filter:none}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head{margin-bottom:4px}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head img{width:58px;height:76px}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head h2{font-size:1.65rem;margin-top:2px}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-conversation{min-height:3.1em;margin-bottom:10px;padding-right:56px}
#cw-dialog.is-talking .cw-conversation~*{display:none!important}
#cw-dialog.is-arriving .cw-conversation~*{pointer-events:none}
.cw-w.is-ghost{visibility:hidden}
.cw-talk-next{display:none;position:absolute;right:16px;bottom:14px;z-index:2;place-items:center;width:52px;height:52px;border:2px solid #2c5263;border-radius:50%;background:#ffdb6a;color:#173c50;font-size:20px;cursor:pointer;box-shadow:0 3px 0 #2c526355}
#cw-dialog.is-talking .cw-talk-next{display:grid}
#cw-dialog.is-talking .cw-talk-next span{animation:cw-talk-bob 1.2s ease-in-out infinite}
@keyframes cw-talk-bob{50%{transform:translateY(3px)}}
@media(prefers-reduced-motion:reduce){#cw-dialog.is-talking .cw-talk-next span{animation:none}}
@media(max-height:560px){
 .cw-game[data-words] #cw-dialog.cw-talk-box{margin-bottom:8px;max-height:calc(100dvh - 24px);padding:10px 16px 10px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head img{width:40px;height:52px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head h2{font-size:1.3rem}
 .cw-talk-next{right:12px;bottom:10px;width:48px;height:48px}
}
/* The wondering question at a story's end: three pictures to tap (every answer is a good one), and Lady Wisdom's
   reply. The journal shows the answer under the story. */
.cw-wonder{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:10px 0 12px}
.cw-wonder-choice{display:grid;justify-items:center;align-content:center;gap:6px;min-height:96px;padding:12px 8px;border:3px solid #8a5a2b;border-radius:18px;background:#fffdf1;color:#173c50;cursor:pointer;box-shadow:0 4px 0 #8a5a2b33}
.cw-wonder-choice>span{font-size:38px;line-height:1}
.cw-wonder-choice strong{font:500 calc(17px*var(--tx))/1.2 var(--display)}
.cw-wonder-choice:hover,.cw-wonder-choice:focus-visible{background:#fff3cf}
.cw-wonder-choice.is-chosen{background:#ffe9a6;border-color:#a8741c}
.cw-wonder-reply{display:flex;gap:12px;align-items:center;margin:0 0 10px;padding:10px 14px;border-radius:14px;background:#fff3cf}
.cw-wonder-reply img{width:42px;height:56px;object-fit:contain;flex-shrink:0}
.cw-game[data-words] #cw-dialog .cw-wonder-reply span{font-size:calc(18px*var(--tx));line-height:1.45}
.cw-story-night .cw-wonder-choice{background:#ffffff14;color:#f4ecd8;border-color:#f2c14e}
.cw-story-night .cw-wonder-reply{background:#ffffff1a}
.cw-trial-wonder{display:block;margin-top:4px;font-weight:800;color:#7a4a12}
@media(max-height:560px){.cw-wonder{gap:8px;margin:6px 0 8px}.cw-wonder-choice{min-height:0;padding:8px 6px}.cw-wonder-choice>span{font-size:28px}}
/* Hints for this area (castle-hints.js): each hint with the friend who gives it, and a way there when there is one. */
.cw-hint-list{list-style:none;margin:8px 0 12px;padding:0;display:grid;gap:10px}
.cw-hint-list li{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:start;padding:10px 12px;border:1px solid #e3d6b0;border-radius:14px;background:#fffdf3}
.cw-hint-list img{width:44px;height:56px;object-fit:contain}
.cw-hint-list div{display:grid;gap:8px;justify-items:start}
.cw-game[data-words] #cw-dialog .cw-hint-list p{margin:0;font-size:calc(17px*var(--tx));line-height:1.45}
.cw-hint-list .cw-button{min-height:44px}
/* Letters with life: the sticker the friend tucked in (P.S.), a question for grown-ups under the letter, and the
   journal's sticker book. */
.cw-game[data-words] #cw-dialog .cw-letter p.cw-letter-gift{display:flex;gap:10px;align-items:center;margin:8px 0 0;font-weight:800}
.cw-letter-gift span{font-size:30px;line-height:1}
.cw-game[data-words] #cw-dialog p.cw-grownup{margin:0 0 6px;padding:8px 12px;border-radius:12px;background:#e8efdf;color:#2f4a3c;font-size:15px}
.cw-sticker-book{margin:6px 0 14px}
.cw-sticker-book h3{margin:0 0 6px;font:500 1.15rem/1.2 var(--display)}
.cw-sticker-book ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.cw-sticker-book li{display:grid;justify-items:center;gap:2px;width:84px;padding:8px 4px;border:2px dashed #d4a043;border-radius:14px;background:#fffaf0}
.cw-sticker-book li span{font-size:30px;line-height:1}
.cw-sticker-book li small{font-size:12px;font-weight:800;text-align:center;line-height:1.2;color:#5b4a2a}
/* The verse card at a story's verse step: the verse large, in its phrases; Say it with me lights each phrase, then
   shows "Your turn!"; hidden words are first letters and a line, a tap away from being heard. A piece of the verse on
   the cards along the way. */
.cw-verse-card{margin:6px 0 4px;padding:14px 18px;border-left:6px solid #f2c14e;border-radius:12px;background:#fff6dc;font:700 calc(22px*var(--tx))/1.6 var(--sans);color:#163c50}
.cw-story-night .cw-verse-card{background:#fff6dc1a;color:#fff6dc}
.cw-verse-phrase{border-radius:8px;transition:background .25s,box-shadow .25s}
.cw-verse-phrase.is-echo{background:#ffe27a;box-shadow:0 0 0 3px #ffe27a}
.cw-verse-phrase.is-your-turn{background:#cfe8d4;box-shadow:0 0 0 3px #cfe8d4;position:relative}
.cw-verse-phrase.is-your-turn::after{content:'Your turn!';position:absolute;left:0;top:-1.9em;padding:2px 10px;border-radius:999px;background:#2e6b4f;color:#fff;font:800 14px/1.6 var(--sans);white-space:nowrap}
.cw-story-night .cw-verse-phrase.is-echo{color:#13254a}
.cw-hidden-word{display:inline-block;min-width:2.4em;min-height:1.5em;padding:0 4px;border:0;border-bottom:3px solid #b07a12;border-radius:6px 6px 0 0;background:#ffffffa8;color:#7a4a12;font:inherit;letter-spacing:1px;cursor:pointer}
.cw-hidden-word:hover,.cw-hidden-word:focus-visible{background:#ffe9a6}
.cw-verse-piece small{display:block;margin-bottom:2px;font:800 12.5px/1.3 var(--sans);letter-spacing:.06em;text-transform:uppercase;font-style:normal;color:#8a5a1d}
@media(max-height:560px){.cw-verse-card{padding:8px 12px;font-size:calc(19px*var(--tx))}}
@media(prefers-reduced-motion:reduce){.cw-verse-phrase{transition:none}}
/* The Big Story scroll: a strip of parchment cards from Creation to Easter, scrolling sideways; lived stories glow. */
.cw-big-story{list-style:none;margin:8px 0 18px;padding:6px 2px 12px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(150px,170px);gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
.cw-big-story li{scroll-snap-align:start;display:grid;align-content:start;gap:3px;padding:10px 10px 12px;border:2px solid #e3d6b0;border-radius:14px;background:#f6f1e3;color:#6b6250}
.cw-big-story li span{font-size:28px;line-height:1.1}
.cw-big-story li strong{font:500 15px/1.2 var(--display);color:#3d3524}
.cw-big-story li small{font-size:12px;font-weight:800}
.cw-big-story li p{margin:4px 0 0;font-size:14px;line-height:1.4}
.cw-big-story li.is-lit{background:#fff6dc;border-color:#d4a043;color:#173c50;box-shadow:0 0 0 3px #ffd34f55}
.cw-big-story li.is-lit strong{color:#173c50}
.cw-big-story li.is-frame{background:#eef4fb;border-color:#9fbfd8}
.cw-big-story-wait{font-style:normal;color:#8a8270}

/* Play-reading: a grown-up's line gets a ribbon over the talk box or the bubble. */
#cw-dialog.cw-talk-box.is-grown-up::before{content:attr(data-grown-up);position:absolute;top:-14px;left:22px;padding:4px 12px;border-radius:999px;background:#c9962e;color:#fff;font:800 .9rem/1.3 Nunito,system-ui,sans-serif;box-shadow:0 2px 6px #0003;letter-spacing:.01em}
#cw-dialog.cw-talk-box.is-grown-up{overflow:visible}
#cw-bubble.is-grown-up{outline:3px solid #c9962e;outline-offset:2px}
#cw-bubble.is-grown-up::before{content:'👪 Grown-up, your line!';position:absolute;top:-12px;right:14px;padding:2px 10px;border-radius:999px;background:#c9962e;color:#fff;font:800 .8rem/1.3 Nunito,system-ui,sans-serif}

/* The leader cards link sits with the settings buttons. */
.cw-settings .cw-leader-link{text-decoration:none;display:flex;align-items:center;justify-content:center}

/* The family noticeboard: paper notes pinned to cork. */
.cw-notes{list-style:none;margin:12px 0;padding:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:12px;background:#b98a55;border-radius:14px;box-shadow:inset 0 0 0 4px #8a6236}
.cw-note-card{position:relative;background:#fffbe8;border-radius:6px;padding:14px 14px 10px;box-shadow:0 2px 4px #0003;display:grid;gap:6px;transform:rotate(-1deg)}
.cw-note-card:nth-child(even){transform:rotate(1.2deg);background:#eaf6ff}
.cw-note-card::before{content:'';position:absolute;top:-6px;left:50%;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:#c0443d;box-shadow:0 1px 2px #0005}
.cw-note-icon{font-size:30px;line-height:1}
.cw-note-card p{margin:0;font-weight:700;font-size:1.05rem}
.cw-note-card small{color:#4a5f6b}
.cw-note-remove{position:absolute;top:4px;right:6px;border:0;background:none;font-size:20px;line-height:1;color:#7a5a3a;cursor:pointer;min-width:32px;min-height:32px}
.cw-note-picks{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:10px;margin:12px 0}
.cw-note-pick{text-align:left;justify-content:flex-start}

/* Phones on their side: the bubble stays clear of the buttons at the top middle (four 46 px buttons), with words a
   little smaller and long lines in pages (castle-words.js bubblePages). */
@media(pointer:coarse) and (max-height:560px){
 /* The buttons move right, next to the minimap (84 px, 8 px in), so the bubble gets the rest of the top row. */
 .cw-game.is-playing .cw-touch-top{left:auto;right:calc(100px + env(safe-area-inset-right));transform:none}
 .cw-game.is-playing .cw-emote-bar{left:auto;right:calc(100px + env(safe-area-inset-right));transform:none}
 .cw-game.is-playing .cw-bubble{max-width:calc(100% - 326px - env(safe-area-inset-left) - env(safe-area-inset-right));padding:7px 10px 7px 42px;border-radius:12px}
 .cw-game.is-playing .cw-bubble img{width:28px}
 .cw-game[data-words] .cw-bubble p{font-size:min(calc(14.5px*var(--tx)),17px);line-height:1.3;padding-right:18px}
}

/* The × on a speech bubble: a round button on its top-right corner, big enough for a small finger. */
.cw-bubble-close{position:absolute;top:-12px;right:-12px;width:34px;height:34px;border-radius:50%;border:2px solid #173c50;background:#fffbee;color:#173c50;font:800 20px/1 Nunito,system-ui,sans-serif;display:grid;place-items:center;padding:0;cursor:pointer;box-shadow:0 2px 4px #0003;z-index:2}
.cw-bubble-close:focus-visible{outline:3px solid #b07a12;outline-offset:2px}
/* The game menu in groups, and Settings as grouped rows: the name on the left, what it's set to on the right. */
.cw-menu-heading{margin:14px 0 6px;font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;color:#8e5428}
.cw-game-menu .cw-menu-back{margin-bottom:4px}
.cw-settings{margin:12px 0 10px;padding:0;border:0;background:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px}
.cw-setting-group{padding:10px 12px 12px;border:2px solid #e2d3ab;border-radius:14px;background:#fff6dc;display:grid;gap:6px;align-content:start}
.cw-setting-group h3{margin:0 0 2px;font-size:1rem}
.cw-settings .cw-setting{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;min-height:44px;text-align:left}
.cw-settings .cw-setting b{font-weight:800;color:#1f5f86;white-space:nowrap;text-align:right}
.cw-settings .cw-bible-notice{font-size:11px;color:#4a5f6b;margin:0}

/* Other knights far away: a smaller name with a pointer under it, so you can spot friends across the kingdom. */
.cw-knight-tag.is-far{gap:0}
.cw-knight-tag.is-far .cw-knight-name{font-size:11px;padding:3px 8px;background:#fffcf0f2}
.cw-knight-tag.is-far::after{content:'';width:0;height:0;border:6px solid transparent;border-top:8px solid var(--knight,#173c50);border-bottom:0}

/* Phones: much more of the kingdom. Everything on top of it is smaller, sideways and upright. */
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-game.is-playing .cw-touch-top{gap:5px}
 .cw-game.is-playing .cw-top-button{width:36px;height:30px;border-radius:7px;border-width:1.5px}
 .cw-game.is-playing .cw-top-button svg{width:17px;height:17px}
 .cw-game.is-playing .cw-emote-bar{top:calc(44px + env(safe-area-inset-top));gap:4px;padding:4px}
 .cw-game.is-playing .cw-emote-bar button{width:36px;height:36px;font-size:21px}
 .cw-game.is-playing .cw-minimap{width:64px;padding:3px;border-radius:9px;border-width:1.5px}
 .cw-game.is-playing .cw-bubble{padding:5px 9px 5px 34px;font-size:11px;line-height:1.3;border-radius:10px;border-width:1.5px}
 .cw-game.is-playing .cw-bubble img{width:24px}
 .cw-game.is-playing .cw-bubble-close{width:26px;height:26px;top:-8px;right:-8px;font-size:16px;border-width:1.5px}
 .cw-game.is-playing .cw-trail{padding:4px 8px;font-size:10.5px}
 .cw-game.is-playing .cw-chat{font-size:10.5px;line-height:1.35}
 .cw-game.is-playing .cw-letter-chip{min-height:28px;padding:3px 11px;gap:6px;font-size:11.5px;border-width:1.5px}
 .cw-game.is-playing .cw-letter-chip span{font-size:15px}
 .cw-game.is-playing .cw-need-chip{transform-origin:top center;scale:.82}
 .cw-game.is-playing .cw-hideseek{padding:3px 9px}.cw-game.is-playing .cw-hideseek strong{font-size:12.5px}.cw-game.is-playing .cw-hideseek small{font-size:10px}
 .cw-game.is-playing .cw-action-controls .cw-button{min-height:30px;padding:4px 9px;font-size:11px}
 .cw-mc-pad span{border-width:1.5px}
 .cw-mc-button{border-width:1.5px}.cw-mc-button small{font-size:9px}
 /* Playing together: one slim row (the room, Leave, Tell a grown-up). */
 .cw-game.is-playing .cw-together{display:flex;align-items:center;gap:6px;width:auto;max-width:min(340px,calc(100% - 20px));padding:3px 6px 3px 8px;border-width:1.5px;border-radius:12px;box-shadow:none}
 .cw-game.is-playing .cw-together-head{gap:6px;min-width:0;flex:1}
 .cw-game.is-playing .cw-together-head small,.cw-game.is-playing #cw-knight-count,.cw-game.is-playing .cw-together [data-cw="phrases"]{display:none}
 .cw-game.is-playing .cw-together-head strong{font-size:12px}
 .cw-game.is-playing .cw-together .cw-knight-dot{width:10px;height:10px}
 .cw-game.is-playing .cw-together-leave{padding:3px 8px;font-size:10.5px;min-height:0}
 .cw-game.is-playing .cw-together-actions{display:block}
 .cw-game.is-playing .cw-together-actions .cw-button{width:auto;min-height:26px;padding:3px 9px;font-size:10.5px;white-space:nowrap}
}
/* Sideways: a smaller walking pad and big keys, the slim room row along the bottom middle. */
@media(pointer:coarse) and (max-height:560px){
 .cw-mc-pad{--mc:42px;gap:3px}
 .cw-mc-button{width:56px;height:56px;font-size:20px}.cw-mc-use{width:48px;height:48px;font-size:18px}
 .cw-mc-right{gap:6px}
 .cw-game.is-playing .cw-action-controls{bottom:calc(122px + env(safe-area-inset-bottom))}
 .cw-game.is-playing .cw-bubble{max-width:calc(50% - 98px - env(safe-area-inset-left))}
 .cw-game.is-playing .cw-together{bottom:calc(6px + env(safe-area-inset-bottom));max-width:min(340px,calc(100% - 300px))}
 .cw-game.is-playing .cw-letter-chip{bottom:calc(40px + env(safe-area-inset-bottom))}
 .cw-chat{bottom:calc(150px + env(safe-area-inset-bottom));width:min(300px,38%)}
 .cw-game.is-playing .cw-hideseek{top:calc(44px + env(safe-area-inset-top))}

}
/* Upright: the pad and keys shrink too; the room row sits above them. */
@media(pointer:coarse) and (max-width:560px){
 .cw-mc-pad{--mc:48px;gap:4px}
 .cw-mc-button{width:62px;height:62px;font-size:22px}.cw-mc-use{width:52px;height:52px;font-size:19px}
 .cw-game.is-playing .cw-action-controls{bottom:calc(140px + env(safe-area-inset-bottom))}
 .cw-game.is-playing .cw-bubble{top:calc(46px + env(safe-area-inset-top));max-width:calc(100% - 88px)}
 .cw-game.is-playing .cw-together{bottom:calc(172px + env(safe-area-inset-bottom))}
 .cw-chat{bottom:calc(210px + env(safe-area-inset-bottom))}
}
/* Phones: tips in smaller words (bigger again with Bigger words, up to a point). Upright, the small map and the
   room row stay up while a tip shows, and Today's scroll sits above the walking pad. */
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-game[data-words].is-playing .cw-bubble p{font-size:min(calc(12px*var(--tx)),15px);line-height:1.3;padding-right:16px}
}
@media(pointer:coarse) and (max-width:560px){
 .cw-mc-pad{--mc:44px}
 .cw-viewport:has(.cw-bubble:not([hidden])) .cw-minimap,.cw-viewport:has(.cw-bubble:not([hidden])) .cw-together{visibility:visible}
 .cw-game.is-playing .cw-bubble{max-width:calc(100% - 96px - env(safe-area-inset-left) - env(safe-area-inset-right))}
 .cw-game.is-playing .cw-letter-chip{bottom:calc(160px + env(safe-area-inset-bottom))}
 .cw-game.is-playing .cw-together{bottom:calc(196px + env(safe-area-inset-bottom))}
 .cw-chat{bottom:calc(236px + env(safe-area-inset-bottom))}
 .cw-game.is-playing .cw-action-controls{bottom:calc(132px + env(safe-area-inset-bottom))}
}

/* Make a game: Continue with Google, the code to send to friends (big, spaced out), and its buttons. */
.cw-start-google .cw-start-icon svg{width:30px;height:30px}
.cw-start-who{margin:16px 0 0;font-size:13px;color:#4a5f6b}
.cw-start-textlink{display:inline-block;margin-top:12px;padding:0;border:0;background:none;color:#1f5f86;font:700 14px var(--sans);text-decoration:underline;cursor:pointer}
.cw-start-who .cw-start-textlink{margin:0;font-size:13px}
.cw-made-box{container-type:inline-size;margin:14px 0}
.cw-made-code{margin:0;padding:12px 6px;border:3px solid #173c50;border-radius:16px;background:#fff;color:#173c50;font:900 min(56px,13cqw)/1 var(--sans);letter-spacing:.14em;text-indent:.14em;text-align:center;white-space:nowrap}
.cw-made-actions{display:flex;flex-wrap:wrap;gap:10px}
/* Make a game and Join a game share one row on the title screen, so the rest of its menu still fits. */
.cw-start-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cw-start-pair .cw-start-btn{min-height:0;padding:9px 10px;gap:8px}
.cw-start-pair .cw-start-btn small{display:none}
.cw-start-pair .cw-start-icon{width:34px;height:34px;font-size:18px;flex:none}
.cw-start-pair .cw-start-btn strong{font-size:16px;line-height:1.15}
/* The Play together panel's 🙈 button: a whole row on computers; just the monkey in the slim phone row. */
.cw-together-actions .cw-together-seek{grid-column:1/-1}
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){.cw-game.is-playing .cw-together-seek span{display:none}.cw-game.is-playing .cw-together-actions{display:flex;gap:6px}}
/* During a round of hide and seek, the adventure steps aside: no quest tracker, trail, quest pill or chips. */
.cw-game.is-seeking .cw-tracker,.cw-game.is-seeking .cw-trail,.cw-game.is-seeking .cw-quest-pill,.cw-game.is-seeking .cw-letter-chip,.cw-game.is-seeking .cw-need-chip{display:none!important}
/* Hide and seek: choosing how to play; the You're out screen (Classic); frozen knights' names (Freeze tag); and the big
   win screen at the end of a round (gold for the winners). */
.cw-hs-modes{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:12px 0}
.cw-hs-mode{display:grid;gap:3px;text-align:left;padding:10px 12px;border:2px solid #c9b78a;border-radius:12px;background:#fffdf3;color:#173c50;font:inherit;cursor:pointer}
.cw-hs-mode strong{font-size:15px}.cw-hs-mode small{font-size:12px;line-height:1.3;color:#4a5f6b}
.cw-hs-mode.is-chosen{border-color:#173c50;background:#ffe59a;box-shadow:0 0 0 2px #173c50 inset}
.cw-hs-out{z-index:3;background:radial-gradient(circle at 50% 45%,#7a3434,#2b0f0f 70%)}
.cw-knight-tag.is-frozen .cw-knight-name::before{content:'🧊 '}
.cw-hs-win{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);z-index:9;display:grid;justify-items:center;gap:6px;min-width:min(420px,86%);padding:22px 30px;background:#173f53f2;color:#fff7d6;border:4px solid #ffd65a;border-radius:24px;text-align:center;pointer-events:none;box-shadow:0 10px 40px #0007;animation:cw-banner-in .3s ease-out}
.cw-hs-win.is-mine{background:linear-gradient(160deg,#ffd65a,#f2a93b);color:#3a2400;border-color:#fff7d6}
.cw-hs-trophy{font-size:clamp(46px,9vw,84px);line-height:1}
.cw-hs-win strong{font:900 clamp(28px,5vw,48px)/1.05 var(--display,var(--sans))}
.cw-hs-win small{font-size:15px;max-width:36ch;line-height:1.35}
@media(prefers-reduced-motion:reduce){.cw-hs-win{animation:none}}
/* Playing together: one small pill (the room, its code, who you are, how many are here). Tapping it opens the chat
   menu, which holds Hide and seek, Copy code and Leave. */
.cw-game.is-playing .cw-together{display:flex;align-items:center;gap:8px;width:auto;max-width:min(340px,calc(100% - 24px));padding:5px 12px;border-width:1.5px;border-radius:999px;box-shadow:none;cursor:pointer}
.cw-game.is-playing .cw-together-head small,.cw-game.is-playing .cw-together-leave,.cw-game.is-playing .cw-together-actions,.cw-game.is-playing .cw-together .cw-chat-log{display:none}
.cw-game.is-playing .cw-together-head{gap:8px;min-width:0}
.cw-game.is-playing .cw-together-head>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.cw-game.is-playing .cw-together-head strong{font-size:14px}
.cw-game.is-playing #cw-knight-count{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-room-actions{display:flex;flex-wrap:wrap;gap:6px;margin:0 30px 10px 0}
.cw-room-actions .cw-button{min-height:34px;padding:5px 12px;font-size:13px;background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.45);color:#fff}
.cw-room-actions .cw-button:hover,.cw-room-actions .cw-button:focus-visible{background:rgba(255,214,90,.3);border-color:#ffd65a}
/* In a room, Today's scroll stays away (the room is for playing together). */
.cw-game.is-in-room #cw-scroll-chip{display:none!important}
/* Travel by lamplight (the kingdom map): lit lamps can be clicked, and are listed beside the map. */
.cw-map-lamp.is-lit{cursor:pointer}
.cw-map-lamp.is-lit:hover{filter:drop-shadow(0 0 4px #ffcf43)}
.cw-travel{display:grid;gap:6px;margin:0 0 12px;padding:10px 12px;border:2px solid #e3c76f;border-radius:12px;background:#fff6d8}
.cw-travel-list{display:flex;flex-wrap:wrap;gap:6px}
.cw-travel-list .cw-button{min-height:36px;padding:5px 10px;font-size:13px}
.cw-travel small{color:#6b5f4a}
/* The room runner's seeker choice in the Hide and seek window. */
.cw-hs-seeker{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-weight:800}
.cw-hs-seeker select{min-height:40px;padding:6px 10px;border:2px solid #173c50;border-radius:10px;background:#fff;font:700 15px var(--sans);color:#173c50}
/* The room pill stays out of the way of hide and seek's big screens (No peeking, You're out, the win). */
.cw-viewport:has(#cw-hs-cover:not([hidden])) .cw-together,.cw-viewport:has(#cw-hs-out:not([hidden])) .cw-together,.cw-viewport:has(#cw-hs-win:not([hidden])) .cw-together{display:none!important}
/* The runner's options before a round: how long to hide and seek, and the last-minute hint. */
.cw-hs-options{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:0 0 10px;font-weight:800}
.cw-hs-options label{display:flex;align-items:center;gap:8px}
.cw-hs-options select{min-height:38px;padding:5px 8px;border:2px solid #173c50;border-radius:10px;background:#fff;font:700 14px var(--sans);color:#173c50}
.cw-hs-hint input{width:20px;height:20px}
/* The runner's typed options and the seeker buttons. */
.cw-hs-options input[type=number]{width:74px;min-height:38px;padding:5px 8px;border:2px solid #173c50;border-radius:10px;background:#fff;font:800 15px var(--sans);color:#173c50;text-align:center}
.cw-hs-options small{font-weight:600;color:#6b5f4a}
.cw-hs-seekers{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.cw-hs-seekers strong{margin-right:4px}
.cw-hs-pick{min-height:36px;padding:5px 12px;border:2px solid #c9b78a;border-radius:999px;background:#fffdf3;color:#173c50;font:700 14px var(--sans);cursor:pointer}
.cw-hs-pick.is-chosen{border-color:#173c50;background:#ffe59a;box-shadow:0 0 0 2px #173c50 inset}
/* During a round, Today's scroll waits too. */
.cw-game.is-seeking #cw-scroll-chip{display:none!important}
/* In a room the pill always shows (behind hide and seek's full-screen screens it steps aside), and the 🙈 button joins
   the touch buttons along the top. */
.cw-game.is-in-room.is-playing .cw-together:not([hidden]){visibility:visible!important}
.cw-top-room[hidden]{display:none!important}
.cw-top-room span{font-size:20px;line-height:1}
/* A phone on its side lays the title's menu out in two columns: there the paired buttons (Make / Join a game, Verse
   Arcade / Settings) take a column each, instead of squeezing both into one. */
@media(max-height:560px) and (min-width:651px){.cw-start-menu .cw-start-pair{display:contents}}
/* Points across rounds: on the win screen and in the Hide and seek window. */
.cw-hs-win-scores{font-weight:800;opacity:.9}
.cw-hs-win-scores:empty{display:none}
.cw-hs-scores{margin:6px 0 10px;padding:8px 12px;border-radius:12px;background:#fff6d8;border:2px solid #e3c76f;font-size:14px}
/* In a hide-and-seek room the adventure waits (castle-adventure.js questsOff): no quest screens, chips or labels. */
.cw-game.is-questless .cw-tracker,.cw-game.is-questless .cw-trail,.cw-game.is-questless .cw-quest-pill,.cw-game.is-questless .cw-letter-chip,.cw-game.is-questless .cw-need-chip,.cw-game.is-questless #cw-scroll-chip,.cw-game.is-questless #cw-quest-progress,.cw-game.is-questless #cw-chapter-card,.cw-game.is-questless .cw-scroll-label,.cw-game.is-questless .cw-story-label,.cw-game.is-questless .cw-room-label,.cw-game.is-questless .cw-festival-label:not(.cw-catch-label){display:none!important}
/* The room code on the pill, always in sight, and in the Hide and seek window. */
.cw-room-code-chip{display:none}
.cw-game.is-playing .cw-room-code-chip{display:inline-block;flex-shrink:0;padding:3px 7px;border-radius:7px;background:#173c50;color:#ffe59a;font:900 12px/1 var(--sans);letter-spacing:.1em;white-space:nowrap}
.cw-game.is-playing .cw-room-code-chip::before{content:'Code ';letter-spacing:.02em;font-weight:700;color:#fff5d9;opacity:.8}
.cw-hs-code{margin:4px 0 10px;font-size:15px}
.cw-hs-code b{display:inline-block;padding:2px 8px;border-radius:8px;background:#173c50;color:#ffe59a;letter-spacing:.12em}
.cw-hs-code-copy{margin-left:6px;padding:3px 10px;border:2px solid #173c50;border-radius:999px;background:#fffdf3;color:#173c50;font:800 13px/1.2 var(--sans);cursor:pointer}
/* The chat panel never runs off the top of the screen: the phrase list scrolls inside it (the Hide and seek group is
   long), so the room's buttons, the tabs and the chat bar stay in reach. */
.cw-phrases{display:flex;flex-direction:column;max-height:calc(100% - 130px)}
.cw-phrases>*{flex-shrink:0}
.cw-phrases>.cw-phrase-list{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
@media(pointer:fine){.cw-chat-dock{max-height:calc(100% - 24px)}.cw-chat-dock .cw-phrases{max-height:none;min-height:0;flex-shrink:1}}
@media(pointer:coarse){.cw-phrases{max-height:calc(100% - 56px - env(safe-area-inset-top))}}
/* The pill keeps the room's name and code whole; "You are…" gives way first. */
.cw-game.is-playing .cw-together{max-width:min(440px,calc(100% - 24px))}
.cw-game.is-playing .cw-together-head strong{flex:0 1 auto;min-width:4.5em}
.cw-game.is-playing #cw-knight-count{flex:1 1 0;min-width:0}
.cw-room-actions .cw-quiet{margin-top:0}
/* On a short screen (a phone on its side) a notice sits small at the top right, under the map, not over the characters
   in the middle. */
@media(max-height:560px){
 .cw-toast{left:auto;right:calc(8px + env(safe-area-inset-right));top:calc(66px + env(safe-area-inset-top));transform:none;min-width:0;max-width:min(300px,44%);padding:7px 12px 7px 9px;gap:9px;border-radius:12px}
 .cw-toast>span{font-size:22px}.cw-toast strong{font-size:15px}.cw-toast small{font-size:11.5px;margin-top:1px}
 .cw-game[data-words] .cw-toast strong{font-size:calc(15px*var(--tx))}.cw-game[data-words] .cw-toast small{font-size:calc(11.5px*var(--tx))}
 .cw-toast.is-showing{animation:cw-toast-side .4s ease both}
}
@keyframes cw-toast-side{0%{opacity:0;transform:translateY(-8px)}100%{opacity:1;transform:none}}
/* On a short screen the chapter card is small and high, so it never covers the characters (it shows for 4.4 s). */
@media(max-height:560px){.cw-chapter-card{top:calc(44px + env(safe-area-inset-top));gap:2px;padding:5px 18px}.cw-chapter-card .cw-chapter{font-size:9.5px;letter-spacing:2px}.cw-chapter-card strong{font-size:1.35rem}.cw-chapter-card small,.cw-game[data-words] .cw-chapter-card small{font-size:11px}}
@media(max-height:560px){.cw-viewport:has(#cw-chapter-card:not([hidden])) .cw-toast{top:calc(122px + env(safe-area-inset-top))}}
/* The obstacle course: the run's clock (top middle), the tap-fast tip (above the controls), the race countdown. */
.cw-course-clock{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:5;display:grid;justify-items:center;gap:1px;min-width:150px;padding:6px 14px;background:#173f53ee;color:#fff7d6;border:2px solid #ffd65a;border-radius:14px;text-align:center;pointer-events:none}
.cw-course-clock strong{font:900 20px/1.1 var(--sans);font-variant-numeric:tabular-nums}
.cw-course-clock small{font-size:12px;opacity:.9}
.cw-game.is-playing .cw-course-clock{top:calc(44px + env(safe-area-inset-top))}
.cw-course-tip{position:absolute;left:50%;bottom:calc(150px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:6;padding:8px 16px;border-radius:999px;background:#ffd65a;color:#173c50;font:900 16px/1.2 var(--sans);box-shadow:0 3px 0 #173c5055;pointer-events:none;animation:cw-tap 0.5s ease-in-out infinite alternate;white-space:nowrap}
@keyframes cw-tap{from{transform:translateX(-50%) scale(1)}to{transform:translateX(-50%) scale(1.08)}}
@media(prefers-reduced-motion:reduce){.cw-course-tip{animation:none}}
@media(max-height:560px){.cw-course-tip{bottom:calc(112px + env(safe-area-inset-bottom));font-size:13px;padding:6px 12px}.cw-course-clock strong{font-size:16px}.cw-course-clock small{font-size:10.5px}}
.cw-race-count{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);z-index:8;padding:10px 28px;border-radius:20px;background:#173f53cc;color:#ffd65a;font:900 clamp(40px,9vw,84px)/1 var(--display,var(--sans));pointer-events:none;text-shadow:0 3px 0 #0006}
.cw-race-count.is-go{color:#7be38a}
.cw-race-results{margin:4px 0 12px;padding-left:0;list-style:none;display:grid;gap:4px;font-weight:800}
@media(max-height:560px){.cw-race-count{font-size:44px;padding:6px 18px;top:42%}}
/* ---- Words on screen (2026-10-13, the user: "moving most text to below text box like in pokemon games and title that
   pop up are only text and don’t stay long but when you hit / you can see wear it said in the chat"). ---- */
/* What characters say: one box along the bottom, the speaker's name on a tab; the words type out (a tap finishes them,
   the next goes on), and a ▼ waits once they're all there. */
.cw-game #cw-bubble{top:auto!important;right:auto!important;left:50%!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:min(780px,calc(100% - 40px))!important;max-width:none!important;min-height:86px;box-sizing:border-box;padding:16px 54px 18px 94px!important;background:#fffdf6!important;color:#1d2f3c;border:4px solid #263a4a!important;border-radius:14px!important;box-shadow:inset 0 0 0 3px #fffdf6,inset 0 0 0 5px #d8c79a,0 6px 0 #0000002e!important;z-index:7}
.cw-game #cw-bubble img{position:absolute;left:10px;top:auto;bottom:4px;width:72px!important;height:auto;max-height:90px;object-fit:contain;object-position:bottom}
.cw-game #cw-bubble p,.cw-game[data-words] #cw-bubble p{font:700 calc(18px*var(--tx,1))/1.45 var(--sans);margin:0;padding:0;min-height:2.9em;color:#1d2f3c}
.cw-bubble-name{position:absolute;top:-17px;left:16px;padding:3px 12px;border-radius:9px;background:#263a4a;color:#ffe9a8;font:900 13px/1.3 var(--sans);letter-spacing:.03em;white-space:nowrap;pointer-events:none}
.cw-bubble-name:empty{display:none}
.cw-bubble-more{position:absolute;right:18px;bottom:8px;color:#263a4a;font-size:14px;animation:cw-more .9s ease-in-out infinite alternate;pointer-events:none}
#cw-bubble.is-typing .cw-bubble-more{visibility:hidden}
@keyframes cw-more{to{transform:translateY(3px)}}
.cw-game #cw-bubble .cw-bubble-hear{position:absolute;right:12px;top:10px;bottom:auto;width:32px;height:32px;border:0;border-radius:50%;background:#efe6cc;color:#263a4a;font-size:15px;line-height:32px;opacity:1;cursor:pointer;padding:0}
#cw-bubble.is-pinned{border-color:#263a4a!important}
@media(prefers-reduced-motion:reduce){.cw-bubble-more{animation:none}}
/* With the box up, the things along the bottom step out of its way. */
.cw-game:has(#cw-bubble:not([hidden])) #cw-scroll-chip,.cw-game:has(#cw-bubble:not([hidden])) .cw-course-tip{visibility:hidden}
.cw-game:has(#cw-bubble:not([hidden])) .cw-hint{bottom:calc(124px + env(safe-area-inset-bottom))}
@media(pointer:fine){.cw-game:has(#cw-bubble:not([hidden])) .cw-chat-dock{bottom:128px}}
/* A phone on its side: the box sits between the arrows and the buttons. */
@media(pointer:coarse) and (max-height:560px){
 .cw-game #cw-bubble{width:calc(100% - 316px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;min-height:62px;bottom:calc(8px + env(safe-area-inset-bottom))!important;padding:11px 40px 12px 56px!important;border-width:3px!important}
 .cw-game #cw-bubble img{width:44px!important;max-height:60px}
 .cw-game #cw-bubble p,.cw-game[data-words] #cw-bubble p{font-size:min(calc(14.5px*var(--tx,1)),17px);line-height:1.35;min-height:2.7em}
 .cw-bubble-name{font-size:11px;top:-14px;padding:2px 9px}
 .cw-game #cw-bubble .cw-bubble-hear{width:26px;height:26px;line-height:26px;top:6px;right:8px;font-size:12px}
 .cw-game:has(#cw-bubble:not([hidden])) .cw-together{visibility:hidden}
 .cw-game:has(#cw-bubble:not([hidden])) .cw-hint{bottom:calc(84px + env(safe-area-inset-bottom))}
}
/* A phone held upright: above the arrows and buttons. */
@media(pointer:coarse) and (max-width:560px){.cw-game #cw-bubble{width:calc(100% - 20px)!important;bottom:calc(190px + env(safe-area-inset-bottom))!important}}
/* Titles that pop up: words only (no card), brief (castle-words.js READING.toast), kept in the chat (press /). */
.cw-game .cw-toast{left:50%!important;right:auto!important;top:21%!important;transform:translateX(-50%)!important;width:max-content!important;max-width:min(680px,calc(100% - 40px))!important;min-width:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;gap:10px;pointer-events:none;text-align:center;justify-content:center;z-index:6}
.cw-game .cw-toast strong,.cw-game[data-words] .cw-toast strong{font:900 clamp(24px,3.4vw,36px)/1.1 var(--display,var(--sans));color:#fff;text-shadow:0 2px 0 #1d2f3c,2px 0 0 #1d2f3c,-2px 0 0 #1d2f3c,0 -2px 0 #1d2f3c,2px 2px 0 #1d2f3c,-2px 2px 0 #1d2f3c,0 5px 12px #0008}
.cw-game .cw-toast small,.cw-game[data-words] .cw-toast small{color:#fff7dc;font:800 16px/1.35 var(--sans);text-shadow:0 1px 0 #1d2f3c,1px 0 0 #1d2f3c,-1px 0 0 #1d2f3c,0 -1px 0 #1d2f3c,0 2px 6px #000a;margin-top:4px}
.cw-game .cw-toast>span{font-size:30px;color:#ffd65a;filter:drop-shadow(0 2px 0 #1d2f3c)}
.cw-game .cw-toast.is-showing{animation:cw-title-flash var(--toast-life,2.6s) ease both!important}
@keyframes cw-title-flash{0%{opacity:0;transform:translateX(-50%) translateY(8px) scale(.96)}10%{opacity:1;transform:translateX(-50%) translateY(0) scale(1)}80%{opacity:1;transform:translateX(-50%)}100%{opacity:0;transform:translateX(-50%) translateY(-6px)}}
@media(prefers-reduced-motion:reduce){.cw-game .cw-toast.is-showing{animation:none!important;opacity:1}}
.cw-viewport:has(#cw-chapter-card:not([hidden])) .cw-toast{top:34%!important}
@media(max-height:560px){.cw-game .cw-toast{top:22%!important}.cw-game .cw-toast strong,.cw-game[data-words] .cw-toast strong{font-size:21px}.cw-game .cw-toast small,.cw-game[data-words] .cw-toast small{font-size:12.5px}.cw-game .cw-toast>span{font-size:22px}}
/* The chat (press /) holds what was said and what popped up. */
.cw-chat .is-said b{color:#ffe9a8}
.cw-chat .is-news{color:#ffd65a}
/* With the chat open (press /), its log shows what was said, so the box steps aside; the log scrolls, newest at the
   bottom, and never runs off the top. */
.cw-game:has(.cw-phrases:not([hidden])) #cw-bubble{visibility:hidden}
@media(pointer:fine){.cw-game:has(.cw-phrases:not([hidden])) .cw-chat-dock{bottom:12px}}
.cw-chat.is-open{max-height:min(42vh,320px);overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;align-content:end}
.cw-chat-dock .cw-chat.is-open{flex-shrink:1;min-height:0}
/* A phone held upright: a smaller face and words, so the box stays short. */
@media(max-width:560px){.cw-game #cw-bubble{padding:13px 40px 14px 62px!important;min-height:70px}.cw-game #cw-bubble img{width:48px!important;max-height:66px}.cw-game #cw-bubble p,.cw-game[data-words] #cw-bubble p{font-size:min(calc(15.5px*var(--tx,1)),18px);line-height:1.38}.cw-game #cw-bubble .cw-bubble-hear{width:28px;height:28px;line-height:28px;font-size:13px;right:8px;top:8px}}
/* A phone on its side with the chat open: what was said on the left, the phrases and commands on the right, so the
   panel never covers the history. */
@media(pointer:coarse) and (max-height:560px){
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-phrases{left:auto!important;right:calc(8px + env(safe-area-inset-right));transform:none!important;width:min(560px,calc(60% - 12px))!important;top:calc(46px + env(safe-area-inset-top));max-height:calc(100% - 54px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .cw-viewport:has(.cw-phrases:not([hidden])) .cw-chat{top:calc(54px + env(safe-area-inset-top))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;left:calc(8px + env(safe-area-inset-left));width:calc(40% - 16px)!important;max-height:none;font-size:12px}
 .cw-chat.is-open li:nth-last-child(n+5){display:block}
}
/* With the speech box up, the letter and "you need…" chips sit just above it, not on it. */
.cw-game:has(#cw-bubble:not([hidden])) .cw-need-chip,.cw-game:has(#cw-bubble:not([hidden])) .cw-letter-chip{bottom:calc(122px + env(safe-area-inset-bottom))}
@media(pointer:coarse) and (max-height:560px){.cw-game:has(#cw-bubble:not([hidden])) .cw-need-chip,.cw-game:has(#cw-bubble:not([hidden])) .cw-letter-chip{bottom:calc(80px + env(safe-area-inset-bottom))}}
@media(pointer:coarse) and (max-width:560px){.cw-game:has(#cw-bubble:not([hidden])) .cw-need-chip,.cw-game:has(#cw-bubble:not([hidden])) .cw-letter-chip{bottom:calc(296px + env(safe-area-inset-bottom))}}
/* A photo: the flash, and the framed picture. */
.cw-photo-flash{position:absolute;inset:0;z-index:20;background:#fff;pointer-events:none;opacity:0}
.cw-photo-flash.is-on{animation:cw-flash .5s ease-out}
@keyframes cw-flash{0%{opacity:.85}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.cw-photo-flash.is-on{animation:none}}
#cw-dialog .cw-photo{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 4px 14px #0003;margin:10px 0}
/* Tell it back: the story's slots, filled in order, and the picture cards to tap. */
.cw-retell-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0;padding:0;list-style:none}
.cw-retell-row li{min-height:74px;display:grid;place-items:center;align-content:center;gap:4px;padding:6px;border:2px dashed #c9b78a;border-radius:12px;background:#fffdf3;text-align:center}
.cw-retell-row li b{font:900 22px/1 var(--sans);color:#c9b78a}
.cw-retell-row li.is-placed{border-style:solid;border-color:#5a8a3a;background:#eef6e4}
.cw-retell-row li span{font-size:26px;line-height:1}.cw-retell-row li small{font:700 11.5px/1.25 var(--sans);color:#24402a}
.cw-retell-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:6px 0 10px}
.cw-retell-card{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;border:2px solid #173c50;border-radius:12px;background:#fff;color:#173c50;font:800 14px/1.25 var(--sans);text-align:left;cursor:pointer}
.cw-retell-card span{font-size:26px;line-height:1}
.cw-retell-card:hover,.cw-retell-card:focus-visible{background:#fff0b6}
@media(max-height:560px){.cw-retell-row li{min-height:56px}.cw-retell-row li span{font-size:20px}.cw-retell-card{min-height:42px;font-size:12.5px}.cw-retell-card span{font-size:20px}}
/* Keyboard for every text (2026-10-18): the Enter key shows on whatever Enter will open (the speech box, a note, a
   letter, today's scroll), and a row under each window names the keys. Not on touch screens. */
.cw-enter-key,.cw-goal-key{display:none;margin-left:8px;padding:1px 6px 0;border:1.5px solid currentColor;border-bottom-width:3px;border-radius:6px;font:900 10px/1.4 var(--sans);letter-spacing:.4px;opacity:.75;vertical-align:middle}
.is-enter>.cw-enter-key,.cw-goal-key{display:inline-block}
#cw-bubble>.cw-enter-key{position:absolute;right:38px;bottom:6px;margin:0;color:#263a4a}
.cw-dialog-keys{margin:12px 0 0;font:700 12px/1.6 var(--sans);color:#5d727c;text-align:center}
.cw-dialog-keys kbd{display:inline-block;margin:0 2px;padding:0 6px;border:1.5px solid #8a9aa2;border-bottom-width:3px;border-radius:6px;background:#fffdf6;font:900 11px/1.5 var(--sans);color:#173d50}
/* The main goal (castle-goal.js): always at the top middle with its next step; small while a mission is under way. */
.cw-goal{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:3;display:grid;gap:3px;justify-items:center;width:max-content;max-width:min(540px,calc(100% - 400px));padding:6px 16px 8px;border:2px solid #d4a043;border-radius:16px;background:#fffaf0ee;color:#173d50;font:700 13px/1.25 var(--sans);text-align:center;box-shadow:0 3px 0 #8a5a1d44;cursor:pointer}
.cw-goal:hover,.cw-goal:focus-visible{background:#fffdf6;outline:none;border-color:#b37d23}
.cw-goal small{display:flex;align-items:center;gap:5px;font:900 10.5px/1 var(--sans);letter-spacing:1.2px;color:#a5651c}.cw-goal small b{color:#173d50;letter-spacing:.3px}
.cw-goal strong{font:400 17px/1.15 var(--display)}
.cw-goal-items{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 10px;font:800 11.5px/1.3 var(--sans);color:#61757e}.cw-goal-items .is-done{color:#2f7d3a}
.cw-goal-next{font:800 12.5px/1.3 var(--sans);color:#173d50}.cw-goal-next b{color:#c98a26;margin-right:2px}
.cw-goal.is-compact{padding:5px 12px 6px}.cw-goal.is-compact strong{font-size:14px}.cw-goal.is-compact .cw-goal-items,.cw-goal.is-compact .cw-goal-next{display:none}
.cw-game.is-seeking .cw-goal,.cw-game.is-questless .cw-goal,.cw-game.is-dueling .cw-goal,.cw-game.is-practicing .cw-goal{display:none!important}
.cw-goal-list{list-style:none;margin:6px 0 10px;padding:0;display:grid;gap:6px}
.cw-goal-list{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.cw-goal-list li{display:flex;align-items:center;gap:8px;padding:5px 10px;border:1.5px solid #d8cfae;border-radius:12px;background:#fffdf4;font:800 13.5px/1.3 var(--sans)}
.cw-goal-list li b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#efe6c8;color:#8a5a1d}.cw-goal-list li.is-done{background:#f1f8ec;border-color:#a9c99b}.cw-goal-list li.is-done b{background:#2f7d3a;color:#fff}
.cw-goal-list li small{margin-left:auto;letter-spacing:1px;font-size:13px;color:#b9a77a}
.cw-goal-leave{margin:12px 0 0;font:600 13px/1.5 var(--sans);color:#5d6f77}.cw-goal-leave .cw-button{margin:0 6px;padding:6px 12px;font-size:13px}
.cw-goal-step{margin:4px 0 8px;padding:10px 14px;border-radius:12px;background:#fff3cf;font:800 15px/1.35 var(--sans);color:#173d50}.cw-goal-step small{display:block;margin-top:3px;font:600 13px/1.4 var(--sans);color:#5d6f77}
@media(max-width:900px){.cw-goal{max-width:calc(100% - 330px)}.cw-goal strong{font-size:15px}}
/* Touch screens have their buttons along the top middle: the goal sits just under them. */
@media(pointer:coarse){.cw-goal{top:calc(66px + env(safe-area-inset-top))}}
/* Phones: top left, under the top buttons and clear of the map, title and next step only; while a trail is showing
   (a mission, a letter's way) it steps aside, since the trail sits there and says what's next. */
@media(pointer:coarse) and (max-height:560px),(pointer:coarse) and (max-width:560px){
 .cw-goal{top:calc(58px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));transform:none;justify-items:start;text-align:left;max-width:min(360px,calc(100% - 110px));padding:4px 10px 5px;gap:1px;border-radius:12px}
 .cw-goal strong{font-size:13px}.cw-goal-items{display:none}.cw-goal-next{font-size:11px}.cw-goal small{font-size:9px}
 .cw-goal.is-compact,.cw-viewport:has(>.cw-trail:not([hidden])) .cw-goal{display:none}
}
@media(pointer:coarse){.cw-enter-key,.cw-goal-key,.cw-dialog-keys{display:none!important}}

/* Cutscenes (castle-adventure.js): letterbox bars under the speech box, a skip hint, and the goal panel steps aside. */
.cw-cutscene{position:absolute;inset:0;pointer-events:none;z-index:1}
.cw-cutscene i{position:absolute;left:0;right:0;height:7%;background:#000;opacity:.82;transform-origin:center;animation:cw-bars .5s ease-out}
.cw-cutscene i:first-child{top:0;transform-origin:top}.cw-cutscene i:nth-child(2){bottom:0;transform-origin:bottom}
.cw-cutscene span{position:absolute;left:50%;top:calc(3.5% - 11px);transform:translateX(-50%);padding:4px 11px;border-radius:999px;background:#000a;color:#fff;font:700 13px/1.2 Nunito,system-ui,sans-serif}
@keyframes cw-bars{from{transform:scaleY(0)}to{transform:scaleY(1)}}
.is-cutscene .cw-goal,.is-cutscene .cw-tracker{opacity:0;transition:opacity .3s}
/* A mission's badge: small, under the main goal, for a few seconds. */
.cw-badge-pop{position:absolute;left:50%;top:calc(104px + env(safe-area-inset-top));transform:translate(-50%,-10px);display:flex;align-items:center;gap:10px;max-width:min(380px,calc(100% - 32px));padding:6px 16px 6px 7px;background:linear-gradient(#fffcee,#ffefbf);border:2px solid #d4a043;border-radius:999px;box-shadow:0 4px 14px #0003;color:#173d50;z-index:4;opacity:0;transition:opacity .35s,transform .35s;pointer-events:none}
.cw-badge-pop.is-showing{opacity:1;transform:translate(-50%,0)}
.cw-badge-medal{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3b8,#e7b54a 70%);box-shadow:inset 0 0 0 2px #fff9,0 1px 3px #0004;font-size:20px}
.cw-badge-words strong{display:block;font:800 15px/1.2 Nunito,system-ui,sans-serif}.cw-badge-words small{display:block;font:600 12.5px/1.3 Nunito,system-ui,sans-serif;color:#5d6f77}
@media(max-width:650px){.cw-badge-pop{top:calc(64px + env(safe-area-inset-top))}}
.cw-viewport:has(#cw-badge.is-showing) .cw-toast{top:calc(21% + 70px)!important}/* notices step below a badge */

/* The badge case (castle-badges.js): a trainer card beside a velvet case of shiny medals. */
.cw-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#cw-dialog:has(.cw-badge-case){width:min(980px,calc(100% - 24px));max-width:none;background:linear-gradient(160deg,#ffe9a8,#ffd36b 55%,#f5b84a);border-color:#a8701c}
.cw-badge-case{display:grid;grid-template-columns:minmax(200px,250px) 1fr;gap:16px;align-items:start}
.cw-trainer{display:grid;justify-items:center;gap:6px;padding:14px 12px 16px;border-radius:20px;background:linear-gradient(170deg,#3a7fd0,#24539e);color:#fff;border:3px solid #fff6;box-shadow:inset 0 0 0 3px #1a3d7a,0 6px 0 #1a3d7a55;text-align:center}
.cw-trainer-photo{width:150px;aspect-ratio:3/4;display:grid;place-items:center;border-radius:16px;background:radial-gradient(circle at 50% 40%,#fff8d6,#ffd36b 70%,#e2a23c);box-shadow:inset 0 0 0 3px #fff9,0 4px 10px #0004;overflow:hidden}
.cw-trainer-photo img{width:118%;height:118%;object-fit:contain}
.cw-trainer-name{font:900 22px/1.1 Fredoka,Nunito,system-ui,sans-serif;letter-spacing:.3px;text-shadow:0 2px 0 #1a3d7a}
.cw-trainer-rank{padding:3px 12px;border-radius:999px;background:#ffd36b;color:#5a3a08;font:800 13px/1.3 Nunito,system-ui,sans-serif}
.cw-trainer-stats{width:100%;margin:6px 0 0;display:grid;gap:4px}
.cw-trainer-stats div{display:flex;justify-content:space-between;gap:8px;padding:5px 10px;border-radius:10px;background:#ffffff1f;font:700 13px/1.2 Nunito,system-ui,sans-serif}
.cw-trainer-stats dt{opacity:.9}.cw-trainer-stats dd{margin:0;font-weight:900}
.cw-trainer-bar{width:100%;height:12px;border-radius:999px;background:#0003;overflow:hidden;box-shadow:inset 0 1px 2px #0005}
.cw-trainer-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffe27a,#ffb02e)}
.cw-case{padding:12px 14px 14px;border-radius:20px;background:radial-gradient(circle at 30% 0%,#3b1c6e,#24104a 70%);border:4px solid #e2b04a;box-shadow:inset 0 0 0 3px #7a4ec2,inset 0 8px 24px #0006}
.cw-case h3{margin:6px 4px 6px;color:#ffe9a8;font:900 15px/1.2 Fredoka,Nunito,system-ui,sans-serif;letter-spacing:.4px;text-transform:uppercase}
.cw-case-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;padding:8px;border-radius:14px;background:#00000038;box-shadow:inset 0 2px 6px #0007}
.cw-medal{display:grid;justify-items:center;gap:5px;padding:6px 4px 7px;border:0;border-radius:14px;background:transparent;color:#fff;cursor:pointer;font:inherit}
.cw-medal:hover,.cw-medal:focus-visible,.cw-medal.is-picked{background:#ffffff1c;outline:2px solid #ffe27a;outline-offset:-2px}
.cw-medal img,.cw-medal-face{width:66px;height:66px}
.cw-medal img{object-fit:contain;filter:drop-shadow(0 3px 4px #0008)}
.cw-medal-face{position:relative;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff 0 8%,var(--c1) 34%,var(--c2) 100%);box-shadow:inset 0 0 0 4px #fff8,inset 0 0 0 7px var(--c2),0 3px 0 #0005,0 0 0 3px #e2b04a;font-size:32px;overflow:hidden}
.cw-medal-face>span{filter:drop-shadow(0 2px 1px #0004)}
.is-earned .cw-medal-face::after{content:'';position:absolute;inset:-40%;background:linear-gradient(115deg,transparent 40%,#fff9 50%,transparent 60%);transform:translateX(-60%);animation:cw-shine 3.6s ease-in-out infinite}
.cw-case-row .cw-medal:nth-child(3n+2) .cw-medal-face::after{animation-delay:1.2s}.cw-case-row .cw-medal:nth-child(3n) .cw-medal-face::after{animation-delay:2.4s}
@keyframes cw-shine{0%,60%{transform:translateX(-60%)}100%{transform:translateX(60%)}}
@media(prefers-reduced-motion:reduce){.is-earned .cw-medal-face::after{animation:none;opacity:0}}
.is-locked .cw-medal-face{--c1:#5b4a7a;--c2:#3a2c55;box-shadow:inset 0 0 0 4px #ffffff22,0 3px 0 #0005,0 0 0 3px #6b5a8c;color:#ffffff88;font-size:28px;font-weight:900}
.cw-medal-name{max-width:100%;font:800 11.5px/1.15 Nunito,system-ui,sans-serif;text-align:center;color:#fff5d6}
.is-locked .cw-medal-name{color:#b7a8d6}
.cw-case-caption{display:grid;gap:2px;margin:12px 4px 0;padding:10px 14px;border-radius:14px;background:#fff8e1;color:#173d50}
.cw-case-caption strong{font:900 16px/1.2 Fredoka,Nunito,system-ui,sans-serif}.cw-case-caption small{font:600 13px/1.35 Nunito,system-ui,sans-serif;color:#5d6f77}
@media(max-width:700px){.cw-badge-case{grid-template-columns:1fr}.cw-trainer{grid-template-columns:auto 1fr;justify-items:start;text-align:left}.cw-trainer-photo{width:96px;grid-row:span 3}.cw-trainer-stats,.cw-trainer-bar{grid-column:1/-1}.cw-case-row{grid-template-columns:repeat(auto-fill,minmax(74px,1fr))}.cw-medal img,.cw-medal-face{width:56px;height:56px;font-size:26px}}
.cw-trainer-photo img{mix-blend-mode:multiply}/* (the portrait's white page melts into the gold) */
.is-locked .cw-medal-face{filter:grayscale(.85) brightness(.5) contrast(1.1)}
.is-earned .cw-medal-face{box-shadow:inset 0 0 0 4px #fff8,inset 0 0 0 7px var(--c2),0 3px 0 #0005,0 0 0 3px #ffd36b,0 0 16px 3px #ffd36b88}
.is-earned .cw-medal-name{color:#fff;text-shadow:0 1px 0 #0008}
.is-earned img{filter:drop-shadow(0 0 10px #ffd36baa) drop-shadow(0 3px 4px #0008)}
.cw-medal-art{position:relative;display:grid;place-items:center;width:84px;height:84px}.cw-medal-art img{width:84px;height:84px}
.is-locked .cw-medal-art img{filter:brightness(0) opacity(.42)}
.cw-medal-art b{position:absolute;inset:0;display:grid;place-items:center;color:#c9b8ee;font:900 26px/1 Fredoka,Nunito,system-ui,sans-serif;text-shadow:0 2px 0 #0008}
.is-earned .cw-medal-art img{animation:cw-badge-bob 4s ease-in-out infinite}.cw-case-row .cw-medal:nth-child(2n) .cw-medal-art img{animation-delay:-2s}
@keyframes cw-badge-bob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-3px) rotate(-2deg)}}
@media(prefers-reduced-motion:reduce){.is-earned .cw-medal-art img{animation:none}}
@media(max-width:700px){.cw-medal-art,.cw-medal-art img{width:60px;height:60px}}
.cw-badge-medal img{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 2px 3px #0006)}.cw-badge-medal:has(img){background:none;box-shadow:none;width:46px;height:46px}
@media(min-width:701px){.cw-trainer{position:sticky;top:0}}
.cw-kingdom-chip{transition:opacity .3s}
/* ---- One text box for all talk (2026-10-20, Michael: "All talk in the pokemon style text box"). A friend's talk window
   (a portrait and their words, castle-adventure.js setupTalk) is the same box as the speech box along the bottom: its
   place, size, frame, the speaker's name on a tab, the portrait, the letters, ▼, 🔊 and ×. Its choices come up inside,
   under the words. (The window's heading stays for screen readers.) ---- */
.cw-talk-name{display:none}
.cw-game #cw-dialog.cw-talk-box,.cw-game[data-words] #cw-dialog.cw-talk-box{margin:auto auto calc(var(--talk-bottom,0px) + 14px + env(safe-area-inset-bottom));translate:var(--talk-shift,0px) 0;width:min(780px,calc(min(var(--talk-width,100vw),100vw) - 40px));max-width:none;max-height:min(600px,calc(var(--talk-room,100dvh)*.74));box-sizing:border-box;overflow:visible;padding:16px 54px 18px 94px;background:#fffdf6;color:#1d2f3c;border:4px solid #263a4a;border-radius:14px;box-shadow:inset 0 0 0 3px #fffdf6,inset 0 0 0 5px #d8c79a,0 6px 0 #0000002e}
#cw-dialog.cw-talk-box[open]{display:flex;flex-direction:column}
#cw-dialog.cw-talk-box #cw-dialog-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
#cw-dialog.cw-talk-box .cw-dialog-keys{flex:none;margin:6px 0 -8px}
/* The adventures to pick from, as compact rows under the words. */
#cw-dialog.cw-talk-box .cw-story-cards{gap:8px;margin-top:4px}
#cw-dialog.cw-talk-box .cw-story-card{padding:8px 14px;gap:12px;border-radius:12px}
#cw-dialog.cw-talk-box .cw-story-card>img{width:34px;height:48px}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-story-card small{font-size:11px}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-story-card strong{font-size:calc(16px*var(--tx,1));margin:1px 0 2px;line-height:1.2}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-story-card small{line-height:1.3}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-story-card strong+span{font-size:calc(13.5px*var(--tx,1))}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head{display:block;margin:0;min-height:0;padding:0;border:0}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head img{position:absolute;left:10px;top:14px;width:72px;height:auto;max-height:90px;object-fit:contain;object-position:top}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head>div{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-talk-name{display:block;position:absolute;top:-17px;left:16px;padding:3px 12px;border-radius:9px;background:#263a4a;color:#ffe9a8;font:900 13px/1.3 var(--sans);letter-spacing:.03em;white-space:nowrap;pointer-events:none}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-conversation{font:700 calc(18px*var(--tx,1))/1.45 var(--sans);color:#1d2f3c;margin:0 0 10px;padding:0 0 0 0;min-height:2.9em}
.cw-game[data-words] #cw-dialog.cw-talk-box .cw-actions{margin-top:6px;gap:8px}
#cw-dialog.cw-talk-box .cw-dialog-hear{right:12px;top:10px;width:32px;height:32px;min-width:0;padding:0;border:0;border-radius:50%;background:#efe6cc;color:#263a4a;font-size:15px}
#cw-dialog.cw-talk-box .cw-dialog-hear .cw-hear-label{display:none}
#cw-dialog.cw-talk-box .cw-dialog-hear[aria-pressed=true]{background:#ffdb6a}
#cw-dialog.cw-talk-box .cw-dialog-close{position:absolute;top:-12px;right:-12px;width:34px;height:34px;min-width:0;min-height:0;padding:0;border-radius:50%;border:2px solid #173c50;background:#fffbee;color:#173c50;font:800 20px/1 Nunito,system-ui,sans-serif;display:grid;place-items:center;box-shadow:0 2px 4px #0003;z-index:3}
#cw-dialog.cw-talk-box .cw-talk-next{right:12px;bottom:6px;width:36px;height:30px;border:0;border-radius:8px;background:none;box-shadow:none;color:#263a4a;font-size:14px}
#cw-dialog.cw-talk-box.is-grown-up::before{top:-17px;left:auto;right:56px}
@media(max-width:560px){
 .cw-game #cw-dialog.cw-talk-box,.cw-game[data-words] #cw-dialog.cw-talk-box{width:calc(100vw - 20px);padding:13px 40px 14px 62px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head img{width:48px;max-height:66px;left:8px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-conversation{font-size:min(calc(15.5px*var(--tx,1)),18px);line-height:1.38}
 #cw-dialog.cw-talk-box .cw-dialog-hear{width:28px;height:28px;right:8px;top:8px;font-size:13px}
}
@media(pointer:coarse) and (max-height:560px){
 .cw-game #cw-dialog.cw-talk-box,.cw-game[data-words] #cw-dialog.cw-talk-box{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin-bottom:calc(8px + env(safe-area-inset-bottom));padding:11px 40px 12px 56px;border-width:3px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-dialog-head img{width:44px;max-height:60px;top:10px}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-conversation{font-size:min(calc(14.5px*var(--tx,1)),17px);line-height:1.35;min-height:2.7em}
 .cw-game[data-words] #cw-dialog.cw-talk-box .cw-talk-name{font-size:11px;top:-14px;padding:2px 9px}
 #cw-dialog.cw-talk-box .cw-dialog-hear{width:26px;height:26px;top:6px;right:8px;font-size:12px}
}
/* A phone held upright: the box sits where the speech box does, above the arrows and buttons. */
@media(pointer:coarse) and (max-width:560px){.cw-game #cw-dialog.cw-talk-box,.cw-game[data-words] #cw-dialog.cw-talk-box{margin-bottom:calc(var(--talk-bottom,0px) + 190px + env(safe-area-inset-bottom));max-height:calc(var(--talk-room,100dvh) - 220px)}}
