:root {
  --blue: #2322a8;
  --blue-deep: #17166f;
  --pink: #ed1e7a;
  --lime: #d8f40b;
  --ink: #11111a;
  --paper: #f7f7f2;
  --white: #fff;
  --muted: #60606e;
  --line: #dcdce4;
  --shadow: 0 28px 80px rgb(23 22 111 / 22%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overscroll-behavior: none; }
body { min-height: 100svh; background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-shell { min-height: 100svh; }
.entry-screen {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(340px, .92fr) minmax(520px, 1.08fr);
  background:
    radial-gradient(circle at 17% 16%, rgb(216 244 11 / 42%) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 12%, rgb(237 30 122 / 22%) 0 4px, transparent 5px),
    var(--paper);
  overflow: hidden;
}

.entry-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(35 34 168 / 8%), rgb(23 22 111 / 72%)),
    url('/hrdot-congress-background-v1.jpg') center / cover;
  isolation: isolate;
}
.entry-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 54%, var(--paper));
  z-index: -1;
}
.orbit { position: absolute; border: 2px solid rgb(255 255 255 / 40%); border-radius: 50%; filter: drop-shadow(0 0 20px rgb(216 244 11 / 26%)); }
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; }
.orbit::before { width: 24px; height: 24px; right: 13%; top: 1%; background: var(--lime); box-shadow: 0 0 25px var(--lime); }
.orbit::after { width: 15px; height: 15px; left: 4%; bottom: 24%; background: var(--pink); box-shadow: 0 0 18px var(--pink); }
.orbit-one { width: 68vw; aspect-ratio: 1; left: -32vw; top: -12vw; }
.orbit-two { width: 42vw; aspect-ratio: 1; left: -14vw; bottom: -17vw; border-color: rgb(216 244 11 / 35%); }

.hero-chair-wrap { position: absolute; left: 48%; top: 46%; width: min(43vw, 520px); aspect-ratio: 3 / 2; transform: translate(-50%, -50%) rotate(-3deg); animation: hero-flight 2.6s ease-in-out infinite; filter: drop-shadow(0 28px 35px rgb(0 0 0 / 34%)); }
.hero-chair { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-rear-flame, .hero-lift-flame { position: absolute; z-index: 1; pointer-events: none; transform-origin: center; }
.hero-rear-flame { left: 4%; width: 27%; height: 7%; border-radius: 100% 16% 16% 100%; background: linear-gradient(90deg, transparent, var(--pink) 42%, #fff 78%, var(--lime)); box-shadow: 0 0 22px var(--pink); animation: rear-burn .18s ease-in-out infinite alternate; }
.hero-rear-flame.flame-one { top: 43%; }
.hero-rear-flame.flame-two { top: 59%; animation-delay: -.09s; }
.hero-lift-flame { top: 74%; width: 5%; height: 28%; border-radius: 18% 18% 100% 100%; background: linear-gradient(180deg, #fff, var(--lime) 28%, var(--pink) 72%, transparent); box-shadow: 0 0 18px var(--pink); transform-origin: top; animation: lift-burn .25s ease-in-out infinite alternate; }
.hero-lift-flame.lift-one { left: 35%; }
.hero-lift-flame.lift-two { left: 48%; animation-delay: -.12s; }
@keyframes hero-flight { 0%, 100% { transform: translate(-50%, -51%) rotate(-3deg); } 50% { transform: translate(-50%, -47%) rotate(-1deg); } }
@keyframes rear-burn { from { transform: scaleX(.8); opacity: .72; } to { transform: scaleX(1.08); opacity: 1; } }
@keyframes lift-burn { from { transform: scaleY(.66); opacity: .62; } to { transform: scaleY(1); opacity: 1; } }

.entry-card { position: relative; z-index: 2; width: min(690px, 100%); align-self: center; padding: clamp(32px, 5vw, 70px) clamp(28px, 6vw, 90px) clamp(26px, 4vw, 56px) clamp(18px, 3vw, 44px); }
.entry-logo { width: 116px; height: 116px; display: block; margin-bottom: 20px; }
.eyebrow, .overlay-kicker { margin: 0 0 12px; color: var(--pink); font-size: 12px; font-weight: 900; letter-spacing: .17em; }
.entry-card h1 { margin: 0; color: var(--blue); font-size: clamp(40px, 5.7vw, 78px); line-height: .94; letter-spacing: -.055em; }
.entry-card h1 em { color: var(--ink); font-style: normal; font-weight: 500; }
.lead { max-width: 630px; margin: 22px 0 25px; color: #3c3c49; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.55; }

.registration-form { display: grid; gap: 12px; max-width: 640px; }
.registration-form label { display: grid; gap: 6px; }
.registration-form label > span { color: #30303c; font-size: 12px; font-weight: 800; }
.registration-form label b { margin-left: 5px; color: var(--pink); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.registration-form input:not([type="checkbox"]) { width: 100%; min-height: 50px; padding: 0 16px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 13px; outline: none; box-shadow: 0 9px 24px rgb(23 22 111 / 5%); transition: border-color .2s, box-shadow .2s; }
.registration-form input:not([type="checkbox"]):focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgb(35 34 168 / 11%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.consent-row { grid-template-columns: 20px 1fr !important; align-items: start; gap: 10px !important; }
.consent-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.consent-row span { font-size: 11px !important; line-height: 1.45; font-weight: 500 !important; }
.consent-row a, .entry-footer a { color: var(--blue); font-weight: 800; }
.form-note { margin: -2px 0 0 30px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-error, .verification-message { margin: 0; padding: 10px 13px; border-radius: 10px; font-size: 11px; line-height: 1.4; }
.form-error { color: #8f154c; background: #ffe8f2; }
.verification-message { color: var(--blue-deep); background: rgb(216 244 11 / 32%); border: 1px solid rgb(145 164 0 / 30%); }

.primary-button { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 21px; color: var(--blue-deep); background: var(--lime); border: 0; border-radius: 999px; font-weight: 900; box-shadow: 0 17px 38px rgb(99 113 0 / 18%); transition: transform .18s, box-shadow .18s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 21px 42px rgb(99 113 0 / 24%); }
.primary-button:disabled { opacity: .58; cursor: wait; transform: none; }
.primary-button i { width: 40px; height: 40px; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 50%; font-size: 20px; font-style: normal; }
.primary-button.compact { min-width: 210px; }
.entry-footer { display: flex; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 11px; }

.game-screen { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--blue-deep); color: var(--white); }
.game-header { min-height: 72px; display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 18px; padding: 9px max(14px, env(safe-area-inset-right)) 9px max(14px, env(safe-area-inset-left)); background: var(--white); color: var(--ink); border-bottom: 1px solid rgb(35 34 168 / 14%); }
.game-brand img { width: 58px; height: 58px; display: block; }
.player-line { font-size: 13px; }
.player-line strong { color: var(--blue); }
.status-pill { display: inline-flex; align-items: center; margin-left: 12px; padding: 6px 10px; color: var(--blue-deep); background: var(--lime); border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.header-actions { display: flex; gap: 8px; }
.header-actions button { min-height: 42px; padding: 0 15px; color: var(--white); background: var(--blue); border: 0; border-radius: 999px; font-size: 11px; font-weight: 800; }

.game-stage { position: relative; align-self: center; width: 100%; max-height: calc(100svh - 112px); aspect-ratio: 16 / 9; overflow: hidden; background: #0f0f52; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); touch-action: none; user-select: none; }
#game-canvas { width: 100%; height: 100%; display: block; background: url('/hrdot-congress-background-v1.jpg') center / cover; }
.hud { position: absolute; z-index: 4; left: max(15px, env(safe-area-inset-left)); top: 14px; display: grid; grid-template-columns: repeat(4, minmax(76px, 104px)); gap: 7px; pointer-events: none; }
.hud div { min-height: 62px; padding: 11px 14px; border-radius: 17px; background: rgb(23 22 111 / 82%); border: 1px solid rgb(255 255 255 / 18%); backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgb(0 0 0 / 22%); }
.hud small { display: block; color: rgb(255 255 255 / 67%); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.hud strong { display: block; margin-top: 3px; font-size: 22px; line-height: 1; }
.tempo-indicator { position: absolute; z-index: 4; left: max(15px, env(safe-area-inset-left)); top: 86px; display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 11px; color: var(--white); background: rgb(23 22 111 / 70%); border: 1px solid rgb(255 255 255 / 15%); border-radius: 999px; backdrop-filter: blur(12px); pointer-events: none; }
.tempo-indicator span { width: 7px; height: 7px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 12px var(--lime); }
.tempo-indicator small { color: rgb(255 255 255 / 61%); font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.tempo-indicator strong { color: var(--lime); font-size: 9px; letter-spacing: .08em; }
.power-status { position: absolute; z-index: 4; top: 14px; right: max(15px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 7px; padding: 9px 13px 9px 9px; color: var(--blue-deep); background: var(--lime); border-radius: 999px; box-shadow: 0 10px 30px rgb(216 244 11 / 26%); font-size: 9px; }
.power-status span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 50%; }
.power-status i { font-style: normal; opacity: .7; }

.flight-control { position: absolute; z-index: 5; left: max(24px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: 128px; height: 128px; display: grid; place-content: center; color: var(--white); background: rgb(23 22 111 / 84%); border: 2px solid rgb(255 255 255 / 28%); border-radius: 50%; box-shadow: 0 22px 54px rgb(0 0 0 / 30%), inset 0 0 28px rgb(92 91 232 / 34%); backdrop-filter: blur(12px); touch-action: manipulation; }
.flight-control::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgb(216 244 11 / 38%); border-radius: 50%; }
.flight-control span { color: var(--lime); font-size: 32px; line-height: .7; }
.flight-control strong { font-size: 14px; letter-spacing: .12em; }
.flight-control small { margin-top: 3px; color: rgb(255 255 255 / 55%); font-size: 8px; letter-spacing: .16em; }
.flight-control:active { transform: scale(.94); }

.stage-overlay { position: absolute; z-index: 8; inset: 0; display: grid; place-items: center; padding: 30px; background: linear-gradient(90deg, rgb(23 22 111 / 88%), rgb(23 22 111 / 48%) 58%, rgb(23 22 111 / 25%)); backdrop-filter: blur(3px); }
.overlay-card { width: min(600px, 78vw); margin-right: 18%; padding: clamp(24px, 4vw, 45px); color: var(--ink); background: rgb(247 247 242 / 94%); border-radius: 30px; box-shadow: var(--shadow); }
.overlay-card h2 { margin: 0; color: var(--blue); font-size: clamp(31px, 4vw, 58px); line-height: .95; letter-spacing: -.045em; }
.overlay-card h2 em { color: var(--ink); font-style: normal; font-weight: 500; }
.overlay-card > p { margin: 18px 0; color: #42424e; font-size: 13px; line-height: 1.55; }
.power-guide { display: grid; gap: 6px; margin: 15px 0 20px; color: #383845; font-size: 11px; }
.power-guide span { display: flex; align-items: center; gap: 8px; }
.power-guide i { width: 25px; height: 25px; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 50%; font-style: normal; }
.result-card { margin: 0; text-align: center; }
.result-card h2 { font-size: clamp(42px, 7vw, 86px); }
.result-actions { display: flex; justify-content: center; gap: 10px; }
.secondary-button { min-height: 54px; padding: 0 22px; color: var(--blue); background: var(--white); border: 1px solid rgb(35 34 168 / 22%); border-radius: 999px; font-weight: 900; }

.game-footer { min-height: 40px; display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 0 18px; color: rgb(255 255 255 / 66%); font-size: 10px; }
.game-footer button, .game-footer a { color: var(--white); background: none; border: 0; text-decoration: none; font-size: 10px; font-weight: 800; }
.rotate-notice { display: none; }

.leaderboard-dialog { width: min(520px, calc(100% - 30px)); max-height: 84svh; padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 28px; box-shadow: 0 38px 100px rgb(0 0 0 / 36%); }
.leaderboard-dialog::backdrop { background: rgb(10 9 61 / 72%); backdrop-filter: blur(8px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 25px 26px 16px; }
.dialog-head h2 { margin: 0; color: var(--blue); font-size: 38px; letter-spacing: -.04em; }
.dialog-head button { width: 42px; height: 42px; color: var(--white); background: var(--blue); border: 0; border-radius: 50%; font-size: 25px; }
#leaderboard-list { margin: 0; padding: 0 22px 24px; list-style: none; counter-reset: rank; }
#leaderboard-list li { counter-increment: rank; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
#leaderboard-list li::before { content: counter(rank); width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); background: rgb(35 34 168 / 8%); border-radius: 50%; font-size: 11px; font-weight: 900; }
#leaderboard-list li.is-current { background: rgb(216 244 11 / 25%); border-radius: 12px; }
#leaderboard-list strong { font-size: 13px; }
#leaderboard-list span { color: var(--blue); font-weight: 900; }
#leaderboard-empty { padding: 0 26px 26px; color: var(--muted); }

@media (max-width: 900px) {
  .entry-screen { grid-template-columns: 1fr; }
  .entry-visual { position: absolute; inset: 0; opacity: .19; }
  .entry-visual::after { background: linear-gradient(180deg, transparent, var(--paper) 68%); }
  .entry-card { justify-self: center; padding-left: 22px; padding-right: 22px; }
  .entry-logo { width: 82px; height: 82px; margin-bottom: 12px; }
  .entry-card h1 { font-size: clamp(40px, 10vw, 66px); }
}

@media (max-width: 620px) {
  .entry-card { align-self: start; padding-top: max(22px, env(safe-area-inset-top)); }
  .contact-grid { grid-template-columns: 1fr; }
  .entry-footer { flex-direction: column; gap: 5px; }
  .game-header { min-height: 56px; grid-template-columns: 60px 1fr auto; padding-block: 5px; }
  .game-brand img { width: 44px; height: 44px; }
  .player-line { font-size: 10px; }
  .status-pill { display: none; }
  .header-actions button { min-height: 38px; width: 42px; padding: 0; font-size: 0; }
  .header-actions button::first-letter { font-size: 16px; }
  .game-footer { display: none; }
  .game-stage { max-height: calc(100svh - 56px); }
  .hud { top: 8px; left: 8px; grid-template-columns: repeat(4, minmax(58px, 76px)); gap: 4px; }
  .hud div { min-height: 48px; padding: 8px 9px; border-radius: 12px; }
  .hud small { font-size: 6px; }
  .hud strong { font-size: 17px; }
  .tempo-indicator { top: 60px; left: 8px; min-height: 23px; padding: 3px 8px; gap: 5px; }
  .flight-control { width: 96px; height: 96px; left: 14px; bottom: 13px; }
  .flight-control span { font-size: 25px; }
  .flight-control strong { font-size: 11px; }
  .power-status { top: 8px; right: 8px; }
  .overlay-card { width: min(560px, 88vw); margin-right: 8%; padding: 22px; border-radius: 22px; }
  .overlay-card h2 { font-size: clamp(29px, 5vw, 44px); }
  .overlay-card > p { margin: 12px 0; font-size: 10px; }
  .power-guide { gap: 4px; margin: 10px 0 14px; font-size: 8px; }
  .power-guide i { width: 20px; height: 20px; }
  .primary-button.compact, .secondary-button { min-height: 46px; }
}

@media (orientation: portrait) and (max-width: 900px) {
  .game-stage > :not(.rotate-notice) { visibility: hidden; }
  .game-stage .rotate-notice { visibility: visible; }
  .rotate-notice { position: absolute; z-index: 20; inset: 0; display: grid; place-content: center; gap: 8px; padding: 30px; text-align: center; color: var(--white); background: var(--blue-deep); }
  .rotate-notice span { color: var(--lime); font-size: 54px; }
  .rotate-notice strong { font-size: 22px; }
  .rotate-notice small { color: rgb(255 255 255 / 65%); }
}

@media (orientation: landscape) and (max-height: 500px) {
  .entry-screen { min-height: 100svh; grid-template-columns: 250px 1fr; }
  .entry-visual { position: relative; inset: auto; min-height: 100svh; opacity: 1; }
  .entry-visual::after { background: linear-gradient(90deg, transparent 52%, var(--paper)); }
  .orbit-one { width: 620px; left: -390px; top: -170px; }
  .orbit-two { width: 380px; left: -220px; bottom: -190px; }
  .hero-chair-wrap { left: 50%; top: 49%; width: 230px; }
  .entry-card { align-self: stretch; width: 100%; padding: 8px 18px 9px 4px; display: flex; flex-direction: column; justify-content: center; }
  .entry-logo { width: 46px; height: 46px; margin-bottom: 4px; }
  .entry-card .eyebrow { margin-bottom: 4px; font-size: 7px; }
  .entry-card h1 { font-size: 29px; line-height: .92; }
  .entry-card .lead, .entry-footer, .form-note { display: none; }
  .registration-form { gap: 4px; margin-top: 8px; }
  .registration-form label { gap: 2px; }
  .registration-form label > span { font-size: 8px; }
  .registration-form label b { font-size: 6px; }
  .registration-form input:not([type="checkbox"]) { min-height: 36px; padding-inline: 11px; border-radius: 9px; font-size: 11px; }
  .contact-grid { gap: 6px; }
  .consent-row { grid-template-columns: 16px 1fr !important; gap: 6px !important; }
  .consent-row input { width: 16px; height: 16px; }
  .consent-row span { font-size: 7.5px !important; line-height: 1.3; }
  .registration-form > .primary-button { min-height: 39px; margin-top: 2px; font-size: 11px; }
  .registration-form > .primary-button i { width: 29px; height: 29px; font-size: 15px; }
  .form-error, .verification-message { padding: 5px 8px; font-size: 8px; }
  .game-screen { grid-template-rows: 56px 1fr; }
  .game-header { min-height: 56px; grid-template-columns: 58px 1fr auto; padding-block: 5px; }
  .game-brand img { width: 45px; height: 45px; }
  .player-line { font-size: 10px; }
  .header-actions button { min-height: 38px; padding-inline: 12px; font-size: 9px; }
  .game-stage { height: calc(100svh - 56px); max-height: none; aspect-ratio: auto; }
  .game-footer { display: none; }
  .hud { top: 8px; left: max(8px, env(safe-area-inset-left)); grid-template-columns: repeat(4, 70px); gap: 4px; }
  .hud div { min-height: 48px; padding: 8px 9px; border-radius: 12px; }
  .hud small { font-size: 6px; }
  .hud strong { font-size: 17px; }
  .tempo-indicator { top: 60px; left: max(8px, env(safe-area-inset-left)); min-height: 23px; padding: 3px 8px; gap: 5px; }
  .flight-control { width: 92px; height: 92px; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .flight-control span { font-size: 23px; }
  .flight-control strong { font-size: 10px; }
  .stage-overlay { padding: 12px; }
  .overlay-card { width: min(560px, 78vw); margin: 0; padding: 15px 20px; border-radius: 20px; }
  .overlay-kicker { margin-bottom: 6px; font-size: 8px; }
  .overlay-card h2 { font-size: 32px; }
  .overlay-card > p { margin: 8px 0 11px; font-size: 9px; line-height: 1.4; }
  .power-guide { display: none; }
  .primary-button.compact, .secondary-button { min-height: 42px; }
  .primary-button.compact { min-width: 180px; }
  .primary-button i { width: 32px; height: 32px; }
  .result-actions { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
