:root {
  --font: "Avenir Next", "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --cream: #fff6e6;
  --teal: #1fb5a5;
  --red: #e8503a;
  --yellow: #ffc93c;
  --ink: #3a2418;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a1c14; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body { font-family: var(--font); color: #fff; }
#app { position: fixed; inset: 0; overflow: hidden; }

/* outlined display text */
.ol { font-weight: 900; color: #fff; text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 1.5px 1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 0 4px 0 var(--ink); }

#bg, .bgimg { position: absolute; inset: 0; }
.bgimg { background: #6b4a33 center / cover no-repeat; opacity: 0; transition: opacity 0.8s ease; }
.bgimg.on { opacity: 1; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(232, 80, 58, 0) 40%, rgba(232, 80, 58, 0.75) 100%); transition: opacity 0.5s ease; z-index: 4; }
#flash.on { opacity: 1; transition: none; }

.layer { position: absolute; inset: 0; display: none; }
.layer.on { display: block; }
.dim { background: rgba(30, 18, 10, 0.55); z-index: 20; }

/* ---------- HUD ---------- */
#hud { z-index: 5; pointer-events: none; }
#hud.on { display: block; }
#hudTop { position: absolute; top: calc(10px + var(--st)); left: calc(10px + var(--sl)); right: 70px; display: flex; gap: 6px; align-items: center; }
.chip { height: 40px; padding: 0 12px; border-radius: 22px; display: flex; align-items: center; gap: 6px; background: rgba(40, 25, 15, 0.6); border: 2px solid rgba(255, 246, 230, 0.75); box-shadow: 0 3px 0 rgba(58, 36, 24, 0.6); white-space: nowrap; }
.chip .num { font-size: 19px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 0 -1.5px 0 var(--ink); font-variant-numeric: tabular-nums; }
.chip img { width: 24px; height: 24px; object-fit: contain; }
.ico { width: 22px; height: 22px; }
.ico.star path { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.6; }
#heartsChip { gap: 2px; padding: 0 10px; }
#heartsChip svg { width: 22px; height: 22px; transition: transform 0.2s; }
#heartsChip svg path { fill: var(--red); stroke: var(--ink); stroke-width: 1.8; }
#heartsChip svg.empty path { fill: rgba(255, 246, 230, 0.18); stroke: rgba(255, 246, 230, 0.6); }
#heartsChip svg.lose { animation: heartLose 0.6s ease; }
#heartsChip .num { margin-left: 4px; }
@keyframes heartLose { 0% { transform: scale(1.6); } 40% { transform: scale(0.6) rotate(-20deg); } 100% { transform: scale(1); } }
#goldChip { display: none; }
#goldChip.on { display: flex; }
.chip.bump { animation: bump 0.35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

#oppChip { position: absolute; top: calc(58px + var(--st)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 20px); display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 16px; background: rgba(255, 246, 230, 0.92); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
#stageLbl { font-size: 13px; font-weight: 900; color: #fff; background: var(--red); border-radius: 9px; padding: 1px 7px; }
#oppName { font-size: 16px; font-weight: 900; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
#pips { display: flex; gap: 3px; }
#pips i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; display: block; }
#pips i.on { background: var(--yellow); }
#comboBadge { position: absolute; top: calc(98px + var(--st)); left: calc(12px + var(--sl)); font-size: 16px; font-weight: 900; color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 2px 10px; transform: rotate(-4deg); display: none; box-shadow: 0 3px 0 var(--ink); }
#comboBadge.on { display: block; animation: popIn 0.3s ease; }
#roleBadge { position: absolute; top: calc(96px + var(--st)); left: 50%; transform: translateX(-50%) rotate(-3deg); font-size: 26px; font-weight: 900; padding: 4px 22px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: #fff; display: none; text-shadow: 0 2px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink); }
#roleBadge.on { display: block; animation: roleIn 0.35s cubic-bezier(.3, 1.6, .5, 1); }
#roleBadge.A { background: var(--red); }
#roleBadge.D { background: var(--teal); }
@keyframes roleIn { 0% { transform: translateX(-50%) rotate(-3deg) scale(0.3); } 100% { transform: translateX(-50%) rotate(-3deg) scale(1); } }
@keyframes popIn { 0% { transform: scale(0.3) rotate(-4deg); } 70% { transform: scale(1.12) rotate(-4deg); } 100% { transform: scale(1) rotate(-4deg); } }

#chant { position: absolute; left: 0; right: 0; top: 33%; text-align: center; font-size: min(21vw, 12vh); line-height: 1; z-index: 6; pointer-events: none; display: none; white-space: nowrap; }
#chant.on { display: block; animation: chant 0.32s cubic-bezier(.3, 1.7, .5, 1); }
#chant.big { color: var(--yellow); }
@keyframes chant { 0% { transform: scale(0.35); opacity: 0.2; } 100% { transform: scale(1); opacity: 1; } }

#banner { position: absolute; left: 4%; right: 4%; top: 25%; text-align: center; font-size: min(11vw, 7vh); line-height: 1.1; z-index: 7; pointer-events: none; display: none; }
#banner.on { display: block; animation: slam 0.38s cubic-bezier(.3, 1.6, .5, 1); }
#banner.good { color: var(--yellow); }
#banner.bad { color: #ff8a76; }
#banner.warn { color: var(--cream); font-size: min(8vw, 5vh); }
#banner.huge { font-size: min(14vw, 8.5vh); color: var(--yellow); }
@keyframes slam { 0% { transform: scale(2.2) rotate(-6deg); opacity: 0; } 60% { transform: scale(0.94) rotate(-3deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }

#duel { position: absolute; left: 0; right: 0; top: 41%; display: none; justify-content: center; align-items: center; gap: 4%; z-index: 6; pointer-events: none; }
#duel.on { display: flex; }
#duel .side { width: 34%; max-width: 150px; text-align: center; animation: popIn2 0.32s cubic-bezier(.3, 1.6, .5, 1); }
#duel .side.me { animation-delay: 0.06s; animation-fill-mode: backwards; }
#duel .who { font-size: 15px; margin-bottom: 4px; }
#duel .pic { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fffaf0 0%, var(--cream) 60%, #f4dfbf 100%); border: 4px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: flex; align-items: center; justify-content: center; overflow: hidden; }
#duel .cpu .pic { border-color: var(--ink); background: radial-gradient(circle at 50% 40%, #ffe9e2 0%, #ffc9bb 100%); }
#duel .me .pic { background: radial-gradient(circle at 50% 40%, #e2fffa 0%, #a9ece3 100%); }
#duel .pic img { width: 78%; height: 78%; object-fit: contain; transition: transform 0.25s; }
#duel .pic img.arrow { width: 62%; height: 62%; }
#duel .what { font-size: 20px; margin-top: 6px; }
#duel .vs { font-size: 30px; color: var(--yellow); transform: rotate(-8deg); }
#duel .side.win .pic { box-shadow: 0 0 0 5px var(--yellow), 0 5px 0 var(--ink); }
@keyframes popIn2 { 0% { transform: scale(0.2); } 100% { transform: scale(1); } }

#pop { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
#pop .p { position: absolute; font-size: 26px; font-weight: 900; color: var(--yellow); white-space: nowrap; transform: translate(-50%, -50%); animation: floatUp 1.1s ease-out forwards; display: flex; align-items: center; gap: 4px; }
#pop .p img { width: 26px; height: 26px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

#hint { position: absolute; left: 6%; right: 6%; bottom: calc(var(--camH, 170px) + 46px + var(--sb)); text-align: center; font-size: 17px; z-index: 6; pointer-events: none; display: none; line-height: 1.25; }
#hint.on { display: block; animation: fadeUp 0.25s ease; }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }

#camBox { position: absolute; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); width: min(60vw, 31vh); aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; border: 4px solid var(--cream); box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink); z-index: 5; display: none; background: #163f3b; }
#camBox.on { display: block; }
#camBox.warn { border-color: #ff8a76; animation: warnPulse 0.8s ease-in-out infinite; }
@keyframes warnPulse { 50% { box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink), 0 0 22px 6px rgba(255, 90, 60, 0.8); } }
#camCv { width: 100%; height: 100%; display: block; }
#camTag { position: absolute; left: 8px; top: 6px; font-size: 14px; background: var(--teal); border: 2px solid var(--ink); border-radius: 10px; padding: 1px 8px; text-shadow: 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); }
#lost { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(120, 30, 20, 0.45); text-align: center; padding: 8px; }
#lost div { font-size: 18px; }
#lost small { font-size: 14px; font-weight: 900; }
#camBox.warn #lost { display: flex; }
#sign { position: absolute; left: 50%; bottom: calc(var(--camH, 170px) + 8px + var(--sb)); transform: translateX(-50%); z-index: 6; display: none; align-items: center; gap: 6px; padding: 3px 12px 3px 6px; border-radius: 18px; background: var(--teal); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 17px; white-space: nowrap; pointer-events: none; }
#sign.on { display: flex; }
#sign img { width: 30px; height: 30px; object-fit: contain; transition: transform 0.15s; }

/* ---------- speech bubble (voice subtitles) ---------- */
#sub { position: absolute; left: 50%; top: calc(16% + var(--st)); transform: translateX(-50%); max-width: 84%; width: max-content; z-index: 26; display: none; background: #fff; color: var(--ink); font-weight: 900; font-size: 17px; line-height: 1.3; padding: 9px 16px; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); pointer-events: none; text-align: center; }
#sub.on { display: block; animation: bubble 0.28s cubic-bezier(.3, 1.6, .5, 1); }
#sub::after { content: ""; position: absolute; left: 50%; bottom: -13px; width: 18px; height: 18px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
@keyframes bubble { 0% { transform: translateX(-50%) scale(0.4); } 100% { transform: translateX(-50%) scale(1); } }

/* ---------- stage intro card ---------- */
#vsCard { z-index: 15; pointer-events: none; overflow: hidden; }
#vsCard .band { position: absolute; left: -20%; right: -20%; top: 30%; height: 40%; background: linear-gradient(180deg, rgba(232, 80, 58, 0.92), rgba(190, 54, 36, 0.92)); border-top: 5px solid var(--ink); border-bottom: 5px solid var(--ink); transform: rotate(-7deg); animation: bandIn 0.4s cubic-bezier(.2, 1.2, .4, 1); }
#vsPortrait { position: absolute; right: -4%; bottom: 26%; height: 50%; max-width: 66%; object-fit: contain; object-position: bottom right; filter: drop-shadow(0 6px 0 rgba(58, 36, 24, 0.7)); animation: portIn 0.5s cubic-bezier(.2, 1.3, .4, 1); }
#vsCard .vsText { position: absolute; left: calc(7% + var(--sl)); top: 37%; width: 56%; transform: rotate(-7deg); transform-origin: left center; animation: textIn 0.45s 0.08s cubic-bezier(.2, 1.3, .4, 1) backwards; }
#vsStage { display: inline-block; font-size: 18px; color: var(--ink); text-shadow: none; background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px; padding: 1px 10px; }
#vsName { font-size: 42px; line-height: 1.05; margin-top: 6px; color: var(--cream); }
#vsTitle { font-size: 16px; margin-top: 4px; color: var(--yellow); }
#vsTip { margin-top: 10px; font-size: 14px; font-weight: 900; color: var(--ink); background: rgba(255, 246, 230, 0.95); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 8px; display: inline-block; line-height: 1.3; }
#vsCard.out .band, #vsCard.out #vsPortrait, #vsCard.out .vsText { transition: transform 0.3s ease-in, opacity 0.3s; opacity: 0; }
#vsCard.out #vsPortrait { transform: translateX(60%); }
#vsCard.out .vsText { transform: rotate(-7deg) translateX(-80%); }
@keyframes bandIn { 0% { transform: rotate(-7deg) scaleY(0); } 100% { transform: rotate(-7deg) scaleY(1); } }
@keyframes portIn { 0% { transform: translateX(70%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes textIn { 0% { transform: rotate(-7deg) translateX(-90%); opacity: 0; } 100% { transform: rotate(-7deg); opacity: 1; } }

/* ---------- panels and buttons ---------- */
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92%, 440px); max-height: 92%; overflow: hidden; padding: 20px 20px 22px; border-style: solid; border-width: 30px; border-image: url(../assets/ui-panel.webp) 64 fill / 30px stretch; color: var(--ink); text-align: center; animation: panelIn 0.28s cubic-bezier(.3, 1.5, .5, 1); }
.layer.on .panel { display: block; }
@keyframes panelIn { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.panel h2 { margin: -12px 0 10px; font-size: 26px; line-height: 1.15; color: var(--cream); }
.panel .msg { margin: 8px 0; font-size: 16px; font-weight: 800; line-height: 1.4; color: var(--ink); min-height: 1.4em; }
.panel .msg.err { color: #c0321f; }
.panel .small { margin: 4px 0 8px; font-size: 12.5px; font-weight: 700; color: #6b5040; line-height: 1.35; }
.panel .row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.panel .col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin-top: 10px; }
.preview { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 3px solid var(--ink); background: #163f3b; }
.preview canvas { width: 100%; height: 100%; display: block; }
#gateSpin { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 5px solid rgba(255, 246, 230, 0.3); border-top-color: var(--yellow); animation: spin 0.9s linear infinite; display: none; }
#gateSpin.on { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { position: relative; z-index: 0; isolation: isolate; min-width: 120px; min-height: 52px; padding: 8px 22px; border: 0; background: none; font-family: var(--font); font-size: 18px; font-weight: 900; color: #fff; cursor: pointer; text-shadow: 0 2px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 0 -1.5px 0 var(--ink); transition: transform 0.12s, filter 0.12s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.15; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-style: solid; border-width: 20px; border-image: url(../assets/ui-button.webp) 40 fill / 20px stretch; }
.btn.alt::before { filter: hue-rotate(150deg) saturate(0.9) brightness(1.05); }
.btn.gold::before { filter: hue-rotate(35deg) saturate(1.2) brightness(1.1); }
.btn:hover, .btn.focus { transform: scale(1.05); filter: brightness(1.12); }
.btn.focus { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 26px; }
.btn:active, .btn.press { transform: scale(0.93); }
.btn img { width: 26px; height: 26px; object-fit: contain; }
.btn[hidden], [hidden] { display: none !important; }
.btn:disabled { filter: grayscale(0.8) brightness(0.8); cursor: default; }

.howList { list-style: none; margin: 0; padding: 0; text-align: left; }
.howList li { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.howList img { width: 40px; height: 40px; object-fit: contain; flex: none; }

.signs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.signs .s { position: relative; border-radius: 14px; background: rgba(255, 255, 255, 0.6); border: 3px solid rgba(58, 36, 24, 0.35); padding: 6px 2px 4px; transition: transform 0.2s, background 0.2s; }
.signs .s img { width: 100%; max-width: 54px; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 auto; }
.signs .s span { font-size: 13px; font-weight: 900; }
.signs .s .bar { position: absolute; left: 6px; right: 6px; bottom: 2px; height: 4px; border-radius: 2px; background: var(--teal); transform-origin: left; transform: scaleX(0); }
.signs .s.done { background: #c9f5ec; border-color: var(--teal); transform: scale(1.04); }
.signs .s.done::after { content: "✓"; position: absolute; right: 4px; top: 0; font-size: 20px; font-weight: 900; color: var(--teal); }
.signs .s.now { border-color: var(--yellow); }

.bigIcon { width: 84px; height: 84px; object-fit: contain; margin: -18px auto 0; display: block; animation: beatIcon 1s ease-in-out infinite; }
@keyframes beatIcon { 50% { transform: scale(1.1); } }
.balance { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 14px; background: rgba(58, 36, 24, 0.12); font-size: 17px; font-weight: 900; color: var(--ink); }
.balance img { width: 24px; height: 24px; object-fit: contain; }

.bagItem { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; padding: 6px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.6); font-weight: 900; font-size: 16px; text-align: left; }
.bagItem img { width: 40px; height: 40px; object-fit: contain; }
.bagItem span { flex: 1; }
.bagItem b { font-size: 19px; }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.skin { position: relative; border-radius: 14px; background: rgba(255, 255, 255, 0.6); border: 3px solid rgba(58, 36, 24, 0.3); padding: 6px 4px; cursor: pointer; font-family: var(--font); color: var(--ink); min-height: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform 0.12s; }
.skin:hover, .skin.focus { transform: scale(1.04); border-color: var(--yellow); }
.skin:active { transform: scale(0.95); }
.skin img { width: 56px; height: 56px; object-fit: contain; }
.skin .nm { font-size: 13px; font-weight: 900; line-height: 1.2; }
.skin .st { font-size: 12px; font-weight: 800; color: #6b5040; display: flex; align-items: center; gap: 3px; }
.skin .st img { width: 16px; height: 16px; }
.skin.eq { border-color: var(--teal); background: #c9f5ec; }
.skin.eq .st { color: #0f7a6e; }
.skin.locked img.pic { filter: grayscale(0.7) brightness(0.85); }

/* ---------- title ---------- */
#title { z-index: 30; overflow: hidden; background: #f4e3c4; }
#title .art { position: absolute; inset: 0; background: url(../assets/cover-bg.webp) center / cover no-repeat; animation: artIn 1.2s ease-out; }
@keyframes artIn { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }
.logoWrap { position: absolute; left: 0; right: 0; top: calc(7% + var(--st)); display: flex; justify-content: center; animation: floaty 3.2s ease-in-out 0.8s infinite; }
#logo { width: min(88%, 520px); text-align: center; transform: rotate(-6deg); animation: logoDrop 0.7s cubic-bezier(.3, 1.5, .5, 1) backwards; }
#logo .l1 { display: block; white-space: nowrap; line-height: 1.02; color: var(--cream); font-size: 64px; text-shadow: 3px 3px 0 #b8321f, 5px 5px 0 #b8321f, 7px 7px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 2.5px 2.5px 0 var(--ink), -2.5px 2.5px 0 var(--ink), 2.5px -2.5px 0 var(--ink), -2.5px -2.5px 0 var(--ink); letter-spacing: 0.02em; }
#logo .l2 { display: inline-block; margin-top: 8px; padding: 2px 18px 6px; background: linear-gradient(180deg, #27c7b5, #179486); border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink); transform: rotate(3deg); }
#logo .l2 span { display: block; white-space: nowrap; font-weight: 900; color: var(--yellow); font-size: 40px; line-height: 1.1; text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 4px 0 var(--ink); }
@keyframes logoDrop { 0% { transform: translateY(-140%) rotate(-14deg) scale(0.7); opacity: 0; } 65% { transform: translateY(5%) rotate(-5deg) scale(1.05); opacity: 1; } 100% { transform: rotate(-6deg) scale(1); } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
#tagline { position: absolute; left: 8%; right: 8%; top: calc(7% + var(--st) + var(--logoH, 150px) + 14px); text-align: center; font-size: 16px; line-height: 1.35; animation: fadeUp 0.5s 0.5s ease backwards; }
#needCam { position: absolute; left: 50%; bottom: calc(15% + var(--sb)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 14px; background: rgba(40, 25, 15, 0.6); border: 2px solid rgba(255, 246, 230, 0.7); font-size: 13px; font-weight: 900; white-space: nowrap; max-width: 92%; }
#needCam .ico { width: 18px; height: 18px; flex: none; }
#needCam .ico path { fill: var(--yellow); }
#prompt { position: absolute; left: 0; right: 0; bottom: calc(7% + var(--sb)); text-align: center; font-size: 24px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.07); opacity: 0.82; } }
.corner { position: absolute; top: calc(10px + var(--st)); display: flex; gap: 8px; }
.corner.left { left: calc(10px + var(--sl)); }
.corner.right { right: calc(10px + var(--sr)); }
.iconBtn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 246, 230, 0.85); background: rgba(40, 25, 15, 0.5); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: transform 0.12s, background 0.12s; }
.iconBtn svg { width: 26px; height: 26px; }
.iconBtn svg path { fill: var(--cream); }
.iconBtn:hover, .iconBtn.focus { transform: scale(1.08); background: rgba(40, 25, 15, 0.7); }
.iconBtn:active { transform: scale(0.92); }

/* ---------- intro cutscene ---------- */
#cut { z-index: 40; background: #000 url(../assets/cover-bg.webp) center / cover no-repeat; }
#introVid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cutSub { position: absolute; left: 6%; right: 6%; bottom: calc(12% + var(--sb)); text-align: center; font-size: 24px; display: none; }
#cutSub.on { display: block; animation: bubble2 0.25s ease; }
@keyframes bubble2 { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
#skipBtn { position: absolute; top: calc(12px + var(--st)); right: calc(12px + var(--sr)); min-width: 96px; min-height: 46px; font-size: 16px; }

#fade { position: absolute; inset: 0; background: #2a1c14; opacity: 0; pointer-events: none; z-index: 60; transition: opacity 0.25s ease; }
#fade.on { opacity: 1; }
#camVid { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

#app.shake { animation: shake 0.4s linear; }
@keyframes shake { 10%, 50%, 90% { transform: translate(-5px, 2px); } 30%, 70% { transform: translate(5px, -2px); } 100% { transform: none; } }
