/* vietnamese */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/auth/bricolage-grotesque-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/auth/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/auth/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/auth/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/auth/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Auth-only layout; product colors and brand assets remain owned by the app. */
body:has(.auth-split) {
    --auth-font-body: 'DM Sans', -apple-system, system-ui, sans-serif;
    --auth-font-heading: 'Bricolage Grotesque', 'DM Sans', sans-serif;
    background: #fff;
    font-family: var(--auth-font-body);
}
.auth-split :is(input, button, select, textarea) { font-family: var(--auth-font-body); }
.auth-split :is(.card-title, .mad-panel h2, .mad-speaker strong, .mad-countdown strong) {
    font-family: var(--auth-font-heading);
    font-weight: 800;
}
.mad-countdown strong { font-variant-numeric: tabular-nums; }
body:has(.auth-split) main.container { max-width: none; padding: 20px 16px 24px !important; }
body:has(.auth-split) .navbar > .container { max-width: none; padding-inline: 40px 16px; }
body:has(.auth-split) .navbar .navbar-nav { align-items: center; gap: 12px; }
body:has(.auth-split) .navbar .auth-login-link,
body:has(.auth-split) .navbar .btn-auth { border-radius: 999px; padding: 10px 24px; font-size: 14px; font-weight: 600; line-height: 20px; }
body:has(.auth-split) .navbar .auth-login-link { background: #fff; border: 1px solid var(--border-color); box-shadow: 0 1px 3px #10182812; }
body:has(.auth-split) .navbar .btn-auth { box-shadow: 0 6px 16px #1112; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 16px; padding: 0; min-height: calc(100vh - 104px); }
.auth-split .auth-container { max-width: none; display: flex; align-items: center; justify-content: center; padding: 20px 32px; }
.auth-split .card { width: min(100%, 400px); padding: 0 20px; border-radius: 0; box-shadow: none; }
.auth-split .card-header { padding-bottom: 24px; }
.auth-split .card-header > img { display: none; }
.auth-split .card-title { font-size: 32px; margin-bottom: 8px; }
.auth-split .card-body { display: flex; flex-direction: column; }
.auth-split .card-body > .oauth-buttons { order: -2; display: grid; gap: 10px; }
.auth-split .card-body > .separator { order: -1; margin: 16px 0; }
.auth-split .btn-oauth { border-radius: 999px; min-height: 44px; padding: 10px 16px; }
.auth-split .auth-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.mad-panel { position: relative; overflow: hidden; isolation: isolate; min-height: 636px; border-radius: 32px; background: #3500e9 url('../images/mad/stage.jpg') center / cover; container-type: inline-size; }
.mad-panel .mad-copy { position: relative; z-index: 2; width: 55%; padding: 34px 0 32px 40px; }
.mad-logo { object-fit: contain; object-position: left; margin-bottom: 22px; width: 94px; height: 52px; }
body[data-bs-theme="light"] .mad-panel h2 { font-size: clamp(36px, 4vw, 60px); font-size: clamp(32px, 8cqw, 68px); font-weight: 800; line-height: 1.06; letter-spacing: -1.5px; color: #fff; margin: 0 0 20px; }
body[data-bs-theme="light"] .mad-panel h2 em { font-style: normal; color: #ffdb00; white-space: nowrap; }
body[data-bs-theme="light"] .mad-description { color: #ccc5ff; font-size: clamp(14px, 2.3cqw, 18px); line-height: 1.5; margin: 0 0 36px; }
body[data-bs-theme="light"] .mad-event-date { display: inline-block; color: #fff; background: #ffffff14; border: 1px solid #ffffff40; border-radius: 999px; padding: 10px 18px; font-size: clamp(13px, 2.4cqw, 19px); font-weight: 600; white-space: nowrap; margin: 0 0 34px; }
.mad-countdown { display: flex; gap: 6px; margin: 0 0 16px; }
.mad-countdown[hidden] { display: none; }
.mad-countdown > div { background: #0c081d; border: 1px solid #544870; border-radius: 16px; width: 60px; padding: 6px 3px; text-align: center; }
body[data-bs-theme="light"] .mad-countdown strong { display: block; color: white; font-size: 30px; font-weight: 800; line-height: 1.15; }
body[data-bs-theme="light"] .mad-countdown span { color: #c9c2e8; font-size: 12px; }
.mad-panel .mad-book { border: 0; background: #ff765f; color: white !important; border-radius: 999px; padding: 14px 24px; font-size: 15px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; }
.mad-panel .mad-book:hover { background: #ff6554; box-shadow: 0 6px 20px #18005033; }
.mad-panel a:focus-visible { outline: 3px solid #ffdf00; outline-offset: 3px; }
body[data-bs-theme="light"] .mad-status { font-size: 12px; color: #ddd6ff; margin: 12px 0 0; }
.mad-speakers { position: absolute; left: 58%; top: -32px; width: 42%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; transform: rotate(8deg); transform-origin: center top; }
.mad-speaker-column { display: flex; flex-direction: column; gap: 18px; }
.mad-speaker-column:nth-child(2) { margin-top: -48px; }
.mad-speaker { display: block; position: relative; overflow: hidden; aspect-ratio: .62; border-radius: 18px; background: #25232b; text-decoration: none; }
.mad-speaker img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .2s; }
.mad-speaker:hover img { filter: grayscale(0); }
.mad-speaker .mad-speaker-caption { position: absolute; bottom: 10px; left: 6px; right: 6px; padding: 10px; background: #160067; border: 1px solid #ffffff26; border-radius: 12px; }
body[data-bs-theme="light"] .mad-speaker strong { display: block; color: white; font-size: clamp(11px, 2cqw, 17px); line-height: 1.15; font-weight: 800; }
body[data-bs-theme="light"] .mad-speaker small { display: block; color: #fff; font-size: clamp(9px, 1.2cqw, 11px); line-height: 1.3; margin-top: 6px; }
body[data-bs-theme="light"] .mad-speaker-badge { position: absolute; top: 9px; left: 9px; border-radius: 999px; background: #ffdc00; color: #080714; font-size: 7px; padding: 4px 8px; font-weight: 800; }
@media (min-width: 1700px) { .mad-panel { min-height: 760px; } .mad-panel .mad-copy { padding-top: 44px; } .mad-logo { margin-bottom: 34px; } }
.mad-crew { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.mad-mascot { position: absolute; height: auto; object-fit: contain; }
.mad-mascot-byte { top: 5.5%; left: 47%; width: 10%; transform: rotate(-8deg); }
.mad-mascot-yellow { top: 59%; left: 45%; width: 10%; }
.mad-mascot-selfie { top: 51%; left: 73%; width: 9%; transform: rotate(-12deg); }
.mad-mascot-prompt { bottom: 6%; right: 1%; width: 9%; }
.mad-mascot-blue { top: 14%; left: 80%; width: 6%; }

/* Keep all registration actions in view at the reference desktop height. */
.auth-split .form-label { font-size: 12px; line-height: 18px; margin-bottom: 6px; }
.auth-split .form-control { min-height: 42px; padding: 10px 14px; font-size: 14px; line-height: 20px; }
.auth-split form > .mb-4 { margin-bottom: 16px !important; }
.auth-split .btn-submit { margin-top: 8px; padding: 12px; font-size: 14px; line-height: 20px; }
.auth-split .password-field-container .form-control { padding-right: 44px; }
.auth-split .btn-oauth { position: relative; }
.auth-split .btn-oauth > img, .auth-split .btn-oauth > svg { position: absolute; left: 16px; }
.auth-split .card:hover { box-shadow: none; }
/* Tilt cards independently so long API lineups cannot drift into the copy. */
.mad-speakers { left: 60%; width: 40%; transform: none; gap: 20px; }
.mad-speaker { transform: rotate(8deg); }
/* Auth pages end at the split panel, matching the reference composition. */
body:has(.auth-split) > footer { display: none; }

/* Use the banner's actual width, so laptop layouts never squeeze cards. */
@container (max-width: 620px) {
    .mad-panel .mad-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; width: 100%; padding: 28px 28px 0; }
    .mad-logo { grid-column: 1 / -1; }
    .mad-panel h2 { grid-column: 1; grid-row: 2; }
    .mad-description { grid-column: 2; grid-row: 2; }
    .mad-event-date { grid-column: 1 / -1; justify-self: start; }
    .mad-countdown { align-self: center; }
    .mad-panel .mad-book { align-self: center; justify-content: center; text-align: center; margin-bottom: 16px; }
    .mad-status { grid-column: 1 / -1; }
    .mad-logo { width: 88px; height: 48px; margin-bottom: 20px; }
    body[data-bs-theme="light"] .mad-panel h2 { font-size: 34px; line-height: 1.06; margin-bottom: 18px; letter-spacing: -1px; }
    body[data-bs-theme="light"] .mad-description { font-size: 14px; line-height: 1.5; margin-bottom: 20px; max-width: 380px; }
    body[data-bs-theme="light"] .mad-event-date { font-size: 14px; padding: 9px 14px; margin-bottom: 20px; white-space: normal; }
    .mad-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 280px; gap: 8px; margin-bottom: 16px; }
    .mad-countdown[hidden] { display: none; }
    .mad-countdown > div { width: auto; padding: 8px 4px; border-radius: 12px; }
    body[data-bs-theme="light"] .mad-countdown strong { font-size: 26px; }
    .mad-panel .mad-book { padding: 13px 18px; font-size: 14px; white-space: normal; }
    .mad-speakers { position: relative; inset: auto; width: 100%; display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 154px; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 28px; padding: 24px 28px 28px; transform: none; }
    .mad-speaker-column, .mad-speaker-column:nth-child(2) { display: contents; margin: 0; }
    .mad-speaker { transform: none; aspect-ratio: .72; border-radius: 16px; scroll-snap-align: start; }
    .mad-speaker .mad-speaker-caption { padding: 9px; left: 6px; right: 6px; bottom: 8px; }
    body[data-bs-theme="light"] .mad-speaker strong { font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
    body[data-bs-theme="light"] .mad-speaker small { font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
    body[data-bs-theme="light"] .mad-speaker-badge { font-size: 8px; }
    .mad-crew { bottom: auto; height: 100px; }
    .mad-mascot { display: none; }
    .mad-mascot-byte { display: block; top: 26px; left: auto; right: 26px; width: 56px; }
}
@media (width > 900px) and (max-width: 1250px) {
    .mad-panel { min-height: 0; }
    .auth-split { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

/* Mobile uses normal document flow: auth first, then a readable event card. */
@media (max-width: 900px) {
    body:has(.auth-split) main.container { padding: 16px 16px 24px !important; }
    body:has(.auth-split) .navbar > .container { padding-inline: 16px; }
    .auth-split { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "event"; gap: 24px; min-height: 0; }
    .auth-split .auth-container { grid-area: form; min-width: 0; padding: 20px 0 8px; }
    .auth-split .card { width: min(100%, 440px); min-width: 0; padding: 0; }
    .auth-split .card-title { font-size: 28px; }
    .auth-split .form-control { font-size: 16px; }
    .auth-split .btn-oauth { font-size: 14px; padding-inline: 44px; text-align: center; }
    .auth-split .auth-footer { font-size: 13px; }
    .mad-panel { grid-area: event; min-width: 0; min-height: 0; width: 100%; max-width: 760px; margin-inline: auto; border-radius: 24px; }
    .mad-panel .mad-copy { display: block; width: 100%; padding: 28px 24px 0; }
    .mad-logo { margin-bottom: 24px; }
    body[data-bs-theme="light"] .mad-panel h2 { font-size: clamp(34px, 7vw, 52px); letter-spacing: -1px; margin-bottom: 18px; }
    body[data-bs-theme="light"] .mad-description { font-size: 15px; line-height: 1.55; margin-bottom: 20px; max-width: 40rem; }
    body[data-bs-theme="light"] .mad-event-date { font-size: 14px; white-space: normal; padding: 10px 14px; margin-bottom: 20px; }
    .mad-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 320px; margin-bottom: 16px; }
    .mad-countdown[hidden] { display: none; }
    .mad-countdown > div { width: auto; min-width: 0; border-radius: 12px; padding: 8px 4px; }
    body[data-bs-theme="light"] .mad-countdown strong { font-size: 28px; }
    .mad-panel .mad-book { margin-bottom: 0; display: flex; justify-content: center; width: 100%; max-width: 360px; white-space: normal; text-align: center; padding: 14px 16px; font-size: 14px; }
    .mad-speakers { position: relative; inset: auto; width: 100%; display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(148px, 40vw, 190px); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; padding: 24px; transform: none; }
    .mad-speaker-column, .mad-speaker-column:nth-child(2) { display: contents; margin: 0; }
    .mad-speaker { transform: none; aspect-ratio: 0.68; border-radius: 16px; scroll-snap-align: start; }
    .mad-speaker .mad-speaker-caption { padding: 10px; }
    body[data-bs-theme="light"] .mad-speaker strong { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
    body[data-bs-theme="light"] .mad-speaker small { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
    body[data-bs-theme="light"] .mad-speaker-badge { font-size: 8px; }
    .mad-crew { bottom: auto; height: 100px; }
    .mad-mascot { display: none; }
    .mad-mascot-byte { display: block; top: 24px; left: auto; right: 24px; width: 56px; }
}
@media (max-width: 360px) {
    body:has(.auth-split) main.container { padding-inline: 12px !important; }
    .mad-panel .mad-copy { padding-inline: 20px; }
    .mad-panel .mad-book { font-size: 13px; }
    .auth-split .btn-oauth { font-size: 13px; }
}
/* Give the desktop composition breathing room without crowding phones. */
@media (width > 900px) {
    body:has(.auth-split) main.container { padding: 32px !important; }
    .auth-split { gap: 32px; min-height: calc(100vh - 124px); }
    .auth-split .auth-container { padding: 32px; }
    .auth-split .card-header { padding-bottom: 32px; }
    .auth-split .card-body > .oauth-buttons { gap: 14px; }
    .auth-split .card-body > .separator { margin-block: 22px; }
    .auth-split form > .mb-4 { margin-bottom: 20px !important; }
    .auth-split .auth-footer { margin-top: 22px; padding-top: 20px; }

}

/* Figma 402:537: copyright belongs to the form column, not the page footer. */
.auth-split .auth-container { position: relative; padding-bottom: 64px; }
body[data-bs-theme="light"] .auth-split .auth-copyright {
    position: absolute;
    bottom: 0;
    left: 32px;
    margin: 0;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}
@media (max-width: 900px) {
    .auth-split .auth-container { flex-direction: column; padding-bottom: 8px; }
    body[data-bs-theme="light"] .auth-split .auth-copyright {
        position: static;
        align-self: flex-start;
        margin-top: 28px;
    }
}

@container (width > 620px) {
    .mad-panel .mad-copy { padding-top: 40px; padding-bottom: 40px; }
}
/* Give desktop portraits more room while keeping a clear gap beside copy. */
@media (width > 900px) {
    @container (width > 620px) {
        .mad-panel .mad-copy { width: 49%; padding-left: 32px; }
        body[data-bs-theme="light"] .mad-panel h2 {
            font-size: clamp(36px, 7cqw, 60px);
        }
        .mad-speakers { left: 54%; width: 46%; gap: 16px; }
        body[data-bs-theme="light"] .mad-event-date {
            font-size: 14px;
            padding-inline: 14px;
        }
        .mad-panel .mad-book { font-size: 14px; padding-inline: 18px; }
        .mad-mascot-byte { left: 44%; width: 9%; }
        .mad-mascot-yellow { left: 43%; width: 9%; }
    }
}
@media (width > 900px) and (max-width: 1250px) {
    body:has(.auth-split) main.container { padding: 24px !important; }
    .auth-split { gap: 24px; min-height: calc(100vh - 108px); }
    .auth-split .auth-container { padding: 24px 8px 56px; }
    .auth-split .card { padding-inline: 12px; }
    .auth-split .card-header { padding-bottom: 24px; }
    .auth-split .card-title { font-size: 30px; }
    .auth-split .card-body > .separator { margin-block: 18px; }
    .auth-split .card-body > .oauth-buttons { gap: 12px; }
    .auth-split .auth-footer { margin-top: 18px; padding-top: 16px; }
    body[data-bs-theme="light"] .auth-split .auth-copyright { left: 20px; }
}
/* Bound the desktop stage: viewport growth must not enlarge speaker portraits. */
@media (width > 1250px) {
    body:has(.auth-split) main.container {
        width: 100%;
        max-width: 1520px;
        margin-inline: auto;
        display: grid;
        align-content: center;
    }
    body:has(.auth-split) .navbar > .container {
        max-width: 1520px;
        padding-inline: 32px;
    }
    .auth-split {
        --auth-stage-height: clamp(700px, calc(100svh - 124px), 820px);
        min-height: var(--auth-stage-height);
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .mad-panel {
        height: var(--auth-stage-height);
        min-height: 0;
    }
    .auth-split .card { width: min(100%, 440px); }
}
/* Tighter desktop gutters while retaining bounded large-screen proportions. */
@media (width > 900px) {
    body:has(.auth-split) main.container { padding: 20px !important; }
    .auth-split { gap: 20px; }
    .auth-split .auth-container { padding: 20px 16px 48px; }
    body[data-bs-theme="light"] .auth-split .auth-copyright { left: 16px; }
}
@media (width > 1250px) {
    body:has(.auth-split) .navbar > .container { padding-inline: 20px; }
    .auth-split { --auth-stage-height: clamp(700px, calc(100svh - 100px), 820px); }
}
/* Keep copyright with the form instead of anchoring it to the page corner. */
.auth-split .auth-container { flex-direction: column; padding-bottom: 20px; }
body[data-bs-theme="light"] .auth-split .auth-copyright {
    position: static;
    align-self: center;
    width: 100%;
    max-width: 440px;
    margin: 24px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
}
.auth-split .card { flex-shrink: 0; }
/* Stable auth button states: Bootstrap must not fall back to a transparent
   pressed state, and clicking must not shift the button under the pointer. */
body:has(.auth-split) .navbar .btn-auth {
    --bs-btn-color: #fff;
    --bs-btn-bg: #111;
    --bs-btn-border-color: #111;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #111;
    --bs-btn-hover-border-color: #111;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #111;
    --bs-btn-active-border-color: #111;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #111;
    --bs-btn-disabled-border-color: #111;
    transition: box-shadow 150ms ease;
}
body:has(.auth-split) .navbar .btn-auth:is(:hover, :active, :focus, :focus-visible) {
    background-color: #111;
    color: #fff;
    transform: none;
}
body:has(.auth-split) .navbar .btn-auth[aria-current="page"] {
    transition: none;
    box-shadow: 0 6px 16px #1112;
}
.auth-split .btn-submit {
    transition: box-shadow 150ms ease;
}
.auth-split .btn-submit:is(:hover, :active, :focus, :disabled) {
    background-color: var(--primary-color) !important;
    color: #fff;
    transform: none;
}
.auth-split .btn-submit:disabled {
    opacity: 1;
    cursor: wait;
    box-shadow: none;
}
.auth-split .btn-submit:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    body:has(.auth-split) .navbar .btn-auth,
    .auth-split .btn-submit { transition: none; }
}

/* Equal checkbox dimensions; prevent the flex row from stretching it. */
.auth-split #remember.form-check-input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    aspect-ratio: 1;
    padding: 0;
}

.auth-split .form-check:has(#remember) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    padding-left: 0;
    margin-bottom: 0;
}
.auth-split .form-check #remember.form-check-input {
    float: none;
    margin: 0;
    align-self: center;
}
.auth-split .form-check:has(#remember) .form-check-label {
    margin: 0;
    line-height: 20px;
}

/* Decorative artwork uses true alpha cutouts; never blend out background colors. */
.mad-mascot, .mad-sparkle { mix-blend-mode: normal; background: transparent; }
.mad-sparkle { display: none; position: absolute; height: auto; pointer-events: none; }
@media (width > 900px) {
    @container (width > 620px) {
        .mad-mascot-byte { top: 5.5%; left: 44%; right: auto; bottom: auto; width: 10%; transform: none; }
        .mad-mascot-blue { top: 7%; left: 73.5%; right: auto; bottom: auto; width: 5.5%; transform: none; }
        .mad-mascot-yellow { top: 59%; left: 42%; right: auto; bottom: auto; width: 9.5%; transform: none; }
        .mad-mascot-selfie { top: 41%; left: 73%; right: auto; bottom: auto; width: 8%; transform: none; }
        .mad-mascot-prompt { top: auto; left: auto; bottom: 14%; right: 1%; width: 8%; transform: none; }
        .mad-sparkle { display: block; }
        .mad-sparkle-top { top: 16.5%; left: 50%; width: 4.5%; }
        .mad-sparkle-bottom { top: 75.5%; left: 47%; width: 3%; }
    }
}

/* Match the reference's entire tilted/scaled wall, not separately tilted cards. */
.mad-speaker-clone { display: none; }
@keyframes mad-wall-up {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}
@keyframes mad-wall-down {
    from { transform: translateY(-50%); }
    to { transform: translateY(0); }
}
@media (width > 900px) {
    @container (width > 620px) {
        .mad-speakers {
            left: 58%; top: 0; width: 42%; height: 100%;
            gap: 14px; align-items: start;
            transform: rotate(6deg) scale(1.15);
            transform-origin: center;
        }
        .mad-speaker-column, .mad-speaker-column:nth-child(2) {
            height: max-content; margin-top: 0; gap: 14px;
        }
        .mad-speaker-column > .mad-speaker {
            height: var(--mad-wall-card-height, 270px);
            aspect-ratio: auto; flex-shrink: 0; transform: none;
        }
    }
}
@media (width > 900px) and (prefers-reduced-motion: no-preference) {
    @container (width > 620px) {
        .mad-speaker-loop {
            padding-bottom: 14px;
            animation: mad-wall-up var(--mad-wall-duration, 26s) linear infinite;
        }
        .mad-speaker-loop:nth-child(2) { animation-name: mad-wall-down; }
        .mad-speaker-loop > .mad-speaker-clone { display: block; }
        /* Pointer hover keeps the reference's continuous motion; keyboard
           navigation pauses the wall so focused speaker links stay usable. */
        .mad-speakers:focus-within .mad-speaker-loop { animation-play-state: paused; }
    }
}
@media (prefers-reduced-motion: reduce) {
    .mad-speaker-loop { animation: none; }
    .mad-speaker-clone { display: none; }
}

/* Float the mascot artwork independently of the scrolling speaker wall.
   Individual translate preserves each mascot's existing rotation/placement. */
@keyframes mad-mascot-float {
    0%, 100% { translate: 0 calc(-1 * var(--mad-float-distance, 8px)); }
    50% { translate: 0 var(--mad-float-distance, 8px); }
}
@media (prefers-reduced-motion: no-preference) {
    .mad-mascot { animation: mad-mascot-float 5.6s ease-in-out infinite; }
    .mad-mascot-byte { animation-duration: 5.6s; animation-delay: -1.4s; }
    .mad-mascot-yellow { animation-duration: 6.2s; animation-delay: -3.1s; }
    .mad-mascot-blue { animation-duration: 5.2s; animation-delay: -2.6s; }
    .mad-mascot-selfie { animation-duration: 6s; animation-delay: -1s; }
    .mad-mascot-prompt { animation-duration: 6.6s; animation-delay: -4.4s; }
}
@media (max-width: 900px) {
    .mad-mascot { --mad-float-distance: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .mad-mascot { animation: none; translate: none; }
}

/* Every layout has a moving card track: the two-column desktop wall switches
   to a single seamless horizontal rail when the banner becomes compact. */
.mad-speakers:has(.mad-speaker-rail) {
    display: var(--mad-speakers-display, grid);
    scroll-snap-type: none;
}
.mad-speakers > .mad-speaker-column { display: var(--mad-column-display, flex); }
.mad-speaker-rail {
    display: var(--mad-rail-display, none);
    width: max-content;
    gap: 12px;
    padding-right: 12px;
}
.mad-speaker-rail > .mad-speaker {
    flex: 0 0 var(--mad-rail-card-width, 154px);
    width: var(--mad-rail-card-width, 154px);
    height: auto;
    aspect-ratio: .72;
    transform: none;
}
.mad-speaker-rail > .mad-speaker-clone { display: var(--mad-rail-copy-display, none); }
@container (max-width: 620px) {
    .mad-speakers {
        --mad-speakers-display: block;
        --mad-column-display: none;
        --mad-rail-display: flex;
    }
}
@media (max-width: 900px) {
    .mad-speakers {
        --mad-speakers-display: block;
        --mad-column-display: none;
        --mad-rail-display: flex;
        --mad-rail-card-width: clamp(148px, 40vw, 190px);
    }
}
@keyframes mad-rail-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: no-preference) {
    .mad-speaker-rail-loop {
        --mad-rail-copy-display: block;
        animation: mad-rail-left var(--mad-rail-duration, 40s) linear infinite;
    }
    .mad-speakers:is(:focus-within, :active) .mad-speaker-rail-loop { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
    .mad-speaker-rail-loop { animation: none; }
}

/* Fit the desktop stage to the available height instead of forcing 700px.
   Content may still grow for validation messages and browser text zoom. */
@media (width > 900px) {
    body:has(.auth-split) { --navbar-height: 70px; padding-top: var(--navbar-height); }
    body:has(.auth-split) .navbar { min-height: var(--navbar-height); }
    body:has(.auth-split) main.container {
        min-height: calc(100svh - var(--navbar-height));
        padding: 12px 20px !important;
        display: grid;
        align-content: center;
    }
    .auth-split { --auth-stage-height: min(820px, calc(100svh - 94px)); min-height: 0; }
    .auth-split .auth-container { min-width: 0; padding: 8px 16px; }
    .auth-split .card-header { padding-bottom: clamp(12px, 2svh, 24px); }
    .auth-split .card-title { font-size: clamp(24px, 3.5svh, 32px); }
    .auth-split .card-body > .oauth-buttons { gap: 8px; }
    .auth-split .card-body > .separator { margin-block: clamp(10px, 1.6svh, 18px); }
    .auth-split form > .mb-4 { margin-bottom: 12px !important; }
    .auth-split .auth-footer { margin-top: 12px; padding-top: 12px; font-size: 13px; }
    body[data-bs-theme="light"] .auth-split .auth-copyright { margin-top: 12px; }
    .mad-panel { height: var(--auth-stage-height); min-height: 0; }
    @container (width > 620px) {
        .mad-panel .mad-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: space-between;
            gap: 8px;
            height: 100%;
            width: 51%;
            padding: clamp(16px, 3svh, 32px) 0 clamp(16px, 3svh, 32px) 32px;
        }
        .mad-logo { width: 84px; height: 44px; flex-shrink: 0; margin: 0; }
        body[data-bs-theme="light"] .mad-panel h2 { font-size: clamp(32px, min(7cqw, 6.5svh), 60px); margin: 0; }
        body[data-bs-theme="light"] .mad-description { font-size: clamp(13px, 1.8svh, 16px); line-height: 1.45; margin: 0; }
        body[data-bs-theme="light"] .mad-event-date { font-size: 14px; padding: 8px 14px; margin: 0; }
        .mad-countdown { margin: 0; }
        .mad-countdown > div { width: 54px; padding: 6px 3px; }
        body[data-bs-theme="light"] .mad-countdown strong { font-size: clamp(24px, 3.5svh, 30px); }
        .mad-panel .mad-book { padding: 12px 16px; font-size: 13px; }
    }
    @container (max-width: 620px) {
        .mad-panel .mad-copy { height: calc(100% - 190px); align-content: space-between; padding: 20px 24px 0; column-gap: 16px; }
        .mad-logo { width: 72px; height: 38px; margin-bottom: 12px; }
        body[data-bs-theme="light"] .mad-panel h2 { font-size: 30px; margin-bottom: 12px; }
        body[data-bs-theme="light"] .mad-description { font-size: 13px; margin-bottom: 12px; }
        body[data-bs-theme="light"] .mad-event-date { margin-bottom: 12px; padding: 7px 12px; }
        .mad-countdown { margin-bottom: 8px; gap: 5px; }
        .mad-countdown > div { padding: 5px 3px; }
        .mad-panel .mad-book { padding: 10px; font-size: 12px; margin-bottom: 8px; }
        .mad-speakers { --mad-rail-card-width: 130px; padding: 14px 24px 20px; }
        .mad-speaker-rail > .mad-speaker { aspect-ratio: .85; }
    }
}
@media (width > 900px) and (max-height: 740px) {
    .auth-split .auth-container { padding-block: 0; }
    .auth-split .card-header { padding-bottom: 10px; }
    .auth-split .card-header > p { font-size: 13px !important; }
    .auth-split .btn-oauth { min-height: 36px; padding-block: 6px; font-size: 13px; }
    .auth-split .card-body > .oauth-buttons { gap: 6px; }
    .auth-split .card-body > .separator { margin-block: 8px; }
    .auth-split .form-label { line-height: 16px; margin-bottom: 4px; }
    .auth-split .form-control { min-height: 38px; padding-block: 8px; }
    .auth-split form > .mb-4 { margin-bottom: 8px !important; }
    .auth-split .btn-submit { padding-block: 9px; margin-top: 4px; }
    .auth-split .auth-footer { margin-top: 10px; padding-top: 10px; }
    body[data-bs-theme="light"] .auth-split .auth-copyright { margin-top: 8px; }
}
