:root {
  color-scheme: light;
  --bg: #FAF4E8;
  --surface: #FFFDF7;
  --surface-sunk: #F4ECDA;
  --border: #1A1714;
  --border-strong: #1A1714;
  --border-soft: #d9cfb6;
  --text: #1A1714;
  --text-muted: #5b554c;
  --accent: #D6442E;
  --accent-soft: #f6d9d2;
  --accent-hover: #b6361f;
  --gold: #E8B43A;
  --leaf: #6F9A6B;
  --leaf-soft: #d6e6d2;
  --leaf-hover: #557a52;
  --danger: #b04a3b;
  --warn: #a07321;
  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;
  --shadow-sm: none;
  --shadow: 0 6px 0 rgba(26, 23, 20, .06);
  --sky: #6a92c0;
  --sky-soft: #d3e1f0;
  --display: "Playfair Display", Georgia, "Noto Serif TC", serif;
  --sans: "Inter", "Noto Sans TC", ui-sans-serif, system-ui, sans-serif;
  font-family: "Inter", "Noto Sans TC", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

a { color: var(--leaf-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 頂部胭脂紅橫條 */
body::before {
  content: '';
  display: block;
  height: 6px;
  background: var(--accent);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
body {
  padding-top: 6px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
header .brand:hover { text-decoration: none; color: var(--accent); }
header .brand img {
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: block;
}

header nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
header nav a {
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
header nav a:hover {
  background: var(--surface-sunk);
  color: var(--text);
  text-decoration: none;
}

main { padding: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

p { margin: 0.5rem 0; }
.hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }

form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input:not([type]),
input[type="search"],
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
textarea {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 6rem;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--leaf);
  margin-right: 0.4rem;
}

button, input[type="submit"] {
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
button:hover, input[type="submit"]:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}
button:active { transform: translateY(1px); }
button:disabled {
  background: var(--surface-sunk);
  border-color: var(--border-soft);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}
button.secondary:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
  transform: translateY(-2px);
}

button.danger {
  background: #f5e0db;
  border-color: var(--danger);
  color: #5b2018;
}
button.danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ── 全域 .btn 規則：讓任何地方用 class="btn primary/secondary" 都有按鈕外觀 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.2rem;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.secondary {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}
.btn.secondary:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: grid;
  gap: 0.5rem;
}
ul li {
  background: var(--surface-sunk);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  /* 密集列表用柔邊線，外圍 section 墨黑框已提供編輯感邊界 */
  border: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
ul li a {
  font-weight: 500;
  color: var(--leaf-hover);
}

code {
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.35rem;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #524a34;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  /* 表格內部行分隔用柔邊線，減輕密集表格的視覺重量 */
  border-bottom: 1px solid var(--border-soft);
}
tr:last-child td { border-bottom: none; }
th {
  background: var(--surface-sunk);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.warn {
  color: var(--warn);
  font-size: 0.9rem;
  background: #fdf4e3;
  border-left: 3px solid var(--warn);
  padding: 0.45rem 0.7rem;
}

#invite-url {
  word-break: break-all;
  background: var(--leaf-soft);
  border: 1px solid var(--leaf);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  color: #2d3a2c;
}
#invite-url:empty { display: none; }

@media (max-width: 640px) {
  body { padding: 1.25rem 0.9rem 3rem; }
  header { padding: 0.6rem 0.85rem; border-radius: var(--radius); }
  section { padding: 1rem 1.1rem; border-radius: var(--radius); }
  h1 { font-size: 1.5rem; }
}

/* Landing page */
.landing-hero {
  text-align: center;
  padding: 2.5rem 1rem 0.5rem;
  margin-bottom: 2rem;
}
.landing-hero .eyebrow {
  margin: 0 0 0.45rem;
  color: var(--leaf-hover);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.landing-hero h1 {
  font-size: 2.4rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.landing-hero .sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}
.landing-hero .sub .zh,
.landing-hero .sub .en,
.workflow-caption .zh,
.workflow-caption .en {
  display: block;
}
.landing-hero .sub .en,
.workflow-caption .en {
  margin-top: 0.45rem;
  color: #5f675c;
}
.landing-hero .sub strong { color: var(--text); font-weight: 500; }

.landing-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.landing-cta .btn {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.landing-cta .btn.primary { background: var(--accent-soft); border-color: var(--accent); color: #1b2a1a; }
.landing-cta .btn.primary:hover { background: var(--accent); text-decoration: none; }
.landing-cta .btn.secondary { background: var(--leaf-soft); border-color: var(--leaf); color: #1b2a1a; }
.landing-cta .btn.secondary:hover { background: var(--leaf); color: #fff; text-decoration: none; }

.landing-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.landing-footer p { margin: 0.3rem 0; }
.landing-footer a { color: var(--text-muted); }
.landing-footer .credit { font-size: 0.8rem; opacity: 0.7; }

.landing-examples { margin-bottom: 2.5rem; }
.landing-examples-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.landing-examples-header p {
  margin: 0;
  max-width: 360px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: right;
}
.landing-examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.example-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.example-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
}
.example-thumb.g1 { background: linear-gradient(135deg, var(--accent-soft), var(--leaf-soft)); }
.example-thumb.g2 { background: linear-gradient(135deg, var(--sky-soft), var(--accent-soft)); }
.example-thumb.g3 { background: linear-gradient(135deg, var(--leaf-soft), var(--sky-soft)); }
.example-meta {
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.example-meta .title { color: var(--text); font-weight: 500; font-size: 0.98rem; display: block; text-decoration: none; }
.example-meta .author { color: var(--text-muted); font-size: 0.8rem; font-family: "JetBrains Mono", ui-monospace, monospace; }
.example-meta .desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.4; }

.example-thumb-link { display: block; }
.example-thumb-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
  background: var(--leaf-soft);
}
.example-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.like-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.like-btn.liked { border-color: #e0245e; color: #e0245e; }
.like-btn:hover { border-color: var(--leaf); color: var(--leaf); }
.like-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.landing-workflow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}
.landing-workflow h2 { text-align: center; }
.workflow-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.25rem 0 1.25rem;
}
.workflow-top { display: grid; place-items: center; margin-bottom: 0.6rem; }
.workflow-down-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem 0 0.5rem;
  color: var(--text-muted);
}
.workflow-down-arrow .arr { font-size: 1.5rem; line-height: 1; }
.workflow-down-arrow .lbl { font-size: 0.75rem; margin-top: 0.15rem; }
.workflow-main {
  display: grid;
  grid-template-columns: 1.5fr auto 1fr auto 0.7fr;
  gap: 0.6rem;
  align-items: stretch;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  min-height: 240px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.app-card.cowork::before { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.app-card.design::before { background: linear-gradient(90deg, var(--sky), #4a74a8); }
.app-card.code::before   { background: linear-gradient(90deg, var(--leaf), var(--leaf-hover)); }
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.app-card.primary {
  border-width: 1px;
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(213, 169, 58, 0.18);
  min-height: 320px;
}
.app-card.primary::before { height: 4px; }
.app-card.compact { min-height: 200px; width: 260px; }
.app-card.cowork .titlebar { background: linear-gradient(180deg, #fff4d2, #fbe9b0); }
.app-card.design .titlebar { background: linear-gradient(180deg, #eaf1fa, #d3e1f0); }
.app-card.code   .titlebar { background: linear-gradient(180deg, #e7f0e4, #cfe0cb); }
.app-card.tmuh {
  min-width: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(111, 154, 107, 0.18), transparent 60%),
    linear-gradient(135deg, #eaf3e6, #f8e8b9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  font-weight: 600;
  padding: 1rem 0.5rem;
  font-size: 1rem;
  color: #1b2a1a;
  border: 1px solid var(--leaf);
  gap: 0.4rem;
}
.app-card.tmuh::before { background: linear-gradient(90deg, var(--leaf), var(--accent)); }
.app-card.tmuh .tmuh-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--leaf-hover);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.app-card.tmuh .tmuh-live::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 0 rgba(111, 154, 107, 0.7);
  animation: tmuhPulse 1.8s ease-out infinite;
}
@keyframes tmuhPulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 154, 107, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(111, 154, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 154, 107, 0); }
}
.app-card.tmuh .tmuh-domain { font-size: 1.15rem; letter-spacing: 0.01em; }

.titlebar {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.85rem;
  font-weight: 500;
}
.titlebar .dots { display: inline-flex; gap: 0.3rem; }
.titlebar .dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.titlebar .dots i:nth-child(1) { background: #ff5f57; }
.titlebar .dots i:nth-child(2) { background: #febc2e; }
.titlebar .dots i:nth-child(3) { background: #28c840; }
.titlebar .role { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

.app-body {
  display: grid;
  grid-template-columns: 90px 1fr;
  flex: 1;
  min-height: 150px;
}
.sidebar {
  background: var(--surface-sunk);
  padding: 0.55rem 0.45rem;
  border-right: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex; flex-direction: column; gap: 0.3rem;
}
.sb-item { padding: 0.3rem 0.45rem; border-radius: var(--radius-sm); }
.sb-item.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.app-content {
  padding: 0.8rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bubble {
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  max-width: 92%;
  line-height: 1.4;
}
.bubble.user { background: var(--accent-soft); align-self: flex-end; border-top-right-radius: 3px; }
.bubble.ai   { background: var(--surface-sunk); align-self: flex-start; border-top-left-radius: 3px; }
.design-preview {
  background: var(--surface-sunk);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.4rem;
  flex: 1;
}
.design-shape {
  background: var(--sky-soft);
  border: 1px solid var(--sky);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--sky);
  font-size: 0.85rem;
}
.design-shape.circle { border-radius: 50%; grid-row: span 2; }
.terminal {
  background: #1c1f1a;
  color: #b7d8a8;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.6;
  flex: 1;
}
.terminal .prompt { color: #6f9a6b; }
.terminal .ok { color: #a7cf7a; }

.arrow-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 0.25rem;
}
.arrow-h small { font-size: 0.68rem; margin-top: 0.2rem; text-align: center; max-width: 90px; }

.landing-features { margin-bottom: 2.5rem; }
.landing-features h2 { text-align: center; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.feature-tile {
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.feature-tile.t1 { background: var(--accent-soft); }
.feature-tile.t2 { background: var(--sky-soft); }
.feature-tile.t3 { background: var(--leaf-soft); }
.feature-tile.t4 { background: var(--surface-sunk); }
.feature-tile .icon { font-size: 1.6rem; }
.feature-tile .title { font-weight: 600; font-size: 1rem; }
.feature-tile .desc { color: #3c3628; font-size: 0.88rem; line-height: 1.5; }

.landing-steps {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}
.landing-steps h2 { margin-top: 0; }
.landing-steps ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}
.landing-steps ol li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
}
.landing-steps ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem; height: 2rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  color: #1b2a1a;
  font-size: 0.95rem;
}
.landing-steps ol li strong { color: var(--leaf-hover); display: block; margin-bottom: 0.2rem; font-size: 1rem; }
.landing-steps ol li p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

.landing-trend-lab {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}
.landing-trend-lab .eyebrow {
  margin: 0 0 0.35rem;
  color: var(--leaf-hover);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.landing-trend-lab h2 { margin-top: 0; }
.landing-trend-lab p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}
.landing-trend-lab p.en {
  color: #5f675c;
  font-size: 0.9rem;
}
.trend-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.trend-lab-actions .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--leaf);
  border-radius: var(--radius);
  background: var(--leaf-soft);
  color: #1b2a1a;
  font-size: 0.9rem;
  font-weight: 500;
}
.trend-lab-actions .btn:hover {
  background: var(--leaf);
  color: #fff;
  text-decoration: none;
}
.trend-lab-panel {
  display: grid;
  gap: 0.75rem;
}
.trend-step {
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.trend-step .num {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: var(--accent-hover);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 600;
}
.trend-step strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}
.trend-step p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.demo-hero {
  padding: 2rem 1.75rem;
}
.demo-hero .eyebrow {
  margin: 0 0 0.45rem;
  color: var(--leaf-hover);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-hero p {
  max-width: 760px;
  color: var(--text-muted);
}
.demo-hero p.en {
  color: #5f675c;
}
.demo-list-section {
  padding: 1.5rem 1.75rem;
}
.demo-list-section h2 {
  margin-top: 0;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.demo-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.demo-card:hover {
  text-decoration: none;
  border-color: var(--leaf);
  box-shadow: var(--shadow-sm);
}
.demo-card strong {
  font-size: 1.05rem;
}
.demo-card p {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.demo-status {
  width: fit-content;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--leaf);
  border-radius: var(--radius-sm);
  background: var(--leaf-soft);
  color: #1b2a1a;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.demo-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.prompt-lab-hero {
  padding: 2rem 1.75rem;
}
.prompt-lab-hero .eyebrow {
  margin: 0 0 0.45rem;
  color: var(--leaf-hover);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prompt-lab-hero h1 {
  margin-bottom: 0.75rem;
}
.prompt-lab-hero p {
  max-width: 760px;
  color: var(--text-muted);
}
.prompt-lab-hero p.en {
  color: #5f675c;
}
.prompt-lab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}
.prompt-lab-links .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--leaf);
  border-radius: var(--radius);
  background: var(--leaf-soft);
  color: #1b2a1a;
  font-size: 0.9rem;
  font-weight: 500;
}
.prompt-lab-links .btn:hover {
  background: var(--leaf);
  color: #fff;
  text-decoration: none;
}
.prompt-lab-section {
  padding: 1.5rem 1.75rem;
}
.prompt-lab-section .section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.prompt-lab-section .section-heading h2 {
  margin: 0;
}
.prompt-lab-section .section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.prompt-code {
  max-height: 720px;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  background: #1c1f1a;
  color: #d9ead1;
  border-radius: var(--radius);
  border: 1px solid #2d3529;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.prompt-code code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
}
.prompt-pack-list {
  display: grid;
  gap: 0.85rem;
}
.prompt-pack-card {
  padding: 0.9rem 1rem;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prompt-pack-card strong {
  display: block;
  color: var(--text);
}
.prompt-pack-card p {
  margin: 0.35rem 0;
  color: var(--text-muted);
}
.prompt-pack-card span,
.empty-state {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.public-dashboard-hero {
  padding: 2rem 1.75rem;
}
.public-dashboard-hero .eyebrow {
  margin: 0 0 0.45rem;
  color: var(--leaf-hover);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.public-dashboard-hero p {
  max-width: 760px;
  color: var(--text-muted);
}
.public-dashboard-hero p.en {
  color: #5f675c;
}
.public-dashboard-section {
  padding: 1.5rem 1.75rem;
}
.public-dashboard-section h2 {
  margin-top: 0;
}
.public-pages-list {
  display: grid;
  gap: 0.75rem;
}
/* 覆蓋全域 ul li：清單頁卡片用編輯式左邊框提示，外框柔化 */
.public-pages-list li {
  display: grid;
  align-items: start;
  gap: 0.25rem;
  flex-wrap: unset;
  border-color: var(--border-soft);
  border-left: 3px solid var(--border-soft);
  background: var(--surface);
  transition: border-left-color 0.15s;
}
.public-pages-list li:hover {
  border-left-color: var(--accent);
}
.public-pages-list li a {
  font-weight: 600;
}
.public-pages-list li span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.landing-request {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.landing-request h2 { margin-top: 0; font-size: 1.2rem; }
.landing-request form { display: grid; gap: 0.75rem; max-width: 100%; }
.landing-request label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.landing-request button {
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  width: fit-content;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.landing-request button:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.landing-request .honeypot { position: absolute; left: -9999px; }
.landing-request .status { color: var(--text-muted); font-size: 0.88rem; min-height: 1.2em; margin: 0; }
.landing-request .status.error { color: var(--danger); }

@media (max-width: 960px) {
  .landing-examples-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-main { grid-template-columns: 1.4fr auto 1fr auto 0.6fr; }
  .app-card.primary { min-height: 290px; }
}
@media (max-width: 760px) {
  .landing-examples-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .landing-examples-header p { text-align: left; }
  .landing-examples-grid { grid-template-columns: 1fr; }
  .workflow-main { grid-template-columns: 1fr; gap: 0.5rem; }
  .arrow-h { transform: rotate(90deg); padding: 0.5rem 0; }
  .arrow-h small { transform: rotate(-90deg); margin: 0.4rem 0 0; }
  .features-grid { grid-template-columns: 1fr; }
  .landing-trend-lab { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .landing-hero { padding: 1rem 0.25rem 0.25rem; }
  .landing-hero h1 { font-size: 1.75rem; }
  .landing-hero .sub { font-size: 0.98rem; }
}

/* ── Login page ── */
/* 讓登入表單在寬螢幕置中，加內距留白，保留 section 外框感 */
.login-wrap {
  max-width: 480px;
  margin: 2rem auto 0;
}
.login-wrap h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
}
.login-wrap form {
  max-width: 100%;
}

/* ── Dashboard 密集列表 ── */
/* #pages / #keys 的 li 用柔邊線＋細左邊框作排版提示 */
#pages li,
#keys li {
  border-color: var(--border-soft);
  border-left: 3px solid var(--border-soft);
  transition: border-left-color 0.15s;
}
#pages li:hover,
#keys li:hover {
  border-left-color: var(--accent);
}

/* API key 顯示區：leaf-soft 底色在新色票下仍清晰 */
#new-key-box code {
  background: var(--leaf-soft);
  border-color: var(--leaf);
  color: #1e3320;
  font-weight: 500;
}

/* Agent 啟動提示詞 textarea：降低視覺重量 */
#agent-prompt {
  border-color: var(--border-soft);
  background: var(--surface-sunk);
  font-size: 0.82rem;
}
#agent-prompt:focus {
  border-color: var(--accent);
}

/* ── Admin 管理表格 ── */
/* th 底色維持，但外框已由 section 提供，table 外框輕化 */
table {
  /* 維持 border: 1px solid var(--border)（已由全域定義），
     th 分隔改柔色已在上方 th/td 規則處理 */
}
/* 斑馬紋：讓密集行好讀 */
tbody tr:nth-child(even) td {
  background: var(--surface-sunk);
}
/* 讓 admin 表格的 td button 小一點 */
td button {
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
}

/* Dashboard tabs */
.tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border-soft); margin-bottom: 1.5rem; }
.tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s, transform 0s;
}
.tab-btn:hover { background: none; transform: none; color: var(--text); border-color: var(--border-soft); }
.tab-btn.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ── Vogue utility classes ── */
.kicker {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.reveal {
  transition: opacity .7s ease, transform .7s ease;
}
/* 漸進增強：只有 JS 啟用（<html class="js">）時才預設隱藏，
   無 JS / JS 失效時內容（含邀請表單、熱門頁）一律可見。 */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* full-bleed 區塊（跑馬燈/CTA 用負 margin）的水平溢出安全網 */
html { overflow-x: hidden; }

/* ── Vogue Landing Page ── */

/* 最外層全寬容器 */
.landing-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero */
.lv-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}
.lv-issue-row {
  display: flex;
  justify-content: space-between;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 40px;
}
.lv-h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  line-height: .96;
  letter-spacing: -.01em;
  margin: 0 0 .5rem;
  color: var(--text);
}
.lv-h1 em {
  font-style: italic;
  color: var(--accent);
}
.lv-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: end;
  margin-top: 36px;
}
.lv-lede {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.lv-lede .drop {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 900;
  float: left;
  line-height: .8;
  margin: 6px 10px 0 0;
  color: var(--accent);
}
.lv-lede-en {
  display: block;
  margin-top: .8rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.lv-hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 跑馬燈 strip（全寬，break out of body max-width） */
.lv-strip {
  background: var(--text);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: .02em;
  /* 突破 body max-width 做全寬 */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}
.lv-strip span { padding: 0 22px; }
.lv-dot { color: var(--gold); }

/* Sections */
.lv-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border-left: none;
  border-right: none;
  border-top: none;
  margin-bottom: 0;
}

/* Section heading */
.lv-sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: baseline;
  margin-bottom: 40px;
}
.lv-sec-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
}
.lv-sec-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}
.lv-sec-sub {
  display: block;
  font-family: var(--sans, "Inter", sans-serif);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Feature cards (01 section) */
.lv-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.lv-card {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  min-height: 220px;
  transition: background .2s ease;
  background: transparent;
}
.lv-card:last-child { border-right: none; }
.lv-card:hover { background: var(--surface); }
.lv-card-ico {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--accent);
}
.lv-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 12px 0 8px;
  line-height: 1.2;
}
.lv-card-sub {
  display: block;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.lv-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* Features grid (smaller second row) */
.lv-features-section { padding: 48px 0; }
.lv-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.lv-feature-tile {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.lv-feature-icon { font-size: 1.5rem; }
.lv-feature-title { font-weight: 600; font-size: .95rem; }
.lv-feature-desc { color: var(--text-muted); font-size: .88rem; line-height: 1.5; }

/* Workflow */
.lv-workflow-section { padding: 64px 0; }
.lv-workflow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}
.lv-workflow-step {
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.lv-workflow-app {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.lv-workflow-step p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.lv-workflow-arr {
  font-size: 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

/* Popular section */
.lv-popular-section { padding: 64px 0; }
.lv-popular-desc { color: var(--text-muted); font-size: .92rem; margin: -20px 0 28px; }

/* Demo link section */
.lv-demo-link-section { padding: 32px 0; }
.lv-demo-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* Steps (04 section) */
.lv-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.lv-step-n {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 2px;
  margin-bottom: 12px;
}
.lv-step h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 6px;
  line-height: 1.2;
}
.lv-step-en {
  display: block;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.lv-step p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* CTA block (red background, 全寬 break out) */
.lv-cta-block {
  background: var(--accent);
  color: #fff;
  padding: 72px 0;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}
.lv-cta-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.lv-cta-copy .kicker { color: #FFE6B0; }
.lv-cta-h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  margin: 12px 0 0;
  color: #fff;
}
.lv-cta-copy p { font-size: 1rem; opacity: .9; margin: 16px 0 0; color: #fff; }

/* Form inside CTA block */
.lv-cta-block #invite-request-form {
  background: var(--bg);
  color: var(--text);
  padding: 28px;
  border: 2px solid var(--text);
  display: grid;
  gap: 12px;
  max-width: 100%;
}
.lv-cta-block #invite-request-form label {
  color: var(--text-muted);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
.lv-cta-block #invite-request-form input,
.lv-cta-block #invite-request-form textarea {
  background: var(--surface);
  border: 1.5px solid var(--text);
  border-radius: 0;
  color: var(--text);
}
.lv-cta-block #invite-request-form .btn.primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.lv-cta-block #invite-request-form .btn.primary:hover {
  background: #000;
  border-color: #000;
}
.lv-cta-block #invite-request-form .status { color: var(--text-muted); font-size: .88rem; min-height: 1.2em; margin: 0; }
.lv-cta-block #invite-request-form .status.error { color: var(--danger); }
.lv-cta-block .honeypot { position: absolute; left: -9999px; }

/* Responsive overrides for new landing sections */
@media (max-width: 900px) {
  .lv-hero-grid { grid-template-columns: 1fr; }
  .lv-cta-inner { grid-template-columns: 1fr; }
  .lv-workflow-grid { grid-template-columns: 1fr; gap: 12px; }
  .lv-workflow-arr { display: none; }
}
@media (max-width: 760px) {
  .lv-cards { grid-template-columns: 1fr; }
  .lv-card { border-right: none; border-bottom: 1px solid var(--border); }
  .lv-card:last-child { border-bottom: none; }
  .lv-features-grid { grid-template-columns: 1fr; }
  .lv-steps { grid-template-columns: 1fr; }
  .lv-issue-row { flex-direction: column; gap: 4px; }
  .landing-wrap { padding: 0 1rem; }
}
@media (max-width: 640px) {
  .lv-h1 { font-size: 2.4rem; }
  .lv-hero { padding: 32px 0 24px; }
  .lv-cta-block { padding: 40px 0; }
}

/* 全部頁面列表（/demo）：返回箭頭 + 排序頁籤 */
.back-home { margin: 0 0 1rem; }
.back-home a { color: var(--text-muted, #6b6b6b); text-decoration: none; font-size: .95rem; }
.back-home a:hover { color: var(--text, #1a1714); }
.sort-tabs { display: flex; gap: .5rem; margin: 0 0 1.5rem; }
.sort-tab { padding: .35rem .9rem; border: 1px solid var(--border-soft, #d8cfc0); color: var(--text-muted, #6b6b6b); text-decoration: none; font-size: .95rem; }
.sort-tab.active { background: var(--text, #1a1714); color: var(--bg, #faf4e8); border-color: var(--text, #1a1714); }

/* ── /demo 分頁列 ── */
.demo-total {
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: .9rem;
  margin: .25rem 0 1.25rem;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  margin: 2.5rem 0 1rem;
  font-family: var(--sans);
}
.pg-link {
  display: inline-flex;
  align-items: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 .6rem;
  justify-content: center;
  border: 1px solid var(--border-soft);
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  background: var(--surface);
}
.pg-link:hover { border-color: var(--border); }
.pg-link.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}
.pg-link.disabled {
  color: var(--text-muted);
  opacity: .45;
  pointer-events: none;
}
.pg-gap {
  display: inline-flex;
  align-items: center;
  height: 2.2rem;
  padding: 0 .3rem;
  color: var(--text-muted);
}

/* ── 首頁即時作品計數膠囊 ── */
.lv-live-count {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--border-soft);
  padding: .35rem .8rem;
  border-radius: 999px;
  margin: 0 0 1.25rem;
}
.lv-live-num {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 700;
}
