/* App palette and spacing: iOS 1.2.1, PremiumTheme / SoloViews (999a309).
   CSS device illustration inspired by the Cosmic Orange iPhone 17 Pro. */
.demo-launcher { position: fixed; right: 22px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: center; gap: 12px; border: 0; padding: 0; background: transparent; color: white; cursor: pointer; font: 700 14px/1.4 -apple-system, BlinkMacSystemFont, sans-serif; }
.demo-launcher[hidden] { display: none; }
.demo-label { padding: 10px 14px; border-radius: 14px; background: #21183e; box-shadow: 0 6px 24px #0005; }
.demo-mini { position: relative; box-sizing: border-box; display: grid; place-items: center; width: 76px; height: 156px; border: 3px solid #ef8b4b; border-radius: 20px; background: #14132e url('demo-assets/CommandHubBackground.png') center/cover; box-shadow: inset 0 0 0 3px #090909, 0 10px 25px #0006; }
.demo-mini::before { content: ''; position: absolute; top: 7px; width: 24px; height: 7px; background: #030305; border-radius: 9px; }
.demo-mini img { width: 90%; }
.demo-phone { box-sizing: border-box; position: fixed; inset: auto 20px max(16px, env(safe-area-inset-bottom)) auto; margin: 0; width: min(382px, calc(100vw - 24px)); height: min(824px, calc(100dvh - 76px)); max-height: none; padding: 7px; overflow: visible; border: 3px solid #f6aa70; border-radius: 54px; background: linear-gradient(100deg,#b64e25,#f8aa71 45%,#d56c34); color: #fff; box-shadow: 0 0 0 1px #9e4629, 0 20px 80px #0008; font: 16px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.demo-phone::before { content: ''; position: absolute; right: -6px; top: 175px; height: 65px; width: 4px; border-radius: 3px; background: #d36b37; box-shadow: 0 118px #d36b37; }
.demo-phone::after { content: ''; position: absolute; left: -6px; top: 118px; width: 4px; height: 26px; background: #d36b37; border-radius: 3px; box-shadow: 0 46px #d36b37, 0 82px #d36b37; }
.demo-phone::backdrop { background: #0c10204d; }
.demo-screen { height: 100%; display: flex; flex-direction: column; border-radius: 44px; overflow: hidden; background: linear-gradient(160deg,#121740bd,#241a5ccc,#401766dc), url('demo-assets/CommandHubBackground.png') center/cover; box-shadow: 0 0 0 4px #090909; }
.demo-status { height: 59px; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 23px; font-size: 15px; font-weight: 700; }
.demo-island { position: absolute; width: 104px; height: 29px; top: 10px; left: 50%; transform: translateX(-50%); border-radius: 25px; background: #030305; }
.demo-island::after { content: ''; position: absolute; right: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#24365c,#070b15); }
.demo-toolbar { position: absolute; top: -43px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 11px; color: white; text-shadow: 0 1px 4px #000; }
.demo-system-icons { width: 63px; height: 14px; }
.demo-phone button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo-close { color: white; background: #251c42; border: 1px solid #ffffff50; border-radius: 20px; padding: 8px 14px; min-height: 36px; }
.demo-content { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 8px 18px 18px; scrollbar-width: thin; }
.demo-homebar { flex-shrink: 0; width: 120px; height: 5px; margin: 8px auto; border-radius: 5px; background: white; }
.demo-phone h2 { font-size: 23px; line-height: 1.25; margin: 12px 0; }
.demo-phone p { margin: 10px 0; }
.demo-muted { color: #c4bfd1; font-size: 12px; }
.demo-logo { width: 180px; height: 112px; object-fit: contain; display: block; margin: 0 auto 12px; }
.demo-presenter { display: flex; align-items: center; gap: 10px; margin: 12px 0 22px; }
.demo-bust { width: 106px; height: 120px; flex-shrink: 0; overflow: hidden; mask-image: linear-gradient(#000 80%,transparent); }
.demo-bust img { height: 267px; width: 100%; object-fit: cover; object-position: top; }
.demo-bubble { background: white; color: #121740; padding: 10px 12px; border-radius: 14px; font-size: 14px; font-weight: 700; }
.demo-card { padding: 16px; margin: 12px 0; border-radius: 18px; background: #ffffff12; }
.demo-action { display: block; width: 100%; box-sizing: border-box; padding: 13px; margin-top: 10px; border: 1px solid #ffffff30; border-radius: 14px; background: #ffffff15; color: white; text-align: center; font-weight: 600 !important; }
.demo-primary { background: #7652d6; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.demo-quit { border: 0; border-radius: 50%; width: 36px; height: 36px; color: white; background: #ffffff20; }
.demo-points { color: #21c45e; font-variant-numeric: tabular-nums; }
.demo-category { text-align: center; text-transform: uppercase; letter-spacing: 1.2px; color: #ffffffa6; font-size: 11px; font-weight: 800; margin-top: 14px !important; }
.demo-question { display: grid; place-items: center; min-height: 110px; text-align: center; font-size: 20px !important; font-weight: 800; padding: 0 6px; }
.demo-timer { text-align: center; font-size: 22px; font-weight: 800; }
.demo-track { height: 8px; border-radius: 8px; background: #ffffff26; overflow: hidden; margin-bottom: 4px; }
.demo-fill { height: 100%; background: #21c45e; width: 100%; }
.demo-confidence { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 14px; margin: 14px 0; border-radius: 14px; background: #ffffff12; font-size: 13px; }
.demo-confidence small { display: block; font-size: 10px; color: #ffffffbf; margin-top: 2px; }
.demo-confidence button { border: 0; border-radius: 8px; padding: 8px; color: white; background: #ffffff18; font-size: 12px; font-weight: 700; }
.demo-confidence button[aria-pressed='true'] { color: #ffe68a; background: #ffcf332e; }
.demo-confidence button:disabled { opacity: .5; }
.demo-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.demo-answer { min-height: 108px; padding: 8px; border: 0; border-radius: 18px; color: white; background: linear-gradient(#ffffff47,transparent,#0000001f),var(--answer); font-size: 14px !important; font-weight: 700 !important; text-shadow: 0 1px 1px #0004; box-shadow: 0 4px 6px #0005; overflow-wrap: anywhere; }
.demo-answer strong { display: block; margin-bottom: 4px; font-size: 20px; font-weight: 900; }
.demo-answer:disabled { cursor: default; }
.demo-answer[data-result='correct'] { background: #21c45e; box-shadow: 0 0 20px #21c45eaa; }
.demo-answer[data-result='wrong'] { background: #db2626; }
.demo-answer[data-selected='true'] { outline: 3px solid white; outline-offset: -3px; }
.demo-answer[data-result='other'] { opacity: .35; }
.demo-reveal { width: 100%; margin-top: 14px; padding: 12px; border: 0; border-radius: 16px; background: #0004; color: white; text-align: center; }
.demo-reveal strong, .demo-reveal span { display: block; margin: 4px 0; }
.demo-result { text-align: center; }
.demo-result .demo-bust { height: 165px; width: 170px; margin: auto; }
.demo-result .demo-bust img { height: 275px; }
.demo-score { color: #21c45e; font-size: 48px; font-weight: 900; }
.demo-stats { display: flex; gap: 12px; }
.demo-stats .demo-card { flex: 1; font-size: 12px; }
.demo-stats strong { display: block; font-size: 22px; }
.demo-review { padding: 12px; margin: 10px 0; border-radius: 14px; background: #ffffff12; font-size: 14px; }
.demo-phone :focus-visible, .demo-launcher:focus-visible { outline: 3px solid #ffd159; outline-offset: 3px; }
@media (max-width: 480px) { .demo-phone { right: 12px; border-radius: 48px; } .demo-launcher { right: 12px; } .demo-mini { width: 60px; height: 124px; } }
@media (prefers-reduced-motion: no-preference) { .demo-fill { transition: width .2s linear; } .demo-answer[data-result='correct'] { animation: demo-pop .35s ease-out; } @keyframes demo-pop { 50% { transform: scale(1.06); } } }
/* Preserve all four choices on short portrait screens. */
.demo-phone { max-width: none; }
.demo-toolbar > span { background: #251c42; padding: 7px 10px; border-radius: 16px; text-shadow: none; }
@media (max-width: 360px) {
    .demo-status { padding: 0 20px; font-size: 13px; }
    .demo-island { width: 86px; }
    .demo-system-icons { width: 53px; }
}
@media (max-height: 700px) and (orientation: portrait) {
    .demo-status { height: 46px; }
    .demo-content { padding: 4px 14px 12px; }
    .demo-top { font-size: 12px; }
    .demo-quit { width: 30px; height: 30px; }
    .demo-category { margin: 8px 0 !important; font-size: 10px; }
    .demo-question { min-height: 54px; margin: 8px 0 !important; font-size: 17px !important; }
    .demo-timer { font-size: 18px; }
    .demo-confidence { margin: 8px 0; padding: 6px 8px; gap: 6px; font-size: 11px; }
    .demo-confidence small { font-size: 9px; }
    .demo-confidence button { font-size: 10px; padding: 6px; flex-shrink: 0; }
    .demo-options { gap: 8px; }
    .demo-answer { min-height: 72px; font-size: 12px !important; padding: 6px; border-radius: 14px; }
    .demo-answer strong { font-size: 17px; }
    .demo-reveal { margin-top: 8px; padding: 6px; }
}

/* Isolate native-style controls from the marketing site's global element rules. */
.demo-phone, .demo-launcher { letter-spacing: normal; }
.demo-screen *, .demo-screen *::before, .demo-screen *::after { box-sizing: content-box; }
.demo-screen .demo-action { box-sizing: border-box; }
.demo-phone h2 { font-family: inherit; letter-spacing: normal; }
.demo-system-icons { fill: currentColor; stroke: none; }
