/* CAIRN: Resonance Awakens — web trial. Original stylesheet, no third-party UI. */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #000000; overflow: hidden;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #e8e8f0;
}

#stage {
  position: absolute;
  top: 50%; left: 50%;
  width: 800px; height: 480px;
  transform-origin: center center;
}

#game-canvas {
  position: absolute; top: 0; left: 0;
  width: 800px; height: 480px;
  display: block;
}

#ui-overlay {
  position: absolute; top: 0; left: 0;
  width: 800px; height: 480px;
  pointer-events: none;
}

.screen {
  position: absolute; top: 0; left: 0;
  width: 800px; height: 480px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  pointer-events: auto;
  background: radial-gradient(ellipse at center, rgba(20,10,40,0.55) 0%, rgba(0,0,0,0.85) 100%);
}

.hidden { display: none !important; }

/* ---- Title ---- */
#title-hero { width: 96px; height: 128px; object-fit: contain; margin-bottom: 8px; filter: drop-shadow(0 0 16px rgba(232,184,75,0.5)); }
#screen-title h1 {
  font-size: 3rem; letter-spacing: 0.18em; color: #e8b84b; margin: 0;
  text-shadow: 0 0 24px rgba(232,184,75,0.5);
}
#screen-title .subtitle { font-size: 0.85rem; letter-spacing: 0.3em; color: #9b5de5; margin-top: 4px; }
#screen-title .tagline { font-size: 0.8rem; color: #8899aa; margin-top: 18px; }

.cta-btn {
  margin-top: 26px; padding: 14px 38px; font-size: 0.95rem; letter-spacing: 0.12em;
  background: #e8b84b; color: #0a0a12; border: none; border-radius: 8px; font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.cta-btn:hover { background: #f5cc6a; transform: translateY(-1px); }
.cta-btn.small { padding: 9px 22px; font-size: 0.8rem; margin-top: 0; }

.ghost-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #aab;
  padding: 8px 18px; border-radius: 6px; cursor: pointer; font-size: 0.8rem;
}
.ghost-btn:hover { border-color: #e8b84b; color: #e8b84b; }
.ghost-btn.small { padding: 4px 10px; font-size: 0.72rem; }

.icon-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  color: #e8e8f0; border-radius: 50%; width: 36px; height: 36px; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(255,255,255,0.16); }

#btn-mute { position: absolute; top: 16px; right: 16px; }

/* ---- Tutorial ---- */
.tutorial-card {
  background: rgba(20,20,35,0.85); border: 1px solid rgba(155,93,229,0.4); border-radius: 12px;
  padding: 28px 36px; max-width: 560px;
}
.tutorial-vea { font-style: italic; color: #cc88ff; font-size: 0.85rem; margin-bottom: 10px; }
.tutorial-text { font-size: 0.95rem; line-height: 1.6; color: #d8d8e8; }
.tutorial-actions { margin-top: 18px; display: flex; gap: 14px; }

/* ---- Modal (stone intro) ---- */
.modal {
  position: absolute; top: 0; left: 0; width: 800px; height: 480px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65); pointer-events: auto; cursor: pointer;
}
.modal-card {
  background: rgba(20,20,35,0.92); border: 1px solid rgba(232,184,75,0.4); border-radius: 12px;
  padding: 26px 34px; text-align: center; max-width: 380px;
}
.modal-card img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0 0 10px rgba(232,184,75,0.5)); }
#stone-intro-name { font-size: 1.1rem; font-weight: 700; color: #e8b84b; margin-bottom: 8px; letter-spacing: 0.04em; }
#stone-intro-desc { font-size: 0.85rem; color: #b8b8c8; line-height: 1.5; }
.tap-hint { margin-top: 14px; font-size: 0.7rem; color: #666; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- In-game HUD ---- */
#hud-game { position: absolute; top: 0; left: 0; width: 800px; height: 480px; }
#hud-top {
  position: absolute; top: 10px; left: 0; width: 800px;
  display: flex; justify-content: space-between; padding: 0 18px;
  font-family: ui-monospace, monospace; font-size: 0.85rem; color: #ccc;
  pointer-events: none;
}
#level-name { color: #cc88ff; letter-spacing: 0.04em; }
#awakened-counter { color: #e8b84b; font-weight: 700; }

#resolution-bar-wrap {
  position: absolute; top: 32px; right: 18px; width: 114px; height: 8px;
  background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden;
}
#resolution-bar-fill { height: 100%; width: 100%; background: #66aaff; transition: background 0.2s; }
#resolution-bar-wrap.urgent #resolution-bar-fill { background: #ff5555; }

#guide-panel {
  position: absolute; left: 140px; top: 392px; width: 520px; height: 58px;
  text-align: center; pointer-events: none;
}
#guide-vea { font-style: italic; color: #cc88ff; font-size: 0.95rem; min-height: 1.3em; }
#guide-english { color: #8899aa; font-size: 0.82rem; margin-top: 4px; min-height: 1.2em; }

#btn-skip-guide { position: absolute; right: 18px; bottom: 22px; pointer-events: auto; }

#stone-selector {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  background: rgba(10,10,18,0.7); border-radius: 12px; padding: 6px 10px;
  pointer-events: auto;
}
.stone-slot {
  background: transparent; border: 2px solid transparent; border-radius: 8px;
  width: 78px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center;
  gap: 2px; cursor: pointer; color: #cbd;
}
.stone-slot img { width: 30px; height: 30px; object-fit: contain; }
.stone-slot span { font-size: 0.65rem; letter-spacing: 0.04em; }
.stone-slot.active { border-color: #e8b84b; background: rgba(232,184,75,0.1); }
.stone-slot.unavailable { display: none; }
#stones-remaining { font-size: 0.72rem; color: #aab; margin-left: 8px; min-width: 70px; }

#screen-failed { background: none; justify-content: flex-end; padding-bottom: 96px; }

/* ---- Trial complete ---- */
#screen-trial-complete h1.gold { color: #ffd700; text-shadow: 0 0 24px rgba(255,215,0,0.5); font-size: 1.8rem; letter-spacing: 0.1em; }
#screen-trial-complete p { max-width: 520px; color: #c8c8d8; font-size: 0.9rem; line-height: 1.6; margin: 14px 0; }
#trial-stats { font-family: ui-monospace, monospace; font-size: 0.82rem; color: #8899aa; margin-bottom: 6px; }
#btn-replay-trial { margin-top: 14px; }

@media (max-width: 820px) {
  html, body { font-size: 14px; }
}
