/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a;
  background: #F3FDFF;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}

.brand {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 96px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.brand .logo { height: 56px; }
.brand .note {
  position: absolute;
  width: 64px;
  height: 64px;
  opacity: 0.9;
}
.brand .note--left { left: 8px; top: 10px; }
.brand .note--right { right: 8px; top: 16px; }

.stepper {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 0 8px;
}
.stepper-item {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #9ca3af;
  background: #e5e7eb;
}
.stepper-item.is-active { color: #fff; background: #ef4444; }
.stepper-item.is-complete { color: #fff; background: #16a34a; }
.stepper-line {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
}
.stepper-line.is-complete { background: linear-gradient(90deg, #16a34a, #22c55e); }

.card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
  padding: 18px 16px 24px;
}

.label {
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 8px 0 10px;
}

.field + .field { margin-top: 12px; }

/* Custom select */
.select {
  display: grid;
  grid-template-columns: 28px 1fr 24px;
  align-items: center;
  gap: 8px;
  border: 2px solid #f2f4f7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.select-icon { width: 20px; height: 20px; }
.select-caret { width: 16px; height: 16px; }
.select select {
  width: 100%;
  font-size: 16px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  outline: none;
  appearance: none;
}

/* Options */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.option-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

.option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f7f7f7;
  border: 2px solid #f2f4f7;
  border-radius: 14px;
  padding: 12px 10px;
  min-height: 92px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .02s ease;
}
.option img { width: 64px; height: 64px; object-fit: contain; }
.option span { font-weight: 600; color: #334155; font-size: 14px; }
.option:active { transform: scale(0.98); }
.option.selected {
  border-color: #ff3b30;
  box-shadow: 0 6px 16px rgba(255, 59, 48, 0.15);
  background: white;
}
/* Horizontal scroller for genre options: single row, no wrap */
.option-grid[data-group="genre"] {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.option-grid[data-group="genre"] .option {
  flex: 0 0 auto;
  min-width: 120px;
}

/* Stepper */
.step.is-hidden { display: none; }
.input, .textarea {
  width: 100%;
  border: 2px solid #f2f4f7;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
}
.textarea { resize: vertical; }
.required { color: #ef4444; }

/* Step 3 summary/payment */
.summary-box {
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.summary-pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: #444;
  white-space: pre-wrap;
}
.note { color: #6b7280; font-size: 12px; line-height: 1.4; }
.price { font-weight: 900; margin: 14px 0; }
.price span { font-weight: 800; }
.payments img { width: 100%; max-width: 220px; display: block; margin: 0 auto; opacity: .8; }

.actions { margin-top: 20px; }
.cta {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff3b30 0%, #e02217 100%);
  box-shadow: 0 10px 28px rgba(255, 59, 48, 0.35);
  cursor: pointer;
  padding:10px;
}
.cta.is-loading { position: relative; opacity: .85; pointer-events: none; }
.cta.is-loading::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0 16px, rgba(255,255,255,0) 16px 32px);
  border-radius: inherit;
  animation: shimmer 1s linear infinite;
}
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 32px 0; } }
.cta:disabled {
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

@media (min-width: 480px) {
  .brand .logo { height: 64px; }
}

/* Player */
.player-card { padding-bottom: 16px; }
.artwork { width: 100%; display: grid; place-items: center; margin-bottom: 10px; }
.artwork img { width: 100%; max-width: 320px; border-radius: 14px; box-shadow: 0 8px 24px rgba(2,6,23,0.08); background:#f3f4f6; }
.tabs { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.tab { padding: 8px 12px; border-radius: 999px; border: 2px solid #e5e7eb; background:#fff; font-weight: 800; color:#6b7280; }
.tab.is-active { border-color:#ef4444; color:#ef4444; background:#fff5f5; }
.title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.track-meta { text-align:left; margin: 8px 0 6px; }
.track-meta .title { font-weight:900; }
.track-meta .subtitle { color:#6b7280; font-size: 14px; }
.more-btn { width:36px; height:36px; border-radius:999px; border:2px solid #e5e7eb; background:#fff; display:grid; place-items:center; }
.more-btn img { width:18px; height:18px; }
.controls { display:flex; justify-content:center; gap: 16px; align-items:center; margin: 8px 0; }
.ctrl { width:44px; height:44px; border-radius:999px; border:2px solid #e5e7eb; background:#fff; font-size:18px; display:grid; place-items:center; }
.ctrl-main { width:64px; height:64px; font-size:22px; border-color:#ef4444; color:#ef4444; }
.timeline { display:flex; align-items:center; gap: 10px; }
.timeline input[type="range"]{ flex:1 1 auto; accent-color:#ef4444; }
.timeline-wrap { position:relative; flex:1 1 auto; display:flex; align-items:center; }
.timeline-label { position:absolute; left:50%; transform:translateX(-50%); font-size:12px; color:#9ca3af; background:#fff; padding:0 6px; }
.volume { display:flex; align-items:center; gap:10px; margin: 8px 0; }
.volume input[type="range"]{ flex:1 1 auto; accent-color:#ef4444; }

/* Modal */
.modal { position: fixed; inset: 0; display:none; }
.modal.is-hidden { display:none; }
.modal:not(.is-hidden) { display:block; }
.modal-backdrop { position:absolute; inset:0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.modal-card { position: absolute; left:50%; top:50%; transform: translate(-50%, -50%); width: calc(100% - 32px); max-width:420px; background:#fff; border-radius:16px; padding:16px; box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.modal-title { margin:0 0 8px; font-weight:900; }
.stars { display:flex; gap:8px; justify-content:center; margin: 12px 0; }
.star { width:40px; height:40px; border-radius:8px; border:2px solid #e5e7eb; background:#fff; display:grid; place-items:center; }
.star img { width:22px; height:22px; }
.star.is-on { border-color:#f59e0b; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top: 8px; }
.btn-secondary { border:2px solid #e5e7eb; background:#fff; border-radius:10px; padding:10px 14px; font-weight:800; }


