:root {
  --blue-50: #eef7ff;
  --blue-100: #dceeff;
  --blue-200: #b8dcff;
  --blue-300: #90c8fb;
  --blue-500: #338fe8;
  --blue-600: #1677d1;
  --navy: #0f3c66;
  --ink: #102f4d;
  --muted: #667f95;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(21, 84, 142, 0.18);
  font-family: "IBM Plex Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f3f7fb; color: var(--ink); }
body { overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { position: relative; width: 100%; max-width: 520px; min-height: 100dvh; margin: 0 auto; background: #fff; overflow: hidden; box-shadow: 0 0 90px rgba(15, 60, 102, .1); }
.easter-zone { position: fixed; z-index: 30; top: 0; width: 46px; height: 46px; border: 0; padding: 0; background: transparent; opacity: 0; cursor: default; }
.easter-zone[hidden] { display: none; }
.easter-zone-right { right: max(0px, calc(50% - 260px)); }
.screen { display: none; min-height: 100dvh; position: relative; padding: max(20px, env(safe-area-inset-top)) 24px calc(112px + env(safe-area-inset-bottom)); animation: enter .45s cubic-bezier(.22,.8,.25,1); }
.screen.is-active { display: flex; flex-direction: column; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.splash { justify-content: flex-start; background: linear-gradient(180deg, #ffffff 0%, #fafdff 45%, #dceeff 100%); color: #0b3b67; isolation: isolate; padding-top: max(54px, env(safe-area-inset-top)); }
.splash::before { content: ""; position: absolute; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; top: -120px; right: -150px; }
.splash-orb { position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; }
.orb-one { width: 220px; height: 220px; left: -130px; bottom: 120px; background: rgba(255,255,255,.2); }
.orb-two { width: 90px; height: 90px; right: -20px; bottom: 230px; background: rgba(255,255,255,.18); }
.brand-mark { width: max-content; margin: 0 0 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: default; }
.brand-mark > span { display: block; font-size: 15px; font-weight: 600; letter-spacing: .08em; margin: 0 0 4px 5px; }
.brand-mark strong { display: block; font-size: clamp(70px, 20vw, 100px); font-weight: 700; letter-spacing: -.11em; line-height: .98; text-shadow: 0 12px 34px rgba(255,255,255,.3); }
.brand-mark .brand-dot { display: inline; margin: 0; color: #f5fbff; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
.pick-visual { position: relative; height: 290px; margin: 0 -12px 4px; }
.pick-box { position: absolute; left: 50%; bottom: 20px; width: 218px; height: 78px; transform: translateX(-50%); border-radius: 24px 24px 36px 36px; background: linear-gradient(155deg, #cae7ff 0%, #8fc6f5 55%, #6bade8 100%); box-shadow: 0 28px 55px rgba(35,112,181,.2); }
.pick-box::before { content: ""; position: absolute; z-index: -1; left: 15px; right: 15px; top: -72px; height: 92px; border-radius: 52px 52px 17px 17px; background: linear-gradient(150deg, #dcefff 0%, #9bcdf7 58%, #76b6ee 100%); box-shadow: inset 0 -8px 18px rgba(38,112,177,.08); }
.pick-box::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 12px; height: 25px; border-radius: 13px 13px 20px 20px; background: rgba(234,247,255,.44); box-shadow: inset 0 3px 9px rgba(255,255,255,.35); }
.pick-box i { position: absolute; z-index: 1; width: 48px; height: 69px; left: -7px; top: -20px; border: 0; border-radius: 25px 25px 28px 28px; background: linear-gradient(145deg, #bfe1fc, #79b6e9); box-shadow: 184px 0 0 #79b6e9, 0 12px 22px rgba(46,111,168,.12); }
.pick-box b { display: none; }
.thinking-character { position: absolute; z-index: 3; left: 50%; bottom: 21px; width: 214px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 20px 26px rgba(31,94,149,.2)); }
.float-pick { position: absolute; z-index: 2; min-width: 58px; padding: 12px 13px; border-radius: 14px; background: rgba(255,255,255,.92); color: var(--blue-600); text-align: center; font-size: 11px; font-weight: 700; box-shadow: 0 13px 30px rgba(28,103,169,.14); animation: pickFloat 3.8s ease-in-out infinite; }
.pick-one { left: 8%; top: 60px; transform: rotate(-13deg); }
.pick-two { right: 7%; top: 27px; transform: rotate(10deg); animation-delay: -1.1s; }
.pick-three { right: 11%; top: 130px; transform: rotate(-8deg); animation-delay: -2.1s; }
@keyframes pickFloat { 50% { margin-top: 10px; } }
.splash-copy { font-family: "Gowun Dodum", sans-serif; font-size: 23px; line-height: 1.45; margin: -2px 0 20px 5px; }
.start-button { max-width: 290px; }

.topbar { height: 44px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.screen-back, .complete-back { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #d3e4f2; border-radius: 50%; background: white; color: var(--navy); font-size: 19px; cursor: pointer; box-shadow: 0 7px 18px rgba(26,85,137,.08); }
.mini-logo { border: 1.5px solid var(--navy); background: transparent; border-radius: 999px; font-weight: 700; padding: 5px 16px; cursor: pointer; }
.step-label, .eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--blue-600); }
.paper-scene { height: 36vh; min-height: 250px; max-height: 360px; margin: 14px -24px 12px; position: relative; overflow: hidden; }
.soft-cloud { position: absolute; width: 250px; height: 260px; background: linear-gradient(180deg, #92c8f9, #d9edff); border-radius: 50% 50% 45% 18%; left: -85px; top: -25px; transform: rotate(-15deg); opacity: .7; }
.paper { position: absolute; width: 240px; height: 205px; right: 30px; top: 50px; background: rgba(255,255,255,.94); border-radius: 20px 20px 36px 20px; transform: rotate(-5deg); box-shadow: var(--shadow); padding: 68px 30px 20px; }
.paper::before { content: ""; position: absolute; left: 25px; top: 25px; width: 100px; height: 24px; border-radius: 7px; background: #d5eaff; }
.paper i { display: block; height: 8px; border-radius: 99px; background: #cce5fc; margin: 9px 0; }
.paper i:nth-of-type(2) { width: 86%; }
.paper b { display: inline-block; width: 14px; height: 14px; margin: 8px 7px 0 0; background: #4a9eed; border-radius: 3px; }
.pencil { position: absolute; width: 210px; height: 42px; right: -5px; top: 66px; background: linear-gradient(90deg, #153958 0 83%, #809fbd 83%); border-radius: 10px 24px 24px 10px; transform: rotate(130deg); box-shadow: 0 18px 30px rgba(11, 53, 91, .2); }
.pencil::before { content: ""; position: absolute; left: -35px; border-top: 21px solid transparent; border-bottom: 21px solid transparent; border-right: 36px solid #9cc6ed; }
.pencil span { position: absolute; left: -39px; top: 18px; width: 8px; height: 8px; background: #102f4d; transform: rotate(45deg); }
.content h1, .question h2, .complete-copy h2 { font-size: clamp(28px, 8vw, 38px); line-height: 1.35; letter-spacing: -.045em; margin: 12px 0 16px; }
.content h1 em { color: var(--blue-500); font-style: normal; }
.content p, .helper, .complete-copy p { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 0; }

.bottom-action { position: absolute; left: 24px; right: 24px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 4; }
.primary-button, .secondary-button { width: 100%; min-height: 58px; border: 0; border-radius: 18px; font-weight: 700; cursor: pointer; transition: transform .15s, opacity .15s, box-shadow .15s; }
.primary-button { display: flex; align-items: center; justify-content: space-between; padding: 0 23px; background: var(--navy); color: white; box-shadow: 0 12px 26px rgba(15,60,102,.23); }
.primary-button span { font-size: 21px; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.survey { background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%); }
.survey-topbar { gap: 14px; }
.back-button { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d3e4f2; border-radius: 50%; background: white; padding: 0; font-size: 19px; cursor: pointer; box-shadow: 0 7px 18px rgba(26,85,137,.08); }
.progress { height: 5px; background: #d5e7f6; border-radius: 99px; flex: 1; overflow: hidden; }
.progress span { display: block; width: 14.3%; height: 100%; border-radius: inherit; background: var(--blue-500); transition: width .35s ease; }
.progress-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
#survey-form { flex: 1; display: flex; }
.question { display: none; width: 100%; padding: 28px 0 12px; animation: questionIn .35s ease; }
.question.is-current { display: block; }
@keyframes questionIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes questionBack { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
.question-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(145deg, white, #cfe8ff); box-shadow: 0 12px 28px rgba(40,112,175,.14); font-size: 27px; margin-bottom: 26px; }
.question h2 { margin-top: 10px; }
.helper { margin-bottom: 24px; }
.input-wrap input, .textarea-wrap textarea { width: 100%; border: 1.5px solid #c6def2; background: rgba(255,255,255,.9); border-radius: 18px; outline: 0; color: var(--ink); font-size: 16px; box-shadow: 0 8px 24px rgba(32,100,158,.06); }
.input-wrap input { height: 60px; padding: 0 18px; }
.input-wrap input:focus, .textarea-wrap textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(51,143,232,.11); }
.textarea-wrap { display: block; position: relative; }
.textarea-wrap textarea { height: 160px; padding: 18px; resize: none; line-height: 1.6; }
.textarea-wrap small { position: absolute; right: 15px; bottom: 13px; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.choice-grid label, .chip-grid label, .choice-list label { cursor: pointer; }
.choice-grid input, .chip-grid input, .choice-list input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { display: flex; align-items: center; min-height: 60px; border: 1.5px solid #cee2f3; border-radius: 17px; padding: 0 15px; background: rgba(255,255,255,.86); font-size: 14px; font-weight: 600; transition: .18s; }
.choice-grid input:checked + span, .chip-grid input:checked + span, .choice-list input:checked + span { border-color: var(--blue-500); background: var(--blue-100); color: #0b5da8; box-shadow: 0 7px 18px rgba(51,143,232,.12); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-grid span { display: block; border: 1.5px solid #cee2f3; border-radius: 999px; padding: 13px 18px; background: white; font-size: 14px; font-weight: 600; transition: .18s; }
.confidence-card { border-radius: 27px; padding: 27px 22px 22px; margin-top: 30px; background: white; box-shadow: var(--shadow); }
.confidence-card strong { display: block; text-align: center; color: var(--blue-500); font-size: 66px; line-height: 1; letter-spacing: -.05em; }
.confidence-card strong small { font-size: 28px; }
.confidence-card input { width: 100%; accent-color: var(--blue-500); margin: 30px 0 10px; }
.confidence-card div { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.confidence-message { color: var(--blue-600); text-align: center; font-size: 13px; font-weight: 600; margin: 18px 0; }
.choice-list { display: grid; gap: 10px; }
.choice-list span { display: flex; align-items: center; gap: 14px; min-height: 62px; border: 1.5px solid #cee2f3; background: white; border-radius: 17px; padding: 11px 15px; font-size: 14px; font-weight: 600; transition: .18s; }
.choice-list span b { color: var(--blue-500); font-size: 11px; letter-spacing: .1em; }
.compact span { min-height: 54px; }
.optional-contact { display: block; margin-top: 12px; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.consent input { margin-top: 2px; accent-color: var(--blue-500); }
.text-button { border: 0; padding: 0; background: transparent; color: var(--blue-600); text-decoration: underline; font-size: 11px; cursor: pointer; }
.form-message { position: absolute; left: 24px; right: 24px; bottom: calc(89px + env(safe-area-inset-bottom)); color: #d14a4a; text-align: center; font-size: 12px; margin: 0; }

.complete { align-items: center; background: linear-gradient(175deg, #ffffff, #f7fbff 58%, #dceeff); text-align: center; }
.complete-back { position: absolute; z-index: 3; left: 24px; top: max(20px, env(safe-area-inset-top)); }
.result-card { position: relative; width: min(84vw, 340px); margin: 35px auto 22px; background: rgba(255,255,255,.94); border-radius: 30px; padding: 23px 22px 24px; box-shadow: 0 28px 70px rgba(22,92,153,.2); transform: rotate(-1.5deg); }
.result-label { font-size: 10px; color: var(--blue-600); letter-spacing: .18em; font-weight: 700; }
.result-symbol { width: 53px; height: 53px; border-radius: 18px; display: grid; place-items: center; margin: 18px auto; background: var(--blue-500); color: white; font-size: 29px; box-shadow: 0 9px 20px rgba(51,143,232,.3); }
.result-card p { margin: 0; font-size: 14px; }
.result-card > strong { display: block; color: var(--blue-500); font-size: 66px; line-height: 1.2; }
.result-line { height: 1px; background: #dcebf8; margin: 12px 0 17px; }
.result-card blockquote { margin: 0; font-family: "Gowun Dodum", sans-serif; line-height: 1.55; font-size: 16px; }
.result-card small { display: block; margin-top: 18px; font-size: 9px; letter-spacing: .18em; color: #8aa0b2; }
.complete-copy h2 { font-size: 27px; margin: 10px 0; }
.complete-copy p { font-size: 13px; }
.complete-action { display: grid; gap: 8px; }
.secondary-button { background: transparent; color: var(--navy); min-height: 42px; }
.confetti i { position: absolute; width: 9px; height: 16px; border-radius: 3px; background: #4b9fec; animation: float 4s ease-in-out infinite; }
.confetti i:nth-child(1) { left: 10%; top: 14%; transform: rotate(22deg); }
.confetti i:nth-child(2) { right: 12%; top: 19%; background: #fff; animation-delay: -.8s; }
.confetti i:nth-child(3) { left: 18%; top: 51%; background: #88bfee; animation-delay: -1.8s; }
.confetti i:nth-child(4) { right: 8%; top: 45%; animation-delay: -2.2s; }
.confetti i:nth-child(5) { left: 30%; top: 8%; width: 14px; height: 7px; animation-delay: -1.2s; }
.confetti i:nth-child(6) { right: 28%; top: 9%; background: #70a9d8; animation-delay: -.4s; }
@keyframes float { 50% { transform: translateY(12px) rotate(80deg); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; padding: 18px; background: rgba(8,35,59,.48); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { position: relative; width: min(100%, 470px); border-radius: 29px; background: #f7fbff; padding: 29px 24px calc(25px + env(safe-area-inset-bottom)); box-shadow: 0 25px 80px rgba(9,46,79,.3); animation: modalUp .3s ease; }
@keyframes modalUp { from { opacity: 0; transform: translateY(30px); } }
.modal-close { position: absolute; right: 16px; top: 13px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 27px; color: var(--muted); cursor: pointer; }
.modal-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; margin-bottom: 22px; background: var(--blue-100); font-size: 24px; }
.modal-card h2 { margin: 10px 0; font-size: 27px; line-height: 1.35; letter-spacing: -.04em; }
.modal-card > p:not(.modal-error) { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.modal-card .primary-button { margin-top: 12px; }
.modal-error { min-height: 18px; margin: 8px 0 -5px; text-align: center; color: #d14a4a; font-size: 12px; }

.admin { padding-bottom: calc(34px + env(safe-area-inset-bottom)); background: #eef7ff; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 0 20px; }
.admin-header h1 { margin: 5px 0 0; font-size: 32px; letter-spacing: -.05em; }
.admin-close { width: 43px; height: 43px; border: 1px solid #c9deef; border-radius: 50%; background: white; font-size: 25px; cursor: pointer; }
.admin-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-summary div { border-radius: 21px; background: var(--navy); color: white; padding: 18px; box-shadow: 0 12px 25px rgba(15,60,102,.14); }
.admin-summary span { display: block; font-size: 11px; opacity: .7; }
.admin-summary strong { display: block; margin-top: 6px; font-size: 28px; }
.admin-tools { display: flex; gap: 9px; margin: 18px 0 12px; }
.admin-tools label { flex: 1; }
.admin-tools select, .refresh-button { width: 100%; height: 44px; border: 1px solid #c7ddf0; border-radius: 13px; background: white; padding: 0 13px; color: var(--ink); font-size: 13px; }
.refresh-button { width: auto; cursor: pointer; }
.admin-status { margin: 22px 0; text-align: center; color: var(--muted); font-size: 13px; }
.response-list { display: grid; gap: 11px; }
.response-card { border: 1px solid #d2e5f5; border-radius: 20px; background: rgba(255,255,255,.94); padding: 17px; box-shadow: 0 7px 20px rgba(30,94,149,.06); }
.response-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #e4eff8; }
.response-card header div { min-width: 0; text-align: left; }
.response-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.response-card time { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.editor-badge { flex: 0 0 auto; border-radius: 999px; background: var(--blue-100); color: var(--blue-600); padding: 6px 9px; font-size: 10px; font-weight: 700; }
.response-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 15px; padding-top: 14px; }
.response-field { min-width: 0; }
.response-field.wide { grid-column: 1 / -1; }
.response-field dt { margin-bottom: 3px; color: #7990a3; font-size: 10px; }
.response-field dd { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.45; word-break: break-word; }
.empty-state { padding: 44px 15px; text-align: center; color: var(--muted); font-size: 13px; }

@media (min-width: 521px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border-radius: 32px; }
  .screen { min-height: calc(100dvh - 48px); }
}
@media (max-height: 720px) {
  .question { padding-top: 14px; }
  .question-icon { width: 48px; height: 48px; margin-bottom: 16px; }
  .question h2 { font-size: 27px; margin-bottom: 8px; }
  .helper { margin-bottom: 14px; }
  .choice-list { gap: 7px; }
  .choice-list span { min-height: 52px; }
  .paper-scene { min-height: 220px; height: 32vh; }
}
