:root {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --ink: #17161A;
  --ink-2: #4A4850;
  --muted: #8A8790;
  --line: #E7E3DA;
  --line-2: #D9D4C8;
  --brand: #1F5C4B;
  --brand-ink: #FFFFFF;
  --brand-soft: #E3EFEA;
  --accent: #E0784F;
  --accent-soft: #FBE9E1;
  --ok: #2E7D5B;
  --ok-soft: #E4F2EA;
  --warn: #B7791F;
  --warn-soft: #FBF1DC;
  --bad: #C2413A;
  --bad-soft: #FBE6E4;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 22, 26, .04), 0 6px 24px rgba(23, 22, 26, .06);
  --shadow-lg: 0 20px 60px rgba(23, 22, 26, .18);
  --display: "Fraunces", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font: 600 30px/1.15 var(--display); }
h2 { font: 600 22px/1.2 var(--display); }
h3 { font-size: 15.5px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2);
  background: var(--surface); padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 500;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #184A3C; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #CC6440; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(23,22,26,.05); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 13px 24px; font-size: 15.5px; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: rgba(23,22,26,.06); color: var(--ink); }

/* inputs */
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 92, 75, .14); }
label.field { display: block; }
.field-label { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.field-help { color: var(--ink-2); font-size: 13px; margin: 2px 0 8px; }
.field-example { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.req { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.ok-mark { color: var(--ok); font-size: 12px; font-weight: 600; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: #B4532D; border-color: transparent; }

/* auth */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--brand); color: #F4E9D8; padding: 56px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 46px; color: #fff; max-width: 520px; }
.auth-art p { max-width: 460px; opacity: .85; font-size: 16px; margin-top: 16px; }
.mock-stack { position: relative; height: 300px; margin-top: 40px; }
.mock { position: absolute; width: 190px; aspect-ratio: 4/5; border-radius: 16px; box-shadow: 0 24px 48px rgba(0,0,0,.25);
  padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; font: 600 20px/1.15 var(--display); }
.mock.m1 { background: #F4E9D8; color: #1F5C4B; left: 0; top: 30px; transform: rotate(-6deg); }
.mock.m2 { background: #E0784F; color: #fff; left: 150px; top: 0; transform: rotate(3deg); }
.mock.m3 { background: #17161A; color: #F4E9D8; left: 300px; top: 50px; transform: rotate(8deg); aspect-ratio: 9/16; width: 150px; }
.mock small { font: 500 11px var(--ui); opacity: .7; margin-bottom: 8px; display: block; letter-spacing: .06em; text-transform: uppercase; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { margin-bottom: 6px; }
.code-inputs { display: flex; gap: 8px; margin: 18px 0; }
.code-inputs input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 600; padding: 0; }
.brand-mark { display: flex; align-items: center; gap: 10px; font: 600 18px var(--display); }
.brand-mark .leaf { width: 30px; height: 30px; border-radius: 9px; background: #F4E9D8; display: grid; place-items: center; }
.auth-art .brand-mark { color: #fff; }
.dev-code { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }

/* shell */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex;
  flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side .brand-mark { padding: 0 8px; color: var(--ink); }
.side .brand-mark .leaf { background: var(--brand); }
.side-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 0 10px; }
.side-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); cursor: pointer; }
.side-item:hover { background: var(--surface-2); text-decoration: none; }
.side-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; overflow: hidden; flex: none; color: var(--brand); }
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 8px; }
.side-foot .email { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; padding-left: 8px; }
.main { padding: 32px 40px 80px; min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.page-head p { color: var(--ink-2); margin-top: 6px; }
.mobile-bar { display: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-close, .side-backdrop, .tab-icon { display: none; }
.shots-wrap { overflow-x: auto; }

/* projects grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.proj { cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 14px; }
.proj:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.proj .avatar { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
.proj-new { border: 2px dashed var(--line-2); background: transparent; box-shadow: none; display: grid; place-items: center;
  text-align: center; min-height: 190px; color: var(--ink-2); cursor: pointer; }
.proj-new:hover { border-color: var(--brand); color: var(--brand); }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }
.bar.done > i { background: var(--ok); }

/* project header + tabs */
.proj-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.proj-head .avatar { width: 60px; height: 60px; border-radius: 16px; font-size: 22px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; cursor: pointer; color: var(--ink-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tab .lock { font-size: 12px; opacity: .6; }

/* readiness ring */
.ring { --p: 0; --c: var(--brand); width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.ring::before { content: ""; width: 50px; height: 50px; border-radius: 50%; background: var(--surface); grid-area: 1/1; }
.ring span { grid-area: 1/1; font-weight: 700; font-size: 14px; z-index: 1; }
.ring.big { width: 96px; height: 96px; }
.ring.big::before { width: 78px; height: 78px; }
.ring.big span { font-size: 22px; font-family: var(--display); }
.ring.inv { background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.ring.inv::before { background: var(--brand); }
.ring.inv span { color: #fff; }

/* overview */
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.next-step { background: var(--brand); color: #fff; border: 0; }
.next-step p { color: rgba(255,255,255,.82); }
.next-step .btn { background: #fff; color: var(--brand); border-color: #fff; }
.checklist { display: flex; flex-direction: column; }
.check { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.check:last-child { border-bottom: 0; }
.check .tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px;
  border: 1.5px solid var(--line-2); color: transparent; margin-top: 1px; }
.check.ok .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.opt .tick { border-style: dashed; }
.check .label { font-weight: 500; }
.check .detail { font-size: 12.5px; color: var(--muted); }
.check a { font-size: 13px; white-space: nowrap; }
.check-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 14px 0 2px; }

/* arbor voice */
.arbor-says { display: flex; gap: 14px; align-items: flex-start; }
.arbor-face { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; flex: none; }
.bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 14px 16px; }
.list-clean { margin: 0; padding: 0; list-style: none; }
.list-clean li { padding: 6px 0 6px 22px; position: relative; }
.list-clean li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.list-clean.warn li::before { background: var(--accent); }
.question { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.question + .question { margin-top: 10px; }
.idea { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--surface); }
.idea:hover { border-color: var(--brand); background: var(--brand-soft); }

/* activity */
.activity { background: #121A17; color: #CFE3DA; border-radius: var(--radius-sm); padding: 12px 14px; font: 12.5px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace;
  max-height: 180px; overflow-y: auto; }
.activity div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .say { color: #fff; white-space: normal; }
.working { display: flex; align-items: center; gap: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* brief */
.brief-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.brief-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.brief-nav a { padding: 7px 10px; border-radius: 8px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.brief-nav a:hover { background: var(--surface); text-decoration: none; }
.brief-nav .n { font-size: 11.5px; color: var(--muted); }
.section-card h2 { margin-bottom: 2px; }
.section-card .intro { color: var(--ink-2); margin-bottom: 20px; }
.fields > * + * { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 13.5px; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 6px 4px 4px; background: var(--surface); }
.swatch input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.1); border-radius: 50%; }
.swatch input[type=text] { width: 78px; border: 0; outline: none; font-family: ui-monospace, monospace; font-size: 13px; background: transparent; }
.list-rows { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; }
.logo-drop { display: flex; gap: 18px; align-items: center; }
.logo-box { width: 110px; height: 110px; border-radius: 16px; border: 1.5px dashed var(--line-2); display: grid; place-items: center;
  background: repeating-conic-gradient(#f3f1ec 0 25%, #fff 0 50%) 50%/16px 16px; overflow: hidden; flex: none; }
.logo-box img { max-width: 90%; max-height: 90%; object-fit: contain; }
.save-state { font-size: 12.5px; color: var(--muted); }
.suggest { border: 1px solid #CFE3DA; background: #F3F9F6; border-radius: var(--radius); padding: 18px; }
.suggest-item { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid #DCEBE4; align-items: start; }
.suggest-item .val { white-space: pre-wrap; font-size: 13.5px; }

/* media */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 30px; text-align: center; background: var(--surface);
  transition: border-color .15s, background .15s; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 92, 75, .14); }
.dropzone b { color: var(--brand); font-size: 15.5px; }
.drop-icon { font-size: 28px; line-height: 1; }
#up-progress:empty { display: none; }
.up-meta { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.audio-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%;
  padding: 12px; background: linear-gradient(160deg, var(--brand-soft), var(--surface-2)); }
.audio-thumb > span:first-child { font-size: 38px; color: var(--brand); line-height: 1; }
.audio-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.audio-thumb audio { width: 100%; height: 36px; }
.media-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; position: relative; overflow: hidden; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .type { position: absolute; top: 8px; left: 8px; }
.media-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.media-body textarea { min-height: 56px; font-size: 13px; padding: 7px 9px; }
.media-body select { font-size: 13px; padding: 6px 8px; }

/* instagram */
.ig-head { display: flex; gap: 20px; align-items: center; }
.ig-pic { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat b { display: block; font: 600 22px var(--display); }
.stat span { font-size: 12px; color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.post { position: relative; aspect-ratio: 4/5; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: block; }
.post img { width: 100%; height: 100%; object-fit: cover; }
.post .meta { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; font-size: 11.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); display: flex; justify-content: space-between; }
.post .tag { position: absolute; top: 6px; left: 6px; font-size: 10.5px; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; padding: 2px 7px; border-radius: 99px; }
.post.top { box-shadow: 0 0 0 3px var(--accent); }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); }
.reco { border-left: 3px solid var(--brand); padding: 4px 0 4px 14px; }
.reco + .reco { margin-top: 14px; }
.pub-account { display: flex; align-items: center; gap: 12px; }
.pub-account .avatar { width: 40px; height: 40px; border-radius: 12px; color: #fff; font-size: 13px; border: 0;
  background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.pub-problem { display: block; background: var(--bad-soft); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; margin-top: 10px; }
details.setup { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.setup summary { cursor: pointer; font-weight: 600; color: var(--brand); }
ol.steps { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
ol.steps b { color: var(--ink); }
.copy-line { display: flex; gap: 8px; align-items: center; margin: 6px 0 4px; flex-wrap: wrap; }
.copy-line code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; word-break: break-all; }

/* create */
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.format { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; background: var(--surface); text-align: left; transition: border-color .15s, transform .15s; }
.format:hover { border-color: var(--brand); transform: translateY(-2px); }
.format.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,92,75,.14); }
.format .shape { height: 74px; display: flex; align-items: flex-end; gap: 5px; margin-bottom: 14px; }
.format .shape i { display: block; background: var(--brand-soft); border: 1.5px solid var(--brand); border-radius: 6px; }
.format b { display: block; font-size: 15.5px; }
.format span { font-size: 12.5px; color: var(--ink-2); }
.create-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.locked { text-align: center; padding: 40px 24px; }
.locked .lock-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center; }
.content-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.content-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.content-card .cover { aspect-ratio: 4/5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.content-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.content-card .info { padding: 12px 14px; }

/* content detail */
.viewer { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.slide { flex: none; scroll-snap-align: start; width: 300px; }
.slide.tall { width: 240px; }
.slide .frame { border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.slide .frame img { width: 100%; }
.slide .frame video { width: 100%; display: block; aspect-ratio: 9/16; background: #000; }
.slide .cap { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.caption-box { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: 14px; }
.hashtags { color: var(--brand); font-size: 13.5px; }
table.shots { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.shots th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.shots td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.shots td.t { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.shots img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.kv dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-top: 14px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 4px 0 0; }

/* modal + toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(23,22,26,.45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; padding: 26px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; animation: fade .2s; font-size: 13.5px; }
.toast.bad { background: var(--bad); }
.toast.link { cursor: pointer; }
.toast.link::after { content: " →"; opacity: .7; }
.notif-row { border: 0; background: none; text-align: left; width: 100%; font: inherit; }
.notif-row svg { flex: none; }
.push-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.push-pill .dot, .bell .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.push-pill[data-push-state=on] { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.push-pill[data-push-state=on] .dot, .bell[data-push-state=on] .dot { background: var(--ok); }
.push-pill[data-push-state=blocked] { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.push-pill[data-push-state=blocked] .dot, .bell[data-push-state=blocked] .dot { background: var(--bad); }
.push-pill[data-push-state=ios-home] { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.push-pill[data-push-state=ios-home] .dot, .bell[data-push-state=ios-home] .dot { background: var(--warn); }
.bell { position: relative; display: grid; place-items: center; }
.bell .slash, .notif-row .slash { display: none; }
[data-push-state]:not([data-push-state=on]):not([data-push-state=checking]) > svg .slash { display: inline; }
.bell[data-push-state=on] { color: var(--ok); }
.bell .dot { position: absolute; top: 9px; right: 9px; box-shadow: 0 0 0 2px var(--surface); }
.push-hint { margin-top: 10px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.seg-btn.on { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(23,22,26,.12); }
.pub-sched { border-color: #CFE3DA; background: #F3F9F6; }
.empty { text-align: center; color: var(--ink-2); padding: 40px 20px; }
.loading { display: grid; place-items: center; padding: 80px; }

@media (max-width: 1000px) {
  .two, .detail-grid { grid-template-columns: 1fr; }
  .formats { grid-template-columns: repeat(2, 1fr); }
  .brief-layout { grid-template-columns: 1fr; }
  .brief-nav { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  /* 16px inputs: iOS Safari zooms the page into anything smaller */
  .input, textarea.input, select.input, input, select, textarea { font-size: 16px; }
  .card { padding: 16px; }
  .card-head { flex-wrap: wrap; }
  .field-label { flex-wrap: wrap; }
  .row.wrap-sm, .page-head .row { flex-wrap: wrap; }

  /* sign-in */
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 100dvh; align-content: start; }
  .auth-art { padding: calc(20px + env(safe-area-inset-top)) 20px 26px; gap: 18px; }
  .auth-art h1 { font-size: 26px; margin-top: 14px; }
  .auth-art p { font-size: 14.5px; margin-top: 10px; }
  .auth-art > p.small, .mock-stack { display: none; }
  .auth-form { padding: 28px 20px 40px; align-items: flex-start; }
  .code-inputs { gap: 6px; }
  .code-inputs input { flex: 1; width: auto; min-width: 0; height: 54px; font-size: 22px; }

  /* shell: top bar + slide-in menu */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30; }
  .mobile-bar .icon-btn, .side-close { font-size: 20px; width: 42px; height: 42px; }
  .side { display: flex; position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); height: 100%; z-index: 45;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
    padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .side.open { transform: none; }
  .side-close { display: grid; place-items: center; }
  .side.open ~ .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(23,22,26,.4); z-index: 44; }
  .side-item { padding: 11px 10px; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  .page-head > .btn, .page-head > div > .btn:only-child { align-self: flex-start; }

  /* project header + bottom tab bar */
  .proj-head { gap: 12px; margin-bottom: 16px; }
  .proj-head h1 { font-size: 21px; }
  .proj-head p { font-size: 13px; }
  .proj-head .avatar { width: 44px; height: 44px; border-radius: 12px; }
  #head-ring { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0; gap: 0; overflow: visible;
    background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); border-bottom: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tab { flex: 1; min-width: 0; flex-direction: column; gap: 2px; padding: 7px 2px 5px; margin: 0; border: 0;
    color: var(--muted); position: relative; border-radius: 10px; }
  .tab.active { color: var(--brand); border: 0; background: var(--brand-soft); }
  .tab-icon { display: block; line-height: 0; }
  .tab-label { font-size: 0; }
  .tab-label::after { content: attr(data-short); font-size: 11px; font-weight: 600; }
  .tab .dot { position: absolute; top: 5px; left: calc(50% + 9px); }
  .tab .lock { position: absolute; top: 3px; left: calc(50% + 8px); font-size: 10px; }

  /* overview / Instagram scores: ring above its text */
  .score-row { flex-direction: column; align-items: flex-start !important; }
  .arbor-says { gap: 10px; }
  .arbor-face { width: 32px; height: 32px; border-radius: 10px; }
  .bubble { padding: 12px 13px; }
  .check a { white-space: normal; text-align: right; }

  /* brief */
  .list-row, .suggest-item { grid-template-columns: 1fr; }
  .logo-drop { flex-wrap: wrap; }
  .swatch input[type=text] { font-size: 16px; width: 92px; }

  /* media + Instagram + content: two columns */
  .dropzone { padding: 22px 14px; }
  .drop-or { display: none; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .media-body { padding: 8px; }
  .media-body textarea { min-height: 64px; }
  .ig-head { flex-wrap: wrap; gap: 14px; }
  .ig-head .grow { flex: 1 1 180px; }
  .ig-head > .stack-sm { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left !important; }
  .ig-head > .stack-sm > * + * { margin-top: 0; }
  .ig-pic { width: 64px; height: 64px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .post { border-radius: 4px; }
  .formats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .format { padding: 14px; }
  .format .shape { height: 48px; margin-bottom: 8px; }
  .format .shape i { transform: scale(.7); transform-origin: bottom left; }
  .content-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .content-card .info { padding: 10px; }
  .content-card .info p { font-size: 13px; }
  .content-card .info .row { flex-wrap: wrap; gap: 6px; }

  /* content detail */
  .slide { width: 78vw; }
  .slide.tall { width: 62vw; }
  .shots-wrap { overflow: visible; }
  table.shots, .shots tbody, .shots tr, .shots td { display: block; width: 100%; }
  .shots thead { display: none; }
  .shots tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
  .shots td { border: 0; padding: 4px 0; }
  .shots td.t { font-weight: 700; color: var(--brand); }
  .shots td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .shots td.empty-cell { display: none; }

  /* modals become bottom sheets; toasts sit above the tab bar */
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    max-height: 92dvh; overflow-y: auto; }
  #toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
