:root { --bg:#fff; --fg:#111; --muted:#5f6368; --line:#e3e3e3; --accent:#2f5bea; --accent-fg:#fff; --card:#fafafa; --ok:#1a7f4b; --warn:#b45309; --soft:#f3f5ff; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#111; --fg:#eee; --muted:#9aa0a6; --line:#2c2c2c; --accent:#7b9bff; --accent-fg:#0b0b0b; --card:#1a1a1a; --ok:#4ade80; --warn:#fbbf24; --soft:#171b2b; }
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.55 system-ui,sans-serif; }
.wrap { max-width:760px; margin:0 auto; padding:0 16px; }
a { color:var(--accent); }
.top { display:flex; justify-content:space-between; align-items:center; padding:14px 0; font-size:.9rem; }
.top .brand { font-weight:700; color:var(--fg); text-decoration:none; }
h1 { font-size:clamp(1.6rem,5vw,2.2rem); margin:8px 0 4px; line-height:1.15; }
.lead { color:var(--muted); margin:0 0 20px; }
label { display:block; font-size:.85rem; color:var(--muted); margin:0 0 4px; }
input, select, textarea, button { font:inherit; color:inherit; }
input[type=text], input[type=number], input[type=search], select, textarea { width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); }
textarea { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.9rem; min-height:140px; resize:vertical; }
.row { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:12px; }
.btn { display:inline-block; font-weight:600; padding:9px 16px; border-radius:8px; border:1px solid var(--accent); background:var(--accent); color:var(--accent-fg); cursor:pointer; text-decoration:none; }
.btn.ghost { background:none; color:var(--accent); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.card { border:1px solid var(--line); background:var(--card); border-radius:10px; padding:16px; margin:12px 0; }
.result { font-size:1.6rem; font-weight:700; }
.result.pop { animation:pop .25s ease-out; }
@keyframes pop { from { transform:scale(.96); opacity:.6; } to { transform:scale(1); opacity:1; } }
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }
.muted { color:var(--muted); font-size:.88rem; }
.err { color:var(--warn); font-size:.9rem; min-height:1.3em; }
.meter { font-size:.85rem; color:var(--muted); }
details.more { margin:12px 0; }
details.more summary { cursor:pointer; color:var(--accent); font-weight:600; }
table { width:100%; border-collapse:collapse; font-size:.9rem; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); }
#toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--fg); color:var(--bg); padding:8px 16px; border-radius:999px; font-size:.9rem; opacity:0; pointer-events:none; transition:opacity .2s; z-index:10; }
#toast.show { opacity:1; }
dialog { border:1px solid var(--line); border-radius:12px; background:var(--bg); color:var(--fg); max-width:420px; width:calc(100% - 32px); }
dialog::backdrop { background:rgba(0,0,0,.5); }
.foot { border-top:1px solid var(--line); margin-top:32px; padding:20px 0 32px; color:var(--muted); font-size:.85rem; }
.pro-tag { margin-left:6px; font-size:.65rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:1px 6px; border-radius:999px; background:var(--accent); color:var(--accent-fg); vertical-align:middle; }
.btn .pro-tag { background:var(--accent-fg); color:var(--accent); }
.btn.ghost .pro-tag { background:var(--accent); color:var(--accent-fg); }

/* Seasonal accents for app pages. The inline bootstrap in every generated page sets
   data-season on <html> before the first paint, so the accent colour never flashes. */
html[data-season="autumn"] { --accent:#b4552d; --accent-fg:#fff; --soft:#f6ead8; --s-glow:rgba(217,131,36,.25); --s-line:#e7d3b6; }
html[data-season="winter"] { --accent:#3f6f9f; --accent-fg:#fff; --soft:#e8f1f8; --s-glow:rgba(127,179,213,.28); --s-line:#cfe1ee; }
html[data-season="spring"] { --accent:#4c8a52; --accent-fg:#fff; --soft:#eef6ea; --s-glow:rgba(120,180,130,.25); --s-line:#d3e7d2; }
html[data-season="summer"] { --accent:#a97b14; --accent-fg:#fff; --soft:#f6f2dd; --s-glow:rgba(200,165,60,.25); --s-line:#e7dcb4; }
@media (prefers-color-scheme: dark) {
  html[data-season] { --accent-fg:#0b0b0b; }
  html[data-season="autumn"] { --accent:#d98324; --soft:#221709; --s-glow:rgba(217,131,36,.16); --s-line:#4a351d; }
  html[data-season="winter"] { --accent:#7fb3d5; --soft:#101b25; --s-glow:rgba(127,179,213,.18); --s-line:#27404f; }
  html[data-season="spring"] { --accent:#7cb583; --soft:#15200f; --s-glow:rgba(124,181,131,.16); --s-line:#2c3f2a; }
  html[data-season="summer"] { --accent:#d3a72e; --soft:#1d1a0a; --s-glow:rgba(211,167,46,.16); --s-line:#4a4020; }
}
.card { box-shadow:inset 0 1px 0 var(--s-glow, transparent); }
.catalog-output { border-color:var(--s-line, var(--line)); }
.pro-tag { box-shadow:0 1px 8px var(--s-glow, transparent); }
.foot { border-top-color:var(--s-line, var(--line)); }

/* Generated catalog tools */
.catalog-form { display:grid; gap:12px; }
.catalog-field { min-width:0; }
.catalog-field > label { font-weight:500; }
.catalog-field > small { display:block; margin-top:4px; }
.catalog-field input[type=date],
.catalog-field input[type=datetime-local],
.catalog-field input[type=time],
.catalog-field input[type=email],
.catalog-field input[type=url],
.catalog-field input[type=tel],
.catalog-field input[type=file] { width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); }
.catalog-field input[type=color] { width:72px; height:42px; padding:3px; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.catalog-field input[type=checkbox] { width:18px; height:18px; accent-color:var(--accent); vertical-align:middle; }
.catalog-output { margin:10px 0 0; padding:14px; border:1px solid var(--line); border-radius:8px; background:var(--bg); font:.92rem/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; max-height:520px; overflow:auto; }
.catalog-preview { margin-top:14px; }
.catalog-preview h3, .catalog-preview h2 { margin:12px 0 8px; }
.catalog-preview-image { display:block; max-width:100%; max-height:560px; height:auto; margin:12px auto; border:1px solid var(--line); border-radius:8px; background:#fff; object-fit:contain; }
.catalog-preview canvas { display:block; max-width:100%; height:auto; image-rendering:pixelated; border:1px solid var(--line); border-radius:8px; }
.catalog-frame { display:block; width:100%; min-height:240px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.font-preview-card { padding:18px; border:1px solid var(--line); border-radius:8px; background:var(--card); }
.font-preview-card h2 { margin-top:0; }
.font-preview-card p { margin-bottom:0; }
.filter-sample { display:grid; place-items:center; min-height:150px; border-radius:12px; color:white; font-size:2rem; font-weight:800; background:linear-gradient(135deg,#f97316,#db2777 50%,#4f46e5); }
.pro-card { background:var(--soft); }
.pro-card h2 { font-size:1.15rem; }
.affiliate-card { border-style:dashed; }
.timer-display { font-variant-numeric:tabular-nums; font-size:clamp(3rem,15vw,5.5rem); text-align:center; line-height:1.1; padding:10px 0; }
[hidden] { display:none !important; }
@media (min-width:620px) {
  .catalog-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .catalog-field:has(textarea), .catalog-field:has(input[type=file]), .catalog-form .actions { grid-column:1/-1; }
}

/* Site version stamp (kept in sync by scripts/stamp-version.mjs) */
.site-version { margin:8px 0 0; font-size:.8rem; color:var(--muted); }
.site-version b { color:var(--fg); }
