/* AI Model Studio identity, layered over app.css.
   Backstage at a shoot: blush-grey paper, aubergine ink, one magenta accent
   (the site's brand colour), Instrument Serif mastheads over Figtree. The one
   bold element is the persona rail in the sidebar; everything else is quiet:
   hairline borders instead of a shadow under every card. */
:root {
  --ink-2: #4a3744; --muted: #7b6976; --line: #e8dee5; --card: #ffffff;
  --rail: #2a1a27; --rail-ink: #e9dde6; --rail-muted: #a18f9c;
  --display: "Instrument Serif", Georgia, serif; --sans: "Figtree", system-ui, -apple-system, sans-serif;
  --radius: 16px; --r-control: 10px; --shadow: none;
  --brand-wash: color-mix(in srgb, var(--brand) 7%, var(--paper));
}
body { font-family: var(--sans); font-size: 15px; letter-spacing: .005em; }
h1 { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -.01em; margin-bottom: .35em; }
h2 { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: -.005em; }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- shell ------------------------------------------------------------------- */
.shell { grid-template-columns: 252px minmax(0, 1fr); }
/* phones/tablets: the sidebar slides in over the page, so the page gets the full width
   (this file loads after app.css, so it must repeat app.css's one-column rule) */
@media (max-width: 960px) { .shell { grid-template-columns: minmax(0, 1fr); } }
.side { background: var(--rail); color: var(--rail-ink); padding: 20px 14px 16px; gap: 2px; }
.side .logo { font-family: var(--display); font-size: 25px; padding: 2px 10px 16px; letter-spacing: -.01em; }
.side .logo i { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.side a.nav { color: var(--rail-ink); opacity: .78; font-weight: 600; font-size: 14px; border-radius: var(--r-control); padding: 8px 10px; }
.side a.nav:hover { background: rgba(255,255,255,.06); opacity: 1; }
.side a.nav.on { background: rgba(255,255,255,.1); opacity: 1; box-shadow: inset 2px 0 0 var(--brand); }
.side .sec { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--rail-muted); padding: 16px 10px 6px; }
.side .badge { background: color-mix(in srgb, var(--brand) 80%, #fff); font-weight: 700; }
.side .foot { color: var(--rail-muted); border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.side .foot a { color: var(--rail-ink); }

/* create actions: the two things people come here to do */
.side .create { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 2px 10px; }
.side .create a { display: flex; flex-direction: column; gap: 6px; padding: 11px 10px; border-radius: 12px; background: rgba(255,255,255,.06);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; border: 1px solid rgba(255,255,255,.08); }
.side .create a:hover { background: rgba(255,255,255,.1); }
.side .create a.on { background: var(--brand); border-color: var(--brand); }
.side .create svg { width: 18px; height: 18px; }

/* the persona rail: faces, one click from their studio */
.rail { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 10px 6px; }
.rail a { position: relative; width: 40px; height: 50px; border-radius: 10px; background: #4a3446 center/cover; display: grid; place-items: center;
  color: #fff; font-family: var(--display); font-size: 20px; text-decoration: none; outline: 2px solid transparent; outline-offset: 2px; }
.rail a:hover, .rail a.on { outline-color: var(--brand); }
.rail a.add { background: transparent; border: 1px dashed rgba(255,255,255,.28); font-family: var(--sans); font-size: 18px; color: var(--rail-muted); }
.rail a[data-self]::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: #7ad3a3; border: 2px solid var(--rail); }

.main { padding: 22px 40px 64px; max-width: 1280px; }
.topbar { margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.topbar b { font-weight: 700; }
.credits-pill { display: inline-flex; gap: 6px; align-items: baseline; border-radius: 99px; padding: 6px 14px; background: var(--card); border-color: var(--line); }
.credits-pill b { font-size: 15px; color: var(--ink); }
.credits-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); align-self: center; }

/* --- components -------------------------------------------------------------- */
.card { border-radius: var(--radius); border-color: var(--line); box-shadow: none; padding: 22px; }
.btn { border-radius: var(--r-control); font-family: var(--sans); font-weight: 700; padding: 10px 17px; }
.btn.primary { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
.btn.ghost { border-color: var(--line); background: var(--card); }
.btn.ghost:hover { background: var(--brand-wash); }
.chip { background: #f1e9ef; color: var(--ink-2); font-weight: 700; }
.notice { background: var(--brand-wash); border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line)); }
.flash { border-radius: var(--r-control); }
.tabs { gap: 2px; border-bottom-color: var(--line); }
.tabs a { font-weight: 700; padding: 10px 14px; }
.tabs a .n { background: #f1e9ef; color: var(--muted); font-weight: 700; }
th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search],
input[type=datetime-local], input[type=time], select, textarea { border-color: #ddd0d8; border-radius: var(--r-control); font-family: var(--sans); }
label { font-size: 13px; color: var(--ink-2); }
.choice .box { border-width: 1.5px; border-radius: var(--r-control); }
.choice input:checked + .box { border-color: var(--brand); background: var(--brand-wash); box-shadow: inset 0 0 0 1px var(--brand); }
.stat { font-family: var(--display); font-weight: 400; font-size: 44px; }
.empty { padding: 48px 24px; }
.empty h2 { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--ink); }
.persona-card { border-radius: var(--radius); }
.persona-card .avatar { border-radius: 12px; font-family: var(--display); font-weight: 400; font-size: 30px; }
.post-card { border-radius: 14px; box-shadow: none; }
.monetize-cta { background: var(--card); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--brand); }
.modes { border-color: var(--line); }

/* --- dashboard ---------------------------------------------------------------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { margin: 0; }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 34px; }
.sheet a { text-decoration: none; color: var(--ink); }
.sheet .frame { aspect-ratio: 3/4; border-radius: 14px; background: #ecdfe7 center/cover; display: grid; place-items: center;
  font-family: var(--display); font-size: 54px; color: var(--brand); border: 1px solid var(--line); }
.sheet a:hover .frame { outline: 2px solid var(--brand); outline-offset: 3px; }
.sheet .name { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; }
.sheet .meta { font-size: 12.5px; color: var(--muted); }
.sheet .new .frame { background: transparent; border: 1.5px dashed #d6c5d0; color: var(--muted); font-family: var(--sans); font-size: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; }
.section-head h2 { margin: 0; }

@media (max-width: 860px) {
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 32px; }
}
.side a.nav .ico { width: 17px; height: 17px; flex: none; opacity: .9; }

/* studio: the form leads, recent work is a narrow strip beside it */
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.studio-layout .recent { position: sticky; top: 20px; }
.post-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.post-grid.compact .meta { padding: 7px 9px 9px; }
@media (max-width: 1000px) { .studio-layout { grid-template-columns: minmax(0, 1fr); } .studio-layout .recent { position: static; }
  .post-grid.compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

/* new-persona form: option tiles with sample photos */
.choices.compact.with-photos { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.choices.with-photos .box { padding: 6px 6px 8px; text-align: center; }
.opt-photo { display: block; aspect-ratio: 3/4; border-radius: 8px; background: #ecdfe7 center/cover; margin-bottom: 6px; }
.choices.with-photos .box b { font-size: 12.5px; }
/* ready-made models */
.preset-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 30px; }
.preset .frame { aspect-ratio: 3/4; border-radius: 14px; background: #ecdfe7 center/cover; border: 1px solid var(--line); }
.preset .name { font-family: var(--display); font-size: 24px; margin-top: 8px; line-height: 1.1; }
.preset .meta { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; min-height: 2.4em; }
/* admin */
.preview-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.pa-img { aspect-ratio: 3/4; border-radius: 10px; background: #f1e9ef center/cover; display: grid; place-items: center; margin-bottom: 6px; border: 1px solid var(--line); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.profile-card { padding: 12px; }
.pc-img { aspect-ratio: 3/4; border-radius: 12px; background: #f1e9ef center/cover; display: grid; place-items: center; }

/* the persona roll */
.persona-roll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 0 18px; scroll-snap-type: x proximity; }
.pr-tile { flex: none; width: 112px; text-decoration: none; color: var(--ink); scroll-snap-align: start; }
.pr-frame { display: grid; place-items: center; aspect-ratio: 3/4; border-radius: 14px; background: #ecdfe7 center/cover;
  border: 1px solid var(--line); font-family: var(--display); font-size: 34px; color: var(--brand); }
.pr-tile:hover .pr-frame, .pr-tile.on .pr-frame { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.pr-tile.add .pr-frame { background: transparent; border: 1.5px dashed #d6c5d0; font-family: var(--sans); font-size: 30px; color: var(--muted); }
.pr-tile.locked .pr-frame { font-size: 22px; }
.pr-name { display: block; font-weight: 700; font-size: 13.5px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-meta { display: block; font-size: 12px; color: var(--muted); }
.pr-tile.shared .pr-meta { color: var(--brand); font-weight: 600; }

/* create page: every shared persona */
.shared-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.sc-frame { display: grid; place-items: center; aspect-ratio: 3/4; border-radius: 14px; background: #ecdfe7 center/cover;
  border: 1px solid var(--line); text-decoration: none; font-family: var(--display); font-size: 48px; color: var(--brand); }
.sc-frame:hover { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.sc-name { font-family: var(--display); font-size: 24px; margin-top: 8px; line-height: 1.1; }
.sc-meta { font-size: 12.5px; color: var(--muted); min-height: 2.4em; }

/* "Other…" choice: its text box shows only when picked */
.other-input { display: none; margin-top: 8px; }
.field:has(input[value="other"]:checked) .other-input { display: block; }
