:root {
  color-scheme: light;
  --paper: #f3ecdf;
  --ink: #221c16;
  --card: #fffaf3;
  --line: #e0d3c1;
  --seal: #9d2c2c;
  --seal-dark: #742020;
  --pine: #1f6a4a;
  --warn: #8a5a12;
  --bad: #8d2f2f;
  --muted: #6e6256;
  --shadow: 0 16px 40px rgba(60, 36, 16, 0.08);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(157, 44, 44, 0.08), transparent 32%),
    linear-gradient(180deg, #f7f1e6 0%, var(--paper) 40%, #efe4d2 100%);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(34, 28, 22, 0.03) 1px, transparent 1px);
  background-size: 100% 28px;
}
a { color: var(--seal-dark); }
button, input { font: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; position: relative; }
header { padding: 28px 0 8px; display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.eyebrow { margin: 0 0 6px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--seal); }
h1, h2, h3 { font-family: "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", serif; font-weight: 600; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; }
.lede { max-width: 62ch; color: var(--muted); font-size: 16px; }
.nav { display: flex; gap: 14px; align-items: center; }
.nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: currentColor; }
.layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; padding-bottom: 48px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.platform {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  min-height: 92px;
}
.platform strong { display: block; margin-bottom: 4px; }
.platform p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tag { display: inline-block; margin-top: 8px; font-size: 11px; letter-spacing: 0.04em; border-radius: 999px; padding: 2px 8px; }
.tag.yes { background: #e5f4ec; color: var(--pine); }
.tag.no { background: #f8e6e2; color: var(--seal); }
label { display: block; font-size: 13px; margin-bottom: 6px; }
input[type="url"], input[type="password"], input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
}
input:focus, button:focus { outline: 2px solid #e7b2a4; outline-offset: 2px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.row > button { flex: 0 0 auto; }
button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--seal);
  color: white;
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: 0.55; cursor: wait; }
.token { margin-top: 12px; }
.banner { border-radius: 12px; padding: 10px 12px; margin: 12px 0; background: #fff4f2; color: var(--bad); }
.banner.ok { background: #eef8f2; color: var(--pine); }
.preview { display: grid; grid-template-columns: 168px 1fr; gap: 14px; margin-top: 14px; }
.preview img, .cover-fallback {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  background: #efe4d4;
}
.cover-fallback { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.meta { color: var(--muted); font-size: 14px; }
.formats { display: grid; gap: 8px; margin-top: 10px; }
.format {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}
.job { border-top: 1px solid var(--line); padding: 12px 0; }
.job:first-child { border-top: 0; }
.job h3 { margin: 0 0 4px; font-size: 18px; }
.status { font-size: 12px; border-radius: 999px; padding: 2px 8px; }
.status.queued, .status.running { background: #f8efd8; color: var(--warn); }
.status.succeeded { background: #e5f4ec; color: var(--pine); }
.status.failed, .status.cancelled { background: #f8e6e2; color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.actions a, .actions button { text-decoration: none; font-size: 13px; padding: 7px 12px; }
.empty { color: var(--muted); padding: 12px 0 4px; }
code, .mono { font-family: "IBM Plex Mono", "Source Code Pro", ui-monospace, monospace; font-size: 0.92em; }
footer { color: var(--muted); font-size: 13px; padding-bottom: 28px; }
.guide { width: min(860px, calc(100% - 32px)); margin: 0 auto 48px; }
.guide pre {
  overflow: auto;
  background: #241c17;
  color: #f6efe4;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .layout, .preview, .platforms { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: start; }
  .row { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
