:root {
  --bg: #f4f7f4;
  --paper: #ffffff;
  --ink: #1f2023;
  --muted: #767b82;
  --soft: rgba(255, 255, 255, 0.72);
  --line: rgba(31, 32, 35, 0.1);
  --panel: #eef5f5;
  --panel-strong: #e1eef0;
  --pink: #ff3bb4;
  --pink-soft: #ffd7ef;
  --mint: #c8f7ed;
  --blue: #dceef4;
  --blue-deep: #6ea9d0;
  --green: #1d8f62;
  --cream: #f7efe2;
  --coral: #f39b7f;
  --shadow: 0 18px 52px rgba(42, 47, 52, 0.08);
  --rail: 80px;
  --ui-font:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui-font);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(22, 22, 22, 0.24);
  outline-offset: 3px;
}

textarea:focus,
textarea:focus-visible {
  outline: 0;
  box-shadow: none;
}

select:focus,
select:focus-visible {
  outline: 0;
  box-shadow: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 30;
  transform: translateY(-140%);
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  width: var(--rail);
  min-height: 100vh;
  padding: 26px 8px 18px;
  border-right: 1px solid rgba(31, 32, 35, 0.08);
  background: rgba(245, 248, 247, 0.86);
  box-shadow: 10px 0 30px rgba(35, 45, 48, 0.04);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  text-decoration: none;
}

.brand::before {
  content: "TC";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  background:
    url("assets/tokencat-sidebar-logo.png") center / 46px 46px no-repeat,
    #171719;
  color: transparent;
  font-size: 0;
  box-shadow: 0 8px 18px rgba(31, 32, 35, 0.08);
}

.brand img {
  display: none;
  width: 146px;
  height: auto;
  max-width: none;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 12px 0 auto;
  width: 100%;
}

.nav a {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 54px;
  color: #7a848b;
  text-decoration: none;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: #1f1f1f;
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
}

.nav a.active .nav-mark,
.nav a:hover .nav-mark {
  background: transparent;
  color: #1f1f1f;
}

.nav-mark svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-mark::before {
  display: none;
}

.nav-home::before {
  border-radius: 4px 4px 6px 6px;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.nav-skill::before {
  border-radius: 4px;
  box-shadow: inset 0 -5px 0 currentColor;
}

.nav-inspire::before {
  border-radius: 50%;
  border-width: 0;
  background:
    radial-gradient(circle at 35% 35%, currentColor 0 2px, transparent 3px),
    linear-gradient(currentColor, currentColor) 50% 2px / 2px 12px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) 2px 50% / 12px 2px no-repeat;
}

.nav-tool::before {
  border-width: 0;
  border-radius: 4px;
  background:
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 0 0 / 8px 8px,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 8px 0 / 8px 8px,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 0 8px / 8px 8px,
    radial-gradient(circle, currentColor 0 3px, transparent 4px) 8px 8px / 8px 8px;
}

.nav-asset::before {
  border-radius: 3px;
  border-top-left-radius: 7px;
}

.nav-price::before {
  content: "¥";
  width: auto;
  height: auto;
  border: 0;
  font-size: 15px;
  font-weight: 900;
}

.nav-label {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-button,
.menu-button,
.primary-button,
.ghost-button,
.category-tab,
.subcategory-tab,
.template-art,
.mini-button,
.platform-row button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.login-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(22, 22, 22, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.rail-footer {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

.rail-stack {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}

.rail-action,
.rail-wallet button,
.profile-actions button,
.member-panel button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.rail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #7a848b;
}

.rail-action:hover,
.rail-action.is-active {
  color: #1f1f1f;
}

.rail-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-avatar img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 999px;
  filter: drop-shadow(0 4px 6px rgba(31, 32, 35, 0.12));
}

.rail-wallet {
  display: grid;
  overflow: hidden;
  width: 54px;
  border-radius: 8px;
  background: #fff4d8;
  box-shadow: inset 0 0 0 1px rgba(31, 32, 35, 0.04);
}

.rail-wallet button {
  display: grid;
  place-items: center;
  min-height: 30px;
  padding: 4px 2px;
  background: transparent;
  color: #161719;
  line-height: 1.05;
}

.rail-wallet-line {
  display: inline-flex !important;
  grid-auto-flow: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.bean-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #111111;
}

.rail-card-line {
  border-top: 1px solid rgba(31, 32, 35, 0.06) !important;
}

.rail-card-line strong {
  font-size: 11px;
  font-weight: 700;
}

.rail-card-line span {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
}

.rail-more {
  height: 22px;
  color: #7a848b;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.rail-popover {
  position: fixed;
  left: 70px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px) scale(0.98);
  transform-origin: 0 80%;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.rail-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.enterprise-panel {
  bottom: 172px;
  width: 220px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(25, 25, 22, 0.96);
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(31, 32, 35, 0.18);
}

.enterprise-panel strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.enterprise-panel p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.profile-panel {
  bottom: 76px;
  width: 322px;
  padding: 16px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #241f17, #181612);
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(31, 32, 35, 0.24);
}

.profile-head {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
}

.profile-head img {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #ffffff;
  object-fit: cover;
}

.profile-head strong {
  display: block;
  max-width: 142px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-head span {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ffe3b1;
  color: #5f3a00;
  font-size: 11px;
  font-weight: 700;
}

.profile-head em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffe3b1;
  color: #2a2112;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 700;
}

.profile-meta span,
.profile-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.profile-meta i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-actions button {
  min-height: 54px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.profile-actions button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.member-panel {
  bottom: 30px;
  width: 322px;
  padding: 18px 16px 20px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 225, 174, 0.14), transparent 34%),
    #1f1b13;
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(31, 32, 35, 0.24);
}

.member-date {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.member-panel h3 {
  margin: 16px 0 18px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.member-panel ul {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding-left: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.35;
}

.member-panel button,
.member-panel a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.member-panel button {
  background: #ffe1ad;
  color: #1f1b13;
}

.member-panel a {
  margin-top: 10px;
  border: 1px solid rgba(255, 225, 173, 0.34);
  color: #ffffff;
}

.more-panel {
  bottom: 28px;
  width: 242px;
  padding: 18px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(31, 32, 35, 0.14);
  backdrop-filter: blur(18px);
}

.more-panel a {
  display: block;
  color: #1f2023;
  font-size: 13px;
  font-weight: 500;
  line-height: 2.15;
  text-decoration: none;
}

.more-panel a:hover {
  color: #000000;
}

.more-panel small {
  display: block;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(122, 132, 139, 0.22);
  color: rgba(31, 32, 35, 0.52);
  font-size: 11px;
  line-height: 1.75;
}

.menu-button {
  display: none;
  min-width: 40px;
  min-height: 40px;
  background: var(--ink);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

main {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  margin-left: var(--rail);
  background:
    radial-gradient(circle at 72% 4%, rgba(255, 215, 239, 0.72), transparent 18rem),
    radial-gradient(circle at 12% 6%, rgba(205, 241, 237, 0.78), transparent 20rem),
    linear-gradient(180deg, #f7faf8 0%, #edf6f6 34rem, #f6f1ea 56rem, #f4f7f4 100%);
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.075;
  background-image: radial-gradient(rgba(22, 22, 22, 0.34) 0.55px, transparent 0.75px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

main > * {
  position: relative;
  z-index: 1;
}

.hero-shell {
  position: relative;
  min-height: 560px;
  padding: 18px 48px 34px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: block;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.hero-workspace {
  min-width: 0;
  padding-top: 0;
  text-align: center;
  --active-accent: #61b8cf;
  --active-accent-strong: #2f9fbc;
  --active-surface: rgba(242, 253, 255, 0.96);
  --active-surface-soft: rgba(242, 253, 255, 0.58);
  --active-ink: #287f94;
}

.hero-workspace[data-active-mode="general"] {
  --active-accent: #61b8cf;
  --active-accent-strong: #2f9fbc;
  --active-surface: rgba(242, 253, 255, 0.96);
  --active-surface-soft: rgba(242, 253, 255, 0.58);
  --active-ink: #287f94;
}

.hero-workspace[data-active-mode="xhs"] {
  --active-accent: #ff6fab;
  --active-accent-strong: #f13e89;
  --active-surface: rgba(255, 246, 250, 0.96);
  --active-surface-soft: rgba(255, 246, 250, 0.68);
  --active-ink: #d93478;
}

.hero-workspace[data-active-mode="ecommerce"] {
  --active-accent: #d5a243;
  --active-accent-strong: #b9821b;
  --active-surface: rgba(255, 250, 239, 0.96);
  --active-surface-soft: rgba(255, 250, 239, 0.72);
  --active-ink: #956915;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 0 13px;
  border: 1px solid rgba(78, 120, 155, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: rgba(31, 32, 35, 0.82);
  box-shadow: 0 8px 22px rgba(30, 44, 48, 0.035);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

.pill-light {
  font-weight: 300;
}

.pill-icon {
  color: #171719;
  font-size: 15px;
}

.hero-copy {
  margin: 10px auto 0;
  max-width: 1240px;
}

.hero-copy p {
  max-width: 560px;
  margin: 10px auto 0;
  color: rgba(31, 32, 35, 0.58);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: rgba(22, 22, 22, 0.66);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 3.4vw, 42px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  font-weight: 420;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 15px;
  width: auto;
  margin: 0;
  text-align: left;
}

.hero-title span {
  white-space: nowrap;
}

.hero-title span:first-child {
  flex: 0 0 auto;
  font-weight: 430;
}

.title-mascot-wrap {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(75px, 6.4vw, 94px);
  transform-origin: 50% 78%;
  animation: none;
}

.title-mascot-wrap::before {
  display: none;
}

.title-mascot-wrap::after {
  display: none;
}

.title-mascot {
  display: block;
  width: clamp(75px, 6.4vw, 94px);
  height: auto;
  transform: translateY(10px);
  filter: drop-shadow(0 10px 18px rgba(31, 32, 35, 0.12));
}

.prompt-mascot,
.hero-subtitle {
  display: none;
}

.mascot-panel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(31, 32, 35, 0.08);
  border-radius: 32px;
  background:
    radial-gradient(circle at 48% 20%, rgba(255, 255, 255, 0.95), transparent 22%),
    radial-gradient(circle at 50% 54%, rgba(255, 59, 180, 0.22), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #eef7f6 58%, #f8efe6 100%);
  box-shadow: var(--shadow);
}

.mascot-stage {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(88%, 520px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
}

.mascot-cat {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 2;
  width: 86%;
  height: auto;
  transform: translateX(-50%);
  animation: mascotFloat 3.8s ease-in-out infinite;
  transform-origin: 50% 72%;
}

.mascot-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 37%;
  z-index: 3;
  width: 9%;
  height: 3%;
  border-radius: 999px;
  background: rgba(31, 32, 35, 0.86);
  transform: translateX(-50%) scaleY(0);
  transform-origin: 50% 50%;
  animation: mascotBlink 5.2s ease-in-out infinite;
  opacity: 0;
}

.mascot-halo {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.9;
  animation: haloBreath 4.4s ease-in-out infinite;
}

.mascot-halo.one {
  inset: 9% 7% 24%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 59, 180, 0.24), rgba(255, 59, 180, 0.02) 62%, transparent 70%);
}

.mascot-halo.two {
  inset: 22% 17% 17%;
  border: 1px solid rgba(255, 59, 180, 0.24);
  animation-delay: -1.6s;
}

.mascot-shadow {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 0;
  width: 58%;
  height: 8%;
  border-radius: 50%;
  background: rgba(31, 32, 35, 0.1);
  filter: blur(13px);
  transform: translateX(-50%);
  animation: shadowPulse 3.8s ease-in-out infinite;
}

.mascot-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(31, 32, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

.mascot-caption strong {
  font-size: 15px;
  font-weight: 900;
}

.mascot-caption span {
  color: rgba(31, 32, 35, 0.56);
  font-size: 13px;
  font-weight: 650;
}

.generator-panel {
  width: min(1240px, 100%);
  margin: 20px auto 0;
  text-align: left;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 24px;
  align-items: stretch;
}

.prompt-card {
  position: relative;
  min-height: 410px;
  padding: 22px 20px 16px;
  border: 1px solid rgba(111, 151, 196, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 38px rgba(33, 49, 52, 0.045);
  backdrop-filter: blur(22px);
}

textarea {
  width: 100%;
  min-height: 360px;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  line-height: 1.45;
  font-size: 15px;
  font-weight: 430;
}

textarea::placeholder {
  color: rgba(31, 32, 35, 0.52);
  font-weight: 420;
}

.creation-mode-panel {
  display: grid;
  gap: 18px;
  align-content: stretch;
  min-width: 0;
}

.creation-option-card {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 124px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(190, 181, 174, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #2d2a26;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 26px rgba(31, 32, 35, 0.035);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.creation-option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(87, 132, 255, 0.42);
}

.creation-option-card.active {
  border-color: #5b8cff;
  background: rgba(236, 243, 255, 0.88);
  box-shadow:
    0 0 0 1px rgba(91, 140, 255, 0.35) inset,
    0 14px 34px rgba(64, 108, 216, 0.1);
}

.creation-option-card em {
  position: absolute;
  top: 11px;
  right: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #5b8cff;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.creation-option-card.active em {
  display: inline-flex;
}

.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 22px;
  margin-bottom: 12px;
  color: #2d2a26;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}

.mode-icon-general {
  font-family: Georgia, "Times New Roman", serif;
}

.mode-icon-note::before {
  content: "";
  display: block;
  width: 14px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f43881, #e72b6d);
  box-shadow: 2px 2px 0 rgba(244, 56, 129, 0.22);
}

.mode-icon-shop {
  color: #7f8aa6;
  font-size: 19px;
}

.creation-option-card strong {
  display: block;
  margin-bottom: 8px;
  color: #2d2a26;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.creation-option-card span:not(.mode-icon) {
  color: rgba(45, 42, 38, 0.58);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}

.creation-option-card small {
  display: block;
  margin-top: 5px;
  color: rgba(45, 42, 38, 0.48);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
}

.creation-option-card.active small {
  color: rgba(66, 105, 184, 0.78);
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.prompt-tools,
.send-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.agent-chip,
.model-chip,
.square-tool {
  border: 1px solid rgba(111, 151, 196, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.agent-chip,
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
}

.agent-chip strong,
.model-chip strong {
  font-size: 13px;
  font-weight: 850;
}

.model-chip {
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(31, 32, 35, 0.78);
}

.square-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 520;
}

.square-tool.active,
.square-tool:hover {
  background: rgba(242, 247, 249, 0.92);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(31, 32, 35, 0.1);
  border-radius: 13px;
  background: rgba(246, 248, 247, 0.9);
  color: rgba(31, 32, 35, 0.72);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.tool-chip::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.8px solid rgba(31, 32, 35, 0.58);
  border-bottom: 1.8px solid rgba(31, 32, 35, 0.58);
  transform: translateY(-1px) rotate(45deg);
  transition: transform 140ms ease;
}

.tool-chip[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.78);
}

.tool-chip[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.tool-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 13px;
  border: 1px solid rgba(31, 32, 35, 0.1);
  border-radius: 13px;
  background: rgba(246, 248, 247, 0.9);
  color: rgba(31, 32, 35, 0.72);
}

.tool-select > span {
  flex: 0 0 auto;
  color: rgba(31, 32, 35, 0.58);
  font-size: 12px;
  font-weight: 400;
}

.tool-select select {
  width: auto;
  min-width: 72px;
  height: 30px;
  padding: 0 22px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  box-shadow: none;
}

.quality-select select {
  min-width: 56px;
}

.count-select select {
  min-width: 64px;
}

.custom-select {
  position: relative;
  overflow: visible;
  padding: 0 7px 0 13px;
}

.custom-select .native-select {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 54px;
  height: 30px;
  padding: 0 7px 0 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 450;
  line-height: 1;
}

.select-trigger:hover,
.select-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.72);
}

.select-trigger [data-select-value] {
  color: var(--ink);
  font-size: 13px;
  font-weight: 450;
}

.select-caret {
  width: 6px;
  height: 6px;
  border-right: 1.8px solid rgba(31, 32, 35, 0.74);
  border-bottom: 1.8px solid rgba(31, 32, 35, 0.74);
  transform: translateY(-1px) rotate(45deg);
  transition: transform 140ms ease;
}

.select-trigger[aria-expanded="true"] .select-caret {
  transform: translateY(2px) rotate(225deg);
}

.select-menu {
  position: absolute;
  left: 0;
  bottom: 44px;
  z-index: 8;
  display: grid;
  width: max-content;
  min-width: 126px;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(115, 143, 179, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 42px rgba(35, 48, 64, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px) scale(0.985);
  transform-origin: 26px 100%;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  backdrop-filter: blur(18px);
}

.custom-select.open .select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.select-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(31, 32, 35, 0.86);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.select-option:hover,
.select-option.active {
  background: #eef2f6;
  color: var(--ink);
}

.option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(31, 32, 35, 0.7);
  font-size: 12px;
  font-weight: 500;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  border-radius: 16px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.icon-button span {
  transform: translateY(0);
}

.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 92px;
  height: 42px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: #171719;
  box-shadow:
    0 10px 20px rgba(31, 32, 35, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.start-button span:last-child {
  font-size: 18px;
  transform: translateY(-1px);
}

.prompt-counter {
  color: rgba(31, 32, 35, 0.42);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.upload-menu {
  position: absolute;
  left: -8px;
  bottom: 62px;
  z-index: 5;
  display: none;
  width: 236px;
  padding: 10px;
  border: 1px solid rgba(111, 151, 196, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(31, 45, 54, 0.12);
  backdrop-filter: blur(22px);
}

.upload-menu.open {
  display: grid;
  gap: 4px;
}

.upload-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}

.upload-option.active,
.upload-option:hover {
  background: rgba(239, 243, 247, 0.82);
}

.upload-icon {
  color: rgba(31, 32, 35, 0.84);
  font-size: 15px;
  line-height: 1.2;
}

.upload-option small {
  display: block;
  margin-top: 5px;
  color: rgba(31, 32, 35, 0.46);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.hidden-settings {
  display: none;
}

.primary-button.compact {
  min-height: 40px;
  padding: 0 14px;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-weight: 700;
}

select,
input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(31, 32, 35, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  outline: none;
  font-size: 14px;
  font-weight: 650;
}

.shortcut-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1072px, 100%);
  margin: 24px auto 0;
}

.shortcut-row button {
  position: relative;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 74% 42%, rgba(146, 255, 203, 0.36), transparent 18%),
    linear-gradient(105deg, #0b6fa1 0%, #173849 48%, #121315 100%);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(16, 45, 63, 0.11);
}

.shortcut-row button:nth-child(2) {
  background:
    radial-gradient(circle at 78% 46%, rgba(247, 243, 132, 0.46), transparent 16%),
    linear-gradient(105deg, #0c516b 0%, #10333b 47%, #101313 100%);
}

.shortcut-row button:nth-child(3) {
  background:
    radial-gradient(circle at 80% 45%, rgba(255, 70, 167, 0.38), transparent 18%),
    linear-gradient(105deg, #126088 0%, #113747 47%, #101313 100%);
}

.shortcut-row button:nth-child(4) {
  background:
    radial-gradient(circle at 82% 46%, rgba(28, 108, 255, 0.44), transparent 18%),
    linear-gradient(105deg, #0a5178 0%, #122f46 48%, #101313 100%);
}

.shortcut-row button::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 74px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 7px),
    radial-gradient(circle at 48% 50%, rgba(255, 255, 255, 0.28), transparent 46%);
  opacity: 0.74;
  transform: translateY(-50%) rotate(-7deg);
}

.shortcut-row strong,
.shortcut-row span {
  position: relative;
  z-index: 1;
}

.shortcut-row strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.1;
}

.shortcut-row em {
  font-style: normal;
  font-size: 18px;
  font-weight: 700;
  transform: translateY(-1px);
}

.shortcut-row span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 300;
}

/* Restored previous header layout, keeping only the lightweight popover interaction. */
.hero-shell {
  min-height: 560px;
  padding: 22px 48px 10px;
}

.release-pill {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(31, 32, 35, 0.08);
  background: rgba(255, 255, 255, 0.66);
  color: rgba(31, 32, 35, 0.76);
  box-shadow: 0 8px 24px rgba(30, 44, 48, 0.04);
  font-size: 12px;
  font-weight: 400;
}

.pill-icon {
  color: var(--pink);
  font-size: 14px;
}

.pill-light {
  font-weight: 400;
}

h1 {
  font-size: clamp(28px, 2.95vw, 36px);
  font-weight: 520;
}

.hero-copy {
  margin: 7px auto 0;
  max-width: 1240px;
}

.hero-title {
  gap: 14px;
}

.hero-title span:first-child {
  font-weight: 520;
}

.generator-panel {
  width: min(1240px, 100%);
  margin: 10px auto 0;
}

.generator-layout {
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 24px;
}

.prompt-card {
  min-height: 302px;
  padding: 18px 18px 30px;
  border: 1px solid rgba(31, 32, 35, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 30px rgba(33, 49, 52, 0.045);
}

textarea {
  min-height: 244px;
  font-size: 14px;
  font-weight: 420;
  color: rgba(31, 32, 35, 0.82);
}

.prompt-live-counter {
  position: absolute;
  right: 20px;
  bottom: 13px;
  color: rgba(31, 32, 35, 0.56);
  font-size: 12px;
  font-weight: 430;
  line-height: 1;
}

.creation-mode-panel {
  gap: 12px;
}

.creation-option-card {
  min-height: 99px;
  padding: 14px 14px 12px;
  border-color: rgba(194, 181, 174, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 20px rgba(31, 32, 35, 0.03);
  font-family: var(--ui-font);
}

.creation-option-card:hover {
  border-color: rgba(238, 146, 185, 0.62);
}

.creation-option-card.active {
  border-color: color-mix(in srgb, var(--mode-accent, #ff78b7) 72%, transparent);
  background: linear-gradient(180deg, var(--mode-surface, rgba(255, 247, 251, 0.96)), rgba(255, 255, 255, 0.9));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mode-accent, #ff78b7) 24%, transparent) inset,
    0 10px 28px color-mix(in srgb, var(--mode-accent, #ff78b7) 12%, transparent);
}

.creation-option-card em {
  top: 9px;
  right: 9px;
  width: 18px;
  height: 18px;
  background: var(--mode-accent, #ff78b7);
  font-size: 11px;
}

.creation-option-card[data-mode="general"] {
  --mode-accent: #61b8cf;
  --mode-surface: rgba(242, 253, 255, 0.96);
}

.creation-option-card[data-mode="xhs"] {
  --mode-accent: #ff6fab;
  --mode-surface: rgba(255, 246, 250, 0.96);
}

.creation-option-card[data-mode="ecommerce"] {
  --mode-accent: #d5a243;
  --mode-surface: rgba(255, 250, 239, 0.96);
}

.mode-icon {
  width: 19px;
  height: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--mode-accent, #2d2a26);
}

.creation-option-card strong {
  margin-bottom: 6px;
  color: rgba(31, 32, 35, 0.9);
  font-size: 12.5px;
  font-weight: 650;
}

.creation-option-card span:not(.mode-icon) {
  color: rgba(31, 32, 35, 0.62);
  font-size: 10.75px;
  font-weight: 430;
  line-height: 1.5;
}

.creation-option-card small {
  margin-top: 4px;
  color: rgba(31, 32, 35, 0.54);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.45;
}

.creation-option-card.active small {
  color: color-mix(in srgb, var(--mode-accent, #ff78b7) 42%, rgba(31, 32, 35, 0.64));
}

.prompt-toolbar {
  gap: 12px;
  margin-top: 12px;
}

.prompt-toolbar {
  display: none;
}

.prompt-tools,
.send-group {
  gap: 10px;
}

.upload-menu {
  position: absolute;
  left: 16px;
  bottom: 60px;
  z-index: 9;
  display: grid;
  width: 258px;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(115, 143, 179, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 42px rgba(35, 48, 64, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px) scale(0.985);
  transform-origin: 18px 100%;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  backdrop-filter: blur(18px);
}

.upload-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.upload-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(31, 32, 35, 0.86);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
}

.upload-option.active,
.upload-option:hover {
  background: #eef2f6;
  color: var(--ink);
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(31, 32, 35, 0.7);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.upload-option small {
  display: block;
  margin-top: 3px;
  color: rgba(31, 32, 35, 0.48);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.32;
}

.generation-settings-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 1.04fr) minmax(290px, 0.9fr) minmax(360px, 1.12fr);
  align-items: stretch;
  gap: 11px;
  width: min(1240px, 100%);
  margin: 13px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(31, 32, 35, 0.72);
  font-family: var(--ui-font);
  text-align: left;
}

.settings-counter {
  display: none;
}

.settings-group {
  position: relative;
  min-width: 0;
  min-height: 104px;
  margin-top: 0;
  padding: 12px 12px 11px;
  overflow: hidden;
  border: 1px solid rgba(31, 32, 35, 0.075);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    0 13px 28px rgba(33, 49, 52, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.68) inset;
  backdrop-filter: blur(16px);
}

.settings-group::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--active-accent) 68%, transparent);
  opacity: 0.72;
  display: none;
}

.settings-group:first-of-type {
  margin-top: 0;
}

.settings-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.settings-label {
  margin: 0 0 9px;
  color: rgba(31, 32, 35, 0.72);
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1.25;
}

.ratio-options,
.quality-options {
  display: grid;
  gap: 7px;
}

.ratio-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.quality-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setting-option,
.reference-button,
.settings-generate-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.setting-option {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 50px;
  padding: 7px 8px;
  border: 1px solid rgba(196, 184, 178, 0.52);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(31, 32, 35, 0.68);
  text-align: center;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.setting-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--active-accent) 42%, rgba(31, 32, 35, 0.14));
  background: rgba(255, 255, 255, 0.76);
}

.setting-option.active {
  border-color: color-mix(in srgb, var(--active-accent) 76%, transparent);
  background: var(--active-surface);
  color: var(--active-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--active-accent) 28%, transparent) inset,
    0 10px 22px color-mix(in srgb, var(--active-accent) 11%, transparent);
}

.ratio-option {
  gap: 3px;
  font-size: 11.5px;
  font-weight: 520;
}

.ratio-shape {
  display: block;
  border: 1.2px solid currentColor;
  border-radius: 3px;
  opacity: 0.72;
}

.ratio-square {
  width: 18px;
  height: 18px;
}

.ratio-landscape {
  width: 21px;
  height: 15px;
}

.ratio-portrait {
  width: 15px;
  height: 21px;
}

.ratio-wide {
  width: 23px;
  height: 12px;
}

.ratio-tall {
  width: 12px;
  height: 23px;
}

.output-size {
  flex: 0 0 auto;
  margin: 0 0 7px;
  color: rgba(31, 32, 35, 0.56);
  font-size: 10.5px;
  font-weight: 430;
  white-space: nowrap;
}

.quality-option {
  grid-template-rows: auto auto auto;
  gap: 2px;
  min-height: 50px;
}

.quality-option svg,
.reference-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quality-option span {
  font-size: 11.5px;
  font-weight: 540;
  line-height: 1.1;
}

.quality-option small {
  color: rgba(31, 32, 35, 0.52);
  font-size: 10px;
  font-weight: 430;
  line-height: 1.1;
}

.quality-option.active small {
  color: color-mix(in srgb, var(--active-ink) 76%, rgba(31, 32, 35, 0.44));
}

.reference-settings {
  margin-top: 0;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reference-button {
  display: inline-grid;
  place-items: center;
  gap: 3px;
  width: 50px;
  min-height: 50px;
  border: 1px dashed rgba(196, 184, 178, 0.54);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(31, 32, 35, 0.58);
  font-size: 10.5px;
  font-weight: 520;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.reference-button.active,
.reference-button:hover {
  border-style: solid;
  border-color: color-mix(in srgb, var(--active-accent) 46%, transparent);
  background: var(--active-surface);
  color: var(--active-ink);
}

.reference-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

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

.reference-helper,
.reference-note {
  margin: 0;
  color: rgba(31, 32, 35, 0.6);
  font-size: 10.5px;
  font-weight: 430;
  line-height: 1.5;
}

.reference-note {
  margin-top: 3px;
}

.settings-generate-button {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 104px;
  margin-top: 0;
  border: 1px solid color-mix(in srgb, var(--active-accent) 22%, rgba(31, 32, 35, 0.1));
  border-radius: 11px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--active-accent) 17%, #ffffff), #ffffff 68%),
    rgba(255, 255, 255, 0.76);
  color: #ffffff;
  font-size: 13px;
  font-weight: 620;
  box-shadow:
    0 13px 28px rgba(33, 49, 52, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.68) inset;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.settings-generate-button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--active-accent) 42%, rgba(31, 32, 35, 0.1));
  background: linear-gradient(180deg, color-mix(in srgb, var(--active-accent) 28%, #ffffff), #ffffff 72%);
}

.settings-generate-button span {
  display: block;
  color: rgba(31, 32, 35, 0.9);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.settings-generate-button small {
  display: none;
  margin-top: 6px;
  color: rgba(31, 32, 35, 0.5);
  font-size: 10px;
  font-weight: 430;
  line-height: 1.25;
  white-space: normal;
}

.settings-generate-button:disabled {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.42)),
    rgba(31, 32, 35, 0.045);
  color: rgba(31, 32, 35, 0.36);
  cursor: default;
}

.settings-generate-button:disabled span {
  color: rgba(31, 32, 35, 0.38);
}

.settings-generate-button:disabled small {
  color: rgba(31, 32, 35, 0.32);
}

.settings-generate-button:not(:disabled) {
  border-color: rgba(31, 32, 35, 0.88);
  background: #17181b;
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(18, 22, 28, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.settings-generate-button:not(:disabled):hover {
  border-color: #0f1012;
  background: #0f1012;
}

.settings-generate-button:not(:disabled) span {
  color: #ffffff;
}

.ad-banner-strip {
  display: block;
  width: min(1240px, 100%);
  margin: 24px auto 0;
}

.ad-banner-card {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(220px, 16.8vw, 250px);
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(31, 32, 35, 0.08);
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  isolation: isolate;
  box-shadow: 0 12px 28px rgba(33, 49, 52, 0.045);
}

.ad-banner-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(1.04) contrast(1.02);
  transition:
    transform 260ms ease,
    filter 220ms ease;
}

.ad-banner-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.12) contrast(1.04);
}

.shortcut-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(928px, 100%);
  margin: 14px auto 0;
}

.shortcut-row {
  display: none;
}

.shortcut-row button,
.shortcut-row button:nth-child(2),
.shortcut-row button:nth-child(3),
.shortcut-row button:nth-child(4) {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 20px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 46%),
    #191a1d;
  font-size: 14px;
  box-shadow: 0 14px 32px rgba(31, 32, 35, 0.08);
}

.shortcut-row button::before {
  display: none;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(760px, 100%);
  margin: 22px auto 0;
}

.showcase-card {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(65, 104, 128, 0.12);
}

.showcase-card.wide {
  grid-column: span 2;
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.12), transparent 44%),
    linear-gradient(135deg, var(--blue), #ffffff 55%, var(--coral));
}

.showcase-card.dark::before,
.showcase-card.night::before {
  background:
    radial-gradient(circle at 76% 40%, rgba(243, 155, 127, 0.7), transparent 18%),
    linear-gradient(135deg, #111111, #1f2730);
}

.showcase-card.cream::before {
  background: linear-gradient(135deg, #fdf3d9, #b7dcef);
}

.showcase-card.mono::before {
  background: linear-gradient(135deg, #171717, #f5f5f5 55%, #d8d8d8);
}

.showcase-card.sketch::before {
  background: linear-gradient(135deg, #fff8e7, #f2d8b8);
}

.showcase-card.soft::before {
  background: linear-gradient(135deg, #eef5ea, #ffffff 50%, #b7dcef);
}

.showcase-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: rgba(22, 22, 22, 0.78);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.showcase-card.dark span,
.showcase-card.night span {
  color: rgba(255, 255, 255, 0.9);
}

.platform-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: min(860px, 100%);
  margin: 66px auto 0;
  border-top: 1px solid rgba(22, 22, 22, 0.1);
  border-bottom: 1px solid rgba(22, 22, 22, 0.1);
}

.platform-row article {
  min-height: 94px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border-right: 1px solid rgba(22, 22, 22, 0.1);
}

.platform-row article:last-child {
  border-right: 0;
}

.platform-row strong {
  font-family: Georgia, "Times New Roman", "SimSun", serif;
  font-size: 22px;
}

.platform-row button {
  min-height: 34px;
  min-width: 120px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.38);
  color: rgba(22, 22, 22, 0.78);
}

.templates,
.result-section,
.story-section,
.studio-section,
.milestone-section,
.final-cta {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.templates {
  margin-top: 72px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2,
.story-section h2,
.studio-section h2,
.milestone-section h2,
.final-cta h2 {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: 0;
}

.section-head p:not(.section-kicker),
.studio-section p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.58;
}

.more-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 16px;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(22, 22, 22, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(22, 22, 22, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.category-tab.active {
  background: var(--ink);
  color: #ffffff;
}

.template-grid,
.result-grid,
.story-grid,
.studio-grid,
.milestone-grid {
  display: grid;
  gap: 14px;
}

.template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.template-card,
.result-card {
  display: flex;
  min-height: 306px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(34, 43, 48, 0.07);
}

.template-art,
.result-art {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  background: #e6edf0;
}

.template-art::before,
.result-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.85), transparent 14%),
    radial-gradient(circle at 72% 26%, rgba(119, 154, 255, 0.48), transparent 13%),
    linear-gradient(135deg, rgba(18, 18, 18, 0.2), transparent 38%),
    linear-gradient(135deg, #dcebf1, #ffffff 52%, #ffac90);
}

.template-art::after,
.result-art::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(22, 22, 22, 0.78);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.template-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.template-title {
  min-height: 44px;
  margin: 0;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.template-meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.template-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
}

.mini-button {
  min-height: 38px;
  padding: 0 12px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.mini-button.secondary {
  border: 1px solid rgba(22, 22, 22, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.result-section {
  margin-top: 44px;
  padding: 24px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.status-line {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.result-art {
  min-height: 250px;
}

.result-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.story-section,
.studio-section,
.milestone-section,
.final-cta {
  margin-top: 108px;
}

.story-section {
  text-align: left;
}

.story-section h2 {
  max-width: 720px;
}

.story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
}

.story-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  border-radius: 13px;
  color: #ffffff;
  background: #111111;
  box-shadow: var(--shadow);
}

.story-card.image-one {
  background: linear-gradient(135deg, #1e3241, #8bbfd7);
}

.story-card.image-two {
  background: linear-gradient(135deg, #0e0e0e, #354050 58%, #f39b7f);
}

.story-card.image-three {
  color: var(--ink);
  background: linear-gradient(135deg, #fff7e8, #b7dcef);
}

.story-card span {
  margin-bottom: 8px;
  font-weight: 800;
  opacity: 0.75;
}

.story-card p {
  color: currentColor;
  line-height: 1.62;
  opacity: 0.82;
}

.studio-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.studio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.studio-grid article,
.milestone-grid article {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.6);
}

.studio-grid strong,
.milestone-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.studio-grid span,
.milestone-grid p {
  color: var(--muted);
  line-height: 1.58;
}

.milestone-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.milestone-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue-deep);
  font-weight: 900;
}

.final-cta {
  margin-bottom: 100px;
  padding: 70px 22px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(183, 220, 239, 0.8), rgba(255, 255, 255, 0.55));
  text-align: center;
}

.final-cta .primary-button {
  margin-top: 24px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  transform: translateY(18px);
  opacity: 0;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes mascotFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1deg) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-14px) rotate(1.2deg) scale(1.012);
  }
}

@keyframes haloBreath {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.58;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

@keyframes shadowPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-50%) scale(0.88);
    opacity: 0.46;
  }
}

@keyframes mascotBlink {
  0%,
  44%,
  48%,
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }
  46% {
    opacity: 0.82;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes titleMascotNod {
  0%,
  100% {
    transform: translateY(3px) rotate(0deg) scale(1);
  }
  24% {
    transform: translateY(-2px) rotate(-3deg) scale(1.02);
  }
  44% {
    transform: translateY(2px) rotate(2deg) scale(0.99);
  }
  64% {
    transform: translateY(-1px) rotate(1deg) scale(1.01);
  }
}

@keyframes titleMascotWave {
  0%,
  100% {
    transform: rotate(-8deg) translateY(0);
  }
  24% {
    transform: rotate(18deg) translateY(-2px);
  }
  42% {
    transform: rotate(-16deg) translateY(1px);
  }
  58% {
    transform: rotate(14deg) translateY(-1px);
  }
}

@keyframes titleMascotTail {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(18deg);
  }
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
    inset: 0 0 auto;
    flex-direction: row;
    width: 100%;
    min-height: 64px;
    padding: 0 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(31, 32, 35, 0.08);
  }

  .login-button {
    display: none;
  }

  .nav {
    display: none;
  }

  .rail-footer {
    margin-left: auto;
    width: auto;
  }

  .rail-stack,
  .rail-popover {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .brand {
    width: 146px;
    height: 32px;
    overflow: visible;
  }

  .brand::before {
    display: none;
  }

  .brand img {
    display: block;
    width: 146px;
  }

  main {
    margin-left: 0;
  }

  .hero-shell {
    min-height: auto;
    padding: 42px 20px 14px;
  }

  .hero-grid {
    display: block;
  }

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

  .creation-mode-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .generation-settings-panel {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .reference-settings,
  .settings-generate-button {
    grid-column: 1 / -1;
  }

  .ratio-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  h1 {
    font-size: 36px;
  }

  .hero-title {
    width: 100%;
  }

  .mascot-panel {
    min-height: 520px;
  }

  .template-grid,
  .result-grid,
  .story-grid,
  .milestone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-row,
  .studio-section {
    grid-template-columns: 1fr;
  }

  .platform-row article {
    border-right: 0;
    border-bottom: 1px solid rgba(22, 22, 22, 0.1);
  }

  .platform-row article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .hero-shell {
    padding: 28px 10px 16px;
  }

  h1 {
    font-size: 30px;
  }

  .hero-title {
    flex-wrap: wrap;
    gap: 2px 10px;
  }

  .title-mascot-wrap,
  .title-mascot {
    width: 77px;
  }

  .title-mascot {
    transform: translateY(-2px);
  }

  .hero-title span:last-child {
    flex-basis: 100%;
    text-align: center;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .prompt-card {
    grid-template-columns: 1fr;
    min-height: 224px;
    padding: 16px 14px 14px;
    border-radius: 15px;
  }

  .creation-mode-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .creation-option-card {
    min-height: 104px;
  }

  .settings-counter {
    display: none;
  }

  .settings-group:first-of-type {
    margin-top: 0;
  }

  .ratio-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .quality-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setting-option {
    min-height: 44px;
  }

  .reference-helper,
  .reference-note {
    font-size: 10.5px;
  }

  .generation-settings-panel {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 0;
    border-radius: 0;
  }

  .reference-compact {
    align-items: start;
  }

  textarea {
    min-height: 118px;
    font-size: 14px;
  }

  .prompt-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .prompt-tools,
  .send-group {
    width: 100%;
  }

  .prompt-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tool-chip,
  .tool-select {
    justify-content: center;
    width: 100%;
  }

  .quality-select,
  .count-select {
    grid-column: 1 / -1;
  }

  .send-group {
    justify-content: space-between;
  }

  .send-group .primary-button {
    flex: 1;
    width: auto;
  }

  .send-group .prompt-counter {
    flex: 0 0 auto;
  }

  .shortcut-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shortcut-row button {
    min-height: 74px;
    padding: 0 13px;
  }

  .mascot-panel {
    min-height: 430px;
    border-radius: 26px;
  }

  .mascot-stage {
    width: min(94%, 390px);
    top: 48%;
  }

  .mascot-caption {
    left: 14px;
    right: 14px;
    bottom: 14px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 70px;
    border-radius: 16px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .icon-button {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
  }

  .send-group .icon-button {
    flex: 0 0 34px;
    width: 34px;
  }

  .send-group .start-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
  }

  .template-grid,
  .result-grid,
  .story-grid,
  .studio-grid,
  .milestone-grid {
    grid-template-columns: 1fr;
  }

  .showcase-card.wide {
    grid-column: span 1;
  }

  .templates,
  .result-section,
  .story-section,
  .studio-section,
  .milestone-section,
  .final-cta {
    width: calc(100% - 22px);
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions {
    width: 100%;
  }
}

.templates,
.result-section {
  width: min(1720px, calc(100% - clamp(16px, 1vw, 24px)));
}

.templates {
  margin-top: 34px;
  margin-bottom: 88px;
}

.templates .section-head {
  align-items: flex-end;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.template-section-actions {
  min-height: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.templates .section-head h2 {
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 860;
}

.templates .section-head p:not(.section-kicker) {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 430;
}

.template-browser {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.template-primary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 36px;
}

.template-primary-tabs {
  align-items: center;
  flex: 1 1 auto;
  gap: 34px;
  min-height: 36px;
  padding: 0;
  border-bottom: 0;
}

.template-primary-row .more-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  min-height: 34px;
  color: rgba(31, 32, 35, 0.86);
  font-family:
    "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", Inter, ui-sans-serif,
    system-ui, sans-serif;
  font-size: 14px;
  font-weight: 350;
  line-height: 1;
}

.template-filter-row {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 32px;
}

.category-tab {
  position: relative;
  min-height: 34px;
  padding: 0 0 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(31, 32, 35, 0.62);
  font-size: 14px;
  font-weight: 520;
  letter-spacing: 0;
}

.category-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: #17181b;
  transition: transform 160ms ease;
}

.category-tab.active {
  background: transparent;
  color: #17181b;
  font-weight: 720;
}

.category-tab.active::after {
  transform: scaleX(1);
}

.subcategory-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  gap: 10px 30px;
  min-height: 30px;
  overflow-x: auto;
  padding: 0 0 2px;
}

.template-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  margin-left: auto;
}

.template-tool {
  position: relative;
}

.template-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 60px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(31, 32, 35, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(31, 32, 35, 0.82);
  font: inherit;
  font-size: 13px;
  font-weight: 520;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.template-tool-button:hover,
.template-tool.open .template-tool-button,
.template-tool-button.has-active-filter {
  border-color: rgba(31, 32, 35, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #17181b;
}

.template-tool-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.76;
}

.template-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  border: 1px solid rgba(31, 32, 35, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 42px rgba(18, 22, 28, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transform-origin: 100% 0;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  backdrop-filter: blur(18px);
}

.template-tool.open .template-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.recommend-dropdown {
  display: grid;
  width: 64px;
  padding: 4px;
}

.recommend-dropdown button,
.filter-options button,
.filter-clear {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.recommend-dropdown button {
  min-height: 30px;
  border-radius: 4px;
  background: transparent;
  color: rgba(31, 32, 35, 0.86);
  font-size: 13px;
  font-weight: 520;
}

.recommend-dropdown button:hover,
.recommend-dropdown button.active {
  background: rgba(31, 32, 35, 0.055);
  color: #17181b;
}

.filter-dropdown {
  width: 158px;
  padding: 14px;
}

.filter-group + .filter-group {
  margin-top: 15px;
}

.filter-group strong {
  display: block;
  margin-bottom: 10px;
  color: rgba(31, 32, 35, 0.86);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

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

.filter-options button {
  min-width: 48px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: rgba(31, 32, 35, 0.055);
  color: rgba(31, 32, 35, 0.72);
  font-size: 12px;
  font-weight: 520;
}

.filter-options button:hover,
.filter-options button.active {
  background: rgba(31, 32, 35, 0.1);
  color: #17181b;
}

.filter-clear {
  width: 100%;
  min-height: 32px;
  margin-top: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(31, 32, 35, 0.08) inset;
  color: rgba(31, 32, 35, 0.78);
  font-size: 13px;
  font-weight: 520;
}

.filter-clear:hover {
  background: rgba(31, 32, 35, 0.045);
}

.subcategory-tab {
  position: relative;
  min-height: 28px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(31, 32, 35, 0.58);
  font-size: 14px;
  font-weight: 460;
  letter-spacing: 0;
}

.subcategory-tab.active {
  color: #17181b;
  font-weight: 680;
}

.subcategory-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: rgba(31, 32, 35, 0.86);
}

.template-grid {
  display: block;
  column-count: 4;
  column-gap: 14px;
  width: 100%;
}

.template-card {
  display: inline-block;
  width: 100%;
  min-height: 0;
  margin: 0 0 14px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid rgba(31, 32, 35, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(34, 43, 48, 0.055);
}

.template-art {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: var(--template-bg, linear-gradient(135deg, #dcebf1, #ffffff 52%, #ffac90));
  color: #ffffff;
  text-align: left;
  white-space: normal;
}

.template-card--banner .template-art {
  aspect-ratio: 16 / 9;
}

.template-card--wide .template-art {
  aspect-ratio: 4 / 3;
}

.template-card--square .template-art {
  aspect-ratio: 1 / 1;
}

.template-card--poster .template-art {
  aspect-ratio: 3 / 4;
}

.template-card--tall .template-art {
  aspect-ratio: 4 / 5;
}

.template-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.78), transparent 14%),
    radial-gradient(circle at 78% 22%, rgba(105, 139, 255, 0.42), transparent 13%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 45%);
}

.template-art::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 9px 11px;
  border-radius: 6px;
  background: rgba(20, 20, 22, 0.78);
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}

.template-tag {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 3;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(31, 32, 35, 0.72);
  font-size: 11px;
  font-weight: 680;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.template-card[data-tone="ice"] {
  --template-bg: linear-gradient(135deg, #dcebf1 0%, #ffffff 52%, #f8c6b7 100%);
}

.template-card[data-tone="mint"] {
  --template-bg: linear-gradient(135deg, #dbf6ec 0%, #ffffff 48%, #b9dff1 100%);
}

.template-card[data-tone="peach"] {
  --template-bg: linear-gradient(135deg, #ffe7d8 0%, #fffaf3 52%, #f5a98e 100%);
}

.template-card[data-tone="slate"] {
  --template-bg: linear-gradient(135deg, #273848 0%, #7aa5b8 56%, #f8efe6 100%);
}

.template-card[data-tone="violet"] {
  --template-bg: linear-gradient(135deg, #efe5ff 0%, #ffffff 48%, #7c6df2 100%);
}

.template-card[data-tone="aqua"] {
  --template-bg: linear-gradient(135deg, #d9f5f8 0%, #ffffff 52%, #87d9d5 100%);
}

.template-card[data-tone="paper"] {
  --template-bg: linear-gradient(135deg, #f4f1eb 0%, #ffffff 54%, #d9d4c6 100%);
}

.template-card[data-tone="coral"] {
  --template-bg: linear-gradient(135deg, #fff1e6 0%, #ffffff 48%, #ff9d82 100%);
}

.template-card[data-tone="rose"] {
  --template-bg: linear-gradient(135deg, #ffe4ef 0%, #fff8fb 52%, #ff8bb5 100%);
}

.template-card[data-tone="lavender"] {
  --template-bg: linear-gradient(135deg, #efe9ff 0%, #ffffff 55%, #c9d5ff 100%);
}

.template-body {
  min-height: 124px;
  padding: 15px 14px 15px;
  background: rgba(255, 255, 255, 0.94);
}

.template-title {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(31, 32, 35, 0.92);
  font-family:
    "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", Inter, ui-sans-serif,
    system-ui, sans-serif;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-meta {
  margin: 7px 0 11px;
  color: rgba(31, 32, 35, 0.5);
  font-size: 12px;
  font-weight: 430;
}

.template-actions {
  gap: 7px;
}

.mini-button {
  min-height: 34px;
  font-size: 13px;
  font-weight: 720;
}

.mini-button.secondary {
  min-width: 58px;
}

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

@media (max-width: 760px) {
  .ad-banner-strip {
    width: calc(100% - 14px);
    margin-top: 20px;
  }

  .ad-banner-card {
    height: clamp(94px, 27vw, 118px);
    min-height: 94px;
  }

  .templates,
  .result-section {
    width: calc(100% - 14px);
  }

  .templates {
    margin-top: 30px;
    margin-bottom: 68px;
  }

  .templates .section-head {
    gap: 12px;
  }

  .template-primary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .template-primary-tabs {
    width: 100%;
    gap: 24px;
    overflow-x: auto;
  }

  .template-primary-row .more-link {
    align-self: flex-end;
  }

  .template-filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .subcategory-tabs {
    flex-wrap: nowrap;
    gap: 22px;
    width: 100%;
  }

  .template-tools {
    align-self: flex-end;
    gap: 8px;
  }

  .template-dropdown {
    right: 0;
  }

  .template-grid {
    column-count: 2;
    column-gap: 10px;
  }

  .template-card {
    margin-bottom: 10px;
  }

  .template-art::after {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .template-tag {
    left: 10px;
    top: 10px;
    font-size: 10px;
  }

  .template-body {
    min-height: 116px;
    padding: 13px 12px;
  }

  .template-title {
    font-size: 13.5px;
  }

  .template-meta {
    font-size: 11px;
  }

  .template-summary {
    min-height: calc(12px * 1.56 * 2);
    max-height: calc(12px * 1.56 * 3);
    font-size: 12px;
    line-height: 1.56;
  }

  .template-meta-row {
    gap: 4px;
    margin-top: 8px;
  }

  .template-pill,
  .template-ratio {
    min-height: 22px;
    padding: 0 6px;
    font-size: 11px;
  }

  .mini-button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }
}

.prompt-card,
.creation-option-card,
.settings-group,
.setting-option,
.reference-button,
.settings-generate-button,
.upload-menu,
.upload-option,
.template-card,
.template-art,
.template-art::after,
.result-section,
.result-card,
.result-art,
.status-line,
.showcase-card,
.shortcut-row button,
.story-card,
.studio-grid article,
.milestone-grid article,
.final-cta {
  border-radius: 0;
}

.template-tag {
  border-radius: 0;
}

.settings-group::before {
  border-radius: 0;
}

.template-card {
  position: relative;
  overflow: visible;
}

.template-art {
  isolation: isolate;
  cursor: pointer;
}

.template-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.001);
  transition:
    transform 320ms ease,
    filter 220ms ease,
    opacity 180ms ease;
}

.template-image.is-hidden {
  opacity: 0;
}

.template-art::before,
.template-art::after,
.template-image {
  transition:
    transform 260ms ease,
    opacity 220ms ease,
    filter 220ms ease;
}

.template-art::before {
  transform-origin: 50% 50%;
}

.template-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, 0.04), transparent 38%),
    linear-gradient(0deg, rgba(12, 14, 18, 0.18), transparent 48%);
  opacity: 0;
  pointer-events: none;
}

.template-card:hover .template-art::before,
.template-card:focus-within .template-art::before {
  transform: scale(1.045);
  filter: saturate(1.04);
}

.template-card:hover .template-image,
.template-card:focus-within .template-image {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.02);
}

.template-card:hover .template-art::after,
.template-card:focus-within .template-art::after {
  opacity: 1;
}

.template-hover-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, 0.38), transparent 38%),
    linear-gradient(0deg, rgba(12, 14, 18, 0.5), transparent 44%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    background 160ms ease;
}

.template-card:hover .template-hover-layer,
.template-card:focus-within .template-hover-layer,
.template-card.menu-open .template-hover-layer {
  opacity: 1;
  pointer-events: auto;
}

.template-hover-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.template-hover-actions {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 6px;
}

.template-summary {
  display: -webkit-box;
  min-height: calc(13px * 1.62 * 2);
  max-height: calc(13px * 1.62 * 3);
  margin: 8px 0 0;
  overflow: hidden;
  color: rgba(31, 32, 35, 0.62);
  font-family:
    "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", Inter, ui-sans-serif,
    system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.template-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  min-width: 0;
}

.template-pill,
.template-ratio {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(31, 32, 35, 0.08);
  background: rgba(31, 32, 35, 0.035);
  color: rgba(31, 32, 35, 0.58);
  font-family:
    "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", Inter, ui-sans-serif,
    system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.template-pill {
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-ratio {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(31, 32, 35, 0.72);
  font-weight: 400;
}

.template-icon-button,
.template-hover-generate,
.template-menu button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.template-icon-button {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: rgba(31, 32, 35, 0.82);
  font-size: 11px;
  font-weight: 720;
  box-shadow: 0 8px 24px rgba(18, 22, 28, 0.14);
  backdrop-filter: blur(16px);
}

.template-more-trigger {
  min-width: 28px;
  padding: 0 7px;
  font-size: 14px;
  letter-spacing: 1px;
}

.template-hover-generate {
  align-self: stretch;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: rgba(31, 32, 35, 0.92);
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 12px 28px rgba(18, 22, 28, 0.16);
}

.template-menu {
  position: absolute;
  right: 10px;
  top: 46px;
  z-index: 8;
  display: grid;
  width: 136px;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(31, 32, 35, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(18, 22, 28, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: 100% 0;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  backdrop-filter: blur(18px);
}

.template-card.menu-open .template-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.template-menu button {
  min-height: 30px;
  padding: 0 9px;
  background: transparent;
  color: rgba(31, 32, 35, 0.82);
  text-align: left;
  font-family:
    "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", Inter, ui-sans-serif,
    system-ui, sans-serif;
  font-size: 13px;
  font-weight: 350;
}

.template-menu button:hover,
.template-menu button:focus-visible {
  background: rgba(31, 32, 35, 0.07);
  outline: 0;
}

.template-card[data-visual="layout"] .template-art::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0 21%, transparent 21% 26%, rgba(255, 255, 255, 0.5) 26% 62%, transparent 62% 67%, rgba(255, 255, 255, 0.68) 67% 100%),
    var(--template-bg);
}

.template-card[data-visual="product"] .template-art::before {
  background:
    radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.9) 0 16%, transparent 17%),
    radial-gradient(ellipse at 50% 76%, rgba(31, 32, 35, 0.13), transparent 24%),
    var(--template-bg);
}

.template-card[data-visual="poster"] .template-art::before {
  background:
    linear-gradient(135deg, transparent 0 54%, rgba(31, 32, 35, 0.09) 54% 55%, transparent 55%),
    radial-gradient(circle at 70% 25%, rgba(89, 108, 255, 0.34), transparent 18%),
    var(--template-bg);
}

.template-card[data-visual="brand"] .template-art::before {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.9) 0 9%, transparent 10%),
    conic-gradient(from 40deg at 50% 52%, rgba(31, 32, 35, 0.1), transparent, rgba(255, 255, 255, 0.35), transparent),
    var(--template-bg);
}

.template-card[data-visual="portrait"] .template-art::before {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.88) 0 13%, transparent 14%),
    radial-gradient(ellipse at 50% 72%, rgba(31, 32, 35, 0.18) 0 22%, transparent 23%),
    var(--template-bg);
}

.template-card[data-visual="scene"] .template-art::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(12deg, rgba(31, 32, 35, 0.1) 0 16%, transparent 16%),
    linear-gradient(-12deg, transparent 0 68%, rgba(255, 255, 255, 0.42) 68%),
    var(--template-bg);
}

.template-card[data-visual="type"] .template-art::before {
  background:
    repeating-linear-gradient(0deg, rgba(31, 32, 35, 0.12) 0 8px, transparent 8px 24px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), transparent 52%),
    var(--template-bg);
}

.template-card[data-visual="device"] .template-art::before {
  background:
    linear-gradient(180deg, rgba(31, 32, 35, 0.14) 0 36%, transparent 36%),
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.76) 18% 82%, transparent 82%),
    var(--template-bg);
}

.template-card[data-visual="collage"] .template-art::before {
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.75) 0 12%, transparent 13%),
    radial-gradient(circle at 70% 68%, rgba(31, 32, 35, 0.12) 0 16%, transparent 17%),
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.42) 36% 64%, transparent 64%),
    var(--template-bg);
}

.template-card[data-visual="pattern"] .template-art::before {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 10px, transparent 10px 28px),
    radial-gradient(circle at 78% 28%, rgba(88, 115, 255, 0.28), transparent 18%),
    var(--template-bg);
}

.template-load-state {
  margin: 26px auto 0;
  padding: 16px 0 34px;
  color: rgba(31, 32, 35, 0.48);
  text-align: center;
  font-size: 13px;
  font-weight: 520;
}

.template-load-state.complete {
  color: rgba(31, 32, 35, 0.34);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
