:root {
  --foam: #F3E9D8;
  --latte: #EFE4D2;
  --crema: #E2D3BB;
  --gold: #C9A56A;
  --gold-soft: #E4C98A;
  --espresso: #2B1A12;
  --roast: #6A4A36;
  --vinyl: #14110F;
  --groove: #1C1814;
  --teal: #1F6F71;
  --label: #C4A06A;
  --paper: #B8925C;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --deck-size: 240px;
  --action-h: 48px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  color: var(--espresso);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
  overflow: hidden;
}

.stage {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.pc-panel,
.product { display: none; }

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100svh;
  height: 100dvh;
  background: var(--foam);
  overflow: hidden;
  container-type: size;
  display: flex;
  flex-direction: column;
  --deck-size: min(68cqw, calc(100cqh - 21.2rem), 280px);
}

.glow,
.glow-2 {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.glow {
  width: calc(var(--deck-size) * 1.55);
  height: calc(var(--deck-size) * 1.55);
  left: 50%;
  top: 58%;
  margin-left: calc(var(--deck-size) * -0.775);
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 42% 48%, rgba(228, 201, 138, 0.55), transparent 46%),
    radial-gradient(circle at 68% 58%, rgba(201, 165, 106, 0.28), transparent 52%);
  filter: blur(18px);
  animation: drift 7.5s ease-in-out infinite;
}
.glow-2 {
  width: calc(var(--deck-size) * 0.9);
  height: calc(var(--deck-size) * 0.9);
  right: -12%;
  top: 12%;
  background: radial-gradient(circle, rgba(201, 165, 106, 0.22), transparent 68%);
  filter: blur(22px);
  animation: pulse 9s ease-in-out infinite;
}

.snow, .notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.flake, .note {
  position: absolute;
  top: -12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 9px;
  animation: fall linear infinite;
}
.note {
  color: rgba(201, 165, 106, 0.55);
  font-size: 14px;
  animation-name: floatNote;
}

.brand {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  text-align: center;
  padding: calc(12px + var(--safe-t)) 20px 0;
}
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--espresso);
  line-height: 0.92;
}
.wordmark .logo {
  display: block;
  width: min(42cqw, 152px);
  height: auto;
}
.wordmark .campaign {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 0.55em 0.78em 0.55em 0.98em;
  font-family: "Bodoni Moda", "Hahmlet", Georgia, serif;
  font-size: clamp(26px, 8.4cqw, 36px);
  font-weight: 700;
  font-style: italic;
  font-optical-sizing: auto;
  letter-spacing: 0.22em;
  line-height: 1;
  transform: rotate(-1.4deg);
  font-variation-settings: "opsz" 20, "wght" 700;
}
.wordmark .campaign .scrap {
  position: absolute;
  inset: -6px -6px;
  width: auto;
  height: auto;
  z-index: 0;
  pointer-events: none;
}
.wordmark .campaign span {
  position: relative;
  z-index: 1;
  padding-left: 0.08em;
  line-height: 0.9;
}

.scene {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 0 calc(10px + var(--safe-b));
}

.copy {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.copy-stage {
  position: relative;
  width: 100%;
  max-width: 20em;
  height: 8.5rem;
  margin: 0 auto;
  overflow: visible;
}
.copy-search,
.copy-found {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible;
}
.copy-search {
  font-family: "Hahmlet", "Apple Myungjo", serif;
  font-weight: 500;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.7;
  letter-spacing: -0.03em;
  color: var(--espresso);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.copy-search.is-swap { opacity: 0; }
.copy-found {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.copy.is-found .copy-search {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.copy.is-found .copy-found {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.found-kicker,
.found-title,
.found-line {
  display: block;
  width: 100%;
  word-break: keep-all;
}
.found-kicker {
  font-family: "Hahmlet", "Apple Myungjo", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.03em;
  color: var(--espresso);
}
.found-title {
  margin-top: 8px;
  font-family: "Hahmlet", "Apple Myungjo", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--espresso);
}
.found-line {
  margin-top: 6px;
  font-family: "Pretendard", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--roast);
}

.loader-wrap {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
}

.deck {
  position: relative;
  width: var(--deck-size);
  height: var(--deck-size);
  flex: 0 0 var(--deck-size);
}

.platter {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1c1814 62%, #0e0c0b 100%);
  box-shadow:
    0 16px 36px rgba(20, 17, 15, 0.32),
    inset 0 0 0 4px #0a0908,
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.record {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  overflow: hidden;
  will-change: transform;
}

.grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 33.2%, rgba(255, 255, 255, 0.05) 33.6%, transparent 35%),
    repeating-radial-gradient(
      circle at 50% 50%,
      #0b0a09 0 0.55px,
      #161310 0.9px,
      #0e0c0b 1.5px,
      #1c1815 2.1px
    );
}

.label-art {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #d4b17d 0%, var(--label) 58%, var(--paper) 100%);
  border: 3px solid var(--teal);
  box-shadow: inset 0 0 0 1px rgba(43, 26, 18, 0.12);
  overflow: hidden;
}
.label-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.label-out {
  fill: var(--espresso);
  font-size: 6.4px;
  font-family: "Bodoni Moda", serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  dominant-baseline: central;
}

.sheen {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.0) 12%,
      rgba(255, 255, 255, 0.16) 32%,
      rgba(255, 255, 255, 0.0) 42%,
      rgba(255, 255, 255, 0.0) 56%,
      rgba(255, 255, 255, 0.07) 72%,
      rgba(255, 255, 255, 0.0) 84%
    );
  mix-blend-mode: screen;
}

.progress {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: rotate(-90deg);
}
.progress-track,
.progress-arc {
  fill: none;
  stroke-linecap: round;
}
.progress-track {
  stroke: rgba(201, 165, 106, 0.16);
  stroke-width: 1.35;
}
.progress-arc {
  stroke: #C9A56A;
  stroke-width: 1.7;
  stroke-dasharray: 294;
  stroke-dashoffset: 294;
}

.clamp {
  position: absolute;
  inset: 39%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 0 0 1.5px rgba(43, 26, 18, 0.28),
    inset 0 1px 0 rgba(255, 236, 210, 0.28);
  pointer-events: none;
}
.pct {
  display: block;
  min-width: 2.8em;
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  font-size: clamp(15px, calc(var(--deck-size) * 0.068), 22px);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  color: var(--espresso);
  transform: translateY(0.06em);
}
.spindle {
  position: absolute;
  inset: 41%;
  border-radius: 50%;
  background: #14110F;
  box-shadow: 0 0 0 5px var(--paper);
  pointer-events: none;
}

.actions {
  display: grid;
  grid-template-areas: "slot";
  align-items: start;
  width: 100%;
  max-width: 280px;
  min-height: var(--action-h);
  margin-top: 14px;
}
.skip { grid-area: slot; }
.skip {
  appearance: none;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  border: 1px solid rgba(106, 74, 54, 0.22);
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(243, 233, 216, 0.55);
  color: var(--roast);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.35s ease, transform 0.15s ease;
}
.skip:active { transform: scale(0.98); }
.btn-fill,
.btn-ghost {
  appearance: none;
  border: 0;
  background: var(--espresso);
  color: var(--foam);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 22px;
  min-height: 48px;
  width: 100%;
  border-radius: 999px;
  cursor: pointer;
}
.btn-line {
  appearance: none;
  border: 1px solid rgba(106, 74, 54, 0.28);
  background: rgba(243, 233, 216, 0.72);
  color: var(--espresso);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-height: 42px;
  padding: 0 10px;
  width: 100%;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-fill:active,
.btn-ghost:active,
.btn-line:active { transform: scale(0.98); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--foam);
  font-size: 13px;
  white-space: nowrap;
}

@media (max-height: 700px) {
  .phone {
    --deck-size: min(64cqw, calc(100cqh - 19.4rem), 230px);
  }
  .wordmark .logo { width: min(38cqw, 132px); }
  .copy-stage { height: 7.5rem; }
  .copy-search { font-size: 16px; }
}

@media (max-height: 620px) {
  .phone {
    --deck-size: min(58cqw, calc(100cqh - 17.4rem), 190px);
  }
  .brand { padding-top: calc(10px + var(--safe-t)); }
  .wordmark .logo { width: min(36cqw, 118px); }
  .copy-stage { height: 6.75rem; }
  .copy-search { font-size: 15px; }
}

html[data-device="desktop"] .phone,
html[data-device="crawler"] .phone {
  --action-h: 52px;
}

@media (min-width: 860px) {
  body {
    overflow: auto;
    background:
      radial-gradient(ellipse at 50% 0%, #f7efe2 0%, var(--crema) 55%, #cbb99a 100%);
  }
  .stage {
    min-height: 100svh;
    padding: 36px 28px 48px;
    display: grid;
    grid-template-columns: minmax(220px, 280px) 400px minmax(240px, 320px);
    gap: 36px;
    align-items: center;
    justify-content: center;
  }
  .pc-panel,
  .product { display: block; }
  .pc-panel { max-width: 300px; }
  .pc-kicker {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--roast);
  }
  .pc-panel h1 {
    font-family: "Hahmlet", "Bodoni Moda", serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px;
    word-break: keep-all;
  }
  .pc-lede {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--roast);
    word-break: keep-all;
  }
  .pc-note {
    margin: 16px 0 0;
    padding: 7px 8px;
    border-left: 2px solid var(--gold);
    background: rgba(201, 165, 106, 0.12);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--espresso);
    white-space: nowrap;
  }
  .pc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
  }
  .pc-actions-sub {
    flex-direction: row;
    margin-top: 10px;
  }
  .pc-panel .btn-fill,
  .pc-panel .btn-line,
  .pc-panel .btn-ghost {
    width: 100%;
  }
  .btn-ghost {
    font-size: 13px;
    padding: 12px 10px;
    background: var(--espresso);
  }
  .pc-actions-sub .btn-ghost {
    flex: 1;
    width: auto;
  }
  .phone {
    --action-h: 52px;
    --deck-size: min(66cqw, calc(100cqh - 20.4rem), 248px);
    width: 390px;
    max-width: 390px;
    min-height: 760px;
    height: 760px;
    border-radius: 42px;
    border: 10px solid var(--vinyl);
    box-shadow:
      0 40px 80px rgba(43, 26, 18, 0.28),
      inset 0 0 0 1px rgba(255,255,255,0.08);
  }
  .brand { padding-top: 28px; }
  .wordmark .logo { width: 148px; }
  .product { margin-top: 4px; }
  .lp {
    position: relative;
    width: 300px;
    height: 268px;
  }
  .vinyl-peek {
    position: absolute;
    top: 28px;
    right: -18px;
    width: 212px;
    height: 212px;
    z-index: 1;
  }
  .vinyl-peek .disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1c1814 62%, #0e0c0b 100%);
    box-shadow:
      0 0 0 1px #050403,
      0 22px 40px rgba(20, 17, 15, 0.32);
    animation: spin 1.8s linear infinite;
  }
  .vinyl-peek .sheen {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 50%;
    pointer-events: none;
  }
  .vinyl-peek .label-art {
    background:
      linear-gradient(rgba(20, 17, 15, 0.28), rgba(20, 17, 15, 0.4)),
      url("sleeve.jpg") center 62% / 230% no-repeat;
    border-color: rgba(31, 111, 113, 0.9);
  }
  .vinyl-peek .label-out { fill: #f3ead8; }
  .sleeve {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 228px;
    height: 228px;
    padding: 0;
    overflow: hidden;
    background: #161210;
    box-shadow:
      0 28px 56px rgba(20, 17, 15, 0.32),
      8px 0 24px rgba(20, 17, 15, 0.18);
  }
  .sleeve-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .sleeve-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(118deg, rgba(255,255,255,0.22) 0%, transparent 18%, transparent 62%, rgba(255,255,255,0.12) 78%, transparent 92%),
      linear-gradient(to bottom, rgba(255,255,255,0.08), transparent 28%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    mix-blend-mode: screen;
  }
  .product-cap {
    margin: 22px 0 0;
    font-family: "Hahmlet", Georgia, serif;
    font-size: 12px;
    font-style: italic;
    letter-spacing: 0.04em;
    color: var(--roast);
    opacity: 0.8;
  }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.06); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes fall { to { transform: translateY(110svh) rotate(120deg); } }
@keyframes floatNote {
  0% { transform: translateY(0) rotate(-8deg); opacity: 0; }
  12% { opacity: 0.7; }
  100% { transform: translateY(-70vh) rotate(12deg); opacity: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .glow, .glow-2, .flake, .note, .vinyl-peek .disc { animation: none !important; }
  .record { transform: none !important; }
  .copy-search, .copy-found, .skip { transition: none !important; }
}
