/* =============================================
   FONTS
   ============================================= */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================
   CSS RESET
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* =============================================
   CUSTOM PROPERTIES
   ============================================= */
:root {
  --pink: #FF8FB1;
  --pink-dark: #FF6B9D;
  --pink-light: #FFD6E4;
  --lavender: #B4A7E5;
  --lavender-dark: #9B8CD9;
  --bg: #FFF9F5;
  --text: #2D2438;
  --text-secondary: #7A6A88;
  --card-bg: #FFFFFF;
  --border: #F0E8E8;
  --border-focus: #FF8FB1;
  --success: #7DD3A0;
  --warning: #FFB454;
  --error: #FF6B6B;
  --error-bg: #FFF0F0;
  --gray: #9B8FA8;
  --gray-light: #F5EFF5;
  --disabled-bg: #E8E0EE;
  --disabled-text: #B0A4BC;

  --font-xs: 12px;
  --font-sm: 13px;
  --font-base: 15px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;
  --font-3xl: 34px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 4px rgba(45, 36, 56, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 36, 56, 0.08), 0 2px 6px rgba(45, 36, 56, 0.04);
  --shadow-lg: 0 8px 32px rgba(45, 36, 56, 0.12), 0 4px 12px rgba(45, 36, 56, 0.06);

  --transition: 200ms ease;
  --transition-slow: 380ms ease;
}

/* =============================================
   LAYOUT
   ============================================= */
.page-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.section {
  padding: var(--space-xl) var(--space-md);
}

.section-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1 { font-size: var(--font-3xl); font-weight: 700; line-height: 1.2; }
h2 { font-size: var(--font-2xl); font-weight: 700; line-height: 1.3; }
h3 { font-size: var(--font-xl); font-weight: 600; line-height: 1.4; }
h4 { font-size: var(--font-lg); font-weight: 600; }

.text-sm { font-size: var(--font-sm); }
.text-xs { font-size: var(--font-xs); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: 16px var(--space-xl);
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  color: #fff;
  font-size: var(--font-md);
  font-weight: 700;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.35);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 107, 157, 0.45);
}

.btn-primary:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.btn-primary:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition);
  border-radius: inherit;
}

.btn-primary:not(:disabled):active::after {
  background: rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: 14px var(--space-xl);
  background: var(--card-bg);
  color: var(--text);
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
  border-color: var(--pink);
  background: var(--pink-light);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 10px var(--space-md);
  background: none;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--gray-light);
}

/* =============================================
   CARD
   ============================================= */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.card:active {
  transform: scale(0.99);
}

/* =============================================
   INPUT FIELDS
   ============================================= */
.input-field {
  width: 100%;
  padding: 14px var(--space-md);
  background: var(--card-bg);
  color: var(--text);
  font-size: var(--font-base);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.input-field::placeholder {
  color: var(--gray);
}

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 143, 177, 0.15);
}

.input-field.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
}

.input-hint {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.input-error {
  font-size: var(--font-xs);
  color: var(--error);
  display: none;
}

.input-group.has-error .input-error {
  display: block;
}

/* =============================================
   CHECKBOX ROW
   ============================================= */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  margin-top: 1px;
}

.checkbox-row input[type="checkbox"]:checked {
  background: var(--pink);
  border-color: var(--pink);
}

.checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.checkbox-label {
  font-size: var(--font-sm);
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

.checkbox-label .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.badge-required {
  background: #FFE5ED;
  color: var(--pink-dark);
}

.badge-optional {
  background: var(--gray-light);
  color: var(--gray);
}

.checkbox-label a {
  color: var(--lavender-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =============================================
   HEADER
   ============================================= */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--space-md);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255, 249, 245, 0.92);
}

.header-logo {
  font-size: var(--font-lg);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-slogan {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: var(--font-base);
  font-weight: 500;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
  color: var(--text);
  background: var(--gray-light);
}

.header-title {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 56, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  padding: 0;
  animation: fadeOverlay var(--transition-slow) ease;
}

.modal-overlay.center {
  align-items: center;
  padding: var(--space-md);
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg) var(--space-md) calc(var(--space-lg) + env(safe-area-inset-bottom));
  animation: slideUpModal var(--transition-slow) ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.center .modal {
  border-radius: var(--radius-xl);
  max-height: 80vh;
  padding: var(--space-xl) var(--space-lg);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); opacity: 0.8; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-overlay.center .modal {
  animation: zoomInModal var(--transition-slow) ease;
}

@keyframes zoomInModal {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

.modal-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.modal-desc {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

/* =============================================
   HERO SLIDER
   ============================================= */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
}

.hero-slides {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  min-width: 100%;
  display: flex;
  gap: 3px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-before,
.hero-after {
  flex: 1;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  position: relative;
}

.hero-before {
  background: linear-gradient(160deg, #E8E0F0 0%, #D4C8E8 100%);
}

.hero-after {
  background: linear-gradient(160deg, var(--pink) 0%, var(--lavender) 100%);
}

.hero-label {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.hero-before .hero-label {
  color: rgba(45, 36, 56, 0.6);
  background: rgba(255, 255, 255, 0.5);
}

.hero-emoji {
  font-size: 52px;
  line-height: 1;
}

.hero-concept-name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  padding: 0 var(--space-sm);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--space-md) 0 0;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: width var(--transition), background var(--transition);
  cursor: pointer;
}

.hero-dot.active {
  width: 20px;
  background: var(--pink);
}

/* =============================================
   CONCEPT CARD
   ============================================= */
.concept-thumbnail {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender));
}

.concept-thumbnail-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender));
}

.concept-info {
  padding: 10px var(--space-sm) var(--space-sm);
}

.concept-name {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.concept-desc {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.concept-badge-new {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

/* Featured concept card */
.featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #FF8FB1 0%, #B4A7E5 100%);
  padding: var(--space-lg);
  color: #fff;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  -webkit-tap-highlight-color: transparent;
}

.featured-card:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

.featured-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center;
}

.featured-card-content {
  position: relative;
  z-index: 1;
}

.featured-card-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.5px;
}

.featured-card-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.featured-card-desc {
  font-size: var(--font-sm);
  opacity: 0.9;
  margin-bottom: var(--space-md);
}

.featured-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  color: var(--pink-dark);
  font-size: var(--font-sm);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  transition: background var(--transition), transform var(--transition);
}

.featured-card:hover .featured-card-cta {
  background: #fff;
  transform: translateX(2px);
}

.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.how-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.how-step-num {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--pink-light), #FFD6F8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.how-step-text h4 {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.how-step-text p {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

/* =============================================
   UPLOAD AREA
   ============================================= */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
  min-height: 180px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--pink);
  background: var(--pink-light);
}

.upload-area.has-image {
  border-style: solid;
  border-color: var(--pink);
  padding: 0;
  min-height: 240px;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 36px;
  line-height: 1;
}

.upload-text {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text);
}

.upload-hint {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
  display: none;
}

.upload-area.has-image .upload-preview {
  display: block;
}

.upload-area.has-image .upload-placeholder {
  display: none;
}

.upload-reselect {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
  display: none;
  pointer-events: none;
}

.upload-area.has-image .upload-reselect {
  display: block;
}

.upload-error {
  font-size: var(--font-xs);
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.upload-error.visible {
  display: block;
}

/* =============================================
   CONCEPT PREVIEW (create page)
   ============================================= */
.concept-preview-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.concept-preview-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.concept-preview-info .concept-name {
  font-size: var(--font-base);
  font-weight: 700;
}

.concept-preview-info .concept-desc {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =============================================
   COUNTDOWN RING (waiting page)
   ============================================= */
.countdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl) var(--space-md);
  flex: 1;
  justify-content: center;
}

.countdown-ring-container {
  position: relative;
  width: 160px;
  height: 160px;
}

.countdown-ring {
  transform: rotate(-90deg);
  width: 160px;
  height: 160px;
}

.countdown-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.countdown-ring .ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s ease;
}

.countdown-number-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.countdown-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -2px;
}

.countdown-unit {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.waiting-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.5px;
}

.waiting-concept {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pink-light);
  color: var(--pink-dark);
  font-size: var(--font-sm);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.waiting-desc {
  font-size: var(--font-base);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.7;
}

.waiting-note {
  font-size: var(--font-xs);
  color: var(--gray);
  text-align: center;
}

.waiting-late-msg {
  display: none;
  background: #FFF8E7;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.waiting-late-msg.visible {
  display: block;
}

.waiting-late-msg p {
  font-size: var(--font-sm);
  color: var(--warning);
  font-weight: 600;
}

/* =============================================
   RESULT PAGE
   ============================================= */
.result-image-wrap {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-light);
  aspect-ratio: 1;
  animation: revealResult 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes revealResult {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.result-zoom-hint {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 15px var(--space-md);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.action-btn:hover {
  background: var(--gray-light);
  border-color: var(--pink);
}

.action-btn:active {
  transform: scale(0.99);
}

.action-btn.primary-action {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

.action-btn.primary-action:hover {
  background: linear-gradient(135deg, var(--pink-dark), #FF5590);
}

.action-btn-icon {
  font-size: 20px;
}

.action-btn-text {
  flex: 1;
}

.action-btn-text strong {
  display: block;
  font-size: var(--font-base);
}

.action-btn-text span {
  font-size: var(--font-xs);
  opacity: 0.7;
  font-weight: 400;
}

/* Bottom Sheet (ratio picker) */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 56, 0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  backdrop-filter: blur(4px);
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ratio-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(110%);
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom));
  z-index: 151;
  transition: transform var(--transition-slow) cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 -4px 32px rgba(45, 36, 56, 0.12);
}

.ratio-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.ratio-sheet-title {
  text-align: center;
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.ratio-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ratio-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px var(--space-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.ratio-option:hover {
  border-color: var(--pink);
  background: var(--pink-light);
}

.ratio-icon {
  font-size: 22px;
}

.ratio-text strong {
  display: block;
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text);
}

.ratio-text span {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

/* Fullscreen image modal */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOverlay 0.2s ease;
}

.fullscreen-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  -webkit-tap-highlight-color: transparent;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner.dark {
  border-color: rgba(45, 36, 56, 0.15);
  border-top-color: var(--pink);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast-container {
  position: fixed;
  bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 380px;
  padding: 0 var(--space-md);
}

.toast {
  background: var(--text);
  color: #fff;
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 12px var(--space-lg);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* =============================================
   ERROR / NOTICE BOXES
   ============================================= */
.error-box {
  background: var(--error-bg);
  border: 1px solid #FFD0D0;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--error);
  display: none;
}

.error-box.visible {
  display: flex;
}

.notice-box {
  background: #FFFBF0;
  border: 1px solid #FFE4A0;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-xs);
  color: #8B6914;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-info {
  text-align: center;
  font-size: 11px;
  color: var(--gray);
  line-height: 1.6;
}

/* =============================================
   LEGAL PAGES
   ============================================= */
.legal-content {
  padding: var(--space-xl) var(--space-md);
}

.legal-content h1 {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.legal-content .effective-date {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.legal-content h2 {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}

.legal-content ul, .legal-content ol {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 4px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: var(--font-xs);
}

.legal-table th, .legal-table td {
  border: 1px solid var(--border);
  padding: 10px var(--space-sm);
  text-align: left;
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-table th {
  background: var(--gray-light);
  font-weight: 700;
  color: var(--text);
}

/* =============================================
   MORE CONCEPTS (result page)
   ============================================= */
.more-concepts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* =============================================
   SHARE / COMING SOON BANNER
   ============================================= */
.coming-soon-banner {
  background: var(--gray-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0.6;
}

.coming-soon-icon {
  font-size: 24px;
}

.coming-soon-text strong {
  display: block;
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text);
}

.coming-soon-text span {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.coming-soon-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--gray);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.expires-notice {
  text-align: center;
  font-size: var(--font-xs);
  color: var(--gray);
  padding: var(--space-sm) 0;
}

/* =============================================
   UTILITY
   ============================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* =============================================
   PULSE ANIMATION (waiting page sparkle)
   ============================================= */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 177, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(255, 143, 177, 0); }
}

.pulse-ring {
  animation: pulse-glow 2s ease infinite;
  border-radius: 50%;
}

/* =============================================
   FADE IN ANIMATION
   ============================================= */
.fade-in {
  animation: fadeIn 0.4s ease both;
}

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

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* =============================================
   SAFE AREA + SCROLL
   ============================================= */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.scroll-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* =============================================
   FORM SECTIONS SPACING
   ============================================= */
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-divider-title {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray);
  margin: var(--space-sm) 0 0;
}

.submit-wrap {
  padding: var(--space-md) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom));
  background: rgba(255, 249, 245, 0.92);
  position: sticky;
  bottom: 0;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}

/* =============================================
   RESULT HEADER (congrats)
   ============================================= */
.result-congrats {
  text-align: center;
  padding: var(--space-xl) var(--space-md) var(--space-md);
}

.result-congrats-emoji {
  font-size: 48px;
  margin-bottom: var(--space-sm);
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.result-congrats-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.result-congrats-concept {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* =============================================
   EXPIRED / ERROR STATE
   ============================================= */
.expired-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  gap: var(--space-md);
  text-align: center;
  flex: 1;
}

.expired-emoji {
  font-size: 56px;
}

.expired-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text);
}

.expired-desc {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* =============================================
   CONCEPT PREVIEW SKELETON
   ============================================= */
.skeleton {
  background: linear-gradient(90deg, var(--gray-light) 25%, var(--border) 50%, var(--gray-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
