/* UI-MODULE: Brand Font / 寒蝉锦书宋仅用于品牌与展示标题 */
@font-face {
  font-family: "Chill Jinshu Song";
  src: url("./assets/fonts/ChillJinshuSongMedium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* UI-MODULE: Foundation / 色彩、字体、阴影与动效统一从这里调整 */
  --ink: #20251f;
  --muted: #687066;
  --green: #315f44;
  --rose: #bd747d;
  --paper: #fbf8ef;
  --paper-deep: #f3eee4;
  --paper-bright: #fffdf8;
  --line: rgba(42, 58, 44, 0.14);
  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --shadow: 0 22px 70px rgba(43, 45, 38, 0.12);
  --shadow-lift: 0 28px 58px rgba(43, 45, 38, 0.16);
  --font-ui: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Chill Jinshu Song", "Iowan Old Style", "Songti SC", STSong, "Noto Serif CJK SC", serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-base: 420ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 68px;
  font-family: var(--font-ui);
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper-bright) 0, var(--paper) 42%, var(--paper-deep) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

/* UI-SECTION: Global Header / 顶部导航 */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(260px, 560px) auto;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 10px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(251, 248, 239, 0.68);
  box-shadow: 0 14px 36px rgba(45, 50, 42, 0.07);
  backdrop-filter: blur(24px) saturate(1.18);
}

.brand,
.top-actions button,
.text-link,
.pin-name {
  border: 0;
  background: transparent;
  color: inherit;
}

.brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 12px;
  padding: 0;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
}

.nav-search input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 28px rgba(45, 50, 42, 0.06);
  backdrop-filter: blur(16px);
}

.top-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.top-actions button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 800;
  color: rgba(32, 37, 31, 0.72);
}

.top-actions span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(49, 95, 68, 0.12);
  color: var(--green);
  font-size: 12px;
}

.top-actions span.is-updating {
  animation: basket-count-pop 360ms var(--ease-out);
}

.account-action {
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  background: rgba(32, 37, 31, 0.88) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(32, 37, 31, 0.16);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

/* UI-SECTION: Home Hero / 首页封面 */
.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 28px));
  padding: 72px max(24px, calc((100vw - 1240px) / 2)) 120px;
  overflow: hidden;
  isolation: isolate;
}

.hero-background,
.hero::before,
.hero::after,
.hero-wave {
  content: "";
  position: absolute;
  pointer-events: none;
}

/* UI-SUBSECTION: Hero Background / 封面背景图 */
.hero-background {
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(251, 248, 239, 0.96) 0%, rgba(251, 248, 239, 0.82) 34%, rgba(251, 248, 239, 0.18) 62%, rgba(251, 248, 239, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(251, 248, 239, 0.22) 74%, rgba(251, 248, 239, 0.86) 100%),
    url("./assets/hero-floral-studio.png") center right / cover no-repeat;
}

.hero::before {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 7% 47%, rgba(255, 255, 255, 0.74), transparent 24%),
    radial-gradient(circle at 45% 16%, rgba(255, 235, 220, 0.46), transparent 20%);
}

.hero::after {
  inset: auto 0 0;
  z-index: -1;
  height: 170px;
  background: linear-gradient(180deg, rgba(251, 248, 239, 0), var(--paper) 86%);
}

/* UI-SUBSECTION: Hero Copy / 封面文案 */
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 110px 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(44px, 5.7vw, 86px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

.hero-copy > p,
.wide-title p,
.muted {
  color: rgba(32, 37, 31, 0.7);
  line-height: 1.72;
}

/* UI-SUBSECTION: Hero CTA / 封面主按钮 */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-right: 8px;
  padding-left: 24px;
  background: rgba(49, 95, 68, 0.92);
}

.hero-arrow {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green);
  font-size: 19px;
  line-height: 1;
}

/* UI-SUBSECTION: Hero Micro Prompt / 封面底部小提示 */
.hero-scroll-hint {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 50px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(32, 37, 31, 0.64);
  font-size: 13px;
  font-weight: 850;
}

.hero-scroll-hint span {
  color: var(--green);
  font-weight: 950;
}

.hero-scroll-hint i {
  display: block;
  width: 1px;
  height: 70px;
  background: linear-gradient(180deg, rgba(49, 95, 68, 0.1), rgba(49, 95, 68, 0.54), rgba(49, 95, 68, 0.1));
}

/* UI-SUBSECTION: Hero Decorations / 封面花瓣与下滑按钮 */
.petal {
  position: absolute;
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 70% 25% 70% 25%;
  background: radial-gradient(circle at 38% 34%, #f6b2a5, #d95f72 62%, rgba(217, 95, 114, 0) 70%);
  filter: blur(0.2px);
  opacity: 0.82;
}

.petal-a {
  top: 17%;
  left: 27%;
  --petal-rotate: -15deg;
  transform: rotate(var(--petal-rotate));
}

.petal-b {
  top: 13%;
  left: 47%;
  --petal-rotate: 18deg;
  transform: rotate(var(--petal-rotate)) scale(1.1);
}

.petal-c {
  right: 13%;
  bottom: 15%;
  --petal-rotate: 28deg;
  transform: rotate(var(--petal-rotate)) scale(0.86);
}

.hero-down {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  color: rgba(49, 95, 68, 0.72);
  font-size: 28px;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

/* UI-SUBSECTION: Hero Wave / 封面波浪过渡 */
.hero-wave {
  right: -5%;
  bottom: -2px;
  left: -5%;
  z-index: 1;
  height: 86px;
  background: var(--paper);
  border-radius: 52% 48% 0 0 / 52% 56% 0 0;
  transform: rotate(-1.2deg);
}

/* UI-SECTION: Shared Page Shell / 页面通用容器 */
.gallery-section,
.flow-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* UI-SECTION: Inspiration Gallery / 灵感瀑布流区域 */
.gallery-section {
  position: relative;
  z-index: 2;
  margin-top: -2px;
  padding-top: 42px;
}

.flow-view {
  min-height: calc(100vh - 68px);
  padding-top: 38px;
}

.wide-span {
  grid-column: 1 / -1;
}

.step-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.step-trail button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(42, 58, 44, 0.1);
  border-radius: 999px;
  padding: 0 13px 0 8px;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(32, 37, 31, 0.54);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) ease, background var(--duration-fast) ease, color var(--duration-fast) ease;
}

.step-trail button:hover {
  border-color: rgba(49, 95, 68, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--green);
  transform: translateY(-1px);
}

.step-trail button:focus-visible {
  outline: 2px solid rgba(49, 95, 68, 0.38);
  outline-offset: 2px;
}

.step-trail b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(49, 95, 68, 0.09);
  color: var(--green);
  font-size: 12px;
}

.step-trail .is-done {
  color: rgba(32, 37, 31, 0.74);
}

.step-trail .is-current {
  border-color: rgba(49, 95, 68, 0.28);
  background: rgba(49, 95, 68, 0.1);
}

/* UI-SUBSECTION: Gallery Header / 瀑布流标题 */
.section-title {
  margin-bottom: 16px;
}

.gallery-title {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.gallery-title h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 500;
}

.gallery-title p {
  margin-bottom: 0;
  color: rgba(32, 37, 31, 0.48);
  font-size: 15px;
}

.wide-title {
  max-width: 760px;
  margin-bottom: 28px;
}

/* UI-SUBSECTION: Filter Tags / 筛选标签 */
.filter-row,
.action-row,
.usage-picker,
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row {
  justify-content: center;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding: 18px 0 28px;
}

.filter-chip,
.usage-picker button,
.secondary-action,
.text-link {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.48);
  color: rgba(32, 37, 31, 0.62);
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(38, 45, 38, 0.06);
  backdrop-filter: blur(12px);
}

.filter-chip.is-active,
.usage-picker button.is-active {
  background: rgba(32, 37, 31, 0.92);
  color: #fff;
}

/* UI-SUBSECTION: Masonry Cards / 瀑布流卡片，内部标题和按钮结构不改 */
.masonry-grid {
  column-count: 4;
  column-gap: 16px;
}

.pin-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 18px 44px rgba(37, 51, 39, 0.1);
  backdrop-filter: blur(16px);
  break-inside: avoid;
}

.pin-image {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #e9e3da;
}

.pin-image img,
.hero-card img,
.basket-card img,
.plan-card img,
.mini-row img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.pin-image img {
  aspect-ratio: var(--ratio);
  transition: transform 0.28s ease;
}

.pin-card:hover img {
  transform: scale(1.035);
}

.pin-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px 13px;
}

.pin-copy {
  min-width: 0;
}

.pin-name {
  padding: 0;
  text-align: left;
  font-weight: 900;
}

.pin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.pin-tags span,
.user-upload-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(49, 95, 68, 0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.pin-action {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(49, 95, 68, 0.15);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.glass-card,
.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.14);
}

.detail-layout,
.plan-detail-layout,
.create-layout,
.space-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.detail-layout {
  grid-template-columns: minmax(380px, 0.96fr) minmax(0, 1.04fr);
  gap: 28px;
}

.inspiration-detail-image {
  position: sticky;
  top: 86px;
  align-self: start;
}

.inspiration-detail-image > img {
  display: block;
  width: 100%;
  height: min(700px, calc(100vh - 112px));
  min-height: 620px;
  object-fit: cover;
}

.inspiration-detail-copy {
  display: flex;
  min-width: 0;
  min-height: min(700px, calc(100vh - 112px));
  flex-direction: column;
}

.inspiration-detail-copy > h1 {
  max-width: 620px;
  font-size: 52px;
  line-height: 1.1;
}

.inspiration-detail-copy > p:not(.eyebrow) {
  color: rgba(32, 37, 31, 0.68);
  line-height: 1.75;
}

.inspiration-detail-copy .decode-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.detail-usage-grid,
.detail-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-usage-grid {
  margin: 2px 0 18px;
}

.detail-usage-grid > button,
.detail-action-grid > button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  justify-content: center;
  padding: 8px 14px;
  text-align: center;
  white-space: normal;
}

.detail-action-grid {
  margin-top: auto;
}

.detail-action-grid > .primary-action {
  grid-column: 1 / -1;
  min-height: 52px;
}

.space-layout {
  grid-template-areas:
    "back back"
    "preview panel"
    "matches matches";
}

.space-layout > .text-link {
  grid-area: back;
}

.space-preview {
  grid-area: preview;
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.space-preview img {
  height: 100%;
  min-height: 620px;
}

.space-panel {
  grid-area: panel;
}

.space-scan-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  min-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 44px rgba(32, 37, 31, 0.14);
  backdrop-filter: blur(20px);
}

.space-scan-card span,
.space-scan-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.space-scan-card strong {
  font-size: 24px;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 20px 0 14px;
  border: 1px dashed rgba(49, 95, 68, 0.28);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--green);
  text-align: center;
}

.upload-box input {
  display: none;
}

.space-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.space-type-row button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(32, 37, 31, 0.66);
  font-weight: 850;
}

.space-type-row button.is-active {
  background: rgba(49, 95, 68, 0.9);
  color: #fff;
}

.space-read-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.space-read-grid div {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.space-read-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.space-read-grid strong {
  line-height: 1.58;
}

.space-warning {
  border-left: 3px solid rgba(189, 116, 125, 0.62);
  margin: 0 0 18px;
  padding: 8px 0 8px 12px;
  color: rgba(32, 37, 31, 0.68);
  line-height: 1.7;
}

.space-matches {
  grid-area: matches;
  margin-top: 20px;
}

.space-match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.space-match-grid .pin-card {
  display: block;
  margin: 0;
}

.space-match-grid .pin-image img {
  aspect-ratio: 4 / 5;
}

.space-studio-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  gap: 22px;
  align-items: start;
}

.space-sticky-card {
  position: sticky;
  top: 92px;
  overflow: hidden;
  padding: 0;
}

.space-sticky-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.space-mini-read {
  padding: 20px;
}

.space-mini-read p {
  color: rgba(32, 37, 31, 0.66);
  line-height: 1.68;
}

.space-choice-panel {
  display: grid;
  gap: 18px;
}

.space-context-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.space-context-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
}

.space-context-card h2,
.active-draft-card h2,
.create-context-card h2,
.create-logic-card h2 {
  margin: 4px 0 8px;
}

.space-context-card p,
.active-draft-card p,
.create-context-card p,
.create-logic-card p {
  color: rgba(32, 37, 31, 0.66);
  line-height: 1.7;
}

.context-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.context-meta-row span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(49, 95, 68, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.active-draft-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.compact-title {
  margin: 8px 0 0;
}

.space-choice-grid {
  display: grid;
  gap: 16px;
}

.choice-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: stretch;
}

.choice-card > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  border-radius: 8px;
  object-fit: cover;
}

.choice-card p {
  color: rgba(32, 37, 31, 0.66);
  line-height: 1.65;
}

.primary-action[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
}

.text-link {
  width: fit-content;
  margin-bottom: 16px;
}

.danger {
  color: #9f4646;
}

.image-feature {
  overflow: hidden;
}

.image-feature img {
  min-height: 560px;
  max-height: 720px;
}

.detail-copy,
.glass-card {
  padding: 24px;
}

.decode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.decode-grid div,
.meta-list div,
.mini-row {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.decode-grid div {
  padding: 12px;
}

.decode-grid span,
.meta-list dt {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.decode-grid strong,
.meta-list dd {
  margin: 0;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  border: 0;
  background: rgba(49, 95, 68, 0.92);
  color: #fff;
  box-shadow: 0 12px 28px rgba(49, 95, 68, 0.2);
}

.primary-action:disabled {
  cursor: not-allowed;
  background: rgba(99, 107, 101, 0.55);
  box-shadow: none;
}

.basket-grid,
.plan-grid {
  display: grid;
  gap: 16px;
}

.basket-card,
.plan-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 20px;
}

.basket-card img,
.plan-card img {
  height: 100%;
  min-height: 210px;
  border-radius: 8px;
}

.plan-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.plan-card .plan-image-wrap img {
  border-radius: 8px;
}

.plan-card-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.plan-card-content h2 {
  margin: 2px 0 10px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
}

.plan-card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 18px;
  color: rgba(32, 37, 31, 0.72);
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.plan-card-content .meta-list {
  width: 100%;
  margin-top: auto;
}

.ai-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(32, 37, 31, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(32, 37, 31, 0.18);
}

.reference-strip {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  margin: 16px 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.reference-strip img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
}

.reference-strip span {
  color: rgba(32, 37, 31, 0.64);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.intent-card {
  margin-top: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
textarea,
.fake-login input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

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

.prompt-label {
  margin-bottom: 12px;
}

.safety-message {
  min-height: 22px;
  color: #9f4646;
  font-size: 13px;
  font-weight: 800;
}

.large-action {
  width: 100%;
}

.create-layout {
  grid-template-columns: minmax(330px, 0.94fr) minmax(430px, 1.06fr);
  gap: 28px;
}

.create-form-card {
  min-width: 0;
}

.create-form-card > h1 {
  max-width: 680px;
  font-size: 52px;
  line-height: 1.12;
}

.create-side-stack {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
  align-self: start;
}

.create-context-card {
  overflow: hidden;
}

.create-context-card img {
  display: block;
  width: 100%;
  max-height: 250px;
  margin-top: 16px;
  border-radius: 8px;
  object-fit: cover;
}

.create-logic-card {
  align-self: stretch;
}

.logic-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.logic-list div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.logic-list b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(49, 95, 68, 0.12);
  color: var(--green);
}

.logic-list span {
  color: rgba(32, 37, 31, 0.68);
  line-height: 1.65;
}

.mini-board {
  position: static;
}

.mini-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  font-weight: 850;
}

.mini-row img {
  height: 64px;
  border-radius: 8px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.meta-list div {
  padding: 10px;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}

.detail-columns > div {
  min-width: 0;
}

.plan-detail-layout {
  grid-template-columns: minmax(360px, 0.86fr) minmax(0, 1.14fr);
  gap: 30px;
}

.plan-sticky-preview {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 112px);
  align-self: start;
}

.plan-sticky-preview > img,
.plan-sticky-preview > .plan-reference-placeholder {
  width: 100%;
  min-height: min(620px, calc(100vh - 112px));
  max-height: calc(100vh - 112px);
}

.plan-sticky-preview > img {
  object-fit: cover;
}

.plan-detail-copy {
  min-width: 0;
}

.plan-detail-copy > .keyword-row {
  margin-bottom: 24px;
}

.plan-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-top: 4px;
}

.plan-action-grid > a,
.plan-action-grid > button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  text-align: center;
  white-space: normal;
}

.plan-action-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.keyword-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(49, 95, 68, 0.1);
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.steps {
  padding-left: 22px;
  line-height: 1.8;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
}

.basket-upload-box {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  border: 1px dashed rgba(49, 95, 68, 0.38);
  border-radius: 8px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--green);
  cursor: pointer;
}

.basket-upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.basket-upload-box.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.basket-upload-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(49, 95, 68, 0.12);
  font-size: 24px;
  line-height: 1;
}

.basket-upload-box strong,
.basket-upload-box small {
  display: block;
}

.basket-upload-box small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.user-upload-badge {
  margin-bottom: 7px;
  background: rgba(189, 116, 125, 0.12);
  color: #9c4d57;
}

/* UI-SECTION: Creator Studio / 内容创作者录入与审核界面 */
.creator-shell {
  padding-top: 44px;
  padding-bottom: 86px;
}

.creator-heading {
  margin-top: 24px;
}

.creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.creator-form-card,
.creator-preview-card {
  padding: 24px;
}

.creator-preview-card {
  position: sticky;
  top: 90px;
}

.creator-card-heading,
.creator-queue-summary,
.creator-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creator-card-heading h2,
.creator-preview-card h3 {
  margin-bottom: 0;
}

.creator-local-badge,
.creator-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(49, 95, 68, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.creator-upload-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.creator-upload-zone {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(49, 95, 68, 0.34);
  border-radius: 8px;
  padding: 22px;
  background: rgba(237, 243, 237, 0.52);
  color: var(--green);
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.creator-upload-zone:hover,
.creator-upload-zone.is-dragging {
  border-color: var(--green);
  background: rgba(222, 235, 224, 0.72);
}

.creator-upload-zone.is-dragging {
  transform: translateY(-2px);
}

.creator-upload-zone.is-processing {
  pointer-events: none;
  opacity: .7;
}

.creator-upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.creator-upload-zone:not(.has-image) {
  grid-template-rows: auto auto auto;
  gap: 7px;
}

.creator-upload-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(49, 95, 68, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-size: 24px;
  font-weight: 500;
}

.creator-upload-zone small,
.creator-upload-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.creator-upload-zone.has-image {
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 120px;
  gap: 16px;
  place-items: center stretch;
  padding: 12px;
  text-align: left;
}

.creator-upload-zone.has-image img {
  width: 96px;
  height: 96px;
  border-radius: 7px;
  object-fit: cover;
}

.creator-upload-zone.has-image span {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.creator-upload-zone.has-image strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-url-fallback {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.creator-url-fallback summary {
  width: max-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.creator-url-fallback label {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.creator-url-fallback input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.creator-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.creator-form-grid label,
.creator-fieldset,
.creator-check {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.creator-form-grid input,
.creator-form-grid select,
.creator-form-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.creator-form-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.creator-fieldset {
  margin: 14px 0 0;
  border: 0;
  padding: 0;
}

.creator-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.creator-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.creator-option {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.creator-option.is-selected {
  border-color: rgba(49, 95, 68, 0.42);
  background: rgba(49, 95, 68, 0.12);
  color: var(--green);
}

.creator-detail-grid {
  margin-top: 18px;
}

.wide-field {
  grid-column: 1 / -1;
}

.creator-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: 16px;
}

.creator-check input {
  width: 16px;
  height: 16px;
}

.creator-source-note {
  margin: 12px 0 0;
  color: var(--rose);
  font-size: 13px;
  line-height: 1.55;
}

.creator-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.creator-preview-empty {
  display: grid;
  min-height: 350px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.creator-preview-card #creatorPreview:not(.creator-preview-empty) img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 7px;
  object-fit: cover;
}

.creator-preview-card #creatorPreview:not(.creator-preview-empty) div {
  padding: 14px 2px 2px;
}

.creator-preview-card #creatorPreview p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.creator-library {
  margin-top: 42px;
}

.creator-queue-summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.creator-queue-summary span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

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

.creator-asset-card {
  overflow: hidden;
}

.creator-asset-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.creator-asset-card > div {
  padding: 14px;
}

.creator-asset-card h3 {
  margin: 8px 0 5px;
  font-size: 17px;
}

.creator-asset-card p {
  min-height: 38px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.creator-status.is-draft {
  background: rgba(189, 116, 125, 0.12);
  color: #9c4d57;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 120px);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(32, 37, 31, 0.9);
  color: #fff;
  font-weight: 850;
  transition: transform 0.22s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

.glass-dialog {
  width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 80px rgba(24, 35, 26, 0.22);
  backdrop-filter: blur(24px);
}

.glass-dialog::backdrop {
  background: rgba(25, 30, 24, 0.26);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  font-size: 22px;
}

.fake-login {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.fake-login button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.fake-login button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #9a3d35;
  font-size: 13px;
  font-weight: 750;
}

/* UI-MODULE: Editorial Atmosphere / 首页画面、文字与慢速环境动效 */
.site-header {
  transition: min-height var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), padding var(--duration-base) var(--ease-out);
}

.site-header.is-scrolled {
  min-height: 60px;
  background: rgba(253, 250, 243, 0.86);
  box-shadow: 0 10px 30px rgba(45, 50, 42, 0.1);
}

.brand {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0;
  transition: opacity var(--duration-fast) ease;
}

.brand:hover {
  opacity: 0.72;
}

.brand-mark {
  position: relative;
  display: block;
  overflow: hidden;
  box-shadow: none;
}

.nav-search input {
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}

.nav-search input:focus {
  border-color: rgba(49, 95, 68, 0.34);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 32px rgba(45, 50, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* UI-MODULE: Button System / 所有主操作、次操作、标签和小按钮的反馈 */
.top-actions button,
.filter-chip,
.usage-picker button,
.secondary-action,
.text-link,
.pin-action,
.primary-action,
.hero-down,
.hero-scroll-hint {
  transition: transform var(--duration-fast) var(--ease-out), border-radius var(--duration-base) var(--ease-out), background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.top-actions button:hover {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.top-actions button:active,
.primary-action:active,
.secondary-action:active,
.pin-action:active,
.filter-chip:active,
.usage-picker button:active {
  transform: scale(0.97);
}

.account-action:hover {
  background: rgba(32, 37, 31, 1) !important;
  box-shadow: 0 16px 28px rgba(32, 37, 31, 0.22) !important;
}

.primary-action {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #294d38;
  box-shadow: 0 14px 28px rgba(38, 70, 50, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.primary-action::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 680ms var(--ease-out);
}

.primary-action:hover {
  border-radius: 16px;
  background: #203f2e;
  box-shadow: 0 20px 34px rgba(38, 70, 50, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.primary-action:hover::before {
  transform: translateX(130%);
}

.secondary-action:hover,
.text-link:hover,
.filter-chip:hover,
.usage-picker button:hover,
.pin-action:hover {
  border-color: rgba(49, 95, 68, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: var(--green);
  box-shadow: 0 14px 26px rgba(38, 45, 38, 0.1);
  transform: translateY(-1px);
}

.filter-chip.is-active,
.usage-picker button.is-active {
  border-color: transparent;
  background: #294d38;
  box-shadow: 0 10px 20px rgba(38, 70, 50, 0.17);
}

/* UI-MODULE: Hero Background / 图片、光感和花瓣单独控制 */
.hero {
  min-height: min(780px, calc(100vh - 20px));
}

.hero-background {
  transform: scale(1.012);
  transform-origin: 68% 50%;
  animation: hero-breathe 18s ease-in-out infinite alternate;
}

.hero::before {
  background: linear-gradient(104deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 34%, transparent 66%);
  animation: light-shift 14s ease-in-out infinite alternate;
}

.hero-copy {
  animation: hero-copy-in 900ms var(--ease-out) both;
}

.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
}

h1 {
  font-weight: 500;
  line-height: 1.04;
}

.hero-copy > p {
  max-width: 365px;
  font-size: 16px;
}

.hero-primary {
  min-height: 54px;
  padding-left: 22px;
}

.hero-primary:hover .hero-arrow {
  transform: rotate(12deg) scale(1.06);
}

.hero-arrow {
  transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast) ease;
}

.hero-scroll-hint:hover {
  color: var(--green);
  transform: translateY(2px);
}

.petal {
  will-change: transform;
  animation: petal-drift 10s ease-in-out infinite alternate;
}

.petal-b {
  animation-delay: -3.4s;
  animation-duration: 13s;
}

.petal-c {
  animation-delay: -6.2s;
  animation-duration: 11s;
}

.hero-down:hover {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%) translateY(-3px);
}

/* UI-MODULE: Inspiration Gallery / 瀑布流、筛选和卡片 */
.gallery-section {
  padding-top: 56px;
}

.gallery-title h2 {
  font-size: clamp(30px, 3.5vw, 43px);
}

.gallery-title p {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.filter-row {
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.pin-card {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(37, 51, 39, 0.08);
  animation: card-reveal 540ms var(--ease-out) both;
  animation-delay: var(--reveal-delay, 0ms);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) ease;
}

.pin-card:hover {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lift);
  transform: translateY(-5px);
}

.pin-image img {
  transition: transform 700ms var(--ease-out), filter var(--duration-base) ease;
}

.pin-card:hover img {
  transform: scale(1.045);
  filter: saturate(1.04);
}

.pin-name {
  font-size: 15px;
  transition: color var(--duration-fast) ease;
}

.pin-name:hover {
  color: var(--green);
}

.pin-action {
  min-height: 34px;
}

/* UI-MODULE: Flow Views / 强操作页面保持克制、但入口和结果有明确节奏 */
.view.is-active {
  animation: view-enter 480ms var(--ease-out) both;
}

.glass-card,
.hero-card {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 56px rgba(43, 45, 38, 0.1);
}

.generation-stage {
  display: grid;
  min-height: min(560px, calc(100vh - 190px));
  place-items: center;
  padding: 56px 24px;
  text-align: center;
}

.generation-stage-inner {
  width: min(560px, 100%);
}

.generation-stage h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 58px);
}

.generation-stage p {
  color: var(--muted);
}

.generation-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.generation-track span {
  position: relative;
  overflow: hidden;
  min-height: 84px;
  border: 1px solid rgba(49, 95, 68, 0.13);
  border-radius: 8px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.generation-track span::after {
  position: absolute;
  inset: auto 12px 12px;
  height: 2px;
  content: "";
  background: rgba(49, 95, 68, 0.72);
  transform: scaleX(0);
  transform-origin: left;
  animation: generation-line 1.5s var(--ease-out) infinite;
  animation-delay: var(--step-delay, 0ms);
}

@keyframes hero-breathe {
  from { transform: scale(1.012) translate3d(0, 0, 0); }
  to { transform: scale(1.045) translate3d(-0.4%, -0.5%, 0); }
}

@keyframes light-shift {
  from { opacity: 0.62; transform: translateX(-1%); }
  to { opacity: 0.9; transform: translateX(2%); }
}

@keyframes petal-drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--petal-rotate, 0deg)); }
  to { transform: translate3d(16px, 24px, 0) rotate(calc(var(--petal-rotate, 0deg) + 26deg)); }
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes generation-line {
  0% { transform: scaleX(0); opacity: 0.4; }
  52% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0.3; }
}

@keyframes basket-count-pop {
  0% { transform: scale(1); }
  42% { transform: scale(1.32); background: rgba(49, 95, 68, 0.22); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .masonry-grid {
    column-count: 3;
  }

  .detail-layout,
  .plan-detail-layout,
  .create-layout,
  .space-layout,
  .space-studio-layout {
    grid-template-columns: 1fr;
  }

  .space-layout {
    grid-template-areas:
      "back"
      "preview"
      "panel"
      "matches";
  }

  .image-feature img {
    min-height: 360px;
  }

  .space-preview,
  .space-preview img {
    min-height: 420px;
  }

  .create-form-card {
    grid-row: auto;
  }

  .create-form-card > h1 {
    font-size: 42px;
  }

  .create-side-stack,
  .inspiration-detail-image,
  .plan-sticky-preview {
    position: static;
    max-height: none;
  }

  .inspiration-detail-image > img {
    height: auto;
    min-height: 440px;
    max-height: 680px;
  }

  .inspiration-detail-copy {
    min-height: auto;
  }

  .inspiration-detail-copy > h1 {
    font-size: 42px;
  }

  .plan-sticky-preview > img,
  .plan-sticky-preview > .plan-reference-placeholder {
    min-height: 440px;
    max-height: 680px;
  }

  .mini-board {
    position: static;
  }

  .space-sticky-card {
    position: static;
  }

  .creator-layout {
    grid-template-columns: 1fr;
  }

  .creator-preview-card {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    padding-top: 166px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 166px;
    padding: 10px 16px;
  }

  .nav-search {
    grid-column: 1;
    grid-row: 2;
  }

  .top-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-actions button {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 52vh;
    padding: 16px 18px 28px;
  }

  .hero-copy {
    margin-top: 36px;
    transform: none;
  }

  .gallery-section,
  .flow-shell,
  .positioning-band {
    padding-right: 18px;
    padding-left: 18px;
  }

  .positioning-band {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .masonry-grid {
    column-count: 2;
    column-gap: 12px;
  }

  .pin-card {
    margin-bottom: 12px;
  }

  .pin-body,
  .pin-title {
    display: block;
  }

  .pin-action {
    width: 100%;
    margin-top: 8px;
  }

  .basket-card,
  .plan-card,
  .choice-card,
  .space-context-card,
  .detail-columns,
  .form-grid,
  .space-read-grid,
  .space-match-grid {
    grid-template-columns: 1fr;
  }

  .creator-form-grid,
  .creator-asset-grid {
    grid-template-columns: 1fr;
  }

  .creator-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .active-draft-card {
    align-items: stretch;
    flex-direction: column;
  }

  .space-context-card img {
    aspect-ratio: 16 / 10;
  }

  .basket-card img,
  .plan-card img {
    height: 220px;
  }

  .decode-grid,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .plan-action-grid {
    grid-template-columns: 1fr;
  }

  .plan-action-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .masonry-grid {
    column-count: 1;
  }

  .detail-usage-grid,
  .detail-action-grid {
    grid-template-columns: 1fr;
  }

  .detail-action-grid > .primary-action {
    grid-column: auto;
  }
}
.reference-requirement { margin:14px 0; padding:12px 14px; border-radius:14px; font-size:13px; line-height:1.6; }
.reference-requirement.is-ready { color:#315f43; background:#e7f1e8; }
.reference-requirement.has-error,.generation-error { color:#9a3f32; background:#fbe8e3; }
.reference-candidate-panel { margin:18px 0; padding:20px; border:1px solid rgba(82,96,75,.2); border-radius:18px; background:rgba(255,253,248,.78); }
.reference-candidate-panel.is-confirmed { border-color:rgba(55,105,72,.45); box-shadow:inset 3px 0 #5f8468; }
.reference-candidate-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.reference-candidate-head h2 { margin:4px 0 0; font-size:22px; }
.reference-candidate-head>span { padding:5px 9px; color:#315f43; background:#e7f1e8; font-size:10px; }
.reference-candidate-notice { color:var(--muted); font-size:12px; line-height:1.65; }
.reference-hard-group,.reference-soft-group { margin:16px 0; padding:16px; border:1px solid rgba(82,96,75,.16); background:rgba(255,255,255,.45); }
.reference-soft-group { border-left:3px solid #c19a53; background:#fff9ed; }
.reference-hard-group>strong,.reference-soft-group>strong { display:inline-block; margin-right:8px; font-size:13px; }
.reference-hard-group>small,.reference-soft-group>small { color:var(--muted); font-size:10px; }
.reference-candidate-panel label { display:flex; flex-direction:column; gap:7px; margin-top:12px; color:var(--muted); font-size:11px; }
.reference-candidate-panel input,.reference-candidate-panel textarea { width:100%; padding:11px 12px; border:1px solid rgba(82,96,75,.2); border-radius:10px; color:var(--ink); background:#fff; font:inherit; line-height:1.5; }
.reference-candidate-panel textarea { min-height:72px; resize:vertical; }
.reference-crop-preview { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; padding:10px; border-radius:12px; background:rgba(236,239,232,.75); }
.reference-crop-preview figure { margin:0; }
.reference-crop-preview img { display:block; width:100%; height:150px; border-radius:9px; object-fit:contain; background:#e8ebe4; }
.reference-crop-preview figcaption { margin-top:6px; color:var(--muted); font-size:10px; text-align:center; }
.crop-editor { margin:10px 0 14px; padding:10px 12px; border:1px solid rgba(82,96,75,.15); border-radius:10px; background:#f8f8f3; }
.crop-editor summary { color:#315f43; cursor:pointer; font-size:11px; font-weight:700; }
.crop-editor>p { margin:8px 0; color:var(--muted); font-size:10px; line-height:1.5; }
.crop-editor-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.crop-editor-grid label { display:grid; grid-template-columns:70px 1fr 36px; gap:7px; align-items:center; margin:0; }
.crop-editor-grid input { min-width:0; padding:0; accent-color:#315f43; }
.crop-editor-grid span { color:var(--muted); font-size:10px; text-align:right; }
.input-quality-warning { color:#9a5d28 !important; }
.reference-uncertainties { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.reference-uncertainties strong,.reference-uncertainties span { padding:7px 10px; border-radius:999px; background:#fbefe2; color:#8b5c23; font-size:11px; line-height:1.4; }
.recognition-pending { display:grid; gap:10px; margin:20px 0; }
.recognition-pending>div { display:grid; grid-template-columns:82px 1fr; gap:12px; align-items:center; padding:10px; border-radius:12px; background:rgba(255,255,255,.42); }
.recognition-pending img { width:82px; height:72px; border-radius:8px; object-fit:cover; }
.recognition-pending span,.recognition-pending small { display:block; }
.recognition-pending small { margin-top:5px; color:var(--muted); }
.generation-preferences { margin-top:28px; padding-top:24px; border-top:1px solid rgba(49,95,68,.14); }
.preference-heading { display:grid; grid-template-columns:minmax(180px,.7fr) minmax(240px,1.3fr); gap:20px; align-items:end; }
.preference-heading h2 { margin-top:4px; font-size:clamp(30px,3vw,48px); }
.preference-heading p { color:var(--muted); line-height:1.65; }
.recognition-actions { display:grid; grid-template-columns:auto minmax(220px,1fr); gap:12px; margin-top:12px; }
.reference-flower-candidate { margin-top:14px; padding-top:14px; border-top:1px solid rgba(82,96,75,.14); }
.reference-flower-candidate>b { color:#315f43; font-size:12px; }
.reference-candidate-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:640px){.reference-candidate-panel{padding:15px}.reference-candidate-fields,.reference-crop-preview,.preference-heading,.recognition-actions{grid-template-columns:1fr}.reference-crop-preview img{height:190px}}
.generation-error { grid-column:1/-1; margin:0 0 18px; padding:14px 16px; border-radius:14px; line-height:1.6; }
.plan-reference-placeholder { position:relative; display:grid; grid-template-columns:1fr 1fr; width:100%; min-height:320px; overflow:hidden; background:#e8eee6; }
.plan-reference-placeholder img { width:100%; height:100%; min-height:320px; object-fit:cover; }
.plan-reference-placeholder strong { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); width:max-content; max-width:calc(100% - 30px); padding:10px 16px; border-radius:999px; color:#234331; background:#fffdf4e8; box-shadow:0 8px 24px #17312828; text-align:center; font-size:12px; line-height:1.45; }
.plan-reference-large { min-height:540px; }
.plan-reference-large img { min-height:540px; }
.preview-quality-panel { padding:18px 0 24px; border-top:1px solid rgba(49,95,68,.18); border-bottom:1px solid rgba(49,95,68,.18); }
.preview-quality-panel>div:first-child { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.preview-quality-panel>div:first-child span { color:#315f43; font-size:13px; font-weight:700; }
.preview-quality-panel>p { margin:8px 0 14px; color:var(--muted); font-size:12px; line-height:1.6; }
.preview-candidate-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.preview-candidate-grid button { overflow:hidden; padding:0; border:2px solid transparent; border-radius:8px; background:#eef0e9; cursor:pointer; }
.preview-candidate-grid button.is-selected { border-color:#315f43; box-shadow:0 0 0 2px rgba(49,95,67,.12); }
.preview-candidate-grid img { display:block; width:100%; aspect-ratio:4/5; object-fit:cover; }
.preview-candidate-grid span { display:block; padding:8px; color:var(--ink); font-size:11px; }
.preview-feedback-row { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin-top:14px; }
.preview-feedback-row small { width:100%; color:var(--muted); }
.preview-feedback-row button { padding:7px 10px; border:1px solid rgba(82,96,75,.2); border-radius:999px; color:var(--muted); background:#fffdf8; cursor:pointer; font-size:10px; }
.preview-feedback-row button.is-selected { color:#fff; border-color:#315f43; background:#315f43; }
@media(max-width:640px){.crop-editor-grid{grid-template-columns:1fr}.preview-candidate-grid{grid-template-columns:1fr 1fr}}
