/* Signaxo Studio: the portal's own styles on top of the Signaxo UI design sheet (portal_theme.css, signaxo.in/design).
   Components are the sheet's ui-* classes; this file only holds the frame (the shared dark sidebar, psb-*) and the
   layouts that are truly the studio's own (post frames, stepper, agenda, palettes). Colours come from var(--ui-…). */

/* Inter, self-hosted (the portals load the same faces from Google Fonts) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- base (no Tailwind preflight here) */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; }

/* ---------------------------------------------------------------- the shared sidebar (portal_sidebar.php, ported) */
/* Studio's own pair, the only per-portal colour: a deep oxblood with a coral accent. */

:root { --psb-w-open: 232px; --psb-w-rail: 68px; --psb-w: var(--psb-w-open); --psb-topbar-h: 0px; --psb-bg: #2a1010; --psb-accent: #fca5a5; }
:root.psb-collapsed { --psb-w: var(--psb-w-rail); }
.psb, .psb * { box-sizing: border-box; }
.psb { position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--psb-w); background: var(--psb-bg); color: #fff; display: flex; flex-direction: column; border-right: 1px solid rgb(255 255 255 / .08); font-family: var(--ui-font); font-size: 14px; line-height: 1.4; transition: width .2s ease, transform .25s ease; }
.psb-main { margin-left: var(--psb-w); transition: margin-left .2s ease; min-width: 0; }
.psb-icon { width: 18px; height: 18px; flex-shrink: 0; }
.psb-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 12px 16px 20px; border-bottom: 1px solid rgb(255 255 255 / .08); min-height: 72px; }
.psb-brand a { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; color: inherit; }
.psb-brand img { height: 22px; width: auto; max-width: 140px; object-fit: contain; object-position: left; display: block; }
.psb-brand span { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgb(255 255 255 / .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psb-toggle { background: none; border: 0; color: rgb(255 255 255 / .5); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background-color .15s, color .15s, transform .2s; }
.psb-toggle:hover { background: rgb(255 255 255 / .1); color: #fff; }
.psb-nav { flex: 1; padding: 12px 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; }
.psb-sep { height: 1px; margin: 8px 20px; background: rgb(255 255 255 / .08); flex: none; }
.psb-link { display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 22px; color: rgb(255 255 255 / .7); text-decoration: none; font-weight: 500; font-size: 14px; border-left: 3px solid transparent; white-space: nowrap; position: relative; background: none; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; transition: background-color .15s, color .15s; }
.psb-link > svg { width: 18px; height: 18px; flex-shrink: 0; }
.psb-link:hover { background: rgb(255 255 255 / .08); color: #fff; }
.psb-link.active { background: rgb(255 255 255 / .13); border-left-color: var(--psb-accent); color: #fff; font-weight: 600; }
.psb-link.active > svg { color: var(--psb-accent); }
.psb-text { overflow: hidden; text-overflow: ellipsis; }
.psb-extra { margin-left: auto; display: inline-flex; align-items: center; }
.psb-foot { border-top: 1px solid rgb(255 255 255 / .08); padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); }
.psb-foot .psb-link { font-size: 13px; padding-top: 8px; padding-bottom: 8px; color: rgb(255 255 255 / .62); }
.psb-foot .psb-signout:hover { color: #fca5a5; }
.psb-meta { display: block; padding: 4px 22px 8px; font-size: 12px; line-height: 1.35; color: rgb(255 255 255 / .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psb-meta small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgb(255 255 255 / .4); }
.psb-meta:hover { color: #fff; }
.psb-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .35); }
.psb-live.on { background: #34d399; }
.psb-live.busy { background: var(--psb-accent); animation: s-pulse 1.4s ease-in-out infinite; }
.psb-topbar, .psb-overlay { display: none; }

@media (min-width: 901px) {
  /* Auto-collapsed: an icon rail that opens over the page on hover; the toggle pins it open */
  :root.psb-collapsed .psb { width: var(--psb-w-rail); }
  :root.psb-collapsed .psb:not(.psb-hold):hover, :root.psb-collapsed .psb:not(.psb-hold):has(:focus-visible) { width: var(--psb-w-open); box-shadow: 8px 0 30px rgb(0 0 0 / .25); }
  :root.psb-collapsed .psb:is(.psb-hold, :not(:hover):not(:has(:focus-visible))) .psb-brand { justify-content: center; padding: 18px 0 16px; }
  :root.psb-collapsed .psb:is(.psb-hold, :not(:hover):not(:has(:focus-visible))) :is(.psb-brand a, .psb-text, .psb-meta) { display: none; }
  :root.psb-collapsed .psb:is(.psb-hold, :not(:hover):not(:has(:focus-visible))) .psb-extra { position: absolute; top: 3px; left: 36px; transform: scale(.8); transform-origin: left top; pointer-events: none; }
  :root.psb-collapsed .psb:is(.psb-hold, :not(:hover):not(:has(:focus-visible))) .psb-link { justify-content: center; padding-left: 0; padding-right: 3px; }
  :root.psb-collapsed .psb:is(.psb-hold, :not(:hover):not(:has(:focus-visible))) .psb-sep { margin-left: 16px; margin-right: 16px; }
  :root.psb-collapsed .psb-toggle { transform: rotate(180deg); }
}

@media (max-width: 900px) {
  :root { --psb-topbar-h: calc(56px + env(safe-area-inset-top)); }
  .psb { width: 260px; transform: translateX(-100%); }
  .psb-open .psb { transform: none; box-shadow: 0 20px 50px rgb(0 0 0 / .4); }
  .psb-main { margin-left: 0; }
  .psb-toggle { display: none; }
  .psb-brand { padding-top: calc(18px + env(safe-area-inset-top)); }
  .psb-topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 55; height: var(--psb-topbar-h); padding: env(safe-area-inset-top) 14px 0 calc(8px + env(safe-area-inset-left)); background: var(--psb-bg); color: #fff; }
  .psb-topbar button { background: none; border: 0; color: #fff; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; }
  .psb-topbar button .ui-count { position: absolute; top: 4px; right: 2px; }
  .psb-topbar img { height: 18px; width: auto; }
  .psb-topbar span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .6); }
  .psb-open .psb-overlay { display: block; position: fixed; inset: 0; z-index: 58; background: rgb(15 23 42 / .5); }
}

/* ---------------------------------------------------------------- layout helpers */

.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 20px; }
.stack > *, .stack-sm > *, .stack-lg > * { min-width: 0; }
.muted { color: var(--ui-muted); }
.faint { color: var(--ui-faint); }
.strong { font-weight: 600; color: var(--ui-text); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }

/* Two columns: the main column and a narrower aside (Today) */
.grid-main { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.split-media { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .split-media { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; } }
@media (min-width: 1180px) { .grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } }
.grid-thirds { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid-thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-create { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .grid-create { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); } }
.grid-main > *, .grid-2 > *, .grid-thirds > *, .grid-create > *, .split-media > * { min-width: 0; }

/* One line of context under the page header */
.s-lede { margin: -4px 0 20px; max-width: 760px; font-size: 14px; line-height: 20px; color: var(--ui-muted); }
/* A section heading inside the content, with a link on the right */
.s-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.s-head:first-child { margin-top: 0; }
.s-head .ui-link { font-size: 13px; }
.s-gap { height: 20px; }

/* Rows inside a card */
.s-list { list-style: none; margin: 0; padding: 0; }
.s-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; min-height: 60px; border-top: 1px solid var(--ui-border-soft); }
.s-list > li:first-child { border-top: 0; }
.s-list > li.is-click { cursor: pointer; transition: background-color .15s; }
.s-list > li.is-click:hover { background: var(--ui-surface-2); }
.s-list > li.top { align-items: flex-start; }
.s-list.compact > li { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
.s-row-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ui-text); }

/* A setting: what it does on the left, its control on the right */
.s-setting { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--ui-border-soft); }
.s-setting:first-child { border-top: 0; }
.s-setting .text { flex: 1; min-width: 0; }
.s-setting .text strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ui-text); }
.s-setting .text span { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--ui-muted); }
.s-setting .control { flex: none; display: flex; align-items: center; gap: 8px; max-width: 100%; }
.s-setting.stacked { display: grid; gap: 10px; }
.s-setting.stacked .control { flex-wrap: wrap; }
/* Type on the image: its controls on the left, a live sample on the right (stacked, sample first, on phones) */
.type-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--ui-border-soft); }
.type-settings > div:first-child > .s-setting:first-child { border-top: 0; }
.type-preview { padding: 16px 20px; border-left: 1px solid var(--ui-border-soft); }
.type-preview img { display: block; width: 216px; max-width: 100%; height: auto; border-radius: var(--ui-r-sm); box-shadow: 0 0 0 1px var(--ui-border); background: var(--ui-surface-3); }

/* Icon in a soft tile (connection cards) */
.s-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--ui-surface-3); color: var(--ui-text-2); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.s-tile svg { width: 18px; height: 18px; }
.s-tile img { width: 100%; height: 100%; object-fit: cover; }

/* Chips that hold a value (tags), with a remove button */
.s-chip-static { cursor: default; padding-right: 6px; }
.s-chip-static:hover { background: var(--ui-surface); border-color: var(--ui-border); }
.s-chip-x { width: 20px; height: 20px; border: 0; padding: 0; border-radius: 50%; background: none; color: var(--ui-faint); display: grid; place-items: center; cursor: pointer; }
.s-chip-x:hover { background: var(--ui-surface-3); color: var(--ui-text); }
.s-chip-x svg { width: 12px; height: 12px; stroke-width: 2.2; }

/* ---------------------------------------------------------------- posts: picture + palette strip */

.frame { position: relative; aspect-ratio: 4 / 5; border-radius: var(--ui-r); overflow: hidden; background: var(--ui-surface-3); }
.frame.square { aspect-ratio: 1 / 1; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame .over { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.swatches { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.swatches i { display: block; height: 100%; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.s-post { display: flex; flex-direction: column; overflow: hidden; }
.s-post .frame { border-radius: 0; }
.s-post .swatches { margin: 0; height: 4px; border-radius: 0; }
.s-post .meta { padding: 10px 14px 12px; min-width: 0; }
.s-post .meta strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ui-text); }
.s-post .meta span { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--ui-muted); }
.s-post .frame img { transition: transform .4s ease; }
.s-post:hover .frame img { transform: scale(1.015); }
@media (max-width: 520px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .s-post .meta { padding: 8px 10px 10px; } }

.s-thumb { width: 44px; aspect-ratio: 4 / 5; border-radius: var(--ui-r-sm); overflow: hidden; background: var(--ui-surface-3); flex: none; }
.s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-thumb.sm { width: 36px; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: grid; gap: 6px; justify-items: start; }
.swatch i { width: 40px; height: 40px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.swatch span { font: 500 11px/1 var(--ui-mono); color: var(--ui-muted); }
.chip-colour { display: inline-block; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); flex: none; }

.score { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ui-text); }

/* The post title, edited in place */
.s-title-input { display: block; width: calc(100% + 8px); margin-left: -8px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--ui-r-sm); background: transparent; font: 700 20px/28px var(--ui-font); letter-spacing: -.01em; color: var(--ui-text); outline: none; transition: border-color .15s, box-shadow .15s; }
.s-title-input:hover { border-color: var(--ui-border); }
.s-title-input:focus { border-color: var(--ui-brand-400); box-shadow: 0 0 0 3px var(--ui-ring); background: var(--ui-surface); }

/* ---------------------------------------------------------------- run stepper */

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; position: relative; }
.step::before { content: ""; position: absolute; left: 11px; top: 34px; bottom: -6px; width: 2px; background: var(--ui-border); }
.step:last-child::before { display: none; }
.step .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ui-surface-3); color: var(--ui-faint); }
.step .ic svg { width: 14px; height: 14px; stroke-width: 2.4; }
.step .ic .ui-spinner { width: 14px; height: 14px; }
.step.done .ic { background: var(--ui-success); color: #fff; }
.step.running .ic { background: var(--ui-primary-soft); }
.step.failed .ic { background: var(--ui-danger); color: #fff; }
.step.warning .ic { background: var(--ui-warning); color: #fff; }
.step .lbl { font-size: 14px; line-height: 24px; font-weight: 600; color: var(--ui-text); }
.step.pending .lbl, .step.skipped .lbl { color: var(--ui-muted); font-weight: 500; }
.step .det { font-size: 13px; line-height: 18px; color: var(--ui-muted); overflow-wrap: anywhere; }
.step .dur { font-size: 12px; line-height: 24px; color: var(--ui-faint); font-variant-numeric: tabular-nums; }
.attempts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.attempt { width: 72px; display: grid; gap: 4px; font: 600 11px/1 var(--ui-font); color: var(--ui-muted); text-align: center; border: 0; background: none; padding: 0; }
.attempt .frame { border-radius: var(--ui-r-sm); }
.attempt.pass { color: var(--ui-success-text); }
.attempt.in-use .frame { outline: 2px solid var(--ui-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------- scores */

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 128px minmax(0, 1fr) 32px; align-items: center; gap: 12px; font-size: 13px; color: var(--ui-text-2); }
.bar .track { height: 6px; border-radius: 999px; background: var(--ui-surface-3); overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: inherit; background: var(--ui-faint); }
.bar .track i.good { background: var(--ui-success); } .bar .track i.mid { background: var(--ui-warning); } .bar .track i.low { background: var(--ui-danger); }
.bar b { font-weight: 600; text-align: right; color: var(--ui-text); font-variant-numeric: tabular-nums; }
.strength { display: inline-flex; gap: 3px; flex: none; }
.strength i { width: 6px; height: 6px; border-radius: 50%; background: var(--ui-border-strong); }
.strength i.on { background: var(--ui-primary); }
.big-score { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; color: var(--ui-text); font-variant-numeric: tabular-nums; }
.big-score small { font-size: 16px; font-weight: 600; color: var(--ui-muted); }

/* ---------------------------------------------------------------- checklist */

.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ui-border-strong); display: grid; place-items: center; flex: none; background: var(--ui-surface); }
.check.on { background: var(--ui-success); border-color: var(--ui-success); color: #fff; }
.check svg { width: 12px; height: 12px; stroke-width: 2.6; }

/* ---------------------------------------------------------------- text blocks */

.quote { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; color: var(--ui-text); }
.quote.lg { font-size: 22px; line-height: 30px; letter-spacing: -.015em; }
.kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; line-height: 20px; }
.kv dt { color: var(--ui-muted); font-size: 13px; }
.kv dd { margin: 0; color: var(--ui-text-2); overflow-wrap: anywhere; }
.theme-item { display: grid; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--ui-border-soft); }
.theme-item:first-child { border-top: 0; }
.theme-item h4 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ui-text); }
.theme-item p { font-size: 13px; line-height: 19px; color: var(--ui-text-2); }
.theme-item .angle { padding-left: 12px; border-left: 2px solid var(--ui-brand-400); color: var(--ui-text); }
.refs { display: flex; gap: 6px; }
.refs .s-thumb { width: 40px; }
.preview-ig { background: var(--ui-surface-2); border: 1px solid var(--ui-border); border-radius: var(--ui-r); padding: 14px 16px; font-size: 14px; line-height: 20px; color: var(--ui-text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-ig b { font-weight: 600; color: var(--ui-text); margin-right: 6px; }
.preview-ig .tags { color: var(--ui-primary-text); }
.code-block { background: var(--ui-surface-2); border: 1px solid var(--ui-border); border-radius: var(--ui-r); padding: 14px 16px; font: 12.5px/1.6 var(--ui-mono); color: var(--ui-text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.s-bullets { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 19px; color: var(--ui-text-2); }

/* ---------------------------------------------------------------- competitors */

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.strip > * { scroll-snap-align: start; }
.strip .cp { display: grid; gap: 6px; font-size: 12px; color: var(--ui-muted); }
.strip .cp .frame { border-radius: var(--ui-r-sm); }
.is-paused { opacity: .6; }

/* ---------------------------------------------------------------- calendar */

.agenda-day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 16px 20px; border-top: 1px solid var(--ui-border-soft); }
.agenda-day:first-child { border-top: 0; }
.agenda-day .date strong { display: block; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ui-text); }
.agenda-day .date span { font-size: 12px; color: var(--ui-muted); }
.agenda-day .date.today strong { color: var(--ui-primary); }
.agenda-day .items { display: grid; gap: 8px; min-width: 0; }
.slot, .agenda-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--ui-r); min-width: 0; }
.slot { border: 1.5px dashed var(--ui-border-strong); }
.slot.skipped { opacity: .55; }
.agenda-item { border: 1px solid var(--ui-border); background: var(--ui-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.agenda-item:hover { border-color: var(--ui-primary-border); box-shadow: var(--ui-shadow-md); }
.time { font-size: 14px; font-weight: 700; color: var(--ui-text); font-variant-numeric: tabular-nums; min-width: 68px; }
.svc-icons { display: flex; gap: 6px; color: var(--ui-faint); flex: none; }

/* ---------------------------------------------------------------- brand */

.palette-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.palette-edit .pe { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--ui-r); border: 1px solid var(--ui-border); background: var(--ui-surface); min-width: 0; }
.palette-edit button.pe { justify-content: center; gap: 6px; border-style: dashed; color: var(--ui-primary); font: 600 13px/1 var(--ui-font); cursor: pointer; min-height: 54px; }
.palette-edit button.pe:hover { background: var(--ui-primary-soft); border-color: var(--ui-primary-border); }
.palette-edit button.pe svg { width: 16px; height: 16px; }
.palette-edit input[type="color"] { width: 36px; height: 36px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; flex: none; }
.palette-edit input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.palette-edit input[type="color"]::-webkit-color-swatch { border: 1px solid var(--ui-border); border-radius: 8px; }

.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); gap: 14px; }
.ref { position: relative; display: grid; gap: 8px; min-width: 0; }
.ref .frame { aspect-ratio: 1; background: #fff; border: 1px solid var(--ui-border); }
.ref .frame img { object-fit: contain; }
.ref .frame.logo { background: var(--ui-surface-3); }
.ref .frame.logo img { padding: 12px; }
.ref.on .frame { outline: 2px solid var(--ui-primary); outline-offset: 2px; }
.ref .tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ui-muted); min-width: 0; }
.s-file { position: relative; overflow: hidden; }
.s-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

/* ---------------------------------------------------------------- toasts with an action or a running job */

.ui-toast .grow small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; opacity: .7; }
.ui-toast .ui-spinner { border-color: rgb(255 255 255 / .25); border-top-color: #fff; width: 16px; height: 16px; margin-top: 1px; flex: none; }
.s-toast-action { border: 0; background: none; padding: 0 0 0 6px; color: var(--ui-brand-300); font: 600 13px/19px var(--ui-font); cursor: pointer; white-space: nowrap; }
.s-toast-action:hover { color: #fff; }

/* ---------------------------------------------------------------- sign in */

.s-login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--ui-bg); }
.s-login .ui-card { width: min(420px, 100%); padding: 36px 32px 32px; box-shadow: var(--ui-shadow-md); }
.s-login-mark { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--ui-primary-soft); color: var(--ui-primary); display: grid; place-items: center; }
.s-login-mark svg { width: 26px; height: 26px; }
.s-login h1 { text-align: center; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--ui-text); }
.s-login p.ui-text { margin-top: 4px; text-align: center; color: var(--ui-muted); }
.s-pw { position: relative; }
.s-pw > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ui-faint); pointer-events: none; }
.s-pw .ui-input { padding-left: 36px; padding-right: 44px; height: var(--ui-h-lg); }
.s-pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; border-radius: var(--ui-r-sm); color: var(--ui-faint); cursor: pointer; display: grid; place-items: center; }
.s-pw button:hover { color: var(--ui-text-2); background: var(--ui-surface-3); }
.s-pw button svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- dialog parts, phones */

.s-foot-split { justify-content: space-between; flex-wrap: wrap; }
.s-foot-split .ui-btn-group { justify-content: flex-end; }
/* ⋯ menus */
.s-menu { position: relative; flex: none; }
.s-menu > .ui-pop { top: calc(100% + 6px); right: 0; }
.s-menu > .ui-pop.s-pop-up { top: auto; bottom: calc(100% + 6px); right: auto; left: 0; }
@media (min-width: 640px) { .only-sm { display: none !important; } }
.s-radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--ui-border); border-radius: var(--ui-r); cursor: pointer; transition: border-color .15s, background-color .15s; }
.s-radio:hover { border-color: var(--ui-border-strong); }
.s-radio.on { border-color: var(--ui-primary-border); background: var(--ui-primary-soft); }
.s-radio input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--ui-primary); flex: none; }

@media (max-width: 639px) {
  .hide-sm { display: none !important; }
  .agenda-day { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .bar { grid-template-columns: 96px minmax(0, 1fr) 28px; }
  /* a wide control drops below its label instead of squeezing it */
  .s-setting { padding: 14px 16px; flex-wrap: wrap; row-gap: 10px; }
  .s-setting .text { flex: 1 1 180px; }
  .type-settings { grid-template-columns: minmax(0, 1fr); }
  .type-preview { order: -1; border-left: 0; padding: 16px; }
  .s-list > li { padding-left: 16px; padding-right: 16px; }
  .s-login .ui-card { padding: 28px 20px 24px; }
}

@keyframes s-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Text layouts: wireframe tiles (Settings › Text on the image, the post's Text tab, Create) */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; width: 100%; }
.layout-tile { display: grid; gap: 8px; align-content: start; min-height: 44px; padding: 10px; border: 1px solid var(--ui-border); border-radius: var(--ui-r); background: var(--ui-surface); color: var(--ui-text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.layout-tile:hover:not(:disabled) { border-color: var(--ui-border-strong); }
.layout-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ui-ring); }
.layout-tile[aria-pressed="true"] { border-color: var(--ui-primary-border); background: var(--ui-primary-soft); }
.layout-tile[aria-pressed="false"] .layout-mark { opacity: .5; }
.layout-tile:disabled { cursor: default; }
.layout-tile > span { font-size: 12px; line-height: 16px; font-weight: 500; }
.layout-mark { display: block; width: 100%; max-width: 72px; height: auto; }
.layout-mark .frame { fill: var(--ui-surface-3); stroke: var(--ui-border); stroke-width: 1; }
.layout-mark .p { fill: var(--ui-border-strong); opacity: .55; }
.layout-mark .b { fill: var(--ui-text); }
.layout-mark .l { fill: var(--ui-text); opacity: .45; }
.layout-mark .s, .layout-mark .c { fill: var(--ui-text-2); }
.layout-mark .r { stroke: var(--ui-text-2); stroke-width: .4; }
.layout-grid.compact { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.layout-grid.compact .layout-tile { padding: 8px; gap: 6px; }
.layout-grid.compact .layout-mark { max-width: 44px; }
.s-callout-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
@media (max-width: 639px) { .s-callout-row { grid-template-columns: minmax(0, 1fr); } }
