/* Variant 3 — a from-scratch, app-like interface: one column, dense cards, bottom tab bar.
   It intentionally ignores the original page structure and hero-driven layout. */
.ui-three {
  --app-bg: #05070f;
  --app-surface: rgba(255,255,255,.045);
  --app-surface-strong: rgba(255,255,255,.075);
  --app-line: rgba(255,255,255,.1);
  --app-radius: 20px;
  background: radial-gradient(circle at 12% -5%, rgba(137,134,255,.16), transparent 42%), radial-gradient(circle at 90% 5%, rgba(255,79,145,.12), transparent 40%), var(--app-bg);
  padding-bottom: 92px;
}
.ui-three h1, .ui-three h2, .ui-three h3 { text-transform: none; letter-spacing: -.02em; }
.ui-three .ambient, .ui-three .grain { display: none; }

.app-bar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--app-line); background: rgba(5,7,15,.86); backdrop-filter: blur(18px); }
.app-bar__inner { width: min(100% - 28px, 760px); min-height: 62px; margin-inline: auto; display: flex; align-items: center; gap: 12px; }
.app-brand { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--display-font); font-size: 1.15rem; letter-spacing: -.04em; }
.app-brand span { color: var(--lime); }
.app-me { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid rgba(215,255,73,.45); border-radius: 999px; background: rgba(215,255,73,.1); color: var(--paper); font: inherit; font-size: .82rem; font-weight: 900; cursor: pointer; }
.app-me__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

.app-main { width: min(100% - 28px, 760px); margin: 14px auto 0; display: grid; gap: 14px; }
.app-h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 5vw, 2.3rem); }
.app-title { margin: 0; font-size: 1.1rem; }
.app-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.app-link { color: var(--lime); font-size: .85rem; font-weight: 900; }
.app-note { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.app-counter { color: var(--muted); font-size: .82rem; }

.app-round { padding: 20px; border: 1px solid rgba(215,255,73,.35); border-radius: var(--app-radius); background: linear-gradient(155deg, rgba(215,255,73,.12), rgba(215,255,73,0) 55%), var(--app-surface); display: grid; gap: 14px; }
.app-round__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.app-round__live { display: inline-flex; align-items: center; gap: 7px; color: var(--lime); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.app-round__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.app-round__title { color: var(--paper); font-weight: 900; }
.app-round__clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.app-round__clock > div { padding: 10px 4px; border-radius: 14px; background: rgba(0,0,0,.3); }
.app-round__clock span { display: block; font-family: var(--display-font); font-size: 1.6rem; line-height: 1; color: #fff; }
.app-round__clock small { display: block; margin-top: 4px; color: var(--muted); font-size: .66rem; text-transform: uppercase; }
.app-round__facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.app-round__facts span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); color: var(--muted); font-size: .74rem; }
.app-round__facts b { color: #fff; font-size: 1.05rem; }

.app-mine { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 18px 20px; border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-surface); }
.app-mine__left { display: grid; gap: 4px; min-width: 0; }
.app-mine__label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.app-mine__value { font-family: var(--display-font); font-size: 2.2rem; line-height: 1; color: var(--lime); }
.app-mine__hint { color: var(--muted); font-size: .8rem; }

.app-tasks { display: grid; gap: 8px; }
.app-task { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.app-task:hover { background: var(--app-surface-strong); }
.app-task__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(215,255,73,.12); color: var(--lime); font-size: 1.1rem; }
.app-task__body { display: grid; gap: 3px; min-width: 0; }
.app-task__body small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.app-task__go { color: var(--muted); font-size: 1.2rem; }

.app-prize-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 8px; }
.app-prize { display: grid; gap: 4px; padding: 15px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.app-prize__audience { color: var(--lime); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.app-prize strong { font-size: 1.05rem; }
.app-prize__meta { color: var(--muted); font-size: .78rem; }

.app-winners, .app-list, .app-tasks, .app-prizes, .app-steps, .app-faq, .app-submit, .app-hero { display: grid; gap: 8px; }
.app-hero, .app-submit { padding: 20px; border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-surface); }
.app-submit form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 6px; }
.app-submit input { min-height: 46px; padding: 0 14px; border: 1px solid var(--app-line); border-radius: 12px; background: rgba(0,0,0,.35); color: var(--paper); font: inherit; }
.app-flash { margin-top: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(255,79,145,.12); color: #ffd0e2; font-size: .84rem; }
.app-flash--ok { background: rgba(215,255,73,.12); color: #eaffb3; }

.app-winner, .app-video, .app-leader, .app-round-card { display: grid; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.app-winner { grid-template-columns: 40px minmax(0,1fr) auto; }
.app-winner__avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(215,255,73,.14); color: var(--lime); }
.app-winner__body { display: grid; gap: 2px; min-width: 0; }
.app-winner__body small { color: var(--muted); font-size: .78rem; }
.app-winner__status { color: var(--lime); font-size: .74rem; font-weight: 900; }
.app-winner__status--pending { color: var(--muted); }

.app-video { grid-template-columns: 28px 54px minmax(0,1fr) auto; }
.app-video__index { color: var(--muted); font-size: .8rem; font-weight: 900; }
.app-video__cover { width: 54px; height: 72px; object-fit: cover; border-radius: 10px; }
.app-video__cover--empty { display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--muted); font-size: .6rem; letter-spacing: .1em; }
.app-video__body { display: grid; gap: 2px; min-width: 0; }
.app-video__body small { color: var(--muted); font-size: .76rem; }
.app-video__metrics { color: rgba(255,255,255,.55); }
.app-video__go { padding: 9px 14px; border-radius: 999px; background: var(--lime); color: #10120c; font-size: .8rem; font-weight: 900; white-space: nowrap; }

.app-leader { grid-template-columns: 34px minmax(0,1fr) auto; }
.app-leader__rank { color: var(--muted); font-family: var(--display-font); font-size: 1.05rem; }
.app-leader__body { display: grid; gap: 2px; min-width: 0; }
.app-leader__body small { color: var(--muted); font-size: .78rem; }
.app-leader__goal { color: #ffb657; }
.app-leader__chance { color: var(--lime); font-weight: 900; }

.app-round-card { grid-template-columns: minmax(0,1fr) auto; }
.app-round-card__body { display: grid; gap: 3px; min-width: 0; }
.app-round-card__body small { color: var(--muted); font-size: .78rem; }
.app-round-card__proof { color: var(--lime); font-size: .74rem; font-weight: 900; }

.app-steps article { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.app-steps span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: rgba(215,255,73,.14); color: var(--lime); font-weight: 900; }
.app-steps strong { display: block; margin-bottom: 3px; }
.app-steps p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.app-faq details { padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.app-faq summary { cursor: pointer; font-weight: 900; font-size: .95rem; }
.app-faq details[open] summary { color: var(--lime); }
.app-faq p { margin: 9px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.55; }

.app-empty { padding: 34px 22px; border: 1px solid var(--app-line); border-radius: var(--app-radius); background: var(--app-surface); display: grid; gap: 10px; justify-items: start; }
.app-empty-card { padding: 22px; border: 1px dashed var(--app-line); border-radius: 16px; color: var(--muted); font-size: .88rem; text-align: center; }

.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 8px max(12px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--app-line); background: rgba(5,7,15,.94); backdrop-filter: blur(18px); }
.app-tab { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.app-tab i { font-size: 1.05rem; font-style: normal; }
.app-tab--active { color: #10120c; background: var(--lime); box-shadow: 0 0 20px rgba(215,255,73,.3); }
.app-tab--active i { color: #10120c; }

.ui-three .round-hero, .ui-three .shell { width: 100%; }
.ui-three .section-block { padding-block: 8px; }
.ui-three .lottery-board { grid-template-columns: minmax(0,1fr); }
/* The shared round page uses poster-sized headings; the app shell needs compact ones. */
.ui-three .round-hero { padding-block: 6px 14px; gap: 16px; }
.ui-three .round-hero h1 { font-size: clamp(1.5rem, 4.4vw, 2.1rem); line-height: 1.05; margin-bottom: 10px; }
.ui-three .round-hero__seal { width: 118px; height: 118px; }
.ui-three .participant-lookup h2, .ui-three .section-heading h2 { font-size: clamp(1.2rem, 3.4vw, 1.7rem); }
.ui-three .participant-lookup { padding: 18px; border-radius: var(--app-radius); }
.ui-three .winner-grid { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.ui-three h1 { letter-spacing: -.02em; }

/* On a narrow phone the top row cannot hold the name, the version switcher and the
   personal button at once — the button used to be pushed off the right edge. It now
   drops onto its own line instead of disappearing. */
@media (max-width: 560px) {
  .app-bar__inner { flex-wrap: wrap; gap: 8px 12px; padding-block: 8px; }
  .app-bar__inner > * { min-width: 0; }
  .app-me { margin-left: auto; }
}

@media (min-width: 900px) {
  .ui-three { padding-bottom: 24px; }
  .app-main { width: min(100% - 40px, 900px); grid-template-columns: minmax(0,1fr); }
  .app-tabs { position: sticky; top: 70px; left: auto; right: auto; bottom: auto; width: min(100% - 40px, 900px); margin: 16px auto 0; grid-template-columns: repeat(5, auto); justify-content: start; gap: 6px; padding: 6px; border: 1px solid var(--app-line); border-radius: 999px; background: rgba(9,12,24,.92); }
  .app-tab { grid-auto-flow: column; align-items: center; gap: 7px; padding: 8px 14px; font-size: .82rem; }
}

/* The task bar highlight slides between tabs; the tab keeps only its dark text. */
.app-tabs .nav-pill { border-radius: 12px; box-shadow: 0 0 20px rgba(215, 255, 73, .3); }
.app-tabs.has-nav-pill .app-tab--active { background: transparent; box-shadow: none; }
@media (min-width: 900px) {
  .app-tabs .nav-pill { border-radius: 999px; }
}
