html {background:radial-gradient(circle at 80% 8%,#fff6d4 0 7%,transparent 30%),linear-gradient(165deg,#b5f4ff 0%,#cbecfe 39%,#d9f7d3 100%);}
.p15-app {width:100%;display:flex;align-items:center;flex-direction:column;gap:clamp(8px,1.5vmin,16px);padding-bottom:8px;}
.p15-levels {display:flex;justify-content:center;gap:12px;width:100%;flex-wrap:wrap;}
.p15-mode {display:flex;align-items:center;gap:10px;padding:8px 16px;border-radius:22px;background:#fffaf2;box-shadow:0 5px #b2cbce;border:4px solid #fff;min-height:60px;cursor:pointer;color:#23455b;font-size:clamp(.92rem,2.4vw,1.12rem);font-weight:900;}
.p15-mode.active {background:#ffe27c;border-color:#ffad53;box-shadow:0 5px #c58641;}
.p15-mode-illustration {font-size:clamp(1.3rem,3vw,2rem);}
.p15-instructions {font-size:clamp(1.15rem,2.8vw,1.55rem);font-weight:850;text-align:center;}
.p15-board {--side:3;display:grid;grid-template-columns:repeat(var(--side),minmax(0,1fr));gap:clamp(4px,1.4vmin,9px);padding:clamp(8px,1.8vmin,14px);width:min(87vw,62vh,490px);aspect-ratio:1/1;background:linear-gradient(155deg,#d3935f,#a7684e);border:6px solid #fff8ed;border-radius:clamp(17px,4vmin,29px);box-shadow:0 10px 0 #7d5542,0 17px 35px #43596c7a;touch-action:manipulation;}
.p15-tile {min-width:0;min-height:0;border:2px solid #fff9d7;border-radius:clamp(8px,2.5vmin,19px);box-shadow:0 4px 0 #8d6a46,inset 0 3px 0 #ffffff44;background:linear-gradient(140deg,#fef5b2,#ffb152);color:#224461;font-weight:1000;font-size:clamp(1.4rem,7vmin,3.7rem);cursor:pointer;transition:transform 145ms ease,filter 145ms ease;background-repeat:no-repeat;background-color:#fff3cf;position:relative;}
.p15-tile.pictured {border-color:#fff8df;box-shadow:0 4px 0 #836348,inset 0 2px 5px #ffffff77;}
.p15-tile.empty {background:linear-gradient(130deg,#825d4a,#9f7b64);border:2px dashed #ffffff55;box-shadow:inset 0 4px 14px #573d35cc;cursor:default;}
.p15-tile.can-move:not(:disabled):active {transform:scale(.92);}
.p15-tile.suggested {outline:6px solid #ffec5b;outline-offset:-7px;animation:hint-pulse 680ms ease-in-out 2;}
.p15-tile:disabled:not(.empty) {opacity:1;cursor:default;}
.p15-footer {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;}
.p15-moves {font-size:1.15rem;font-weight:850;border-radius:18px;background:#ffffffbb;padding:12px 16px;}
.p15-win[hidden] {display:none;}
.p15-win {position:relative;text-align:center;background:#fff9d3;border:4px solid #fff;padding:15px;border-radius:24px;box-shadow:0 7px #dcba71;}
.p15-win h2 {font-size:1.8rem;margin:0 0 8px;}
@keyframes hint-pulse {50%{filter:brightness(1.2);transform:scale(.95);}}
@media(max-height:640px) and (orientation:landscape){.p15-board {width:min(60vh,380px)}.p15-levels{gap:5px}.p15-mode{min-height:45px;padding:4px 9px}.p15-instructions{font-size:1rem}.p15-app{gap:6px}.p15-footer .umbl-primary{min-height:45px;padding:7px 12px}}

@media(max-height:640px) and (orientation:landscape) {
 .p15-app {display:grid;grid-template-columns:minmax(170px,1fr) auto;grid-template-areas:"levels board" "instructions board" "footer board";align-items:center;justify-content:center;gap:5px 10px;max-width:830px;}
 .p15-levels {grid-area:levels;flex-wrap:wrap;}
 .p15-instructions {grid-area:instructions;}
 .p15-board {grid-area:board;width:min(56vh,370px);}
 .p15-footer {grid-area:footer;}
 .p15-mode {min-height:44px;}
}

/* Explicit local/server save reconciliation, never an automatic destructive merge. */
.p15-choice{max-width:min(94vw,560px);margin:clamp(24px,6vh,60px) auto;padding:clamp(18px,4vw,32px);border-radius:28px;border:4px solid #fff;background:#fff9df;color:#244454;box-shadow:0 9px 0 #93bcca,0 18px 32px #19476344;text-align:center;font:700 clamp(1rem,3vw,1.2rem) system-ui,sans-serif}
.p15-choice h2{font-size:clamp(1.4rem,5vw,2rem);margin:0 0 14px}.p15-choice p{line-height:1.4}.p15-choice-buttons{display:grid;gap:12px;margin-top:20px}.p15-choice-buttons button{min-height:58px;border-radius:20px;border:3px solid #91d9f2;background:#e5f8ff;color:#173c54;font:900 1.15rem system-ui,sans-serif;cursor:pointer}.p15-choice-buttons button:focus-visible{outline:4px solid #e58a12}.p15-choice-buttons button:disabled{opacity:.42;cursor:not-allowed}

/* UMBL UNIFIED SKIN V1 — readable toy board inside the same adventure shell. */
html{background:linear-gradient(165deg,#0d486f 0%,#082b4a 60%,#071f3d 100%);color:var(--ug-white,#f7fcff)}
.p15-app{
 max-width:920px;margin:12px auto;padding:clamp(12px,2.5vw,24px);
 border:2px solid var(--ug-rim,#a1e9ff99);
 border-radius:var(--ug-radius,26px);
 background:linear-gradient(165deg,rgba(17,79,113,.9),rgba(5,43,76,.92));
 box-shadow:0 8px 0 #05263f,0 22px 44px #00152d66;
}
.p15-instructions{color:#fff4c4;text-shadow:0 2px 0 #092741}
.p15-mode{color:var(--ug-ink,#163e57);border:3px solid #e6faff;box-shadow:0 5px 0 #2c7f9f}
.p15-mode.active{border-color:var(--ug-gold,#ffe58c);background:linear-gradient(#fff3a6,#ffcf5f);box-shadow:0 5px 0 #b47d2e}
.p15-mode:focus-visible,.p15-tile:focus-visible,.p15-hint:focus-visible{outline:4px solid var(--ug-focus,#ffdf67);outline-offset:3px}
.p15-board{border-color:#fff0a9;box-shadow:0 8px 0 #774c38,0 15px 28px #001b36aa}
.p15-moves{background:#e7fbff;color:#17465e;box-shadow:0 4px 0 #5592aa}
.p15-choice{background:linear-gradient(#f3fdff,#fff2c7);border:4px solid #fff2b6;box-shadow:0 9px 0 #336b82,0 17px 32px #061a35aa;color:#153d58}
@media(max-width:420px){.p15-app{padding:9px;gap:8px}.p15-mode{padding:7px;min-height:60px}.p15-board{width:min(91vw,490px)}}
@media(max-height:640px) and (orientation:landscape){.p15-app{padding:8px;max-width:860px}.p15-board{width:clamp(260px,54vh,345px)}}

/* Blocking save errors cannot masquerade as a successful local save. */
.p15-save-status[hidden]{display:none}
.p15-save-status{position:sticky;bottom:max(12px,env(safe-area-inset-bottom));width:min(92vw,580px);z-index:4;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;padding:14px 16px;border-radius:20px;border:3px solid #ffe4a3;background:#123c58;color:#fff9d8;font-weight:850;text-align:center;box-shadow:0 7px 0 #09233d}
.p15-save-status button{min-height:54px;min-width:150px;border:2px solid #fff3b9;border-radius:16px;background:linear-gradient(#fff4b6,#ffd26c);color:#193a55;font:850 1rem system-ui;cursor:pointer}
