/* MathMe launch curtain — the IIC Bengaluru ceremony curtain in MathMe colours. */
html.mm-curtain-pending { background: #1a0b3d; }
html.mm-curtain-pending body { visibility: hidden; }
html.mm-curtain-on, html.mm-curtain-on body { overflow: hidden !important; }

/* the curtain: deep violet velvet folds, a lit hem; it rises as the button is held */
.mmc {
  position: fixed; inset: 0; z-index: 2147483000; visibility: visible;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; font-family: Montserrat, 'DM Sans', system-ui, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none;
  will-change: transform; transform: translate3d(0, 0, 0); transition: opacity 1.2s ease;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(0,0,0,.16) 3.5vw, rgba(255,255,255,.06) 6vw, rgba(0,0,0,0) 7vw),
    linear-gradient(180deg, #2a0f6b 0%, #3b148f 55%, #2d0f73 100%);
  box-shadow: 0 16px 40px rgba(10, 0, 40, .55);
}
.mmc.is-gone { opacity: 0; pointer-events: none; }
.mmc-content { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 18px 60px; }

.mmc-seal { width: clamp(88px, 12vw, 120px); aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 0 0 2px rgba(253,224,71,.55), 0 12px 40px rgba(0,0,0,.45); }
.mmc-seal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; pointer-events: none; }
.mmc-school { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.75); line-height: 1.7; }
.mmc-presents { font-size: 13px; color: rgba(255,255,255,.55); letter-spacing: .08em; }
.mmc-product { display: flex; align-items: center; gap: 14px; }
.mmc-tile { width: clamp(50px, 6.5vw, 64px); aspect-ratio: 1; border-radius: 22%; background: #915bff; display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.mmc-tile img { width: 62%; height: 62%; filter: brightness(0) invert(1); pointer-events: none; }
.mmc-word b { display: block; font-size: clamp(40px, 7vw, 76px); font-weight: 800; letter-spacing: -.03em; line-height: 1; text-align: left; }
.mmc-word span { display: block; margin-top: 6px; font-size: 12.5px; color: rgba(255,255,255,.7); text-align: left; letter-spacing: .05em; }
.mmc-soon { margin-top: 6px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #fde047; }

/* the launch password box (unlocks the button) */
.mmc-pin { display: flex; gap: 8px; margin-top: 14px; }
.mmc-pin input { width: 190px; height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid rgba(253,224,71,.5); background: rgba(0,0,0,.3); color: #fff;
  font: 700 18px/1 Montserrat, system-ui, sans-serif; letter-spacing: .3em; text-align: center; outline: none; user-select: text; -webkit-user-select: text; }
.mmc-pin input::placeholder { letter-spacing: .04em; font-weight: 500; font-size: 14px; color: rgba(255,255,255,.5); }
.mmc-pin input:focus { border-color: #fde047; }
.mmc-pin button { height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: #fde047; color: #1a0b3d; font: 700 15px/1 Montserrat, system-ui, sans-serif; cursor: pointer; }
.mmc-pin button:disabled { opacity: .6; cursor: wait; }
.mmc-pin.is-wrong { animation: mmc-shake .4s; }
@keyframes mmc-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* the launch button: locked → "Hold to launch"; fills while held */
.mmc-btn {
  position: relative; overflow: hidden; margin-top: 18px; min-width: 240px; height: 56px; padding: 0 28px;
  border: 2px solid rgba(253,224,71,.5); border-radius: 999px; background: rgba(0,0,0,.25); color: rgba(255,255,255,.7);
  font: 700 16px/1 Montserrat, system-ui, sans-serif; letter-spacing: .04em; cursor: not-allowed; touch-action: none;
}
.mmc-btn:disabled { opacity: 1; }
.mmc-btn-text { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.mmc-btn-fill { position: absolute; inset: 0; background: linear-gradient(90deg, #ffb300, #fde047); transform: scaleX(0); transform-origin: left; }
.mmc-btn.is-ready { cursor: pointer; color: #1a0b3d; background: #fde047; border-color: #fde047; box-shadow: 0 0 0 0 rgba(253,224,71,.6); animation: mmc-glow 1.8s ease-in-out infinite; }
.mmc-btn.is-ready .mmc-btn-fill { background: linear-gradient(90deg, #ff9933, #ff5e5e); }
.mmc-btn.is-holding { animation: none; transform: scale(.98); }
@keyframes mmc-glow { 50% { box-shadow: 0 0 0 14px rgba(253,224,71,0); } }
.mmc-hint { min-height: 18px; font-size: 13px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }

/* the hem: a gold edge with a row of bulbs that light from the centre out */
.mmc-hem { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; display: flex; justify-content: space-around; align-items: flex-start; border-top: 2px solid #f5c542; background: linear-gradient(#24095e, #170540); transition: opacity .4s; }
.mmc-hem i { width: 9px; height: 13px; margin-top: 5px; border-radius: 50% 50% 45% 45%; background: #4a3a7a; transition: background .35s, box-shadow .35s; }
.mmc-hem i.on { background: #ffd76a; box-shadow: 0 0 8px 3px rgba(255,205,90,.85), 0 0 24px 8px rgba(255,140,40,.4); animation: mmc-twinkle 1.4s ease-in-out infinite alternate; }
.mmc-hem i.on:nth-child(3n) { background: #ff9a3d; animation-delay: -.5s; }
.mmc-hem i.on:nth-child(4n) { background: #ff6fb5; box-shadow: 0 0 8px 3px rgba(255,110,180,.8), 0 0 24px 8px rgba(255,80,160,.35); animation-delay: -.9s; }
@keyframes mmc-twinkle { to { filter: brightness(.7); } }

/* night sky behind the rising curtain, and the fireworks above everything */
.mmc-night { position: fixed; inset: 0; z-index: 2147482999; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 30%, rgba(20,10,60,.86), rgba(5,3,20,.94)); transition: opacity 2.4s ease; }
.mmc-fireworks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2147483001; pointer-events: none; }

.mmc-live { position: fixed; left: 50%; top: 40%; z-index: 2147483002; transform: translate(-50%, -50%); text-align: center; pointer-events: none;
  font-family: Montserrat, system-ui, sans-serif; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.6); animation: mmc-in .9s ease; transition: opacity 1.2s ease; }
.mmc-live.is-done { opacity: 0; }
.mmc-live b { display: block; font-size: clamp(32px, 6vw, 60px); font-weight: 800; letter-spacing: -.02em; }
.mmc-live span { display: block; margin-top: 6px; font-size: clamp(13px, 1.6vw, 16px); letter-spacing: .18em; text-transform: uppercase; color: #fde68a; }
@keyframes mmc-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }

@media (prefers-reduced-motion: reduce) { .mmc-hem i.on, .mmc-btn.is-ready { animation: none; } }
