html,body{height:auto!important;min-height:100%;overflow:auto!important;background:#132e27;color:#f0ecdc}
.study{box-sizing:border-box;max-width:560px;margin:auto;padding:16px 14px calc(80px + env(safe-area-inset-bottom));font:16px/1.4 system-ui}
.study h1{font:700 24px/1.2 system-ui;margin:0 0 12px}
.study label,.study small{font-size:14px;color:#cfddcc}
.study select,.study .actions button,.study .speak{border-radius:10px;border:1px solid #648675;background:#244c3e;color:#f2eedf;min-height:44px;padding:8px 12px;font:600 15px system-ui}
.study #example{display:block;width:100%;margin:4px 0 8px}
.study .three-board-wrap{width:min(100%,54dvh)!important;margin:12px auto 18px}
.study #coach-board{width:100%;height:auto;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);overflow:visible}
.study .square{position:relative;background:#e3e8db;border:none;border-radius:0;padding:0;min-width:0;min-height:0}
.study .square.dark{background:#678674}.study .square.selected{box-shadow:inset 0 0 0 3px #284fad}
.study .square.target:after{content:'';position:absolute;inset:32%;background:#335e78aa;border-radius:100%}.study .target:has(.piece):after{inset:3%;border:3px solid #335e78;background:transparent}
.study .piece{width:90%;height:95%;margin:auto;display:block}
.study .actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.study .instruction p{margin:6px 0}.study #feedback{color:#ffe6a8;min-height:1.3em}.study [hidden]{display:none!important}
.study .castle-path{box-shadow:inset 0 0 0 4px #3e7696}.study .castle-path.danger{box-shadow:inset 0 0 0 4px #bd483a}.study .rulebook{display:inline-block;color:#c5d8ce;font:14px system-ui;margin:16px 0}
