:root {
  --cream: #fff8f4;
  --paper: #fffdfb;
  --paper-warm: #fffaf7;
  --blush-50: #fdf1ee;
  --blush-100: #f9e1e3;
  --blush-200: #f2c7cc;
  --blush-300: #e8a8b2;
  --rose: #c26079;
  --rose-deep: #9e3f5b;
  --berry: #5a2739;
  --plum: #431f2e;
  --ink: #4f3541;
  --muted: #7c5d67;
  --muted-soft: #7a5c66;
  --gold: #c6a06a;
  --gold-deep: #a67c4d;
  --line: rgba(143, 54, 82, 0.12);
  --line-strong: rgba(143, 54, 82, 0.2);
  --shadow-sm: 0 8px 24px rgba(91, 39, 57, 0.06);
  --shadow-md: 0 30px 70px -40px rgba(91, 39, 57, 0.35);
  --shadow-lg: 0 42px 90px -45px rgba(91, 39, 57, 0.45);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--berry);
  background:
    radial-gradient(1100px 760px at 88% -12%, rgba(242, 199, 204, 0.58), transparent 62%),
    radial-gradient(900px 680px at -12% 34%, rgba(234, 217, 191, 0.34), transparent 60%),
    linear-gradient(180deg, #fffaf7 0%, #fff6f2 46%, #fdf0ed 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 30% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(40% 30% at 85% 70%, rgba(248, 215, 220, 0.22), transparent 70%);
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: progress;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: var(--blush-200);
  color: var(--plum);
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.55;
}

.page-glow--rose {
  width: 380px;
  height: 380px;
  top: -140px;
  right: -100px;
  background: rgba(240, 184, 193, 0.55);
}

.page-glow--gold {
  width: 320px;
  height: 320px;
  left: -130px;
  top: 46%;
  background: rgba(232, 208, 169, 0.3);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.042;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.site-header,
.page,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px 32px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff8f4;
  background: linear-gradient(145deg, #c26079 0%, #9e3f5b 62%, #833049 100%);
  box-shadow:
    0 8px 18px -10px rgba(143, 54, 82, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand__mark svg {
  width: 25px;
  height: 25px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.17em;
  color: var(--plum);
}

.brand__sub {
  font-size: 7.5px;
  line-height: 1.2;
  letter-spacing: 0.22em;
  color: var(--muted-soft);
}

.campaign-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.58);
  box-shadow: 0 6px 20px -14px rgba(91, 39, 57, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #744c59;
  white-space: nowrap;
}

.campaign-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(194, 96, 121, 0.12);
}

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.hero {
  position: relative;
  max-width: 930px;
  margin: 0 auto;
  padding: 66px 20px 54px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--rose-deep);
}

.eyebrow__line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 160, 106, 0.75));
}

.eyebrow__line:last-child {
  transform: scaleX(-1);
}

.hero__title {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--plum);
}

.hero__title em {
  position: relative;
  display: inline-block;
  padding-bottom: 0.12em;
  font-style: normal;
  color: var(--rose-deep);
  background: linear-gradient(100deg, #943953 0%, #c26079 54%, #b18357 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__title em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -0.02em;
  height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12'%3E%3Cpath d='M3 8C60 3 130 2 297 6' fill='none' stroke='%23c6a06a' stroke-width='2' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.hero__lead {
  margin: 26px auto 0;
  font-size: 15.5px;
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-soft);
}

.hero__meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.8;
}

.float-spark,
.float-petal {
  position: absolute;
  pointer-events: none;
}

.float-spark {
  color: var(--gold);
  opacity: 0.62;
  animation: floatSoft 7s ease-in-out infinite;
}

.float-spark--one {
  top: 78px;
  left: 3%;
  font-size: 17px;
}

.float-spark--two {
  top: 168px;
  right: 2%;
  font-size: 13px;
  color: var(--rose);
  animation-delay: -2.4s;
}

.float-spark--three {
  bottom: 70px;
  left: 12%;
  font-size: 10px;
  animation-delay: -4.3s;
}

.float-petal {
  width: 12px;
  height: 20px;
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(150deg, rgba(242, 199, 204, 0.75), rgba(255, 250, 247, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: petalFloat 9s ease-in-out infinite;
}

.float-petal--one {
  top: 132px;
  right: 10%;
  transform: rotate(24deg);
}

.float-petal--two {
  bottom: 54px;
  right: 18%;
  width: 9px;
  height: 15px;
  animation-delay: -3.5s;
  transform: rotate(-18deg);
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  align-items: start;
  gap: 26px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 253, 251, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(143, 54, 82, 0.06),
    var(--shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
}

.controls {
  padding: 30px 28px 26px;
}

@media (min-width: 981px) {
  .controls {
    position: sticky;
    top: 22px;
  }
}

.panel__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #e2b7c1;
}

.panel__heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--plum);
}

.panel__heading p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-soft);
}

.style-fieldset {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.style-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 11px 29px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.style-chip--wide {
  grid-column: 1 / -1;
}

.style-chip__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(194, 96, 121, 0.13);
  border-radius: 50%;
  background: linear-gradient(145deg, #fdf2ef, #f7dde1);
  color: var(--rose-deep);
  font-size: 14px;
  line-height: 1;
}

label[for="style-random"] .style-chip__icon {
  border-color: rgba(198, 160, 106, 0.25);
  background: linear-gradient(145deg, #fdf7ed, #f0e1c8);
  color: var(--gold-deep);
}

.style-chip__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.style-chip__text strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--plum);
}

.style-chip__text small {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-chip__check {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rose-deep);
  color: #fff9f6;
  font-size: 9px;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%) scale(0.55);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.style-radio:checked + .style-chip {
  border-color: rgba(194, 96, 121, 0.58);
  background: linear-gradient(135deg, rgba(255, 252, 250, 0.98), rgba(249, 224, 227, 0.8));
  box-shadow: 0 12px 26px -20px rgba(143, 54, 82, 0.7);
}

.style-radio:checked + .style-chip .style-chip__check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.style-radio:focus-visible + .style-chip {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.controls__footer {
  margin-top: 26px;
}

.generate-btn {
  position: relative;
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #b44c6a 0%, #9e3f5b 56%, #87314b 100%);
  color: #fff9f6;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow:
    0 18px 34px -18px rgba(143, 54, 82, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.generate-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 130% at 12% 0%, rgba(255, 255, 255, 0.2), transparent 60%),
    radial-gradient(60% 100% at 92% 100%, rgba(255, 220, 205, 0.12), transparent 65%);
  pointer-events: none;
}

.generate-btn::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -45%;
  width: 34%;
  height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.generate-btn__icon,
.generate-btn__spinner,
.generate-btn__label,
.generate-btn__arrow {
  position: relative;
  z-index: 1;
}

.generate-btn__icon {
  width: 20px;
  height: 20px;
}

.generate-btn__icon svg {
  width: 100%;
  height: 100%;
}

.generate-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.generate-btn__arrow {
  margin-left: 3px;
  font-size: 17px;
  line-height: 1;
  transition: transform 0.25s ease;
}

.generate-btn.is-loading .generate-btn__icon {
  display: none;
}

.generate-btn.is-loading .generate-btn__spinner {
  display: block;
}

.generate-btn.is-loading .generate-btn__arrow {
  opacity: 0.35;
}

.generate-btn:disabled {
  opacity: 0.9;
}

.microcopy {
  margin: 10px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted-soft);
}

.note-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 15px;
  border: 1px dashed rgba(194, 96, 121, 0.22);
  border-radius: 15px;
  background: rgba(248, 231, 231, 0.52);
}

.note-tip__icon {
  flex: 0 0 auto;
  color: var(--rose);
  font-size: 16px;
  line-height: 1.4;
}

.note-tip p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: #74545f;
}

.result {
  padding: 14px;
  scroll-margin-top: 18px;
}

.result__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 9px 12px;
}

.result__label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted-soft);
  text-transform: uppercase;
}

.result__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted-soft);
  white-space: nowrap;
}

.result__status i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 160, 106, 0.14);
}

#result-panel[data-state="loading"] .result__status i {
  background: var(--rose);
  animation: statusPulse 1.5s ease-in-out infinite;
}

#result-panel[data-state="note"] .result__status i {
  background: #8fa58c;
  box-shadow: 0 0 0 3px rgba(143, 165, 140, 0.16);
}

#result-panel[data-state="error"] .result__status i {
  background: var(--rose-deep);
  box-shadow: 0 0 0 3px rgba(158, 63, 91, 0.14);
}

.note-card {
  overflow: hidden;
  border: 1px solid rgba(143, 54, 82, 0.1);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 24px 54px -38px rgba(91, 39, 57, 0.48);
}

.note-cover {
  position: relative;
  min-height: 236px;
  padding: 24px 26px;
  overflow: hidden;
  background:
    radial-gradient(135% 150% at 100% 0%, rgba(255, 249, 245, 0.85) 0%, rgba(255, 249, 245, 0) 55%),
    linear-gradient(125deg, #fff3ee 0%, #f9dfe1 48%, #efc3ca 100%);
}

.note-cover::before {
  content: "";
  position: absolute;
  inset: 11px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 20px;
  pointer-events: none;
}

.note-cover__badge {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 252, 249, 0.54);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8d4058;
}

.note-cover__copy {
  position: relative;
  z-index: 3;
  width: 58%;
  margin-top: 21px;
}

.note-cover__en {
  margin: 0;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(143, 54, 82, 0.64);
}

.note-cover__cn {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.02em;
  color: #4b2232;
}

.note-cover__quote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: #7e5a66;
}

.note-cover__quote::before {
  content: "";
  width: 17px;
  height: 1px;
  flex: 0 0 auto;
  background: rgba(166, 124, 77, 0.6);
}

.note-cover__seal {
  position: absolute;
  top: 20px;
  right: 25px;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(166, 124, 77, 0.5);
  border-radius: 50%;
  color: var(--gold-deep);
  opacity: 0.72;
  transform: rotate(8deg);
}

.note-cover__seal span {
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.note-cover__seal small {
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.05em;
}

.note-cover__halo {
  position: absolute;
  top: -96px;
  right: -72px;
  z-index: 0;
  width: 302px;
  height: 302px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(255, 250, 246, 0.3);
}

.note-cover__halo--small {
  top: -33px;
  right: -14px;
  width: 212px;
  height: 212px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.42);
}

.note-cover__bottle {
  position: absolute;
  right: 17px;
  bottom: -7px;
  z-index: 2;
  width: 132px;
  filter: drop-shadow(0 18px 20px rgba(143, 54, 82, 0.16));
  animation: bottleFloat 6.5s ease-in-out infinite;
}

.note-cover__bottle svg {
  width: 100%;
  height: auto;
}

.note-cover__petal {
  position: absolute;
  z-index: 1;
  width: 13px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(242, 199, 204, 0.12));
  opacity: 0.7;
  animation: petalFloat 8s ease-in-out infinite;
}

.note-cover__petal--one {
  top: 112px;
  left: 46%;
  transform: rotate(32deg);
}

.note-cover__petal--two {
  right: 158px;
  bottom: 22px;
  width: 9px;
  height: 15px;
  transform: rotate(-22deg);
  animation-delay: -2.8s;
}

.note-cover__petal--three {
  top: 57px;
  left: 53%;
  width: 7px;
  height: 12px;
  transform: rotate(68deg);
  animation-delay: -5.4s;
}

.note-content {
  padding: 22px 24px 6px;
}

.note-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-author__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2c7cc, #cf7f92);
  box-shadow: 0 5px 12px -8px rgba(143, 54, 82, 0.7);
  color: #fffaf7;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.note-author__info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.note-author__info strong {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--plum);
}

.note-author__info small {
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted-soft);
}

.note-author__heart {
  margin-left: auto;
  color: var(--blush-300);
  font-size: 20px;
  line-height: 1;
}

.note-title {
  margin: 17px 0 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #4b2232;
  overflow-wrap: anywhere;
}

.note-body {
  margin-top: 11px;
  font-size: 14px;
  line-height: 1.96;
  letter-spacing: 0.012em;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  padding-bottom: 4px;
}

.note-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(194, 96, 121, 0.12);
  border-radius: 999px;
  background: var(--blush-50);
  color: #a34f68;
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.note-tags span:nth-child(-n + 2) {
  border-color: rgba(194, 96, 121, 0.18);
  background: #f8e3e7;
  color: #8f3652;
}

.note-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 19px 24px 21px;
  padding-top: 16px;
  border-top: 1px dashed rgba(143, 54, 82, 0.16);
}

.copy-btn,
.ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 15px;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.copy-btn {
  border: 0;
  background: linear-gradient(120deg, #b44c6a 0%, #9e3f5b 100%);
  box-shadow:
    0 14px 26px -18px rgba(143, 54, 82, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  color: #fff9f6;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.copy-btn__icon {
  width: 17px;
  height: 17px;
}

.copy-btn__icon svg {
  width: 100%;
  height: 100%;
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn.is-copied .icon-copy {
  display: none;
}

.copy-btn.is-copied .icon-check {
  display: block;
}

.ghost-btn {
  padding: 0 16px;
  border: 1px solid rgba(143, 54, 82, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: #7c4a5a;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.ghost-btn svg {
  width: 15px;
  height: 15px;
}

.xhs-btn {
  grid-column: 1 / -1;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(194, 96, 121, 0.28);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 252, 250, 0.96), rgba(249, 226, 229, 0.72));
  color: #8f3652;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.xhs-btn__icon {
  width: 18px;
  height: 18px;
}

.xhs-btn__icon svg {
  width: 100%;
  height: 100%;
}

.xhs-btn__arrow {
  opacity: 0.6;
  font-size: 15px;
  line-height: 1;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.copy-hint {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted-soft);
}

.empty-state,
.loading-state,
.error-state {
  text-align: center;
}

.empty-state {
  padding: 34px 20px 46px;
}

.empty-state__art {
  width: 132px;
  margin: 0 auto 15px;
}

.empty-state__art svg {
  width: 100%;
  height: auto;
}

.empty-state h3,
.loading-state h3,
.error-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--plum);
}

.empty-state p,
.loading-state p,
.error-state p {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted-soft);
}

.loading-state {
  padding: 34px 24px 44px;
}

.loading-state__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px solid rgba(194, 96, 121, 0.16);
  border-radius: 50%;
  background: linear-gradient(145deg, #fdf3f0, #f7dde2);
  box-shadow: 0 10px 24px -18px rgba(143, 54, 82, 0.65);
  color: var(--rose-deep);
  font-size: 19px;
  animation: pulseMark 2.2s ease-in-out infinite;
}

.loading-state__message {
  min-height: 19px;
}

.loading-state__message.is-changing {
  animation: messageIn 0.4s ease both;
}

.skeleton {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 23px auto 0;
}

.skeleton__line {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7e4e4 25%, #fdf4f1 37%, #f7e4e4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}

.skeleton__line--title {
  width: 62%;
  height: 13px;
}

.skeleton__line--short {
  width: 78%;
}

.skeleton__line--medium {
  width: 55%;
}

.error-state {
  padding: 36px 24px 46px;
}

.error-state__mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.error-state .ghost-btn {
  margin-top: 18px;
}

.ritual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 46px auto 0;
  padding: 0 32px;
}

.ritual__line {
  width: 70px;
  height: 1px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, transparent, rgba(198, 160, 106, 0.62), transparent);
}

.ritual p {
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: #866a73;
  white-space: nowrap;
}

.ritual p i {
  margin: 0 7px;
  color: var(--gold);
  font-style: normal;
}

.site-footer {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 32px calc(38px + env(safe-area-inset-bottom));
  text-align: center;
}

.site-footer__brand {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted-soft);
}

.site-footer__brand span {
  margin: 0 4px;
  color: var(--gold);
}

.site-footer__disclaimer {
  margin: 8px 0 0;
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--muted-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100vw - 40px);
  padding: 12px 19px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(67, 31, 46, 0.95);
  box-shadow: 0 18px 40px -20px rgba(67, 31, 46, 0.8);
  color: #fff8f4;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal {
  animation: reveal 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.site-header.reveal {
  animation-delay: 0.04s;
}

.hero.reveal {
  animation-delay: 0.12s;
}

.controls.reveal {
  animation-delay: 0.22s;
}

.result.reveal {
  animation-delay: 0.3s;
}

.ritual.reveal {
  animation-delay: 0.38s;
}

.note-card.is-fresh .note-body-wrap {
  animation: noteIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes noteIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(6deg);
  }
}

@keyframes petalFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

@keyframes bottleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(1.2deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes pulseMark {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 24px -18px rgba(143, 54, 82, 0.65);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 14px 28px -16px rgba(143, 54, 82, 0.55);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(194, 96, 121, 0.12);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(194, 96, 121, 0.04);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.copy-helper {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .style-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(194, 96, 121, 0.32);
    background: rgba(255, 255, 255, 0.82);
  }

  .style-radio:checked + .style-chip:hover {
    border-color: rgba(194, 96, 121, 0.62);
    background: linear-gradient(135deg, rgba(255, 252, 250, 1), rgba(249, 224, 227, 0.88));
  }

  .generate-btn:hover {
    transform: translateY(-2px);
    box-shadow:
      0 24px 40px -20px rgba(143, 54, 82, 0.85),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .generate-btn:hover::after {
    left: 125%;
  }

  .generate-btn:hover .generate-btn__arrow {
    transform: translateX(4px);
  }

  .copy-btn:hover {
    transform: translateY(-1px);
    box-shadow:
      0 18px 30px -18px rgba(143, 54, 82, 0.9),
      inset 0 1px 0 rgba(255, 255, 255, 0.26);
  }

  .ghost-btn:hover {
    border-color: rgba(143, 54, 82, 0.28);
    background: #fff8f4;
  }

  .xhs-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(194, 96, 121, 0.48);
    background: #fffdfb;
    box-shadow: 0 12px 24px -20px rgba(143, 54, 82, 0.6);
  }

  .xhs-btn:hover .xhs-btn__arrow {
    opacity: 0.95;
    transform: translate(2px, -2px);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding-top: 22px;
  }

  .page {
    padding: 0 24px;
  }

  .hero {
    padding-top: 52px;
    padding-bottom: 44px;
  }

  .studio {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .style-chip--wide {
    grid-column: auto;
  }

  .style-chip {
    min-height: 58px;
  }

  .style-chip__text small {
    white-space: normal;
  }

  .note-cover__copy {
    width: 56%;
  }

  .note-cover__cn {
    font-size: 30px;
  }

  .note-cover__bottle {
    width: 144px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 18px 18px 6px;
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand__mark svg {
    width: 22px;
    height: 22px;
  }

  .brand__name {
    font-size: 14px;
  }

  .brand__sub {
    font-size: 6.8px;
  }

  .campaign-pill {
    gap: 6px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .page {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 2px 36px;
  }

  .eyebrow {
    gap: 9px;
    font-size: 9.5px;
    letter-spacing: 0.24em;
  }

  .eyebrow__line {
    width: 24px;
  }

  .hero__title {
    margin-top: 18px;
    font-size: clamp(35px, 9.6vw, 48px);
    letter-spacing: -0.045em;
  }

  .hero__lead {
    margin-top: 20px;
    font-size: 13.5px;
    line-height: 1.9;
  }

  .desktop-only {
    display: none;
  }

  .hero__meta {
    gap: 8px;
    margin-top: 22px;
    font-size: 9.5px;
    letter-spacing: 0.03em;
  }

  .float-spark--one {
    top: 62px;
    left: 1%;
    font-size: 13px;
  }

  .float-spark--two {
    top: 138px;
    right: 0;
    font-size: 11px;
  }

  .float-spark--three {
    left: 7%;
    bottom: 42px;
  }

  .float-petal--one {
    top: 100px;
    right: 4%;
    width: 9px;
    height: 15px;
  }

  .float-petal--two {
    right: 9%;
    bottom: 38px;
  }

  .studio {
    gap: 16px;
  }

  .panel {
    border-radius: 24px;
  }

  .controls {
    padding: 22px 18px 20px;
  }

  .panel__head {
    gap: 12px;
  }

  .step {
    font-size: 28px;
  }

  .panel__heading h2 {
    font-size: 20px;
  }

  .panel__heading p {
    margin-top: 4px;
    font-size: 11px;
  }

  .style-fieldset {
    margin-top: 19px;
  }

  .style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .style-chip--wide {
    grid-column: 1 / -1;
  }

  .style-chip {
    min-height: 56px;
    padding: 9px 27px 9px 10px;
  }

  .style-chip__icon {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .style-chip__text strong {
    font-size: 12.5px;
  }

  .style-chip__text small {
    font-size: 9.8px;
  }

  .controls__footer {
    margin-top: 21px;
  }

  .generate-btn {
    min-height: 56px;
    border-radius: 16px;
    font-size: 14.5px;
  }

  .microcopy {
    font-size: 9.8px;
  }

  .note-tip {
    margin-top: 19px;
    padding: 12px 13px;
  }

  .note-tip p {
    font-size: 10.5px;
  }

  .result {
    padding: 10px;
    border-radius: 26px;
  }

  .result__topbar {
    padding: 4px 7px 10px;
  }

  .result__label {
    font-size: 8.5px;
    letter-spacing: 0.12em;
  }

  .result__status {
    font-size: 9.5px;
  }

  .note-card {
    border-radius: 22px;
  }

  .note-cover {
    min-height: 208px;
    padding: 19px 17px;
  }

  .note-cover::before {
    inset: 8px;
    border-radius: 17px;
  }

  .note-cover__badge {
    padding: 4px 8px;
    font-size: 8px;
  }

  .note-cover__copy {
    width: 62%;
    margin-top: 17px;
  }

  .note-cover__en {
    font-size: 7px;
  }

  .note-cover__cn {
    margin-top: 8px;
    font-size: 23px;
  }

  .note-cover__quote {
    gap: 6px;
    margin-top: 11px;
    font-size: 9px;
  }

  .note-cover__quote::before {
    width: 12px;
  }

  .note-cover__seal {
    display: none;
  }

  .note-cover__bottle {
    right: 4px;
    bottom: -5px;
    width: 104px;
  }

  .note-cover__halo {
    top: -91px;
    right: -98px;
    width: 270px;
    height: 270px;
  }

  .note-cover__halo--small {
    top: -34px;
    right: -38px;
    width: 190px;
    height: 190px;
  }

  .note-cover__petal--one {
    top: 96px;
    left: 52%;
  }

  .note-cover__petal--two {
    right: 116px;
  }

  .note-content {
    padding: 18px 18px 4px;
  }

  .note-author__avatar {
    width: 31px;
    height: 31px;
    font-size: 14px;
  }

  .note-author__info strong {
    font-size: 11px;
  }

  .note-author__info small {
    font-size: 9px;
  }

  .note-title {
    margin-top: 14px;
    font-size: 20px;
  }

  .note-body {
    margin-top: 9px;
    font-size: 13.5px;
    line-height: 1.9;
  }

  .note-tags {
    margin-top: 15px;
  }

  .note-tags span {
    padding: 4px 9px;
    font-size: 10px;
  }

  .note-actions {
    margin: 16px 18px 18px;
    padding-top: 14px;
    gap: 8px;
  }

  .copy-btn,
  .ghost-btn {
    min-height: 47px;
    border-radius: 14px;
  }

  .copy-btn {
    font-size: 13px;
  }

  .ghost-btn {
    padding: 0 13px;
    font-size: 12px;
  }

  .xhs-btn {
    min-height: 47px;
    border-radius: 14px;
    font-size: 13px;
  }

  .empty-state {
    padding: 28px 12px 40px;
  }

  .empty-state__art {
    width: 112px;
  }

  .loading-state,
  .error-state {
    padding: 29px 14px 39px;
  }

  .empty-state h3,
  .loading-state h3,
  .error-state h3 {
    font-size: 18px;
  }

  .ritual {
    gap: 12px;
    margin-top: 36px;
    padding: 0 16px;
  }

  .ritual__line {
    width: 44px;
  }

  .ritual p {
    font-size: 9.5px;
    letter-spacing: 0.2em;
  }

  .site-footer {
    padding: 28px 20px calc(30px + env(safe-area-inset-bottom));
  }

  .site-footer__brand {
    font-size: 9.5px;
  }

  .site-footer__disclaimer {
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  .style-chip {
    min-height: 52px;
    padding: 8px 25px 8px 9px;
    gap: 8px;
    border-radius: 14px;
  }

  .style-chip__icon {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }

  .style-chip__text strong {
    font-size: 12px;
  }

  .style-chip__check {
    right: 8px;
    width: 15px;
    height: 15px;
    font-size: 8px;
  }

  .note-cover__copy {
    width: 65%;
  }

  .note-cover__bottle {
    width: 96px;
    right: 1px;
  }

  .note-cover__petal {
    display: none;
  }

  .note-cover__quote {
    font-size: 8.5px;
  }

  .note-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .copy-hint {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .style-chip__text small {
    display: none;
  }
}

@media (max-width: 350px) {
  .hero__title {
    font-size: 28px;
    letter-spacing: -0.05em;
  }

  .style-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .style-chip--wide {
    grid-column: auto;
  }

  .campaign-pill {
    font-size: 9px;
    padding: 6px 8px;
  }

  .brand__sub {
    display: none;
  }

  .note-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .ghost-btn {
    width: 100%;
  }

  .copy-hint {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
