* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #0d0a14; }
body { font-family: Georgia, 'Times New Roman', serif; color: #efe6d8; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.hide { display: none !important; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
#level-name { font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; text-shadow: 0 1px 6px #000; }
#dots { display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.dot.open { background: rgba(255,205,120,0.45); }
.dot.on { background: #ffcd78; box-shadow: 0 0 8px rgba(255,205,120,0.8); }
#controls { margin-left: auto; display: flex; gap: 8px; pointer-events: auto; }
#hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 640px; width: calc(100% - 32px); text-align: center; font-size: 14px; font-style: italic; color: rgba(239,230,216,0.85); text-shadow: 0 1px 6px #000; }

button { font-family: inherit; font-size: 14px; color: #efe6d8; background: rgba(20,16,32,0.72); border: 1px solid rgba(255,205,120,0.35); border-radius: 6px; padding: 8px 14px; cursor: pointer; }
button:hover { background: rgba(40,30,55,0.85); border-color: rgba(255,205,120,0.7); }
button.primary, a.primary { background: #b8842f; border-color: #ffcd78; color: #1a1206; font-weight: bold; font-size: 16px; padding: 12px 26px; }
button.primary:hover, a.primary:hover { background: #d19a3d; }
a.link { display: inline-block; text-decoration: none; border-radius: 6px; }

.overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(8,6,14,0.72) url('assets/title.jpg') center/cover; padding: 20px; overflow-y: auto; }
#complete, #done { background: rgba(8,6,14,0.78); }
.panel { background: rgba(14,11,22,0.88); border: 1px solid rgba(255,205,120,0.3); border-radius: 12px; padding: 34px 30px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.kicker { font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; color: #ffcd78; margin-bottom: 10px; }
h1 { font-size: 52px; letter-spacing: 0.18em; margin-bottom: 14px; }
h2 { font-size: 24px; font-weight: normal; margin-bottom: 18px; }
.sub { font-size: 15px; line-height: 1.55; color: rgba(239,230,216,0.85); margin-bottom: 22px; }
.fine { margin-top: 18px; font-size: 12px; color: rgba(239,230,216,0.5); line-height: 1.5; }
#levels { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }
#levels .lv { background: transparent; border-color: rgba(255,255,255,0.14); }
#levels .lv.lock { opacity: 0.35; cursor: default; }
#complete .panel button, #done .panel button, #done .panel a { margin: 4px; }
@media (max-width: 560px) {
  h1 { font-size: 38px; }
  .panel { padding: 26px 20px; }
  #hint { font-size: 13px; bottom: 10px; }
}

#rotatetip{display:none;position:absolute;top:calc((100vh + 56.25vw)/2 + 8px);right:10px;font:500 11px/1 'Inter',system-ui,sans-serif;color:#efe7f7;opacity:.75;z-index:6;letter-spacing:.02em}
@media (orientation:portrait){#rotatetip{display:block}}
