
.app-root {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 首页图库需要整页滚动，对齐 demo body[data-page=home] overflow-y:auto */
body[data-page="home"] .app-root {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}
body[data-page="welcome"] .app-root {
  height: 100vh;
  overflow: hidden;
}
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.glass-tuner {
      position: absolute;
      right: 18px;
      top: 18px;
      z-index: 8;
      display: none;
      width: 400px;
      max-height: calc(100vh - 36px);
      padding: 16px 16px 12px;
      border-radius: 18px;
      background: rgba(36, 30, 28, 0.92);
      border: 1px solid var(--color-white-08);
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
      color: #ddd7d3;
      backdrop-filter: blur(20px) saturate(1.05);
      -webkit-backdrop-filter: blur(20px) saturate(1.05);
      overflow: auto;
}
body[data-page="home"] .glass-tuner {
      display: none;
}
.glass-tuner-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      font-size: 15px;
      font-weight: 700;
      line-height: 20px;
      letter-spacing: 0;
}
.glass-tuner-reset {
      height: 28px;
      padding: 0 12px;
      border-radius: 999px;
      background: var(--color-white-08);
      color: #ddd7d3;
      font-size: 12px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.glass-tuner-reset:hover {
      background: var(--color-white-18);
      color: var(--color-white);
}
.glass-tuner-reset:active {
      background: var(--color-white-08);
      transform: scale(0.96);
}
.glass-tuner-row {
      display: grid;
      grid-template-columns: 132px 1fr 44px;
      align-items: center;
      gap: 12px;
      min-height: 28px;
      font-size: 13px;
      color: #b6aeaa;
      line-height: 18px;
}
.glass-tuner-row input {
      width: 100%;
      accent-color: var(--color-violet);
      margin: 0;
}
.glass-tuner-row input[type="range"] {
      height: 20px;
      background: transparent;
      -webkit-appearance: none;
      appearance: none;
}
.glass-tuner-row input[type="range"]::-webkit-slider-runnable-track {
      height: 4px;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--color-violet) 0 var(--slider-progress, 50%), var(--color-white-18) var(--slider-progress, 50%) 100%);
}
.glass-tuner-row input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      margin-top: -6px;
      border: 0;
      border-radius: 50%;
      background: var(--color-violet);
      box-shadow: 0 0 0 3px rgba(143, 120, 255, 0.18);
}
.glass-tuner-row input[type="range"]::-moz-range-track {
      height: 4px;
      border: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--color-violet) 0 var(--slider-progress, 50%), var(--color-white-18) var(--slider-progress, 50%) 100%);
}
.glass-tuner-row input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border: 0;
      border-radius: 50%;
      background: var(--color-violet);
      box-shadow: 0 0 0 3px rgba(143, 120, 255, 0.18);
}
.glass-tuner-value {
      color: #9f9792;
      text-align: right;
      font-variant-numeric: tabular-nums;
}
.glass-tuner-group {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--color-white-08);
}
.glass-tuner-group-title {
      margin-bottom: 10px;
      color: #8f8a86;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.02em;
}
.glass-tuner-pair {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
}
.glass-tuner-chip {
      min-height: 30px;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: #d7d0cb;
      font-size: 12px;
      font-weight: 600;
}
.glass-tuner-color-row {
      grid-template-columns: 132px 34px 44px;
      justify-content: space-between;
}
.glass-tuner-swatch {
      width: 32px;
      height: 32px;
      padding: 0;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow: inset 0 0 0 1px var(--color-black-10);
      overflow: hidden;
}
.glass-tuner-swatch input {
      width: 44px;
      height: 44px;
      margin: -6px 0 0 -6px;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
}
.glass-tuner-swatch-value {
      display: block;
      width: 100%;
      height: 100%;
}
.glass-tuner-faint {
      color: #8f8a86;
      font-size: 12px;
}
.hero-generate-loading {
  position: absolute;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(248, 249, 251, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #424956;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: auto;
}

.hero-generate-spinner {
  width: 44px;
  height: 44px;
  animation: heroGenerateSpin 1.1s linear infinite;
}

@keyframes heroGenerateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

    /* UI：运行时实测 background #050505、文字 #dee2e9，优先于源码变量 */
.home-page.page-view {
      position: relative;
      height: auto;
      min-height: 100vh;
      overflow: visible;
      min-width: 960px;
      background: #050505;
      color: #dee2e9;
      font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}
.home-page.is-image-generating {
      pointer-events: none;
}
.home-page.is-image-generating .hero-generate-loading {
      position: fixed;
      pointer-events: auto;
}
.home-hero {
      position: relative;
      --home-browser-height: 113px;
      --home-toolbar-logo-overflow: 44px;
      height: max(100vh, 540px);
      min-width: 960px;
      overflow: clip;
      background: #050505;
}
.home-toolbar-boundary {
      position: absolute;
      z-index: 8;
      inset: 0 0 auto;
      height: calc(100% - 5.6vh - var(--home-browser-height) - var(--home-toolbar-logo-overflow));
      pointer-events: none;
}
.home-toolbar {
      position: sticky;
      z-index: 1;
      top: 0;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      height: 72px;
      padding: 16px 28px 0;
      color: #dee2e9;
      pointer-events: auto;
}
.home-toolbar-group {
      display: flex;
      align-items: center;
      gap: 16px;
}
.home-toolbar-menu,
    .home-toolbar-avatar {
      display: inline-grid;
      place-items: center;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: transparent;
      color: #dee2e9;
}
.home-toolbar-menu .home-menu-glyph {
      position: relative;
      display: block;
      width: 22px;
      height: 22px;
}
.home-toolbar-brand {
      position: absolute;
      left: 50%;
      top: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 70px;
      padding: 0;
      border: 0;
      background: transparent;
      transform: translateX(-50%);
      cursor: pointer;
}
.home-toolbar-logo {
      width: 70px;
      height: 100px;
      object-fit: contain;
      opacity: 0.88;
}
.home-toolbar-upload {
      position: absolute;
      z-index: 8;
      left: 50%;
      top: 150px;
      transform: translateX(-50%);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 130px;
      height: 44px;
      padding: 10px;
      border: 0;
      border-radius: 32px;
      background: #6b7280;
      color: #dee2e9;
      box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(255, 255, 255, 0.25);
      transition: background 180ms ease, color 180ms ease;
}
.home-toolbar-upload:hover,
    .home-toolbar-upload:focus-visible {
      background: #8993a3;
      color: #fff;
}
.home-toolbar-upload-icon,
    .home-toolbar-upload-icon :deep(svg) {
      width: 24px;
      height: 24px;
}
.home-toolbar-upload:disabled {
      opacity: 0.7;
      cursor: wait;
}
.home-file-input {
      position: absolute;
      width: 0;
      height: 0;
      opacity: 0;
      pointer-events: none;
}
.home-toolbar-menu:hover,
    .home-toolbar-menu:focus-visible {
      color: #fff;
      outline: none;
}
.home-toolbar-avatar {
      background: #dee2e9;
      color: #6b7280;
}
.home-toolbar-avatar::after {
      content: "";
      width: 10px;
      height: 5px;
      margin-top: 11px;
      border-radius: 50% 50% 45% 45%;
      background: #9ca4b3;
}
.home-menu-overlay {
      position: absolute;
      z-index: 9;
      top: 54px;
      left: 28px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;
      color: #dee2e9;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      visibility: hidden;
      pointer-events: none;
}
.home-menu-overlay.is-open {
      visibility: visible;
      pointer-events: auto;
}
.home-menu-nav-item {
      position: relative;
      opacity: 0;
      transform: translateY(-5px);
      white-space: nowrap;
      transition: opacity 180ms ease, color 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.home-menu-nav-item::before {
      content: "";
      position: absolute;
      top: 50%;
      left: -10px;
      width: 1px;
      height: 14px;
      background: currentColor;
      opacity: 0;
      transform: translateY(-50%) scaleY(0.45);
      transition: opacity 180ms ease, transform 180ms ease;
}
.home-menu-overlay.is-open .home-menu-nav-item:hover {
      opacity: 1;
      color: #fff;
      transform: translate(10px, 0);
      transition-delay: 0ms;
}
.home-menu-nav-item:hover::before {
      opacity: 1;
      transform: translateY(-50%) scaleY(1);
}
.home-menu-nav-divider {
      width: 100%;
      height: 1px;
      background: rgba(222, 226, 233, 0.58);
      opacity: 0;
      transform: scaleX(0);
      transform-origin: left;
      transition: opacity 180ms ease, transform 180ms ease;
}
.home-menu-overlay.is-open .home-menu-nav-item,
    .home-menu-overlay.is-open .home-menu-nav-divider {
      opacity: 1;
      transform: none;
      transition-delay: var(--home-menu-delay, 0ms);
}
.home-menu-overlay.is-open .home-menu-nav-divider {
      transform: scaleX(1);
}
.home-menu-overlay > :nth-child(1) { --home-menu-delay: 0ms;
}
.home-menu-overlay > :nth-child(2) { --home-menu-delay: 70ms;
}
.home-menu-overlay > :nth-child(3) { --home-menu-delay: 140ms;
}
.home-menu-overlay > :nth-child(4) { --home-menu-delay: 210ms;
}
.home-menu-overlay > :nth-child(5) { --home-menu-delay: 280ms;
}
.home-menu-overlay > :nth-child(6) { --home-menu-delay: 350ms;
}
.home-menu-overlay > :nth-child(7) { --home-menu-delay: 420ms;
}
.home-toolbar-menu { position: relative;
}
.home-menu-line {
      position: absolute;
      left: 0;
      width: 22px;
      height: 1.8px;
      border-radius: 1px;
      background: currentColor;
      transform-origin: center;
      transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms ease;
}
.home-menu-line--top { top: 4.1px;
}
.home-menu-line--middle { top: 10.1px;
}
.home-menu-line--bottom { top: 16.1px;
}
.home-toolbar-menu.is-open .home-menu-line--top { transform: translateY(6px) rotate(45deg);
}
.home-toolbar-menu.is-open .home-menu-line--middle { opacity: 0; transform: scaleX(0.35);
}
.home-toolbar-menu.is-open .home-menu-line--bottom { transform: translateY(-6px) rotate(-45deg);
}
.home-bottom-nav {
      position: absolute;
      z-index: 8;
      left: 50%;
      bottom: 18px;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      min-width: 84px;
      min-height: 40px;
      padding: 0 12px;
      transform: translateX(-50%);
      background: transparent;
      color: #dee2e9;
      font-size: 14px;
}
.home-bottom-nav-arrow,
    .home-bottom-nav-arrow :deep(svg) {
      width: 22px;
      height: 22px;
}
.home-bg {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: #050505;
}
.home-bg::before {
      content: "";
      position: absolute;
      inset: 0;
      background: url("/images/bg.png") left top / cover no-repeat;
}
.coverflow-stage {
      position: absolute;
      z-index: 1;
      left: 0;
      right: 0;
      top: 12vh;
      height: 60vh;
      min-height: 360px;
      perspective: 1200px;
      overflow: hidden;
      cursor: grab;
      touch-action: none;
      user-select: none;
}
.coverflow-stage:active { cursor: grabbing;
}
.coverflow-item {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(52vw, 1002px);
      height: min(46vh, 559px);
      max-height: 559px;
      min-width: 540px;
      transform-origin: center center;
      opacity: 0;
      transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 360ms ease;
      will-change: transform;
      cursor: pointer;
      overflow: hidden;
      border-radius: 2px;
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}
.coverflow-stage.no-anim .coverflow-item,
    .coverflow-stage.no-anim ~ .home-browser .coverflow-range-fill {
      transition: none;
}
.coverflow-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
}
.coverflow-item::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: rgba(0, 0, 0, var(--cover-mask, 0));
}
.coverflow-item[data-offset="0"] { opacity: 1; --cover-mask: 0; z-index: 6; transform: translate(-50%, -50%) translateX(0) translateZ(120px) scale(1); cursor: default;
}
.coverflow-item[data-offset="-1"] { opacity: 1; --cover-mask: 0.16; z-index: 5; transform: translate(-50%, -50%) translateX(-24vw) translateZ(-80px) rotateY(22deg) scale(0.8);
}
.coverflow-item[data-offset="1"] { opacity: 1; --cover-mask: 0.16; z-index: 5; transform: translate(-50%, -50%) translateX(24vw) translateZ(-80px) rotateY(-22deg) scale(0.8);
}
.coverflow-item[data-offset="-2"] { opacity: 1; --cover-mask: 0.32; z-index: 4; transform: translate(-50%, -50%) translateX(-36vw) translateZ(-180px) rotateY(30deg) scale(0.68);
}
.coverflow-item[data-offset="-2"],
    .coverflow-item[data-offset="2"] { opacity: 1; --cover-mask: 0.32; z-index: 4;
}
.coverflow-item[data-offset="2"] { transform: translate(-50%, -50%) translateX(36vw) translateZ(-180px) rotateY(-30deg) scale(0.68);
}
.coverflow-item[data-offset="-3"] { opacity: 1; --cover-mask: 0.48; z-index: 3; transform: translate(-50%, -50%) translateX(-47vw) translateZ(-260px) rotateY(36deg) scale(0.58);
}
.coverflow-item[data-offset="3"] { opacity: 1; --cover-mask: 0.48; z-index: 3; transform: translate(-50%, -50%) translateX(47vw) translateZ(-260px) rotateY(-36deg) scale(0.58);
}
.coverflow-item[data-offset="-4"] { opacity: 1; --cover-mask: 0.62; z-index: 2; transform: translate(-50%, -50%) translateX(-58vw) translateZ(-330px) rotateY(42deg) scale(0.5);
}
.coverflow-item[data-offset="4"] { opacity: 1; --cover-mask: 0.62; z-index: 2; transform: translate(-50%, -50%) translateX(58vw) translateZ(-330px) rotateY(-42deg) scale(0.5);
}
.coverflow-item[data-offset="hidden-left"] { opacity: 0; z-index: 1; transform: translate(-50%, -50%) translateX(-76vw) translateZ(-380px) rotateY(44deg) scale(0.46);
}
.coverflow-item[data-offset="hidden-right"] { opacity: 0; z-index: 1; transform: translate(-50%, -50%) translateX(76vw) translateZ(-380px) rotateY(-44deg) scale(0.46);
}
.home-browser {
      position: absolute;
      z-index: 2;
      left: 50%;
      bottom: 5.6vh;
      width: min(980px, 74vw);
      overflow: visible;
      transform: translateX(-50%);
}
.home-selection-glass {
      position: absolute;
      left: 50%;
      top: 70px;
      z-index: 7;
      width: 200px;
      height: 64px;
      border-radius: 32px;
      isolation: isolate;
      transform: translate(-50%, -50%);
      pointer-events: none;
      overflow: hidden;
      border: 1px solid #000;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0.3) 100%);
      box-shadow:
        inset 0 1.5px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1.5px 0 rgba(255, 255, 255, 0.4),
        inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}
.coverflow-range {
      position: relative;
      height: 5px;
      width: min(730px, 100%);
      margin: 0 auto 22px;
      background: #474747;
      overflow: visible;
      border-radius: 8px;
}
.coverflow-range input {
      position: absolute;
      inset: -16px 0;
      width: 100%;
      opacity: 0;
      pointer-events: none;
}
.coverflow-range-fill {
      position: absolute;
      top: -2px;
      left: var(--range-x, 0%);
      height: 9px;
      width: 38.6%;
      background: #d9d9d9;
      border-radius: 999px;
      transition: left 220ms ease;
      cursor: grab;
}
.coverflow-range.is-dragging .coverflow-range-fill {
      cursor: grabbing;
      transition: none;
}
.home-file-list {
      position: relative;
      z-index: 5;
      display: flex;
      align-items: center;
      gap: 20px;
      height: 86px;
      overflow-x: auto;
      overflow-y: visible;
      scrollbar-width: none;
      padding: 0 calc(50% - 100px);
}
.home-file-list::-webkit-scrollbar { display: none;
}
.home-file-row {
      display: flex;
      flex: 0 0 auto;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 150px;
      min-width: 0;
      min-height: 48px;
      padding: 6px 20px;
      border-radius: 32px;
      color: #dee2e9;
      opacity: 0.4;
      font-size: 16.162px;
      font-weight: 600;
      line-height: 24.242px;
}
.home-file-row.is-near { opacity: 0.8;
}
.home-file-row.is-middle { opacity: 0.6;
}
.home-file-row.is-active { width: 200px; opacity: 1;
}
.home-file-name {
      display: block;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
}
.home-file-date {
      color: #8e949f;
      font-size: 14.141px;
      font-weight: 600;
      line-height: 24.242px;
      white-space: nowrap;
}
.home-gallery {
      position: relative;
      z-index: 3;
      min-width: 960px;
      width: 100%;
      padding: 48px 11px 120px;
}
.home-gallery-header {
      position: sticky;
      top: 0;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      margin: 0 0 12px;
      padding: 10px 0;
      color: #fff;
}
.home-gallery-header.is-stuck {
      background: rgba(16, 16, 18, 0.88);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.home-gallery-title {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
}
.home-gallery-filters { display: flex; min-height: 30px;
}
.home-gallery-filter {
      height: 30px;
      padding: 4px 20px;
      border: 1px solid rgba(0, 0, 0, 0.01);
      border-radius: 32px;
      color: #fff;
      font-size: 12px;
      line-height: 20px;
}
.home-gallery-filter.is-active {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.2));
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -1px 1px rgba(255, 255, 255, 0.25);
}
.home-gallery-search {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 200px;
      width: 200px;
      height: 30px;
      padding: 4px 10px;
      border-radius: 32px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.2));
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -1px 1px rgba(255, 255, 255, 0.25);
      color: #fff;
}
.home-gallery-search-icon,
    .home-gallery-search-icon :deep(svg) {
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
}
.home-gallery-search input {
      width: 100%;
      height: 20px;
      border: 0;
      outline: 0;
      background: transparent;
      color: #fff;
      font: 400 12px/20px "PingFang SC", "Microsoft YaHei", sans-serif;
}
.home-gallery-search input::placeholder { color: #fff;
}
.home-gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
}
.home-gallery-card {
      display: flex;
      flex-direction: column;
      width: 100%;
      color: #e8ebef;
      text-align: left;
      cursor: pointer;
}
.home-gallery-media {
      position: relative;
      overflow: hidden;
      border-radius: 4px;
}
.home-gallery-card img {
      width: 100%;
      aspect-ratio: 330 / 186;
      border-radius: 4px;
      object-fit: cover;
      background: #222;
}
.home-gallery-card-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      min-width: 0;
      font-size: 16.162px;
      font-weight: 600;
      line-height: 24.242px;
}
.home-gallery-name {
      min-width: 0;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
}
.home-gallery-card-meta span:last-child {
      flex: 0 0 auto;
      color: #8e949f;
      font-size: 14.141px;
      font-weight: 500;
      white-space: nowrap;
}
.home-gallery-empty {
      grid-column: 1 / -1;
      padding: 48px 0;
      color: #9ca4b3;
      font-size: 14px;
      text-align: center;
}
.home-gallery-sentinel {
      min-height: 48px;
      padding: 16px 0 0;
      color: #9ca4b3;
      font-size: 13px;
      text-align: center;
}
.home-file-tip {
      position: fixed;
      z-index: 6500;
      max-width: min(420px, calc(100vw - 32px));
      padding: 8px 12px;
      border-radius: 8px;
      background: rgba(28, 29, 33, 0.94);
      color: #f3f5f8;
      font-size: 13px;
      font-weight: 500;
      line-height: 20px;
      word-break: break-all;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translate(-50%, calc(-100% - 6px));
      transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}
.home-file-tip.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translate(-50%, calc(-100% - 10px));
}
/* 生成页导出弹层：对齐 Demo .export-dialog-* */
.export-dialog-layer {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.export-dialog-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.export-dialog {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(350px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 16px;
  overflow-y: auto;
  border-radius: 32px;
  color: #424956;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.export-dialog-layer.is-open .export-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.export-dialog-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.export-dialog-content {
  display: grid;
  gap: 16px;
}

.export-preview-group {
  display: grid;
  gap: 10px;
}

.export-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.export-preview-toggle {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(181, 156, 156, 0.15);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(107, 114, 128, 0.05);
  color: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
  transition: background 150ms ease, color 150ms ease;
}

.export-preview-toggle.is-selected {
  background: #68778b;
  color: #fff;
  box-shadow: 0 1px 1px rgba(107, 114, 128, 0.05);
}

.export-preview-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dee2e9;
}

.export-action-list {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.export-board-action,
.export-format-trigger,
.export-dialog-cancel,
.export-dialog-submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(181, 156, 156, 0.15);
  color: #424956;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.export-board-action {
  gap: 10px;
  min-width: 100px;
}

.export-board-action .ui-svg {
  --ui-icon-size: 20px;
}

.export-board-action.is-selected,
.export-board-action:hover,
.export-format-trigger:hover,
.export-dialog-cancel:hover {
  background: #dee2e9;
}

.export-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}

.export-format-control {
  position: relative;
}

.export-format-trigger {
  min-width: 90px;
  gap: 10px;
}

.export-format-trigger .ui-svg,
.export-format-trigger svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.export-format-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 2px;
  min-width: 90px;
  padding: 6px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity 150ms ease, transform 150ms ease;
}

.export-format-control.is-open .export-format-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.export-format-option {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
}

.export-format-option:hover,
.export-format-option.is-selected {
  background: #dee2e9;
  color: #424956;
}

.export-dialog-actions {
  display: flex;
  gap: 10px;
}

.export-dialog-cancel,
.export-dialog-submit {
  justify-content: center;
  min-width: 80px;
}

.export-dialog-submit {
  background: #68778b;
  color: #f9f9f9;
}

.export-dialog-submit:hover {
  background: #59697e;
  transform: translateY(-1px);
}
/* 顶部工具栏弹出/收起：数值来自 Demo 运行时 computed style */

.demo-top-toolbar {
  --toolbar-panel: rgba(249, 249, 249, 0.84);
  --toolbar-line: rgba(255, 255, 255, 0.96);
  --toolbar-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  --toolbar-hover: rgba(222, 226, 233, 0.72);
  --toolbar-icon-hover: rgba(222, 226, 233, 0.78);
  --toolbar-active: #dee2e9;
  --toolbar-text: #424956;
  --toolbar-muted: #6b7280;
  --toolbar-shortcut: #9ca4b3;
  --toolbar-divider: rgba(156, 164, 179, 0.35);
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.demo-top-toolbar > * {
  pointer-events: auto;
}

.demo-top-toolbar .glass {
  background: var(--toolbar-panel);
  border: 0.8px solid var(--toolbar-line);
  box-shadow: var(--toolbar-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.demo-top-toolbar .top-left {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  display: flex !important;
  align-items: center;
  overflow: visible;
  gap: 10px;
  height: 40px;
  padding: 4px;
  border-radius: 31.2px;
}

.demo-top-toolbar .top-left-button,
.demo-top-toolbar .top-left-project {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--toolbar-muted);
  transition: background 150ms ease, transform 180ms ease;
}

.demo-top-toolbar .top-left-button {
  width: 32px;
  height: 32px;
  border-radius: 16px;
}

.demo-top-toolbar .top-left-button .ui-svg {
  --ui-icon-size: 20px;
}

.demo-top-toolbar .top-left-project {
  gap: 5px;
  height: 28px;
  padding: 4px;
  border-radius: 8px;
}

.demo-top-toolbar .brand-dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.demo-top-toolbar .top-left-project .ui-svg {
  --ui-icon-size: 10px;
  width: 10px;
  height: 10px;
}

.demo-top-toolbar .top-left-button:hover,
.demo-top-toolbar .top-left-button:focus-visible,
.demo-top-toolbar .top-left-project:hover,
.demo-top-toolbar .top-left-project:focus-visible {
  outline: none;
  background: var(--toolbar-hover);
}

.demo-top-toolbar .top-left-button:active,
.demo-top-toolbar .top-left-project:active {
  transform: scale(0.96);
}

.demo-top-toolbar .generation-menu {
  position: absolute;
  z-index: 20;
  top: 58px;
  left: 10px;
  width: 252px;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 16px;
  color: var(--toolbar-text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 150ms ease;
}

.demo-top-toolbar .generation-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.demo-top-toolbar .generation-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--toolbar-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
  transition: background 150ms ease;
}

.demo-top-toolbar .generation-menu-item:hover,
.demo-top-toolbar .generation-menu-item:focus-visible {
  outline: none;
  background: var(--toolbar-active);
}

.demo-top-toolbar .generation-menu-shortcut {
  margin-left: 16px;
  color: var(--toolbar-shortcut);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.demo-top-toolbar .generation-menu-caret {
  display: block;
  width: 14px;
  height: 14px;
  opacity: 0.64;
}

.demo-top-toolbar .generation-menu-divider {
  display: block;
  height: 1px;
  margin: 4px 8px;
  background: var(--toolbar-divider);
}

.demo-top-toolbar .generation-submenu {
  position: absolute;
  z-index: 21;
  top: var(--submenu-y, 0px);
  left: var(--submenu-x, 254px);
  width: 156px;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 16px;
  color: var(--toolbar-text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-4px);
  transform-origin: top left;
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 150ms ease;
}

.demo-top-toolbar .generation-submenu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.demo-top-toolbar .generation-submenu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--toolbar-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
  transition: background 150ms ease;
}

.demo-top-toolbar .generation-submenu-item:hover,
.demo-top-toolbar .generation-submenu-item:focus-visible,
.demo-top-toolbar .generation-submenu-item.is-selected {
  outline: none;
  background: var(--toolbar-active);
}

.demo-top-toolbar .top-tool,
.demo-top-toolbar .mode-toggle {
  position: absolute;
  z-index: 8;
  top: 10px;
  height: 40px;
  display: flex !important;
  align-items: center;
  padding: 4px;
  border-radius: 32px;
}

.demo-top-toolbar .top-tool {
  left: 160px;
}

.demo-top-toolbar .mode-toggle {
  left: 270px;
  color: var(--toolbar-muted);
}

.demo-top-toolbar .top-tool .icon-btn,
.demo-top-toolbar .mode-toggle .icon-btn {
  width: 40px;
  height: 32px;
  color: var(--toolbar-muted);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.demo-top-toolbar .top-tool .icon-btn:hover,
.demo-top-toolbar .mode-toggle .icon-btn:hover {
  background: var(--toolbar-icon-hover);
}

.demo-top-toolbar .mode-toggle .icon-btn.active {
  background: var(--toolbar-active);
}

.demo-top-toolbar .top-tool .icon-btn:active,
.demo-top-toolbar .mode-toggle .icon-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.demo-top-toolbar .top-tool .icon-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.demo-top-toolbar .top-tool .ui-svg,
.demo-top-toolbar .mode-toggle .ui-svg {
  --ui-icon-size: 20px;
}

.demo-top-toolbar .zoom-control {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: block !important;
}

.demo-top-toolbar .zoom {
  display: flex !important;
  position: static;
  width: 100px;
  height: 40px;
  justify-content: center;
  align-items: center;
  padding: 4px;
  border-radius: 32px;
  color: var(--toolbar-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.demo-top-toolbar .zoom:hover,
.demo-top-toolbar .zoom:focus-visible {
  background: var(--toolbar-panel);
}

.demo-top-toolbar .zoom:active {
  transform: scale(0.98);
}

.demo-top-toolbar .zoom-menu {
  position: absolute;
  top: 48px;
  right: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: 128px;
  padding: 6px;
  border-radius: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition: opacity 160ms ease, visibility 160ms ease, transform 180ms ease;
}

.demo-top-toolbar .zoom-control.is-open .zoom-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.demo-top-toolbar .zoom-menu-option {
  min-width: 0;
  height: 30px;
  border-radius: 999px;
  color: var(--toolbar-muted);
  font-size: 12px;
  line-height: 30px;
  text-align: center;
  transition: background 150ms ease, color 150ms ease;
}

.demo-top-toolbar .zoom-menu-option:hover,
.demo-top-toolbar .zoom-menu-option.is-active {
  background: var(--toolbar-active);
  color: var(--toolbar-text);
}

.demo-top-toolbar .mode-shortcut-feedback {
  position: absolute;
  z-index: 18;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 32px;
  color: var(--toolbar-text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 180ms ease;
}

.demo-top-toolbar .mode-shortcut-feedback.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.demo-top-toolbar .mode-shortcut-feedback-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 64px;
}

.demo-top-toolbar .mode-shortcut-feedback-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: var(--toolbar-muted);
}

.demo-top-toolbar .mode-shortcut-feedback-icon .ui-svg {
  --ui-icon-size: 32px;
}

.demo-top-toolbar .mode-shortcut-feedback-item.is-active .mode-shortcut-feedback-icon {
  background: var(--toolbar-active);
}

.demo-top-toolbar .mode-shortcut-feedback-label {
  color: var(--toolbar-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.demo-top-toolbar .mode-shortcut-feedback-item:not(.is-active) .mode-shortcut-feedback-label {
  visibility: hidden;
}

.demo.is-sidebar-focus-mode .demo-top-toolbar .top-tool,
.demo.is-sidebar-focus-mode .demo-top-toolbar .mode-toggle,
.demo.is-sidebar-focus-mode .demo-top-toolbar .zoom-control,
.demo.is-sidebar-focus-mode .side-stack,
.demo.is-sidebar-focus-mode .right-rail,
.demo.is-sidebar-focus-mode .history-panel,
.demo.is-sidebar-focus-mode .demo-prompt,
.demo.is-sidebar-focus-mode .selection-summary,
.demo.is-sidebar-focus-mode .mode-shortcut-feedback,
.demo.is-sidebar-focus-mode .page-switch {
  display: none !important;
}

.demo.is-sidebar-focus-mode .demo-top-toolbar .top-left-project .ui-svg {
  display: none;
}

.demo .page-switch {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .demo-top-toolbar .generation-menu,
  .demo-top-toolbar .generation-submenu,
  .demo-top-toolbar .zoom-menu,
  .demo-top-toolbar .mode-shortcut-feedback,
  .demo-top-toolbar .icon-btn,
  .demo-top-toolbar .top-left-button,
  .demo-top-toolbar .zoom {
    transition-duration: 0.01ms !important;
  }
}

.color-popover {
      position: absolute;
      z-index: 1000;
      left: var(--popover-x, 170px);
      top: var(--popover-y, 24px);
      width: 232px;
      padding: 16px;
      border-radius: 32px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: auto;
      opacity: 0;
      visibility: hidden;
      transform: translate(8px, -8px) scale(0.96);
      transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 180ms ease;
      user-select: none;
}
.color-popover.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translate(0, 0) scale(1);
}
.color-popover.dragging {
      transition: none;
}
.color-popover-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 24px;
      cursor: grab;
}
.color-popover.dragging .color-popover-header {
      cursor: grabbing;
}
.color-popover-title {
      color: var(--strong);
      font-size: 16px;
      font-weight: 600;
      line-height: 24px;
}
.color-popover-close {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: var(--soft);
      color: var(--strong);
      font-size: 18px;
      line-height: 1;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.color-popover-close:hover {
      background: #68778b;
      color: #ffffff;
}
.color-popover-close:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
}
.color-popover-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 32px;
      flex-shrink: 0;
}
.color-popover-label {
      width: 24px;
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      line-height: 20px;
}
.color-value {
      width: 160px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      background: rgba(181, 156, 156, 0.15);
      color: var(--strong);
      font-size: 12px;
      font-weight: 600;
      line-height: 20px;
}
.color-value-swatch {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      background: var(--current-color, #ab0d0d);
}
.color-rgb-code {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      white-space: nowrap;
}
.color-rgb-component-group {
      display: flex;
      align-items: center;
      gap: 1px;
}
.color-rgb-component {
      width: 24px;
      min-width: 0;
      padding: 0;
      border: 0;
      outline: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      line-height: inherit;
      text-align: center;
}
.color-rgb-component:focus-visible {
      border-radius: 4px;
      box-shadow: 0 0 0 2px rgba(104, 119, 139, 0.28);
}
.color-recommend {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 200px;
      flex-shrink: 0;
}
.color-recommend-title {
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      line-height: 20px;
}
.color-recommend-grid {
      display: grid;
      grid-template-columns: repeat(5, 32px);
      gap: 10px;
      width: 200px;
}
.color-recommend-swatch {
      position: relative;
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: var(--swatch);
      overflow: hidden;
      box-shadow: none;
      color: #fff;
}
.color-recommend-swatch::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.color-recommend-swatch.is-active::after {
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.color-recommend-swatch .swatch-check {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: none;
      place-items: center;
      border: 0;
      background: transparent;
      color: var(--color-white);
      font-size: 12px;
      line-height: 1;
}
.color-recommend-swatch.is-active .swatch-check {
      display: grid;
}
.color-divider {
      width: 192px;
      height: 0;
      border-top: 1px solid var(--color-black-18);
      opacity: 0.55;
      flex-shrink: 0;
}
.color-plane {
      position: relative;
      width: 192px;
      height: 192px;
      border-radius: 8px;
      overflow: hidden;
      background:
        linear-gradient(to top, var(--color-black) 0%, rgba(0, 0, 0, 0) 68%),
        linear-gradient(to right, var(--color-white) 0%, var(--current-hue-color, var(--color-deep-red)) 100%);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
      touch-action: none;
      cursor: crosshair;
      flex-shrink: 0;
}
.color-plane-thumb {
      position: absolute;
      left: var(--plane-thumb-x, 176px);
      top: var(--plane-thumb-y, 92px);
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--current-color, var(--color-deep-red));
      border: 4px solid var(--color-white);
      box-shadow: 0 4px 16px var(--color-black-24);
      transform: translate(-50%, -50%);
      pointer-events: none;
}
.hue-strip {
      position: relative;
      width: 192px;
      height: 20px;
      border-radius: 999px;
      background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
      touch-action: none;
      cursor: pointer;
      flex-shrink: 0;
}
.hue-strip::before {
      content: "";
      position: absolute;
      left: var(--hue-thumb-x, 0px);
      top: 50%;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--current-color, #f00);
      border: 3px solid var(--color-white);
      box-shadow: 0 4px 16px rgba(250, 175, 145, 0.9);
      transform: translate(-50%, -50%);
}
.color-popover-confirm {
      width: 100%;
      height: 32px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: var(--soft);
      color: var(--strong);
      font-size: 14px;
      font-weight: 600;
      line-height: 24px;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
      flex-shrink: 0;
}
.color-popover-confirm:hover {
      background: var(--active-bg);
      color: var(--icon-active);
      box-shadow: var(--selected-shadow);
}
.color-popover-confirm:active {
      background: var(--color-accent-hover);
      transform: scale(0.96);
}
.material-popover {
      position: absolute;
      z-index: 1001;
      left: var(--material-popover-x, 200px);
      top: var(--material-popover-y, 120px);
      width: 232px;
      padding: 16px;
      border-radius: 32px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: auto;
      opacity: 0;
      visibility: hidden;
      transform: translate(8px, -8px) scale(0.96);
      transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 180ms ease;
      user-select: none;
}
.material-popover.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translate(0, 0) scale(1);
}
.material-popover.dragging {
      transition: none;
}
.material-popover-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 24px;
      cursor: grab;
}
.material-popover.dragging .material-popover-header {
      cursor: grabbing;
}
.material-popover-title {
      color: var(--strong);
      font-size: 16px;
      font-weight: 600;
      line-height: 24px;
}
.material-popover-close {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: var(--soft);
      color: var(--strong);
      font-size: 18px;
      line-height: 1;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.material-popover-close:hover {
      background: var(--active-bg);
      color: var(--icon-active);
}
.material-popover-close:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
}
.material-controls {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
}
.material-control {
      position: relative;
      height: 28px;
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid rgba(181, 156, 156, 0.15);
      background: var(--color-white);
      box-shadow: 0 1px 2px rgba(107, 114, 128, 0.05);
      cursor: ew-resize;
}
.material-control-fill {
      position: absolute;
      inset: -1px auto -1px -1px;
      width: calc(var(--value, 50) * 1%);
      background: rgba(181, 156, 156, 0.15);
}
.material-control-content {
      position: absolute;
      left: 10px;
      right: 10px;
      top: 50%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transform: translateY(-50%);
      font-size: 12px;
      line-height: 20px;
}
.material-control-name {
      width: 70px;
      color: var(--text);
      font-weight: 600;
}
.material-control-value {
      width: 28px;
      color: var(--strong);
      text-align: right;
      line-height: 16px;
}
.material-popover-confirm {
      width: 100%;
      height: 32px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: var(--soft);
      color: var(--strong);
      font-size: 14px;
      font-weight: 600;
      line-height: 24px;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.material-popover-confirm:hover {
      background: var(--active-bg);
      color: var(--icon-active);
      box-shadow: var(--selected-shadow);
}
.material-popover-confirm:active {
      background: var(--color-accent-hover);
      transform: scale(0.96);
}
.state-chip {
      position: absolute;
      left: 10px;
      bottom: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      height: 36px;
      min-width: 0;
      max-width: min(420px, calc(100vw - 20px));
      padding: 0 12px;
      border-radius: 18px;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
      pointer-events: auto;
      transition: opacity var(--motion-fast) var(--motion-ease), visibility var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}
.state-chip > svg {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
}
.state-chip > span:last-child {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
}
.state-chip:hover {
      background: var(--color-interaction-hover);
      color: var(--strong);
      box-shadow: var(--interaction-shadow);
      transform: translateY(-1px);
}
.state-chip:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
}
.state-chip.is-hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(6px);
}
.selection-summary {
      position: absolute;
      left: 10px;
      bottom: 10px;
      z-index: 12;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: opacity 180ms ease, visibility 180ms ease, transform 200ms ease;
}
.selection-summary.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
}
.selection-preview-card {
      width: 180px;
      padding: 16px;
      border-radius: 32px;
      pointer-events: auto;
}
.selection-preview-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      gap: 10px;
}
.selection-preview-title {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--strong);
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
}
.selection-preview-toggle {
      display: grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      color: var(--strong);
      background: rgba(255, 255, 255, 0.34);
      transition: transform 220ms ease, background 220ms ease, color 220ms ease, opacity 220ms ease;
      flex: 0 0 auto;
}
.selection-preview-toggle:hover {
      background: var(--color-interaction-hover);
      color: var(--strong);
}
.selection-preview-toggle:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
}
.selection-preview-card.is-collapsed .selection-preview-toggle {
      transform: rotate(180deg);
}
.selection-apply {
      height: 20px;
      padding: 0 10px;
      border-radius: 10px;
      background: var(--soft);
      color: var(--strong);
      font-size: 12px;
      font-weight: 600;
      line-height: 20px;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.selection-apply:hover {
      background: var(--color-interaction-hover);
}
.selection-apply:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
}
.selection-preview-card.is-hovering .selection-apply {
      opacity: 0;
      visibility: hidden;
}
.selection-preview-body {
      overflow: hidden;
      max-height: var(--preview-body-height, 220px);
      opacity: 1;
      transform: translateY(0);
      transition: max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
      will-change: opacity, transform;
}
.selection-preview-card.is-collapsed .selection-preview-body {
      max-height: 0;
      opacity: 0;
      transform: translateY(-8px);
}
.selection-preview-body-inner {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-top: 10px;
}
.selection-thumb {
      position: relative;
      width: 148px;
      height: 148px;
      overflow: hidden;
      border-radius: 16px;
      background: #eef0f3;
}
.selection-thumb img {
      width: 100%;
      height: 100%;
      display: none;
      object-fit: cover;
}
.selection-thumb.has-image img {
      display: block;
}
.selection-thumb.has-image.is-material-adjustable,
    .selection-thumb.has-image.is-color-adjustable {
      cursor: pointer;
}
.selection-thumb.has-material-adjustment img,
    .selection-thumb.has-material-adjustment .selection-thumb-swatch {
      filter: var(--material-preview-filter, none);
      transition: filter 140ms ease;
}
.selection-color-strip {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 148px;
      height: 0;
      min-height: 0;
      margin-top: -10px;
      padding: 0;
      border: 0;
      border-radius: 999px;
      color: var(--color-white);
      font: 600 11px/20px PingFang SC, sans-serif;
      letter-spacing: 0;
      text-transform: uppercase;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
      overflow: hidden;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(4px) scaleY(0.7);
      transform-origin: center top;
      transition: height 180ms ease, margin-top 180ms ease, opacity 160ms ease, visibility 160ms ease, transform 180ms ease;
      cursor: pointer;
}
.selection-color-strip-value {
      pointer-events: none;
      text-shadow: 0 1px 2px var(--color-black-28);
}
.color-rgb-display {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
}
.color-rgb-display-group {
      display: inline-flex;
      align-items: center;
      gap: 1px;
}
.selection-summary.has-color .selection-color-strip {
      height: 20px;
      margin-top: 0;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      pointer-events: auto;
}
.selection-thumb-swatch {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      background: radial-gradient(circle at 42% 36%, rgba(255,255,255,0.9) 0 6%, var(--summary-color, var(--color-danger)) 7% 45%, #6f1d1d 72%, #3d0d0d 100%);
}
.selection-thumb.has-image .selection-thumb-swatch {
      display: none;
}
.selection-thumb-swatch::after {
      content: "";
      width: 76px;
      height: 76px;
      border-radius: 50%;
      background: radial-gradient(circle at 32% 24%, rgba(255,255,255,0.62), transparent 26%),
        radial-gradient(circle at 58% 66%, rgba(0,0,0,0.26), transparent 46%),
        var(--summary-color, var(--color-danger));
      box-shadow: 0 18px 28px var(--color-black-24);
}
.selection-tags {
      display: flex;
      align-items: center;
      gap: 10px;
      max-width: 360px;
      flex-wrap: wrap;
}
.selection-tag {
      position: relative;
      display: inline-flex;
      align-items: center;
      height: 36px;
      padding: 8px 12px;
      border-radius: 32px;
      color: var(--strong);
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
      pointer-events: auto;
      cursor: default;
      background: var(--color-surface);
      border: 1px solid var(--color-white);
      box-shadow: 0 8px 32px var(--color-black-15), inset 0 1px 1px var(--color-white-96);
}
.selection-tag-close {
      position: absolute;
      right: -6px;
      top: -6px;
      z-index: 2;
      display: grid;
      place-items: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--soft);
      color: var(--strong);
      font-size: 14px;
      line-height: 16px;
      opacity: 0;
      transform: scale(0.86);
      pointer-events: none;
      transition: opacity 140ms ease, transform 140ms ease, background 140ms ease, color 140ms ease;
}
.selection-tag:hover .selection-tag-close {
      opacity: 1;
      transform: scale(1);
      pointer-events: auto;
}
.selection-tag-close:hover {
      background: var(--active-bg);
      color: var(--icon-active);
}
.selection-tag-close:active {
      background: var(--color-accent-hover);
      transform: scale(0.92);
}

.top-left,
.top-tool,
.history-tools,
.mode-toggle,
.zoom,
.zoom-control,
.prompt {
  display: none !important;
}
.history-panel {
  position: absolute;
  right: 57px;
  top: 50%;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 256px;
  overflow: hidden;
  border-radius: 32px;
  color: var(--color-text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: right var(--history-origin-y, 50%);
  transform: translate(47px, -50%) scale(0.18);
  height: auto;
  max-height: min(712px, calc(100vh - 32px));
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}
.history-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
}
.history-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 100%;
  min-height: 0;
  padding: 10px 10px 0 10px;
  margin-right: -4px;
  overflow-x: hidden;
  overflow-y: auto;
}
.history-list::-webkit-scrollbar {
  display: none;
}
.history-sentinel {
  flex: 0 0 1px;
  height: 1px;
}
.history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 16px 16px 16px 8px;
  border-radius: 16px;
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease);
}
.history-item:hover {
  background: var(--color-interaction-hover);
}
.history-item.is-active,
.history-item.is-edit-selected {
  background: var(--color-interaction-selected);
}
.history-item:active {
  background: var(--color-interaction-pressed);
  transform: scale(0.98);
}
.history-item.is-draggable {
  cursor: grab;
}
.history-item.is-dragging {
  opacity: 0.55;
}
.history-drag-preview {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: -1;
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  padding: 48px;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}
.history-drag-preview::before {
  content: "";
  position: absolute;
  inset: 40px;
  border-radius: 16px;
  background: rgba(249, 249, 249, 0.94);
  border: 1px solid var(--color-white-96);
  box-shadow:
    0 10px 30px var(--color-black-18),
    inset 0 1px 1px var(--color-white-92);
}
.history-drag-preview img {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}
.history-drag-preview.is-image-preview {
  width: 196px;
  height: 140px;
  padding: 30px 48px;
}
.history-drag-preview.is-image-preview::before {
  inset: 20px 28px;
}
.history-drag-preview.is-image-preview img {
  width: 100px;
  height: auto;
  max-height: 70px;
  object-fit: contain;
}
.history-drag-preview .demo-prompt-attachment-swatch {
  position: relative;
  z-index: 1;
}
.history-item.is-filtered-out {
  display: none;
}
.history-item[data-linked-result="true"]:not(.is-linked-result-visible) {
  display: none;
}
.history-item:hover .history-icon {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 4px rgba(104, 119, 139, 0.25);
}
.history-panel.is-editing
  .history-item:not(.is-edit-selected):hover
  .history-icon {
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 4px 8px var(--color-black-10);
}
.history-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 4px 8px var(--color-black-10);
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}
.history-item.is-active .history-icon {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 4px rgba(104, 119, 139, 0.25);
}
.history-panel.is-editing .history-item.is-edit-selected .history-icon {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 4px rgba(104, 119, 139, 0.25);
}
.history-icon .ui-svg {
  --ui-icon-size: 16px;
  transition:
    width 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.history-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 28px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  transform: translateY(var(--history-title-y, 0));
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.history-panel.mode-list .history-meta {
  --history-title-y: 2px;
}
.history-panel.mode-large .history-meta {
  --history-title-y: -1px;
}
.history-item.is-active .history-title {
  color: var(--color-strong);
}
.history-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-title strong {
  color: var(--color-accent);
  font-weight: 600;
}
.history-time {
  flex: 0 0 auto;
  color: var(--color-text);
  font-size: 10px;
  font-weight: 400;
  line-height: 20px;
}
.history-thumb {
  position: relative;
  width: var(--history-thumb-w, 100px);
  height: var(--history-thumb-h, 55px);
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-soft);
  box-shadow: 0 4px 16px var(--color-black-10);
  opacity: var(--history-thumb-opacity, 1);
  transform: translateY(var(--history-thumb-y, 0))
    scale(var(--history-thumb-scale, 1));
  transform-origin: left top;
  transition:
    width 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.history-thumb-base,
.history-thumb-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
.history-thumb-overlay {
  z-index: 1;
}
.history-item[data-history-kind="ppt-generated"] .history-thumb {
  width: 140px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.history-ppt-stack {
  position: relative;
  width: 140px;
  height: 55px;
  overflow: visible;
}
.history-ppt-stack img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 55px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 16px var(--color-black-10);
}
.history-ppt-stack img:nth-child(2) {
  left: 20px;
  opacity: 0.8;
  z-index: 1;
}
.history-ppt-stack img:nth-child(3) {
  left: 40px;
  opacity: 0.6;
  z-index: 0;
}
.history-ppt-stack img:nth-child(1) {
  z-index: 2;
}
.history-panel.mode-list
  .history-item[data-history-kind="ppt-generated"]
  .history-ppt-stack,
.history-panel.mode-list
  .history-item[data-history-kind="ppt-generated"]
  .history-thumb {
  height: 0;
}
.history-panel.mode-large
  .history-item[data-history-kind="ppt-generated"]
  .history-thumb {
  width: 100%;
  height: 100px;
}
.history-panel.mode-large
  .history-item[data-history-kind="ppt-generated"]
  .history-ppt-stack {
  width: 100%;
  height: 100px;
}
.history-panel.mode-large
  .history-item[data-history-kind="ppt-generated"]
  .history-ppt-stack
  img {
  width: 100px;
  height: 100px;
}
.history-panel.is-selection-filter .history-thumb-overlay {
  filter: brightness(0) saturate(100%) invert(52%) sepia(66%) saturate(316%)
    hue-rotate(311deg) brightness(83%) contrast(121%);
}
.history-panel.is-selection-filter
  .history-item[data-history-kind="lasso"]
  .history-thumb-base {
  filter: grayscale(1) contrast(0.72);
}
.history-panel.mode-list .history-thumb {
  --history-thumb-h: 0px;
  --history-thumb-opacity: 0;
  --history-thumb-y: -6px;
  --history-thumb-scale: 0.92;
}
.history-panel.mode-large .history-thumb {
  --history-thumb-w: 100%;
  --history-thumb-h: 100px;
  --history-thumb-scale: 1;
}
.history-panel.mode-small
  .history-item[data-history-kind="material-generated"]
  .history-thumb {
  --history-thumb-h: 100px;
}
.history-panel.mode-large
  .history-item[data-history-kind="material-generated"]
  .history-thumb {
  height: auto;
  aspect-ratio: 1 / 1;
}
.history-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.history-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: -webkit-fill-available;
  padding: 0 15px;
  height: 30px;
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: height 220ms ease;
}
.history-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-height: 0;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 220ms ease,
    opacity 160ms ease,
    transform 200ms ease;
}
.history-edit-actions {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 20px;
}
.history-edit-count {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}
.history-edit-action-group {
  display: flex;
  align-items: center;
  gap: 20px;
}
.history-edit-download,
.history-edit-link,
.history-edit-cancel {
  display: grid;
  place-items: center;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}
.history-edit-link {
  display: none;
}
.history-edit-download,
.history-edit-link {
  width: 20px;
  height: 20px;
}
.history-edit-download .ui-svg,
.history-edit-link .ui-svg {
  --ui-icon-size: 20px;
  width: 20px;
  height: 20px;
}
.history-edit-download:hover,
.history-edit-link:hover,
.history-edit-cancel:hover {
  color: var(--color-strong);
}
.history-panel.can-link-selection .history-edit-link {
  display: grid;
}
.history-panel.is-editing .history-footer-info,
.history-panel.is-editing .history-footer-brand {
  display: none;
}
.history-panel.is-editing .history-edit-actions {
  display: flex;
}
.history-panel.is-footer-visible .history-footer-info {
  max-height: 20px;
  opacity: 1;
  transform: translateY(0);
}
.history-footer-brand {
  width: 100%;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  transition:
    opacity 160ms ease,
    transform 200ms ease;
}
.history-panel.is-footer-visible .history-footer-brand {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}
.history-footer-edit {
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}
.history-footer-edit:hover {
  color: var(--color-strong);
}
.history-item.is-generating .history-generation-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  opacity: 0.4;
}
.history-generation-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 50px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0.78;
  transition: opacity 160ms ease;
}
.history-generation-stop {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px;
  height: 32px;
  border-radius: 32px;
  background: #68778b;
  box-shadow: 0 2px 4px rgba(104, 119, 139, 0.25);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.94);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.history-item.is-generating .history-thumb:hover .history-generation-stop {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.history-item.is-generating .history-thumb:hover .history-generation-logo {
  opacity: 0;
}
.history-item.is-generating .history-icon {
  background: #fff;
  color: #6b7280;
}
.history-item.is-generating .history-icon .ui-svg {
  animation: historyGeneratingSpin 1s linear infinite;
}
@keyframes historyGeneratingSpin {
to { transform: rotate(360deg);
}
}

.ppt-result-view {
      position: absolute;
      inset: 0;
      z-index: 2;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 280ms ease, visibility 280ms ease;
}
.demo.is-ppt-mode.is-ppt-result::after {
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
}
.demo.is-ppt-result .hero-stage {
      opacity: 0;
      visibility: hidden;
      transition: opacity 280ms ease, visibility 280ms ease;
}
.demo.is-ppt-result .ppt-result-view,
    .ppt-result-view.is-visible {
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
}
.ppt-result-view .coverflow-stage {
      position: absolute;
      z-index: 1;
      left: 0;
      right: 0;
      top: 8vh;
      height: 60vh;
      min-height: 360px;
      perspective: 1200px;
      overflow: hidden;
      cursor: grab;
      touch-action: none;
      user-select: none;
}
.ppt-result-view .coverflow-item {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(52vw, 1002px);
      height: min(46vh, 559px);
      max-height: 559px;
      min-width: 540px;
      transform-origin: center center;
      opacity: 0;
      transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 360ms ease;
      overflow: hidden;
      border-radius: 2px;
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}
.ppt-result-view .coverflow-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
}
.ppt-result-view .coverflow-item::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: rgba(0, 0, 0, var(--cover-mask, 0));
}
.ppt-result-view .coverflow-item[data-offset="0"] { opacity: 1; --cover-mask: 0; z-index: 6; transform: translate(-50%, -50%) translateX(0) translateZ(120px) scale(1); cursor: default;
}
.ppt-result-view .coverflow-item[data-offset="-1"] { opacity: 1; --cover-mask: 0.16; z-index: 5; transform: translate(-50%, -50%) translateX(-24vw) translateZ(-80px) rotateY(22deg) scale(0.8);
}
.ppt-result-view .coverflow-item[data-offset="1"] { opacity: 1; --cover-mask: 0.16; z-index: 5; transform: translate(-50%, -50%) translateX(24vw) translateZ(-80px) rotateY(-22deg) scale(0.8);
}
.ppt-result-view .coverflow-item[data-offset="-2"] { opacity: 1; --cover-mask: 0.32; z-index: 4; transform: translate(-50%, -50%) translateX(-36vw) translateZ(-180px) rotateY(30deg) scale(0.68);
}
.ppt-result-view .coverflow-item[data-offset="2"] { opacity: 1; --cover-mask: 0.32; z-index: 4; transform: translate(-50%, -50%) translateX(36vw) translateZ(-180px) rotateY(-30deg) scale(0.68);
}
.ppt-result-stage {
      top: 8vh;
      height: 60vh;
}
.ppt-result-browser {
      position: absolute;
      left: 50%;
      bottom: 78px;
      z-index: 4;
      width: min(730px, 72vw);
      transform: translateX(-50%);
      pointer-events: auto !important;
}
.ppt-result-browser .coverflow-range {
      position: relative;
      width: 100%;
      margin: 0;
      background: var(--color-soft);
      pointer-events: auto !important;
      height: 5px;
      border-radius: 999px;
}
.ppt-result-browser .coverflow-range-fill {
      position: absolute;
      top: -2px;
      left: var(--range-x, 0%);
      height: 9px;
      width: 38.6%;
      background: var(--color-muted);
      border-radius: 999px;
      transition: left 120ms ease;
      cursor: pointer;
}
.ppt-result-browser .coverflow-range.is-dragging .coverflow-range-fill {
      transition: none;
}
.ppt-result-browser input[type="range"] {
      pointer-events: none;
      opacity: 0;
      height: 4px;
      background: transparent;
      -webkit-appearance: none;
      appearance: none;
}
.ppt-result-browser input[type="range"]::-webkit-slider-runnable-track {
      height: 4px;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--color-muted, #9ca4b3) 0 var(--slider-progress, 50%), var(--color-soft, #dee2e9) var(--slider-progress, 50%) 100%);
}
.ppt-result-browser input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      margin-top: -6px;
      border: 0;
      border-radius: 50%;
      background: #8f78ff;
      box-shadow: 0 0 0 3px rgba(143, 120, 255, 0.18);
      cursor: pointer;
}
.ppt-result-browser input[type="range"]::-moz-range-track {
      height: 4px;
      border: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--color-muted, #9ca4b3) 0 var(--slider-progress, 50%), var(--color-soft, #dee2e9) var(--slider-progress, 50%) 100%);
}
.ppt-result-browser input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border: 0;
      border-radius: 50%;
      background: #8f78ff;
      box-shadow: 0 0 0 3px rgba(143, 120, 255, 0.18);
      cursor: pointer;
}

.ppt-generating-view {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.demo.is-ppt-generating .ppt-generating-view,
.ppt-generating-view.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.ppt-generating-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(827px, 68vw);
  max-height: 72vh;
  overflow: hidden;
  transform: translate(-50%, -50%);
  color: #9ca4b3;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 32px;
  white-space: pre-wrap;
  word-break: break-word;
  transition: opacity 900ms ease;
}
.ppt-generating-line {
  display: block;
  min-height: 32px;
  transition: opacity 180ms ease;
}
.ppt-generating-user-line {
  display: block;
  min-height: 32px;
  color: #6b7280;
  text-align: right;
}
.ppt-generating-copy.is-fading {
  opacity: 0;
}

.color-popover-close .ui-svg,
    .material-popover-close .ui-svg,
    .selection-tag-close .ui-svg,
    .demo-prompt-attachment-close .ui-svg {
      --ui-icon-size: 12px;
}
.prompt {
      position: absolute;
      left: 50%;
      bottom: 10px;
      z-index: 10;
      display: none;
      align-items: center;
      gap: 16px;
      width: 680px;
      max-width: calc(100vw - 20px);
      height: 72px;
      padding: 0 24px;
      border-radius: 36px;
      transform: translateX(-50%);
}
.prompt-tools {
      display: flex;
      align-items: center;
      gap: 16px;
      flex: 0 0 auto;
}
.prompt-tools .icon-btn {
      width: 24px;
      height: 24px;
      color: var(--color-muted);
}
.prompt-tools .icon-btn.active {
      color: var(--color-strong);
}
.prompt .placeholder {
      flex: 1 1 auto;
      font-size: 16px;
      font-weight: 500;
      line-height: 24px;
      color: var(--color-muted);
}
.magic {
      display: grid;
      place-items: center;
      width: 72px;
      height: 48px;
      flex: 0 0 72px;
      border-radius: 999px;
      background: linear-gradient(135deg, #dfe4ec 0%, #bec5cf 100%);
      color: #454953;
      box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 #ffffff;
      transition: transform var(--motion-fast) var(--motion-ease);
}
.magic:active { transform: scale(0.97)
}
.demo-prompt {
      position: absolute;
      z-index: 8;
      left: 50%;
      bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: min(800px, 72vw);
      height: 48px;
      padding: 8px;
      border-radius: 32px;
      transform: translateX(-50%);
      background: transparent;
      border: 0;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      overflow: visible;
      pointer-events: auto;
}
.demo-prompt::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      border-radius: inherit;
      background: rgba(249, 249, 249, 0.92);
      border: 1px solid rgba(255, 255, 255, 0.92);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      pointer-events: none;
}
.demo-prompt.is-drop-target {
      border-color: transparent;
      box-shadow: none;
}
.demo-prompt.is-drop-target::before {
      border-color: rgba(227, 53, 57, 0.45);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 10px 28px rgba(227, 53, 57, 0.10);
}
.demo-prompt-attachments {
      position: absolute;
      z-index: 1;
      left: 0;
      width: 100%;
      max-width: 100%;
      bottom: calc(100% + 8px);
      display: flex;
      align-items: flex-end;
      gap: 10px;
      padding: 28px 0 12px;
      overflow-x: auto;
      overflow-y: hidden;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: opacity 180ms ease, visibility 180ms ease, transform 220ms ease;
      pointer-events: none;
}
.demo-prompt-attachments::-webkit-scrollbar {
      display: none;
}
.demo-prompt-attachments.is-ppt-mode {
      left: -20px;
      width: calc(100% + 20px);
      padding-left: 20px;
      counter-reset: ppt-attachment;
}
.demo-prompt-attachments.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      pointer-events: auto;
}
.demo-prompt-attachment {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-rows: 100px 20px;
      align-content: start;
      align-items: center;
      width: 116px;
      height: 144px;
      min-height: 144px;
      gap: 4px 0;
      padding: 8px;
      border-radius: 16px;
      background: #f9f9f9;
      border: 1px solid #fff;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.92);
      animation: attachmentIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
      cursor: grab;
      flex: 0 0 auto;
      transition: opacity 160ms ease, box-shadow 160ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
      will-change: transform;
}
.demo-prompt-attachment.is-ppt-attachment {
      display: block;
      width: 192px;
      height: 116px;
      min-height: 116px;
      padding: 7px;
      border-radius: 16px;
      background: #f9f9f9;
      border-color: #fff;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
      counter-increment: ppt-attachment;
}
.demo-prompt-attachment.is-image-attachment:not(.is-ppt-attachment) {
      width: fit-content;
      min-width: 116px;
}
.demo-prompt-attachment.is-removing {
      opacity: 0;
      transform: translateY(8px) scale(0.88);
      pointer-events: none;
}
.demo-prompt-attachment.is-sorting {
      cursor: grabbing;
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
}
.demo-prompt-attachment.is-drag-arming {
      transition: none;
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
}
.demo-prompt-attachment.is-drag-arming img,
    .demo-prompt-attachment.is-drag-arming .demo-prompt-attachment-swatch,
    .demo-prompt-attachment.is-drag-arming .demo-prompt-attachment-meta,
    .demo-prompt-attachment.is-drag-arming .demo-prompt-attachment-color-meta,
    .demo-prompt-attachment.is-drag-arming .demo-prompt-attachment-close,
    .demo-prompt-attachment.is-sorting img,
    .demo-prompt-attachment.is-sorting .demo-prompt-attachment-swatch,
    .demo-prompt-attachment.is-sorting .demo-prompt-attachment-meta,
    .demo-prompt-attachment.is-sorting .demo-prompt-attachment-color-meta,
    .demo-prompt-attachment.is-sorting .demo-prompt-attachment-close {
      opacity: 0 !important;
      pointer-events: none !important;
}
.demo-prompt-attachment-close {
      position: absolute;
      right: 6px;
      top: 4px;
      z-index: 2;
      display: grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #dee2e9;
      color: #424956;
      font-size: 16px;
      line-height: 24px;
      opacity: 0;
      transform: scale(0.9);
      pointer-events: none;
      transition: opacity 140ms ease, transform 140ms ease, background 140ms ease;
}
.demo-prompt-attachment:hover .demo-prompt-attachment-close,
    .demo-prompt-attachment:focus-within .demo-prompt-attachment-close {
      opacity: 1;
      transform: scale(1);
      pointer-events: auto;
}
.demo-prompt-attachment-close:hover {
      background: #d2d7e0;
      transform: scale(1.06);
}
.demo-prompt-attachment.is-drag-arming .demo-prompt-attachment-close,
    .demo-prompt-attachment.is-sorting .demo-prompt-attachment-close {
      opacity: 0 !important;
      transform: scale(0.9) !important;
      pointer-events: none !important;
}
.demo-prompt-attachments.is-sorting-active .demo-prompt-attachment-close {
      opacity: 0 !important;
      transform: scale(0.9) !important;
      pointer-events: none !important;
}
.demo-prompt-attachment img {
      grid-column: 1 / -1;
      width: auto;
      height: 100px;
      max-width: 179px;
      display: block;
      object-fit: cover;
      border-radius: 8px;
}
.demo-prompt-attachment > .demo-prompt-attachment-swatch {
      grid-column: 1 / -1;
}
.demo-prompt-attachment.is-ppt-attachment img {
      width: 176px;
      height: 100px;
      max-width: none;
      max-height: none;
      object-fit: cover;
      border-radius: 8px;
}
.demo-prompt-attachment.is-image-attachment img {
      width: auto;
      height: 100px;
      max-width: 179px;
      object-fit: cover;
}
.demo-prompt-attachment.is-ppt-attachment.is-image-attachment img {
      width: 176px;
      height: 100px;
      max-width: none;
      object-fit: cover;
}
.demo-prompt-attachment-color-meta {
      display: flex;
      grid-column: 2;
      grid-row: 2;
      align-items: center;
      justify-content: flex-end;
      width: auto;
      height: 20px;
      flex: 0 0 auto;
}
.demo-prompt-attachment-color-swatch {
      display: grid;
      place-items: center;
      width: auto;
      min-width: 40px;
      height: 20px;
      padding: 0 4px;
      border: 0;
      border-radius: 8px;
      background: var(--attachment-color, #b35656);
      color: #fff;
      font: 600 8px/20px PingFang SC, sans-serif;
      letter-spacing: 0;
      text-transform: uppercase;
      cursor: pointer;
      transition: filter 140ms ease, transform 140ms ease;
}
.demo-prompt-attachment-color-swatch:hover {
      filter: brightness(1.08);
      transform: translateY(-1px);
}
.demo-prompt-attachment-color-swatch:focus-visible {
      outline: 2px solid rgba(66, 73, 86, 0.65);
      outline-offset: 2px;
}
.demo-prompt-attachment-meta {
      display: flex;
      grid-column: 1 / -1;
      grid-row: 2;
      align-items: center;
      justify-content: center;
      min-width: 0;
      width: 100%;
      height: 20px;
      color: #6b7280;
      font-size: 10px;
      font-weight: 600;
      line-height: 20px;
}
.demo-prompt-attachment.has-attachment-color .demo-prompt-attachment-meta {
      grid-column: 1;
      grid-row: 2;
      width: auto;
      justify-content: center;
}
.demo-prompt-attachment.has-attachment-color:not(.is-color-only) {
      grid-template-columns: auto auto;
      grid-template-rows: 100px 20px;
      justify-content: center;
      column-gap: 4px;
}
.demo-prompt-attachment.has-attachment-color:not(.is-color-only) .demo-prompt-attachment-color-meta {
      grid-column: 2;
      grid-row: 2;
      justify-content: center;
}
.demo-prompt-attachment.has-attachment-color:not(.is-color-only) > img,
    .demo-prompt-attachment.has-attachment-color:not(.is-color-only) > .demo-prompt-attachment-swatch {
      justify-self: center;
}
.demo-prompt-attachment.is-color-only .demo-prompt-attachment-meta {
      display: none;
}
.demo-prompt-attachment.is-color-only .demo-prompt-attachment-color-meta {
      grid-column: 1 / -1;
      justify-content: center;
}
.demo-prompt-attachment.is-ppt-attachment .demo-prompt-attachment-meta {
      position: absolute;
      left: -16px;
      top: -16px;
      z-index: 3;
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      margin: 0;
      border-radius: 50%;
      background: #dee2e9;
      color: #000;
      font-size: 16px;
      font-weight: 500;
      line-height: 16px;
}
.demo-prompt-attachment-index {
      display: none;
      flex: 0 0 auto;
      color: #6b7280;
      font-variant-numeric: tabular-nums;
}
.demo-prompt-attachment.is-ppt-attachment .demo-prompt-attachment-index {
      display: block;
      color: #000;
      font-size: 16px;
      font-weight: 500;
      line-height: 16px;
}
.demo-prompt-attachment-index::before {
      content: counter(ppt-attachment);
}
.demo-prompt-attachment.is-ppt-attachment .demo-prompt-attachment-label {
      display: none;
}
.demo-prompt-attachment-label {
      min-width: 0;
      overflow: hidden;
      color: #6b7280;
      text-overflow: ellipsis;
      white-space: nowrap;
}
.demo-prompt-attachment-swatch {
      width: 100px;
      height: 100px;
      border-radius: 8px;
      background: radial-gradient(circle at 42% 36%, rgba(255,255,255,0.86) 0 6%, var(--attachment-color, #b35656) 7% 45%, #6f1d1d 72%, #3d0d0d 100%);
      position: relative;
}
.demo-prompt-attachment-swatch::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      background: radial-gradient(circle at 32% 24%, rgba(255,255,255,0.62), transparent 26%),
        radial-gradient(circle at 58% 66%, rgba(0,0,0,0.26), transparent 46%),
        var(--attachment-color, #b35656);
      box-shadow: 0 14px 22px rgba(0, 0, 0, 0.24);
}
@keyframes attachmentIn {
from {
        opacity: 0;
        transform: translateY(8px) scale(0.94);
}
to {
        opacity: 1;
        transform: translateY(0) scale(1);
}
}
.demo-prompt-icon {
      position: relative;
      z-index: 3;
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      color: #68778b;
      flex: 0 0 auto;
}
.demo-prompt-icon.is-breathe {
      isolation: isolate;
      overflow: hidden;
      border-radius: 16px;
      background: linear-gradient(180deg, #ffbebe, #f9b091 50%, #ffa488);
      box-shadow: 0 4px 12px rgba(250, 175, 145, 0.55);
      color: #803030;
}
.demo-prompt-icon.is-breathe::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      border-radius: inherit;
      background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.08) 34%, rgba(255, 255, 255, 0.82) 49%, rgba(255, 255, 255, 0.08) 64%, transparent 82%);
      background-size: 230% 100%;
      background-position: 130% 0;
      mix-blend-mode: screen;
      animation: shinySweep 1900ms ease-in-out infinite;
      pointer-events: none;
}
.demo-prompt-icon.is-breathe .ui-svg {
      position: relative;
      z-index: 2;
      background: linear-gradient(110deg, currentColor 18%, currentColor 36%, #fff4ee 49%, currentColor 62%, currentColor 82%);
      background-size: 230% 100%;
      background-position: 130% 0;
      animation: shinyIconSweep 1900ms ease-in-out infinite;
}
.demo-prompt-icon span[data-icon],
    .demo-prompt-submit span[data-icon],
    .demo-prompt-icon .ui-svg,
    .demo-prompt-submit .ui-svg {
      width: 20px;
      height: 20px;
      color: inherit;
}
.demo-prompt-input {
      position: relative;
      z-index: 3;
      flex: 1;
      height: 100%;
      padding: 0 10px;
      border: 0;
      outline: 0;
      background: transparent;
      color: #6b7280;
      font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
      font-size: 16px;
      font-weight: 500;
      line-height: 20px;
}
.demo-prompt-input::placeholder {
      color: #9ca4b3;
      font-weight: 400;
      opacity: 1;
}
.demo-prompt-input:disabled {
      color: #9ca4b3;
      cursor: default;
}
.demo-prompt-ppt-params {
      position: relative;
      z-index: 3;
      display: none;
      align-items: center;
      gap: 8px;
      flex: 1;
      min-width: 0;
      padding: 0 10px;
      color: #6b7280;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
}
.demo-prompt-ppt-label {
      flex: 0 0 auto;
}
.demo-prompt-ppt-ratio {
      position: relative;
      flex: 0 0 auto;
}
.demo-prompt-ppt-include {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex: 0 1 auto;
      min-width: 0;
}
.demo-prompt-ppt-include-control {
      position: relative;
      display: inline-flex;
      flex: 0 1 auto;
      min-width: 0;
}
.demo-prompt-ppt-include-label {
      flex: 0 0 auto;
}
.demo-prompt-ppt-select {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      height: 28px;
      width: 58px;
      min-width: 58px;
      padding: 0 10px;
      border-radius: 999px;
      background: #dee2e9;
      color: #424956;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      cursor: pointer;
      transition: background 160ms ease, color 160ms ease;
}
.demo-prompt-ppt-select:hover,
    .demo-prompt-ppt-ratio.is-open .demo-prompt-ppt-select {
      background: #cfd5de;
      color: #2f3742;
}
.demo-prompt-ppt-ratio-value,
    .demo-prompt-ppt-include-value {
      display: block;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      max-width: 100%;
}
.demo-prompt-ppt-include-select {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 4px;
      height: 28px;
      width: auto;
      min-width: 86px;
      max-width: 220px;
      padding: 0 10px;
      border-radius: 999px;
      background: #dee2e9;
      color: #424956;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      cursor: pointer;
      transition: background 160ms ease, color 160ms ease;
}
.demo-prompt-ppt-include-select:hover,
    .demo-prompt-ppt-include.is-open .demo-prompt-ppt-include-select {
      background: #cfd5de;
      color: #2f3742;
}
.demo-prompt-ppt-caret {
      position: relative;
      width: 8px;
      height: 12px;
      flex: 0 0 auto;
      color: currentColor;
}
.demo-prompt-ppt-caret::before,
    .demo-prompt-ppt-caret::after {
      content: "";
      position: absolute;
      left: 50%;
      border-left: 3.5px solid transparent;
      border-right: 3.5px solid transparent;
      transform: translateX(-50%);
}
.demo-prompt-ppt-caret::before {
      top: 1px;
      border-bottom: 4px solid currentColor;
}
.demo-prompt-ppt-caret::after {
      bottom: 1px;
      border-top: 4px solid currentColor;
}
.demo-prompt.is-ppt-mode .demo-prompt-input {
      display: none;
}
.demo-prompt.is-ppt-mode .demo-prompt-ppt-params {
      display: flex;
}
.demo-prompt-ppt-menu {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      z-index: 12;
      display: grid;
      gap: 2px;
      min-width: 96px;
      padding: 6px;
      border: 1px solid rgba(255, 255, 255, 0.92);
      border-radius: 12px;
      background: rgba(249, 249, 249, 0.98);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, 6px) scale(0.96);
      transform-origin: 50% 100%;
      transition: opacity 150ms ease, transform 150ms ease;
}
.demo-prompt-ppt-ratio.is-open .demo-prompt-ppt-menu {
      opacity: 1;
      pointer-events: auto;
      transform: translate(-50%, 0) scale(1);
}
.demo-prompt-ppt-include-menu {
      position: absolute;
      left: 0;
      bottom: calc(100% + 8px);
      z-index: 12;
      display: grid;
      gap: 2px;
      min-width: 148px;
      padding: 6px;
      border: 1px solid rgba(255, 255, 255, 0.92);
      border-radius: 12px;
      background: rgba(249, 249, 249, 0.98);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
      opacity: 0;
      pointer-events: none;
      transform: translate(0, 6px) scale(0.96);
      transform-origin: 0 100%;
      transition: opacity 150ms ease, transform 150ms ease;
}
.demo-prompt-ppt-include.is-open .demo-prompt-ppt-include-menu {
      opacity: 1;
      pointer-events: auto;
      transform: translate(0, 0) scale(1);
}
.demo-prompt-ppt-include-option {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 134px;
      height: 30px;
      padding: 0 9px;
      border-radius: 7px;
      color: #6b7280;
      font-size: 13px;
      font-weight: 600;
      line-height: 18px;
      text-align: left;
      cursor: pointer;
      transition: background 140ms ease, color 140ms ease;
}
.demo-prompt-ppt-include-option:hover,
    .demo-prompt-ppt-include-option[aria-selected="true"] {
      background: #e5e8ed;
      color: #424956;
}
.demo-prompt-ppt-include-check {
      position: relative;
      flex: 0 0 auto;
      width: 14px;
      height: 14px;
      border: 1px solid #9ca4b3;
      border-radius: 4px;
      background: #f9f9f9;
      transition: background 140ms ease, border-color 140ms ease;
}
.demo-prompt-ppt-include-option[aria-selected="true"] .demo-prompt-ppt-include-check {
      border-color: #68778b;
      background: #68778b;
}
.demo-prompt-ppt-include-option[aria-selected="true"] .demo-prompt-ppt-include-check::after {
      content: "";
      position: absolute;
      left: 3px;
      top: 1px;
      width: 5px;
      height: 8px;
      border: solid #ffffff;
      border-width: 0 1.5px 1.5px 0;
      transform: rotate(45deg);
}
.demo-prompt-ppt-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      min-width: 82px;
      height: 30px;
      padding: 0 9px;
      border-radius: 7px;
      color: #6b7280;
      font-size: 13px;
      font-weight: 600;
      line-height: 18px;
      text-align: left;
      cursor: pointer;
      transition: background 140ms ease, color 140ms ease;
}
.demo-prompt-ppt-option:hover,
    .demo-prompt-ppt-option[aria-selected="true"] {
      background: #e5e8ed;
      color: #424956;
}
.demo-prompt-ppt-option::after {
      content: "";
      width: 5px;
      height: 9px;
      border-right: 1.5px solid transparent;
      border-bottom: 1.5px solid transparent;
      transform: rotate(42deg) translateY(-1px);
}
.demo-prompt-ppt-option[aria-selected="true"]::after {
      border-color: #6b7280;
}
.demo-prompt-ppt-text {
      min-width: 96px;
      flex: 1 1 auto;
      height: 32px;
      padding: 0;
      border: 0;
      outline: 0;
      background: transparent;
      color: #6b7280;
      font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
}
.demo-prompt-ppt-text::placeholder {
      color: #9ca4b3;
      font-weight: 400;
      opacity: 1;
}
.demo-prompt-submit {
      position: relative;
      z-index: 3;
      display: grid;
      place-items: center;
      width: 60px;
      height: 32px;
      border-radius: 32px;
      background: #68778b;
      color: #ffffff;
      flex: 0 0 auto;
      transition: transform 180ms ease, background 180ms ease;
}
.demo-prompt-submit:hover:not(:disabled) {
      background: #5f6d80;
      transform: translateY(-1px);
}
.demo-prompt-submit:active:not(:disabled) {
      background: #566375;
      transform: translateY(0) scale(0.98);
}
.demo-prompt-submit:disabled {
      opacity: 0.42;
      cursor: default;
      transform: none;
      pointer-events: none;
}
.demo-prompt-submit.is-stop {
      opacity: 1;
      cursor: pointer;
      pointer-events: auto;
}
@keyframes shinySweep {
0%, 18% { background-position: 130% 0;
}
58%, 100% { background-position: -30% 0;
}
}
@keyframes shinyIconSweep {
0%, 18% { background-position: 130% 0;
}
58%, 100% { background-position: -30% 0;
}
}

.right-rail {
      position: absolute;
      z-index: 12;
      right: 10px;
      top: 50%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 4px;
      border-radius: 32px;
      transform: translateY(-50%);
}
.right-rail .icon-btn {
      position: relative;
      width: 48px;
      height: 48px;
      color: var(--color-text);
      transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        background-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease,
        transform 140ms var(--motion-ease);
}
.right-rail .icon-btn:hover {
      background: var(--color-interaction-hover);
      color: var(--color-strong);
      box-shadow: var(--interaction-shadow);
}
.right-rail .icon-btn.active {
      background: var(--active-bg);
      color: var(--color-white);
      box-shadow: var(--selected-shadow);
}
.right-rail .icon-btn.active:hover {
      background: var(--color-accent-hover);
      color: var(--color-white);
      box-shadow: var(--selected-shadow);
}
.right-rail .icon-btn:active {
      transform: scale(0.96);
}
.right-rail .icon-btn .ui-svg {
      --ui-icon-size: 24px;
      transition: width 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.right-rail.is-compact .icon-btn {
      width: 32px;
      height: 32px;
}
.right-rail.is-compact .icon-btn .ui-svg {
      --ui-icon-size: 16px;
}
.right-rail .icon-btn.active .ui-svg {
      --ui-icon-size: 20px;
}
.pill {
      position: fixed;
      z-index: 2000;
      left: var(--pill-x);
      top: var(--pill-y);
      display: flex;
      align-items: center;
      height: 28px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translate(-8px, 0) scale(0.96);
      transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 150ms ease;
}
.pill.is-visible {
      opacity: 1;
      visibility: visible;
      transform: translate(0, 0) scale(1);
}

.side-stack {
      --icon-normal: #6b7280;
      --icon-parent: #424956;
      --icon-active: #ffffff;
      --soft: #dee2e9;
      --active-bg: #68778b;
      --selected-shadow: 0 2px 8px rgba(104, 119, 139, 0.25);
      --text: #6b7280;
      --strong: #424956;
      position: absolute;
      z-index: 12;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 250px;
      height: 360px;
      pointer-events: none;
}
.rail {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 4px;
      border-radius: 32px;
      pointer-events: auto;
      transform-origin: var(--origin-x, 4px) var(--origin-y, 20px);
      opacity: 1;
      transform: translate(0, 0) scale(1);
      transition: left 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 260ms ease,
        transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
      will-change: left, top, width, transform, opacity;
}

    /* 运行时：bg rgba(249,249,249,0.84) / border 0.8px / blur 20px / radius 32px */
.side-stack .rail.glass {
      background: rgba(249, 249, 249, 0.84);
      border: 0.8px solid rgba(255, 255, 255, 0.96);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
}
.side-stack .rail.glass.compact-parent-menu {
      z-index: 2;
      width: 35px !important;
      height: 35px;
      padding: 4px;
      border: 0;
      border-radius: 50%;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      pointer-events: none;
}
.rail.compact-parent-menu .rail-item {
      display: none;
}
.rail.compact-parent-menu .rail-item.compact-primary-icon {
      display: grid;
      width: 27px;
      height: 27px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 4px 12px rgba(66, 73, 86, 0.18);
      color: #424956;
      transform: translate(var(--compact-primary-offset-x, 0px), var(--compact-primary-offset-y, 0px));
      pointer-events: auto;
}
.rail.compact-parent-menu + .rail {
      z-index: 1;
}
.rail.compact-parent-menu .rail-item.compact-primary-icon:hover {
      background: #ffffff;
      box-shadow: 0 5px 14px rgba(66, 73, 86, 0.22);
      color: #424956;
}
.rail.is-hidden {
      opacity: 0;
      pointer-events: none;
      transform: translate(var(--split-dx, -18px), var(--split-dy, -18px)) scale(0.18);
}
.rail[data-size="56"] { --item: 48px; --icon: 24px;
}
.rail[data-size="40"] { --item: 32px; --icon: 18px;
}
.rail[data-size="32"] { --item: 24px; --icon: 14px;
}
.rail[data-size="24"] { --item: 16px; --icon: 8px;
}
.rail[data-size="88"] { --item: 80px; --icon: 24px;
}
.rail[data-size="72"] { --item: 64px; --icon: 20px;
}
.rail[data-size="60"] { --item: 52px; --icon: 18px;
}
.rail[data-size="48"] { --item: 40px; --icon: 16px;
}
.rail-item {
      position: relative;
      display: grid;
      place-items: center;
      width: var(--item);
      height: var(--item);
      border-radius: 999px;
      color: var(--icon-normal);
      transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        background 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease,
        color 180ms ease;
}
.rail-item svg {
      width: var(--icon);
      height: var(--icon);
      stroke-width: 1.8;
      transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rail-item .menu-svg {
      width: var(--icon);
      height: var(--icon);
      display: block;
      background: currentColor;
      -webkit-mask: var(--icon-url) center / contain no-repeat;
      mask: var(--icon-url) center / contain no-repeat;
      transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 180ms ease,
        transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rail.dot-icon-mode .rail-item .menu-svg,
    .rail.dot-icon-mode .rail-item svg {
      opacity: 0;
      transform: scale(0.35);
}
.rail.dot-icon-mode .rail-item::after {
      content: "";
      position: absolute;
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: var(--color-text);
      transition: width 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        background 180ms ease;
}
.rail.dot-icon-mode .rail-item.selected::after,
    .rail.dot-icon-mode .rail-item.default-selected::after,
    .rail.dot-icon-mode .rail-item.active-selected::after,
    .rail.dot-icon-mode .rail-item.path-selected::after {
      width: 12px;
      height: 12px;
      background: var(--color-strong);
}
.rail[data-size="56"] .rail-item svg,
    .rail[data-size="56"] .rail-item .menu-svg {
      width: 24px;
      height: 24px;
}
.rail[data-rail-index="2"][data-size="56"] .rail-item.selected svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.default-selected svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.active-selected svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.path-selected svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.selected .menu-svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.default-selected .menu-svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.active-selected .menu-svg,
    .rail[data-rail-index="2"][data-size="56"] .rail-item.path-selected .menu-svg {
      width: 28px;
      height: 28px;
}
.rail[data-rail-index="1"][data-size="56"] .rail-item.selected svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.default-selected svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.active-selected svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.path-selected svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.selected .menu-svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.default-selected .menu-svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.active-selected .menu-svg,
    .rail[data-rail-index="1"][data-size="56"] .rail-item.path-selected .menu-svg {
      width: 28px;
      height: 28px;
}
.rail[data-size="40"] .rail-item svg,
    .rail[data-size="40"] .rail-item .menu-svg {
      width: 16px;
      height: 16px;
}
.rail[data-size="40"] .rail-item.selected svg,
    .rail[data-size="40"] .rail-item.default-selected svg,
    .rail[data-size="40"] .rail-item.active-selected svg,
    .rail[data-size="40"] .rail-item.path-selected svg,
    .rail[data-size="40"] .rail-item.selected .menu-svg,
    .rail[data-size="40"] .rail-item.default-selected .menu-svg,
    .rail[data-size="40"] .rail-item.active-selected .menu-svg,
    .rail[data-size="40"] .rail-item.path-selected .menu-svg {
      width: 20px;
      height: 20px;
}
.rail[data-size="32"] .rail-item svg,
    .rail[data-size="32"] .rail-item .menu-svg {
      width: 12px;
      height: 12px;
}
.rail[data-size="32"] .rail-item.selected svg,
    .rail[data-size="32"] .rail-item.default-selected svg,
    .rail[data-size="32"] .rail-item.active-selected svg,
    .rail[data-size="32"] .rail-item.path-selected svg,
    .rail[data-size="32"] .rail-item.selected .menu-svg,
    .rail[data-size="32"] .rail-item.default-selected .menu-svg,
    .rail[data-size="32"] .rail-item.active-selected .menu-svg,
    .rail[data-size="32"] .rail-item.path-selected .menu-svg {
      width: 16px;
      height: 16px;
}
.rail[data-size="24"] .rail-item svg,
    .rail[data-size="24"] .rail-item .menu-svg {
      width: 6px;
      height: 6px;
}
.rail[data-size="24"] .rail-item.selected svg,
    .rail[data-size="24"] .rail-item.default-selected svg,
    .rail[data-size="24"] .rail-item.active-selected svg,
    .rail[data-size="24"] .rail-item.path-selected svg,
    .rail[data-size="24"] .rail-item.selected .menu-svg,
    .rail[data-size="24"] .rail-item.default-selected .menu-svg,
    .rail[data-size="24"] .rail-item.active-selected .menu-svg,
    .rail[data-size="24"] .rail-item.path-selected .menu-svg {
      width: 12px;
      height: 12px;
}
.rail[data-kind="text"] .rail-item {
      width: var(--item);
      height: 32px;
      border-radius: 16px;
      font-size: 14px;
      line-height: 20px;
      white-space: nowrap;
}
.rail[data-kind="text"] {
      gap: 6px;
      border-radius: 20px;
}
.rail[data-size="48"][data-kind="text"] .rail-item {
      width: 40px;
      height: 24px;
      border-radius: 12px;
      font-size: 12px;
      line-height: 20px;
}
.rail[data-size="48"][data-kind="text"] {
      border-radius: 16px;
}
.rail[data-rail-index="2"][data-kind="text"],
    .rail[data-rail-index="3"][data-kind="text"] {
      align-items: stretch;
      width: 104px;
}
.rail.inline-submenu-expanded[data-kind="text"] {
      align-items: stretch;
      width: 104px;
      border-radius: 20px;
}
.rail[data-rail-index="2"][data-kind="text"] .rail-item,
    .rail[data-rail-index="3"][data-kind="text"] .rail-item,
    .rail.inline-submenu-expanded[data-kind="text"] .rail-item {
      width: 100%;
      height: 32px;
      border-radius: 16px;
      font-size: 12px;
}
.inline-submenu-group {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      overflow: visible;
      border-radius: 16px;
      background: var(--soft);
}
.inline-submenu-group.is-collapsing {
      overflow: hidden;
      background: transparent;
}
.inline-submenu-children {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      overflow: hidden;
      max-height: var(--inline-children-height, 160px);
      opacity: 1;
      transform-origin: 50% 0;
      animation: inlineChildrenOpen 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.inline-submenu-group.is-settled .inline-submenu-children {
      animation: none;
}
.inline-submenu-group.is-collapsing .inline-submenu-children {
      animation: inlineChildrenClose 360ms cubic-bezier(0.4, 0, 0.2, 1) both;
      pointer-events: none;
}
.inline-submenu-group .rail-item.inline-subitem {
      box-shadow: none;
}
.inline-submenu-group .rail-item.inline-subitem {
      color: var(--strong);
      background: transparent;
      font-size: 16px;
      font-weight: 500;
}
.inline-submenu-group .rail-item.inline-subitem:hover,
    .inline-submenu-group .rail-item.inline-subitem.active-selected {
      color: var(--strong);
      background: transparent;
      box-shadow: none;
      font-size: 16px;
      font-weight: 500;
      transform: none;
}
.inline-submenu-group .rail-item.inline-subitem:not(.active-selected) {
      color: var(--text);
      font-size: 12px;
}
.inline-submenu-group .rail-item.inline-subitem:not(.active-selected):hover {
      color: var(--strong);
      font-size: 16px;
}
@keyframes inlineChildrenOpen {
from {
        max-height: 0;
        opacity: 0;
        transform: scaleY(0.72);
}
to {
        max-height: var(--inline-children-height, 160px);
        opacity: 1;
        transform: scaleY(1);
}
}
@keyframes inlineChildrenClose {
from {
        max-height: var(--inline-children-height, 160px);
        opacity: 1;
        transform: scaleY(1);
}
to {
        max-height: 0;
        opacity: 0;
        transform: scaleY(0.72);
}
}
.rail[data-size="88"][data-kind="text"] .rail-item {
      width: 80px;
      height: 32px;
      border-radius: 16px;
}
.rail[data-kind="text"] .rail-item.selected,
    .rail[data-kind="text"] .rail-item.default-selected,
    .rail[data-kind="text"] .rail-item.active-selected {
      font-size: 15px;
      font-weight: 500;
}
.rail[data-size="48"][data-kind="text"] .rail-item.selected,
    .rail[data-size="48"][data-kind="text"] .rail-item.default-selected,
    .rail[data-size="48"][data-kind="text"] .rail-item.active-selected {
      font-size: 13px;
      font-weight: 500;
}
.rail[data-kind="color"] {
      gap: 8px;
      border-radius: 16px;
      width: max-content;
}
.rail[data-kind="color"] .rail-item {
      width: 40px;
      height: 24px;
      border-radius: 12px;
      border: 0;
      background: var(--swatch);
      color: #fff;
      box-shadow: none;
      transform: none;
      overflow: hidden;
      transition: transform 180ms ease, box-shadow 180ms ease;
}
.rail[data-kind="color"] .rail-item:hover,
    .rail[data-kind="color"] .rail-item.selected,
    .rail[data-kind="color"] .rail-item.default-selected,
    .rail[data-kind="color"] .rail-item.active-selected,
    .rail[data-kind="color"] .rail-item.path-selected,
    .rail[data-kind="color"] .rail-item.selected:hover,
    .rail[data-kind="color"] .rail-item.active-selected:hover {
      background: var(--swatch);
      border: 0;
      box-shadow: none;
      color: #fff;
      transform: none;
}
.rail[data-kind="color"] .rail-item:hover,
    .rail[data-kind="color"] .rail-item.selected:hover,
    .rail[data-kind="color"] .rail-item.default-selected:hover,
    .rail[data-kind="color"] .rail-item.active-selected:hover,
    .rail[data-kind="color"] .rail-item.path-selected:hover {
      position: relative;
      z-index: 2;
      transform: scale(1.2, 1.25);
      transform-origin: center;
      box-shadow: 0 4px 4px rgb(var(--swatch-rgb, 104 119 139) / 25%);
}
.rail[data-kind="color"] .rail-item:active,
    .rail[data-kind="color"] .rail-item.selected:active,
    .rail[data-kind="color"] .rail-item.default-selected:active,
    .rail[data-kind="color"] .rail-item.active-selected:active,
    .rail[data-kind="color"] .rail-item.path-selected:active {
      transform: scale(0.92);
      box-shadow: none;
}
.swatch-check {
      display: none;
      width: 12px;
      height: 12px;
      border-radius: 999px;
      border: 1.5px solid var(--color-white);
      color: var(--color-white);
      font-size: 8px;
      line-height: 10px;
      place-items: center;
      font-weight: 700;
}
.rail[data-kind="color"] .rail-item.active-selected .swatch-check,
    .rail[data-kind="color"] .rail-item.selected .swatch-check,
    .rail[data-kind="color"] .rail-item.path-selected .swatch-check {
      display: grid;
}
.rail-item:hover {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
      transform: none;
}
.rail-item.selected {
      background: var(--soft);
      box-shadow: none;
      color: var(--icon-parent);
}
.rail-item.selected:hover {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
}
.rail-item.default-selected {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
}
.rail-item.default-selected.breathe {
      isolation: isolate;
      overflow: hidden;
      background: linear-gradient(180deg, #ffbebe, #f9b091 50%, #ffa488);
      box-shadow: 0 4px 12px rgba(250, 175, 145, 0.55);
      color: #803030;
}
.rail-item.default-selected.breathe::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      border-radius: inherit;
      background: linear-gradient(110deg, transparent 18%, var(--color-white-08) 34%, var(--color-white-82) 49%, var(--color-white-08) 64%, transparent 82%);
      background-size: 230% 100%;
      background-position: 130% 0;
      mix-blend-mode: screen;
      animation: shinySweep 1900ms ease-in-out infinite;
      pointer-events: none;
}
.rail-item.default-selected.breathe .menu-svg,
    .rail-item.default-selected.breathe svg {
      position: relative;
      z-index: 2;
}
.rail-item.default-selected.breathe .menu-svg {
      background: linear-gradient(110deg, currentColor 18%, currentColor 36%, #fff4ee 49%, currentColor 62%, currentColor 82%);
      background-size: 230% 100%;
      background-position: 130% 0;
      animation: shinyIconSweep 1900ms ease-in-out infinite;
}
.rail-item.active-selected {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
}
.rail-item.default-selected:hover {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
}
.rail-item.default-selected.breathe:hover {
      background: linear-gradient(180deg, #ffbebe, #f9b091 50%, #ffa488);
      box-shadow: 0 8px 22px rgba(250, 175, 145, 0.95);
      color: #803030;
}
.rail-item.active-selected:hover {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
}
.rail-item.path-selected {
      color: var(--icon-parent);
}
.rail-item.path-selected:hover {
      color: var(--icon-active);
}
.rail.dot-icon-mode .rail-item.selected:hover::after,
    .rail.dot-icon-mode .rail-item.default-selected:hover::after,
    .rail.dot-icon-mode .rail-item.active-selected:hover::after,
    .rail.dot-icon-mode .rail-item.path-selected:hover::after {
      background: var(--active-bg);
}
.rail-item.parent-trigger {
      background: var(--soft);
      box-shadow: none;
      color: var(--icon-parent);
}
.rail-item.parent-trigger:hover {
      background: var(--soft);
}
.rail-item:active {
      background: var(--active-bg);
      box-shadow: var(--selected-shadow);
      color: var(--icon-active);
      transform: none;
}
.rail[data-kind="color"] .rail-item:active {
      background: var(--swatch);
      border: 0;
      color: #fff;
      transform: scale(0.92);
}
.rail-item.default-selected.breathe:active {
      background: linear-gradient(180deg, #ffbebe, #f9b091 50%, #ffa488);
      box-shadow: 0 4px 12px rgba(250, 175, 145, 0.55);
      color: #803030;
}
.rail-item.breathe {
      animation: none;
}
.rail[data-rail-index="0"]:has(.rail-item:not([data-item-index="0"]):hover) .rail-item.default-selected {
      background: transparent;
      box-shadow: none;
      color: var(--icon-normal);
      animation: none;
}
.rail[data-rail-index="0"]:has(.rail-item:not([data-item-index="0"]):hover) .rail-item.default-selected.breathe::before {
      display: none;
}
.rail[data-rail-index="0"]:has(.rail-item:not([data-item-index="0"]):hover) .rail-item.default-selected.breathe .menu-svg {
      animation: none;
      background: currentColor;
}
@keyframes shinySweep {
0%, 18% { background-position: 130% 0;
}
58%, 72% { background-position: -30% 0;
}
100% { background-position: -30% 0;
}
}
@keyframes shinyIconSweep {
0%, 18% { background-position: 130% 0;
}
58%, 72% { background-position: -30% 0;
}
100% { background-position: -30% 0;
}
}
.menu-preview {
      position: absolute;
      z-index: 900;
      left: var(--preview-x, 270px);
      top: var(--preview-y, 160px);
      width: 285px;
      padding: 8px;
      border-radius: 16px;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translate(-8px, 0) scale(0.98);
      transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 150ms ease;
}
.menu-preview.is-visible { opacity: 1; visibility: visible; transform: translate(0, 0) scale(1);
}
.menu-preview img { display: block; width: 269px; height: 150px; border-radius: 8px; object-fit: cover;
}
.menu-preview.is-material-thumb { width: 166px; border-radius: 16px;
}
.menu-preview.is-material-thumb img { width: 150px; height: 150px; border-radius: 12px; object-fit: cover;
}
.pill {
      position: fixed;
      z-index: 2000;
      left: var(--pill-x);
      top: var(--pill-y);
      display: flex;
      align-items: center;
      height: 28px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 14px;
      line-height: 20px;
      white-space: nowrap;
      pointer-events: auto;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translate(-8px, 0) scale(0.96);
      transition: opacity 150ms ease, transform 180ms ease, visibility 150ms ease;
}
.pill.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: none;
      transform: translate(0, 0) scale(1);
}

.page-switch {
      position: absolute;
      z-index: 1200;
      left: 10px;
      top: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      height: 40px;
      padding: 8px 16px;
      border-radius: 32px;
      background: var(--color-switch-bg);
      border: 1px solid var(--color-switch-line);
      box-shadow: 0 8px 26px var(--color-black-28), inset 0 1px 1px var(--color-white-08);
      color: var(--color-soft);
      font-size: 14px;
      line-height: 20px;
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      transition: background 180ms ease, transform 180ms ease, color 180ms ease;
}
.page-switch:hover {
      background: var(--color-accent-hover);
      color: var(--color-white);
      transform: translateY(-1px);
}
.page-switch:active {
      background: var(--color-accent);
      transform: scale(0.96);
}
.page-switch span[data-icon] {
      width: 18px;
      height: 18px;
}
.page-switch > svg {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
}
.page-switch > span:last-child {
      white-space: nowrap;
}
/* 手势漫游 / 选择：运行时 computed 对齐 Demo */

.hero-stage {
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.demo.is-hero-pan-mode .hero-stage {
  pointer-events: auto;
  cursor: default;
}

.demo.is-hero-panning .hero-stage {
  cursor: grabbing;
  transition: none;
}

.demo.is-hero-selection-mode .hero-stage {
  pointer-events: auto;
  cursor: crosshair;
}

.demo.is-hero-selection-mode .hero-selection-canvas {
  opacity: 1;
}

.hero-selection-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.hero-stage.is-lasso-selection .hero-selection-canvas {
  opacity: 1;
}

.hero-image-hover-overlay {
  z-index: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.hero-stage.is-selection-hovering .hero-image-hover-overlay {
  opacity: 0.5;
  filter: brightness(0) saturate(1) invert(0.52) sepia(0.66) saturate(3.16) hue-rotate(311deg) brightness(0.83) contrast(1.21);
}

.hero-stage.is-lasso-selection .hero-image-overlay {
  opacity: 0;
}
/* Demo 生成页入场（对齐 index.html openImageGeneration）
 * 阶段 0     初始：画布 opacity 0；顶栏/侧栏/右栏/输入框 opacity 0 并位移离场
 *            top  -48px Y；left  -48px X（保留 -50% 垂直居中）；right +64px X；bottom +64px Y
 * 阶段 580ms 加上 is-image-entry-ui-visible：UI opacity 360ms / transform 640ms 回到原位
 *            easing opacity cubic-bezier(0.22, 0.8, 0.26, 1)；transform cubic-bezier(0.16, 1, 0.3, 1)
 * 阶段 660ms 加上 is-image-entry-hero-visible：画布 opacity 220ms ease 到 1
 * 阶段 920ms 移除飞入图；1240ms 卸掉入场 class，回到最终静止样式
 */
.generation-image-handoff {
  position: fixed;
  z-index: 100;
  display: block;
  margin: 0;
  object-fit: cover;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  will-change: left, top, width, height, opacity, border-radius;
  transition:
    left 620ms cubic-bezier(0.2, 0.82, 0.24, 1),
    top 620ms cubic-bezier(0.2, 0.82, 0.24, 1),
    width 620ms cubic-bezier(0.2, 0.82, 0.24, 1),
    height 620ms cubic-bezier(0.2, 0.82, 0.24, 1),
    border-radius 420ms ease,
    opacity 180ms ease 40ms,
    box-shadow 420ms ease;
}

.generation-image-handoff.is-complete {
  opacity: 0;
  box-shadow: none;
}

.demo.is-image-entry-transition .hero-stage {
  opacity: 0;
  transition: opacity 220ms ease;
}

.demo.is-image-entry-transition [data-generation-entry-ui] {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
  will-change: transform, opacity;
  transition:
    opacity 360ms cubic-bezier(0.22, 0.8, 0.26, 1),
    transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
}

.demo.is-image-entry-transition [data-generation-entry-ui="top"] {
  transform: translateY(-48px) !important;
}

.demo.is-image-entry-transition [data-generation-entry-ui="left"] {
  transform: translate(-48px, -50%) !important;
}

.demo.is-image-entry-transition [data-generation-entry-ui="right"] {
  transform: translate(64px, -50%) !important;
}

.demo.is-image-entry-transition [data-generation-entry-ui="bottom"] {
  transform: translate(-50%, 64px) !important;
}

.demo.is-image-entry-transition.is-image-entry-hero-visible .hero-stage {
  opacity: 1;
}

.demo.is-image-entry-transition.is-image-entry-ui-visible [data-generation-entry-ui] {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.demo.is-image-entry-transition.is-image-entry-ui-visible [data-generation-entry-ui="top"] {
  transform: none !important;
}

.demo.is-image-entry-transition.is-image-entry-ui-visible [data-generation-entry-ui="left"],
.demo.is-image-entry-transition.is-image-entry-ui-visible [data-generation-entry-ui="right"] {
  transform: translateY(-50%) !important;
}

.demo.is-image-entry-transition.is-image-entry-ui-visible [data-generation-entry-ui="bottom"] {
  transform: translateX(-50%) !important;
}

.demo.is-image-return-transition .hero-stage {
  opacity: 0;
  transition: opacity 220ms ease;
}

.demo.is-image-return-transition [data-generation-entry-ui] {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
  will-change: transform, opacity;
  transition:
    opacity 300ms cubic-bezier(0.22, 0.8, 0.26, 1),
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.demo.is-image-return-transition [data-generation-entry-ui="top"] {
  transform: translateY(-48px) !important;
}

.demo.is-image-return-transition [data-generation-entry-ui="left"] {
  transform: translate(-48px, -50%) !important;
}

.demo.is-image-return-transition [data-generation-entry-ui="right"] {
  transform: translate(64px, -50%) !important;
}

.demo.is-image-return-transition [data-generation-entry-ui="bottom"] {
  transform: translate(-50%, 64px) !important;
}

.demo.is-image-return-transition .selection-summary.is-visible {
  opacity: 0 !important;
  transform: translate(-48px, 64px) !important;
  pointer-events: none !important;
}

.demo.is-image-return-transition .history-panel.is-visible {
  opacity: 0 !important;
  transform: translate(80px, -50%) scale(0.9) !important;
  pointer-events: none !important;
}

body.is-demo-to-home-transition {
  overflow-x: hidden;
  overflow-y: auto;
  background: #050505;
}

body.is-demo-to-home-transition .app-root {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

body.is-demo-to-home-transition .home-page {
  position: relative;
  z-index: 4;
  display: block;
  overflow: visible;
}

body.is-demo-to-home-transition .demo {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: block;
  background: transparent;
}

body.is-demo-to-home-transition .home-hero > :not(.home-bg) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-demo-to-home-transition.is-demo-to-home-content-visible .home-hero > :not(.home-bg) {
  opacity: 1;
  pointer-events: auto;
}

.demo {
      position: relative;
      width: 100vw;
      height: 100vh;
      min-width: 960px;
      min-height: 540px;
      overflow: hidden;
      background: var(--color-white);
}
.demo::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 6;
      background: rgba(0, 0, 0, 0.2);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 220ms ease, visibility 220ms ease;
}
.demo.is-ppt-mode::after {
      opacity: 1;
      visibility: visible;
}
.demo.is-ppt-result::after,
    .demo.is-ppt-generating::after {
      opacity: 0;
      visibility: hidden;
}
.demo.is-ppt-generating .hero-stage,
    .demo.is-ppt-generating .history-panel {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
}
.demo.is-ppt-generating .ppt-generating-view {
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
}
.demo.is-ppt-result .hero-stage {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
}
.demo.is-ppt-result .ppt-result-view {
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
}
.demo.is-ppt-generating .selection-summary,
    .demo.is-ppt-generating .pill,
    .demo.is-ppt-generating .menu-preview,
    .demo.is-ppt-generating .color-popover,
    .demo.is-ppt-generating .material-popover {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
}
.hero-stage {
      position: absolute;
      left: 50%;
      top: 50.1%;
      width: 84.7vw;
      height: 84.7vh;
      max-width: 1627px;
      max-height: 915px;
      transform: translate(calc(-50% + var(--hero-pan-x, 0px) + var(--hero-fit-offset-x, 0px)), calc(-50% + var(--hero-pan-y, 0px) + var(--hero-fit-offset-y, 0px))) scale(var(--hero-scale, 1));
      transform-origin: center center;
      pointer-events: none;
}
.hero-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      user-select: none;
      pointer-events: none;
}
.hero-image-overlay {
      opacity: 1;
}
@media (max-width: 1100px) {
.demo {
        min-width: 0;
}
.hero-stage {
        width: 88vw;
        height: 68vh;
}
}
.demo.is-image-generating {
      pointer-events: none;
}
.demo.is-image-generating .hero-generate-loading {
      pointer-events: auto;
}
/**
 * 欢迎页入场（对齐 Demo html[data-welcome-logo-intro=path]）
 * - 0s     黑底；菱形描边从 logo.svg 画出（clip 掉底部字）；AIVIX 由 logo-text-path.svg 描边
 * - 3.2s   背景、顶栏、「进入」提示出现
 * - 3.5s   舞台 scale(1.62)→1（820ms）；加载 logo-flow.svg 并加 is-flowing，描边层淡出
 * - 3.86s  双箭头循环呼吸光
 */

/* ---------- 入场：背景与暗角 ---------- */
@keyframes welcome-scene-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcome-ui-reveal {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ---------- 入场：中心 logo 落地 ---------- */
@keyframes welcome-logo-settle {
  from {
    transform: translate(-50%, -50%) translate3d(var(--welcome-logo-parallax-x), var(--welcome-logo-parallax-y), 0) scale(1.62);
  }
  to {
    transform: translate(-50%, -50%) translate3d(var(--welcome-logo-parallax-x), var(--welcome-logo-parallax-y), 0) scale(1);
  }
}

@keyframes welcome-logo-tone {
  from {
    opacity: 0.72;
    filter: brightness(0.5);
  }
  to {
    opacity: 0.9;
    filter: brightness(0.98);
  }
}

@keyframes welcome-enter-cue-reveal {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

/* ---------- 循环：进入箭头呼吸光 ---------- */
@keyframes welcome-enter-chevron-glow {
  0%, 100% {
    opacity: 0.28;
    filter: brightness(0.72);
  }
  32% {
    opacity: 1;
    filter: brightness(1.3) drop-shadow(0 0 4px rgba(238, 238, 238, 0.45));
  }
  54% {
    opacity: 0.38;
    filter: brightness(0.8);
  }
}

.welcome-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 960px;
  min-height: 540px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  background: #050505;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --welcome-bg-parallax-x: 0px;
  --welcome-bg-parallax-y: 0px;
  --welcome-logo-parallax-x: 0px;
  --welcome-logo-parallax-y: 0px;
  --welcome-toolbar-center-x: 50%;
  --welcome-toolbar-center-y: 66px;
  --welcome-toolbar-scale: 0.25;
}

/* 背景单独一层：入场只动 opacity，位移由 JS 写 transform，避免 animation:both 锁死晃动 */
.welcome-bg {
  position: absolute;
  z-index: 0;
  inset: -28px;
  background: url("/images/homebg.png") center / cover no-repeat;
  filter: saturate(0.82) brightness(0.82);
  transform: translate3d(0, 0, 0) scale(1.045);
  transform-origin: center center;
  will-change: transform;
  opacity: 0;
  pointer-events: none;
  animation: welcome-scene-reveal 820ms ease 3.2s both;
}

.welcome-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 48%, rgba(0, 0, 0, 0.06));
  opacity: 0;
  pointer-events: none;
  animation: welcome-scene-reveal 820ms ease 3.2s both;
}

.welcome-nav {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 44px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  animation: welcome-ui-reveal 680ms cubic-bezier(0.22, 0.8, 0.26, 1) 3.2s both;
}

.welcome-nav-group {
  display: flex;
  align-items: center;
  gap: 38px;
}

.welcome-nav-link {
  position: relative;
  height: 32px;
  color: inherit;
  transition: color 180ms ease, opacity 180ms ease;
}

.welcome-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}

.welcome-nav-link:hover,
.welcome-nav-link:focus-visible {
  color: #fff;
}

.welcome-nav-link:hover::after,
.welcome-nav-link:focus-visible::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.welcome-nav-link.is-active {
  color: #fff;
}

.welcome-nav-link.is-active::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.welcome-nav-group:has(.welcome-nav-link:not(.is-active):hover) .welcome-nav-link.is-active {
  color: inherit;
}

.welcome-nav-group:has(.welcome-nav-link:not(.is-active):hover) .welcome-nav-link.is-active::after {
  opacity: 0;
  transform: scaleX(0.4);
}

.welcome-nav-brand {
  font-weight: 500;
}

.welcome-user {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #dee2e9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.welcome-user::after {
  content: "";
  width: 8px;
  height: 4px;
  margin-top: 11px;
  border-radius: 50% 50% 45% 45%;
  background: rgba(238, 243, 247, 0.8);
}

.welcome-brand-stage {
  position: absolute;
  z-index: 1;
  top: calc(50% - 22px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(280px, 21vw, 420px);
  aspect-ratio: 7 / 10;
  transform: translate(-50%, -50%) translate3d(var(--welcome-logo-parallax-x), var(--welcome-logo-parallax-y), 0) scale(1.62);
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  user-select: none;
  will-change: transform;
  /* path 模式：描边画完后再缩小，delay 3.5s / 820ms */
  --welcome-logo-settle-delay: 3.5s;
  animation: welcome-logo-settle 820ms cubic-bezier(0.2, 0.82, 0.24, 1) var(--welcome-logo-settle-delay) both;
}

.welcome-brand-stage.is-settled {
  animation: none;
  transform: translate(-50%, -50%) translate3d(var(--welcome-logo-parallax-x), var(--welcome-logo-parallax-y), 0) scale(1);
}

.welcome-brand-mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: brightness(0.72);
  will-change: opacity, filter;
  transition: opacity 820ms cubic-bezier(0.2, 0.82, 0.24, 1),
    filter 820ms cubic-bezier(0.2, 0.82, 0.24, 1);
}

.welcome-logo-path-intro,
.welcome-logo-path-intro img,
.welcome-logo-sequence-text,
.welcome-logo-sequence-text img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.welcome-logo-path-intro,
.welcome-logo-sequence-text {
  opacity: 1;
  transition: opacity 820ms cubic-bezier(0.2, 0.82, 0.24, 1),
    filter 820ms cubic-bezier(0.2, 0.82, 0.24, 1);
  will-change: opacity, filter;
}

.welcome-logo-path-intro img {
  clip-path: inset(0 0 16% 0); /* 菱形描边层裁掉底部字，字走 sequence-text */
}

.welcome-brand-stage.is-flowing .welcome-brand-mark,
.welcome-brand-stage[data-flowing] .welcome-brand-mark {
  opacity: 0.9;
  filter: brightness(0.98);
}

.welcome-brand-stage.is-flowing .welcome-logo-path-intro,
.welcome-brand-stage.is-flowing .welcome-logo-sequence-text,
.welcome-brand-stage[data-flowing] .welcome-logo-path-intro,
.welcome-brand-stage[data-flowing] .welcome-logo-sequence-text {
  opacity: 0;
  filter: blur(1.4px) brightness(1.08);
}

.welcome-enter-cue {
  position: absolute;
  z-index: 1;
  top: calc(75% + 25vh - 11px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  color: rgba(238, 238, 238, 0.6);
  font-size: 16px;
  font-weight: 400;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  pointer-events: auto;
  cursor: pointer;
  animation: welcome-enter-cue-reveal 680ms cubic-bezier(0.22, 0.8, 0.26, 1) 3.2s both;
}

.welcome-enter-chevron {
  display: block;
  width: 20px;
  height: 10px;
  opacity: 0.32;
  animation: welcome-enter-chevron-glow 1.5s ease-in-out 3.86s infinite;
}

.welcome-enter-chevron--upper {
  animation-delay: 4.08s;
}

.welcome-enter-label {
  margin-top: 2px;
  white-space: nowrap;
}

.welcome-login-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 220ms;
}

.welcome-login-layer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 220ms ease;
}

.welcome-page.is-login-open .welcome-login-layer {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.welcome-page.is-login-open .welcome-login-layer::before {
  opacity: 1;
}

.welcome-login-dialog {
  position: relative;
  overflow: hidden;
  width: min(389px, calc(100vw - 48px));
  min-height: 510px;
  padding: 112px 40px 40px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 35%, rgba(255, 255, 255, 0.15) 65%, rgba(255, 255, 255, 0.2) 100%);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.4), inset 0 -2px 1px rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(15px) saturate(0.82);
  -webkit-backdrop-filter: blur(15px) saturate(0.82);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.welcome-login-dialog > * {
  position: relative;
  z-index: 1;
}

.welcome-page.is-login-open .welcome-login-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.welcome-login-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #5f6b7b;
  transition: background 160ms ease;
}

.welcome-login-close img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.welcome-login-close:hover,
.welcome-login-close:focus-visible {
  background: #738194;
}

.welcome-login-title {
  margin: 0 0 40px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
}

.welcome-login-fields {
  display: grid;
  gap: 10px;
}

.welcome-login-field {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.welcome-login-field::placeholder {
  color: rgba(222, 226, 233, 0.8);
}

.welcome-login-field:focus {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
}

.welcome-login-row {
  display: flex;
  gap: 10px;
}

.welcome-login-row .welcome-login-field {
  flex: 1;
}

.welcome-login-captcha {
  flex: 0 0 112px;
  height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  transition: background 160ms ease, color 160ms ease;
}

.welcome-login-captcha:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.welcome-login-captcha:disabled {
  opacity: 0.55;
  cursor: default;
}

.welcome-login-submit {
  width: 100%;
  height: 44px;
  margin-top: 30px;
  border: none;
  border-radius: 16px;
  background: #6b7280;
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 0.25) inset, 0 -1px 1px 0 rgba(255, 255, 255, 0.25) inset;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  font-weight: 400;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.welcome-login-submit:hover,
.welcome-login-submit:focus-visible {
  background: #6b7280;
  color: #fff;
}

.welcome-login-submit:active {
  transform: scale(0.98);
}

.welcome-login-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.welcome-login-error {
  min-height: 20px;
  margin-top: 10px;
  color: #f0c0c0;
  font-size: 13px;
}

.welcome-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.5;
}

.welcome-login-actions button {
  color: inherit;
  font: inherit;
  transition: color 160ms ease;
}

.welcome-login-actions span button {
  color: #8fa0b4;
}

.welcome-login-actions button:hover,
.welcome-login-actions button:focus-visible {
  color: #fff;
}

@media (max-width: 1100px) {
  .welcome-nav {
    padding: 0 26px;
  }

  .welcome-nav-group {
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-page::before,
  .welcome-page::after,
  .welcome-bg,
  .welcome-nav,
  .welcome-brand-stage,
  .welcome-brand-mark,
  .welcome-enter-cue,
  .welcome-enter-chevron {
    animation: none;
  }

  .welcome-page::before,
  .welcome-page::after,
  .welcome-bg,
  .welcome-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .welcome-brand-stage {
    transform: translate(-50%, -50%) scale(1);
  }

  .welcome-brand-mark {
    opacity: 0.9;
    filter: brightness(0.98);
  }

  .welcome-logo-path-intro,
  .welcome-logo-sequence-text {
    display: none;
  }

  .welcome-enter-cue {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }

  .welcome-enter-chevron {
    opacity: 0.65;
    filter: none;
  }
}

/* ---------- 欢迎页 ↔ 首页 logo 交接（对齐 demo body.is-*-transition） ---------- */
body.is-welcome-to-home-transition,
body.is-home-to-welcome-transition {
  overflow: hidden;
}

body.is-welcome-to-home-transition[data-page] .welcome-page {
  position: fixed;
  z-index: 12;
  inset: 0;
  display: block;
  background: transparent;
}

body.is-welcome-to-home-transition[data-page] .home-page {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: block;
  overflow: hidden;
}

body.is-home-to-welcome-transition[data-page] .home-page {
  position: fixed;
  z-index: 12;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
  animation: home-page-to-welcome 700ms ease-in-out both;
}

body.is-home-to-welcome-transition[data-page] .welcome-page {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

body.is-welcome-to-home-transition .welcome-bg,
body.is-welcome-to-home-transition .welcome-page::after {
  animation: welcome-scene-exit 660ms ease-in-out both;
}

body.is-welcome-to-home-transition .welcome-nav {
  animation: none;
}

body.is-welcome-to-home-transition .welcome-nav-group:first-child {
  animation: welcome-nav-left-collapse 540ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

body.is-welcome-to-home-transition .welcome-nav-group:last-child {
  animation: welcome-nav-right-exit 480ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

body.is-welcome-to-home-transition .welcome-brand-stage {
  animation: welcome-logo-to-toolbar 760ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

body.is-welcome-returning .welcome-logo-path-intro,
body.is-home-to-welcome-transition .welcome-logo-path-intro,
body.is-welcome-to-home-transition .welcome-logo-path-intro,
body.is-welcome-returning .welcome-logo-sequence-text,
body.is-home-to-welcome-transition .welcome-logo-sequence-text,
body.is-welcome-to-home-transition .welcome-logo-sequence-text {
  display: none;
}

body.is-welcome-to-home-transition .welcome-enter-cue {
  animation: welcome-enter-cue-exit 180ms ease-out both;
}

body.is-welcome-to-home-transition .home-bg::before {
  opacity: 0;
  animation: home-background-reveal 760ms ease-out 80ms both;
}

body.is-welcome-to-home-transition .home-toolbar-group {
  opacity: 0;
  transform: translateY(-10px);
  animation: home-toolbar-side-reveal 400ms cubic-bezier(0.16, 1, 0.3, 1) 500ms both;
}

body.is-welcome-to-home-transition .home-toolbar-brand {
  opacity: 0;
  animation: home-brand-reveal 220ms ease-out 520ms both;
}

body.is-welcome-to-home-transition .coverflow-stage {
  opacity: 0;
  transform: translateY(34px);
  animation: home-content-reveal 620ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both;
}

body.is-welcome-to-home-transition .home-browser {
  opacity: 0;
  transform: translate(-50%, 26px);
  animation: home-browser-reveal 540ms cubic-bezier(0.16, 1, 0.3, 1) 410ms both;
}

body.is-welcome-to-home-transition .home-toolbar-upload,
body.is-welcome-to-home-transition .home-bottom-nav {
  opacity: 0;
  animation: home-float-reveal 440ms cubic-bezier(0.16, 1, 0.3, 1) 520ms both;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-bg,
body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-page::after {
  opacity: 1;
  animation: none;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: none;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-brand-stage {
  transform: translate(-50%, -50%) translate3d(var(--welcome-logo-parallax-x), var(--welcome-logo-parallax-y), 0) scale(1);
  animation: none;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-brand-mark {
  opacity: 0.9;
  filter: brightness(0.98);
  animation: welcome-return-logo-reveal 440ms ease-out both;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-enter-cue {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  animation: none;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-enter-chevron {
  animation: welcome-enter-chevron-glow 1.5s ease-in-out 0s infinite;
}

body.is-welcome-returning:not(.is-welcome-to-home-transition):not(.is-home-to-welcome-transition) .welcome-enter-chevron--upper {
  animation-delay: 0.22s;
}

body.is-home-to-welcome-transition .welcome-bg,
body.is-home-to-welcome-transition .welcome-page::after {
  opacity: 0;
  animation: welcome-return-scene 720ms ease-out 100ms both;
}

body.is-home-to-welcome-transition .welcome-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: none;
}

body.is-home-to-welcome-transition .welcome-nav-group:first-child {
  animation: welcome-nav-left-return 500ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}

body.is-home-to-welcome-transition .welcome-nav-group:last-child {
  animation: welcome-nav-right-return 460ms cubic-bezier(0.16, 1, 0.3, 1) 440ms both;
}

body.is-home-to-welcome-transition .welcome-brand-stage {
  animation: welcome-logo-from-toolbar 800ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

body.is-home-to-welcome-transition .welcome-brand-mark {
  opacity: 0.9;
  filter: brightness(0.98);
  animation: none;
}

body.is-home-to-welcome-transition .welcome-enter-cue {
  animation: welcome-return-cue 340ms cubic-bezier(0.16, 1, 0.3, 1) 580ms both;
}

body.is-home-to-welcome-transition .welcome-enter-chevron {
  animation: welcome-enter-chevron-glow 1.5s ease-in-out 700ms infinite;
}

body.is-home-to-welcome-transition .welcome-enter-chevron--upper {
  animation-delay: 920ms;
}

body.is-home-to-welcome-transition .home-toolbar-brand {
  animation: home-brand-handoff-out 260ms ease-out both;
}

@keyframes welcome-scene-exit {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes welcome-enter-cue-exit {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes welcome-nav-left-collapse {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    transform-origin: left center;
  }
  100% {
    opacity: 0;
    transform: translateX(-34px) scale(0.72);
    transform-origin: left center;
  }
}

@keyframes welcome-nav-right-exit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-92px);
  }
}

@keyframes welcome-logo-to-toolbar {
  0% {
    left: 50%;
    top: calc(50% - 22px);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  68% {
    left: var(--welcome-toolbar-center-x);
    top: var(--welcome-toolbar-center-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--welcome-toolbar-scale));
  }
  100% {
    left: var(--welcome-toolbar-center-x);
    top: var(--welcome-toolbar-center-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--welcome-toolbar-scale));
  }
}

@keyframes welcome-logo-from-toolbar {
  0% {
    left: var(--welcome-toolbar-center-x);
    top: var(--welcome-toolbar-center-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--welcome-toolbar-scale));
  }
  14% {
    left: var(--welcome-toolbar-center-x);
    top: var(--welcome-toolbar-center-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--welcome-toolbar-scale));
  }
  32% {
    left: var(--welcome-toolbar-center-x);
    top: var(--welcome-toolbar-center-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--welcome-toolbar-scale));
  }
  100% {
    left: 50%;
    top: calc(50% - 22px);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes welcome-return-scene {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcome-nav-left-return {
  from {
    opacity: 0;
    transform: translateX(-34px) scale(0.72);
    transform-origin: left center;
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    transform-origin: left center;
  }
}

@keyframes welcome-nav-right-return {
  from {
    opacity: 0;
    transform: translateX(-92px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes welcome-return-cue {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

@keyframes welcome-return-logo-reveal {
  from {
    opacity: 0;
    filter: brightness(0.76);
  }
  to {
    opacity: 0.9;
    filter: brightness(0.98);
  }
}

@keyframes home-page-to-welcome {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes home-brand-handoff-out {
  from { opacity: 0.88; }
  to { opacity: 0; }
}

@keyframes home-background-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes home-toolbar-side-reveal {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-brand-reveal {
  from { opacity: 0; }
  to { opacity: 0.88; }
}

@keyframes home-content-reveal {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-browser-reveal {
  from {
    opacity: 0;
    transform: translate(-50%, 26px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes home-float-reveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.api-alert-layer {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}
.api-alert-dialog {
  width: min(420px, calc(100vw - 48px));
  padding: 24px 22px 20px;
  border-radius: 16px;
  background: #1c1d21;
  color: #dee2e9;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
.api-alert-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}
.api-alert-text {
  margin: 0 0 20px;
  color: #c5cad3;
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
  word-break: break-word;
}
.api-alert-ok {
  display: block;
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 32px;
  background: #6b7280;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.api-alert-ok:hover,
.api-alert-ok:focus-visible {
  background: #8993a3;
}
:root {
      --color-white: oklch(1 0 0);
      --color-black: oklch(0 0 0);
      --color-home-bg: oklch(0.115 0 0);
      --color-surface: oklch(0.982 0 0);
      --color-text: oklch(0.551 0.023 264.364);
      --color-strong: oklch(0.404 0.024 262.848);
      --color-soft: oklch(0.912 0.01 261.788);
      --color-accent: oklch(0.564 0.036 255.67);
      --color-muted: oklch(0.717 0.024 263.156);
      --color-danger: oklch(0.568 0.121 21.659);
      --color-violet: oklch(0.659 0.193 287.734);
      --color-deep-red: oklch(0.47 0.186 28.467);
      --color-white-96: oklch(1 0 0 / 0.96);
      --color-white-92: oklch(1 0 0 / 0.92);
      --color-white-82: oklch(1 0 0 / 0.82);
      --color-white-18: oklch(1 0 0 / 0.18);
      --color-white-08: oklch(1 0 0 / 0.08);
      --color-black-28: oklch(0 0 0 / 0.28);
      --color-black-24: oklch(0 0 0 / 0.24);
      --color-black-18: oklch(0 0 0 / 0.18);
      --color-black-15: oklch(0 0 0 / 0.15);
      --color-black-10: oklch(0 0 0 / 0.1);
      --color-control-hover: oklch(0.912 0.01 261.788 / 0.78);
      --color-interaction-hover: oklch(0.942 0.012 257.8 / 0.92);
      --color-interaction-pressed: oklch(0.887 0.025 257.1 / 0.96);
      --color-interaction-selected: oklch(0.879 0.027 256.4 / 0.94);
      --color-accent-hover: oklch(0.515 0.044 255.2);
      --color-focus-ring: oklch(0.62 0.08 254.5 / 0.42);
      --color-switch-bg: oklch(0.341 0.007 274.773 / 0.82);
      --color-switch-line: oklch(0.912 0.01 261.788 / 0.16);

      --panel: oklch(0.982 0 0 / 0.84);
      --line: var(--color-white-96);
      --text: var(--color-text);
      --strong: var(--color-strong);
      --muted: var(--color-muted);
      --icon-normal: var(--color-text);
      --icon-parent: var(--color-strong);
      --icon-active: var(--color-white);
      --soft: var(--color-soft);
      --blue: var(--color-accent);
      --active-bg: var(--color-accent);
      --warm-a: var(--color-accent);
      --warm-b: var(--color-accent);
      --warm-c: var(--color-accent);
      --shadow: 0 8px 32px var(--color-black-15), inset 0 1px 1px oklch(1 0 0 / 0.8);
      --selected-shadow: 0 2px 8px oklch(0.564 0.036 255.67 / 0.25);
      --interaction-shadow: 0 4px 12px oklch(0.404 0.024 262.848 / 0.14);
      --motion-fast: 140ms;
      --motion-normal: 200ms;
      --motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
      --home-glass-blur: 26px;
      --home-glass-saturate: 1.38;
      --home-glass-brightness: 1.16;
      --home-glass-radius: 32px;
      --home-glass-tint: 0.08;
      --home-glass-tint-rgb: 255, 255, 255;
      --home-glass-shadow: 0.18;
      --home-glass-specular: 0.72;
      --home-inner-shadow-rgb: 255, 255, 255;
      --home-inner-shadow-blur: 0px;
      --home-inner-shadow-spread: -5px;
      --home-outer-shadow-blur: 50px;
    }
* {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      overflow: hidden;
      background: var(--color-white);
      color: var(--text);
      font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
      letter-spacing: 0;
    }

    button {
      border: 0;
      padding: 0;
      color: inherit;
      font: inherit;
      background: transparent;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    img:not([data-native-drag="true"]) {
      max-width: 100%;
      user-select: none;
      -webkit-user-select: none;
      -webkit-user-drag: none;
    }

    .glass {
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: var(--shadow);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }

    .icon-btn {
      display: grid;
      place-items: center;
      border-radius: 999px;
      transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
    }

    .icon-btn:hover {
      background: var(--color-interaction-hover);
      color: var(--strong);
    }

    .icon-btn.active {
      background: var(--color-interaction-selected);
      color: var(--strong);
    }

    .icon-btn:active {
      background: var(--color-interaction-pressed);
      transform: scale(0.96);
    }

    button:focus-visible,
    [role="button"]:focus-visible {
      outline: 2px solid var(--color-focus-ring);
      outline-offset: 2px;
    }

    .ui-svg {
      display: block;
      width: var(--ui-icon-size, 16px);
      height: var(--ui-icon-size, 16px);
      background: currentColor;
      -webkit-mask: var(--icon-url) center / contain no-repeat;
      mask: var(--icon-url) center / contain no-repeat;
    }

    .page-view {
      position: relative;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    body[data-page="home"] .demo,
    body[data-page="demo"] .home-page,
    body[data-page="home"] .welcome-page,
    body[data-page="demo"] .welcome-page,
    body[data-page="welcome"] .home-page,
    body[data-page="welcome"] .demo {
      display: none;
    }

    body[data-page="home"] .home-page,
    body[data-page="demo"] .demo,
    body[data-page="welcome"] .welcome-page {
      display: block;
    }

    body.is-welcome-to-home-transition .welcome-page,
    body.is-welcome-to-home-transition .home-page,
    body.is-home-to-welcome-transition .welcome-page,
    body.is-home-to-welcome-transition .home-page {
      display: block;
    }

    body[data-page="home"] {
      overflow-x: hidden;
      overflow-y: auto;
    }

    body[data-page="welcome"] {
      overflow: hidden;
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
