:root{font-family:system-ui,-apple-system,'Hiragino Kaku Gothic ProN',sans-serif;color:#2a2328;background:#fff;color-scheme:light}*{box-sizing:border-box}body{margin:0;height:100svh;height:100dvh;min-height:480px;display:flex;flex-direction:column}button,select{font:inherit;color:inherit;touch-action:manipulation}button{min-height:44px;border:0;border-radius:8px;background:#f3f4f6;padding:8px 12px}button:focus-visible,select:focus-visible{outline:3px solid #b94f7c;outline-offset:2px}[hidden]{display:none!important}.shell{width:100%;max-width:450px;margin:0 auto;flex:1;display:flex;flex-direction:column;gap:5px;padding:3px 8px max(8px,env(safe-area-inset-bottom));min-height:0}.companion{display:flex;gap:7px;align-items:center;min-height:62px}.companion>img{width:60px;height:60px;object-fit:contain}.companion>div{flex:1;min-width:0}#cast-name{font-size:11px;color:#6e626a}#speech{font-size:13px;line-height:1.45;margin:3px 0}.companion>button{width:44px;padding:0}.hud{display:flex;justify-content:space-between;align-items:center;font-size:12px}.hud select{background:#f3f4f6;border:0;border-radius:8px;min-height:44px;width:100%;max-width:230px;padding:4px}#rule{margin:0;color:#6e626a;font-size:12px;text-align:center}#board{position:relative;flex:1;min-height:290px;overflow:hidden;border-radius:17px;background:radial-gradient(ellipse at 50% 100%,#304d68,#14263f);touch-action:none;user-select:none}#threads,#stars{position:absolute;inset:0;width:100%;height:100%}#threads{pointer-events:none}.guide{stroke:#bed3ea;opacity:.38;stroke-width:.45;stroke-dasharray:1.2 1.5}.chosen{stroke:#ffe3a0;stroke-width:1;stroke-linecap:round}.star{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;min-height:44px;padding:0;border:1px solid #9cafc6;border-radius:50%;background:#253e58;color:#fff;font-weight:700;font-size:19px;line-height:1;box-shadow:0 0 0 4px #ffffff08}.star small{position:absolute;top:-17px;left:0;width:100%;font-size:11px;color:#fff}.star.visited{background:#ffe3a0;border-color:#fff4d4;color:#273e53}.star.current{outline:2px solid #fff;outline-offset:3px}.star.hint{animation:hint 1s ease-in-out infinite;outline:3px solid #fff;outline-offset:4px}#message{font-size:12px;min-height:34px;line-height:17px;margin:0;text-align:center}.controls{display:flex;gap:6px}.controls button{flex:1;font-size:13px}button:disabled{opacity:.45}#result{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:8px;background:#eef0f3;border-radius:8px;font-size:13px}#result strong{flex:1;min-width:120px}#next{background:#304d68;color:#fff}#save-note{font-size:11px;margin:0;color:#6e626a}dialog{width:calc(100% - 32px);max-width:410px;border:1px solid #ddd;border-radius:12px;padding:18px;max-height:85dvh;overflow:auto}dialog::backdrop{background:#14263f80}dialog h2{font-size:19px;margin-top:0}dialog p{font-size:13px;line-height:1.7}#casts{display:flex;gap:8px;justify-content:center;margin:12px 0}#casts button{width:76px;padding:4px;border:2px solid transparent}#casts img{width:52px;height:52px;object-fit:contain}#casts span{font-size:10px;display:block}#casts button[aria-pressed=true]{border-color:#304d68;background:#eef0f3}#close{width:100%}@keyframes hint{50%{box-shadow:0 0 18px #ffe3a0}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}@media(max-height:700px){.companion{min-height:48px}.companion>img{width:46px;height:46px}.shell{gap:3px}#board{min-height:220px}}

/* Preserve the finished constellation; disabled targets are still part of the artwork. */
.star:disabled{opacity:1}
.star.visited::before{content:'✓';position:absolute;right:-3px;top:-4px;font-size:11px;background:#ffe3a0;color:#273e53;border-radius:50%;width:16px;height:16px;line-height:16px}
.star.current::after{content:'ここ';position:absolute;top:calc(100% + 5px);left:0;width:100%;color:#fff;font-size:11px}
#board[data-status=complete] .star.current::after{content:''}
#message[data-status=error]{font-weight:700;background:#eef0f3;border-radius:8px}
#casts button[aria-pressed=true] span::after{content:' ✓'}

body>.game-nav-header,.companion,.hud,#rule,#message,.controls,#result,#save-note{flex-shrink:0}
.hud{gap:6px}.hud label{display:flex;align-items:center;gap:4px;min-width:0;flex:1}.hud select{min-width:0;flex:1}.hud>span{white-space:nowrap}
#result strong{flex-basis:100%;font-size:12px}#result button{flex:1}
