
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  --paper: #f8f5f0;
  --ink: #24211f;
  --muted: #888078;
  --line: #e7e0d7;
  --accent: #d96e59;
  --accent-dark: #b85140;
  --white: #fffdfa;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid #d96e5980;
  outline-offset: 3px;
}
a { color: inherit; text-decoration: none; }

.topbar {
  height: 82px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(248,245,240,.92);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -1px; }
.brand-icon { color: var(--accent); font-size: 30px; }
.brand small { display: block; margin-top: 2px; font-size: 8px; font-weight: 600; letter-spacing: 1.7px; color: var(--muted); }
.creator, .eyebrow, .step-badge, .panel-hint, .camera-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
}
.creator { color: var(--muted); }

.hero {
  max-width: 1200px;
  min-height: 380px;
  margin: 0 auto;
  padding: 78px 8% 72px;
  position: relative;
  overflow: hidden;
}
.eyebrow { color: var(--accent); display: inline-block; }
.hero h1, .section-heading h2, .how-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  letter-spacing: -1.7px;
}
.hero h1 { font-size: clamp(44px, 6.5vw, 76px); line-height: 1.05; margin: 18px 0; }
.hero h1 span { color: var(--accent); font-style: italic; }
.hero p { max-width: 470px; line-height: 1.8; color: var(--muted); font-size: 14px; }
.hero-link {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  margin-top: 23px;
  background: var(--ink);
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: 1.1px;
  font-weight: 700;
  transition: transform .2s, background .2s;
}
.hero-link:hover { transform: translateY(-2px); background: var(--accent); }
.hero-decoration { position: absolute; color: #e6c7b8; pointer-events: none; }
.decoration-one { right: 15%; top: 75px; font-size: 100px; transform: rotate(13deg); }
.decoration-two { right: 8%; bottom: 65px; font-size: 90px; transform: rotate(-15deg); }

.workspace, .customizer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 65px 7%;
  border-top: 1px solid var(--line);
}
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-heading h2 { font-size: clamp(31px, 4vw, 44px); margin: 8px 0 7px; }
.section-heading p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.step-badge { padding: 10px 12px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); white-space: nowrap; }

.camera-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, .7fr); gap: 20px; align-items: stretch; }
.camera-card, .session-card, .preview-card, .control-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.camera-card { padding: 18px; min-width: 0; }
.camera-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 9px; letter-spacing: .8px; font-weight: 700; }
.camera-top > span:first-child, .preview-meta > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c5bdb4; }
.camera-label { color: #a39a91; font-size: 9px; }
.camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eae5df;
  overflow: hidden;
  border-radius: 12px;
  isolation: isolate;
}
#camera { display: none; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#camera.active { display: block; }
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #6d655d;
}
.placeholder-icon { font-size: 42px; color: var(--accent); }
.camera-placeholder strong { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; font-weight: 500; }
.camera-placeholder > span:last-child { font-size: 11px; color: #8d857d; }
.camera-overlay { position: absolute; inset: 0; background: transparent; pointer-events: none; }
.camera-corner { position: absolute; width: 18px; height: 18px; border-color: rgba(255,255,255,.8); border-style: solid; z-index: 2; pointer-events: none; }
.corner-tl { top: 13px; left: 13px; border-width: 2px 0 0 2px; }
.corner-tr { top: 13px; right: 13px; border-width: 2px 2px 0 0; }
.corner-bl { bottom: 13px; left: 13px; border-width: 0 0 2px 2px; }
.corner-br { bottom: 13px; right: 13px; border-width: 0 2px 2px 0; }
.countdown { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; z-index: 3; color: white; font-size: clamp(60px, 10vw, 100px); font-weight: 700; text-shadow: 0 3px 20px #0008; }
.countdown.visible { display: flex; }
.camera-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.button {
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 7px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  transition: background .2s, transform .2s, opacity .2s;
}
.button:not(:disabled):hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: white; }
.button-primary:not(:disabled):hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); color: var(--ink); background: white; }
.button-secondary:hover { background: #f4eee7; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.status-message { margin: 13px 2px 0; font-size: 11px; color: var(--muted); line-height: 1.6; min-height: 18px; }

.session-card { padding: 25px 23px; }
.session-number { font-family: 'Playfair Display', Georgia, serif; font-size: 58px; margin-top: 23px; line-height: 1; }
.session-number small { font-family: 'DM Sans', sans-serif; font-size: 17px; color: #b5aca3; }
.session-card > p { font-size: 11px; color: var(--muted); }
.session-divider { height: 1px; background: var(--line); margin: 24px 0; }
.session-item { display: flex; gap: 11px; align-items: center; margin: 18px 0; font-size: 11px; }
.session-symbol { color: var(--accent); font-size: 17px; width: 20px; text-align: center; }
.session-note { background: #f8f2ec; border-radius: 8px; padding: 13px; margin-top: 28px; color: #8c796c; font-size: 10px; line-height: 1.7; }

.customizer { padding-top: 70px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); align-items: start; gap: 22px; }
.editor-controls { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.control-panel { padding: 22px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
.panel-heading > div { display: flex; align-items: center; gap: 11px; }
.panel-heading strong { font-size: 13px; }
.panel-number { color: var(--accent); font-size: 10px; font-weight: 700; }
.panel-hint { color: #a59b92; font-size: 8px; white-space: nowrap; }

.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.theme-card { padding: 6px; border: 1px solid transparent; background: transparent; border-radius: 10px; text-align: center; min-width: 0; color: var(--ink); }
.theme-card:hover { background: #f8f3ed; }
.theme-card.selected { border-color: var(--accent); background: #fcf2ed; }
.theme-card > span:last-child { display: block; margin: 8px 0 3px; font-size: 9px; font-weight: 600; line-height: 1.3; }
.theme-art {
  height: 90px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  font-family: Georgia, serif;
  font-size: 19px;
  position: relative;
}
.theme-art b { font-size: 10px; font-weight: 600; }
.theme-film { background: #171717; color: #f5e8d7; border: 3px solid #292929; }
.theme-film::before, .theme-film::after { content: "▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪"; position: absolute; left: -3px; right: -3px; font: 7px sans-serif; letter-spacing: 3px; color: #eee2d1; text-align: center; white-space: nowrap; }
.theme-film::before { top: 3px; }
.theme-film::after { bottom: 3px; }
.theme-cute { background: #f8d8e2; color: #c14e79; }
.theme-vintage { background: #e7d3b5; color: #73533a; text-align: center; font-size: 15px; }
.theme-vintage small { font-size: 7px; letter-spacing: 1px; }
.theme-y2k { background: linear-gradient(135deg,#d1f0ff,#8c9eff,#e6b9ff); color: #fff; text-shadow: 0 1px 5px #6157ab; }
.theme-scrapbook { background: #f3e5c8; color: #ad6b4c; transform: rotate(0deg); }
.theme-elegant { background: #f7f0dd; color: #b79b53; border: 1px solid #e0cc91; }
.theme-birthday { background: #ffdbbd; color: #c45e68; }
.theme-minimal { background: #fff; border: 1px solid #e6e0d9; color: #333; }

.color-options { display: flex; flex-wrap: wrap; gap: 11px; }
.color-swatch { width: 31px; height: 31px; background: var(--swatch); border: 2px solid white; outline: 1px solid #ded6cd; border-radius: 50%; transition: transform .2s, outline .2s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.small-note { font-size: 10px; color: var(--muted); line-height: 1.6; margin: 15px 0 0; }

.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.choice-button { padding: 11px 5px; border: 1px solid var(--line); border-radius: 6px; color: #756c64; background: white; font-size: 10px; }
.choice-button.active { background: var(--ink); color: white; border-color: var(--ink); }

.sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.sticker-option { cursor: pointer; border: 1px solid var(--line); border-radius: 8px; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: #fff; }
.sticker-option:has(input:checked) { border-color: #dfaa9b; background: #fff5f0; }
.sticker-option input { position: absolute; opacity: 0; pointer-events: none; }
.sticker-option span { font-family: Georgia, serif; font-size: 23px; color: var(--accent); }
.sticker-option b { font-size: 9px; font-weight: 600; }

.field-label { display: block; font-size: 10px; font-weight: 700; margin: 14px 0 7px; color: #756c64; }
.text-field { width: 100%; border: 1px solid var(--line); background: #fffdfa; padding: 12px 13px; border-radius: 7px; color: var(--ink); font-size: 12px; outline: none; }
.text-field:focus { border-color: var(--accent); }

.preview-card { padding: 20px; position: sticky; top: 18px; min-width: 0; }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 17px; }
.preview-top h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 500; margin: 6px 0 0; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 700; color: #588267; letter-spacing: .8px; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #67a77e; }
.preview-stage { background: #f1ece5; border-radius: 12px; min-height: 360px; max-height: 72vh; overflow: auto; padding: 20px 12px; display: flex; justify-content: center; align-items: flex-start; }
#strip-preview { display: block; width: 100%; max-width: 310px; height: auto; box-shadow: 0 8px 28px #2d20131a; }
.preview-empty { min-height: 320px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; }
.preview-empty > span { font-size: 46px; color: var(--accent); }
.preview-empty strong { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 19px; margin: 12px 0 5px; }
.preview-empty p { font-size: 11px; color: var(--muted); line-height: 1.7; max-width: 210px; }
.preview-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 9px; font-weight: 700; letter-spacing: .6px; color: var(--muted); margin: 17px 0; }
.preview-meta .status-dot { background: #72a481; }
.download-button { width: 100%; min-height: 49px; }
.reset-button { width: 100%; margin-top: 8px; }
.preview-footnote { text-align: center; font-size: 9px; color: #aaa096; margin: 14px 0 2px; }

.how-section { border-top: 1px solid var(--line); max-width: 1200px; padding: 65px 7% 80px; margin: 0 auto; }
.how-section h2 { font-size: 38px; margin: 10px 0 30px; }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; }
.how-grid article { border-top: 1px solid #d9cfc3; padding-top: 18px; }
.how-grid article > span { font-size: 10px; color: var(--accent); font-weight: 700; }
.how-grid h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 23px; font-weight: 500; margin: 10px 0; }
.how-grid p { color: var(--muted); font-size: 12px; line-height: 1.8; max-width: 260px; }

footer { border-top: 1px solid var(--line); padding: 27px 7%; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { font-size: 17px; }
.footer-brand .brand-icon { font-size: 25px; }
footer > p { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: var(--muted); font-size: 14px; }
footer > small { color: #a49b92; font-size: 9px; }

@media (min-width: 1000px) {
  .hero { min-height: 410px; }
}

@media (max-width: 800px) {
  .hero { padding-top: 65px; min-height: 350px; }
  .decoration-one { right: 8%; top: 55px; font-size: 70px; }
  .decoration-two { right: 6%; bottom: 45px; font-size: 60px; }
  .camera-layout { grid-template-columns: 1fr; }
  .session-card { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 15px; padding: 20px; }
  .session-card > .eyebrow, .session-number, .session-card > p, .session-divider, .session-note { grid-column: 1 / -1; }
  .session-number { margin-top: 5px; font-size: 42px; }
  .session-divider { margin: 12px 0; }
  .session-item { margin: 7px 0; }
  .session-note { margin-top: 12px; }
  .editor-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; grid-row: 1; }
  .preview-stage { max-height: 65vh; }
  #strip-preview { max-width: 290px; }
}

@media (max-width: 520px) {
  .topbar { height: 68px; padding: 0 5%; }
  .brand { font-size: 18px; }
  .brand-icon { font-size: 25px; }
  .creator { font-size: 8px; letter-spacing: .7px; }
  .hero { padding: 54px 6% 55px; min-height: 345px; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 12px; max-width: 310px; }
  .decoration-one { right: 5%; top: 42px; font-size: 48px; opacity: .6; }
  .decoration-two { right: 4%; bottom: 40px; font-size: 45px; opacity: .7; }
  .workspace, .customizer, .how-section { padding: 48px 5%; }
  .section-heading { margin-bottom: 22px; }
  .section-heading h2 { font-size: 32px; }
  .section-heading p { font-size: 11px; max-width: 280px; }
  .step-badge { font-size: 8px; padding: 8px; }
  .camera-card { padding: 12px; border-radius: 15px; }
  .camera-frame { aspect-ratio: 3 / 4; }
  .camera-controls { grid-template-columns: 1fr; }
  .button { min-height: 45px; }
  .theme-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
  .theme-card { padding: 4px; }
  .theme-art { height: 74px; font-size: 16px; }
  .theme-card > span:last-child { font-size: 8px; }
  .control-panel { padding: 17px 14px; border-radius: 15px; }
  .panel-heading { margin-bottom: 14px; }
  .panel-heading strong { font-size: 12px; }
  .panel-hint { font-size: 7px; letter-spacing: .5px; }
  .sticker-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
  .sticker-option { min-height: 68px; }
  .sticker-option b { font-size: 8px; }
  .choice-grid { gap: 5px; }
  .choice-button { font-size: 9px; }
  .preview-card { padding: 14px; border-radius: 15px; }
  .preview-stage { min-height: 290px; padding: 14px 8px; }
  .preview-empty { min-height: 260px; }
  #strip-preview { max-width: 245px; }
  .how-section h2 { font-size: 31px; }
  .how-grid { grid-template-columns: 1fr; gap: 18px; }
  .how-grid article { padding-top: 14px; }
  .how-grid h3 { margin: 7px 0; }
  footer { padding: 25px 5%; flex-direction: column; align-items: flex-start; gap: 8px; }
  footer > p { margin: 4px 0; }
}
