:root {
    --ink: #19335f;
    --muted: #60708a;
    --ink-secondary: #60708a;
    --ink-muted: #8a9ab1;
    --line: #dbe7f7;
    --paper: #f7fbff;
    --white: #ffffff;
    --red: #e92e2e;
    --blue: #1f73d8;
    --sky: #18a8e0;
    --yellow: #ffd438;
    --green: #23a455;
    --orange: #ff8a00;
    --shadow: 0 18px 48px rgba(31, 115, 216, .13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 8%, rgba(255, 212, 56, .38), transparent 30%),
        radial-gradient(circle at 90% 14%, rgba(24, 168, 224, .2), transparent 28%),
        linear-gradient(180deg, #ffffff, var(--paper));
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; }
h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 18px; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 40px; }
#confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.brand small { display: block; color: var(--muted); font-weight: 700; }
.brand-logos { display: flex; align-items: center; gap: 8px; }
.brand-logo {
    width: 54px;
    height: 52px;
    object-fit: contain;
    padding: 5px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(25, 51, 95, .12);
    box-shadow: 0 8px 18px rgba(25, 51, 95, .12);
}
.brand-logo-school { width: 54px; }
.brand-logo-sija { width: 54px; padding: 5px; }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; line-height: 1.1; }
.brand span,
.brand-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--blue));
}

.nav-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-actions a, .link-button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 12px 14px;
    font-weight: 800;
}
.stand-badge {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff7dd;
    border: 1px solid #ffe08a;
    color: #9b3b00;
    font-weight: 950;
}
.stand-mode .topbar {
    position: sticky;
    top: 8px;
    z-index: 10;
}
.stand-mode .nav-actions a {
    background: #e8f6ff;
    color: var(--blue);
}
.stand-mode .shell { width: min(1320px, calc(100% - 24px)); }
.stand-mode .experience-grid { grid-template-columns: minmax(440px, .9fr) minmax(560px, 1.1fr); }
.stand-mode .flow-panel { padding: 34px; }
.stand-mode .primary,
.stand-mode .secondary,
.stand-mode .nav-actions a,
.stand-mode .link-button {
    min-height: 58px;
    padding-inline: 22px;
    font-size: 16px;
}
.stand-mode input {
    min-height: 58px;
    font-size: 17px;
}
.stand-mode label { font-size: 16px; }
.stand-mode .choices button {
    min-height: 58px;
    padding: 14px;
    font-size: 16px;
    font-weight: 850;
}
.stand-mode .flow-step[data-step="1"].active::after { font-size: 16px; }

.eyebrow { margin: 0 0 8px; color: var(--red); font-weight: 900; text-transform: uppercase; font-size: 12px; }
.experience-grid { display: grid; grid-template-columns: minmax(430px, .95fr) minmax(460px, 1.05fr); gap: 18px; align-items: stretch; }

.kiosk-control-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7dd, #e8f6ff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.kiosk-control-bar strong {
    display: block;
    color: var(--red);
    font-size: 18px;
}
.kiosk-control-bar span {
    display: block;
    color: var(--muted);
    font-weight: 850;
}

.hero-panel {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: var(--ink);
    background: linear-gradient(135deg, #ffffff, #e8f6ff 48%, #fff4b8);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "SMK BISA HEBAT";
    position: absolute;
    right: -26px;
    top: 56px;
    transform: rotate(8deg);
    color: rgba(233, 46, 46, .08);
    font-size: clamp(42px, 7vw, 86px);
    font-weight: 1000;
}

.hero-panel > * { position: relative; z-index: 1; }
.hero-panel p { color: var(--muted); font-size: 18px; }
.hero-identity { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 14px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); }
.hero-identity img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(25, 51, 95, .12);
    box-shadow: 0 10px 22px rgba(25, 51, 95, .12);
}
.hero-identity strong { display: block; font-size: 17px; }
.hero-identity span { display: block; color: var(--muted); font-weight: 800; font-size: 13px; }
.official-ribbon {
    display: grid;
    grid-template-columns: 138px 54px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
}
.official-ribbon img {
    display: block;
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}
.official-ribbon span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}
.hero-title { max-width: 560px; }
.hero-title h1 { margin-bottom: 14px; letter-spacing: 0; }
.hero-title p { margin-bottom: 0; }

.school-strip {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.school-strip span {
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--blue);
    font-weight: 900;
    font-size: 13px;
}
.identity-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.identity-band article { padding: 12px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); }
.identity-band strong { display: block; color: var(--red); font-size: 18px; }
.identity-band span { color: var(--muted); font-size: 12px; font-weight: 800; }
.student-showcase { margin-top: 14px; padding: 14px; border-radius: 8px; background: rgba(255, 255, 255, .86); border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(31, 115, 216, .12); }
.showcase-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.showcase-head strong { color: var(--ink); }
.showcase-head span { color: var(--muted); font-size: 12px; font-weight: 900; }
.showcase-stage { position: relative; min-height: 202px; overflow: hidden; border-radius: 8px; }
.showcase-card {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 144px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff, #e8f6ff 52%, #fff4b8);
    border: 1px solid var(--line);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(34px) scale(.98);
    transition: opacity .7s ease, transform .7s ease;
}
.showcase-card.active { opacity: 1; transform: translateX(0) scale(1); }
.showcase-card.leaving { opacity: 0; transform: translateX(-34px) scale(.98); }
.showcase-card img, .showcase-fallback {
    width: 144px;
    height: 144px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid var(--white);
    box-shadow: 0 12px 24px rgba(25, 51, 95, .18);
}
.showcase-fallback { display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, var(--blue), var(--red)); font-weight: 1000; font-size: 28px; }
.showcase-card strong { display: block; margin-bottom: 6px; font-size: 21px; color: var(--ink); }
.showcase-card span { display: block; color: var(--muted); font-weight: 850; }
.showcase-track { display: inline-block; margin-top: 10px; padding: 7px 9px; border-radius: 999px; color: var(--blue); background: #e8f6ff; font-size: 12px; font-weight: 950; }
.showcase-card::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--yellow);
    opacity: .55;
    animation: pulseDot 2.4s ease-in-out infinite;
}
.showcase-ticker { margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e8f6ff; border: 1px solid var(--line); }
.showcase-ticker-track { display: flex; width: max-content; gap: 8px; padding: 8px; animation: tickerMove 24s linear infinite; }
.showcase-ticker-track span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--white);
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(31, 115, 216, .08);
}
@keyframes tickerMove {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes pulseDot {
    0%, 100% { transform: scale(.86); opacity: .42; }
    50% { transform: scale(1.08); opacity: .72; }
}

.progress { display: flex; gap: 10px; margin-top: 16px; justify-content: center; }
.step-connector { align-self: center; width: 26px; height: 4px; border-radius: 999px; background: #cfe0f7; }
.step-connector.active { background: var(--green); }
.step-dot {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    font-weight: 900;
}
.step-dot.active { background: var(--yellow); color: var(--ink); border: 2px solid var(--red); }
.step-dot.done { background: var(--green); }

.flow-panel, .hall-grid > article, .table-wrap, .stats-grid > article {
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.flow-panel { min-height: 620px; padding: 28px; display: flex; flex-direction: column; }
.flow-step { display: none; }
.flow-step.active { display: flex; flex-direction: column; min-height: 100%; }
.form-grid { display: grid; gap: 16px; margin: 22px 0; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; }
input {
    width: 100%;
    padding: 15px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
}
.privacy-note {
    margin: -4px 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff7dd;
    border: 1px solid #ffe08a;
    color: #765100;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}
.flow-step[data-step="1"].active .primary { align-self: flex-start; }
.flow-step[data-step="1"].active::after {
    content: "Experience dimulai dari buku tamu, lalu foto, game kepribadian, poster 9:16, dan hadiah.";
    display: block;
    margin-top: auto;
    padding: 16px;
    border-radius: 8px;
    color: var(--muted);
    background: linear-gradient(135deg, #e8f6ff, #fff7dd);
    border: 1px solid var(--line);
    font-weight: 850;
}

.primary, .secondary {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.primary { background: linear-gradient(135deg, var(--red), var(--orange)); color: var(--white); }
.secondary { background: #eaf3ff; color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.button-row.center { justify-content: center; }
.camera-box { aspect-ratio: 4 / 3; overflow: hidden; background: #eef6ff; border-radius: 8px; border: 1px solid var(--line); }
.camera-box { position: relative; }
.camera-countdown { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); background: rgba(25, 51, 95, .38); font-size: clamp(72px, 12vw, 140px); font-weight: 1000; }
video, #snapshot { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-status { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #e8f6ff; color: var(--ink); font-weight: 850; }
.camera-status.warning { background: #fff7dd; color: #9b3b00; }
.camera-status.error { background: #ffe9e9; color: var(--red); }
.camera-fallback { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.camera-fallback label { cursor: pointer; }
.small-note, .section-head p { color: var(--muted); }
.alert { margin-top: 12px; color: #b02323; font-weight: 800; }

.quiz { display: grid; gap: 12px; }
.quiz-progress { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.quiz-progress-dot { width: 18px; height: 18px; border-radius: 999px; background: #dbe7f7; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
.quiz-progress-dot.answered { background: var(--green); }
.question { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.question p { margin-bottom: 10px; font-weight: 900; }
.q-number { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 14px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices button { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 10px; cursor: pointer; text-align: left; }
.choices button.selected { border-color: var(--blue); background: #e8f6ff; }

.result-card {
    color: var(--ink);
    min-height: 420px;
    border-radius: 8px;
    padding: 24px;
    display: grid;
    grid-template-columns: 160px 1fr 170px;
    gap: 18px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #e8f6ff 48%, #fff2aa);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.result-photo, .photo-placeholder { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; border: 4px solid var(--white); }
.photo-placeholder { display: grid; place-items: center; background: rgba(31, 115, 216, .12); font-weight: 900; }
.badge { display: inline-block; padding: 8px 10px; border-radius: 999px; background: #e8f6ff; color: var(--blue); font-weight: 900; }
.badge-visitor { background: #fff2aa; color: #9b3b00; }
.badge-disclaimer { margin-top: 12px; background: #ffe9e9; color: var(--red); }
.result-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.result-stat { padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); }
.result-stat small { display: block; color: var(--muted); font-weight: 800; }
.result-stat strong { color: var(--ink); overflow-wrap: anywhere; }
.result-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.result-brand img { width: 48px; height: 48px; object-fit: contain; padding: 4px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.result-brand strong { display: block; }
.result-brand span { display: block; color: var(--muted); font-weight: 800; font-size: 12px; }
.result-qr {
    align-self: stretch;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    text-align: center;
}
.result-qr img { width: 136px; height: 136px; object-fit: contain; }
.result-qr strong { color: var(--ink); font-size: 14px; }
.result-qr span { color: var(--muted); font-size: 11px; font-weight: 800; overflow-wrap: anywhere; max-width: 100%; }
.social-poster {
    width: min(430px, 100%);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 14px;
    padding: 20px;
    overflow: hidden;
    border-radius: 8px;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 212, 56, .55), transparent 26%),
        radial-gradient(circle at 86% 18%, rgba(24, 168, 224, .28), transparent 28%),
        linear-gradient(160deg, #ffffff, #e8f6ff 56%, #fff2aa);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.compact-poster { width: min(300px, 100%); margin-top: 12px; }
.poster-top {
    display: grid;
    grid-template-columns: 42px 42px 1fr;
    align-items: center;
    gap: 8px;
    font-weight: 950;
    color: var(--red);
}
.poster-top img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    padding: 4px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
}
.poster-photo-wrap {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 5px solid var(--white);
    box-shadow: 0 16px 34px rgba(25, 51, 95, .18);
}
.poster-photo,
.poster-placeholder {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--red));
    color: var(--white);
    font-weight: 1000;
    font-size: 42px;
}
.poster-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.poster-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}
.poster-copy h1 {
    margin: 6px 0 8px;
    color: var(--ink);
    font-size: clamp(28px, 6vw, 44px);
    line-height: .98;
}
.poster-kicker {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e8f6ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
}
.poster-copy strong { display: block; font-size: 20px; }
.poster-copy p { margin: 0 0 10px; color: var(--muted); font-weight: 850; }
.poster-stats {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
}
.poster-stats div,
.poster-prize {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
}
.poster-stats small,
.poster-prize small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}
.poster-stats b,
.poster-prize b {
    display: block;
    color: var(--red);
    font-size: 18px;
    overflow-wrap: anywhere;
}
.poster-prize { margin-top: 8px; background: #fff7dd; }
.poster-bottom {
    display: grid;
    grid-template-columns: 1fr 76px;
    gap: 10px;
    align-items: center;
}
.poster-bottom strong,
.poster-bottom span {
    display: block;
    font-weight: 900;
}
.poster-bottom span { color: var(--muted); font-size: 12px; }
.poster-bottom img {
    width: 76px;
    height: 76px;
    padding: 4px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
}

.wheel-zone { display: grid; place-items: center; gap: 16px; }
.wheel-container { position: relative; display: grid; place-items: center; }
.wheel-pointer { position: absolute; top: -8px; z-index: 3; width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--red); filter: drop-shadow(0 6px 6px rgba(25, 51, 95, .2)); }
.wheel-center { position: absolute; z-index: 2; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--white); border: 6px solid var(--blue); font-weight: 1000; color: var(--red); }
.wheel {
    width: min(390px, 78vw);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 10px solid var(--blue);
    background: conic-gradient(var(--red) 0 60deg, var(--yellow) 60deg 120deg, var(--green) 120deg 180deg, var(--blue) 180deg 240deg, var(--orange) 240deg 300deg, #ffffff 300deg 360deg);
    transition: transform 4s cubic-bezier(.15,.74,.21,1);
    position: relative;
}
.wheel::after { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: var(--white); border: 6px solid var(--blue); }
.wheel-container .wheel::after { display: none; }
.spin { width: min(220px, 100%); }
.prize-text { margin: 16px 0; padding: 18px; border-radius: 8px; background: #fff7dd; color: #9b3b00; font-size: 24px; font-weight: 900; text-align: center; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 22px 0; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; text-align: right; }
.admin-actions p { margin: 0; }
.profile-section { margin-top: 22px; }
.profile-grid { display: grid; grid-template-columns: 1.25fr repeat(2, 1fr); gap: 12px; }
.profile-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: profileRise .65s ease both;
}
.profile-card:nth-child(2) { animation-delay: .08s; }
.profile-card:nth-child(3) { animation-delay: .16s; }
.profile-card:nth-child(4) { animation-delay: .24s; }
.profile-card:nth-child(5) { animation-delay: .32s; }
.profile-card:nth-child(6) { animation-delay: .40s; }
.profile-card:nth-child(7) { animation-delay: .48s; }
.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(90deg, transparent, rgba(255, 212, 56, .32), transparent);
    animation: cardShine 6s ease-in-out infinite;
}
.profile-card > * { position: relative; z-index: 1; }
@keyframes profileRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cardShine {
    0%, 42% { transform: translateX(-120%); }
    58%, 100% { transform: translateX(120%); }
}
.profile-card strong, .profile-card h3 { display: block; margin: 0 0 8px; color: var(--ink); font-size: 20px; }
.profile-card span, .profile-card p { color: var(--muted); font-weight: 750; }
.profile-main { display: grid; grid-template-columns: 112px 1fr; gap: 14px; grid-row: span 2; align-items: center; }
.profile-main img { width: 112px; height: 112px; object-fit: contain; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.official-links { display: grid; gap: 8px; }
.official-links a { color: var(--blue); font-weight: 900; overflow-wrap: anywhere; }
.site-footer { margin-top: 26px; padding: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); color: var(--muted); font-weight: 800; }
.site-footer a { color: var(--blue); }
.idle-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(247, 251, 255, .88); backdrop-filter: blur(8px); }
.idle-content { width: min(520px, 100%); padding: 26px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.idle-content h2 { color: var(--red); }
.idle-content p { color: var(--muted); font-weight: 800; }
.hall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.hall-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 22px 0;
}
.live-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
}
.live-stat {
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.live-stat strong { display: block; font-size: 28px; color: var(--red); overflow-wrap: anywhere; }
.live-stat span { color: var(--muted); font-weight: 800; font-size: 12px; }
.tv-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.tv-hint span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e8f6ff;
    border: 1px solid var(--line);
    color: var(--blue);
    font-size: 12px;
    font-weight: 950;
}
.tv-control {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin: -6px 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7dd, #e8f6ff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.tv-control strong { color: var(--red); font-size: 18px; }
.tv-control span { color: var(--muted); font-weight: 850; }
.hall-grid-tv { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hall-grid article { padding: 14px; }
.hall-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #dfe7eb; }
.hall-grid h2 { margin: 10px 0 4px; font-size: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats-grid article { padding: 18px; }
.stats-grid strong { display: block; font-size: 34px; overflow-wrap: anywhere; }
.stats-grid span { color: var(--muted); font-weight: 800; }
.section-head.compact { margin-bottom: 12px; }
.leaderboard-panel {
    margin: 18px 0;
    padding: 16px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.origin-list { display: grid; gap: 10px; }
.origin-list article {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 2fr) 54px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #f7fbff;
    border: 1px solid var(--line);
}
.origin-list strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.origin-list span { color: var(--muted); font-size: 12px; font-weight: 900; }
.origin-list b { color: var(--red); text-align: right; }
.origin-meter {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8f6ff;
    border: 1px solid var(--line);
}
.origin-meter span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--green), var(--yellow));
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.guide-card {
    padding: 16px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.guide-main { grid-row: span 2; }
.guide-wide { grid-column: span 2; }
.guide-card strong { display: block; margin-bottom: 10px; color: var(--ink); font-size: 20px; }
.guide-card p, .guide-card li { color: var(--muted); font-weight: 800; line-height: 1.55; }
.guide-card ol, .guide-card ul { margin: 0; padding-left: 20px; }
.guide-card code {
    padding: 2px 5px;
    border-radius: 6px;
    background: #e8f6ff;
    color: var(--ink);
    font-weight: 900;
}
.guide-card pre {
    overflow-x: auto;
    margin: 8px 0 12px;
    padding: 12px;
    border-radius: 8px;
    background: #19335f;
}
.guide-card pre code { background: transparent; color: #fff; padding: 0; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-links a {
    padding: 10px;
    border-radius: 8px;
    background: #e8f6ff;
    color: var(--blue);
    border: 1px solid var(--line);
    font-weight: 900;
    text-align: center;
}
.prize-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.prize-check-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background: #f7fbff;
    border: 1px solid var(--line);
}
.prize-swatch {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 1px var(--line);
}
.prize-check-item b {
    display: block;
    color: var(--ink);
    font-weight: 950;
}
.prize-check-item small {
    display: block;
    color: var(--muted);
    font-weight: 850;
}
.network-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.network-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.network-main { grid-column: span 3; }
.network-card strong {
    color: var(--ink);
    font-size: 20px;
}
.network-card p,
.network-card li,
.network-card span {
    color: var(--muted);
    font-weight: 850;
    line-height: 1.5;
}
.network-card ol { margin: 0; padding-left: 20px; }
.network-card code {
    display: block;
    padding: 10px;
    border-radius: 8px;
    background: #e8f6ff;
    color: var(--ink);
    font-weight: 900;
    overflow-wrap: anywhere;
}
.network-qr {
    display: grid;
    place-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}
.network-qr svg {
    width: 180px;
    height: 180px;
}
.track-summary { margin: 18px 0; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.track-grid article { padding: 14px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.track-grid strong { display: block; color: var(--red); font-size: 30px; }
.track-grid span { color: var(--muted); font-weight: 900; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { text-align: left; padding: 13px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.single-card-wrap { max-width: 860px; margin: 48px auto; }

@media print {
    body { background: #fff; }
    .topbar, .button-row { display: none; }
    .shell { width: 100%; padding: 0; }
    .result-card { box-shadow: none; }
}

@media (max-width: 860px) {
    .stand-mode .topbar { position: static; }
    .topbar, .section-head, .hall-header { align-items: flex-start; flex-direction: column; }
    .experience-grid { grid-template-columns: 1fr; }
    .stand-mode .experience-grid { grid-template-columns: 1fr; }
    .kiosk-control-bar { align-items: stretch; flex-direction: column; }
    .kiosk-control-bar .primary { width: 100%; }
    .hero-panel { min-height: 360px; }
    .result-card { grid-template-columns: 1fr; }
    .choices { grid-template-columns: 1fr; }
    .live-stats { grid-template-columns: 1fr; width: 100%; }
    .tv-control { grid-template-columns: 1fr; }
    .tv-control .secondary { width: 100%; }
    .hero-identity { grid-template-columns: 1fr; }
    .official-ribbon { grid-template-columns: 1fr 1fr; }
    .official-ribbon span { grid-column: 1 / -1; }
    .identity-band { grid-template-columns: 1fr; }
    .origin-list article { grid-template-columns: 1fr; }
    .origin-list b { text-align: left; }
    .guide-grid { grid-template-columns: 1fr; }
    .guide-wide { grid-column: auto; }
    .quick-links { grid-template-columns: 1fr; }
    .prize-checklist { grid-template-columns: 1fr; }
    .network-grid { grid-template-columns: 1fr; }
    .network-main { grid-column: auto; }
    .showcase-card { grid-template-columns: 1fr; }
    .showcase-stage { min-height: 330px; }
    .profile-grid, .profile-main { grid-template-columns: 1fr; }
}

/* Profession Transformation Overlays */
.result-photo-container {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 8px;
    border: 4px solid var(--white);
    box-shadow: 0 4px 12px rgba(25, 51, 95, 0.08);
    overflow: hidden;
}
.result-photo-container .result-photo,
.result-photo-container .photo-placeholder {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: block;
}
.profession-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.profession-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}
