* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #FFB6D9 0%, #FFC0CB 50%, #FFD6E8 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    padding: 20px;
}

[hidden] {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.routes-map {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 15;
    display: none;
}

.routes-grid {
    display: none;
}

.route-card {
    display: none;
}

.intro-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    z-index: 20;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.intro-screen.song-mode {
    align-items: flex-start;
}

.intro-box {
    max-width: 800px;
    width: 100%;
    padding: 40px 32px;
    color: #4d0336;
}

.intro-text {
    font-size: clamp(1.8rem, 3.5vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: 0;
    font-weight: 700;
    font-family: 'Georgia', serif;
    text-transform: none;
    margin: 0 auto;
    max-width: 700px;
    text-wrap: balance;
    color: #5d043b;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7),
        0 12px 30px rgba(148, 17, 92, 0.18);
}

.intro-text.fade-out {
    opacity: 0;
    transition: opacity 450ms ease;
}

.start-button {
    border: 0;
    border-radius: 999px;
    padding: 14px 34px;
    background: #b91572;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 38px rgba(185, 21, 114, 0.22);
    transition: transform 160ms ease, background 160ms ease;
}

.start-button:hover {
    background: #94115c;
    transform: translateY(-1px);
}

.start-button.hide {
    display: none;
}

.login-panel {
    display: none;
    max-width: 380px;
    margin: 34px auto 0;
    padding: 24px;
    border: 2px solid rgba(93, 4, 59, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
}

.login-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.login-panel.hide {
    display: none;
}

.password-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5d043b;
}

.password-row {
    display: flex;
    gap: 10px;
}

.password-input {
    flex: 1;
    min-width: 0;
    border: 2px solid rgba(93, 4, 59, 0.28);
    border-radius: 999px;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.7);
    color: #5d043b;
    font-size: 1rem;
    outline: none;
}

.password-input:focus {
    border-color: #b91572;
    box-shadow: 0 0 0 4px rgba(185, 21, 114, 0.14);
}

.login-button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: #b91572;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.login-button:hover {
    background: #94115c;
    transform: translateY(-1px);
}

.password-hint,
.login-message {
    margin-top: 12px;
    color: #5d043b;
    font-size: 0.95rem;
    line-height: 1.4;
}

.login-message {
    min-height: 1.4em;
    font-weight: 700;
}

.next-button {
    display: none;
    margin: 34px auto 0;
    border: 0;
    border-radius: 999px;
    padding: 14px 34px;
    background: #b91572;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 38px rgba(185, 21, 114, 0.22);
    transition: transform 160ms ease, background 160ms ease;
}

.next-button.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: riseIn 500ms ease both;
}

.next-button:hover {
    background: #94115c;
    transform: translateY(-1px);
}

.prompt-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.prompt-actions .next-button {
    margin-inline: 0;
}

.escape-no {
    background: #6f4260;
}

.escape-no.escaped {
    position: fixed;
    z-index: 100;
    margin: 0;
    transition: left 160ms ease, top 160ms ease, background 160ms ease;
}

.contract-panel {
    display: none;
    width: min(100%, 560px);
    margin: 30px auto 0;
    padding: 28px;
    border: 2px solid rgba(93, 4, 59, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
    color: #5d043b;
    text-align: left;
}

.contract-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.contract-title {
    font-family: Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    line-height: 1.12;
    font-weight: 700;
    text-align: center;
}

.contract-copy {
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.55;
}

.contract-acknowledgment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid rgba(93, 4, 59, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.34);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.contract-acknowledgment input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 2px 0 0;
    accent-color: #94115c;
}

.contract-agree {
    display: flex;
    margin: 22px auto 0;
}

.contract-agree:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.perfume-panel,
.keys-panel {
    display: none;
    width: min(100%, 560px);
    margin: 30px auto 0;
    padding: 28px;
    border: 2px solid rgba(93, 4, 59, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
    color: #5d043b;
}

.perfume-panel.show,
.keys-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.perfume-title,
.keys-title {
    font-family: Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.14;
    font-weight: 700;
    text-align: center;
}

.perfume-stage,
.keys-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 360px);
    margin: 24px auto 0;
    aspect-ratio: 1;
    border: 2px solid rgba(185, 21, 114, 0.2);
    border-radius: 20px;
    background:
        radial-gradient(circle at 62% 24%, rgba(255, 255, 255, 0.86), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 223, 238, 0.68));
    box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.5), 0 18px 36px rgba(93, 4, 59, 0.12);
    overflow: hidden;
}

.perfume-bottle {
    width: min(78%, 270px);
    height: auto;
    filter: drop-shadow(0 20px 22px rgba(93, 4, 59, 0.18));
    transform-origin: center bottom;
}

.keys-photo {
    display: block;
    width: min(88%, 310px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 28px rgba(93, 4, 59, 0.18);
    transform-origin: center;
}

.keys-stage.taken .keys-photo {
    animation: keysTaken 700ms ease both;
}

.perfume-stage.spraying .perfume-bottle {
    animation: bottlePress 620ms ease;
}

.spray-mist {
    position: absolute;
    top: 27%;
    left: 54%;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.spray-mist span {
    position: absolute;
    width: 13px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(0, 0) scale(0.3);
}

.perfume-stage.spraying .spray-mist span {
    animation: perfumeSpray 820ms ease-out forwards;
}

.perfume-stage.spraying .spray-mist span:nth-child(2) {
    animation-delay: 45ms;
}

.perfume-stage.spraying .spray-mist span:nth-child(3) {
    animation-delay: 80ms;
}

.perfume-stage.spraying .spray-mist span:nth-child(4) {
    animation-delay: 115ms;
}

.perfume-stage.spraying .spray-mist span:nth-child(5) {
    animation-delay: 150ms;
}

.perfume-stage.spraying .spray-mist span:nth-child(6) {
    animation-delay: 185ms;
}

.perfume-stage.spraying .spray-mist span:nth-child(7) {
    animation-delay: 220ms;
}

.perfume-actions {
    align-items: center;
}

.game-card {
    display: none;
    max-width: 560px;
    margin: 34px auto 0;
    perspective: 1200px;
}

.game-card.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.card-inner {
    position: relative;
    min-height: 360px;
    transform-style: preserve-3d;
    transition: transform 700ms ease;
}

.game-card.has-photo .card-inner {
    min-height: 760px;
}

.game-card.has-thread .card-inner {
    min-height: 780px;
}

.game-card.has-long-answer .card-inner {
    min-height: 640px;
}

.game-card.has-huge-answer .card-inner {
    min-height: 780px;
}

.game-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
    backface-visibility: hidden;
    border: 2px solid rgba(93, 4, 59, 0.22);
    border-radius: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
    color: #5d043b;
}

.card-back {
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: rotateY(180deg);
}

.card-back > * {
    width: 100%;
}

.question-label {
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.76;
}

.question-text {
    font-family: 'Georgia', serif;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.15;
    font-weight: 700;
}

.answer-options {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.answer-option {
    border: 2px solid rgba(93, 4, 59, 0.24);
    border-radius: 999px;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.68);
    color: #5d043b;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.answer-option:hover {
    transform: translateY(-1px);
    border-color: #b91572;
    background: rgba(255, 255, 255, 0.88);
}

.answer-option.correct {
    border-color: #208a45;
    background: #2fbf67;
    color: #fff;
}

.answer-option.wrong {
    border-color: #b4233b;
    background: #e5485d;
    color: #fff;
}

.answer-option:disabled {
    cursor: default;
}

.answer-option:disabled:hover {
    transform: none;
}

.answer-result {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.answer-title {
    font-family: 'Georgia', serif;
    font-size: clamp(1.35rem, 3vw, 2.25rem);
    line-height: 1.1;
    font-weight: 700;
}

.answer-explanation {
    margin-top: 18px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.game-card.has-long-answer .answer-explanation {
    font-size: 0.92rem;
    line-height: 1.42;
}

.game-card.has-huge-answer .answer-explanation {
    font-size: 0.78rem;
    line-height: 1.32;
}

.answer-photo-frame {
    width: min(100%, 340px);
    margin: 22px auto 0;
    padding: 10px;
    border: 2px solid rgba(185, 21, 114, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 34px rgba(93, 4, 59, 0.16);
    transform: rotate(-1.5deg);
}

.answer-photo-frame img {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 12px;
}

.message-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(100%, 430px);
    margin: 18px auto 0;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
}

.answer-footnote {
    width: min(100%, 430px);
    margin: 12px auto 0;
    padding-top: 10px;
    border-top: 1px solid rgba(93, 4, 59, 0.18);
    color: #5d043b;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
    opacity: 0.9;
}

.message-row {
    display: flex;
    width: 100%;
}

.message-row.me {
    justify-content: flex-end;
}

.message-row.you {
    justify-content: flex-start;
}

.message-row.system {
    justify-content: center;
}

.message-bubble {
    max-width: 78%;
    padding: 10px 13px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: left;
}

.message-row.me .message-bubble {
    border-bottom-right-radius: 6px;
    background: #0b84ff;
    color: #fff;
}

.message-row.you .message-bubble {
    border-bottom-left-radius: 6px;
    background: #e9e9eb;
    color: #1f1f1f;
}

.message-row.system .message-bubble {
    max-width: 90%;
    border-radius: 999px;
    background: rgba(93, 4, 59, 0.12);
    color: #5d043b;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.card-action {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: #b91572;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.card-action.secondary {
    background: rgba(93, 4, 59, 0.18);
    color: #5d043b;
}

.card-action:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #94115c;
}

.card-action.secondary:hover:not(:disabled) {
    background: rgba(93, 4, 59, 0.28);
}

.card-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.score-panel {
    margin: 18px auto 0;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    color: #5d043b;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(93, 4, 59, 0.12);
}

.tic-tac-toe {
    display: none;
    width: min(100%, 520px);
    margin: 28px auto 0;
    padding: 26px;
    border: 2px solid rgba(93, 4, 59, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.36);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
    color: #5d043b;
}

.tic-tac-toe.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.tic-status {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 800;
}

.tic-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: min(100%, 330px);
    margin: 22px auto 0;
    aspect-ratio: 1;
}

.tic-cell {
    border: 2px solid rgba(93, 4, 59, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    color: #5d043b;
    font-family: Georgia, serif;
    font-size: clamp(2.2rem, 9vw, 4rem);
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tic-cell:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #b91572;
    background: rgba(255, 255, 255, 0.92);
}

.tic-cell.x {
    color: #b91572;
}

.tic-cell.o {
    color: #2e7f8f;
}

.tic-cell.winner {
    border-color: #208a45;
    background: rgba(47, 191, 103, 0.25);
}

.tic-cell:disabled {
    cursor: default;
}

.tic-reset {
    margin-top: 20px;
}

.hoe-interlude {
    position: relative;
    display: none;
    width: min(100%, 820px);
    min-height: 330px;
    margin: 24px auto 0;
    padding: 32px 12px;
    color: #5d043b;
    overflow: hidden;
}

.hoe-interlude.show {
    display: grid;
    place-items: center;
    animation: clubPop 420ms ease both;
}

.hoe-interlude.leaving {
    animation: clubLeave 520ms ease both;
}

.hoe-beat-ring {
    position: absolute;
    width: min(74vw, 430px);
    aspect-ratio: 1;
    border: 2px solid rgba(185, 21, 114, 0.22);
    border-radius: 50%;
    box-shadow:
        0 0 0 18px rgba(255, 255, 255, 0.16),
        0 0 54px rgba(185, 21, 114, 0.2);
    animation: beatRing 640ms ease-in-out infinite;
}

.hoe-interlude .question-label {
    position: relative;
    z-index: 1;
    align-self: end;
    margin-bottom: 0;
    color: rgba(93, 4, 59, 0.72);
}

.hoe-letters {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.02em;
    max-width: 100%;
    font-family: Arial, sans-serif;
    font-size: clamp(2.35rem, 10vw, 6.6rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.82),
        0 0 24px rgba(255, 255, 255, 0.78),
        0 16px 34px rgba(148, 17, 92, 0.22);
}

.hoe-letters > span {
    display: inline-block;
    opacity: 0;
    transform: translate(var(--start-x), var(--start-y)) scale(0.42) rotate(var(--tilt));
    animation:
        letterSpawn 700ms cubic-bezier(0.2, 1.35, 0.36, 1) var(--delay) forwards,
        letterBounce 520ms ease-in-out calc(var(--delay) + 700ms) infinite;
}

.hoe-letters > span:nth-child(3n) {
    color: #167988;
}

.hoe-letters > span:nth-child(3n + 1) {
    color: #94115c;
}

.hoe-letters > span:nth-child(3n + 2) {
    color: #b26900;
}

.stacked-for {
    display: inline-grid;
    grid-template-rows: auto auto;
    justify-items: center;
    align-items: center;
    margin: 0 0.05em;
    line-height: 0.62;
}

.stacked-for .for-or {
    display: block;
    color: #167988;
    font-size: 0.72em;
    letter-spacing: 0;
}

.stacked-for .for-f {
    display: block;
    color: #94115c;
    font-size: 0.82em;
    line-height: 0.72;
    transform: translateY(-0.06em);
}

.sad-note-card {
    display: none;
    width: min(100%, 620px);
    max-height: min(78vh, 680px);
    margin: 28px auto 0;
    padding: 30px;
    border: 2px solid rgba(93, 4, 59, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 246, 251, 0.66)),
        repeating-linear-gradient(180deg, transparent 0 30px, rgba(93, 4, 59, 0.08) 31px 32px);
    box-shadow: 0 22px 58px rgba(93, 4, 59, 0.14);
    color: #5d043b;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: left;
}

.sad-note-card.show {
    display: block;
    animation: sadNoteIn 620ms ease both;
}

.sad-note-card.leaving {
    animation: clubLeave 520ms ease both;
}

.sad-note-title {
    font-family: Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.12;
    text-align: center;
}

.sad-note-copy {
    margin-top: 18px;
}

.sad-note-copy p {
    margin-top: 13px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.58;
}

.sad-note-continue {
    display: flex;
    margin: 24px auto 0;
}

.song-game {
    display: none;
    width: min(100%, 880px);
    margin: 28px auto 0;
    padding: 30px;
    border: 2px solid rgba(93, 4, 59, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.38);
    box-shadow: 0 22px 60px rgba(93, 4, 59, 0.16);
    color: #5d043b;
    text-align: left;
}

.song-game.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.song-stage {
    display: grid;
    grid-template-columns: minmax(270px, 330px) minmax(280px, 1fr);
    align-items: center;
    gap: 34px;
}

.music-player {
    width: min(100%, 330px);
    min-height: 590px;
    margin: 0 auto;
    padding: 26px 22px 30px;
    border: 2px solid rgba(53, 43, 70, 0.22);
    border-radius: 48px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(222, 233, 238, 0.9)),
        #f7f1f7;
    box-shadow:
        inset -8px -10px 22px rgba(75, 80, 102, 0.11),
        inset 8px 8px 20px rgba(255, 255, 255, 0.82),
        0 28px 54px rgba(46, 37, 67, 0.24);
}

.player-screen {
    min-height: 330px;
    padding: 22px 18px 18px;
    border: 3px solid #3b3247;
    border-radius: 24px;
    background: linear-gradient(180deg, #17212e, #253d48);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    color: #f7fbfa;
}

.album-glow {
    position: relative;
    display: grid;
    place-items: center;
    width: 138px;
    aspect-ratio: 1;
    margin: 0 auto 16px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, #f29bc4 0 35%, #84d6cc 35% 64%, #f7d37a 64%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.album-glow::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 2px solid rgba(255, 255, 255, 0.68);
    border-radius: 50%;
}

.album-glow span {
    width: 34px;
    aspect-ratio: 1;
    border: 8px solid rgba(21, 31, 40, 0.88);
    border-radius: 50%;
    background: #fff0b7;
    z-index: 1;
}

.track-count {
    color: #9ce3d9;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.mystery-title {
    margin-top: 8px;
    font-family: Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.05;
    text-align: center;
}

.track-hint {
    min-height: 2.7em;
    margin-top: 9px;
    color: rgba(247, 251, 250, 0.78);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.lyric-caption {
    display: grid;
    place-items: center;
    min-height: 6.8em;
    margin-top: 14px;
    padding: 13px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff5c9;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    text-wrap: balance;
}

.song-game.final-song-mode .song-question,
.song-game.final-song-mode .song-options,
.song-game.final-song-mode .song-reveal .answer-result,
.song-game.final-song-mode .song-reveal .song-answer-title {
    display: none;
}

.song-game.final-song-mode .album-glow {
    background:
        linear-gradient(135deg, #ffd36e 0 34%, #f29bc4 34% 67%, #9ce3d9 67%);
}

.song-progress {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    color: #e9fcf7;
    font-size: 0.76rem;
    font-weight: 800;
}

.song-progress input {
    width: 100%;
    accent-color: #f7d37a;
    cursor: pointer;
}

.player-wheel {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-content: center;
    width: 246px;
    aspect-ratio: 1;
    margin: 28px auto 0;
    padding: 48px 25px;
    border: 2px solid rgba(70, 62, 85, 0.14);
    border-radius: 50%;
    background: #fffafc;
    box-shadow:
        inset 0 2px 14px rgba(255, 255, 255, 0.92),
        inset 0 -12px 22px rgba(122, 122, 143, 0.12),
        0 14px 26px rgba(52, 43, 70, 0.12);
}

.player-wheel::after {
    content: "";
    position: absolute;
    inset: 82px;
    border: 1px solid rgba(93, 4, 59, 0.14);
    border-radius: 50%;
    background: rgba(239, 227, 238, 0.78);
}

.wheel-button {
    position: relative;
    z-index: 1;
    min-height: 50px;
    border: 0;
    border-radius: 18px;
    background: #273d4a;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 20px rgba(35, 50, 62, 0.2);
    transition: transform 160ms ease, background 160ms ease;
}

.wheel-button.restart {
    background: #5d365a;
}

.wheel-button:hover {
    background: #166f7b;
    transform: translateY(-1px);
}

.song-quiz {
    min-width: 0;
}

.song-question {
    font-family: Georgia, serif;
    font-size: clamp(1.7rem, 3.4vw, 3rem);
    line-height: 1.06;
    text-align: center;
}

.song-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.song-option {
    min-height: 72px;
    border: 2px solid rgba(93, 4, 59, 0.2);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.74);
    color: #5d043b;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.22;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(93, 4, 59, 0.1);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.song-option:hover:not(:disabled) {
    border-color: #167988;
    background: rgba(255, 255, 255, 0.94);
    transform: translateY(-2px);
}

.song-option.correct {
    border-color: #208a45;
    background: #2fbf67;
    color: #fff;
}

.song-option.wrong {
    border-color: #b4233b;
    background: #e5485d;
    color: #fff;
}

.song-option:disabled {
    cursor: default;
}

.song-reveal {
    margin-top: 22px;
    padding: 22px;
    border: 2px solid rgba(93, 4, 59, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 16px 30px rgba(93, 4, 59, 0.11);
    text-align: center;
}

.song-reveal .answer-result {
    margin-bottom: 10px;
}

.song-answer-title {
    font-family: Georgia, serif;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.1;
}

.song-explanation {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
}

.song-next {
    position: relative;
    --song-ring-progress: 0%;
    z-index: 0;
    margin-top: 18px;
}

.song-next.locked {
    opacity: 0.82;
}

.song-next.locked::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    background: conic-gradient(#167988 var(--song-ring-progress), rgba(93, 4, 59, 0.18) 0);
    z-index: -1;
}

.song-next.locked::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: #b91572;
    z-index: -1;
}

.meme-break {
    display: none;
    width: min(100%, 760px);
    margin: 28px auto 0;
    color: #5d043b;
}

.meme-break.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.meme-title {
    font-family: Georgia, serif;
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 18px 20px;
    border: 2px solid rgba(93, 4, 59, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 36px rgba(93, 4, 59, 0.12);
    font-size: clamp(1.35rem, 3vw, 2.3rem);
    line-height: 1.14;
    text-align: center;
}

.meme-tv {
    width: min(100%, 620px);
    margin: 24px auto 0;
}

.meme-tv-screen {
    position: relative;
    padding: 16px;
    border: 10px solid #3f2f46;
    border-radius: 24px;
    background: #171820;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.08),
        0 24px 52px rgba(93, 4, 59, 0.2);
}

.meme-tv-screen::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 36%);
    pointer-events: none;
    z-index: 1;
}

.meme-video {
    display: block;
    width: 100%;
    max-height: 58vh;
    border-radius: 12px;
    background: #000;
}

.meme-description {
    width: min(100%, 680px);
    margin: 18px auto 0;
    padding: 16px 18px;
    border: 2px solid rgba(93, 4, 59, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 14px 30px rgba(93, 4, 59, 0.1);
    color: #5d043b;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
}

.meme-next {
    display: flex;
    position: relative;
    --meme-ring-progress: 0%;
    z-index: 0;
    margin: 34px auto 10px;
}

.meme-next.locked {
    opacity: 0.82;
}

.meme-next.locked::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    background: conic-gradient(#167988 var(--meme-ring-progress), rgba(93, 4, 59, 0.18) 0);
    z-index: -1;
}

.meme-next.locked::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: #b91572;
    z-index: -1;
}

.charlie-game {
    display: none;
    width: min(100%, 960px);
    margin: 28px auto 0;
    color: #5d043b;
}

.charlie-game.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.charlie-title {
    font-family: Georgia, serif;
    margin: 0 auto 16px;
    font-size: clamp(1.45rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.charlie-scene-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 8px solid rgba(93, 4, 59, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 24px 52px rgba(93, 4, 59, 0.18);
    cursor: crosshair;
    overflow: hidden;
}

.charlie-scene-button:disabled {
    cursor: default;
}

.charlie-scene {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.charlie-feedback {
    width: fit-content;
    max-width: min(100%, 720px);
    min-height: 1.35em;
    margin: 16px auto 0;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #5d043b;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    box-shadow: 0 14px 28px rgba(93, 4, 59, 0.12);
}

.charlie-feedback.success {
    background: rgba(221, 255, 229, 0.9);
    color: #136631;
}

.charlie-feedback.miss {
    background: rgba(255, 241, 246, 0.92);
    color: #94115c;
}

.letter-envelope-panel {
    display: none;
    width: min(100%, 520px);
    margin: 34px auto 0;
    color: #5d043b;
}

.letter-envelope-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.letter-envelope {
    position: relative;
    width: min(78vw, 320px);
    aspect-ratio: 1.45;
    margin: 0 auto 24px;
}

.letter-envelope-front,
.letter-envelope-flap,
.letter-envelope-paper {
    position: absolute;
    inset: 0;
    border-radius: 8px;
}

.letter-envelope-front {
    background:
        linear-gradient(145deg, transparent 49%, rgba(93, 4, 59, 0.18) 50%, transparent 51%),
        linear-gradient(215deg, transparent 49%, rgba(93, 4, 59, 0.18) 50%, transparent 51%),
        #fff7fb;
    border: 2px solid rgba(93, 4, 59, 0.22);
    box-shadow: 0 24px 52px rgba(93, 4, 59, 0.16);
    z-index: 2;
}

.letter-envelope-flap {
    clip-path: polygon(0 0, 100% 0, 50% 58%);
    background: #ffd8e8;
    border: 2px solid rgba(93, 4, 59, 0.18);
    transform: translateY(-20%) rotateX(10deg);
    transform-origin: top;
    z-index: 3;
}

.letter-envelope-paper {
    inset: 10% 12% auto;
    height: 60%;
    border: 2px solid rgba(93, 4, 59, 0.12);
    background: #fffdf8;
    box-shadow: 0 10px 24px rgba(93, 4, 59, 0.12);
    z-index: 1;
}

.letter-open-button {
    min-width: 140px;
}

.letter-page {
    display: none;
    width: min(100%, 760px);
    max-height: min(74vh, 760px);
    margin: 28px auto 0;
    padding: 32px;
    overflow-y: auto;
    border: 2px solid rgba(93, 4, 59, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.92)),
        repeating-linear-gradient(#fff9ef 0 30px, #f7ead8 31px 32px);
    box-shadow: 0 24px 54px rgba(93, 4, 59, 0.16);
    color: #4f1837;
    text-align: left;
}

.letter-page.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.letter-title {
    margin: 4px 0 20px;
    color: #5d043b;
    font-family: Georgia, serif;
    font-size: clamp(1.65rem, 4vw, 2.7rem);
    line-height: 1.1;
    text-align: center;
}

.letter-body {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.75;
}

.letter-body p {
    margin: 0 0 18px;
}

.letter-next-button {
    display: block;
    margin: 26px auto 0;
}

.outro-credits {
    display: none;
    position: relative;
    width: 100%;
    height: 78vh;
    margin: 0 auto;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    color: #5d043b;
}

.outro-credits.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.outro-crawl {
    position: absolute;
    left: 50%;
    top: 100%;
    width: min(86%, 640px);
    transform: translateX(-50%);
    text-align: center;
}

.outro-crawl.roll {
    animation: creditsRoll 178s linear forwards;
}

.outro-crawl.rewind {
    animation: creditsRewind 1.6s ease-in forwards;
}

.outro-crawl p {
    margin: 0 0 30px;
    font-family: Georgia, serif;
    font-size: clamp(1.15rem, 2.8vw, 2.1rem);
    line-height: 1.45;
}

.outro-crawl p:first-child {
    margin-bottom: 42px;
    font-size: clamp(2rem, 6vw, 4.4rem);
    font-weight: 700;
}

.outro-final-end {
    margin-top: 52px;
    font-size: clamp(2.2rem, 7vw, 5rem) !important;
    font-weight: 700;
}

.final-random-words {
    height: 82vh;
}

.final-words-crawl {
    width: min(90%, 760px);
}

.final-words-crawl.roll {
    animation: finalWordsRoll 260s linear forwards;
}

.final-words-crawl p:first-child {
    margin-bottom: 42px;
    font-size: clamp(1.8rem, 5vw, 3.8rem);
    font-weight: 700;
}

.birthday-cake-panel {
    display: none;
    width: min(100%, 720px);
    margin: 24px auto 0;
    color: #5d043b;
}

.birthday-cake-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.cake-title {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    line-height: 1.08;
}

.cake-status {
    min-height: 1.4em;
    margin: 10px auto 0;
    width: fit-content;
    max-width: min(100%, 520px);
    padding: 10px 16px;
    border: 2px solid rgba(185, 21, 114, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(93, 4, 59, 0.1);
}

.cake-stage {
    position: relative;
    width: min(100%, 620px);
    height: 470px;
    margin: 22px auto 0;
    perspective: 1100px;
    touch-action: none;
    cursor: grab;
}

.cake-stage:active {
    cursor: grabbing;
}

.cake-turntable {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(82vw, 430px);
    height: 380px;
    --cake-rotate: -18deg;
    transform: translate(-50%, -50%) rotateX(58deg) rotateZ(var(--cake-rotate));
    transform-style: preserve-3d;
    transition: transform 120ms ease-out;
}

.cake-candles {
    position: absolute;
    inset: 16px 22px 104px;
    border-radius: 50%;
    transform: translateZ(64px);
    transform-style: preserve-3d;
    z-index: 6;
}

.cake-candle {
    display: flex;
    position: absolute;
    left: 50%;
    top: 50%;
    flex-direction: column;
    align-items: center;
    width: 34px;
    height: 78px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform:
        translate(-50%, -50%)
        rotateZ(var(--candle-angle))
        rotateX(-58deg)
        translateZ(62px);
    transform-origin: center bottom;
    z-index: 8;
}

.candle-stick {
    display: block;
    width: 10px;
    height: 38px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        135deg,
        #fff7fb 0 6px,
        #b91572 6px 10px
    );
    box-shadow: 0 4px 8px rgba(93, 4, 59, 0.14);
}

.candle-wick {
    display: block;
    width: 2px;
    height: 8px;
    margin-bottom: -1px;
    background: #3f2f46;
}

.candle-flame {
    display: block;
    width: 18px;
    height: 24px;
    margin-bottom: 1px;
    border-radius: 50% 50% 48% 48%;
    background: radial-gradient(circle at 50% 68%, #fff7a8 0 25%, #ffb22e 42%, #e85d38 72%);
    box-shadow: 0 0 16px rgba(255, 139, 44, 0.75);
    transform-origin: 50% 100%;
    animation: candleFlicker 900ms ease-in-out infinite alternate;
}

.cake-candle.out {
    cursor: default;
}

.cake-candle.out .candle-flame {
    opacity: 0;
    transform: scale(0);
    animation: none;
}

.cake-candle.out .candle-wick {
    background: #6f4260;
}

.guinea-pig-cake {
    position: absolute;
    left: 50%;
    top: 43%;
    width: min(48%, 190px);
    height: auto;
    transform: translate(-50%, -50%) rotateX(-58deg) translateZ(92px);
    filter: drop-shadow(0 12px 10px rgba(93, 4, 59, 0.18));
    user-select: none;
    -webkit-user-drag: none;
    z-index: 7;
}

.guinea-pig-cake.framed {
    padding: 8px;
    border-radius: 50%;
    background: #fff7fb;
}

.cake-top {
    position: absolute;
    inset: 16px 22px 104px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.97) 0 42%, transparent 43%),
        radial-gradient(circle at 27% 34%, #ffb22e 0 2px, transparent 3px),
        radial-gradient(circle at 72% 28%, #167988 0 2px, transparent 3px),
        radial-gradient(circle at 65% 72%, #b91572 0 2px, transparent 3px),
        #fff7fb;
    box-shadow:
        inset 0 -16px 30px rgba(185, 21, 114, 0.1),
        0 0 0 4px rgba(255, 255, 255, 0.6);
    transform: translateZ(48px);
    transform-style: preserve-3d;
    z-index: 5;
}

.cake-message {
    position: absolute;
    left: 50%;
    bottom: 26px;
    margin: 0;
    color: #b91572;
    font-family: Georgia, serif;
    font-size: clamp(1rem, 3vw, 1.45rem);
    font-weight: 700;
    line-height: 1.1;
    text-transform: lowercase;
    transform: translateX(-50%) rotateX(-58deg) translateZ(16px);
    white-space: nowrap;
    z-index: 9;
}

.cake-side {
    position: absolute;
    inset: 70px 22px 26px;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 247, 251, 0.98) 0 18%, rgba(246, 169, 202, 0.98) 19% 58%, #d95f99 59% 100%);
    box-shadow:
        inset 0 -34px 54px rgba(93, 4, 59, 0.16),
        0 34px 58px rgba(93, 4, 59, 0.2);
    transform: translateZ(-10px);
    overflow: hidden;
    z-index: 2;
}

.cake-side::before,
.cake-side::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 48%;
    border-radius: 50%;
}

.cake-side::before {
    top: -2px;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.78) 0 54%, rgba(255, 247, 251, 0.32) 55% 100%);
}

.cake-side::after {
    bottom: -20px;
    background: rgba(185, 21, 114, 0.1);
}

.cake-drip {
    position: absolute;
    top: 58px;
    width: 34px;
    height: 76px;
    border-radius: 0 0 999px 999px;
    background: rgba(255, 247, 251, 0.9);
    z-index: 3;
}

.cake-drip.one {
    left: 24%;
}

.cake-drip.two {
    left: 48%;
    height: 92px;
}

.cake-drip.three {
    right: 22%;
}

.cake-sprinkles {
    position: absolute;
    inset: 118px 48px auto;
    height: 38px;
    background:
        linear-gradient(90deg, #167988 0 14px, transparent 14px 34px),
        linear-gradient(90deg, #ffb22e 0 12px, transparent 12px 42px),
        linear-gradient(90deg, #5d043b 0 10px, transparent 10px 38px);
    background-size: 62px 10px, 74px 10px, 68px 10px;
    background-position: 0 0, 12px 13px, 30px 25px;
    z-index: 4;
}

.cake-shadow {
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 74%;
    height: 54px;
    border-radius: 50%;
    background: rgba(93, 4, 59, 0.16);
    filter: blur(8px);
    transform: translateX(-50%) translateZ(-40px);
    z-index: 0;
}

/* Rebuilt solid birthday cake: filled round cake with a printed guinea pig top. */
.cake-stage {
    height: 480px;
    perspective: 900px;
}

.cake-turntable {
    top: 52%;
    width: min(86vw, 470px);
    height: 360px;
    transform: translate(-50%, -50%) rotateX(10deg) rotateY(var(--cake-rotate));
}

.cake-top {
    inset: 12px 28px 156px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 42% 34%, rgba(255, 255, 255, 0.92) 0 10%, transparent 11%),
        radial-gradient(circle at 22% 46%, #167988 0 3px, transparent 4px),
        radial-gradient(circle at 36% 72%, #ffb22e 0 3px, transparent 4px),
        radial-gradient(circle at 76% 40%, #b91572 0 3px, transparent 4px),
        radial-gradient(circle at 68% 76%, #5d043b 0 3px, transparent 4px),
        linear-gradient(145deg, #fff9fc, #ffe0ed 58%, #ffc1db);
    box-shadow:
        inset 0 -10px 26px rgba(185, 21, 114, 0.12),
        inset 0 8px 22px rgba(255, 255, 255, 0.85),
        0 8px 0 #f3a4c8,
        0 18px 34px rgba(93, 4, 59, 0.16);
    transform: none;
    z-index: 6;
}

.cake-side {
    inset: 84px 28px 42px;
    border-radius: 0 0 44% 44% / 0 0 20% 20%;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 16% 84%, rgba(93, 4, 59, 0.14)),
        linear-gradient(180deg, #ffc2dc 0 13%, #ed83b5 14% 58%, #d65a97 59% 100%);
    box-shadow:
        inset 0 -30px 48px rgba(93, 4, 59, 0.18),
        inset 28px 0 40px rgba(255, 255, 255, 0.18),
        0 30px 42px rgba(93, 4, 59, 0.18);
    transform: none;
    z-index: 2;
}

.cake-side::before {
    top: -56px;
    height: 112px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 249, 252, 0.9), rgba(255, 210, 231, 0.8));
}

.cake-side::after {
    bottom: -28px;
    height: 70px;
    border-radius: 50%;
    background: rgba(93, 4, 59, 0.12);
}

.cake-drip {
    top: 16px;
    background: #fff8fc;
}

.cake-drip.one {
    left: 19%;
    height: 78px;
}

.cake-drip.two {
    left: 47%;
    height: 106px;
}

.cake-drip.three {
    right: 18%;
    height: 86px;
}

.cake-candles {
    inset: 12px 28px 156px;
    transform: none;
    z-index: 9;
}

.cake-candle {
    width: 34px;
    height: 82px;
    transform: translate(-50%, -92%);
}

.guinea-pig-cake {
    top: 46%;
    width: min(42%, 180px);
    transform: translate(-50%, -50%);
    filter:
        drop-shadow(0 2px 0 rgba(255, 255, 255, 0.8))
        drop-shadow(0 8px 8px rgba(93, 4, 59, 0.14));
    z-index: 8;
}

.cake-message {
    bottom: 23px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 247, 251, 0.72);
    transform: translateX(-50%);
    z-index: 10;
}

.cake-sprinkles {
    inset: 124px 54px auto;
    z-index: 5;
}

.cake-shadow {
    bottom: 18px;
    width: 82%;
    transform: translateX(-50%);
}

/* Final cake mode: front-facing normal birthday cake, no 360 rotation. */
.cake-stage {
    height: 460px;
    perspective: none;
    touch-action: auto;
    cursor: default;
}

.cake-stage:active {
    cursor: default;
}

.cake-turntable {
    top: 52%;
    width: min(94vw, 560px);
    height: 390px;
    transform: translate(-50%, -50%);
    transform-style: flat;
    transition: none;
}

.cake-top {
    inset: 26px 30px 184px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 45% 32%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
        radial-gradient(circle at 18% 40%, #167988 0 3px, transparent 4px),
        radial-gradient(circle at 31% 70%, #ffb22e 0 3px, transparent 4px),
        radial-gradient(circle at 76% 42%, #b91572 0 3px, transparent 4px),
        radial-gradient(circle at 66% 73%, #5d043b 0 3px, transparent 4px),
        linear-gradient(145deg, #fffafc, #ffe1ee 58%, #ffc6dd);
    box-shadow:
        inset 0 -10px 22px rgba(185, 21, 114, 0.12),
        0 8px 0 #efa1c5,
        0 18px 30px rgba(93, 4, 59, 0.14);
    transform: none;
}

.cake-side {
    inset: 105px 30px 28px;
    border-radius: 0 0 34px 34px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 17% 83%, rgba(93, 4, 59, 0.16)),
        linear-gradient(180deg, #ffc4dc 0 14%, #eb82b3 15% 60%, #d65a97 61% 100%);
    box-shadow:
        inset 0 -34px 54px rgba(93, 4, 59, 0.18),
        0 28px 40px rgba(93, 4, 59, 0.16);
    transform: none;
}

.cake-side::before {
    top: -74px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 247, 251, 0.68);
}

.cake-side::after {
    bottom: -30px;
    height: 70px;
}

.cake-candles {
    inset: 26px 30px 184px;
    transform: none;
}

.cake-candle {
    width: 44px;
    height: 96px;
    transform: translate(-50%, -96%);
    z-index: 12;
}

.candle-stick {
    width: 12px;
    height: 44px;
}

.candle-flame {
    width: 20px;
    height: 27px;
}

.guinea-pig-cake {
    top: 45%;
    width: min(35%, 170px);
    transform: translate(-50%, -50%);
    filter:
        drop-shadow(0 2px 0 rgba(255, 255, 255, 0.8))
        drop-shadow(0 6px 6px rgba(93, 4, 59, 0.13));
}

.cake-message {
    bottom: 18px;
    transform: translateX(-50%);
}

.cake-side {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 18% 82%, rgba(93, 4, 59, 0.14)),
        linear-gradient(180deg, #f6a4c9 0%, #ea7fb2 52%, #d95f99 100%);
}

.cake-side::before {
    background: #fff7fb;
}

.cake-side::after {
    background: rgba(93, 4, 59, 0.1);
}

.cake-drip,
.cake-sprinkles {
    display: none;
}

.gift-panel {
    display: none;
    width: min(100%, 680px);
    margin: 30px auto 0;
    color: #5d043b;
}

.gift-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.gift-box {
    position: relative;
    width: min(90vw, 520px);
    height: 500px;
    margin: 0 auto;
    overflow: visible;
}

.gift-box::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 260px;
    height: 160px;
    border-radius: 12px 12px 18px 18px;
    background: linear-gradient(145deg, #ff9cc7, #d95f99);
    box-shadow: 0 22px 42px rgba(93, 4, 59, 0.18);
    transform: translateX(-50%);
}

.gift-lid {
    position: absolute;
    left: 50%;
    bottom: 176px;
    width: 294px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffc6dc, #e06da5);
    box-shadow: 0 12px 24px rgba(93, 4, 59, 0.14);
    transform: translateX(-50%);
    transform-origin: 12% 100%;
    z-index: 4;
    transition: transform 650ms ease;
}

.gift-ribbon {
    position: absolute;
    left: 50%;
    bottom: 34px;
    background: #fff7fb;
    z-index: 5;
    transform: translateX(-50%);
}

.gift-ribbon.vertical {
    width: 34px;
    height: 206px;
    border-radius: 999px 999px 8px 8px;
}

.gift-ribbon.horizontal {
    bottom: 102px;
    width: 260px;
    height: 28px;
    border-radius: 999px;
}

.gift-open-button {
    position: absolute;
    left: 50%;
    bottom: -24px;
    transform: translateX(-50%);
    z-index: 8;
}

.lily-bouquet {
    position: absolute;
    left: 50%;
    bottom: 142px;
    width: 520px;
    height: 370px;
    opacity: 0;
    transform: translateX(-50%) translateY(96px) scale(0.55);
    transform-origin: 50% 100%;
    transition: opacity 900ms ease, transform 2200ms cubic-bezier(.16, 1.05, .26, 1);
    z-index: 2;
}

.gift-box.open .gift-lid {
    transform: translateX(-50%) translate(-74px, -72px) rotate(-22deg);
    z-index: 2;
}

.gift-box.open .lily-bouquet {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.08);
    z-index: 7;
}

.blooming-lily {
    position: absolute;
    width: 150px;
    height: 150px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 10px 12px rgba(93, 4, 59, 0.14));
}

.blooming-lily.lily-one {
    left: 185px;
    top: 0;
}

.blooming-lily.lily-two {
    left: 70px;
    top: 116px;
    transform: rotate(-20deg) scale(0.9);
}

.blooming-lily.lily-three {
    right: 70px;
    top: 116px;
    transform: rotate(20deg) scale(0.9);
}

.lily-petal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 118px;
    border-radius: 72% 72% 48% 48%;
    background:
        radial-gradient(ellipse at 50% 22%, rgba(255, 255, 255, 0.95) 0 18%, transparent 19%),
        linear-gradient(180deg, #fff 0%, #fff1f7 58%, #f2bfd2 100%);
    box-shadow: inset 0 -5px 7px rgba(185, 21, 114, 0.1);
    transform-origin: 50% 96%;
    opacity: 0;
}

.lily-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd56f 0 38%, #d88a28 39% 100%);
    transform: translate(-50%, -50%) scale(0);
    z-index: 6;
}

.gift-box.open .lily-center {
    animation: lilyCenterPop 900ms ease forwards;
    animation-delay: 1800ms;
}

.gift-box.open .lily-petal {
    opacity: 1;
    animation: lilyBloom 2600ms cubic-bezier(.16, 1.02, .28, 1) forwards;
}

.lily-petal.p1 {
    --open-transform: translate(-50%, -124%) rotate(0deg) rotateX(36deg);
    animation-delay: 1200ms;
}

.lily-petal.p2 {
    --open-transform: translate(-16%, -98%) rotate(56deg) rotateX(40deg);
    animation-delay: 1420ms;
}

.lily-petal.p3 {
    --open-transform: translate(-84%, -98%) rotate(-56deg) rotateX(40deg);
    animation-delay: 1420ms;
}

.lily-petal.p4 {
    --open-transform: translate(8%, -28%) rotate(114deg) rotateX(42deg);
    animation-delay: 1680ms;
}

.lily-petal.p5 {
    --open-transform: translate(-108%, -28%) rotate(-114deg) rotateX(42deg);
    animation-delay: 1680ms;
}

.lily-petal.p6 {
    --open-transform: translate(-50%, 8%) rotate(180deg) rotateX(40deg);
    animation-delay: 1900ms;
}

.lily-stem {
    position: absolute;
    bottom: 0;
    width: 7px;
    height: 282px;
    border-radius: 999px;
    background: #3f8e61;
    transform-origin: 50% 100%;
    transform: scaleY(0);
    opacity: 0;
}

.gift-box.open .lily-stem {
    opacity: 1;
    animation: stemGrow 1800ms ease forwards;
    animation-delay: 350ms;
}

.stem-one {
    left: 260px;
}

.stem-two {
    left: 210px;
    --stem-open-transform: rotate(-20deg) scaleY(1);
}

.stem-three {
    left: 310px;
    --stem-open-transform: rotate(20deg) scaleY(1);
}

.lily-leaf {
    position: absolute;
    bottom: 72px;
    width: 88px;
    height: 30px;
    border-radius: 50%;
    background: #54a774;
    opacity: 0;
    transform-origin: 50% 50%;
}

.leaf-one {
    left: 158px;
    --leaf-open-transform: rotate(22deg) scale(1);
}

.leaf-two {
    right: 158px;
    --leaf-open-transform: rotate(-22deg) scale(1);
}

.gift-box.open .lily-leaf {
    animation: leafUnfold 1200ms ease forwards;
    animation-delay: 1500ms;
}

.dynamite-box::before {
    background: linear-gradient(145deg, #1f1f1f, #525252);
}

.dynamite-box .gift-lid {
    background: linear-gradient(145deg, #737373, #2f2f2f);
}

.dynamite-box .gift-ribbon {
    background: #e23b3b;
}

.dynamite-gift-reveal {
    position: absolute;
    left: 50%;
    bottom: 132px;
    width: min(94vw, 520px);
    opacity: 0;
    transform: translateX(-50%) translateY(64px) scale(0.84);
    transition: opacity 520ms ease, transform 720ms cubic-bezier(.2, 1.25, .32, 1);
    z-index: 3;
}

.dynamite-box.open .gift-lid {
    transform: translateX(-50%) translate(58px, -52px) rotate(18deg);
}

.dynamite-box.open .dynamite-gift-reveal {
    opacity: 1;
    transform: translateX(-50%) translateY(-22px) scale(1);
    z-index: 7;
}

.dynamite-gift-card {
    display: block;
    width: min(100%, 500px);
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 18px 34px rgba(20, 20, 20, 0.18);
}

.dynamite-gift-reveal p {
    margin: 14px auto 0;
    padding: 14px 16px;
    border: 2px solid rgba(93, 4, 59, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #5d043b;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.42;
    box-shadow: 0 14px 28px rgba(93, 4, 59, 0.1);
}

.snack-panel {
    display: none;
    width: min(100%, 560px);
    margin: 28px auto 0;
    padding: 28px;
    border: 2px solid rgba(93, 4, 59, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 50px rgba(93, 4, 59, 0.12);
    color: #5d043b;
}

.snack-panel.show {
    display: block;
    animation: riseIn 500ms ease both;
}

.snack-title {
    width: min(100%, 500px);
    margin: 0 auto;
    font-family: Georgia, serif;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.14;
    text-align: center;
}

.snack-stage {
    display: grid;
    place-items: center;
    width: min(100%, 360px);
    margin: 24px auto 0;
    aspect-ratio: 1;
    border: 2px solid rgba(185, 21, 114, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.85), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 223, 238, 0.68));
    box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.5), 0 18px 36px rgba(93, 4, 59, 0.12);
    overflow: hidden;
}

.snack-photo {
    display: block;
    width: min(88%, 310px);
    max-height: 88%;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 18px 22px rgba(93, 4, 59, 0.18));
    transform-origin: center;
}

.snack-stage.eating .snack-photo {
    animation: snackBite 620ms ease both;
}

.snack-stage.drinking .snack-photo {
    animation: snackSip 760ms ease both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes creditsRoll {
    from {
        top: 100%;
    }
    to {
        top: -650%;
    }
}

@keyframes creditsRewind {
    from {
        top: -650%;
    }
    to {
        top: -1450%;
    }
}

@keyframes finalWordsRoll {
    from {
        top: 100%;
    }
    to {
        top: -720%;
    }
}

@keyframes candleFlicker {
    from {
        transform: rotate(-3deg) scale(0.94);
    }
    to {
        transform: rotate(4deg) scale(1.06);
    }
}

@keyframes stemGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: var(--stem-open-transform, scaleY(1));
    }
}

@keyframes leafUnfold {
    from {
        opacity: 0;
        transform: scale(0.2);
    }
    to {
        opacity: 1;
        transform: var(--leaf-open-transform, scale(1));
    }
}

@keyframes lilyBloom {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.18) rotate(0deg) rotateX(86deg);
    }
    to {
        opacity: 1;
        transform: var(--open-transform);
    }
}

@keyframes lilyCenterPop {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bottlePress {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    36% {
        transform: translateY(5px) rotate(-1.6deg);
    }
}

@keyframes perfumeSpray {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.3);
    }
    22% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) scale(1.35);
    }
}

@keyframes keysTaken {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    38% {
        transform: translateY(-10px) rotate(-4deg) scale(1.04);
    }

    100% {
        transform: translateY(0) rotate(3deg) scale(1);
    }
}

@keyframes snackBite {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }

    35% {
        transform: scale(0.94) rotate(-2deg);
    }

    68% {
        transform: scale(1.04) rotate(2deg);
    }
}

@keyframes snackSip {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    42% {
        transform: translateY(-12px) rotate(-5deg);
    }

    72% {
        transform: translateY(-4px) rotate(3deg);
    }
}

@keyframes clubPop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes clubLeave {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.04);
    }
}

@keyframes sadNoteIn {
    from {
        opacity: 0;
        transform: translateY(18px) rotate(-0.8deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(-0.8deg);
    }
}

@keyframes beatRing {
    0%, 100% {
        transform: scale(0.92);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes letterSpawn {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.42) rotate(var(--tilt));
    }
    64% {
        opacity: 1;
        transform: translateY(var(--hop)) scale(1.16) rotate(var(--tilt-back));
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes letterBounce {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) scale(1.04) rotate(var(--tilt));
    }
}

.guinea-pig {
    position: absolute;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

.guinea-pig img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .song-stage {
        grid-template-columns: 1fr;
    }

    .main-title {
        font-size: 2.5em;
        letter-spacing: 2px;
    }

    .title-box {
        padding: 40px 20px;
        margin-top: 20px;
    }

    /* Adjust guinea pig sizes for mobile */
    .gp1 { width: 50px; height: 50px; }
    .gp2 { width: 55px; height: 55px; }
    .gp3 { width: 45px; height: 45px; }
    .gp4 { width: 60px; height: 60px; }
    .gp5 { width: 50px; height: 50px; }
    .gp6 { width: 55px; height: 55px; }
    .gp7 { width: 50px; height: 50px; }
    .gp8 { width: 65px; height: 65px; }
    .gp9 { width: 45px; height: 45px; }
    .gp10 { width: 50px; height: 50px; }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .intro-screen {
        align-items: center;
        padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
    }

    .intro-screen.song-mode {
        align-items: flex-start;
    }

    .intro-box {
        padding: 24px 0;
    }

    .intro-text {
        font-size: clamp(1.45rem, 8vw, 2.45rem);
        line-height: 1.16;
        letter-spacing: 0.025em;
        max-width: 100%;
    }

    .login-panel {
        width: 100%;
        margin-top: 24px;
        padding: 20px;
    }

    .password-input {
        min-height: 48px;
    }

    .password-row {
        flex-direction: column;
    }

    .login-button {
        min-height: 46px;
    }

    .contract-panel {
        width: 100%;
        margin-top: 22px;
        padding: 20px;
        border-radius: 18px;
    }

    .contract-title {
        font-size: 1.35rem;
    }

    .contract-copy {
        margin-top: 12px;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .contract-acknowledgment {
        gap: 10px;
        margin-top: 16px;
        padding: 12px;
        font-size: 0.88rem;
    }

    .contract-agree {
        width: 100%;
    }

    .perfume-panel {
        width: 100%;
        margin-top: 22px;
        padding: 20px;
        border-radius: 18px;
    }

    .perfume-title {
        font-size: 1.35rem;
    }

    .perfume-stage {
        width: min(100%, 290px);
        margin-top: 18px;
        border-radius: 18px;
    }

    .perfume-bottle {
        width: 76%;
    }

    .spray-mist {
        top: 28%;
        left: 55%;
    }

    .perfume-actions {
        flex-direction: column;
    }

    .game-card {
        width: 100%;
        margin-top: 18px;
    }

    .card-inner {
        height: min(72vh, 560px);
        min-height: 410px;
    }

    .game-card.has-photo .card-inner {
        height: min(78vh, 680px);
        min-height: 560px;
    }

    .game-card.has-thread .card-inner {
        height: min(82vh, 720px);
        min-height: 650px;
    }

    .card-face {
        padding: 18px;
        border-radius: 18px;
    }

    .card-back {
        align-items: center;
        justify-content: center;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .game-card.has-photo .card-back {
        justify-content: flex-start;
    }

    .game-card.has-thread .card-back {
        justify-content: flex-start;
    }

    .question-label {
        margin-bottom: 8px;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .question-text {
        font-size: clamp(1.22rem, 7vw, 1.75rem);
        line-height: 1.18;
    }

    .answer-options {
        gap: 10px;
        margin-top: 18px;
    }

    .answer-option {
        min-height: 46px;
        padding: 11px 14px;
        border-radius: 18px;
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .answer-result {
        margin-bottom: 9px;
        font-size: 0.76rem;
        letter-spacing: 0.06em;
    }

    .answer-title {
        font-size: 1.2rem;
        line-height: 1.16;
    }

    .game-card.has-long-answer .card-inner {
        min-height: 700px;
    }

    .game-card.has-huge-answer .card-inner {
        min-height: 760px;
    }

    .answer-explanation {
        margin-top: 12px;
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .game-card.has-long-answer .answer-explanation {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .game-card.has-huge-answer .answer-explanation {
        font-size: 0.68rem;
        line-height: 1.22;
    }

    .answer-photo-frame {
        width: min(100%, 235px);
        margin-top: 14px;
        padding: 8px;
        border-radius: 16px;
    }

    .answer-photo-frame img {
        max-height: 220px;
        border-radius: 10px;
    }

    .message-thread {
        width: 100%;
        gap: 7px;
        margin-top: 12px;
        padding: 10px;
        border-radius: 18px;
    }

    .answer-footnote {
        width: 100%;
        margin-top: 10px;
        padding-top: 8px;
        font-size: 0.72rem;
        line-height: 1.32;
    }

    .message-bubble {
        max-width: 84%;
        padding: 8px 11px;
        font-size: 0.78rem;
        line-height: 1.28;
    }

    .message-row.system .message-bubble {
        max-width: 96%;
        font-size: 0.72rem;
    }

    .card-actions {
        gap: 8px;
        margin-top: 16px;
    }

    .card-action {
        flex: 1;
        min-height: 44px;
        padding: 10px 12px;
    }

    .tic-tac-toe {
        width: 100%;
        margin-top: 18px;
        padding: 18px;
        border-radius: 18px;
    }

    .tic-status {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .tic-board {
        width: min(100%, 300px);
        gap: 8px;
        margin-top: 18px;
    }

    .tic-cell {
        border-radius: 12px;
    }

    .tic-reset {
        width: 100%;
    }

    .hoe-interlude {
        width: 100%;
        min-height: 310px;
        margin-top: 18px;
        padding: 34px 12px;
        border-radius: 18px;
    }

    .hoe-letters {
        font-size: clamp(2rem, 14vw, 4.25rem);
        line-height: 1.02;
    }

    .sad-note-card {
        width: 100%;
        max-height: 78vh;
        margin-top: 18px;
        padding: 18px 16px;
        border-radius: 18px;
    }

    .sad-note-title {
        font-size: 1.45rem;
    }

    .sad-note-copy p {
        margin-top: 10px;
        font-size: 0.86rem;
        line-height: 1.38;
    }

    .sad-note-continue {
        width: 100%;
    }

    .song-game {
        width: 100%;
        margin-top: 20px;
        padding: 16px 10px;
        border-radius: 18px;
    }

    .song-stage {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .music-player {
        width: min(100%, 278px);
        min-height: 0;
        padding: 15px 13px 18px;
        border-radius: 34px;
    }

    .player-screen {
        min-height: 246px;
        padding: 14px 11px 13px;
        border-radius: 20px;
    }

    .album-glow {
        width: 88px;
        margin-bottom: 11px;
        border-radius: 20px;
    }

    .album-glow span {
        width: 26px;
        border-width: 6px;
    }

    .mystery-title {
        font-size: 1.35rem;
    }

    .track-hint {
        min-height: 2.35em;
        margin-top: 6px;
        font-size: 0.82rem;
    }

    .lyric-caption {
        min-height: 5.8em;
        margin-top: 9px;
        padding: 10px 9px;
        border-radius: 12px;
        font-size: 0.78rem;
        line-height: 1.28;
    }

    .meme-break {
        width: 100%;
        max-height: calc(100dvh - 28px);
        margin-top: 0;
        padding: 0 8px 14px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .meme-tv {
        margin-top: 8px;
    }

    .meme-tv-screen {
        padding: 5px;
        border-width: 5px;
        border-radius: 14px;
    }

    .meme-video {
        max-height: 32dvh;
        border-radius: 7px;
    }

    .meme-title {
        max-height: none;
        overflow: visible;
        padding: 10px;
        border-radius: 12px;
        font-size: clamp(0.7rem, 2.6vw, 0.86rem);
        line-height: 1.18;
    }

    .meme-description {
        max-height: none;
        margin-top: 8px;
        overflow: visible;
        padding: 10px;
        border-radius: 10px;
        font-size: clamp(0.62rem, 2.35vw, 0.78rem);
        line-height: 1.24;
    }

    .meme-next {
        width: fit-content;
        min-height: 42px;
        margin: 20px auto 10px;
        padding-inline: 28px;
    }

    .charlie-game {
        width: 100%;
        margin-top: 8px;
        padding: 0 6px 12px;
    }

    .charlie-title {
        margin-bottom: 10px;
        font-size: 1.35rem;
    }

    .charlie-scene-button {
        border-width: 4px;
        border-radius: 12px;
    }

    .charlie-feedback {
        max-width: 100%;
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 0.82rem;
    }

    .letter-envelope-panel {
        margin-top: 18px;
    }

    .letter-envelope {
        width: min(78vw, 260px);
        margin-bottom: 18px;
    }

    .letter-page {
        width: 100%;
        max-height: calc(100dvh - 32px);
        margin-top: 0;
        padding: 22px 18px;
        border-radius: 12px;
    }

    .letter-title {
        margin-bottom: 16px;
        font-size: 1.55rem;
    }

    .letter-body {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .outro-credits {
        height: calc(100dvh - 32px);
        margin-top: 0;
    }

    .outro-crawl.roll {
        animation-duration: 205s;
    }

    .outro-crawl p {
        margin-bottom: 24px;
        font-size: 1rem;
        line-height: 1.42;
    }

    .outro-crawl p:first-child {
        margin-bottom: 34px;
        font-size: 2rem;
    }

    .final-random-words {
        height: calc(100dvh - 32px);
    }

    .final-words-crawl.roll {
        animation-duration: 320s;
    }

    .birthday-cake-panel {
        width: 100%;
        margin-top: 12px;
    }

    .cake-title {
        font-size: 1.7rem;
    }

    .cake-status {
        font-size: 0.86rem;
    }

    .cake-stage {
        height: 410px;
        margin-top: 14px;
    }

    .cake-turntable {
        width: min(96vw, 360px);
        height: 330px;
    }

    .cake-candle {
        width: 34px;
        height: 78px;
    }

    .candle-flame {
        width: 16px;
        height: 21px;
    }

    .candle-stick {
        width: 9px;
        height: 34px;
    }

    .guinea-pig-cake {
        width: min(37%, 132px);
    }

    .cake-message {
        bottom: 20px;
        font-size: 0.95rem;
    }

    .cake-top,
    .cake-candles {
        inset: 30px 18px 156px;
    }

    .cake-side {
        inset: 108px 18px 34px;
    }

    .gift-panel {
        width: 100%;
        margin-top: 20px;
    }

    .gift-box {
        width: min(94vw, 360px);
        height: 420px;
    }

    .gift-box::before {
        width: 210px;
        height: 132px;
    }

    .gift-lid {
        bottom: 162px;
        width: 236px;
    }

    .gift-ribbon.horizontal {
        width: 210px;
    }

    .lily-bouquet {
        width: 430px;
        height: 310px;
        bottom: 122px;
        transform: translateX(-50%) translateY(92px) scale(0.42);
    }

    .gift-box.open .lily-bouquet {
        transform: translateX(-50%) translateY(0) scale(0.68);
    }

    .dynamite-gift-reveal {
        width: min(94vw, 350px);
        bottom: 118px;
    }

    .dynamite-gift-card {
        width: 100%;
    }

    .dynamite-gift-reveal p {
        font-size: 0.82rem;
        line-height: 1.34;
    }

    .prompt-actions {
        gap: 8px;
    }

    .prompt-actions .next-button {
        flex: 1;
        max-width: 160px;
        padding-inline: 18px;
    }

    .song-progress {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 7px;
        margin-top: 11px;
        font-size: 0.7rem;
    }

    .player-wheel {
        width: 174px;
        gap: 11px;
        margin-top: 14px;
        padding: 31px 14px;
    }

    .player-wheel::after {
        inset: 57px;
    }

    .wheel-button {
        min-height: 40px;
        border-radius: 14px;
        font-size: 0.76rem;
    }

    .song-question {
        font-size: 1.65rem;
    }

    .song-options {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 18px;
    }

    .song-option {
        min-height: 54px;
        border-radius: 16px;
        font-size: 0.94rem;
    }

    .song-reveal {
        margin-top: 16px;
        padding: 18px 14px;
        border-radius: 16px;
    }

    .song-explanation {
        font-size: 0.92rem;
        line-height: 1.42;
    }

    .song-game.final-song-mode .song-explanation {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .main-title {
        font-size: 2em;
        letter-spacing: 1px;
    }

    .title-box {
        padding: 30px 15px;
        margin-top: 15px;
    }

    /* Even smaller guinea pigs for tiny screens */
    .gp1 { width: 40px; height: 40px; }
    .gp2 { width: 40px; height: 40px; }
    .gp3 { width: 35px; height: 35px; }
    .gp4 { width: 45px; height: 45px; }
    .gp5 { width: 40px; height: 40px; }
    .gp6 { width: 40px; height: 40px; }
    .gp7 { width: 35px; height: 35px; }
    .gp8 { width: 45px; height: 45px; }
    .gp9 { width: 35px; height: 35px; }
    .gp10 { width: 40px; height: 40px; }
}
