:root {
  --bg: #fff8f3;
  --card: #ffffff;
  --line: rgba(48, 32, 28, 0.1);
  --text: #241816;
  --muted: #6d5c58;
  --lime: #ff3b4e;
  --lime-ink: #ffffff;
  --ig: #e11d48;
  --fb: #1d6fe8;
  --danger: #c81e1e;
  --ready: #0f7a45;
  --shadow: 0 22px 50px rgba(80, 40, 30, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background: var(--bg);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(820px 480px at 100% -10%, rgba(255, 186, 150, 0.55), transparent 58%),
    radial-gradient(640px 420px at -10% 10%, rgba(255, 143, 168, 0.28), transparent 54%),
    radial-gradient(700px 460px at 80% 100%, rgba(168, 198, 255, 0.38), transparent 52%),
    linear-gradient(180deg, #fffdfb 0%, #fff7f2 48%, #f4f8ff 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(36, 24, 22, 0.045) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
  pointer-events: none;
}

button, input { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 252, 249, 0.78);
  box-shadow: 0 12px 30px rgba(80, 40, 30, 0.06);
  backdrop-filter: blur(16px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(160deg, #ff6a78, #ff3b4e 55%, #e11d48);
  color: var(--lime-ink);
  box-shadow: 0 8px 16px rgba(255, 59, 78, 0.28);
}

.nav-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 42px;
  align-items: center;
  padding: 34px 0 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #c81e3a;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(255, 59, 78, 0.45);
  animation: pulse 1.8s ease-out infinite;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 38rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(80, 40, 30, 0.08);
  backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.composer:focus-within,
.composer[data-platform="instagram"],
.composer[data-platform="facebook"] {
  border-color: rgba(255, 59, 78, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 59, 78, 0.1), var(--shadow);
}

.composer[data-platform="instagram"] { border-color: rgba(255, 79, 120, 0.7); }
.composer[data-platform="facebook"] { border-color: rgba(91, 155, 255, 0.75); }

.detect {
  flex: none;
  margin-left: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f6efe9;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer[data-platform="instagram"] .detect { color: #9f1239; background: #ffe4ea; }
.composer[data-platform="facebook"] .detect { color: #1e40af; background: #e4efff; }

input[type="url"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 12px 6px;
  font-size: 16px;
}

input::placeholder { color: #a39893; }

.ghost, .go, .formats button, .dl {
  border: 0;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.ghost {
  flex: none;
  min-height: 48px;
  border-radius: 14px;
  background: #fff6f4;
  color: var(--text);
  padding: 10px 16px;
  font-weight: 700;
}

.ghost:hover { background: #fff1ea; }

.go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff5d6d, #ff3148);
  color: var(--lime-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 16px rgba(255, 59, 78, 0.28);
}

.go:hover { filter: brightness(1.05); transform: translateY(-1px); }

.go:disabled {
  cursor: progress;
  transform: none;
  filter: saturate(0.7);
}

.go.busy .go-label { opacity: 0; }

.go.busy::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

input[type="url"]:focus,
input[type="url"]:focus-visible {
  outline: none;
}

.status {
  min-height: 1.4em;
  margin: 12px 6px 0;
  color: var(--muted);
  font-weight: 600;
}

.status.error { color: var(--danger); }
.status.ready { color: var(--ready); }

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.formats button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(36, 24, 22, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.formats button::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #c9b8b2;
}

.formats button.ig::before { background: #e1306c; }
.formats button.fb::before { background: #1877f2; }

.formats button:hover {
  color: var(--text);
  border-color: rgba(255, 59, 78, 0.35);
  background: #fff;
  transform: translateY(-1px);
}

.stage { min-height: 420px; }

.preview, .result, .loading-card, .error-card {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 60px rgba(80, 40, 30, 0.1);
  backdrop-filter: blur(18px);
}

.preview.idle {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 28px 22px 24px;
  text-align: center;
}

.phone {
  width: min(230px, 70%);
  padding: 8px;
  border-radius: 36px;
  background: linear-gradient(180deg, #3a3538, #1b191c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 22px 40px rgba(36, 24, 22, 0.2);
}

.screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  background: #f3ebe6;
}

.reel-motion {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(160deg, transparent 20%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(180deg, #ffd0c2, #ffd6e4 42%, #d7e7ff);
  animation: drift 7s ease-in-out infinite alternate;
}

.phone-chip, .duration, .platform-badge {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  background: rgba(36, 24, 22, 0.62);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.phone-chip { top: 12px; left: 12px; }
.duration { right: 12px; bottom: 12px; }
.platform-badge { top: 12px; left: 12px; }

.play {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 58px;
  height: 58px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ff3b4e;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(36, 24, 22, 0.18);
}

.preview-copy h2, .result h2, .error-card h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 6px;
  color: #c81e3a;
  font-size: 0.92rem;
  font-weight: 600;
}

.preview-copy p:last-child, .error-card p, .steps p {
  margin: 8px 0 0;
  color: var(--muted);
}

.result, .loading-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  animation: rise 0.45s ease;
}

.result .phone { width: 100%; }
.result .screen img,
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.details { padding: 8px 8px 4px 0; min-width: 0; }

.result h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow-wrap: anywhere;
}

.platform {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.platform.instagram { color: #be123c; }
.platform.facebook { color: #1d4ed8; }

.author {
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.files {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff8f4;
  color: var(--text);
  text-decoration: none;
}

.dl strong { display: block; font-size: 1rem; }
.dl small { color: var(--muted); font-weight: 600; }

.dl.primary {
  background: linear-gradient(180deg, #ff5d6d, #ff3148);
  border-color: transparent;
  color: var(--lime-ink);
  box-shadow: 0 8px 16px rgba(255, 59, 78, 0.22);
}

.dl.primary small { color: rgba(255, 255, 255, 0.86); }

.dl:hover { transform: translateY(-1px); }

.dl-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}

.dl.primary .dl-icon { background: rgba(255, 255, 255, 0.22); }
.dl:not(.primary) .dl-icon { background: #ffe8ea; color: var(--lime); }

.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.stack { display: grid; gap: 14px; }

.loading-card { align-items: center; }

.skeleton {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3e7e1, #fff, #f3e7e1);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton.title { width: 80%; height: 28px; margin-top: 10px; }
.skeleton.line { width: 55%; margin-top: 12px; }
.skeleton.button { width: 100%; height: 58px; margin-top: 18px; border-radius: 16px; }

.shimmer-screen {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent),
    #f3ebe6;
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.error-card { padding: 28px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.steps article {
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(80, 40, 30, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.steps article:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(80, 40, 30, 0.08);
}

.steps span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffe4e8;
  color: #c81e3a;
  font-weight: 700;
}

.steps h2 {
  margin: 12px 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  color: #6d5c58;
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-inner p { margin: 0 0 10px; max-width: 78ch; }

.footer-inner p:last-child { margin-bottom: 0; }

.footer-inner a {
  color: #c81e3a;
  font-weight: 700;
}

.footer-home { margin-top: 10px; }

.legal {
  width: min(760px, calc(100% - 32px));
  margin: 12px auto 28px;
}

.legal h1 { max-width: none; }

.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.legal p, .legal li {
  color: var(--muted);
  font-size: 1.02rem;
}

.legal a { color: #c81e3a; }

.updated { margin-top: 8px; font-weight: 600; }

.contents { padding-left: 1.2rem; }

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -6%, 0) scale(1.08); }
}

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

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

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero, .steps, .result, .loading-card { grid-template-columns: 1fr; }
  .hero { gap: 22px; }
  .stage { min-height: 0; }
  .result .phone { width: min(240px, 100%); }
}

@media (max-width: 720px) {
  h1 { font-size: 2.15rem; max-width: none; }
  .nav { top: 8px; }
  .composer { flex-wrap: wrap; align-items: stretch; }
  .detect { display: none; }
  input[type="url"] {
    flex: 1 1 100%;
    min-height: 48px;
    padding: 12px;
  }
  .actions { width: 100%; }
  .ghost, .go { flex: 1; min-height: 48px; }
  .nav-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
