:root {
  color-scheme: dark;
  --bg: #140f1a;
  --bg-soft: #23182d;
  --card: rgba(29, 21, 39, 0.78);
  --card-strong: rgba(33, 24, 46, 0.95);
  --text: #fff8f0;
  --muted: #cebfd7;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ff8a4c;
  --accent-strong: #ff5f3f;
  --mint: #7ef3d4;
  --pink: #f68ac8;
  --danger: #ff7b7b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: 420px;
  font-family:
    "SF Pro Display",
    "Pretendard",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(246, 138, 200, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(126, 243, 212, 0.16), transparent 30%),
    linear-gradient(180deg, #1b1221 0%, #130f18 48%, #0d0a11 100%);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 12px 40px;
}

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

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

.app-shell {
  position: relative;
  width: min(100%, var(--content-width));
  min-height: calc(100vh - 64px);
  padding: 18px 16px 28px;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.72;
  pointer-events: none;
}

.ambient-left {
  top: 90px;
  left: -48px;
  width: 144px;
  height: 144px;
  background: linear-gradient(135deg, rgba(255, 138, 76, 0.38), rgba(246, 138, 200, 0.14));
}

.ambient-right {
  top: 320px;
  right: -70px;
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, rgba(126, 243, 212, 0.3), rgba(255, 138, 76, 0.1));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 6px 4px 14px;
  backdrop-filter: blur(14px);
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.topbar h1,
.sheet h2,
.screen-title h2,
.hero-copy h2,
.section-heading h3,
.tracker-heading h3 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--mint);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ghost-button,
.icon-button,
.pill-button,
.cta-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.ghost-button,
.icon-button,
.secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
}

.ghost-button:hover,
.icon-button:hover,
.pill-button:hover,
.cta-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

#app {
  position: relative;
  z-index: 1;
}

.screen {
  display: grid;
  gap: 18px;
  animation: fade-up 320ms ease;
}

.hero-card,
.stats-row,
.product-card,
.meta-card,
.tracker-card,
.timeline-card,
.sheet,
.empty-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 138, 76, 0.34), transparent 68%);
}

.hero-grid {
  display: grid;
  gap: 16px;
}

.hero-copy p,
.screen-subtitle,
.metric-card p,
.product-card p,
.tracker-card p,
.timeline-item p,
.meta-card p,
.sheet p,
.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hero-copy h2 {
  max-width: 11ch;
  margin-bottom: 10px;
}

.hero-actions,
.product-actions,
.tracker-actions,
.nav-actions,
.sheet-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta-button,
.pill-button {
  color: #140f1a;
  background: linear-gradient(135deg, var(--accent), #ffb26d);
  box-shadow: 0 16px 30px rgba(255, 138, 76, 0.28);
}

.cta-button {
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.pill-button,
.secondary-button {
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.secondary-button {
  color: var(--text);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-lg);
}

.metric-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.screen-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.screen-subtitle {
  max-width: 24ch;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-heading h3,
.tracker-heading h3 {
  font-size: 1.2rem;
}

.section-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 243, 212, 0.1);
  color: var(--mint);
  font-size: 0.82rem;
}

.product-grid {
  display: grid;
  gap: 12px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  text-align: left;
}

.product-visual {
  position: relative;
  min-height: 132px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
}

.product-visual::before,
.product-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.product-visual::before {
  width: 150px;
  height: 150px;
  top: -26px;
  left: -28px;
  background: var(--swirl-a);
}

.product-visual::after {
  width: 100px;
  height: 100px;
  right: -10px;
  bottom: -18px;
  background: var(--swirl-b);
}

.product-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 8, 14, 0.42);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.product-emoji {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 2.6rem;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.25));
}

.product-media-img,
.detail-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product-media-img {
  object-fit: cover;
}

.product-body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.product-title-row,
.cart-row,
.timeline-item,
.tracker-heading,
.delivery-meta,
.sheet-header,
.notification-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.product-title-row h3,
.cart-row h4,
.sheet h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.rating {
  color: #ffd67d;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price strong {
  font-size: 1.2rem;
  letter-spacing: -0.05em;
}

.price small,
.muted-label,
.detail-points li,
.delivery-meta span,
.cart-summary p {
  color: var(--muted);
}

.footer-bar {
  position: sticky;
  bottom: 10px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(22, 15, 28, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.footer-bar strong {
  font-size: 1.1rem;
}

.nav-actions > * {
  flex: 1 1 0;
}

.screen-tracking {
  padding-bottom: 100px;
}

.tracker-card,
.timeline-card,
.meta-card,
.empty-card {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.tracker-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 243, 212, 0.12);
  color: var(--mint);
  font-size: 0.86rem;
}

.tracker-hero {
  display: grid;
  gap: 16px;
}

.progress-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #c6ffe6);
}

.timeline-list {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 30px;
  bottom: -20px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  margin-top: 2px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
}

.timeline-item.active .timeline-dot,
.timeline-item.completed .timeline-dot {
  background: linear-gradient(135deg, var(--accent), #ffd27a);
}

.timeline-item-content {
  flex: 1;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item.completed strong {
  color: var(--text);
}

.timeline-item.active strong {
  color: var(--mint);
}

.detail-layout {
  display: grid;
  gap: 18px;
}

.detail-hero {
  display: grid;
  gap: 16px;
}

.detail-card {
  position: relative;
  min-height: 240px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03));
}

.detail-card::before,
.detail-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.detail-card::before {
  width: 220px;
  height: 220px;
  top: -40px;
  left: -20px;
  background: var(--swirl-a);
}

.detail-card::after {
  width: 160px;
  height: 160px;
  right: -24px;
  bottom: -22px;
  background: var(--swirl-b);
}

.detail-emoji {
  position: absolute;
  right: 22px;
  bottom: 18px;
  font-size: 5rem;
}

.detail-media-img {
  object-fit: contain;
  padding: 24px;
}

.detail-summary {
  display: grid;
  gap: 12px;
}

.detail-summary h3 {
  margin: 0;
  font-size: 1.45rem;
}

.detail-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background: var(--card-strong);
}

.sheet-actions > * {
  flex: 1 1 0;
}

.product-sheet {
  padding-top: 48px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(8, 5, 12, 0.48);
  backdrop-filter: blur(8px);
}

.hidden {
  display: none !important;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1.4rem;
}

.cart-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.cart-row {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.cart-summary {
  display: grid;
  gap: 8px;
  padding: 14px 0 6px;
}

.cart-summary strong {
  font-size: 1.28rem;
}

.empty-card {
  text-align: center;
}

.empty-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.toast-stack {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 24px), 380px);
  display: grid;
  gap: 8px;
  z-index: 30;
  pointer-events: none;
}

.notification-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(25, 20, 35, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow);
  animation: toast-in 220ms ease;
}

.notification-card strong {
  display: block;
  margin-bottom: 3px;
}

.notification-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 138, 76, 0.18);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 0 6px;
}

.product-page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px 12px 40px;
}

.product-page-card {
  display: grid;
  gap: 18px;
}

.product-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-page-visual,
.product-page-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.product-page-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.product-page-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-page-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.product-page-body {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.product-page-body h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: -0.05em;
}

.product-page-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.product-page-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-page-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-page-empty {
  max-width: 520px;
  margin: 40px auto;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 380px) {
  .product-card {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 150px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .product-page-grid,
  .product-page-meta {
    grid-template-columns: 1fr;
  }
}
