:root {
  --brand-primary: #2563eb;
  --brand-primary-soft: #dbeafe;
  --brand-text: #0f172a;
  --brand-muted: #64748b;
  --brand-bg: #f8fafc;
  --brand-border: #e2e8f0;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  color: var(--brand-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.09), transparent 28rem),
    linear-gradient(180deg, #f7fbff 0%, #f8fafc 18rem);
  margin: 0;
  margin-bottom: 56px;
  padding-top: 78px;
}

@media (max-width: 991.98px) {
  body { padding-top: 76px; }
}

.navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  color: var(--brand-text) !important;
}

.nav-link {
  font-weight: 500;
}

.app-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1030 !important;
  min-height: 74px;
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.app-nav-container {
  max-width: 1240px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #0f172a !important;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #1d4ed8;
}

.app-brand-icon svg {
  width: 32px;
  height: 32px;
}

.app-nav-menu {
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.app-nav-links {
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.app-nav .navbar-toggler {
  border: 1px solid #c7d2fe;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.18);
}

.app-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.app-nav-link {
  position: relative;
  color: #1e293b !important;
  border-radius: 0;
  padding: 0.5rem 0 !important;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.app-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 3px;
  border-radius: 999px;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.app-nav-link:hover,
.app-nav-link.active {
  color: #1d4ed8 !important;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.app-nav-link:hover::after,
.app-nav-link.active::after {
  transform: scaleX(1);
}

.app-nav-link--cta {
  display: none !important;
}

.app-nav-link--cta::after {
  display: none;
}

.app-nav-link--cta:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.45);
}

.app-nav-dropdown .dropdown-toggle::before {
  content: none;
}

.app-nav-dropdown .dropdown-toggle::after {
  margin-left: 0.45rem;
}

.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.app-use-btn {
  display: none !important;
}

.app-share-btn,
.app-use-btn,
.app-login-btn,
.app-points-chip,
.app-user-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 11px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 800;
  font-size: 0.9rem;
}

.app-svg-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
  display: block;
}

.app-svg-icon--share {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-share-btn,
.app-use-btn,
.app-login-btn {
  padding: 0 1rem;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.app-share-btn:hover,
.app-use-btn:hover,
.app-login-btn:hover {
  color: #1d4ed8;
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.app-use-btn {
  min-width: 108px;
}

.app-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  display: inline-block;
  flex: 0 0 1rem;
}

.app-icon--share::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.2rem;
  width: 0.78rem;
  height: 0.56rem;
  border: 2px solid currentColor;
  border-left: 0;
  border-bottom: 0;
  transform: skewY(-25deg) rotate(-18deg);
  border-radius: 0.1rem;
}

.app-icon--share::after {
  content: "";
  position: absolute;
  right: 0.02rem;
  top: 0.02rem;
  width: 0.34rem;
  height: 0.34rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.app-icon--share-light {
  color: #fff;
}

.app-user-chip {
  min-height: 42px;
  color: #334155;
  padding: 0 0.45rem 0 0.1rem;
  gap: 0.5rem;
}

.app-user-chip:hover {
  color: #1d4ed8;
}

.app-user-avatar,
.app-overview-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #fef3c7 100%);
  box-shadow: inset 0 0 0 2px #fff, 0 8px 18px rgba(15, 23, 42, 0.12);
}

.app-user-avatar svg,
.app-overview-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app-user-avatar {
  width: 38px;
  height: 38px;
  font-size: 1.35rem;
}

.app-points-chip {
  min-width: 74px;
  padding: 0 0.8rem;
  color: #334155;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.app-points-chip:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.app-points-coin,
.app-overview-coin {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45);
  font-size: 0.72rem;
}

.app-points-coin::before,
.app-overview-coin::before {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 999px;
  background: #fff7d6;
}

.app-points-coin::after,
.app-overview-coin::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 25%;
  width: 18%;
  height: 18%;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
}

.app-points-coin {
  width: 17px;
  height: 17px;
  font-size: 0.55rem;
}

.app-user-overview {
  padding: 1.35rem 0 0;
}

.app-user-overview-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) auto minmax(170px, 0.55fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 1.55rem;
  padding: 1rem 1.15rem;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: linear-gradient(115deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.app-overview-profile {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.app-overview-avatar {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 2.55rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #eff6ff 100%);
  border: 1px solid #e0e7ff;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.14);
  transition: transform .2s ease, box-shadow .2s ease;
}

.app-overview-avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(245, 158, 11, 0.2);
}

.app-overview-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app-overview-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
}

.app-overview-subtitle {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.88rem;
}

.app-overview-membership,
.app-overview-points {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 52px;
  padding: 0.45rem 0.75rem;
}

.app-overview-membership {
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid #d7e4ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  color: #64748b;
  font-size: 0.83rem;
}

.app-overview-membership #navMembershipType,
.app-overview-points-label {
  display: block;
  color: #64748b;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.2;
}

.app-overview-metric-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.18rem;
  line-height: 1.15;
}

.app-overview-membership strong {
  display: inline-block;
  max-width: 100%;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-membership-crown {
  position: relative;
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.15rem;
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  clip-path: polygon(0 100%, 0 35%, 25% 65%, 50% 15%, 75% 65%, 100% 35%, 100% 100%);
  filter: drop-shadow(0 4px 6px rgba(245, 158, 11, 0.22));
}

.app-overview-points {
  position: relative;
  color: #64748b;
  font-size: 0.83rem;
  margin-left: 0.4rem;
  padding-left: 2rem;
}

.app-overview-points::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 38px;
  border-radius: 999px;
  background: #cbd5e1;
  transform: translateY(-50%);
}

.app-overview-points strong {
  display: inline-flex;
  align-items: center;
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1;
}

.app-overview-points > .app-overview-coin {
  flex: 0 0 1.7rem;
  width: 1.7rem;
  height: 1.7rem;
}

.app-overview-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid #d7e4ff;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.09);
}

.app-overview-share > div > strong,
.app-overview-share > div > span {
  display: block;
}

.app-overview-share > div > strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.app-overview-share > div > span {
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.78rem;
}

.app-overview-share-btn {
  min-height: 48px;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  color: #fff !important;
  text-decoration: none;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.app-overview-share-btn span {
  color: #fff !important;
  display: inline-flex;
  align-items: center;
}

.app-overview-share-btn:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(29, 78, 216, 0.4);
}

.app-overview-share-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.28);
}

.app-nav-dropdown-menu {
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 9.5rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  text-align: center;
}

.dropdown-menu-end.app-nav-dropdown-menu {
  left: auto !important;
  right: 0 !important;
  transform: none;
}

.app-nav-dropdown-menu.show {
  display: block;
}

.app-nav-dropdown-menu .dropdown-item {
  border-radius: 8px;
  font-weight: 500;
  color: #1e293b;
  padding: 0.42rem 0.7rem;
  text-align: center;
}

.app-nav-dropdown-menu .dropdown-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

@media (min-width: 992px) {
  .app-nav-dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

@media (max-width: 1199.98px) {
  .app-nav-menu {
    gap: 0.85rem;
  }

  .app-nav-links {
    gap: 1rem;
  }

  .app-user-name {
    display: none;
  }

  .app-user-overview-card {
    grid-template-columns: 1fr 0.55fr;
  }

  .app-overview-share {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991.98px) {
  .app-user-overview--subpage {
    display: none !important;
  }

  .app-nav {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
  }

  .app-nav .container {
    align-items: center;
  }

  .app-nav .navbar-collapse {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  }

  .app-nav-links {
    width: 100%;
    gap: 0.45rem;
    margin-left: 0;
  }

  .app-nav-links .nav-item,
  .app-nav-links .dropdown {
    width: 100%;
  }

  .app-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-radius: 14px;
    padding: 0.72rem 0.95rem !important;
  }

  .app-nav-link::after {
    display: none;
  }

  .app-nav-link:hover {
    transform: none;
  }

  .app-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.8rem;
  }

  .app-user-menu {
    min-width: 0;
  }

  .app-share-btn,
  .app-use-btn,
  .app-login-btn,
  .app-points-chip,
  .app-user-chip {
    width: 100%;
  }

  .app-share-btn span:last-child,
  .app-user-name {
    display: inline;
  }

  .app-nav-dropdown-menu {
    position: static !important;
    float: none;
    min-width: 100%;
    margin-top: 0.45rem !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    text-align: left;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(219, 228, 241, 0.8);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  .app-nav-dropdown-menu .dropdown-item {
    padding: 0.68rem 0.85rem;
    text-align: left;
    white-space: normal;
  }

  .app-user-overview {
    padding-top: 1rem;
  }

  .app-user-overview-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.9rem;
    border-radius: 16px;
  }

  .app-overview-profile,
  .app-overview-share {
    grid-column: 1 / -1;
  }

  .app-overview-membership {
    justify-content: center;
    min-width: 0;
  }

  .app-overview-points {
    justify-content: center;
    margin-left: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
    border: 1px solid #d7e4ff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
    text-align: left;
  }

  .app-overview-points::before {
    display: none;
  }

  .app-overview-points strong {
    font-size: 1.15rem;
  }

  .app-overview-share {
    align-items: stretch;
    flex-direction: column;
  }

  /* 手机端首页用户概览仅保留问候信息，避免会员/积分/分享模块占满首屏。 */
  .app-user-overview--home .app-user-overview-card {
    display: block;
  }

  .app-user-overview--home .app-overview-membership,
  .app-user-overview--home .app-overview-points,
  .app-user-overview--home .app-overview-share {
    display: none !important;
  }
}

.hero-section {
  background: linear-gradient(120deg, #f0f9ff 0%, #eef2ff 100%);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-primary-soft);
  color: #1e40af;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-section h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.hero-section p {
  color: var(--brand-muted);
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-block {
  margin-bottom: 2.2rem;
}

.section-head h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.section-head p {
  color: var(--brand-muted);
  margin-bottom: 1rem;
}

.category-grid,
.tool-grid,
.scene-grid {
  display: grid;
  gap: 1rem;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.scene-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.category-card,
.tool-card,
.scene-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.category-card {
  text-decoration: none;
  color: var(--brand-text);
  font-weight: 600;
  text-align: center;
}

.category-card:hover,
.tool-card:hover,
.scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.tool-tag {
  display: inline-block;
  font-size: 0.76rem;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.8rem;
}

.tool-card h3,
.scene-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.tool-card p,
.scene-card p {
  font-size: 0.92rem;
  color: var(--brand-muted);
  margin-bottom: 0.9rem;
}

.tool-link {
  text-decoration: none;
  color: var(--brand-primary);
  font-weight: 600;
}

.tool-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-status {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tool-status--implemented {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.tool-status--planned {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.tool-card--implemented {
  border-color: #86efac;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
  cursor: pointer;
}

.tool-card--implemented .tool-tag {
  background: #ecfdf3;
  color: #166534;
}

.tool-card--implemented:hover,
.tool-card--implemented:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(22, 101, 52, 0.15);
  border-color: #4ade80;
}

.tool-card--implemented:hover .tool-link,
.tool-card--implemented:focus-within .tool-link {
  text-decoration: none;
}

.tool-card--planned {
  cursor: not-allowed;
}

.tool-card--planned:hover,
.tool-card--planned:focus-within {
  border-color: #94a3b8;
}

.tool-card--planned::after {
  content: "该模块未实现，敬请期待";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.9rem;
  font-size: 0.76rem;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.18rem 0.62rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, bottom 0.2s ease;
  white-space: nowrap;
}

.tool-card--planned:hover::after,
.tool-card--planned:focus::after,
.tool-card--planned:focus-within::after {
  opacity: 1;
  bottom: 0.35rem;
}

.tool-link-disabled {
  color: #94a3b8;
}

.scene-btn-soft {
  font-size: 0.82rem;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 0.3rem 0.55rem;
}

.scene-btn-soft:hover,
.scene-btn-soft:focus {
  color: #64748b;
  border-color: #94a3b8;
  background: #f1f5f9;
}

.cta-section {
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  padding: 2rem 1rem;
}

.cta-section p {
  color: var(--brand-muted);
  margin: 0.75rem auto 1.2rem;
  max-width: 680px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 2.4rem;
  border-radius: 28px;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.32), transparent 34%),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.22), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 48%, #f8fafc 100%);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.12);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.4rem;
  align-items: stretch;
}

.home-eyebrow,
.home-section-kicker,
.home-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
  border: 1px solid #bfdbfe;
}

.home-hero h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.55rem);
  line-height: 1.1;
  margin: 1rem 0 1rem;
  max-width: 12em;
}

.home-hero-lead {
  margin: 0;
  max-width: 50rem;
  color: #475569;
  font-size: 1.03rem;
  line-height: 1.85;
}

.home-hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.2rem 0 0;
}

.home-hero-bullets span {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.78);
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.08);
}

.home-hero-actions {
  margin-top: 1.35rem;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.45rem;
}

.home-stat-card {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(219, 234, 254, 0.96);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(148, 163, 184, 0.12);
}

.home-stat-card strong {
  font-size: 1.55rem;
  line-height: 1;
  color: #0f172a;
}

.home-stat-card span {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.5;
}

.home-hero-side {
  display: grid;
  gap: 1rem;
}

.home-panel-card {
  display: grid;
  gap: 0.95rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(219, 234, 254, 0.96);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.12);
  height: 100%;
}

.home-panel-card--soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
}

.home-panel-head {
  display: grid;
  gap: 0.45rem;
}

.home-panel-head h2,
.home-panel-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.home-path-stack {
  display: grid;
  gap: 0.75rem;
}

.home-path-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-path-card strong {
  color: #0f172a;
}

.home-path-card p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.65;
}

.home-path-card:hover,
.home-path-card:focus {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12);
}

.home-check-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.7rem;
}

.home-check-list li {
  color: #334155;
  line-height: 1.7;
}

.home-section {
  margin-bottom: 2.2rem;
}

.home-section-head {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.home-section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.25;
}

.home-section-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
  max-width: 60rem;
}

.home-section-head--split {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.home-capability-grid,
.home-path-grid,
.home-workflow-grid,
.home-tool-grid,
.home-value-grid {
  display: grid;
  gap: 1rem;
}

.home-capability-grid,
.home-path-grid,
.home-tool-grid,
.home-value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-capability-card,
.home-combo-card,
.home-workflow-card,
.home-value-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.1);
}

.home-capability-card {
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-capability-card:hover,
.home-capability-card:focus {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.12);
}

.home-capability-count {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
}

.home-capability-card h3,
.home-combo-card h3,
.home-workflow-card h3,
.home-value-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.home-capability-card p,
.home-combo-card p,
.home-workflow-card p,
.home-value-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.72;
  font-size: 0.93rem;
}

.home-combo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.home-combo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-workflow-step {
  display: inline-flex;
  width: fit-content;
  min-width: 2.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-tool-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 32px rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-tool-card:hover,
.home-tool-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(59, 130, 246, 0.12);
}

.home-tool-card--text:hover,
.home-tool-card--text:focus-within {
  border-color: #93c5fd;
}

.home-tool-card--image:hover,
.home-tool-card--image:focus-within {
  border-color: #86efac;
  box-shadow: 0 20px 36px rgba(34, 197, 94, 0.12);
}

.home-tool-card--poster:hover,
.home-tool-card--poster:focus-within {
  border-color: #c4b5fd;
  box-shadow: 0 20px 36px rgba(124, 58, 237, 0.12);
}

.home-tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-tool-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.home-tool-chip-group .tool-tag {
  margin-bottom: 0;
}

.home-tool-type {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe4f1;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
}

.home-tool-index {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
}

.home-tool-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.home-tool-summary,
.home-tool-scene {
  margin: 0;
  color: #475569;
  line-height: 1.72;
  font-size: 0.93rem;
}

.home-tool-scene {
  color: #64748b;
}

.home-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.1rem;
  color: #64748b;
  font-size: 0.84rem;
}

.home-cta-section {
  border-radius: 24px;
  padding: 2.25rem 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.4), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.1);
}

.home-cta-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ===== Landing Page (新首页) ===== */
.landing-hero {
  position: relative;
  margin-bottom: 3rem;
  padding: 4.5rem 2rem 4rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 25%, rgba(125, 211, 252, 0.28), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(167, 139, 250, 0.22), transparent 42%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 50%, #fafbff 100%);
  border: 1px solid #e5edff;
  text-align: center;
  overflow: hidden;
}

.landing-hero-inner {
  max-width: 880px;
  margin: 0 auto;
}

.landing-eyebrow {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #c7d2fe;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.4rem;
}

.landing-hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.1rem;
  letter-spacing: -0.01em;
}

.landing-lead {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #475569;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.landing-hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.landing-hero-actions .btn-lg {
  padding: 0.7rem 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}

.landing-hero-meta {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #64748b;
}

.landing-hero-meta strong {
  color: #1e40af;
  font-weight: 700;
  margin-right: 0.25rem;
}

.landing-section {
  margin: 3.5rem 0;
}

.landing-section-head {
  text-align: center;
  margin-bottom: 2.4rem;
}

.landing-section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.landing-section-head p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

.landing-tool-group {
  position: relative;
  margin-bottom: 2.6rem;
  padding: 1.5rem 1.6rem 1.7rem;
  border-radius: 22px;
  background: linear-gradient(155deg, #ffffff 0%, #f5f8ff 60%, #eef4ff 100%);
  border: 1px solid #e5edff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 14px 36px rgba(37, 99, 235, 0.07);
  overflow: hidden;
  isolation: isolate;
}

.landing-tool-group::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.landing-tool-group::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.landing-tool-group > * {
  position: relative;
  z-index: 1;
}

.landing-tool-group#group-generic {
  background: linear-gradient(155deg, #ffffff 0%, #fff7ed 60%, #ffedd5 100%);
  border-color: #fed7aa;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 36px rgba(245, 158, 11, 0.10);
}
.landing-tool-group#group-generic::before {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0) 70%);
}
.landing-tool-group#group-generic::after {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0) 70%);
}

.landing-tool-group#group-image {
  background: linear-gradient(155deg, #ffffff 0%, #f0f9ff 60%, #e0e7ff 100%);
  border-color: #c7d2fe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 36px rgba(99, 102, 241, 0.12);
}
.landing-tool-group#group-image::before {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0) 70%);
}
.landing-tool-group#group-image::after {
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0) 70%);
}

.landing-tool-group#group-text {
  background: linear-gradient(155deg, #ffffff 0%, #f0fdf4 60%, #dcfce7 100%);
  border-color: #bbf7d0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 36px rgba(20, 184, 166, 0.10);
}
.landing-tool-group#group-text::before {
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.22), rgba(20, 184, 166, 0) 70%);
}
.landing-tool-group#group-text::after {
  background: radial-gradient(circle at center, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0) 70%);
}

.landing-group-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
}

.landing-group-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: 0.01em;
}

.landing-group-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.65rem;
  font-size: 0.78rem;
  color: #475569;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.landing-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.landing-tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.3rem 1.15rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 237, 255, 0.9);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.landing-tool-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #818cf8);
  opacity: 0.55;
  transition: opacity .22s, height .22s;
}

.landing-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.16);
  border-color: #c7d2fe;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
}

.landing-tool-card:hover::before {
  opacity: 1;
  height: 4px;
}

.landing-tool-card--image::before { background: linear-gradient(90deg, #38bdf8, #6366f1); }
.landing-tool-card--poster::before { background: linear-gradient(90deg, #f472b6, #a855f7); }
.landing-tool-card--text::before { background: linear-gradient(90deg, #34d399, #14b8a6); }
.landing-tool-card--generic::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.landing-group-desc {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
}

.landing-tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.landing-tool-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.landing-tool-type {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.landing-tool-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.landing-tool-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
  flex-grow: 1;
}

.landing-tool-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  margin-top: 0.4rem;
}

.landing-features-section {
  margin: 4rem -1rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 50%, #fdf2f8 100%);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.landing-features-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.12), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.10), transparent 45%);
  pointer-events: none;
}

.landing-features-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-features-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.landing-features-head h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.6rem 0 0.7rem;
}

.landing-features-head p {
  color: #475569;
  max-width: 640px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

.landing-features-section .landing-features {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.landing-features-section .landing-features article {
  text-align: left;
  padding: 1.6rem 1.4rem;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-features-section .landing-features article:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

.landing-features-section .landing-feature-icon {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.30);
}

.landing-features-section .landing-features h3 {
  font-size: 1.12rem;
  margin-bottom: 0.5rem;
}

.landing-features-section .landing-features p {
  font-size: 0.92rem;
  color: #475569;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 4rem 0;
  padding: 2.4rem 1.5rem;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.landing-features article {
  text-align: center;
  padding: 0.8rem;
}

.landing-feature-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.landing-features h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.45rem;
}

.landing-features p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

.landing-cta {
  margin: 4rem 0 2rem;
  padding: 3rem 2rem;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e3a8a 0%, #6366f1 100%);
  color: #fff;
  text-align: center;
}

.landing-cta h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.7rem;
}

.landing-cta p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.6rem;
  font-size: 1rem;
}

.landing-cta-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.landing-cta-actions .btn-primary {
  background: #fff;
  color: #1e3a8a;
  border-color: #fff;
}

.landing-cta-actions .btn-primary:hover {
  background: #eff6ff;
  border-color: #eff6ff;
  color: #1e3a8a;
}

.landing-cta-actions .btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.landing-cta-actions .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

@media (max-width: 640px) {
  .landing-hero {
    padding: 3rem 1.2rem 2.8rem;
  }
  .landing-hero-meta {
    gap: 0.9rem;
    font-size: 0.82rem;
  }
  .landing-features {
    padding: 1.8rem 1rem;
  }
  .landing-cta {
    padding: 2.2rem 1.2rem;
  }
}

/* ===== Homepage refresh ===== */
.landing-hero {
  margin: 0 0 1.15rem;
  padding: 3rem 3.2rem 2.75rem;
  border-radius: 20px;
  text-align: left;
  background:
    radial-gradient(circle at 12% 14%, rgba(125, 211, 252, 0.24), transparent 22rem),
    radial-gradient(circle at 84% 20%, rgba(167, 139, 250, 0.22), transparent 24rem),
    linear-gradient(135deg, #f7fbff 0%, #eef6ff 52%, #f7faff 100%);
  border: 1px solid #d9e8ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 18px 42px rgba(37,99,235,.08);
}

.landing-hero-inner {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 2.5rem;
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  padding: 0.45rem 1rem;
  background: rgba(255,255,255,.78);
  border: 1px solid #cfe2ff;
  color: #2563eb;
  box-shadow: 0 10px 22px rgba(37,99,235,.08);
  letter-spacing: 0;
}

.landing-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.landing-hero h1 {
  max-width: 640px;
  margin-bottom: 1.25rem;
  color: #071126;
  font-size: clamp(2.35rem, 4.6vw, 4rem);
  line-height: 1.22;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.landing-lead {
  max-width: 610px;
  margin: 0 0 2rem;
  color: #5c6b82;
  font-size: 1rem;
  line-height: 1.85;
}

.landing-hero-actions {
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.landing-hero-actions .btn-lg {
  position: relative;
  overflow: hidden;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.45rem;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 850;
}

.landing-hero-actions .btn-lg::after,
.landing-hot-card::after,
.landing-scene-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 70%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg);
  transition: left .65s ease;
  pointer-events: none;
}

.landing-hero-actions .btn-lg:hover::after,
.landing-hot-card:hover::after,
.landing-scene-card:hover::after {
  left: 140%;
}

.landing-btn-icon,
.landing-mini-icon {
  position: relative;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.landing-btn-icon--grid::before {
  content: "";
  position: absolute;
  width: 0.36rem;
  height: 0.36rem;
  left: 0.1rem;
  top: 0.1rem;
  border-radius: 0.12rem;
  background: currentColor;
  box-shadow: 0.5rem 0 0 currentColor, 0 0.5rem 0 currentColor, 0.5rem 0.5rem 0 currentColor;
}

.landing-btn-icon--image::before,
.landing-mini-icon--image::before {
  content: "";
  position: absolute;
  inset: 0.12rem;
  border: 2px solid currentColor;
  border-radius: 0.18rem;
}

.landing-btn-icon--image::after,
.landing-mini-icon--image::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  bottom: 0.28rem;
  width: 0.48rem;
  height: 0.3rem;
  background: currentColor;
  clip-path: polygon(0 100%, 35% 42%, 58% 70%, 80% 20%, 100% 100%);
}

.landing-hero-actions .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #164fe3 100%);
  border-color: transparent;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
}

.landing-hero-actions .btn-outline-primary {
  color: #2563eb;
  background: rgba(255,255,255,.84);
  border-color: #2563eb;
  box-shadow: 0 10px 20px rgba(37,99,235,.07);
}

.landing-hero-meta {
  justify-content: flex-start;
  gap: 0;
  color: #64748b;
  font-size: 0.88rem;
}

.landing-hero-meta span {
  position: relative;
  padding: 0 0.9rem;
}

.landing-hero-meta span:first-child {
  padding-left: 0;
}

.landing-hero-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 0.9rem;
  background: #cbd5e1;
  transform: translateY(-50%);
}

.landing-hero-meta strong {
  color: #1d4ed8;
  font-weight: 900;
}

.landing-hero-art {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.landing-hero-art::before,
.landing-hero-art::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.landing-hero-art::before {
  width: 500px;
  height: 230px;
  border: 3px solid rgba(147, 197, 253, 0.35);
  transform: rotate(-13deg);
}

.landing-hero-art::after {
  width: 470px;
  height: 230px;
  border: 3px solid rgba(196, 181, 253, 0.32);
  transform: rotate(23deg);
}

.landing-ai-badge {
  position: absolute;
  top: 1.6rem;
  left: 2.4rem;
  z-index: 4;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 950;
  background: linear-gradient(135deg, #8b5cf6, #60a5fa);
  box-shadow: 0 16px 26px rgba(99,102,241,.32);
  animation: landingPulse 2.8s ease-in-out infinite;
}

.landing-art-window {
  position: relative;
  z-index: 3;
  width: min(100%, 385px);
  padding: 2.5rem 1.05rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  border: 1.5px solid rgba(96, 165, 250, 0.75);
  box-shadow: 0 26px 50px rgba(37, 99, 235, 0.15);
  backdrop-filter: blur(10px);
  animation: landingFloat 5.5s ease-in-out infinite;
}

.landing-art-dots {
  position: absolute;
  top: 1rem;
  left: 2.4rem;
  display: flex;
  gap: 0.6rem;
}

.landing-art-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #a9c2ff;
}

.landing-art-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.landing-art-tools span {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.landing-art-tools i {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #2563eb;
  font-style: normal;
  background: linear-gradient(135deg, #eef4ff, #f3f0ff);
}

.landing-mini-icon--text::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  width: 0.9rem;
  height: 0.12rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0.42rem 0 currentColor, 0 0.84rem 0 currentColor;
}

.landing-mini-icon--chat::before,
.landing-hot-icon--chat::before {
  content: "";
  position: absolute;
  left: 29%;
  top: 30%;
  width: 42%;
  height: 34%;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.landing-mini-icon--chat::after,
.landing-hot-icon--chat::after {
  content: "";
  position: absolute;
  width: 0.34rem;
  height: 0.34rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(25deg);
  bottom: 30%;
  right: 30%;
}

.landing-mini-icon--chat::before {
  left: 23%;
  top: 28%;
}

.landing-mini-icon--chat::after {
  bottom: 25%;
  right: 24%;
}

.landing-mini-icon--chart::before,
.landing-hot-icon--chart::before,
.landing-scene-icon--pie::before {
  content: "";
  position: absolute;
  left: 31%;
  bottom: 29%;
  width: 0.18rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0.38rem -0.28rem 0 currentColor, 0.76rem -0.08rem 0 currentColor;
}

.landing-art-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.landing-product-preview {
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #eee9e2, #f8fafc);
  box-shadow: inset 0 0 0 1px rgba(203,213,225,.55);
}

.landing-product-device {
  position: relative;
  width: 82px;
  height: 82px;
  display: block;
}

.landing-product-device::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  width: 54px;
  height: 56px;
  border: 8px solid #9b8c80;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55);
}

.landing-product-device::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 42px;
  width: 22px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #cabfb4, #8d7f73);
  box-shadow: 50px 0 0 #8d7f73, 24px 20px 0 -10px #6b625b;
}

.landing-art-lines {
  display: grid;
  align-content: center;
  gap: 0.75rem;
}

.landing-art-lines b {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbeafe, #c7d2fe);
}

.landing-art-lines b:nth-child(2) {
  width: 85%;
}

.landing-art-lines b:nth-child(3) {
  width: 68%;
}

.landing-art-checklist {
  position: absolute;
  right: -2rem;
  bottom: 0.15rem;
  width: 178px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(37,99,235,.14);
}

.landing-art-checklist strong {
  display: block;
  margin-bottom: 0.55rem;
  color: #475569;
  font-size: 0.82rem;
}

.landing-art-checklist span {
  display: block;
  margin-top: 0.42rem;
  color: #64748b;
  font-size: 0.74rem;
}

.landing-art-checklist span::before {
  content: "";
  display: inline-block;
  width: 0.48rem;
  height: 0.28rem;
  margin-right: 0.45rem;
  border-left: 2px solid #22c55e;
  border-bottom: 2px solid #22c55e;
  transform: rotate(-45deg) translateY(-0.06rem);
}

.landing-sparkle {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.3rem;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 2rem;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  box-shadow: 0 18px 32px rgba(99,102,241,.26);
  animation: landingSpark 2.4s ease-in-out infinite;
}

.landing-sparkle::before,
.landing-sparkle::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #fff;
}

.landing-sparkle::before {
  width: 34px;
  height: 10px;
}

.landing-sparkle::after {
  width: 10px;
  height: 34px;
}

.landing-capability-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.15rem 0 1.85rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(15,23,42,.05);
}

.landing-capability-strip article {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.landing-capability-icon {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #22c55e;
  background: #dcfce7;
  font-size: 1.35rem;
  transition: transform .22s ease, box-shadow .22s ease;
}

.landing-capability-icon--purple { color: #7c3aed; background: #ede9fe; }
.landing-capability-icon--blue { color: #2563eb; background: #eaf2ff; }
.landing-capability-icon--orange { color: #f59e0b; background: #fff7ed; }

.landing-capability-strip article:hover .landing-capability-icon {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 12px 24px rgba(37,99,235,.14);
}

.landing-capability-icon--shield::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.4rem;
  height: 1.55rem;
  background: currentColor;
  clip-path: polygon(50% 0, 88% 16%, 80% 74%, 50% 100%, 20% 74%, 12% 16%);
  transform: translate(-50%, -50%);
}

.landing-capability-icon--shield::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.6rem;
  height: 0.34rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.landing-capability-icon--cube::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.35rem;
  height: 1.35rem;
  border: 3px solid currentColor;
  border-radius: 0.28rem;
  transform: translate(-50%, -50%) rotate(45deg);
}

.landing-capability-icon--layers::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.55rem;
  height: 0.42rem;
  border-radius: 0.16rem;
  background: currentColor;
  box-shadow: 0 0.52rem 0 currentColor, 0 1.04rem 0 currentColor;
  /* 该图标由 3 条叠层组成，整体上移一点让视觉中心落回容器中线。 */
  transform: translate(-50%, calc(-50% - 0.2rem)) skewY(-18deg);
}

.landing-capability-icon--bolt::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 1.7rem;
  background: currentColor;
  clip-path: polygon(52% 0, 12% 55%, 46% 55%, 30% 100%, 88% 39%, 54% 39%);
  transform: translate(-50%, -50%);
}

.landing-capability-strip strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
}

.landing-capability-strip p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
}

.landing-quick-section {
  margin-top: 1.75rem;
}

.landing-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.landing-quick-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 950;
}

.landing-title-flame {
  position: relative;
  width: 1rem;
  height: 1.15rem;
  display: inline-block;
  border-radius: 70% 30% 70% 45%;
  background: linear-gradient(135deg, #fb923c, #ef4444);
  transform: rotate(45deg);
  animation: landingFlicker 1.8s ease-in-out infinite;
}

.landing-title-flame::after {
  content: "";
  position: absolute;
  width: 0.42rem;
  height: 0.55rem;
  left: 0.3rem;
  top: 0.36rem;
  border-radius: 70% 30% 70% 45%;
  background: #fde68a;
}

.landing-quick-head a {
  color: #64748b;
  font-size: 0.9rem;
  text-decoration: none;
}

.landing-quick-head a:hover {
  color: #2563eb;
}

.landing-hot-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.landing-hot-card,
.landing-scene-card {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.92);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15,23,42,.045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.landing-hot-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem 1rem 1rem;
  border-radius: 12px;
}

.landing-hot-card:hover,
.landing-scene-card:hover {
  color: inherit;
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 18px 36px rgba(37,99,235,.12);
}

.landing-hot-card:hover .landing-hot-icon,
.landing-scene-card:hover .landing-scene-icon {
  transform: translateY(-2px) scale(1.08);
}

.landing-hot-icon {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  border-radius: 14px;
  color: #2563eb;
  background: linear-gradient(135deg, #eaf2ff, #eef2ff);
  font-style: normal;
  font-weight: 950;
  font-size: 1.35rem;
  transition: transform .22s ease, box-shadow .22s ease;
}

.landing-hot-icon--green { color: #10b981; background: #dffbef; }
.landing-hot-icon--violet { color: #8b5cf6; background: #f1eaff; }
.landing-hot-icon--orange { color: #f59e0b; background: #fff3d6; }
.landing-hot-icon--blue { color: #2563eb; background: #e8f1ff; }
.landing-hot-icon--teal { color: #14b8a6; background: #dcfbf7; }

.landing-hot-icon::before,
.landing-hot-icon::after,
.landing-scene-icon::before,
.landing-scene-icon::after {
  content: "";
  position: absolute;
}

.landing-hot-icon--bag::before,
.landing-scene-icon--bag::before {
  width: 1.4rem;
  height: 1.25rem;
  bottom: 0.9rem;
  left: 50%;
  border: 3px solid currentColor;
  border-radius: 0.28rem;
  transform: translateX(-50%);
}

.landing-hot-icon--bag::after,
.landing-scene-icon--bag::after {
  width: 0.82rem;
  height: 0.5rem;
  top: 0.9rem;
  left: 50%;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: translateX(-50%);
}

.landing-hot-icon--sofa::before {
  width: 1.65rem;
  height: 0.8rem;
  left: 50%;
  bottom: 1rem;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0.22rem 0.22rem 0.45rem 0.45rem;
  transform: translateX(-50%);
}

.landing-hot-icon--sofa::after {
  width: 2rem;
  height: 0.66rem;
  left: 50%;
  top: 1rem;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 0.5rem 0.5rem 0.12rem 0.12rem;
  transform: translateX(-50%);
}

.landing-hot-icon--doc::before {
  width: 1.35rem;
  height: 1.65rem;
  border: 3px solid currentColor;
  border-radius: 0.22rem;
}

.landing-hot-icon--doc::after {
  width: 0.72rem;
  height: 0.12rem;
  left: 1.18rem;
  top: 1.55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0.42rem 0 currentColor, 0 0.84rem 0 currentColor;
}

.landing-hot-icon--text::before {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.24rem;
  border: 3px solid currentColor;
}

.landing-hot-icon--text::after {
  width: 0.18rem;
  height: 1rem;
  background: currentColor;
  box-shadow: -0.42rem 0 0 currentColor, 0.42rem 0 0 currentColor;
}

.landing-hot-card strong {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 900;
}

.landing-hot-card p {
  flex: 1;
  margin: 0.4rem 0 0.75rem;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.landing-hot-card em {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.05rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.landing-scene-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
}

.landing-scene-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc";
  column-gap: 0.9rem;
  align-items: center;
  min-height: 82px;
  padding: 1rem 1.05rem;
  border-radius: 14px;
}

.landing-scene-card.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.15), 0 14px 30px rgba(37,99,235,.10);
}

.landing-scene-icon {
  position: relative;
  grid-area: icon;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eaf2ff;
  color: #2563eb;
  transition: transform .22s ease, box-shadow .22s ease;
}

.landing-scene-icon--megaphone::before {
  width: 1.4rem;
  height: 1rem;
  left: 1rem;
  top: 0.85rem;
  border: 3px solid currentColor;
  border-left: 0;
  clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 72%);
}

.landing-scene-icon--megaphone::after {
  width: 0.55rem;
  height: 0.8rem;
  left: 0.75rem;
  top: 1.42rem;
  border-radius: 0.12rem;
  background: currentColor;
  transform: rotate(-15deg);
}

.landing-scene-icon--edit::before {
  width: 1.45rem;
  height: 1.45rem;
  left: 0.8rem;
  top: 0.85rem;
  border: 3px solid currentColor;
  border-radius: 0.24rem;
}

.landing-scene-icon--edit::after {
  width: 1.28rem;
  height: 0.28rem;
  left: 1.4rem;
  top: 1.2rem;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
}

.landing-scene-icon--support::before {
  width: 1.7rem;
  height: 1.4rem;
  left: 0.85rem;
  top: 0.9rem;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.landing-scene-icon--support::after {
  width: 0.4rem;
  height: 0.75rem;
  left: 0.75rem;
  top: 1.6rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 1.9rem 0 0 currentColor;
}

.landing-scene-icon--pie::before {
  width: 1.45rem;
  height: 1.45rem;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: conic-gradient(currentColor 0 75%, rgba(37,99,235,.18) 75% 100%);
  transform: translate(-50%, -50%);
  box-shadow: none;
}

.landing-scene-icon--pie::after {
  width: 0.72rem;
  height: 0.72rem;
  right: 0.64rem;
  top: 0.64rem;
  border-left: 3px solid #eaf2ff;
  border-bottom: 3px solid #eaf2ff;
}

@keyframes landingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes landingPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 16px 26px rgba(99,102,241,.32); }
  50% { transform: scale(1.06); box-shadow: 0 20px 34px rgba(99,102,241,.42); }
}

@keyframes landingSpark {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.08); }
}

@keyframes landingFlicker {
  0%, 100% { transform: rotate(45deg) scale(1); opacity: .95; }
  50% { transform: rotate(45deg) scale(1.1); opacity: 1; }
}

.landing-scene-card strong {
  grid-area: title;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 900;
}

.landing-scene-card p {
  grid-area: desc;
  margin: 0.24rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

@media (max-width: 1199.98px) {
  .landing-hot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-scene-grid,
  .landing-capability-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .landing-hero {
    padding: 2.2rem 1.4rem;
  }

  .landing-hero-inner {
    grid-template-columns: 1fr;
  }

  .landing-hero-art {
    min-height: 300px;
  }

  .landing-art-checklist {
    right: 0.3rem;
  }
}

@media (max-width: 640px) {
  .app-user-overview-card {
    column-gap: 0.6rem;
  }

  .app-overview-membership {
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.55rem;
  }

  .app-overview-membership #navMembershipType {
    min-width: 0;
    white-space: nowrap;
  }

  .app-overview-membership strong {
    max-width: 100%;
    text-align: center;
  }

  .app-overview-points {
    justify-content: center;
    gap: 0.65rem;
    padding: 0.45rem 0.55rem;
    text-align: left;
  }

  .app-overview-points-label {
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .app-overview-points strong {
    white-space: nowrap;
  }

  .landing-hero-actions .btn-lg,
  .landing-hero-actions {
    width: 100%;
  }

  .landing-hero-meta span {
    padding: 0.1rem 0.65rem;
  }

  .landing-capability-strip,
  .landing-hot-grid,
  .landing-scene-grid {
    grid-template-columns: 1fr;
  }

  .landing-hot-card {
    min-height: auto;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon title action"
      "icon desc action";
    align-items: center;
    column-gap: 0.9rem;
    row-gap: 0.22rem;
    padding: 1rem;
    border-radius: 16px;
  }

  .landing-hot-icon {
    grid-area: icon;
    margin-bottom: 0;
  }

  .landing-hot-card strong {
    grid-area: title;
    min-width: 0;
    font-size: 1rem;
  }

  .landing-hot-card p {
    grid-area: desc;
    flex: initial;
    margin: 0;
    min-width: 0;
    font-size: 0.82rem;
  }

  .landing-hot-card em {
    grid-area: action;
    align-self: center;
    justify-self: end;
    margin-top: 0;
  }

}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline-primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.12rem #fff, 0 0 0 0.24rem rgba(37, 99, 235, 0.4);
}

/* 页脚保持紧凑高度，避免备案信息加入后底部留白过大。 */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  font-size: 0.84rem;
  line-height: 1.4;
  padding: 0.5rem 0;
}

.footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  text-align: center;
}

.footer-separator {
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .footer {
    padding: 0.45rem 0;
  }

  .footer .container {
    gap: 0.25rem 0.4rem;
  }

  .footer-separator {
    display: none;
  }
}

@media (max-width: 1199px) {
  .home-hero-grid,
  .home-section-head--split,
  .home-workflow-grid {
    grid-template-columns: 1fr;
  }

  .home-capability-grid,
  .home-path-grid,
  .home-tool-grid,
  .home-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: 1.45rem 1rem;
    border-radius: 22px;
  }

  .home-capability-grid,
  .home-path-grid,
  .home-tool-grid,
  .home-value-grid,
  .featured-tool-cost-grid {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    max-width: none;
  }

  .home-tool-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-cta-actions {
    justify-content: stretch;
  }

  .home-cta-actions .btn {
    width: 100%;
  }
}

.scene-page {
  display: grid;
  gap: 1.2rem;
}

.scene-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.scene-page-head h1 {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.scene-page-head p {
  margin-bottom: 0;
  color: var(--brand-muted);
  font-size: 0.93rem;
}

.scene-head-more-btn {
  display: none;
}

.scene-badge {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  min-width: 88px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
}

.scene-badge-link {
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scene-badge-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.scene-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

.scene-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.scene-panel-wide {
  grid-column: 1 / -1;
}

.scene-panel {
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 1rem;
}

.scene-panel h2 {
  font-size: 1.06rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scene-panel-compact {
  padding: 0.9rem;
}

.scene-panel-compact h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.scene-step-badge {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  flex: 0 0 1.55rem;
}

.scene-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.scene-panel-head-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.scene-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  width: fit-content;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.3rem;
  box-shadow: inset 0 1px 2px rgba(30, 64, 175, 0.08);
}

.scene-tabs--inline {
  width: 100%;
}

.scene-tabs--gen-type {
  max-width: 360px;
}

.scene-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.55rem 0.95rem;
  transition: all 0.2s ease;
}

.scene-tab:hover {
  color: #1e3a8a;
}

.scene-tab.active {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.scene-reference-tag--multiline {
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.scene-tab-panel {
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.8rem;
}

.scene-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  align-content: start;
  min-height: 100%;
}

.scene-params-layout {
  display: grid;
  gap: 0.8rem;
}

.scene-params-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.8rem;
  align-items: end;
}

.scene-params-top-right {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.scene-params-row {
  display: grid;
  gap: 0.8rem;
  align-items: start;
}

.scene-params-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scene-params-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scene-params-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scene-field-select-narrow .scene-combo {
  grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1fr);
}

.scene-field-empty {
  visibility: hidden;
}

.scene-upload-product-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
  align-items: stretch;
}

.scene-upload-product-grid > * {
  min-width: 0;
}

.scene-advanced-settings {
  border: 1px solid #dbe4f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.scene-advanced-settings > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1rem;
}

.scene-advanced-settings > summary::-webkit-details-marker {
  display: none;
}

.scene-advanced-settings[open] > summary {
  border-bottom: 1px solid #dbe4f1;
  background: rgba(255, 255, 255, 0.96);
}

.scene-advanced-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.scene-advanced-summary-text {
  display: grid;
  gap: 0.22rem;
}

.scene-advanced-summary-text strong {
  font-size: 1rem;
  color: #0f172a;
}

.scene-advanced-summary-text p {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
}

.scene-advanced-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2563eb;
  text-transform: uppercase;
}

.scene-advanced-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.scene-advanced-toggle-collapsed,
.scene-advanced-toggle-expanded {
  display: inline-block;
}

.scene-advanced-toggle-expanded {
  display: none;
}

.scene-advanced-settings[open] .scene-advanced-toggle-collapsed {
  display: none;
}

.scene-advanced-settings[open] .scene-advanced-toggle-expanded {
  display: inline-block;
}

.scene-advanced-settings-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.scene-soft-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(241, 245, 249, 0.7);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.featured-tool-page .scene-page-head p {
  max-width: 860px;
}

.featured-tool-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 1rem;
  align-items: stretch;
}

.featured-tool-aside {
  gap: 0.9rem;
}

.featured-tool-aside-block {
  display: grid;
  gap: 0.45rem;
}

.featured-tool-aside-block + .featured-tool-aside-block {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.featured-tool-aside-block h3,
.featured-tool-aside-block h4 {
  margin: 0;
  color: #0f172a;
}

.featured-tool-aside-block h3 {
  font-size: 1.05rem;
}

.featured-tool-aside-block h4 {
  font-size: 0.92rem;
}

.featured-tool-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.featured-tool-form-grid .scene-field {
  min-width: 0;
}

.featured-tool-form-grid .scene-field-full {
  grid-column: 1 / -1;
}

.featured-tool-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.featured-tool-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.featured-tool-cost-card {
  display: grid;
  gap: 0.42rem;
  padding: 0.95rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.featured-tool-cost-label {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
}

.featured-tool-points-hint {
  margin-top: 0.1rem;
  justify-content: flex-start;
  text-align: left;
}

.featured-tool-result-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1rem;
  background: #f8fafc;
  color: #64748b;
}

.featured-tool-result {
  display: grid;
  gap: 1rem;
}

.featured-tool-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.featured-tool-result-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

.featured-tool-summary {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  white-space: pre-wrap;
  line-height: 1.7;
}

.featured-tool-result-body {
  display: grid;
  gap: 0.85rem;
}

.featured-tool-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}

.featured-tool-section h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #0f172a;
}

.featured-tool-section-content {
  margin-bottom: 0.65rem;
  white-space: pre-wrap;
  line-height: 1.7;
}

.featured-tool-section-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.featured-tool-table th {
  background: #f8fafc;
}

.poster-plan-editor {
  display: grid;
  gap: 1rem;
}

.scene-size-details {
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  background: #f8fafc;
}

.scene-size-details > summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e3a8a;
}

.scene-size-details[open] > summary {
  margin-bottom: 0.6rem;
}

.scene-size-help p {
  font-size: 0.84rem;
  color: #475569;
}

.scene-size-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.scene-size-reference-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.scene-combo {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 0.45rem;
}

.scene-combo .form-select,
.scene-combo .form-control {
  min-height: 2.25rem;
}

.scene-field label {
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #334155;
  display: inline-block;
}

.scene-label-example {
  display: inline-block;
  margin-left: 0.45rem;
  color: #64748b;
  font-weight: 500;
}

.scene-upload-dropzone {
  margin-top: 0.3rem;
}

.scene-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scene-upload-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1.5px dashed #93c5fd;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.9rem 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.scene-upload-trigger:hover {
  border-color: #60a5fa;
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.scene-upload-dropzone.is-dragover .scene-upload-trigger,
.scene-upload-dropzone.is-paste-active .scene-upload-trigger {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.scene-upload-trigger-main {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.scene-upload-trigger-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.scene-upload-trigger-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}

.scene-upload-trigger-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.24);
}

.scene-params-layout .scene-field {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.68);
  padding: 0.65rem;
}

.scene-panel-compact .scene-panel-head {
  margin-bottom: 0.7rem;
}

.scene-panel-compact .scene-params-layout {
  gap: 0.7rem;
}

.scene-panel-compact .scene-params-layout .scene-field {
  padding: 0.55rem 0.6rem;
}

.scene-panel-compact .scene-tab-panel {
  padding: 0.7rem;
}

.scene-panel-compact .scene-reference-tags {
  gap: 0.35rem;
}

.scene-field-full {
  grid-column: 1 / -1;
}

.scene-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.scene-btn-light {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  color: #1d4ed8;
}

.scene-btn-light:hover {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1e40af;
}

.scene-action-menu {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}

.scene-action-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #dbe4f1;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 0.45rem;
  z-index: 40;
}

.scene-action-menu:hover .scene-action-menu-list,
.scene-action-menu:focus-within .scene-action-menu-list {
  display: flex;
}

.scene-action-menu-list .btn {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  text-align: center;
}

.scene-config-menu-btn::after {
  content: " ▴";
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
}

.scene-status {
  margin: 0.8rem 0 0;
  color: #334155;
  font-size: 0.9rem;
}

.scene-status--loading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #2563eb;
}

.scene-status--loading::before,
.generic-inline-spinner {
  content: "";
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: sceneSpin 0.9s linear infinite;
  flex: 0 0 auto;
}

.scene-status--success {
  color: #047857;
}

.scene-status--error {
  color: #b91c1c;
}

.scene-consume-hint {
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-size: 0.86rem;
  color: #475569;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.consume-hint-icon {
  font-size: 1rem;
  line-height: 1;
}

.consume-hint-label {
  color: #64748b;
  font-size: 0.82rem;
}

.consume-hint-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

.consume-hint-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.consume-hint-extra {
  color: #94a3b8;
  font-size: 0.78rem;
}
}

.scene-tip {
  margin-top: 0.45rem;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: #64748b;
}

.scene-reference-tags {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scene-reference-inline {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 0.6rem;
  align-items: start;
}

.scene-tag-input {
  display: grid;
  gap: 0.4rem;
}

.scene-param-tags,
.scene-param-tags-inline {
  margin-top: 0;
}

.scene-reference-tag {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  line-height: 1.3;
  cursor: pointer;
}

.scene-reference-tag:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.scene-reference-tag.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
}

.scene-selected-label {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #475569;
}

.scene-upload-preview-wrap {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.scene-upload-preview-card {
  position: relative;
}

.scene-upload-preview {
  max-width: 140px;
  border-radius: 10px;
  border: 1px solid var(--brand-border);
}

.scene-upload-preview-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
  background: #f8fafc;
}

.recharge-page {
  display: grid;
  gap: 1.5rem;
}

.recharge-head h1 {
  margin-bottom: 0.35rem;
}

.recharge-head p {
  color: #64748b;
  margin-bottom: 0;
}

.recharge-balance-card {
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 50%, #e0e7ff 100%);
  padding: 1.2rem 1.5rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.10);
}

.recharge-balance-label {
  color: #475569;
  font-weight: 500;
}

.recharge-balance-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.recharge-balance-value #balanceValue {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e3a8a;
}

.recharge-balance-unit {
  color: #334155;
  font-weight: 600;
}

.recharge-package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.recharge-package-card {
  border: 1.5px solid #c7d2fe;
  border-radius: 16px;
  padding: 1.1rem;
  background: #ffffff;
  display: grid;
  gap: 0.7rem;
  min-height: 320px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.recharge-package-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
  border-color: #93c5fd;
}

.recharge-package-card.is-popular {
  border-color: #3b82f6;
  border-width: 2px;
  background: linear-gradient(170deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.18);
}

.recharge-package-card.is-popular::before {
  content: "推荐";
  position: absolute;
  top: 12px;
  right: -28px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 32px;
  transform: rotate(45deg);
  letter-spacing: 1px;
}

.recharge-card-top h3 {
  margin: 0;
  font-size: 1.08rem;
}

.recharge-price-row {
  margin-top: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
}

.recharge-price-now {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1d4ed8;
}

.recharge-price-origin {
  color: #94a3b8;
  text-decoration: line-through;
}

.recharge-saved {
  margin: 0.25rem 0 0;
  color: #16a34a;
  font-size: 0.86rem;
}

.recharge-saved-empty {
  visibility: hidden;
}

.recharge-card-middle h4 {
  margin: 0;
  font-size: 1rem;
}

.recharge-card-middle p {
  margin: 0.28rem 0 0.55rem;
  color: #64748b;
  font-size: 0.9rem;
}

.recharge-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recharge-badge {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.15rem 0.52rem;
  font-size: 0.75rem;
}

.recharge-buy-btn {
  margin-top: auto;
}

.recharge-buy-btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.recharge-buy-btn.is-loading .spinner-border-sm {
  width: 0.9rem;
  height: 0.9rem;
}

.recharge-action-row {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
}

.recharge-payment-panel {
  margin-top: 1.25rem;
}

.recharge-payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.recharge-payment-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.recharge-payment-qr {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.recharge-payment-code {
  display: block;
  max-width: 280px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  white-space: pre-wrap;
  word-break: break-all;
}

.recharge-payment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recharge-orders-section {
  margin-top: 1.5rem;
}

.recharge-orders-head h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

/* 充值订单状态标签 */
.order-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.status-pending  { background: #fff3cd; color: #856404; }
.status-pending-payment { background: #dbeafe; color: #1d4ed8; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-cancelled { background: #e2e8f0; color: #64748b; }

.btn-cancel-order,
.btn-sync-order,
.btn-pay-order {
  display: inline-block;
  padding: 2px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  margin-right: 0.5rem;
  transition: all .15s;
  text-decoration: none;
}

.btn-cancel-order {
  color: #dc2626;
}

.btn-sync-order,
.btn-pay-order {
  color: #2563eb;
}
.btn-cancel-order:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.btn-sync-order:hover,
.btn-pay-order:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.order-review-remark {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #6c757d;
  margin-right: 0.5rem;
}

/* 管理员筛选栏 */
.admin-filter-bar {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.35rem 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  color: #1e3a8a;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.admin-active-filter__label {
  display: block;
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-active-filter__value {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.9rem;
  color: #0f172a;
}
.admin-orders-table-wrap {
  overflow-x: auto;
}
.admin-orders-table-wrap .table th,
.admin-orders-table-wrap .table td {
  vertical-align: middle;
  font-size: 0.9rem;
  white-space: nowrap;
}
.admin-record-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-record-empty {
  padding: 0.75rem 0;
  text-align: center;
  color: #64748b;
}
.admin-record-card {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.55rem 0.75rem 0.7rem;
  border-radius: 10px;
  transition: background-color 0.18s ease;
}
.admin-record-card:hover {
  background: #f1f5f9;
}
.admin-record-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}
.admin-record-card__head h3 {
  margin: 0;
  font-size: 0.92rem;
  color: #0f172a;
}
.admin-record-subtitle {
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.78rem;
  word-break: break-all;
}
.admin-record-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}
.admin-record-head-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.3rem;
}
.admin-record-mainline {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.admin-record-mainline .admin-record-grid {
  flex: 1 1 auto;
}
.admin-record-mainline .admin-record-actions {
  flex: 0 0 auto;
  margin-top: 0;
}
.admin-points-record-info {
  flex: 1 1 auto;
  min-width: 0;
}
.admin-points-record-actions {
  align-self: flex-end;
}
.admin-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.2rem 0.8rem;
}
.admin-record-field {
  padding: 0;
  border: none;
  display: flex;
  gap: 0.28rem;
  align-items: center;
  flex-direction: row;
  min-width: 0;
}
.admin-record-field span {
  display: inline;
  margin-bottom: 0;
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  flex: 0 0 auto;
}
.admin-record-field strong {
  display: inline;
  font-size: 0.8rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.admin-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
  justify-content: flex-end;
}
.admin-modal-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.admin-form-grid-span-2 {
  grid-column: span 2;
}
.admin-edit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.admin-edit-tab {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 0.45rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 700;
  transition: all .2s ease;
}
.admin-edit-tab:hover {
  border-color: #93c5fd;
  color: #2563eb;
}
.admin-edit-tab.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
}
.admin-edit-tab-panel {
  display: none;
}
.admin-edit-tab-panel[hidden] {
  display: none !important;
}
.admin-edit-tab-panel.is-active {
  display: block;
}
.admin-share-link-box {
  padding: 0;
}
.admin-task-card__layout {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: flex-start;
}
.admin-task-preview {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-task-preview img,
.admin-task-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-task-preview__empty {
  padding: 0.4rem;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}
.admin-task-content {
  min-width: 0;
}
.admin-task-error {
  margin-top: 0.3rem;
  color: #be123c;
  font-size: 0.76rem;
}
.admin-record-actions--head {
  gap: 0.25rem;
}
.admin-record-actions--head .btn {
  padding: 0.12rem 0.42rem;
  font-size: 0.72rem;
  line-height: 1.2;
}
.admin-users-list .admin-record-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.scene-upload-remove-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-upload-remove-btn:hover {
  background: rgba(15, 23, 42, 0.88);
}

.scene-click-preview {
  cursor: zoom-in;
}

.scene-upload-count-hint {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: #334155;
  font-weight: 600;
}

.scene-spec-output {
  font-size: 0.84rem;
  line-height: 1.45;
  background: #f8fafc;
}

.scene-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.scene-card {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fdfefe;
}

.scene-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
  text-align: center;
}

.scene-card .form-label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.scene-card .form-control {
  margin-bottom: 0.5rem;
  font-size: 0.86rem;
}

.scene-check {
  margin-bottom: 0.6rem;
}

.scene-prompt-preview {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 0.78rem;
  padding: 0.45rem;
  white-space: pre-wrap;
  color: #475569;
}

.scene-detail-group {
  margin: 0.5rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem;
  background: #f8fafc;
}
.scene-detail-group summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-primary, #2563eb);
  padding: 0.25rem 0;
  user-select: none;
}
.scene-detail-group[open] summary {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.4rem;
}
.scene-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}
.scene-detail-grid .form-label {
  font-size: 0.78rem;
  margin-bottom: 0.1rem;
  color: #64748b;
}
.scene-detail-grid .form-control {
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
}

.scene-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
  gap: 0.85rem;
}

.scene-result-item {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fdfefe;
}

.scene-result-item--failed {
  border-color: #fecaca;
  background: #fff7f7;
}

.scene-result-item h4 {
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.scene-result-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #f1f5f9;
}

.scene-result-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px dashed #fca5a5;
  background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%);
  color: #991b1b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  gap: 0.35rem;
}

.scene-result-fallback strong {
  font-size: 0.95rem;
}

.scene-result-fallback span {
  font-size: 0.8rem;
  color: #b91c1c;
}

.scene-result-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.45rem 0 0.6rem;
}

.scene-result-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.scene-result-icon-btn {
  width: 2.1rem;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.scene-result-icon-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene-result-icon-btn:disabled {
  opacity: 0.6;
}

.scene-result-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.3rem;
  margin-left: 0.2rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loading animation for image generation */
.result-loading .result-loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f0f4ff 100%);
  background-size: 200% 200%;
  animation: loadingGradient 2.5s ease infinite;
  border-radius: 10px;
  border: 1px dashed #a5b4fc;
  margin-bottom: 0.5rem;
}
@keyframes loadingGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--brand-primary, #2563eb);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.75rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
  margin: 0;
}

.scene-request-busy {
  cursor: progress;
}

.scene-request-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 8900;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scene-request-loading-dialog {
  width: min(92vw, 360px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
  padding: 1.4rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}

.scene-request-loading-spinner {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 3px solid rgba(37, 99, 235, 0.16);
  border-top-color: #2563eb;
  animation: sceneRequestSpin 0.9s linear infinite;
}

.scene-request-loading-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.scene-request-loading-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
}

.scene-request-loading-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

@keyframes sceneRequestSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.result-loading h4 {
  color: var(--brand-primary, #2563eb);
}

.ai-icon {
  margin-right: 0.25rem;
}

.scene-main-generate-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.scene-between-sections {
  margin-top: -0.25rem;
  margin-bottom: -0.1rem;
}

.scene-main-generate-btn {
  min-width: 180px;
  font-weight: 700;
}

.scene-floating-bar {
  position: sticky;
  bottom: 0.65rem;
  z-index: 20;
}

.scene-floating-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
  padding: 0.6rem 0.75rem;
}

.scene-floating-inner .scene-consume-hint {
  margin: 0;
  text-align: left;
}

.scene-consume-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
  width: 100%;
}

.scene-consume-meta .scene-consume-hint {
  flex: 1 1 auto;
  min-width: 0;
}

.scene-consume-scroll {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.consume-guide-popover {
  position: relative;
  display: inline-flex;
  margin-left: auto;
  flex: 0 0 auto;
}

.consume-guide-footnote {
  margin: 0.65rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.78rem;
  line-height: 1.5;
}

.consume-guide-footnote strong { color: #065f46; }

.consume-guide-trigger {
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.16rem 0.62rem;
  cursor: pointer;
  line-height: 1.4;
}

.consume-guide-trigger:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.consume-guide-panel {
  position: absolute;
  right: 0;
  left: auto;
  bottom: calc(100% + 0.55rem);
  width: min(760px, 84vw);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 0.95rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 80;
}

.consume-guide-popover:hover .consume-guide-panel,
.consume-guide-popover:focus-within .consume-guide-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.consume-guide-panel-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.65rem;
}

.consume-guide-panel .pricing-guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.65rem;
}

.consume-guide-panel .pricing-guide-card {
  padding: 0.75rem 0.75rem 0.65rem;
}

.consume-guide-panel .pricing-guide-card-icon {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.consume-guide-panel .pricing-guide-card-body {
  margin-bottom: 0.35rem;
}

.consume-guide-panel .pricing-guide-card-body strong {
  font-size: 0.8rem;
}

.consume-guide-panel .pricing-guide-cost {
  font-size: 0.74rem;
  padding: 0.08rem 0.45rem;
}

.consume-guide-panel .pricing-guide-card-desc {
  font-size: 0.72rem;
  line-height: 1.4;
}

body.scene-preview-open {
  overflow: hidden;
}

.scene-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.scene-image-preview-backdrop {
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scene-image-preview-content {
  position: relative;
  max-width: min(92vw, 980px);
  max-height: 92vh;
  display: flex;
}

.scene-image-preview-img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.scene-image-preview-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

@media (max-width: 992px) {
  .scene-layout {
    grid-template-columns: 1fr;
  }
  .scene-steps-grid {
    grid-template-columns: 1fr;
  }
  .scene-upload-product-grid {
    grid-template-columns: 1fr;
  }
  .featured-tool-layout {
    grid-template-columns: 1fr;
  }
  .featured-tool-form-grid {
    grid-template-columns: 1fr;
  }
  .featured-tool-actions {
    justify-content: flex-start;
  }
  .scene-params-top {
    grid-template-columns: 1fr;
  }
  .scene-params-top-right {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .scene-params-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .scene-params-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scene-params-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scene-combo {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .scene-field-select-narrow .scene-combo {
    grid-template-columns: 1fr;
  }
  .scene-size-reference-row {
    grid-template-columns: 1fr;
  }
  .scene-reference-inline {
    grid-template-columns: 1fr;
  }
  .scene-upload-preview-wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .scene-floating-inner {
    grid-template-columns: 1fr;
  }
  .scene-floating-inner .scene-consume-hint {
    text-align: left;
  }
  .scene-consume-meta {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    column-gap: 0.55rem;
    row-gap: 0.28rem;
  }
  .scene-consume-meta .scene-consume-hint {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
  }
  .scene-consume-meta .scene-consume-scroll {
    grid-column: 1;
    min-width: 0;
  }
  .scene-consume-meta .consume-guide-popover {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: center;
    margin-left: auto;
  }
  .consume-guide-panel {
    left: auto;
    right: 0;
    width: min(92vw, 760px);
    transform: translateY(8px);
  }
  .consume-guide-popover:hover .consume-guide-panel,
  .consume-guide-popover:focus-within .consume-guide-panel {
    transform: translateY(0);
  }
  .scene-actions {
    justify-content: center;
  }
  .scene-image-preview-content {
    max-width: 96vw;
  }
}

@media (max-width: 768px) {
  .scene-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .scene-head-copy {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .scene-head-copy.is-expanded {
    display: block;
  }

  .scene-head-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 0.55rem;
    padding: 0.28rem 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .scene-badge-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .landing-tool-group {
    padding: 1.1rem 1rem 1.2rem;
    border-radius: 18px;
  }
  .landing-tool-group::before,
  .landing-tool-group::after {
    width: 220px;
    height: 220px;
  }
  .app-nav-links {
    margin-top: 0.65rem;
    gap: 0.2rem;
  }
  .app-nav-link {
    display: block;
    border-radius: 12px;
    margin: 0.1rem 0;
    padding: 0.6rem 0.8rem !important;
  }
  .app-nav-link::after {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.2rem;
  }

  .scene-form-grid {
    grid-template-columns: 1fr;
  }
  .scene-upload-trigger {
    flex-direction: column;
    align-items: stretch;
  }
  .scene-upload-trigger-btn {
    width: 100%;
    margin-top: 5px;
  }
  .scene-advanced-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .scene-advanced-toggle {
    width: 100%;
  }
  .scene-tabs--gen-type {
    max-width: 100%;
  }
  .scene-params-row-4 {
    grid-template-columns: 1fr;
  }
  .scene-params-top-right {
    grid-template-columns: 1fr;
  }
  .scene-params-row-3 {
    grid-template-columns: 1fr;
  }
  .scene-params-row-2 {
    grid-template-columns: 1fr;
  }
  .scene-field-empty {
    display: none;
  }
  .scene-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scene-upload-preview-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .consume-guide-panel .pricing-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scene-floating-inner .scene-consume-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.4rem;
    row-gap: 0;
  }
  .scene-floating-inner .scene-consume-scroll {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .scene-floating-inner .scene-consume-scroll::-webkit-scrollbar {
    display: none;
  }
  .scene-floating-inner .scene-consume-meta .scene-consume-hint {
    margin: 0;
    flex: 0 0 auto;
    min-width: max-content;
    max-width: none;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.28rem;
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .scene-floating-inner .scene-consume-meta .consume-guide-popover {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .scene-floating-inner .scene-consume-meta .consume-hint-extra {
    min-width: max-content;
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
  }
  .consume-guide-panel {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 5rem;
    width: min(calc(100vw - 1.5rem), 760px);
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    transform: translate(-50%, 8px);
  }
  .consume-guide-popover:hover .consume-guide-panel,
  .consume-guide-popover:focus-within .consume-guide-panel {
    transform: translate(-50%, 0);
  }
  .recharge-package-grid {
    grid-template-columns: 1fr;
  }
}

.history-card-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.7rem 0 0.25rem;
}

.history-card-thumb {
  border-radius: 8px;
  overflow: hidden;
  display: inline-block;
  width: fit-content;
  max-width: 140px;
  max-height: 90px;
  height: auto;
}

.history-card-thumb img {
  width: auto;
  max-width: 140px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  display: block;
}

.history-card-more-link {
  font-size: 0.78rem;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.history-input-wrap {
  margin-bottom: 1rem;
}

.history-input-section {
  margin-bottom: 1rem;
}

.history-input-grid,
.history-overlay-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 200px));
  gap: 0.85rem;
}

.history-input-image-item,
.history-overlay-card,
.history-prompt-item {
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
}

.history-input-image-item {
  min-width: 160px;
  max-width: 200px;
}

.history-input-image {
  width: 100%;
  min-height: 100px;
  max-height: 140px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #dbe4f1;
  background: #fff;
  cursor: zoom-in;
  margin-bottom: 0.45rem;
}

.history-json-block {
  white-space: pre-wrap;
  font-size: 0.84rem;
  line-height: 1.5;
}

.history-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.history-detail-cell {
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid #dbe4f1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.history-detail-cell--danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, #fff7f7, #fef2f2);
}

.history-detail-label {
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.history-detail-value {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.history-detail-value .badge {
  margin-right: 0.35rem;
}

.history-grid-table {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-grid-table__row {
  margin-bottom: 0;
}

.history-grid-table__row--last {
  margin-bottom: 0;
}

.history-preview-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 80vh;
  cursor: zoom-out;
  overflow: hidden;
}

.history-preview-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.74) 58%, rgba(2, 6, 23, 0.94) 100%);
  border-radius: 28px;
}

.history-preview-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 80vh;
  padding: 1.25rem;
  cursor: default;
}

.history-preview-image {
  max-width: min(88vw, 1180px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.42);
  transform: scale(1);
  transform-origin: center center;
  transition: transform .12s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.history-preview-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
}

.history-input-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.45rem;
}

.history-prompt-tabs {
  display: grid;
  gap: 0.75rem;
}

.history-prompt-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-prompt-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.history-prompt-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.history-prompt-panels {
  min-width: 0;
}

.history-prompt-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.history-prompt-item {
  display: none;
  max-height: 280px;
  overflow: auto;
}

.history-prompt-item.is-active {
  display: block;
}

@media (max-width: 768px) {
  .history-card-gallery {
    gap: 0.5rem;
  }

  .history-card-thumb {
    max-width: calc((100% - 0.5rem) / 2);
  }

  .history-card-thumb img {
    max-width: 100%;
  }

  .history-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-input-image-item {
    min-width: 0;
    max-width: none;
  }

  .history-input-image {
    min-height: 88px;
    max-height: 120px;
  }
}

/* ==============================
   Auth Pages (Login / Register)
   ============================== */
.auth-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  padding: 2.5rem 2rem;
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: .5rem;
}
.auth-header p {
  color: #64748b;
  font-size: .9rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
}
.auth-toggle-btn {
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem .75rem;
  cursor: pointer;
}
.auth-toggle-btn.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 6px rgba(15,23,42,.08);
}
.auth-field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: .35rem;
}
.auth-field input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .95rem;
  transition: border-color .2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: .55rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
}
.auth-success {
  background: #f0fdf4;
  color: #16a34a;
  padding: .55rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
}
.auth-input-group {
  display: flex;
  gap: 8px;
}
.auth-input-group input {
  flex: 1;
  min-width: 0;
}
.auth-code-btn {
  flex-shrink: 0;
  padding: 0 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s;
}
.auth-code-btn:hover:not(:disabled) {
  opacity: .85;
}
.auth-code-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}
.auth-btn {
  width: 100%;
  padding: .7rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity .2s;
}
.auth-btn:hover { opacity: .9; }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-consent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  color: #475569;
  font-size: .88rem;
  line-height: 1.6;
}
.auth-consent-check {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-consent-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}
.auth-consent-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
}
.auth-link-btn {
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.auth-link-btn:hover {
  text-decoration: underline;
}
.auth-link-btn:focus-visible,
.auth-legal-close:focus-visible,
.auth-legal-tab:focus-visible,
.auth-legal-secondary:focus-visible,
.auth-legal-primary:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.auth-legal-open {
  overflow: hidden;
}
.auth-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(4px);
}
.auth-legal-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .24);
  overflow: hidden;
}
.auth-legal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.auth-legal-header h3 {
  margin: 0 0 .35rem;
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f172a;
}
.auth-legal-header p {
  margin: 0;
  color: #64748b;
  font-size: .9rem;
}
.auth-legal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.25rem;
  cursor: pointer;
}
.auth-legal-tabs {
  display: flex;
  gap: .65rem;
  padding: 1rem 1.5rem 0;
}
.auth-legal-tab {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: .92rem;
  font-weight: 600;
  padding: .55rem .95rem;
  cursor: pointer;
}
.auth-legal-tab.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px rgba(59, 130, 246, .18);
}
.auth-legal-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.5rem;
}
.auth-legal-panel {
  display: none;
}
.auth-legal-panel.active {
  display: block;
}
.auth-legal-document {
  margin: 0;
  padding: 1.25rem 1rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  color: #334155;
  font-family: inherit;
  font-size: .93rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.auth-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem 1.35rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.auth-legal-footer-note {
  color: #64748b;
  font-size: .88rem;
}
.auth-legal-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.auth-legal-secondary,
.auth-legal-primary {
  border: none;
  border-radius: 10px;
  padding: .72rem 1.2rem;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-legal-secondary {
  background: #e2e8f0;
  color: #334155;
}
.auth-legal-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .88rem;
  color: #64748b;
}
.auth-footer a {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .auth-consent {
    align-items: flex-start;
  }
  .auth-legal-modal {
    padding: 12px;
  }
  .auth-legal-dialog {
    max-height: 92vh;
  }
  .auth-legal-header,
  .auth-legal-body,
  .auth-legal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .auth-legal-tabs {
    padding-left: 1rem;
    padding-right: 1rem;
    flex-wrap: wrap;
  }
  .auth-legal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-legal-actions {
    width: 100%;
  }
  .auth-legal-secondary,
  .auth-legal-primary {
    flex: 1;
  }
}

/* ==============================
   Profile Page
   ============================== */
.profile-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}
.profile-overview-card {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}
.profile-overview-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.profile-role-badge {
  display: inline-block;
  padding: .15rem .6rem;
  background: #dbeafe;
  color: #2563eb;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  margin-top: .25rem;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 0.9rem;
  min-width: min(100%, 640px);
}
.profile-stat-item {
  display: block;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(191, 219, 254, .8);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.profile-stat-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}
.profile-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}
.profile-stat-label {
  font-size: .78rem;
  color: #64748b;
}
.profile-overview-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  margin-left: auto;
}
.profile-overview-actions .btn {
  min-width: 7.5rem;
  text-align: center;
}
.profile-section-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.2rem;
}
.profile-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #f1f5f9;
}
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.profile-tab-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all .2s ease;
}
.profile-tab-btn:hover {
  border-color: #93c5fd;
  color: #2563eb;
}
.profile-tab-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
}
.profile-tab-panel {
  display: none;
}
.profile-tab-panel[hidden] {
  display: none !important;
}
.profile-tab-panel.is-active {
  display: block;
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .profile-tab-panel:not(#profile-promotion-panel) .profile-form {
    max-width: 760px;
  }

  .profile-tab-panel:not(#profile-promotion-panel) .auth-btn {
    width: auto;
    min-width: 160px;
    align-self: flex-start;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.profile-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.profile-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: .3rem;
}
.profile-field input {
  width: 100%;
  padding: .55rem .8rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .9rem;
  box-sizing: border-box;
}
.profile-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.profile-input-disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.promotion-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  margin-bottom: 1rem;
}
.promotion-hero-desc {
  margin: 0.75rem 0 0;
  color: #475569;
  line-height: 1.7;
}
.promotion-help-box {
  min-width: 220px;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #dbeafe;
}
.promotion-help-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  color: #64748b;
}
.promotion-help-box a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}
.promotion-help-box a:hover {
  text-decoration: underline;
}
.promotion-meta-grid,
.promotion-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.promotion-content-shell {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1rem 1.1rem;
}
.promotion-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(180px, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.promotion-info-stack {
  min-width: 0;
}
.promotion-inline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}
.promotion-meta-card,
.promotion-qr-panel,
.promotion-records-panel {
  padding: 0;
  border: none;
  background: none;
}
.promotion-meta-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}
.promotion-meta-card strong {
  font-size: 1rem;
  color: #0f172a;
}
.promotion-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.promotion-inline-row .promotion-meta-label {
  flex: 0 0 20%;
  max-width: 20%;
  margin-bottom: 0;
}
.promotion-inline-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}
.promotion-inline-input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0f172a;
}
.promotion-inline-input:focus {
  border: none !important;
  box-shadow: none !important;
}
.promotion-qr-panel {
  min-width: 0;
}
.promotion-qr-card {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}
.promotion-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.promotion-qr-card img {
  max-width: 100px;
  width: 100%;
}
.promotion-qr-tip {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
}
.promotion-summary-grid {
  margin: 1rem 0 1.1rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border-radius: 16px;
}
.promotion-content-shell .points-card,
.promotion-content-shell .points-card-primary,
.promotion-content-shell .points-record-item {
  background: none;
  border: none;
  box-shadow: none;
}
.promotion-content-shell .points-card-primary {
  color: #0f172a;
}
.promotion-content-shell .points-card-primary .points-card-label {
  color: #64748b;
}
.promotion-content-shell .points-card {
  padding: 0.3rem 0;
}
.promotion-content-shell .points-record-item {
  padding: 0.5rem 0;
  border-radius: 0;
}
.promotion-records-panel {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  background: #f8fafc;
  border-radius: 16px;
}

/* ==============================
   Points Pages
   ============================== */
.points-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}
.points-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.points-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.points-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.points-card-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-color: transparent;
}
.points-card-primary:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}
.points-card-label {
  display: block;
  font-size: .82rem;
  margin-bottom: .4rem;
  font-weight: 500;
}
.points-card-primary .points-card-label { color: rgba(255,255,255,.85); }
.points-card-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
}
.points-actions {
  display: flex;
  gap: .8rem;
  margin-bottom: 1rem;
}
.points-actions .auth-btn {
  width: auto;
  padding: .55rem 1.5rem;
  font-size: .9rem;
}

/* Records list */
.points-records-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.points-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  transition: background .15s, border-color .15s;
}
.points-record-item:hover { background: #f1f5f9; border-color: #e2e8f0; }
.points-record-left {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}
.points-record-type {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  flex-shrink: 0;
}
.points-record-type--recharge { background: #dcfce7; color: #16a34a; }
.points-record-type--consume { background: #fef3c7; color: #d97706; }
.points-record-type--refund { background: #dbeafe; color: #2563eb; }
.points-record-type--gift { background: #fce7f3; color: #db2777; }
.points-record-remark {
  font-size: .88rem;
  color: #334155;
}
.points-record-link {
  font-size: .78rem;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}
.points-record-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.points-record-right {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.points-record-amount {
  display: block;
  font-size: .95rem;
  font-weight: 700;
}
.points-record-amount.positive { color: #16a34a; }
.points-record-amount.negative { color: #dc2626; }
.points-record-time {
  display: block;
  font-size: .75rem;
  color: #94a3b8;
  margin-top: .1rem;
}

/* Filter bar */
.points-filter-bar {
  display: flex;
  gap: .6rem;
  margin-bottom: 1rem;
  align-items: center;
}
.points-filter-select {
  padding: .45rem .8rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .88rem;
  background: #fff;
}

/* Pagination */
.points-pagination {
  display: flex;
  gap: .3rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.pg-info {
  padding: .35rem .45rem;
  color: #64748b;
  font-size: .82rem;
}
.pg-btn {
  padding: .35rem .7rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: .82rem;
  cursor: pointer;
  color: #334155;
}
.pg-btn:hover { background: #f1f5f9; }
.pg-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  background: #f8fafc;
}
.pg-active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.pg-active:hover { background: #2563eb; }
.pg-ellipsis {
  padding: .35rem .15rem;
  color: #94a3b8;
}
.pg-jump {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #64748b;
  font-size: .82rem;
}
.pg-jump label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin: 0;
}
.pg-jump-input {
  width: 4.2rem;
  padding: .35rem .45rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: .82rem;
  text-align: center;
}

@media (max-width: 640px) {
  .points-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-field-row { grid-template-columns: 1fr; }
  .profile-overview-card { flex-direction: column; text-align: center; }
  .profile-avatar-section { flex-direction: column; }
}

/* ── AI Task History ── */
.history-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.history-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 12px 16px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}

.history-card:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .1);
}

.history-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.history-card-time {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--brand-muted);
}

.history-card-body {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.history-card-foot {
  display: none;
}

.history-card-head {
  flex-wrap: wrap;
}

.history-card-meta {
  font-size: 0.78rem;
  color: var(--brand-muted);
  padding: 0 0.35rem;
  border-left: 1px solid #e2e8f0;
  line-height: 1;
}

.history-card-summary {
  font-size: 0.78rem;
  margin-left: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
  flex: 0 1 auto;
}

.history-task-detail-modal {
  max-width: min(1280px, 96vw);
}

.history-task-detail-modal .modal-body {
  padding: 1rem 1.15rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
}

.history-detail-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
}

.history-detail-nav {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.25rem;
  max-height: calc(100vh - 13rem);
  overflow-y: auto;
}

.history-detail-nav-link {
  width: 100%;
  border: 1px solid #dbe4f1;
  background: #fff;
  color: #475569;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all .15s ease;
}

.history-detail-nav-link:hover,
.history-detail-nav-link.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
@media (max-width: 991.98px) {
  .profile-container {
    max-width: 100%;
  }
  .promotion-hero,
  .admin-modal-hero,
  .admin-record-card__head,
  .admin-task-card__layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .promotion-help-box,
  .admin-task-preview {
    width: 100%;
    min-width: 0;
  }
  .promotion-main-grid {
    grid-template-columns: 1fr;
  }
  .promotion-inline-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-record-mainline {
    flex-direction: column;
  }
  .admin-record-head-actions {
    align-items: flex-start;
  }
}
@media (max-width: 767.98px) {
  .profile-field-row,
  .points-overview-grid,
  .profile-stats,
  .promotion-meta-grid,
  .promotion-share-grid,
  .promotion-inline-grid,
  .admin-form-grid,
  .admin-record-grid {
    grid-template-columns: 1fr;
  }
  .admin-form-grid-span-2 {
    grid-column: span 1;
  }
  .admin-edit-tab {
    flex: 1 1 100%;
  }
  .profile-overview-card {
    padding: 1.4rem;
  }
  .profile-overview-actions {
    width: 100%;
    align-items: stretch;
    margin-left: 0;
  }
  .profile-stats {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-tabs {
    gap: 0.5rem;
  }
  .profile-tab-btn {
    width: 100%;
    text-align: center;
  }
  .points-record-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==============================
   Profile Promotion Center Refresh
   ============================== */
.profile-container > .profile-section-card {
  border: 1px solid rgba(199, 210, 254, .55);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .08);
}

#profile-promotion-panel {
  flex-direction: column;
  gap: 1.25rem;
}

#profile-promotion-panel.is-active {
  display: flex;
}

#profile-promotion-panel [hidden] {
  display: none !important;
}

#profile-promotion-panel .promotion-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 0;
  padding: 1.35rem;
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  background:
    radial-gradient(circle at 7% 15%, rgba(59, 130, 246, .16), transparent 28%),
    linear-gradient(135deg, #eff6ff 0%, #f8fbff 55%, #eef2ff 100%);
  box-shadow: 0 12px 28px rgba(59, 130, 246, .08);
}

#profile-promotion-panel .promotion-type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .28rem .75rem;
  background: #dbeafe;
  color: #2563eb;
  font-size: .8rem;
  font-weight: 700;
}

#profile-promotion-panel .promotion-hero-desc {
  max-width: 760px;
  margin: .75rem 0 0;
  color: #475569;
  line-height: 1.7;
}

#profile-promotion-panel .promotion-help-box {
  min-width: 245px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .45rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(147, 197, 253, .55);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}

#profile-promotion-panel .promotion-help-label {
  display: block;
  margin-bottom: 0;
  color: #64748b;
  font-size: .85rem;
  font-weight: 700;
}

#profile-promotion-panel .promotion-help-box a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

#profile-promotion-panel .promotion-help-box a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.promotion-mail-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  box-shadow: 0 8px 16px rgba(37, 99, 235, .18);
}

.promotion-mail-icon::before,
.promotion-mail-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 10px;
  border-bottom: 2px solid #fff;
}

.promotion-mail-icon::before {
  transform: skewY(28deg);
}

.promotion-mail-icon::after {
  transform: skewY(-28deg);
}

#profile-promotion-panel .promotion-summary-grid {
  gap: 1rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

#profile-promotion-panel .promotion-stat-card {
  position: relative;
  min-height: 108px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  column-gap: 1rem;
  row-gap: .3rem;
  padding: 1.1rem 1.2rem;
  text-align: center;
  border: 1px solid #e0e7ff;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

#profile-promotion-panel .promotion-stat-card:hover,
#profile-promotion-panel .promotion-feature-card:hover,
#profile-promotion-panel .promotion-inline-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, .12);
}

#profile-promotion-panel .promotion-stat-card--primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 58%, #8b5cf6 100%);
  box-shadow: 0 18px 34px rgba(99, 102, 241, .24);
}

#profile-promotion-panel .points-card-label {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 800;
}

#profile-promotion-panel .points-card-value {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  color: #0f172a;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

#profile-promotion-panel .promotion-stat-card--primary .points-card-label,
#profile-promotion-panel .promotion-stat-card--primary .points-card-value {
  color: #fff;
}

.promotion-stat-icon {
  width: 50px;
  height: 50px;
  grid-row: 1 / span 2;
  grid-column: 1;
  align-self: center;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #60a5fa, #4f46e5);
  margin-bottom: 0;
  box-shadow: 0 14px 24px rgba(79, 70, 229, .22);
}

.promotion-stat-icon::before,
.promotion-stat-icon::after {
  content: "";
  position: absolute;
  background: #fff;
}

.promotion-stat-icon--visits::before {
  width: 13px;
  height: 13px;
  left: 11px;
  top: 13px;
  border-radius: 50%;
  box-shadow: 15px 0 0 -2px rgba(255,255,255,.88);
}

.promotion-stat-icon--visits::after {
  width: 28px;
  height: 13px;
  left: 11px;
  top: 28px;
  border-radius: 14px 14px 8px 8px;
}

.promotion-stat-icon--registered {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 14px 24px rgba(34, 197, 94, .22);
}

.promotion-stat-icon--registered::before {
  width: 16px;
  height: 16px;
  left: 11px;
  top: 12px;
  border-radius: 50%;
}

.promotion-stat-icon--registered::after {
  width: 18px;
  height: 18px;
  right: 9px;
  top: 23px;
  border-radius: 5px;
  background:
    linear-gradient(#fff, #fff) center / 16px 4px no-repeat,
    linear-gradient(#fff, #fff) center / 4px 16px no-repeat;
}

.promotion-stat-icon--rewarded {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 14px 24px rgba(251, 146, 60, .24);
}

.promotion-stat-icon--rewarded::before {
  width: 26px;
  height: 30px;
  left: 12px;
  top: 10px;
  clip-path: polygon(50% 0, 88% 12%, 88% 46%, 50% 100%, 12% 46%, 12% 12%);
}

.promotion-stat-icon--rewarded::after {
  width: 14px;
  height: 8px;
  left: 18px;
  top: 22px;
  background: transparent;
  border-left: 3px solid #fb923c;
  border-bottom: 3px solid #fb923c;
  transform: rotate(-45deg);
}

.promotion-stat-icon--amount {
  background: rgba(255, 255, 255, .22);
  box-shadow: 0 14px 24px rgba(30, 64, 175, .22);
}

.promotion-stat-icon--amount::before {
  width: 27px;
  height: 21px;
  left: 12px;
  top: 16px;
  border-radius: 6px;
  background: #fff;
}

.promotion-stat-icon--amount::after {
  width: 9px;
  height: 9px;
  right: 13px;
  top: 22px;
  border-radius: 50%;
  background: #4f46e5;
}

#profile-promotion-panel .promotion-content-shell {
  border: 1px solid #e0e7ff;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .07);
  padding: 1.25rem;
}

#profile-promotion-panel .promotion-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 1.25rem;
  align-items: stretch;
}

#profile-promotion-panel .promotion-info-stack,
#profile-promotion-panel .promotion-inline-grid {
  height: 100%;
}

#profile-promotion-panel .promotion-inline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
}

#profile-promotion-panel .promotion-inline-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: .8rem .9rem;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#profile-promotion-panel #promotionLevelCard {
  grid-template-columns: 120px auto minmax(0, 1fr);
}

#profile-promotion-panel .promotion-inline-row .promotion-meta-label {
  flex: initial;
  max-width: none;
  margin-bottom: 0;
}

#profile-promotion-panel .promotion-meta-label {
  color: #64748b;
  font-size: .9rem;
  font-weight: 800;
}

#profile-promotion-panel .promotion-inline-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  flex: initial;
  max-width: none;
  width: 100%;
}

#profile-promotion-panel .promotion-inline-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: .45rem .75rem;
  border: 1px solid #dbeafe !important;
  border-radius: 13px;
  background: #f8fbff !important;
  box-shadow: none !important;
  color: #0f172a;
  font-weight: 700;
}

#profile-promotion-panel .promotion-inline-copy .auth-code-btn {
  min-width: 78px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}

#profile-promotion-panel .promotion-inline-copy .auth-code-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  color: #fff;
  transform: translateY(-1px);
}

#profile-promotion-panel .promotion-level-value {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 38px;
  padding: .35rem .9rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
}

#profile-promotion-panel .promotion-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
  padding-top: .1rem;
}

#profile-promotion-panel .promotion-qr-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  border: 1px dashed #93c5fd;
  border-radius: 22px;
  background: linear-gradient(180deg, #eff6ff, #fff);
  padding: 1.2rem;
}

#profile-promotion-panel .promotion-qr-card img {
  width: 168px;
  max-width: 100%;
  height: 168px;
  padding: .55rem;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .12);
}

#profile-promotion-panel .promotion-qr-card figcaption {
  color: #334155;
  font-weight: 800;
}

#profile-promotion-panel .promotion-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  width: 100%;
}

#profile-promotion-panel .promotion-qr-actions .btn {
  border-radius: 14px;
  font-weight: 800;
}

#profile-promotion-panel .promotion-records-panel {
  position: relative;
  min-height: 190px;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 50%, rgba(59, 130, 246, .2), transparent 20%),
    linear-gradient(135deg, #eff6ff, #f8fbff);
}

#profile-promotion-panel .promotion-records-panel .points-records-list {
  position: relative;
  z-index: 1;
  max-width: 72%;
}

.promotion-records-art {
  position: absolute;
  right: 1.4rem;
  bottom: 1.1rem;
  width: 160px;
  height: 130px;
  pointer-events: none;
}

.promotion-gift-box {
  position: absolute;
  right: 24px;
  bottom: 8px;
  width: 92px;
  height: 72px;
  border-radius: 18px 18px 16px 16px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 18px 32px rgba(37, 99, 235, .24);
}

.promotion-gift-box::before,
.promotion-gift-box::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .82);
}

.promotion-gift-box::before {
  left: 39px;
  top: 0;
  width: 14px;
  height: 72px;
}

.promotion-gift-box::after {
  left: -8px;
  right: -8px;
  top: 18px;
  height: 14px;
}

.promotion-coin-art {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 48px 24px 0 -7px #facc15, 70px -4px 0 -10px #bfdbfe;
}

#profile-promotion-panel .promotion-feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

#profile-promotion-panel .promotion-feature-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid #e0e7ff;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

#profile-promotion-panel .promotion-feature-card strong {
  display: block;
  color: #0f172a;
  font-size: .98rem;
}

#profile-promotion-panel .promotion-feature-card p {
  margin: .2rem 0 0;
  color: #64748b;
  font-size: .82rem;
}

.promotion-feature-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 16px;
  position: relative;
  background: #dbeafe;
}

.promotion-feature-icon::before,
.promotion-feature-icon::after {
  content: "";
  position: absolute;
  background: #2563eb;
}

.promotion-feature-icon--link::before {
  width: 20px;
  height: 8px;
  left: 11px;
  top: 17px;
  border-radius: 999px;
}

.promotion-feature-icon--link::after {
  width: 8px;
  height: 20px;
  left: 17px;
  top: 11px;
  border-radius: 999px;
}

.promotion-feature-icon--friends {
  background: #ede9fe;
}

.promotion-feature-icon--friends::before,
.promotion-feature-icon--friends::after {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #7c3aed;
  top: 10px;
}

.promotion-feature-icon--friends::before {
  left: 9px;
}

.promotion-feature-icon--friends::after {
  right: 9px;
  box-shadow: -9px 14px 0 1px rgba(124, 58, 237, .55);
}

.promotion-feature-icon--reward {
  background: #dcfce7;
}

.promotion-feature-icon--reward::before {
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #16a34a;
}

.promotion-feature-icon--reward::after {
  left: 19px;
  top: 8px;
  width: 4px;
  height: 26px;
  background: rgba(255, 255, 255, .8);
}

.promotion-feature-icon--stats {
  background: #fef3c7;
}

.promotion-feature-icon--stats::before {
  left: 10px;
  bottom: 10px;
  width: 5px;
  height: 14px;
  background: #f59e0b;
  box-shadow: 9px -6px 0 #f59e0b, 18px -12px 0 #f59e0b;
}

.promotion-feature-icon--stats::after {
  display: none;
}

@media (max-width: 991.98px) {
  #profile-promotion-panel .promotion-hero,
  #profile-promotion-panel .promotion-main-grid {
    grid-template-columns: 1fr;
  }

  #profile-promotion-panel .promotion-help-box {
    min-width: 0;
    width: 100%;
  }

  #profile-promotion-panel .promotion-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  #profile-promotion-panel .promotion-summary-grid,
  #profile-promotion-panel .promotion-feature-strip {
    grid-template-columns: 1fr;
  }

  #profile-promotion-panel .promotion-inline-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #profile-promotion-panel #promotionLevelCard {
    grid-template-columns: 1fr;
  }

  #profile-promotion-panel .promotion-action-row {
    justify-content: flex-start;
  }

  #profile-promotion-panel .promotion-inline-copy {
    grid-template-columns: 1fr;
  }

  #profile-promotion-panel .promotion-qr-actions {
    grid-template-columns: 1fr;
  }

  #profile-promotion-panel .promotion-records-panel .points-records-list {
    max-width: none;
  }

  #profile-promotion-panel .promotion-records-art {
    display: none;
  }
}

.history-detail-main {
  min-width: 0;
}

.history-detail-section + .history-detail-section {
  margin-top: 1rem;
}

.history-detail-section-body {
  min-width: 0;
}

.history-task-detail-modal .modal-body h6,
.history-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.85rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.history-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0.1rem 0 0.85rem;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.3;
  max-width: 100%;
}

.history-chip-label {
  color: #64748b;
}

.history-chip-value {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
}

.history-chip-value--task-id {
  max-width: none;
}

.history-chip-code {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  color: #0f172a;
  background: transparent;
  padding: 0;
  user-select: all;
  max-width: none;
}

.history-chip--danger {
  background: #fee2e2;
  border-color: #fecaca;
}

.history-chip--danger .history-chip-label,
.history-chip--danger .history-chip-value {
  color: #b91c1c;
}

/* 详情：产品名/描述独占一行 */
.history-product-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history-product-row {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.55;
  align-items: baseline;
}
.history-product-label {
  flex: 0 0 auto;
  color: #64748b;
  font-weight: 500;
  min-width: 64px;
}
.history-product-value {
  flex: 1 1 auto;
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}

/* 输入参数 chip 行（紧凑 label/value） */
.history-chip-row--input { margin: 0 0 10px; }
.history-chip-row--input .history-chip-value { max-width: 32ch; }

.task-image-source-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.task-image-source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #2563eb;
  font-size: 0.78rem;
  text-decoration: none;
}

.task-image-source-link:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.task-image-source-label {
  font-weight: 500;
}

.task-image-source-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 1px 8px;
  font-size: 0.72rem;
}

/* 输入参数中长文本（prompt 等）整行展示 */
.history-input-long-list { display: flex; flex-direction: column; gap: 8px; }
.history-input-long-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; }
.history-input-long-label { font-size: 0.78rem; color: #64748b; font-weight: 500; margin-bottom: 4px; }
.history-input-long-item .history-json-block { background: transparent; padding: 0; margin: 0; font-size: 0.82rem; color: #0f172a; white-space: pre-wrap; word-break: break-word; }

/* 图片预览：磨砂蒙版 */
body.history-img-preview-open .modal-backdrop.show {
  background: rgba(15, 23, 42, 0.85);
  opacity: 1 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.history-img-preview-open #imgPreviewModal {
  background: transparent;
}
body.history-img-preview-open #taskDetailModal {
  filter: blur(3px);
  opacity: 0.28;
  transition: filter .16s ease, opacity .16s ease;
}

/* ===== 场景图/主图/详情图：骨架占位 + 实时计时 ===== */
.scene-result-loading-status {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.scene-result-loading-status .scene-loading-elapsed {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: #1e40af;
}
.scene-result-item--skeleton {
  border: 1px dashed #cbd5e1;
}
.scene-skeleton {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  border-radius: 8px;
  color: #64748b;
}
.scene-skeleton-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: sceneSkeletonShimmer 1.4s linear infinite;
}
.scene-skeleton-spinner {
  width: 36px; height: 36px;
  border: 3px solid #cbd5e1;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: sceneSpin 0.9s linear infinite;
  z-index: 1;
}
.scene-skeleton-timer {
  z-index: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  background: rgba(255,255,255,.85);
  padding: 2px 10px;
  border-radius: 999px;
}
.scene-skeleton-label { z-index: 1; font-size: 12px; color: #475569; }
@keyframes sceneSkeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes sceneSpin { to { transform: rotate(360deg); } }

.history-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.history-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--brand-border);
  cursor: pointer;
  transition: transform .15s;
}

.history-detail-image:hover {
  transform: scale(1.05);
}

.task-image-card {
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.task-image-card--failed {
  border-color: #fecaca;
  background: #fff8f8;
}

.task-image-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 1px dashed #fca5a5;
  background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%);
  color: #991b1b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  gap: 6px;
}

.task-image-fallback strong {
  font-size: 0.85rem;
}

.task-image-fallback span,
.task-image-meta,
.task-image-status {
  word-break: break-word;
}

.task-image-status {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #475569;
  text-align: center;
}

.task-image-meta {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #64748b;
}

@media (max-width: 1200px) {
  .history-detail-layout {
    grid-template-columns: 1fr;
  }

  .history-detail-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    padding-right: 0;
  }

  .history-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .history-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-detail-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-preview-stage {
    min-height: 72vh;
    padding: 1rem 0.75rem;
  }

  .history-preview-image {
    max-width: 92vw;
    max-height: 68vh;
  }
}

@media (max-width: 480px) {
  .history-detail-grid {
    grid-template-columns: 1fr;
  }

  .history-detail-nav {
    grid-template-columns: 1fr;
  }
}

/* 费用确认弹框 */
.scene-cost-confirm-content {
  background: #fff;
  border-radius: 16px;
  width: min(92vw, 420px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.scene-cost-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.scene-cost-confirm-header h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.scene-cost-confirm-header .scene-image-preview-close {
  position: static;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.2rem;
  box-shadow: none;
  background: #f1f5f9;
}

.scene-cost-confirm-body {
  padding: 1.5rem;
  text-align: center;
}

.scene-cost-confirm-body p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #334155;
}

.scene-cost-confirm-body strong {
  color: #2563eb;
  font-size: 1.35rem;
}

.scene-cost-confirm-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.scene-cost-confirm-footer .btn {
  min-width: 5rem;
  border-radius: 8px;
}

/* 积分定价说明 */
.pricing-guide {
  margin-top: 2.5rem;
  padding: 0 0.5rem 2rem;
}

.pricing-guide-inner {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem 1.75rem 1.25rem;
}

.pricing-guide-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.1rem;
}

.pricing-guide-icon {
  font-size: 1.15rem;
}

.pricing-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.85rem;
}

.pricing-guide-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1rem 0.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.pricing-guide-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.pricing-guide-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.pricing-guide-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.pricing-guide-card-body strong {
  font-size: 0.88rem;
  color: #0f172a;
}

.pricing-guide-cost {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 0.1rem 0.5rem;
  border-radius: 5px;
  border: 1px solid #bfdbfe;
  width: fit-content;
}

.pricing-guide-card-desc {
  margin: 0;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .pricing-guide-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========== 全局弹框 KModal ========== */
body.k-modal-open {
  overflow: hidden;
}

.k-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

.k-modal-backdrop {
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: kModalFadeIn .18s ease-out;
}

@keyframes kModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes kModalSlideIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.k-modal-card {
  background: #fff;
  border-radius: 16px;
  width: min(92vw, 440px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: kModalSlideIn .22s ease-out;
}

.k-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.k-modal-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: #0f172a;
}

.k-modal-close {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.k-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.k-modal-body {
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.k-modal-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.k-modal-msg {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #334155;
  word-break: break-word;
}

.k-modal-cost-text {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.k-modal-cost-points {
  color: #7c3aed;
  font-size: 1.35rem;
}

.k-modal-cost-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* 确认弹框正文底部补充提示，优先用于展示本次决策相关的预计积分。 */
.k-modal-footer-note {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #e9d5ff;
  background: #faf5ff;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.k-modal-footer-note strong {
  color: #7c3aed;
  font-weight: 800;
}

.k-modal-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0.75rem 1.5rem 1.15rem;
  border-top: 1px solid #e2e8f0;
}

.k-modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 5rem;
  border-radius: 8px;
  font-weight: 500;
  padding: 0.42rem 1.1rem;
  white-space: nowrap;
}

.k-modal-btn-icon {
  line-height: 1;
}

.scene-adjust-modal-card {
  width: min(94vw, 960px);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
}

.scene-adjust-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  text-align: left;
  gap: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.scene-adjust-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.scene-adjust-preview-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.scene-adjust-source-label {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: #475569;
  font-weight: 600;
}

.scene-adjust-preview-img {
  width: 100%;
  flex: 1 1 auto;
  max-height: clamp(220px, 38vh, 360px);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #fff;
}

.scene-adjust-params-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scene-adjust-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scene-adjust-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.scene-adjust-prompt-tip {
  margin-top: 8px;
}

.scene-adjust-points-hint {
  margin: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #f8fbff, #eef4ff);
}

.scene-adjust-points-hint .consume-hint-extra {
  color: #64748b;
}

@media (max-width: 768px) {
  .scene-adjust-modal-card {
    width: min(96vw, 960px);
    max-height: calc(100vh - 1rem);
  }

  .scene-adjust-modal-body {
    padding: 1.25rem 1rem;
  }

  .scene-adjust-top {
    grid-template-columns: 1fr;
  }

  .scene-adjust-param-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 通用 AI 工具页 ===== */
.generic-tool-page { max-width: 100%; width: 100%; margin: 0 auto; padding: 32px 0 64px; }
.generic-tool-head { text-align: center; margin-bottom: 32px; }
.generic-tool-head h1 { font-size: 32px; font-weight: 800; color: #0f172a; margin: 12px 0 8px; }
.generic-tool-head p { color: #64748b; font-size: 15px; max-width: 760px; margin: 0 auto; }
.generic-tool-eyebrow { display: inline-block; font-size: 12px; letter-spacing: 1px; color: #ef4444; background: #fef2f2; padding: 4px 12px; border-radius: 999px; font-weight: 600; }

.generic-tool-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: flex-start; }
@media (max-width: 992px) { .generic-tool-body { grid-template-columns: 1fr; } }

.generic-tool-form { background: #fff; padding: 24px; border-radius: 16px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); border: 1px solid #f1f5f9; }
.generic-form-row { margin-bottom: 16px; }
.generic-form-label { display: block; font-weight: 600; color: #1f2937; font-size: 14px; margin-bottom: 6px; }
.generic-form-label.required::after { content: " *"; color: #ef4444; }
.generic-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 8px; }
.generic-form-grid-note { grid-column: 1 / -1; margin: -6px 0 4px; }
.generic-beta-note { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 13px; line-height: 1.6; }
@media (max-width: 576px) { .generic-form-grid { grid-template-columns: 1fr; } }
.generic-form-inline { display: flex; align-items: center; gap: 12px; }
.generic-form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed #e5e7eb; margin-top: 12px; }
.generic-form-hint { color: #64748b; font-size: 13px; }

.generic-upload-dropzone { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; background: #f8fafc; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.generic-upload-dropzone:focus-visible,
.generic-upload-dropzone.is-dragover,
.generic-upload-dropzone.is-paste-active,
.generic-frame-slot:focus-visible,
.generic-frame-slot.is-dragover,
.generic-frame-slot.is-paste-active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); outline: none; }
.generic-upload-dropzone-hint { margin-top: 6px; color: #64748b; font-size: 12px; line-height: 1.5; }
.generic-source-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.generic-source-thumb { position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; background: #f9fafb; }
.generic-source-thumb img { width: 100%; height: 100%; object-fit: cover; }
.generic-source-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,0.6); color: #fff; line-height: 1; cursor: pointer; }
.generic-ref-tools { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; }
.generic-ref-tools .btn { flex: 0 0 auto; }
.generic-ref-tools .form-text { margin: 0; min-width: 0; flex: 1 1 auto; }
.generic-ref-tools .btn.is-loading { pointer-events: none; }

/* 参考图风格解析折叠卡片 */
.generic-ref-card { border: 1px solid #c7d2fe; border-radius: 10px; background: #f5f7ff; overflow: hidden; }
.generic-ref-card-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #eef2ff; border-bottom: 1px solid #c7d2fe; cursor: pointer; user-select: none; }
.generic-ref-card-title { font-weight: 600; color: #3730a3; font-size: 14px; }
.generic-ref-card-badge { font-size: 12px; color: #6366f1; background: #fff; border: 1px solid #c7d2fe; padding: 1px 8px; border-radius: 999px; }
.generic-ref-card-toggle { margin-left: auto; border: none; background: transparent; color: #4338ca; font-size: 18px; line-height: 1; cursor: pointer; transition: transform .2s; padding: 0 4px; }
.generic-ref-card.is-collapsed .generic-ref-card-toggle { transform: rotate(-90deg); }
.generic-ref-card-body { padding: 12px; background: #fff; }
.generic-ref-card.is-collapsed .generic-ref-card-body { display: none; }

.generic-result-panel { background: #fff; padding: 24px; border-radius: 16px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); border: 1px solid #f1f5f9; min-height: 360px; }
.generic-result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.generic-result-head h3 { margin: 0; font-size: 18px; color: #0f172a; }
.generic-result-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.generic-result-content { min-height: 280px; }
.generic-result-empty { color: #94a3b8; padding: 48px 24px; text-align: center; font-size: 14px; }
.generic-result-loading { color: #2563eb; padding: 48px 24px; text-align: center; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.generic-result-error { color: #b91c1c; padding: 24px; background: #fef2f2; border-radius: 8px; }
.generic-result-pre { background: #f8fafc; padding: 16px; border-radius: 8px; white-space: pre-wrap; word-break: break-word; color: #0f172a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.7; max-height: 600px; overflow: auto; }
.generic-result-md,
.history-copy-markdown { background: #f8fafc; padding: 18px; border-radius: 10px; color: #0f172a; font-size: 14px; line-height: 1.75; max-height: 680px; overflow: auto; word-break: break-word; }
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 { margin: 1.1em 0 0.55em; font-weight: 700; line-height: 1.35; color: #0f172a; }
.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child { margin-top: 0; }
.markdown-content h1 { font-size: 1.55rem; }
.markdown-content h2 { font-size: 1.35rem; }
.markdown-content h3 { font-size: 1.18rem; }
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 { font-size: 1rem; }
.markdown-content p { margin: 0 0 0.85em; }
.markdown-content p:last-child { margin-bottom: 0; }
.markdown-content ul,
.markdown-content ol { padding-left: 1.35rem; margin: 0 0 0.9em; }
.markdown-content li { margin: 0.3em 0; }
.markdown-content blockquote { margin: 0 0 1em; padding: 0.75rem 1rem; border-left: 4px solid #bfdbfe; background: #eff6ff; color: #334155; border-radius: 8px; }
.markdown-content code { padding: 0.1rem 0.35rem; border-radius: 4px; background: #e2e8f0; color: #be123c; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.markdown-content pre { margin: 0 0 1rem; padding: 1rem; overflow: auto; background: #0f172a; color: #e2e8f0; border-radius: 10px; }
.markdown-content pre code { padding: 0; background: transparent; color: inherit; }
.markdown-content .markdown-table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.markdown-content table { width: 100%; border-collapse: collapse; background: #fff; }
.markdown-content th,
.markdown-content td { border: 1px solid #e2e8f0; padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.markdown-content th { background: #eef2ff; font-weight: 700; }
.markdown-content hr { border: 0; border-top: 1px solid #e2e8f0; margin: 1rem 0; }
.markdown-content a { color: #2563eb; text-decoration: underline; }

.generic-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.generic-result-img-card { background: #f8fafc; border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; transition: box-shadow .2s ease, transform .2s ease; }
.generic-result-img-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.generic-result-img-card img { width: 100%; height: auto; display: block; }
.generic-result-img-wrap { position: relative; cursor: zoom-in; }
.generic-result-img-mask { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 500; background: rgba(15,23,42,.45); opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.generic-result-img-wrap:hover .generic-result-img-mask { opacity: 1; pointer-events: auto; cursor: zoom-in; }
.generic-result-img-foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; color: #64748b; background: #fff; }
.generic-result-img-card--empty { padding: 32px 16px; text-align: center; color: #94a3b8; font-size: 13px; }
.generic-result-download { border: 1px solid #cbd5e1; background: #fff; color: #1d4ed8; padding: 3px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all .15s ease; }
.generic-result-download:hover { border-color: #2563eb; background: #eff6ff; }

/* 加载占位（骨架） */
.generic-result-loading-status { color: #2563eb; font-size: 14px; padding: 8px 12px; background: #eff6ff; border-radius: 8px; margin-bottom: 12px; }
.generic-result-loading-status--done { color: #047857; background: #ecfdf5; }
.generic-result-img-card--loading { border: 1px dashed #cbd5e1; }
.generic-skeleton { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: #64748b; }
.generic-skeleton-shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); background-size: 200% 100%; animation: genericSkeletonShimmer 1.4s linear infinite; }
.generic-skeleton-spinner { width: 36px; height: 36px; border: 3px solid #cbd5e1; border-top-color: #3b82f6; border-radius: 50%; animation: genericSpin 0.9s linear infinite; z-index: 1; }
.generic-skeleton-timer { z-index: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 600; color: #1e293b; background: rgba(255,255,255,.85); padding: 2px 10px; border-radius: 999px; }
.generic-skeleton-label { z-index: 1; font-size: 12px; color: #475569; }
@keyframes genericSkeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes genericSpin { to { transform: rotate(360deg); } }

/* Lightbox 大图查看 */
.generic-lightbox { position: fixed; inset: 0; z-index: 9999; display: none; }
.generic-lightbox.is-open { display: block; }
.generic-lightbox-lock { overflow: hidden; }
.generic-lightbox-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.92); backdrop-filter: blur(4px); }
.generic-lightbox-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 72px 96px 40px; }
.generic-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); border-radius: 6px; cursor: zoom-out; }
.generic-lightbox-toolbar { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 12px; color: #f1f5f9; }
.generic-lightbox-caption { flex: 1; font-size: 14px; color: #e2e8f0; }
.generic-lightbox-counter { font-size: 13px; color: #cbd5e1; }
.generic-lightbox-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 16px; cursor: pointer; transition: all .15s ease; display: inline-flex; align-items: center; justify-content: center; }
.generic-lightbox-btn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
.generic-lightbox-btn:disabled { opacity: .45; cursor: not-allowed; }
.generic-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.24); background: rgba(15,23,42,.4); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; transition: all .15s ease; display: inline-flex; align-items: center; justify-content: center; z-index: 2; }
.generic-lightbox-nav:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.42); }
.generic-lightbox-nav:disabled { opacity: .35; cursor: not-allowed; }
.generic-lightbox-nav--prev { left: 24px; }
.generic-lightbox-nav--next { right: 24px; }

/* ===== 通用 AI 工具：Tab 切换 + 浮动积分栏 ===== */
.generic-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0 20px; }
.generic-tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; color: #475569; font-size: 14px; font-weight: 500; text-decoration: none; transition: all .15s ease; cursor: pointer; }
.generic-tab:hover { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; text-decoration: none; }
.generic-tab.active { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(59, 130, 246, .25); }
.generic-tab.active .generic-tab-soon { background: rgba(255,255,255,.25); color: #fff; }
.generic-tab-icon { font-size: 16px; line-height: 1; }
.generic-tab-soon { font-size: 11px; padding: 1px 6px; background: #f1f5f9; color: #94a3b8; border-radius: 999px; }
.generic-tab--upcoming { opacity: .85; }

.generic-floating-bar { margin-top: 20px; }
.generic-floating-inner { width: 100%; }
.generic-floating-bar .scene-consume-meta { min-width: 0; }
.generic-floating-bar .scene-consume-hint { margin: 0; color: #475569; font-size: 13px; text-align: left; justify-content: flex-start; }
.generic-floating-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

.generic-soon { padding: 56px 24px; text-align: center; color: #475569; }
.generic-soon-icon { font-size: 56px; margin-bottom: 12px; }
.generic-soon h3 { font-size: 20px; margin: 8px 0 6px; color: #0f172a; }
.generic-soon p { color: #64748b; max-width: 480px; margin: 0 auto 16px; }
.generic-soon-actions { display: inline-flex; gap: 12px; }

@media (max-width: 992px) {
  .generic-tool-page {
    padding: 28px 0 56px;
  }

  .generic-tool-form,
  .generic-result-panel {
    padding: 20px;
  }

  .generic-result-panel {
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .generic-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .generic-tabs::-webkit-scrollbar {
    display: none;
  }

  .generic-tab {
    flex: 0 0 auto;
  }

  .generic-form-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .generic-ref-tools {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .generic-result-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .generic-result-actions .btn {
    flex: 1 1 140px;
  }

  .generic-ref-card-head {
    flex-wrap: wrap;
  }

  .generic-ref-card-toggle {
    margin-left: 0;
  }

  .generic-floating-bar {
    margin-top: 16px;
  }

  .generic-floating-bar .scene-consume-meta {
    display: grid;
    flex: 0 1 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0;
    width: 100%;
  }

  .generic-floating-bar .scene-consume-scroll {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .generic-floating-bar .scene-consume-scroll::-webkit-scrollbar {
    display: none;
  }

  .generic-floating-bar .scene-consume-hint {
    flex: 0 0 auto;
    min-width: max-content;
    flex-wrap: nowrap;
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
    line-height: 1.35;
  }

  .generic-floating-bar .consume-guide-popover {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  .generic-tool-head h1 {
    font-size: 28px;
  }

  .generic-tool-head p {
    font-size: 14px;
  }

  .generic-tool-form,
  .generic-result-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .generic-source-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .generic-result-grid {
    grid-template-columns: 1fr;
  }

  .generic-result-empty,
  .generic-result-loading {
    padding: 32px 16px;
  }

  .generic-tab { padding: 7px 12px; font-size: 13px; }
  .generic-floating-bar { margin-top: 14px; }
  .generic-floating-actions { justify-content: stretch; }
  .generic-floating-actions .btn { width: 100%; }
}

/* ===== 通用 AI 视频：首帧/尾帧上传 ===== */
.generic-frame-uploader { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.generic-frame-slot { background: #f8f9fb; border: 1px dashed #d0d7e2; border-radius: 8px; padding: 10px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.generic-frame-title { font-size: 13px; color: #555; margin-bottom: 6px; }
.generic-frame-preview { margin-top: 8px; min-height: 8px; }
.generic-frame-preview .generic-source-thumb { display: inline-block; position: relative; }
.generic-frame-preview img { max-width: 160px; max-height: 120px; border-radius: 6px; border: 1px solid #e2e6ed; }
@media (max-width: 540px) { .generic-frame-uploader { grid-template-columns: 1fr; } }
.materials-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.25rem;
}

.materials-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
    align-self: start;
}

.materials-filter-group + .materials-filter-group {
    margin-top: 1rem;
}

.materials-filter-title {
    display: block;
    margin-bottom: .5rem;
    font-size: .9rem;
    font-weight: 700;
    color: #111827;
}

.materials-filter-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.materials-filter-btn {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    padding: .6rem .75rem;
    text-align: left;
    transition: all .2s ease;
}

.materials-filter-btn:hover,
.materials-filter-btn.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.materials-main {
    min-width: 0;
}

.materials-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.materials-toolbar-search {
    flex: 1;
}

.materials-summary {
    margin-bottom: .75rem;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.materials-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    padding: 0;
    color: inherit;
    text-align: left;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.materials-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.materials-card--skeleton:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.materials-card-preview {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.materials-card-preview img,
.materials-card-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.materials-card-icon {
    font-size: 3rem;
}

.materials-skeleton-block,
.materials-skeleton-line,
.materials-skeleton-chip {
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

.materials-skeleton-block::after,
.materials-skeleton-line::after,
.materials-skeleton-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
    animation: materials-skeleton-shimmer 1.2s infinite;
}

.materials-skeleton-line {
    height: 12px;
    border-radius: 999px;
    margin-top: .7rem;
}

.materials-skeleton-line--title {
    height: 18px;
    width: 78%;
    margin-top: 0;
}

.materials-skeleton-line--short {
    width: 56%;
}

.materials-skeleton-chip-row {
    display: flex;
    gap: .4rem;
    margin-top: .7rem;
}

.materials-skeleton-chip {
    width: 56px;
    height: 20px;
    border-radius: 999px;
}

.materials-card-body {
    padding: .9rem;
}

.materials-card-title {
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.8em;
}

.materials-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .6rem;
}

.materials-card-badge,
.materials-card-tag {
    display: inline-flex;
    align-items: center;
    padding: .18rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    background: #dbeafe;
    color: #1d4ed8;
}

.materials-card-badge--soft {
    background: #f3f4f6;
    color: #4b5563;
}

.materials-card-prompt {
    margin-top: .65rem;
    font-size: .82rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.materials-card-foot {
    margin-top: .75rem;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    font-size: .75rem;
    color: #6b7280;
}

.materials-pager {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
}

.materials-pager-info {
    color: #6b7280;
    font-size: .85rem;
}

.materials-empty {
    padding: 2rem;
    text-align: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: #6b7280;
}

.materials-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 1.25rem;
}

.materials-detail-preview {
    background: #0f172a;
    border-radius: 16px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.materials-detail-image-shell {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: 100%;
    min-height: 388px;
}

.materials-detail-position {
    margin-right: auto;
    font-size: .86rem;
    font-weight: 600;
    color: #cbd5e1;
}

.materials-detail-preview-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.materials-detail-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.75rem;
    height: 2rem;
    padding: 0 .75rem;
    border: 1px solid rgba(191, 219, 254, .35);
    border-radius: 999px;
    background: rgba(15, 23, 42, .55);
    color: #eff6ff;
    font-size: .82rem;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.materials-detail-preview-btn:hover {
    background: rgba(37, 99, 235, .28);
    border-color: rgba(191, 219, 254, .65);
    color: #fff;
    transform: translateY(-1px);
}

.materials-detail-preview-stage {
    flex: 1;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.materials-detail-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(191, 219, 254, .35);
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #eff6ff;
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
    z-index: 3;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.materials-detail-nav-btn:hover {
    background: rgba(37, 99, 235, .45);
    border-color: rgba(191, 219, 254, .7);
}

.materials-detail-nav-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.materials-detail-nav-btn--prev {
    left: 1rem;
}

.materials-detail-nav-btn--next {
    right: 1rem;
}

.materials-detail-preview-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    height: 2rem;
    padding: 0 .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
    font-size: .8rem;
}

.materials-detail-image,
.materials-detail-video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
}

.materials-detail-image {
    user-select: none;
    transform-origin: center center;
    transition: transform .18s ease;
}

.materials-detail-file {
    color: #fff;
    font-size: 1rem;
}

.materials-detail-file a {
    color: #bfdbfe;
}

.materials-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.materials-detail-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.materials-detail-table > div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .75rem;
}

.materials-detail-table span {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    margin-bottom: .25rem;
}

.materials-detail-table strong {
    color: #111827;
    word-break: break-word;
}

.materials-detail-section {
    margin-top: 1rem;
}

.materials-detail-section h6 {
    margin-bottom: .5rem;
    font-weight: 700;
}

.materials-detail-section pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .85rem;
    font-size: .82rem;
    color: #374151;
}

@keyframes materials-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 991.98px) {
    .materials-shell,
    .materials-detail-layout {
        grid-template-columns: 1fr;
    }

    .materials-sidebar {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .generic-lightbox-stage {
        padding: 72px 56px 32px;
    }

    .generic-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .generic-lightbox-nav--prev {
        left: 12px;
    }

    .generic-lightbox-nav--next {
        right: 12px;
    }

    .materials-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .materials-detail-preview-toolbar {
        justify-content: flex-start;
    }

    .materials-detail-nav-btn--prev {
        left: .5rem;
    }

    .materials-detail-nav-btn--next {
        right: .5rem;
    }

    .materials-detail-table {
        grid-template-columns: 1fr;
    }
}
