/* Styles for StoryForge's plain HTML pages (templates, 404). The app has its own styles. */
:root { --bg: #fff; --raised: #f7f7f9; --text: #1b1b1f; --soft: #5d5f6b; --line: #dcdde3; --primary: #534ab7; --primary-bg: #6b62d6; --code: #f2f2f6; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --bg: #1b1b1f; --raised: #232329; --text: #ececf1; --soft: #b4b5c0; --line: #34343c; --primary: #b3adf6; --primary-bg: #7d75e0; --code: #26262b; color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-wrap: break-word; }
a { color: var(--primary); text-underline-offset: 0.18em; }
.top { border-bottom: 1px solid var(--line); }
.top .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; }
.in { max-width: 820px; margin: 0 auto; padding: 0 20px; }
main.in { padding-top: 28px; padding-bottom: 48px; }
.crumbs { font-size: 14px; color: var(--soft); margin: 0 0 8px; }
.crumbs a { color: var(--soft); }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.2; margin: 2em 0 0.5em; }
h3 { font-size: 19px; margin: 1.5em 0 0.4em; }
.lede { font-size: 19px; color: var(--soft); margin-top: 0; }
.byline { font-size: 14px; color: var(--soft); }
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; background: var(--primary-bg); color: #fff; font-weight: 700; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
pre, code { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; }
pre { background: var(--code); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14.5px; line-height: 1.55; }
code { font-size: 0.92em; background: var(--code); padding: 1px 5px; border-radius: 4px; }
pre code { background: none; padding: 0; }
.copy-wrap { position: relative; }
.copy-wrap button { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); cursor: pointer; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--raised); font-size: 14px; }
.table-scroll { overflow-x: auto; }
.note { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
figure { margin: 18px 0; }
figure img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
figcaption { font-size: 14px; color: var(--soft); margin-top: 6px; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; padding: 8px 0; font-weight: 700; }
.foot { border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.foot .in { padding-top: 18px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--soft); }
.sheet { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; }
.sheet.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.frame { border: 2px solid var(--text); border-radius: 4px; aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 6px; font-size: 12px; color: var(--soft); }
.frame.wide { grid-column: 1 / -1; aspect-ratio: 32 / 9; }
.net-slot { margin: 32px 0; }
@media print { .top, .foot, .actions, .copy-wrap button, .noprint { display: none !important; } body { background: #fff; color: #000; } }
