/* Warm Paper (Studio Chat standalone): greige ground, white cards, emerald action. */
:root {
  --ground: #f5f3ef;
  --linen: #efebe3;
  --card: #ffffff;
  --ink: #10262c;
  --muted: #8a8378;
  --border: #e7e0d3;
  --brand: #047857;
  --brand-ink: #ffffff;
  --field: #f4f6f7;
  --field-border: #e2e6e9;
  --danger: #b42318;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141614;
    --linen: #1d201d;
    --card: #1a1c1a;
    --ink: #ecebe7;
    --muted: #a19b90;
    --border: #2c2f2b;
    --brand: #10a37f;
    --field: #202320;
    --field-border: #343833;
    --danger: #f97066;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { padding: 16px 12px; }
.wrap { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 14rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 25, 20, 0.04), 0 6px 16px -8px rgba(20, 25, 20, 0.1);
}
.head { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.eyebrow {
  margin: 0;
  font: 500 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { margin: 0; font-weight: 400; font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.01em; }
.muted { color: var(--muted); font-size: 0.9rem; margin: 0; }
.doc { padding: 8px; display: flex; flex-direction: column; gap: 12px; }
.pages { display: flex; flex-direction: column; gap: 12px; }
.pages canvas { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--border); border-radius: 4px; }
.placeholder { min-height: 40vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; flex-direction: column; gap: 12px; }
.link { align-self: center; color: var(--muted); font-size: 0.8rem; text-decoration: none; padding: 4px 8px; }
.link:hover { color: var(--ink); }
.bar {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 95%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 12px 12px max(env(safe-area-inset-bottom), 12px);
}
.bar-inner { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
label { font-size: 0.9rem; font-weight: 500; }
input {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 8px;
  padding: 10px 12px; margin-top: 6px;
}
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.hint { font-size: 0.75rem; color: var(--muted); margin: 6px 0 0; }
.error { color: var(--danger); font-size: 0.9rem; margin: 0; }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button, .button {
  font: inherit; font-size: 0.95rem; font-weight: 500; height: 44px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 16px;
}
button:disabled { opacity: 0.5; cursor: default; }
.primary { background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); }
.secondary { background: var(--linen); color: var(--ink); border: 1px solid var(--border); }
.center { min-height: calc(100dvh - 32px); display: flex; align-items: center; justify-content: center; }
.notice { max-width: 24rem; width: 100%; padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.badge { width: 48px; height: 48px; border-radius: 8px; background: var(--linen); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.badge.ok { color: var(--brand); }
.badge svg { width: 24px; height: 24px; }
@media (min-width: 768px) {
  main { padding: 40px 16px; }
  .head { padding: 24px; }
  h1 { font-size: 1.5rem; }
  .doc { padding: 16px; }
}
