:root{font-family:Trebuchet MS,Arial,sans-serif;color:#3d2955;background:#24193f;font-synthesis:none}*{box-sizing:border-box}html,body,#app{margin:0;width:100%;height:100%;overflow:hidden}button{font-family:inherit;cursor:pointer;border:0;touch-action:manipulation;font-weight:900;color:#463255;transition:transform .12s,background .15s}button:active{transform:scale(.96)}button:focus-visible{outline:3px solid #ffb540;outline-offset:2px}.hidden{display:none!important}#app{display:flex;flex-direction:column;background:#fff5d6}.topbar{height:52px;flex:0 0 52px;z-index:10;display:flex;align-items:center;gap:10px;padding:5px 12px;background:linear-gradient(90deg,#45305e,#785094);color:#ffebba;box-shadow:0 2px 10px #27203830}.brand{display:flex;align-items:center;gap:8px;color:white;border:0;background:transparent;font-size:14px;white-space:nowrap}.brand span{font-weight:1000;letter-spacing:.1px}.crumb{display:flex;align-items:center;gap:10px;min-width:0;font-size:12px;color:#fef0df}.crumb b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:29vw}.crumb span{opacity:.8;white-space:nowrap}.top-actions{margin-left:auto;display:flex;align-items:center;gap:5px}.tiny{min-width:35px;min-height:35px;border-radius:12px;background:#ffffff2a;color:#fff;font-size:19px}.spark{border-radius:12px;background:#ffc962;padding:7px 10px;color:#603f3b;white-space:nowrap;font-size:14px}.game-layout{flex:1;display:flex;min-height:0;padding:8px;gap:8px;background:#f1e9f5}.scene-panel{position:relative;overflow:hidden;flex:1;min-width:0;min-height:0;border-radius:20px;background:linear-gradient(#a6ddef,#c7e0ac);box-shadow:inset 0 0 0 3px #fff,0 3px 11px #4b3b5c3b}#sceneCanvas{width:100%;height:100%;display:block}.scene-hud{position:absolute;top:12px;left:12px;display:flex;gap:7px;flex-wrap:wrap}.chapter-pill,.step-pill{padding:7px 10px;border-radius:50px;background:#fffcebdd;color:#4e4668;font-size:11px;font-weight:900;box-shadow:0 2px 5px #2c214727}.step-pill{background:#fbca66e8;color:#54365f}.scene-bottom{position:absolute;left:10px;right:10px;bottom:9px;border-radius:14px;padding:10px 14px;background:#fffbedec;color:#413457;box-shadow:0 2px 8px #3a244139;max-width:750px}.scene-bottom h2{margin:0 0 3px;font-size:clamp(15px,2vw,22px);line-height:1.2}.scene-bottom p{margin:0;font-size:clamp(11px,1.17vw,14px);line-height:1.35}.scene-flash{position:absolute;top:23%;left:50%;transform:translateX(-50%);background:#fffceeee;box-shadow:0 5px 20px #3d3e6077;border:3px solid #ffcd68;padding:14px;border-radius:20px;font-weight:900;font-size:21px;text-align:center;max-width:84%;pointer-events:none;opacity:0;transition:opacity .17s;z-index:3}.scene-flash.visible{opacity:1}.puzzle-panel{width:min(365px,38%);min-width:295px;display:flex;flex-direction:column;border-radius:19px;min-height:0;padding:14px;gap:7px;overflow:hidden;background:linear-gradient(#fffaf0,#fff5e0);box-shadow:0 3px 13px #3b2f4931;border:2px solid white}.quest{flex:0 0 auto}.eyebrow{font-size:10px;letter-spacing:1.3px;color:#bd7d43;font-weight:900}.quest h1{font-size:clamp(19px,2vw,26px);margin:2px 0 4px;color:#633e80;line-height:1.09}.quest p{font-size:13px;color:#786b71;margin:0;line-height:1.27;min-height:18px}.word-display{background:#fff;border:2px solid #ead7ce;border-radius:15px;display:flex;align-items:center;min-height:45px;flex:0 0 45px;justify-content:space-between;padding:3px 9px;gap:4px}#builtWord{letter-spacing:1.5px;font-size:clamp(14px,1.75vw,21px);font-weight:1000;color:#54446c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.small-icon{width:34px;height:32px;border-radius:9px;background:#f8e8dc;color:#a27675;font-size:15px}.letter-board{position:relative;flex:1;min-height:118px;display:flex;align-items:center;justify-content:center;touch-action:none;overflow:hidden;border-radius:19px;background:repeating-radial-gradient(circle at 50% 50%,#fbe6ab 0 3px,#f9e8be 4px 9px,#f6e1a4 10px 11px);box-shadow:inset 0 0 0 3px #efcc7f}.letter-path{pointer-events:none;position:absolute;inset:0;width:100%;height:100%;z-index:1}.letters{position:relative;z-index:2;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:9px;width:100%;height:100%;padding:15px;touch-action:none}.tile{flex:none;display:flex;align-items:center;justify-content:center;width:clamp(45px,3.8vw,57px);height:clamp(45px,3.8vw,57px);font-size:clamp(23px,2.5vw,29px);border-radius:16px;border:2px solid #fffef4;background:linear-gradient(145deg,#fffdf2,#f9b854);color:#653858;box-shadow:0 4px 0 #c78b46,0 6px 8px #8a603746;touch-action:none;user-select:none}.tile.chosen{background:linear-gradient(#86f3c6,#35ccad);color:#22565d;box-shadow:0 3px 0 #29998a}.tile:active{transform:scale(.96)}.answer-actions,.extra-actions{display:flex;gap:7px;flex:0 0 auto}.answer-actions button{border-radius:13px;padding:11px 12px;font-size:15px;min-height:46px}.primary{background:linear-gradient(145deg,#ffc968,#ff9b5e);box-shadow:0 3px 0 #da784d;color:#563c58}.answer-actions .primary{flex:1}.secondary{background:#e5dbf0;color:#66547c}.extra-actions button{flex:1;min-width:0;border-radius:11px;min-height:39px;padding:5px 2px;background:#eadbf4;color:#704f7c;font-size:11px}.puzzle-footer{display:flex;justify-content:space-between;gap:7px;font-size:10px;font-weight:bold;color:#9b8796;white-space:nowrap;overflow:hidden}.puzzle-footer span{overflow:hidden;text-overflow:ellipsis}.menu-screen{position:absolute;inset:0;z-index:20;background:#1c224b url('cover.jpg') center/cover no-repeat;color:#fff;display:flex;align-items:center;padding:clamp(14px,4vw,60px)}.menu-backdrop{position:absolute;inset:0;background:linear-gradient(90deg,#21163aee 0%,#351b51c4 37%,#30245b30 78%),linear-gradient(0deg,#20164b8b,transparent 45%)}.menu-content{z-index:1;position:relative;max-width:600px}.menu-overline{letter-spacing:2px;font-size:clamp(10px,1.3vw,14px);font-weight:900;color:#ffd285;text-transform:uppercase}.menu-content h1{line-height:.92;font-size:clamp(36px,5.4vw,75px);margin:14px 0 8px;text-shadow:0 5px 0 #361b5e,0 8px 15px #2a1945;font-weight:1000;letter-spacing:-1.6px}.menu-content h1 em{font-style:normal;color:#ffcf65}.menu-content>p{font-weight:900;letter-spacing:4px;color:#fee6b3;margin:0 0 16px;font-size:clamp(13px,2vw,21px)}.menu-buttons{display:grid;grid-template-columns:repeat(2,minmax(140px,1fr));gap:8px;max-width:450px}.menu-buttons button{min-height:44px;border-radius:13px;color:#55436b;background:#fff8e8eb;padding:8px 6px;font-size:13px;box-shadow:0 2px 0 #ffffff50}.menu-buttons button.big{grid-column:1/-1;min-height:50px;font-size:19px;background:linear-gradient(145deg,#ffd66d,#ff8f62);color:#59344a}.menu-side-art{position:absolute;right:5%;bottom:5%;display:flex;flex-direction:column;align-items:flex-end;z-index:1;color:#fff4cc;text-shadow:0 2px 7px #342333a0;font-weight:900;font-size:15px}.menu-side-art b{font-size:26px;color:#fff}.menu-side-art small{font-size:12px}.overlay{position:absolute;inset:0;z-index:40;display:flex;justify-content:center;align-items:center;padding:12px;background:#211a3b99;backdrop-filter:blur(5px)}.overlay-card{width:min(770px,95vw);max-height:min(92vh,820px);background:#fff9ee;border:5px solid #f1d9ab;border-radius:22px;box-shadow:0 15px 40px #20102f88;display:flex;flex-direction:column;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#61477f;color:white;gap:10px}.modal-header h2{margin:0;font-size:clamp(17px,2vw,23px)}.modal-header button{height:36px;width:36px;background:#ffffff33;color:white;border-radius:10px;font-size:22px}.modal-body{padding:17px;overflow:auto;min-height:0}.modal-body p{line-height:1.48}.modal-body h3{margin:7px 0}.modal-body button{min-height:42px;padding:10px;border-radius:12px;background:#eadcf2;font-size:13px}.modal-body button.primary{background:linear-gradient(145deg,#ffc968,#ff9b5e)}.world-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.world-tile{text-align:left;border-radius:15px;padding:14px!important;border:2px solid #d6bddb!important;display:flex;flex-direction:column;gap:6px;min-height:103px}.world-tile b{font-size:16px}.world-tile small{font-size:12px}.world-tile:disabled{filter:grayscale(.7);opacity:.58}.level-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:10px 0}.level-grid button{padding:8px 3px;min-height:65px;background:#e7e0fb;color:#5b4c84;font-size:12px}.level-grid button:disabled{opacity:.5}.level-grid button.done{background:#cff1d6}.grid-detail{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.grid-detail>div{background:#f4e9f5;padding:12px;border-radius:12px}.victory-hero{font-size:60px;text-align:center;margin:0}.victory-score{font-size:26px;text-align:center;color:#7c4b83}.victory-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:center}.victory-actions button{min-width:135px}.settings-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px;border-bottom:1px solid #e6d9df}.settings-row select{min-height:39px;border:2px solid #d7bfdd;border-radius:8px;padding:5px;font-family:inherit}.ach-list{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.ach-item{background:#f2e9f5;border-radius:12px;padding:10px;font-size:12px}.ach-item.completed{background:#daefcf}.ach-item b{display:block;font-size:14px;margin-bottom:4px}.album-list{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.album-entry{padding:10px;border-radius:11px;background:#eadfed;font-size:12px}.album-entry b{display:block;margin-bottom:5px}#toast{position:absolute;bottom:14px;left:50%;transform:translateX(-50%) translateY(20px);background:#49365c;color:white;font-size:13px;font-weight:bold;z-index:100;padding:11px 16px;border-radius:14px;box-shadow:0 4px 14px #1c153e80;opacity:0;pointer-events:none;transition:.2s;max-width:85%;text-align:center}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:950px){.crumb{display:none}.puzzle-panel{min-width:280px;width:40%;padding:9px}.scene-bottom{padding:8px 10px}.letters{gap:6px;padding:8px}.tile{width:44px;height:44px;font-size:23px;border-radius:12px}.menu-side-art{display:none}}@media(max-width:650px){.topbar{height:44px;flex-basis:44px;padding:3px 7px}.brand{font-size:11px}.brand span{max-width:178px;overflow:hidden;text-overflow:ellipsis}.spark{font-size:11px;padding:6px 7px}.top-actions{gap:3px}.tiny{width:30px;min-width:30px;min-height:32px;font-size:17px}.game-layout{flex-direction:column;gap:5px;padding:5px}.scene-panel{flex:1;min-height:0;border-radius:14px}.scene-hud{top:6px;left:6px}.chapter-pill,.step-pill{font-size:9px;padding:4px 7px}.scene-bottom{bottom:4px;left:5px;right:5px;padding:6px 8px;border-radius:9px}.scene-bottom h2{font-size:13px;margin:0 0 2px}.scene-bottom p{font-size:10.5px;line-height:1.18}.puzzle-panel{width:100%;min-width:0;flex:0 0 296px;padding:7px;gap:4px;border-radius:13px}.quest h1{font-size:17px;margin:0}.quest p{font-size:11px;min-height:13px}.eyebrow{font-size:8px}.quest{display:block}.word-display{min-height:36px;flex-basis:36px}.letter-board{min-height:103px}.letters{padding:5px;gap:6px;align-content:center}.tile{height:41px;width:41px;font-size:22px;border-radius:11px}.answer-actions button{min-height:37px;font-size:13px;padding:5px 9px}.extra-actions button{min-height:31px;font-size:10px}.puzzle-footer{font-size:9px}.menu-screen{padding:12px;align-items:flex-end}.menu-backdrop{background:linear-gradient(0deg,#25173df9 0%,#24183dd9 50%,#25183d30 100%)}.menu-content h1{font-size:clamp(30px,8vw,50px);margin:8px 0}.menu-content>p{margin-bottom:9px}.menu-buttons{gap:6px;grid-template-columns:repeat(2,minmax(0,1fr))}.menu-buttons button{min-height:39px;font-size:12px}.menu-buttons button.big{min-height:44px}.world-grid{grid-template-columns:repeat(2,1fr)}.level-grid{grid-template-columns:repeat(4,1fr)}.modal-body{padding:10px}.overlay-card{max-height:92vh}.ach-list{grid-template-columns:1fr}}
@media(max-width:650px) and (max-height:550px){.puzzle-panel{flex-basis:232px}.scene-bottom p{display:none}.letter-board{min-height:80px}.tile{width:38px;height:38px;font-size:20px}.quest p{display:none}.extra-actions button{min-height:29px}.menu-content h1{font-size:27px}.menu-buttons button{min-height:35px}}
@media(min-width:651px) and (max-height:540px){.topbar{height:42px;flex-basis:42px}.game-layout{padding:5px}.puzzle-panel{padding:7px;gap:4px}.quest p{display:none}.quest h1{font-size:18px}.letter-board{min-height:75px}.tile{width:39px;height:39px;font-size:21px}.letters{gap:5px}.answer-actions button{min-height:35px;padding:5px}.extra-actions button{min-height:30px}.scene-bottom p{font-size:11px}.menu-screen{padding:15px}.menu-content h1{font-size:clamp(30px,4vw,52px)}.menu-buttons button{min-height:35px}.menu-content>p{margin-bottom:8px}}
