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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: #241c18;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 480px at 0% -10%, #f8e4de, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e5eee4, transparent 48%),
    #f3eee8;
}

body[data-page="watch"] {
  background:
    radial-gradient(700px 420px at 50% -12%, #f8e3dc, transparent 58%),
    #f6f1eb;
}

::selection {
  background: #ead0d4;
}

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

img {
  max-width: 100%;
}

a {
  color: #7a3142;
}

:focus-visible {
  outline: 2px solid #7a3142;
  outline-offset: 3px;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 12px;
  background: rgba(243, 238, 232, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title,
.brand-tag {
  color: #6e2436;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  line-height: 1;
}

.brand-title {
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-tag {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.brand-lockup.stack {
  flex-direction: column;
  gap: 4px;
}

.brand-lockup.stack .brand-names {
  align-items: center;
}

.brand-lockup.stack .brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  letter-spacing: 0.2em;
}

.brand-lockup.stack .brand-title::before,
.brand-lockup.stack .brand-title::after {
  content: "";
  width: 16px;
  height: 1px;
  background: #6e2436;
}

.brand-lockup.stack .brand-title::before {
  box-shadow: -5px 0 0 1.5px #6e2436;
}

.brand-lockup.stack .brand-title::after {
  box-shadow: 5px 0 0 1.5px #6e2436;
}

.mark {
  width: 58px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.ribbon-shine {
  fill: none;
  stroke: rgba(255, 236, 220, 0.95);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 48 210;
  animation: ribbon-flow 3.8s linear infinite;
}

@keyframes ribbon-flow {
  to {
    stroke-dashoffset: -258;
  }
}

.word {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.word em {
  font-style: italic;
  color: #7a3142;
}

.top nav {
  display: flex;
  gap: 18px;
}

.top nav a {
  color: #5c514a;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.top nav a.on,
.top nav a:hover {
  color: #241c18;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 36px;
  align-items: center;
  padding: 28px 0 56px;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: #7a3142;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.toolbar h1,
.panel h1,
.auth-card h1,
.letter .who,
.problem h1 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.panel h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 0.95;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6vw, 80px);
  line-height: 0.92;
}

.hero h1 em {
  font-style: italic;
  color: #7a3142;
}

.lead,
.muted,
.note,
.hint {
  color: #5c514a;
}

.lead {
  max-width: 38rem;
  margin: 18px 0 0;
  font-size: 18px;
}

.actions,
.toolbar-actions,
.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions {
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: wait;
}

.btn-primary {
  background: #7a3142;
  color: #fffaf7;
}

.btn-primary:hover {
  background: #642733;
}

.btn-ghost,
.btn-danger {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(122, 49, 66, 0.35);
}

.btn-ghost {
  color: #7a3142;
}

.btn-ghost:hover {
  background: rgba(122, 49, 66, 0.06);
}

.btn-danger {
  color: #8a3030;
  box-shadow: inset 0 0 0 1.5px rgba(138, 48, 48, 0.35);
}

.device {
  justify-self: center;
  width: 260px;
  padding: 12px;
  border: 8px solid #241c18;
  border-radius: 36px;
  background: #fffdfb;
  box-shadow: 0 24px 50px rgba(60, 30, 30, 0.12);
}

.device-screen {
  min-height: 460px;
  padding: 22px 16px 16px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(180px 140px at 50% 28%, #f8e4de, transparent 70%),
    #f7f2ec;
}

.mini-brand .mark {
  width: 88px;
}

.mini-brand .brand-title {
  font-size: 15px;
}

.mini-kicker {
  color: #7a3142;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-name {
  margin-top: 22px;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 52px;
  font-style: italic;
  line-height: 0.9;
}

.mini-from {
  color: #5c514a;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 22px;
}

.mini-stage {
  display: grid;
  place-items: center;
  height: 180px;
  margin-top: 18px;
  border-radius: 16px;
  background: #241c18;
}

.mini-stage span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #7a3142;
  box-shadow: inset 0 0 0 12px rgba(255, 250, 247, 0.16);
}

.how {
  padding: 0 0 72px;
}

.how h2 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 40px;
  font-weight: 500;
}

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

.step {
  padding: 18px 18px 20px;
  border: 1px solid rgba(36, 28, 24, 0.06);
  border-radius: 22px;
  background: rgba(255, 253, 251, 0.74);
}

.step-n {
  color: #7a3142;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.step h3 {
  margin: 6px 0;
  font-size: 18px;
}

.step p {
  margin: 0;
  color: #5c514a;
}

.foot {
  padding: 8px 0 28px;
  color: #8a7d74;
  font-size: 13px;
}

.auth-wrap {
  display: grid;
  min-height: calc(100vh - 160px);
  place-items: center;
  padding: 24px 0 56px;
}

.auth-card,
.panel,
.problem {
  border: 1px solid rgba(36, 28, 24, 0.06);
  border-radius: 28px;
  background: rgba(255, 253, 251, 0.88);
  box-shadow: 0 24px 60px rgba(60, 30, 30, 0.05);
}

.auth-card {
  width: min(440px, 100%);
  padding: 32px 28px;
}

.auth-card h1,
.toolbar h1,
.problem h1 {
  margin: 0;
  font-size: 48px;
  line-height: 0.95;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 18px;
}

.toolbar p,
.auth-card p {
  margin: 8px 0 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding-bottom: 36px;
}

.tile {
  display: block;
  padding: 16px 16px 14px;
  border: 1px solid rgba(36, 28, 24, 0.08);
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 253, 251, 0.88);
  box-shadow: 0 10px 30px rgba(60, 30, 30, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(60, 30, 30, 0.08);
}

.tile-top,
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.tile h2 {
  margin: 10px 0 0;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 0.95;
}

.tile .from-line,
.letter .from-line {
  margin: 4px 0 0;
  color: #5c514a;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 22px;
}

.snippet {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tile time,
.meta-line {
  display: block;
  margin-top: 12px;
  color: #8a7d74;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok {
  background: #e5f0e6;
  color: #245133;
}

.pill.wait {
  background: #f6e7d4;
  color: #7a4e16;
}

.pill.sample {
  background: #f3e4e7;
  color: #7a3142;
}

.order-label {
  color: #8a7d74;
  font-size: 13px;
  font-weight: 700;
}

.empty {
  padding: 28px;
  margin-bottom: 40px;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
}

.text-btn,
.back-link {
  color: #5c514a;
  font-weight: 650;
  font-weight: 600;
  text-decoration: none;
}

.text-btn {
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
  padding: 18px 0 56px;
}

.panel {
  padding: 22px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(36, 28, 24, 0.16);
  border-radius: 12px;
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  border-color: #7a3142;
  outline: none;
  box-shadow: 0 0 0 3px rgba(122, 49, 66, 0.15);
}

.hint-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8a7d74;
  font-size: 12px;
}

.drop {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 16px;
  border: 1.5px dashed rgba(122, 49, 66, 0.4);
  border-radius: 16px;
  color: #5c514a;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.drop strong {
  color: #241c18;
}

.drop.over {
  border-color: #7a3142;
  background: #f8e8ea;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-meta {
  min-height: 1.2em;
  margin: 0;
  color: #245133;
  font-size: 13px;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #8a3030;
  background: #fdecec;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stage {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 18px;
  background: #1c1614;
}

.stage video,
.play-btn,
.video-error {
  grid-area: 1 / 1;
}

.stage video {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #1c1614;
}

.mini-player {
  margin-bottom: 14px;
}

.mini-player video {
  max-height: 280px;
}

.play-btn {
  position: relative;
  z-index: 3;
  place-self: center;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  background: #7a3142;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transform: translateZ(0);
}

.triangle {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fffaf7;
}

.stage.empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  color: #5c514a;
  text-align: center;
  background: #f6ebe6;
}

.video-error {
  place-self: center;
  z-index: 4;
  max-width: 28ch;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  color: #4a2c2c;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  background: #fffaf7;
}

.qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sticker {
  width: 78mm;
  max-width: 100%;
  padding: 7mm 6mm 6mm;
  border: 1px dashed rgba(36, 28, 24, 0.4);
  text-align: center;
  background: #fff;
  box-shadow: 0 16px 40px rgba(60, 30, 30, 0.08);
}

.sticker-brand .mark {
  width: 32mm;
  height: auto;
}

.sticker-brand .brand-title {
  font-size: 13px;
  letter-spacing: 0.14em;
}

.sticker-brand .brand-tag {
  font-size: 12px;
}

.sticker-who {
  margin: 2mm 0 0;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  overflow-wrap: anywhere;
}

.sticker-from,
.sticker-order,
.sticker-hint {
  margin: 1mm 0 0;
}

.sticker-from {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 18px;
  color: #5c514a;
}

.sticker-hint {
  margin-top: 3mm;
  font-size: 13px;
}

.sticker-order {
  color: #8a7d74;
  font-size: 12px;
}

.sticker img {
  width: 48mm;
  height: 48mm;
  margin: 4mm auto 0;
}

.sticker-ghost {
  display: grid;
  place-items: center;
  min-height: 90mm;
  color: #5c514a;
  box-shadow: none;
}

.qr-actions {
  flex-direction: column;
  width: min(100%, 78mm);
}

.qr-actions .btn,
.form-actions .btn {
  width: auto;
}

.qr-actions .btn {
  width: 100%;
}

.qr-url {
  margin: 0;
  color: #5c514a;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.problem {
  margin: 40px auto;
  padding: 28px;
}

.problem code,
.hint code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(36, 28, 24, 0.06);
}

.loading {
  display: grid;
  min-height: 70vh;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.loading .mark {
  width: 112px;
  height: auto;
}

@keyframes pulse {
  50% {
    transform: scale(0.92);
    opacity: 0.72;
  }
}

.watch-page {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  padding: 28px 16px 40px;
}

.letter {
  width: min(460px, 100%);
  padding: 28px 22px 22px;
  border-radius: 28px;
  text-align: center;
  background: rgba(255, 253, 251, 0.92);
  box-shadow: 0 30px 70px rgba(60, 30, 30, 0.1);
}

.watch-brand {
  justify-content: center;
}

.watch-brand .mark {
  width: 150px;
  height: auto;
}

.letter .who {
  margin: 18px 0 0;
  font-size: clamp(48px, 12vw, 72px);
  font-style: italic;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.letter .from-line {
  font-size: 28px;
}

.msg {
  margin: 14px 0 0;
  white-space: pre-wrap;
}

.letter .stage {
  min-height: 220px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fffaf7;
  background: #241c18;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}

@media (max-width: 860px) {
  .hero,
  .steps,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .has-qr .qr-col {
    order: -1;
  }

  .device {
    margin-top: 8px;
  }
}

@media (max-width: 700px) {
  .toolbar,
  .editor-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .hero {
    padding-top: 18px;
  }
}

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

@media print {
  body {
    background: #fff !important;
  }

  .no-print,
  .toast {
    display: none !important;
  }

  .ribbon-shine {
    animation: none;
  }

  .wrap {
    width: auto;
  }

  .editor-grid {
    display: block;
  }

  .sticker,
  .sticker * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sticker {
    margin: 8mm auto;
    box-shadow: none;
  }
}
