@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito+Sans:wght@400;600;700;800;900&display=swap');
:root{font-family:'Nunito Sans',sans-serif;color:#183e32;background:#edf1de;font-weight:700;font-synthesis:none;--ink:#183e32;--muted:#617467;--cream:#fffdf2;--green:#286747;--line:#d8dfcd}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,summary,input,label{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,#scene-host:focus-visible{outline:3px solid #ba7919;outline-offset:4px}button[hidden],[hidden]{display:none!important}a{color:inherit}button{border:0}svg{width:21px;height:21px}i{display:inline-flex;font-style:normal}h1,h2,p{margin:0}
.game-layout{display:flex;flex-direction:column;min-height:700px;height:100svh;background:#eef2e2;overflow:hidden}.topbar{height:76px;flex:none;display:flex;align-items:center;gap:30px;padding:0 34px;border-bottom:1px solid #d0dbc5;z-index:4}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;font-size:23px;font-weight:900;letter-spacing:-.8px}.brand b{font-size:11px;background:#285c41;color:#fcf8df;padding:5px 7px;letter-spacing:1px;border-radius:6px;margin-left:5px}.back-link{font-size:12px;text-decoration:none;color:#617467}.back-link span{margin-left:6px}.header-actions{display:flex;align-items:center;gap:9px;margin-left:auto}.wallet{display:flex;align-items:center;gap:10px;padding:5px 6px 5px 12px;background:#fffdf2;border:1px solid var(--line);border-radius:13px;margin-right:9px}.wallet strong{font-size:15px;font-variant-numeric:tabular-nums}.demo-tag{font-size:9px;letter-spacing:1px;color:#527355;background:#e9eed9;padding:4px 6px;border-radius:4px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;background:transparent;border-radius:10px}.icon-button:hover{background:#dee8d2}.wallet .icon-button{width:32px;height:32px;background:#e8efd9}.game-board{position:relative;flex:1;min-height:370px;overflow:hidden;background:#9ecfc5}#scene-host{position:absolute;inset:0;outline-offset:-5px;touch-action:none}#scene-host canvas{display:block;width:100%;height:100%;touch-action:none}.scene-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#eff2db77,transparent 37%,transparent 73%,#123e391c)}.scene-heading{position:absolute;top:30px;left:40px;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:1.8px;font-weight:900;display:flex;align-items:center;gap:8px}.eyebrow>span{width:6px;height:6px;background:#448854;border-radius:50%}h1{font-family:'Fredoka',sans-serif;font-size:54px;letter-spacing:-1.7px;line-height:1.04;margin:12px 0 9px;font-weight:600;text-shadow:0 2px 12px #ecf8d340}h1>span{font-size:27px;letter-spacing:-.7px;display:inline-block;margin-left:8px;color:#4b7750}#scene-subtitle{font-size:13px;color:#385a47}.scene-tools{position:absolute;right:32px;top:27px;display:flex;gap:9px;z-index:6}.tool-button{display:flex;justify-content:center;align-items:center;list-style:none;width:43px;height:43px;border-radius:50%;background:#fffdf0d9;border:1px solid #ffffff90;box-shadow:0 4px 18px #1d513210;cursor:pointer}.tool-button::-webkit-details-marker{display:none}.tool-button:hover{background:#fffdf2}.settings-panel{position:absolute;right:0;top:53px;width:268px;padding:22px;background:#fffdf4;border:1px solid #d4dec8;border-radius:18px;box-shadow:0 12px 55px #153d3830}.settings-panel h2{font-size:18px;font-family:Fredoka,sans-serif;margin-bottom:19px}.settings-panel label{font-size:9px;letter-spacing:1px;display:block;margin:17px 0 7px}.settings-panel output{float:right;font-size:11px;letter-spacing:0}.settings-panel select{width:100%;border:1px solid var(--line);background:#f1f4e6;color:var(--ink);padding:10px;border-radius:8px;font-size:12px;min-height:42px}.settings-panel input[type=range]{width:100%;accent-color:var(--green);height:23px}.settings-panel p{font-size:11px;line-height:1.6;color:var(--muted);margin-top:13px}.scoreboard{position:absolute;right:37px;top:101px;text-align:right;pointer-events:none}.scoreboard .eyebrow{font-size:8px;justify-content:flex-end;color:#3c654f}#current-multiplier{font-family:Fredoka,sans-serif;font-size:49px;line-height:1.2;letter-spacing:-1.5px;font-weight:600}#current-multiplier span{font-size:30px;margin-left:3px}.next-multiplier{display:flex;justify-content:flex-end;gap:12px;font-size:11px}.next-multiplier>span{color:#4a6756}.next-multiplier strong{font-weight:900}.scene-footer{position:absolute;bottom:22px;left:33px;right:33px;display:flex;align-items:center;justify-content:space-between;gap:16px;pointer-events:none}.scene-status{display:flex;align-items:center;gap:10px}.status-dot{width:7px;height:7px;background:#28784d;box-shadow:0 0 0 5px #eff9dc55;border-radius:50%;flex:none}.scene-status strong{display:block;font-size:9px;letter-spacing:1.4px}.scene-status div>span{display:block;font-size:11px;color:#355c4a;margin-top:4px}.explore-controls{display:flex;gap:5px;background:#fcfff0dd;backdrop-filter:blur(12px);border:1px solid #f9ffe8c9;border-radius:14px;padding:5px;pointer-events:auto;box-shadow:0 6px 22px #103b3320}.scene-button{display:flex;align-items:center;gap:8px;padding:9px 12px;min-height:42px;border-radius:9px;background:transparent;font-size:11px;transition:background .2s}.scene-button svg{stroke:currentColor;stroke-width:1.6;fill:none;width:18px}.scene-button[aria-pressed=true]{background:#e1ebcf}.scene-button:hover{background:#e3eccf}.world-badge{font-size:8px;letter-spacing:1.6px;display:flex;align-items:center;gap:10px}.world-badge b{border:1px solid #3e685c55;border-radius:5px;padding:5px 6px;font-size:10px}
#character-wrap,#teeth-layer{position:absolute;inset:0;pointer-events:none}#teeth-layer{z-index:3}.tooth{position:absolute;width:38px;height:38px;padding:0;transform:translate(-50%,-50%);border-radius:50%;background:#fffbe8bd;border:1.5px solid #ffffffd9;box-shadow:0 3px 8px #19362329;color:#2c522c;font-size:13px;font-weight:900;pointer-events:auto;transition:background .15s;display:none}.game-board[data-phase=ready] .tooth{display:block}.tooth:hover:not(:disabled),.tooth:focus-visible{background:#fff3a6;border-color:#ffce53}.tooth.picked{opacity:.3;background:#8fd09a}.tooth.picked::after{content:'✓'}.scene-message{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(390px,90%);padding:28px;text-align:center;background:#fffcf0ed;border-radius:22px;box-shadow:0 20px 90px #1a4d3930;z-index:9;display:flex;flex-direction:column;align-items:center;gap:13px}.scene-message strong{font-family:Fredoka,sans-serif;font-size:21px}.scene-message>span{font-size:12px;line-height:1.7;color:#607665}.scene-message a{font-size:12px}.loading-orbit{width:30px;height:30px;border:3px solid #dce7cb;border-top-color:#438355;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.secondary-button{padding:12px 20px;border-radius:10px;background:#e0e9cc}
.bet-panel{position:relative;z-index:4;flex:none;margin:0;background:#fffdf3;padding:16px 38px 13px;border-top:1px solid #ffffff}.dock-topline{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1px;color:#648063;padding-bottom:13px}.dock-topline>span:last-child{letter-spacing:0;font-size:10px;font-weight:600;color:#718370}.tiny-croc{color:#60955f;margin-right:5px}.bet-controls{display:grid;grid-template-columns:1fr 1fr 1.05fr;gap:27px;align-items:end;max-width:1120px;margin:auto}.amount-field>label,legend{font-size:9px;font-weight:900;letter-spacing:1.1px;display:block;margin-bottom:7px}.amount-input{display:flex;align-items:center;padding:5px 7px 5px 15px;background:#f1f3e6;border:1px solid #dce3d0;border-radius:11px;height:48px}.amount-input>span{color:#76916c;font-size:17px}.amount-input input{min-width:0;width:100%;border:0;background:transparent;color:var(--ink);padding:7px 10px;font-size:18px;font-weight:900;outline-offset:0;font-variant-numeric:tabular-nums}.amount-input button{height:34px;min-width:37px;background:#e3e9d4;border-radius:7px;margin-left:4px;font-size:13px}.difficulty-field{min-width:0;border:0;padding:0;margin:0}legend{width:100%;padding:0}legend span{float:right;letter-spacing:0;font-size:10px;font-weight:600;color:#75896c}.risk-options{display:flex;padding:4px;border:1px solid #dce3d0;background:#f1f3e6;border-radius:11px;height:48px}.risk-options label{flex:1;display:flex;position:relative;cursor:pointer}.risk-options input{position:absolute;opacity:0;width:100%;height:100%;margin:0}.risk-options span{width:100%;display:flex;align-items:center;justify-content:center;border-radius:7px;font-size:12px;color:#6a7f63;pointer-events:none}.risk-options input:checked+span{background:#fffdf4;color:#28553b;box-shadow:0 2px 5px #2f53331a}.risk-options input:focus-visible+span{outline:2px solid #ba7919}.risk-options input:disabled+span{opacity:.6}.primary-button{display:flex;align-items:center;justify-content:center;gap:11px;background:#f6cf60;color:#2b462b;min-height:49px;padding:12px 22px;border-radius:11px;font-size:15px;font-weight:900;box-shadow:0 3px 0 #ddaf4099;transition:background .15s}.primary-button>svg:last-child,.primary-button>i:last-child{margin-left:auto;width:18px}.primary-button>span{margin-right:auto}.primary-button:hover:not(:disabled){background:#f8d879}.primary-button.cashing{background:#326d47;color:#fffde5;box-shadow:0 3px 0 #1d4b3399}.dock-hint{text-align:center;font-size:10px;color:#7c8c73;margin-top:12px;font-weight:600}.bet-error{text-align:center;color:#a43f2e;font-size:12px;padding-top:10px}.won #current-multiplier{color:#286c3e}.lost #current-multiplier{color:#93452e}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{width:min(510px,calc(100% - 32px));border:1px solid #dae1c9;border-radius:22px;background:#fffdf2;color:#183e32;padding:27px;box-shadow:0 25px 90px #14352655}dialog::backdrop{background:#0c342a80;backdrop-filter:blur(5px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;font-size:12px;letter-spacing:1px;margin-bottom:12px}dialog h2{font-family:Fredoka,sans-serif;font-size:30px;margin-bottom:18px}dialog p,dialog li{font-size:13px;line-height:1.75;margin-bottom:14px}dialog ol{padding-left:20px}.dialog-stats{display:flex;gap:10px;margin:20px 0}.dialog-stats>div{flex:1;text-align:center;background:#edf1de;padding:12px;border-radius:10px;font-size:11px}.dialog-stats strong{display:block;font-size:25px}dialog details{font-size:12px;margin:15px 0}dialog .primary-button{width:100%;margin-top:18px}dialog code{font-size:11px}
@media(min-width:1600px){.topbar{padding:0 48px}.scene-heading{left:50px;top:40px}h1{font-size:65px}.bet-panel{padding:21px 50px 17px}.dock-hint{margin-top:16px}}
@media(max-width:800px){.topbar{height:65px;padding:0 20px;gap:15px}.brand{font-size:19px}.back-link{display:none}.header-actions{gap:3px}.wallet{margin-right:3px}.scene-heading{left:24px;top:26px}h1{font-size:42px}.scene-tools{right:20px;top:22px}.scoreboard{right:24px;top:88px}#current-multiplier{font-size:38px}.scene-footer{left:23px;right:23px;bottom:17px}.world-badge{display:none}.scene-status div>span{max-width:150px;font-size:10px}.bet-panel{padding:14px 22px 12px}.bet-controls{gap:15px}.dock-hint{font-size:9px}.primary-button{font-size:13px;padding:12px 14px}.amount-input{padding-left:10px}.amount-input input{font-size:16px;padding-left:8px}.amount-input button{min-width:28px}.scene-button{padding:8px 10px}}
@media(max-width:540px){.game-layout{min-height:740px}.topbar{height:64px;padding:0 15px;gap:5px}.brand{gap:5px;font-size:16px;letter-spacing:-.5px}.brand img{width:30px;height:30px}.brand b{font-size:9px;margin-left:2px;padding:4px 5px}.wallet{gap:4px;padding:5px 4px 5px 8px;border-radius:10px}.wallet strong{font-size:12px}.wallet .icon-button{width:28px;height:30px}.demo-tag{font-size:7px;padding:3px}.header-actions>.icon-button{width:32px;height:36px}.header-actions>.icon-button svg{width:18px}.header-actions>#fullscreen-toggle{display:none}.scene-heading{top:24px;left:21px}.scene-heading .eyebrow{font-size:7px;letter-spacing:1.3px}h1{font-size:37px;margin:10px 0 6px}h1>span{font-size:21px;margin-left:5px}#scene-subtitle{font-size:11px;max-width:210px;line-height:1.5}.scene-tools{top:19px;right:16px;gap:6px}.tool-button{width:36px;height:36px}.scoreboard{top:90px;right:18px}.scoreboard .eyebrow{font-size:6px;letter-spacing:.7px}#current-multiplier{font-size:30px}.next-multiplier{font-size:9px;gap:6px}#current-multiplier span{font-size:20px}.settings-panel{top:46px;width:260px}.scene-footer{bottom:16px;left:20px;right:20px;flex-wrap:wrap;justify-content:center;gap:14px}.scene-status{position:absolute;bottom:63px;left:3px}.scene-status strong{font-size:8px}.scene-status div>span{max-width:260px}.explore-controls{padding:3px}.scene-button{padding:8px 14px;font-size:11px;min-height:40px}.bet-panel{padding:13px 18px 12px}.dock-topline{font-size:7px;letter-spacing:.6px;padding-bottom:13px}.dock-topline>span:last-child{font-size:8px}.dock-topline>span:first-child{max-width:175px;line-height:1.6}.bet-controls{grid-template-columns:1fr 1fr;gap:13px 15px}.primary-button{grid-column:1/-1;min-height:47px;font-size:14px}.amount-field>label,legend{font-size:8px;letter-spacing:.7px}legend span{font-size:8px}.amount-input,.risk-options{height:43px}.risk-options span{font-size:11px}.amount-input input{padding:5px;font-size:15px}.amount-input button{font-size:11px;min-width:27px;height:31px;margin-left:2px}.dock-hint{font-size:8px;line-height:1.5;margin-top:10px}.tooth{width:29px;height:29px;font-size:11px}.game-board{min-height:430px}}
@media(max-height:600px) and (min-width:600px){.game-layout{min-height:600px}.topbar{height:56px}.scene-heading{top:17px}h1{font-size:37px;margin:8px 0}.bet-panel{padding:10px 25px}.dock-topline,.dock-hint{display:none}.game-board{min-height:360px}.scene-footer{bottom:14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Keep controls usable above mobile browser and device safe areas. */
.brand>svg{width:37px;height:37px;flex:none}
.topbar{padding-top:env(safe-area-inset-top);height:calc(76px + env(safe-area-inset-top))}.bet-panel{padding-bottom:calc(13px + env(safe-area-inset-bottom))}.scene-button{min-height:44px}.tooth{width:44px;height:44px}button[aria-disabled=true]{cursor:default;opacity:.5}.settings-panel summary{cursor:pointer}
@media(max-width:800px){.topbar{height:calc(65px + env(safe-area-inset-top))}}
@media(max-width:540px){.topbar{height:calc(64px + env(safe-area-inset-top))}.brand>svg{width:30px;height:30px}.tooth{width:38px;height:38px;font-size:12px}.game-board.playing .scene-heading h1{font-size:31px}.game-board.playing .scene-heading{top:20px}}
/* The hit targets stay generous; the sculpted enamel supplies their artwork. */
.tooth{background:transparent;border:0;box-shadow:none;color:#284b24;font-size:12px;text-shadow:0 1px 2px #fffce9}
.tooth:hover:not(:disabled),.tooth:focus-visible{background:#ffe18370;box-shadow:inset 0 0 0 2px #f9d061,0 0 15px #ffe18566}
.tooth.picked{background:transparent;opacity:.5;color:#ebffe0;text-shadow:0 1px 2px #1c6429}
.scene-shade{background:linear-gradient(180deg,#f1ffef24,transparent 29%,transparent 72%,#073f4720)}
.scene-heading h1{color:#fffbe8;-webkit-text-stroke:1px #18462d65;text-shadow:0 3px 0 #164b3950,0 3px 15px #08482d35}
.scene-heading h1>span{color:#d8f5a2;-webkit-text-stroke:0;text-shadow:0 2px 3px #214d3760}
.scene-heading .eyebrow{color:#f3ffe2;text-shadow:0 1px 4px #123c2e}.scene-heading #scene-subtitle{color:#f7ffe9;text-shadow:0 1px 3px #123c2e,0 1px 8px #123c2e}
.scoreboard{color:#fffbe7;text-shadow:0 2px 4px #123e30,0 1px 10px #123e3080}.scoreboard .eyebrow,.next-multiplier>span{color:#effbdc}.won #current-multiplier{color:#e9ffb5}.lost #current-multiplier{color:#ffd4bb}
.scene-status{padding:10px 13px;border:1px solid #ffffff50;border-radius:12px;background:#fffde3df;box-shadow:0 4px 18px #053e3420}
.world-badge{color:#f4ffe5;text-shadow:0 1px 5px #174b37}.world-badge b{border-color:#e3f5cb80}
.primary-button{background:linear-gradient(180deg,#ffe486,#f4c74f);border:1px solid #f5d77c}
.primary-button.cashing{background:linear-gradient(180deg,#428054,#24603b);border-color:#72a56a}
@media(max-width:540px){.tooth{font-size:11px}.scene-status{padding:8px 11px}.scene-status div>span{font-size:9px}}
