:root { color-scheme: light; --ink: #082975; --body: #173164; --blue: #236cf2; }
* { box-sizing: border-box; }
html { min-height: 100%; background: #dceaff; }
body { margin: 0; min-width: 280px; font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; color: var(--ink); word-break: keep-all; overflow-wrap: break-word; -webkit-text-size-adjust: 100%; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.survey { isolation: isolate; position: relative; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3vh, 32px); width: 100%; max-width: 430px; min-height: 100vh; min-height: 100svh; margin: 0 auto; padding: max(26px, env(safe-area-inset-top, 0px)) 28px max(30px, env(safe-area-inset-bottom, 0px)); }
.scene { position: absolute; z-index: -1; inset: 0; background: #edf5ff url("assets/background.svg") center / 100% 100% no-repeat; pointer-events: none; }
.brand { text-align: center; }
.clipboard { display: block; width: 160px; height: auto; margin: 0 auto -3px; }
h1, h2, p { margin: 0; }
h1 { width: 210px; height: 70px; margin: 0 auto; }
.title-art { display: block; width: 100%; height: auto; }
.intro { text-align: center; }
.ribbon { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 4px 22px; border-radius: 30px; background: linear-gradient(180deg, #b7d4ff, #dcecff 53%, #c2dcff); box-shadow: inset 0 1px 1px #fff9; }
.ribbon h2 { position: relative; width: 240px; max-width: 100%; height: 44px; overflow: hidden; }
.subtitle-art { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; width: 100%; height: auto; }
.gem { position: absolute; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border: 3px solid #fff; border-radius: 50%; background: #83b5ff; box-shadow: 0 0 5px #fff6; }
.gem-left { left: 10px; } .gem-right { right: 10px; }
.invitation { margin-top: 16px; font-size: 15px; line-height: 1.75; font-weight: 700; letter-spacing: -.055em; color: var(--body); }
.rewards { position: relative; min-height: 184px; padding-top: 14px; }
.reward-panel { position: absolute; inset: 14px 0 0; border: 1.5px solid #a4c7ff; border-radius: 13px; background: linear-gradient(180deg, #fff9, #ffffffc4); box-shadow: 0 1px 0 #fff; }
.reward-ribbon { position: absolute; top: 0; left: 12px; right: 12px; height: 36px; border-radius: 24px; background: linear-gradient(180deg, #c0dcff, #e5f1ff); }
.rewards h2 { position: relative; margin: -14px 24px 0; height: 36px; overflow: hidden; }
/* Match the ribbon's 36px box; compensate for the PNG's asymmetric transparent margins. */
.reward-title-art { position: absolute; left: 49.56%; top: calc(50% + .4px); transform: translate(-50%, -50%); display: block; width: 100%; height: auto; }
.reward-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; list-style: none; padding: 9px 14px 14px; margin: 0; gap: 10px; }
.reward-item { display: flex; align-items: center; flex-direction: column; text-align: center; color: #142448; }
.reward-item img { display: block; width: 82px; height: 71px; margin-bottom: 4px; }
.reward-name { font-size: 15px; line-height: 1.4; font-weight: 700; }
.reward-count { font-size: 18px; line-height: 1.3; font-weight: 800; }
.start-button { display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 54px; width: calc(100% - 28px); margin: 4px auto 0; padding: 12px 18px; border: 1px solid #3278f3; border-radius: 16px; color: #fff; background: linear-gradient(180deg, #5b9aff 0%, #2878f8 36%, #1558e7 100%); box-shadow: inset 0 2px 0 #a4caff, 0 3px 0 #fff, 0 7px 16px #4e89e822; cursor: pointer; font-size: 23px; line-height: 1.25; font-weight: 800; letter-spacing: -.04em; transition: filter .12s, transform .12s; }
.start-button:active { transform: translateY(2px); filter: brightness(.94); }
.start-button:focus-visible { outline: 3px solid #123b8e; outline-offset: 5px; }
@media (max-width: 350px) { .survey { padding-left: 20px; padding-right: 20px; gap: 20px; } .ribbon h2 { font-size: 19px; } .invitation { font-size: 14px; } .rewards h2 { font-size: 13px; } }
@media (min-height: 850px) { .survey { gap: 32px; padding-top: max(48px, env(safe-area-inset-top, 0px)); padding-bottom: max(48px, env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .start-button { transition: none; } }

/* Chinese survey flow */
body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; word-break: normal; color: #182b4e; }
.survey h1 { width: auto; height: auto; margin: 0 auto; color: #123b80; font-size: 27px; line-height: 1.3; font-weight: 800; letter-spacing: .02em; }
.survey h2 { font-size: 19px; }
.home-view { gap: clamp(18px, 3vh, 30px); }
.home-view .clipboard { width: 145px; }
.home-view .ribbon h2 { width: auto; height: auto; overflow: visible; font-size: 19px; color: #173c7e; }
.home-view .rewards h2 { text-align: center; margin: -9px 20px 0; height: 36px; color: #153c83; font-size: 18px; }
.home-view .reward-item img { object-fit: contain; }
.home-view .reward-list { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 9px 12px 12px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #83b5ef #e6f0ff; }
.home-view .reward-item { flex: 1 0 calc((100% - 16px) / 3); max-width: calc((100% - 8px) / 2); scroll-snap-align: start; }
.home-view .reward-list::-webkit-scrollbar { height: 5px; }
.home-view .reward-list::-webkit-scrollbar-track { border-radius: 5px; background: #e6f0ff; }
.home-view .reward-list::-webkit-scrollbar-thumb { border-radius: 5px; background: #83b5ef; }
.form-view, .complete-view { justify-content: flex-start; gap: 0; min-height: 100vh; min-height: 100svh; padding: max(15px, env(safe-area-inset-top, 0px)) 20px max(22px, env(safe-area-inset-bottom, 0px)); }
.form-header { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; min-height: 42px; text-align: center; }
.form-header h1 { font-size: 19px; }
.back-icon { width: 36px; height: 38px; padding: 0; border: 0; background: transparent; color: #164381; font-size: 37px; line-height: 30px; cursor: pointer; }
.header-spacer { width: 36px; }
.page-count { margin-top: 7px; padding: 11px 0 8px; border-bottom: 1px solid #e3ebf7; text-align: center; color: #17386d; font-size: 15px; font-weight: 700; }
.progress-track { height: 3px; background: #dfebfb; }
.progress-track span { display: block; height: 100%; border-radius: 4px; background: #3981f1; transition: width .2s ease; }
.questions { flex: 1; }
.question { padding: 18px 0 14px; border-bottom: 1px solid #e1e8f2; }
.question-title { margin-bottom: 10px; color: #17243d; font-size: 14px; line-height: 1.55; font-weight: 700; }
.question-title strong { font-size: 15px; }
.question-title em { color: #e24a4a; font-size: 12px; font-style: normal; white-space: nowrap; }
.question-title span { color: #69788d; font-size: 12px; white-space: nowrap; }
.options { display: grid; gap: 1px; }
.option { position: relative; display: flex; align-items: center; min-height: 31px; padding: 4px 10px; border-radius: 7px; color: #26354c; font-size: 14px; font-weight: 600; cursor: pointer; }
.option.selected { background: #e2efff; }
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-mark { display: inline-grid; flex: 0 0 19px; place-items: center; width: 19px; height: 19px; margin-right: 11px; border: 2px solid #b6c1d0; border-radius: 50%; background: #fff; }
.choice-mark::after { content: ""; display: none; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.option:has(input[type="checkbox"]) .choice-mark { border-radius: 4px; }
.option input:checked + .choice-mark { border-color: #3180f2; background: #3180f2; }
.option input:checked + .choice-mark::after { display: block; }
.option input:focus-visible + .choice-mark { outline: 3px solid #9cc5ff; outline-offset: 2px; }
.text-answer { position: relative; }
.text-answer textarea { display: block; width: 100%; min-height: 118px; resize: vertical; padding: 12px; border: 1.5px solid #cbd6e5; border-radius: 9px; background: #fff; color: #26354c; font: inherit; font-size: 14px; line-height: 1.5; }
.text-answer textarea::placeholder { color: #8793a4; }
.text-answer textarea:focus { outline: 2px solid #75a9f8; border-color: #5792ef; }
.char-count { padding: 3px 4px 0; text-align: right; color: #8491a3; font-size: 12px; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 14px; }
.form-actions .start-button, .dialog-actions .start-button, .finish-button { width: 100%; min-height: 48px; margin: 0; border-radius: 14px; font-size: 17px; }
.secondary-button { min-height: 48px; border: 1.5px solid #c7d2e2; border-radius: 14px; color: #243b60; background: linear-gradient(#fff, #f0f4fa); font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 4px #274c7910; }
.modal-backdrop { position: fixed; z-index: 5; inset: 0; display: grid; place-items: center; padding: 24px; background: #0c1d38a1; }
.confirm-dialog { position: relative; width: min(100%, 360px); padding: 20px 18px 18px; border-radius: 17px; background: #fff; text-align: center; box-shadow: 0 16px 45px #061b3c44; }
.dialog-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; color: #122b50; font-size: 28px; cursor: pointer; }
.dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 9px; border-radius: 50%; background: #3885f6; color: #fff; font-size: 29px; font-weight: 800; }
.confirm-dialog h2 { margin: 0 0 10px; color: #132d59; font-size: 21px; }
.confirm-dialog p { margin-bottom: 16px; color: #3c4e69; font-size: 14px; line-height: 1.7; }
.confirm-dialog .submit-error { min-height: 0; margin: -6px 0 10px; color: #d33f45; font-size: 13px; }
.confirm-submit:disabled { cursor: wait; opacity: .7; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.complete-view { justify-content: center; }
.complete-content { width: 100%; text-align: center; }
.success-badge { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 12px; border: 6px solid #8fc1ff; border-radius: 50%; background: linear-gradient(#65a5ff, #2169e8); color: #fff; font-size: 49px; line-height: 1; font-weight: 700; box-shadow: 0 2px 10px #347ce844; }
.complete-content h1 { margin-bottom: 13px; font-size: 25px; }
.thanks { padding: 13px 10px; border-radius: 12px; background: #e7f1ff; color: #233958; font-size: 15px; line-height: 1.6; font-weight: 600; }
.complete-rewards { margin-top: 21px; padding: 12px; border: 1.5px solid #a9caff; border-radius: 12px; background: #ffffffb8; }
.complete-rewards h2 { margin-bottom: 7px; color: #173e85; font-size: 18px; }
.complete-prizes { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #83b5ef #e6f0ff; }
.complete-prizes > div { display: flex; flex: 1 0 calc((100% - 16px) / 3); align-items: center; flex-direction: column; gap: 4px; max-width: calc((100% - 8px) / 2); color: #1d2d4c; font-size: 15px; line-height: 1.4; scroll-snap-align: start; }
.complete-prizes::-webkit-scrollbar { height: 5px; }
.complete-prizes::-webkit-scrollbar-track { border-radius: 5px; background: #e6f0ff; }
.complete-prizes::-webkit-scrollbar-thumb { border-radius: 5px; background: #83b5ef; }
.complete-prizes img { width: 66px; height: 58px; object-fit: contain; }
.delivery-note { margin: 15px 0; color: #1c3c70; font-size: 14px; line-height: 1.55; font-weight: 600; }
.complete-content .finish-button { margin-top: 0; }
.status-view { justify-content: center; align-items: center; text-align: center; gap: 0; }
.status-card { width: 100%; padding: 35px 20px; border: 1px solid #b7d1f6; border-radius: 18px; background: #ffffffd9; box-shadow: 0 12px 35px #1d4d8b12; }
.status-card h1 { font-size: 20px; }
.status-card p { margin-top: 10px; color: #6d7e98; font-size: 14px; }
.submitted-check { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 15px; border-radius: 50%; background: linear-gradient(#65a5ff, #2169e8); color: #fff; font-size: 38px; font-weight: 700; box-shadow: 0 3px 12px #347ce833; }
.status-spinner { width: 30px; height: 30px; margin: 0 auto 16px; border: 3px solid #d3e4fb; border-top-color: #2878f8; border-radius: 50%; animation: survey-spin .8s linear infinite; }
@keyframes survey-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status-spinner { animation: none; border-color: #2878f8; } }
@media (max-width: 350px) { .form-view { padding-left: 16px; padding-right: 16px; } .option { font-size: 13px; } .question-title { font-size: 13px; } }
@media (min-height: 760px) { .form-view { padding-top: max(24px, env(safe-area-inset-top, 0px)); padding-bottom: max(30px, env(safe-area-inset-bottom, 0px)); } .question { padding-top: 23px; padding-bottom: 18px; } .option { min-height: 35px; } }
