/* src/styles.css */
/* src/styles/tokens.css */
:root {
  color-scheme: light;

  --ds-canvas: #faf9f5;
  --ds-surface-soft: #f5f0e8;
  --ds-surface-card: #efe9de;
  --ds-surface-cream-strong: #e8e0d2;
  --ds-surface-dark: #181715;
  --ds-surface-dark-elevated: #252320;
  --ds-surface-dark-soft: #1f1e1b;
  --ds-ink: #141413;
  --ds-body: #3d3d3a;
  --ds-body-strong: #252523;
  --ds-muted: #6c6a64;
  --ds-muted-soft: #8e8b82;
  --ds-hairline: #e6dfd8;
  --ds-hairline-soft: #ebe6df;
  --ds-primary: #cc785c;
  --ds-primary-active: #a9583e;
  --ds-primary-text: #8f472f;
  --ds-primary-disabled: #e6dfd8;
  --ds-on-primary: #ffffff;
  --ds-on-dark: #faf9f5;
  --ds-on-dark-soft: #c9c2b8;
  --ds-accent-teal: #5db8a6;
  --ds-accent-amber: #e8a55a;
  --ds-success: #5db872;
  --ds-warning: #d4a017;
  --ds-error: #c64545;
  --ds-focus: #0a72ef;

  --ds-font-display: "Tiempos Headline", "Iowan Old Style", Georgia, "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "华文宋体", "SimSun", serif;
  --ds-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --ds-radius-xs: 4px;
  --ds-radius-sm: 6px;
  --ds-radius-md: 8px;
  --ds-radius-lg: 12px;
  --ds-radius-xl: 16px;
  --ds-radius-pill: 9999px;

  --ds-space-2xs: 4px;
  --ds-space-xs: 8px;
  --ds-space-sm: 12px;
  --ds-space-md: 16px;
  --ds-space-lg: 24px;
  --ds-space-xl: 32px;
  --ds-space-2xl: 48px;
  --ds-space-section: 96px;

  --ds-shadow-hairline: 0 0 0 1px rgba(20, 20, 19, 0.08);
  --ds-shadow-card: 0 0 0 1px rgba(20, 20, 19, 0.08), 0 18px 50px rgba(36, 30, 22, 0.08);
  --ds-shadow-dark: 0 0 0 1px rgba(250, 249, 245, 0.08), 0 24px 70px rgba(0, 0, 0, 0.28);


  font-family: var(--ds-font-body);
}

/* src/styles/base.css */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { background: var(--ds-canvas); color: var(--ds-ink); }
body { margin: 0; min-height: 100vh; line-height: 1.6; color: var(--ds-body); font-family: var(--ds-font-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; }
a:focus-visible, .button:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--ds-focus); outline-color: var(--ds-primary); outline-offset: 3px; box-shadow: 0 0 0 5px rgba(204, 120, 92, 0.25); border-radius: 4px; transition: box-shadow 0.2s ease-out; }

.skip-link { position: absolute; left: 1rem; top: 0.75rem; transform: translateY(-160%); background: var(--ds-ink); color: var(--ds-on-dark); padding: 0.6rem 0.9rem; border-radius: var(--ds-radius-pill); z-index: 10; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
code { background: rgba(20, 20, 19, 0.08); border-radius: var(--ds-radius-md); padding: 0.08rem 0.28rem; font-family: var(--ds-font-mono); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* src/styles/layout.css */
.site-header { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 0.85rem clamp(1rem, 4vw, 4rem); background: var(--ds-canvas); border-bottom: 1px solid var(--ds-hairline); will-change: transform; transform: translate3d(0, 0, 0); backface-visibility: hidden; -webkit-backface-visibility: hidden; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; }
.site-header * { -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 850; text-decoration: none; letter-spacing: -0.02em; color: var(--ds-ink); }
.brand-mark { width: 2.25rem; height: 2.25rem; border: 1px solid rgba(20, 20, 19, 0.12); border-radius: 0.72rem; display: inline-grid; place-items: center; background: var(--ds-surface-card); box-shadow: var(--ds-shadow-hairline); overflow: hidden; flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.main-nav, .language-switcher, .site-footer nav { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.main-nav { justify-content: center; color: var(--ds-muted); font-size: 0.95rem; flex: 1 1 28rem; min-width: min(100%, 16rem); flex-wrap: wrap; }
.main-nav a { padding: 0.22rem 0; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
.main-nav a[href*="#"] { color: var(--ds-body); }
.main-nav a[href*="#"]:hover { color: var(--ds-ink); }
.main-nav a, .language-switcher a, .site-footer a { text-decoration: none; }
.main-nav a:hover, .site-footer a:hover { color: var(--ds-ink); }
.main-nav a[aria-current="page"] { color: var(--ds-ink); font-weight: 750; text-decoration: underline; }
.language-switcher { justify-content: flex-end; white-space: nowrap; border-left: 1px solid var(--ds-hairline); padding-left: 0.9rem; font-size: 0.92rem; }
.language-dropdown { position: relative; display: inline-block; }
.language-dropdown-trigger { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.85rem; border: 1px solid var(--ds-hairline); border-radius: var(--ds-radius-pill); background: var(--ds-surface-card); color: var(--ds-ink); font-size: 0.88rem; font-weight: 550; cursor: pointer; box-shadow: var(--ds-shadow-hairline); transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; user-select: none; font-family: inherit; }
.language-dropdown-trigger:hover { background: var(--ds-surface-cream-strong); border-color: rgba(20, 20, 19, 0.22); transform: translateY(-1px); }
.language-switch-icon { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.language-dropdown-trigger .chevron-icon { opacity: 0.55; transition: transform 180ms ease; display: inline-block; }
.language-dropdown:hover .chevron-icon,
.language-dropdown:focus-within .chevron-icon { transform: rotate(180deg); }
.language-dropdown-menu { position: absolute; top: calc(100% + 0.5rem); right: 0; min-width: 8rem; padding: 0.35rem; background: var(--ds-surface-card); border: 1px solid var(--ds-hairline); border-radius: 0.8rem; box-shadow: 0 10px 25px -5px rgba(20, 20, 19, 0.08), 0 4px 12px -3px rgba(20, 20, 19, 0.03), var(--ds-shadow-hairline); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97); transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; gap: 0.15rem; z-index: 100; }
.language-dropdown:hover .language-dropdown-menu,
.language-dropdown:focus-within .language-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.language-dropdown-item { display: block; padding: 0.5rem 0.8rem; color: var(--ds-body); font-size: 0.86rem; font-weight: 550; text-decoration: none; border-radius: 0.5rem; transition: all 120ms ease; text-align: left; white-space: nowrap; }
.language-dropdown-item:hover { background: rgba(20, 20, 19, 0.05); color: var(--ds-ink); }
.language-dropdown-item.active { background: var(--ds-ink); color: var(--ds-canvas); font-weight: 650; }
@media (prefers-color-scheme: dark) {
  .language-dropdown-menu { background: var(--ds-surface-card); border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 4px 12px -3px rgba(0, 0, 0, 0.2); }
  .language-dropdown-item:hover { background: rgba(255, 255, 255, 0.06); }
  .language-dropdown-item.active { background: #f3f4f6; color: #0f1115; }
}

main { padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem); }
.page-heading { max-width: 780px; margin: 0 auto 2rem; }
.page-heading h1 { max-width: min(100%, 12.5em); }
.policy-layout { max-width: 920px; margin: 0 auto; display: grid; gap: 1rem; }
.support-callout { max-width: 920px; margin: 1rem auto 0; }
.site-footer { border-top: 1px solid var(--ds-hairline); padding: 2rem clamp(1rem, 4vw, 4rem); color: var(--ds-muted); }
.site-footer p { margin-top: 0; color: var(--ds-ink); font-weight: 700; }

@media (max-width: 860px) {
  .site-header { align-items: start; position: static; }
  .main-nav { justify-content: flex-start; }
  .language-switcher { justify-content: flex-start; width: fit-content; }
  main { padding-inline: 1rem; }
}

@media (max-width: 520px) {
  main { padding-inline: 0.75rem; }
  .main-nav, .language-switcher, .site-footer nav { gap: 0.65rem; }
}

/* src/styles/primitives.css */
.overline, .review-status, .updated { color: var(--ds-primary-text); font-weight: 780; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; }
h1 { font-family: var(--ds-font-display); color: var(--ds-ink); font-size: clamp(2.8rem, 7vw, 6.5rem); font-weight: 400; line-height: 0.98; letter-spacing: -0.055em; max-width: min(100%, 12.5em); margin: 0.15em 0; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
.hero-body, .page-heading > p { max-width: 66ch; color: var(--ds-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); text-wrap: pretty; }
.cta-row { display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; margin-top: 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  max-width: 100%;
  padding: 0.8rem 1.1rem;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-ink);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
  box-shadow: var(--ds-shadow-hairline);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 20, 19, 0.08);
}
.button:active {
  transform: translateY(1px);
}
.button-primary { background: var(--ds-primary); color: var(--ds-ink); border-color: var(--ds-primary); }
.button-primary:hover { background: var(--ds-primary-active); color: var(--ds-on-primary); border-color: var(--ds-primary-active); }
.button-secondary { background: var(--ds-surface-soft); color: var(--ds-ink); }
.button-disabled { background: var(--ds-primary-disabled); color: var(--ds-body); cursor: default; }
.button-disabled:hover { transform: none; box-shadow: var(--ds-shadow-hairline); }
.cta-note { color: var(--ds-muted); font-size: 0.95rem; max-width: min(44rem, 100%); overflow-wrap: normal; word-break: normal; text-wrap: pretty; }

.policy-section, .support-callout { background: rgba(245, 240, 232, 0.78); border: 1px solid var(--ds-hairline); border-radius: var(--ds-radius-xl); padding: clamp(1.2rem, 3vw, 2rem); }
.policy-section h2, .support-callout h2 { margin-top: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.1; letter-spacing: -0.03em; }
.policy-section p { color: var(--ds-muted); }
.admin-shell { font-family: var(--ds-font-body); }
.admin-shell h1 { max-width: 18ch; font-family: var(--ds-font-body); font-weight: 650; line-height: 1.08; letter-spacing: -0.035em; }
.admin-shell .admin-boundary-strip h1 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
.editorial-note h3, .process-step h3 { margin-top: 0; font-size: 1.35rem; line-height: 1.15; }

.admin-search-form input {
  width: 100%;
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-lg);
  background: #ffffff;
  padding: 0.7rem 0.8rem;
  color: var(--ds-ink);
}
.admin-search-form button, .admin-currency-toggle button {
  border: 1px solid var(--ds-ink);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-soft);
  color: var(--ds-ink);
  font-weight: 850;
  padding: 0.65rem 0.95rem;
  box-shadow: var(--ds-shadow-hairline);
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  min-width: 0;
  max-width: 100%;
}
.admin-search-form button:hover, .admin-currency-toggle button[aria-pressed="true"] { background: var(--ds-primary); color: var(--ds-ink); border-color: var(--ds-primary); }
.admin-search-form button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

details { background: var(--ds-surface-soft); border: 1px solid var(--ds-hairline); border-radius: 18px; padding: 1rem 1.1rem; }
summary { cursor: pointer; font-weight: 850; }
details p { color: var(--ds-muted); }
.admin-pill { display: inline-flex; align-items: center; border-radius: var(--ds-radius-pill); border: 1px solid var(--ds-hairline); padding: 0.2rem 0.55rem; color: var(--ds-muted); background: #ffffff; font-size: 0.84rem; font-weight: 800; }
.admin-pill-completed, .admin-pill-active { color: #255f43; background: #eef7f1; border-color: rgba(93, 184, 114, 0.58); }
.admin-pill-failed, .admin-pill-generation-banned { color: #913a2a; background: #fff0ed; border-color: rgba(198, 69, 69, 0.46); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--ds-hairline); padding: 0.75rem; text-align: left; vertical-align: top; }
.admin-table th { color: var(--ds-muted); font-size: 0.9rem; }

/* src/styles/public.css */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.98fr);
  align-items: center;
  gap: clamp(2.2rem, 6vw, 5.8rem);
  min-height: min(760px, 72vh);
  max-width: 1240px;
  margin: 0 auto;
}
.hero-copy { min-width: 0; }
.hero h1 { max-width: min(100%, 12.5em); }
.hero-body { max-width: 60ch; }
html[lang="zh-CN"] .hero-body { max-width: 52ch; }
html[lang="ja-JP"] .hero-body { max-width: 52ch; }
html[lang="ko-KR"] .hero-body { max-width: 52ch; }
html[lang="ko-KR"] p {
  word-break: keep-all;
  text-wrap: pretty;
}
html[lang="ja-JP"] p {
  word-break: normal;
  text-wrap: pretty;
}
.hero-visual { display: grid; place-items: center; min-width: 0; }
.product-surface, .product-surface-dark {
  background: linear-gradient(145deg, var(--ds-surface-dark), var(--ds-surface-dark-soft));
  color: var(--ds-on-dark);
  border: 1px solid rgba(250, 249, 245, 0.12);
  border-radius: 32px;
  box-shadow: var(--ds-shadow-dark);
}
.artifact-surface {
  width: min(100%, 560px);
  padding: clamp(1rem, 3vw, 1.55rem);
  display: grid;
  gap: 1rem;
}
.artifact-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; color: var(--ds-on-dark-soft); font-size: 0.86rem; }
.artifact-topline strong { color: var(--ds-on-dark); font-weight: 800; }
.artifact-board { display: grid; grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.08fr); align-items: stretch; gap: 0.8rem; min-height: 270px; }
.rough-note, .explainer-sheet { min-width: 0; border: 1px solid rgba(250, 249, 245, 0.12); border-radius: 24px; background: var(--ds-surface-dark-elevated); padding: 1rem; }
.rough-note { display: grid; align-content: start; gap: 0.75rem; transform: rotate(-1.3deg); }
.rough-note ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.rough-note li { position: relative; color: var(--ds-on-dark-soft); font-size: 0.9rem; line-height: 1.35; padding-left: 1rem; }
.rough-note li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; border-top: 2px solid rgba(204, 120, 92, 0.7); transform: rotate(-7deg); }
.artifact-label { margin: 0; color: var(--ds-on-dark); font-family: var(--ds-font-mono); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.annotation-rail { display: grid; place-items: center; align-self: center; gap: 0.25rem; color: var(--ds-primary); }
.annotation-pin {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-primary);
  box-shadow: 0 0 0 6px rgba(204, 120, 92, 0.14);
  animation: pin-pulse 2s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(204, 120, 92, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(204, 120, 92, 0.28); }
}
.annotation-line { width: 1px; min-height: 94px; background: linear-gradient(to bottom, rgba(204, 120, 92, 0), rgba(204, 120, 92, 0.8), rgba(204, 120, 92, 0)); }
.annotation-arrow { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--ds-radius-pill); background: rgba(204, 120, 92, 0.14); border: 1px solid rgba(204, 120, 92, 0.4); font-weight: 900; }
.annotation-rail small { writing-mode: vertical-rl; color: var(--ds-on-dark-soft); font-size: 0.72rem; }
.explainer-sheet { background: #f8f2e8; color: var(--ds-ink); display: grid; gap: 0.85rem; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.08); }
.explainer-sheet .artifact-label { color: var(--ds-muted); }
.sheet-diagram { position: relative; min-height: 150px; border: 1px solid rgba(20, 20, 19, 0.12); border-radius: 20px; background: repeating-linear-gradient(0deg, rgba(20, 20, 19, 0.045), rgba(20, 20, 19, 0.045) 1px, transparent 1px, transparent 22px); overflow: hidden; }
.diagram-node { position: absolute; width: 3.3rem; height: 2.6rem; border: 2px solid var(--ds-ink); border-radius: 46% 54% 48% 52%; background: rgba(250, 249, 245, 0.9); }
.diagram-node.primary { width: 4rem; height: 3.2rem; left: 14%; top: 22%; background: rgba(204, 120, 92, 0.2); }
.diagram-node:not(.primary):nth-of-type(2) { right: 12%; top: 15%; }
.diagram-node:not(.primary):nth-of-type(3) { right: 22%; bottom: 16%; }
.diagram-link { position: absolute; height: 2px; background: var(--ds-ink); transform-origin: left center; opacity: 0.75; }
.diagram-link.one { width: 39%; left: 34%; top: 39%; transform: rotate(-14deg); }
.diagram-link.two { width: 34%; left: 40%; top: 56%; transform: rotate(18deg); }
.sheet-labels { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.sheet-labels span { border: 1px solid rgba(20, 20, 19, 0.12); border-radius: var(--ds-radius-pill); padding: 0.28rem 0.52rem; color: var(--ds-muted); font-size: 0.78rem; }
.review-chip { margin: 0; width: fit-content; border: 1px solid rgba(250, 249, 245, 0.14); border-radius: var(--ds-radius-pill); padding: 0.45rem 0.7rem; color: var(--ds-on-dark); background: rgba(250, 249, 245, 0.08); font-size: 0.88rem; }
.review-chip span { margin-right: 0.38rem; color: var(--ds-primary); }

.product-showcase-surface {
  width: min(100%, 680px);
  padding: clamp(0.42rem, 1.6vw, 0.72rem);
}
.showcase-carousel {
  position: relative;
  aspect-ratio: 1320 / 742;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(250, 249, 245, 0.12);
  background: #f7f4ef;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.04);
  isolation: isolate;
}
.showcase-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: none;
  animation: showcase-frame-cycle 12s ease-in-out infinite;
}
.showcase-frame.is-primary { opacity: 1; }
.showcase-frame:nth-child(2) { animation-delay: 6s; }
.showcase-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes showcase-frame-cycle {
  0%, 42% { opacity: 1; transform: scale(1); }
  50%, 92% { opacity: 0; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-frame { animation: none; opacity: 0; transform: none; }
  .showcase-frame.is-primary { opacity: 1; }
}

.landing-section { margin: clamp(3.6rem, 9vw, 7.5rem) auto; max-width: 1160px; }
.section-copy { max-width: 760px; }
.section-copy.centered { margin-inline: auto; text-align: center; }
.section-copy h2, .closing-panel h2 { font-family: var(--ds-font-display); color: var(--ds-ink); font-size: clamp(2rem, 4vw, 4rem); font-weight: 400; line-height: 1; letter-spacing: -0.045em; margin: 0.2em 0; text-wrap: balance; }
.section-copy p, .closing-panel p { color: var(--ds-muted); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.contrast-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  margin-top: 1.5rem;
  border-block: 1px solid var(--ds-hairline);
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.before-after-visual {
  width: min(100%, 760px);
  margin: clamp(1.1rem, 3vw, 1.8rem) auto 0;
  border: 1px solid var(--ds-hairline);
  border-radius: 28px;
  overflow: hidden;
  background: var(--ds-surface-soft);
  box-shadow: 0 18px 44px rgba(36, 30, 22, 0.08);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.before-after-visual:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 24px 50px rgba(36, 30, 22, 0.14);
  border-color: var(--ds-primary);
}
.before-after-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.before-after-visual:hover img {
  transform: scale(1.02);
}
.contrast-panel {
  padding: clamp(1.2rem, 3vw, 2rem);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.proof-before:hover {
  background-color: var(--ds-surface-soft);
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 12px 36px rgba(36, 30, 22, 0.04);
  z-index: 2;
}
.proof-after:hover {
  background-color: #201e1a;
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  z-index: 2;
}
.proof-annotation {
  display: grid;
  place-items: center;
  width: clamp(3rem, 6vw, 5rem);
  color: var(--ds-primary);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-family: var(--ds-font-display);
  border-inline: 1px solid var(--ds-hairline);
  transition: color 0.3s ease, background-color 0.3s ease;
}
.contrast-story:hover .proof-annotation {
  color: var(--ds-primary-active);
}
.proof-after { background: var(--ds-surface-dark); color: var(--ds-on-dark); }
.proof-after h3 { color: var(--ds-on-dark); }
.proof-after li { color: var(--ds-on-dark-soft); }
.proof-before { background: transparent; }
.contrast-panel h3 { font-size: 1.45rem; margin-top: 0; }
.contrast-panel ul { padding-left: 1.2rem; margin-bottom: 0; }
.editorial-note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 2rem; border-block: 1px solid var(--ds-hairline); }
.editorial-note {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-right: 1px solid var(--ds-hairline);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}
.editorial-note:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(36, 30, 22, 0.08);
  background-color: var(--ds-surface-soft);
  z-index: 1;
}
.editorial-note:last-child { border-right: 0; }
.editorial-note h3 { margin: 0 0 0.55rem; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.03em; }
.editorial-note p { margin: 0; color: var(--ds-muted); }
.example-kicker { display: inline-flex; color: var(--ds-primary-text); font-family: var(--ds-font-mono); font-size: 0.76rem; font-weight: 900; margin-bottom: 0.9rem; }
.use-case-examples .editorial-note { background: linear-gradient(180deg, rgba(250, 249, 245, 0), rgba(239, 233, 222, 0.52)); }
.editorial-note-visual { margin: 0 0 1rem; border: 1px solid rgba(20, 20, 19, 0.1); overflow: hidden; background: var(--ds-surface-soft); box-shadow: 0 14px 32px rgba(36, 30, 22, 0.06); }
.editorial-note-visual img { display: block; width: 100%; height: auto; object-fit: cover; }
.example-visual { aspect-ratio: 3 / 2; border-radius: 22px; }
.example-visual img { aspect-ratio: 3 / 2; object-fit: cover; }
.trust-boundary-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(340px, 1fr);
  gap: clamp(1.4rem, 4vw, 3.4rem);
  align-items: start;
  border-block: 1px solid var(--ds-hairline);
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
  padding-block: clamp(1.25rem, 3vw, 2.1rem);
}
.trust-boundary-intro { max-width: 620px; }
.trust-boundary-intro h2 { font-size: clamp(2rem, 3.8vw, 3.45rem); }
.trust-boundary-links { display: flex; flex-wrap: wrap; gap: 0.55rem 0.85rem; margin-top: 1.1rem; }
.trust-boundary-links a { color: var(--ds-primary-text); font-weight: 820; text-decoration: underline; text-decoration-color: rgba(204, 120, 92, 0.32); text-underline-offset: 0.18em; }
.trust-boundary-links a:hover, .trust-boundary-links a:focus-visible { color: var(--ds-ink); text-decoration-color: var(--ds-primary); }
.trust-boundary-list { display: grid; gap: 0; border-left: 1px solid var(--ds-hairline); }
.trust-boundary-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(0.8rem, 2vw, 1.05rem);
  align-items: start;
  padding: clamp(0.95rem, 2vw, 1.25rem) 0 clamp(0.95rem, 2vw, 1.25rem) clamp(1rem, 2.6vw, 1.45rem);
  border-bottom: 1px solid var(--ds-hairline);
}
.trust-boundary-row:first-child { padding-top: 0.1rem; }
.trust-boundary-row:last-child { border-bottom: 0; padding-bottom: 0.1rem; }
.trust-boundary-glyph {
  width: clamp(2.35rem, 4vw, 2.75rem);
  aspect-ratio: 1;
  margin: 0.1rem 0 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fbf7ef;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.04);
}
.trust-boundary-glyph img { display: block; width: 100%; height: 100%; object-fit: contain; }
.trust-boundary-copy { min-width: 0; }
.trust-boundary-label {
  display: inline-flex;
  margin-bottom: 0.34rem;
  color: var(--ds-primary-text);
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trust-boundary-row h3 { margin: 0 0 0.28rem; font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.18; letter-spacing: -0.02em; }
.trust-boundary-row p { margin: 0; max-width: 54ch; color: var(--ds-muted); }
.storyboard-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 1.25rem; border-block: 1px solid var(--ds-hairline); }
.storyboard-frame {
  position: relative;
  background: transparent;
  border-right: 1px solid var(--ds-hairline);
  border-radius: 0;
  padding: 1rem;
  display: grid;
  align-content: start;
  min-height: 300px;
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.storyboard-frame:hover {
  background-color: var(--ds-surface-soft);
}
.storyboard-frame:last-child { border-right: 0; }
.storyboard-visual {
  margin: 0 0 1rem;
  border: 1px solid rgba(20, 20, 19, 0.1);
  border-radius: 20px;
  overflow: hidden;
  background: var(--ds-surface-soft);
  box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.03), 0 14px 32px rgba(36, 30, 22, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}
.storyboard-frame:hover .storyboard-visual {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(20, 20, 19, 0.03), 0 20px 40px rgba(36, 30, 22, 0.12);
}
.storyboard-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.storyboard-frame:hover .storyboard-visual img {
  transform: scale(1.03);
}
.process-number { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--ds-radius-pill); border: 1px solid rgba(204, 120, 92, 0.38); background: rgba(204, 120, 92, 0.12); color: var(--ds-primary-text); font-weight: 900; margin-bottom: 1rem; box-shadow: none; }
.proof-section { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr); gap: 1.25rem; align-items: center; }
.proof-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.proof-stack article { min-height: 170px; border: 1px dashed var(--ds-hairline); border-radius: 28px; background: rgba(245, 240, 232, 0.8); padding: 1rem; display: grid; align-content: end; gap: 0.4rem; }
.proof-stack span { width: 48px; height: 48px; border-radius: 45% 55% 58% 42%; background: var(--ds-accent-teal); border: 1px solid var(--ds-ink); display: block; }
.proof-stack small { color: var(--ds-muted); }
.faq-section { margin-top: clamp(2.8rem, 7vw, 5.5rem); }
.faq-list { max-width: 760px; margin: 1.25rem auto 0; display: grid; gap: 0.6rem; }
.faq-list details {
  background: transparent;
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-lg);
  padding: 0.85rem 1rem;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-list details:hover {
  border-color: var(--ds-primary);
  background-color: var(--ds-surface-soft);
}
.faq-list details summary {
  cursor: pointer;
  font-weight: 850;
  outline: none;
  transition: color 0.2s ease;
}
.faq-list details summary:hover {
  color: var(--ds-primary);
}
.faq-list details p {
  margin-top: 0.8rem;
  margin-bottom: 0;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-list details[open] p {
  opacity: 1;
  transform: translateY(0);
}
.closing-panel { max-width: 980px; margin: clamp(3rem, 8vw, 7rem) auto 1rem; border-block: 1px solid var(--ds-hairline); background: transparent; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.closing-panel .cta-row { justify-content: flex-start; }
.closing-panel p { max-width: 70ch; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { place-items: stretch; }
  .trust-boundary-panel { grid-template-columns: 1fr; }
  .trust-boundary-list { border-left: 0; border-top: 1px solid var(--ds-hairline); }
  .trust-boundary-row { padding-left: 0; }
  .trust-boundary-row:first-child { padding-top: clamp(0.95rem, 2vw, 1.25rem); }
  .trust-boundary-row:last-child { padding-bottom: 0; }
}

@media (max-width: 820px) {
  h1 { font-size: clamp(2.5rem, 15vw, 4.2rem); }
  .editorial-note-grid { grid-template-columns: 1fr; }
  .contrast-story, .proof-section, .proof-stack { grid-template-columns: 1fr; }
  .storyboard-rail { grid-template-columns: 1fr 1fr; }
  .proof-annotation { width: 100%; min-height: 3rem; border-inline: 0; border-block: 1px solid var(--ds-hairline); }
  .storyboard-frame, .editorial-note { border-right: 0; border-bottom: 1px solid var(--ds-hairline); }
  .storyboard-frame { min-height: auto; }
  .storyboard-frame:nth-child(2n + 1) { border-right: 1px solid var(--ds-hairline); }
  .storyboard-frame:nth-last-child(-n + 2) { border-bottom: 0; }
  .editorial-note:last-child { border-bottom: 0; }
  .section-copy.centered { text-align: left; }
}

@media (max-width: 620px) {
  .artifact-board { grid-template-columns: 1fr; }
  .before-after-visual { border-radius: 24px; }
  .annotation-rail { grid-template-columns: auto 1fr auto; justify-content: stretch; }
  .annotation-line { width: auto; height: 1px; min-height: 0; background: linear-gradient(to right, rgba(204, 120, 92, 0), rgba(204, 120, 92, 0.8), rgba(204, 120, 92, 0)); }
  .annotation-rail small { writing-mode: horizontal-tb; grid-column: 1 / -1; justify-self: center; }
}

@media (max-width: 560px) {
  .hero { gap: 1.6rem; }
  .hero h1 { max-width: min(100%, 9.8em); overflow-wrap: normal; word-break: normal; }
  .cta-row { align-items: stretch; }
  .cta-row .button { width: 100%; }
  .artifact-surface { border-radius: 24px; }
  .artifact-topline { align-items: flex-start; flex-direction: column; }
  .storyboard-rail { grid-template-columns: 1fr; }
  .storyboard-frame, .storyboard-frame:nth-child(2n + 1) { border-right: 0; }
  .storyboard-frame:nth-last-child(2) { border-bottom: 1px solid var(--ds-hairline); }
  .trust-boundary-row { grid-template-columns: auto minmax(0, 1fr); gap: 0.72rem; }
  .trust-boundary-glyph { width: 2.15rem; border-radius: 12px; }
}

.legal-hero { max-width: 980px; border-bottom: 1px solid var(--ds-hairline); padding-bottom: clamp(1.2rem, 3vw, 2rem); }
.legal-hero h1 { max-width: min(100%, 12.5em); }
.legal-hero-task-hub h1, .legal-hero-choice-desk h1 { max-width: min(100%, 11em); }
.legal-hero .review-status { display: inline-flex; margin-bottom: 0.75rem; border: 1px solid rgba(204, 120, 92, 0.22); border-radius: var(--ds-radius-pill); background: rgba(204, 120, 92, 0.08); padding: 0.32rem 0.56rem; }
.legal-reading-shell { max-width: 980px; margin: 0 auto; display: grid; gap: 1.2rem; }
.legal-section-nav { border-block: 1px solid var(--ds-hairline); padding: 1rem 0; }
.legal-section-nav > span { display: block; color: var(--ds-primary-text); font-size: 0.78rem; font-weight: 820; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.75rem; }
.legal-section-nav > div { display: flex; flex-wrap: wrap; gap: 0.55rem 0.9rem; }
.legal-section-nav a { color: var(--ds-muted); padding: 0.25rem 0; text-decoration: underline; text-decoration-color: transparent; font-weight: 750; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
.legal-section-nav a:hover, .legal-section-nav a:focus-visible { color: var(--ds-ink); text-decoration-color: var(--ds-primary); }
.legal-reading { max-width: none; gap: 0; }
.legal-reading-task-hub .legal-reading, .legal-reading-choice-desk .legal-reading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--ds-hairline); }
.legal-reading-reading .legal-reading { display: grid; }
.policy-section { position: relative; scroll-margin-top: 6.5rem; border-width: 0 0 1px; border-radius: 0; background: transparent; padding: clamp(1.3rem, 3.2vw, 2.1rem) 0; }
.legal-reading-task-hub .policy-section, .legal-reading-choice-desk .policy-section { display: grid; align-content: start; gap: 0.75rem; min-height: 16rem; border-right: 1px solid var(--ds-hairline); padding: clamp(1.1rem, 3vw, 1.8rem); }
.legal-reading-task-hub .policy-section:nth-child(2n), .legal-reading-choice-desk .policy-section:nth-child(2n) { border-right: 0; }
.legal-reading-task-hub .policy-section:nth-last-child(-n + 2), .legal-reading-choice-desk .policy-section:nth-last-child(-n + 2) { border-bottom: 0; }
.policy-section:target { border-color: rgba(204, 120, 92, 0.5); box-shadow: inset 4px 0 0 rgba(204, 120, 92, 0.42); padding-left: clamp(1.3rem, 3.2vw, 2.1rem); }
.legal-reading-task-hub .policy-section:target, .legal-reading-choice-desk .policy-section:target { padding-left: clamp(1.1rem, 3vw, 1.8rem); }
.policy-section-heading { display: grid; gap: 0.65rem; }
.section-index { margin: 0; color: var(--ds-primary-text); font-family: var(--ds-font-mono); font-size: 0.78rem; font-weight: 800; }
.policy-section h2 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.08; letter-spacing: -0.035em; }
.policy-section p { margin: 0; color: var(--ds-muted); }
.policy-section-reading { background: transparent; }
.policy-section-choice, .policy-section-purchases, .policy-section-account-deletion, .policy-section-privacy-questions { background: linear-gradient(180deg, rgba(250, 249, 245, 0), rgba(245, 240, 232, 0.58)); }
.policy-section-contact { background: var(--ds-surface-dark); color: var(--ds-on-dark); border: 1px solid rgba(250, 249, 245, 0.12); border-radius: 24px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--ds-shadow-dark); }
.legal-reading-task-hub .policy-section-contact { grid-column: 1 / -1; min-height: auto; border-radius: 28px 28px 0 0; }
.policy-section-contact h2 { color: var(--ds-on-dark); }
.policy-section-contact p, .policy-section-contact .section-index { color: var(--ds-on-dark-soft); }
.policy-section-contact a { color: var(--ds-on-dark); }
.policy-section-icon { margin: 0; width: clamp(4.8rem, 12vw, 6.8rem); aspect-ratio: 1; border: 1px solid rgba(20, 20, 19, 0.1); border-radius: 24px; display: grid; place-items: center; background: #fbf7ef; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.03), 0 14px 32px rgba(36, 30, 22, 0.06); }
.policy-section-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.policy-section-contact .policy-section-icon { background: rgba(250, 249, 245, 0.92); border-color: rgba(250, 249, 245, 0.16); }
.mail-link, .external-link, .legal-mail-link { font-weight: 800; color: var(--ds-ink); overflow-wrap: anywhere; word-break: break-word; }
.section-action-link { align-self: end; justify-self: start; color: var(--ds-ink); font-weight: 850; text-decoration: underline; text-decoration-color: rgba(204, 120, 92, 0.5); text-underline-offset: 0.22em; }
.section-action-link:hover, .section-action-link:focus-visible { color: var(--ds-primary-active); text-decoration-color: currentColor; }
.policy-section-contact .section-action-link { color: var(--ds-on-dark); }
.legal-support-panel { max-width: 980px; margin: clamp(2.5rem, 6vw, 5rem) auto 1rem; border-block: 1px solid var(--ds-hairline); padding: clamp(1.4rem, 4vw, 2.5rem) 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; }
.legal-support-panel h2 { font-family: var(--ds-font-display); color: var(--ds-ink); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1; letter-spacing: -0.045em; margin: 0.2em 0; }
.legal-support-panel p { color: var(--ds-muted); }
.legal-action-links { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: flex-start; align-items: center; }
.legal-mail-link { display: inline-flex; width: 100%; justify-content: flex-start; color: var(--ds-muted); text-decoration: none; }
.legal-mail-link:hover, .mail-link:hover, .external-link:hover { color: var(--ds-primary-active); }

@media (max-width: 860px) {
  .policy-section { scroll-margin-top: 1rem; }
  .legal-reading-task-hub .legal-reading, .legal-reading-choice-desk .legal-reading { grid-template-columns: 1fr; }
  .legal-reading-task-hub .policy-section, .legal-reading-choice-desk .policy-section { border-right: 0; }
  .legal-reading-task-hub .policy-section:nth-last-child(2), .legal-reading-choice-desk .policy-section:nth-last-child(2) { border-bottom: 1px solid var(--ds-hairline); }
  .legal-support-panel { grid-template-columns: 1fr; }
  .legal-action-links { justify-content: flex-start; }
  .legal-mail-link { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .legal-hero h1 { max-width: min(100%, 9.8em); overflow-wrap: normal; word-break: normal; }
  .legal-section-nav > div, .legal-action-links { flex-direction: column; align-items: stretch; }
  .legal-action-links .button { width: 100%; }
}

/* ==========================================================================
   Pure CSS Scroll-Triggered Stagger Entrance Animations (Zero-JS AOS)
   ========================================================================== */

/* 1. Precise Entrance Keyframes with Smooth Ease-Out Transforms */
@keyframes cl-fade-up-in {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cl-fade-left-in {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cl-fade-right-in {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 2. Base AOS Declarations (100% matched with AOS.css core parameters) */
[data-aos] {
  pointer-events: none;
  transition-property: transform, opacity !important;
  transition-duration: 600ms !important;
  transition-timing-function: ease-out !important;
  will-change: transform, opacity;
}

[data-aos].aos-animate {
  pointer-events: auto;
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

/* 3. Specific Entrance Positions (fade-up offset matching AOS default 100px) */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translate3d(0, 48px, 0);
}

[data-aos="fade-left"] {
  opacity: 0;
  transform: translate3d(48px, 0, 0);
}

[data-aos="fade-right"] {
  opacity: 0;
  transform: translate3d(-48px, 0, 0);
}

/* 4. Cascade Delay offsets for stagger entries once triggered (transition delays) */
[data-aos][data-aos][data-aos-delay="50"] { transition-delay: 50ms !important; }
[data-aos][data-aos][data-aos-delay="80"] { transition-delay: 80ms !important; }
[data-aos][data-aos][data-aos-delay="100"] { transition-delay: 100ms !important; }
[data-aos][data-aos][data-aos-delay="150"] { transition-delay: 150ms !important; }
[data-aos][data-aos][data-aos-delay="160"] { transition-delay: 160ms !important; }
[data-aos][data-aos][data-aos-delay="200"] { transition-delay: 200ms !important; }
[data-aos][data-aos][data-aos-delay="240"] { transition-delay: 240ms !important; }
[data-aos][data-aos][data-aos-delay="250"] { transition-delay: 250ms !important; }

/* 5. Accessibility Rules */
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto;
  }
}

/* 6. Fallback overrides for JS-disabled or no-js states */
.no-js [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  pointer-events: auto;
}

/* src/styles/admin.css */
.admin-shell { max-width: 1120px; margin: 0 auto; }
.admin-shell h1 { max-width: 18ch; }
.admin-workspace { display: block; }
.admin-main-column { min-width: 0; display: grid; gap: 0.85rem; }
.admin-boundary-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr); gap: clamp(0.85rem, 2.6vw, 1.4rem); align-items: end; margin-top: 0; }
.admin-boundary-copy { min-width: 0; }
.admin-topline { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; align-content: end; }
.admin-topline span { border: 1px solid rgba(204, 120, 92, 0.24); border-radius: var(--ds-radius-pill); background: rgba(204, 120, 92, 0.08); color: var(--ds-primary-text); padding: 0.34rem 0.62rem; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; text-wrap: balance; }
.admin-intro { max-width: 680px; color: var(--ds-muted); font-size: clamp(0.98rem, 1.3vw, 1.08rem); }
.admin-runtime-status-shell { margin-top: 1rem; }
.admin-internal-runtime-status[hidden] { display: none !important; }
.admin-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 1.1rem 0; }
.admin-status-grid.compact { margin: 0.9rem 0 0; }
.admin-diagnostics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-status-note, .admin-panel { background: var(--ds-surface-soft); border: 1px solid var(--ds-hairline); border-radius: 22px; padding: clamp(0.9rem, 1.8vw, 1.35rem); }
.admin-status-note { min-width: 0; }
.admin-status-note h2, .admin-panel h2 { margin-top: 0; font-size: clamp(1.05rem, 1.6vw, 1.28rem); line-height: 1.15; }
.admin-status-note p, .admin-panel li { color: var(--ds-muted); overflow-wrap: break-word; }
.admin-status-note.admin-product-surface { display: grid; align-content: start; gap: 0.42rem; border-color: rgba(250, 249, 245, 0.1); }
.admin-status-note.admin-product-surface p { color: var(--ds-on-dark-soft); }
.admin-status-note.admin-product-surface h2, .admin-status-note.admin-product-surface code { color: var(--ds-on-dark); }
.admin-card-kicker { margin: 0; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-panel { margin-top: 0; scroll-margin-top: 6rem; }
.admin-anchor-target { scroll-margin-top: 6rem; }
.admin-case-state-card { border-color: rgba(204, 120, 92, 0.22); background: rgba(204, 120, 92, 0.06); }
.admin-dossier-placeholder { border-style: dashed; background: rgba(250, 249, 245, 0.62); }
.admin-dossier-placeholder[hidden], .admin-case-sections[hidden] { display: none; }
.admin-diagnostics-details { background: var(--ds-surface-dark); color: var(--ds-on-dark); border-color: rgba(250, 249, 245, 0.1); box-shadow: var(--ds-shadow-dark); }
.admin-diagnostics-details summary { cursor: pointer; color: var(--ds-on-dark); font-weight: 900; }
.admin-diagnostics-details .admin-muted { color: var(--ds-on-dark-soft); }
.admin-panel ul { padding-left: 1.2rem; }
.admin-muted { color: var(--ds-muted); }
.admin-empty-guide { display: grid; gap: 0.35rem; }
.admin-empty-guide strong, .admin-empty-state strong { display: block; }
.admin-empty-guide span, .admin-empty-state span { display: block; color: var(--ds-muted); }
.admin-empty-guide small { color: var(--ds-muted); overflow-wrap: break-word; }
.admin-empty-state { display: grid; gap: 0.3rem; }
.admin-state-block { display: grid; gap: 0.55rem; border: 1px solid rgba(204, 120, 92, 0.18); border-radius: 18px; background: rgba(204, 120, 92, 0.07); padding: 0.9rem; min-width: 0; }
.admin-state-block > span { color: var(--ds-muted); overflow-wrap: break-word; }
.admin-state-heading { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.admin-state-heading strong { color: var(--ds-ink); }
.admin-state-loading { border-color: var(--ds-warning); background: rgba(204, 120, 92, 0.06); }
.admin-state-matched { border-color: var(--ds-success); background: rgba(91, 141, 116, 0.08); }
.admin-state-disabled, .admin-state-unavailable { border-color: var(--ds-warning); background: rgba(20, 20, 19, 0.045); }
.admin-state-block.admin-state-blocked { border-color: var(--ds-error); background: rgba(198, 69, 69, 0.08); }
.admin-panel-state { display: grid; gap: 0.75rem; min-width: 0; }
.admin-panel-state-header { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: space-between; align-items: center; }
.admin-panel-state-header strong { font-size: 0.98rem; letter-spacing: -0.01em; }
.admin-panel-reason { margin: 0; color: var(--ds-muted); line-height: 1.45; overflow-wrap: break-word; }
.admin-case-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; min-width: 0; }
.admin-case-detail-card { border: 1px solid var(--ds-hairline); border-radius: 18px; background: rgba(250, 249, 245, 0.62); padding: 0.85rem; min-width: 0; }
.admin-case-detail-card h3 { margin: 0 0 0.65rem; font-size: 0.98rem; letter-spacing: -0.01em; }
.admin-case-detail-wide { grid-column: 1 / -1; }
.admin-grant-card { border-color: rgba(91, 141, 116, 0.32); background: rgba(91, 141, 116, 0.08); }
.admin-grant-card-header { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: start; }
.admin-grant-card-header .overline { margin: 0 0 0.25rem; }
.admin-grant-form { margin-top: 0.75rem; border: 1px solid rgba(91, 141, 116, 0.24); border-radius: 16px; background: rgba(250, 249, 245, 0.58); padding: 0.75rem; }
.admin-grant-kind-field { border: 1px solid rgba(91, 141, 116, 0.24); border-radius: 14px; background: rgba(255, 255, 255, 0.55); padding: 0.7rem; display: grid; gap: 0.45rem; min-width: 0; }
.admin-grant-kind-field legend { padding: 0 0.25rem; color: var(--ds-muted); font-size: 0.82rem; font-weight: 900; }
.admin-grant-kind-field label { display: flex; align-items: center; gap: 0.45rem; font-weight: 850; }
.admin-grant-kind-field input[type="radio"] { width: auto; }
.admin-grant-expiry-field[hidden] { display: none; }
.admin-search-form select { width: 100%; border: 1px solid var(--ds-hairline); border-radius: var(--ds-radius-lg); background: #ffffff; padding: 0.7rem 0.8rem; color: var(--ds-ink); }
.admin-lookup-panel { display: grid; grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.admin-lookup-panel > div { min-width: 0; }
.admin-case-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.85rem; }
.admin-wide-panel { grid-column: 1 / -1; }
.admin-ops-details summary { cursor: pointer; font-weight: 900; }
.admin-ops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.admin-lookup-stack { display: grid; gap: 0.75rem; min-width: 0; }
.admin-search-form { display: grid; gap: 0.75rem; }
.admin-search-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); align-items: end; min-width: 0; }
.admin-search-form label { display: grid; gap: 0.35rem; font-weight: 800; min-width: 0; }
.admin-search-form label:first-child { grid-column: span 2; }
.admin-primary-search { border: 1px solid rgba(204, 120, 92, 0.22); border-radius: 18px; background: rgba(204, 120, 92, 0.06); padding: 0.85rem; }
.admin-secondary-search { border: 1px dashed var(--ds-hairline); border-radius: 16px; background: rgba(250, 249, 245, 0.55); padding: 0.75rem; }
.admin-field-help { color: var(--ds-muted); font-size: 0.84rem; font-weight: 650; line-height: 1.35; }
.admin-advanced-lookup { border: 1px dashed var(--ds-hairline); border-radius: 18px; padding: 0.85rem; background: rgba(250, 249, 245, 0.55); }
.admin-locked-surface { display: grid; gap: 0.3rem; color: var(--ds-muted); }
.admin-locked-surface strong { color: var(--ds-ink); }
.admin-advanced-lookup summary { cursor: pointer; font-weight: 900; }
.admin-advanced-lookup .admin-search-form { margin-top: 0.75rem; grid-template-columns: minmax(min(100%, 18rem), 1fr) auto; }
.admin-advanced-lookup .admin-search-form label:first-child { grid-column: auto; }
.admin-alert { border: 1px solid rgba(204, 120, 92, 0.28); border-radius: 18px; background: rgba(204, 120, 92, 0.08); padding: 1rem; display: grid; gap: 0.25rem; }
.admin-alert-error { border-color: var(--ds-error); background: rgba(198, 69, 69, 0.08); }
.admin-alert small { color: var(--ds-muted); }
.admin-inline-link { display: inline-flex; align-items: center; width: fit-content; border-radius: var(--ds-radius-pill); border: 1px solid var(--ds-hairline); padding: 0.28rem 0.55rem; color: var(--ds-primary-text); background: rgba(204, 120, 92, 0.08); font-weight: 850; text-decoration: none; }
.admin-inline-link:hover, .admin-inline-link:focus-visible { border-color: var(--ds-primary-text); background: rgba(204, 120, 92, 0.14); }
.admin-kv-list { display: grid; gap: 0.55rem; margin: 0; }
.admin-kv-list div { display: grid; grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr); gap: 0.75rem; border-bottom: 1px solid rgba(230, 223, 216, 0.75); padding-bottom: 0.5rem; }
.admin-kv-list dt { color: var(--ds-muted); font-weight: 750; }
.admin-kv-list dd { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.admin-currency-toggle { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-audit-list { display: grid; gap: 0.9rem; padding-left: 1.2rem; }
.admin-audit-list li { background: rgba(250, 249, 245, 0.6); border: 1px solid var(--ds-hairline); border-radius: 18px; padding: 1rem; }
.admin-audit-list header { display: flex; gap: 0.75rem; justify-content: space-between; align-items: center; }
.admin-safe-summary { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; background: rgba(20, 20, 19, 0.06); border-radius: var(--ds-radius-lg); padding: 0.75rem; font-family: var(--ds-font-mono); }
.admin-product-surface { background: var(--ds-surface-dark); color: var(--ds-on-dark); border-radius: var(--ds-radius-xl); box-shadow: var(--ds-shadow-dark); }

@media (max-width: 1100px) {
  .admin-status-grid.compact, .admin-diagnostics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .admin-boundary-strip { grid-template-columns: 1fr; }
  .admin-topline { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .admin-status-grid, .admin-status-grid.compact, .admin-diagnostics-grid, .admin-case-sections, .admin-case-detail-grid, .admin-search-form, .admin-lookup-panel, .admin-ops-grid { grid-template-columns: 1fr; }
  .admin-search-form label:first-child { grid-column: auto; }
  .admin-kv-list div { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .admin-shell .admin-boundary-strip h1 { font-size: clamp(2.1rem, 10vw, 2.9rem); letter-spacing: -0.055em; }
  .admin-intro { font-size: 0.98rem; }
  .admin-status-note, .admin-panel { border-radius: 18px; padding: 0.85rem; }
  .admin-search-form input, .admin-search-form select { min-width: 0; }
  .admin-search-form button { width: 100%; min-width: 0; }
  .admin-advanced-lookup .admin-search-form { grid-template-columns: 1fr; }
  .admin-table { min-width: 640px; }
}

/* -------------------------------------------------------------
 * Sketchion 管理后台 (Support Admin Console) 额外重构样式
 * ------------------------------------------------------------- */

/* 隐藏公共头尾与原有测试用 layout 结构 */
.admin-body .site-header,
.admin-body .site-footer,
.admin-english-test-wrapper {
  display: none !important;
}

/* 全屏布局框架 */
.admin-body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #faf9f5;
  font-family: var(--ds-font-body), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
}

.admin-shell-zh {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部导航栏 (金黄色调) */
.admin-topbar {
  height: 64px;
  background-color: #ffd64a; /* 主体亮金黄色 */
  border-bottom: 1px solid #e6bf39;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  z-index: 50;
  box-sizing: border-box;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand-logo {
  color: #2c2b29;
  display: flex;
  align-items: center;
}

.admin-topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c2b29;
  letter-spacing: -0.01em;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-icon-btn {
  background: none;
  border: none;
  color: #2c2b29;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.admin-ticket-alert-button-zh {
  position: relative;
}

.admin-topbar-ticket-dot-zh,
.admin-nav-ticket-reminder-zh {
  align-items: center;
  background: #dc2626;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 0 5px;
}

.admin-topbar-ticket-dot-zh {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
}

.admin-nav-ticket-reminder-zh {
  margin-left: auto;
}

.admin-icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.admin-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  background-color: #2c2b29;
  color: #ffd64a;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.admin-username {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2c2b29;
}

/* 工作空间 */
.admin-workspace-zh {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
  overflow: hidden;
  box-sizing: border-box;
}

/* 左侧导航栏 */
.admin-navigation-bar-zh {
  width: 72px;
  background-color: #fffdf5; /* 极轻米黄白色 */
  border-right: 1px solid #ebdcb9;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px 0;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: width 0.18s ease;
}

.admin-shell-zh:not(.admin-nav-collapsed-zh) .admin-nav-ticket-reminder-zh {
  margin-left: 4px;
}

.admin-nav-collapse-toggle-zh {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 4px;
  margin: 0 8px 8px;
  padding: 7px 8px;
}

.admin-nav-collapse-toggle-zh:hover {
  background: #fef9c3;
  color: #111827;
}

.admin-nav-collapsed-zh .admin-navigation-bar-zh {
  width: 72px;
}

.admin-shell-zh:not(.admin-nav-collapsed-zh) .admin-navigation-bar-zh {
  width: 184px;
}

.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-item,
.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-collapse-toggle-zh {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-item > span:not(.admin-nav-ticket-reminder-zh),
.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-collapse-toggle-zh span {
  display: none;
}

.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-ticket-reminder-zh {
  margin-left: 0 !important;
  position: absolute;
  right: 6px;
  top: 4px;
}

.admin-nav-collapsed-zh .admin-navigation-bar-zh .admin-nav-collapse-toggle-zh svg {
  transform: rotate(180deg);
}

.admin-nav-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 8px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.admin-nav-item svg {
  color: #6b7280;
  transition: color 0.2s;
}

.admin-nav-item:hover {
  background-color: #fef9c3; /* 浅淡黄 */
  color: #1f2937;
}

.admin-nav-item:hover svg {
  color: #1f2937;
}

.admin-nav-item.active {
  background-color: #fef08a; /* 激活明黄 */
  color: #111827;
}

.admin-nav-item.active svg {
  color: #111827;
}

.admin-nav-footer {
  margin-top: auto;
  padding: 0 8px;
}

.admin-logout-btn {
  color: #9ca3af;
}

.admin-logout-btn:hover {
  background-color: #fee2e2; /* 浅红警告 */
  color: #991b1b;
}

.admin-logout-btn:hover svg {
  color: #991b1b;
}

/* 右侧主内容区 */
.admin-main-content-zh {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* 卡片 */
.admin-card-zh {
  background: #ffffff;
  border: 1px solid #ebdcb9;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 24px;
  box-sizing: border-box;
}

.admin-card-zh h2 {
  margin: 0 0 16px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  border-bottom: 2px solid #fef08a;
  padding-bottom: 8px;
  display: inline-block;
}

/* 一行双列的 Flex/Grid */
.admin-row-top-zh,
.admin-row-middle-zh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-row-top-zh,
  .admin-row-middle-zh {
    grid-template-columns: 1fr;
  }
}

/* 支持查询表单 */
.admin-search-form-zh {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-form-group-zh {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-group-zh label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4b5563;
}

.admin-form-group-zh input,
.admin-form-group-zh select,
.admin-modal-card input,
.admin-modal-card select {
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  outline: none;
  background-color: #faf9f5;
  transition: all 0.2s;
  box-sizing: border-box;
}

.admin-form-group-zh input:focus,
.admin-form-group-zh select:focus,
.admin-modal-card input:focus,
.admin-modal-card select:focus {
  border-color: #ffd64a;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 214, 74, 0.22);
}

/* 按钮样式 */
.admin-btn-primary-zh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ffd64a;
  color: #1f2937;
  font-weight: 700;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-btn-primary-zh:hover {
  background-color: #fcd34d;
}

.admin-btn-primary-zh:active {
  transform: translateY(1px);
}

.btn-icon {
  margin-right: 4px;
}

/* 数据填充占位与空白引导 */
.admin-empty-state-zh {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: #9ca3af;
  text-align: center;
}

/* 表单与状态块 */
.admin-state-block-zh {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 0.85rem;
}

/* 键值对渲染列表 */
.admin-kv-list {
  display: grid;
  gap: 8px;
}

.admin-kv-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #ebdcb9;
  padding-bottom: 6px;
  font-size: 0.88rem;
}

.admin-kv-list dt {
  color: #6b7280;
  font-weight: 600;
}

.admin-kv-list dd {
  margin: 0;
  font-weight: 700;
  color: #111827;
}

/* 查询摘要卡片特有布局 */
.summary-details-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-avatar-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-user-avatar {
  width: 48px;
  height: 48px;
  background-color: #fffbeb;
  border: 1px solid #ebdcb9;
  color: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-user-titles {
  display: flex;
  flex-direction: column;
}

.summary-kicker {
  margin: 0;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-support-id {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
}

.summary-key-values {
  display: grid;
  gap: 8px;
}

/* 通用表格样式 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.88rem;
}

.admin-table th {
  background-color: #fffbeb; /* 浅黄表头 */
  border-bottom: 2px solid #ebdcb9;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  color: #4b5563;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #ebdcb9;
  color: #1f2937;
}

.admin-table tbody tr:hover {
  background-color: #fffbeb;
}

/* 工单系统：只展示真实 Admin API 返回的数据；不可用时 fail closed */
.admin-tickets-layout-zh {
  display: grid;
  grid-template-columns: minmax(280px, var(--ticket-list-column-width, 340px)) 10px minmax(420px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: calc(100vh - 144px);
  width: 100%;
}

.admin-ticket-panel-heading-zh {
  border-bottom: 2px solid #fef08a;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.admin-ticket-panel-heading-zh h2 {
  margin-bottom: 0;
}

.admin-tickets-sidebar-zh,
.admin-tickets-chat-area-zh {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}

.admin-ticket-column-resizer-zh {
  align-self: stretch;
  border-radius: 999px;
  cursor: col-resize;
  min-height: 100%;
  position: relative;
  touch-action: none;
}

.admin-ticket-column-resizer-zh::before {
  background: #ebdcb9;
  border-radius: inherit;
  content: "";
  inset: 12px 3px;
  position: absolute;
}

.admin-ticket-column-resizer-zh:hover::before,
.admin-ticket-column-resizer-zh:focus-visible::before {
  background: #ffd64a;
}

.admin-ticket-column-resizer-zh:focus-visible {
  outline: 2px solid #ffd64a;
  outline-offset: 2px;
}

.tickets-search-container-zh {
  margin-bottom: 12px;
}

.tickets-search-container-zh input,
.chat-reply-compose-zh textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  outline: none;
  background: #fffdf6;
  font: inherit;
}

.tickets-search-container-zh input:focus,
.chat-reply-compose-zh textarea:focus {
  border-color: #ffd64a;
  box-shadow: 0 0 0 3px rgba(255, 214, 74, 0.22);
  background: #ffffff;
}

.tickets-filter-tabs-zh {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-tab {
  border: 1px solid #ebdcb9;
  border-radius: 999px;
  background: #fffdf5;
  color: #4b5563;
  cursor: pointer;
  font-weight: 700;
  padding: 6px 10px;
}

.filter-tab.active,
.filter-tab:hover {
  background: #fef08a;
  color: #111827;
}

.filter-count-zh {
  color: inherit;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
  opacity: 0.72;
}

.admin-tickets-list-slot-zh {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.admin-ticket-compact-note-zh {
  color: #6b7280;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.ticket-item-card-zh {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 1px solid #ebdcb9;
  border-radius: 10px;
  background: #fffdf5;
  color: #1f2937;
  cursor: pointer;
  padding: 10px 12px;
}

.ticket-item-card-zh:hover,
.ticket-item-card-zh.active {
  border-color: #ffd64a;
  background: #fffbeb;
}

.ticket-card-header-zh,
.ticket-card-meta-zh,
.chat-header-meta-zh,
.chat-header-right-zh,
.reply-actions-zh {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ticket-card-header-zh {
  justify-content: space-between;
  min-width: 0;
}

.chat-header-meta-zh,
.reply-actions-zh {
  flex-wrap: wrap;
}

.chat-support-id-zh {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ticket-card-title-zh {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-card-title-wrap-zh {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-width: 0;
}

.ticket-unread-dot-zh {
  background: #dc2626;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}

.ticket-card-preview-zh,
.ticket-card-meta-zh,
.chat-header-meta-zh {
  color: #6b7280;
  font-size: 0.82rem;
}

.ticket-status-pill-zh {
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
}

.tickets-status-open {
  background: #fee2e2;
  color: #991b1b;
}

.tickets-status-replied {
  background: #fef3c7;
  color: #92400e;
}

.tickets-status-closed {
  background: #dcfce7;
  color: #166534;
}

.admin-ticket-chat-content-zh {
  height: 100%;
  position: relative;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat-header-zh {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #ebdcb9;
  padding-bottom: 12px;
}

.chat-header-left-zh {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-header-left-zh h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header-right-zh {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-messages-container-zh {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: visible;
  padding: 4px 0;
}

.chat-msg-row-zh {
  display: flex;
  gap: 10px;
}

.msg-row-admin-zh {
  justify-content: flex-end;
}

.chat-msg-body-zh {
  max-width: min(100%, 680px);
}

.chat-msg-info-zh {
  color: #6b7280;
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.chat-msg-bubble-zh {
  border: 1px solid #ebdcb9;
  border-radius: 12px;
  padding: 10px 12px;
}

.chat-msg-bubble-zh p {
  margin: 0;
}

.msg-bubble-user-zh {
  background: #fffdf5;
}

.msg-bubble-admin-zh {
  background: #fef08a;
}

.msg-avatar-admin-zh,
.msg-avatar-user-zh {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 0.82rem;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.msg-avatar-admin-zh {
  background: #1f2937;
  color: #ffd64a;
}

.msg-avatar-user-zh {
  background: #fffbeb;
  color: #92400e;
}

.chat-attachments-section-zh,
.chat-reply-compose-zh {
  border-top: 1px solid #ebdcb9;
  padding-top: 10px;
}

.chat-reply-compose-zh {
  flex: 0 0 auto;
}

.ticket-inline-state-zh {
  align-items: center;
  background: #fffdf5;
  border: 1px solid #ebdcb9;
  border-radius: 10px;
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 8px;
  padding: 8px 10px;
}

.attachments-title-zh {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 8px 0;
}

.chat-attachments-list-zh {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-preview-box-zh {
  border: 1px dashed #ebdcb9;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
}

.attachment-actions-zh,
.ticket-audit-header-zh,
.ticket-contact-panel-zh,
.ticket-danger-actions-zh {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ticket-audit-panel-zh,
.ticket-danger-actions-zh,
.ticket-contact-panel-zh {
  border: 1px solid #ebdcb9;
  border-radius: 12px;
  background: #fffdf5;
  padding: 10px 12px;
}

.ticket-contact-panel-zh,
.ticket-audit-header-zh,
.ticket-danger-actions-zh {
  justify-content: space-between;
}

.ticket-contact-panel-zh p,
.ticket-audit-header-zh p,
.ticket-danger-actions-zh p {
  margin: 4px 0 0;
}

.ticket-audit-list-zh {
  display: grid;
  gap: 8px;
  list-style-position: inside;
  margin: 10px 0 0;
  padding: 0;
}

.ticket-audit-list-zh li {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #ebdcb9;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.admin-btn-compact-zh {
  background: #ffffff;
  border: 1px solid #ebdcb9;
  border-radius: 999px;
  color: #4b5563;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 9px;
}

.admin-btn-danger-zh {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #9f1239;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 16px;
}

.admin-btn-secondary-zh {
  background: #ffffff;
  border: 1px solid #ebdcb9;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 16px;
}

.admin-btn-secondary-zh:disabled,
.admin-btn-primary-zh:disabled,
.admin-btn-compact-zh:disabled,
.admin-btn-danger-zh:disabled,
.chat-reply-compose-zh textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}


.ticket-ledger-drawer-zh {
  background: #fffdf5;
  border: 1px solid #ebdcb9;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  margin-top: 0;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 12px;
  position: absolute;
  right: 0;
  top: 0;
  width: min(380px, calc(100% - 16px));
  z-index: 4;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.ticket-ledger-header-zh {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.ticket-ledger-header-zh strong {
  color: #111827;
  display: block;
  font-size: 0.86rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.ticket-ledger-section-zh {
  display: grid;
  gap: 8px;
}

.ticket-ledger-section-zh h4 {
  color: #111827;
  font-size: 0.88rem;
  margin: 0;
}

.ticket-ledger-table-zh {
  font-size: 0.8rem;
  margin-top: 0;
}

/* 状态药丸胶囊 */
.admin-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-pill-active {
  background-color: #d1fae5;
  color: #065f46;
}

.admin-pill-expired {
  background-color: #f3f4f6;
  color: #4b5563;
}

.ticket-ledger-drawer-zh .admin-kv-list div {
  align-items: flex-start;
  display: grid;
  grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
  justify-content: initial;
}

.ticket-ledger-drawer-zh .admin-kv-list dd,
.ticket-ledger-drawer-zh .admin-kv-list dt,
.ticket-ledger-drawer-zh .admin-state-block-zh,
.ticket-ledger-drawer-zh .admin-empty-state-zh,
.ticket-ledger-table-zh th,
.ticket-ledger-table-zh td {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.ticket-ledger-table-wrap-zh {
  max-height: 42vh;
  overflow-y: auto;
}

.ticket-ledger-table-zh {
  table-layout: fixed;
  width: 100%;
}

.ticket-ledger-table-zh th,
.ticket-ledger-table-zh td {
  padding: 8px;
}

.ticket-ledger-table-zh th:nth-child(1),
.ticket-ledger-table-zh td:nth-child(1) {
  width: 34%;
}

.ticket-ledger-table-zh th:nth-child(2),
.ticket-ledger-table-zh td:nth-child(2),
.ticket-ledger-table-zh th:nth-child(4),
.ticket-ledger-table-zh td:nth-child(4) {
  width: 18%;
}

.ticket-ledger-table-zh th:nth-child(3),
.ticket-ledger-table-zh td:nth-child(3) {
  width: 30%;
}

/* SPA tab 切换的 Class 关联隐藏规则 */
.admin-tab-content-zh {
  display: none;
}

.admin-tab-content-zh.active {
  display: block;
}

/* 清除 layout 默认 main 的内边距对全屏独立后台的横向挤压溢出影响 */
.admin-body main {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* 修正 admin-shell 宽度为 100% 避免 100vw 在某些情况下包含滚动条宽度溢出 */
.admin-shell-zh {
  width: 100% !important;
  max-width: 100% !important;
}

/* 窄视口下的响应式降级，侧边栏置顶，主工作区重排 */
@media (max-width: 820px) {
  .admin-workspace-zh {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }

  .admin-navigation-bar-zh {
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid #ebdcb9 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 8px 12px !important;
    justify-content: flex-start !important;
  }

  .admin-nav-collapse-toggle-zh {
    display: none !important;
  }

  .admin-nav-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 !important;
    width: auto !important;
  }

  .admin-nav-item {
    width: auto !important;
    padding: 6px 12px !important;
  }

  .admin-nav-footer {
    display: none !important; /* 手机端隐藏底部的登出按钮或折叠 */
  }

  .admin-main-content-zh {
    padding: 16px !important;
    overflow-y: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .admin-row-top-zh,
  .admin-row-middle-zh,
  .admin-tickets-layout-zh {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  .admin-ticket-column-resizer-zh {
    display: none !important;
  }
}

/* 顶部栏极致小屏适配 */
@media (max-width: 520px) {
  .admin-topbar {
    padding: 0 12px !important;
  }

  .admin-topbar-title {
    font-size: 1rem !important;
  }

  .admin-username {
    display: none !important; /* 头像保留即可 */
  }
}

.admin-ticket-attachment-preview-zh {
  display: block;
  max-width: min(100%, 420px);
  max-height: 320px;
  margin-top: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  object-fit: contain;
  background: rgba(15, 23, 42, 0.04);
}
