/* The app's own skin, from the Neopillar brand sheet: ink and cream, violet
   for anything you can press, the gold thread for what is chosen. A studio's
   colours never reach this stylesheet; they live in the pictures. */
/* Inter for the web, cut from the variable font (both axes kept) in two parts:
   everyday Latin (103KB, was a 471KB TTF), and accented letters beyond it, which
   a browser only fetches when a page shows one. The renderer has its own copy in
   render/assets/fonts. To regenerate, pyftsubset (fonttools + brotli) with these
   ranges and --flavor=woff2 --layout-features='*'. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
             unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+20B9, U+20BA, U+2122, U+2190-2199, U+21A9, U+2212, U+2215, U+2713, U+2715, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
             unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --ink: #131316; --page: #F4F1EA; --panel: #FFFFFF; --faint: #6F6B78; --line: #E2DED4; --hover: #EFECE4;
  --accent: #4B3FA8; --accent-soft: #ECE9F8; --accent-line: #C9C2EE;
  --gold: #E2BD7A; --gold-soft: #F8EFDC;
  --ok: #2E7D4F; --ok-soft: #E3F1E8; --warn: #B0452D; --warn-soft: #FBE7E1;
  --bar: #121118; --bar-ink: #F4F1EA;
  --field: var(--accent);   /* older rules say --field for "the interactive colour" */
  --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* a link to a part of a page (#connect, #teach...) lands below the sticky bar, not under it */
html { scroll-padding-top: 72px; }
header.top { background: var(--bar); color: var(--bar-ink); padding: 0 20px; height: 56px; box-sizing: border-box; display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 50; }
header.top .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bar-ink); }
header.top .brand img { display: block; }
header.top .brand .brand-mark { width: 32px; height: 32px; }
header.top .brand .brand-word { height: 21px; width: auto; margin-top: 1px; }   /* the site header's small-size lockup: mark 32, word 21, 10 apart */
@media (max-width: 520px) { header.top .brand .brand-word { height: 19px; } header.top .brand.with-studio .brand-word { display: none; } }   /* a phone with the studio's own logo beside it: the tile alone */
header.top .studio-name { opacity: .8; color: inherit; text-decoration: none; }
header.top .bar-divider { width: 1px; height: 22px; background: rgba(244,241,234,.28); margin: 0 -4px; }
header.top .studio-logo { display: inline-flex; align-items: center; height: 28px; }
header.top .studio-logo img { height: 28px; width: auto; max-width: 180px; display: block; }
nav.tabs { display: flex; gap: 4px; padding: 10px 20px 0; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
nav.tabs a { padding: 10px 14px; text-decoration: none; color: var(--faint); border-bottom: 3px solid transparent; white-space: nowrap; }
nav.tabs a.on { color: var(--ink); border-bottom-color: var(--field); font-weight: 700; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 36px 72px; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 10px; }
h3 { font-weight: 600; }
p.sub { color: var(--faint); margin: 0 0 22px; max-width: 72ch; }
.flash { padding: 11px 14px; border-radius: 10px; margin: 0 0 18px; background: var(--ok-soft); color: var(--ok); border: 1px solid #C6E0CF; font-weight: 500; }
.flash.warn { background: var(--warn-soft); color: var(--warn); border-color: #EFC9BE; }
.grid { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.picture { display: block; width: 100%; max-width: 360px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); background: #ddd; aspect-ratio: 9/16; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(19,19,22,.03); }
.card h3 { margin: 0 0 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.amber { background: var(--gold-soft); color: #7A5410; }
.pill.red { background: var(--warn-soft); color: var(--warn); }
.pill.grey { background: #ECEAE3; color: var(--faint); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
tbody tr:hover td { background: rgba(19,19,22,.02); }
td a { color: var(--ink); font-weight: 600; text-decoration: none; }
td a:hover { color: var(--accent); }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 14px; }
.faint { color: var(--faint); }
form.inline { display: inline; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--faint); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=date], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 8px 11px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236F6B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
input[type=file] { font: inherit; }
[hidden] { display: none !important; }
button, .btn { font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--page); cursor: pointer; text-decoration: none; display: inline-block; transition: background .12s, border-color .12s, color .12s; }
button:hover, .btn:hover { background: #26252C; border-color: #26252C; }
button.quiet, .btn.quiet { background: #fff; color: var(--ink); border-color: var(--line); }
button.quiet:hover, .btn.quiet:hover { background: var(--hover); border-color: #CFCBC1; color: var(--ink); }
button.small, .btn.small { padding: 5px 10px; font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > .fit { flex: 0 0 auto; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.preset { text-align: center; }
.preset img { width: 100%; border-radius: 8px; box-shadow: 0 3px 12px rgba(0,0,0,.15); aspect-ratio: 9/16; background: #ddd; }
.preset .name { margin: 8px 0 6px; font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.swatch { display: flex; gap: 10px; align-items: center; }
.swatch .chip { width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(0,0,0,.15); flex: 0 0 auto; }
.swatch input[type=color] { width: 38px; height: 38px; padding: 0; border: none; background: none; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; display: block; }
.photo .under { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--faint); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 15px; color: var(--ink); }
.check input { width: 18px; height: 18px; }
.new { font-size: 11px; background: #FBEFD9; color: #8A5A12; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.code { background: #fff; border: 1px dashed var(--line); padding: 10px; border-radius: 8px; word-break: break-all; }
.logo-preview { background: var(--field); padding: 14px; border-radius: 8px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 88px; }
.logo-preview img { max-height: 60px; max-width: 100%; height: auto; display: block; }
.empty { color: var(--faint); font-style: italic; }

/* Docs */
.doc { max-width: 820px; padding: 24px 28px; font-size: 15px; line-height: 1.6; }
.doc h1 { font-size: 24px; margin: 0 0 12px; }
.doc h2 { font-size: 18px; margin: 26px 0 8px; }
.doc h3 { font-size: 15px; margin: 18px 0 6px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.doc p, .doc ul, .doc ol { margin: 0 0 12px; }
.doc li { margin: 3px 0; }
.doc table { font-size: 14px; margin: 8px 0 14px; }
.doc code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 13px; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.doc pre { background: var(--hover); padding: 12px; border-radius: 8px; overflow-x: auto; }
/* Admin panel */
.admin-shell { grid-template-columns: 232px auto 1fr; }   /* the middle column is a section's pop-out menu, when it has one */
.admin-main { grid-column: 3; max-width: 1180px; width: 100%; }
.rail-title { padding: 4px 10px 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 22px; }
.stat { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.stat b .of { display: inline; font-size: 14px; font-weight: 500; color: var(--faint); margin-left: 4px; }
.stat span { display: block; font-size: 13px; font-weight: 500; margin-top: 2px; }
.stat small { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
a.stat:hover { border-color: var(--accent-line); }
.admin-grid { grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-table td, .admin-table th, .admin-main th { white-space: nowrap; }
.admin-table td:first-child { white-space: normal; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head .btn { flex: 0 0 auto; margin-top: 6px; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li { padding: 4px 0; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--ink); opacity: .85; }
.chart .bar.now { fill: var(--gold); opacity: 1; }
.chart .val { font-size: 11px; fill: var(--faint); }
.chart .lbl { font-size: 11px; fill: var(--faint); }
.chart .axis { stroke: var(--line); }
.ok-text { color: var(--ok); }
.setup-steps { padding-left: 0; list-style: none; margin: 0; counter-reset: st; }
.setup-steps > li { position: relative; padding: 10px 0 12px 34px; border-top: 1px solid var(--line); counter-increment: st; }
.setup-steps > li::before { content: counter(st); position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; color: var(--faint); background: #fff; }
.setup-steps > li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: none; }
.checklist .tickbox { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: #fff; margin-top: 2px; }
.checklist li.done .tickbox { background: var(--ok); border-color: var(--ok); }
.checklist li.done > div > a { color: var(--faint); text-decoration: line-through; }
.checklist a { color: var(--ink); font-weight: 600; text-decoration: none; }
/* Posts index */
.section-title { margin: 26px 0 12px; }
.post-hero { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); margin-bottom: 12px; transition: border-color .12s, box-shadow .12s; }
.post-hero:hover { border-color: var(--accent-line); box-shadow: 0 6px 20px rgba(19,19,22,.06); }
.post-hero img { width: 150px; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; display: block; background: #E9E5DB; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.post-hero-body p { margin: 6px 0 8px; color: var(--faint); max-width: 60ch; }
.post-hero-title { font-size: 19px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-meta { font-size: 13px; color: var(--faint); margin-bottom: 12px; }
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.post-card { display: grid; grid-template-columns: 112px 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.post-card:hover { border-color: var(--accent-line); box-shadow: 0 8px 24px rgba(19,19,22,.08); transform: translateY(-1px); }
.post-card-pic { position: relative; }
.post-card-pic img { width: 112px; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; display: block; background: #E9E5DB; box-shadow: 0 3px 10px rgba(0,0,0,.14); }
.post-tag { position: absolute; top: -6px; left: -6px; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.post-tag.faint-tag { background: #fff; color: var(--faint); }
.post-card-body { display: flex; flex-direction: column; min-width: 0; }
.post-card-body p { margin: 4px 0 8px; color: var(--faint); font-size: 14px; flex: 1; }
.post-card-title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-card-body .btn { align-self: flex-start; }
.request-tile { border-style: dashed; background: transparent; grid-template-columns: 1fr; }
.request-card { margin-top: 28px; max-width: 640px; }
@media (max-width: 600px) { .post-hero { grid-template-columns: 96px 1fr; gap: 12px; } .post-hero img { width: 96px; } }
.card.danger { border-color: #EFC9BE; }
.card.danger h3 { color: var(--warn); }
.filters .tile { text-decoration: none; }
.warn-text { color: var(--warn); }
.auth-frame { max-width: 440px; margin: 48px auto 0; }
.auth-card { padding: 26px 28px; }
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.admin-banner { background: var(--gold-soft); color: var(--ink); border-bottom: 1px solid #E8D9B4; padding: 8px 20px; font-size: 13px; }
.admin-banner a { margin-left: 8px; }
.link-card { border-color: var(--accent-line); background: var(--accent-soft); max-width: 820px; }
.link-card input { background: #fff; }
.rail-foot form.inline { display: inline; }
.rail-foot .linkish { text-decoration: none; }
.fb-open { position: fixed; right: 18px; bottom: 18px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--faint); box-shadow: 0 2px 10px rgba(19,19,22,.12); cursor: pointer; z-index: 50; padding: 0; display: inline-flex; align-items: center; justify-content: center; opacity: .85; }
.fb-open:hover { opacity: 1; color: var(--ink); background: #fff; border-color: #CFCBC1; }
.fb-open svg { width: 18px; height: 18px; }
dialog.fb { border: none; border-radius: 14px; padding: 22px 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
dialog.fb::backdrop { background: rgba(0,0,0,.35); }
dialog.fb textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.fb-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.fb-cat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; margin: 0; color: var(--ink); cursor: pointer; }
.fb-cat:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.fb-cat input { margin: 0; }
/* Phones: grid and flex children must be allowed to shrink below their content. */
.grid > *, .row > *, .card { min-width: 0; }
.card { overflow-wrap: anywhere; }
table { display: block; overflow-x: auto; }
@media (min-width: 761px) { table { display: table; } }
img.picture { max-width: 100%; }

dialog.zoom { border: none; background: transparent; padding: 0; max-width: 96vw; max-height: 96vh; }
dialog.zoom::backdrop { background: rgba(0,0,0,.75); }
dialog.zoom img { max-width: 96vw; max-height: 96vh; border-radius: 10px; display: block; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: zoom-out; }
.zoomable { cursor: zoom-in; }
.photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo img { aspect-ratio: 1; }
.photo .uses { display: flex; gap: 8px; font-size: 12px; color: var(--faint); margin-top: 4px; flex-wrap: wrap; }
.photo .uses label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
.picture.small { max-width: 240px; }
.photo .under button { white-space: nowrap; }

.photos.library { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.photos.library .photo img { aspect-ratio: 4/3; }
.photo .tags { margin-top: 6px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 3px 0; }
.tag-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); width: 42px; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; margin: 0; color: var(--ink); }
.tag:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.tag input { width: 12px; height: 12px; margin: 0; }

.focus-wrap { position: relative; touch-action: none; cursor: crosshair; }
.focus-wrap img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.focus-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 999px; border: 3px solid #fff; background: rgba(226,189,122,.75); box-shadow: 0 0 0 2px rgba(0,0,0,.35); pointer-events: none; }
.crops { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; }
.crops img { width: 54px; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; }
.crops a { margin-left: auto; }
.focus-wrap img { aspect-ratio: auto; object-fit: contain; background: #E9E5DB; max-height: 360px; }
.photos.library .photo img.focus-img { aspect-ratio: auto; }

dialog.adjust-dialog { border: none; border-radius: 14px; padding: 18px; width: min(1100px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
dialog.adjust-dialog::backdrop { background: rgba(0,0,0,.55); }
.adjust-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .adjust-grid { grid-template-columns: 1fr; } }
.focus-wrap.big img { max-height: 78vh; width: 100%; object-fit: contain; }
.adjust-crops { display: flex; gap: 12px; }
.adjust-crops img { width: 140px; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }

.view-toggle { display: inline-flex; gap: 0; }
.view-toggle button { border-radius: 8px 0 0 8px; } .view-toggle button + button { border-radius: 0 8px 8px 0; margin-left: -1px; }
.view-toggle button.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 12px; }
.tile { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; color: var(--ink); }
.tile b { font-weight: 700; color: var(--faint); margin-left: 3px; }
.tile.on { border-color: var(--accent-line); background: var(--accent-soft); }
.tile-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-left: 8px; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--field); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; position: sticky; top: 0; z-index: 5; }
.bulk-bar button.tag { cursor: pointer; }
.lib-grid[data-view=grid] { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lib-grid[data-view=grid] .lib-item { position: relative; }
.lib-grid[data-view=grid] .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; cursor: pointer; }
.lib-grid[data-view=grid] .meta, .lib-grid[data-view=grid] .edit { display: none; }
.lib-grid[data-view=list] .lib-item { display: grid; grid-template-columns: 24px 120px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lib-grid[data-view=list] .thumb { width: 120px; aspect-ratio: 4/3; object-fit: contain; background: #E9E5DB; border-radius: 6px; cursor: pointer; }
.pick { position: absolute; top: 6px; left: 6px; z-index: 2; margin: 0; background: rgba(255,255,255,.85); border-radius: 6px; padding: 3px; line-height: 0; }
.lib-grid[data-view=list] .pick { position: static; background: none; padding: 0; }
.pick input { width: 16px; height: 16px; margin: 0; }
.tagline { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.lib-item[hidden] { display: none !important; }

.lib-grid[data-view=grid] .meta, .lib-grid[data-view=grid] .edit, .lib-grid[data-view=grid] .uses-cell,
.lib-grid[data-view=grid] .tags-cell, .lib-grid[data-view=grid] .focus-cell, .lib-grid[data-view=grid] .actions-cell { display: none; }
.list-head, .lib-grid[data-view=list] .lib-item { display: grid; grid-template-columns: 24px 110px 1.2fr 150px 2fr 150px 80px; gap: 12px; align-items: center; }
.list-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 6px 0; border-bottom: 1px solid var(--line); }
.lib-grid[data-view=list] .lib-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lib-grid[data-view=list] .thumb { width: 110px; aspect-ratio: 4/3; object-fit: contain; background: #E9E5DB; border-radius: 6px; cursor: pointer; }
.uses-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tags-cell .tag-row { margin: 2px 0; }
.focus-cell .crops { margin-top: 4px; }
.focus-cell .crops img { width: 44px; }
.actions-cell { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .list-head { display: none !important; } .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 110px 1fr; } .lib-grid[data-view=list] .uses-cell, .lib-grid[data-view=list] .tags-cell, .lib-grid[data-view=list] .focus-cell, .lib-grid[data-view=list] .actions-cell { grid-column: 2 / -1; } }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 96px 1.4fr 130px 1.6fr 120px 70px; gap: 14px; }
.lib-grid[data-view=list] .lib-item { font-size: 14px; }
.lib-grid[data-view=list] .thumb { width: 96px; }
.lib-grid[data-view=list] .meta .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-grid[data-view=list] .meta .faint { font-size: 12px; }
.uses-cell { display: block; }
.tags-cell { line-height: 1.35; }
.focus-cell { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.focus-cell img { width: 34px; height: auto; border-radius: 3px; border: 1px solid var(--line); display: block; }
.actions-cell { flex-direction: row; }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 88px 1.3fr 110px 118px 130px 110px 90px 60px; gap: 10px; }
select.small { padding: 5px 26px 5px 8px; font-size: 13px; width: 100%; min-height: 0; }
.tick { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 2px 0; color: var(--ink); }
.tick input { width: 15px; height: 15px; margin: 0; }
.lib-grid[data-view=grid] .tagsel-cell { display: none; }
@media (max-width: 1000px) { .lib-grid[data-view=list] .tagsel-cell { grid-column: 2 / -1; } }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 88px 1.2fr 110px 2fr 90px 60px; gap: 12px; }
.tags-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags-cell .chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink); }
.chip-x { border: none; background: none; font: inherit; font-size: 14px; line-height: 1; padding: 0 4px; cursor: pointer; color: var(--faint); }
.chip-x:hover { color: var(--warn); }
.tags-cell select.add-tag { width: auto; max-width: 120px; padding: 3px 24px 3px 6px; font-size: 12px; color: var(--faint); min-height: 0; }
.lib-grid[data-view=grid] .tags-cell { display: none; }

.chipcell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; align-content: flex-start; }
.chipcell select.add-chip { width: auto; max-width: 118px; padding: 3px 24px 3px 6px; font-size: 12px; color: var(--faint); order: 0; flex: 0 0 auto; min-height: 0; }
.chipcell .chips { display: contents; }
.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 88px 1.1fr 1.4fr 1.8fr 90px 60px; gap: 12px; align-items: start; }
.lib-grid[data-view=list] .thumb, .lib-grid[data-view=list] .actions-cell, .lib-grid[data-view=list] .focus-cell { align-self: center; }
.lib-grid[data-view=grid] .uses-cell { display: none; }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 88px 1.1fr 1.3fr 1.6fr 120px 90px 60px; gap: 12px; align-items: start; }
.usage-cell { font-size: 13px; line-height: 1.35; }
.lib-grid[data-view=grid] .usage-cell { display: none; }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 24px 84px 1.1fr 1.3fr 1.6fr 120px 56px; gap: 12px; }

/* Left rail */
.shell { display: grid; grid-template-columns: 232px auto 1fr; min-height: calc(100vh - 56px); }
.popout { grid-column: 2; width: 190px; background: #F7F5EF; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
.popout[hidden] { display: none; }
.popout-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.popout .fold { background: none; border: 1px solid var(--line); border-radius: 6px; width: 26px; height: 26px; line-height: 1; font-size: 18px; color: var(--faint); cursor: pointer; padding: 0; }
.popout .fold:hover { background: var(--hover); color: var(--ink); }
.popout a { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.popout a:hover { background: var(--hover); }
.popout a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.popout-section { padding: 12px 10px 4px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rail { background: #FBFAF7; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail .item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer; list-style: none; }
.rail .item svg { width: 18px; height: 18px; color: var(--faint); flex: 0 0 auto; }
.rail .item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail .item.on svg { color: var(--accent); }
.rail .sub a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail .item:hover, .rail .sub a:hover { background: var(--hover); }
.rail summary.item { justify-content: flex-start; }
.rail summary.item a { color: inherit; text-decoration: none; flex: 1; }
.rail summary.item > span, .rail a.item > span { flex: 1; }
.rail summary.item::after { content: "\203A"; color: var(--faint); font-size: 18px; transition: transform .15s; }
.rail details[open] > summary.item::after { transform: rotate(90deg); }
.rail summary::-webkit-details-marker { display: none; }
.rail .sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; border-left: 1px solid var(--line); padding-left: 8px; }
.rail .sub a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.posts-table tr.section td { padding-top: 18px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: none; }
.rail-foot { margin-top: auto; padding: 12px; font-size: 13px; }
.rail-foot a { color: var(--faint); text-decoration: none; }
.rail-foot a:hover { color: var(--accent); }
.menu-btn { display: none; font-size: 22px; background: none; border: none; color: var(--bar-ink); padding: 0 6px; cursor: pointer; }
.menu-btn:hover { background: none; }
.rail-backdrop { display: none; }
main { grid-column: 3; max-width: 1080px; width: 100%; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  main { grid-column: 1; }
  .popout { display: none !important; }
  .menu-btn { display: inline-block; }
  .rail { position: fixed; top: 56px; left: 0; bottom: 0; width: 260px; height: auto; z-index: 60; transform: translateX(-100%); transition: transform .15s; box-shadow: 0 0 30px rgba(0,0,0,.2); }
  body.nav-open .rail { transform: none; }
  body.nav-open .rail-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
}

.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 12px; }
.filterbar select.facet { width: auto; padding: 6px 28px 6px 10px; font-size: 13px; min-height: 34px; }
.active-filters { display: inline-flex; gap: 6px; }

.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 84px 1.1fr 1.3fr 1.6fr 120px 56px; }

.lib-item { position: relative; }
.lib-item.paused .thumb { opacity: .45; }
.off-badge { position: absolute; top: 8px; left: 8px; background: #2E2A24; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.lib-grid[data-view=list] .off-badge { top: 4px; left: 4px; }
.off-tick { font-weight: 700; }

.lib-item.state-off .thumb, .lib-item.state-archived .thumb { opacity: .45; }
.lib-item.state-unused .thumb { opacity: .7; }
.off-badge.unused { background: #8A7F6E; }
.off-badge.archived { background: #9A2B2B; }
.lib-item[hidden] { display: none !important; }

.saved { font-size: 11px; color: var(--ok); font-weight: 700; }

/* Calendar */
.view-toggle a { font: inherit; font-weight: 600; padding: 5px 10px; font-size: 13px; border-radius: 8px 0 0 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; display: inline-block; }
.view-toggle a + a { border-radius: 0 8px 8px 0; margin-left: -1px; }
.view-toggle a.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
.cal-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 10px; }
.cal-key { display: inline-flex; gap: 12px; margin-left: auto; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.key-item i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.key-item i.key-own { background: #fff; border: 2px dashed var(--faint); width: 8px; height: 8px; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-dow, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 8px 6px; border-bottom: 1px solid var(--line); }
.cal-day { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.other { background: #FAF8F3; color: var(--faint); }
.cal-day.past { background: #FCFBF8; }
.cal-day.today .num { color: var(--page); background: var(--ink); border-radius: 999px; padding: 1px 7px; }
.cal-day.selected { outline: 2px solid var(--field); outline-offset: -2px; }
.cal-day:hover { background: var(--accent-soft); }
.cal-day .num { font-size: 13px; font-weight: 700; align-self: flex-start; }
.cal-day .num small { font-weight: 400; color: var(--faint); }
.cal-day .chips { display: flex; flex-direction: column; gap: 3px; }
.add-hint { font-size: 11px; }
.cal-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.2; padding: 2px 6px 2px 4px; border-radius: 6px; background: #F1EFE8; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-chip b { display: inline-block; width: 4px; height: 14px; border-radius: 2px; background: var(--c); flex: 0 0 auto; }
.cal-chip.own { background: #fff; border: 1px dashed #B8B2A4; }
.cal-chip.own b { background: var(--c); }
.cal-chip.st-skipped, .cal-chip.st-missed { opacity: .5; text-decoration: line-through; }
.cal-chip.st-failed { background: #F9E1E1; }
.cal-chip.st-sent, .cal-chip.st-done { background: #E5F1E9; }
.cal.week .cal-day { min-height: 200px; }
.cal.week .cal-chip { white-space: normal; }
.cal.week .cal-chip img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 4px; display: block; margin-bottom: 4px; }
.day-panel { margin-top: 18px; }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.day-list .acts { display: flex; gap: 6px; }
.add-box summary { cursor: pointer; font-weight: 700; margin-top: 12px; }
@media (max-width: 760px) {
  .cal-dow { display: none; }
  .cal-week { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; flex-direction: row; align-items: center; gap: 10px; border-right: none; }
  .cal-day.other { display: none; }
  .cal-day .chips { flex-direction: row; flex-wrap: wrap; }
  .day-list li { grid-template-columns: 1fr; }
}

/* Calendar, second pass */
main { overflow-x: hidden; }
.notice { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.cal-key { flex-wrap: wrap; row-gap: 4px; }
.key-group { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-left: 6px; }
.key-item i.key-sent { background: #E5F1E9; border: 1px solid #BFD9C8; }
.key-item i.key-failed { background: #F9E1E1; border: 1px solid #E8B8B8; }
.cal-chip b { width: 6px; }
.cal-chip.ghost { opacity: .45; border: 1px dashed #B8B2A4; background: #fff; }
.cal-day .dow { display: none; }
.add-hint { font-size: 11px; color: var(--faint); visibility: hidden; }
.cal-day:hover .add-hint, .cal-day.selected .add-hint { visibility: visible; }
@media (max-width: 760px) {
  .cal-day .dow { display: inline; color: var(--faint); font-weight: 400; }
  .cal-day.past.blank { display: none; }
  .cal.week .cal-day { min-height: 0; }
  .add-hint { visibility: visible; }
  .view-toggle { margin-top: 6px; }
}

.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: block; } }

/* Calendar, third pass */
.cal-dow, .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal.week .cal-chip { flex-direction: column; align-items: stretch; gap: 3px; }
.cal.week .cal-chip b { width: 100%; height: 4px; }
.cal.week .cal-chip img { margin: 0; }
.key-item i.key-own { border-radius: 2px; background: #fff; border: 1.5px dashed #8A7F6E; width: 9px; height: 9px; }
.cal-chip.st-missed { opacity: 1; text-decoration: none; background: #F9E1E1; color: #7A2B2B; }
.tonight { background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
@media (max-width: 760px) {
  .cal.week .cal-day { flex-direction: column; align-items: stretch; }
  .cal.week .cal-day .chips { flex-direction: row; }
  .cal.week .cal-chip { max-width: 120px; }
  .cal.week .cal-chip img { width: 100%; }
}

/* Calendar, fourth pass */
.cal-chip .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal.week .cal-chip .lbl { white-space: normal; }
.cal.week .cal-chip b { width: 6px; height: 14px; }
.cal.week .cal-chip:has(img) b { width: 100%; height: 4px; }
.cal.week .cal-chip:not(:has(img)) { flex-direction: row; align-items: center; }
.cal-key .key-set { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
@media (max-width: 760px) {
  .cal-week { grid-template-columns: 1fr; }
  .cal-head h2 { font-size: 16px; }
  .cal.week .cal-chip { max-width: 120px; }
}

/* Layout picker */
.layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.layout { text-align: center; padding: 8px; border-radius: 10px; border: 2px solid transparent; }
.layout.on { border-color: var(--accent-line); background: var(--accent-soft); }
.layout img { width: 100%; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #ddd; display: block; }
.layout img.story { aspect-ratio: 9/16; } .layout img.grid { aspect-ratio: 1; }
.layout .lname { font-size: 13px; font-weight: 700; margin: 6px 0 4px; }

.adjust-crops { flex-wrap: wrap; }
.adjust-crops img { width: auto; max-width: 120px; max-height: 160px; }

.list-head[hidden] { display: none !important; }
@media (max-width: 760px) {
  .layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .layout { padding: 4px; } .layout .lname { font-size: 11px; }
  .posts-table thead { display: none; }
  .posts-table, .posts-table tbody, .posts-table tr, .posts-table td { display: block; width: 100%; }
  .posts-table tr { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 10px; }
  .posts-table td { border: none; padding: 3px 0; }
  .posts-table td .btn { display: inline-block; margin-top: 4px; }
}

button[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) {
  .posts-table td[data-label]::before { content: attr(data-label) ": "; color: var(--faint); font-size: 12px; }
  select { font-size: 14px; }
}
/* Previews take the shape of the picture they show: square stays square. */
.picture, .cal.week .cal-chip img { aspect-ratio: auto; height: auto; }
.picture.small { max-width: 240px; }
.picture.grid { max-width: 360px; }

/* Typeface picker */
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.font-choice { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; margin: 0; background: #fff; }
.font-choice.on, .font-choice:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.font-choice input { position: absolute; opacity: 0; pointer-events: none; }
.font-choice img { width: 100%; height: auto; display: block; border-radius: 6px; }
.font-choice .feel { display: block; font-size: 12px; color: var(--faint); padding: 4px 6px 0; }
.fonts p { grid-column: 1 / -1; margin: 6px 0 0; }

.font-slot { margin-bottom: 8px; }
.font-slot .row > select { flex: 1 1 240px; }
.font-sample { width: 300px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }

/* Easy colours */
.easy { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.swatches-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; min-height: 30px; }
.sw { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.sw:hover { outline: 2px solid var(--field); }
.chosen-chip { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.chosen-chip i { display: inline-block; width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); }

#colours { position: relative; }
.easy { margin-top: 14px; }
.src-title { font-size: 13px; font-weight: 700; }
.use-menu { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); width: 230px; }
.use-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.use-head i { display: inline-block; width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); }
.use-opts { display: flex; flex-direction: column; gap: 4px; }
.use-opts button { font: inherit; font-size: 13px; text-align: left; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink); }
.use-opts button:hover { background: var(--accent-soft); }
.swatch.flash-in { outline: 2px solid var(--field); border-radius: 8px; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.logo-slot { border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.logo-slot.over { border-color: var(--accent-line); background: var(--accent-soft); }
.logo-add { display: block; border: 1.5px dashed var(--line); border-radius: 8px; padding: 26px 12px; text-align: center; color: var(--faint); font-size: 13px; cursor: pointer; background: #FBFAF6; margin: 0; }
.logo-add:hover { border-color: var(--field); color: var(--field); }
.logo-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; font-size: 13px; min-height: 18px; }
.linkish { background: none; border: none; padding: 0; margin: 0; color: var(--field); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--ink); }
.file-pick { cursor: pointer; }

.grid.wide-left { grid-template-columns: 460px 1fr; }
@media (max-width: 900px) { .grid.wide-left { grid-template-columns: 1fr; } }
.previews { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.previews h2 { font-size: 16px; }
.previews .picture { width: 100%; }

.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.save-row form.inline { display: inline; margin: 0; }
.variation-inline { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.variation-inline input[type=text] { flex: 1; min-width: 110px; width: auto; margin: 0; }
.variation-inline button { margin: 0; }

.tile-actions { display: flex; justify-content: center; gap: 6px; align-items: center; }
.tile-actions form.inline { display: inline; margin: 0; }
.tile-actions button { margin: 0; }

.badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--gold); color: var(--ink); vertical-align: middle; }
.preset.editing img { outline: 3px solid var(--field); outline-offset: 2px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.tile-actions .btn { margin: 0; }

.tile-actions button, .tile-actions .btn { white-space: nowrap; padding: 4px 8px; font-size: 12px; }
.tile-actions { flex-wrap: wrap; row-gap: 4px; }
.posts-table .btn { white-space: nowrap; }
.save-row button, .save-row .btn { white-space: nowrap; }
.variation-inline input[type=text] { min-width: 130px; }

.carousel { position: relative; display: flex; align-items: center; gap: 6px; }
.car-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 8px; flex: 1; min-width: 0; scrollbar-width: thin; }
.car-item { flex: 0 0 150px; scroll-snap-align: start; }
.car-arrow { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; background: #fff; color: var(--field); border: 1px solid var(--line); }
.car-arrow[disabled] { opacity: .3; cursor: default; }
@media (max-width: 760px) { .car-arrow { display: none; } }
/* new-variation save row: the name box and buttons on one line, the hint under them */
.save-row .variation-inline { flex: 1 1 100%; display: flex; }
.save-row #save-hint { flex: 1 1 100%; }

.build-row { font-size: 12px; color: var(--faint); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.build-row .btn { margin: 0; }

tr.is-hidden td { color: var(--faint); }
tr.is-hidden td:first-child { text-decoration: line-through; }

textarea { resize: vertical; min-height: 60px; line-height: 1.4; }

.top .who { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--bar-ink); opacity: .9; font-size: 13px; font-weight: 500; text-decoration: none; padding: 4px 6px 4px 4px; border-radius: 999px; }
.top .who:hover { opacity: 1; background: rgba(244,241,234,.08); }
.top .avatar { width: 28px; height: 28px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; }
.top .who.none .avatar { background: transparent; border: 1.5px dashed rgba(244,241,234,.5); color: var(--bar-ink); }

.layout.car-item { flex: 0 0 150px; }
.layout-pick { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.layout-pick img { width: 100%; display: block; }
.layout.on .layout-pick img { outline: 3px solid var(--field); outline-offset: 2px; }

.idea-looks .layout.car-item { flex: 0 0 132px; padding: 6px; }
.idea-looks .layout .lname { font-size: 12px; }
.idea-looks .picked { font-size: 11px; }

.field-foot { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 2px; }
.field-foot .count { font-size: 12px; white-space: nowrap; margin-left: auto; }
.field-foot .count.near { color: #9A6B1C; }
.field-foot .count.full { color: var(--warn); font-weight: 700; }

.pool-item { display: flex; gap: 16px; align-items: flex-start; }
.pool-thumb { flex: 0 0 110px; }
.pool-thumb img { width: 110px; display: block; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #ddd; cursor: zoom-in; }
.pool-thumb img.story { aspect-ratio: 9/16; } .pool-thumb img.grid { aspect-ratio: 1; }
.pool-body { flex: 1; min-width: 0; }
.pool-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.pool-actions .btn, .pool-actions button { margin: 0; white-space: nowrap; }
.pool-actions form.inline { display: inline; margin: 0; }
@media (max-width: 600px) { .pool-item { flex-direction: column; } .pool-thumb { flex-basis: auto; } }

/* Photos: the row image is large and carries the focus dot; the grid keeps a plain square */
.row-focus { position: relative; }
.row-focus img.thumb { width: 100%; }
.lib-grid[data-view=grid] .row-focus { cursor: pointer; }
.lib-grid[data-view=grid] .row-focus img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.lib-grid[data-view=grid] .row-dot { display: none; }
.lib-grid[data-view=grid] .list-only { display: none; }
/* six cells per row: photo, details, may appear on, tags, used, actions (no pick column any more) */
.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 280px 0.9fr 1.6fr 1.1fr 90px 64px; gap: 14px; align-items: start; }
.lib-grid[data-view=list] .uses-cell .off-tick { flex: 0 0 100%; }
.lib-grid[data-view=list] .lib-item { position: relative; }
.lib-grid[data-view=list] .off-badge { position: absolute; top: 18px; left: 8px; z-index: 2; }
.lib-grid[data-view=list] .row-focus { width: 280px; cursor: crosshair; touch-action: none; }
.lib-grid[data-view=list] .row-focus img.thumb { width: 280px; aspect-ratio: auto; object-fit: contain; max-height: 380px; background: #E9E5DB; border-radius: 8px; cursor: crosshair; }
.lib-grid[data-view=list] .row-dot { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (max-width: 1000px) { .lib-grid[data-view=list] .lib-item { grid-template-columns: 220px 1fr; } .lib-grid[data-view=list] .row-focus, .lib-grid[data-view=list] .row-focus img.thumb { width: 220px; } .lib-grid[data-view=list] .meta { grid-column: 2; } }

/* chips flow left to right and wrap; an older rule stacked the uses cell */
.chipcell, .uses-cell.chipcell { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }

.names-table { table-layout: fixed; width: 100%; }
.names-table td, .names-table th { overflow-wrap: anywhere; }

.var-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.var-tile { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px 6px 8px; cursor: pointer; background: #fff; }
.var-tile.on, .var-tile:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.var-tile input { margin: 0; }
.var-bar { display: inline-flex; width: 64px; height: 28px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.12); }
.var-bar span { flex: 1; display: block; }
.var-name { font-size: 13px; font-weight: 700; }

.var-tile .var-preview { border: 1px solid rgba(0,0,0,.12); padding: 0; cursor: pointer; }
.var-tile.previewing .var-preview { outline: 2px solid var(--field); outline-offset: 2px; }

#idea-vars .var-tile { display: block; text-align: center; }
#idea-vars .var-tile.on .layout-pick img { outline: 3px solid var(--field); outline-offset: 2px; }
#idea-vars .var-tile:not(.on) .layout-pick img { opacity: .55; }
#idea-vars .var-tile.previewing .layout-pick img { box-shadow: 0 0 0 3px #E0B972; }

#idea-vars img.story { aspect-ratio: 9/16; } #idea-vars img.grid { aspect-ratio: 1; } #idea-vars img { width: 100%; display: block; background: #ddd; border-radius: 6px; }

.pairings { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.pairing { display: block; border: 2px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; background: #fff; position: relative; }
.pairing.on { border-color: var(--accent-line); background: var(--accent-soft); }
.pairing input { position: absolute; opacity: 0; width: 0; height: 0; }
.pairing img { width: 100%; height: auto; display: block; border-radius: 4px; }
.pairing .pname { display: inline; font-size: 12px; font-weight: 700; margin-top: 4px; }
.pairing .pfeel { display: inline; font-size: 11px; color: var(--faint); margin-left: 4px; }
.pairings.scripts { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* The Brand kit's timetable designs: each previewed on tomorrow's real timetable; the one in use is outlined
   and says "In use", so it never rests on colour alone. */
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.design { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; background: #fff; position: relative; }
.design.on, .design:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.design input { position: absolute; opacity: 0; width: 0; height: 0; }
.design:has(input:checked) .dname::before { content: "\2713  "; color: var(--accent); }   /* a tick, for anyone who cannot tell the border colours apart */
.design img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; display: block; border-radius: 6px; background: var(--hover); }
.design .dname { display: block; font-size: 13.5px; font-weight: 700; margin-top: 8px; }
.design .dname em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--accent); margin-left: 4px; vertical-align: 1px; }
.design .dfeel { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; line-height: 1.35; }
.design:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The Timetable page's Photos card: the photos ticked for it, small; ticking happens in the photo picker */
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 8px; }
.ptile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--hover); }
.ptile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile .ptoday { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--accent); border: 1.5px solid var(--accent); }

/* The account block at the foot of a studio's menu: who you are, the
   trial line, and a menu that opens upward (profile, plan and billing,
   sign out). */
.acct-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.trial-line { display: block; margin: 0 10px 8px; font-size: 12px; color: var(--faint); text-decoration: none; }
a.trial-line:hover { color: var(--accent); }
.trial-line.over { color: var(--warn); font-weight: 600; }
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; list-style: none; }
.acct-btn::-webkit-details-marker { display: none; }
.acct-btn:hover, .acct[open] > .acct-btn { background: var(--hover); }
.acct-btn.on { background: var(--accent-soft); }
.acct-btn > svg { width: 16px; height: 16px; color: var(--faint); flex: 0 0 auto; }
.acct .avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.acct-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.acct-who b { font-size: 14px; font-weight: 600; color: var(--ink); }
.acct-who small { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(19,19,22,.14); padding: 6px; display: flex; flex-direction: column; gap: 1px; z-index: 5; }
.acct-menu a, .acct-menu button { display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; background: none; border: none; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--hover); color: var(--ink); border: none; }
.acct-menu a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.acct-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }

/* Plan and billing: the two plans side by side, the current one outlined and labelled. */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.plan-card { display: flex; flex-direction: column; margin: 0; }
.plan-card.current { border: 2px solid var(--accent-line); }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-card-head h2 { margin: 0; }
.plan-price { margin: 10px 0 2px; color: var(--faint); }
.plan-price b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-right: 4px; }
.plan-card > .faint { margin: 0 0 10px; }
.plan-yours { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.plan-includes { margin: 0 0 16px; padding: 0; list-style: none; flex: 1; }
.plan-includes li { position: relative; padding: 6px 0 6px 24px; border-top: 1px solid var(--line); font-size: 14px; }
.plan-includes li::before { content: "\2713"; position: absolute; left: 2px; top: 6px; color: var(--ok); font-weight: 700; }
.plan-card form button { width: 100%; }
.plan-asked { margin: 0; padding: 9px 12px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.stat b.plan-name { font-size: 20px; line-height: 1.4; }

/* Integrations (admin): a status tile per booking system. Never colour
   alone: every tile has its own mark and word, and the quiet ones are a
   dashed outline rather than a grey fill (pale grey can read as red). */
.health-tile { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1.5px solid transparent; }
.health-tile > span { font-size: 14px; line-height: 1; }
.health-tile.working { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.health-tile.attention { background: var(--gold-soft); color: #7A5410; border-color: #C9A04E; }
.health-tile.down { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); border-width: 2.5px; }
.health-tile.unused, .health-tile.off, .health-tile.planned { background: transparent; color: var(--ink); border: 1.5px dashed var(--faint); font-weight: 500; }
.flag { font-weight: 600; color: var(--warn); }
table.integrations td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
table.integrations td.errors { min-width: 220px; }
table.integrations tr.planned td { color: var(--faint); }
table.integrations td button { white-space: nowrap; }

/* Get set up, TeamUp: the steps to make a key, and the values to copy into TeamUp's form. */
ol.key-steps { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
ol.key-steps > li { margin: 6px 0; }
dl.key-values { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 6px 0 0; font-size: 13px; }
dl.key-values dt { color: var(--faint); }
dl.key-values dd { margin: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------- photo picker
   The post form's photo box and the pop-out picker (Ben, 1 Oct 2026: it
   should feel premium). Buttons here are reset from the app's filled ones.
   The chosen photo carries a ring AND a tick, never colour alone. */
.photo-slot { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px; margin: 2px 0 6px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.photo-slot:hover { background: var(--panel); border-color: var(--accent-line); box-shadow: 0 2px 10px rgba(19,19,22,.06); }
.photo-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-slot-img { flex: 0 0 56px; width: 56px; height: 70px; border-radius: 8px; overflow: hidden; background: var(--hover); display: flex; align-items: center; justify-content: center; }
.photo-slot-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot-img.auto { background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.photo-slot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.photo-slot-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-slot-text .faint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-slot-action { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 6px; }

body.pp-open { overflow: hidden; }
dialog.photo-picker { border: none; padding: 0; width: min(1120px, calc(100vw - 48px)); height: min(860px, calc(100vh - 48px)); border-radius: 18px; background: var(--page); color: var(--ink); box-shadow: 0 24px 80px rgba(19,19,22,.35), 0 2px 8px rgba(19,19,22,.12); overflow: hidden; }
dialog.photo-picker[open] { display: flex; flex-direction: column; animation: pp-in .18s ease-out; }
dialog.photo-picker::backdrop { background: rgba(19,19,22,.55); backdrop-filter: blur(3px); }
@keyframes pp-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.photo-picker[open] { animation: none; } .pp-tile, .pp-tile img { transition: none !important; } .pp-tile:not(.loaded)::before { animation: none !important; } }

.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; }
.pp-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.pp-head p { margin: 2px 0 0; font-size: 13px; }
.pp-close { width: 36px; height: 36px; padding: 0; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--ink); font-size: 22px; line-height: 1; font-weight: 400; }
.pp-close:hover { background: var(--hover); border-color: #CFCBC1; }

.pp-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 6px 24px 14px; border-bottom: 1px solid var(--line); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.pp-chip span { font-size: 11px; font-weight: 600; color: var(--faint); }
.pp-chip:hover { background: var(--hover); border-color: #CFCBC1; color: var(--ink); }
.pp-chip.on { background: var(--ink); border-color: var(--ink); color: var(--page); font-weight: 600; }
.pp-chip.on span { color: var(--gold); }
.pp-tools-right { display: flex; align-items: center; gap: 12px; }
.pp-seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; }
.pp-seg button { background: transparent; border: none; color: var(--faint); font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 7px; }
.pp-seg button:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.pp-seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(19,19,22,.12); }
.pp-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; white-space: nowrap; }
.pp-sort select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

.pp-body { flex: 1; overflow-y: auto; padding: 16px 24px 24px; overscroll-behavior: contain; }
.pp-group { margin-top: 18px; }
.pp-group h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.pp-group h3 .faint { font-weight: 500; margin-left: 4px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

.pp-tile, .pp-auto { position: relative; padding: 0; border: none; background: transparent; color: var(--ink); font-weight: 400; text-align: left; cursor: pointer; }
.pp-tile { display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--hover); box-shadow: 0 1px 2px rgba(19,19,22,.08); transition: transform .15s ease, box-shadow .15s ease; }
.pp-tile:hover { background: var(--hover); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(19,19,22,.16); }
.pp-tile:focus-visible, .pp-auto:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s ease, transform .3s ease; }
.pp-tile.loaded img { opacity: 1; }
.pp-tile:hover img { transform: scale(1.03); }
.pp-tile:not(.loaded)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%) var(--hover); background-size: 200% 100%; animation: pp-shimmer 1.2s linear infinite; }
@keyframes pp-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.pp-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(transparent, rgba(19,19,22,.78)); color: #fff; font-size: 11.5px; line-height: 1.3; }
.pp-used { font-weight: 600; }
.pp-used.fresh::before { content: "● "; color: var(--gold); }
.pp-tags { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 999px; display: none; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--accent); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(19,19,22,.3); }
.pp-tile.on { box-shadow: 0 0 0 3px var(--accent), 0 8px 22px rgba(19,19,22,.18); }
.pp-tile.on .pp-check, .pp-auto.on .pp-check { display: inline-flex; }

.pp-auto { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px dashed var(--accent-line); border-radius: 12px; background: var(--panel); }
.pp-auto:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.pp-auto.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.pp-auto > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pp-auto b { font-size: 14px; }
.pp-auto-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.pp-auto .pp-check { position: static; margin-left: auto; }

.pp-empty { text-align: center; padding: 48px 0; color: var(--faint); }
.pp-foot { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--panel); }
.pp-chosen { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pp-chosen-img { flex: 0 0 36px; width: 36px; height: 45px; border-radius: 6px; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.pp-chosen-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-chosen > span:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.pp-chosen b, .pp-chosen .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-library { font-size: 13px; margin-right: 6px; }

@media (max-width: 640px) {
  dialog.photo-picker { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .pp-head { padding: 16px 16px 6px; }
  .pp-tools { padding: 6px 16px 12px; }
  .pp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .pp-chip { flex: 0 0 auto; }
  .pp-body { padding: 12px 16px 20px; }
  .pp-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .pp-meta { padding: 20px 7px 6px; font-size: 10.5px; }
  .pp-tags { display: none; }
  .pp-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .pp-library { display: none; }
}

/* Library: organised like the post photo picker (Ben, 1 Oct 2026). Group
   headings sit in the one list as full-width rows, so grid and list views
   and the save-as-you-go rows are untouched. */
.lib-organise { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.lib-group-head { grid-column: 1 / -1; padding: 18px 0 4px; }
.lib-group-head[hidden] { display: none; }
.lib-group-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.lib-group-head h3 .faint { font-weight: 500; margin-left: 4px; }
.lib-grid[data-view=list] .lib-group-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.lib-grid[data-view=grid] { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.lib-grid[data-view=grid] .lib-item { border-radius: 12px; overflow: hidden; background: var(--hover); box-shadow: 0 1px 2px rgba(19,19,22,.08); transition: transform .15s ease, box-shadow .15s ease; }
.lib-grid[data-view=grid] .lib-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(19,19,22,.16); }
.lib-grid[data-view=grid] .row-focus img.thumb { border-radius: 0; aspect-ratio: 4 / 5; opacity: 0; transition: opacity .3s ease; }
.lib-grid[data-view=grid] .lib-item.loaded .row-focus img.thumb { opacity: 1; }
.lib-grid[data-view=grid] .lib-item.state-off.loaded .row-focus img.thumb, .lib-grid[data-view=grid] .lib-item.state-archived.loaded .row-focus img.thumb { opacity: .45; }
.lib-grid[data-view=grid] .lib-item.state-unused.loaded .row-focus img.thumb { opacity: .7; }
.lib-grid[data-view=grid] .lib-item:not(.loaded)::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%) var(--hover); background-size: 200% 100%; animation: pp-shimmer 1.2s linear infinite; }
.lib-grid[data-view=grid] .row-focus { position: relative; z-index: 1; }
.lib-cap { display: none; }
.lib-grid[data-view=grid] .lib-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 10px 9px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(transparent, rgba(19,19,22,.78)); color: #fff; font-size: 11.5px; line-height: 1.3; pointer-events: none; }
.lib-grid[data-view=grid] .off-badge { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .lib-grid[data-view=grid] .lib-item, .lib-grid[data-view=grid] .thumb { transition: none; } .lib-grid[data-view=grid] .lib-item:not(.loaded)::before { animation: none; } }
@media (max-width: 640px) { .lib-grid[data-view=grid] { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; } .lib-grid[data-view=grid] .lib-cap { padding: 20px 7px 6px; font-size: 10.5px; } .lib-grid[data-view=grid] .lib-cap .pp-tags { display: none; } .lib-organise .pp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .lib-organise .pp-chip { flex: 0 0 auto; } }
/* List view drags the focus on the whole photo: never shift it inside its box. */
.lib-grid[data-view=list] .row-focus img.thumb { object-position: center !important; }

/* Get set up: what you teach. A tick box per kind of class; the ones the
   timetable suggests come first, with how many classes we found. */
.teach-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.teach-option { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; font-weight: 500; cursor: pointer; }
.teach-option:hover { border-color: var(--accent-line); }
.teach-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.teach-option .faint { margin-left: auto; font-size: 12px; font-weight: 400; }

/* Get set up: skipping the connection, and the pop-up that says what it misses. */
.skip-row { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.skipped-note { margin: 0 0 12px; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skip-miss { margin: 0 0 12px; padding-left: 18px; font-size: 14px; }
.skip-miss li { margin: 6px 0; }
table.integrations tr.planned td b.wanted { color: var(--ink); }

/* Photos: + Add photos in the header opens a pop-up (Ben, 1 Oct 2026), in the photo picker's style. */
.lib-head-actions { display: flex; align-items: center; gap: 10px; }
.add-photos-btn { display: inline-flex; align-items: center; gap: 6px; }
.add-photos-btn span { font-size: 17px; line-height: 1; font-weight: 500; }
dialog.add-dialog { width: min(760px, calc(100vw - 48px)); height: fit-content; max-height: min(820px, calc(100vh - 48px)); }
.add-body { flex: 1; overflow-y: auto; padding: 4px 24px 20px; }
.add-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 34px 20px; border: 2px dashed var(--accent-line); border-radius: 14px; background: var(--panel); text-align: center; cursor: pointer; font-weight: 400; transition: background .15s, border-color .15s; }
.add-drop:hover, .add-drop.over { background: var(--accent-soft); border-color: var(--accent); }
.add-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.add-drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.add-drop b { font-size: 16px; }
.add-drop .faint { font-size: 13px; }
.add-drop-icon { width: 44px; height: 44px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 6px; }
.add-drop.compact { flex-direction: row; padding: 12px 16px; gap: 10px; }
.add-drop.compact .add-drop-icon { width: 30px; height: 30px; font-size: 18px; margin: 0; }
.add-drop.compact b { font-size: 14px; }
.add-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 14px; }
.add-previews:empty { display: none; }
.add-tile { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--hover); display: flex; align-items: center; justify-content: center; }
.add-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.add-ext { font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.add-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 7px 5px; font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(19,19,22,.75)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; padding: 0; border-radius: 999px; border: none; background: rgba(19,19,22,.65); color: #fff; font-size: 15px; line-height: 1; font-weight: 400; }
.add-x:hover { background: rgba(19,19,22,.85); }
.add-loc { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 500; }
.add-loc select { width: auto; }
.add-progress { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.add-bar { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.add-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
@media (max-width: 640px) { .lib-head-actions { flex-wrap: wrap; } dialog.add-dialog { height: 100dvh; max-height: 100dvh; } }

/* List view: a long unbroken name (a camera or download file name) must not
   push the columns about (Ben, 1 Oct 2026). Flexible columns may shrink below
   their longest word; the name ends in an ellipsis instead. */
.list-head, .lib-grid[data-view=list] .lib-item { grid-template-columns: 280px minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 1.1fr) 90px 64px; }
.lib-grid[data-view=list] .lib-item > * { min-width: 0; }
.lib-grid[data-view=list] .meta .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) { .lib-grid[data-view=list] .lib-item { grid-template-columns: 220px minmax(0, 1fr); } }

/* Admin > Email templates: the wording on the left, what it sends on the right. */
.email-list .email-subject { font-size: 12px; margin-top: 3px; color: var(--ink); white-space: normal; }
.email-list .email-when { font-size: 12px; margin-top: 3px; white-space: normal; max-width: 720px; }
.email-edit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .email-edit { grid-template-columns: 1fr; } }
.email-edit textarea { font-size: 14px; }
.email-help { font-size: 12px; margin: 6px 0 0; }
.email-chip { cursor: pointer; font: inherit; font-size: 12px; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; padding: 2px 8px; margin: 2px 4px 2px 0; }
.email-fields { margin-top: 8px; font-size: 13px; }
.email-fields td { padding: 3px 8px 3px 0; vertical-align: top; white-space: normal; }
.email-fields td:first-child { white-space: nowrap; }
.email-previews { position: sticky; top: 16px; }
.email-preview { padding: 14px 16px; }
.email-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.email-subject-line { margin-bottom: 4px; }
.email-attached { font-size: 12px; margin-bottom: 8px; }
.email-body { white-space: pre-wrap; font-size: 14px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; }
/* Plan and billing: the full package leads, the core alone is the quieter second button */
.subscribe-form .coach-add { margin: 14px 0 12px; line-height: 1.45; }
.coach-includes { margin: 6px 0 12px; }
.subscribe-form button { display: block; width: 100%; }
.subscribe-form .subscribe-plain { margin-top: 8px; }
.pill.recommend { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.pill.ending { background: #fff; color: var(--ink); border: 1.5px dashed var(--ink); }   /* dashed, so it never rests on colour */
.plan-card .plan-btn { display: block; width: 100%; text-align: center; }
/* The change and done pages: one card, the facts in rows, the action at the foot */
.plan-step { max-width: 560px; }
.plan-step .step-rows { margin: 4px 0 18px; }
.plan-step .step-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.plan-step .step-row b { font-weight: 600; text-align: right; }
.plan-step .step-note { font-weight: 400; font-size: 12.5px; }
.plan-step .step-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-step .step-done { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
/* Your locations: one row a site, its state, its one or two actions */
table.sites { width: 100%; }
table.sites td { padding: 10px 6px; vertical-align: middle; }
table.sites .site-actions { text-align: right; white-space: nowrap; }
table.sites .site-actions form, table.sites .site-actions a { margin-left: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The top bar's location choice, beside the studio's logo: cream on ink, like the bar */
header.top .loc-switch { margin: 0; }
header.top .loc-switch select { background: transparent; color: var(--bar-ink); border: 1px solid rgba(244,241,234,.35); border-radius: 8px;
  padding: 5px 28px 5px 10px; font: inherit; font-size: 14px; font-weight: 600; max-width: 220px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F4F1EA' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
header.top .loc-switch select option { color: var(--ink); background: #fff; }
@media (max-width: 520px) { header.top .loc-switch select { max-width: 140px; font-size: 13px; } }
/* The itemised bill on the confirmation pages: a line a part, the one being added marked in words */
.plan-step .bill { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FBFAF7; }
.plan-step .bill-head { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); }
.plan-step .bill-line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--line); }
.plan-step .bill-line:first-of-type { border-top: none; }
.plan-step .bill-line small { display: block; color: var(--faint); font-size: 12.5px; }
.plan-step .bill-line em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1.5px solid var(--ink); margin-left: 4px; }
.plan-step .bill-line.adding b { text-decoration: underline; text-underline-offset: 3px; }
.plan-step .bill-total { border-top: 1.5px solid var(--ink); font-weight: 700; margin-top: 2px; }
/* The price on a plan card, with a small arrow that opens what makes it up (Ben, 2 Oct 2026) */
.price-more { margin: 10px 0 2px; }
.price-more > summary { list-style: none; cursor: pointer; display: block; }
.price-more > summary::-webkit-details-marker { display: none; }
.price-more .plan-price { display: block; margin: 0; }
.price-more .plan-yours { display: block; margin: 2px 0 0; }
.price-more .price-arrow { display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); margin: 0 0 4px 8px; transition: transform .15s ease; vertical-align: middle; }
.price-more[open] .price-arrow { transform: rotate(225deg); margin-bottom: -2px; }
.price-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.price-lines { margin: 8px 0 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FBFAF7; }
.price-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.price-line:first-child { border-top: none; }
.price-line small { color: var(--faint); font-size: 12px; }
.price-total { border-top: 1.5px solid var(--ink); font-weight: 700; }
.plan-step .bill-change { font-weight: 600; }
.plan-step .bill-change + .bill-head, .plan-step .bill > .bill-head:not(:first-child) { margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--ink); }
/* A card for something not built yet: greyed, a dashed "Coming soon" label (never colour alone), nothing usable */
.card.coming-soon { opacity: .6; }
.card.coming-soon input[disabled], .card.coming-soon button[disabled] { cursor: not-allowed; }
.pill.soon { background: #fff; color: var(--ink); border: 1.5px dashed var(--ink); }
/* The bill by location: the place, then what it has */
.plan-step .bill-group { border-top: 1px solid var(--line); padding: 6px 0 2px; }
.plan-step .bill-head + .bill-group { border-top: none; }
.plan-step .bill-place { font-size: 14px; font-weight: 600; padding: 2px 0; }
.plan-step .bill-place small { display: inline; margin-left: 6px; font-weight: 400; color: var(--faint); font-size: 12.5px; }
.plan-step .bill-item { border-top: none; padding: 3px 0 3px 14px; font-size: 13.5px; }
.price-place { font-size: 13px; font-weight: 600; padding: 6px 0 0; }
.price-place:first-child { padding-top: 0; }
.price-place small { font-weight: 400; color: var(--faint); }
.price-lines .price-line { padding-left: 12px; border-top: none; }
.price-lines .price-total { padding-left: 0; border-top: 1.5px solid var(--ink); }
table.sites .site-coach { font-size: 12.5px; margin-top: 3px; }

/* Your locations: one row per location, a column each for Studio Posts and the coach */
.locs { display: grid; }
.loc-row { display: grid; grid-template-columns: var(--loc-cols); gap: 16px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.loc-row.loc-head { border-top: 0; padding-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.loc-name b { font-size: 15.5px; }
.loc-name small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.loc-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.loc-cell form { display: inline; margin: 0; }
.loc-on { font-weight: 600; }
.loc-off { color: var(--faint); }
.loc-why { color: var(--faint); font-size: 12.5px; flex-basis: 100%; }
.loc-money { justify-content: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.loc-row.loc-total { border-top: 1.5px solid var(--ink); font-weight: 700; }
.loc-row.loc-total span { grid-column: 1 / -2; }
.loc-main { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.loc-main select { width: auto; min-width: 180px; }
@media (max-width: 720px) {
  .loc-row { grid-template-columns: 1fr; gap: 10px; }
  .loc-row.loc-head { display: none; }
  .loc-head + .loc-row { border-top: 0; padding-top: 0; }
  .loc-cell::before { content: attr(data-label); flex-basis: 100%; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
  .loc-money { justify-content: space-between; text-align: right; }
  .loc-money::before { flex-basis: auto; }
  .loc-row.loc-total { grid-template-columns: 1fr auto; }
  .loc-row.loc-total span { grid-column: auto; }
}

/* The reminder until a trial confirms its email: room below it before the page heading */
.confirm-note { margin: 0 0 18px; }

/* Admin > Messages pop-out: a channel with nothing built yet says so, not as a link */
.popout-none { display: block; padding: 7px 10px; font-size: 13px; color: var(--faint); font-style: italic; }

/* Admin > What leads to paying */
.conv-scroll { overflow-x: auto; margin: 0 0 8px; }
.conv-table th.num, .conv-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.conv-table thead th.num { white-space: normal; min-width: 84px; vertical-align: bottom; }
.conv-at { font-weight: 700; }
.conv-only { margin: 0 0 18px; color: var(--faint); }
.conv-only b { color: var(--ink); }
