/* Keep the supplied screen geometry; adapt only Django forms and live data. */
:root, body { font-family: "Just Dance", system-ui, sans-serif; }
main.page-wrap { max-width: none; padding: 0; }
.page-wrap section { margin: 0; }
section.content-screen, section.market-section, section.login-screen { padding: 0; background: transparent; border: 0; border-radius: 0; }
.page-wrap .notice { grid-column: 1/-1; }
.brand img { filter: none; mix-blend-mode: normal; }
.brand span { border: 0; padding: 0; }
.brand .brand-divider { background: #e2dfe8; }
.desktop-nav { flex-wrap: nowrap; }
button:disabled { cursor: default; }
.player-avatar { object-fit: cover; }
.contestants { list-style: none; margin: 0; padding: 0; }
.contestant { width: 100%; }
.contestant:nth-child(even) .player-avatar { --avatar-color: #d701bf; }
.footer { width:min(1240px,calc(100% - 56px)); margin:auto; padding:20px 0; border-top:1px solid #e9e7ed; display:flex; justify-content:space-between; font-size:10px; color:#77737f; }
.stage-option { text-decoration:none; }
.stage-reset { margin:0 0 12px; font-size:11px; color:#4f41ba; display:inline-block; }
.empty-state { padding:24px; color:#77737f; font-size:13px; }
dialog { color:inherit; }
dialog.welcome-overlay { border:0; padding:0; max-width:none; max-height:none; width:100%; height:100%; }
dialog:not([open]) { display:none; }
dialog.bet-modal { border:1px solid #e9e7ed; }
dialog::backdrop { background:#15121c88; backdrop-filter:blur(4px); }
.bet-modal form { margin:0; }
.bet-modal select { width:100%; }
.bet-modal .amount-input input { padding:0; }
.quick-amounts button { color:#4f41ba; }
.login-card form label { display:block; font-size:11px; margin-bottom:6px; }
.login-card form input { width:100%; height:43px; border:1px solid #e7e4eb; padding:0 11px; font-size:13px; }
.errorlist { color:#a60059; font-size:12px; padding-left:18px; }
.my-pick-card { margin-bottom:14px; }
.bracket-viewport { overflow:auto; touch-action:auto; }
.bracket-canvas { position:relative; display:grid; grid-template-columns:repeat(3,260px); gap:40px; width:max-content; height:auto; min-height:100%; padding:24px; transform-origin:top left; }
.bracket-column h2 { font-size:19px; letter-spacing:.1em; color:#4f41ba; }
.bracket-column .bracket-match { position:relative; width:260px; margin:14px 0; }
.bracket-column .bracket-player { min-height:42px; font-size:16px; }
.bracket-column .bracket-match-title { font-size:13px; }
.bracket-legend > span, .bracket-screen .screen-subtitle, .bracket-screen .stage-note { font-size:14px; }
.bracket-player.absent { opacity:.45; }
.rank-highlight { max-width:760px; }
@media(max-width:1050px) and (min-width:801px) { .topbar { gap:14px; }.desktop-nav { gap:16px; margin-left:0; } }
@media(max-width:800px) { .footer { padding-bottom:90px; }.mobile-nav a { text-align:center; font-size:10px; }.bet-modal { margin:auto auto 0; max-width:100%; }.top-actions { margin-left:auto; }.welcome-dialog .hero-copy { width:100%; } }
.desktop-nav .nav-icon { display:none; }
.mobile-nav .nav-icon { width:18px; height:18px; }
.hero.welcome-dialog { height:auto; padding-block:clamp(72px,8vw,100px) 108px; border:0; }
.app-shell .welcome-dialog h1 { margin:0 0 18px; font-size:clamp(50px,16vw,100px); letter-spacing:0; }
.welcome-dialog .hero-copy p { font-size:clamp(16px,2.6vw,22px); line-height:1.45; }
.welcome-dialog .hero-actions { flex-wrap:wrap; gap:12px; margin-top:24px; }
.welcome-dialog .hero-actions button { min-height:52px; padding:0 16px; font-size:clamp(16px,2.2vw,19px); }
.welcome-dialog .hero-stats b { font-size:clamp(15px,2.2vw,20px); }
.welcome-dialog .hero-stats small { font-size:clamp(12px,1.8vw,15px); }
.welcome-dialog .hero-dismiss { width:44px; height:44px; padding:0; }
.welcome-dialog .hero-dismiss::before,
.welcome-dialog .hero-dismiss::after { content:""; grid-area:1 / 1; width:18px; height:2px; border-radius:2px; background:currentColor; }
.welcome-dialog .hero-dismiss::before { transform:rotate(45deg); }
.welcome-dialog .hero-dismiss::after { transform:rotate(-45deg); }
.player-details b { overflow-wrap:anywhere; }
@media(max-width:800px) { .mobile-nav a { font-size:8px; }.mobile-nav a span { white-space:nowrap; } }
.brand .brand-caption { font-size:9px; }
.bracket-column:has(.bracket-lower) h2 { color:#d701bf; }
.bracket-column:has(.bracket-final) h2 { color:#388ca7; }
.personal-panel { grid-column: 1/-1; width:100%; }
.contestants { grid-template-columns: repeat(2,minmax(0,1fr)); }
.contestant .player-details b, .leader-row b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.contestant[data-predict] { border-color:#c9c3e3; }
.prediction-help { font-size:.8rem; color:#615b70; }
@media(max-width:800px) { .app-shell { padding-bottom:calc(65px + env(safe-area-inset-bottom)); } }

.app-shell :is(h1, h2, h3) { letter-spacing: .025em; }
.app-shell .screen-title { font-size: clamp(34px, 6vw, 48px); }
.app-shell .card-heading h3, .app-shell .section-top h2 { font-size: 26px; }
.app-shell .market-type, .app-shell .stage-info small, .app-shell .card-footer { font-size: 12px; }
.market-list .market-card { padding: 12px 12px 0; }
.outcome-row { display: flex; align-items: center; gap: 25px; padding: 4px 0; }
.outcome-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outcome-share { font-weight: 700; }
@media(min-width:801px) { .topbar .desktop-nav { padding-right: 55px; flex: 0 1 auto; gap: 12px; margin-left: 0; } .topbar .top-actions { margin-left: auto; } }
@media(min-width:801px) and (max-width:1250px) { .topbar .desktop-nav { position: absolute; top: 100%; left: 0; right: 0; height: 40px; padding: 0 16px; justify-content: center; background: white; } .app-shell main.page-wrap { margin-top: 60px; } }
.topbar .balance small { color:#605b68; font-size:11px; letter-spacing:0; }

.currency-icon { width:24px; height:24px; object-fit:contain; vertical-align:middle; }
.help-toggle, .top-actions .telegram-link { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; padding:0; }
.help-toggle { padding-top:2px; background:#f1edf9; color:#4f41ba; font-weight:700; }
.market-card .card-heading > div { min-width:0; max-width:100%; }
.market-card .card-heading h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.outcome-share { flex:0 0 4ch; text-align:right; font-variant-numeric:tabular-nums; }
dialog.trade-sheet { position:fixed; inset:auto 0 0; width:min(480px, 100%); max-width:100%; max-height:calc(100dvh - 12px); margin:0 auto; padding:24px clamp(20px, 6vw, 30px) calc(24px + env(safe-area-inset-bottom)); border-bottom:0; border-radius:24px 24px 0 0; background:#fff; color:#191822; }
dialog.trade-sheet::backdrop { background:#15121c66; backdrop-filter:none; }
html:has(.trade-sheet[open]) { overflow:hidden; }
@media (prefers-reduced-motion: no-preference) {
    .trade-sheet[open] { animation:trade-slide 280ms cubic-bezier(.2,.75,.25,1) both; }
    .trade-sheet[open]::backdrop { animation:trade-fade 280ms ease-out both; }
    .trade-sheet[open].is-closing { animation:trade-slide-out 240ms ease-in both; }
    .trade-sheet[open].is-closing::backdrop { animation:trade-fade-out 240ms ease-in both; }
}
@keyframes trade-slide { from { transform:translateY(100%); } }
@keyframes trade-slide-out { from { transform:var(--trade-offset); } to { transform:translateY(100%); } }
@keyframes trade-fade { from { opacity:0; } }
@keyframes trade-fade-out { to { opacity:0; } }
.trade-sheet .trade-badge { display:table; margin:0 40px 18px 0; padding:8px 13px; border-radius:99px; background:#e8f7ed; color:#15653d; font-family:inherit; font-size:14px; letter-spacing:0; }
.trade-sheet .trade-badge:focus { outline:none; }
.trade-sheet .modal-close { width:36px; height:36px; top:18px; right:18px; border-radius:50%; padding:0; font-size:24px; }
.trade-player { display:grid; gap:4px; min-width:0; }
.trade-player small, .trade-amount span, .trade-balance { color:#605b68; font-size:13px; }
.trade-player strong { font-size:18px; overflow-wrap:anywhere; }
.trade-sheet form { text-align:center; }
.trade-amount { display:grid; justify-items:center; margin:clamp(14px, 4vh, 36px) 0 20px; }
.trade-amount input[type=number] { appearance:textfield; text-align:center; width:100%; padding:0 0 4px; border:0; color:inherit; background:transparent; font-size:clamp(52px, 14vw, 72px); font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.trade-amount input::-webkit-inner-spin-button, .trade-amount input::-webkit-outer-spin-button { appearance:none; margin:0; }
.trade-amount input::placeholder { color:#746e7b; opacity:1; }
.trade-amount input:focus-visible { outline:2px solid #315cf5; }
.trade-return { display:flex; align-items:center; justify-content:center; gap:7px; color:#605b68; font-size:17px; }
.trade-return output { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.payout-digits { display:inline-flex; color:#087641; font-size:24px; line-height:1.2; font-variant-numeric:tabular-nums; }
.payout-digits > span { display:block; height:1.2em; overflow:hidden; }
.payout-digits span span { display:grid; }
.trade-return .currency-icon { width:18px; height:18px; }
.trade-balance { margin:6px 0 0; }
.trade-sheet .quick-amounts { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:22px 0 20px; }
.trade-sheet .quick-amounts button { min-width:48px; height:38px; padding:2px 12px 0; border:1px solid transparent; border-radius:10px; background:#f0eff4; color:#342f40; font-size:14px; }
.trade-sheet .quick-amounts button:hover { border-color:#b8bbd1; }
.trade-sheet .confirm-pick { height:50px; border-radius:12px; background:var(--primary); font-size:16px; }
.trade-sheet .confirm-pick:hover { background:#3e32a0; }
.info-sheet h2 { margin:0 42px 18px 0; font-family:inherit; font-size:23px; line-height:1.2; }
.info-sheet h2:focus { outline:none; }
.balance-history-list { list-style:none; margin:0; padding:0; }
.balance-history-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #efedf2; overflow-wrap:anywhere; }
.balance-history-row:last-child { border-bottom:0; }
.balance-history-row small { display:block; margin-top:3px; color:#605b68; }
.balance-history-change { flex:none; color:#605b68; white-space:nowrap; font-variant-numeric:tabular-nums; }
.balance-history-change.is-gain { color:#17633e; }
.balance-history-change.is-loss { color:#a60035; }
.balance-history-change .currency-icon { width:18px; height:18px; }
.balance-history-empty { color:#605b68; }
.info-sheet ol { margin:0 0 22px; padding-left:22px; }
.info-sheet li { margin-bottom:10px; line-height:1.4; }
.sheet-secondary, .logout-trigger { min-height:44px; border:1px solid #dedbe5; border-radius:10px; background:#fff; color:#292534; font-weight:700; }
.sheet-secondary { width:100%; margin-top:8px; }
.logout-trigger { padding-inline:18px; }
@media(max-width:800px) {
    .mobile-nav { z-index:35; overflow:visible; }
    .topbar .top-actions { gap:6px; }
}
@media(max-width:360px) {
    .topbar { padding-inline:10px; gap:6px; }
    .top-actions .balance .currency-icon { width:18px; height:18px; }
}
.top-actions .telegram-link { display:inline-flex; justify-content:center; gap:5px; }
@media(min-width:801px) {
    .top-actions .telegram-link { width:auto; padding:0 10px; border-radius:9px; }
}

.scene-chips { display:grid; gap:6px; margin-bottom:12px; }
.scene-chips > div { display:flex; flex-wrap:wrap; gap:6px; }
.scene-chips a { display:inline-flex; min-height:36px; align-items:center; margin:0; padding:6px 9px 4px; border:1px solid #e4deeb; border-radius:99px; background:#fff; color:#302747; font-size:13px; }
.scene-chips a[aria-current] { background:#4f41ba; color:white; }
.scene-chip-stages a[aria-current] { gap:4px; }
.scene-chip-stages a[aria-current] span { font-size:15px; line-height:1; }
@media(max-width:360px) {
    .scene-chips .scene-chip-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
    .scene-chip-stages a { justify-content:center; padding-inline:2px; white-space:nowrap; }
}
.market-list .market-card { min-width:0; padding-bottom:8px; }
.outcome-pick { position:relative; width:100%; min-width:0; padding:5px 8px; margin:5px 0; border:1px solid #e4deeb; border-radius:10px; background-color:#fff; color:#20192c; text-align:left; }
.outcome-pick[style] { background-image:linear-gradient(to right, #dadae08c var(--outcome-share), transparent var(--outcome-share)); }
.outcome-pick:has(.outcome-trade:hover, .outcome-trade:focus-visible) { border-color:#4f41ba; background-color:#f4f0ff; }
.market-volume { margin:8px 0 4px; color:#605b68; font-size:13px; }
.market-volume .currency-icon { width:18px; height:18px; }
.outcome-trade, .avatar-preview-trigger { position:absolute; inset:0; padding:0; border:0; border-radius:inherit; background:transparent; }
.avatar-preview-trigger { z-index:1; cursor:zoom-in; }
.avatar-preview[open] { position:fixed; inset:0; display:grid; place-items:center; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:16px; border:0; background:transparent; cursor:zoom-out; }
.avatar-preview::backdrop { background:#15121cdd; backdrop-filter:none; }
.avatar-preview img { width:min(82vw,70dvh,460px); height:auto; max-height:82dvh; object-fit:contain; border-radius:16px; }
.avatar.avatar-preview-placeholder { width:min(66vw,60dvh,320px); height:auto; aspect-ratio:1; border:0; border-radius:16px; font:700 clamp(70px,28vw,160px)/1 Tungsten,sans-serif; }
.avatar { position:relative; }
.avatar:has(.avatar-photo) { background:none; }
.avatar-number { position:absolute; inset:0; display:grid; place-items:center; padding-top:.12em; color:#ffffff99; font:700 var(--avatar-number-size,46px)/1 Tungsten,sans-serif; }
.outcome-avatar { flex:none; width:54px; height:54px; border:0; border-radius:8px; box-shadow:none; }
.avatar-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.experience-badge { position:absolute; right:-23px; bottom:-10px; width:60px; height:auto; pointer-events:none; }
.nav-avatar { --avatar-number-size:19px; }
.nav-avatar .experience-badge { width:42px; right:-17px; bottom:-9px; }
@media(max-width:360px) { .nav-avatar .experience-badge { right:-12px; } }
.personal-heading { display:flex; align-items:center; gap:32px; }
.personal-heading h1 { overflow-wrap:anywhere; }
.personal-avatar { --avatar-number-size:42px; flex:none; width:60px; height:60px; }
.personal-avatar .experience-badge { width:72px; right:-28px; bottom:-12px; }
.experience-field { min-width:0; max-width:480px; margin:12px 0; padding:4px 0 0; border:0; }
.experience-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
.experience-options label { position:relative; height:58px; cursor:pointer; }
.experience-options img { display:block; width:100%; height:100%; object-fit:contain; border-radius:8px; }
.experience-options input { position:absolute; width:1px; height:1px; opacity:0; }
.experience-options input:checked + img { outline:2px solid #4f41ba; outline-offset:-2px; background:#f1edff; }
.experience-options input:focus-visible + img { box-shadow:0 0 0 2px #4f41ba; }
.profile-field { margin:12px 0; }
.profile-field h3 { margin:0 0 8px; font-family:inherit; font-size:16px; }
.edit-profile-button { min-height:44px; padding-inline:16px; background:var(--primary); color:#fff; font-weight:700; }
.camera-dialog { position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; overflow:hidden; background:#15121c; color:#fff; }
.camera-dialog video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.camera-guide { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:min(76vw,43dvh,340px); aspect-ratio:3 / 4; border:3px solid #fff; border-radius:50%; box-shadow:0 0 0 100vmax #0008; pointer-events:none; }
.camera-dialog .modal-close { z-index:1; top:max(16px,env(safe-area-inset-top)); width:44px; height:44px; padding:0; font-size:24px; }
.camera-dialog h2 { position:absolute; top:max(66px,env(safe-area-inset-top)); inset-inline:16px; margin:0; text-align:center; font-family:inherit; font-size:20px; }
@media(max-height:420px) { .camera-dialog h2 { top:max(18px,env(safe-area-inset-top)); inset-inline:65px; } }
.camera-dialog form { position:absolute; inset:auto 16px max(16px,env(safe-area-inset-bottom)); width:min(calc(100% - 32px),440px); margin:0 auto; text-align:center; }
.camera-dialog .camera-capture { height:50px; background:var(--primary); font-size:16px; }
.camera-capture:disabled { opacity:.65; }
.rank-summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-radius:10px; background:#f1edff; color:#302747; font-size:16px; }
.ranks-screen .rank-summary { margin-bottom:14px; }
.side-column .rank-summary { margin-top:12px; }
.side-column { min-width:0; grid-template-columns:minmax(0,1fr); }
.leader-list .leader-row { gap:14px; padding-block:12px; }
.leader-row .outcome-avatar { margin-inline-end:11px; }
.leader-row b, .leader-rank, .leader-points, .full-leaderboard .leader-points { font-size:16px; }
.leader-rank { width:3ch; flex:none; color:#605b68; }
.leader-points { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.market-link { display:flex; align-items:center; justify-content:center; min-height:48px; margin-top:12px; padding:8px 12px; border-radius:10px; font-size:16px; font-weight:700; }
.market-link, .cancel-prediction, .welcome-dialog .primary-cta, .login-card :is(.login-submit,.leader-link) { background:var(--primary); color:#fff; }
.market-link:hover, .cancel-prediction:hover, .welcome-dialog .primary-cta:hover, .login-card :is(.login-submit,.leader-link):hover { background:#3e32a0; }
.login-card .leader-link { min-height:44px; padding:8px 12px; border-radius:8px; font-size:14px; }
.outcome-pick.is-selected { border-color:#4b9b73; background-color:#eef8f2; }
.outcome-selected-label { flex:none; color:#17633e; font-size:11px; }
.cancel-prediction { min-height:40px; padding:8px 14px; border:0; border-radius:8px; font-size:14px; font-weight:700; }
.prediction-error { margin:8px 0 0; color:#a60059; font-size:13px; }
@media (max-width:400px) { .outcome-selected-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } }
.my-pick-card { margin-top:12px; }
.personal-match-stage { display:grid; gap:4px; margin-top:14px; padding:12px 14px; border-radius:10px; background:#f1edff; color:#302747; }
.personal-match-stage span { font-size:14px; }
.personal-match-stage strong { font-size:28px; line-height:1.2; }
.personal-match-result { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 16px; padding:12px; border-radius:10px; font-size:16px; }
.personal-match-result.is-win { background:#eef8f2; color:#17633e; }
.personal-match-result.is-loss { background:#fff0f3; color:#a60035; }
.my-pick-card .playing-now { gap:25px; }
.my-pick-card .playing-now h2 { font-size:25px; }
.my-pick-card .playing-now small, .my-pick-card .playing-now p,
.my-pick-card .live-match-banner, .my-pick-card .live-match-banner span:last-child,
.my-pick-card .pick-outcome, .my-pick-card .pick-outcome b { font-size:14px; }
.outcome-share { flex-basis:4.5ch; }
.win-toasts { position:fixed; z-index:45; right:12px; bottom:76px; width:min(350px,calc(100vw - 24px)); }
.win-toast { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; padding:8px 12px; border-radius:10px; background:#1e5038; color:white; }
.win-toast button { background:transparent; color:white; font-size:22px; padding:6px; }
@media(max-width:800px) {
    .mobile-nav { grid-template-columns:repeat(5,minmax(0,1fr)); grid-auto-rows:minmax(56px,1fr); padding-inline:0; }
    .mobile-nav .nav-icon { transform:translateY(-3px); }
    .mobile-nav a:nth-child(1) { grid-area:1 / 1; }
    .mobile-nav a:nth-child(2) { grid-area:1 / 2; }
    .mobile-nav a:nth-child(3) { grid-area:1 / 4; }
    .mobile-nav a:nth-child(4) { grid-area:1 / 5; }
    .mobile-nav .disco-number { position:absolute; z-index:1; left:50%; bottom:-7px; transform:translateX(-50%); width:80px; height:80px; display:grid; place-items:center; gap:0; margin:0; padding:4px 0 0; border-radius:50%; background:url("disco.png") center/contain no-repeat; color:#fffe; font:700 44px/1 Tungsten,sans-serif; -webkit-text-stroke:1px #5798ce; }
    .mobile-nav a span { white-space:normal; }
}

.scene-chips .stage-reset { gap:5px; }
