:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-muted: #f8faf7;
  --border: #d8ded4;
  --border-strong: #b9c4b3;
  --text: #162018;
  --muted: #637062;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --primary-soft: #dff4ee;
  --accent: #a44b24;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --focus: #1d9a8a;
  --shadow: 0 18px 42px rgba(24, 32, 24, 0.08);
  --radius: 8px;
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  cursor: default;
  overflow-x: hidden;
}

html.boot-workspace .landing-page {
  display: none;
}

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

button {
  touch-action: manipulation;
}

a {
  color: inherit;
}

a.button {
  text-decoration: none;
}

button,
a,
select,
[role="button"],
.floating-nav-link {
  cursor: pointer;
}

input,
textarea,
[contenteditable="true"] {
  cursor: text;
  caret-color: auto;
  -webkit-user-select: text;
  user-select: text;
}

.generated-card,
.profile-asset-card,
.preview-meta-card,
.phone-screen,
.phone-content-scroll,
.wechat-preview,
.xhs-preview-root {
  cursor: default;
}

.floating-main-nav,
.topbar,
.workflow-bar,
.settings-panel,
.editor-toolbar,
.panel-header,
.profile-hero,
.device-preview-header,
.chat-hero,
.chat-side-card,
.chat-thread-header,
.chat-empty-state,
.preview-meta-card,
.profile-section-card,
.profile-info-card,
.profile-empty,
.status-line,
.count-pill,
.left-tab-nav,
.nav-stack,
.platform-tabs,
.generation-route-tabs,
.asset-type-tabs,
.page-tabs {
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.floating-main-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(216, 222, 212, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(24, 32, 24, 0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

body.landing-active .floating-main-nav {
  display: none;
}

.floating-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.floating-nav-link svg {
  width: 17px;
  height: 17px;
}

.floating-nav-link:hover {
  color: var(--text);
  background: var(--surface-muted);
  transform: translateY(-1px);
}

.floating-nav-link.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

body.workspace-active .floating-main-nav {
  position: absolute;
}

body.workspace-active .app-shell .floating-main-nav {
  position: static;
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 18px;
  transform: none;
}

body.device-preview-page .floating-main-nav {
  position: absolute;
}

.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(29, 154, 138, 0.28);
  outline-offset: 2px;
}

.app-shell {
  width: min(1740px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 20px 20px;
}

body.landing-active {
  background: #f6efe1;
  overflow: hidden;
}

.landing-page {
  position: relative;
  display: grid;
  min-height: 100dvh;
  height: 100dvh;
  padding: clamp(12px, 1.35vw, 22px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.58), transparent 24%),
    radial-gradient(circle at 82% 72%, rgba(223, 209, 184, 0.24), transparent 26%),
    linear-gradient(180deg, #fbf5e8, #f6efe1 58%, #f9f2e4);
  color: #303236;
}

.landing-page::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.2vw, 20px);
  z-index: 1;
  border: 3px solid #303236;
  border-radius: clamp(16px, 1.8vw, 30px);
  box-shadow:
    1px 1px 0 rgba(48, 50, 54, 0.38),
    inset 0 0 0 1px rgba(48, 50, 54, 0.06);
  opacity: 0.95;
  pointer-events: none;
}

.landing-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 16%, rgba(48, 50, 54, 0.055) 0 1px, transparent 1.4px),
    radial-gradient(circle at 72% 84%, rgba(48, 50, 54, 0.045) 0 1px, transparent 1.5px),
    repeating-linear-gradient(92deg, rgba(48, 50, 54, 0.018) 0 1px, transparent 1px 6px);
  background-size: 17px 17px, 23px 23px, auto;
  mix-blend-mode: multiply;
}

.landing-orb {
  position: absolute;
  z-index: 2;
  width: clamp(180px, 22vw, 360px);
  height: clamp(170px, 20vw, 330px);
  border-radius: 50%;
  background: transparent;
  filter: none;
  opacity: 0.5;
  pointer-events: none;
}

.landing-orb-one {
  top: -5%;
  left: 5%;
  border-right: 2px dashed rgba(48, 50, 54, 0.28);
  border-bottom: 2px dashed rgba(48, 50, 54, 0.2);
  transform: rotate(28deg);
}

.landing-orb-two {
  right: 4%;
  bottom: -7%;
  border-top: 2px dashed rgba(48, 50, 54, 0.24);
  border-left: 2px dashed rgba(48, 50, 54, 0.18);
  transform: rotate(-22deg);
}

.landing-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(1600px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(42px, 6vw, 90px) clamp(18px, 5vw, 72px);
}

.landing-grid {
  display: grid;
  width: 100%;
  place-items: center;
}

.bento-card {
  border: 1px solid rgba(163, 178, 255, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(12, 16, 30, 0.72);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
}

.landing-title-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(820px, calc(100dvh - clamp(60px, 8vw, 120px)));
  width: 100%;
  padding: clamp(40px, 7vw, 112px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  text-align: center;
}

.landing-title-card::before {
  content: none;
}

.landing-title-topline {
  display: none;
}

.landing-signal {
  display: none;
}

.landing-title {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: clamp(8px, 1vw, 18px);
  align-items: baseline;
  justify-content: center;
  margin: 0;
  color: #303236;
  font-family: "Comic Sans MS", "Marker Felt", "KaiTi", "Kaiti SC", "STKaiti", cursive;
  font-size: clamp(58px, 7vw, 116px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.01em;
  isolation: isolate;
  text-shadow:
    0.8px 0.8px 0 rgba(48, 50, 54, 0.28),
    -0.5px 0 0 rgba(48, 50, 54, 0.16);
}

.landing-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(-42px, -2.7vw, -24px);
  width: min(86%, 560px);
  height: 20px;
  border-bottom: 3px solid rgba(48, 50, 54, 0.76);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 8px 0 -7px rgba(48, 50, 54, 0.56);
  transform: translateX(-50%) rotate(-1deg);
}

.landing-title span:not(.landing-title-gradient) {
  font-size: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
}

.landing-title span {
  overflow-wrap: normal;
}

.landing-title-gradient {
  flex: 0 0 auto;
  width: auto;
  background: none;
  color: #303236;
  -webkit-text-fill-color: currentColor;
  filter: none;
  animation: none;
}

@keyframes titleSheen {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes titleOrbit {
  to {
    transform: translate(-50%, -48%) rotate(348deg);
  }
}

.landing-subtitle {
  display: none;
}

.landing-proof-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 560px;
  margin-top: clamp(18px, 2vw, 26px);
}

.landing-proof-row span {
  padding: 8px 11px;
  border: 1px solid rgba(142, 197, 255, 0.18);
  border-radius: 999px;
  background: rgba(142, 197, 255, 0.08);
  color: rgba(234, 239, 255, 0.76);
  font-size: clamp(12px, 0.85vw, 13px);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.landing-title-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: max-content;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: clamp(84px, 7vw, 116px);
}

.landing-start-button {
  min-width: clamp(250px, 23vw, 390px);
  min-height: clamp(70px, 6.6vw, 104px);
  padding-inline: clamp(34px, 4vw, 68px);
  border: 3px solid #303236;
  border-radius: clamp(18px, 1.8vw, 30px);
  background: rgba(255, 251, 241, 0.72);
  color: #303236;
  font-family: "Comic Sans MS", "Marker Felt", "KaiTi", "Kaiti SC", "STKaiti", cursive;
  font-size: clamp(28px, 2.35vw, 43px);
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow:
    8px 9px 0 -4px rgba(48, 50, 54, 0.18),
    12px 13px 0 -7px rgba(48, 50, 54, 0.22);
  transform: rotate(-0.4deg);
}

.landing-start-button:hover {
  background: rgba(255, 248, 232, 0.94);
  transform: translateY(-2px) rotate(-0.4deg);
}

.landing-trace {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.landing-trace::before,
.landing-trace::after {
  content: "";
  position: absolute;
  border-radius: 45%;
  background: transparent;
  box-shadow: none;
}

.landing-trace::before {
  left: -10%;
  bottom: -4%;
  width: clamp(250px, 34vw, 560px);
  height: clamp(210px, 28vw, 460px);
  border-top: 2px solid rgba(48, 50, 54, 0.16);
  transform: rotate(38deg);
}

.landing-trace::after {
  right: -7%;
  top: -8%;
  width: clamp(220px, 28vw, 480px);
  height: clamp(190px, 24vw, 410px);
  border-left: 2px solid rgba(48, 50, 54, 0.14);
  transform: rotate(-22deg);
}

.landing-mock-card {
  display: grid;
  padding: clamp(10px, 1.2vw, 18px);
  min-height: auto;
  border-color: rgba(142, 197, 255, 0.22);
  border-radius: clamp(24px, 2.4vw, 34px);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 44px rgba(112, 91, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.workspace-shot-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(142, 197, 255, 0.2);
  border-radius: clamp(18px, 1.8vw, 28px);
  background:
    radial-gradient(circle at 78% 0%, rgba(151, 92, 255, 0.16), transparent 34%),
    rgba(7, 11, 23, 0.9);
  box-shadow:
    inset 0 0 36px rgba(97, 126, 255, 0.1),
    0 0 48px rgba(112, 91, 255, 0.18);
}

.workspace-shot-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(142, 197, 255, 0.16), transparent 28%);
}

.workspace-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1290 / 936;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.006);
}

.mock-window {
  display: grid;
  grid-template-columns: minmax(118px, 152px) minmax(0, 1fr) minmax(170px, 220px);
  gap: clamp(10px, 1vw, 14px);
  min-height: 100%;
  padding: clamp(10px, 1vw, 14px);
  border: 1px solid rgba(142, 197, 255, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 0%, rgba(151, 92, 255, 0.14), transparent 32%),
    rgba(7, 11, 23, 0.82);
  box-shadow: inset 0 0 40px rgba(97, 126, 255, 0.08);
}

.mock-menu,
.mock-editor,
.mock-insights {
  border: 1px solid rgba(163, 178, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.mock-menu {
  display: grid;
  align-content: start;
  gap: clamp(6px, 0.65vw, 8px);
  padding: clamp(10px, 1vw, 14px);
}

.mock-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7ea8ff, #a45cff);
  color: #fff;
  font-weight: 900;
}

.mock-menu-item {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.65vw, 9px);
  min-height: 38px;
  padding: 0 clamp(7px, 0.7vw, 10px);
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: rgba(236, 241, 255, 0.58);
  font-size: clamp(11px, 0.82vw, 12px);
  font-weight: 800;
}

.mock-menu-item svg {
  width: 15px;
  height: 15px;
}

.mock-menu-item.is-selected {
  border-color: rgba(112, 166, 255, 0.42);
  background: rgba(78, 128, 255, 0.16);
  color: #8ec5ff;
  box-shadow: 0 0 24px rgba(78, 128, 255, 0.18);
}

.mock-editor {
  display: grid;
  align-content: start;
  gap: clamp(10px, 0.9vw, 12px);
  padding: clamp(12px, 1.1vw, 16px);
}

.mock-field {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(163, 178, 255, 0.14);
  border-radius: 18px;
  background: rgba(7, 10, 22, 0.58);
}

.mock-field span,
.mock-card-label,
.mock-insights span {
  color: rgba(234, 239, 255, 0.5);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mock-field strong {
  color: #f7f9ff;
  font-size: 14px;
  line-height: 1.35;
}

.mock-style-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-style-row span {
  padding: 8px 11px;
  border: 1px solid rgba(163, 178, 255, 0.14);
  border-radius: 999px;
  color: rgba(234, 239, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.mock-style-row .is-active {
  border-color: rgba(142, 197, 255, 0.52);
  background: rgba(78, 128, 255, 0.18);
  color: #8ec5ff;
}

.mock-result-card {
  min-height: 230px;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(163, 178, 255, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(12, 17, 34, 0.74);
}

.mock-result-card h2 {
  margin: 10px 0 12px;
  color: #ffffff;
  font-size: clamp(20px, 1.8vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.mock-result-card p {
  margin: 0 0 12px;
  color: rgba(234, 239, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.75;
}

.mock-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-action-row button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(163, 178, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(234, 239, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.mock-publish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.mock-icon-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(234, 239, 255, 0.58);
}

.mock-icon-actions svg {
  width: 18px;
  height: 18px;
}

.mock-publish-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(142, 197, 255, 0.52);
  border-radius: 14px;
  background: linear-gradient(135deg, #4a82ff, #8b5cff);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(95, 126, 255, 0.32);
}

.mock-insights {
  display: grid;
  gap: clamp(10px, 0.9vw, 12px);
  align-content: start;
  padding: clamp(10px, 1vw, 14px);
}

.mock-score-card,
.mock-bars,
.mock-chart,
.mock-tags {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(163, 178, 255, 0.12);
  border-radius: 18px;
  background: rgba(7, 10, 22, 0.52);
}

.mock-score-card strong {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin: 2px auto 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(7, 10, 22, 0.95) 55%, transparent 57%),
    conic-gradient(#8ec5ff 0 92%, rgba(255, 255, 255, 0.11) 92% 100%);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.mock-bars div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
}

.mock-bars em {
  color: rgba(234, 239, 255, 0.68);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.mock-bars b {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mock-bars b::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  border-radius: inherit;
  background: linear-gradient(90deg, #8ec5ff, #c084fc);
}

.mock-chart svg {
  width: 100%;
  height: auto;
}

.mock-tags div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.mock-tags b {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(142, 197, 255, 0.1);
  color: #a9d0ff;
  font-size: 11px;
  line-height: 1;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 42px);
  padding: 12px 0 2px;
  color: rgba(234, 239, 255, 0.52);
  font-size: 13px;
  font-weight: 700;
}

.landing-footer a {
  text-decoration: none;
  text-shadow: 0 0 18px rgba(142, 197, 255, 0.25);
  transition: color 180ms ease;
}

.landing-footer a:hover {
  color: rgba(247, 249, 255, 0.88);
}

.intro-body {
  background:
    radial-gradient(circle at 14% 18%, rgba(164, 75, 36, 0.16), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(15, 118, 110, 0.18), transparent 30%),
    linear-gradient(135deg, #f9f4e8 0%, #eef7f0 54%, #f8f2e7 100%);
}

.intro-shell {
  width: min(1320px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 22px 42px;
}

.intro-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px;
  border: 1px solid rgba(216, 222, 212, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 50px rgba(24, 32, 24, 0.08);
  backdrop-filter: blur(16px);
}

.intro-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.intro-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(164, 75, 36, 0.86));
  color: #fffefb;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.intro-brand strong,
.intro-brand small {
  display: block;
}

.intro-brand strong {
  font-size: 14px;
  line-height: 1.25;
}

.intro-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.intro-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.intro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  gap: 26px;
  align-items: stretch;
  padding: clamp(44px, 7vw, 92px) 0 34px;
}

.intro-hero-copy,
.intro-hero-card,
.intro-feature-card,
.intro-cta {
  position: relative;
  border: 1px solid rgba(216, 222, 212, 0.78);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 26px 70px rgba(24, 32, 24, 0.1);
  backdrop-filter: blur(18px);
}

.intro-hero-copy {
  min-height: 560px;
  padding: clamp(28px, 5vw, 62px);
  border-radius: 28px;
  overflow: hidden;
}

.intro-hero-copy::before {
  content: "";
  position: absolute;
  right: -78px;
  bottom: -86px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(164, 75, 36, 0.12));
}

.intro-hero-copy::after {
  content: "";
  position: absolute;
  right: 62px;
  top: 52px;
  width: 96px;
  height: 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.42) 0 10px, transparent 10px 18px);
}

.intro-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0;
  color: var(--text);
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.intro-lede {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 28px 0 0;
  color: #344235;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.8;
}

.intro-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.intro-primary,
.intro-secondary {
  min-height: 52px;
  padding-inline: 20px;
  border-radius: 999px;
}

.intro-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 46px;
}

.intro-metrics span {
  padding: 9px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(223, 244, 238, 0.68);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.intro-hero-card {
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 560px;
  padding: 26px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.09), rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.7);
}

.intro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-flow {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro-flow li {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(216, 222, 212, 0.88);
  border-radius: 18px;
  background: rgba(255, 254, 251, 0.82);
}

.intro-flow strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.intro-flow span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.intro-section {
  padding: 30px 0 0;
}

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

.intro-section-heading h2,
.intro-cta h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.intro-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.intro-feature-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 230px;
  padding: 22px;
  border-radius: 24px;
}

.intro-feature-card svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.intro-feature-card h3 {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

.intro-feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.intro-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 28px;
  border-radius: 28px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

body.workspace-active .topbar {
  min-height: auto;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 10px;
}

.topbar-title-block {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 320px;
}

body.workspace-active .topbar-title-block {
  position: static;
  z-index: 2;
  width: min(440px, calc(100vw - 40px));
  text-align: center;
  transform: none;
}

.workflow-bar {
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.workflow-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  min-width: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: center;
}

.workflow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  border-radius: 999px;
  background: var(--border);
}

.workflow-step.is-complete:not(:last-child)::after {
  background: var(--border);
}

.workflow-step.is-active:not(:last-child)::after {
  background: var(--border);
}

.workflow-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  background: #fffefb;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.workflow-step.is-complete .workflow-dot {
  border-color: var(--primary);
  background: var(--primary);
}

.workflow-step.is-active .workflow-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}

.workflow-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.workflow-step.is-complete .workflow-label,
.workflow-step.is-active .workflow-label {
  color: var(--text);
}

.topbar h1,
.panel-header h2,
.editor-toolbar h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1.18;
}

body.workspace-active .topbar h1 {
  font-size: clamp(30px, 2.9vw, 48px);
}

.nav-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-group-label {
  min-width: 56px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.nav-group-value {
  margin: 0 0 0 4px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
}

.platform-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.platform-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.platform-tab.is-active {
  background: var(--primary);
  color: #ffffff;
}

.page-tabs,
.generation-route-tabs,
.asset-type-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.page-tab,
.generation-route-tab,
.asset-type-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.asset-kind-field {
  align-self: stretch;
}

.asset-kind-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.asset-kind-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.asset-kind-tab.is-active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
}

.illustration-size-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.illustration-size-custom-row[hidden] {
  display: none;
}

.illustration-size-custom-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.asset-size-grid {
  align-items: start;
}

.asset-size-grid .field {
  align-content: start;
}

.asset-size-grid .field > span {
  min-height: 18px;
  line-height: 18px;
}

.asset-size-grid select {
  height: 44px;
}

.asset-pixel-control {
  display: grid;
  min-height: 44px;
}

.asset-pixel-field .field-hint {
  min-height: 38px;
}

.generation-route-tab,
.asset-type-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  background: #fffefb;
}

.generation-route-tab,
.asset-type-tab {
  position: relative;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 10px 14px;
  text-align: left;
}

.route-tab-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.route-tab-note {
  padding-left: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.generation-route-tab svg,
.asset-type-tab svg {
  width: 16px;
  height: 16px;
}

.page-tab.is-active,
.generation-route-tab.is-active,
.asset-type-tab.is-active {
  border-color: rgba(15, 118, 110, 0.34);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.generation-route-tab.is-active::after,
.asset-type-tab.is-active::after {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.94);
  content: "当前";
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.generation-route-tab.is-active .route-tab-note,
.asset-type-tab.is-active .route-tab-note {
  color: rgba(255, 255, 255, 0.82);
}

.left-tab-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.left-tab-nav {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.06), transparent 46%),
    var(--surface-muted);
}

.left-tab-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.left-tab-button svg {
  width: 18px;
  height: 18px;
}

.left-tab-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.left-tab-button.is-active {
  border-color: rgba(15, 118, 110, 0.2);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.left-tab-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.left-tab-panel[hidden] {
  display: none;
}

.left-save-actions {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 62%),
    rgba(255, 254, 251, 0.86);
}

.left-save-actions .button {
  width: 100%;
}

.announcement-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 58%),
    rgba(255, 254, 251, 0.9);
}

.announcement-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-panel-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.announcement-panel-header svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.announcement-list,
.admin-announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-item,
.admin-announcement-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(216, 222, 212, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.announcement-item p,
.admin-announcement-item p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.announcement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.announcement-meta time {
  white-space: nowrap;
}

.announcement-empty {
  margin: 0;
}

.left-tab-panel .nav-stack {
  margin-top: 0;
}

.left-tab-panel .nav-group {
  position: relative;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.left-tab-panel .nav-group:has(.generation-route-tab.is-active),
.left-tab-panel .nav-group:has(.asset-type-tab.is-active) {
  border-color: rgba(15, 118, 110, 0.3);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 254, 251, 0.88) 58%),
    rgba(255, 254, 251, 0.9);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
}

.left-tab-panel .nav-group-label {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
}

.left-tab-panel .platform-tabs,
.left-tab-panel .page-tabs,
.left-tab-panel .generation-route-tabs,
.left-tab-panel .asset-type-tabs {
  width: 100%;
}

.left-tab-panel .platform-tab,
.left-tab-panel .page-tab,
.left-tab-panel .generation-route-tab,
.left-tab-panel .asset-type-tab {
  flex: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.editor-actions,
.export-actions,
.inline-actions,
.image-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-actions {
  margin-left: auto;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.auth-user-label {
  display: grid;
  gap: 2px;
  max-width: 180px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
  overflow: hidden;
}

.auth-user-name,
.auth-quota-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-quota-label {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
}

.global-user-badge {
  position: fixed;
  top: 14px;
  right: clamp(14px, 2vw, 24px);
  z-index: 96;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 28px));
  padding: 5px;
  border: 1px solid rgba(216, 222, 212, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(24, 32, 24, 0.14);
  backdrop-filter: blur(18px);
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.global-user-chip,
.global-account-admin-link,
.global-account-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.global-user-chip {
  gap: 9px;
  min-width: 0;
  padding: 0 12px;
  color: var(--text);
}

.global-user-chip svg,
.global-account-admin-link svg,
.global-account-logout-button svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.global-user-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.18;
}

.global-account-admin-link {
  gap: 7px;
  padding: 0 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.global-account-logout-button {
  gap: 7px;
  padding: 0 12px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.global-account-logout-button:hover {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.global-user-badge[hidden],
.global-account-admin-link[hidden],
.global-account-logout-button[hidden] {
  display: none !important;
}

.global-user-badge.is-signed-out .global-user-chip {
  color: var(--muted);
}

body.workspace-active .topbar-actions {
  display: none;
}

body.workspace-active .topbar-actions {
  position: fixed;
  top: 14px;
  right: clamp(14px, 2vw, 24px);
  z-index: 92;
  width: auto;
  margin-left: 0;
  justify-content: flex-end;
}

body.workspace-active .topbar-actions .auth-actions {
  min-height: 52px;
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(24, 32, 24, 0.12);
  backdrop-filter: blur(18px);
}

.editor-actions {
  align-items: flex-end;
}

.editor-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.auth-required .workspace,
.auth-required .workflow-bar {
  filter: blur(1px) grayscale(0.25);
  pointer-events: none;
  user-select: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(520px, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-panel,
.editor-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.settings-panel,
.preview-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100dvh - 40px);
  padding: 18px;
}

.settings-panel {
  overflow-y: auto;
  overflow-x: hidden;
}

.preview-panel {
  overflow: auto;
}

.editor-panel {
  min-height: calc(100dvh - 196px);
  padding: 18px;
}

.config-editor-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.asset-studio-panel {
  grid-column: 2 / -1;
}

.draft-library-panel {
  grid-column: 2 / -1;
}

.panel-header,
.editor-toolbar,
.output-header,
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h2,
.editor-toolbar h2,
.output-header h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex: 0 0 auto;
}

.button {
  padding: 0 14px;
  font-weight: 700;
}

.button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.model-test-button {
  font-weight: 800;
}

.model-header-actions {
  flex: 0 0 224px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.model-list-button {
  font-weight: 800;
}

.left-tab-panel[data-left-panel="model"] .panel-header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.left-tab-panel[data-left-panel="model"],
.left-tab-panel[data-left-panel="model"] .panel-header,
.left-tab-panel[data-left-panel="model"] .field-grid,
.left-tab-panel[data-left-panel="model"] .field,
.left-tab-panel[data-left-panel="model"] .left-save-actions {
  min-width: 0;
  max-width: 100%;
}

.left-tab-panel[data-left-panel="model"] .status-line {
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.model-list-field {
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
}

.model-selected-display {
  display: block;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.model-selected-display.is-empty {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--muted);
}

.icon-button {
  width: 44px;
  padding: 0;
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.primary:hover {
  background: var(--primary-strong);
}

.ghost {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}

.ghost:hover,
.icon-button:hover {
  border-color: var(--border-strong);
  background: #eef5f1;
}

.danger-ghost {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffd3cf;
}

.danger-ghost:hover {
  background: #ffe5e2;
}

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

.compact-grid {
  grid-template-columns: 1fr 1fr;
}

.style-options-grid {
  align-items: start;
}

.style-option-wide {
  grid-column: 1 / -1;
}

.field-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.image-options {
  margin-top: 12px;
  grid-template-columns: 1fr;
}

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

.field[hidden] {
  display: none;
}

.field span,
.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.field-hint.success {
  color: var(--primary-strong);
}

.field-hint.error {
  color: var(--danger);
}

.custom-tone-field.is-locked {
  opacity: 0.78;
}

.custom-tone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.custom-tone-row .button {
  min-width: 72px;
  min-height: 44px;
}

.field-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-select {
  width: auto;
  min-width: 220px;
}

body.modal-open {
  overflow: hidden;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fffefb;
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #edf2ef;
  color: #7c887d;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

textarea[readonly] {
  background: var(--surface-muted);
  color: var(--muted);
  cursor: default;
}

input::placeholder,
textarea::placeholder {
  color: #8c978b;
}

.style-trigger-button {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  padding-inline: 10px 12px;
  text-align: left;
}

.style-trigger-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fill-field {
  margin-top: 14px;
}

#sourceText {
  min-height: 220px;
}

#assetPromptText,
#assetDetailText {
  min-height: 180px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}

.result-grid.single-column {
  grid-template-columns: 1fr;
}

.work-page[hidden] {
  display: none;
}

.result-field textarea {
  min-height: 420px;
}

.image-output {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.asset-output {
  border-top-style: dashed;
}

.illustration-prompt-field {
  margin-top: 0;
}

.illustration-prompt-field textarea {
  min-height: 420px;
  font-family: "Consolas", "SFMono-Regular", "Cascadia Code", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.image-actions-row {
  margin-bottom: 10px;
}

.inline-field {
  grid-template-columns: auto minmax(96px, 130px);
  align-items: center;
  gap: 8px;
}

.inline-field span {
  white-space: nowrap;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.count-pill.warn {
  background: #fff7ed;
  color: var(--accent);
  border-color: #fed7aa;
}

.count-pill.success {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: #b9eadc;
}

.count-pill.generation-progress-pill {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  height: auto;
  padding: 7px 10px;
  white-space: normal;
}

.generation-progress-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.generation-progress-item.is-running {
  color: var(--primary-strong);
  animation: progressBreath 1.15s ease-in-out infinite;
}

.generation-progress-item.is-done {
  color: var(--primary-strong);
  background: #eefaf5;
}

.generation-progress-item.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd3cf;
}

.generation-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.58;
}

.generation-progress-item.is-running .generation-progress-dot {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

@keyframes progressBreath {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 12px;
  justify-content: start;
  align-items: start;
  margin-top: 12px;
}

.image-gallery.empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
}

.generated-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fffefb;
}

.generated-image-frame,
.image-placeholder {
  display: block;
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #edf2ef;
}

.generated-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #edf2ef;
}

.asset-gallery {
  align-items: start;
}

.asset-image-frame {
  display: grid;
  place-items: center;
  height: clamp(180px, 24vw, 280px);
  aspect-ratio: auto !important;
  padding: 12px;
  background:
    linear-gradient(45deg, rgba(216, 222, 212, 0.42) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(216, 222, 212, 0.42) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(216, 222, 212, 0.42) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(216, 222, 212, 0.42) 75%),
    #edf2ef;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.asset-image-frame.is-portrait {
  height: clamp(220px, 30vw, 340px);
}

.asset-image-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 10px 28px rgba(24, 32, 24, 0.14);
}

.image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.generated-card-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.generated-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.generated-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.generated-card .image-meta {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: initial;
}

.generated-card .image-meta.success {
  color: var(--primary-strong);
  font-weight: 800;
}

.regenerate-field textarea {
  min-height: 82px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.55;
}

.image-optimize-details {
  display: grid;
  gap: 8px;
}

.image-optimize-details summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.image-optimize-details textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.generated-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.save-asset-image {
  width: 100%;
}

.generated-card-actions .button {
  flex: 1 1 120px;
}

.image-optimization-action-stack {
  display: grid;
  flex: 1 1 120px;
  gap: 8px;
}

.image-optimization-action-stack .button {
  width: 100%;
}

.button.loading svg {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.status-line.success {
  color: var(--primary-strong);
}

.status-line.error {
  color: var(--danger);
}

.status-line.loading {
  color: var(--primary-strong);
  font-weight: 700;
}

.loading-dots {
  display: inline-flex;
  width: 18px;
  margin-left: 2px;
}

.loading-dots span {
  animation: dotPulse 900ms ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.status-line.wide {
  margin: 0;
}

.export-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 18, 0.5);
  backdrop-filter: blur(3px);
}

.modal-backdrop[hidden] {
  display: none;
}

.drafts-page .modal-backdrop {
  z-index: 120;
}

.device-preview-page .modal-backdrop {
  z-index: 120;
}

.model-select-backdrop {
  z-index: 140;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(88dvh, 920px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(14, 20, 14, 0.22);
}

.modal-header {
  align-items: flex-start;
}

.style-modal-card {
  width: min(840px, 100%);
}

.model-select-modal {
  width: min(720px, 100%);
}

.model-select-list {
  display: grid;
  gap: 8px;
  max-height: min(54dvh, 520px);
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.model-select-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefb;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.model-select-option:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--surface-muted);
  transform: translateY(-1px);
}

.model-select-option.is-selected {
  border-color: rgba(15, 118, 110, 0.34);
  background: var(--primary-soft);
}

.model-select-option span {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-select-option small,
.model-select-option strong {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

/* ---------- vendor modal ---------- */

.vendor-modal-card {
  width: min(720px, 100%);
}

.vendor-modal-list {
  display: grid;
  gap: 10px;
  max-height: min(56dvh, 560px);
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.vendor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefb;
  cursor: default;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.vendor-card:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--surface-muted);
  transform: translateY(-1px);
}

.vendor-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.vendor-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.vendor-url {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  background: var(--surface-muted);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: "SF Mono", "Cascadia Code", "Menlo", monospace;
  letter-spacing: -0.01em;
}

.vendor-note {
  display: block;
  width: 100%;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.vendor-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

.vendor-card-actions .vendor-doc-link {
  color: var(--muted);
  text-decoration: none;
}

.vendor-card-actions .vendor-doc-link:hover {
  color: var(--text);
}

.vendor-card-actions .vendor-copy-button {
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--primary-strong);
}

.vendor-card-actions .vendor-copy-button:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

@media (max-width: 520px) {
  .vendor-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .vendor-card-actions {
    justify-self: flex-end;
  }
}

/* ---------- auth modal ---------- */

.auth-backdrop {
  z-index: 80;
}

.auth-card {
  width: min(460px, 100%);
}

.auth-card-header {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-card-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.auth-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.auth-method-tabs[hidden] {
  display: none;
}

.auth-method-tab {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-method-tab.is-active {
  background: linear-gradient(135deg, rgba(62, 111, 255, 0.16), rgba(139, 92, 246, 0.16));
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(62, 111, 255, 0.2);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.auth-code-row .button {
  min-width: 110px;
  min-height: 44px;
}

.auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
  align-items: center;
}

.auth-captcha-row input {
  min-height: 54px;
  text-transform: uppercase;
}

.auth-captcha-refresh {
  width: 150px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 99, 255, 0.36);
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.12), 0 12px 26px rgba(37, 99, 235, 0.16);
}

.auth-captcha-refresh img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-captcha-refresh:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.auth-actions-row {
  margin-top: 4px;
}

.admin-card {
  width: min(980px, 100%);
}

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

.admin-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  background: #fffefb;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  color: var(--muted);
  font-weight: 800;
  background: var(--surface-muted);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

body.admin-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.16), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(164, 75, 36, 0.12), transparent 28%),
    var(--bg);
}

.admin-shell {
  width: min(1240px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px);
}

body.admin-page .admin-shell {
  padding-top: 82px;
}

.admin-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(185, 196, 179, 0.84);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 247, 0.74)),
    var(--surface);
  box-shadow: var(--shadow);
}

.admin-hero::after {
  content: "";
  position: absolute;
  right: -84px;
  top: -100px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.14), transparent 66%);
  pointer-events: none;
}

.admin-hero-copy {
  position: relative;
  z-index: 1;
}

.admin-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.admin-hero-copy p:last-child {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 600;
  line-height: 1.75;
}

.admin-page-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-current-user {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-stat-card,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.admin-stat-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.admin-stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-stat-card strong {
  color: var(--text);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.admin-panel {
  margin-top: 16px;
  padding: 18px;
}

.user-hidden-model-panel {
  display: none !important;
}

.admin-auth-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.admin-auth-policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

.admin-auth-form textarea {
  min-height: 156px;
  resize: vertical;
  font-family: "Consolas", "SFMono-Regular", "Cascadia Code", monospace;
  line-height: 1.65;
}

.admin-auth-policy-note {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.74)),
    var(--surface);
  color: var(--muted);
}

.admin-auth-policy-note svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.admin-auth-policy-note strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.admin-auth-policy-note p {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.admin-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-auth-actions .status-line {
  margin: 0;
}

.admin-model-form {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.admin-model-section {
  display: grid;
  gap: 12px;
}

.admin-model-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-model-section-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.admin-model-form .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-model-select {
  width: 100%;
  margin-top: 2px;
}

.admin-model-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-announcement-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-announcement-form textarea {
  min-height: 128px;
  resize: vertical;
}

.admin-announcement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-announcement-actions .status-line {
  margin: 0;
}

.admin-announcement-list {
  margin-top: 16px;
}

.admin-announcement-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.admin-announcement-item .button {
  min-height: 34px;
}

.admin-panel-header {
  align-items: flex-start;
}

.admin-panel-header .status-line {
  max-width: 420px;
  text-align: right;
}

.admin-page .admin-table-wrap {
  background: var(--surface);
}

.admin-page .admin-table strong {
  color: var(--text);
}

.admin-empty-state {
  margin: 0;
  padding: 18px;
}

.role-badge.role-admin {
  background: rgba(164, 75, 36, 0.12);
  color: var(--accent);
}

.admin-quota-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.admin-subscription-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin-subscription-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-subscription-slider {
  position: relative;
  width: 42px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #e8ece6;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.admin-subscription-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 32, 24, 0.18);
  transition: transform 0.18s ease;
}

.admin-subscription-switch input:checked + .admin-subscription-slider {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--primary);
}

.admin-subscription-switch input:checked + .admin-subscription-slider::after {
  transform: translateX(18px);
}

.admin-subscription-switch input:disabled + .admin-subscription-slider {
  background: #f1f3ef;
  opacity: 0.65;
}

.admin-subscription-switch input:focus-visible + .admin-subscription-slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge.status-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.status-badge.status-pending {
  background: #fff3d6;
  color: #8a5a00;
}

.admin-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-action-row .button {
  min-height: 34px;
}

@media (max-width: 900px) {
  .admin-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .admin-page-actions {
    justify-content: flex-start;
  }

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

  .admin-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-panel-header .status-line {
    max-width: none;
    text-align: left;
  }

  .admin-model-form .field-grid {
    grid-template-columns: 1fr;
  }

  .admin-auth-policy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-shell {
    padding: 14px;
  }

  .admin-hero,
  .admin-panel {
    border-radius: 20px;
  }

  .admin-page-actions,
  .admin-current-user {
    width: 100%;
  }

  .admin-current-user {
    justify-content: center;
  }

  .admin-page-actions .button {
    flex: 1 1 150px;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-model-actions .button {
    width: 100%;
  }

  .admin-auth-actions .button {
    width: 100%;
  }
}

.prompt-preview-field textarea {
  min-height: 320px;
  resize: vertical;
  font-family: "Consolas", "SFMono-Regular", "Cascadia Code", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.style-groups {
  display: grid;
  gap: 14px;
}

.style-group {
  display: grid;
  gap: 10px;
}

.style-group-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.style-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.style-option {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fffefb;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.style-option:hover {
  border-color: var(--primary);
  background: #f4fbf8;
}

.style-option[aria-pressed="true"] {
  border-color: var(--primary);
  background: #e8f8f2;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.style-option-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.wechat-preview {
  position: relative;
  margin-top: 14px;
  padding: 26px 24px 32px;
  min-height: calc(100dvh - 145px);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.05) 0, rgba(15, 118, 110, 0) 92px),
    #fffefb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.wechat-preview::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.wechat-preview h1 {
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: 0;
}

.wechat-preview h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 14px;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: 0;
}

.wechat-preview h2::before {
  content: "";
  width: 8px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
  flex: 0 0 auto;
}

.wechat-preview h3 {
  margin: 24px 0 10px;
  color: var(--primary-strong);
  font-size: 17px;
  letter-spacing: 0;
}

.wechat-preview p,
.wechat-preview li {
  color: #263326;
  font-size: 16px;
  line-height: 1.85;
}

.wechat-preview p {
  margin: 12px 0;
}

.wechat-preview .lead-paragraph {
  margin: 4px 0 20px;
  padding: 14px 16px;
  border: 1px solid #d7eadf;
  border-radius: var(--radius);
  background: #f4fbf8;
  color: #1e352b;
}

.wechat-preview strong {
  padding: 0 3px;
  background: linear-gradient(transparent 58%, #ffe8b6 58%);
  color: #17251b;
  font-weight: 800;
}

.wechat-preview ul {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  list-style: none;
}

.wechat-preview li {
  position: relative;
  padding-left: 18px;
}

.wechat-preview li::before {
  content: "";
  position: absolute;
  top: 0.82em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.wechat-preview blockquote {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fff7ed;
  color: #54331f;
}

.wechat-preview figure {
  margin: 28px 0;
}

.placed-article-image {
  position: relative;
}

.preview-remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(22, 32, 24, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 254, 251, 0.92);
  color: var(--danger);
  cursor: pointer;
}

.preview-remove-image svg {
  width: 18px;
  height: 18px;
}

.preview-remove-image:hover {
  background: #fff1f0;
}

.wechat-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(24, 32, 24, 0.1);
}

.wechat-preview figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.wechat-preview code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #edf2ef;
  color: #18342f;
}

body.device-preview-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 8%, rgba(15, 118, 110, 0.14), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(164, 75, 36, 0.12), transparent 28%),
    var(--bg);
}

body.profile-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 6%, rgba(15, 118, 110, 0.15), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(164, 75, 36, 0.12), transparent 30%),
    var(--bg);
}

.profile-shell {
  width: min(1360px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 76px clamp(16px, 2.6vw, 34px) clamp(16px, 2.6vw, 34px);
}

.profile-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.profile-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.profile-hero p:last-child {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

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

.profile-actions .status-line {
  min-width: 260px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.profile-toolbar {
  justify-content: flex-end;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.page-inline-actions {
  margin-left: auto;
}

.page-inline-actions .status-line {
  min-width: min(320px, 42vw);
}

.draft-delete-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.draft-delete-toolbar .button {
  flex: 0 0 auto;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.profile-side {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.profile-tab {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.profile-tab svg {
  width: 18px;
  height: 18px;
}

.profile-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: rgba(15, 118, 110, 0.18);
}

.profile-panel {
  min-height: 540px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.draft-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.profile-section-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffefb;
}

.profile-section-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.profile-card-list {
  display: grid;
  gap: 10px;
}

.date-filter-control {
  position: relative;
}

.date-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 130;
  display: grid;
  gap: 6px;
  width: max-content;
  min-width: 178px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
}

.date-filter-menu[hidden] {
  display: none;
}

.date-filter-option {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.date-filter-option:hover,
.date-filter-option.is-active {
  border-color: rgba(15, 118, 110, 0.24);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.profile-section-card > .profile-card-list,
.profile-section-card > .workspace-draft-grid,
.draft-page-panel .profile-section-card,
.profile-panel > .profile-asset-grid {
  max-height: min(62dvh, 620px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.workspace-draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.workspace-draft-card {
  display: grid;
  gap: 12px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.07), transparent 58%),
    #fffefb;
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 26px rgba(24, 32, 24, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workspace-draft-card:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
}

.workspace-draft-select-card {
  cursor: pointer;
}

.workspace-draft-select-card.is-selected {
  border-color: rgba(180, 35, 24, 0.38);
  background:
    linear-gradient(135deg, rgba(180, 35, 24, 0.08), transparent 58%),
    #fffefb;
  box-shadow: 0 16px 32px rgba(180, 35, 24, 0.1);
}

.draft-card-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
}

.draft-card-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--danger);
}

.workspace-draft-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.workspace-draft-card time {
  align-self: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-draft-card,
.profile-info-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
}

.profile-draft-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.profile-draft-card.is-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-draft-card.is-clickable:hover,
.profile-draft-card.is-clickable:focus-visible {
  border-color: rgba(15, 118, 110, 0.28);
  background: #fffefb;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.profile-draft-card h4,
.profile-asset-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.profile-draft-card p,
.profile-asset-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
}

.profile-draft-card small,
.profile-asset-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.profile-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-asset-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
}

.profile-asset-tab {
  flex: 1 1 120px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.profile-asset-tab:hover,
.profile-asset-tab.is-active {
  border-color: rgba(15, 118, 110, 0.28);
  background: #fffefb;
  color: var(--primary-strong);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.1);
}

.profile-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.profile-asset-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffefb;
}

.profile-asset-frame {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(216, 222, 212, 0.42) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(216, 222, 212, 0.42) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(216, 222, 212, 0.42) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(216, 222, 212, 0.42) 75%),
    #edf2ef;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.profile-asset-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-asset-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.profile-info-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-info-card strong {
  font-size: 24px;
  line-height: 1.15;
}

.profile-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.draft-delete-modal {
  width: min(520px, 100%);
}

.asset-save-modal {
  width: min(520px, 100%);
}

.draft-delete-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.device-preview-shell {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 76px clamp(16px, 2.6vw, 34px) clamp(16px, 2.6vw, 34px);
}

.device-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.device-preview-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.device-preview-header p:last-child {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.device-preview-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-preview-actions .status-line {
  min-width: 260px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.device-preview-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(460px, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 0;
}

.device-preview-meta {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.preview-meta-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.preview-meta-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-meta-card strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.preview-meta-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.preview-meta-card p.success {
  color: var(--primary-strong);
}

.preview-meta-card p.error {
  color: var(--danger);
}

.preview-meta-card p.loading {
  color: var(--accent);
}

.preview-platform-card {
  gap: 12px;
}

.preview-platform-tabs {
  width: 100%;
}

.preview-platform-tabs .platform-tab {
  flex: 1;
}

.preview-asset-panel {
  gap: 14px;
}

.preview-asset-tools-card {
  gap: 12px;
}

.preview-asset-tabs {
  width: 100%;
}

.preview-asset-tab small {
  margin-left: auto;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.68;
}

.preview-asset-apply-button {
  width: 100%;
}

.preview-asset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.preview-asset-actions .button {
  min-width: 0;
}

.preview-asset-group {
  display: grid;
  gap: 8px;
}

.preview-asset-group[hidden],
.preview-asset-actions .button[hidden] {
  display: none;
}

.preview-asset-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.preview-asset-list,
.preview-asset-modal-list,
.preview-applied-list,
.preview-sticker-list {
  display: grid;
  gap: 8px;
  max-height: 245px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.preview-sticker-list {
  max-height: 220px;
  overflow-x: hidden;
}

.preview-asset-modal {
  width: min(840px, 100%);
}

.preview-asset-modal-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: min(64dvh, 640px);
  margin-top: 16px;
  padding: 2px 4px 2px 0;
}

.preview-asset-modal-list > .profile-empty {
  grid-column: 1 / -1;
}

.preview-asset-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefb;
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.preview-asset-option:hover,
.preview-asset-option.is-active {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.preview-asset-option img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(216, 222, 212, 0.5) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(216, 222, 212, 0.5) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(216, 222, 212, 0.5) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(216, 222, 212, 0.5) 75%),
    #f7f9f6;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

.preview-asset-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.preview-asset-option strong,
.preview-sticker-row strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-asset-option small,
.preview-sticker-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-sticker-row {
  min-width: 0;
}

.preview-applied-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
}

.preview-content-position {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-content-position select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffefb;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.preview-applied-row > .button {
  justify-self: start;
}

.preview-applied-row strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-applied-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-tone-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.preview-tone-actions .button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.preview-sticker-row.is-active {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--primary-soft);
}

.preview-sticker-row-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.preview-sticker-row-actions .button {
  flex: 1 1 72px;
  min-width: 0;
  min-height: 32px;
}

.device-stage {
  display: grid;
  justify-items: center;
  min-height: calc(100dvh - 168px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.06), transparent 42%),
    rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone-scale-frame {
  --device-scale: 1;
  --device-scaled-height: 884px;
  width: calc(430px * var(--device-scale));
  height: var(--device-scaled-height);
}

.phone-device {
  position: relative;
  width: 430px;
  height: 884px;
  padding: 20px;
  border: 1px solid rgba(22, 32, 24, 0.18);
  border-radius: 58px;
  background:
    linear-gradient(145deg, #222b26, #0d120f 42%, #2e3832);
  box-shadow:
    0 34px 80px rgba(24, 32, 24, 0.26),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  transform: scale(var(--device-scale));
  transform-origin: top left;
}

.phone-screen {
  position: relative;
  display: grid;
  grid-template-rows: 44px 50px minmax(0, 1fr) 24px;
  width: 390px;
  height: 844px;
  overflow: hidden;
  border-radius: 40px;
  background: #fffefb;
}

.phone-screen::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 50%;
  width: 118px;
  height: 30px;
  border-radius: 999px;
  background: #0a0d0b;
  transform: translateX(-50%);
}

.phone-hardware-button {
  position: absolute;
  width: 4px;
  border-radius: 999px;
  background: #1d241f;
}

.phone-hardware-button-left {
  left: -3px;
  top: 150px;
  height: 94px;
}

.phone-hardware-button-right {
  right: -3px;
  top: 190px;
  height: 120px;
}

.phone-status-bar,
.phone-nav-bar,
.phone-home-indicator {
  position: relative;
  z-index: 2;
  background: rgba(255, 254, 251, 0.94);
}

.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #111812;
  font-size: 13px;
  font-weight: 900;
}

.phone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.phone-status-icons svg {
  width: 15px;
  height: 15px;
}

.phone-nav-bar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  border-bottom: 1px solid rgba(216, 222, 212, 0.82);
}

.phone-nav-bar strong {
  overflow: hidden;
  color: #162018;
  font-size: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-nav-back,
.phone-nav-menu {
  color: var(--muted);
  font-size: 28px;
  font-weight: 500;
  text-align: center;
}

.phone-nav-menu {
  font-size: 16px;
  letter-spacing: 1px;
}

.phone-content-scroll {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: #fffefb;
}

.phone-content-scroll.preview-base-light {
  background: #fffefb;
}

.phone-content-scroll.preview-base-dark {
  background: #141815;
}

.phone-content-scroll.preview-base-dark .phone-article,
.phone-content-scroll.preview-base-dark .wechat-preview {
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.1) 0, rgba(45, 212, 191, 0) 96px),
    #141815;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8faf7;
}

.phone-content-scroll.preview-base-dark.has-preview-background .phone-article,
.phone-content-scroll.preview-base-dark.has-preview-background .wechat-preview {
  background: transparent !important;
}

.phone-content-scroll.preview-base-dark .wechat-preview h1,
.phone-content-scroll.preview-base-dark .wechat-preview h2,
.phone-content-scroll.preview-base-dark .wechat-preview h3 {
  color: #f8faf7;
}

.phone-content-scroll.preview-base-dark .wechat-preview h1 {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.phone-content-scroll.preview-base-dark .phone-article p,
.phone-content-scroll.preview-base-dark .phone-article li,
.phone-content-scroll.preview-base-dark .phone-article figcaption {
  color: rgba(248, 250, 247, 0.84);
}

.phone-content-scroll.preview-base-dark .wechat-preview .lead-paragraph,
.phone-content-scroll.preview-base-dark .wechat-preview ul,
.phone-content-scroll.preview-base-dark .wechat-preview blockquote,
.phone-content-scroll.preview-base-dark .wechat-preview code {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 247, 0.9);
}

.phone-content-scroll.preview-base-dark .wechat-preview strong {
  background: linear-gradient(transparent 58%, rgba(45, 212, 191, 0.3) 58%);
  color: #ffffff;
}

.preview-background-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: none;
  width: 100%;
  height: var(--preview-background-layer-height, 100%);
  min-height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.phone-content-scroll.has-preview-background .preview-background-layer {
  display: block;
}

.phone-content-scroll.is-adjusting-background .phone-article {
  pointer-events: none;
  user-select: none;
}

.preview-background-layer.is-editing {
  pointer-events: auto;
}

.preview-background-item {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bg-w, 390px);
  height: var(--bg-h, 566px);
  cursor: grab;
  touch-action: none;
  transform: translate3d(var(--bg-x, 0), var(--bg-y, 0), 0);
}

.preview-background-item.is-locked {
  cursor: default;
}

.preview-background-item.is-dragging {
  cursor: grabbing;
}

.preview-background-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(0.98);
  pointer-events: none;
}

.preview-background-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.18), rgba(255, 254, 251, 0.02) 44%, rgba(255, 254, 251, 0.14));
  pointer-events: none;
}

.phone-content-scroll.has-preview-background .phone-article,
.wechat-preview.has-preview-background {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.26);
}

.phone-content-scroll::-webkit-scrollbar {
  width: 6px;
}

.phone-content-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(99, 112, 98, 0.26);
}

.phone-home-indicator {
  display: grid;
  place-items: center;
}

.phone-home-indicator::before {
  content: "";
  width: 132px;
  height: 5px;
  border-radius: 999px;
  background: #111812;
}

.phone-article {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 22px 22px 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.preview-sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}

.preview-sticker {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--w, 118px);
  height: var(--h, 118px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 12px 18px rgba(24, 32, 24, 0.18));
  pointer-events: auto;
  touch-action: none;
  transform: translate3d(var(--x, 0), var(--y, 0), 0);
  transition: border-color 120ms ease, filter 120ms ease;
  cursor: grab;
}

.preview-sticker.is-locked {
  cursor: default;
}

.preview-sticker:hover,
.preview-sticker.is-selected {
  filter: drop-shadow(0 14px 24px rgba(15, 118, 110, 0.22));
}

.preview-sticker.is-dragging {
  cursor: grabbing;
}

.preview-sticker img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.preview-resize-edge {
  position: absolute;
  z-index: 2;
  display: none;
  background: transparent;
  pointer-events: auto;
}

.preview-resize-edge.is-top,
.preview-resize-edge.is-bottom {
  left: 0;
  width: 100%;
  height: 12px;
  cursor: ns-resize;
}

.preview-resize-edge.is-top {
  top: -6px;
}

.preview-resize-edge.is-bottom {
  bottom: -6px;
}

.preview-resize-edge.is-left,
.preview-resize-edge.is-right {
  top: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
}

.preview-resize-edge.is-left {
  left: -6px;
}

.preview-resize-edge.is-right {
  right: -6px;
}

.preview-background-item.is-editing .preview-resize-edge,
.preview-sticker.is-editing.is-selected .preview-resize-edge,
.preview-sticker.is-editing:hover .preview-resize-edge {
  display: block;
}

.phone-article::before {
  width: 38px;
  height: 3px;
  margin-bottom: 16px;
}

.phone-article h1 {
  font-size: 25px;
  line-height: 1.34;
}

.phone-article h2 {
  font-size: 20px;
}

.phone-article h3 {
  font-size: 17px;
}

.phone-article p,
.phone-article li {
  font-size: 16px;
  line-height: 1.85;
}

.phone-article img {
  height: auto;
  object-fit: contain;
}

body[data-preview-platform="xiaohongshu"] .phone-screen {
  grid-template-rows: 44px minmax(0, 1fr) 24px;
}

body[data-preview-platform="xiaohongshu"] .phone-nav-bar {
  display: none;
}

.xhs-preview-root {
  position: relative;
  z-index: 1;
  min-height: 100%;
  background: #ffffff;
  color: #172033;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.xhs-preview-reference {
  display: none;
}

.xhs-preview-switch {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #f0f0f0;
}

.xhs-preview-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f5;
  color: #777;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.xhs-preview-switch button.is-active {
  background: #172033;
  color: #fff;
}

.xhs-note-preview {
  min-height: calc(100% - 51px);
  padding-bottom: 68px;
  background: #fff;
}

.xhs-author-bar {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 58px 28px;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f2f2f2;
}

.xhs-avatar,
.xhs-mini-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #d8e5ff, #f3d4ff);
  color: #2b5fb8;
  font-size: 13px;
  font-weight: 900;
}

.xhs-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e5e5;
}

.xhs-avatar.small {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.xhs-author-bar strong {
  overflow: hidden;
  color: #121212;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-author-bar button {
  min-height: 28px;
  border: 1px solid #ff2b54;
  border-radius: 999px;
  background: #fff;
  color: #ff2b54;
  font-size: 12px;
  font-weight: 900;
}

.xhs-share {
  color: #313846;
  font-size: 20px;
  text-align: center;
}

.xhs-note-media {
  position: relative;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
  background: #ededed;
}

.xhs-note-media-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.xhs-note-media-track::-webkit-scrollbar {
  display: none;
}

.xhs-note-media-track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}

.xhs-note-slide {
  display: grid;
  flex: 0 0 100%;
  min-height: 248px;
  max-height: 292px;
  place-items: center;
  scroll-snap-align: start;
  background: #f4f4f4;
}

.xhs-note-media img {
  display: block;
  width: 100%;
  max-height: 292px;
  object-fit: contain;
  background: #f4f4f4;
  pointer-events: none;
  user-select: none;
}

.xhs-note-media-count,
.xhs-note-media-hint {
  position: absolute;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.58);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.xhs-note-media-count {
  top: 10px;
  padding: 4px 8px;
}

.xhs-note-media-hint {
  bottom: 10px;
  padding: 5px 9px;
}

.xhs-media-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  place-items: center;
  background: rgba(18, 18, 18, 0.46);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.xhs-media-nav:hover {
  background: rgba(18, 18, 18, 0.66);
}

.xhs-media-prev {
  left: 10px;
}

.xhs-media-next {
  right: 10px;
}

.preview-asset-tab.is-disabled,
.preview-asset-tab:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.xhs-media-placeholder,
.xhs-cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 190px;
  background: #e9e9e9;
  color: #999;
  font-size: 13px;
  font-weight: 800;
}

.xhs-note-body {
  padding: 16px 18px 0;
}

.xhs-note-body h1 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 950;
}

.xhs-note-body p {
  margin: 0 0 12px;
  color: #25324a;
  font-size: 15px;
  line-height: 1.78;
}

.xhs-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: #244e8f;
}

.xhs-tags span {
  color: #244e8f;
  font-weight: 800;
}

.xhs-note-body small {
  color: #9ba4b3;
  font-size: 12px;
}

.xhs-comment-box {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 28px 18px 0;
}

.xhs-comment-box span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f3f5;
  color: #b0b0b0;
  font-size: 12px;
}

.xhs-action-bar {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-top: 1px solid #f0f0f0;
  background: rgba(255, 255, 255, 0.96);
}

.xhs-action-bar span {
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f4f4;
  color: #999;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-action-bar strong {
  color: #222;
  font-size: 12px;
  white-space: nowrap;
}

.xhs-cover-preview {
  position: relative;
  min-height: calc(100% - 51px);
  padding-bottom: 62px;
  background: #fff;
}

.xhs-discovery-head {
  position: sticky;
  top: 51px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #f2f2f2;
}

.xhs-top-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: #3a3a3a;
  font-size: 20px;
}

.xhs-top-row nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: #999;
  font-size: 14px;
}

.xhs-top-row nav strong {
  position: relative;
  color: #111;
}

.xhs-top-row nav strong::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ff2b54;
  transform: translateX(-50%);
}

.xhs-channel-row {
  display: flex;
  gap: 17px;
  overflow: hidden;
  padding: 8px 14px 10px;
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

.xhs-channel-row strong {
  color: #111;
}

.xhs-feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 7px 14px;
}

.xhs-feed-card {
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
}

.xhs-feed-card img,
.xhs-cover-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.9;
  object-fit: cover;
  background: #e9e9e9;
}

.xhs-cover-placeholder.tall {
  aspect-ratio: 1 / 1.35;
}

.xhs-cover-placeholder.short {
  aspect-ratio: 1 / 0.46;
}

.xhs-feed-card h3 {
  display: -webkit-box;
  margin: 7px 8px 5px;
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.xhs-feed-card p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 8px 12px;
  color: #8b93a1;
  font-size: 11px;
}

.xhs-feed-card p small {
  margin-left: auto;
  color: #7b8290;
}

.xhs-mini-avatar {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.xhs-bottom-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 54px;
  padding-bottom: 4px;
  border-top: 1px solid #f2f2f2;
  background: rgba(255, 255, 255, 0.98);
  color: #787878;
  font-size: 12px;
  text-align: center;
}

.xhs-bottom-tabs strong {
  color: #222;
  font-size: 14px;
}

.xhs-bottom-tabs b {
  justify-self: center;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 8px;
  background: #ff2b54;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.chat-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.14), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(164, 75, 36, 0.12), transparent 30%),
    var(--bg);
}

.chat-page .floating-main-nav {
  position: absolute;
}

.chat-shell {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 76px clamp(16px, 2.6vw, 34px) clamp(16px, 2.6vw, 34px);
}

.chat-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(24, 32, 24, 0.07);
  backdrop-filter: none;
}

.chat-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.chat-hero p:last-child {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.chat-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-hero-actions .status-line {
  min-width: 280px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.chat-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 0;
}

.chat-sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  height: calc(100dvh - 112px);
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.07);
}

.chat-side-card,
.chat-main-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.07);
  backdrop-filter: none;
}

.chat-side-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.chat-sidebar .chat-side-card {
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.chat-new-session-card {
  padding: 0;
}

.chat-new-session-button {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
}

.chat-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-side-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffefb;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.chat-mode-tab:hover {
  transform: none;
}

.chat-mode-tab.is-active {
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chat-mode-tab svg {
  width: 18px;
  height: 18px;
}

.chat-side-actions {
  display: grid;
  gap: 8px;
}

.chat-history-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.chat-session-list {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.chat-session-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.chat-session-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
  border-radius: 14px;
}

.chat-session-row:hover,
.chat-session-row.is-menu-open {
  background: var(--surface-muted);
}

.chat-session-row:has(.chat-session-item.is-active) {
  background: var(--primary-soft);
}

.chat-session-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.chat-page .button:hover,
.chat-page .icon-button:hover {
  transform: none;
}

.chat-session-item:hover,
.chat-session-item.is-active {
  border-color: transparent;
  background: transparent;
  color: var(--primary-strong);
}

.chat-session-more {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
}

.chat-session-row:hover .chat-session-more,
.chat-session-row.is-menu-open .chat-session-more {
  opacity: 1;
}

.chat-session-more:hover {
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-strong);
}

.chat-session-more svg {
  width: 17px;
  height: 17px;
}

.chat-session-item strong,
.chat-session-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-session-item strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1.3;
}

.chat-session-item strong svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.chat-session-item span {
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.72;
}

.chat-session-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 4px;
  width: 136px;
  padding: 6px;
  border: 1px solid rgba(24, 32, 24, 0.08);
  border-radius: 12px;
  background: rgba(48, 51, 55, 0.98);
  box-shadow: 0 14px 34px rgba(24, 32, 24, 0.22);
  transform-origin: top right;
}

.chat-session-menu.is-above {
  transform-origin: bottom right;
}

.chat-session-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f3f4f6;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.chat-session-menu button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.chat-session-menu button.danger {
  color: #ff6b6b;
}

.chat-session-menu svg {
  width: 16px;
  height: 16px;
}

.chat-config-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fffefb;
}

.chat-config-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-config-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-main-panel {
  display: flex;
  min-height: calc(100dvh - 112px);
  max-height: calc(100dvh - 112px);
  overflow: hidden;
  flex-direction: column;
}

.chat-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 254, 251, 0.76);
}

.chat-thread-header div {
  display: grid;
  gap: 4px;
}

.chat-thread-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-thread-header strong {
  max-width: min(56vw, 560px);
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-header p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-align: right;
}

.chat-thread-status {
  justify-items: end;
}

.chat-thread-status .status-line {
  max-width: min(420px, 42vw);
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 12px;
  text-align: right;
}

.chat-message-list {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  padding: clamp(16px, 2vw, 24px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 0 0, rgba(15, 118, 110, 0.08), transparent 24%),
    #f9faf6;
  scrollbar-width: thin;
}

.chat-empty-state {
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 14px;
  width: min(720px, 100%);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
  box-shadow: 0 18px 42px rgba(24, 32, 24, 0.07);
}

.chat-empty-icon {
  justify-self: center;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chat-empty-icon svg {
  width: 24px;
  height: 24px;
}

.chat-empty-state h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.chat-empty-state p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
}

.chat-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.chat-suggestion-grid button {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffefb;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}

.chat-suggestion-grid button:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chat-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  contain: layout paint;
}

.chat-message.is-user {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.chat-message.is-user .chat-message-avatar {
  order: 2;
}

.chat-message.is-user .chat-message-body {
  order: 1;
  justify-self: end;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chat-message.is-user .chat-message-meta,
.chat-message.is-user .chat-message-content {
  color: #fff;
}

.chat-message-avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefb;
  color: var(--primary-strong);
}

.chat-message-avatar svg {
  width: 19px;
  height: 19px;
}

.chat-message-body {
  display: grid;
  gap: 9px;
  max-width: min(860px, 100%);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 254, 251, 0.95);
}

.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-message-content {
  color: var(--text);
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: transparent;
  -webkit-user-select: text;
  user-select: text;
}

.chat-message-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
}

.chat-message-action {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.chat-message-action:hover {
  border-color: rgba(15, 118, 110, 0.18);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chat-message-action svg {
  width: 16px;
  height: 16px;
}

.chat-generating-line,
.chat-error-text {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.chat-generating-line {
  color: var(--accent);
}

.chat-error-text {
  color: var(--danger);
}

.chat-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
  gap: 12px;
}

.chat-image-result {
  display: grid;
  gap: 10px;
  margin: 0;
}

.chat-image-frame {
  display: grid;
  place-items: center;
  width: 100%;
  max-height: 360px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  aspect-ratio: var(--chat-image-ratio, 1 / 1);
  background: #edf2ef;
}

.chat-image-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.chat-image-result figcaption {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.chat-image-result figcaption span {
  color: var(--text);
  font-weight: 900;
}

.chat-image-result figcaption p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.chat-image-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
}

.chat-image-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chat-image-options[hidden] {
  display: none;
}

.chat-image-options label {
  display: grid;
  gap: 6px;
}

.chat-image-options label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-config-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: center;
}

.chat-config-inline .chat-config-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.chat-config-inline .chat-config-row span {
  white-space: nowrap;
}

.chat-config-refresh {
  min-height: 38px;
  border-radius: 999px;
}

.chat-config-status-inline {
  margin-top: 0;
}

.chat-composer textarea {
  width: 100%;
  min-height: 46px;
  max-height: 180px;
  resize: none;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffefb;
  color: var(--text);
  line-height: 1.55;
}

.chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.chat-composer-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

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

.chat-send-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.chat-send-button:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.chat-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.chat-send-button.is-running {
  border-color: var(--border-strong);
  background: #fffefb;
  color: var(--text);
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.6;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #162018;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

/* ---------- batch page ---------- */

.batch-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.12), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(164, 75, 36, 0.10), transparent 30%),
    var(--bg);
}

.batch-page .floating-main-nav {
  position: absolute;
}

.batch-shell {
  width: min(1440px, 100%);
  min-height: calc(100dvh - 60px);
  margin: 0 auto;
  padding: 76px clamp(16px, 2.6vw, 34px) clamp(16px, 2.6vw, 34px);
}

/* ── workspace layout ── */

.batch-workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
  min-height: calc(100dvh - 160px);
}

/* 3-column when reference panel is active */
.batch-workspace.has-refs {
  grid-template-columns: 380px 240px 1fr;
}

/* ── left sidebar ── */

.batch-sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100dvh - 120px);
  overflow: hidden;
}

.batch-side-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.batch-side-card.batch-multi-panel,
.batch-side-card.batch-single-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100px;
  overflow: hidden;
}

.batch-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 0;
}

.batch-side-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── gen type tabs ── */

.batch-gen-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
}

.batch-gen-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.batch-gen-tab:hover {
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--text);
}

.batch-gen-tab.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.batch-gen-hint {
  margin: 0;
  padding: 4px 14px 12px;
  font-size: 11px;
  color: var(--muted);
}

/* ── mode tabs ── */

.batch-mode-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
}

.batch-mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.batch-mode-tab:hover {
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--text);
}

.batch-mode-tab.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

/* shared mode options */
.batch-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px 14px;
}

.batch-mode-options .field {
  display: grid;
  gap: 4px;
}

.batch-mode-options .field span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.batch-mode-options select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

/* single prompt panel */
.batch-single-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.batch-single-body .field {
  display: grid;
  gap: 4px;
}

.batch-single-body .field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.batch-single-body textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffefb;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 160ms ease;
}

.batch-single-body textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.34);
}

.batch-single-body select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.batch-prompt-list {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 60px;
  overflow-y: auto;
  padding: 0 14px 14px;
  scrollbar-width: thin;
}

.batch-side-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.batch-run-button { flex: 1; }

#singlePromptCount {
  max-width: 120px;
}

/* ── prompt card ── */

.batch-prompt-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefb;
  transition: border-color 160ms ease, background 160ms ease;
}

.batch-prompt-card:hover { border-color: rgba(15, 118, 110, 0.22); }

.batch-prompt-card.is-running {
  border-color: rgba(15, 118, 110, 0.34);
  background: var(--primary-soft);
}

.batch-prompt-card.is-error {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--danger-soft);
}

.batch-prompt-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.batch-prompt-card.is-running .batch-prompt-index { background: var(--primary); color: #fff; }
.batch-prompt-card.is-error .batch-prompt-index { background: var(--danger); color: #fff; }

.batch-prompt-body { display: grid; gap: 6px; min-width: 0; }

.batch-prompt-input {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  transition: border-color 160ms ease, background 160ms ease;
}

.batch-prompt-input:focus { outline: none; border-color: rgba(15, 118, 110, 0.28); background: var(--surface); }
.batch-prompt-input:disabled { opacity: 0.6; }

.batch-prompt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.batch-prompt-status { font-size: 11px; font-weight: 700; }
.batch-prompt-status.running { color: var(--primary-strong); }
.batch-prompt-status.done { color: var(--primary-strong); }
.batch-prompt-status.error { color: var(--danger); }

.batch-prompt-remove { flex-shrink: 0; color: var(--muted); padding: 2px 4px; }
.batch-prompt-remove:hover { color: var(--danger); }

.batch-prompt-char-count {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

/* ── middle column: reference images ── */

.batch-ref-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 120px);
  grid-template-rows: auto 1fr;
}

.batch-ref-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.batch-ref-header span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.batch-ref-header strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}

.batch-ref-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

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

.batch-ref-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 10px;
  min-height: 140px;
}

.batch-ref-list.empty {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  place-items: center;
}

.batch-ref-empty-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.batch-ref-empty-upload svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.batch-ref-empty-upload:hover {
  border-color: rgba(15, 118, 110, 0.36);
  background: #e8f4ef;
  transform: translateY(-1px);
}

.ref-image-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.ref-image-preview {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.ref-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.ref-image-preview:hover img {
  filter: saturate(1.04);
  transform: scale(1.025);
}

.ref-image-preview:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.32);
  outline-offset: -3px;
}

.ref-image-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 4px 6px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.ref-image-card:hover .ref-image-overlay { opacity: 1; }

.ref-image-name {
  grid-row: 2;
  font-size: 10px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ref-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.ref-image-remove:hover { background: var(--danger); }

/* ── right panel: results ── */

.batch-result-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  max-height: calc(100dvh - 120px);
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.batch-result-panel.batch-result-with-refs {
  max-height: calc(100dvh - 120px);
}

/* Override [hidden] for panels that have explicit display set */
.batch-ref-panel[hidden],
.batch-result-panel[hidden],
.batch-side-card[hidden] {
  display: none;
}

.batch-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.batch-result-header span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.batch-result-header strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: var(--text);
}

.batch-result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
  min-height: 200px;
}

.batch-result-grid.empty {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 260px;
  place-items: center;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: rgba(248, 250, 247, 0.6);
}

.batch-result-grid.empty.has-error {
  border-color: rgba(180, 35, 24, 0.32);
  background: var(--danger-soft);
}

.batch-error-text {
  color: var(--danger) !important;
  font-weight: 700 !important;
  max-width: 480px;
  text-align: center;
  line-height: 1.5;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.batch-result-card {
  display: grid;
  grid-template-rows: auto auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.batch-result-card:hover {
  border-color: rgba(15, 118, 110, 0.28);
  transform: translateY(-1px);
}

.batch-result-image-wrap {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface-muted);
  cursor: zoom-in;
  overflow: hidden;
}

.batch-result-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-muted);
  transition: transform 180ms ease, filter 180ms ease;
}

.batch-result-image-wrap:hover .batch-result-image {
  filter: saturate(1.04);
  transform: scale(1.015);
}

.batch-result-image-wrap:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.32);
  outline-offset: -3px;
}

.batch-result-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.batch-result-card-actions .batch-result-save {
  grid-column: 1 / -1;
}

.batch-result-card-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  gap: 5px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.1;
}

.batch-result-card-actions .button svg {
  width: 15px;
  height: 15px;
}

.batch-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  --batch-preview-gap: clamp(32px, 6dvh, 72px);
  display: block;
  padding: var(--batch-preview-gap) clamp(18px, 4vw, 48px);
  overflow: auto;
  background: rgba(9, 18, 16, 0.88);
  backdrop-filter: blur(12px);
}

.batch-preview-modal[hidden] {
  display: none;
}

.batch-preview-stage {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - (var(--batch-preview-gap) * 2));
  width: 100%;
  padding-bottom: var(--batch-preview-gap);
  cursor: zoom-out;
}

.batch-preview-image {
  display: block;
  max-width: min(100%, 1440px);
  max-height: calc(100dvh - (var(--batch-preview-gap) * 2));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  background: rgba(255, 255, 255, 0.04);
}

.batch-preview-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.batch-preview-close:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.batch-preview-close:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.38);
  outline-offset: 3px;
}

.batch-preview-close svg {
  width: 22px;
  height: 22px;
}

/* ── progress bar ── */

.batch-progress-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.batch-progress-track {
  flex: 1;
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #dfe8e2;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(22, 32, 24, 0.12);
}

.batch-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 420ms ease;
  box-shadow: 0 0 18px rgba(15, 118, 110, 0.28);
}

.batch-progress-bar.is-running .batch-progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.62) 45%, transparent 58% 100%);
  transform: translateX(-100%);
  animation: batch-progress-sheen 1.15s linear infinite;
}

@keyframes batch-progress-sheen {
  to {
    transform: translateX(100%);
  }
}

.batch-progress-bar.is-error .batch-progress-fill {
  background: var(--danger);
  box-shadow: 0 0 14px rgba(180, 35, 24, 0.22);
}

.batch-progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  min-width: 48px;
  text-align: right;
}
@media (max-width: 1280px) {
  .landing-grid {
    grid-template-columns: minmax(300px, 0.78fr) minmax(620px, 1.22fr);
  }

  .landing-shell {
    min-height: auto;
  }

  .landing-title-card,
  .landing-mock-card {
    min-height: auto;
  }

  .landing-title {
    font-size: clamp(44px, 6vw, 86px);
  }

  .mock-window {
    grid-template-columns: minmax(108px, 124px) minmax(0, 1fr) minmax(150px, 180px);
  }

  .mock-insights {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .intro-hero {
    grid-template-columns: 1fr;
  }

  .intro-hero-copy,
  .intro-hero-card {
    min-height: auto;
  }

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

  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .preview-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }

  .wechat-preview {
    min-height: 360px;
  }

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

  .device-preview-meta {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .mock-window {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .mock-menu {
    gap: 6px;
    padding: 12px;
  }

  .mock-menu-item {
    padding-inline: 8px;
  }

  .mock-insights {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock-score-card strong {
    width: 82px;
    height: 82px;
    font-size: 26px;
  }

  .chat-workspace {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    overflow: visible;
  }

  .chat-history-card {
    grid-column: 1 / -1;
    min-height: 360px;
  }

  .chat-main-panel {
    min-height: 720px;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 14px;
  }

  .landing-shell {
    padding: 14px;
  }

  .landing-title-card,
  .landing-mock-card {
    border-radius: 24px;
  }

  .landing-title-card {
    padding: 28px 20px;
  }

  .landing-title {
    font-size: clamp(42px, 14vw, 72px);
  }

  .landing-title-actions {
    grid-template-columns: 1fr;
  }

  .landing-start-button {
    width: 100%;
  }

  .mock-window {
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 22px;
  }

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

  .mock-logo {
    grid-column: 1 / -1;
  }

  .mock-insights {
    grid-template-columns: 1fr;
  }

  .mock-result-card {
    min-height: 180px;
  }

  .landing-footer {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .intro-shell {
    padding: 14px;
  }

  .intro-nav,
  .intro-section-heading,
  .intro-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-nav-actions,
  .intro-actions {
    width: 100%;
  }

  .intro-nav-actions .button,
  .intro-actions .button,
  .intro-cta .button {
    flex: 1 1 180px;
  }

  .device-preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-hero-actions {
    justify-content: flex-start;
  }

  .chat-hero-actions .status-line {
    min-width: 0;
    width: 100%;
  }

  .chat-sidebar {
    grid-template-columns: 1fr;
  }

  .chat-history-card {
    grid-column: auto;
  }

  .chat-thread-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-thread-header p {
    max-width: none;
    text-align: left;
  }

  .device-preview-actions {
    justify-content: flex-start;
  }

  .device-preview-actions .status-line {
    min-width: 0;
    width: 100%;
  }

  .device-preview-meta {
    grid-template-columns: 1fr;
  }

  .floating-main-nav {
    top: 8px;
    width: calc(100vw - 18px);
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 18px;
  }

  body.workspace-active .app-shell .floating-main-nav {
    width: calc(100vw - 28px);
    justify-content: flex-start;
    overflow-x: auto;
  }

  .floating-nav-link {
    flex: 1 0 auto;
    min-width: 92px;
    padding-inline: 10px;
  }

  .profile-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-actions {
    justify-content: flex-start;
  }

  .profile-actions .status-line {
    min-width: 0;
    width: 100%;
  }

  .profile-layout,
  .draft-platform-grid {
    grid-template-columns: 1fr;
  }

  .profile-side {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-tab {
    justify-content: center;
  }

  .intro-hero {
    padding-top: 22px;
  }

  .intro-hero-copy,
  .intro-hero-card,
  .intro-cta {
    border-radius: 20px;
  }

  .intro-hero-copy {
    padding: 28px 22px;
  }

  .intro-hero h1 {
    font-size: clamp(42px, 16vw, 72px);
  }

  .intro-feature-grid {
    grid-template-columns: 1fr;
  }

  .workflow-bar {
    padding: 12px 14px;
  }

  .topbar,
  .editor-toolbar,
  .output-header,
  .export-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-title-block,
  body.workspace-active .topbar-title-block {
    position: static;
    width: auto;
    min-width: 0;
    min-height: 0;
    text-align: left;
    transform: none;
  }

  body.workspace-active .topbar-title-block > h1,
  body.workspace-active .topbar-title-block > .eyebrow {
    position: static;
    width: auto;
    text-align: left;
    transform: none;
  }

  .workspace,
  .result-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .asset-studio-panel,
  .draft-library-panel {
    grid-column: auto;
  }

  .settings-panel,
  .editor-panel,
  .preview-panel {
    position: static;
    max-height: none;
  }

  .topbar-actions,
  .editor-actions,
  .export-actions,
  .image-controls {
    width: 100%;
  }

  .topbar-actions {
    margin-left: 0;
  }

  body.workspace-active .topbar-actions {
    position: static;
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-actions .button,
  .editor-actions .button,
  .export-actions .button,
  .image-controls .button {
    flex: 1 1 150px;
  }

  .auth-actions {
    width: 100%;
  }

  .auth-user-label {
    flex: 1 1 100%;
    max-width: none;
  }

  .global-user-badge {
    top: 8px;
    right: 9px;
    max-width: calc(100vw - 18px);
    border-radius: 18px;
  }

  body.batch-page .global-user-badge,
  body.chat-page .global-user-badge,
  body.device-preview-page .global-user-badge,
  body.ppt-page .global-user-badge,
  body.workspace-active .global-user-badge {
    top: 64px;
  }

  .global-user-chip {
    flex: 1 1 auto;
  }

  .global-account-admin-link {
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .editor-action-row {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-group {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-group-label {
    min-width: 0;
  }

  .platform-tabs {
    width: 100%;
  }

  .platform-tab,
  .page-tab,
  .generation-route-tab,
  .asset-type-tab {
    flex: 1;
  }

  .page-tabs,
  .generation-route-tabs,
  .asset-type-tabs {
    width: 100%;
  }

  .count-pill {
    justify-content: center;
    width: 100%;
  }

  .inline-field {
    grid-template-columns: 1fr;
    flex: 1 1 150px;
  }

  .field-header-row {
    align-items: stretch;
    flex-direction: column;
  }

  .field-actions .button {
    width: 100%;
  }

  .model-header-actions,
  .model-header-actions .button {
    width: 100%;
  }

  .compact-select {
    width: 100%;
    min-width: 0;
  }

  .modal-card {
    padding: 16px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .auth-code-row,
  .auth-captcha-row {
    grid-template-columns: 1fr;
  }

  .auth-code-row .button,
  .auth-captcha-refresh {
    width: 100%;
  }

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

  .result-field textarea {
    min-height: 300px;
  }

  .batch-workspace,
  .batch-workspace.has-refs {
    grid-template-columns: 1fr;
  }

  .batch-sidebar {
    position: static;
    max-height: none;
  }

  .batch-side-card.batch-multi-panel,
  .batch-side-card.batch-single-panel {
    min-height: 200px;
  }

  .batch-ref-panel,
  .batch-result-panel {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 680px) {
  .batch-preview-modal {
    --batch-preview-gap: 24px;
    padding-inline: 12px;
  }

  .landing-grid {
    gap: 12px;
  }

  .landing-title-card,
  .landing-mock-card {
    border-radius: 20px;
  }

  .landing-title-card {
    padding: 24px 18px;
  }

  .landing-title-topline {
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .landing-title,
  .landing-subtitle {
    text-align: center;
  }

  .landing-title-gradient {
    width: 100%;
  }

  .landing-subtitle {
    margin-inline: auto;
    line-height: 1.65;
  }

  .landing-trace {
    display: none;
  }

  .landing-title-actions {
    gap: 10px;
    margin-top: 26px;
  }

  .landing-mock-card {
    padding: 10px;
  }

  .mock-window {
    gap: 10px;
    padding: 10px;
  }

  .mock-menu {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    padding: 10px;
  }

  .mock-logo,
  .mock-menu-item {
    flex: 0 0 auto;
  }

  .mock-logo {
    width: 38px;
    height: 38px;
    margin: 0;
  }

  .mock-menu-item {
    min-height: 38px;
  }

  .mock-editor,
  .mock-insights {
    padding: 10px;
    border-radius: 18px;
  }

  .mock-field,
  .mock-result-card,
  .mock-score-card,
  .mock-bars,
  .mock-chart,
  .mock-tags {
    border-radius: 16px;
  }

  .mock-action-row button {
    flex: 1 1 120px;
  }

  .mock-publish-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mock-icon-actions {
    justify-content: center;
    min-height: 36px;
  }

  .mock-publish-button {
    width: 100%;
  }

  .landing-footer {
    gap: 12px 18px;
    font-size: 12px;
  }

  .topbar-actions .button,
  .editor-actions .button,
  .export-actions .button,
  .image-controls .button {
    flex-basis: 100%;
  }

  #sourceText {
    min-height: 180px;
  }

  .result-field textarea {
    min-height: 240px;
  }

  .chat-shell {
    padding-inline: 10px;
  }

  .chat-hero,
  .chat-side-card,
  .chat-main-panel {
    border-radius: 20px;
  }

  .chat-main-panel {
    min-height: 680px;
  }

  .chat-message-list {
    padding: 12px;
  }

  .chat-suggestion-grid,
  .chat-image-options,
  .chat-config-inline,
  .chat-composer-footer {
    grid-template-columns: 1fr;
  }

  .chat-config-inline .chat-config-row {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .chat-composer-footer {
    display: grid;
    align-items: stretch;
  }

  .chat-send-actions {
    display: flex;
    justify-content: flex-end;
  }

  .chat-message,
  .chat-message.is-user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .chat-message.is-user .chat-message-avatar,
  .chat-message.is-user .chat-message-body {
    order: initial;
  }

  .chat-message.is-user .chat-message-body {
    justify-self: stretch;
  }

  .chat-message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
}

@media (max-width: 520px) {
  .landing-shell {
    padding: 10px;
    gap: 12px;
  }

  .landing-title-card {
    padding: 22px 14px;
  }

  .landing-title {
    font-size: clamp(36px, 13vw, 58px);
    letter-spacing: -0.07em;
  }

  .landing-subtitle {
    font-size: 15px;
  }

  .landing-start-button {
    min-height: 52px;
    border-radius: 16px;
  }

  .mock-style-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock-style-row span {
    text-align: center;
  }

  .mock-result-card {
    padding: 14px;
  }

  .mock-result-card h2 {
    font-size: 21px;
  }

  .mock-insights {
    gap: 10px;
  }

  .mock-score-card strong {
    width: 72px;
    height: 72px;
    font-size: 24px;
  }

  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .landing-title-topline {
    padding-inline: 9px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .mock-menu-item {
    font-size: 11px;
  }

  .mock-action-row button {
    flex-basis: 100%;
  }

  .landing-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: center;
  }
}

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

  .button.loading svg {
    animation: none;
  }

  .loading-dots span {
    animation: none;
  }
}

body.landing-active .landing-grid {
  grid-template-columns: 1fr;
}

body.landing-active .landing-title {
  white-space: nowrap;
}

body.landing-active .landing-title-gradient {
  width: auto;
  flex-basis: auto;
}

@media (max-width: 860px) {
  body.landing-active .landing-page {
    padding: 10px;
  }

  body.landing-active .landing-shell {
    min-height: 100dvh;
    padding: 26px 18px;
  }

  body.landing-active .landing-title-card {
    min-height: calc(100dvh - 52px);
    padding: 28px 0;
  }

  body.landing-active .landing-title {
    font-size: clamp(44px, 13vw, 76px);
    letter-spacing: 0;
  }

  body.landing-active .landing-start-button {
    width: auto;
    min-width: min(78vw, 330px);
    min-height: 68px;
    font-size: clamp(24px, 7vw, 36px);
  }
}

@media (max-width: 520px) {
  body.landing-active .landing-title {
    font-size: clamp(36px, 12vw, 56px);
  }

  body.landing-active .landing-title-actions {
    margin-top: 72px;
  }
}

/* PPT studio */
.ppt-page {
  min-height: 100vh;
  background: #eef1ec;
}

.ppt-page .floating-main-nav {
  position: absolute;
}

.ppt-shell {
  width: min(1720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 26px;
}

.ppt-toolbar {
  min-height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(111, 124, 115, 0.28);
}

.ppt-title-block {
  min-width: 0;
}

.ppt-title-block h1 {
  margin: 2px 0 4px;
  color: #17201c;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.ppt-title-block .status-line {
  margin: 0;
  max-width: min(920px, calc(100vw - 48px));
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-kicker {
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.ppt-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ppt-workspace {
  display: grid;
  grid-template-columns: minmax(248px, 292px) minmax(540px, 1fr) minmax(248px, 292px);
  height: calc(100vh - 214px);
  min-height: 620px;
  background: #fff;
  border: 1px solid rgba(111, 124, 115, 0.28);
  border-top: 0;
  box-shadow: 0 24px 60px rgba(31, 41, 35, 0.1);
  overflow: hidden;
}

.ppt-config-panel,
.ppt-editor-panel {
  padding: 22px;
  overflow-y: auto;
  background: #f8faf7;
}

.ppt-config-panel {
  border-right: 1px solid rgba(111, 124, 115, 0.24);
}

.ppt-editor-panel {
  border-left: 1px solid rgba(111, 124, 115, 0.24);
}

.ppt-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.ppt-panel-heading > span {
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 900;
}

.ppt-panel-heading h2 {
  margin: 0;
  color: #17201c;
  font-size: 17px;
  letter-spacing: 0;
}

.ppt-config-panel .field,
.ppt-editor-panel .field {
  margin-bottom: 15px;
}

.ppt-config-panel textarea,
.ppt-editor-panel textarea {
  resize: vertical;
}

.ppt-settings-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.ppt-settings-grid .field {
  min-width: 0;
}

.ppt-settings-grid input,
.ppt-settings-grid select {
  min-height: 42px;
}

.ppt-settings-grid .field-hint {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

.ppt-config-panel .field-header-row {
  align-items: center;
  width: 100%;
}

.ppt-config-panel .field-header-row .button {
  min-height: 30px;
  padding-block: 5px;
  white-space: nowrap;
}

.ppt-generate-button {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.ppt-model-summary {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(111, 124, 115, 0.2);
}

.ppt-model-summary > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.ppt-model-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ppt-model-summary strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-flow-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(111, 124, 115, 0.2);
}

.ppt-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(111, 124, 115, 0.24);
  border-radius: 8px;
  background: #fff;
}

.ppt-flow-steps span {
  min-width: 0;
  padding: 8px 6px;
  color: #64706a;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  border-right: 1px solid rgba(111, 124, 115, 0.18);
}

.ppt-flow-steps span:last-child {
  border-right: 0;
}

.ppt-flow-steps span.is-active {
  color: #17201c;
  background: #e6f4ee;
}

.ppt-flow-steps span.is-done {
  color: #0f766e;
  background: #f4fbf7;
}

.ppt-agent-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ppt-agent-pipeline article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 7px;
  border: 1px solid rgba(111, 124, 115, 0.18);
  border-radius: 8px;
  background: #fff;
}

.ppt-agent-pipeline span {
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
}

.ppt-agent-pipeline strong {
  min-width: 0;
  color: #17201c;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ppt-flow-actions {
  display: grid;
  gap: 8px;
}

.ppt-flow-actions .button {
  width: 100%;
  justify-content: center;
  min-height: 38px;
}

.ppt-flow-summary {
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  color: #52615b;
  background: #eef8f4;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ppt-outline-list,
.ppt-blueprint-list {
  display: grid;
  gap: 10px;
}

.ppt-flow-brief {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(111, 124, 115, 0.2);
  border-radius: 8px;
  background: #fffefa;
}

.ppt-flow-brief strong {
  min-width: 0;
  color: #17201c;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ppt-flow-brief p,
.ppt-flow-brief small {
  min-width: 0;
  margin: 0;
  color: #64706a;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ppt-flow-brief-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(111, 124, 115, 0.18);
  border-radius: 8px;
  background: #fff;
}

.ppt-flow-brief-card > span {
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
}

.ppt-flow-brief-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ppt-flow-brief-card strong {
  min-width: 0;
  color: #17201c;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ppt-flow-brief-card p,
.ppt-flow-brief-more {
  min-width: 0;
  margin: 0;
  color: #64706a;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ppt-flow-brief-more {
  padding: 2px 4px;
}

.ppt-outline-meta,
.ppt-outline-card,
.ppt-blueprint-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(111, 124, 115, 0.2);
  border-radius: 8px;
  background: #fffefa;
}

.ppt-outline-card,
.ppt-blueprint-card {
  background: #fff;
}

.ppt-outline-card header,
.ppt-blueprint-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ppt-outline-card header > span,
.ppt-blueprint-card header > span {
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
}

.ppt-outline-card header select,
.ppt-blueprint-card header select {
  width: 104px;
  min-height: 32px;
  font-size: 11px;
}

.ppt-outline-meta label,
.ppt-outline-card label,
.ppt-blueprint-card label {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin: 0;
}

.ppt-outline-meta label > span,
.ppt-outline-card label > span,
.ppt-blueprint-card label > span {
  color: #64706a;
  font-size: 10px;
  font-weight: 900;
}

.ppt-outline-meta input,
.ppt-outline-meta textarea,
.ppt-outline-card input,
.ppt-outline-card textarea,
.ppt-outline-card select,
.ppt-blueprint-card input,
.ppt-blueprint-card textarea,
.ppt-blueprint-card select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 7px;
  overflow-wrap: anywhere;
}

.ppt-outline-meta textarea,
.ppt-outline-card textarea,
.ppt-blueprint-card textarea {
  resize: vertical;
}

.ppt-blueprint-details {
  min-width: 0;
  border: 1px solid rgba(111, 124, 115, 0.22);
  border-radius: 8px;
  background: #fffefa;
  overflow: hidden;
}

.ppt-blueprint-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.ppt-blueprint-details summary::-webkit-details-marker {
  display: none;
}

.ppt-blueprint-details summary span {
  min-width: 0;
  color: #17201c;
  font-size: 12px;
  font-weight: 900;
}

.ppt-blueprint-details summary strong {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 11px;
}

.ppt-blueprint-list {
  padding: 0 10px 10px;
}

.ppt-current-heading {
  margin-top: 18px;
}

.ppt-stage-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #e7ebe5;
}

.ppt-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(111, 124, 115, 0.22);
  background: rgba(255, 255, 255, 0.78);
}

.ppt-stage-header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ppt-stage-header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ppt-stage-header strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-stage-controls,
.ppt-image-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ppt-stage-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ppt-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}

.ppt-element-toolbar {
  position: absolute;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 5px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.94);
  box-shadow: 0 14px 32px rgba(22, 32, 24, 0.16);
  backdrop-filter: blur(12px);
}

.ppt-element-toolbar[hidden] {
  display: none;
}

.ppt-element-toolbar .icon-button {
  width: 34px;
  min-height: 34px;
  border-radius: 6px;
  color: #17201c;
  background: #f8faf7;
}

.ppt-element-toolbar .icon-button:hover,
.ppt-element-toolbar .icon-button.is-active {
  border-color: rgba(15, 118, 110, 0.36);
  color: #0f766e;
  background: #dff4ee;
}

.ppt-element-toolbar .danger-ghost {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffd3cf;
}

.ppt-element-toolbar .danger-ghost:hover {
  color: var(--danger);
  background: #ffe5e2;
  border-color: #ffb8b0;
}

.ppt-toolbar-glyph {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.ppt-slide {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  color: #17201c;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(21, 32, 51, 0.035) 0 1px, transparent 1px 100%),
    #f7f8f3;
  background-size: 44px 44px, 44px 44px, auto;
  box-shadow: 0 24px 52px rgba(26, 35, 30, 0.2);
  isolation: isolate;
  user-select: none;
}

.ppt-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ppt-slide::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 4.2%;
  width: 5px;
  height: 10%;
  background: #0f766e;
}

.ppt-slide-frame {
  position: absolute;
  inset: 4.4%;
  z-index: 0;
  border: 1px solid rgba(100, 112, 106, 0.18);
  pointer-events: none;
}

.ppt-slide.is-empty {
  display: grid;
  place-items: center;
  padding: 0;
}

.ppt-slide.is-empty::before {
  display: none;
}

.ppt-slide-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  color: #7c8981;
  font-size: 14px;
}

.ppt-slide-empty svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.4;
}

.ppt-slide > header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.ppt-slide > header span {
  min-width: 0;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-layout-content {
  display: grid;
  grid-template-rows: 24px minmax(0, 29%) minmax(0, 1fr) 22px;
  gap: 2.7%;
}

.ppt-slide > h2 {
  position: relative;
  z-index: 2;
  max-width: 90%;
  max-height: 100%;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 31px;
  line-height: 1.14;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-canvas-box {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  outline: 0;
  cursor: move;
  touch-action: none;
}

.ppt-canvas-box.is-transforming {
  z-index: 6;
}

.ppt-box-content {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.ppt-canvas-box::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 8;
  border: 1.5px solid transparent;
  pointer-events: none;
}

.ppt-canvas-box:hover::after,
.ppt-canvas-box.is-selected::after,
.ppt-canvas-box.is-transforming::after {
  border-color: rgba(15, 118, 110, 0.72);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.ppt-box-move-handle,
.ppt-resize-handle {
  position: absolute;
  z-index: 9;
  display: none;
  background: #fffefa;
  border: 1.5px solid #0f766e;
  box-shadow: 0 3px 8px rgba(22, 32, 24, 0.16);
}

.ppt-box-move-handle {
  left: 50%;
  top: -14px;
  width: 30px;
  height: 7px;
  border-radius: 6px;
  transform: translateX(-50%);
  cursor: move;
}

.ppt-resize-handle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ppt-canvas-box.is-selected .ppt-box-move-handle,
.ppt-canvas-box.is-selected .ppt-resize-handle,
.ppt-canvas-box.is-transforming .ppt-box-move-handle,
.ppt-canvas-box.is-transforming .ppt-resize-handle {
  display: block;
}

.ppt-resize-n,
.ppt-resize-s {
  left: 50%;
  width: 18px;
  height: 7px;
  border-radius: 999px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.ppt-resize-e,
.ppt-resize-w {
  top: 50%;
  width: 7px;
  height: 18px;
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.ppt-resize-n {
  top: -6px;
}

.ppt-resize-e {
  right: -6px;
}

.ppt-resize-s {
  bottom: -6px;
}

.ppt-resize-w {
  left: -6px;
}

.ppt-resize-nw {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}

.ppt-resize-ne {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}

.ppt-resize-sw {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}

.ppt-resize-se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.ppt-canvas-dragging,
.ppt-canvas-dragging * {
  cursor: grabbing !important;
}

.ppt-text-element {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  outline: 0;
  color: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-text-element[contenteditable="false"] {
  cursor: move;
}

.ppt-text-element[contenteditable="true"] {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.ppt-text-element-kicker {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  line-height: 1.2;
  text-transform: uppercase;
}

.ppt-layout-content .ppt-text-element-kicker {
  font-size: 10px;
  letter-spacing: 1.2px;
}

.ppt-text-element-title {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
}

.ppt-layout-cover .ppt-text-element-title {
  font-size: 44px;
  line-height: 1.12;
}

.ppt-text-element-coverSubtitle {
  color: #64706a;
  font-size: 16px;
  line-height: 1.55;
}

.ppt-text-element-bullets {
  align-content: start;
  gap: 10px;
  padding-left: 1.25em;
  font-size: 17px;
  line-height: 1.42;
}

.ppt-text-element-custom {
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.35;
}

.ppt-text-element-bullets li {
  padding: 5px 0 5px 8px;
  min-width: 0;
  border-bottom: 1px solid rgba(100, 112, 106, 0.12);
}

.ppt-canvas-box-image .ppt-slide-visual {
  width: 100%;
  height: 100%;
  box-shadow: 0 18px 34px rgba(22, 32, 24, 0.16);
}

.ppt-canvas-box-image .ppt-box-content {
  border-radius: 0;
}

.ppt-canvas-box-image img {
  pointer-events: none;
}

.ppt-direct-edit {
  position: relative;
  z-index: 3;
  cursor: text;
  outline: 1px dashed transparent;
  outline-offset: 4px;
  transition: outline-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.ppt-direct-edit:hover,
.ppt-direct-edit:focus,
.ppt-direct-edit.is-selected {
  outline-color: rgba(15, 118, 110, 0.42);
  background-color: rgba(255, 255, 255, 0.28);
}

.ppt-direct-edit.is-selected {
  outline-style: solid;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}

.ppt-canvas-box .ppt-direct-edit {
  z-index: auto;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.ppt-canvas-box .ppt-direct-edit:hover,
.ppt-canvas-box .ppt-direct-edit:focus,
.ppt-canvas-box .ppt-direct-edit.is-selected {
  background: transparent;
  outline: 0;
  box-shadow: none;
}

.ppt-canvas-box.is-editing-text::after {
  border-style: dashed;
}

.ppt-direct-edit:empty::before {
  content: attr(data-placeholder);
  color: rgba(100, 112, 106, 0.7);
}

.ppt-text-align-left {
  text-align: left;
}

.ppt-text-align-center {
  text-align: center;
}

.ppt-text-align-right {
  text-align: right;
}

.ppt-text-valign-top {
  justify-content: flex-start;
}

.ppt-text-valign-middle {
  justify-content: center;
}

.ppt-text-valign-bottom {
  justify-content: flex-end;
}

.ppt-slide ul.ppt-text-align-center,
.ppt-slide ul.ppt-text-align-right {
  padding-left: 0;
  list-style-position: inside;
}

.ppt-slide-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  gap: 5%;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.ppt-slide-body > ul:only-child {
  grid-column: 1 / -1;
  max-width: 88%;
}

.ppt-slide ul {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding-left: 1.25em;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-slide li {
  padding: 5px 0 5px 8px;
  min-width: 0;
  border-bottom: 1px solid rgba(100, 112, 106, 0.12);
}

.ppt-slide li::marker {
  color: #0f766e;
}

.ppt-slide-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #fffefa;
}

.ppt-slide-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ppt-slide-visual-empty {
  display: grid;
  place-items: center;
  color: rgba(15, 118, 110, 0.58);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 42%),
    linear-gradient(45deg, rgba(21, 32, 51, 0.07), transparent 38%),
    #fbfcf8;
}

.ppt-slide-visual-empty svg {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
}

.ppt-visual-placeholder {
  position: relative;
  width: 76%;
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.22);
}

.ppt-visual-placeholder span {
  position: absolute;
  background: rgba(15, 118, 110, 0.16);
}

.ppt-visual-placeholder span:nth-child(1) {
  left: 9%;
  top: 17%;
  width: 58%;
  height: 1px;
}

.ppt-visual-placeholder span:nth-child(2) {
  right: 14%;
  top: 25%;
  width: 1px;
  height: 50%;
}

.ppt-visual-placeholder span:nth-child(3) {
  left: 14%;
  bottom: 18%;
  width: 70%;
  height: 1px;
}

.ppt-visual-placeholder span:nth-child(4) {
  left: 25%;
  top: 26%;
  width: 42%;
  height: 42%;
  background: rgba(15, 118, 110, 0.08);
}

.ppt-layout-cover {
  display: block;
}

.ppt-cover-mark {
  position: absolute;
  z-index: 1;
  right: 5%;
  top: 6.4%;
  color: rgba(15, 118, 110, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 86px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.ppt-slide-cover-copy {
  position: relative;
  z-index: 3;
  width: 58%;
  margin-top: 10%;
}

.ppt-slide-cover-copy > span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-slide-cover-copy h2 {
  margin: 8% 0 6%;
  max-height: 3.4em;
  overflow: hidden;
  color: inherit;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-slide-cover-copy p {
  max-height: 8.2em;
  overflow: hidden;
  color: #64706a;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-slide > .ppt-slide-visual {
  position: absolute;
  z-index: 2;
  top: 17%;
  right: 6.2%;
  bottom: 16%;
  width: 35%;
  border: 1px solid rgba(15, 118, 110, 0.22);
  box-shadow: 0 18px 34px rgba(22, 32, 24, 0.16);
}

.ppt-cover-rule {
  position: absolute;
  z-index: 2;
  left: 5.4%;
  bottom: 12%;
  width: min(32%, 310px);
  height: 1px;
  background: rgba(15, 118, 110, 0.34);
  pointer-events: none;
}

.ppt-slide > small {
  position: absolute;
  z-index: 2;
  left: 5.4%;
  bottom: 7%;
  color: #64706a;
  font-size: 10px;
  font-weight: 800;
}

.ppt-slide > footer {
  position: absolute;
  z-index: 2;
  left: 5.4%;
  right: 5.4%;
  bottom: 5.2%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  color: rgba(100, 112, 106, 0.72);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.ppt-slide > footer span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-slide-page-mark {
  position: absolute;
  z-index: 2;
  top: 7.2%;
  right: 6.2%;
  color: rgba(100, 112, 106, 0.74);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.ppt-slide-author-mark {
  position: absolute;
  z-index: 2;
  left: 5.4%;
  bottom: 7%;
  color: #64706a;
  font-size: 10px;
  font-weight: 800;
}

.ppt-theme-business {
  color: #152033;
  background:
    linear-gradient(90deg, rgba(36, 87, 214, 0.055) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(21, 32, 51, 0.035) 0 1px, transparent 1px 100%),
    #f5f7fa;
  background-size: 44px 44px, 44px 44px, auto;
}

.ppt-theme-business::before,
.ppt-theme-business li::marker {
  background: #2457d6;
  color: #2457d6;
}

.ppt-theme-business > header,
.ppt-theme-business .ppt-slide-cover-copy > span {
  color: #2457d6;
}

.ppt-theme-technology {
  color: #f4f8fa;
  background:
    linear-gradient(90deg, rgba(49, 201, 181, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(244, 248, 250, 0.04) 0 1px, transparent 1px 100%),
    #0d141b;
  background-size: 44px 44px, 44px 44px, auto;
}

.ppt-theme-technology::before,
.ppt-theme-technology li::marker {
  background: #31c9b5;
  color: #31c9b5;
}

.ppt-theme-technology > header,
.ppt-theme-technology .ppt-slide-cover-copy > span {
  color: #31c9b5;
}

.ppt-theme-technology .ppt-slide-cover-copy p,
.ppt-theme-technology > small,
.ppt-theme-technology > footer {
  color: #a8b7c2;
}

.ppt-theme-technology .ppt-slide-frame,
.ppt-theme-technology .ppt-slide li {
  border-color: rgba(168, 183, 194, 0.18);
}

.ppt-theme-warm {
  color: #28231f;
  background:
    linear-gradient(90deg, rgba(196, 79, 50, 0.055) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(40, 35, 31, 0.035) 0 1px, transparent 1px 100%),
    #faf7f2;
  background-size: 44px 44px, 44px 44px, auto;
}

.ppt-theme-warm::before,
.ppt-theme-warm li::marker {
  background: #c44f32;
  color: #c44f32;
}

.ppt-theme-warm > header,
.ppt-theme-warm .ppt-slide-cover-copy > span {
  color: #c44f32;
}

.ppt-template-swiss {
  background:
    linear-gradient(90deg, rgba(218, 38, 28, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(23, 32, 28, 0.055) 0 1px, transparent 1px 100%),
    #fbfaf5;
  background-size: 8.333% 100%, 100% 12.5%, auto;
}

.ppt-template-swiss::before {
  top: 0;
  left: 8.2%;
  width: 7px;
  height: 100%;
  background: #d3261c;
}

.ppt-template-swiss::after {
  inset: 5.4% 5.4% auto 16.5%;
  height: 1px;
  background: rgba(211, 38, 28, 0.42);
}

.ppt-template-swiss .ppt-slide-frame {
  inset: 5.4%;
  border-color: rgba(23, 32, 28, 0.22);
}

.ppt-template-swiss > header,
.ppt-template-swiss .ppt-slide-cover-copy > span,
.ppt-template-swiss li::marker {
  color: #d3261c;
}

.ppt-template-swiss .ppt-cover-mark {
  right: 7%;
  top: 5%;
  color: rgba(211, 38, 28, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 76px;
}

.ppt-template-swiss .ppt-slide-cover-copy {
  width: 54%;
  margin-left: 8.8%;
}

.ppt-template-swiss .ppt-slide-cover-copy h2,
.ppt-template-swiss > h2 {
  font-family: "Aptos Display", "Noto Serif SC", "Songti SC", serif;
  font-weight: 900;
}

.ppt-template-magazine {
  background:
    linear-gradient(90deg, rgba(176, 35, 24, 0.95) 0 1.2%, transparent 1.2% 100%),
    linear-gradient(180deg, rgba(24, 25, 23, 0.07) 0 1px, transparent 1px 100%),
    #f9f4ea;
  background-size: auto, 100% 20%, auto;
}

.ppt-template-magazine::before {
  top: auto;
  left: 5.4%;
  bottom: 7.2%;
  width: 28%;
  height: 5px;
  background: #b02318;
}

.ppt-template-magazine::after {
  left: 6%;
  top: 5.8%;
  width: 46%;
  height: 1px;
  background: #181917;
  box-shadow: 0 12px 0 rgba(24, 25, 23, 0.22);
}

.ppt-template-magazine .ppt-slide-frame {
  inset: 6.4% 5.2%;
  border-color: rgba(24, 25, 23, 0.2);
}

.ppt-template-magazine .ppt-cover-mark {
  right: 5.2%;
  top: 1.2%;
  color: rgba(176, 35, 24, 0.18);
  font-size: 126px;
  font-style: italic;
}

.ppt-template-magazine .ppt-slide-cover-copy {
  width: 50%;
  margin-top: 13%;
}

.ppt-template-magazine .ppt-slide-cover-copy h2,
.ppt-template-magazine > h2 {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: 48px;
  line-height: 1.02;
}

.ppt-template-magazine.ppt-layout-content > h2 {
  max-width: 82%;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(176, 35, 24, 0.72);
}

.ppt-template-magazine .ppt-slide-body {
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 1.1fr);
  gap: 4%;
}

.ppt-template-magazine > .ppt-slide-visual {
  top: 14%;
  right: 5.8%;
  bottom: 14%;
  width: 38%;
  border: 1px solid rgba(24, 25, 23, 0.24);
  box-shadow: 0 18px 32px rgba(24, 25, 23, 0.16);
}

.ppt-template-data {
  color: #eef5f2;
  background:
    linear-gradient(90deg, rgba(79, 214, 178, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(248, 197, 89, 0.08) 0 1px, transparent 1px 100%),
    #141917;
  background-size: 64px 64px, 64px 64px, auto;
}

.ppt-template-data::before {
  left: 4.8%;
  top: 7.2%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f8c559;
  box-shadow: 18px 0 0 #4fd6b2, 36px 0 0 #e86d5b;
}

.ppt-template-data::after {
  inset: auto 5.4% 10.2% 5.4%;
  height: 1px;
  background: rgba(248, 197, 89, 0.36);
  box-shadow: 0 -120px 0 rgba(79, 214, 178, 0.12);
}

.ppt-template-data .ppt-slide-frame {
  border-color: rgba(238, 245, 242, 0.18);
}

.ppt-template-data > header,
.ppt-template-data .ppt-slide-cover-copy > span {
  color: #f8c559;
}

.ppt-template-data .ppt-slide-cover-copy p,
.ppt-template-data > small,
.ppt-template-data > footer {
  color: #b9c7c2;
}

.ppt-template-data .ppt-slide-body {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.92fr);
  gap: 3.6%;
}

.ppt-template-data ul {
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.ppt-template-data li {
  padding: 10px 12px;
  border: 1px solid rgba(79, 214, 178, 0.2);
  background: rgba(238, 245, 242, 0.06);
}

.ppt-template-data li::marker {
  color: #f8c559;
}

.ppt-template-data .ppt-slide-visual {
  border-color: rgba(248, 197, 89, 0.34);
  background: #1f2925;
}

.ppt-template-data .ppt-slide-visual-empty {
  color: rgba(248, 197, 89, 0.75);
  background:
    linear-gradient(135deg, rgba(79, 214, 178, 0.18), transparent 44%),
    linear-gradient(45deg, rgba(248, 197, 89, 0.18), transparent 42%),
    #1b231f;
}

.ppt-template-memphis {
  color: #191a1b;
  background:
    linear-gradient(135deg, transparent 0 90%, rgba(255, 204, 0, 0.56) 90% 100%),
    linear-gradient(90deg, rgba(0, 144, 216, 0.08) 0 1px, transparent 1px 100%),
    #fff8e6;
  background-size: auto, 54px 54px, auto;
}

.ppt-template-memphis::before {
  top: 7%;
  left: 4.4%;
  width: 34px;
  height: 34px;
  border: 7px solid #0090d8;
  background: transparent;
  transform: rotate(10deg);
}

.ppt-template-memphis::after {
  right: 7%;
  top: 9%;
  left: auto;
  width: 92px;
  height: 92px;
  background:
    linear-gradient(90deg, #f24b3a 0 12px, transparent 12px 100%),
    linear-gradient(180deg, #f24b3a 0 12px, transparent 12px 100%);
  background-size: 24px 24px;
  transform: rotate(-8deg);
}

.ppt-template-memphis .ppt-slide-frame {
  inset: 5.8%;
  border: 2px solid rgba(25, 26, 27, 0.2);
}

.ppt-template-memphis .ppt-cover-mark {
  color: rgba(0, 144, 216, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 96px;
}

.ppt-template-memphis > header,
.ppt-template-memphis .ppt-slide-cover-copy > span {
  color: #0090d8;
}

.ppt-template-memphis .ppt-slide-cover-copy h2,
.ppt-template-memphis > h2 {
  font-family: "Aptos Display", "Noto Serif SC", "Songti SC", serif;
  font-weight: 900;
}

.ppt-template-memphis ul {
  padding-left: 0;
  list-style: none;
}

.ppt-template-memphis li {
  position: relative;
  padding: 8px 10px 8px 32px;
  border: 2px solid rgba(25, 26, 27, 0.16);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 4px 4px 0 rgba(0, 144, 216, 0.22);
}

.ppt-template-memphis li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 14px;
  width: 10px;
  height: 10px;
  background: #f24b3a;
  transform: rotate(45deg);
}

.ppt-template-memphis .ppt-slide-visual {
  border: 2px solid #191a1b;
  box-shadow: 8px 8px 0 rgba(242, 75, 58, 0.28);
}

.ppt-template-consulting {
  background:
    linear-gradient(90deg, rgba(13, 64, 52, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(23, 32, 28, 0.055) 0 1px, transparent 1px 100%),
    #fbfaf5;
  background-size: 8.333% 100%, 100% 12.5%, auto;
}

.ppt-template-consulting::before {
  top: 0;
  left: 8.2%;
  width: 7px;
  height: 100%;
  background: #0d5b49;
}

.ppt-template-consulting::after {
  inset: 5.4% 5.4% auto 16.5%;
  height: 1px;
  background: rgba(13, 91, 73, 0.42);
}

.ppt-template-consulting .ppt-slide-frame {
  inset: 5.4%;
  border-color: rgba(23, 32, 28, 0.22);
}

.ppt-template-consulting .ppt-text-element-kicker,
.ppt-template-consulting li::marker,
.ppt-template-consulting .ppt-cover-mark {
  color: #0d5b49;
}

.ppt-template-consulting .ppt-cover-mark {
  right: 7%;
  top: 5%;
  color: rgba(13, 91, 73, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 76px;
}

.ppt-template-product {
  background:
    linear-gradient(90deg, rgba(181, 61, 43, 0.9) 0 1.2%, transparent 1.2% 100%),
    linear-gradient(180deg, rgba(24, 25, 23, 0.07) 0 1px, transparent 1px 100%),
    #f9f4ea;
  background-size: auto, 100% 20%, auto;
}

.ppt-template-product::before {
  top: auto;
  left: 5.4%;
  bottom: 7.2%;
  width: 28%;
  height: 5px;
  background: #b53d2b;
}

.ppt-template-product::after {
  left: 6%;
  top: 5.8%;
  width: 46%;
  height: 1px;
  background: #181917;
  box-shadow: 0 12px 0 rgba(24, 25, 23, 0.22);
}

.ppt-template-product .ppt-slide-frame {
  inset: 6.4% 5.2%;
  border-color: rgba(24, 25, 23, 0.2);
}

.ppt-template-product .ppt-cover-mark {
  right: 5.2%;
  top: 1.2%;
  color: rgba(181, 61, 43, 0.18);
  font-size: 126px;
  font-style: italic;
}

.ppt-template-product .ppt-text-element-kicker,
.ppt-template-product li::marker {
  color: #b53d2b;
}

.ppt-template-product .ppt-text-element-title {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  line-height: 1.04;
}

.ppt-template-retrospective {
  color: #eef5f2;
  background:
    linear-gradient(90deg, rgba(79, 214, 178, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(248, 197, 89, 0.08) 0 1px, transparent 1px 100%),
    #141917;
  background-size: 64px 64px, 64px 64px, auto;
}

.ppt-template-retrospective::before {
  left: 4.8%;
  top: 7.2%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f8c559;
  box-shadow: 18px 0 0 #4fd6b2, 36px 0 0 #e86d5b;
}

.ppt-template-retrospective::after {
  inset: auto 5.4% 10.2% 5.4%;
  height: 1px;
  background: rgba(248, 197, 89, 0.36);
  box-shadow: 0 -120px 0 rgba(79, 214, 178, 0.12);
}

.ppt-template-retrospective .ppt-slide-frame {
  border-color: rgba(238, 245, 242, 0.18);
}

.ppt-template-retrospective .ppt-text-element-kicker,
.ppt-template-retrospective li::marker {
  color: #f8c559;
}

.ppt-template-retrospective .ppt-text-element-coverSubtitle,
.ppt-template-retrospective .ppt-slide-author-mark,
.ppt-template-retrospective > footer {
  color: #b9c7c2;
}

.ppt-template-retrospective .ppt-text-element-bullets {
  padding-left: 0;
  list-style: none;
}

.ppt-template-retrospective .ppt-text-element-bullets li {
  padding: 10px 12px;
  border: 1px solid rgba(79, 214, 178, 0.2);
  background: rgba(238, 245, 242, 0.06);
}

.ppt-template-retrospective .ppt-slide-visual {
  border-color: rgba(248, 197, 89, 0.34);
  background: #1f2925;
}

.ppt-template-consulting.ppt-theme-editorial {
  color: #17201c;
  background:
    linear-gradient(90deg, rgba(13, 91, 73, 0.11) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(23, 32, 28, 0.055) 0 1px, transparent 1px 100%),
    linear-gradient(90deg, rgba(13, 91, 73, 0.08) 0 8.2%, transparent 8.2% 100%),
    #fbfaf5;
  background-size: 8.333% 100%, 100% 12.5%, auto, auto;
}

.ppt-template-consulting.ppt-theme-editorial::before {
  top: 0;
  left: 8.2%;
  width: 7px;
  height: 100%;
  background: #0d5b49;
}

.ppt-template-consulting.ppt-theme-editorial::after {
  inset: 5.4% 5.4% auto 16.5%;
  height: 1px;
  background: rgba(13, 91, 73, 0.46);
}

.ppt-template-consulting.ppt-theme-business {
  color: #142033;
  background:
    linear-gradient(90deg, rgba(23, 79, 201, 0.1) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(20, 32, 51, 0.055) 0 1px, transparent 1px 100%),
    linear-gradient(90deg, #14306a 0 7.8%, transparent 7.8% 100%),
    #f7f9fd;
  background-size: 8.333% 100%, 100% 12.5%, auto, auto;
}

.ppt-template-consulting.ppt-theme-business::before {
  top: 0;
  left: 7.8%;
  width: 5px;
  height: 100%;
  background: #2f7de1;
}

.ppt-template-consulting.ppt-theme-business::after {
  inset: 6% 5.6% auto 15.4%;
  height: 2px;
  background: linear-gradient(90deg, #2f7de1, rgba(47, 125, 225, 0.12));
  box-shadow: 0 11px 0 rgba(20, 48, 106, 0.12);
}

.ppt-template-consulting.ppt-theme-business .ppt-slide-frame {
  border-color: rgba(20, 48, 106, 0.2);
}

.ppt-template-consulting.ppt-theme-business .ppt-text-element-kicker,
.ppt-template-consulting.ppt-theme-business li::marker {
  color: #2f7de1;
}

.ppt-template-consulting.ppt-theme-business .ppt-cover-mark {
  color: rgba(47, 125, 225, 0.18);
}

.ppt-template-consulting.ppt-theme-business .ppt-slide-visual {
  border-color: rgba(47, 125, 225, 0.26);
  box-shadow: 0 20px 38px rgba(20, 48, 106, 0.18);
}

.ppt-template-product.ppt-theme-business {
  color: #181917;
  background:
    linear-gradient(90deg, rgba(24, 25, 23, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(24, 25, 23, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, transparent 0 72%, rgba(244, 182, 64, 0.36) 72% 84%, transparent 84% 100%),
    #fbfbf7;
  background-size: 10% 100%, 100% 18%, auto, auto;
}

.ppt-template-product.ppt-theme-business::before {
  top: 6%;
  left: 5.4%;
  width: 18%;
  height: 6px;
  background: #181917;
  box-shadow: 0 13px 0 rgba(15, 118, 110, 0.72);
}

.ppt-template-product.ppt-theme-business::after {
  left: auto;
  right: 6%;
  top: 7%;
  width: 12%;
  height: 12%;
  border: 2px solid rgba(244, 182, 64, 0.86);
  background: rgba(15, 118, 110, 0.08);
}

.ppt-template-product.ppt-theme-business .ppt-text-element-kicker,
.ppt-template-product.ppt-theme-business li::marker {
  color: #0f766e;
}

.ppt-template-product.ppt-theme-business .ppt-cover-mark {
  color: rgba(24, 25, 23, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ppt-template-product.ppt-theme-business .ppt-slide-frame {
  border-color: rgba(24, 25, 23, 0.2);
}

.ppt-template-product.ppt-theme-business .ppt-slide-visual {
  border: 2px solid rgba(24, 25, 23, 0.18);
  box-shadow: 10px 10px 0 rgba(15, 118, 110, 0.12), 0 18px 34px rgba(24, 25, 23, 0.1);
}

.ppt-template-product.ppt-theme-technology {
  color: #eef8f6;
  background:
    linear-gradient(90deg, rgba(64, 220, 197, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(238, 248, 246, 0.055) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 84% 18%, rgba(244, 182, 64, 0.18), transparent 18%),
    #101817;
  background-size: 52px 52px, 52px 52px, auto, auto;
}

.ppt-template-product.ppt-theme-technology::before {
  top: 7%;
  left: 5.2%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #40dcc5;
  box-shadow: 19px 0 0 #f4b640, 38px 0 0 rgba(238, 248, 246, 0.7);
}

.ppt-template-product.ppt-theme-technology::after {
  inset: auto 5.4% 11% 5.4%;
  height: 1px;
  background: rgba(64, 220, 197, 0.45);
  box-shadow: 0 -104px 0 rgba(244, 182, 64, 0.1);
}

.ppt-template-product.ppt-theme-technology .ppt-slide-frame {
  border-color: rgba(238, 248, 246, 0.18);
}

.ppt-template-product.ppt-theme-technology .ppt-text-element-kicker,
.ppt-template-product.ppt-theme-technology li::marker {
  color: #f4b640;
}

.ppt-template-product.ppt-theme-technology .ppt-text-element-coverSubtitle,
.ppt-template-product.ppt-theme-technology .ppt-slide-author-mark,
.ppt-template-product.ppt-theme-technology > footer {
  color: #adc7c2;
}

.ppt-template-product.ppt-theme-technology .ppt-cover-mark {
  color: rgba(64, 220, 197, 0.16);
}

.ppt-template-product.ppt-theme-technology .ppt-slide-visual {
  border-color: rgba(244, 182, 64, 0.38);
  background: #182321;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
}

.ppt-template-retrospective.ppt-theme-warm {
  color: #202522;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(32, 37, 34, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(90deg, rgba(190, 74, 50, 0.12) 0 13%, transparent 13% 100%),
    #f7f8f4;
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.ppt-template-retrospective.ppt-theme-warm::before {
  left: 5.2%;
  top: 8%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #be4a32;
  box-shadow: 0 58px 0 #0f766e, 0 116px 0 #f4b640, 0 174px 0 rgba(32, 37, 34, 0.72);
}

.ppt-template-retrospective.ppt-theme-warm::after {
  inset: 8.5% auto 17% 5.5%;
  width: 1px;
  height: auto;
  background: rgba(32, 37, 34, 0.22);
  box-shadow: none;
}

.ppt-template-retrospective.ppt-theme-warm .ppt-slide-frame {
  border-color: rgba(32, 37, 34, 0.18);
}

.ppt-template-retrospective.ppt-theme-warm .ppt-text-element-kicker,
.ppt-template-retrospective.ppt-theme-warm li::marker {
  color: #be4a32;
}

.ppt-template-retrospective.ppt-theme-warm .ppt-text-element-coverSubtitle,
.ppt-template-retrospective.ppt-theme-warm .ppt-slide-author-mark,
.ppt-template-retrospective.ppt-theme-warm > footer {
  color: #66716b;
}

.ppt-template-retrospective.ppt-theme-warm .ppt-text-element-bullets li {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

.ppt-template-retrospective.ppt-theme-warm .ppt-cover-mark {
  color: rgba(190, 74, 50, 0.14);
}

.ppt-template-retrospective.ppt-theme-warm .ppt-slide-visual {
  border-color: rgba(190, 74, 50, 0.24);
  background: #ffffff;
  box-shadow: 0 20px 36px rgba(32, 37, 34, 0.12);
}

.ppt-image-job-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 20, 17, 0.46);
}

.ppt-image-job-modal[hidden] {
  display: none;
}

.ppt-image-job-dialog {
  width: min(760px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(111, 124, 115, 0.28);
  border-radius: 8px;
  background: #fffefa;
  box-shadow: 0 28px 80px rgba(14, 20, 17, 0.3);
}

.ppt-image-job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(111, 124, 115, 0.18);
}

.ppt-image-job-header span {
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.ppt-image-job-header h2 {
  margin: 3px 0 0;
  color: #17201c;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.ppt-image-job-summary {
  padding: 12px 20px;
  color: #64706a;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  border-bottom: 1px solid rgba(111, 124, 115, 0.16);
}

.ppt-image-job-summary.error {
  color: var(--danger);
}

.ppt-image-job-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(111, 124, 115, 0.16);
  background: #f8faf7;
}

.ppt-image-job-progress[hidden] {
  display: none;
}

.ppt-image-job-track {
  position: relative;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e2;
  box-shadow: inset 0 1px 2px rgba(22, 32, 24, 0.12);
}

.ppt-image-job-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #f4b640);
  transition: width 420ms ease;
  box-shadow: 0 0 16px rgba(15, 118, 110, 0.26);
}

.ppt-image-job-progress.is-running .ppt-image-job-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.68) 45%, transparent 58% 100%);
  transform: translateX(-100%);
  animation: ppt-image-progress-sheen 1.05s linear infinite;
}

.ppt-image-job-progress.is-stopping .ppt-image-job-fill {
  background: linear-gradient(90deg, #64706a, #9aa7a0);
}

.ppt-image-job-progress > span {
  min-width: 42px;
  color: #64706a;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

@keyframes ppt-image-progress-sheen {
  to {
    transform: translateX(100%);
  }
}

.ppt-image-job-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
  overflow-y: auto;
}

.ppt-image-job-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(111, 124, 115, 0.2);
  border-radius: 8px;
  background: #f8faf7;
}

.ppt-image-job-card.is-done {
  border-color: rgba(15, 118, 110, 0.34);
  background: #eef8f4;
}

.ppt-image-job-card.is-running {
  border-color: rgba(244, 182, 64, 0.42);
  background: #fff9ea;
}

.ppt-image-job-card.is-running .ppt-image-job-thumb {
  animation: ppt-image-thumb-pulse 1.15s ease-in-out infinite;
}

.ppt-image-job-card.is-error {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff4f2;
}

@keyframes ppt-image-thumb-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(244, 182, 64, 0.16);
  }
  50% {
    box-shadow: inset 0 0 0 999px rgba(244, 182, 64, 0.12);
  }
}

.ppt-image-job-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: rgba(15, 118, 110, 0.64);
  background: #fff;
}

.ppt-image-job-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ppt-image-job-thumb svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.ppt-image-job-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ppt-image-job-meta strong,
.ppt-image-job-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-image-job-meta strong {
  color: #17201c;
  font-size: 12px;
}

.ppt-image-job-meta span {
  color: #64706a;
  font-size: 11px;
  font-weight: 800;
}

.ppt-outline-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 14% 10%, rgba(124, 58, 237, 0.14), transparent 34%),
    rgba(22, 20, 27, 0.46);
  backdrop-filter: blur(5px);
}

.ppt-outline-modal[hidden] {
  display: none;
}

.ppt-outline-dialog {
  width: min(1050px, 100%);
  max-height: min(820px, calc(100dvh - 48px));
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 84px rgba(36, 24, 52, 0.24);
}

.ppt-outline-dialog-header,
.ppt-outline-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(232, 224, 244, 0.95);
  background: #fff;
}

.ppt-outline-dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(232, 224, 244, 0.95);
  border-bottom: 0;
}

.ppt-outline-dialog-header > div {
  min-width: 0;
}

.ppt-outline-dialog-header h2 {
  margin: 0;
  color: #7a7286;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

.ppt-outline-dialog-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 12px 20px 8px;
  overflow: hidden;
  background: #fff;
}

.ppt-outline-editor-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid #ece7f5;
  border-radius: 10px;
  background: #fff;
}

.ppt-outline-editor-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.ppt-outline-editor-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0eaf8;
  background: #fff;
}

.ppt-outline-editor-toolbar > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ppt-outline-editor-toolbar strong {
  min-width: 0;
  color: #171022;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ppt-outline-editor-toolbar span {
  color: #7a7286;
  font-size: 12px;
  line-height: 1.4;
}

.ppt-outline-modal-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.ppt-outline-document {
  min-width: 0;
  display: grid;
  padding: 24px 28px 18px 16px;
  background: #fff;
}

.ppt-outline-doc-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: start;
}

.ppt-outline-doc-row:not(:last-of-type)::before {
  position: absolute;
  top: 38px;
  bottom: -10px;
  left: 35px;
  width: 1px;
  background: #ece7f5;
  content: "";
}

.ppt-outline-doc-row + .ppt-outline-doc-row {
  margin-top: 10px;
}

.ppt-outline-rail-label {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  margin: 2px auto 0;
  border-radius: 4px;
  background: #f3edff;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ppt-outline-doc-content {
  min-width: 0;
  padding-left: 14px;
}

.ppt-outline-topic-row .ppt-outline-doc-content {
  display: grid;
  min-height: 42px;
  align-items: center;
}

.ppt-outline-toc-row .ppt-outline-doc-content,
.ppt-outline-modal-card .ppt-outline-doc-content {
  display: grid;
  gap: 12px;
}

.ppt-outline-tree-heading,
.ppt-outline-node-header,
.ppt-outline-tree-line,
.ppt-outline-toc-list li {
  min-width: 0;
  display: grid;
  align-items: start;
}

.ppt-outline-tree-heading {
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
}

.ppt-outline-tree-heading strong {
  color: #171022;
  font-size: 15px;
  line-height: 1.35;
}

.ppt-outline-caret {
  width: 0;
  height: 0;
  margin-top: 2px;
  border-top: 5px solid #4b5563;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.ppt-outline-toc-list {
  display: grid;
  gap: 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.ppt-outline-toc-list li {
  grid-template-columns: 10px 22px minmax(0, 1fr);
  gap: 8px;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
}

.ppt-outline-toc-list strong {
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ppt-outline-dot {
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border: 1px solid #d9dce3;
  border-radius: 50%;
  background: #fff;
}

.ppt-outline-node-header {
  grid-template-columns: 12px 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ppt-outline-node-number {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.ppt-outline-node-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ppt-outline-node-actions .icon-button {
  width: 30px;
  min-height: 30px;
}

.ppt-outline-node-actions svg {
  width: 15px;
  height: 15px;
}

.ppt-outline-node-body {
  display: grid;
  gap: 16px;
  padding-left: 42px;
}

.ppt-outline-tree-line {
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
}

.ppt-outline-tree-line.is-objective {
  margin-top: -3px;
}

.ppt-outline-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 20px;
}

.ppt-outline-support-grid > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.ppt-outline-support-grid span {
  color: #7a7286;
  font-size: 11px;
  font-weight: 800;
}

.ppt-outline-doc-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding-left: 0;
  color: #7a7286;
  font-size: 13px;
}

.ppt-outline-modal-card select {
  min-width: 0;
  min-height: 32px;
  font-size: 11px;
}

.ppt-outline-block-label {
  color: #64706a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

.ppt-outline-editable,
.ppt-outline-modal-card select {
  min-width: 0;
  width: 100%;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ppt-outline-editable:focus {
  outline: 0;
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.08);
}

.ppt-outline-editable:empty::before {
  color: #9aa59e;
  content: attr(aria-label);
}

.ppt-outline-editable-title,
.ppt-outline-editable-slide-title {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.ppt-outline-editable-kicker {
  min-height: 24px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.ppt-outline-editable-lines {
  min-height: 48px;
}

.ppt-outline-node-tags {
  min-width: 0;
  padding-top: 2px;
  color: #7c8981;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ppt-thumbnail-strip {
  display: flex;
  gap: 8px;
  min-height: 94px;
  padding: 12px 16px;
  overflow-x: auto;
  border-top: 1px solid rgba(111, 124, 115, 0.24);
  background: #f8faf7;
}

.ppt-thumbnail-strip .profile-empty {
  width: 100%;
  min-height: 64px;
  margin: 0;
}

.ppt-thumbnail {
  position: relative;
  flex: 0 0 142px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(111, 124, 115, 0.25);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.ppt-thumbnail:hover,
.ppt-thumbnail.is-active {
  border-color: #0f766e;
}

.ppt-thumbnail.is-active {
  box-shadow: inset 0 -3px #0f766e;
}

.ppt-thumbnail span {
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 900;
}

.ppt-thumbnail strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ppt-thumbnail svg {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  color: #0f766e;
}

.ppt-editor-panel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ppt-editor-panel fieldset:disabled {
  opacity: 0.58;
}

.ppt-image-actions .button {
  flex: 1;
}

@media (max-width: 1280px) {
  .ppt-workspace {
    grid-template-columns: 248px minmax(480px, 1fr) 260px;
  }

  .ppt-config-panel,
  .ppt-editor-panel {
    padding: 18px;
  }

  .ppt-stage {
    padding: 20px;
  }
}

@media (max-width: 1040px) {
  .ppt-shell {
    width: calc(100% - 20px);
  }

  .ppt-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .ppt-editor-panel {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(111, 124, 115, 0.24);
    border-left: 0;
  }

  .ppt-editor-panel fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .ppt-outline-dialog-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .ppt-outline-editor-shell {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .ppt-shell {
    padding-top: 78px;
  }

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

  .ppt-toolbar-actions {
    justify-content: flex-start;
  }

  .ppt-workspace {
    grid-template-columns: 1fr;
  }

  .ppt-config-panel,
  .ppt-editor-panel {
    border: 0;
    border-bottom: 1px solid rgba(111, 124, 115, 0.24);
  }

  .ppt-stage {
    min-height: 300px;
    padding: 14px;
  }

  .ppt-editor-panel fieldset {
    grid-template-columns: 1fr;
  }

  .ppt-settings-grid {
    grid-template-columns: 1fr;
  }

  .ppt-config-panel .field-header-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .ppt-outline-modal {
    padding: 10px;
  }

  .ppt-outline-dialog {
    max-height: calc(100dvh - 20px);
  }

  .ppt-outline-dialog-header,
  .ppt-outline-dialog-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .ppt-outline-dialog-footer .button {
    width: 100%;
  }

  .ppt-outline-dialog-body {
    padding: 12px;
  }

  .ppt-outline-editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ppt-outline-editor-toolbar .button {
    width: 100%;
  }

  .ppt-outline-document {
    padding: 16px 12px 14px 10px;
  }

  .ppt-outline-doc-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .ppt-outline-doc-row:not(:last-of-type)::before {
    left: 28px;
  }

  .ppt-outline-rail-label {
    width: 46px;
    font-size: 11px;
  }

  .ppt-outline-node-header {
    grid-template-columns: 12px 22px minmax(0, 1fr);
  }

  .ppt-outline-node-actions {
    grid-column: 3;
    justify-self: start;
    margin-top: 4px;
  }

  .ppt-outline-node-body {
    padding-left: 30px;
  }

  .ppt-outline-support-grid {
    grid-template-columns: 1fr;
    padding-left: 18px;
  }

  .ppt-slide > h2 {
    font-size: 22px;
  }

  .ppt-slide ul {
    gap: 8px;
    font-size: 13px;
  }

  .ppt-slide-cover-copy h2 {
    font-size: 28px;
  }

  .ppt-slide-cover-copy p {
    font-size: 12px;
  }
}
