:root {
  --gold: #ffcf6b;
  --gold2: #f7a928;
  --saffron: #ff7a00;
  --maroon: #4a0d0d;
  --panel: rgba(28, 10, 6, 0.62);
  --panel-border: rgba(255, 191, 90, 0.35);
  --text: #fff4dc;
  --muted: #d9b98c;
  --good: #7ee08a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
input { -webkit-user-select: text; user-select: text; }
button, .act, .tab { touch-action: manipulation; }
#c { touch-action: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050208; color: var(--text); font-family: 'Poppins', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; }
kbd { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 0.85em; font-family: inherit; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 50; }
#loading { background: radial-gradient(circle at 50% 60%, #3a1406 0%, #0b0305 70%); flex-direction: column; gap: 18px; }
.diya-loader { font-size: 64px; animation: flick 0.25s infinite alternate; filter: drop-shadow(0 0 22px #ff9a2a); }
.loading-text { color: var(--muted); letter-spacing: 0.08em; }
@keyframes flick { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.06) rotate(2deg); } }

#title { background: radial-gradient(ellipse at 50% 120%, rgba(255, 120, 20, 0.25), rgba(5, 2, 8, 0.15) 60%); padding: 16px; }
.title-card { max-width: 720px; text-align: center; padding: 28px 30px; background: linear-gradient(180deg, rgba(40, 10, 5, 0.78), rgba(20, 6, 4, 0.84)); border: 1px solid var(--panel-border); border-radius: 22px; box-shadow: 0 0 60px rgba(255, 140, 30, 0.25), inset 0 0 40px rgba(255, 160, 60, 0.08); backdrop-filter: blur(6px); max-height: calc(100% - 20px); overflow-y: auto; }
.om { font-size: 34px; color: var(--gold); text-shadow: 0 0 18px #ff9a2a; }
h1 { margin: 4px 0 10px; line-height: 1.1; }
h1 .hi { display: block; font-family: 'Yatra One', serif; font-size: clamp(34px, 7vw, 58px); color: var(--gold); text-shadow: 0 0 24px rgba(255, 150, 40, 0.8), 0 2px 0 #7a2a00; font-weight: 400; }
h1 .en { display: block; font-size: clamp(14px, 2.6vw, 18px); letter-spacing: 0.35em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.story { color: #f2dfc0; font-size: 14.5px; line-height: 1.6; margin: 12px 0 18px; }
.btn { background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--panel-border); border-radius: 12px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 0.08s, background 0.2s, box-shadow 0.2s; }
.btn:hover { background: rgba(255, 200, 120, 0.16); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(180deg, #ffb238, #e8650a); color: #2a0c00; border-color: #ffd890; box-shadow: 0 0 22px rgba(255, 140, 20, 0.5); }
.btn.primary:hover { box-shadow: 0 0 34px rgba(255, 160, 40, 0.8); }
.btn.big { font-size: 20px; padding: 14px 34px; border-radius: 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.continue-info { color: var(--muted); font-size: 13px; margin-top: 10px; min-height: 18px; }
.controls-help { margin-top: 16px; font-size: 12.5px; color: #e8cfa8; line-height: 1.9; }
.quality-row { margin-top: 12px; font-size: 13px; color: var(--muted); }
select { background: #2a0e06; color: var(--text); border: 1px solid var(--panel-border); border-radius: 6px; padding: 3px 6px; font-family: inherit; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; backdrop-filter: blur(4px); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35); }
#hud-night { position: absolute; top: 12px; left: 12px; padding: 10px 14px; width: 250px; }
.night-row { display: flex; justify-content: space-between; font-weight: 700; color: var(--gold); font-size: 16px; }
#night-timer { font-variant-numeric: tabular-nums; color: var(--text); }
#night-timer.urgent { color: #ff6b5b; animation: pulse 0.6s infinite alternate; }
.bar { position: relative; height: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 6px; overflow: hidden; margin: 7px 0 5px; }
#target-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #ff7a00, #ffd36b); box-shadow: 0 0 12px #ff9a2a; transition: width 0.2s; }
#target-fill.done { background: linear-gradient(90deg, #6fdc7e, #d6ffb0); }
.night-sub { font-size: 12.5px; color: var(--muted); }
.night-sub b { color: var(--text); }
.zone-hint { font-size: 11.5px; color: #ffb4a0; margin-top: 4px; }
.zone-hint:empty { display: none; }
#hud-punya { position: absolute; top: 12px; right: 12px; padding: 9px 16px; text-align: right; min-width: 170px; }
.punya { font-size: 24px; font-weight: 700; color: var(--gold); text-shadow: 0 0 12px rgba(255, 170, 50, 0.6); font-variant-numeric: tabular-nums; }
.punya .ico { margin-right: 6px; }
.persec { font-size: 12.5px; color: var(--muted); }
.boosts { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; margin-top: 3px; }
.boost { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: rgba(255, 200, 80, 0.2); border: 1px solid rgba(255, 210, 120, 0.5); color: #ffe7b0; }
.combo { position: absolute; top: 92px; left: 50%; transform: translateX(-50%); font-size: 22px; font-weight: 700; color: #ffe08a; text-shadow: 0 0 14px #ff8a00, 0 2px 0 #6a2500; white-space: nowrap; }
.combo.bump { animation: bump 0.18s; }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.18); } }
#quests { position: absolute; left: 12px; top: 128px; width: 250px; padding: 8px 12px; font-size: 12.5px; }
#quests h4 { margin: 2px 0 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold2); }
.quest { margin: 5px 0 7px; }
.quest .qt { display: flex; justify-content: space-between; gap: 6px; }
.quest .qr { color: var(--gold); white-space: nowrap; }
.quest .bar { height: 5px; margin: 3px 0 0; }
.quest .bar div { height: 100%; background: #ffb238; }
.quest.done .qt { color: var(--good); }
#utsav { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(360px, 52vw); padding: 6px 12px; text-align: center; }
.utsav-label { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
#utsav .bar { height: 9px; margin: 4px 0 2px; }
#utsav-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ff2d92, #ff9500, #ffe600); transition: width 0.25s; }
#utsav.active { box-shadow: 0 0 30px rgba(255, 60, 160, 0.7); border-color: #ff7ac8; }
#stamina { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); width: 120px; height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; opacity: 0; transition: opacity 0.4s; }
#stamina.show { opacity: 1; }
#stamina-fill { height: 100%; background: #9fe7ff; width: 100%; }
.banner { position: absolute; top: 24%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-family: 'Yatra One', serif; font-size: clamp(22px, 4vw, 40px); color: var(--gold); text-shadow: 0 0 24px #ff8a00, 0 3px 0 #5a1d00; opacity: 0; transition: opacity 0.4s; pointer-events: none; width: 92%; }
.banner small { display: block; font-family: 'Poppins', sans-serif; font-size: clamp(13px, 1.8vw, 17px); color: #ffe8c4; text-shadow: 0 2px 6px #000; margin-top: 6px; }
.banner.show { opacity: 1; }
.banner.warn { color: #9fe7ff; text-shadow: 0 0 24px #3aa0ff, 0 3px 0 #002a5a; }
#toasts { position: absolute; right: 12px; top: 110px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: linear-gradient(90deg, rgba(60, 20, 5, 0.9), rgba(90, 40, 5, 0.9)); border: 1px solid var(--gold2); border-radius: 12px; padding: 8px 14px; font-size: 13px; max-width: 280px; animation: slidein 0.35s ease-out; box-shadow: 0 0 20px rgba(255, 160, 30, 0.35); }
.toast b { color: var(--gold); }
@keyframes slidein { from { transform: translateX(120%); opacity: 0; } }
@keyframes pulse { to { opacity: 0.5; } }
.arrow { position: absolute; left: 50%; top: 50%; font-size: 30px; color: #ffd700; text-shadow: 0 0 14px #ffae00; transform-origin: center; }
.arrow span { position: absolute; font-size: 12px; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; color: #fff1c4; }
#popups { position: absolute; inset: 0; overflow: hidden; }
.pop { position: absolute; font-weight: 700; font-size: 14px; color: #ffe08a; text-shadow: 0 0 8px #ff8000, 0 1px 2px #000; animation: popup 0.9s ease-out forwards; white-space: nowrap; transform: translate(-50%, -50%); }
@keyframes popup { to { margin-top: -46px; opacity: 0; } }
#actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; pointer-events: auto; }
.act { position: relative; width: 66px; height: 66px; border-radius: 16px; border: 1px solid var(--panel-border); background: var(--panel); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: transform 0.08s; }
.act:active { transform: scale(0.94); }
.act span { font-size: 26px; line-height: 1; }
.act small { position: absolute; top: 3px; left: 6px; font-size: 10px; color: var(--muted); }
.act em { font-style: normal; font-size: 10.5px; color: var(--gold); margin-top: 3px; }
.act.disabled { opacity: 0.45; }
.act.shop { background: linear-gradient(180deg, rgba(255, 170, 40, 0.45), rgba(150, 50, 0, 0.6)); }
.act.shop.can-buy::after { content: ''; position: absolute; top: 5px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #7ee08a; box-shadow: 0 0 8px #7ee08a; }
.corner-btn { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); pointer-events: auto; background: var(--panel); border: 1px solid var(--panel-border); color: var(--text); width: 40px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px; }
#joystick { position: absolute; left: 22px; bottom: 22px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.2); pointer-events: auto; display: none; }
#stick { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 190, 90, 0.4); border: 1px solid rgba(255, 220, 160, 0.6); }
#btn-run { position: absolute; left: 165px; bottom: 30px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--panel-border); background: var(--panel); font-size: 24px; pointer-events: auto; }
#btn-run.on { background: rgba(120, 200, 255, 0.4); }
.mobile-only { display: none; }
body.touch #joystick, body.touch .mobile-only { display: block; }
body.photo #hud > *:not(#popups) { display: none !important; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; background: rgba(5, 2, 4, 0.55); display: flex; align-items: center; justify-content: center; z-index: 30; padding: 12px; backdrop-filter: blur(3px); }
.modal-card { background: linear-gradient(180deg, rgba(45, 14, 6, 0.96), rgba(22, 7, 4, 0.97)); border: 1px solid var(--panel-border); border-radius: 18px; padding: 20px 22px; width: min(520px, 100%); max-height: calc(100% - 10px); overflow-y: auto; box-shadow: 0 0 60px rgba(255, 140, 30, 0.25); }
.modal-card.wide { width: min(920px, 100%); padding: 0; display: flex; flex-direction: column; height: min(680px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 190, 90, 0.2); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.tab { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.tab.active { background: rgba(255, 180, 60, 0.18); color: var(--gold); border-color: var(--panel-border); }
.shop-punya { font-weight: 700; color: var(--gold); font-size: 18px; }
.close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal-body { padding: 14px; overflow-y: auto; flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 190, 90, 0.18); border-radius: 14px; padding: 12px; display: flex; gap: 12px; align-items: center; }
.card .ic { font-size: 30px; width: 40px; text-align: center; flex-shrink: 0; }
.card .info { flex: 1; min-width: 0; }
.card .nm { font-weight: 700; color: var(--gold); font-size: 14.5px; }
.card .nm small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.card .ds { font-size: 12px; color: #e9d3b0; margin: 2px 0; }
.card .lv { font-size: 11.5px; color: var(--muted); }
.card .buy { min-width: 92px; padding: 8px 10px; font-size: 13px; }
.card.locked { opacity: 0.55; }
.card.owned { border-color: rgba(126, 224, 138, 0.45); }
.ach { padding: 10px 12px; }
.ach.got { border-color: rgba(255, 210, 100, 0.6); background: rgba(255, 190, 60, 0.08); }
.ach:not(.got) .ic { filter: grayscale(1); opacity: 0.5; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 13.5px; max-width: 460px; }
.stats div:nth-child(even) { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.settings-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.settings-row input[type=range] { flex: 1; max-width: 220px; accent-color: var(--saffron); }
.section-title { color: var(--gold2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; margin: 16px 0 8px; }
.summary-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.sum-title { text-align: center; font-family: 'Yatra One', serif; font-size: 32px; color: var(--gold); text-shadow: 0 0 20px #ff8a00; }
.sum-sub { text-align: center; color: var(--muted); margin-bottom: 12px; }
.stars { text-align: center; font-size: 40px; letter-spacing: 6px; margin: 6px 0 10px; }
.stars .off { filter: grayscale(1) brightness(0.4); }
.sum-rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; font-size: 14.5px; }
.sum-rows div:nth-child(even) { text-align: right; color: var(--gold); font-weight: 600; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 12px; text-align: center; }

@media (max-width: 760px) {
  #hud-night { width: 190px; padding: 7px 10px; }
  .night-row { font-size: 14px; }
  #quests { width: 190px; top: 108px; font-size: 11px; padding: 6px 9px; }
  #hud-punya { min-width: 120px; padding: 7px 10px; }
  .punya { font-size: 18px; }
  .act { width: 54px; height: 54px; }
  .act span { font-size: 21px; }
  #actions { flex-wrap: wrap; width: 120px; justify-content: flex-end; }
  #utsav { bottom: 10px; width: 36vw; left: 58%; }
  #toasts { top: 96px; }
  .combo { top: 76px; font-size: 18px; }
}
@media (max-height: 520px) {
  #quests { display: none; }
}

/* ---------- combo callouts ---------- */
.callout { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-family: 'Yatra One', serif; font-size: clamp(26px, 5vw, 46px); color: #fff0b8; text-shadow: 0 0 22px #ff7a00, 0 0 40px #ff3d00, 0 3px 0 #6a1c00; opacity: 0; pointer-events: none; white-space: nowrap; text-align: center; }
.callout small { display: block; font-family: 'Poppins', sans-serif; font-size: 14px; color: #ffe8c4; text-shadow: 0 1px 4px #000; }
.callout.show { animation: callout 1.3s ease-out; }
@keyframes callout { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }

/* ---------- Deep Dash ---------- */
.dash-btn { background: linear-gradient(180deg, #6a3cff, #3a0ca3); border-color: #b9a4ff; box-shadow: 0 0 22px rgba(120, 80, 255, 0.5); margin-left: 8px; }
.title-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.title-buttons .dash-btn { margin-left: 0; }
.challenge-info { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(120, 80, 255, 0.2); border: 1px solid rgba(185, 164, 255, 0.5); font-size: 14px; }
#dash-panel { display: none; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(380px, 70vw); padding: 8px 14px; }
body.dash #dash-panel { display: block; }
body.dash #hud-night, body.dash #quests, body.dash #utsav, body.dash #actions, body.dash #btn-menu, body.dash #hud-punya { display: none !important; }
.dash-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--gold); }
#dash-timer { font-variant-numeric: tabular-nums; color: var(--text); }
#dash-timer.urgent { color: #ff6b5b; animation: pulse 0.5s infinite alternate; }
.race { display: grid; grid-template-columns: 76px 1fr 62px; align-items: center; gap: 8px; font-size: 13px; }
.race .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.race b { text-align: right; font-variant-numeric: tabular-nums; }
.race .bar { margin: 5px 0; height: 9px; }
.race .bar div { height: 100%; width: 0; transition: width 0.2s; }
.race .you { background: linear-gradient(90deg, #ff7a00, #ffd36b); box-shadow: 0 0 10px #ff9a2a; }
.race .rival { background: linear-gradient(90deg, #3a86ff, #9fe7ff); }
#dash-panel.leading { box-shadow: 0 0 24px rgba(255, 170, 40, 0.55); }
.dash-medal { font-size: 12px; color: var(--muted); margin-top: 2px; }
#dash-boosts { justify-content: flex-start; }
.rival-tag { position: absolute; left: 0; top: 0; display: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: rgba(20, 40, 100, 0.75); border: 1px solid #7fb2ff; color: #dbe9ff; white-space: nowrap; }
.dash-scores { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin: 10px 0; }
.dash-scores small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-scores b { font-size: 30px; }
.ds-you b { color: var(--gold); } .ds-rival b { color: #9fc7ff; } .ds-vs { color: var(--muted); padding: 0 10px; }
.medal-big { text-align: center; font-size: 38px; margin: 6px 0 12px; }
.medal-big span { font-size: 16px; color: var(--gold); vertical-align: middle; }
.compete-hero { padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(110, 60, 255, 0.25), rgba(255, 140, 30, 0.12)); border: 1px solid rgba(185, 164, 255, 0.4); }
.ch-title { font-family: 'Yatra One', serif; font-size: 26px; color: var(--gold); }
#cp-name { background: #2a0e06; color: var(--text); border: 1px solid var(--panel-border); border-radius: 8px; padding: 6px 10px; font-family: inherit; font-size: 14px; }
.ladder { display: flex; flex-wrap: wrap; gap: 6px; }
.rung { padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255, 190, 90, 0.2); font-size: 13px; opacity: 0.6; }
.rung small { display: block; color: var(--muted); font-size: 11px; }
.rung.beaten { opacity: 1; border-color: rgba(126, 224, 138, 0.6); }
.rung.current { opacity: 1; border-color: #b9a4ff; box-shadow: 0 0 14px rgba(140, 100, 255, 0.5); }
.medals { display: flex; flex-wrap: wrap; gap: 6px; }
.medals span { padding: 4px 9px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; filter: grayscale(1); opacity: 0.55; }
.medals span.got { filter: none; opacity: 1; border-color: var(--gold2); }
.medals small { color: var(--muted); }
.runs div { display: grid; grid-template-columns: 34px 90px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13.5px; }
.runs b { color: var(--gold); text-align: right; } .runs small { color: var(--muted); }
body.touch #btn-menu { display: none; }
@media (max-width: 760px) {
  #dash-panel { width: 62vw; left: 12px; transform: none; font-size: 12px; }
  .race { grid-template-columns: 56px 1fr 50px; font-size: 12px; }
}
body.touch .controls-help { display: none; }
@media (max-height: 520px) {
  .om, .story { display: none; }
  h1 .hi { font-size: 34px; }
  .title-card { padding: 14px 18px; }
  .btn.big { font-size: 17px; padding: 11px 22px; }
  .modal-card { padding: 12px 16px; }
  .sum-title { font-size: 24px; }
  .sum-sub { margin-bottom: 4px; }
  .dash-scores { margin: 4px 0; }
  .dash-scores b { font-size: 22px; }
  .medal-big { font-size: 26px; margin: 2px 0 6px; }
  .sum-rows { font-size: 13px; gap: 2px 18px; }
  .summary-buttons { margin-top: 10px; }
  .stars { font-size: 28px; margin: 2px 0 6px; }
}

/* ---------- quieter HUD on phones ---------- */
#night-mini { display: none; }
#quests h4 { display: flex; align-items: center; gap: 6px; }
#quests h4 .qmini, #quests h4 i { display: none; }
body.touch #night-mini { display: inline; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
body.touch .night-sub, body.touch #persec, body.touch .act small, body.touch .act em, body.touch .utsav-label, body.touch .dash-medal { display: none; }
body.touch #hud-night { width: auto; min-width: 160px; padding: 6px 10px; }
body.touch .night-row { gap: 10px; font-size: 13.5px; }
body.touch #hud-night .bar { height: 6px; margin: 5px 0 1px; }
body.touch .zone-hint { font-size: 11px; }
body.touch #hud-punya { min-width: 0; padding: 6px 10px; }
body.touch .punya { font-size: 17px; }
body.touch #quests { pointer-events: auto; width: auto; max-width: 210px; top: 74px; padding: 5px 10px; font-size: 11px; }
body.touch #quests h4 { margin: 2px 0; font-size: 10.5px; }
body.touch #quests h4 .qmini { display: inline; color: var(--gold); letter-spacing: 0; }
body.touch #quests h4 i { display: inline; font-style: normal; transition: transform 0.2s; }
body.touch #quests:not(.open) .quest { display: none; }
body.touch #quests:not(.open) h4 i { transform: rotate(-90deg); }
body.touch #utsav { padding: 4px 8px; width: 30vw; }
body.touch #utsav .bar { margin: 0; height: 6px; }
body.touch .act { width: 50px; height: 50px; border-radius: 14px; }
body.touch .act span { font-size: 22px; }
body.touch #actions { gap: 6px; }
body.touch .toast { font-size: 12px; padding: 6px 10px; max-width: 200px; }
body.touch #toasts { top: 56px; }
body.touch .banner { font-size: clamp(20px, 5vw, 30px); top: 30%; }
body.touch .combo { font-size: 16px; top: 60px; }
body.touch .callout { font-size: clamp(22px, 6vw, 34px); }
body.touch .boost { font-size: 10px; padding: 0 5px; }
body.touch #dash-panel { padding: 6px 10px; }
@media (max-height: 520px) { body.touch #quests { display: block; top: 62px; } }

/* ---------- Aarti hold meter & stars ---------- */
.aarti-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-top: 3px; color: var(--muted); }
.aarti-row .bar { flex: 1; height: 7px; margin: 0; }
#aarti-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd36b, #fff4c4); box-shadow: 0 0 10px #ffd36b; transition: width 0.15s; }
#aarti-state { min-width: 74px; text-align: right; font-weight: 700; white-space: nowrap; }
.aarti-row.holding #aarti-state { color: #fff1b0; animation: pulse 0.5s infinite alternate; }
.aarti-row.falling #aarti-state { color: #ff7b6b; animation: pulse 0.3s infinite alternate; }
.aarti-row.falling #aarti-fill { background: linear-gradient(90deg, #ff6b4b, #ffb38a); }
.star-goals { display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 13px; margin: -4px 0 12px; }
.star-goals span { opacity: 0.4; filter: grayscale(1); }
.star-goals span.on { opacity: 1; filter: none; color: var(--gold); }
body.touch .aarti-row { font-size: 10.5px; }
body.touch #aarti-state { min-width: 0; }
body.touch .aarti-ico { display: none; }

/* ---------- 2D mini-games ---------- */
#mini { position: fixed; inset: 0; z-index: 40; background: #05030a; touch-action: none; }
#mini-c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.mini-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px; pointer-events: none; }
.mini-title { font-family: 'Yatra One', serif; color: var(--gold); font-size: 20px; text-shadow: 0 0 12px #ff8a00; }
.mini-score { flex: 1; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: #ffe8c4; font-size: 16px; }
.mini-x { pointer-events: auto; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-border); color: var(--text); width: 36px; height: 36px; border-radius: 10px; font-size: 16px; cursor: pointer; }
.mini-help { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); background: rgba(30, 10, 5, 0.75); border: 1px solid var(--panel-border); border-radius: 12px; padding: 7px 14px; font-size: 14px; opacity: 0; transition: opacity 0.4s; pointer-events: none; text-align: center; max-width: 90vw; }
.mini-help.show { opacity: 1; }
.mini-tools { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; }
.mini-tools:empty { display: none; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 12px #fff; transform: scale(1.12); }
.mini-result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5, 2, 4, 0.55); padding: 12px; }
.grade { font-size: 64px; font-family: 'Yatra One', serif; }
.grade.gS { color: #fff2a8; text-shadow: 0 0 24px #ffb300; } .grade.gA { color: #ffd36b; } .grade.gB { color: #9fe7ff; } .grade.gC, .grade.gD { color: #c9a; }
.btn.bonus { background: linear-gradient(180deg, #ffe08a, #d4a017); color: #3a1a00; border-color: #fff1b0; }
body.touch .act#act-khel em { display: none; }
@media (max-width: 760px) { #actions { width: 172px; } }

/* ---------- Story mode ---------- */
body.story #hud-punya, body.story #quests, body.story #utsav, body.story #actions, body.story #btn-menu, body.story #boosts { display: none !important; }
body.story #hud-night { display: none; }
body.story.story-play #hud-night { display: block; }
body.story .tab:not([data-tab=settings]) { display: none; }
body.story #shop-body .section-title:first-child, body.story .shop-punya { display: none; }
body.cine #hud { display: none; }
#cine-bars .bar-top, #cine-bars .bar-bot { position: fixed; left: 0; right: 0; height: 0; background: #000; z-index: 25; transition: height 0.8s ease; pointer-events: none; }
#cine-bars .bar-top { top: 0; } #cine-bars .bar-bot { bottom: 0; }
body.cine #cine-bars .bar-top, body.cine #cine-bars .bar-bot { height: 11vh; }
.cine-text { position: fixed; left: 50%; bottom: 13vh; transform: translateX(-50%); z-index: 26; text-align: center; width: min(820px, 92vw); opacity: 0; pointer-events: none; text-shadow: 0 2px 10px #000; }
.cine-text.show { animation: cinetext 6.5s ease forwards; }
@keyframes cinetext { 0% { opacity: 0; transform: translate(-50%, 10px); } 12% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.ct-hi { font-family: 'Yatra One', serif; font-size: clamp(24px, 4.2vw, 40px); color: var(--gold); text-shadow: 0 0 20px #ff8a00, 0 2px 0 #4a1500; }
.ct-en { font-size: clamp(14px, 2vw, 18px); color: #fff1dc; margin-top: 4px; }
.cine-skip { position: fixed; right: 16px; bottom: calc(11vh + 10px); z-index: 27; display: none; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--panel-border); color: var(--text); padding: 6px 14px; border-radius: 10px; cursor: pointer; font-family: inherit; }
body.cine .cine-skip { display: block; }
.chapter-card { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(40, 12, 4, 0.85), rgba(0, 0, 0, 0.95)); pointer-events: none; opacity: 0; }
.chapter-card.show { animation: chcard 3.2s ease forwards; }
@keyframes chcard { 0% { opacity: 0; } 18% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
.cc-hi { font-family: 'Yatra One', serif; font-size: clamp(44px, 9vw, 92px); color: var(--gold); text-shadow: 0 0 34px #ff8a00, 0 3px 0 #5a1d00; }
.cc-en { font-size: clamp(14px, 2.2vw, 20px); letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); margin-top: 8px; text-align: center; padding: 0 16px; }
/* storybook */
#book { position: fixed; inset: 0; z-index: 38; background: #200a03; cursor: pointer; }
#book-c { position: absolute; inset: 0; width: 100%; height: 100%; }
.book-text { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); width: min(860px, 90vw); text-align: center; background: rgba(30, 10, 3, 0.72); padding: 12px 18px 10px; border-radius: 16px; border: 1px solid rgba(230, 170, 30, 0.35); }
.book-hi { font-family: 'Yatra One', serif; font-size: clamp(26px, 4.5vw, 44px); color: #ffe39a; text-shadow: 0 0 18px #ff8a00, 0 2px 0 #3a1000; }
.book-en { font-size: clamp(14px, 2vw, 18px); color: #fff4e0; line-height: 1.55; min-height: 3.1em; margin-top: 4px; }
.book-next { font-size: 12px; color: var(--muted); margin-top: 6px; transition: opacity 0.3s; letter-spacing: 0.1em; }
.book-skip { position: absolute; top: 16px; right: 16px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--panel-border); color: var(--text); padding: 6px 14px; border-radius: 10px; cursor: pointer; font-family: inherit; }
.title-buttons #btn-utsav, .title-buttons #btn-dash { font-size: 15px; }
@media (max-height: 520px) { .book-text { padding-top: 8px; bottom: 2vh; } .book-en { min-height: 0; } }
