:root {
  --bg: #f6f3ee; --card: #ffffff; --ink: #1c2230; --muted: #6b7280; --line: #e4dfd6;
  --accent: #d9502b; --accent-ink: #ffffff; --on: #fff1ec; --err: #b42318; --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #14161b; --card: #1d2027; --ink: #eceae6; --muted: #a2a7b1; --line: #2e323b;
          --on: #3a2620; --err: #ff8a7a; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #14161b; --card: #1d2027; --ink: #eceae6; --muted: #a2a7b1; --line: #2e323b;
          --on: #3a2620; --err: #ff8a7a; color-scheme: dark; }
.theme { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px;
  padding: .2rem .65rem; font: inherit; font-size: .82rem; cursor: pointer; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.7rem; margin: .4rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + .8rem) 1rem .8rem; border-bottom: 1px solid var(--line); background: var(--card); }
.top nav { display: flex; gap: .8rem; align-items: center; font-size: .9rem; }
.mark { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; }
.narrow { max-width: 420px; margin: 3rem auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.err { color: var(--err); font-size: .9rem; }
.flash { border-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: .5rem; text-align: left; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row input { flex: 1 1 160px; }
label { font-size: .85rem; font-weight: 600; margin-top: .6rem; display: block; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .7rem; }
input[type=file] { padding: .4rem; }
.row input, form.inline input { width: auto; }
.btn { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px;
  padding: .65rem 1.1rem; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: .45rem .8rem; font-size: .9rem; }
.btn.big { font-size: 1.1rem; padding: .85rem 1.4rem; }
.btn.danger { background: var(--err); }
.pill { background: var(--on); color: var(--ink); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; }
.list { list-style: none; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto; }
.plan { text-align: center; display: flex; flex-direction: column; gap: .3rem; align-items: center; margin: 0; }
.plan .price { font-size: 1.6rem; font-weight: 700; margin: .2rem 0; }
.plan.locked { opacity: .55; cursor: not-allowed; }
.plan .soon { font-size: .8rem; border: 1px dashed var(--muted); border-radius: 999px; padding: .2rem .7rem; color: var(--muted); }
.nudge { animation: nudge .35s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.studio { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 820px) { .studio { grid-template-columns: 1fr; } }
.materials { position: sticky; top: 1rem; }
@media (max-width: 820px) { .materials { position: static; } }
.materials input + input, .materials input + .btn { margin-top: .4rem; }
.refs { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.ref { display: flex; justify-content: space-between; gap: .5rem; align-items: start; background: var(--bg);
  border-radius: 10px; padding: .45rem .6rem; font-size: .88rem; overflow-wrap: anywhere; }
.ref-img { display: flex; gap: .5rem; align-items: center; }
.ref-img img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.start { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.guide { font-size: 1rem; }
.working { color: var(--muted); font-style: italic; }
.letter { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.tile { background: var(--bg); border: 2px solid transparent; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.tile.on { border-color: var(--accent); background: var(--on); }
.tile img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; display: block; }
.tile.missing { aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: .5rem; border: 1px dashed var(--line); }
.tile-bar { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem 0; }
.pick { background: none; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; font: inherit; font-size: .82rem;
  color: var(--ink); cursor: pointer; }
.tile.on .pick { border-color: var(--accent); color: var(--accent); }
.dl { padding: .2rem .5rem .45rem; font-size: .8rem; }
.round textarea { margin: .3rem 0 .6rem; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
form.inline { display: flex; gap: .3rem; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0 .2rem; }
.added-head { margin: .6rem 0 0; font-size: .95rem; }
.refs:empty::before { content: "Nothing yet. Each idea, link and picture you add shows up here."; color: var(--muted); font-size: .85rem; }
