*{box-sizing:border-box;-webkit-tap-highlight-color:transparent} :root{color-scheme:dark;--cream:#fff9e8;--gold:#f7ce83;--ink:#173f49}body{margin:0;background:#173f49;color:var(--cream);font-family:Trebuchet MS,Arial,sans-serif;min-height:100svh}button,input,a{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit;border:0;background:none}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ffdf8f;outline-offset:4px}#scenery,.shade{position:fixed;inset:0;z-index:-2}#scenery{background-image:url(assets/alpine.png);background-position:center;background-size:cover;transition:background-image .5s} .shade{z-index:-1;background:linear-gradient(#102c3d66,#0b354546 24%,#062e3e70 60%,#062c3eac)}#app{width:min(100%,540px);min-height:100svh;margin:auto;padding:calc(10px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));display:flex;flex-direction:column;text-align:center}header{display:flex;justify-content:space-between;align-items:center;gap:8px}.icon{width:44px;height:44px;display:inline-grid;place-items:center;border-radius:50%;background:#0c334c61;text-decoration:none;color:white;font-size:26px}.brand{font-size:21px;font-weight:bold;letter-spacing:4px;text-shadow:0 2px 6px #123}.brand span{display:block;font-size:10px;font-weight:normal;letter-spacing:2px;margin-top:4px;color:#fae3ba}.levelbar{display:flex;align-items:center;justify-content:space-between;margin-top:17px;gap:10px}.levelbar h1{font-size:18px;margin:3px 0;letter-spacing:2px}.levelbar #region{font-size:12px;letter-spacing:2px;text-transform:uppercase;color:#f7dfb9}.pill{background:#133a4b8c;border:1px solid #ffffff36;border-radius:24px;min-height:40px;min-width:80px;padding:7px 12px;font-size:14px;font-weight:bold}#balance{color:var(--gold)}#boardarea{flex:1;min-height:180px;display:grid;place-items:center;padding:16px 0 10px}#board{display:grid;gap:4px;justify-content:center;filter:drop-shadow(0 4px 6px #0d304766)}.cell{height:var(--cell);width:var(--cell);border-radius:7px;background:#fff9e9ec;box-shadow:0 2px 0 #a9a39177;color:#1b4752;font-size:calc(var(--cell)*.61);font-weight:bold;display:grid;place-items:center;padding:0;position:relative}.cell.found{background:#acd9ce;color:#173d47;animation:reveal .35s ease}.cell.hinted{color:#426772;background:#fbdfa0}.cell.targeting{box-shadow:0 0 0 2px #f5d685,0 0 15px #ffc95388}.cell.butterfly:after{content:'✧';position:absolute;top:0;right:2px;color:#b47335;font-size:12px}.cell.blank{visibility:hidden}#message{font-size:14px;min-height:23px;text-shadow:0 2px 4px #102b3c;padding:2px}#word{font-size:22px;letter-spacing:5px;font-weight:bold;height:36px;color:var(--cream);text-shadow:0 2px 4px #123}#word.active{background:#1d847ce8;border-radius:30px;align-self:center;padding:3px 18px}#controls{display:flex;align-items:center;justify-content:center;gap:7px}#wheel{width:clamp(200px,56vw,280px);height:clamp(200px,56vw,280px);position:relative;border-radius:50%;background:radial-gradient(circle,#fff8e8f5,#fff4dfe6);box-shadow:0 5px 30px #061e3555,inset 0 0 0 1px #fff8;touch-action:none;user-select:none;flex-shrink:0}#letters{position:absolute;inset:0;pointer-events:none}.letter{position:absolute;width:21%;height:21%;margin:-10.5%;border-radius:50%;font-size:clamp(27px,7.5vw,38px);font-weight:500;color:#1e4554;display:grid;place-items:center;padding:0;pointer-events:auto;touch-action:none}.letter.selected{background:#317e80;color:white;box-shadow:0 0 0 2px #277a77}#traces{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#trace{fill:none;stroke:#368783;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;opacity:.8}#cancel{position:absolute;left:41%;top:41%;width:18%;height:18%;color:#a0b1ab;font-size:26px;border-radius:50%;z-index:2}.rail{display:flex;flex-direction:column;gap:24px;width:69px;align-items:center}.tool{width:58px;height:58px;border:1px solid #fff8;border-radius:50%;background:#1243577d;color:#fff8de;font-size:30px;text-shadow:0 1px 3px #123;box-shadow:0 3px 8px #102f3f33}.tool small{display:block;font-size:10px;margin-top:3px;white-space:nowrap;letter-spacing:.2px}.bottom{display:flex;justify-content:center;gap:22px;padding:11px 0 8px;font-size:12px}.bottom button{border-bottom:1px solid #fff7;padding:4px}#typing{display:flex;max-width:270px;margin:0 auto;gap:6px}#entry{color:white;background:#0b354b66;border:1px solid #ffffff47;border-radius:22px;padding:8px 14px;width:210px;font-size:14px}#entry::placeholder{color:#f2f6e9b5}#typing button{font-size:22px;width:36px}footer{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:10px;padding-top:10px;opacity:.9}footer button{font-size:11px;text-decoration:underline;min-height:32px}dialog{background:#fcf6e9;color:#214b53;border:1px solid #e5d6b3;border-radius:25px;padding:32px 24px 24px;max-width:440px;width:calc(100% - 28px);max-height:85svh;box-shadow:0 20px 100px #061c36aa}dialog::backdrop{background:#08253694;backdrop-filter:blur(6px)}.close{position:absolute;right:10px;top:10px;color:#315762;background:#dbe4da;width:34px;height:34px}dialog h2{font-family:Georgia,serif;font-size:30px;font-weight:normal;margin:8px 0 10px}dialog h3{margin:22px 0 10px}dialog p{line-height:1.55;font-size:14px}dialog .eyebrow{color:#6f8377;font-size:11px;letter-spacing:3px;text-transform:uppercase}.primary{display:block;width:100%;background:#337c78;color:#fff9e8;border-radius:24px;padding:14px 20px;font-weight:bold;margin:16px 0 10px;box-shadow:0 3px 0 #205858}.secondary{background:#e4e7d9;border-radius:18px;padding:10px 14px;color:#315a59;margin:5px;font-size:13px;min-height:44px}.stats{display:flex;justify-content:space-around;text-align:center;margin:24px 0}.stats strong{display:block;font-family:Georgia,serif;font-size:30px;color:#327b75}.stats span{font-size:11px}.scenegrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.scene{background-size:cover;background-position:center;border-radius:14px;aspect-ratio:1.3;display:flex;align-items:end;padding:10px;color:#fff;text-shadow:0 1px 4px #123;font-size:13px}.setting{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #ccd7cc}.setting input{width:22px;height:22px;accent-color:#3a8278}.collection{background:#e4e7d9;border-radius:14px;padding:12px;margin:8px 0}.wordlist{line-height:2;letter-spacing:1px;font-size:15px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.burst{animation:reveal .45s ease}.contrast .shade{background:#082c3dd9}.contrast .cell{background:#fff}.contrast #message,.contrast footer{color:#fff;opacity:1}@keyframes reveal{from{transform:scale(.88);opacity:.5}to{transform:scale(1);opacity:1}}@media(min-width:800px){#app{max-height:1000px;padding-top:22px}#scenery{background-size:cover}.shade{background:linear-gradient(90deg,#06263833,#0626386b 35%,#0626386b 65%,#06263833)}#boardarea{min-height:250px}}@media(max-height:740px){#app{padding-top:6px}.levelbar{margin-top:8px}#boardarea{min-height:135px;padding:8px 0}#wheel{width:210px;height:210px}#word{height:30px;font-size:19px}.bottom{padding:7px 0 4px}header .brand{font-size:18px}#typing{display:none}.rail{gap:14px}}@media(max-width:360px){#app{padding-left:8px;padding-right:8px}.rail{width:50px}.tool{width:48px;height:48px}.levelbar{gap:4px}.pill{min-width:65px;padding:7px 8px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}body.reduce *{animation:none!important;transition:none!important}

.journalart{display:block;width:100%;aspect-ratio:1.6;object-fit:cover;border-radius:17px}#petname{background:white;color:#24545a;max-width:180px;border:1px solid #9bb9ac;border-radius:10px;padding:10px}.cell{font-size:max(16px,calc(var(--cell)*.61))}#entry{font-size:16px}

/* R3: keep crossword, wheel and every helper together on short phones. */
#app{height:100svh;min-height:0;max-height:1000px;display:grid;grid-template-rows:50px 42px minmax(0,1fr) 22px 32px 250px 48px 40px;position:relative;padding:8px 12px;overflow:visible}header{position:relative}.brand{font-size:19px;align-self:start;padding-top:5px}.brand span{display:none}.family-player-badge{position:absolute;left:50%;top:26px;transform:translateX(-50%);margin:0!important;padding:0 8px!important;min-height:20px!important;height:20px;max-width:180px;white-space:nowrap;background:transparent!important}.family-player-badge img{width:18px!important;height:18px!important}.levelbar{margin:0;min-height:0}.levelbar h1{font-size:17px}.levelbar #region{font-size:10px}.pill{min-height:36px}#boardarea{min-height:0;padding:3px 0;width:100%;height:100%;overflow:visible}#board{gap:3px}.cell{border-radius:5px;font-size:max(16px,calc(var(--cell)*.61))}#message{min-height:0;font-size:12px;line-height:18px;padding:0;overflow:hidden}#word{height:28px;font-size:20px}#controls{min-height:0;gap:6px}#wheel{width:240px;height:240px}.letter{min-width:44px;min-height:44px;margin:0;transform:translate(-50%,-50%)}.rail{width:58px;gap:22px}.tool{width:48px;height:48px;font-size:25px}.tool small{font-size:10px}.bottom{margin:0;padding:0;gap:10px;align-items:center}.bottom button{min-height:44px;font-size:11px;padding:4px;line-height:14px}#typing{display:none}footer{padding:0;font-size:10px;min-height:0}footer button{min-height:32px;font-size:11px}#save-status{font-size:9px;max-width:100px;line-height:12px}.challengeLabel{line-height:11px;font-size:9px;letter-spacing:1px}
@media(max-height:760px){#app{grid-template-rows:44px 36px minmax(0,1fr) 18px 24px 192px 44px 30px;padding:4px 8px}#wheel{width:188px;height:188px}.letter{font-size:28px}.rail{gap:18px}.brand{font-size:17px;padding-top:2px}.family-player-badge{top:23px}.levelbar .pill{min-height:32px}.bottom{padding:0}.levelbar h1{font-size:16px}#word{height:24px;font-size:18px}#boardarea{padding:0}.tool{width:44px;height:44px}.tool small{font-size:9px}footer button{min-height:28px}}
@media(max-height:450px) and (min-width:600px){#app{width:min(100%,1000px);max-width:1000px;grid-template-columns:1fr 1fr;grid-template-rows:44px 32px minmax(0,1fr) 28px 44px;column-gap:24px;padding:4px 16px}header{grid-column:1/-1;grid-row:1}.levelbar{grid-column:1;grid-row:2}#boardarea{grid-column:1;grid-row:3/6}#message{grid-column:2;grid-row:2}#word{grid-column:2;grid-row:4}#controls{grid-column:2;grid-row:3}#wheel{width:180px;height:180px}.rail{gap:10px}.bottom{grid-column:2;grid-row:5}footer{position:absolute;left:20px;right:20px;top:3px;pointer-events:none;justify-content:center;gap:30px}footer button{pointer-events:auto}footer #save-status{display:none}header .brand{position:absolute;left:25%;transform:translateX(-50%)}header #settings{margin-left:auto}.family-player-badge{left:75%;top:8px}.brand{font-size:16px}#board{gap:3px}}

@media(max-height:760px){.rail{width:48px;flex-shrink:0}#controls{gap:4px}}

.reward-flight{position:fixed;left:0;top:0;width:40px;height:40px;z-index:20;pointer-events:none;filter:drop-shadow(0 3px 4px #173e4d55)}.reward-flight svg{width:100%;height:100%}.bee-wings{transform-origin:22px 16px;animation:beewing .09s alternate infinite}@keyframes beewing{to{transform:scaleY(.55)}}

#modal .close{width:44px;height:44px;z-index:12}

/* R12: original porcelain/compass wheel; no moving hit targets or delayed selection. */
.header-tools{display:flex;gap:3px;margin-left:auto;flex-shrink:0}.header-tools .icon{width:44px;height:44px}.header-tools svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sound-slash{display:none}.is-muted .sound-slash{display:block}.is-muted .sound-waves{display:none}#audio-toggle{color:#f6dfa3}#audio-toggle.is-muted{color:#fff4dbb5}#wheel{background:transparent url(wheel-ornament.svg) center/100% 100% no-repeat;box-shadow:0 7px 20px #071e3670,inset 0 1px 0 #fff8;isolation:isolate}#traces{z-index:1}#trace{stroke:#337e7a;stroke-width:13;opacity:.9;filter:drop-shadow(0 1px 0 #fff8)}#letters{z-index:2}.letter{background:radial-gradient(ellipse at 35% 18%,#fffef5 0%,#f7efd9 58%,#dfcfaa 100%);color:#194d54;border:1px solid #b59f6c88;box-shadow:0 2px 3px #8d754e42,inset 0 1px 0 #fff;font-weight:700;text-shadow:0 1px #fff;line-height:1}.letter.selected{background:radial-gradient(ellipse at 30% 12%,#479c91,#246863);color:#fff8df;border-color:#e5d095;box-shadow:0 0 0 2px #fff4ce,0 2px 5px #13483d77,inset 0 1px 0 #8ac5ad;text-shadow:0 1px 1px #19483f}#cancel{z-index:3;color:#7a906d;border:1px solid #b6a47955;background:radial-gradient(#fffbedcc,#e9ddc299);box-shadow:inset 0 1px 0 #fff8;width:15%;height:15%;left:42.5%;top:42.5%;font-size:23px}.contrast .letter{background:#fff;color:#143f48;border-color:#194d54}.contrast .letter.selected{background:#174f53;color:#fff;border:2px solid #ffe8a0}.contrast #wheel{filter:none}#audio-volume{width:100%;accent-color:#337c78;min-height:36px}#volume-value{font-weight:bold;color:#28635e}
@media(max-width:360px){header .brand{font-size:16px;letter-spacing:1.7px}.header-tools{gap:0}.header-tools .icon{width:44px}.family-player-badge{max-width:150px}}
@media(hover:hover){.letter:hover:not(.selected){border-color:#397b71;box-shadow:0 0 0 1px #76a19088,inset 0 1px #fff}}

/* Reserve the new sound control without covering the family name. Full name remains accessible in the button. */
.family-player-badge{left:calc(50% - 22px);overflow:hidden}
@media(max-height:450px) and (min-width:600px){.family-player-badge{left:75%}}
