@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&display=swap");
/* Tukko: the component classes. Every colour, radius, space and timing comes from tokens.css. */

.os { font-family: var(--font-sans); font-size: 14px; line-height: 1.5; color: var(--ink); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.os *, .os *::before, .os *::after { box-sizing: border-box; }
.os :focus-visible { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.os a:not([class]) { color: var(--primary-ink); }
.os button { font: inherit; cursor: pointer; }
.os svg.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.os .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* App frame: side menu + page. The menu stacks above the page under 760px. */
.os-app { display: flex; flex-wrap: wrap; min-height: 100%; background: var(--ground); }
.os-app__page { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.os-app__main { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); }

/* Side menu */
.os-rail { flex: 1 1 var(--rail-width); max-width: 100%; background: var(--rail); color: var(--on-rail); border-right: 1px solid var(--rail-edge); display: flex; flex-direction: column; }
.os-rail__brand { height: var(--bar-height); display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--rail-active); font-weight: 700; font-size: 16px; letter-spacing: .02em; color: var(--on-rail-active); }
.os-rail__brand span { font-weight: 500; color: var(--on-rail-muted); }
.os-rail__mark { width: 30px; height: 30px; border-radius: var(--radius-m); background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0; }
.os-rail__label { margin: 14px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-rail-muted); }
.os-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.os-nav__item { display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 8px 12px; border-radius: var(--radius-m); color: var(--on-rail); text-decoration: none; }
.os-nav__item:hover { background: var(--rail-active); }
.os-nav__item[aria-current="page"] { background: var(--rail-active); color: var(--on-rail-active); font-weight: 600; }
.os-nav__text { flex-grow: 1; }
.os-nav__badge { border-radius: var(--radius-s); padding: 1px 7px; font-size: 11px; font-weight: 700; }
.os-nav__badge--count { background: var(--danger); color: var(--on-danger); }
.os-nav__badge--new { background: var(--tile-blue); color: var(--on-tile); }
.os-plan { margin: auto 14px 18px; padding: var(--space-4); border-radius: var(--radius-l); background: var(--rail-active); display: flex; flex-direction: column; gap: var(--space-2); font-size: 13px; }
.os-plan strong { color: var(--on-rail-active); font-size: 14px; }

/* Setup steps, in the side menu */
.os-steps { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.os-step { width: 100%; display: flex; gap: var(--space-3); align-items: center; padding: 10px 12px; border: none; border-radius: var(--radius-m); background: transparent; color: var(--on-rail); text-align: left; }
.os-step[aria-current="step"] { background: var(--rail-active); color: var(--on-rail-active); }
.os-step__dot { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--rail-active); color: var(--on-rail-muted); }
.os-step[aria-current="step"] .os-step__dot { background: var(--primary); color: var(--on-primary); }
.os-step.is-done .os-step__dot { background: var(--success); color: var(--on-success); }
.os-step__name { display: block; font-weight: 600; }
.os-step__hint { display: block; font-size: 12px; color: var(--on-rail-muted); }

/* Top bar and breadcrumb */
.os-topbar { height: var(--bar-height); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 var(--space-6); }
.os-topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.os-search { flex: 0 1 320px; min-width: 0; height: 38px; display: flex; align-items: center; gap: var(--space-2); padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--radius-m); color: var(--ink-muted); background: var(--surface); }
.os-search input { border: none; outline: none; flex-grow: 1; min-width: 0; background: transparent; color: var(--ink); font: inherit; }
.os-avatar { width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--primary-wash); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.os-crumbs { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px var(--space-6); color: var(--ink-muted); }

/* Buttons */
.os-btn { height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 16px; border-radius: var(--radius-m); border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: transform var(--duration-fast) var(--ease-press); }
.os-btn:active { transform: scale(.97); }
.os-btn--primary { background: var(--button-primary-bg); color: var(--button-primary-fg); }
.os-btn--secondary { background: var(--button-secondary-bg); color: var(--ink); border-color: var(--button-secondary-border); }
.os-btn--ghost { background: transparent; color: var(--primary-ink); }
.os-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.os-btn--approved { background: var(--success); color: var(--on-success); }
.os-btn[disabled] { background: var(--line); color: var(--ink-muted); border-color: var(--line); cursor: not-allowed; transform: none; }
.os-play { width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-pill); border: none; background: var(--ink); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.os-play svg { width: 12px; height: 12px; fill: currentColor; }

/* Badges */
.os-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-s); padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.os-badge--success { background: var(--success-wash); color: var(--success-ink); }
.os-badge--warning { background: var(--warning-wash); color: var(--warning-ink); }
.os-badge--primary { background: var(--primary-wash); color: var(--primary-ink); }
.os-badge--neutral { background: var(--surface-sunk); color: var(--ink-muted); }

/* Stat tiles */
.os-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.os-tile { border-radius: var(--radius-l); padding: 18px 20px 12px; display: flex; flex-direction: column; gap: 2px; color: var(--on-tile); min-height: 150px; }
.os-tile--violet { background: var(--tile-violet); }
.os-tile--blue { background: var(--tile-blue); }
.os-tile--amber { background: var(--tile-amber); color: var(--on-amber); }
.os-tile--red { background: var(--tile-red); }
.os-tile__figure { font-size: 24px; line-height: 1.2; font-weight: 700; }
.os-tile__figure small { font-size: 14px; font-weight: 500; }
.os-tile__label { font-weight: 500; }
.os-tile__chart { margin-top: auto; height: 56px; display: flex; align-items: flex-end; gap: 4px; }
.os-tile__chart > span { flex-grow: 1; border-radius: 2px 2px 0 0; background: currentColor; opacity: .5; }
.os-tile__chart > span.is-now { opacity: .9; }
.os-tile__chart svg { width: 100%; height: 56px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .75; }

/* Cards */
.os-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-l); box-shadow: var(--shadow-card); }
.os-card__head { padding: 18px var(--space-6); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.os-card__title { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
.os-card__sub { margin: 0; color: var(--ink-muted); }
.os-card__body { padding: 0 var(--space-6) var(--space-6); }
.os-card__foot { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.os-card__stat { padding: 14px var(--space-6); display: flex; flex-direction: column; gap: 6px; text-align: center; }
.os-card__stat span:first-child { color: var(--ink-muted); }
.os-meter { height: 4px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.os-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }

/* Items: one row of a list. Media on the left, words in the middle, meta and actions on the right. */
.os-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.os-items--flush { gap: 0; }
.os-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); text-decoration: none; }
.os-item--outline { border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.os-items--flush .os-item { border-radius: 0; padding-inline: 0; border-top: 1px solid var(--line); }
.os-items--flush .os-item:first-child { border-top: none; }
a.os-item:hover, .os-item--hover:hover { background: var(--surface-sunk); }
.os-item.is-selected { background: var(--primary-wash); border-color: var(--primary); }
.os-item__media { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-m); overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-sunk); color: var(--ink-muted); }
.os-item__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-item__media--icon { width: 40px; height: 40px; }
.os-item__media--reel { width: 36px; height: 64px; border-radius: var(--radius-s); }
.os-item__body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.os-item__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-item__title span { font-weight: 400; color: var(--ink-muted); }
.os-item__desc { font-size: 13px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-item__meta { flex-shrink: 0; font-size: 13px; color: var(--ink-muted); }
.os-item__actions { flex-shrink: 0; display: flex; align-items: center; gap: var(--space-2); }

/* Tables */
.os-table-wrap { overflow-x: auto; }
.os-table { width: 100%; border-collapse: collapse; }
.os-table th { background: var(--surface-sunk); color: var(--ink-muted); text-align: left; font-size: 12px; font-weight: 600; padding: 10px 12px; }
.os-table td { border-top: 1px solid var(--line); padding: 12px; vertical-align: middle; }
.os-table th:first-child, .os-table td:first-child { padding-left: var(--space-6); }
.os-table th:last-child, .os-table td:last-child { padding-right: var(--space-6); }
.os-table small { display: block; font-size: 12px; color: var(--ink-muted); }

/* Controls */
.os-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.os-field input, .os-field select { height: var(--control-height); padding: 0 12px; border: 1px solid var(--field-border); border-radius: var(--radius-m); background: var(--field-bg); color: var(--ink); font: 400 14px/1.4 var(--font-sans); }
.os-field input:focus-visible, .os-field select:focus-visible { border-color: var(--field-border-focus); }
.os-field__hint { font-weight: 400; color: var(--ink-muted); }
.os-switch { width: 44px; height: 26px; flex-shrink: 0; padding: 3px; border-radius: var(--radius-pill); border: 1px solid var(--edge); background: var(--surface-sunk); display: inline-flex; justify-content: flex-start; transition: background var(--duration-base) var(--ease-out); }
.os-switch::after { content: ""; width: 18px; height: 18px; border-radius: var(--radius-pill); background: var(--edge); transition: transform var(--duration-base) var(--ease-out); }
.os-switch[aria-checked="true"] { background: var(--primary); border-color: var(--primary); }
.os-switch[aria-checked="true"]::after { background: var(--on-primary); transform: translateX(18px); }
.os-seg { display: inline-flex; border: 1px solid var(--edge); border-radius: var(--radius-m); overflow: hidden; }
.os-seg button { height: 36px; padding: 0 14px; border: none; background: var(--surface); color: var(--ink); }
.os-seg button + button { border-left: 1px solid var(--edge); }
.os-seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 600; }

/* Reel thumbnail: the customer's own colours live only inside it */
.os-reel { aspect-ratio: 9 / 16; max-width: 100%; border-radius: var(--radius-m); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center; }
.os-reel__badge { border-radius: var(--radius-pill); padding: 1px 7px; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.os-reel__title { font-family: Georgia, serif; font-weight: 700; font-size: 12px; line-height: 1.15; }



/* Logo: inline SVG of the sticker (fixed colours) and the lettering, which reads --logo-lettering (or set color on .os-logo--on-dark) */
.os-logo { display: inline-flex; align-items: center; color: var(--logo-lettering); line-height: 0; }
.os-logo svg { display: block; height: 100%; width: auto; }
.os-logo--on-dark { --logo-lettering: var(--on-rail-active); }
.os-rail__logo { height: 28px; }

/* Sheets: bottom sheet on phones, side sheet on desktop, always over a scrim */
.os-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-sheet); display: flex; align-items: flex-end; justify-content: center; animation: os-fade var(--duration-slow) var(--ease-out); }
.os-scrim--side { align-items: stretch; justify-content: flex-end; }
.os-sheet { width: 100%; max-width: var(--sheet-max); background: var(--sheet-bg); color: var(--ink); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-sheet); padding: var(--space-2) var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); animation: os-rise var(--duration-slow) var(--ease-out); }
.os-scrim--side .os-sheet { border-radius: 0; padding-top: var(--space-6); animation-name: os-slide; }
.os-sheet__handle { width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--edge); align-self: center; margin: 4px 0; }
.os-scrim--side .os-sheet__handle { display: none; }
.os-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.os-sheet__title { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
.os-sheet__sub { margin: 4px 0 0; color: var(--ink-muted); }
.os-sheet__actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }
.os-icon-btn { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-pill); border: none; background: var(--surface-sunk); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
@keyframes os-fade { from { opacity: 0; } }
@keyframes os-rise { from { transform: translateY(100%); } }
@keyframes os-slide { from { transform: translateX(100%); } }

/* Tab bar: the phone's main menu, at the bottom */
.os-tabbar { position: sticky; bottom: 0; z-index: var(--z-sticky); min-height: var(--tabbar-height); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--tabbar-bg); border-top: 1px solid var(--line); }
.os-tab { position: relative; min-height: var(--touch-min); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink-muted); text-decoration: none; }
.os-tab svg.icon { width: var(--icon-l); height: var(--icon-l); }
.os-tab[aria-current="page"] { color: var(--tabbar-active); }
.os-tab__count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--danger); color: var(--on-danger); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Reel card: a Reel as the phone will show it, with when it goes out and what to do */
.os-reelcard { width: 100%; max-width: 220px; display: flex; flex-direction: column; gap: var(--space-2); }
.os-reelcard__frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-xl); border: 5px solid var(--reelcard-frame); overflow: hidden; }
.os-reelcard__frame > .os-reel, .os-reelcard__frame > img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; display: flex; }
.os-reelcard__play { position: absolute; left: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: var(--radius-pill); border: none; background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-pop); }
.os-reelcard__play svg { width: 14px; height: 14px; fill: currentColor; }
.os-reelcard__len { position: absolute; right: 8px; bottom: 18px; border-radius: var(--radius-s); padding: 1px 6px; background: var(--rail); color: #ffffff; font-size: 11px; font-weight: 600; }
.os-reelcard__when { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); font-size: 13px; color: var(--ink-muted); }
.os-reelcard__when strong { color: var(--ink); font-weight: 600; }
.os-reelcard__title { margin: 0; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.os-reelcard__actions { display: flex; align-items: center; gap: var(--space-2); }

/* Display type: the friendly face, for marketing and big moments only */
.os-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  .os-btn, .os-switch, .os-switch::after { transition: none; }
  .os-btn:active { transform: none; }
  .os-scrim, .os-sheet { animation: none; }
}

/* Task list: what we're doing for someone, step by step (done, doing now, still to do). tasks.js updates it live. */
.os-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.os-task { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; color: var(--ink); }
.os-task__dot {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); background: var(--surface); color: transparent; font-size: 13px; font-weight: 700; line-height: 1;
}
.os-task__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.os-task__label { font-weight: 500; }
.os-task__detail { font-size: 13px; color: var(--ink-muted); overflow-wrap: anywhere; }
.os-task.is-todo .os-task__label { color: var(--ink-muted); font-weight: 400; }
.os-task.is-done .os-task__dot { border-color: var(--success); background: var(--success); color: var(--on-success); }
.os-task.is-done .os-task__dot::before { content: "✓"; }
.os-task.is-warn .os-task__dot { border-color: var(--warning-ink); background: var(--warning-wash); color: var(--warning-ink); }
.os-task.is-warn .os-task__dot::before { content: "!"; }
.os-task.is-doing .os-task__dot { border-color: var(--primary-wash); border-top-color: var(--primary); animation: os-spin .8s linear infinite; }
@keyframes os-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .os-task.is-doing .os-task__dot { animation: none; border-color: var(--primary); }
}

/* ---------- Director frame (chosen 28 November 2026): icon dock, top bar of pills, phone tab bar ---------- */
.os-dir { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: 100vh; background: var(--ground); }
.os-dock { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--rail); border-right: 1px solid var(--rail-edge); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 0; }
.os-dock__brand { display: block; width: 40px; height: 40px; margin-bottom: 12px; border-radius: var(--radius-l); }
.os-dock__brand .os-logo { height: 40px; }
.os-dock__item { position: relative; width: 60px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: var(--radius-l); color: var(--on-rail); text-decoration: none; font-size: 10.5px; font-weight: 500; line-height: 1.15; text-align: center; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast); }
.os-dock__item svg.icon { width: 20px; height: 20px; }
.os-dock__item:hover { background: var(--surface-sunk); color: var(--ink); }
.os-dock__item[aria-current="page"] { background: var(--rail-active); color: var(--on-rail-active); font-weight: 600; }
.os-dock__count { position: absolute; top: 4px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-amber); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.os-dock__gap { flex: 1; min-height: 12px; }
.os-dock__rule { width: 32px; height: 1px; background: var(--rail-edge); margin: 6px 0; }
.os-dir__page { min-width: 0; display: flex; flex-direction: column; }
.os-bar { min-height: var(--bar-height); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding: 10px 28px; }
.os-bar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.os-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
a.os-pill:hover { border-color: var(--primary); color: var(--primary-ink); }
.os-pill img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: var(--surface-sunk); }
.os-pill strong { font-weight: 700; }
.os-pill--turn { background: var(--accent); border-color: var(--accent); color: var(--on-amber); font-weight: 600; }
a.os-pill--turn:hover { color: var(--on-amber); border-color: var(--amber-500); }
.os-dir__main { padding: 8px 28px 40px; display: flex; flex-direction: column; gap: var(--space-6); }
.os-theme { width: 36px; height: 36px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.os-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* The account switcher sits in the top bar as a pill */
.os-bar .acct { margin: 0; }
.os-bar .acct > summary { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 12px 4px 4px; min-height: 36px; }
.os-bar .acct > summary:hover, .os-bar .acct[open] > summary { background: var(--surface); border-color: var(--primary); }
.os-bar .acct__mark { width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--surface-sunk); }
.os-bar .acct__sub, .os-bar .acct__chev { color: var(--ink-muted); }
.os-bar .acct__pop { right: auto; min-width: 280px; }
/* Phone: the dock becomes a tab bar with New Reel in the middle */
.os-dir .os-tabbar { display: none; }
.os-tab--make { margin-top: -18px; }
.os-tab--make > span:first-child { width: 52px; height: 52px; border-radius: 16px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: var(--shadow-pop); }
.os-more { position: relative; }
.os-more > summary { list-style: none; cursor: pointer; height: 100%; }
.os-more > summary::-webkit-details-marker { display: none; }
.os-more__pop { position: absolute; right: 8px; bottom: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.os-more__pop a, .os-more__pop button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: var(--radius-m); color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.os-more__pop a:hover, .os-more__pop button:hover { background: var(--surface-sunk); }
@media (max-width: 760px) {
  .os-dir { grid-template-columns: minmax(0, 1fr); }
  .os-dock { display: none; }
  .os-bar { padding: 10px 16px; }
  .os-dir__main { padding: 8px 16px 96px; }
  .os-dir .os-tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; }
  .os-bar__wide { display: none; }
}

/* Hero: the prompt comes first */
.os-hero { position: relative; max-width: 860px; width: 100%; margin: 20px auto 0; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.os-hero::before { content: ""; position: absolute; inset: -60px -10% auto; height: 320px; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 40%, var(--glow-1), transparent 60%), radial-gradient(ellipse at 75% 50%, var(--glow-2), transparent 60%); }
.os-hero > * { position: relative; }
.os-hero__title { margin: 0; font: 700 clamp(28px, 3.6vw, 44px)/1.08 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.os-hero__title em { font-style: normal; color: var(--primary); background: linear-gradient(transparent 62%, var(--highlight) 62% 90%, transparent 90%); padding: 0 4px; }
.os-hero .os-suggest { justify-content: center; }

/* Composer: what should Tukko make? Modes, the words, attachments, options and the cost */
.os-composer { text-align: left; background: var(--surface); border: 1px solid var(--composer-border); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.os-composer__modes { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.os-mode { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 12px; border: 0; border-radius: var(--radius-m); background: transparent; color: var(--ink-muted); font: 500 14px/1.2 var(--font-sans); white-space: nowrap; text-decoration: none; cursor: pointer; }
.os-mode:hover { color: var(--ink); background: var(--surface-sunk); }
.os-mode[aria-pressed="true"], .os-mode[aria-current="true"] { background: var(--primary-wash); color: var(--primary-ink); font-weight: 600; }
.os-composer textarea { display: block; width: 100%; min-height: 96px; border: 0; border-radius: 0; resize: vertical; background: transparent; color: var(--ink); font: 400 17px/1.5 var(--font-sans); padding: 18px 18px 8px; outline: none; }
.os-composer textarea::placeholder { color: var(--ink-muted); }
.os-composer__foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--composer-foot); }
.os-composer__cost { margin-left: auto; font-size: 12px; color: var(--ink-muted); }
.os-composer:focus-within { border-color: var(--primary); }
.os-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); font-size: 13px; color: var(--ink); }
.os-opt--on { border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.os-suggest { display: flex; gap: 8px; flex-wrap: wrap; }
.os-sug { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 500 13px/1.2 var(--font-sans); text-decoration: none; cursor: pointer; }
.os-sug:hover { border-color: var(--primary); color: var(--primary-ink); }
.os-badge--next { background: var(--warning-wash); color: var(--warning-ink); }

/* Reel statuses: one colour and dot per stage */
.os-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.os-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.os-st--idea, .os-st--making { color: var(--ink-muted); }
.os-st--approve { color: var(--warning-ink); }
.os-st--scheduled { color: var(--primary-ink); }
.os-st--posted { color: var(--success-ink); }
.os-st--failed { color: var(--danger); }
.os-st--skipped { color: var(--ink-muted); text-decoration: line-through; }

/* Reel strip: Reels side by side, scrolling sideways */
.os-strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.os-strip__reel { width: 160px; flex: none; display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; scroll-snap-align: start; }
.os-strip__frame { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-sunk); }
.os-strip__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-strip__title { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.os-strip__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }
a.os-strip__reel:hover .os-strip__title { text-decoration: underline; }
a.os-strip__reel:focus-visible { outline: none; }
a.os-strip__reel:focus-visible .os-strip__frame { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.os-section { display: flex; flex-direction: column; gap: 12px; }
.os-section__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.os-section__title { margin: 0; font-size: 16px; font-weight: 600; }

/* The Tukko loader: the sticker gecko bobs and tilts while Tukko works */
.os-chomp { display: inline-block; flex: none; width: 48px; height: 48px; line-height: 0; }
.os-chomp svg { display: block; width: 100%; height: 100%; }
.os-chomp .tile { transform-box: fill-box; transform-origin: center; animation: os-bob 2.4s var(--ease-out) infinite; }
@keyframes os-bob { 0%, 100% { transform: scale(1) rotate(0); } 10% { transform: scale(.94) rotate(-4deg); } 14% { transform: scale(1.02) rotate(2deg); } 30% { transform: scale(.95) rotate(-3deg); } 34% { transform: scale(1.01); } 50% { transform: scale(.95) rotate(-2deg); } 54% { transform: scale(1); } }
.os-chomp--s { width: 20px; height: 20px; } .os-chomp--m { width: 48px; height: 48px; } .os-chomp--l { width: 72px; height: 72px; } .os-chomp--xl { width: 120px; height: 120px; }
.os-wait { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius-l); background: var(--surface-sunk); }
.os-wait__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.os-wait__text strong { font-size: 15px; }
.os-wait progress { width: 100%; height: 8px; margin-top: 8px; appearance: none; border: 0; border-radius: var(--radius-pill); background: var(--surface); overflow: hidden; accent-color: var(--primary); }
.os-wait progress::-webkit-progress-bar { background: var(--surface); border-radius: var(--radius-pill); }
.os-wait progress::-webkit-progress-value { background: var(--primary); border-radius: var(--radius-pill); }
.os-wait progress::-moz-progress-bar { background: var(--primary); border-radius: var(--radius-pill); }
.os-wait.is-error { border-style: solid; border-color: var(--danger); }
.os-wait.is-error .os-chomp { display: none; }
@media (prefers-reduced-motion: reduce) {
  .os-chomp .tile { animation: none; transform: none; }
  .os-dock__item { transition: none; }
}
