/* ==========================================================================
   UI polish layer
   Loaded after every other stylesheet. Goal: a full-size reading scale,
   clearer affordances, calmer surfaces and consistent focus states.
   Keep this file free of layout rewrites that JS depends on.
   ========================================================================== */

:root {
  --ui-scale: 1;
  --text-secondary: #d8dbe2;
  --text-muted: #a9aeb9;
  --border: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.19);
  --border-hairline: rgba(255, 255, 255, 0.06);
  --radius: 10px;
  --radius-sm: 9px;
  --radius-lg: 14px;
  --toolbar-h: 62px;
  --polish-brand: #9fb0ff;
  --polish-brand-2: #7fe0e6;
  --polish-brand-soft: rgba(159, 176, 255, 0.13);
  --polish-surface: rgba(255, 255, 255, 0.035);
  --polish-surface-strong: rgba(255, 255, 255, 0.07);
}

[data-theme="light"] {
  --text-secondary: #34363d;
  --text-muted: #5f636d;
  --border: rgba(17, 18, 22, 0.12);
  --border-light: rgba(17, 18, 22, 0.22);
  --polish-brand: #4a5ecb;
  --polish-brand-2: #0f8b96;
  --polish-brand-soft: rgba(74, 94, 203, 0.1);
  --polish-surface: rgba(17, 18, 22, 0.035);
  --polish-surface-strong: rgba(17, 18, 22, 0.055);
}

::selection {
  background: rgba(159, 176, 255, 0.24);
  color: #fff;
}

[data-theme="light"] ::selection {
  background: rgba(74, 94, 203, 0.18);
  color: #111216;
}

/* ---------- Focus ---------- */
.btn:focus-visible,
.icon-btn:focus-visible,
.toolbar-sort-btn:focus-visible,
.toolbar-select:focus-visible,
.feature-tab:focus-visible,
.imagegen-feed-tab:focus-visible,
.imagegen-filter-pill:focus-visible,
.app-nav-item:focus-visible,
.landing-route:focus-visible,
.sidebar-new-btn:focus-visible,
.sidebar-batch-btn:focus-visible,
.sidebar-collect-btn:focus-visible,
.group-item:focus-visible,
.settings-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--polish-brand) 76%, #ffffff);
  outline-offset: 2px;
}

/* ---------- Single reading scale ---------- */
.panel-hint,
.settings-hint,
.community-inline-hint,
.imagegen-feed-hint,
.feature-empty .panel-hint {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.65;
}

/* ==========================================================================
   Desktop workspace chrome
   ========================================================================== */
@media (min-width: 901px) {
  /* ----- Primary navigation ----- */
  .app-nav {
    width: 216px;
    padding: 14px 11px 16px;
    background:
      radial-gradient(ellipse 160% 32% at 0% 0%, rgba(120, 140, 255, 0.06), transparent 70%),
      linear-gradient(180deg, #15171c 0%, #111318 100%);
    border-right: 1px solid var(--border);
    box-shadow: none;
  }

  body.app-nav-collapsed .app-nav {
    width: 76px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .app-nav-head {
    padding: 2px 3px 15px;
    margin-bottom: 8px;
  }

  .app-brand {
    gap: 11px;
    padding: 5px 7px;
  }

  .app-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  }

  .app-brand-name {
    font-size: 15.5px;
    letter-spacing: 0.01em;
  }

  .app-nav-collapse-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--text-muted);
  }

  .app-nav-menu {
    gap: 5px;
  }

  .app-nav-item {
    min-height: 42px;
    padding: 10px 11px;
    gap: 11px;
    border-radius: 10px;
    color: #c3c7d0;
    font-size: 13.5px;
    font-weight: 520;
    letter-spacing: 0.005em;
  }

  .app-nav-icon {
    width: 19px;
    height: 19px;
    color: #8f95a2;
    transition: color 180ms ease, transform 180ms ease;
  }

  .app-nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.055);
    color: #f1f2f5;
  }

  .app-nav-item:hover:not(.active) .app-nav-icon {
    color: #d9dce3;
  }

  .app-nav .app-nav-item.active {
    background: linear-gradient(90deg, rgba(159, 176, 255, 0.16), rgba(159, 176, 255, 0.035) 72%, transparent);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  }

  .app-nav .app-nav-item.active::before {
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: 0;
    display: block !important;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #c4ceff, #7fe0e6);
    box-shadow: 0 0 10px rgba(159, 176, 255, 0.5);
    content: '';
  }

  .app-nav .app-nav-item.active .app-nav-icon {
    color: var(--polish-brand);
  }

  body.app-nav-collapsed .app-nav-item {
    min-height: 44px;
    padding-right: 0;
    padding-left: 0;
  }

  .app-nav-footer {
    gap: 3px;
    padding: 10px 0 6px;
  }

  .app-nav-util {
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--text-muted);
    font-size: 12.5px;
  }

  .app-nav-subscribe-wrap {
    gap: 8px;
    margin-bottom: 10px;
  }

  .app-nav-trial-btn {
    min-height: 38px;
    border-radius: 9px;
    font-size: 12.5px;
  }

  .app-nav-subscribe-btn {
    min-height: 42px;
    border-radius: 10px;
  }

  .auth-login-btn {
    min-height: 38px;
    border-radius: 9px;
    font-size: 13px;
  }

  .app-nav-storage-hint {
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .app-build-label {
    opacity: 0.55;
    font-size: 9.5px;
  }

  /* ----- Warehouse secondary sidebar ----- */
  .app-page-warehouse .sidebar {
    width: 218px;
    padding: 16px 0 20px;
    background:
      radial-gradient(ellipse 150% 22% at 0% 0%, rgba(120, 140, 255, 0.035), transparent 70%),
      linear-gradient(180deg, #13151a 0%, #101216 100%);
    border-right: 1px solid var(--border);
    box-shadow: none;
  }

  .sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px 16px;
  }

  .app-page-warehouse .sidebar-new-btn {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #e6e8ef 100%);
    color: #111216;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28), inset 0 1px 0 #ffffff;
  }

  .app-page-warehouse .sidebar-new-btn:hover {
    border: 0;
    background: #ffffff;
    color: #111216;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 #ffffff;
  }

  .app-page-warehouse .sidebar-batch-btn {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 550;
  }

  .app-page-warehouse .sidebar-batch-btn:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .app-page-warehouse .sidebar-collect-btn {
    position: relative;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 550;
  }

  .app-page-warehouse .sidebar-collect-btn:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .sidebar-collect-badge {
    top: -7px;
    right: 10px;
    padding: 2px 7px;
    border: 1px solid rgba(159, 176, 255, 0.28);
    background: #1a1e28;
    color: var(--polish-brand);
    font-size: 9px;
  }

  .app-page-warehouse .sidebar-section {
    padding: 0 12px;
    margin-bottom: 18px;
  }

  .sidebar-section-title {
    padding: 4px 10px 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.09em;
  }

  .sidebar-section-title .add-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 15px;
  }

  .group-item {
    min-height: 36px;
    margin: 1px 0;
    padding: 8px 10px;
    border-radius: 8px;
    color: #c8ccd4;
    font-size: 13px;
    font-weight: 500;
  }

  .group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }

  .group-item.active {
    background: rgba(255, 255, 255, 0.075);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .group-item .count {
    color: var(--text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }

  .app-page-warehouse .sidebar .action-btn {
    margin: 12px 14px 0;
    padding: 11px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 550;
    backdrop-filter: none;
  }

  .app-page-warehouse .sidebar .action-btn:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: none;
  }

  /* ----- Main header + toolbar ----- */
  .main-header {
    height: 64px;
    min-height: 64px;
    padding: 0 18px;
    background: rgba(13, 15, 19, 0.72);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(20px) saturate(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(1.08);
  }

  .main-header h3 {
    margin-right: 8px;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
  }

  .toolbar-row {
    gap: 12px;
  }

  .toolbar-cluster {
    gap: 8px;
  }

  .btn,
  .btn-sm {
    height: 36px;
    border-radius: 9px;
  }

  .btn-sm {
    padding: 0 13px;
    font-size: 12.5px;
  }

  .btn-primary {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
  }

  .toolbar-sort-btn {
    min-width: 104px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    font-size: 12.5px;
  }

  .view-toggle,
  .column-toggle {
    height: 36px;
    padding: 3px;
    gap: 1px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
  }

  .view-toggle button {
    width: 30px;
    height: 28px;
    border-radius: 6px;
    color: var(--text-muted);
  }

  .view-toggle button.active {
    background: rgba(255, 255, 255, 0.105);
    color: #ffffff;
  }

  .column-toggle .icon-btn {
    width: 26px;
    height: 28px;
    background: transparent;
  }

  .column-toggle-label {
    display: inline-grid;
    min-width: 17px;
    place-items: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
    user-select: none;
  }

  .toolbar-search {
    display: flex;
    min-width: 168px;
    max-width: 280px;
    height: 36px;
    flex: 1 1 210px;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  }

  .toolbar-search:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.055);
  }

  .toolbar-search:focus-within {
    border-color: rgba(159, 176, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(159, 176, 255, 0.12);
  }

  .toolbar-search-icon {
    flex-shrink: 0;
    color: var(--text-muted);
  }

  .toolbar-search .search-box {
    height: auto;
    min-width: 0;
    max-width: none;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 12.5px;
  }

  .toolbar-search .search-box:hover,
  .toolbar-search .search-box:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
  }

  .toolbar-search-kbd {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
  }

  .toolbar-sort-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .toolbar-search:focus-within .toolbar-search-kbd {
    opacity: 0;
  }

  /* ----- Warehouse hero ----- */
  .warehouse-hero {
    height: 304px;
    min-height: 304px;
    flex-basis: 304px;
    padding: 26px 34px 24px;
    background:
      radial-gradient(ellipse 42% 100% at 4% 0%, rgba(122, 140, 255, 0.1), transparent 62%),
      radial-gradient(ellipse 34% 90% at 96% 10%, rgba(72, 190, 200, 0.06), transparent 62%),
      color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  }

  .warehouse-hero::before {
    left: 34px;
    width: 62px;
    background: linear-gradient(90deg, var(--polish-brand), var(--polish-brand-2));
    opacity: 0.9;
  }

  .warehouse-hero-copy {
    justify-content: center;
  }

  .warehouse-hero-kicker {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .warehouse-hero-kicker-mark {
    border-color: rgba(159, 176, 255, 0.26);
    color: var(--polish-brand);
  }

  .warehouse-hero h1 {
    margin-top: 17px;
    font-size: 38px;
    line-height: 1.06;
    letter-spacing: -0.02em;
  }

  .warehouse-hero h1 span {
    color: #969ba5;
  }

  .warehouse-hero-lede {
    max-width: 470px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.7;
  }

  .warehouse-hero-actions {
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
  }

  .warehouse-hero-action {
    min-height: 40px;
    flex-shrink: 0;
    padding: 0 15px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  .warehouse-hero-action--primary {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .warehouse-hero-link {
    min-height: 36px;
    padding: 0 8px;
    font-size: 12.5px;
  }

  .warehouse-hero-meta {
    gap: 20px;
    align-items: center;
    padding-top: 16px;
  }

  .warehouse-hero-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
  }

  .warehouse-hero-stat strong {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
  }

  .warehouse-hero-stat small {
    color: var(--text-muted);
    font-size: 9px;
    letter-spacing: 0.11em;
  }

  .warehouse-hero-sync {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
  }

  .warehouse-hero-sync i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.1), 0 0 8px rgba(110, 231, 183, 0.55);
  }

  .warehouse-hero-visual {
    margin: -2px 0 -2px 12px;
  }

  .warehouse-hero-card {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  .warehouse-hero-card figcaption {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(7, 9, 13, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 8.5px;
    letter-spacing: 0.1em;
  }

  .warehouse-hero-tag {
    position: absolute;
    z-index: 4;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(11, 13, 18, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
    color: #e2e5eb;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
  }

  .warehouse-hero-tag--one {
    top: 19%;
    right: 3%;
  }

  .warehouse-hero-tag--two {
    bottom: 22%;
    left: 3%;
  }

  .warehouse-hero.is-condensed {
    height: 60px;
    min-height: 60px;
    flex-basis: 60px;
    padding: 0 20px;
  }

  .warehouse-hero.is-condensed h1 {
    font-size: 15px;
  }

  /* ----- Card grid ----- */
  .cards-container {
    padding: 20px;
  }

  #cardsContainer .card {
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.28);
  }

  .cards-container:not(.list-view) .card-body {
    padding: 10px 12px 12px;
    gap: 6px;
  }

  .card .card-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.005em;
  }

  .card-time {
    color: var(--text-muted);
    font-size: 11px;
  }

  .cards-container:not(.list-view) .card-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
  }

  .tag {
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 500;
  }

  .tag:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .card-copy-btn {
    width: 30px;
    height: 30px;
  }

  /* ----- Empty states ----- */
  .warehouse-grid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 28px !important;
    color: var(--text-secondary);
    text-align: center;
  }

  .warehouse-grid-empty-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    place-items: center;
    border: 1px solid rgba(159, 176, 255, 0.2);
    border-radius: 17px;
    background:
      radial-gradient(circle at 30% 20%, rgba(159, 176, 255, 0.22), rgba(159, 176, 255, 0.04) 68%),
      rgba(255, 255, 255, 0.02);
    color: var(--polish-brand);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .warehouse-grid-empty p:first-of-type {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
  }

  .warehouse-grid-empty .panel-hint {
    max-width: 360px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.65;
  }

  .warehouse-grid-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }

  /* ==========================================================================
     Feature pages
     ========================================================================== */
  .feature-header {
    min-height: 62px;
    padding: 11px 20px;
    background: rgba(13, 15, 19, 0.72);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px) saturate(1.08);
    -webkit-backdrop-filter: blur(20px) saturate(1.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
  }

  .feature-header h2 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
  }

  .feature-tabs,
  .community-scope-tabs {
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
  }

  .feature-tab {
    min-height: 30px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 550;
  }

  .feature-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .feature-tabs.community-sort-tabs {
    padding: 0;
    border-color: transparent;
    background: transparent;
  }

  .community-sort-tabs .feature-tab {
    position: relative;
  }

  .community-sort-tabs .feature-tab.active {
    background: transparent;
    box-shadow: none;
  }

  .community-sort-tabs .feature-tab.active::after {
    position: absolute;
    right: 12px;
    bottom: 3px;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--polish-brand), var(--polish-brand-2));
    content: '';
  }

  .community-gacha-entry svg {
    flex-shrink: 0;
    color: var(--polish-brand);
  }

  .feature-search {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 12.5px;
  }

  /* ----- Image generation ----- */
  .imagegen-layout {
    padding: 0 16px 16px;
    gap: 16px;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  }

  .imagegen-form {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #191c22 0%, #15171c 100%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  }

  .imagegen-form-scroll {
    padding: 20px 22px 24px;
  }

  .imagegen-form label {
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.005em;
  }

  .imagegen-form select,
  .imagegen-form textarea,
  .imagegen-form input.settings-input,
  .imagegen-form .settings-input {
    min-height: 38px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 13px;
  }

  .imagegen-form textarea {
    min-height: 84px;
    padding: 10px 12px;
    line-height: 1.6;
  }

  .imagegen-form select:hover,
  .imagegen-form textarea:hover,
  .imagegen-form input:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.055);
  }

  .imagegen-form select:focus,
  .imagegen-form textarea:focus,
  .imagegen-form input:focus {
    border-color: rgba(159, 176, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(159, 176, 255, 0.11);
    outline: none;
  }

  .imagegen-credits-box {
    padding: 14px 16px;
    border: 1px solid rgba(159, 176, 255, 0.17);
    border-radius: 12px;
    background:
      radial-gradient(ellipse 120% 120% at 0% 0%, rgba(159, 176, 255, 0.12), transparent 62%),
      rgba(255, 255, 255, 0.025);
  }

  .imagegen-credits-label {
    color: var(--text-secondary);
    font-size: 12.5px;
  }

  .imagegen-credits-label strong {
    color: #fff;
    font-size: 15px;
  }

  .imagegen-form-footer {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--border);
    background: rgba(16, 18, 23, 0.94);
  }

  .imagegen-form-footer .imagegen-price-hint,
  .imagegen-price-hint {
    font-size: 11.5px;
    line-height: 1.5;
  }

  .imagegen-form-footer .btn,
  .imagegen-generate-btn {
    min-height: 46px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.01em;
  }

  .imagegen-advanced-fold {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
  }

  .imagegen-advanced-fold-summary {
    min-height: 46px;
    padding: 0 14px;
  }

  .imagegen-advanced-fold-summary span {
    font-size: 12.5px;
    font-weight: 600;
  }

  .imagegen-advanced-fold-summary small {
    color: var(--text-muted);
    font-size: 11px;
  }

  .imagegen-side {
    border-radius: 14px;
    overflow: hidden;
  }

  .imagegen-feed-tabs {
    padding: 4px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
  }

  .imagegen-feed-tab {
    min-height: 32px;
    border-radius: 7px;
    font-size: 12.5px;
  }

  .imagegen-mode-hero {
    padding: 14px 16px 12px;
    border-radius: 11px;
  }

  .imagegen-mode-hero-title {
    font-size: 17px;
  }

  .imagegen-mode-hero-kicker {
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .imagegen-mj-tip {
    display: inline-grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 9px;
    vertical-align: 1px;
  }

  /* ----- Community ----- */
  .community-header {
    min-height: 62px;
  }

  .community-inline-hint {
    color: var(--text-muted);
    font-size: 12.5px;
  }

  .community-post-card,
  .creation-post-card {
    border-radius: 14px;
  }

  .community-side-panel {
    border-left: 1px solid var(--border);
  }
}

/* Medium desktop: tighten the toolbar before it runs out of room. */
@media (min-width: 901px) and (max-width: 1400px) {
  .main-header {
    padding: 0 14px;
  }

  .toolbar-row,
  .toolbar-cluster,
  .toolbar-cluster-actions {
    gap: 6px;
  }

  .toolbar-sort-btn {
    min-width: 96px;
    flex-shrink: 1;
    padding: 0 8px 0 10px;
  }

  .toolbar-search {
    min-width: 0;
    flex-basis: 160px;
  }

  .toolbar-search-kbd {
    display: none;
  }

  .app-page-warehouse .toolbar-batch-btn .toolbar-label-full {
    display: none;
  }

  .app-page-warehouse .toolbar-batch-btn .toolbar-label-compact {
    display: inline;
  }
}

/* Narrow desktop: give the toolbar its own row instead of letting it overlap. */
@media (min-width: 901px) and (max-width: 1180px) {
  .main-header {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 14px 12px;
  }

  .main-header h3 {
    flex: 1 1 auto;
  }

  .header-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .toolbar-row {
    flex: 1 1 100%;
  }

  .app-page-warehouse .toolbar-cluster-actions .toolbar-batch-btn {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1000px) {
  .toolbar-row,
  .toolbar-cluster,
  .toolbar-cluster-actions {
    gap: 4px;
  }

  .app-page-warehouse #globalViewBtn {
    display: none;
  }
}

/* Narrow desktop: the decorative card stack costs more than it gives.
   Keep the copy full-width and the hero compact instead of clipping it. */
@media (min-width: 901px) and (max-width: 1180px) {
  .warehouse-hero {
    display: block;
    height: 276px;
    min-height: 276px;
    flex-basis: 276px;
    padding: 24px 30px;
  }

  .warehouse-hero-copy {
    height: auto;
    justify-content: flex-start;
  }

  .warehouse-hero-visual {
    display: none;
  }

  .warehouse-hero h1 {
    margin-top: 14px;
    font-size: 34px;
  }

  .warehouse-hero-lede {
    max-width: 620px;
    margin-top: 10px;
  }

  .warehouse-hero-actions {
    margin-top: 14px;
  }

  .warehouse-hero-meta {
    margin-top: 16px;
    padding-top: 0;
  }
}

/* ==========================================================================
   Light theme refinements
   ========================================================================== */
[data-theme="light"] .app-nav {
  background:
    radial-gradient(ellipse 160% 32% at 0% 0%, rgba(74, 94, 203, 0.05), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f8 100%);
}

[data-theme="light"] .app-page-warehouse .sidebar {
  background: linear-gradient(180deg, #fbfbfd 0%, #f3f3f7 100%);
}

[data-theme="light"] .app-nav-item {
  color: #3d4047;
}

[data-theme="light"] .app-nav-icon {
  color: #71757f;
}

[data-theme="light"] .app-nav .app-nav-item.active {
  background: linear-gradient(90deg, rgba(74, 94, 203, 0.12), rgba(74, 94, 203, 0.03) 72%, transparent);
  color: #111216;
  box-shadow: inset 0 0 0 1px rgba(17, 18, 22, 0.05);
}

[data-theme="light"] .app-nav .app-nav-item.active .app-nav-icon {
  color: var(--polish-brand);
}

[data-theme="light"] .app-page-warehouse .sidebar-new-btn {
  background: linear-gradient(180deg, #26272d 0%, #111216 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 18, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .app-page-warehouse .sidebar-new-btn:hover {
  background: #000;
  color: #fff;
}

[data-theme="light"] .app-page-warehouse .sidebar-batch-btn,
[data-theme="light"] .app-page-warehouse .sidebar-collect-btn,
[data-theme="light"] .app-page-warehouse .sidebar .action-btn {
  background: rgba(17, 18, 22, 0.025);
}

[data-theme="light"] .group-item {
  color: #3f424a;
}

[data-theme="light"] .group-item.active {
  background: rgba(17, 18, 22, 0.065);
  color: #111216;
}

[data-theme="light"] .main-header,
[data-theme="light"] .feature-header {
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .btn,
[data-theme="light"] .icon-btn,
[data-theme="light"] .toolbar-sort-btn,
[data-theme="light"] .view-toggle,
[data-theme="light"] .column-toggle,
[data-theme="light"] .toolbar-search,
[data-theme="light"] .feature-search {
  background: rgba(17, 18, 22, 0.025);
}

[data-theme="light"] .btn-primary {
  border-color: rgba(0, 0, 0, 0.34);
  background: linear-gradient(180deg, #2c2c2e, #111113);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 18, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(180deg, #3a3a3c, #1c1c1e);
  color: #ffffff;
}

[data-theme="light"] .btn-danger {
  border-color: rgba(211, 47, 47, 0.22);
  background: var(--danger-bg);
  color: var(--danger);
}

[data-theme="light"] .btn-danger:hover {
  background: rgba(211, 47, 47, 0.16);
}

[data-theme="light"] .ui-vignette {
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, transparent 0%, rgba(17, 18, 22, 0.014) 62%, rgba(17, 18, 22, 0.05) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 18%, transparent 84%, rgba(17, 18, 22, 0.035) 100%);
}

[data-theme="light"] .ripple-grid-bg {
  opacity: 0.14;
}

[data-theme="light"] .toolbar-search:focus-within {
  border-color: rgba(74, 94, 203, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 94, 203, 0.1);
}

[data-theme="light"] .view-toggle button.active {
  background: #fff;
  color: #111216;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .warehouse-hero {
  background:
    radial-gradient(ellipse 42% 100% at 4% 0%, rgba(74, 94, 203, 0.07), transparent 62%),
    radial-gradient(ellipse 34% 90% at 96% 10%, rgba(15, 139, 150, 0.05), transparent 62%),
    rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .warehouse-hero h1 span {
  color: #737780;
}

[data-theme="light"] .warehouse-hero-card {
  border-color: rgba(17, 18, 22, 0.16);
}

[data-theme="light"] .warehouse-hero-tag {
  border-color: rgba(17, 18, 22, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #25272d;
  box-shadow: 0 8px 20px rgba(20, 24, 40, 0.12);
}

[data-theme="light"] #cardsContainer .card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 22px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tag {
  background: rgba(17, 18, 22, 0.05);
  color: #4a4d55;
}

[data-theme="light"] .warehouse-grid-empty-icon {
  border-color: rgba(74, 94, 203, 0.18);
  background:
    radial-gradient(circle at 30% 20%, rgba(74, 94, 203, 0.14), rgba(74, 94, 203, 0.03) 68%),
    #fff;
  color: var(--polish-brand);
  box-shadow: 0 10px 24px rgba(20, 24, 40, 0.08), inset 0 1px 0 #fff;
}

[data-theme="light"] .imagegen-form {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  box-shadow: 0 14px 34px rgba(20, 24, 40, 0.06);
}

[data-theme="light"] .imagegen-form select,
[data-theme="light"] .imagegen-form textarea,
[data-theme="light"] .imagegen-form input.settings-input,
[data-theme="light"] .imagegen-form .settings-input {
  background: #fff;
}

[data-theme="light"] .imagegen-credits-box {
  border-color: rgba(74, 94, 203, 0.16);
  background:
    radial-gradient(ellipse 120% 120% at 0% 0%, rgba(74, 94, 203, 0.08), transparent 62%),
    #fff;
}

[data-theme="light"] .imagegen-credits-label strong {
  color: #111216;
}

[data-theme="light"] .imagegen-form-footer {
  background: rgba(250, 250, 252, 0.96);
}

[data-theme="light"] .feature-tabs,
[data-theme="light"] .community-scope-tabs,
[data-theme="light"] .imagegen-feed-tabs {
  background: rgba(17, 18, 22, 0.03);
}

[data-theme="light"] .feature-tab.active,
[data-theme="light"] .imagegen-feed-tab.active {
  background: #fff;
  color: #111216;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-tabs.community-sort-tabs {
  background: transparent;
}

[data-theme="light"] .community-sort-tabs .feature-tab.active {
  background: transparent;
  color: #111216;
  box-shadow: none;
}

/* ==========================================================================
   Mobile / small screens
   ========================================================================== */
@media (max-width: 900px) {
  :root {
    --toolbar-h: 56px;
  }

  .app-nav-item {
    font-size: 14px;
  }

  .main-header {
    min-height: 56px;
    padding: 0 12px;
  }

  .main-header h3 {
    font-size: 15.5px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .feature-header {
    min-height: 56px;
    padding: 10px 14px;
  }

  .feature-header h2 {
    font-size: 16px;
  }

  .btn-sm {
    height: 35px;
    font-size: 12.5px;
  }

  .warehouse-hero-meta .warehouse-hero-sync {
    display: none;
  }

  .warehouse-hero-tag {
    display: none;
  }

  .imagegen-form-scroll {
    padding: 18px 16px 22px;
  }

  .imagegen-form label {
    font-size: 12.5px;
  }

  .imagegen-form select,
  .imagegen-form textarea,
  .imagegen-form input.settings-input,
  .imagegen-form .settings-input {
    min-height: 42px;
    font-size: 14px;
  }

  .imagegen-form-scroll .btn,
  .imagegen-form-scroll .imagegen-ref-tool-btn,
  .imagegen-form-scroll .imagegen-prompt-tool-btn {
    min-height: 36px;
  }

  .imagegen-generate-btn {
    min-height: 48px;
    font-size: 14.5px;
  }

  .panel-hint,
  .settings-hint,
  .imagegen-feed-hint {
    font-size: 12.5px;
  }

  .warehouse-grid-empty {
    padding: 28px 20px !important;
  }

  .warehouse-grid-empty-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .warehouse-grid-empty-actions {
    width: 100%;
  }

  .warehouse-grid-empty-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-nav *,
  .sidebar *,
  .main-header *,
  .feature-header * {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   2026-10-21 · 主屏快速存卡 / 稳定布局 / 社区聚焦 / 模型选择器
   ========================================================================== */

/* ---------- 主屏：快速存卡工作台 ---------- */
.app-page-warehouse .warehouse-hero--capture {
  display: flex;
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 46% 130% at 2% -20%, rgba(122, 140, 255, 0.1), transparent 62%),
    radial-gradient(ellipse 36% 100% at 98% 0%, rgba(72, 190, 200, 0.06), transparent 62%),
    color-mix(in srgb, var(--bg-secondary) 94%, transparent);
}

.app-page-warehouse .warehouse-hero--capture::before {
  top: 0;
  left: 24px;
  width: 58px;
  background: linear-gradient(90deg, var(--polish-brand), var(--polish-brand-2));
}

.warehouse-capture-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.warehouse-capture-copy {
  min-width: 0;
}

.warehouse-capture-kicker {
  margin: 0;
  color: var(--polish-brand);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.warehouse-capture-head h1 {
  margin: 7px 0 0;
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.warehouse-capture-lede {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.warehouse-capture-meta {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 18px;
  padding-bottom: 2px;
}

.warehouse-capture-meta .warehouse-hero-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.warehouse-capture-meta .warehouse-hero-stat strong {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
}

.warehouse-capture-meta .warehouse-hero-stat small {
  color: var(--text-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.warehouse-capture-meta .warehouse-hero-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.warehouse-capture-meta .warehouse-hero-sync i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.1), 0 0 8px rgba(110, 231, 183, 0.55);
}

.quick-capture {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.quick-capture-drop {
  position: relative;
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.quick-capture-drop:hover,
.quick-capture-drop:focus-visible,
.quick-capture-drop.is-dragover {
  border-color: rgba(159, 176, 255, 0.62);
  background: rgba(159, 176, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(159, 176, 255, 0.12);
  outline: none;
}

.quick-capture-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}

.quick-capture-placeholder svg {
  margin-bottom: 3px;
  color: rgba(159, 176, 255, 0.8);
}

.quick-capture-placeholder strong {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.quick-capture-preview-wrap {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  overflow: hidden;
  background: #0b0d11;
}

.quick-capture-preview-wrap[hidden] {
  display: none;
}

.quick-capture-preview-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-capture-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(8, 10, 14, 0.76);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.quick-capture-remove:hover {
  background: rgba(220, 60, 60, 0.85);
}

.quick-capture-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(8, 10, 14, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.quick-capture-count[hidden] {
  display: none;
}

.quick-capture-editor {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

#quickCapturePrompt {
  width: 100%;
  min-height: 78px;
  flex: 1;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

#quickCapturePrompt::placeholder {
  color: var(--text-muted);
}

#quickCapturePrompt:focus {
  border-color: rgba(159, 176, 255, 0.55);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 3px rgba(159, 176, 255, 0.1);
}

.quick-capture-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.quick-capture-status {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick-capture-status[data-tone="ok"] { color: #6ee7b7; }
.quick-capture-status[data-tone="error"] { color: #fca5a5; }
.quick-capture-status[data-tone="busy"] { color: var(--polish-brand); }

.quick-capture-publish {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.quick-capture-publish input {
  width: 13px;
  height: 13px;
  accent-color: var(--polish-brand);
}

.quick-capture-save {
  min-height: 32px;
  flex-shrink: 0;
}

.warehouse-capture-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 18px;
}

.warehouse-capture-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease;
}

.warehouse-capture-link:hover {
  color: #fff;
}

.warehouse-capture-tip {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 10px;
  opacity: 0.7;
}

/* ---------- 卡片库分类栏收起 ---------- */
@media (min-width: 901px) {
  .app-page-warehouse .sidebar {
    transition: width 240ms var(--ease-out), padding 240ms var(--ease-out), opacity 180ms ease;
  }

  body.warehouse-sidebar-collapsed .app-page-warehouse .sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    border-right: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  #warehouseSidebarToggleBtn svg {
    transition: transform 200ms var(--ease-out);
  }

  body.warehouse-sidebar-collapsed #warehouseSidebarToggleBtn svg {
    transform: scaleX(-1);
  }
}

/* ---------- 工具栏：换行而不是溢出 / 原生滚动条 ---------- */
@media (min-width: 901px) {
  .main-header {
    height: auto;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-actions {
    overflow: visible;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .toolbar-row {
    flex-wrap: wrap;
    row-gap: 8px;
    min-width: 0;
  }

  .toolbar-cluster-grow {
    flex: 1 1 220px;
  }

  .toolbar-cluster-actions {
    margin-left: 0;
  }
}

/* ---------- 首屏短窗口：允许滚动，禁止重叠 ---------- */
@media (min-width: 901px) {
  .app-page-landing.active {
    overflow-y: auto;
  }

  .landing-shell {
    min-height: 100%;
  }

  .landing-stage {
    flex: 1 0 auto;
    min-height: 500px;
  }

  .landing-destinations {
    flex: 0 0 auto;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .landing-stage {
    padding-top: 26px;
    padding-bottom: 22px;
  }
}

/* ---------- 静态细腻背景（替换持续重绘的涟漪） ---------- */
.ripple-grid-bg.ripple-static-bg {
  background:
    radial-gradient(ellipse 70% 52% at 16% -12%, rgba(110, 130, 255, 0.055), transparent 62%),
    radial-gradient(ellipse 58% 44% at 90% 6%, rgba(80, 200, 200, 0.035), transparent 64%);
}

.ripple-grid-bg.ripple-static-bg::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  content: '';
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 92% 82% at 50% 40%, #000 28%, transparent 86%);
  mask-image: radial-gradient(ellipse 92% 82% at 50% 40%, #000 28%, transparent 86%);
}

[data-theme="light"] .ripple-grid-bg.ripple-static-bg {
  background:
    radial-gradient(ellipse 70% 52% at 16% -12%, rgba(74, 94, 203, 0.05), transparent 62%),
    radial-gradient(ellipse 58% 44% at 90% 6%, rgba(15, 139, 150, 0.035), transparent 64%);
}

[data-theme="light"] .ripple-grid-bg.ripple-static-bg::after {
  background-image:
    linear-gradient(rgba(17, 18, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 18, 22, 0.035) 1px, transparent 1px);
}

/* ---------- 无限画布启动页 ---------- */
.canvas-page-head-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.canvas-launch {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
}

.canvas-launch[hidden] {
  display: none !important;
}

.canvas-launch-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(159, 176, 255, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(159, 176, 255, 0.2), rgba(159, 176, 255, 0.03) 70%),
    rgba(255, 255, 255, 0.02);
  color: var(--polish-brand);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.canvas-launch h3 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.canvas-launch p {
  max-width: 430px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.canvas-launch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.canvas-launch-hint {
  font-size: 11.5px !important;
  opacity: 0.75;
}

.canvas-page-frame-wrap[hidden] {
  display: none !important;
}

/* ---------- 模型选择器 ---------- */
.model-picker {
  position: relative;
  width: 100%;
}

.model-picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.model-picker-trigger {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.model-picker-trigger:hover {
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.055);
}

.model-picker-trigger:focus-visible {
  border-color: rgba(159, 176, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(159, 176, 255, 0.1);
  outline: none;
}

.model-picker-trigger.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.model-picker-value {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.model-picker-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 180ms var(--ease-out);
}

.model-picker-trigger[aria-expanded="true"] .model-picker-chevron {
  transform: rotate(180deg);
}

.model-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 80;
  display: flex;
  min-width: 280px;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.model-picker-panel[hidden] {
  display: none !important;
}

.model-picker-search-wrap {
  display: flex;
  min-height: 36px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.model-picker-search-wrap svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.model-picker-search {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  outline: none;
}

.model-picker-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.model-picker-group-title {
  margin: 8px 10px 4px;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-picker-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.model-picker-option:hover,
.model-picker-option.is-active {
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
}

.model-picker-option.is-selected {
  color: var(--polish-brand);
}

.model-picker-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.model-picker-check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.model-picker-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .model-picker-panel {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: 62vh;
  }
}

/* 模型分类 tabs 不换行，横向滚动无滚动条 */
#pageImageGen .imagegen-model-family-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

#pageImageGen .imagegen-model-family-tabs::-webkit-scrollbar {
  display: none;
}

#pageImageGen .imagegen-model-family-tab {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---------- 生图页：社区聚焦 ---------- */
@media (min-width: 901px) {
  .imagegen-layout {
    transition: grid-template-columns 280ms var(--ease-out);
  }

  .imagegen-layout.imagegen-feed-focus {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }
}

/* ---------- 移动端快速存卡 ---------- */
@media (max-width: 900px) {
  .app-page-warehouse .warehouse-hero--capture {
    display: flex;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    gap: 10px;
    padding: 14px 14px 10px;
  }

  .warehouse-capture-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .warehouse-capture-head h1 {
    margin-top: 5px;
    font-size: 18px;
  }

  .warehouse-capture-lede {
    font-size: 11.5px;
  }

  .warehouse-capture-meta {
    display: none;
  }

  .quick-capture {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .quick-capture-drop {
    min-height: 84px;
  }

  .quick-capture-placeholder {
    flex-direction: row;
    gap: 8px;
    text-align: left;
  }

  .quick-capture-placeholder svg {
    margin: 0;
  }

  .quick-capture-placeholder span {
    display: none;
  }

  #quickCapturePrompt {
    min-height: 72px;
    font-size: 14px;
  }

  .quick-capture-status {
    font-size: 10.5px;
  }

  .quick-capture-publish span {
    display: none;
  }

  .warehouse-capture-foot {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .warehouse-capture-tip {
    display: none;
  }
}

/* 浅色：快速存卡与模型选择器 */
[data-theme="light"] .app-page-warehouse .warehouse-hero--capture {
  background:
    radial-gradient(ellipse 46% 130% at 2% -20%, rgba(74, 94, 203, 0.07), transparent 62%),
    radial-gradient(ellipse 36% 100% at 98% 0%, rgba(15, 139, 150, 0.045), transparent 62%),
    rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .quick-capture-drop,
[data-theme="light"] #quickCapturePrompt,
[data-theme="light"] .model-picker-trigger,
[data-theme="light"] .model-picker-search-wrap {
  background: #ffffff;
}

[data-theme="light"] .model-picker-panel {
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(20, 24, 40, 0.16);
}

[data-theme="light"] .model-picker-option:hover,
[data-theme="light"] .model-picker-option.is-active {
  background: rgba(17, 18, 22, 0.06);
  color: #111216;
}

[data-theme="light"] .canvas-launch-mark {
  border-color: rgba(74, 94, 203, 0.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(74, 94, 203, 0.12), rgba(74, 94, 203, 0.02) 70%),
    #fff;
  box-shadow: 0 14px 34px rgba(20, 24, 40, 0.1), inset 0 1px 0 #fff;
}

/* 矮窗口：导航整体可滚、压缩条目，避免「图片生成」被截断 */
@media (min-width: 901px) and (max-height: 720px) {
  .app-nav {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .app-nav-menu {
    overflow: visible;
  }

  .app-nav-item {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .app-nav-head {
    padding-bottom: 10px;
  }

  .app-nav-subscribe-meta,
  .app-nav-storage-hint,
  .app-build-label {
    display: none;
  }

  .app-nav-trial-btn,
  .app-nav-subscribe-btn,
  .auth-login-btn {
    min-height: 34px;
  }
}

@media (min-width: 901px) {
  .quick-capture {
    grid-template-columns: 168px minmax(0, 1fr);
  }
}

/* 矮窗口导航：整列滚动（块级流），避免 flex 压缩导致条目互相重叠 */
@media (min-width: 901px) and (max-height: 720px) {
  .app-nav {
    display: block;
    overflow-y: auto;
  }

  .app-nav-menu {
    overflow: visible;
    flex: none;
  }

  .app-nav-footer {
    margin-top: 12px;
  }
}

/* 社区聚焦：用更高优先级压过 #pageImageGen .imagegen-layout */
@media (min-width: 901px) {
  #pageImageGen .imagegen-layout.imagegen-feed-focus {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }
}

/* 首屏短窗口：让 shell 随内容增长（默认 stretch 会被父级高度锁死） */
@media (min-width: 901px) {
  .landing-shell {
    align-self: flex-start;
  }
}

/* 生图表单永不横向滚动；社区聚焦时内部控件换行 */
#pageImageGen .imagegen-form-scroll {
  overflow-x: hidden;
}

#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-form-scroll {
  padding-left: 14px;
  padding-right: 14px;
}

#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-prompt-head,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-prompt-tools,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-ref-head,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-ref-tools,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-inspire-chips-wrap {
  flex-wrap: wrap;
  row-gap: 6px;
}

#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-params-row,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-inspire-select-row {
  grid-template-columns: minmax(0, 1fr);
}

#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-shared-params,
#pageImageGen .imagegen-layout.imagegen-feed-focus .imagegen-form-scroll > * {
  min-width: 0;
}

@media (min-width: 901px) {
  #pageImageGen .imagegen-layout.imagegen-feed-focus {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  }
}

/* 卡片库顶部：轻微内阴影，滚动时首排边缘更柔和 */
#cardsContainer {
  border-top: 1px solid var(--border);
  box-shadow: inset 0 12px 18px -18px rgba(0, 0, 0, 0.75);
}

[data-theme="light"] #cardsContainer {
  box-shadow: inset 0 12px 18px -18px rgba(17, 18, 22, 0.18);
}

/* 移动端保留「公开」文字，避免只剩一个无标签复选框 */
@media (max-width: 900px) {
  .quick-capture-publish span {
    display: inline;
  }

  .quick-capture-publish {
    font-size: 10.5px;
  }
}

/* 分类 tab 换行显示，避免窄宽度下后面的分类被藏起来 */
#pageImageGen .imagegen-model-family-tabs {
  flex-wrap: wrap;
  overflow-x: visible;
  row-gap: 6px;
}

/* ---------- 2026-10-22 UI/性能修复 ---------- */

/* 模型分类强制单行：宁可横向滚动，也不出现空荡荡的第二行 */
#pageImageGen .imagegen-model-family-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 3px;
  row-gap: 0;
  justify-content: flex-start;
  scrollbar-width: none;
}

#pageImageGen .imagegen-model-family-tabs::-webkit-scrollbar {
  display: none;
}

#pageImageGen .imagegen-model-family-tab {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 模型下拉：平铺 + 右侧积分，不再显示搜索框和分组标题 */
.model-picker-panel {
  padding: 6px;
}

.model-picker-list {
  padding: 2px;
}

.model-picker-option {
  padding: 10px 10px;
}

.model-picker-option-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.model-picker-option-tail {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.model-picker-option-price {
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-picker-option.is-selected .model-picker-option-price {
  color: var(--polish-brand);
}

/* 快速预览退出：移到右上角，缩小成胶囊，不再横在图片中间 */
.global-view-exit {
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  bottom: auto;
  left: auto;
  z-index: 460;
  padding: 8px 14px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(10, 12, 16, 0.78);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.01em;
  transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.global-view-exit::before {
  content: '✕';
  margin-right: 6px;
  font-size: 12px;
  opacity: 0.8;
}

.global-view-exit:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(20, 22, 28, 0.9);
  transform: translateY(-1px);
}

body.community-appreciate .global-view-exit,
body.global-view .global-view-exit {
  display: inline-flex;
  align-items: center;
  z-index: 460;
  animation: phExitPillIn 0.32s 0.2s var(--ease-out) both;
}

@keyframes phExitPillIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 欣赏模式的内嵌退出按钮也移到右上角，避免挡住画面 */
body.appreciate-viewing .appreciate-viewer-foot-btn--exit,
.appreciate-viewer.active .appreciate-viewer-foot-btn--exit {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  bottom: auto;
  left: auto;
  z-index: 460;
  margin: 0;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(10, 12, 16, 0.8);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

body.appreciate-viewing .appreciate-viewer-foot-btn--exit::before,
.appreciate-viewer.active .appreciate-viewer-foot-btn--exit::before {
  content: '✕';
  margin-right: 6px;
  font-size: 12px;
  opacity: 0.8;
}

/* 卡片库顶部快速存卡：向下滚动时收起，给卡片让出整屏 */
.warehouse-hero--capture {
  will-change: height, opacity;
  transition:
    height 260ms var(--ease-out),
    min-height 260ms var(--ease-out),
    flex-basis 260ms var(--ease-out),
    padding 260ms var(--ease-out),
    opacity 180ms ease,
    transform 260ms var(--ease-out),
    border-color 180ms ease;
}

.warehouse-hero--capture.warehouse-hero--collapsed {
  height: 0 !important;
  min-height: 0 !important;
  flex-basis: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom-color: transparent !important;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* 生图右侧「最近 / 获取」：单列大图 / 两列切换 */
.imagegen-feed-topbar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
}

.imagegen-feed-topbar .imagegen-feed-tabs {
  flex: 1 1 auto;
  padding: 0;
  background: transparent;
}

.imagegen-feed-cols {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 68%, transparent);
}

.imagegen-feed-cols button {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.imagegen-feed-cols button:hover {
  color: var(--text-primary);
}

.imagegen-feed-cols button.is-active {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 9%, var(--bg-card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.imagegen-feed-media {
  position: relative;
}

.imagegen-feed-retry {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.78);
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

.imagegen-feed-retry:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(24, 26, 34, 0.9);
}

.imagegen-side.imagegen-preview-open .imagegen-feed-topbar {
  grid-area: tabs;
}

.imagegen-side.imagegen-preview-open .imagegen-feed-topbar .imagegen-feed-tabs {
  grid-area: auto;
}

@media (min-width: 901px) {
  body.imagegen-feed-cols-1 #imageGenFeed.imagegen-feed.imagegen-feed--desktop-grid,
  body.imagegen-feed-cols-2 #imageGenFeed.imagegen-feed.imagegen-feed--desktop-grid {
    display: grid !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    align-items: start !important;
  }

  body.imagegen-feed-cols-1 #imageGenFeed.imagegen-feed.imagegen-feed--desktop-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.imagegen-feed-cols-2 #imageGenFeed.imagegen-feed.imagegen-feed--desktop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.imagegen-feed-cols-1 #imageGenFeed.imagegen-feed > .imagegen-feed-card,
  body.imagegen-feed-cols-2 #imageGenFeed.imagegen-feed > .imagegen-feed-card {
    width: auto !important;
    max-width: none !important;
    flex-basis: auto !important;
  }
}

@media (max-width: 900px) {
  .imagegen-feed-cols {
    display: none;
  }
}

/* 新手引导 */
.ph-tour {
  position: fixed;
  inset: 0;
  z-index: 7000;
  pointer-events: none;
}

.ph-tour[hidden] {
  display: none !important;
}

.ph-tour-spot {
  position: fixed;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(4, 6, 10, 0.7),
    0 0 0 4px color-mix(in srgb, var(--polish-brand) 32%, transparent);
  transition:
    left 240ms var(--ease-out),
    top 240ms var(--ease-out),
    width 240ms var(--ease-out),
    height 240ms var(--ease-out);
  pointer-events: none;
}

.ph-tour-card {
  position: fixed;
  box-sizing: border-box;
  padding: 18px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(18, 20, 27, 0.97);
  color: #f5f6f8;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

.ph-tour-kicker {
  margin: 0 0 8px;
  color: var(--polish-brand);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ph-tour-kicker span {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.ph-tour-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.ph-tour-body {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  line-height: 1.75;
}

.ph-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.ph-tour-skip,
.ph-tour-prev,
.ph-tour-next {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ph-tour-skip {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  padding-left: 0;
}

.ph-tour-skip:hover {
  color: rgba(255, 255, 255, 0.8);
}

.ph-tour-nav {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.ph-tour-prev {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
}

.ph-tour-next {
  border: 0;
  background: var(--polish-brand);
  color: #0b0c0f;
}

.ph-tour-prev:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.ph-tour-next:hover {
  filter: brightness(1.06);
}

.ph-tour-dots {
  display: inline-flex;
  gap: 5px;
}

.ph-tour-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.ph-tour-dots i.is-active {
  width: 16px;
  border-radius: 999px;
  background: var(--polish-brand);
}

[data-theme="light"] .ph-tour-card {
  border-color: rgba(17, 18, 22, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: #111216;
  box-shadow: 0 26px 70px rgba(20, 24, 40, 0.24);
}

[data-theme="light"] .ph-tour-body {
  color: rgba(17, 18, 22, 0.66);
}

[data-theme="light"] .ph-tour-kicker span,
[data-theme="light"] .ph-tour-skip {
  color: rgba(17, 18, 22, 0.45);
}

[data-theme="light"] .ph-tour-prev {
  border-color: rgba(17, 18, 22, 0.16);
  color: rgba(17, 18, 22, 0.72);
}

[data-theme="light"] .ph-tour-next {
  color: #fff;
}

[data-theme="light"] .ph-tour-dots i {
  background: rgba(17, 18, 22, 0.18);
}

[data-theme="light"] .global-view-exit,
[data-theme="light"] body.appreciate-viewing .appreciate-viewer-foot-btn--exit {
  background: rgba(255, 255, 255, 0.9);
  color: #111216;
  border-color: rgba(17, 18, 22, 0.2);
}

