/* ABL Approval Board (D060). Front-door palette (home.css): black + gold, Cinzel + Outfit. */
:root {
  --bg: #000000; --bg-2: #12100c; --card: #16130e; --line: #2e271b;
  --text: #f3ead6; --muted: #a99a7c; --gold: #e4c56a; --gold-deep: #a7843e;
  --cyan: #22e4ff; --uv: #6b3bff; --ok: #57c47a; --warn: #f0a640; --bad: #e0564b;
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Outfit", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-text-size-adjust: 100%; }
body { padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--gold); }
button { font: inherit; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(0,0,0,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 8px; }
.mark { font-family: var(--font-display); font-weight: 800; color: var(--gold); font-size: 22px; letter-spacing: 2px; }
.sub { color: var(--muted); font-size: 13px; }
.boards { display: flex; gap: 6px; }
.boards a { text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.boards a.on { background: var(--gold); color: #1a1406; border-color: var(--gold); }

.gate { max-width: 420px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.gate h1 { font-family: var(--font-display); color: var(--gold); }
.gate input { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--gold-deep); background: var(--bg-2); color: var(--text); font-size: 17px; }
.gate button, .act { cursor: pointer; }
.gate button { margin-top: 10px; width: 100%; padding: 14px; border: 0; border-radius: 12px; background: var(--gold); color: #1a1406; font-weight: 700; font-size: 16px; }
.err { color: var(--bad); min-height: 1.2em; }

main { max-width: 760px; margin: 0 auto; padding: 12px 16px 40px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-family: var(--font-display); color: var(--gold); font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; }
.controls { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 4; background: var(--bg); padding: 6px 0 8px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { border-color: var(--gold); color: var(--gold); }
.chip .n { opacity: .7; margin-left: 4px; }
#search { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 16px; }

.list { display: grid; gap: 12px; margin-top: 6px; }
.group-h { font-family: var(--font-display); color: var(--gold); font-size: 15px; letter-spacing: 1px; margin: 14px 2px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow: hidden; }
.card.need { border-color: var(--gold-deep); }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kind { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--cyan); }
.id { font-family: ui-monospace, Menlo, monospace; }
.pill { margin-left: auto; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; background: #2a2418; color: var(--muted); }
.pill.open, .pill.awaiting { background: #3a2c0d; color: var(--gold); }
.pill.iterate { background: #2c2140; color: #c4a8ff; }
.pill.approved, .pill.agreed, .pill.locked, .pill.done { background: #13301e; color: var(--ok); }
.pill.rejected { background: #3a1513; color: var(--bad); }
.pill.parked, .pill.info { background: #1e1e1e; color: var(--muted); }
.title { font-size: 17px; font-weight: 700; margin: 8px 0 6px; line-height: 1.3; }
.img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #0a0f2e; border-radius: 12px; margin: 6px 0 10px; }
.body { color: #ddd2bb; font-size: 14px; line-height: 1.5; max-height: 7.5em; overflow: hidden; position: relative; }
.body.open { max-height: none; }
.body:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em; background: linear-gradient(transparent, var(--card)); }
.body p { margin: 0 0 8px; }
.body code { background: #221d14; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.more { background: none; border: 0; color: var(--gold); padding: 4px 0; font-size: 13px; cursor: pointer; }
.opts { margin: 10px 0 4px; }
.opts h4 { margin: 8px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 14px; cursor: pointer; }
.opt.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.opt .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.opt.rec::after { content: "★"; color: var(--gold); }
textarea.note { width: 100%; min-height: 64px; margin-top: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.act { flex: 1 1 auto; min-width: 84px; padding: 11px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 700; font-size: 14px; }
.act.yes { background: #17361f; border-color: #2c6b3e; color: #bff0cd; }
.act.no { background: #3a1513; border-color: #6e2a25; color: #ffc9c3; }
.act.it { background: #261c3b; border-color: #4b3678; color: #dccbff; }
.act:disabled { opacity: .5; }
.hist { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 12px; color: var(--muted); }
.hist div { margin: 2px 0; }
.src { margin-top: 8px; font-size: 11.5px; color: #7d715a; word-break: break-word; }
.foot { margin-top: 24px; color: var(--muted); font-size: 12px; text-align: center; }
.linkbtn { background: none; border: 0; color: var(--gold); cursor: pointer; font-size: 12px; padding: 0; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--gold); color: #1a1406; padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 10; max-width: calc(100% - 32px); }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* Skin cards (D061): reference photo beside the picked swatch, on neutral light gray like the source photos */
.skinrow { display: grid; grid-template-columns: 1fr 96px; gap: 10px; margin: 8px 0 10px; align-items: stretch; }
.ref { width: 100%; height: 190px; object-fit: contain; background: #ebebeb; border-radius: 12px; }
.img.ref.small { height: 150px; max-height: 150px; }
.bigsw { border-radius: 12px; border: 1px solid rgba(255,255,255,.2); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.bigsw span { background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
button.stat { text-align: left; font: inherit; color: inherit; cursor: pointer; border-color: var(--gold-deep); }
