/* Swiss Editorial Gallery Theme (Unslop Pass) for ImgHub:
   Unified 2px architectural geometry, 1px/2px gridlines, serif headlines, quiet contact-sheet chrome. */
:root {
  --font-serif: "Helvetica Neue", Helvetica, "Public Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-sans: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

html:root, html[data-theme="light"] {
  --bg-page: #fafafa;
  --bg-dot: transparent;
  --bg-grid: transparent;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-popover: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-raised: #f1f2f4;
  --bg-subcard: #f1f2f4;
  --bg-hover: #e9ebee;
  --bg-active: #e4e6eb;
  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #52525b;
  --line-strong: #18181b;
  --ink-border: #e4e4e7;
  --hairline: #e4e4e7;
  --hairline-strong: #d4d4d8;
  --glass-highlight: transparent;
  --paper-edge: #e4e4e7;
  --paper-shadow: #18181b;
  --shadow-card: none;
  --shadow-float: 0 12px 32px rgba(9, 9, 11, 0.10);
  --shadow-btn: none;
  --shadow-focus: 0 0 0 2px var(--accent-soft);
  --radius-lg: 2px;
  --radius-md: 2px;
  --radius-sm: 2px;
  --robot-body: #ffffff;
  --robot-accent: #f1f2f4;
  --robot-ink: #18181b;
  --robot-screen: #09090b;
  --robot-eye: var(--accent);
  --robot-antenna: var(--accent);
}

html:not([data-palette]), html[data-palette="blue"] {
  --accent: #c9321b;
  --accent-blue: var(--accent);
  --accent-soft: rgba(201, 50, 27, 0.08);
  --accent-contrast: #ffffff;
}
.swatch-blue { background-color: #c9321b; }

html[data-theme="dark"] {
  --bg-page: #0e0e10;
  --bg-dot: transparent;
  --bg-grid: transparent;
  --bg-card: #161619;
  --bg-card-solid: #161619;
  --bg-popover: #1b1b1f;
  --bg-sidebar: #161619;
  --bg-raised: #1e1e22;
  --bg-subcard: #1e1e22;
  --bg-hover: #27272d;
  --bg-active: #303038;
  --text-primary: #f4f4f5;
  --text-secondary: #c4c4cc;
  --text-muted: #9a9aa6;
  --line-strong: #e4e4e7;
  --ink-border: #2a2a30;
  --hairline: #2a2a30;
  --hairline-strong: #3f3f46;
  --glass-highlight: transparent;
  --paper-edge: #2a2a30;
  --paper-shadow: #09090b;
  --shadow-card: none;
  --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-btn: none;
  --shadow-focus: 0 0 0 2px var(--accent-soft);
  --robot-body: #161619;
  --robot-accent: #1e1e22;
  --robot-ink: #e4e4e7;
  --robot-screen: #09090b;
  --robot-eye: var(--accent);
  --robot-antenna: var(--accent);
}

html[data-theme="dark"]:not([data-palette]), html[data-theme="dark"][data-palette="blue"] {
  --accent: #f87171;
  --accent-soft: rgba(248, 113, 113, 0.14);
  --accent-contrast: #1b0909;
}
html[data-theme="dark"] .swatch-blue { background-color: #f87171; }

body {
  background-color: var(--bg-page);
  background-image: none;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Remove decorative AI-slop glow/sonar/orb backgrounds */
.intro-tech-orb,
.intro-tech-scan,
.intro-sonar-ring,
.intro-card-sheen {
  display: none;
}

/* Intro Splash (Swiss Editorial) */
.intro-splash {
  background: var(--bg-page);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.intro-card {
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--line-strong);
  background-color: var(--bg-card);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.intro-brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.intro-brand-sub {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.intro-stack-card,
.intro-progress-pill {
  border-radius: 2px;
}

/* Page Shell & Safe Areas */
.page-shell {
  padding: calc(18px + env(safe-area-inset-top, 0px)) calc(var(--grid-margin, 24px) + env(safe-area-inset-right, 0px)) calc(56px + env(safe-area-inset-bottom, 0px)) calc(var(--grid-margin, 24px) + env(safe-area-inset-left, 0px));
  gap: 20px;
}

/* Top Bar & Masthead */
.top-bar {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.brand-icon {
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.brand-icon img { border-radius: 0; }
.brand-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.brand-sub {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
}

/* Unified 2px Architectural Controls */
.search-input,
.tactile-btn,
.theme-btn,
.auth-trigger-btn,
.copy-btn,
.mini-act-btn,
.mini-btn,
.modal-btn,
.primary-btn,
.auth-submit,
.input,
.textarea,
.select,
.auth-input,
.float-input,
.url-input,
.storage-seg-btn,
.cat-pill {
  border-radius: 2px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

button, [role="button"], .tactile-btn, .mini-act-btn, .cat-pill, .storage-seg-btn {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.search-input,
.input,
.textarea,
.select,
.auth-input,
.float-input,
.url-input {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.search-input:focus,
.input:focus,
.textarea:focus,
.select:focus,
.auth-input:focus,
.float-input:focus,
.url-input:focus {
  border-color: var(--line-strong);
  background-color: var(--bg-card);
  box-shadow: none;
}

.tactile-btn,
.copy-btn,
.mini-act-btn,
.modal-btn:not(.modal-btn-primary) {
  background-color: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out), background-color 150ms var(--ease-out), transform 130ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tactile-btn:hover,
  .copy-btn:hover,
  .mini-act-btn:hover,
  .modal-btn:not(.modal-btn-primary):hover {
    background-color: transparent;
    border-color: var(--line-strong);
    color: var(--accent);
    transform: none;
    box-shadow: none;
  }
}
.tactile-btn:active,
.copy-btn:active,
.mini-act-btn:active,
.modal-btn:active {
  transform: scale(0.97);
}

html[data-theme] .modal-btn-primary,
.primary-btn,
.auth-submit {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid var(--accent);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  html[data-theme] .modal-btn-primary:hover {
    filter: brightness(0.94);
    transform: none;
    box-shadow: none;
  }
}

/* Surfaces, Hero & Side Cards */
.surface,
.side-card,
.content-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-card {
  border-left: 0;
  border-right: 0;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  padding: 22px 0;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.clock-widget {
  border-radius: 2px;
  border: 1px solid var(--hairline);
  background-color: var(--bg-card);
  box-shadow: none;
}

/* Double-Rule Category Bar */
.category-bar,
.private-category-bar {
  height: auto;
  min-height: 46px;
  padding: 7px 0;
  border-left: 0;
  border-right: 0;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
}
.private-category-bar::-webkit-scrollbar { display: none; }
.cat-indicator {
  top: 7px;
  border-radius: 2px;
  background-color: var(--accent);
}
.cat-pill,
.private-category-bar .cat-pill {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 15px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
}
.cat-pill.is-active,
.private-category-bar .cat-pill.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* Contact-Sheet Gallery Cards */
.content-panel {
  padding: 20px;
}
.img-card {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: none;
  transition: border-color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .img-card:hover {
    border-color: var(--line-strong);
    transform: none;
    box-shadow: none;
  }
}
.img-card.is-selected {
  border-color: var(--accent);
  box-shadow: none;
}
.img-card .img-card-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.img-card .img-icon-overlay {
  border-radius: 2px;
}
.img-card .img-icon-overlay:focus-visible { opacity: 1; }
@media (pointer: coarse) {
  .img-card .img-icon-overlay { min-width: 44px; min-height: 44px; opacity: 1; }
}
.img-badge-tl,
.img-badge-anim,
.img-check-tr,
.storage-bar-track,
.storage-bar-fill,
.upload-progress-track,
.upload-progress-fill,
.batch-bar,
.upload-drawer,
.detail-preview-box {
  border-radius: 2px;
}
.batch-bar {
  background-color: var(--bg-subcard);
  border: 1px solid var(--hairline-strong);
  box-shadow: none;
}

/* Streamlined Swiss Modals, Popovers & Toast */
.contact-modal-backdrop {
  background-color: rgba(9, 9, 11, 0.44);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: calc(20px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}
[data-theme="dark"] .contact-modal-backdrop {
  background-color: rgba(0, 0, 0, 0.65);
}
.contact-modal {
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--line-strong);
  border-radius: 2px;
  background-color: var(--bg-card);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overscroll-behavior: contain;
}
.contact-modal.is-robot-card {
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 2px;
}
.contact-modal.is-robot-card :is(.robot-buddy, .robot-paws, .robot-feet) {
  display: none;
}
.modal-title {
  font-family: var(--font-serif);
}
.modal-close {
  border-radius: 2px;
}

.appearance-popover,
.account-popover {
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background-color: var(--bg-card);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.account-bot-pill,
.account-pop-desc {
  display: none;
}
.account-pop-avatar,
.account-pop-badge,
.account-pop-list,
.account-pop-item,
.account-pop-icon,
.theme-switch-row,
.swatch-row,
.custom-color-row,
.swatch-btn,
.follow-sys-btn,
.theme-switch {
  border-radius: 2px;
}
.theme-switch-thumb { border-radius: 1px; }

.toast {
  top: calc(20px + env(safe-area-inset-top, 0px));
  padding: 8px 14px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background-color: var(--bg-card);
  color: var(--text-primary);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.toast-badge { border-radius: 2px; }
.toast-bot-head,
.toast-bot-paws,
.toast-bot-feet {
  display: none;
}

/* Editorial Footer */
.footer-card {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top: 2px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  padding: 18px 0 6px;
}

/* Private Gallery & Functional Visibility Rules (Preserved) */
#publicGalleryPanel[hidden], #privateGalleryPanel[hidden], #privacyLockedPanel[hidden], #privacyGalleryGrid[hidden] { display: none; }
#privacyLockedPanel { margin: auto; max-width: 440px; padding: 76px 16px 32px; text-align: center; color: var(--text-secondary); }
.private-lock-box { position: relative; padding: 32px 26px 24px; border-radius: 2px; background: var(--bg-card); border: 1px solid var(--hairline-strong); border-top: 2px solid var(--line-strong); }
.private-lock-box h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text-primary); }
.private-lock-box p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }
.private-robot-buddy { top: -54px; transform: translateX(-50%); opacity: 1; background: transparent; border: 0; padding: 0; }
.private-robot-buddy .robot-bubble { opacity: 1; transform: translateX(-50%) scale(1); border-radius: 2px; border: 1px solid var(--line-strong); background: var(--bg-card); box-shadow: none; }
.private-robot-paws { top: -10px; opacity: 1; width: 156px; }
.robot-buddy.is-scanning .robot-eye { transform: translateY(3px); }
.robot-buddy.is-happy .robot-eye { transform: scaleY(0.35) scaleX(1.1); }
#privacyUnlockForm { display: grid; gap: 10px; text-align: left; margin-top: 20px; }
#privacyUnlockForm label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
#privacyInviteCode { min-height: 44px; border-radius: 2px; padding: 0 14px; font-size: 14px; letter-spacing: 0.04em; }
.private-unlock-actions { display: flex; gap: 10px; margin-top: 4px; }
.private-unlock-actions button { min-height: 44px; border-radius: 2px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform 150ms var(--ease-out), filter 150ms ease, background-color 150ms ease; }
.private-unlock-submit { flex: 1; padding: 0 20px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast); }
.private-unlock-submit:active:not(:disabled) { transform: scale(0.97); }
.private-unlock-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.private-unlock-login { padding: 0 18px; border: 1px solid var(--hairline-strong); background: var(--bg-raised); color: var(--text-primary); }
.private-unlock-login:active:not(:disabled) { transform: scale(0.97); }
@media (max-width: 480px) { .private-unlock-actions { flex-direction: column; } }
#privacyUnlockStatus:empty { display: none; }

.private-category-bar[hidden], #privateStorageFilter[hidden] { display: none; }
#privacyGalleryGrid .img-card-actions { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
#privateUploadBtn { border: 1px solid var(--accent); border-radius: 2px; height: 30px; min-height: 30px; padding: 0 14px; font-size: 12px; font-weight: 600; background: var(--accent); color: var(--accent-contrast); box-shadow: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform 140ms var(--ease-out), filter 140ms ease; }
#privateUploadBtn:active { transform: scale(0.97); }
.img-fav-btn[hidden], #privacyLoginBtn[hidden], #detailDeleteBtn[hidden], #detailReAiBtn[hidden], #batchCopyUrlBtn[hidden], #batchCopyMdBtn[hidden], #batchAiTagBtn[hidden], #batchDeleteBtn[hidden], #privateUploadBtn[hidden], #uploadStorageSeg .storage-seg-btn[hidden] { display: none; }
.img-card-actions.with-download { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Typography, Focus, Mobile & Reduced Motion */
:where(h1, h2, h3, h4, .hero-title, .panel-title, .section-title) { text-wrap: balance; }
:where(p, .hero-sub, .muted-meta) { text-wrap: pretty; }
:where(.tabular, time, .clock-time, .weather-temp, .stat-value, #batchCountText) { font-variant-numeric: tabular-nums lining-nums; }
:where(button, a, summary, [role="button"], [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:where(button, a, summary, input, textarea, select):focus-visible { scroll-margin-block: 1rem; }
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
}
@media (max-width: 768px) {
  .content-panel { padding: 14px; }
}
html.keyboard-input *, html.keyboard-input *::before, html.keyboard-input *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.01ms !important; }
}

/* === Mobile-Native & Apple HIG Final Polish === */
.contact-modal,
.upload-drawer,
.site-rail-nav,
.detail-preview-box,
.account-popover,
.appearance-popover {
  overscroll-behavior: contain;
}

.category-bar,
.private-category-bar {
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

button,
[role="button"],
.cat-pill,
.mini-act-btn,
.tactile-btn,
.site-rail-item,
.rail-group-btn {
  -webkit-touch-callout: none;
}

.top-bar {
  padding-top: max(10px, env(safe-area-inset-top, 0px));
}

.toast {
  top: calc(20px + env(safe-area-inset-top, 0px));
}

.batch-bar {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.upload-drawer {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.footer-card {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.cat-pill:active,
.mini-act-btn:active,
.batch-bar button:active,
.site-rail-item:active,
.rail-group-btn:active,
.console-back-btn:active,
.account-pop-item:active {
  transform: scale(0.97);
}

:where(button, a, summary, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .batch-bar {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (pointer: coarse) {
  .tactile-btn,
  .cat-pill,
  .mini-act-btn,
  .batch-bar button,
  .console-back-btn,
  .site-rail-item,
  .rail-group-btn,
  .account-pop-item,
  .modal-btn-primary {
    min-height: 44px;
  }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* === Swiss Editorial Unified System (7-Skill Craft + 1504px) === */
:root {
  --grid-max-width: 1504px;
  --grid-margin: 32px;
}
html[data-theme="dark"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html {
  scroll-padding-block-start: 76px;
  scroll-padding-block-end: 96px;
  overflow-x: clip;
}
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-gutter: stable; }
}
.page-shell {
  max-width: 1504px;
}
@media (max-width: 1024px) {
  :root { --grid-margin: 20px; }
}
@media (max-width: 768px) {
  :root { --grid-margin: 14px; }
}
.category-bar,
.private-category-bar {
  overscroll-behavior-x: contain;
  scroll-padding-inline: 12px;
}
.footer-card.surface,
.footer-card {
  background-color: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top: 2px solid var(--line-strong);
  border-radius: 0;
  box-shadow: none;
  padding: 20px 0 calc(18px + env(safe-area-inset-bottom, 0px));
}
/* Spatial consistency: bottom-anchored Swiss toast */
.toast {
  top: auto !important;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding: 9px 18px;
  border-radius: 2px;
  background-color: var(--line-strong);
  color: var(--bg-card);
  border: 1px solid var(--line-strong);
  box-shadow: none;
  transform: translateX(-50%) translateY(14px) scale(0.96);
}
.toast.is-visible {
  transform: translateX(-50%) translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  :where(.tactile-btn, .copy-btn, .mini-act-btn, .modal-btn, .cat-pill, .img-card, .batch-bar button):hover,
  :where(.tactile-btn, .copy-btn, .mini-act-btn, .modal-btn, .cat-pill, .img-card, .batch-bar button):active {
    transform: none !important;
  }
}

/* === 5 Curated Swiss Editorial Dual-Mode Palettes === */
/* 01 瑞士朱红 (vermilion, default & legacy blue) */
html:not([data-palette]),
html[data-palette="blue"],
html[data-palette="vermilion"] {
  --bg-page: #fafafa;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-popover: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-raised: #f1f2f4;
  --bg-subcard: #f1f2f4;
  --bg-hover: #e9ebee;
  --bg-active: #e4e6eb;
  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #52525b;
  --line-strong: #18181b;
  --ink-border: #e4e4e7;
  --hairline: #e4e4e7;
  --hairline-strong: #d4d4d8;
  --paper-edge: #e4e4e7;
  --accent: #c9321b;
  --accent-blue: var(--accent);
  --accent-soft: rgba(201, 50, 27, 0.08);
  --accent-contrast: #ffffff;
}
html[data-theme="dark"]:not([data-palette]),
html[data-theme="dark"][data-palette="blue"],
html[data-theme="dark"][data-palette="vermilion"] {
  --bg-page: #0e0e10;
  --bg-card: #161619;
  --bg-card-solid: #161619;
  --bg-popover: #1b1b1f;
  --bg-sidebar: #161619;
  --bg-raised: #1e1e22;
  --bg-subcard: #1e1e22;
  --bg-hover: #27272d;
  --bg-active: #303038;
  --text-primary: #f4f4f5;
  --text-secondary: #c4c4cc;
  --text-muted: #9a9aa6;
  --line-strong: #e4e4e7;
  --ink-border: #2a2a30;
  --hairline: #2a2a30;
  --hairline-strong: #3f3f46;
  --paper-edge: #2a2a30;
  --accent: #f87171;
  --accent-blue: var(--accent);
  --accent-soft: rgba(248, 113, 113, 0.14);
  --accent-contrast: #1b0909;
}

/* 02 普鲁士蓝 (prussian) */
html[data-palette="prussian"] {
  --bg-page: #f6f8fa;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-popover: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-raised: #eaeff5;
  --bg-subcard: #eaeff5;
  --bg-hover: #dfe6ef;
  --bg-active: #d5dfec;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #52627a;
  --line-strong: #0f172a;
  --ink-border: #dce3ec;
  --hairline: #dce3ec;
  --hairline-strong: #c6d1df;
  --paper-edge: #dce3ec;
  --accent: #1d4ed8;
  --accent-blue: var(--accent);
  --accent-soft: rgba(29, 78, 216, 0.09);
  --accent-contrast: #ffffff;
}
html[data-theme="dark"][data-palette="prussian"] {
  --bg-page: #0b0f17;
  --bg-card: #131a26;
  --bg-card-solid: #131a26;
  --bg-popover: #172030;
  --bg-sidebar: #131a26;
  --bg-raised: #1b2434;
  --bg-subcard: #1b2434;
  --bg-hover: #243045;
  --bg-active: #2c3b55;
  --text-primary: #eef2f8;
  --text-secondary: #b8c4d9;
  --text-muted: #8b9bb4;
  --line-strong: #dce4f2;
  --ink-border: #243044;
  --hairline: #243044;
  --hairline-strong: #334460;
  --paper-edge: #243044;
  --accent: #60a5fa;
  --accent-blue: var(--accent);
  --accent-soft: rgba(96, 165, 250, 0.14);
  --accent-contrast: #081426;
}

/* 03 松烟墨绿 (pine) */
html[data-palette="pine"],
html[data-palette="green"] {
  --bg-page: #f5f6f4;
  --bg-card: #fbfcfa;
  --bg-card-solid: #fbfcfa;
  --bg-popover: #fbfcfa;
  --bg-sidebar: #fbfcfa;
  --bg-raised: #eaede8;
  --bg-subcard: #eaede8;
  --bg-hover: #dfe4dc;
  --bg-active: #d4dcd0;
  --text-primary: #141c18;
  --text-secondary: #39463f;
  --text-muted: #55645c;
  --line-strong: #141c18;
  --ink-border: #dce1da;
  --hairline: #dce1da;
  --hairline-strong: #c6cfc3;
  --paper-edge: #dce1da;
  --accent: #1b5e43;
  --accent-blue: var(--accent);
  --accent-soft: rgba(27, 94, 67, 0.09);
  --accent-contrast: #ffffff;
}
html[data-theme="dark"][data-palette="pine"],
html[data-theme="dark"][data-palette="green"] {
  --bg-page: #0d1210;
  --bg-card: #141c19;
  --bg-card-solid: #141c19;
  --bg-popover: #18221e;
  --bg-sidebar: #141c19;
  --bg-raised: #1c2622;
  --bg-subcard: #1c2622;
  --bg-hover: #25332d;
  --bg-active: #2f4038;
  --text-primary: #edf2ef;
  --text-secondary: #b6c4bc;
  --text-muted: #8b9c92;
  --line-strong: #dce5df;
  --ink-border: #24312b;
  --hairline: #24312b;
  --hairline-strong: #34473e;
  --paper-edge: #24312b;
  --accent: #52b788;
  --accent-blue: var(--accent);
  --accent-soft: rgba(82, 183, 136, 0.14);
  --accent-contrast: #071b12;
}

/* 04 焦糖赤陶 (terracotta) */
html[data-palette="terracotta"],
html[data-palette="orange"] {
  --bg-page: #f7f4ef;
  --bg-card: #fdfcfa;
  --bg-card-solid: #fdfcfa;
  --bg-popover: #fdfcfa;
  --bg-sidebar: #fdfcfa;
  --bg-raised: #eee8df;
  --bg-subcard: #eee8df;
  --bg-hover: #e5ddd1;
  --bg-active: #dcd2c4;
  --text-primary: #1f1b18;
  --text-secondary: #4a423b;
  --text-muted: #665c53;
  --line-strong: #1f1b18;
  --ink-border: #e2dad0;
  --hairline: #e2dad0;
  --hairline-strong: #cfc4b6;
  --paper-edge: #e2dad0;
  --accent: #9a4a24;
  --accent-blue: var(--accent);
  --accent-soft: rgba(154, 74, 36, 0.09);
  --accent-contrast: #ffffff;
}
html[data-theme="dark"][data-palette="terracotta"],
html[data-theme="dark"][data-palette="orange"] {
  --bg-page: #141210;
  --bg-card: #1c1916;
  --bg-card-solid: #1c1916;
  --bg-popover: #221e1a;
  --bg-sidebar: #1c1916;
  --bg-raised: #26221e;
  --bg-subcard: #26221e;
  --bg-hover: #302b26;
  --bg-active: #3b352f;
  --text-primary: #f0ebe4;
  --text-secondary: #bfb6aa;
  --text-muted: #988e82;
  --line-strong: #e6dfd5;
  --ink-border: #2e2924;
  --hairline: #2e2924;
  --hairline-strong: #433c35;
  --paper-edge: #2e2924;
  --accent: #dc8d5c;
  --accent-blue: var(--accent);
  --accent-soft: rgba(220, 141, 92, 0.15);
  --accent-contrast: #1e1108;
}

/* 05 勃艮第红 (burgundy) */
html[data-palette="burgundy"],
html[data-palette="purple"] {
  --bg-page: #f8f6f5;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-popover: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-raised: #efeae9;
  --bg-subcard: #efeae9;
  --bg-hover: #e5dedd;
  --bg-active: #dad2d0;
  --text-primary: #1a1416;
  --text-secondary: #473a3e;
  --text-muted: #66565b;
  --line-strong: #1a1416;
  --ink-border: #e4dcde;
  --hairline: #e4dcde;
  --hairline-strong: #cfc2c6;
  --paper-edge: #e4dcde;
  --accent: #881d36;
  --accent-blue: var(--accent);
  --accent-soft: rgba(136, 29, 54, 0.09);
  --accent-contrast: #ffffff;
}
html[data-theme="dark"][data-palette="burgundy"],
html[data-theme="dark"][data-palette="purple"] {
  --bg-page: #110e10;
  --bg-card: #1a1518;
  --bg-card-solid: #1a1518;
  --bg-popover: #201a1e;
  --bg-sidebar: #1a1518;
  --bg-raised: #241d21;
  --bg-subcard: #241d21;
  --bg-hover: #2f262b;
  --bg-active: #3a2f35;
  --text-primary: #f5eff2;
  --text-secondary: #c7b8bf;
  --text-muted: #9d8c94;
  --line-strong: #ebe0e5;
  --ink-border: #2e2429;
  --hairline: #2e2429;
  --hairline-strong: #44363d;
  --paper-edge: #2e2429;
  --accent: #e3748d;
  --accent-blue: var(--accent);
  --accent-soft: rgba(227, 116, 141, 0.15);
  --accent-contrast: #22080e;
}

/* Swatch colors for all 5 Swiss Editorial palettes */
.swatch-vermilion, .swatch-blue { background-color: #c9321b; }
.swatch-prussian { background-color: #1d4ed8; }
.swatch-pine, .swatch-green { background-color: #1b5e43; }
.swatch-terracotta, .swatch-orange { background-color: #9a4a24; }
.swatch-burgundy, .swatch-purple { background-color: #881d36; }
html[data-theme="dark"] .swatch-vermilion, html[data-theme="dark"] .swatch-blue { background-color: #f87171; }
html[data-theme="dark"] .swatch-prussian { background-color: #60a5fa; }
html[data-theme="dark"] .swatch-pine, html[data-theme="dark"] .swatch-green { background-color: #52b788; }
html[data-theme="dark"] .swatch-terracotta, html[data-theme="dark"] .swatch-orange { background-color: #dc8d5c; }
html[data-theme="dark"] .swatch-burgundy, html[data-theme="dark"] .swatch-purple { background-color: #e3748d; }

/* === Swiss International Typographic Style: 12-Column Contact Sheet Grid & Flat Modular System === */
:root {
  --font-sans: "Helvetica Neue", Helvetica, "Public Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-serif: "Helvetica Neue", Helvetica, "Public Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-display: "Helvetica Neue", Helvetica, "Public Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --shadow-card: none;
  --ease-swiss: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Pure flat zero-shadow, zero-gradient, zero-glass enforcement */
:where(.surface, .top-bar, .hero-card, .category-bar, .content-panel, .img-card, .footer-card, .popover, .modal-card, .clock-widget, .tactile-btn, .cat-pill, .mini-act-btn, .side-card, .account-hero-card) {
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-image: none !important;
  border-radius: 2px !important;
}

/* Flush-left Helvetica typography */
body,
:where(h1, h2, h3, h4, .hero-title, .brand-title, .img-card-title, .footer-title) {
  font-family: var(--font-sans) !important;
  text-align: left;
}

/* Top Nav Bar: Flat 2px architectural bottom rule */
.top-bar {
  background-color: var(--bg-card) !important;
  border-bottom: 2px solid var(--line-strong, var(--text-primary)) !important;
}

/* 12-Column Asymmetric Hero Section (8-col headline + 4-col geometric utility) */
.hero-card {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 28px !important;
  align-items: end !important;
  padding: 36px 32px !important;
  background-color: var(--bg-card) !important;
  border: 1px solid var(--hairline) !important;
  border-top: 3px solid var(--line-strong, var(--text-primary)) !important;
}
.hero-card > div:first-child {
  grid-column: span 8 !important;
  min-width: 0;
}
.hero-card > .clock-widget {
  grid-column: span 4 !important;
  justify-self: stretch !important;
  max-width: none !important;
  border: none !important;
  border-left: 1px solid var(--line-strong, var(--text-primary)) !important;
  padding: 4px 0 4px 28px !important;
  background: transparent !important;
}
.hero-title {
  font-size: clamp(30px, 3.4vw, 44px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.035em !important;
  margin: 0 0 12px 0 !important;
}

/* Category Bar: Flat Swiss Rule Strip */
.category-bar {
  background-color: var(--bg-card) !important;
  border: none !important;
  border-top: 2px solid var(--line-strong, var(--text-primary)) !important;
  border-bottom: 1px solid var(--line-strong, var(--text-primary)) !important;
}
.cat-pill.is-active {
  background-color: var(--accent) !important;
  color: var(--accent-contrast, #ffffff) !important;
}

/* 12-Column Modular Contact Sheet Gallery Grid (supports 3/2/1-col masonry wrapper + direct cards) */
.gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
}
.gallery-grid > .masonry-col {
  grid-column: span 4 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gallery-grid > .img-card {
  grid-column: span 4 !important;
}
.gallery-grid .img-card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--hairline) !important;
  transition: border-color 140ms var(--ease-swiss), transform 120ms var(--ease-swiss) !important;
}
.gallery-grid .img-card.is-selected {
  border: 2px solid var(--accent) !important;
}
.img-card-actions {
  gap: 5px !important;
}
.img-card-actions.with-download {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr) !important;
}
.img-card-actions .mini-act-btn {
  padding: 0 5px !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (hover: hover) and (pointer: fine) {
  .gallery-grid .img-card:hover {
    border-color: var(--line-strong, var(--text-primary)) !important;
  }
}
:where(.tactile-btn, .cat-pill, .mini-act-btn, .copy-btn):active {
  transform: scale(0.97);
}

/* Footer: Flat Swiss Colophon */
.footer-card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--hairline) !important;
  border-top: 2px solid var(--line-strong, var(--text-primary)) !important;
  padding: 24px 32px !important;
}

@media (max-width: 900px) {
  .gallery-grid > .masonry-col,
  .gallery-grid > .img-card {
    grid-column: span 6 !important;
  }
}
@media (max-width: 820px) {
  .hero-card {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 24px 18px !important;
  }
  .hero-card > div:first-child,
  .hero-card > .clock-widget {
    grid-column: 1 / -1 !important;
    border-left: none !important;
    padding-left: 0 !important;
  }
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .gallery-grid > .masonry-col,
  .gallery-grid > .img-card {
    grid-column: span 2 !important;
  }
}
@media (max-width: 560px) {
  .gallery-grid > .masonry-col,
  .gallery-grid > .img-card {
    grid-column: 1 / -1 !important;
  }
}

/* === Swiss International Typographic Style: Architectural Splash === */
.page-shell {
  transition: opacity 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)), transform 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.page-shell.is-expand-prep {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  pointer-events: none;
}
.intro-splash.swiss-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  background-color: var(--bg-page) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  cursor: pointer;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)), transform 280ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.intro-splash.swiss-splash.is-leaving {
  opacity: 0;
  transform: translate3d(0, -28px, 0);
  pointer-events: none;
}
.swiss-splash-grid-bg {
  position: absolute;
  inset: 0;
  max-width: 1504px;
  margin-inline: auto;
  padding-inline: 32px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  pointer-events: none;
  opacity: 0.42;
}
.swiss-splash-grid-bg > span {
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  height: 100%;
}
.swiss-splash-frame {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--line-strong);
  border-radius: 2px;
  padding: clamp(24px, 3.6vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  animation: swissSplashIn 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 20ms forwards;
}
@keyframes swissSplashIn {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.swiss-splash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.swiss-splash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.swiss-splash-square {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  flex-shrink: 0;
}
.swiss-splash-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.swiss-splash-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}
.swiss-splash-main {
  grid-column: span 8;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
}
.swiss-splash-display {
  font-family: var(--font-sans);
  font-size: clamp(40px, 6.8vw, 80px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  animation: swissSplashIn 280ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 60ms forwards;
}
.swiss-splash-dot {
  color: var(--accent);
}
.swiss-splash-edition {
  font-family: var(--font-sans);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: swissSplashIn 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 120ms forwards;
}
.swiss-splash-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  animation: swissSplashIn 240ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 170ms forwards;
}
.swiss-splash-aside {
  grid-column: span 4;
  min-width: 0;
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.swiss-splash-block {
  background-color: var(--accent);
  color: var(--accent-contrast, #ffffff);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: swissSplashIn 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 110ms forwards;
}
.swiss-splash-block-k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.swiss-splash-block-v {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.swiss-splash-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.swiss-splash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.swiss-splash-item:last-child { border-bottom: none; }
.swiss-splash-item.is-lit {
  color: var(--text-primary);
  font-weight: 700;
}
.swiss-splash-item.is-lit > span:first-child {
  color: var(--accent);
}
.swiss-splash-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}
.swiss-splash-track {
  width: 100%;
  height: 3px;
  background-color: var(--hairline);
  overflow: hidden;
}
.swiss-splash-track > span {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  transform-origin: left center;
  transform: scaleX(0.02);
  animation: swissRuleSweep 760ms linear 60ms forwards;
}
@keyframes swissRuleSweep {
  to { transform: scaleX(1); }
}
.swiss-splash-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .swiss-splash-grid-bg {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-inline: 16px;
    gap: 12px;
  }
  .swiss-splash-grid-bg > span:nth-child(n+5) { display: none; }
  .swiss-splash-body {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
  .swiss-splash-main,
  .swiss-splash-aside {
    grid-column: 1 / -1;
  }
  .swiss-splash-aside {
    border-left: none;
    border-top: 1px solid var(--line-strong);
    padding-left: 0;
    padding-top: 18px;
  }
  .swiss-splash-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-splash.swiss-splash,
  .intro-splash.swiss-splash.is-leaving,
  .page-shell,
  .page-shell.is-expand-prep {
    transform: none !important;
  }
  .swiss-splash-frame,
  .swiss-splash-display,
  .swiss-splash-edition,
  .swiss-splash-sub,
  .swiss-splash-block {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .swiss-splash-track > span {
    transform: scaleX(1) !important;
    animation: none !important;
  }
}

/* === Swiss Quick Look Lightbox & Collapsible Inspector (Umbra-Blog Logic, Swiss Flat Theme) === */
.ql-backdrop {
  padding: 16px !important;
  background-color: rgba(9, 9, 11, 0.72) !important;
}
[data-theme="dark"] .ql-backdrop {
  background-color: rgba(0, 0, 0, 0.82) !important;
}
.contact-modal.is-detail-modal.swiss-ql {
  width: min(1240px, calc(100vw - 32px)) !important;
  max-width: min(1240px, calc(100vw - 32px)) !important;
  height: min(92dvh, 900px) !important;
  max-height: 92dvh !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: var(--bg-card) !important;
  border: 1px solid var(--line-strong) !important;
  border-top: 3px solid var(--line-strong) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
.swiss-ql.is-fullscreen .ql-bar {
  display: none !important;
}
.ql-exit-fs {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ql-exit-fs[hidden] { display: none !important; }
.ql-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line-strong);
}
.ql-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ql-close-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background-color: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.ql-close-btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.ql-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ql-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ql-index {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 2px;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline-strong);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.ql-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ql-seg-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 2px;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline-strong);
}
.ql-seg-group button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.ql-seg-group button[hidden] { display: none !important; }
.ql-seg-group button:hover:not(:disabled) {
  background-color: var(--bg-card);
  border-color: var(--hairline-strong);
  color: var(--text-primary);
}
.ql-seg-group button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.ql-seg-group button.is-active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.ql-seg-group button.ql-seg-danger:hover:not(:disabled) {
  color: var(--danger);
  border-color: var(--danger);
}
.ql-zoom-val {
  min-width: 48px;
}
.ql-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.ql-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 2px;
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.ql-tool-btn[hidden] { display: none !important; }
.ql-tool-btn:hover {
  border-color: var(--line-strong);
  color: var(--text-primary);
}
.ql-tool-btn.is-active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.ql-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}
.ql-workspace.has-inspector {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.ql-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: var(--bg-page);
}
.ql-coverflow {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ql-switch-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}
.ql-switch-bar::after {
  content: "";
  display: block;
  width: 34%;
  height: 100%;
  background-color: var(--accent);
  animation: qlSwitchSweep 820ms linear infinite;
}
@keyframes qlSwitchSweep {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(320%, 0, 0); }
}
.ql-canvas {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px 68px 46px;
  cursor: zoom-in;
  touch-action: pan-y;
}
.ql-canvas.is-zoomed {
  overflow: auto;
  overscroll-behavior: contain;
  cursor: zoom-out;
}
.swiss-ql.is-fullscreen .ql-canvas {
  padding: 24px 72px 54px;
}
.ql-zoom {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center center;
  transition: transform 200ms var(--ease-out);
}
.ql-media-slot {
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: 100%;
}
.ql-media-slot.is-slide-next {
  animation: qlSlideNext 240ms var(--ease-out) both;
}
.ql-media-slot.is-slide-prev {
  animation: qlSlidePrev 240ms var(--ease-out) both;
}
.ql-media-slot.is-slide-fade {
  animation: qlSlideFade 180ms var(--ease-out) both;
}
@keyframes qlSlideNext {
  from { opacity: 0; transform: translate3d(36px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes qlSlidePrev {
  from { opacity: 0; transform: translate3d(-36px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes qlSlideFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ql-stage-img,
.ql-stage-video {
  display: block;
  max-width: 100%;
  max-height: calc(92dvh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background-color: var(--bg-card);
}
.ql-stage-img[hidden],
.ql-stage-video[hidden] {
  display: none !important;
}
.swiss-ql.is-fullscreen .ql-stage-img,
.swiss-ql.is-fullscreen .ql-stage-video {
  max-height: calc(92dvh - 88px);
}
.ql-ghost {
  position: absolute;
  top: 50%;
  width: min(240px, 22vw);
  height: min(220px, 42dvh);
  padding: 0;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-card);
  opacity: 0.36;
  z-index: 2;
  cursor: pointer;
  transform: translate3d(0, -50%, 0);
  transition: transform 220ms var(--ease-out), opacity 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.ql-ghost[hidden] { display: none !important; }
.ql-ghost.is-prev { left: -6%; }
.ql-ghost.is-next { right: -6%; }
@media (hover: hover) and (pointer: fine) {
  .ql-ghost.is-prev:hover:not(:disabled) {
    opacity: 0.85;
    border-color: var(--accent);
    transform: translate3d(14px, -50%, 0);
  }
  .ql-ghost.is-next:hover:not(:disabled) {
    opacity: 0.85;
    border-color: var(--accent);
    transform: translate3d(-14px, -50%, 0);
  }
}
.ql-ghost-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ql-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 2px;
  background-color: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.ql-nav-arrow.is-prev { left: 16px; }
.ql-nav-arrow.is-next { right: 16px; }
.ql-nav-arrow:hover:not(:disabled) {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.ql-nav-arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.ql-hud {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 5px 12px;
  border-radius: 2px;
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swiss-ql.is-fullscreen .ql-hud {
  bottom: 16px;
}
.ql-hud-warn {
  color: var(--accent);
  font-weight: 700;
}
.ql-hud-badge {
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  background-color: var(--accent);
  color: var(--accent-contrast);
}
.ql-hud-keys {
  color: var(--text-muted);
}
.ql-filmstrip {
  position: relative;
  z-index: 6;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--line-strong);
  overflow-x: auto;
  flex-shrink: 0;
}
.ql-filmstrip[hidden] { display: none !important; }
.ql-thumb {
  width: 64px;
  height: 44px;
  padding: 2px;
  border-radius: 2px;
  border: 1px solid var(--hairline-strong);
  background-color: var(--bg-raised);
  overflow: hidden;
  opacity: 0.58;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.ql-thumb:hover:not(:disabled) {
  opacity: 0.92;
  border-color: var(--line-strong);
}
.ql-thumb.is-active {
  opacity: 1;
  border: 2px solid var(--accent);
}
.ql-thumb:disabled {
  cursor: not-allowed;
}
.ql-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ql-inspector {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 22px;
  border-left: 1px solid var(--line-strong);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ql-inspector[hidden] { display: none !important; }
.ql-meta-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 2px;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline);
}
.ql-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.ql-meta-row > span {
  color: var(--text-muted);
  flex-shrink: 0;
}
.ql-meta-row > strong {
  min-width: 0;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ql-copy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ql-copy-grid .copy-btn {
  width: 100%;
  padding: 0 4px;
  font-size: 11px;
}
.ql-edit-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 2px;
  background-color: var(--bg-subcard);
  border: 1px solid var(--hairline);
}
.ql-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}
.ql-check-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}
.ql-check-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.ql-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.ql-form-actions button {
  height: 32px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
}
.ql-form-danger {
  padding-top: 2px;
}
.ql-tags-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.ql-tags-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.ql-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
@media (max-width: 860px) {
  .ql-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
  }
  .ql-center {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
  }
  .ql-workspace.has-inspector {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 48%) minmax(0, 1fr);
  }
  .ql-inspector {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }
  .ql-canvas {
    padding: 14px 16px 46px;
  }
  .ql-ghost,
  .ql-hud-keys {
    display: none !important;
  }
  .ql-filmstrip {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .ql-backdrop {
    padding: 0 !important;
  }
  .contact-modal.is-detail-modal.swiss-ql {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ql-media-slot,
  .ql-zoom,
  .ql-ghost,
  .ql-switch-bar::after {
    animation: none !important;
    transition: none !important;
  }
}
