* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: #080d19; }
body { color: #f6ecd6; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", system-ui, sans-serif; }
#home_page { position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 480px; overflow: hidden; isolation: isolate; background: #080d19; }
#monster_view { position: absolute; inset: -1%; z-index: -3; animation: night-breath 9s ease-in-out infinite alternate; }
#night_background { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.night-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg,rgba(5,10,22,.45),transparent 38%,rgba(4,8,17,.08) 65%,rgba(4,8,17,.85)); pointer-events: none; }
.home-copy { position: absolute; top: max(9%,env(safe-area-inset-top)); left: 20px; right: 20px; text-align: center; text-shadow: 0 3px 20px #000; }
#game_title { margin: 0; font-size: clamp(28px,8.2vw,44px); font-weight: 900; letter-spacing: .06em; color: #fff1d5; }
.home-copy p { margin: 14px 0 0; color: #c0c7d1; font-size: 14px; letter-spacing: .12em; }
.home-actions { position: absolute; bottom: max(9%,calc(env(safe-area-inset-bottom) + 28px)); left: 26px; right: 26px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
#btn_start_puzzle { width: min(100%,300px); min-height: 62px; border: 1px solid #ffd49d; border-radius: 16px; color: #271608; background: linear-gradient(#ffb369,#ff8a3d); font: 800 21px system-ui,sans-serif; letter-spacing: .12em; box-shadow: 0 5px 0 #8c431f,0 12px 32px #0009; cursor: pointer; touch-action: manipulation; }
#btn_start_puzzle:active { transform: translateY(3px); box-shadow: 0 2px 0 #8c431f; }
#btn_start_puzzle:focus-visible { outline: 3px solid white; outline-offset: 6px; }
#btn_start_puzzle:disabled { cursor: progress; opacity: .75; }
#entry_status { margin: 0; max-width: 340px; min-height: 23px; color: #d3d7df; font-size: 13px; line-height: 1.7; text-align: center; text-shadow: 0 2px 8px #000; }
.night-mist { position: absolute; inset: 38% -20% 10%; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at 35% 70%,#a7c3d315,transparent 60%); animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-4%); opacity: .4; } to { transform: translateX(4%); opacity: .8; } }
@keyframes night-breath { from { transform: scale(1); filter: brightness(.95); } to { transform: scale(1.012); filter: brightness(1.03); } }
@media (prefers-reduced-motion: reduce) { .night-mist, #monster_view { animation: none; } }
