/* DEMO WEB · Mictlán — encima de styles.css del juego */
body { background: radial-gradient(ellipse at 50% 30%, #3a0e08 0, #0a0505 70%); overflow: hidden; }
.game-shell { width: min(98vw, calc(96vh * 1.6)); }
.game-shell h1, .game-shell .instructions, #reset-progress { display: none; }
#game { border: 2px solid #8a3a1a; box-shadow: 0 0 60px rgba(232, 96, 42, 0.25); }
#fullscreen-toggle { position: fixed; right: 10px; bottom: 10px; margin: 0; z-index: 5; background: rgba(20, 8, 6, 0.75); border-color: #8a3a1a; color: #f0c080; }

#dm-card, #dm-end { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(60, 14, 8, 0.93), rgba(6, 3, 3, 0.97)); overflow-y: auto; font-family: system-ui, sans-serif; color: #f1e6d8; }
#dm-card .box, #dm-end .box { max-width: 560px; width: 100%; text-align: center; margin: auto; }
#dm-card .sub, #dm-end .sub { color: #c8a080; font-style: italic; font-family: Georgia, serif; }
#dm-card h2, #dm-end h2 { font-family: Georgia, serif; color: #f0a050; letter-spacing: 0.12em; font-size: clamp(26px, 6vw, 44px); margin: 4px 0 10px; text-shadow: 0 0 22px rgba(240, 96, 40, 0.5); }
#dm-end h2 { letter-spacing: 0.02em; font-size: clamp(22px, 5vw, 32px); }
#dm-card .lead { line-height: 1.5; color: #e8d6c4; }
#dm-card .keys { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(240, 160, 80, 0.3); border-radius: 12px; padding: 8px 14px; margin: 14px 0; text-align: left; }
#dm-card .keys p { margin: 6px 0; }
#dm-card .keys b { color: #ffd08a; }
#dm-card .goal { color: #ffd08a; }
#dm-card button, #dm-end button, #dm-end a.btn { appearance: none; border: 1px solid rgba(240, 160, 80, 0.7); background: rgba(240, 120, 60, 0.15); color: #ffe0b0; padding: 12px 18px;
  border-radius: 10px; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; display: inline-block; }
#dm-card button, #dm-end button.main { background: #d8442a; border-color: #d8442a; color: #fff; }
#dm-end .card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(240, 160, 80, 0.25); border-radius: 12px; padding: 10px 14px; margin: 12px 0; text-align: left; line-height: 1.45; }
#dm-end .small { font-size: 13px; color: #c8a890; }
#dm-end .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
#dm-end .logo { width: 90px; opacity: 0.85; margin-top: 10px; }

#dm-tip { position: fixed; left: 50%; top: 24%; transform: translate(-50%, -20px); max-width: min(92vw, 560px); z-index: 40; padding: 10px 16px; border-radius: 10px;
  background: rgba(20, 6, 4, 0.88); border: 1px solid rgba(240, 140, 60, 0.6); color: #f6e2cc; font: 15px/1.4 system-ui, sans-serif; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.4s; }
#dm-tip.on { opacity: 1; transform: translate(-50%, 0); }
#dm-tip b { color: #ffc070; }

/* Controles táctiles */
#dm-pad { position: fixed; inset: auto 0 0 0; height: 0; z-index: 30; pointer-events: none; }
#dm-stick { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: 18px; width: 128px; height: 128px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(240, 160, 80, 0.45); pointer-events: auto; touch-action: none; }
#dm-knob { position: absolute; left: 39px; top: 39px; width: 50px; height: 50px; border-radius: 50%; background: rgba(240, 140, 60, 0.6); border: 2px solid #ffd08a; }
#dm-btns { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: 22px; display: flex; gap: 14px; align-items: flex-end; pointer-events: auto; }
#dm-btns button { width: 74px; height: 74px; border-radius: 50%; font: 700 26px system-ui, sans-serif; color: #fff; background: rgba(216, 68, 42, 0.75); border: 2px solid #ffd08a; touch-action: none; user-select: none; -webkit-user-select: none; }
#dm-btns #dm-v { width: 58px; height: 58px; font-size: 15px; background: rgba(40, 60, 90, 0.8); }
#dm-btns #dm-ok { width: 58px; height: 58px; font-size: 22px; background: rgba(60, 30, 20, 0.75); }
#dm-btns button.on { transform: scale(0.92); filter: brightness(1.3); }
body.dm-touch { touch-action: none; user-select: none; -webkit-user-select: none; }
body.dm-touch #fullscreen-toggle { top: 6px; bottom: auto; right: 6px; font-size: 12px; padding: 4px 8px; }
#dm-rotate { display: none; }
@media (orientation: portrait) and (max-width: 760px) {
  body.dm-touch #dm-rotate { display: block; position: fixed; top: 12px; left: 12px; right: 140px; text-align: left; color: #f0c080; font: 14px system-ui; z-index: 20; }
}
#dm-choices { position: fixed; left: 170px; right: 200px; bottom: 8px; z-index: 35; display: none; flex-direction: column; gap: 6px; }
#dm-choices.on { display: flex; }
#dm-choices button { text-align: left; padding: 8px 12px; border-radius: 10px; font: 600 14px system-ui, sans-serif; color: #fff; background: rgb(30, 10, 6); border: 1px solid #f0a050; touch-action: none; }
#dm-creator { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 36; display: none; gap: 12px; }
#dm-creator.on { display: flex; }
#dm-creator button { padding: 12px 18px; border-radius: 12px; font: 700 16px system-ui, sans-serif; color: #fff; background: rgb(30, 10, 6); border: 1px solid #f0a050; touch-action: none; }
#dm-creator #dm-done { background: #d8442a; border-color: #d8442a; }
body.dm-touch #dm-creator.on ~ #dm-pad, body.dm-touch:has(#dm-creator.on) #dm-btns { display: none; }

#dm-start { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #4a1408 0, #120606 60%, #050202 100%); color: #f1e6d8; font-family: system-ui, sans-serif; }
#dm-start img { width: min(52vw, 46vh, 300px); filter: drop-shadow(0 0 30px rgba(240, 120, 50, 0.35)); }
#dm-start .tag { margin-top: 6px; font: 700 clamp(13px, 2.4vw, 17px) system-ui, sans-serif; letter-spacing: 0.3em; color: #f0a050; }
#dm-start p { margin: 10px auto; max-width: 440px; color: #e2cfbd; line-height: 1.4; }
#dm-start button { margin-top: 6px; padding: 14px 40px; font: 800 20px system-ui, sans-serif; color: #fff; background: #d8442a; border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: 0 0 30px rgba(216, 68, 42, 0.55); animation: dmPulse 2s ease-in-out infinite; }
#dm-start .small { margin-top: 12px; font-size: 13px; color: #b89a86; }
@keyframes dmPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
