/* ideas to draw — shared brand styles
   Warm, playful-but-clean creative identity. Mobile-first.
   System font stack only. No external requests. */

:root {
  --bg: #fffdf8;
  --bg-alt: #fdf4e7;
  --surface: #ffffff;
  --text: #2c2823;
  --muted: #6d645b;
  --accent: #e86a4f;
  --accent-strong: #d4553b;
  --accent-soft: #fce6de;
  --accent-2: #f2a154;
  --border: #ece2d4;
  --ring: rgba(232, 106, 79, 0.32);
  --shadow: 0 2px 4px rgba(60, 45, 30, 0.05), 0 8px 24px rgba(60, 45, 30, 0.07);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --bg-alt: #221e19;
    --surface: #262119;
    --text: #f2ebe0;
    --muted: #a99e90;
    --accent: #ff8367;
    --accent-strong: #ff9d86;
    --accent-soft: #3a2b23;
    --accent-2: #f6b26b;
    --border: #362f26;
    --ring: rgba(255, 131, 103, 0.35);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-strong); text-decoration-color: var(--ring); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand .brand-ideas { color: var(--accent); }
.brand .brand-dot { color: var(--accent-2); }
.nav {
  margin-left: auto;
  display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; padding: 7px 12px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.nav a[aria-current="page"] { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .nav a[aria-current="page"] { color: #1b1815; } }

/* ---------- Layout blocks ---------- */
main { padding: 8px 0 40px; }
.hero { text-align: center; padding: 26px 0 6px; }
h1 {
  font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.12;
  letter-spacing: -0.025em; margin: 0.2em 0 0.35em; font-weight: 800;
}
h1 .hl { color: var(--accent); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 34em; margin: 0 auto 4px; }
h2 { font-size: clamp(1.3rem, 4vw, 1.65rem); letter-spacing: -0.02em; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.12rem; margin: 1.4em 0 0.4em; }
p { margin: 0 0 1em; }

.squiggle { display: block; width: 128px; max-width: 60%; height: 12px; margin: 0 auto 6px; color: var(--accent-2); }

/* ---------- The tool card ---------- */
.tool {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px 22px; margin: 14px 0 6px;
}
.tool-lg { padding: 24px 20px 26px; }

.result {
  min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px;
  background: var(--bg-alt); border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  padding: 22px 16px; margin-bottom: 16px;
}
.result-text { font-size: clamp(1.25rem, 4.5vw, 1.7rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.result-hint { color: var(--muted); font-size: 1rem; }
.result-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Big output for prompt machine */
.prompt-out { font-size: clamp(1.15rem, 4vw, 1.5rem); font-weight: 600; line-height: 1.35; }
.prompt-out .accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border: none; border-radius: 999px; padding: 15px 26px; font-size: 1.08rem;
  background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-strong);
  transition: transform .06s ease, box-shadow .06s ease, background .15s; touch-action: manipulation;
}
@media (prefers-color-scheme: dark) { .btn { color: #1b1815; } }
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--accent-strong); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 18px 28px; font-size: 1.2rem; }
.btn-secondary {
  background: var(--surface); color: var(--accent-strong); box-shadow: none;
  border: 2px solid var(--border); padding: 11px 18px; font-size: 0.98rem;
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.copy-btn { font-size: 0.85rem; padding: 8px 14px; }

/* ---------- Controls: chips, toggles, sliders, selects ---------- */
.controls { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.control-label { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  cursor: pointer; user-select: none; font-family: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted); transition: all .13s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip[aria-pressed="true"], .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"], .chip.on { color: #1b1815; } }
.chip:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.seg { display: inline-flex; background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.9rem;
  border: none; background: transparent; color: var(--muted); padding: 7px 15px; border-radius: 999px; transition: all .13s;
}
.seg button.on { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .seg button.on { color: #1b1815; } }
.seg button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; }
select, input[type="number"] {
  font-family: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; width: 100%;
}
select:focus, input:focus { outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--accent); }

input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-val { font-weight: 800; color: var(--accent-strong); min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; }

.switch-row { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s; }
.switch .track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--ring); outline-offset: 2px; }

.grid-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid-controls { grid-template-columns: 1fr; } }

/* ---------- Tags / rarity ---------- */
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.tag-diff { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
.rarity-common { background: #e7efe6; color: #4a7a52; }
.rarity-rare { background: #e3ecf7; color: #3a6ea5; }
.rarity-legendary { background: #f6ead0; color: #b07a1e; }
@media (prefers-color-scheme: dark) {
  .rarity-common { background: #223026; color: #9fd3a6; }
  .rarity-rare { background: #1f2b3b; color: #9cc4ef; }
  .rarity-legendary { background: #3a2f18; color: #e8c072; }
}

/* ---------- Cluster hub tiles (homepage) ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: block; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 16px; box-shadow: var(--shadow);
  transition: transform .1s ease, border-color .15s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile .tile-emoji { font-size: 1.5rem; }
.tile .tile-title { font-weight: 800; margin: 4px 0 2px; letter-spacing: -0.01em; color: var(--text); }
.tile .tile-desc { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- Content prose ---------- */
.prose { margin-top: 8px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.tips { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.tips li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; }
.tips li b { color: var(--text); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 42px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-body { padding: 12px 16px 16px; color: var(--muted); }
.faq .faq-body p { margin: 0; }

/* ---------- Checkable list (bored page) ---------- */
.list-section { margin: 22px 0; }
.list-section h3 { margin-bottom: 8px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.checklist li { margin: 0; }
.checklist label {
  display: flex; align-items: flex-start; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .12s;
}
.checklist label:hover { background: var(--bg-alt); }
.checklist input { margin: 3px 0 0; width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.progress-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 4px 0 0; }

/* ---------- Prompt/idea gallery lists ---------- */
.bank { display: grid; gap: 8px; margin: 8px 0 4px; }
.bank .bank-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; }
.bank .bank-item .bank-theme { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-strong); display: block; margin-bottom: 2px; }
.theme-filter { margin: 10px 0; }

/* ---------- Objects output grid ---------- */
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.obj-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 12px; text-align: center; }
.obj-card .obj-name { font-weight: 700; font-size: 1.05rem; }
.obj-card .obj-cat { font-size: 0.75rem; color: var(--muted); text-transform: capitalize; }

/* ---------- Ad slots ---------- */
.ad-slot { margin: 20px 0; min-height: 0; text-align: center; }
.ad-slot:empty { display: none; }

/* ---------- Callout / cross-links ---------- */
.callout { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; }
.callout p { margin: 0; }
.xlinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.xlinks a { font-weight: 600; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; font-size: 0.92rem; }
.xlinks a:hover { border-color: var(--accent); }

.timer-display { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-strong); text-align: center; letter-spacing: 0.02em; }
.timer-display.done { color: var(--accent); }

/* ---------- Legal / doc pages ---------- */
.doc { max-width: 680px; }
.doc h2 { margin-top: 1.7em; }
.doc p, .doc li { color: var(--text); }
.doc .meta-date { color: var(--muted); font-size: 0.92rem; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 6px; opacity: 0.6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); margin-top: 30px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 34px; text-align: center; }
.footer-brand { font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.footer-brand .brand-ideas { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-note { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.center { text-align: center; }
.mt0 { margin-top: 0; }
.small { font-size: 0.9rem; color: var(--muted); }
.pop { animation: pop .28s ease; }
@keyframes pop { 0% { transform: scale(0.96); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } .btn:active { transform: none; } }
