:root { color-scheme: light; --mobile-red: #b52235; --mobile-ink: #60252b; --mobile-gold: #efb84d; --mobile-muted: #966a62; }
body { margin: 0; background: #fff5df; color: var(--mobile-ink); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; } button, a, input, select { touch-action: manipulation; } button, select { cursor: pointer; } button { min-height: 44px; } button:disabled { opacity: .46; cursor: not-allowed; } button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #efb84d; outline-offset: 3px; } [hidden] { display: none !important; }
.mobile-shell { width: min(100% - 32px, 460px); margin: 0 auto; padding: max(env(safe-area-inset-top), 18px) 0 max(env(safe-area-inset-bottom), 20px); }
.mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 2px 0 16px; border-bottom: 1px solid #e8d3ae; }
.brand-link { text-decoration: none; color: var(--mobile-ink); display: inline-flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 900; letter-spacing: -.5px; } .brand-link small { display: block; margin-top: 4px; font-size: 9px; letter-spacing: 1px; font-weight: 600; color: #997167; }

.round-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #dbc19d; border-radius: 50%; background: transparent; color: var(--mobile-ink); font-size: 23px; font-weight: 800; flex-shrink: 0; }
.connection-row { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #966a62; font-size: 10px; } #connection { display: inline-flex; align-items: center; gap: 6px; } #connection i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ba9365; } #connection[data-status="online"] i { background: #52855c; box-shadow: 0 0 0 3px #52855c18; } #connection[data-status="offline"] i { background: #b52235; } .date-pill { padding: 5px 8px; background: #f4e5c6; border-radius: 20px; letter-spacing: 1px; flex-shrink: 0; }
.festival-intro { position: relative; padding: 28px 0 25px; overflow: hidden; } .eyebrow { display: block; color: #a97253; font-size: 9px; letter-spacing: 1.35px; font-weight: 750; } .festival-intro h1 { position: relative; z-index: 1; font-size: clamp(30px, 8vw, 38px); line-height: 1.35; margin: 10px 0 12px; letter-spacing: -1px; font-weight: 950; } .festival-intro h1 span { color: var(--mobile-red); } .festival-intro p { font-size: 12px; line-height: 1.8; margin: 0; color: #966a62; }   
.character-preview { border-radius: 25px; overflow: hidden; background: #f5e7c7; border: 1px solid #e1cbaa; margin-bottom: 18px; } .preview-caption { display: flex; justify-content: space-between; padding: 15px 18px 0; font-size: 10px; font-weight: 700; color: #9b7152; letter-spacing: 1px; } .preview-scene { position: relative; height: 274px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: #fff2d9; } .preview-scene canvas { position: relative; height: 237px; width: auto; z-index: 3; margin-bottom: 25px; }  
    
    
.name-ribbon { position: absolute; z-index: 4; left: 50%; bottom: 15px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; border-radius: 9px; border: 1px solid #e5c27e; background: #fff5df; padding: 7px 15px; font-size: 12px; font-weight: 800; white-space: nowrap; } .name-ribbon i { color: #ba3542; font-style: normal; } .preview-bottom { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; border-top: 1px solid #e1cbaa; color: #997167; font-size: 10px; background: #fff1d4; } .text-button { background: none; border: none; color: var(--mobile-red); padding: 0 3px; min-height: 44px; font-size: 11px; font-weight: 750; }
.flow-card { border: 1px solid #e7d5b6; border-radius: 24px; background: #fffcf4; overflow: hidden; box-shadow: 0 10px 28px #7d302608; } .flow-steps { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; background: #fbecd2; border-bottom: 1px solid #e8d2ad; } .flow-steps button { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 0; border: none; color: #9c7c61; background: none; } .flow-steps button span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #e7d3b4; color: #a08870; font-size: 9px; } .flow-steps button[aria-current] { color: var(--mobile-red); opacity: 1; } .flow-steps button[aria-current] span { background: var(--mobile-red); color: #fff5df; } .flow-steps i { width: 17px; height: 1px; background: #d4b78e; }
.flow-panel { padding: 23px 20px 16px; } .panel-heading h2 { margin: 8px 0 9px; font-size: 24px; line-height: 1.4; letter-spacing: -.7px; font-weight: 900; } .panel-description { margin: 0 0 19px; color: #9b756b; font-size: 12px; line-height: 1.8; } .expression-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .expression-slots button { text-align: left; border: 1px solid #e6d4b4; padding: 11px 13px; border-radius: 13px; background: #fff5df; color: #9c7768; position: relative; overflow: hidden; min-height: 65px; } .expression-slots button[aria-pressed="true"] { border: 2px solid #b52235; padding: 10px 12px; color: #b52235; background: #fff4e5; } .expression-slots span { display: block; font-size: 14px; font-weight: 800; } .expression-slots small { display: block; margin-top: 5px; font-size: 9px; } .expression-slots img { width: 47px; height: 47px; border-radius: 50%; float: right; border: 2px solid #f1d292; }
.selfie-studio { position: relative; display: grid; place-items: center; height: 179px; background: url("/assets/mobile-bg-v1.png") center 61% / cover; margin-top: 13px; border-radius: 18px; overflow: hidden; } .selfie-face { width: 122px; height: 122px; background: #f5d98c; border-radius: 50%; border: 7px solid #fffcf4; box-shadow: 0 0 0 1px #e6cb96; position: relative; z-index: 1; overflow: hidden; } .selfie-face > img, .selfie-generated { width: 100%; height: 100%; object-fit: cover; }  .studio-stamp { position: absolute; bottom: 12px; right: 15px; border: 1px solid #b52235; border-radius: 5px; color: #b52235; padding: 5px; font-size: 14px; line-height: 1.1; transform: rotate(11deg); font-weight: 800; }
.photo-caption { margin: 15px 0; text-align: center; } .photo-caption strong { display: block; font-size: 14px; } .photo-caption span { font-size: 10px; color: #a17a6a; display: block; margin-top: 7px; } .photo-actions, .crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .button-primary, .button-secondary { min-height: 49px; padding: 11px 12px; border-radius: 12px; border: 1px solid #b52235; font-size: 13px; font-weight: 800; text-decoration: none; text-align: center; } .button-primary { color: #fff5df; background: #b52235; box-shadow: 0 4px 0 #8b1c2a; } .button-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #8b1c2a; } .button-secondary { color: #9b3540; background: #fff5df; border-color: #e0c399; } .full-width { display: block; width: 100%; margin: 17px 0 0; } .skip-button { display: block; width: 100%; background: transparent; border: none; color: #a27665; font-size: 11px; margin: 11px 0 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; } .photo-tools { display: flex; justify-content: center; align-items: center; gap: 8px; color: #a87d69; margin-top: 5px; font-size: 12px; } .photo-tools button { border: none; background: transparent; color: #a27665; font-size: 10px; padding: 0 5px; } .privacy-note { color: #a27f72; font-size: 9px; line-height: 1.8; text-align: center; margin: 12px 0 2px; }
.wardrobe-tabs { display: flex; background: #f7e9cd; border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 13px; } .wardrobe-tabs button { flex: 1; background: transparent; color: #977266; border: none; border-radius: 9px; font-weight: 800; font-size: 12px; } .wardrobe-tabs button[aria-selected="true"] { background: #b52235; color: #fff5df; box-shadow: 0 3px 5px #9c283324; } .outfit-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; } .outfit-option { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid #e9d7b9; background: #fbf1dd; padding: 0; color: #a07a62; overflow: hidden; } .outfit-option canvas { display: block; width: 100%; height: 100%; } .outfit-option[aria-pressed="true"] { border: 2px solid #b52235; background: #ffedce; } .option-number { position: absolute; top: 6px; left: 7px; font-size: 8px; font-weight: 750; opacity: .7; } .option-check { position: absolute; bottom: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; border-radius: 50%; background: #b52235; color: #fff5df; } .outfit-selection { color: #a17767; text-align: center; margin: 11px 0 23px; font-size: 10px; }
.field-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; margin: 12px 0 9px; } .field-label span { color: #b69982; font-size: 9px; font-weight: 500; } .nickname-input { box-sizing: border-box; width: 100%; min-height: 51px; border: 1px solid #dfc9a5; border-radius: 12px; background: #fff9ee; color: #60252b; font-size: 14px; padding: 13px 14px; } .nickname-input::placeholder { font-size: 11px; color: #b2917e; } .consent-label { display: flex; align-items: flex-start; gap: 10px; font-size: 10px; line-height: 1.8; color: #a07666; min-height: 44px; margin-top: 15px; } .consent-label input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #b52235; margin: 0; } .panel-bottom { display: flex; align-items: center; justify-content: space-between; color: #a27f72; font-size: 9px; margin-top: 11px; }
.family-members { display: flex; align-items: center; gap: 10px; border: 1px solid #e3c692; background: #f8e9c9; border-radius: 15px; padding: 8px 13px; margin: 17px 0; } .family-members label { font-size: 11px; white-space: nowrap; } .family-members select { width: 100%; min-width: 0; min-height: 44px; color: #b52235; background: #fff8e9; border: 1px solid #dfc698; border-radius: 9px; padding: 6px 9px; font-size: 13px; font-weight: 750; }
.family-ticket { position: relative; overflow: hidden; border: 1px solid #e7c478; border-radius: 18px; background: #fff8e8; isolation: isolate; margin-top: 19px; } .ticket-top { display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: #956440; font-weight: 800; letter-spacing: .7px; padding: 13px 15px; border-bottom: 1px solid #d8b462; } .ticket-person { display: flex; align-items: center; justify-content: space-between; padding: 5px 17px 0; min-height: 204px; background: transparent; } .ticket-kicker { font-size: 10px; color: #aa7452; } .ticket-person h3 { font-size: 26px; line-height: 1.4; font-weight: 900; margin: 9px 0 12px; max-width: 175px; overflow-wrap: anywhere; } .ticket-badge { display: inline-block; color: #b52235; border-radius: 20px; background: #fff5df9c; border: 1px solid #d4ac53; padding: 5px 9px; font-size: 10px; } .ticket-avatar { width: 145px; height: 204px; position: relative; flex-shrink: 0; } .ticket-avatar canvas { position: absolute; bottom: 0; right: -10px; width: 158px; height: auto; } .ticket-prize-medal { position: absolute; z-index: 3; width: 38px; height: 38px; right: 42px; top: 0; background: #fffcf4; border: 2px solid #b52235; border-radius: 50%; padding: 4px; box-shadow: 0 3px 0 #b5223520; } .ticket-prize-medal .prize-art { width: 100%; height: 100%; }   
.prize-ticket { display: flex; align-items: center; gap: 13px; padding: 17px 15px; background: #fff1c9; } .prize-ticket-art { width: 63px; height: 63px; padding: 7px; box-sizing: border-box; background: #fffbeb; border: 1px solid #e5c88e; border-radius: 16px; flex-shrink: 0; } .prize-ticket-art .prize-art { width: 100%; height: 100%; } .prize-ticket small { display: block; font-size: 9px; color: #ab825d; margin-bottom: 5px; } .prize-ticket strong { display: block; font-size: 15px; font-weight: 900; margin-bottom: 7px; } .prize-ticket > div > span { font-size: 9px; color: #a27d61; line-height: 1.6; display: block; } .prize-ticket b { display: inline-block; color: #b52235; font-weight: 900; padding: 2px 5px; background: #f4dcc1; border-radius: 4px; margin-right: 3px; }
.journey-status { margin-top: 20px; } .journey-status h3 { margin: 0; font-size: 15px; color: #b52235; } .journey-status p { margin: 9px 0 13px; color: #a17767; font-size: 11px; line-height: 1.8; } .journey-track { height: 6px; border-radius: 10px; background: #f0e1c4; overflow: hidden; } .journey-track i { height: 100%; display: block; width: 0; border-radius: inherit; background: linear-gradient(90deg, #b52235, #e7ad56); transition: width .2s linear; } .journey-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; color: #a8876a; padding-top: 7px; min-height: 15px; } .emote-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 19px; } .emote-buttons button { padding: 14px 5px; border: 1px solid #e2cbb3; border-radius: 12px; background: #fff3df; color: #b52235; font-size: 10px; font-weight: 800; } .emote-buttons span { font-size: 23px; display: block; margin-bottom: 6px; } .family-help { font-size: 10px; color: #a28274; text-align: center; line-height: 1.9; margin: 15px 0 4px; } .stage-link { display: block; text-align: center; color: #9f7465; font-size: 11px; padding: 16px 0 2px; text-decoration: underline; text-underline-offset: 4px; } .status-message { margin: 0 20px 20px; padding: 12px 14px; border-radius: 11px; background: #ffeadf; border: 1px solid #d59d82; color: #aa3440; font-size: 11px; line-height: 1.7; } .mobile-footer { text-align: center; margin: 25px 0 0; color: #9b796c; font-size: 11px; } .mobile-footer small { display: block; font-size: 8px; color: #b1937b; margin-top: 9px; letter-spacing: 1px; }
.festival-dialog { width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; border: 1px solid #ddc297; border-radius: 22px; background: #fff5df; color: #60252b; padding: 22px; box-sizing: border-box; } .festival-dialog::backdrop { background: #35131c88; backdrop-filter: blur(5px); } .dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; } .dialog-heading h2 { font-size: 20px; line-height: 1.4; margin: 8px 0 0; font-weight: 900; } .festival-dialog > p { color: #9f7465; font-size: 11px; line-height: 1.9; } .crop-viewport { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: #e2c598; touch-action: none; margin-top: 15px; } .crop-viewport img { position: absolute; top: 50%; left: 50%; max-width: none; width: 100%; user-select: none; pointer-events: none; } .crop-mask { position: absolute; inset: 0; border: 2px solid #fffaeb; border-radius: 50%; box-sizing: border-box; box-shadow: 0 0 0 200px #421a2466; pointer-events: none; } .crop-zoom { display: flex; align-items: center; gap: 15px; margin: 14px 0 22px; color: #b52235; font-size: 21px; min-height: 44px; } .crop-zoom input { width: 100%; accent-color: #b52235; min-height: 44px; } .rule-list { padding: 0; margin: 22px 0; list-style: none; } .rule-list li { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0; } .rule-list b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #b52235; color: #fff5df; font-size: 13px; flex-shrink: 0; } .rule-list strong { font-size: 13px; } .rule-list p { color: #a17a69; font-size: 11px; margin: 7px 0 0; line-height: 1.8; } .rules-privacy { background: #f7e7ca; border-radius: 12px; padding: 11px 14px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 28px); transform: translateX(-50%); min-width: 170px; max-width: 85vw; background: #60252bef; color: #fff5df; padding: 13px 17px; font-size: 12px; line-height: 1.7; border-radius: 14px; text-align: center; box-shadow: 0 8px 30px #4c172633; }
.mobile-loading { position: fixed; z-index: 30; inset: 0; background: #fff5df; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #b52235; transition: opacity .3s ease; } .mobile-loading.is-ready { opacity: 0; pointer-events: none; } .mobile-loading strong { font-size: 23px; font-weight: 900; margin-top: 34px; } .mobile-loading small { color: #a88672; font-size: 11px; margin-top: 12px; } .mobile-loading button { margin-top: 22px; border: 1px solid #b52235; background: none; color: #b52235; border-radius: 11px; padding: 9px 22px; }   
body[data-step="ticket"] .character-preview, body[data-step="ticket"] .festival-intro { display: none; }

.mobile-award-popup { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: #44152092; backdrop-filter: blur(3px); pointer-events: none; }
.mobile-award-card { width: min(560px, calc(100vw - 24px), calc(150svh - 48px)); aspect-ratio: 3 / 2; position: relative; container-type: inline-size; filter: drop-shadow(0 14px 30px #42132155); animation: mobile-award-enter .32s cubic-bezier(.2,.75,.25,1) both; }
.mobile-award-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mobile-award-heading { position: absolute; left: 34%; right: 34%; top: 9%; color: #fff0c3; font-size: clamp(12px, 4.5cqw, 23px); font-weight: 900; text-align: center; line-height: 1.25; }
.mobile-award-name { position: absolute; left: 14%; right: 14%; top: 23%; margin: 0; color: #9f2533; font-size: clamp(14px, 5.3cqw, 27px); font-weight: 900; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.mobile-award-content { position: absolute; left: 13%; right: 13%; top: 34%; bottom: 23%; display: flex; align-items: center; justify-content: center; gap: 3%; }
.mobile-award-avatar { width: 38%; height: 100%; object-fit: contain; }
.mobile-award-gift { width: 59%; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; color: #8d2933; }
.mobile-award-caption { font-size: clamp(9px, 2.9cqw, 14px); color: #a57942; line-height: 1.25; }
.mobile-award-prize-art { width: 32%; max-width: 76px; }
.mobile-award-prize-art .prize-art { display: block; width: 100%; }
.mobile-award-prize-name { display: block; width: 100%; font-size: clamp(11px, 3.6cqw, 19px); line-height: 1.25; font-weight: 900; overflow-wrap: anywhere; }
.mobile-award-prize-number { font-size: clamp(10px, 3cqw, 15px); font-weight: 850; color: #a47942; line-height: 1.2; }
.mobile-award-footer { position: absolute; left: 21%; right: 21%; top: 85.8%; color: #fff0c3; font-size: clamp(9px, 2.8cqw, 14px); line-height: 1.3; text-align: center; }
@keyframes mobile-award-enter { from { opacity: 0; transform: translateY(10px) scale(.93); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .mobile-award-card { animation: none !important; } }

/* Original generated rasters provide every illustrated scene, mascot and prop. */
body { background: #fff5df url("/assets/mobile-bg-v1.png") center top / max(480px, 100vw) auto fixed no-repeat; }
.mobile-shell { background: #fff8eced; padding-left: 16px; padding-right: 16px; box-sizing: border-box; border-radius: 24px; }
.brand-mascot { width: 48px; height: 54px; display: inline-flex; align-items: center; }
.intro-sheep { position: absolute; width: 102px; right: -9px; bottom: 0; opacity: .9; }
.festival-intro h1, .festival-intro p { max-width: 78%; position: relative; z-index: 1; }
.preview-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.preview-sheep { position: absolute; bottom: 29px; left: 13px; width: 68px; z-index: 2; animation: mascot-greeting 3.4s ease-in-out infinite; }
.studio-sheep { position: absolute; left: 5px; bottom: 10px; width: 74px; }
.selfie-generated { display: block; height: 100%; }
.selfie-generated > .art-sprite { width: 100%; height: 100%; }
.ticket-generated-frame { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ticket-generated-frame > .art-sprite { height: 100%; aspect-ratio: auto !important; }
.ticket-top, .prize-ticket { background: #fff2d9cc; }
.ticket-prize-medal { background: transparent; border: 0; padding: 0; box-shadow: none; width: 48px; height: 48px; }
.prize-ticket-art { background: transparent; border: 0; padding: 0; }
.art-button > .button-art { margin: 0 !important; display: block; }
.round-button > .button-art { inset: 0; height: 100%; }
.route-encounters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.route-encounters > span { display: flex; align-items: center; flex-direction: column; padding: 8px 2px; opacity: .5; border-radius: 12px; }
.route-encounters i { display: block; width: 43px; height: 43px; font-style: normal; }
.route-encounters i > .art-sprite { height: 100%; aspect-ratio: auto !important; }
.route-encounters b { font-size: 10px; margin-top: 6px; }
.route-encounters [data-status="active"] { opacity: 1; background: #f9df94; }
.route-encounters [data-status="complete"] { opacity: 1; }
.route-blessing { text-align: center; color: #a23440; font-size: 11px; min-height: 32px; line-height: 1.7; margin: 8px 0 0; }
.emote-buttons button { min-height: 93px; position: relative; padding: 6px 3px 10px; }
.emote-buttons button > span:not(.button-art) { width: 43px; height: 43px; margin: 0 auto 5px; }
.emote-buttons button > span:not(.button-art) > .art-sprite { height: 100%; aspect-ratio: auto !important; }
.loading-sheep { width: 154px; animation: mascot-greeting 1.4s ease-in-out infinite; }
.mobile-loading { background: #fff5df url("/assets/mobile-bg-v1.png") center / cover; }
@keyframes mascot-greeting { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }

@media (min-width: 900px) { .mobile-shell { width: min(900px, 100% - 64px); } .mobile-header, .connection-row, .festival-intro, .family-members, .mobile-footer { max-width: none; } main { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } .festival-intro { grid-column: 1 / -1; padding-bottom: 5px; } .festival-intro h1 br { display: none; }   .family-members { grid-column: 1 / -1; width: min(430px, 100%); margin: 0; box-sizing: border-box; } .character-preview { position: sticky; top: 20px; } .preview-scene { height: 414px; } .preview-scene canvas { height: 357px; margin-bottom: 43px; }   .name-ribbon { bottom: 24px; padding: 10px 18px; font-size: 14px; } .mobile-footer { grid-column: 1 / -1; } body[data-step="ticket"] main { display: block; } body[data-step="ticket"] .flow-card { max-width: 460px; margin: 20px auto 0; } body[data-step="ticket"] .family-members { margin: 25px auto 0; } }
@media (max-width: 360px) { .mobile-shell { width: calc(100% - 22px); } .flow-panel { padding-left: 15px; padding-right: 15px; } .ticket-person { padding-left: 14px; padding-right: 10px; } .ticket-avatar { width: 123px; } .ticket-person h3 { font-size: 23px; } .brand-link { font-size: 21px; } .festival-intro h1 { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* The photo playback uses the same generated portrait frame as the character. */
.expression-preview { display: flex; align-items: center; gap: 8px; min-height: 179px; margin-top: 8px; padding: 12px; border: 1px solid #e6cb96; border-radius: 18px; background: #fff2d9 url("/assets/mobile-bg-v1.png") center 61% / cover; }
.expression-preview-stage { position: relative; flex: 0 0 138px; height: 138px; }
#expressionPreviewImage { position: absolute; top: 50%; left: 50%; z-index: 1; width: 90px; height: 90px; max-width: none; transform: translate(-50%, -50%); border-radius: 50%; object-fit: cover; }
#expressionPreviewPortrait { position: absolute; top: 50%; left: 50%; z-index: 2; width: 130px; height: 130px; transform: translate(-50%, -50%); pointer-events: none; }
#expressionPreviewPortrait > .art-sprite { display: block; width: 100%; height: 100%; }
.expression-preview-copy { flex: 1; min-width: 0; color: #60252b; }
.expression-preview-copy strong { display: block; font-size: 13px; line-height: 1.4; }
#expressionPreviewFrame { display: block; margin-top: 5px; color: #9b3540; font-size: 10px; line-height: 1.5; }
#expressionPreviewToggle { width: 100%; min-height: 44px; margin-top: 7px; padding: 8px 5px; font-size: 11px; }

/* Each phone step keeps its working surface near its controls. The page remains scrollable. */
@media (max-width: 899px) {
  .mobile-shell { padding-top: max(env(safe-area-inset-top), 8px); padding-bottom: max(env(safe-area-inset-bottom), 12px); }
  .mobile-header { padding: 0 0 5px; }
  .brand-link { gap: 7px; font-size: 19px; }
  .brand-link small { margin-top: 2px; font-size: 8px; }
  .brand-mascot { width: 34px; height: 40px; }
  .connection-row { margin: 6px 0 9px; font-size: 9px; gap: 6px; }
  .date-pill { padding: 3px 6px; font-size: 8px; }
  .family-members { margin: 6px 0 8px; padding: 3px 8px; }
  .flow-card { border-radius: 18px; }
  .flow-steps { padding: 3px 10px; }
  .flow-steps button { min-height: 44px; font-size: 11px; gap: 4px; }
  .flow-steps button span { width: 20px; height: 20px; }
  .flow-steps i { width: 10px; }
  .flow-panel { padding: 12px 14px; }
  .panel-heading .eyebrow { display: none; }
  .panel-heading h2 { margin: 0 0 7px; font-size: 20px; line-height: 1.3; }
  .panel-description { margin: 0 0 10px; font-size: 11px; line-height: 1.5; }
  .button-primary, .button-secondary { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .full-width { margin-top: 8px; }
  .skip-button { margin-top: 3px; }
  .nickname-input { min-height: 44px; padding: 9px 11px; font-size: 16px; }
  .field-label { margin: 7px 0 5px; font-size: 11px; }
  .consent-label { margin-top: 6px; min-height: 44px; align-items: center; font-size: 10px; line-height: 1.5; gap: 7px; }
  .panel-bottom { margin-top: 2px; font-size: 8px; gap: 8px; }
  .status-message { margin: 0 14px 12px; padding: 9px 10px; }
  .mobile-footer { margin-top: 12px; font-size: 10px; }
  .mobile-footer small { margin-top: 4px; }

  body[data-step="selfie"] .character-preview, body[data-step="selfie"] .festival-intro, body[data-step="outfit"] .festival-intro { display: none; }
  body[data-step="selfie"] .expression-slots { gap: 7px; }
  body[data-step="selfie"] .expression-slots button { min-height: 58px; padding: 8px 10px; }
  body[data-step="selfie"] .expression-slots button[aria-pressed="true"] { padding: 7px 9px; }
  body[data-step="selfie"] .expression-slots span { font-size: 12px; }
  body[data-step="selfie"] .expression-slots small { margin-top: 3px; }
  body[data-step="selfie"] .expression-slots img { width: 38px; height: 38px; }
  #selfieStudio { height: 160px; margin-top: 8px; }
  body[data-step="selfie"] .photo-caption { margin: 8px 0; }
  body[data-step="selfie"] .photo-caption strong { font-size: 12px; }
  body[data-step="selfie"] .photo-caption span { margin-top: 3px; }
  body[data-step="selfie"] .photo-actions { margin-top: 8px; gap: 7px; }
  body[data-step="selfie"] .photo-tools { margin-top: 0; }
  body[data-step="selfie"] .photo-tools button { min-height: 44px; padding: 0 9px; }
  body[data-step="selfie"] .privacy-note { margin: 4px 0 0; font-size: 9px; line-height: 1.4; }

  body[data-step="outfit"] .character-preview { position: sticky; top: max(env(safe-area-inset-top), 6px); z-index: 8; margin-bottom: 8px; border-radius: 18px; background: #fff2d9; }
  body[data-step="outfit"] .preview-caption { height: 20px; align-items: center; padding: 0 10px; font-size: 9px; line-height: 12px; }
  body[data-step="outfit"] .preview-scene { height: 136px; }
  body[data-step="outfit"] .preview-scene canvas { height: 130px; margin-bottom: 6px; }
  body[data-step="outfit"] .preview-sheep { width: 44px; left: 8px; bottom: 10px; }
  body[data-step="outfit"] .name-ribbon { left: auto; right: 8px; bottom: 5px; max-width: calc(50% - 62px); transform: none; padding: 5px 7px; font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
  body[data-step="outfit"] .preview-bottom { height: 44px; padding: 0 10px; font-size: 9px; }
  body[data-step="outfit"] .preview-bottom .text-button { min-height: 44px; font-size: 10px; }
  body[data-step="outfit"] .panel-description { display: none; }
  body[data-step="outfit"] .panel-heading h2 { font-size: 18px; }
  body[data-step="outfit"] .wardrobe-tabs { padding: 2px; margin-bottom: 6px; gap: 3px; }
  body[data-step="outfit"] .wardrobe-tabs button { min-height: 44px; font-size: 11px; }
  body[data-step="outfit"] .outfit-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  body[data-step="outfit"] .outfit-option { aspect-ratio: auto; height: 68px; min-height: 44px; border-radius: 10px; }
  body[data-step="outfit"] .outfit-option canvas { width: 60px; height: 60px; margin: 2px auto; }
  body[data-step="outfit"] .option-number { top: 4px; left: 5px; }
  body[data-step="outfit"] .option-check { width: 16px; height: 16px; right: 4px; bottom: 4px; font-size: 9px; }
  body[data-step="outfit"] .outfit-selection { margin: 4px 0 6px; line-height: 1.4; }
  body[data-step="outfit"]:has(#nickname:focus) .character-preview { position: relative; top: auto; }

  body[data-step="ticket"] .panel-heading { display: none; }
  body[data-step="ticket"] .family-ticket { margin-top: 0; }
  body[data-step="ticket"] .ticket-top { padding: 8px 10px; font-size: 8px; }
  body[data-step="ticket"] .ticket-person { min-height: 160px; padding: 0 12px; gap: 8px; }
  body[data-step="ticket"] .ticket-person h3 { max-width: 145px; font-size: 22px; line-height: 1.3; margin: 5px 0 8px; }
  body[data-step="ticket"] .ticket-kicker { font-size: 9px; }
  body[data-step="ticket"] .ticket-badge { font-size: 9px; padding: 4px 7px; }
  body[data-step="ticket"] .ticket-avatar { width: 128px; height: 160px; }
  body[data-step="ticket"] .ticket-avatar canvas { width: auto; height: 160px; right: 0; }
  body[data-step="ticket"] .ticket-prize-medal { width: 36px; height: 36px; right: 35px; top: 2px; }
  body[data-step="ticket"] .prize-ticket { padding: 10px; gap: 9px; }
  body[data-step="ticket"] .prize-ticket-art { width: 46px; height: 46px; }
  body[data-step="ticket"] .prize-ticket strong { font-size: 13px; margin-bottom: 4px; }
  body[data-step="ticket"] .prize-ticket small { margin-bottom: 3px; }
  body[data-step="ticket"] .journey-status { margin-top: 12px; }
  body[data-step="ticket"] .journey-status h3 { font-size: 14px; }
  body[data-step="ticket"] .journey-status p { margin: 6px 0 8px; font-size: 10px; line-height: 1.5; }
  body[data-step="ticket"] .route-encounters { margin-top: 9px; }
  body[data-step="ticket"] .route-encounters > span { padding: 5px 2px; }
  body[data-step="ticket"] .route-encounters i { width: 32px; height: 32px; }
  body[data-step="ticket"] .route-encounters b { font-size: 9px; margin-top: 3px; }
  body[data-step="ticket"] .route-blessing { margin-top: 4px; min-height: 28px; font-size: 10px; line-height: 1.4; }
  body[data-step="ticket"] .emote-buttons { gap: 7px; margin-top: 8px; }
  body[data-step="ticket"] .emote-buttons button { min-height: 66px; padding: 4px 3px 6px; }
  body[data-step="ticket"] .emote-buttons button > span:not(.button-art) { width: 30px; height: 30px; margin-bottom: 4px; }
  body[data-step="ticket"] .family-help { margin: 8px 0 2px; font-size: 9px; line-height: 1.5; }
  body[data-step="ticket"] .stage-link { min-height: 44px; padding: 12px 0 4px; font-size: 10px; }
}

@media (max-width: 899px) and (max-height: 700px) {
  .mobile-shell { padding-left: 12px; padding-right: 12px; }
  .connection-row { margin-bottom: 6px; }
  .flow-panel { padding: 10px 12px; }
  body[data-step="selfie"] .flow-steps, body[data-step="outfit"] .flow-steps, body[data-step="outfit"] .panel-heading, body[data-step="selfie"] .panel-description, body[data-step="selfie"] .photo-caption, body[data-step="outfit"] .outfit-selection { display: none; }
  body[data-step="selfie"] .panel-heading h2 { font-size: 18px; margin-bottom: 6px; }
  #selfieStudio { height: 120px; }
  .selfie-face { width: 100px; height: 100px; border-width: 5px; }
  .studio-sheep { width: 52px; }
  .studio-stamp { font-size: 11px; bottom: 7px; right: 10px; }
  .expression-preview { min-height: 128px; padding: 8px; }
  .expression-preview-stage { flex-basis: 112px; height: 112px; }
  #expressionPreviewPortrait { width: 104px; height: 104px; }
  #expressionPreviewImage { width: 72px; height: 72px; }
  .expression-preview-copy strong { font-size: 12px; }
  body[data-step="outfit"] .preview-caption { height: 18px; padding-right: 92px; font-size: 8px; }
  body[data-step="outfit"] .preview-caption > span:last-child { display: none; }
  body[data-step="outfit"] .preview-scene { height: 112px; }
  body[data-step="outfit"] .preview-scene canvas { height: 106px; margin-bottom: 6px; }
  body[data-step="outfit"] .preview-bottom { position: absolute; top: 1px; right: 7px; height: 44px; border: 0; background: transparent; padding: 0; }
  body[data-step="outfit"] .preview-bottom > span { display: none; }
  body[data-step="outfit"] .preview-bottom .text-button { font-size: 9px; }
  body[data-step="outfit"] .name-ribbon { max-width: calc(50% - 53px); font-size: 9px; }
  body[data-step="outfit"] .outfit-option { height: 52px; }
  body[data-step="outfit"] .outfit-option canvas { width: 44px; height: 44px; }
  .privacy-note { font-size: 8px; }
  .mobile-footer { margin-top: 7px; }
}

@media (max-width: 899px) and (max-height: 600px) {
  .mobile-header { padding-bottom: 2px; }
  .connection-row { margin-top: 3px; margin-bottom: 4px; }
  .flow-panel { padding-top: 8px; padding-bottom: 8px; }
  body[data-step="selfie"] .panel-heading { display: none; }
  body[data-step="selfie"] .expression-slots button { min-height: 52px; padding-top: 5px; padding-bottom: 5px; }
  body[data-step="selfie"] .expression-slots button[aria-pressed="true"] { padding-top: 4px; padding-bottom: 4px; }
  #selfieStudio { height: 110px; }
  .selfie-face { width: 94px; height: 94px; }
  .expression-preview { min-height: 116px; }
  .expression-preview-stage { flex-basis: 100px; height: 100px; }
  #expressionPreviewPortrait { width: 96px; height: 96px; }
  #expressionPreviewImage { width: 66px; height: 66px; }
  body[data-step="outfit"] .preview-scene { height: 88px; }
  body[data-step="outfit"] .preview-scene canvas { height: 82px; margin-bottom: 6px; }
  body[data-step="outfit"] .outfit-option { height: 48px; }
  body[data-step="outfit"] .outfit-option canvas { width: 40px; height: 40px; }
  body[data-step="ticket"] .ticket-person { min-height: 140px; }
  body[data-step="ticket"] .ticket-avatar { height: 140px; width: 112px; }
  body[data-step="ticket"] .ticket-avatar canvas { height: 140px; }
}
