/* Tiko 사용성 설문 — 앱 무드(파스텔·둥근 카드) */
.page-shell {
  min-height: 100dvh;
  background: linear-gradient(180deg, #ffffff 0%, #faf8fc 45%, #f3f0ff 100%);
}

.demo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 8px;
  background: #ffffff;
}

.demo-stage .viewport {
  min-height: auto;
  padding: 0;
  justify-content: flex-start;
}

.survey-section {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  box-sizing: border-box;
}

/* Intro */
.survey-intro {
  text-align: center;
  padding: 8px 4px 24px;
}

.survey-intro[hidden],
.survey-form-wrap[hidden],
.survey-success[hidden],
.survey-duplicate[hidden] {
  display: none;
}

.survey-intro-hero {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.15);
  animation: surveyBob 2.4s ease-in-out infinite;
}

@keyframes surveyBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.survey-brand {
  display: block;
  width: 130px;
  height: auto;
  margin: 0 auto 14px;
}

.survey-intro .survey-title {
  font-size: 24px;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.survey-intro .survey-desc {
  max-width: 340px;
  margin: 0 auto 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.survey-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  font-size: 13px;
  font-weight: 700;
  color: var(--nav-purple);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.survey-start-btn {
  max-width: 280px;
  margin: 0 auto;
}

/* Section cards */
.survey-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.survey-section-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.survey-section-card--lavender {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--lavender-soft), #fff) border-box;
}

.survey-section-card--pink {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--pink-soft), var(--lavender-soft)) border-box;
}

.survey-section-card--mint {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--mint-soft), #fff) border-box;
}

.survey-section-card--sky {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--sky-soft), #fff) border-box;
}

.survey-section-card--lemon {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--lemon-soft), var(--pink-soft)) border-box;
}

.survey-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.survey-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--lavender-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.survey-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Fields */
.survey-field {
  margin-bottom: 24px;
}

.survey-field:last-child {
  margin-bottom: 0;
}

.survey-field.has-error .survey-q-label {
  color: #dc2626;
}

.survey-error-msg {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
}

.survey-q-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 10px;
  color: var(--text);
}

.survey-q-num {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--lavender-soft);
  color: var(--nav-purple);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.survey-required {
  font-size: 11px;
  font-weight: 700;
  color: var(--pink);
  margin-left: 4px;
}

.survey-optional {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-left: 4px;
}

.survey-field-hint {
  margin: -4px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  line-height: 1.5;
}

.survey-date-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--mint-soft), #fff);
  border: 1.5px solid rgba(92, 219, 181, 0.25);
}

.survey-date-chip__label {
  font-size: 12px;
  font-weight: 800;
  color: #2a9d74;
}

.survey-date-chip__value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.survey-text-wrap {
  position: relative;
}

.survey-char-count {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-align: right;
}

.survey-other-wrap {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--pink-soft);
  border: 2px dashed rgba(255, 107, 157, 0.35);
}

.survey-other-wrap.has-error {
  border-color: #dc2626;
  background: #fff5f5;
}

.survey-other-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #eee;
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  font-family: var(--font);
}

.survey-other-input:focus {
  outline: none;
  border-color: var(--pink);
}

.survey-field input[type="text"],
.survey-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #eee;
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.survey-field input:focus,
.survey-field textarea:focus {
  outline: none;
  border-color: var(--lavender);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.survey-field textarea {
  min-height: 72px;
  resize: none;
  line-height: 1.5;
}

.survey-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survey-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 2px solid #eee;
  border-radius: var(--radius-lg);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.survey-option:active {
  transform: scale(0.99);
}

.survey-option:has(input:checked) {
  border-color: var(--pink);
  background: var(--pink-soft);
}

.survey-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
  flex-shrink: 0;
}

/* 5점 척도 */
.survey-scale-row {
  display: flex;
  gap: 8px;
}

.survey-scale-btn {
  flex: 1;
  cursor: pointer;
}

.survey-scale-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.survey-scale-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--radius-lg);
  border: 2px solid #eee;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.survey-scale-btn:has(input:checked) span {
  border-color: transparent;
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 157, 0.3);
  transform: translateY(-2px);
}

.survey-scale-hints {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  line-height: 1.4;
}

.survey-scale-hints span:last-child {
  text-align: right;
}

.survey-submit-wrap {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  padding: 16px 0 8px;
  background: linear-gradient(180deg, transparent, rgba(243, 240, 255, 0.95) 30%);
}

.survey-submit {
  box-shadow: 0 8px 28px rgba(255, 107, 157, 0.35);
}

/* 완료 */
.survey-success {
  text-align: center;
  padding: 32px 16px 16px;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--pink-soft), var(--mint-soft)) border-box;
}

.survey-success-emoji {
  font-size: 56px;
  margin-bottom: 14px;
  animation: surveyCelebratePop 0.75s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

@keyframes surveyCelebratePop {
  0% { opacity: 0; transform: scale(0.2); }
  70% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

.survey-success h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
}

.survey-success p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.survey-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 중복 안내 */
.survey-duplicate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.survey-duplicate-card {
  width: 100%;
  max-width: 340px;
  padding: 28px 22px;
  border-radius: var(--radius-xl);
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.survey-duplicate-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.survey-duplicate-card p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.survey-duplicate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.survey-scroll-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

.survey-scroll-hint a {
  color: var(--nav-purple);
  font-weight: 800;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .survey-intro-hero,
  .survey-success-emoji {
    animation: none;
  }
}
