@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;600;700&display=swap');

/* Shared visual system. Load after page styles so every route uses these values. */
:root {
  --site-font: 'DM Sans', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --ink: #342d3b; --muted: #716575; --accent: #87536f;
  --accent-bright: #a5688d; --bg: #fbf7f9; --paper: #fffefe;
  --card: var(--paper); --soft: #f6edf4; --rose: var(--soft);
  --border: #e8dfe8; --line: var(--border);
  --site-h1: 40px; --site-h2: 24px; --site-body: 15px;
  --site-small: 13px; --site-caption: 12px;
  --site-radius: 14px; --site-space: 24px;
  font-family: var(--site-font);
}
body { margin: 0; font-family: var(--site-font); font-synthesis: none; font-size: var(--site-body); line-height: 1.8; color: var(--ink); background: var(--bg); }
body :is(button,input,select,textarea) { font-family: var(--site-font); }
body :is(h1,h2,h3) { color: var(--ink); font-weight: 700; letter-spacing: -.025em; }
body :is(h1,.intro h1,.page-intro h1,.feedback-intro h1) { font-size: var(--site-h1); line-height: 1.3; margin: 0 0 16px; }
body :is(h2,.generation-basics h2,.admin-section h2,.feedback-form h2,.page-links h2,.detail-heading h2,.atlas-panel h2) { font-size: var(--site-h2); line-height: 1.4; }
body h3 { font-size: 18px; line-height: 1.5; }
body :is(.intro-copy,.page-intro p,.basics-lead,.stats-description,.review-entry p,.feedback-intro p,.page-links p) { font-size: var(--site-body); line-height: 1.8; color: var(--muted); }
body :is(.eyebrow,.scope,.intro-hint,.source-note,.feedback-privacy,.feedback-required,.stats-method,#stats-feedback) { font-size: var(--site-caption); line-height: 1.8; }
body :is(.eyebrow,.intro .eyebrow,.feedback-intro .eyebrow) { margin: 0 0 12px; font-size: var(--site-caption); line-height: 1.8; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
body :is(button,.button,.primary-link,.admin-primary,.model-link) { font-size: 14px; line-height: 1.5; min-height: 44px; border-radius: 10px; font-weight: 600; }
body :is(input,select,textarea) { font-size: var(--site-body); line-height: 1.6; border-radius: 10px; border-color: var(--border); }
body :is(.feedback-form input,.feedback-form select,.feedback-form textarea,.feedback-list-tools select,.filters select,.workflow-reason textarea) { min-height: 46px; padding: 10px 12px; background: var(--paper); font-size: var(--site-body); line-height: 1.6; }
body .local-tag { font-size: var(--site-caption); line-height: 1.8; border-radius: 8px; padding: 5px 10px; }
body :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body :is(.filters,.feedback-form,.feedback-entry,.stats-overview,.prompt-section,.metadata,.comparison,.atlas-controls) { border-radius: var(--site-radius); }

body .topbar { position: sticky; top: 0; z-index: 20; width: 100%; background: #fffafc; border-bottom: 1px solid var(--border); }
body .topbar .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.2; text-decoration: none; }
body .topbar .brand-mark { display: block; color: var(--accent-bright); font-size: 27px; line-height: 1; letter-spacing: 0; }
body .topbar .brand-name { display: flex; flex-direction: column; color: var(--ink); font-size: inherit; line-height: 1.2; letter-spacing: 0; }
body .topbar .brand-name small { margin-top: 4px; font-size: 8px; font-weight: 700; color: var(--muted); line-height: 1.2; letter-spacing: .22em; }
body .topbar nav { line-height: 1.5; font-weight: 600; }
body .topbar nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
body .topbar nav a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); }
body .topbar :is(.top-search,.searchbox) { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #ddceda; border-radius: 999px; background: var(--paper); }
body .topbar :is(.top-search,.searchbox):focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
body .topbar :is(.top-search,.searchbox) input { width: 100%; min-width: 0; min-height: 0; height: 32px; padding: 0 7px 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 12px; line-height: 1.5; outline: 0; }
body .topbar :is(.top-search,.searchbox) button { flex: none; min-height: 0; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--accent); color: var(--paper); font-size: 11px; line-height: 1; }
body .topbar :is(.search-clear,#clear-query) { width: 27px; height: 27px; padding: 0; background: var(--soft); color: var(--accent); font-size: 18px; }

body main { max-width: 1600px; width: 100%; margin: 0 auto; padding: 40px 5% 64px; }
body main > .intro:not(#explore) { padding: 0; min-height: 0; margin: 0 0 24px; }
body .admin-intro .intro-copy { margin-bottom: 0; }
body .page-intro { padding: 0; margin: 0 0 32px; }
body #explore { min-height: 0; padding: 32px; border-radius: 20px; gap: 48px; }
body #explore .eyebrow { margin-bottom: 12px; }
body .generation-basics { padding: 40px 0; background: transparent; }
body .page-links { padding: 40px 0 0; }
body main > .workspace { padding-left: 0; padding-right: 0; }
body .feedback-layout { width: 100%; max-width: none; margin: 0; gap: 48px; }
body .feedback-form { padding: 32px; }
body .feedback-intro .feedback-lead { font-size: 18px; color: var(--ink); }
body .feedback-guide dd { font-size: var(--site-body); }
body .admin-sections { gap: 8px; margin-bottom: 32px; padding-bottom: 12px; }
body .admin-sections a { min-height: 44px; padding: 10px 18px; font-size: 14px; line-height: 1.7; border-radius: 10px; }
body .admin-section { padding-top: 24px; }
body :is(.stat h3,.filters h2,.result-heading h2,.workflow-sidebar h2,.metadata h3,.generation-flow strong,.variable-list dt) { font-size: 16px; line-height: 1.5; }
body :is(.generation-flow span,.variable-list dd,.consistency-note,.prompt-section pre) { font-size: 14px; line-height: 1.8; }
body :is(.entry-button strong,.workflow-item strong,.feedback-entry-head,.feedback-entry dl) { font-size: var(--site-small); }
body :is(.thumbnail,.map-node,.group-filters button,.facet-card) { font-size: var(--site-small); }
body :is(.workflow-card-title h3,.image-caption-heading h3) { font-size: 14px; }
body :is(.image-model,.thumbnail-model,.thumbnail-status,.status-tag,.workflow-card .image-model) { font-size: var(--site-caption); line-height: 1.6; }
body :is(.footer,.site-footer) { max-width: 1600px; width: 100%; margin: 0 auto; padding: 24px 5%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: var(--site-caption); line-height: 1.8; }
body :is(.footer,.site-footer) strong { color: var(--ink); }
body :is(.footer,.site-footer) a { color: inherit; }
@media(max-width:850px) {
  body .feedback-layout { grid-template-columns: 1fr; gap: 24px; }
  body #explore { gap: 24px; }
}
@media(max-width:680px) {
  :root { --site-h1: 32px; --site-h2: 22px; }
  body main { padding: 28px 5% 48px; }
  body #explore { padding: 24px; }
  body .generation-basics { padding: 32px 0; }
  body .page-links { padding-top: 32px; }
  body .feedback-form { padding: 24px; }
  body :is(.footer,.site-footer) { display: grid; grid-template-columns: 1fr; gap: 8px; }
}
@media(max-width:560px) {
  body .topbar .brand { font-size: 18px; }
  body .topbar .brand-mark { font-size: 24px; }
  body .topbar :is(.top-search,.searchbox) input { font-size: 11px; padding-left: 8px; }
  body .topbar :is(.top-search,.searchbox) button { height: 28px; padding: 0 9px; }
  body .topbar :is(.search-clear,#clear-query) { width: 24px; padding: 0; }
  body .feedback-form { padding: 20px; }
}
@media(prefers-reduced-motion:reduce) { body *, body *::before, body *::after { scroll-behavior: auto; transition-duration: 0s; animation-duration: 0s; } }
/* Generation provenance cards are shared by galleries, thumbnails and review. */
.generation-cards{display:flex;flex-wrap:wrap;gap:6px;text-align:left;margin:6px 0}
.generation-info-card{display:flex;flex-direction:column;gap:3px;padding:6px 9px;background:#f5f1f6;border:1px solid #e7dfe9;border-radius:8px;min-width:0;max-width:100%;color:var(--ink);box-sizing:border-box}
.generation-info-label{font-size:10px;line-height:1.4;color:var(--muted);font-weight:400}
.generation-info-value{font-size:12px;line-height:1.5;font-weight:500;overflow-wrap:anywhere}
.generation-info-tool{font-size:10px;line-height:1.5;color:var(--muted);font-weight:400;overflow-wrap:anywhere}
.thumbnail .generation-cards,.image-thumbnail .generation-cards{flex-direction:column;gap:5px;width:100%;margin:2px 0}
.thumbnail .generation-info-card,.image-thumbnail .generation-info-card{width:100%;padding:5px 6px}
.thumbnail .generation-info-value,.image-thumbnail .generation-info-value{font-size:11px}
