/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
      "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --color-red-100: oklch(93.6% 0.032 17.717);
    --color-red-400: oklch(70.4% 0.191 22.216);
    --color-red-500: oklch(63.7% 0.237 25.331);
    --color-red-900: oklch(39.6% 0.141 25.723);
    --color-red-950: oklch(25.8% 0.092 26.042);
    --color-amber-100: oklch(96.2% 0.059 95.617);
    --color-amber-400: oklch(82.8% 0.189 84.429);
    --color-amber-500: oklch(76.9% 0.188 70.08);
    --color-amber-800: oklch(47.3% 0.137 46.201);
    --color-amber-900: oklch(41.4% 0.112 45.904);
    --color-amber-950: oklch(27.9% 0.077 45.635);
    --color-yellow-400: oklch(85.2% 0.199 91.936);
    --color-yellow-500: oklch(79.5% 0.184 86.047);
    --color-green-400: oklch(79.2% 0.209 151.711);
    --color-green-500: oklch(72.3% 0.219 149.579);
    --color-emerald-600: oklch(59.6% 0.145 163.225);
    --color-sky-400: oklch(74.6% 0.16 232.661);
    --color-sky-600: oklch(58.8% 0.158 241.966);
    --color-blue-500: oklch(62.3% 0.214 259.815);
    --color-blue-600: oklch(54.6% 0.245 262.881);
    --color-fuchsia-300: oklch(83.3% 0.145 321.434);
    --color-fuchsia-700: oklch(51.8% 0.253 323.949);
    --color-rose-300: oklch(81% 0.117 11.638);
    --color-rose-400: oklch(71.2% 0.194 13.428);
    --color-rose-500: oklch(64.5% 0.246 16.439);
    --color-slate-300: oklch(86.9% 0.022 252.894);
    --color-gray-100: oklch(96.7% 0.003 264.542);
    --color-gray-300: oklch(87.2% 0.01 258.338);
    --color-gray-400: oklch(70.7% 0.022 261.325);
    --color-gray-500: oklch(55.1% 0.027 264.364);
    --color-gray-600: oklch(44.6% 0.03 256.802);
    --color-gray-800: oklch(27.8% 0.033 256.848);
    --color-zinc-500: oklch(55.2% 0.016 285.938);
    --color-neutral-100: oklch(97% 0 none);
    --color-neutral-200: oklch(92.2% 0 none);
    --color-neutral-300: oklch(87% 0 none);
    --color-neutral-400: oklch(70.8% 0 none);
    --color-neutral-500: oklch(55.6% 0 none);
    --color-neutral-600: oklch(43.9% 0 none);
    --color-neutral-700: oklch(37.1% 0 none);
    --color-neutral-800: oklch(26.9% 0 none);
    --color-neutral-900: oklch(20.5% 0 none);
    --color-neutral-950: oklch(14.5% 0 none);
    --color-black: #000;
    --color-white: #fff;
    --spacing: 0.25rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-3xl: 48rem;
    --container-4xl: 56rem;
    --container-5xl: 64rem;
    --text-xs: 0.75rem;
    --text-xs--line-height: calc(1 / 0.75);
    --text-sm: 0.875rem;
    --text-sm--line-height: calc(1.25 / 0.875);
    --text-base: 1rem;
    --text-base--line-height: calc(1.5 / 1);
    --text-lg: 1.125rem;
    --text-lg--line-height: calc(1.75 / 1.125);
    --text-xl: 1.25rem;
    --text-xl--line-height: calc(1.75 / 1.25);
    --text-2xl: 1.5rem;
    --text-2xl--line-height: calc(2 / 1.5);
    --text-3xl: 1.875rem;
    --text-3xl--line-height: calc(2.25 / 1.875);
    --text-4xl: 2.25rem;
    --text-4xl--line-height: calc(2.5 / 2.25);
    --text-5xl: 3rem;
    --text-5xl--line-height: 1;
    --text-6xl: 3.75rem;
    --text-6xl--line-height: 1;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-relaxed: 1.625;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    --blur-md: 12px;
    --blur-xl: 24px;
    --aspect-video: 16 / 9;
    --default-transition-duration: 150ms;
    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring:where(:not(iframe)) {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .\@container {
    container-type: inline-size;
  }
  .\@container-\[size\] {
    container-type: size;
  }
  .pointer-events-auto {
    pointer-events: auto;
  }
  .pointer-events-none {
    pointer-events: none;
  }
  .collapse {
    visibility: collapse;
  }
  .invisible {
    visibility: hidden;
  }
  .visible {
    visibility: visible;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
  }
  .absolute {
    position: absolute;
  }
  .fixed {
    position: fixed;
  }
  .relative {
    position: relative;
  }
  .static {
    position: static;
  }
  .sticky {
    position: sticky;
  }
  .-inset-full {
    inset: -100%;
  }
  .inset-\(--cut\) {
    inset: var(--cut);
  }
  .inset-0 {
    inset: 0px;
  }
  .inset-\[0\%_0px\] {
    inset: 0% 0px;
  }
  .inset-px {
    inset: 1px;
  }
  .inset-x-0 {
    inset-inline: 0px;
  }
  .inset-y-0 {
    inset-block: 0px;
  }
  .-top-16 {
    top: calc(var(--spacing) * -16);
  }
  .-top-\[12\%\] {
    top: calc(12% * -1);
  }
  .top-0 {
    top: 0px;
  }
  .top-1 {
    top: var(--spacing);
  }
  .top-1\/2 {
    top: calc(1 / 2 * 100%);
  }
  .top-2 {
    top: calc(var(--spacing) * 2);
  }
  .top-8 {
    top: calc(var(--spacing) * 8);
  }
  .top-full {
    top: 100%;
  }
  .right-0 {
    right: 0px;
  }
  .right-2 {
    right: calc(var(--spacing) * 2);
  }
  .bottom-0 {
    bottom: 0px;
  }
  .bottom-1 {
    bottom: var(--spacing);
  }
  .left-\(--x\) {
    left: var(--x);
  }
  .left-0 {
    left: 0px;
  }
  .left-1\.5 {
    left: calc(var(--spacing) * 1.5);
  }
  .left-1\/2 {
    left: calc(1 / 2 * 100%);
  }
  .left-\[var\(--ray-left\)\] {
    left: var(--ray-left);
  }
  .isolate {
    isolation: isolate;
  }
  .-z-10 {
    z-index: calc(10 * -1);
  }
  .-z-20 {
    z-index: calc(20 * -1);
  }
  .-z-30 {
    z-index: calc(30 * -1);
  }
  .z-0 {
    z-index: 0;
  }
  .z-1 {
    z-index: 1;
  }
  .z-10 {
    z-index: 10;
  }
  .z-20 {
    z-index: 20;
  }
  .z-30 {
    z-index: 30;
  }
  .z-40 {
    z-index: 40;
  }
  .z-50 {
    z-index: 50;
  }
  .z-\[900\] {
    z-index: 900;
  }
  .z-\[1000\] {
    z-index: 1000;
  }
  .col-span-3 {
    grid-column: span 3 / span 3;
  }
  .container {
    width: 100%;
    @media (width >= 40rem) {
      max-width: 40rem;
    }
    @media (width >= 48rem) {
      max-width: 48rem;
    }
    @media (width >= 64rem) {
      max-width: 64rem;
    }
    @media (width >= 80rem) {
      max-width: 80rem;
    }
    @media (width >= 96rem) {
      max-width: 96rem;
    }
  }
  .m-0 {
    margin: 0px;
  }
  .m-auto {
    margin: auto;
  }
  .mx-1 {
    margin-inline: var(--spacing);
  }
  .mx-3 {
    margin-inline: calc(var(--spacing) * 3);
  }
  .mx-4 {
    margin-inline: calc(var(--spacing) * 4);
  }
  .mx-auto {
    margin-inline: auto;
  }
  .my-2 {
    margin-block: calc(var(--spacing) * 2);
  }
  .my-4 {
    margin-block: calc(var(--spacing) * 4);
  }
  .ms-2 {
    margin-inline-start: calc(var(--spacing) * 2);
  }
  .mt-0 {
    margin-top: 0px;
  }
  .mt-1 {
    margin-top: var(--spacing);
  }
  .mt-2 {
    margin-top: calc(var(--spacing) * 2);
  }
  .mt-3 {
    margin-top: calc(var(--spacing) * 3);
  }
  .mt-4 {
    margin-top: calc(var(--spacing) * 4);
  }
  .mt-8 {
    margin-top: calc(var(--spacing) * 8);
  }
  .mt-16 {
    margin-top: calc(var(--spacing) * 16);
  }
  .mt-\[-10px\] {
    margin-top: -10px;
  }
  .mr-2 {
    margin-right: calc(var(--spacing) * 2);
  }
  .mb-0\.5 {
    margin-bottom: calc(var(--spacing) * 0.5);
  }
  .mb-1 {
    margin-bottom: var(--spacing);
  }
  .mb-2 {
    margin-bottom: calc(var(--spacing) * 2);
  }
  .mb-3 {
    margin-bottom: calc(var(--spacing) * 3);
  }
  .mb-4 {
    margin-bottom: calc(var(--spacing) * 4);
  }
  .mb-6 {
    margin-bottom: calc(var(--spacing) * 6);
  }
  .ml-1 {
    margin-left: var(--spacing);
  }
  .ml-2 {
    margin-left: calc(var(--spacing) * 2);
  }
  .ml-5 {
    margin-left: calc(var(--spacing) * 5);
  }
  .ml-\[-200\%\] {
    margin-left: -200%;
  }
  .ml-auto {
    margin-left: auto;
  }
  .box-border {
    box-sizing: border-box;
  }
  .block {
    display: block;
  }
  .contents {
    display: contents;
  }
  .flex {
    display: flex;
  }
  .grid {
    display: grid;
  }
  .hidden {
    display: none;
  }
  .inline {
    display: inline;
  }
  .inline-block {
    display: inline-block;
  }
  .inline-flex {
    display: inline-flex;
  }
  .table {
    display: table;
  }
  .aspect-\[1\/var\(--aspect-ratio\)\] {
    aspect-ratio: 1/var(--aspect-ratio);
  }
  .aspect-\[1\] {
    aspect-ratio: 1;
  }
  .aspect-square {
    aspect-ratio: 1 / 1;
  }
  .aspect-video {
    aspect-ratio: var(--aspect-video);
  }
  .size-\(--icon-size\) {
    width: var(--icon-size);
    height: var(--icon-size);
  }
  .size-0\.5 {
    width: calc(var(--spacing) * 0.5);
    height: calc(var(--spacing) * 0.5);
  }
  .size-4 {
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
  }
  .size-5 {
    width: calc(var(--spacing) * 5);
    height: calc(var(--spacing) * 5);
  }
  .size-8 {
    width: calc(var(--spacing) * 8);
    height: calc(var(--spacing) * 8);
  }
  .size-9 {
    width: calc(var(--spacing) * 9);
    height: calc(var(--spacing) * 9);
  }
  .size-10 {
    width: calc(var(--spacing) * 10);
    height: calc(var(--spacing) * 10);
  }
  .size-20 {
    width: calc(var(--spacing) * 20);
    height: calc(var(--spacing) * 20);
  }
  .size-28 {
    width: calc(var(--spacing) * 28);
    height: calc(var(--spacing) * 28);
  }
  .size-40 {
    width: calc(var(--spacing) * 40);
    height: calc(var(--spacing) * 40);
  }
  .size-fit {
    width: fit-content;
    height: fit-content;
  }
  .size-full {
    width: 100%;
    height: 100%;
  }
  .h-0 {
    height: 0px;
  }
  .h-2 {
    height: calc(var(--spacing) * 2);
  }
  .h-4 {
    height: calc(var(--spacing) * 4);
  }
  .h-5 {
    height: calc(var(--spacing) * 5);
  }
  .h-6 {
    height: calc(var(--spacing) * 6);
  }
  .h-8 {
    height: calc(var(--spacing) * 8);
  }
  .h-9 {
    height: calc(var(--spacing) * 9);
  }
  .h-10 {
    height: calc(var(--spacing) * 10);
  }
  .h-11 {
    height: calc(var(--spacing) * 11);
  }
  .h-12 {
    height: calc(var(--spacing) * 12);
  }
  .h-16 {
    height: calc(var(--spacing) * 16);
  }
  .h-20 {
    height: calc(var(--spacing) * 20);
  }
  .h-24 {
    height: calc(var(--spacing) * 24);
  }
  .h-28 {
    height: calc(var(--spacing) * 28);
  }
  .h-48 {
    height: calc(var(--spacing) * 48);
  }
  .h-64 {
    height: calc(var(--spacing) * 64);
  }
  .h-72 {
    height: calc(var(--spacing) * 72);
  }
  .h-\[1em\] {
    height: 1em;
  }
  .h-\[1lh\] {
    height: 1lh;
  }
  .h-\[3px\] {
    height: 3px;
  }
  .h-\[24px\] {
    height: 24px;
  }
  .h-\[50\%\] {
    height: 50%;
  }
  .h-\[56px\] {
    height: 56px;
  }
  .h-\[58px\] {
    height: 58px;
  }
  .h-\[100cqh\] {
    height: 100cqh;
  }
  .h-\[100cqmax\] {
    height: 100cqmax;
  }
  .h-\[200vh\] {
    height: 200vh;
  }
  .h-\[300vh\] {
    height: 300vh;
  }
  .h-\[var\(--light-rays-length\)\] {
    height: var(--light-rays-length);
  }
  .h-fit {
    height: fit-content;
  }
  .h-full {
    height: 100%;
  }
  .h-px {
    height: 1px;
  }
  .max-h-48 {
    max-height: calc(var(--spacing) * 48);
  }
  .max-h-64 {
    max-height: calc(var(--spacing) * 64);
  }
  .max-h-100 {
    max-height: calc(var(--spacing) * 100);
  }
  .max-h-\[85vh\] {
    max-height: 85vh;
  }
  .max-h-\[1080px\] {
    max-height: 1080px;
  }
  .max-h-max {
    max-height: max-content;
  }
  .min-h-0 {
    min-height: 0px;
  }
  .min-h-\[inherit\] {
    min-height: inherit;
  }
  .min-h-full {
    min-height: 100%;
  }
  .w-\(--width\) {
    width: var(--width);
  }
  .w-0 {
    width: 0px;
  }
  .w-1 {
    width: var(--spacing);
  }
  .w-1\.5 {
    width: calc(var(--spacing) * 1.5);
  }
  .w-2 {
    width: calc(var(--spacing) * 2);
  }
  .w-3 {
    width: calc(var(--spacing) * 3);
  }
  .w-4 {
    width: calc(var(--spacing) * 4);
  }
  .w-5\/6 {
    width: calc(5 / 6 * 100%);
  }
  .w-6 {
    width: calc(var(--spacing) * 6);
  }
  .w-8 {
    width: calc(var(--spacing) * 8);
  }
  .w-10 {
    width: calc(var(--spacing) * 10);
  }
  .w-12 {
    width: calc(var(--spacing) * 12);
  }
  .w-12\.5 {
    width: calc(var(--spacing) * 12.5);
  }
  .w-14 {
    width: calc(var(--spacing) * 14);
  }
  .w-16 {
    width: calc(var(--spacing) * 16);
  }
  .w-20 {
    width: calc(var(--spacing) * 20);
  }
  .w-24 {
    width: calc(var(--spacing) * 24);
  }
  .w-28 {
    width: calc(var(--spacing) * 28);
  }
  .w-32 {
    width: calc(var(--spacing) * 32);
  }
  .w-44 {
    width: calc(var(--spacing) * 44);
  }
  .w-72 {
    width: calc(var(--spacing) * 72);
  }
  .w-80 {
    width: calc(var(--spacing) * 80);
  }
  .w-96 {
    width: calc(var(--spacing) * 96);
  }
  .w-\[2px\] {
    width: 2px;
  }
  .w-\[11px\] {
    width: 11px;
  }
  .w-\[100cqh\] {
    width: 100cqh;
  }
  .w-\[100cqi\] {
    width: 100cqi;
  }
  .w-\[600vw\] {
    width: 600vw;
  }
  .w-\[1200px\] {
    width: 1200px;
  }
  .w-\[var\(--ray-width\)\] {
    width: var(--ray-width);
  }
  .w-auto {
    width: auto;
  }
  .w-fit {
    width: fit-content;
  }
  .w-full {
    width: 100%;
  }
  .w-max {
    width: max-content;
  }
  .w-px {
    width: 1px;
  }
  .max-w-3xl {
    max-width: var(--container-3xl);
  }
  .max-w-4xl {
    max-width: var(--container-4xl);
  }
  .max-w-5xl {
    max-width: var(--container-5xl);
  }
  .max-w-150 {
    max-width: calc(var(--spacing) * 150);
  }
  .max-w-\[1920px\] {
    max-width: 1920px;
  }
  .max-w-lg {
    max-width: var(--container-lg);
  }
  .max-w-md {
    max-width: var(--container-md);
  }
  .max-w-none {
    max-width: none;
  }
  .min-w-0 {
    min-width: 0px;
  }
  .min-w-32 {
    min-width: calc(var(--spacing) * 32);
  }
  .min-w-72 {
    min-width: calc(var(--spacing) * 72);
  }
  .min-w-\[150px\] {
    min-width: 150px;
  }
  .min-w-\[190px\] {
    min-width: 190px;
  }
  .min-w-\[500px\] {
    min-width: 500px;
  }
  .min-w-\[1000px\] {
    min-width: 1000px;
  }
  .min-w-full {
    min-width: 100%;
  }
  .flex-1 {
    flex: 1;
  }
  .flex-shrink-0 {
    flex-shrink: 0;
  }
  .shrink {
    flex-shrink: 1;
  }
  .shrink-0 {
    flex-shrink: 0;
  }
  .grow {
    flex-grow: 1;
  }
  .border-collapse {
    border-collapse: collapse;
  }
  .origin-\[0\%_0\%\] {
    transform-origin: 0% 0%;
  }
  .origin-\[50\%_0\%\] {
    transform-origin: 50% 0%;
  }
  .origin-\[100\%_0\%\] {
    transform-origin: 100% 0%;
  }
  .origin-\[100\%_0_0\] {
    transform-origin: 100% 0 0;
  }
  .origin-left {
    transform-origin: 0;
  }
  .origin-top {
    transform-origin: top;
  }
  .-translate-x-1\/2 {
    --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .translate-x-12 {
    --tw-translate-x: calc(var(--spacing) * 12);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .-translate-y-1\/2 {
    --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .-translate-y-full {
    --tw-translate-y: -100%;
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .translate-y-0 {
    --tw-translate-y: 0px;
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .translate-y-10 {
    --tw-translate-y: calc(var(--spacing) * 10);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .\[translate\:0_0\] {
    translate: 0 0;
  }
  .scale-100 {
    --tw-scale-x: 100%;
    --tw-scale-y: 100%;
    --tw-scale-z: 100%;
    scale: var(--tw-scale-x) var(--tw-scale-y);
  }
  .scale-\[0\.9\] {
    scale: 0.9;
  }
  .-rotate-90 {
    rotate: calc(90deg * -1);
  }
  .rotate-\(--angle\) {
    rotate: var(--angle);
  }
  .rotate-0 {
    rotate: 0deg;
  }
  .rotate-90 {
    rotate: 90deg;
  }
  .rotate-\[-70deg\] {
    rotate: -70deg;
  }
  .transform {
    transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
  }
  .transform-\[rotate\(-90deg\)_rotateX\(-90deg\)\] {
    transform: rotate(-90deg) rotateX(-90deg);
  }
  .transform-\[rotate\(90deg\)_rotateX\(-90deg\)\] {
    transform: rotate(90deg) rotateX(-90deg);
  }
  .transform-\[rotateX\(-90deg\)\] {
    transform: rotateX(-90deg);
  }
  .transform-\[translate\(-50\%\,-50\%\)\] {
    transform: translate(-50%,-50%);
  }
  .transform-gpu {
    transform: translateZ(0) var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
  }
  .animate-pulse {
    animation: var(--animate-pulse);
  }
  .cursor-col-resize {
    cursor: col-resize;
  }
  .cursor-default {
    cursor: default;
  }
  .cursor-ew-resize {
    cursor: ew-resize;
  }
  .cursor-not-allowed {
    cursor: not-allowed;
  }
  .cursor-pointer {
    cursor: pointer;
  }
  .cursor-row-resize {
    cursor: row-resize;
  }
  .touch-none {
    touch-action: none;
  }
  .resize {
    resize: both;
  }
  .snap-x {
    scroll-snap-type: x var(--tw-scroll-snap-strictness);
  }
  .snap-mandatory {
    --tw-scroll-snap-strictness: mandatory;
  }
  .snap-center {
    scroll-snap-align: center;
  }
  .snap-always {
    scroll-snap-stop: always;
  }
  .auto-rows-\[22rem\] {
    grid-auto-rows: 22rem;
  }
  .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .flex-col {
    flex-direction: column;
  }
  .flex-row {
    flex-direction: row;
  }
  .flex-wrap {
    flex-wrap: wrap;
  }
  .place-items-center {
    place-items: center;
  }
  .items-baseline {
    align-items: baseline;
  }
  .items-center {
    align-items: center;
  }
  .items-end {
    align-items: flex-end;
  }
  .items-start {
    align-items: flex-start;
  }
  .items-stretch {
    align-items: stretch;
  }
  .justify-around {
    justify-content: space-around;
  }
  .justify-between {
    justify-content: space-between;
  }
  .justify-center {
    justify-content: center;
  }
  .justify-end {
    justify-content: flex-end;
  }
  .gap-\(--gap\) {
    gap: var(--gap);
  }
  .gap-0\.5 {
    gap: calc(var(--spacing) * 0.5);
  }
  .gap-1 {
    gap: var(--spacing);
  }
  .gap-1\.5 {
    gap: calc(var(--spacing) * 1.5);
  }
  .gap-2 {
    gap: calc(var(--spacing) * 2);
  }
  .gap-2\.5 {
    gap: calc(var(--spacing) * 2.5);
  }
  .gap-3 {
    gap: calc(var(--spacing) * 3);
  }
  .gap-4 {
    gap: calc(var(--spacing) * 4);
  }
  .gap-6 {
    gap: calc(var(--spacing) * 6);
  }
  .gap-8 {
    gap: calc(var(--spacing) * 8);
  }
  .gap-10 {
    gap: calc(var(--spacing) * 10);
  }
  .gap-12 {
    gap: calc(var(--spacing) * 12);
  }
  .gap-x-2 {
    column-gap: calc(var(--spacing) * 2);
  }
  .gap-x-4 {
    column-gap: calc(var(--spacing) * 4);
  }
  :where(.-space-x-4 > :not(:last-child)) {
    --tw-space-x-reverse: 0;
    margin-inline-start: calc(calc(var(--spacing) * -4) * var(--tw-space-x-reverse));
    margin-inline-end: calc(calc(var(--spacing) * -4) * calc(1 - var(--tw-space-x-reverse)));
  }
  :where(.space-x-1 > :not(:last-child)) {
    --tw-space-x-reverse: 0;
    margin-inline-start: calc(var(--spacing) * var(--tw-space-x-reverse));
    margin-inline-end: calc(var(--spacing) * calc(1 - var(--tw-space-x-reverse)));
  }
  :where(.space-x-3 > :not(:last-child)) {
    --tw-space-x-reverse: 0;
    margin-inline-start: calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));
    margin-inline-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)));
  }
  .gap-y-1 {
    row-gap: var(--spacing);
  }
  .gap-y-2 {
    row-gap: calc(var(--spacing) * 2);
  }
  .self-stretch {
    align-self: stretch;
  }
  .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .overflow-auto {
    overflow: auto;
  }
  .overflow-hidden {
    overflow: hidden;
  }
  .overflow-visible {
    overflow: visible;
  }
  .overflow-x-auto {
    overflow-x: auto;
  }
  .overflow-y-auto {
    overflow-y: auto;
  }
  .\[border-radius\:var\(--radius\)\] {
    border-radius: var(--radius);
  }
  .rounded {
    border-radius: 0.25rem;
  }
  .rounded-\(--border-radius\) {
    border-radius: var(--border-radius);
  }
  .rounded-\(--card-content-radius\) {
    border-radius: var(--card-content-radius);
  }
  .rounded-2xl {
    border-radius: var(--radius-2xl);
  }
  .rounded-\[2\.5rem\] {
    border-radius: 2.5rem;
  }
  .rounded-\[28px\] {
    border-radius: 28px;
  }
  .rounded-\[inherit\] {
    border-radius: inherit;
  }
  .rounded-full {
    border-radius: calc(infinity * 1px);
  }
  .rounded-lg {
    border-radius: var(--radius-lg);
  }
  .rounded-md {
    border-radius: var(--radius-md);
  }
  .rounded-none {
    border-radius: 0;
  }
  .rounded-sm {
    border-radius: var(--radius-sm);
  }
  .rounded-xl {
    border-radius: var(--radius-xl);
  }
  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }
  .border-\(length\:--border-beam-width\) {
    border-style: var(--tw-border-style);
    border-width: var(--border-beam-width);
  }
  .border-0 {
    border-style: var(--tw-border-style);
    border-width: 0px;
  }
  .border-2 {
    border-style: var(--tw-border-style);
    border-width: 2px;
  }
  .border-4 {
    border-style: var(--tw-border-style);
    border-width: 4px;
  }
  .border-8 {
    border-style: var(--tw-border-style);
    border-width: 8px;
  }
  .border-t {
    border-top-style: var(--tw-border-style);
    border-top-width: 1px;
  }
  .border-b {
    border-bottom-style: var(--tw-border-style);
    border-bottom-width: 1px;
  }
  .border-l-2 {
    border-left-style: var(--tw-border-style);
    border-left-width: 2px;
  }
  .border-dashed {
    --tw-border-style: dashed;
    border-style: dashed;
  }
  .border-none {
    --tw-border-style: none;
    border-style: none;
  }
  .border-\[var\(--pc-glass-border\)\] {
    border-color: var(--pc-glass-border);
  }
  .border-\[var\(--ui-accent\)\] {
    border-color: var(--ui-accent);
  }
  .border-amber-400 {
    border-color: var(--color-amber-400);
  }
  .border-amber-500\/25 {
    border-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 25%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-amber-500) 25%, transparent);
    }
  }
  .border-amber-800 {
    border-color: var(--color-amber-800);
  }
  .border-current {
    border-color: currentcolor;
  }
  .border-gray-400\/30 {
    border-color: color-mix(in srgb, oklch(70.7% 0.022 261.325) 30%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-gray-400) 30%, transparent);
    }
  }
  .border-gray-600 {
    border-color: var(--color-gray-600);
  }
  .border-neutral-700 {
    border-color: var(--color-neutral-700);
  }
  .border-neutral-800 {
    border-color: var(--color-neutral-800);
  }
  .border-neutral-800\/50 {
    border-color: color-mix(in srgb, oklch(26.9% 0 none) 50%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-neutral-800) 50%, transparent);
    }
  }
  .border-red-500 {
    border-color: var(--color-red-500);
  }
  .border-red-900 {
    border-color: var(--color-red-900);
  }
  .border-rose-500\/25 {
    border-color: color-mix(in srgb, oklch(64.5% 0.246 16.439) 25%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-rose-500) 25%, transparent);
    }
  }
  .border-transparent {
    border-color: transparent;
  }
  .border-white {
    border-color: var(--color-white);
  }
  .border-white\/10 {
    border-color: color-mix(in srgb, #fff 10%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-white) 10%, transparent);
    }
  }
  .border-white\/20 {
    border-color: color-mix(in srgb, #fff 20%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in oklab, var(--color-white) 20%, transparent);
    }
  }
  .border-b-transparent {
    border-bottom-color: transparent;
  }
  .bg-\[\#111\] {
    background-color: #111;
  }
  .bg-\[rgba\(0\,0\,0\,0\.3\)\] {
    background-color: rgba(0,0,0,0.3);
  }
  .bg-\[var\(--ui-accent\)\] {
    background-color: var(--ui-accent);
  }
  .bg-\[var\(--ui-accent-soft\)\] {
    background-color: var(--ui-accent-soft);
  }
  .bg-\[var\(--ui-panel\,\#161a22\)\] {
    background-color: var(--ui-panel,#161a22);
  }
  .bg-amber-400\/20 {
    background-color: color-mix(in srgb, oklch(82.8% 0.189 84.429) 20%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-amber-400) 20%, transparent);
    }
  }
  .bg-amber-500\/10 {
    background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 10%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-amber-500) 10%, transparent);
    }
  }
  .bg-amber-950 {
    background-color: var(--color-amber-950);
  }
  .bg-black {
    background-color: var(--color-black);
  }
  .bg-black\/20 {
    background-color: color-mix(in srgb, #000 20%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-black) 20%, transparent);
    }
  }
  .bg-black\/30 {
    background-color: color-mix(in srgb, #000 30%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-black) 30%, transparent);
    }
  }
  .bg-black\/50 {
    background-color: color-mix(in srgb, #000 50%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
    }
  }
  .bg-black\/60 {
    background-color: color-mix(in srgb, #000 60%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-black) 60%, transparent);
    }
  }
  .bg-blue-600 {
    background-color: var(--color-blue-600);
  }
  .bg-current {
    background-color: currentcolor;
  }
  .bg-emerald-600 {
    background-color: var(--color-emerald-600);
  }
  .bg-fuchsia-300 {
    background-color: var(--color-fuchsia-300);
  }
  .bg-fuchsia-700 {
    background-color: var(--color-fuchsia-700);
  }
  .bg-gray-100 {
    background-color: var(--color-gray-100);
  }
  .bg-gray-800 {
    background-color: var(--color-gray-800);
  }
  .bg-green-500 {
    background-color: var(--color-green-500);
  }
  .bg-inherit {
    background-color: inherit;
  }
  .bg-neutral-100 {
    background-color: var(--color-neutral-100);
  }
  .bg-neutral-700 {
    background-color: var(--color-neutral-700);
  }
  .bg-neutral-800 {
    background-color: var(--color-neutral-800);
  }
  .bg-neutral-900 {
    background-color: var(--color-neutral-900);
  }
  .bg-neutral-900\/50 {
    background-color: color-mix(in srgb, oklch(20.5% 0 none) 50%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-neutral-900) 50%, transparent);
    }
  }
  .bg-neutral-950 {
    background-color: var(--color-neutral-950);
  }
  .bg-neutral-950\/60 {
    background-color: color-mix(in srgb, oklch(14.5% 0 none) 60%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-neutral-950) 60%, transparent);
    }
  }
  .bg-red-500 {
    background-color: var(--color-red-500);
  }
  .bg-red-500\/20 {
    background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 20%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-red-500) 20%, transparent);
    }
  }
  .bg-red-500\/50 {
    background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 50%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-red-500) 50%, transparent);
    }
  }
  .bg-red-950\/40 {
    background-color: color-mix(in srgb, oklch(25.8% 0.092 26.042) 40%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-red-950) 40%, transparent);
    }
  }
  .bg-red-950\/60 {
    background-color: color-mix(in srgb, oklch(25.8% 0.092 26.042) 60%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-red-950) 60%, transparent);
    }
  }
  .bg-rose-500\/10 {
    background-color: color-mix(in srgb, oklch(64.5% 0.246 16.439) 10%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      background-color: color-mix(in oklab, var(--color-rose-500) 10%, transparent);
    }
  }
  .bg-sky-600 {
    background-color: var(--color-sky-600);
  }
  .bg-transparent {
    background-color: transparent;
  }
  .bg-white {
    background-color: var(--color-white);
  }
  .bg-yellow-500 {
    background-color: var(--color-yellow-500);
  }
  .bg-zinc-500 {
    background-color: var(--color-zinc-500);
  }
  .bg-linear-to-b {
    --tw-gradient-position: to bottom;
    @supports (background-image: linear-gradient(in lab, red, red)) {
      --tw-gradient-position: to bottom in oklab;
    }
    background-image: linear-gradient(var(--tw-gradient-stops));
  }
  .bg-linear-to-l {
    --tw-gradient-position: to left;
    @supports (background-image: linear-gradient(in lab, red, red)) {
      --tw-gradient-position: to left in oklab;
    }
    background-image: linear-gradient(var(--tw-gradient-stops));
  }
  .bg-linear-to-r {
    --tw-gradient-position: to right;
    @supports (background-image: linear-gradient(in lab, red, red)) {
      --tw-gradient-position: to right in oklab;
    }
    background-image: linear-gradient(var(--tw-gradient-stops));
  }
  .bg-linear-to-t {
    --tw-gradient-position: to top;
    @supports (background-image: linear-gradient(in lab, red, red)) {
      --tw-gradient-position: to top in oklab;
    }
    background-image: linear-gradient(var(--tw-gradient-stops));
  }
  .bg-\[linear-gradient\(\#121213\,\#121213\)\,linear-gradient\(\#121213_50\%\,rgba\(18\,18\,19\,0\.6\)_80\%\,rgba\(18\,18\,19\,0\)\)\,linear-gradient\(90deg\,var\(--color-1\)\,var\(--color-5\)\,var\(--color-3\)\,var\(--color-4\)\,var\(--color-2\)\)\] {
    background-image: linear-gradient(#121213,#121213),linear-gradient(#121213 50%,rgba(18,18,19,0.6) 80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2));
  }
  .bg-\[linear-gradient\(\#ffffff\,\#ffffff\)\,linear-gradient\(\#ffffff_50\%\,rgba\(18\,18\,19\,0\.6\)_80\%\,rgba\(18\,18\,19\,0\)\)\,linear-gradient\(90deg\,var\(--color-1\)\,var\(--color-5\)\,var\(--color-3\)\,var\(--color-4\)\,var\(--color-2\)\)\] {
    background-image: linear-gradient(#ffffff,#ffffff),linear-gradient(#ffffff 50%,rgba(18,18,19,0.6) 80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2));
  }
  .from-\(--color-from\) {
    --tw-gradient-from: var(--color-from);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .from-\[\#A97CF8\] {
    --tw-gradient-from: #A97CF8;
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .from-\[color-mix\(in_srgb\,var\(--light-rays-color\)_70\%\,transparent\)\] {
    --tw-gradient-from: var(--light-rays-color);
    @supports (color: color-mix(in lab, red, red)) {
      --tw-gradient-from: color-mix(in srgb,var(--light-rays-color) 70%,transparent);
    }
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .from-transparent {
    --tw-gradient-from: transparent;
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .from-white {
    --tw-gradient-from: var(--color-white);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .from-zinc-500 {
    --tw-gradient-from: var(--color-zinc-500);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .via-\(--color-to\) {
    --tw-gradient-via: var(--color-to);
    --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-via-stops);
  }
  .via-\[\#F38CB8\] {
    --tw-gradient-via: #F38CB8;
    --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-via-stops);
  }
  .via-black\/80 {
    --tw-gradient-via: color-mix(in srgb, #000 80%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      --tw-gradient-via: color-mix(in oklab, var(--color-black) 80%, transparent);
    }
    --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-via-stops);
  }
  .via-50\% {
    --tw-gradient-via-position: 50%;
  }
  .to-\(--color-from\) {
    --tw-gradient-to: var(--color-from);
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .to-\[\#FDCC92\] {
    --tw-gradient-to: #FDCC92;
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .to-transparent {
    --tw-gradient-to: transparent;
    --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
  }
  .to-90\% {
    --tw-gradient-to-position: 90%;
  }
  .mask-\[linear-gradient\(to_bottom\,white\,transparent\)\] {
    mask-image: linear-gradient(to bottom,white,transparent);
  }
  .mask-\[linear-gradient\(transparent\,transparent\)\,linear-gradient\(\#000\,\#000\)\] {
    mask-image: linear-gradient(transparent,transparent),linear-gradient(#000,#000);
  }
  .bg-\[length\:200\%\] {
    background-size: 200%;
  }
  .bg-size-\[200\%_auto\] {
    background-size: 200% auto;
  }
  .bg-size-\[var\(--beam-size\)_var\(--beam-size\)\] {
    background-size: var(--beam-size) var(--beam-size);
  }
  .bg-size-\[var\(--bg-size\)_100\%\] {
    background-size: var(--bg-size) 100%;
  }
  .bg-size-\[var\(--shiny-width\)_100\%\] {
    background-size: var(--shiny-width) 100%;
  }
  .\[background-clip\:padding-box\,border-box\,border-box\] {
    background-clip: padding-box,border-box,border-box;
  }
  .bg-clip-text {
    background-clip: text;
  }
  .bg-position-\[0_0\] {
    background-position: 0 0;
  }
  .bg-no-repeat {
    background-repeat: no-repeat;
  }
  .\[background-origin\:border-box\] {
    background-origin: border-box;
  }
  .mask-intersect {
    mask-composite: intersect;
  }
  .\[mask-clip\:padding-box\,border-box\] {
    mask-clip: padding-box,border-box;
  }
  .fill-\[\#E5E5E5\] {
    fill: #E5E5E5;
  }
  .fill-\[\#F5F5F5\] {
    fill: #F5F5F5;
  }
  .fill-gray-300\/30 {
    fill: color-mix(in srgb, oklch(87.2% 0.01 258.338) 30%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      fill: color-mix(in oklab, var(--color-gray-300) 30%, transparent);
    }
  }
  .fill-gray-400\/30 {
    fill: color-mix(in srgb, oklch(70.7% 0.022 261.325) 30%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      fill: color-mix(in oklab, var(--color-gray-400) 30%, transparent);
    }
  }
  .fill-none {
    fill: none;
  }
  .fill-transparent {
    fill: transparent;
  }
  .fill-white {
    fill: var(--color-white);
  }
  .stroke-\[\#E5E5E5\] {
    stroke: #E5E5E5;
  }
  .stroke-black\/10 {
    stroke: color-mix(in srgb, #000 10%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      stroke: color-mix(in oklab, var(--color-black) 10%, transparent);
    }
  }
  .stroke-gray-400\/30 {
    stroke: color-mix(in srgb, oklch(70.7% 0.022 261.325) 30%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      stroke: color-mix(in oklab, var(--color-gray-400) 30%, transparent);
    }
  }
  .stroke-white {
    stroke: var(--color-white);
  }
  .stroke-1 {
    stroke-width: 1;
  }
  .stroke-2 {
    stroke-width: 2;
  }
  .stroke-\[0\.5\] {
    stroke-width: 0.5;
  }
  .object-cover {
    object-fit: cover;
  }
  .object-top {
    object-position: top;
  }
  .p-0 {
    padding: 0px;
  }
  .p-1 {
    padding: var(--spacing);
  }
  .p-2 {
    padding: calc(var(--spacing) * 2);
  }
  .p-3 {
    padding: calc(var(--spacing) * 3);
  }
  .p-4 {
    padding: calc(var(--spacing) * 4);
  }
  .p-5 {
    padding: calc(var(--spacing) * 5);
  }
  .p-6 {
    padding: calc(var(--spacing) * 6);
  }
  .p-8 {
    padding: calc(var(--spacing) * 8);
  }
  .p-12 {
    padding: calc(var(--spacing) * 12);
  }
  .p-20 {
    padding: calc(var(--spacing) * 20);
  }
  .p-403 {
    padding: calc(var(--spacing) * 403);
  }
  .p-px {
    padding: 1px;
  }
  .px-1 {
    padding-inline: var(--spacing);
  }
  .px-1\.5 {
    padding-inline: calc(var(--spacing) * 1.5);
  }
  .px-2 {
    padding-inline: calc(var(--spacing) * 2);
  }
  .px-3 {
    padding-inline: calc(var(--spacing) * 3);
  }
  .px-4 {
    padding-inline: calc(var(--spacing) * 4);
  }
  .px-6 {
    padding-inline: calc(var(--spacing) * 6);
  }
  .px-8 {
    padding-inline: calc(var(--spacing) * 8);
  }
  .px-10 {
    padding-inline: calc(var(--spacing) * 10);
  }
  .px-12 {
    padding-inline: calc(var(--spacing) * 12);
  }
  .px-32 {
    padding-inline: calc(var(--spacing) * 32);
  }
  .py-0\.5 {
    padding-block: calc(var(--spacing) * 0.5);
  }
  .py-1 {
    padding-block: var(--spacing);
  }
  .py-1\.5 {
    padding-block: calc(var(--spacing) * 1.5);
  }
  .py-2 {
    padding-block: calc(var(--spacing) * 2);
  }
  .py-3 {
    padding-block: calc(var(--spacing) * 3);
  }
  .py-4 {
    padding-block: calc(var(--spacing) * 4);
  }
  .py-6 {
    padding-block: calc(var(--spacing) * 6);
  }
  .py-10 {
    padding-block: calc(var(--spacing) * 10);
  }
  .py-16 {
    padding-block: calc(var(--spacing) * 16);
  }
  .py-20 {
    padding-block: calc(var(--spacing) * 20);
  }
  .pt-0\.5 {
    padding-top: calc(var(--spacing) * 0.5);
  }
  .pt-1 {
    padding-top: var(--spacing);
  }
  .pt-2 {
    padding-top: calc(var(--spacing) * 2);
  }
  .pt-3 {
    padding-top: calc(var(--spacing) * 3);
  }
  .pr-1 {
    padding-right: var(--spacing);
  }
  .pr-2 {
    padding-right: calc(var(--spacing) * 2);
  }
  .pb-1 {
    padding-bottom: var(--spacing);
  }
  .pb-1\.5 {
    padding-bottom: calc(var(--spacing) * 1.5);
  }
  .pb-2 {
    padding-bottom: calc(var(--spacing) * 2);
  }
  .pb-4 {
    padding-bottom: calc(var(--spacing) * 4);
  }
  .pb-32 {
    padding-bottom: calc(var(--spacing) * 32);
  }
  .pl-5 {
    padding-left: calc(var(--spacing) * 5);
  }
  .pl-6 {
    padding-left: calc(var(--spacing) * 6);
  }
  .pl-16 {
    padding-left: calc(var(--spacing) * 16);
  }
  .text-center {
    text-align: center;
  }
  .text-justify {
    text-align: justify;
  }
  .text-left {
    text-align: left;
  }
  .text-right {
    text-align: right;
  }
  .align-bottom {
    vertical-align: bottom;
  }
  .align-middle {
    vertical-align: middle;
  }
  .font-mono {
    font-family: var(--font-mono);
  }
  .font-sans {
    font-family: var(--font-sans);
  }
  .text-2xl {
    font-size: var(--text-2xl);
    line-height: var(--tw-leading, var(--text-2xl--line-height));
  }
  .text-3xl {
    font-size: var(--text-3xl);
    line-height: var(--tw-leading, var(--text-3xl--line-height));
  }
  .text-4xl {
    font-size: var(--text-4xl);
    line-height: var(--tw-leading, var(--text-4xl--line-height));
  }
  .text-5xl {
    font-size: var(--text-5xl);
    line-height: var(--tw-leading, var(--text-5xl--line-height));
  }
  .text-6xl {
    font-size: var(--text-6xl);
    line-height: var(--tw-leading, var(--text-6xl--line-height));
  }
  .text-base {
    font-size: var(--text-base);
    line-height: var(--tw-leading, var(--text-base--line-height));
  }
  .text-lg {
    font-size: var(--text-lg);
    line-height: var(--tw-leading, var(--text-lg--line-height));
  }
  .text-sm {
    font-size: var(--text-sm);
    line-height: var(--tw-leading, var(--text-sm--line-height));
  }
  .text-xl {
    font-size: var(--text-xl);
    line-height: var(--tw-leading, var(--text-xl--line-height));
  }
  .text-xs {
    font-size: var(--text-xs);
    line-height: var(--tw-leading, var(--text-xs--line-height));
  }
  .text-\[10px\] {
    font-size: 10px;
  }
  .text-\[11px\] {
    font-size: 11px;
  }
  .text-\[12px\] {
    font-size: 12px;
  }
  .text-\[15px\] {
    font-size: 15px;
  }
  .text-\[24px\] {
    font-size: 24px;
  }
  .text-\[28px\] {
    font-size: 28px;
  }
  .text-\[32px\] {
    font-size: 32px;
  }
  .text-\[36px\] {
    font-size: 36px;
  }
  .text-\[40pt\] {
    font-size: 40pt;
  }
  .text-\[40px\] {
    font-size: 40px;
  }
  .text-\[48px\] {
    font-size: 48px;
  }
  .text-\[56px\] {
    font-size: 56px;
  }
  .text-\[64px\] {
    font-size: 64px;
  }
  .text-\[72px\] {
    font-size: 72px;
  }
  .text-\[80px\] {
    font-size: 80px;
  }
  .text-\[96px\] {
    font-size: 96px;
  }
  .text-\[100px\] {
    font-size: 100px;
  }
  .text-\[120px\] {
    font-size: 120px;
  }
  .text-\[137px\] {
    font-size: 137px;
  }
  .text-\[140px\] {
    font-size: 140px;
  }
  .text-\[160px\] {
    font-size: 160px;
  }
  .leading-20 {
    --tw-leading: calc(var(--spacing) * 20);
    line-height: calc(var(--spacing) * 20);
  }
  .leading-\[1\.6\] {
    --tw-leading: 1.6;
    line-height: 1.6;
  }
  .leading-\[5rem\] {
    --tw-leading: 5rem;
    line-height: 5rem;
  }
  .leading-\[100\%\] {
    --tw-leading: 100%;
    line-height: 100%;
  }
  .leading-none {
    --tw-leading: 1;
    line-height: 1;
  }
  .leading-relaxed {
    --tw-leading: var(--leading-relaxed);
    line-height: var(--leading-relaxed);
  }
  .leading-snug {
    --tw-leading: var(--leading-snug);
    line-height: var(--leading-snug);
  }
  .leading-tight {
    --tw-leading: var(--leading-tight);
    line-height: var(--leading-tight);
  }
  .font-\[300\] {
    --tw-font-weight: 300;
    font-weight: 300;
  }
  .font-bold {
    --tw-font-weight: var(--font-weight-bold);
    font-weight: var(--font-weight-bold);
  }
  .font-light {
    --tw-font-weight: var(--font-weight-light);
    font-weight: var(--font-weight-light);
  }
  .font-medium {
    --tw-font-weight: var(--font-weight-medium);
    font-weight: var(--font-weight-medium);
  }
  .font-normal {
    --tw-font-weight: var(--font-weight-normal);
    font-weight: var(--font-weight-normal);
  }
  .font-semibold {
    --tw-font-weight: var(--font-weight-semibold);
    font-weight: var(--font-weight-semibold);
  }
  .tracking-\[-0\.02em\] {
    --tw-tracking: -0.02em;
    letter-spacing: -0.02em;
  }
  .tracking-\[0\.2em\] {
    --tw-tracking: 0.2em;
    letter-spacing: 0.2em;
  }
  .tracking-normal {
    --tw-tracking: var(--tracking-normal);
    letter-spacing: var(--tracking-normal);
  }
  .tracking-tight {
    --tw-tracking: var(--tracking-tight);
    letter-spacing: var(--tracking-tight);
  }
  .tracking-wide {
    --tw-tracking: var(--tracking-wide);
    letter-spacing: var(--tracking-wide);
  }
  .tracking-wider {
    --tw-tracking: var(--tracking-wider);
    letter-spacing: var(--tracking-wider);
  }
  .tracking-widest {
    --tw-tracking: var(--tracking-widest);
    letter-spacing: var(--tracking-widest);
  }
  .text-wrap {
    text-wrap: wrap;
  }
  .break-words {
    overflow-wrap: break-word;
  }
  .wrap-break-word {
    overflow-wrap: break-word;
  }
  .break-all {
    word-break: break-all;
  }
  .whitespace-nowrap {
    white-space: nowrap;
  }
  .whitespace-pre {
    white-space: pre;
  }
  .whitespace-pre-line {
    white-space: pre-line;
  }
  .whitespace-pre-wrap {
    white-space: pre-wrap;
  }
  .text-\[\#a0aab4\] {
    color: #a0aab4;
  }
  .text-\[rgb\(0\,0\,0\,65\%\)\] {
    color: rgb(0,0,0,65%);
  }
  .text-\[var\(--pc-fg-muted\)\] {
    color: var(--pc-fg-muted);
  }
  .text-\[var\(--ui-fg\)\] {
    color: var(--ui-fg);
  }
  .text-amber-100 {
    color: var(--color-amber-100);
  }
  .text-amber-400 {
    color: var(--color-amber-400);
  }
  .text-amber-400\/90 {
    color: color-mix(in srgb, oklch(82.8% 0.189 84.429) 90%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-amber-400) 90%, transparent);
    }
  }
  .text-amber-500 {
    color: var(--color-amber-500);
  }
  .text-black {
    color: var(--color-black);
  }
  .text-black\/20 {
    color: color-mix(in srgb, #000 20%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-black) 20%, transparent);
    }
  }
  .text-blue-500 {
    color: var(--color-blue-500);
  }
  .text-gray-400 {
    color: var(--color-gray-400);
  }
  .text-gray-500 {
    color: var(--color-gray-500);
  }
  .text-green-400 {
    color: var(--color-green-400);
  }
  .text-green-500 {
    color: var(--color-green-500);
  }
  .text-inherit {
    color: inherit;
  }
  .text-neutral-100 {
    color: var(--color-neutral-100);
  }
  .text-neutral-200 {
    color: var(--color-neutral-200);
  }
  .text-neutral-300 {
    color: var(--color-neutral-300);
  }
  .text-neutral-400 {
    color: var(--color-neutral-400);
  }
  .text-neutral-400\/80 {
    color: color-mix(in srgb, oklch(70.8% 0 none) 80%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-neutral-400) 80%, transparent);
    }
  }
  .text-neutral-500 {
    color: var(--color-neutral-500);
  }
  .text-neutral-600\/70 {
    color: color-mix(in srgb, oklch(43.9% 0 none) 70%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-neutral-600) 70%, transparent);
    }
  }
  .text-neutral-700 {
    color: var(--color-neutral-700);
  }
  .text-neutral-900 {
    color: var(--color-neutral-900);
  }
  .text-red-100 {
    color: var(--color-red-100);
  }
  .text-red-400 {
    color: var(--color-red-400);
  }
  .text-red-500 {
    color: var(--color-red-500);
  }
  .text-rose-400 {
    color: var(--color-rose-400);
  }
  .text-rose-400\/90 {
    color: color-mix(in srgb, oklch(71.2% 0.194 13.428) 90%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-rose-400) 90%, transparent);
    }
  }
  .text-sky-400 {
    color: var(--color-sky-400);
  }
  .text-transparent {
    color: transparent;
  }
  .text-white {
    color: var(--color-white);
  }
  .text-white\/60 {
    color: color-mix(in srgb, #fff 60%, transparent);
    @supports (color: color-mix(in lab, red, red)) {
      color: color-mix(in oklab, var(--color-white) 60%, transparent);
    }
  }
  .text-yellow-400 {
    color: var(--color-yellow-400);
  }
  .lowercase {
    text-transform: lowercase;
  }
  .uppercase {
    text-transform: uppercase;
  }
  .italic {
    font-style: italic;
  }
  .ordinal {
    --tw-ordinal: ordinal;
    font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
  }
  .tabular-nums {
    --tw-numeric-spacing: tabular-nums;
    font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
  }
  .underline {
    text-decoration-line: underline;
  }
  .antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .opacity-0 {
    opacity: 0%;
  }
  .opacity-10 {
    opacity: 10%;
  }
  .opacity-20 {
    opacity: 20%;
  }
  .opacity-30 {
    opacity: 30%;
  }
  .opacity-50 {
    opacity: 50%;
  }
  .opacity-60 {
    opacity: 60%;
  }
  .opacity-70 {
    opacity: 70%;
  }
  .opacity-80 {
    opacity: 80%;
  }
  .opacity-90 {
    opacity: 90%;
  }
  .opacity-100 {
    opacity: 100%;
  }
  .mix-blend-luminosity {
    mix-blend-mode: luminosity;
  }
  .mix-blend-screen {
    mix-blend-mode: screen;
  }
  .shadow {
    --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-2xl {
    --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-\[0_0_0_1px_\#ffffff10\] {
    --tw-shadow: 0 0 0 1px var(--tw-shadow-color, #ffffff10);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-\[inset_0_-8px_10px_\#ffffff1f\] {
    --tw-shadow: inset 0 -8px 10px var(--tw-shadow-color, #ffffff1f);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-lg {
    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-md {
    --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-sm {
    --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .shadow-xl {
    --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .ring {
    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .ring-1 {
    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .\[box-shadow\:0_0_0_1px_rgba\(0\,0\,0\,\.03\)\,0_2px_4px_rgba\(0\,0\,0\,\.05\)\,0_12px_24px_rgba\(0\,0\,0\,\.05\)\] {
    box-shadow: 0 0 0 1px rgba(0,0,0,.03),0 2px 4px rgba(0,0,0,.05),0 12px 24px rgba(0,0,0,.05);
  }
  .outline {
    outline-style: var(--tw-outline-style);
    outline-width: 1px;
  }
  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .blur-\[2px\] {
    --tw-blur: blur(2px);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .blur-\[var\(--light-rays-blur\)\] {
    --tw-blur: blur(var(--light-rays-blur));
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .drop-shadow {
    --tw-drop-shadow-size: drop-shadow(0 1px 2px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.1))) drop-shadow(0 1px 1px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.06)));
    --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow( 0 1px 1px rgb(0 0 0 / 0.06));
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .grayscale {
    --tw-grayscale: grayscale(100%);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .grayscale-0 {
    --tw-grayscale: grayscale(0%);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .invert {
    --tw-invert: invert(100%);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .sepia {
    --tw-sepia: sepia(100%);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .filter {
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .filter-\[url\(\#threshold\)_blur\(0\.6px\)\] {
    filter: url(#threshold) blur(0.6px);
  }
  .backdrop-blur-md {
    --tw-backdrop-blur: blur(var(--blur-md));
    -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
    backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
  }
  .backdrop-blur-xl {
    --tw-backdrop-blur: blur(var(--blur-xl));
    -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
    backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
  }
  .backdrop-filter {
    -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
    backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
  }
  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .transition-all {
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .transition-colors {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .transition-opacity {
    transition-property: opacity;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .transition-transform {
    transition-property: transform, translate, scale, rotate;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .delay-\(--delay\) {
    transition-delay: var(--delay);
  }
  .duration-\(--transition-length\) {
    --tw-duration: var(--transition-length);
    transition-duration: var(--transition-length);
  }
  .duration-100 {
    --tw-duration: 100ms;
    transition-duration: 100ms;
  }
  .duration-200 {
    --tw-duration: 200ms;
    transition-duration: 200ms;
  }
  .duration-300 {
    --tw-duration: 300ms;
    transition-duration: 300ms;
  }
  .duration-500 {
    --tw-duration: 500ms;
    transition-duration: 500ms;
  }
  .duration-1000 {
    --tw-duration: 1000ms;
    transition-duration: 1000ms;
  }
  .ease-in-out {
    --tw-ease: var(--ease-in-out);
    transition-timing-function: var(--ease-in-out);
  }
  .ease-linear {
    --tw-ease: linear;
    transition-timing-function: linear;
  }
  .ease-out {
    --tw-ease: var(--ease-out);
    transition-timing-function: var(--ease-out);
  }
  .\[will-change\:font-weight\,-webkit-text-stroke-width\,padding\] {
    will-change: font-weight,-webkit-text-stroke-width,padding;
  }
  .will-change-\[background-position\] {
    will-change: background-position;
  }
  .will-change-transform {
    will-change: transform;
  }
  .contain-\[layout_paint_size\] {
    contain: layout paint size;
  }
  .content-\[\'a\'\] {
    --tw-content: 'a';
    content: var(--tw-content);
  }
  .outline-none {
    --tw-outline-style: none;
    outline-style: none;
  }
  .select-none {
    -webkit-user-select: none;
    user-select: none;
  }
  .\[--duration\:40s\] {
    --duration: 40s;
  }
  .\[--gap\:1rem\] {
    --gap: 1rem;
  }
  .\[-webkit-text-stroke-color\:transparent\] {
    -webkit-text-stroke-color: transparent;
  }
  .\[-webkit-text-stroke-width\:var\(--text-stroke-width\)\] {
    -webkit-text-stroke-width: var(--text-stroke-width);
  }
  .\[animation-direction\:reverse\] {
    animation-direction: reverse;
  }
  .\[background\:conic-gradient\(from_calc\(270deg-\(var\(--spread\)\*0\.5\)\)\,transparent_0\,var\(--shimmer-color\)_var\(--spread\)\,transparent_var\(--spread\)\)\] {
    background: conic-gradient(from calc(270deg - (var(--spread) * 0.5)),transparent 0,var(--shimmer-color) var(--spread),transparent var(--spread));
  }
  .\[background\:linear-gradient\(var\(--grid-color\)_0_1px\,transparent_1px_var\(--beam-size\)\)_50\%_-0\.5px_\/var\(--beam-size\)_var\(--beam-size\)\,linear-gradient\(90deg\,var\(--grid-color\)_0_1px\,transparent_1px_var\(--beam-size\)\)_50\%_50\%_\/var\(--beam-size\)_var\(--beam-size\)\] {
    background: linear-gradient(var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% -0.5px /var(--beam-size) var(--beam-size),linear-gradient(90deg,var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% 50% /var(--beam-size) var(--beam-size);
  }
  .\[background\:var\(--background\)\] {
    background: var(--background);
  }
  .\[background\:var\(--bg\)\] {
    background: var(--bg);
  }
  .\[border\:calc\(0\.125rem\)_solid_transparent\] {
    border: calc(0.125rem) solid transparent;
  }
  .\[mask\:none\] {
    mask: none;
  }
  .\[transition\:background-position_1s_cubic-bezier\(\.6\,\.6\,0\,1\)_infinite\] {
    transition: background-position 1s cubic-bezier(.6,.6,0,1) infinite;
  }
  .\[transition\:font-weight_0\.4s\,_-webkit-text-stroke-color_0\.4s\,_padding_0\.4s\] {
    transition: font-weight 0.4s, -webkit-text-stroke-color 0.4s, padding 0.4s;
  }
  .backface-hidden {
    backface-visibility: hidden;
  }
  .perspective-\(--perspective\) {
    perspective: var(--perspective);
  }
  .transform-3d {
    transform-style: preserve-3d;
  }
  .not-\[\&\:hover\]\:duration-1000:not(:hover) {
    --tw-duration: 1000ms;
    transition-duration: 1000ms;
  }
  @media (hover: hover) {
    .group-hover\:-translate-x-5:is(:where(.group):hover *) {
      --tw-translate-x: calc(var(--spacing) * -5);
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
    .group-hover\:translate-x-12:is(:where(.group):hover *) {
      --tw-translate-x: calc(var(--spacing) * 12);
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
    .group-hover\:translate-y-0:is(:where(.group):hover *) {
      --tw-translate-y: 0px;
      translate: var(--tw-translate-x) var(--tw-translate-y);
    }
    .group-hover\:scale-75:is(:where(.group):hover *) {
      --tw-scale-x: 75%;
      --tw-scale-y: 75%;
      --tw-scale-z: 75%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
    .group-hover\:scale-100:is(:where(.group):hover *) {
      --tw-scale-x: 100%;
      --tw-scale-y: 100%;
      --tw-scale-z: 100%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
    .group-hover\:scale-105:is(:where(.group):hover *) {
      --tw-scale-x: 105%;
      --tw-scale-y: 105%;
      --tw-scale-z: 105%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
    .group-hover\:scale-\[1\.2\]:is(:where(.group):hover *) {
      scale: 1.2;
    }
    .group-hover\:scale-\[100\.8\]:is(:where(.group):hover *) {
      scale: 100.8;
    }
    .group-hover\:bg-black\/3:is(:where(.group):hover *) {
      background-color: color-mix(in srgb, #000 3%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .group-hover\:bg-black\/3:is(:where(.group):hover *) {
        background-color: color-mix(in oklab, var(--color-black) 3%, transparent);
      }
    }
    .group-hover\:opacity-0:is(:where(.group):hover *) {
      opacity: 0%;
    }
    .group-hover\:opacity-100:is(:where(.group):hover *) {
      opacity: 100%;
    }
    .group-hover\:shadow-\[inset_0_-6px_10px_\#ffffff3f\]:is(:where(.group):hover *) {
      --tw-shadow: inset 0 -6px 10px var(--tw-shadow-color, #ffffff3f);
      box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    }
    .group-hover\:brightness-\[0\.8\]:is(:where(.group):hover *) {
      --tw-brightness: brightness(0.8);
      filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
    }
    .group-hover\:\[animation-play-state\:paused\]:is(:where(.group):hover *) {
      animation-play-state: paused;
    }
  }
  .group-active\:shadow-\[inset_0_-10px_10px_\#ffffff3f\]:is(:where(.group):active *) {
    --tw-shadow: inset 0 -10px 10px var(--tw-shadow-color, #ffffff3f);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .before\:pointer-events-none::before {
    content: var(--tw-content);
    pointer-events: none;
  }
  .before\:absolute::before {
    content: var(--tw-content);
    position: absolute;
  }
  .before\:inset-0::before {
    content: var(--tw-content);
    inset: 0px;
  }
  .before\:-top-\(--border-size\)::before {
    content: var(--tw-content);
    top: calc(var(--border-size) * -1);
  }
  .before\:bottom-\[-20\%\]::before {
    content: var(--tw-content);
    bottom: -20%;
  }
  .before\:-left-\(--border-size\)::before {
    content: var(--tw-content);
    left: calc(var(--border-size) * -1);
  }
  .before\:left-1\/2::before {
    content: var(--tw-content);
    left: calc(1 / 2 * 100%);
  }
  .before\:-z-10::before {
    content: var(--tw-content);
    z-index: calc(10 * -1);
  }
  .before\:z-0::before {
    content: var(--tw-content);
    z-index: 0;
  }
  .before\:z-10::before {
    content: var(--tw-content);
    z-index: 10;
  }
  .before\:block::before {
    content: var(--tw-content);
    display: block;
  }
  .before\:h-\(--pseudo-element-height\)::before {
    content: var(--tw-content);
    height: var(--pseudo-element-height);
  }
  .before\:h-1\/5::before {
    content: var(--tw-content);
    height: calc(1 / 5 * 100%);
  }
  .before\:w-\(--pseudo-element-width\)::before {
    content: var(--tw-content);
    width: var(--pseudo-element-width);
  }
  .before\:w-3\/5::before {
    content: var(--tw-content);
    width: calc(3 / 5 * 100%);
  }
  .before\:-translate-x-1\/2::before {
    content: var(--tw-content);
    --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .before\:rounded-\(--border-radius\)::before {
    content: var(--tw-content);
    border-radius: var(--border-radius);
  }
  .before\:\[background-image\:linear-gradient\(var\(--gh-angle\)\,transparent_60\%\,var\(--gh-rgba\)_70\%\,transparent\,transparent_100\%\)\]::before {
    content: var(--tw-content);
    background-image: linear-gradient(var(--gh-angle),transparent 60%,var(--gh-rgba) 70%,transparent,transparent 100%);
  }
  .before\:bg-\[linear-gradient\(0deg\,var\(--neon-first-color\)\,var\(--neon-second-color\)\)\]::before {
    content: var(--tw-content);
    background-image: linear-gradient(0deg,var(--neon-first-color),var(--neon-second-color));
  }
  .before\:bg-\[linear-gradient\(90deg\,var\(--color-1\)\,var\(--color-5\)\,var\(--color-3\)\,var\(--color-4\)\,var\(--color-2\)\)\]::before {
    content: var(--tw-content);
    background-image: linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2));
  }
  .before\:\[background-size\:var\(--gh-size\)_var\(--gh-size\)\,100\%_100\%\]::before {
    content: var(--tw-content);
    background-size: var(--gh-size) var(--gh-size),100% 100%;
  }
  .before\:bg-\[length\:200\%\]::before {
    content: var(--tw-content);
    background-size: 200%;
  }
  .before\:bg-size-\[100\%_200\%\]::before {
    content: var(--tw-content);
    background-size: 100% 200%;
  }
  .before\:\[background-position\:-100\%_-100\%\,0_0\]::before {
    content: var(--tw-content);
    background-position: -100% -100%,0 0;
  }
  .before\:bg-no-repeat::before {
    content: var(--tw-content);
    background-repeat: no-repeat;
  }
  .before\:\[filter\:blur\(0\.75rem\)\]::before {
    content: var(--tw-content);
    filter: blur(0.75rem);
  }
  .before\:transition-\[background-position\]::before {
    content: var(--tw-content);
    transition-property: background-position;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .before\:transition-none::before {
    content: var(--tw-content);
    transition-property: none;
  }
  .before\:duration-\[var\(--gh-duration\)\]::before {
    content: var(--tw-content);
    --tw-duration: var(--gh-duration);
    transition-duration: var(--gh-duration);
  }
  .before\:ease-in-out::before {
    content: var(--tw-content);
    --tw-ease: var(--ease-in-out);
    transition-timing-function: var(--ease-in-out);
  }
  .before\:content-\[\'\'\]::before {
    --tw-content: '';
    content: var(--tw-content);
  }
  .after\:absolute::after {
    content: var(--tw-content);
    position: absolute;
  }
  .after\:-top-\(--border-size\)::after {
    content: var(--tw-content);
    top: calc(var(--border-size) * -1);
  }
  .after\:top-\[0\.04em\]::after {
    content: var(--tw-content);
    top: 0.04em;
  }
  .after\:-left-\(--border-size\)::after {
    content: var(--tw-content);
    left: calc(var(--border-size) * -1);
  }
  .after\:left-\[0\.04em\]::after {
    content: var(--tw-content);
    left: 0.04em;
  }
  .after\:-z-10::after {
    content: var(--tw-content);
    z-index: calc(10 * -1);
  }
  .after\:block::after {
    content: var(--tw-content);
    display: block;
  }
  .after\:h-\(--pseudo-element-height\)::after {
    content: var(--tw-content);
    height: var(--pseudo-element-height);
  }
  .after\:w-\(--pseudo-element-width\)::after {
    content: var(--tw-content);
    width: var(--pseudo-element-width);
  }
  .after\:rounded-\(--border-radius\)::after {
    content: var(--tw-content);
    border-radius: var(--border-radius);
  }
  .after\:bg-\[linear-gradient\(0deg\,var\(--neon-first-color\)\,var\(--neon-second-color\)\)\]::after {
    content: var(--tw-content);
    background-image: linear-gradient(0deg,var(--neon-first-color),var(--neon-second-color));
  }
  .after\:bg-\[linear-gradient\(45deg\,transparent_45\%\,var\(--shadow-color\)_45\%\,var\(--shadow-color\)_55\%\,transparent_0\)\]::after {
    content: var(--tw-content);
    background-image: linear-gradient(45deg,transparent 45%,var(--shadow-color) 45%,var(--shadow-color) 55%,transparent 0);
  }
  .after\:bg-size-\[0\.06em_0\.06em\]::after {
    content: var(--tw-content);
    background-size: 0.06em 0.06em;
  }
  .after\:bg-size-\[100\%_200\%\]::after {
    content: var(--tw-content);
    background-size: 100% 200%;
  }
  .after\:bg-clip-text::after {
    content: var(--tw-content);
    background-clip: text;
  }
  .after\:text-transparent::after {
    content: var(--tw-content);
    color: transparent;
  }
  .after\:opacity-80::after {
    content: var(--tw-content);
    opacity: 80%;
  }
  .after\:blur-\(--after-blur\)::after {
    content: var(--tw-content);
    --tw-blur: blur(var(--after-blur));
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .after\:content-\[\'\'\]::after {
    --tw-content: '';
    content: var(--tw-content);
  }
  .after\:content-\[attr\(data-text\)\]::after {
    --tw-content: attr(data-text);
    content: var(--tw-content);
  }
  .last\:border-b-0:last-child {
    border-bottom-style: var(--tw-border-style);
    border-bottom-width: 0px;
  }
  @media (hover: hover) {
    .hover\:scale-105:hover {
      --tw-scale-x: 105%;
      --tw-scale-y: 105%;
      --tw-scale-z: 105%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
    .hover\:scale-110:hover {
      --tw-scale-x: 110%;
      --tw-scale-y: 110%;
      --tw-scale-z: 110%;
      scale: var(--tw-scale-x) var(--tw-scale-y);
    }
    .hover\:bg-amber-900:hover {
      background-color: var(--color-amber-900);
    }
    .hover\:bg-gray-600:hover {
      background-color: var(--color-gray-600);
    }
    .hover\:bg-neutral-600:hover {
      background-color: var(--color-neutral-600);
    }
    .hover\:bg-neutral-700:hover {
      background-color: var(--color-neutral-700);
    }
    .hover\:bg-neutral-700\/50:hover {
      background-color: color-mix(in srgb, oklch(37.1% 0 none) 50%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .hover\:bg-neutral-700\/50:hover {
        background-color: color-mix(in oklab, var(--color-neutral-700) 50%, transparent);
      }
    }
    .hover\:bg-neutral-800:hover {
      background-color: var(--color-neutral-800);
    }
    .hover\:bg-slate-300:hover {
      background-color: var(--color-slate-300);
    }
    .hover\:\[padding-inline\:var\(--hover-padding\)\]:hover {
      padding-inline: var(--hover-padding);
    }
    .hover\:font-\[900\]:hover {
      --tw-font-weight: 900;
      font-weight: 900;
    }
    .hover\:text-neutral-300:hover {
      color: var(--color-neutral-300);
    }
    .hover\:text-rose-300:hover {
      color: var(--color-rose-300);
    }
    .hover\:opacity-80:hover {
      opacity: 80%;
    }
    .hover\:shadow:hover {
      --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
      box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    }
    .hover\:\[-webkit-text-stroke-color\:currentcolor\]:hover {
      -webkit-text-stroke-color: currentcolor;
    }
    .hover\:\[-webkit-text-stroke-width\:calc\(var\(--text-stroke-width\)\*2\)\]:hover {
      -webkit-text-stroke-width: calc(var(--text-stroke-width) * 2);
    }
    .hover\:before\:\[background-position\:100\%_100\%\,0_0\]:hover::before {
      content: var(--tw-content);
      background-position: 100% 100%,0 0;
    }
    .hover\:before\:transition-\[background-position\]:hover::before {
      content: var(--tw-content);
      transition-property: background-position;
      transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
      transition-duration: var(--tw-duration, var(--default-transition-duration));
    }
    .hover\:before\:duration-\[var\(--gh-duration\)\]:hover::before {
      content: var(--tw-content);
      --tw-duration: var(--gh-duration);
      transition-duration: var(--gh-duration);
    }
  }
  .focus-visible\:ring-\[3px\]:focus-visible {
    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }
  .active\:translate-y-px:active {
    --tw-translate-y: 1px;
    translate: var(--tw-translate-x) var(--tw-translate-y);
  }
  .disabled\:pointer-events-none:disabled {
    pointer-events: none;
  }
  .disabled\:opacity-40:disabled {
    opacity: 40%;
  }
  .disabled\:opacity-50:disabled {
    opacity: 50%;
  }
  .has-\[\+span\+span\:hover\]\:font-\[400\]:has( + span + span:hover) {
    --tw-font-weight: 400;
    font-weight: 400;
  }
  .has-\[\+span\:hover\]\:\[padding-inline\:var\(--hover-padding\)\]:has( + span:hover) {
    padding-inline: var(--hover-padding);
  }
  .has-\[\+span\:hover\]\:font-\[600\]:has( + span:hover) {
    --tw-font-weight: 600;
    font-weight: 600;
  }
  @supports (backdrop-blur: var(--tw)) {
    .supports-backdrop-blur\:bg-white\/10 {
      background-color: color-mix(in srgb, #fff 10%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .supports-backdrop-blur\:bg-white\/10 {
        background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
      }
    }
  }
  @media (width >= 40rem) {
    .sm\:w-2 {
      width: calc(var(--spacing) * 2);
    }
  }
  @media (width >= 48rem) {
    .md\:mx-0 {
      margin-inline: 0px;
    }
    .md\:block {
      display: block;
    }
    .md\:flex {
      display: flex;
    }
    .md\:h-24 {
      height: calc(var(--spacing) * 24);
    }
    .md\:h-96 {
      height: calc(var(--spacing) * 96);
    }
    .md\:w-96 {
      width: calc(var(--spacing) * 96);
    }
    .md\:grid-cols-2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .md\:grid-cols-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .md\:border-t-0 {
      border-top-style: var(--tw-border-style);
      border-top-width: 0px;
    }
    .md\:border-r {
      border-right-style: var(--tw-border-style);
      border-right-width: 1px;
    }
    .md\:p-8 {
      padding: calc(var(--spacing) * 8);
    }
    .md\:text-3xl {
      font-size: var(--text-3xl);
      line-height: var(--tw-leading, var(--text-3xl--line-height));
    }
  }
  @media (width >= 64rem) {
    .lg\:mx-1\.5 {
      margin-inline: calc(var(--spacing) * 1.5);
    }
    .lg\:flex {
      display: flex;
    }
    .lg\:hidden {
      display: none;
    }
    .lg\:p-10 {
      padding: calc(var(--spacing) * 10);
    }
    .lg\:text-4xl {
      font-size: var(--text-4xl);
      line-height: var(--tw-leading, var(--text-4xl--line-height));
    }
    .lg\:text-\[6rem\] {
      font-size: 6rem;
    }
    @media (hover: hover) {
      .lg\:group-hover\:-translate-y-10:is(:where(.group):hover *) {
        --tw-translate-y: calc(var(--spacing) * -10);
        translate: var(--tw-translate-x) var(--tw-translate-y);
      }
    }
  }
  @media (width >= 80rem) {
    .xl\:text-5xl {
      font-size: var(--text-5xl);
      line-height: var(--tw-leading, var(--text-5xl--line-height));
    }
  }
  .rtl\:right-1\.5:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    right: calc(var(--spacing) * 1.5);
  }
  .rtl\:mr-5:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    margin-right: calc(var(--spacing) * 5);
  }
  .rtl\:rotate-180:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    rotate: 180deg;
  }
  :where(.rtl\:space-x-reverse:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) > :not(:last-child)) {
    --tw-space-x-reverse: 1;
  }
  .rtl\:pr-0:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    padding-right: 0px;
  }
  .rtl\:pl-1:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
    padding-left: var(--spacing);
  }
  @media (prefers-color-scheme: dark) {
    .dark\:block {
      display: block;
    }
    .dark\:hidden {
      display: none;
    }
    .dark\:border-gray-800 {
      border-color: var(--color-gray-800);
    }
    .dark\:bg-neutral-100\/50 {
      background-color: color-mix(in srgb, oklch(97% 0 none) 50%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .dark\:bg-neutral-100\/50 {
        background-color: color-mix(in oklab, var(--color-neutral-100) 50%, transparent);
      }
    }
    .dark\:bg-neutral-900 {
      background-color: var(--color-neutral-900);
    }
    .dark\:bg-white {
      background-color: var(--color-white);
    }
    .dark\:bg-\[linear-gradient\(\#0a0a0a\,\#0a0a0a\)\,linear-gradient\(\#0a0a0a_50\%\,rgba\(255\,255\,255\,0\.6\)_80\%\,rgba\(0\,0\,0\,0\)\)\,linear-gradient\(90deg\,var\(--color-1\)\,var\(--color-5\)\,var\(--color-3\)\,var\(--color-4\)\,var\(--color-2\)\)\] {
      background-image: linear-gradient(#0a0a0a,#0a0a0a),linear-gradient(#0a0a0a 50%,rgba(255,255,255,0.6) 80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2));
    }
    .dark\:bg-\[linear-gradient\(\#fff\,\#fff\)\,linear-gradient\(\#fff_50\%\,rgba\(255\,255\,255\,0\.6\)_80\%\,rgba\(0\,0\,0\,0\)\)\,linear-gradient\(90deg\,var\(--color-1\)\,var\(--color-5\)\,var\(--color-3\)\,var\(--color-4\)\,var\(--color-2\)\)\] {
      background-image: linear-gradient(#fff,#fff),linear-gradient(#fff 50%,rgba(255,255,255,0.6) 80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2));
    }
    .dark\:bg-\[radial-gradient\(circle_at_50\%_0\%\,var\(--primary\)\/10\%_0\%\,transparent_60\%\)\] {
      background-image: radial-gradient(circle at 50% 0%,var(--primary)/10% 0%,transparent 60%);
    }
    .dark\:from-black {
      --tw-gradient-from: var(--color-black);
      --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
    }
    .dark\:via-white\/80 {
      --tw-gradient-via: color-mix(in srgb, #fff 80%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .dark\:via-white\/80 {
        --tw-gradient-via: color-mix(in oklab, var(--color-white) 80%, transparent);
      }
    }
    .dark\:via-white\/80 {
      --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
      --tw-gradient-stops: var(--tw-gradient-via-stops);
    }
    .dark\:fill-\[\#262626\] {
      fill: #262626;
    }
    .dark\:fill-\[\#404040\] {
      fill: #404040;
    }
    .dark\:stroke-\[\#404040\] {
      stroke: #404040;
    }
    .dark\:stroke-white\/10 {
      stroke: color-mix(in srgb, #fff 10%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .dark\:stroke-white\/10 {
        stroke: color-mix(in oklab, var(--color-white) 10%, transparent);
      }
    }
    .dark\:font-light {
      --tw-font-weight: var(--font-weight-light);
      font-weight: var(--font-weight-light);
    }
    .dark\:text-\[rgb\(255\,255\,255\,90\%\)\] {
      color: rgb(255,255,255,90%);
    }
    .dark\:text-black {
      color: var(--color-black);
    }
    .dark\:text-gray-500 {
      color: var(--color-gray-500);
    }
    .dark\:text-neutral-300 {
      color: var(--color-neutral-300);
    }
    .dark\:text-neutral-400\/70 {
      color: color-mix(in srgb, oklch(70.8% 0 none) 70%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .dark\:text-neutral-400\/70 {
        color: color-mix(in oklab, var(--color-neutral-400) 70%, transparent);
      }
    }
    .dark\:text-white {
      color: var(--color-white);
    }
    .dark\:text-white\/20 {
      color: color-mix(in srgb, #fff 20%, transparent);
    }
    @supports (color: color-mix(in lab, red, red)) {
      .dark\:text-white\/20 {
        color: color-mix(in oklab, var(--color-white) 20%, transparent);
      }
    }
    .dark\:opacity-\[0\.75\] {
      opacity: 0.75;
    }
    .dark\:\[box-shadow\:0_-20px_80px_-20px_\#ffffff1f_inset\] {
      box-shadow: 0 -20px 80px -20px #ffffff1f inset;
    }
    .dark\:\[border\:1px_solid_rgba\(255\,255\,255\,\.1\)\] {
      border: 1px solid rgba(255,255,255,.1);
    }
  }
  @media (hover: hover) {
    @media (prefers-color-scheme: dark) {
      .group-hover\:dark\:bg-neutral-800\/10:is(:where(.group):hover *) {
        background-color: color-mix(in srgb, oklch(26.9% 0 none) 10%, transparent);
      }
      @supports (color: color-mix(in lab, red, red)) {
        .group-hover\:dark\:bg-neutral-800\/10:is(:where(.group):hover *) {
          background-color: color-mix(in oklab, var(--color-neutral-800) 10%, transparent);
        }
      }
    }
  }
  @media (prefers-color-scheme: dark) {
    @media (hover: hover) {
      .dark\:hover\:shadow-\[0_0_20px_var\(--primary\)\/10\%\]:hover {
        --tw-shadow: 0 0 20px var(--primary)/10%;
        box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
      }
    }
  }
  @supports (backdrop-blur: var(--tw)) {
    @media (prefers-color-scheme: dark) {
      .supports-backdrop-blur\:dark\:bg-black\/10 {
        background-color: color-mix(in srgb, #000 10%, transparent);
      }
      @supports (color: color-mix(in lab, red, red)) {
        .supports-backdrop-blur\:dark\:bg-black\/10 {
          background-color: color-mix(in oklab, var(--color-black) 10%, transparent);
        }
      }
    }
  }
  .\[\&_svg\]\:pointer-events-none svg {
    pointer-events: none;
  }
  .\[\&_svg\]\:shrink-0 svg {
    flex-shrink: 0;
  }
  .\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*='size-']) {
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
  }
  .\[\&\>\*\]\:p-2 > * {
    padding: calc(var(--spacing) * 2);
  }
  .\[\&\>div\>pre\>code\>\:not\(\.focused\)\]\:opacity-50\! > div > pre > code > :not(.focused) {
    opacity: 50% !important;
  }
  .\[\&\>div\>pre\>code\>\:not\(\.focused\)\]\:blur-\[0\.095rem\]\! > div > pre > code > :not(.focused) {
    --tw-blur: blur(0.095rem) !important;
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,) !important;
  }
  .\[\&\>div\>pre\>code\>\:not\(\.focused\)\]\:transition-all > div > pre > code > :not(.focused) {
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
  .\[\&\>div\>pre\>code\>\:not\(\.focused\)\]\:duration-300 > div > pre > code > :not(.focused) {
    --tw-duration: 300ms;
    transition-duration: 300ms;
  }
  .\[\&\>pre\]\:h-full > pre {
    height: 100%;
  }
  .\[\&\>pre\]\:w-screen\! > pre {
    width: 100vw !important;
  }
  .\[\&\>pre\]\:py-2 > pre {
    padding-block: calc(var(--spacing) * 2);
  }
  .\[\&\>pre\>code\]\:inline-block\! > pre > code {
    display: inline-block !important;
  }
  .\[\&\>pre\>code\]\:w-full\! > pre > code {
    width: 100% !important;
  }
  .\[\&\>pre\>code\>\.add\]\:bg-\[rgba\(16\,185\,129\,\.16\)\] > pre > code > .add {
    background-color: rgba(16,185,129,.16);
  }
  .\[\&\>pre\>code\>\.highlighted\]\:inline-block > pre > code > .highlighted {
    display: inline-block;
  }
  .\[\&\>pre\>code\>\.highlighted\]\:w-full > pre > code > .highlighted {
    width: 100%;
  }
  .\[\&\>pre\>code\>\.highlighted\]\:bg-\(--highlight-color\)\! > pre > code > .highlighted {
    background-color: var(--highlight-color) !important;
  }
  .\[\&\>pre\>code\>\.remove\]\:bg-\[rgba\(244\,63\,94\,\.16\)\] > pre > code > .remove {
    background-color: rgba(244,63,94,.16);
  }
  @media (hover: hover) {
    .group-hover\/left\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:opacity-100\!:is(:where(.group\/left):hover *) > pre > code > :not(.focused) {
      opacity: 100% !important;
    }
    .group-hover\/left\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:blur-none\!:is(:where(.group\/left):hover *) > pre > code > :not(.focused) {
      --tw-blur:   !important;
      filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,) !important;
    }
    .group-hover\/left\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:transition-all:is(:where(.group\/left):hover *) > pre > code > :not(.focused) {
      transition-property: all;
      transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
      transition-duration: var(--tw-duration, var(--default-transition-duration));
    }
    .group-hover\/left\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:duration-300:is(:where(.group\/left):hover *) > pre > code > :not(.focused) {
      --tw-duration: 300ms;
      transition-duration: 300ms;
    }
    .group-hover\/right\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:opacity-100\!:is(:where(.group\/right):hover *) > pre > code > :not(.focused) {
      opacity: 100% !important;
    }
    .group-hover\/right\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:blur-none\!:is(:where(.group\/right):hover *) > pre > code > :not(.focused) {
      --tw-blur:   !important;
      filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,) !important;
    }
    .group-hover\/right\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:transition-all:is(:where(.group\/right):hover *) > pre > code > :not(.focused) {
      transition-property: all;
      transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
      transition-duration: var(--tw-duration, var(--default-transition-duration));
    }
    .group-hover\/right\:\[\&\>pre\>code\>\:not\(\.focused\)\]\:duration-300:is(:where(.group\/right):hover *) > pre > code > :not(.focused) {
      --tw-duration: 300ms;
      transition-duration: 300ms;
    }
  }
  .\[\&\>pre\>code\>span\]\:inline-block\! > pre > code > span {
    display: inline-block !important;
  }
  .\[\&\>pre\>code\>span\]\:w-full > pre > code > span {
    width: 100%;
  }
  .\[\&\>pre\>code\>span\]\:px-4 > pre > code > span {
    padding-inline: calc(var(--spacing) * 4);
  }
  .\[\&\>pre\>code\>span\]\:py-0\.5 > pre > code > span {
    padding-block: calc(var(--spacing) * 0.5);
  }
  :hover + .\[\:hover\+\&\]\:\[padding-inline\:var\(--hover-padding\)\] {
    padding-inline: var(--hover-padding);
  }
  :hover + .\[\:hover\+\&\]\:font-\[600\] {
    --tw-font-weight: 600;
    font-weight: 600;
  }
  :hover + span + .\[\:hover\+span\+\&\]\:font-\[400\] {
    --tw-font-weight: 400;
    font-weight: 400;
  }
}
html, body, #root {
  height: 100%;
  margin: 0;
  background: #111;
  color: #eee;
  font-family: system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (pointer: coarse) {
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="button"], [type="submit"], [type="color"], [type="file"]), textarea, select {
    font-size: max(16px, 1em) !important;
  }
}
body[data-pc-resizing] iframe {
  pointer-events: none;
}
@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-scale-x {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@property --tw-scale-y {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@property --tw-scale-z {
  syntax: "*";
  inherits: false;
  initial-value: 1;
}
@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}
@property --tw-scroll-snap-strictness {
  syntax: "*";
  inherits: false;
  initial-value: proximity;
}
@property --tw-space-x-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-gradient-position {
  syntax: "*";
  inherits: false;
}
@property --tw-gradient-from {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}
@property --tw-gradient-via {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}
@property --tw-gradient-to {
  syntax: "<color>";
  inherits: false;
  initial-value: #0000;
}
@property --tw-gradient-stops {
  syntax: "*";
  inherits: false;
}
@property --tw-gradient-via-stops {
  syntax: "*";
  inherits: false;
}
@property --tw-gradient-from-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --tw-gradient-via-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 50%;
}
@property --tw-gradient-to-position {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-leading {
  syntax: "*";
  inherits: false;
}
@property --tw-font-weight {
  syntax: "*";
  inherits: false;
}
@property --tw-tracking {
  syntax: "*";
  inherits: false;
}
@property --tw-ordinal {
  syntax: "*";
  inherits: false;
}
@property --tw-slashed-zero {
  syntax: "*";
  inherits: false;
}
@property --tw-numeric-figure {
  syntax: "*";
  inherits: false;
}
@property --tw-numeric-spacing {
  syntax: "*";
  inherits: false;
}
@property --tw-numeric-fraction {
  syntax: "*";
  inherits: false;
}
@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-inset-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-ring-color {
  syntax: "*";
  inherits: false;
}
@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false;
}
@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-ring-inset {
  syntax: "*";
  inherits: false;
}
@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}
@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}
@property --tw-outline-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-blur {
  syntax: "*";
  inherits: false;
}
@property --tw-brightness {
  syntax: "*";
  inherits: false;
}
@property --tw-contrast {
  syntax: "*";
  inherits: false;
}
@property --tw-grayscale {
  syntax: "*";
  inherits: false;
}
@property --tw-hue-rotate {
  syntax: "*";
  inherits: false;
}
@property --tw-invert {
  syntax: "*";
  inherits: false;
}
@property --tw-opacity {
  syntax: "*";
  inherits: false;
}
@property --tw-saturate {
  syntax: "*";
  inherits: false;
}
@property --tw-sepia {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-blur {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-brightness {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-contrast {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-grayscale {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-hue-rotate {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-invert {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-opacity {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-saturate {
  syntax: "*";
  inherits: false;
}
@property --tw-backdrop-sepia {
  syntax: "*";
  inherits: false;
}
@property --tw-duration {
  syntax: "*";
  inherits: false;
}
@property --tw-ease {
  syntax: "*";
  inherits: false;
}
@property --tw-content {
  syntax: "*";
  inherits: false;
  initial-value: "";
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
@layer properties {
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
    *, ::before, ::after, ::backdrop {
      --tw-translate-x: 0;
      --tw-translate-y: 0;
      --tw-translate-z: 0;
      --tw-scale-x: 1;
      --tw-scale-y: 1;
      --tw-scale-z: 1;
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-scroll-snap-strictness: proximity;
      --tw-space-x-reverse: 0;
      --tw-border-style: solid;
      --tw-gradient-position: initial;
      --tw-gradient-from: #0000;
      --tw-gradient-via: #0000;
      --tw-gradient-to: #0000;
      --tw-gradient-stops: initial;
      --tw-gradient-via-stops: initial;
      --tw-gradient-from-position: 0%;
      --tw-gradient-via-position: 50%;
      --tw-gradient-to-position: 100%;
      --tw-leading: initial;
      --tw-font-weight: initial;
      --tw-tracking: initial;
      --tw-ordinal: initial;
      --tw-slashed-zero: initial;
      --tw-numeric-figure: initial;
      --tw-numeric-spacing: initial;
      --tw-numeric-fraction: initial;
      --tw-shadow: 0 0 #0000;
      --tw-shadow-color: initial;
      --tw-shadow-alpha: 100%;
      --tw-inset-shadow: 0 0 #0000;
      --tw-inset-shadow-color: initial;
      --tw-inset-shadow-alpha: 100%;
      --tw-ring-color: initial;
      --tw-ring-shadow: 0 0 #0000;
      --tw-inset-ring-color: initial;
      --tw-inset-ring-shadow: 0 0 #0000;
      --tw-ring-inset: initial;
      --tw-ring-offset-width: 0px;
      --tw-ring-offset-color: #fff;
      --tw-ring-offset-shadow: 0 0 #0000;
      --tw-outline-style: solid;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
      --tw-backdrop-blur: initial;
      --tw-backdrop-brightness: initial;
      --tw-backdrop-contrast: initial;
      --tw-backdrop-grayscale: initial;
      --tw-backdrop-hue-rotate: initial;
      --tw-backdrop-invert: initial;
      --tw-backdrop-opacity: initial;
      --tw-backdrop-saturate: initial;
      --tw-backdrop-sepia: initial;
      --tw-duration: initial;
      --tw-ease: initial;
      --tw-content: "";
    }
  }
}
/* Base focus glow style (must be kept even when motion is disabled) */
[data-skin] *:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 1px;
}
[data-skin] select:focus, 
[data-skin] input:focus, 
[data-skin] textarea:focus {
  border-color: var(--ui-accent);
  outline: none;
}

/* Hover border color of the cells in the left rail card library */
[data-skin] [data-pc-card]:hover {
  border-color: var(--ui-accent) !important;
}

/* Motion: hover, bounce-back, panel dividers, timeline, etc. */
@media (prefers-reduced-motion: no-preference) {
  /* Button animation */
  [data-skin] button, 
  [data-skin] [class*="ai-"][class*="-btn"],
  [data-skin] [class*="ais-btn"] {
    transition: filter 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  [data-skin] button:hover,
  [data-skin] [class*="ai-"][class*="-btn"]:hover,
  [data-skin] [class*="ais-btn"]:hover {
    filter: brightness(1.1);
  }
  
  [data-skin] button:active,
  [data-skin] [class*="ai-"][class*="-btn"]:active,
  [data-skin] [class*="ais-btn"]:active {
    transform: scale(0.97);
  }

  /* Focus glow shadow */
  [data-skin] select:focus, 
  [data-skin] input:focus, 
  [data-skin] textarea:focus {
    box-shadow: var(--ui-glow);
  }

  /* Dialog fade-in / float-up */
  @keyframes ais-backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes ais-dialog-up {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  [data-skin] .ais-backdrop {
    animation: ais-backdrop-fade 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-skin] .ais-dialog {
    animation: ais-dialog-up 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Motion of the cells in the left rail card library */
  [data-skin] [data-pc-card] {
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-skin] [data-pc-card]:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow);
  }
}

/*
 * Entrance motion: playEnter in src/editor/enterMotion.ts adds the class at the moment something "has really just appeared" and removes it once the animation has played.
 * Used when switching sections in the left rail, opening a group / going back to the overview, switching tabs in the right rail, new messages, queue rows, and report cards.
 * Panels that stay mounted and are shown or hidden via display must not put the animation on the persistent class, otherwise it replays every time they are shown again.
 * Displacement uses the standalone translate property and does not occupy transform: the element's own transform (press-to-shrink and the like) stacks on top as usual.
 */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pc-enter-rise {
    from { opacity: 0; translate: 0 6px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes pc-enter-from-right {
    from { opacity: 0; translate: 8px 0; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes pc-enter-from-left {
    from { opacity: 0; translate: -8px 0; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes pc-enter-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .pc-enter-rise {
    animation: pc-enter-rise 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .pc-enter-from-right {
    animation: pc-enter-from-right 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .pc-enter-from-left {
    animation: pc-enter-from-left 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .pc-enter-fade {
    animation: pc-enter-fade 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
/*
 * Shared style classes (UI redesign contract §4): cards floating on the canvas, vertical rail, filter pills, icon buttons, primary buttons, section titles.
 * Imported by skins.css and loaded globally by both the start page and the editor; the left rail, right rail, timeline and other places use these class names directly.
 * Do not write another rule of the same name in your own styles.
 * Colors and corner radii are read only from --ui-* variables (useSkin writes them onto <html> per skin); the fallback values in the parentheses only kick in when the variable is missing.
 */

/* ── Card: a panel floating over the canvas, layered by a 1px outline and a lightness difference, no drop shadow ───────────── */
.pc-card-surface {
  background-color: var(--ui-bg-2, #1B1A21);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-xl, 10px);
  overflow: hidden;
}

/* ── rail: vertical icon bar, transparent background showing the canvas ─────────────────────────────── */
:root {
  --ui-rail-w: 64px;
  --ui-rail-label-size: 11px;
}
:root[lang="en"] {
  --ui-rail-w: 80px;
}
:root[lang="ja"] {
  --ui-rail-w: 88px;
  --ui-rail-label-size: 10px;
}

.pc-rail {
  width: var(--ui-rail-w, 64px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: transparent;
  align-items: center;
  padding: 8px 0;
}

/* rail item: 56px tall button with 4px outer rail margin on each side, a 22px icon (svg) on top and a single-line label (span) below */
.pc-rail-item {
  width: calc(var(--ui-rail-w, 64px) - 8px);
  height: 56px;
  border-radius: var(--ui-radius-lg, 8px);
  color: var(--ui-fg-muted, #A6A4B2);
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  box-sizing: border-box;
}
.pc-rail-item:not(.is-on):not(:disabled):hover {
  background-color: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
}
.pc-rail-item:not(:disabled):active {
  background-color: var(--ui-float, #383742);
}

/* Selected item: light background + primary text color, plus a 3px accent-color vertical bar along the outer edge of the rail (drawn on the left for the left rail, on the right for the right rail) */
.pc-rail-item.is-on {
  background-color: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
}
.pc-rail--left .pc-rail-item.is-on::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background-color: var(--ui-accent, #00DBDB);
  border-radius: 0 3px 3px 0;
}
.pc-rail--right .pc-rail-item.is-on::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background-color: var(--ui-accent, #00DBDB);
  border-radius: 3px 0 0 3px;
}

.pc-rail-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.pc-rail-item span {
  font-size: var(--ui-rail-label-size, 11px);
  line-height: 1.1;
  white-space: nowrap;
}

/* Divider line inside the rail */
.pc-rail-sep {
  width: 32px;
  height: 1px;
  background-color: var(--ui-border, #2A2932);
  margin: 4px 0;
}

/* ── Filter pill: L3 background normally, rises to L4 on hover; .is-on is filled with the accent color ───────────────── */
.pc-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--ui-radius, 6px);
  background-color: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.pc-chip:not(.is-on):not(:disabled):hover {
  background-color: var(--ui-float, #383742);
}
.pc-chip:not(.is-on):not(:disabled):active {
  background-color: color-mix(in oklab, var(--ui-panel-2, #2C2B34) 78%, var(--ui-bg, #111016));
}
.pc-chip.is-on {
  background-color: var(--ui-accent, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
}
.pc-chip.is-on:not(:disabled):hover {
  background-color: var(--ui-accent-hover, #9571FF);
}
.pc-chip.is-on:not(:disabled):active {
  background-color: var(--ui-accent-press, #613CC7);
}

/* The small dropdown arrow and the × close in a pill; on hover, × gets a faint backing that follows the text color, visible on both dark and light skins */
.pc-chip-caret {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.pc-chip-x {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  border-radius: var(--ui-radius-sm, 4px);
}
.pc-chip-x:hover {
  opacity: 1;
  background-color: color-mix(in oklab, var(--ui-fg, #F2F1F6) 16%, transparent);
}

/* ── Icon button: 32px square with transparent background, L3 on hover; toggle buttons with aria-pressed use a faint accent-color background + accent-color icon ── */
.pc-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--ui-radius, 6px);
  background-color: transparent;
  color: var(--ui-fg, #F2F1F6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
}
.pc-icon-btn:not([aria-pressed="true"]):not(:disabled):hover {
  background-color: var(--ui-panel-2, #2C2B34);
}
.pc-icon-btn:not([aria-pressed="true"]):not(:disabled):active {
  background-color: var(--ui-float, #383742);
}
.pc-icon-btn[aria-pressed="true"] {
  background-color: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
  color: var(--ui-accent, #00DBDB);
}
.pc-icon-btn[aria-pressed="true"]:not(:disabled):hover {
  background-color: color-mix(in oklab, var(--ui-accent-soft, rgba(0, 219, 219, 0.2)) 72%, var(--ui-accent, #00DBDB));
}

/* ── Primary button: solid accent color, 36 high; .is-block fills a whole row ─────────────────────── */
.pc-btn-primary {
  height: 36px;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-accent-grad, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.pc-btn-primary:not(:disabled):hover {
  background: var(--ui-accent-grad-hover, #9571FF);
}
.pc-btn-primary:not(:disabled):active {
  background: var(--ui-accent-grad-press, #613CC7);
}
.pc-btn-primary.is-block {
  width: 100%;
  display: flex;
}

/* ── States shared by several kinds of buttons ───────────────────────────────────────────── */

/* Keyboard focus: uniformly use the --ui-focus-ring outer ring, replacing the outline that motion.css adds to every element (this file is imported after it) */
.pc-rail-item:focus-visible,
.pc-chip:focus-visible,
.pc-icon-btn:focus-visible,
.pc-btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px var(--ui-accent, #00DBDB));
}

/* Disabled: semi-transparent, no response to hover / press (the hover and press rules above all exclude :disabled) */
.pc-rail-item:disabled,
.pc-chip:disabled,
.pc-icon-btn:disabled,
.pc-btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}
/* motion.css adds hover brightening and press shrinking to all buttons ([data-skin] button:hover, higher specificity), so disabled ones have to be pushed back */
[data-skin] .pc-rail-item:disabled,
[data-skin] .pc-chip:disabled,
[data-skin] .pc-icon-btn:disabled,
[data-skin] .pc-btn-primary:disabled {
  filter: none;
  transform: none;
}

/* ── Drawer / panel top title ─────────────────────────────────────────── */
.pc-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-fg, #F2F1F6);
}
/* 1. Variables: each skin's --ui-* are written onto <html> by useSkin at runtime (the data is in skins.ts / palettes.ts).
   Here we only wire the unprefixed variables used in the AI panel and settings dialog styles to --ui-*. */
[data-skin] {
  --bg-canvas: var(--ui-bg);
  --bg-panel: var(--ui-panel);
  --ink: var(--ui-fg);
  --ink-muted: var(--ui-fg-muted);
  --ink-faint: var(--ui-fg-faint);
  --hairline: var(--ui-border);
  --hairline-strong: var(--ui-border-strong);
  --accent: var(--ui-accent);
  --on-accent: var(--ui-accent-fg);
  --danger: var(--ui-danger);
  --fill-subtle: var(--ui-panel-2);
  --fill-hover: var(--ui-float);
  --font-sans: var(--ui-font);
  --font-mono: var(--ui-font-mono);
}

/* Switching animation (200ms) */
html.skin-swapping * {
  transition: background-color 200ms, border-color 200ms, color 200ms, box-shadow 200ms;
}

/* Base body override */
[data-skin] body {
  background-color: var(--ui-bg);
  color: var(--ui-fg);
  font-family: var(--ui-font);
}

/* Special background enhancement for aurora */
[data-skin="aurora"] body {
  background-image: radial-gradient(circle at top right, rgba(20, 184, 166, 0.05), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent 40%);
}


/* 2. Utility class mapping: overrides the various Tailwind gray-scale classes */

/* Border colors */
[data-skin] .border-neutral-800, [data-skin] .border-gray-800 { border-color: var(--ui-border); }
[data-skin] .border-neutral-700, [data-skin] .border-gray-700 { border-color: var(--ui-border-strong); }
[data-skin] .border-neutral-600, [data-skin] .border-gray-600 { border-color: var(--ui-border-strong); }
[data-skin] .border-neutral-500, [data-skin] .border-gray-500 { border-color: var(--ui-accent); }
[data-skin] .border-white { border-color: var(--ui-fg); }
[data-skin] .border-white\/10 { border-color: var(--ui-border); }
[data-skin] .border-white\/20 { border-color: var(--ui-border-strong); }
[data-skin] .border-black\/20 { border-color: var(--ui-border); }
[data-skin] .hover\:border-neutral-600:hover { border-color: var(--ui-accent); }

/* Background colors */
[data-skin] .bg-neutral-950, [data-skin] .bg-gray-950 { background-color: var(--ui-bg); }
[data-skin] .bg-neutral-900, [data-skin] .bg-gray-900 { background-color: var(--ui-panel); }
[data-skin] .bg-neutral-800, [data-skin] .bg-gray-800 { background-color: var(--ui-panel-2); }
[data-skin] .bg-neutral-700, [data-skin] .bg-gray-700 { background-color: var(--ui-border); }
[data-skin] .bg-neutral-600, [data-skin] .bg-gray-600 { background-color: var(--ui-border-strong); }
[data-skin] .bg-neutral-100, [data-skin] .bg-gray-100 { background-color: var(--ui-fg); color: var(--ui-bg); }
[data-skin] .bg-black { background-color: var(--ui-bg); }
[data-skin] .bg-black\/20 { background-color: var(--ui-backdrop); }
[data-skin] .bg-black\/30 { background-color: var(--ui-backdrop); }
[data-skin] .bg-black\/50 { background-color: var(--ui-backdrop); }
[data-skin] .bg-black\/60 { background-color: var(--ui-backdrop); }
[data-skin] .bg-black\/70 { background-color: var(--ui-backdrop); }
[data-skin] .hover\:bg-neutral-800:hover { background-color: var(--ui-panel-2); }
[data-skin] .hover\:bg-neutral-700:hover { background-color: var(--ui-border); }
[data-skin] .hover\:bg-neutral-600:hover { background-color: var(--ui-border-strong); }
[data-skin] .hover\:bg-white\/30:hover { background-color: var(--ui-accent-soft); }

/* Text colors */
[data-skin] .text-neutral-900, [data-skin] .text-gray-900 { color: var(--ui-bg); }
[data-skin] .text-neutral-700, [data-skin] .text-gray-700 { color: var(--ui-fg-faint); }
[data-skin] .text-neutral-600, [data-skin] .text-gray-600 { color: var(--ui-fg-faint); }
[data-skin] .text-neutral-500, [data-skin] .text-gray-500 { color: var(--ui-fg-muted); }
[data-skin] .text-neutral-400, [data-skin] .text-gray-400 { color: var(--ui-fg-muted); }
[data-skin] .text-neutral-300, [data-skin] .text-gray-300 { color: var(--ui-fg); }
[data-skin] .text-neutral-200, [data-skin] .text-gray-200 { color: var(--ui-fg); }
[data-skin] .text-neutral-100, [data-skin] .text-gray-100 { color: var(--ui-fg); }
[data-skin] .bg-neutral-950.text-white { color: var(--ui-fg); }
[data-skin] .hover\:text-white:hover { color: var(--ui-fg); }

/* 3. AI panel / dialog overrides */
[data-skin] .ais-backdrop {
  background-color: var(--ui-backdrop);
}
[data-skin] .ais-dialog {
  background-color: var(--ui-bg);
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  color: var(--ui-fg);
}
/* The whole right rail is L2 (see editor/shell.css); the header is no longer pushed separately down to L1 */
[data-skin] .ai-panel-header {
  background-color: var(--ui-panel);
  border-bottom-color: var(--ui-border);
}

/* 4. Scrollbar overrides */
[data-skin] ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
[data-skin] ::-webkit-scrollbar-track {
  background: transparent;
}
[data-skin] ::-webkit-scrollbar-thumb {
  background: var(--ui-scroll-thumb);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
[data-skin] ::-webkit-scrollbar-thumb:hover {
  background: var(--ui-scroll-thumb-hover);
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* ============================================================
 * 4. Polish layer: make the primary color actually show up in the UI, and give panels and controls depth
 * ============================================================ */

/* App background: dark skins get a bit of radial light toward the primary color, light skins stay clean; the Flow (studio) series has a flat style and gets no halo.
 * Applied only on the editor root node. It used to select every .bg-neutral-950, so the timeline's 20px-high
 * small bars (range bar, "Track" header, ruler, bottom scrollbar) each got their own 1200×600 glow too,
 * In such a short bar the whole bar falls within the 14% accent-color stop, so it looked like an accent-color band running across the track column.
 * Dark/light is now written directly into the selector, instead of adding a light-mode background-image:none afterwards to override it:
 * the rule with :not() has higher specificity, so light skins would end up getting the halo painted on instead. */
[data-skin-mode="dark"]:not([data-skin^="studio-"]) [data-pc="editor"] {
  background-image:
    radial-gradient(1200px 600px at 20% -10%, color-mix(in oklab, var(--ui-accent) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, color-mix(in oklab, var(--ui-accent) 8%, transparent), transparent 60%);
}

/* Generic buttons: two-layer surface + thin border + primary-color outline on hover */
[data-skin] button.bg-neutral-800,
[data-skin] button.bg-neutral-700 {
  background: linear-gradient(180deg, var(--ui-panel-2), var(--ui-panel));
  border: 1px solid var(--ui-border);
  color: var(--ui-fg);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--ui-fg) 8%, transparent), 0 1px 2px rgba(0, 0, 0, 0.25);
}
[data-skin] button.bg-neutral-800:hover,
[data-skin] button.bg-neutral-700:hover,
[data-skin] button.hover\:bg-neutral-700:hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--ui-accent) 22%, var(--ui-panel-2)), var(--ui-panel));
  border-color: color-mix(in oklab, var(--ui-accent) 60%, var(--ui-border));
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--ui-fg) 10%, transparent), var(--ui-glow);
}

/* Dropdowns and input boxes */
[data-skin] select.bg-neutral-800,
[data-skin] input.bg-neutral-800,
[data-skin] input.bg-neutral-900,
[data-skin] textarea.bg-neutral-900 {
  background: var(--ui-bg-2);
  border: 1px solid var(--ui-border);
  color: var(--ui-fg);
}

/* Timeline clips: the motion graphics track uses a primary-color gradient, the video track a greenish secondary color; with inner highlight and outline */
[data-skin] .bg-blue-600 {
  background: linear-gradient(180deg, color-mix(in oklab, var(--ui-accent) 88%, white), color-mix(in oklab, var(--ui-accent) 80%, black));
  border: 1px solid color-mix(in oklab, var(--ui-accent) 60%, black);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 3px rgba(0, 0, 0, 0.35);
  color: var(--ui-accent-fg);
}
[data-skin] .hover\:bg-blue-500:hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--ui-accent) 75%, white), var(--ui-accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), var(--ui-glow);
}
[data-skin] .bg-emerald-600 {
  background: linear-gradient(180deg, color-mix(in oklab, var(--ui-accent) 35%, #14a37f), color-mix(in oklab, var(--ui-accent) 30%, #0b7a5e));
  border: 1px solid color-mix(in oklab, var(--ui-accent) 30%, #075e47);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-skin] .hover\:bg-emerald-500:hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--ui-accent) 35%, #22c592), color-mix(in oklab, var(--ui-accent) 30%, #119a76));
}
[data-skin] .diagonal-stripes { opacity: 0.7; }

/* Card library cells: primary-color outline on hover, a slight lift, and a primary-color stripe on the left */
[data-skin] .cursor-grab.bg-neutral-900 {
  background: linear-gradient(160deg, var(--ui-panel), var(--ui-bg-2));
  border-color: var(--ui-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
[data-skin] .cursor-grab.bg-neutral-900:hover {
  border-color: color-mix(in oklab, var(--ui-accent) 70%, var(--ui-border));
  box-shadow: inset 3px 0 0 var(--ui-accent), var(--ui-glow), 0 6px 14px rgba(0, 0, 0, 0.35);
}

/* Timeline ruler area and track headers */
[data-skin] footer .bg-neutral-900 { background: var(--ui-bg-2); }
[data-skin] footer .bg-neutral-800 { background: var(--ui-panel); }

/* ============================================================
 * 5. Design mockup color swatches: semantic colors / track colors / floating layer / accent color states
 *    First give all skins a default set of values, then define two complete sets of values, "Dark room" and "Bright room"
 * ============================================================ */

/* Light mode: no bottom radial glow, panels are layered by shadows (design mockup: L4 = white + shadow) */

/* Floating layer L4: menus, popups, hover states */
[data-skin] .ais-dialog { background: var(--ui-float); box-shadow: var(--ui-shadow); }
[data-skin] .hover\:bg-neutral-800:hover { background-color: var(--ui-float); }

/* Semantic colors: status feedback, not used in the regular UI */
[data-skin] .text-red-500, [data-skin] .text-red-400 { color: var(--ui-danger); }
[data-skin] .bg-red-500, [data-skin] .bg-red-600 { background-color: var(--ui-danger); }
[data-skin] .text-amber-400, [data-skin] .text-yellow-400 { color: var(--ui-warn); }
[data-skin] .text-emerald-400, [data-skin] .text-green-400 { color: var(--ui-success); }
[data-skin] .text-sky-400, [data-skin] .text-blue-400 { color: var(--ui-info); }

/* Accent color states: hover / pressed (primary action buttons and selection) */
[data-skin] .bg-sky-600, [data-skin] .bg-blue-500.rounded, [data-skin] button.bg-blue-600 {
  background: var(--ui-accent-grad); color: var(--ui-accent-fg); border-color: var(--ui-accent-press);
}
[data-skin] button.bg-blue-600:hover { background: var(--ui-accent-grad-hover); }
[data-skin] button.bg-blue-600:active { background: var(--ui-accent-grad-press); }

/* Track colors: clips take their color by media type (color guidelines, item 03).
   Before, all card clips had one color, which filled the space without conveying information; now data-track-kind decides which tier to use,
   so text / video / transition / effects can be read at a glance. Text on a clip uses a darker version of the same color, guaranteeing 4.5:1. */
.pc-clip {
  --clip: var(--ui-track-text);
  --clip-ink: var(--ui-track-ink-text);
  border-radius: var(--ui-radius, 6px);
  background: linear-gradient(180deg, color-mix(in oklab, var(--clip) 92%, white), color-mix(in oklab, var(--clip) 88%, black));
  /* Outline drawn on the inside: a 1px semi-transparent light line that takes up no box width */
  border: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  /* Text color is black or white depending on the track color's brightness (see trackInk in skins.ts), passing 4.5:1 on both dark and light skins */
  color: var(--clip-ink);
}
.pc-clip[data-track-kind="video"] { --clip: var(--ui-track-video); --clip-ink: var(--ui-track-ink-video); }
.pc-clip[data-track-kind="audio"] { --clip: var(--ui-track-audio); --clip-ink: var(--ui-track-ink-audio); }
.pc-clip[data-track-kind="image"] { --clip: var(--ui-track-image); --clip-ink: var(--ui-track-ink-image); }
.pc-clip[data-track-kind="text"] { --clip: var(--ui-track-text); --clip-ink: var(--ui-track-ink-text); }
.pc-clip[data-track-kind="fx"] { --clip: var(--ui-track-fx); --clip-ink: var(--ui-track-ink-fx); }
.pc-clip[data-track-kind="transition"] { --clip: var(--ui-track-transition); --clip-ink: var(--ui-track-ink-transition); }
.pc-clip[data-track-kind="sticker"] { --clip: var(--ui-track-sticker); --clip-ink: var(--ui-track-ink-sticker); }
.pc-clip:not(.is-selected):hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--clip) 84%, white), var(--clip));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 10px color-mix(in oklab, var(--clip) 50%, transparent);
}
/* Selected: a 2px outline in the primary text color around the outside of the clip (outline takes up no box space and does not cover the clip's content), the fill is left untouched */
.pc-clip.is-selected {
  outline: 2px solid var(--ui-fg);
  outline-offset: 0;
}
/* Dragged across tracks to a position where it does not fit (dragState.forbidden in ClipView): semi-transparent red background + red dashed frame.
   The .pc-clip above covers both Tailwind's border and background color, so the "does not fit" indication has to be added back here;
   while dragging, the mouse is right on the clip, and it must not be washed out by the :hover gradient either */
.pc-clip.is-forbidden,
.pc-clip.is-forbidden:hover {
  background: color-mix(in oklab, var(--ui-danger) 50%, transparent);
  border: 1px dashed var(--ui-danger);
  box-shadow: none;
}

/* Transition: the fade zones at both ends of a clip get a layer of gradient that darkens toward the edge, with a width equal to the fade-in/fade-out duration in seconds.
   so the end that has a transition can be spotted at a glance, without opening the properties panel to check */
.pc-clip-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}
.pc-clip-fade.is-in {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.pc-clip-fade.is-out {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
/* Bound into a group by a transition: a chain badge at the top right reminds that this clip's timing relation is locked */
.pc-clip-link {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  pointer-events: auto;
}

/* The individual captions inside a caption card (timeline/CaptionLines.tsx).
   Captions are stored in the card's lines parameter, and on the timeline only one big color block would be left; here each one is drawn as a small cell,
   which can be clicked, dragged and have their text edited. They use a darker tier of the same color, distinguishing them from the outer block without clashing in color. */
.pc-cap-line {
  top: 3px;
  bottom: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border-radius: 3px;
  border: 1px solid color-mix(in oklab, var(--clip) 55%, black);
  background: color-mix(in oklab, var(--clip) 78%, black);
  color: var(--clip-ink);
  font-size: 10px;
  line-height: 1.1;
  overflow: hidden;
  cursor: grab;
  z-index: 15;
}
.pc-cap-line:hover {
  background: color-mix(in oklab, var(--clip) 92%, black);
  border-color: var(--ui-fg);
}
.pc-cap-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
/* Handles at both ends: drag them to change this caption's start and end, matching the trimming feel of the clip itself */
.pc-cap-grip {
  flex: none;
  width: 4px;
  align-self: stretch;
  cursor: col-resize;
  border-radius: 2px;
}
.pc-cap-grip:hover {
  background: rgba(255, 255, 255, 0.45);
}
.pc-cap-input {
  flex: 1;
  min-width: 0;
  background: var(--ui-bg-2);
  color: var(--ui-fg);
  border: 1px solid var(--ui-accent);
  border-radius: 2px;
  font-size: 10px;
  padding: 0 3px;
  outline: none;
}
[data-skin] .ring-2, [data-skin] .ring-white, [data-skin] .outline-white { --tw-ring-color: var(--ui-accent); outline-color: var(--ui-accent); }

/* Playhead: the vertical line and the round handle (both direct child divs of the playhead) all use the primary text color,
   near-white on dark skins, still visible on light skins; flat, no glow. The pill style of the time label is in timeline.css */
[data-skin] [data-pc="playhead"] > div { background-color: var(--ui-fg); box-shadow: none; }

/* Import entry grayed out in online browser mode (C10 contract, section 10): visibly not clickable */
[data-pc-add][disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
/**
 * Source: Magic UI's global styles apps/www/styles/globals.css
 *       (https://github.com/magicuidesign/magicui) — MIT License
 *
 * The animations of MagicUI components rely on --animate-* variables in the Tailwind theme to generate animate-* utility classes; those variables are in their
 * own globals.css, which we don't have on our side, so components moved over as is will have "a class but no animation".
 *
 * Local changes:
 * - Do not use @theme (it only takes effect in the one compilation of src/index.css, and anything written in CSS imported from here has no effect),
 *   switch to a plain class of the same name: .animate-shiny-text { animation: ... }. The class names are exactly the same as MagicUI's,
 *   and the component source needs not a single character changed.
 * - Bring over only the --animate-* declarations and the @keyframes they reference, not the other theme variables.
 * - Imported once by src/cards/magicui/index.ts, available site-wide.
 */

.animate-accordion-down { animation: accordion-down 0.2s ease-out; }
.animate-accordion-up { animation: accordion-up 0.2s ease-out; }
.animate-gradient { animation: gradient 8s linear infinite; }
.animate-meteor { animation: meteor 5s linear infinite; }
.animate-marquee { animation: marquee var(--duration) infinite linear; }
.animate-marquee-vertical { animation: marquee-vertical var(--duration) linear infinite; }
.animate-spin-around { animation: spin-around calc(var(--speed) * 2) infinite linear; }
.animate-shiny-text { animation: shiny-text 8s infinite; }
.animate-shimmer-slide { animation: shimmer-slide var(--speed) ease-in-out infinite alternate; }
.animate-ripple { animation: ripple var(--duration, 2s) ease calc(var(--i, 0) * 0.2s) infinite; }
.animate-rippling { animation: rippling var(--duration, 0.6s) ease-out; }
.animate-line { animation: line 2s linear infinite; }
.animate-orbit { animation: orbit calc(var(--duration) * 1s) linear infinite; }
.animate-background-position-spin { animation: background-position-spin 3000ms infinite alternate; }
.animate-shine { animation: shine var(--duration) infinite linear; }
.animate-pulse { animation: pulse var(--duration) ease-out infinite; }
.animate-pulse-ripple { animation: pulse-ripple var(--duration) cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.animate-rainbow { animation: rainbow var(--speed, 2s) infinite linear; }
.animate-line-shadow { animation: line-shadow 15s linear infinite; }
.animate-aurora { animation: aurora 8s ease-in-out infinite alternate; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.animate-blink-cursor { animation: blink-cursor 1.2s step-end infinite; }

@keyframes accordion-down {
    from {
      height: 0;
    }
    to {
      height: var(--radix-accordion-content-height);
    }
  }

@keyframes accordion-up {
    from {
      height: var(--radix-accordion-content-height);
    }
    to {
      height: 0;
    }
  }

@keyframes gradient {
    to {
      background-position: var(--bg-size, 300%) 0;
    }
  }

@keyframes meteor {
    0% {
      transform: rotate(var(--angle)) translateX(0);
      opacity: 1;
    }
    70% {
      opacity: 1;
    }
    100% {
      transform: rotate(var(--angle)) translateX(-500px);
      opacity: 0;
    }
  }

@keyframes marquee {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(-100% - var(--gap)));
    }
  }

@keyframes marquee-vertical {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(calc(-100% - var(--gap)));
    }
  }

@keyframes spin-around {
    0% {
      transform: translateZ(0) rotate(0);
    }
    15%,
    35% {
      transform: translateZ(0) rotate(90deg);
    }
    65%,
    85% {
      transform: translateZ(0) rotate(270deg);
    }
    100% {
      transform: translateZ(0) rotate(360deg);
    }
  }

@keyframes shiny-text {
    0%,
    90%,
    100% {
      background-position: calc(-100% - var(--shiny-width)) 0;
    }
    30%,
    60% {
      background-position: calc(100% + var(--shiny-width)) 0;
    }
  }

@keyframes shimmer-slide {
    to {
      transform: translate(calc(100cqw - 100%), 0);
    }
  }

@keyframes ripple {
    0%,
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
    50% {
      transform: translate(-50%, -50%) scale(0.9);
    }
  }

@keyframes rippling {
    0% {
      opacity: 1;
    }
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

@keyframes line {
    0% {
      mask-position-x: 0%;
    }
    100% {
      mask-position-x: 100%;
    }
  }

@keyframes orbit {
    0% {
      transform: rotate(calc(var(--angle) * 1deg))
        translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg));
    }
    100% {
      transform: rotate(calc(var(--angle) * 1deg + 360deg))
        translateY(calc(var(--radius) * 1px))
        rotate(calc((var(--angle) * -1deg) - 360deg));
    }
  }

@keyframes background-position-spin {
    0% {
      background-position: top center;
    }
    100% {
      background-position: bottom center;
    }
  }

@keyframes shine {
    0% {
      background-position: 0% 0%;
    }
    50% {
      background-position: 100% 100%;
    }
    to {
      background-position: 0% 0%;
    }
  }

@keyframes pulse {
    0%,
    100% {
      box-shadow: 0 0 0 0 var(--pulse-color, oklch(from var(--bg) l c h / 0.5));
    }
    50% {
      box-shadow: 0 0 0 var(--distance) var(--pulse-color, oklch(from var(--bg) l c h / 0.5));
    }
  }

@keyframes pulse-ripple {
    0% {
      box-shadow: 0 0 0 0 oklch(from var(--pulse-color, var(--bg)) l c h / 1);
    }
    100% {
      box-shadow: 0 0 0 var(--distance) oklch(from var(--pulse-color, var(--bg)) l c h / 0);
    }
  }

@keyframes rainbow {
    0% {
      background-position: 0%;
    }
    100% {
      background-position: 200%;
    }
  }

@keyframes line-shadow {
    0% {
      background-position: 0 0;
    }
    100% {
      background-position: 100% -100%;
    }
  }

@keyframes aurora {
    0% {
      background-position: 0% 50%;
      transform: rotate(-5deg) scale(0.9);
    }
    25% {
      background-position: 50% 100%;
      transform: rotate(5deg) scale(1.1);
    }
    50% {
      background-position: 100% 50%;
      transform: rotate(-3deg) scale(0.95);
    }
    75% {
      background-position: 50% 0%;
      transform: rotate(3deg) scale(1.05);
    }
    100% {
      background-position: 0% 50%;
      transform: rotate(-5deg) scale(0.9);
    }
  }

@keyframes ping {
    75%,
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

@keyframes blink-cursor {
    0%,
    49% {
      opacity: 1;
    }
    50%,
    100% {
      opacity: 0;
    }
  }

.hud-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
}
.hud-pos-center {
  align-items: center;
  justify-content: center;
}
.hud-pos-bottom {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 120px;
}
.hud-pos-left {
  align-items: center;
  justify-content: flex-start;
  padding-left: 120px;
}
.hud-pos-right {
  align-items: center;
  justify-content: flex-end;
  padding-right: 120px;
}

.hud-glass {
  pointer-events: auto;
  background-color: var(--pc-glass-bg, rgba(10, 12, 16, 0.55));
  backdrop-filter: blur(var(--pc-glass-blur, 24px));
  -webkit-backdrop-filter: blur(var(--pc-glass-blur, 24px));
  border: var(--pc-border-width, 1px) solid var(--pc-glass-border, rgba(255, 255, 255, 0.14));
  border-radius: var(--pc-radius, 32px);
  color: var(--pc-fg, #f3f4f6);
  padding: 48px;
  box-shadow: var(--pc-shadow, 0 24px 48px rgba(0, 0, 0, 0.4));
}

/* Added in the text card batch: stage corner positioning (used by pin-board) */
.hud-corner-bl { align-items: flex-end; justify-content: flex-start; padding: 0 0 100px 120px; }
.pc-export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pc-export-dialog {
  width: 100%;
  max-width: 440px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.pc-export-title {
  font-size: 15px;
  font-weight: 600;
}

.pc-export-target {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  min-width: 0;
}
.pc-export-label {
  flex: 0 0 auto;
  color: var(--ink-muted);
}
/* The path may be very long: let it truncate itself instead of stretching the dialog wider */
.pc-export-path {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  color: var(--ink);
}

.pc-export-track {
  height: 8px;
  border-radius: 999px;
  background: var(--fill-subtle);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.pc-export-fill {
  height: 100%;
  background: var(--accent);
  transition: width 200ms linear;
}

.pc-export-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.pc-export-hint,
.pc-export-ok {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.pc-export-err {
  font-size: 12px;
  line-height: 1.6;
  color: var(--danger);
  overflow-wrap: anywhere;
}

.pc-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.pc-export-btn {
  font-size: 13px;
  padding: 6px 14px;
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--fill-subtle);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.pc-export-btn:hover { border-color: currentColor; }
.pc-export-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.pc-export-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Online browser: choose the export method (quick export / full export). Each of the two options takes one row, with the name on top and the description below */
.pc-export-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-export-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--fill-subtle);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pc-export-mode:hover { border-color: var(--accent); }
.pc-export-mode:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.pc-export-mode-name {
  font-size: 14px;
  font-weight: 600;
}
.pc-export-mode-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
}
/* What export is still waiting for (original-size assets, render nodes) */
.pc-export-waiting {
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--fill-subtle);
}
/*
 * A three-way segmented control (Vibe mode / Classic mode / SKILL). One unit: a border around the outside, three equal-width cells inside, and a slider moving underneath.
 * Height is 28px, aligned with the other top bar controls (.pc-btn / .pc-select).
 */
.pc-modeswitch {
  position: relative;
  display: grid;
  /* Three cells of equal width: the slider is positioned via translateX(index * 100%), and only equal widths make it line up.
     Widths are taken from the content (max-content), so every cell equals the widest one: English and Japanese labels are longer than Chinese ones, and no single cell may be stretched wider on its own. */
  grid-template-columns: repeat(3, 1fr);
  width: max-content;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  /* Shrinks as a whole when the top bar runs out of room, but must not be squashed until illegible */
  min-width: 186px;
  flex: 0 0 auto;
}

/* Slider. Width = one cell (minus the padding on both sides), position given by the inline transform */
.pc-modeswitch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc((100% - 4px) / 3);
  height: calc(100% - 4px);
  border-radius: calc(var(--ui-radius, 6px) - 1px);
  background: var(--ui-accent-soft);
  border: 1px solid var(--ui-accent);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms, border-color 180ms;
  pointer-events: none;
}
/* The SKILL cell uses a solid accent color: it is not "try a different layout", it lets the desktop app's Agent take action */
.pc-modeswitch-thumb.is-skill {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
}

.pc-modeswitch-item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: var(--ui-fg-muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border-radius: calc(var(--ui-radius, 6px) - 1px);
  transition: color 180ms;
}
.pc-modeswitch-item:hover:not(:disabled):not(.is-on) {
  color: var(--ui-fg);
}
.pc-modeswitch-item.is-on {
  color: var(--ui-fg);
  font-weight: 600;
}
/* When SKILL is selected the slider is a solid accent color, so the text must switch to the foreground color used on the accent color to stay legible */
.pc-modeswitch-thumb.is-skill ~ .pc-modeswitch-item.is-on {
  color: var(--ui-accent-fg);
}
.pc-modeswitch-item:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
/* The top bar's "Browser" tab: looks like any other .pc-btn normally, blinks and pops a bubble when the agent is waiting for a person */
.pc-agent-tab-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pc-agent-tab.is-open {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
}

/* Waiting for a person: border and text blink slowly in the accent color. It is the color that blinks, not the opacity, so the button itself never disappears */
.pc-agent-tab.is-pending {
  animation: pc-agent-blink 1.1s ease-in-out infinite;
}
@keyframes pc-agent-blink {
  0%, 100% { border-color: var(--ui-border-strong); color: inherit; }
  50% { border-color: var(--ui-accent); color: var(--ui-accent); }
}

/* Small red dot in the top right corner */
.pc-agent-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 2px var(--ui-panel, #111);
}
.pc-agent-tab { position: relative; }

/* Bubble: hangs below the tab, and after popping out it floats gently up and down to draw attention without blocking other controls */
.pc-agent-bubble {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bg-canvas, #111);
  background: var(--ui-accent);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
  pointer-events: none;
  animation: pc-agent-bubble-in 220ms ease-out, pc-agent-bubble-float 2.2s ease-in-out 220ms infinite;
}
.pc-agent-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: var(--ui-accent);
  transform: rotate(45deg);
}
@keyframes pc-agent-bubble-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pc-agent-bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
/*
 * Project name input.
 *
 * Kept here instead of being merged into ui/toolbar.css: another session is refactoring the top bar styles from the design mockup,
 * and adding lines to the same file would easily get overwritten on both sides. The spec is copied from .pc-dialog-opt, so, like the
 * other controls in the dialog, it has the same height and corner radius and follows the skin when it changes.
 */
.pc-dialog-input,
.pc-dialog-select {
  height: 28px;
  min-width: 0;
  /* The row is space-between and the name is longer than the option buttons, so let the input take up the remaining width */
  flex: 1 1 auto;
  margin-left: 16px;
  padding: 0 10px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 4px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  transition: border-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-dialog-input::placeholder {
  color: var(--ui-fg-muted);
}
.pc-dialog-input:hover {
  border-color: color-mix(in oklab, var(--ui-border-strong) 70%, var(--ui-fg));
}
.pc-dialog-input:focus {
  outline: none;
  border-color: var(--ui-accent);
}

/*
 * Frame rate dropdown (pinned architecture 7). The spec is copied from .pc-dialog-input, with just two additions:
 * Keep the native dropdown arrow (it follows color-scheme when the skin changes, so we do not draw our own),
 * The width does not fill the whole row: to its right are the numbers of the "Apply resolution" row, and lining up with them looks better than stretching to fill.
 */
.pc-dialog-select {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 0 6px 0 10px;
  cursor: pointer;
  /* The expanded dropdown area is drawn by the browser and follows the current light/dark mode */
  color-scheme: inherit;
}
.pc-dialog-select:hover {
  border-color: color-mix(in oklab, var(--ui-border-strong) 70%, var(--ui-fg));
}
.pc-dialog-select:focus {
  outline: none;
  border-color: var(--ui-accent);
}
/*
 * C6.5 page-side UI: shared project dialog, member list, creator actions, undo bar, offline dialog, local backup, blocking dialog, bubble.
 * Dialogs reuse .pc-dialog-* from ui/toolbar.css; only what they lack is added here. Colors always come from --ui-* variables, so they follow when the skin changes.
 */

.pc-sync-dialog {
  width: 440px;
  max-height: min(86vh, 760px);
  overflow: auto;
}
.pc-sync-dialog--wide {
  width: 520px;
}
.pc-sync-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-sync-group + .pc-sync-group {
  padding-top: 12px;
  border-top: 1px solid var(--ui-border);
}
.pc-sync-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-fg-muted);
  letter-spacing: 0.02em;
}
.pc-sync-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-sync-field > label,
.pc-sync-field > .pc-sync-field-label {
  font-size: 12.5px;
  color: var(--ui-fg);
}
.pc-sync-field .pc-dialog-input {
  margin-left: 0;
  width: 100%;
  height: 30px;
}
.pc-sync-field .pc-dialog-input.is-invalid {
  border-color: var(--ui-danger);
}
.pc-sync-field .pc-dialog-input:disabled {
  opacity: 0.6;
}
.pc-sync-err {
  font-size: 11.5px;
  color: var(--ui-danger);
}
.pc-sync-hint {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
  line-height: 1.5;
}
.pc-sync-warn {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ui-warn, #e0a030);
}
.pc-sync-warn::before {
  content: "!";
  flex: 0 0 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ui-warn, #e0a030);
  color: var(--ui-bg);
  font-weight: 700;
  font-size: 11px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

/* Single-choice cards (deployment location, entry mode, parallel candidates) */
.pc-sync-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  cursor: pointer;
  text-align: left;
  color: var(--ui-fg);
  font: inherit;
  width: 100%;
}
.pc-sync-choice:hover:not(:disabled) {
  border-color: color-mix(in oklab, var(--ui-border-strong) 60%, var(--ui-fg));
}
.pc-sync-choice.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft);
}
.pc-sync-choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pc-sync-choice-dot {
  flex: 0 0 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--ui-fg-muted);
}
.pc-sync-choice.is-on .pc-sync-choice-dot {
  border-color: var(--ui-accent);
  box-shadow: inset 0 0 0 3px var(--ui-panel-2), inset 0 0 0 8px var(--ui-accent);
}
.pc-sync-choice-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pc-sync-choice-text b {
  font-size: 13px;
  font-weight: 600;
}
.pc-sync-choice-text small {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
  line-height: 1.45;
}

/* List table */
.pc-sync-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius, 6px);
  overflow: hidden;
}
.pc-sync-list-row {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12.5px;
  border-top: 1px solid var(--ui-border);
  min-height: 34px;
}
.pc-sync-list-row:first-child {
  border-top: 0;
}
.pc-sync-list-row .pc-dialog-input {
  margin-left: 0;
  height: 26px;
  width: 100%;
}
.pc-sync-list-row .is-muted {
  color: var(--ui-fg-muted);
}
.pc-sync-icon-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ui-fg-muted);
  cursor: pointer;
  opacity: 0;
}
.pc-sync-list-row:hover .pc-sync-icon-btn,
.pc-sync-icon-btn:focus-visible {
  opacity: 1;
}
.pc-sync-icon-btn:hover {
  background: var(--ui-float);
  color: var(--ui-danger);
}
.pc-sync-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--ui-float);
  color: var(--ui-fg-muted);
  white-space: nowrap;
}
.pc-sync-tag--creator {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}
.pc-sync-tag--editing {
  background: color-mix(in oklab, var(--ui-success, #3fb67d) 20%, transparent);
  color: var(--ui-success, #3fb67d);
}
.pc-sync-tag--rendering {
  background: color-mix(in oklab, var(--ui-warn, #e0a030) 20%, transparent);
  color: var(--ui-warn, #e0a030);
}

.pc-sync-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ui-fg-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pc-sync-link-btn:hover {
  color: var(--ui-accent);
  text-decoration: underline;
}
.pc-sync-status-line {
  font-size: 12px;
  color: var(--ui-fg-muted);
}
.pc-sync-status-line.is-err {
  color: var(--ui-danger);
}
.pc-sync-status-line.is-ok {
  color: var(--ui-success, #3fb67d);
}
.pc-sync-danger-btn {
  background: var(--ui-danger) !important;
  border-color: var(--ui-danger) !important;
  color: #fff !important;
}
.pc-sync-danger-btn:disabled {
  opacity: 0.45;
}

/* Top bar: member button, sync status */
.pc-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.pc-sync-chip:hover {
  background: var(--ui-float);
}
.pc-sync-chip--paused {
  border-color: var(--ui-warn, #e0a030);
  color: var(--ui-warn, #e0a030);
}
.pc-sync-chip--offline {
  color: var(--ui-fg-muted);
  cursor: default;
}
.pc-sync-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Member popover */
.pc-members-pop {
  position: fixed;
  z-index: 900;
  width: 330px;
  max-height: 70vh;
  overflow: auto;
  border-radius: var(--ui-radius, 8px);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow, 0 8px 32px rgba(0, 0, 0, 0.45));
  padding: 6px;
  font-size: 12.5px;
  color: var(--ui-fg);
}
.pc-members-row {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
}
.pc-members-row-main {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: default;
  flex-wrap: wrap;
}
.pc-members-row-main.is-expandable {
  cursor: pointer;
}
.pc-members-row-main:hover {
  background: var(--ui-float);
}
.pc-members-name {
  flex: 1 1 auto;
  min-width: 0;
}
.pc-members-name.is-me {
  font-weight: 700;
}
.pc-members-kick {
  opacity: 0;
  border: 0;
  border-radius: 4px;
  padding: 2px 8px;
  background: var(--ui-danger);
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.pc-members-row-main:hover .pc-members-kick,
.pc-members-kick:focus-visible {
  opacity: 1;
}
.pc-members-sub {
  padding: 2px 8px 6px 26px;
  font-size: 12px;
  color: var(--ui-fg-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pc-members-empty {
  padding: 10px 8px;
  color: var(--ui-fg-muted);
}
.pc-members-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--ui-border);
}
.pc-members-admin-title {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--ui-fg-muted);
}
.pc-members-admin-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ui-fg);
  font: inherit;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.pc-members-admin-item:hover {
  background: var(--ui-float);
}
.pc-members-admin-item.is-danger {
  color: var(--ui-danger);
}

/* Undo bar (Snackbar) */
.pc-undo-bar {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 950;
  width: min(560px, calc(100vw - 32px));
  border-radius: var(--ui-radius, 8px);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow, 0 8px 32px rgba(0, 0, 0, 0.45));
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ui-fg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pc-undo-bar-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pc-undo-bar-title {
  flex: 1 1 auto;
  font-weight: 600;
  line-height: 1.5;
}
.pc-undo-bar-close {
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.pc-undo-bar-close:hover {
  color: var(--ui-fg);
}
.pc-undo-bar-list {
  margin: 0;
  padding: 0 0 0 16px;
  max-height: 160px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pc-undo-bar-list li {
  line-height: 1.5;
}
.pc-undo-entity {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ui-accent);
  font: inherit;
  cursor: pointer;
}
.pc-undo-entity:hover {
  text-decoration: underline;
}
.pc-undo-entity:disabled {
  color: var(--ui-fg);
  cursor: default;
  text-decoration: none;
}
.pc-undo-by {
  color: var(--ui-fg-muted);
}

/* Bubble */
.pc-toasts {
  position: fixed;
  top: 58px;
  right: 16px;
  z-index: 960;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.pc-toast {
  border-radius: var(--ui-radius, 8px);
  border: 1px solid var(--ui-border-strong);
  border-left: 3px solid var(--ui-accent);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow, 0 8px 24px rgba(0, 0, 0, 0.4));
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ui-fg);
  display: flex;
  gap: 8px;
}
.pc-toast--warn {
  border-left-color: var(--ui-warn, #e0a030);
}
.pc-toast > span {
  flex: 1 1 auto;
}

/* Offline dialog */
.pc-offline-list {
  margin: 0;
  padding: 8px 10px 8px 26px;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  max-height: 200px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.6;
}
.pc-dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.pc-dialog-x:hover {
  color: var(--ui-fg);
}
.pc-sync-choices-v {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Local backup list */
.pc-backups {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 56vh;
  overflow: auto;
}
.pc-backup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  font-size: 12.5px;
}
.pc-backup-row small {
  grid-column: 1 / 2;
  color: var(--ui-fg-muted);
  font-size: 11.5px;
}
.pc-backup-row .pc-dialog-opt {
  grid-row: 1 / 3;
  grid-column: 2;
  height: 26px;
}

/* Others' changes: the clip changed on the timeline gets an outline for 1.5 s (ruling in section 8 of c65-design.md) */
[data-remote-flash] {
  outline: 2px solid var(--ui-accent) !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ui-accent) 30%, transparent) !important;
  transition: outline-color 200ms ease;
}

/* Agent action log in the AI panel (AgentEventLog.tsx): fixed row height, virtualized, only the visible rows are rendered */
.pc-evlog {
  margin: 0 10px 6px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-bg-2, transparent);
  font-size: 12px;
}
.pc-evlog-head {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: none;
  border: 0;
  color: var(--ui-fg-muted);
  cursor: pointer;
  font-size: 12px;
}
.pc-evlog-count {
  color: var(--ui-fg-muted);
}
.pc-evlog-box {
  overflow-y: auto;
  border-top: 1px solid var(--ui-border);
}
.pc-evlog-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}
.pc-evlog-mark {
  width: 12px;
  text-align: center;
  flex: none;
}
.pc-evlog-mark--ok { color: var(--ui-ok, #3fb950); }
.pc-evlog-mark--error { color: var(--ui-danger); }
.pc-evlog-mark--running { color: var(--ui-warn, #e0a030); }
.pc-evlog-tool {
  color: var(--ui-fg);
  font-family: var(--ui-mono, ui-monospace, monospace);
  flex: none;
}
.pc-evlog-target,
.pc-evlog-who {
  color: var(--ui-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pc-evlog-who {
  flex: 1;
}
.pc-evlog-undo {
  flex: none;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

/* ── C10a: start page "Join someone else's project" (JoinForm.tsx) ───────────────── */
.pc-join {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  padding: 16px;
  border: 1px solid var(--ui-border, var(--hairline));
  border-radius: 10px;
  background: var(--ui-panel, var(--bg-panel));
}
.pc-join-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-join-project {
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.pc-join-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.pc-join-paste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--ui-border, var(--hairline));
}

/* ── C10a: project settings "Multi-user collaboration" (CollabSection.tsx) ─────────────── */
.pc-collab {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--ui-border);
}
.pc-collab-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.pc-collab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
/* Checkbox row for the host's service (render node): one level lighter than the master switch */
.pc-collab-hosted {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-collab-hosted .pc-collab-head {
  font-weight: 500;
  font-size: 12.5px;
}
/* Sub-option indented under the service row (the render node's "Generate track streams"); the whole row is grayed out while the service row is off */
.pc-collab-hosted-sub {
  margin: 6px 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pc-collab-hosted-sub .pc-collab-head {
  font-weight: 400;
}
.pc-collab-hosted-sub--off {
  opacity: 0.45;
}
.pc-collab-row > .pc-collab-key {
  min-width: 72px;
  color: var(--ui-fg-muted);
}
.pc-collab-row code {
  font-family: var(--ui-font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ui-float);
  word-break: break-all;
}
.pc-collab-qr {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
/* QR code: black and white, no smaller than 240 CSS pixels (contract section 7); keeps a white background under dark skins too, so it can be scanned */
.pc-collab-qr-img {
  width: 240px;
  height: 240px;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 6px;
}
.pc-collab-qr-img svg {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-collab-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* The project settings dialog gets taller once the "Multi-user collaboration" section is added: widen it, cap the height, make it scrollable (the class name is added in ProjectSettingsDialog.tsx) */
.pc-dialog.pc-dialog--collab {
  width: 460px;
  max-width: calc(100vw - 24px);
  max-height: min(92vh, 960px);
  overflow: auto;
}

/* Online page (C10 contract section 10): the status wording in the top bar is long; limit the width, ellipsize, hover to see the full text */
.pc-sync-chip--online {
  max-width: min(460px, 38vw);
}
.pc-sync-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-sync-chip--recover {
  color: var(--ui-accent);
  cursor: default;
}
.pc-sync-chip--backups {
  color: var(--ui-fg);
}
/* Button on a bubble (the online page's "Download backup") */
.pc-toast-action {
  flex: 0 0 auto;
  align-self: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.pc-toast-action:hover {
  background: var(--ui-float);
}
/* Offline with uncommitted changes: persistent notice, centered above the bottom status bar (the top bar's height varies with the shell, and placing the notice at the top would cover the top bar's status wording); does not block operations */
.pc-offline-unsent {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  max-width: calc(100vw - 32px);
  padding: 6px 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-warn, #e0a030);
  background: var(--ui-panel);
  color: var(--ui-warn, #e0a030);
  font-size: 12.5px;
  box-shadow: var(--ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.pc-account-members { width: 360px; max-height: min(70vh, 600px); overflow: auto; }
.pc-account-members-heading { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; }
.pc-account-member { padding: 8px 4px; border-bottom: 1px solid var(--ui-border); }
.pc-account-member-id { display: block; padding: 2px 8px; color: var(--ui-muted); overflow-wrap: anywhere; }
.pc-account-members-error { padding: 8px; color: var(--ui-warn, #e0a030); }
.pc-account-member-confirm { padding: 8px; border: 1px solid var(--ui-border-strong); border-radius: 8px; }
.pc-account-member-confirm button { margin: 6px 6px 0 0; }
.pc-account-member-clear { display: block; margin: 6px 0 2px; font-size: 12px; cursor: pointer; }

/* ---------------- Conflict merge (ConflictMerge.tsx) ---------------- */

.pc-sync-chip--merge {
  border-color: var(--ui-accent);
  color: var(--ui-fg);
  cursor: pointer;
}
.pc-sync-chip--merge .pc-sync-chip-dot {
  background: var(--ui-accent);
}
.pc-sync-chip--merge.has-conflict {
  border-color: var(--ui-warn, #e0a030);
}
.pc-sync-chip--merge.has-conflict .pc-sync-chip-dot {
  background: var(--ui-warn, #e0a030);
}
.pc-merge-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--ui-accent-soft, var(--ui-panel-2));
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.pc-merge-dialog {
  width: 620px;
  max-width: calc(100vw - 32px);
  gap: 12px;
}
.pc-merge-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-merge-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-merge-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}
.pc-merge-list,
.pc-merge-props {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pc-merge-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(56vh, 480px);
  overflow: auto;
}
.pc-merge-thing {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
}
.pc-merge-thing.is-conflict {
  border-color: color-mix(in oklab, var(--ui-warn, #e0a030) 55%, var(--ui-border));
}
.pc-merge-thing-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
.pc-merge-expand {
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  cursor: pointer;
  width: 18px;
  padding: 0;
}
.pc-merge-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-merge-kind,
.pc-merge-n {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
}
.pc-merge-chip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
  border: 1px solid var(--ui-border-strong);
  color: var(--ui-fg-muted);
  white-space: nowrap;
}
.pc-merge-chip.is-conflict {
  border-color: var(--ui-warn, #e0a030);
  color: var(--ui-warn, #e0a030);
}
.pc-merge-props {
  border-top: 1px solid var(--ui-border);
  padding: 4px 10px 8px 36px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-merge-props > li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.pc-merge-text {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.pc-merge-check {
  accent-color: var(--ui-accent);
  margin: 0;
}
.pc-merge-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--ui-fg-muted);
  font-size: 13px;
}
.pc-merge-warn {
  color: var(--ui-warn, #e0a030);
}
.pc-merge-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
/*
 * Styles for Desktop Server Role Panels (RenderServerPanel & DataServerPanel) and Handover Pairing Dialogs
 * (Issues #7 and #8). Uses global --ui-* theme tokens so all 10 light/dark skins stay crisp and legible.
 */

.pc-srv-workspace {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  flex-direction: column;
  background: var(--ui-bg, #121316);
  color: var(--ui-fg, #eceef2);
  font-family: var(--font-sans, system-ui, sans-serif);
  overflow: hidden;
}

.pc-srv-embedded {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ui-fg, #eceef2);
  max-height: min(68vh, 620px);
  overflow-y: auto;
  padding-right: 2px;
}

.pc-srv-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ui-border, rgba(255, 255, 255, 0.08));
  background: var(--ui-panel, #181a1f);
}

.pc-srv-embedded .pc-srv-topbar {
  padding: 0 0 12px;
  background: transparent;
}

.pc-srv-head-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pc-srv-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-srv-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ui-fg);
}

.pc-srv-sub {
  font-size: 12px;
  color: var(--ui-fg-muted);
  line-height: 1.45;
}

.pc-srv-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pc-srv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg-muted);
}

.pc-srv-badge.is-ok {
  border-color: color-mix(in oklab, var(--ui-accent) 55%, transparent);
  background: var(--ui-accent-soft, rgba(79, 140, 255, 0.14));
  color: var(--ui-accent);
}

.pc-srv-badge.is-warn {
  border-color: color-mix(in oklab, var(--ui-warn, #e0a030) 55%, transparent);
  background: color-mix(in oklab, var(--ui-warn, #e0a030) 14%, transparent);
  color: var(--ui-warn, #e0a030);
}

.pc-srv-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

.pc-srv-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pc-srv-embedded .pc-srv-container {
  max-width: none;
  gap: 14px;
}

/* Metrics grid */
.pc-srv-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 820px) {
  .pc-srv-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pc-srv-metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel, #181a1f);
}

.pc-srv-metric-label {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
}

.pc-srv-metric-val {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg);
  line-height: 1.25;
}

.pc-srv-metric-sub {
  font-size: 11px;
  color: var(--ui-fg-muted);
  font-variant-numeric: tabular-nums;
}

/* Two-column layout for Data Server panel */
.pc-srv-split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.25fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 920px) {
  .pc-srv-split {
    grid-template-columns: 1fr;
  }
}

.pc-srv-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel, #181a1f);
}

.pc-srv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-srv-card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ui-fg);
}

/* Segmented tabs */
.pc-srv-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 7px;
  background: var(--ui-panel-2);
  border: 1px solid var(--ui-border);
  align-self: flex-start;
}

.pc-srv-tab {
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 5px;
  cursor: pointer;
}

.pc-srv-tab:hover {
  color: var(--ui-fg);
}

.pc-srv-tab.is-on {
  background: var(--ui-accent);
  color: var(--on-accent, #fff);
}

/* Forms & rows */
.pc-srv-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.pc-srv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 160px;
  min-width: 0;
}

.pc-srv-field > label {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
}

.pc-srv-field .pc-dialog-input,
.pc-srv-field .pc-dialog-select {
  margin-left: 0;
  width: 100%;
  height: 30px;
  box-sizing: border-box;
}

.pc-srv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-srv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--ui-border);
  background: var(--ui-panel-2);
}

.pc-srv-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pc-srv-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-fg);
  flex-wrap: wrap;
}

.pc-srv-item-sub {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tables */
.pc-srv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
}

.pc-srv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.pc-srv-table th {
  padding: 8px 10px;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ui-fg-muted);
  background: var(--ui-panel-2);
  border-bottom: 1px solid var(--ui-border);
  white-space: nowrap;
}

.pc-srv-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-fg);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.pc-srv-table tr:last-child td {
  border-bottom: 0;
}

.pc-srv-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--ui-fg-muted);
  border: 1px dashed var(--ui-border-strong);
  border-radius: 8px;
}

.pc-srv-msg {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
}

.pc-srv-msg.is-err {
  color: var(--ui-danger, #ef4444);
  border-color: color-mix(in oklab, var(--ui-danger, #ef4444) 55%, transparent);
}

.pc-srv-msg.is-ok {
  color: var(--ui-accent);
  border-color: color-mix(in oklab, var(--ui-accent) 45%, transparent);
}

/* Floating quick-return pill when editing in editor while hosting Data/Render Server */
.pc-srv-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--ui-accent) 55%, var(--ui-border-strong));
  background: var(--ui-panel, #181a1f);
  color: var(--ui-fg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.pc-srv-pill:hover {
  border-color: var(--ui-accent);
}

.pc-srv-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ui-accent);
}

/* Pairing code display in Handover Dialog */
.pc-handover-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  margin: 6px 0;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--ui-accent) 55%, var(--ui-border-strong));
  background: var(--ui-panel-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--ui-accent);
  user-select: all;
}

.pc-handover-code-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px !important;
  font-weight: 600;
  letter-spacing: 0.22em;
  height: 38px !important;
}

/* Server role section in ProjectSettingsDialog */
.pc-settings-roles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-border);
}

.pc-settings-roles-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-settings-role-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pc-settings-role-btn:hover:not(:disabled) {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft, rgba(79, 140, 255, 0.1));
}

.pc-settings-role-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.pc-settings-role-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pc-settings-role-text > b {
  font-size: 13px;
  font-weight: 600;
}

.pc-settings-role-text > small {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
}
/*
 * The UI inside a read-only project (a guest in someone else's project) (src/editor/readOnly.ts).
 * Graying out relies on the controls' own disabled / aria-disabled; this file only adds the fence's layout and a uniform "cannot click" look.
 */

/* The fence takes no layout: it wraps the subtree of a flex / grid, and the elements inside remain children of the original container as before */
fieldset.pc-ro-fence {
  display: contents;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Disabled controls inside the fence: no longer at a brightness that "looks clickable", and the mouse cursor also shows they cannot be clicked */
fieldset.pc-ro-fence[data-pc-ro] :is(button, input, select, textarea):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Non-native controls with aria-disabled (context menu items, custom-drawn cells) */
[data-pc-ro-off="1"] {
  opacity: 0.55;
  cursor: not-allowed !important;
}

/* Timeline: the edge-drag handles at both ends of a caption bar take no pointer events in a read-only project (a click still lands on the caption bar itself and jumps there to look) */
html[data-pc-readonly="member"] .pc-cap-grip {
  pointer-events: none;
}

/* Disabled buttons in a read-only project: uniformly show the "cannot click" cursor, whether or not their original style handles :disabled */
html[data-pc-readonly="member"] button:disabled,
html[data-pc-readonly="member"] [aria-disabled="true"] {
  cursor: not-allowed;
}

/* Things that cannot be clicked in a read-only project must be recognizable at a glance: disabled buttons are uniformly dimmed; custom-drawn cells (cards, audio strips, cut cells) with aria-disabled are treated the same */
html[data-pc-readonly="member"] button:disabled {
  opacity: 0.5;
}
html[data-pc-readonly="member"] :is(.pc-lib-card, .pc-lib-strip, .pc-lib-cut)[aria-disabled="true"],
html[data-pc-readonly="member"] .pc-lib-card.is-readonly,
html[data-pc-readonly="member"] .pc-lib-strip.is-readonly {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Commands in the desktop app's title bar menu that change the project (undo, redo, save project): do not use disabled (menu items in the desktop build are never grayed out, and a build gatekeeper test enforces it),
   use aria-disabled + dimming; clicking does nothing (the top bar's command receiver blocks it too) */
html[data-pc-readonly="member"] .pc-titlebar-menu-item[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Skin dialog. The shell reuses .pc-dialog; only the internal layout is added here */
.pc-skin-dialog {
  width: min(560px, calc(100vw - 48px));
}
.pc-skin-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Presets plus a dozen or so slots get long; let the content scroll by itself so the dialog is not pushed off screen */
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 4px 2px;
}
.pc-skin-h {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-fg);
}
.pc-skin-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pc-skin-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ui-fg-muted);
  line-height: 1.6;
}
.pc-skin-group {
  margin-top: 10px;
}
.pc-skin-group-name {
  font-size: 11.5px;
  color: var(--ui-fg-faint);
  margin-bottom: 6px;
}

/* ── Presets ─────────────────────────────────────────── */
.pc-skin-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.pc-skin-preset {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius, 4px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.pc-skin-preset:hover {
  border-color: var(--ui-border-strong);
}
.pc-skin-preset.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft);
}
.pc-skin-preset-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A mini preview drawn with the skin's own variables: background + three bars for panel / emphasis / secondary text */
.pc-skin-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 34px;
  height: 22px;
  padding: 0 3px;
  border: 1px solid;
  border-radius: 3px;
}
.pc-skin-chip i {
  flex: 1 1 0;
  height: 12px;
  border-radius: 2px;
}

/* ── Custom slots ───────────────────────────────────── */
.pc-skin-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.pc-skin-slot-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--ui-fg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pc-skin-slot-hint {
  font-size: 11px;
  color: var(--ui-fg-faint);
  line-height: 1.5;
}
/* Native color pickers look different in every browser; unify them into one square */
.pc-skin-color {
  flex: 0 0 auto;
  width: 40px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 4px);
  background: none;
  cursor: pointer;
}
.pc-skin-color::-webkit-color-swatch-wrapper {
  padding: 2px;
}
.pc-skin-color::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}
.pc-skin-reset {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius, 4px);
  background: transparent;
  color: var(--ui-fg-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.pc-skin-reset:hover:not(:disabled) {
  color: var(--ui-fg);
  border-color: var(--ui-border-strong);
}
.pc-skin-reset:disabled {
  opacity: 0.35;
  cursor: default;
}
/* A native select stretched invisibly over the visible label, so every bar gets the same accessible menu */
.pc-lang { position: relative; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.pc-lang-name { font: inherit; }
.pc-lang select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font: inherit; }
.pc-lang:focus-within { outline: 2px solid var(--ui-accent, #00dbdb); outline-offset: 1px; }
/* Small square avatar. Right angles and a thin outline, consistent with the style of the whole screen */
.pc-role-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

/*
 * The avatar takes its own row (the user asked for "show it on a separate line"): the name follows beside it, and the body text starts on the next row.
 * It is not made the kind that floats to the left of the text: the right rail is narrow, and floating would squeeze the body text into a thin slit.
 */
.pc-role-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  min-width: 0;
}

.pc-role-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/*
 * Thinking block. Under the color spec "keep only one solid accent color on the whole screen" (the export button), --accent must never be used
 * as a background here, otherwise two accent colors fight again. Thinking is a process, not a conclusion, so it steps back one level further than the assistant
 * bubble: L1 background + dashed outline + muted text, so it is obvious at a glance that it is not the reply itself.
 */
.ai-thinking {
  background: var(--ui-bg-2);
  border: 1px dashed var(--hairline);
  border-radius: 3px;
  padding: 10px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.ai-thinking-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  opacity: 0.75;
  margin-bottom: 4px;
}

.ai-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-canvas);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ai-tool-chip.ok {
  color: var(--accent);
  border-color: var(--accent);
}
.ai-tool-chip.err {
  color: var(--danger);
  border-color: var(--danger);
}

.ai-tool-chip.info {
  cursor: default;
}
.ai-tool-name {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}
.ai-tool-caret {
  margin-left: auto;
  padding-left: 6px;
  opacity: 0.6;
}
.ai-tool-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ai-tool-detail {
  padding-left: 8px;
  border-left: 2px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Clear the bottom margin of the last block (the last section among result / file / raw data): it may be exactly the last thing in the bubble */
.ai-tool-detail > :last-child,
.ai-tool-raw > :last-child {
  margin-bottom: 0;
}
.ai-tool-label {
  font-size: 10px;
  color: var(--ink-faint);
}
.ai-tool-pre {
  overflow-x: auto;
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-canvas);
  padding: 6px;
  margin: 0 0 4px;
  border-radius: 4px;
}
.ai-tool-pre.wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-tool-files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}
.ai-tool-file {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
/* ── Visualization of tool results (ToolVisual.tsx): bitmaps for viewing frames, parameter diffs for card edits, two animated images before and after ── */
.ai-visual { display: flex; flex-direction: column; gap: 10px; }
.ai-visual-note { font-size: 12px; color: var(--ink-muted); }
.ai-visual-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ai-visual-images figure,
.ai-visual-gif { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ai-visual-images img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--hairline); background: var(--fill-subtle); }
.ai-visual-images figcaption,
.ai-visual-gif figcaption { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ai-visual-diff { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.ai-visual-diff li { display: grid; grid-template-columns: minmax(80px, max-content) minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: baseline; }
.ai-visual-diff .k { font-family: var(--font-mono); color: var(--ink-muted); }
.ai-visual-diff .from { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--hairline); overflow-wrap: anywhere; }
.ai-visual-diff .arrow { color: var(--ink-faint); }
.ai-visual-diff .to { color: var(--ink); overflow-wrap: anywhere; }
.ai-visual-gifs { display: flex; align-items: center; gap: 8px; }
.ai-visual-gifs .ai-visual-gif { flex: 1 1 0; }
.ai-visual-arrow { flex: none; color: var(--ink-muted); font-size: 16px; }
.ai-visual-gif .box { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; border: 1px solid var(--hairline); background: var(--fill-subtle); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ai-visual-gif .box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ai-visual-gif.is-loading .box img { position: absolute; inset: 0; opacity: 0; }
.ai-visual-gif .box button { font-size: 12px; background: none; border: 1px solid var(--hairline); border-radius: 4px; color: var(--ink); padding: 4px 8px; cursor: pointer; }
.ai-tool-raw { margin-top: 4px; }
.ai-tool-raw > summary { font-size: 11px; color: var(--ink-faint); cursor: pointer; }

.ai-tool-img {
  max-width: 100%;
  border-radius: 4px;
  display: block;
}

/* ── Concise mode: past actions folded into one row ───────────────────────── */

/* ── Animation while running ─────────────────────────────────────── */
/* The "what is being done" + small round-count text block: 2px between the two rows; spacing to the other blocks in the bubble is still the bubble's gap */
.ai-activity-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
/*
 * Single-line centering: the line height is the integer 17px, the 11px spinner icon has 3px above and below, the 3px bouncing dot has 7px above and below, all landing on whole pixels,
 * aligned with the midline of the text line box. No margins are carried, so only then is the padding on all four sides of this one-line bubble equal.
 */
.ai-activity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 17px;
  color: var(--ink-muted);
}
.ai-activity-text {
  overflow-wrap: anywhere;
}
/* Round count and success/failure are one level less important than what is being done, so they are indented to align after the spinner icon (11px icon + 6px gap) */
.ai-activity-meta {
  margin: 0 0 0 17px;
  font-size: 11px;
  color: var(--ink-muted);
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
.ai-spinner {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 1.5px solid var(--hairline);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: ai-spin 0.7s linear infinite;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}
.ai-activity-dots {
  display: inline-flex;
  gap: 3px;
}
.ai-activity-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: ai-dot 1.2s ease-in-out infinite;
}
.ai-activity-dots i:nth-child(2) { animation-delay: 0.15s; }
.ai-activity-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-dot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* If the system is set to "reduce motion", no spinner and no bouncing dots */
@media (prefers-reduced-motion: reduce) {
  .ai-spinner { animation: none; border-top-color: var(--accent); }
  .ai-activity-dots i { animation: none; opacity: 0.6; }
}

/* ── Concise mode: a row of icons stands for the few things just done ──────────────
   Adjacent operations of the same kind are folded into one icon (at most 5, see iconRuns.ts), color tells the action type apart, and new ones pop out,
   so the user can see the entries multiplying and does not think it is stuck. A click makes the operation detail preview control inside the bubble jump to that entry (the list is not expanded here).
   The icon side length uses small_cube (--pc-cube-s), the same scale as the squares in the media library. */
.ai-ops-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ai-ops {
  display: flex;
  flex-wrap: wrap;
  /* 10px rather than the 8px square gap: on hover / focus they scale up and glow, and sitting too close would overlap the neighbors */
  gap: 10px;
  padding: 2px;
  align-items: center;
}
.ai-op {
  position: relative;
  flex: 0 0 auto;
  width: var(--pc-cube-s, 64px);
  height: var(--pc-cube-s, 64px);
  padding: 0;
  border: 0;
  border-radius: var(--ui-radius-lg, 8px);
  cursor: pointer;
  background-color: var(--chip, var(--ui-fg-faint, #6b6a75));
  /* A white glyph in the center (see the --chip-icon given per action type below); color and glyph each say it once, so users with color vision deficiency can still tell */
  background-image: var(--chip-icon, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 28px;
  transition: transform 160ms ease, box-shadow 160ms ease;
  /* A new icon pops once when it mounts. When history messages are laid out all at once it also pops only this once, with no looping.
     What animates is the standalone scale property rather than transform: a transform held by animation fill would keep overriding the hover / focus enlargement */
  animation: ai-op-pop 260ms cubic-bezier(0.16, 1, 0.5, 1) both;
}
.ai-op:hover {
  transform: scale(1.06);
}
.ai-op:focus-visible {
  outline: 2px solid var(--ui-accent, #00DBDB);
  outline-offset: 2px;
}
/*
 * The entry currently shown by the operation detail preview control:
 *   The user has clicked an icon / turned a page in this bubble → is-selected: accent-color outline + slightly enlarged;
 *   Not clicked yet and the message is running (auto-following the latest) → is-focus: glow only.
 */
.ai-op.is-focus {
  box-shadow: 0 0 16px var(--ui-accent-soft, rgba(0, 219, 219, 0.35));
}
.ai-op.is-selected {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--ui-accent, #00DBDB), 0 0 12px var(--ui-accent-soft, rgba(0, 219, 219, 0.35));
}
/*
 * Summary icon: a document with a folded corner on the outside, with ✓ or ! drawn inside. It stays distinct from the "big ! on red" of a failed operation:
 * green document ✓ = no problem, yellow document ! = problems reported, red document ! = this round ended in an error
 */
.ai-op--summary.tone-ok { --chip: var(--ui-success, #4f9e5c); --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2014%2014'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20stroke-width%3D'1.4'%20d%3D'M2.1%201h6.7l3.1%203.1V13H2.1z'%2F%3E%3Cpath%20stroke-width%3D'1.4'%20d%3D'M8.8%201v3.1h3.1'%2F%3E%3Cpath%20stroke-width%3D'1.5'%20d%3D'M4.7%208.4l1.6%201.6%203.1-3.4'%2F%3E%3C%2Fsvg%3E"); }
.ai-op--summary.tone-warn,
.ai-op--summary.tone-err { --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2014%2014'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20stroke-width%3D'1.4'%20d%3D'M2.1%201h6.7l3.1%203.1V13H2.1z'%2F%3E%3Cpath%20stroke-width%3D'1.4'%20d%3D'M8.8%201v3.1h3.1'%2F%3E%3Cpath%20stroke-width%3D'1.5'%20d%3D'M7%205.6v3.1'%2F%3E%3Ccircle%20cx%3D'7'%20cy%3D'10.6'%20r%3D'.8'%20fill%3D'%23fff'%20stroke%3D'none'%2F%3E%3C%2Fsvg%3E"); }
/*
 * The document glyph is drawn in a 14-unit grid (other icons use 12), so it fits vertically; the background is 32px, an even number, so (64 − 32) / 2 lands on whole pixels,
 * and the browser will not snap its position to a half pixel and shift it to one side. The scale is slightly smaller than the other icons (32/14 vs 28/12),
 * so the document is drawn a bit wider (2.1 ~ 11.8+ stroke, symmetric about the center line), and measured it is as wide as the eye of "View"
 */
.ai-op--summary {
  background-size: 32px 32px;
}
.ai-op.ai-op--summary.ai-opcard-chip {
  background-size: 14px 14px;
}
.ai-op--summary.tone-warn { --chip: var(--ui-warn, #e0a13a); }
.ai-op--summary.tone-err { --chip: var(--ui-danger, #e2564d); }
/* When 2 or more are stacked: a ×n in the bottom right corner */
.ai-op-count {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 18px;
  box-sizing: border-box;
  padding: 0 4px;
  border-radius: var(--ui-radius-sm, 4px);
  background: rgb(0 0 0 / 0.5);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
/* The progress bar for installing the engine takes the whole row, instead of being squeezed into the middle of an icon */
.ai-ops-install {
  flex: 1 1 100%;
  min-width: 0;
}

/*
 * Action types: reading is the darkest (dark gray background + magnifying glass), the most numerous but the least worth noticing.
 * Division of colors: red is reserved for "failure". Delete is a gray trash can, not red: previously both delete and failure were red,
 * so at a glance the user could not tell "something was deleted" from "an error occurred". Edit uses yellow-green rather than yellow: yellow reads as a warning to users.
 */
.ai-op--add { --chip: var(--ui-success, #4ade80); --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M6%202.5v7M2.5%206h7'%2F%3E%3C%2Fsvg%3E"); }
.ai-op--remove { --chip: #6b7280; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M2%203.5h8M4.8%203.5V2.3h2.4v1.2M3.2%203.5l.5%206h4.6l.5-6M5.2%205.5v2.5M6.8%205.5v2.5'%2F%3E%3C%2Fsvg%3E"); }
.ai-op--edit { --chip: #a3c22a; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M2.5%209.5l.6-2.4%205-5%201.8%201.8-5%205zM7.3%202.9l1.8%201.8'%2F%3E%3C%2Fsvg%3E"); }
/* Download: same color as "Process" (both are jobs you have to wait for), recognized by a white down arrow + tray: a blue square alone does not show that something is being downloaded */
.ai-op--download { --chip: var(--ui-accent, #60a5fa); --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M6%202.1v5.3M3.7%205.9L6%208.2l2.3-2.3M2.9%2010h6.2'%2F%3E%3C%2Fsvg%3E"); }
/*
 * Process (things that run for a while, such as transcription, tracking, detection, prerender, automatic workflows): dark yellow background + a ring of white dots.
 * First compute 10 circle centers, arranged clockwise from straight above (start -> end), with the last 4 having decreasing opacity 0.8 / 0.6 / 0.4 / 0.2,
 * looking like a spinning loader, so it is obvious at a glance that it is a running job. It stays distinct from the yellow-green of "Edit": this one leans orange
 */
.ai-op--job { --chip: #b8860b; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'%23fff'%3E%3Ccircle%20cx%3D'6'%20cy%3D'2.1'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'8.29'%20cy%3D'2.84'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'9.71'%20cy%3D'4.79'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'9.71'%20cy%3D'7.21'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'8.29'%20cy%3D'9.16'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'6'%20cy%3D'9.9'%20r%3D'0.95'%2F%3E%3Ccircle%20cx%3D'3.71'%20cy%3D'9.16'%20r%3D'0.95'%20fill-opacity%3D'0.8'%2F%3E%3Ccircle%20cx%3D'2.29'%20cy%3D'7.21'%20r%3D'0.95'%20fill-opacity%3D'0.6'%2F%3E%3Ccircle%20cx%3D'2.29'%20cy%3D'4.79'%20r%3D'0.95'%20fill-opacity%3D'0.4'%2F%3E%3Ccircle%20cx%3D'3.71'%20cy%3D'2.84'%20r%3D'0.95'%20fill-opacity%3D'0.2'%2F%3E%3C%2Fsvg%3E"); }
/* Multi-Agent (declare_scope, send_message, check_messages, list_agents): dark purple background + white chat bubble */
.ai-op--agent { --chip: #5b2aa8; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.4'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3.4%202.3h5.2a1.9%201.9%200%200%201%201.9%201.9v2.9a1.9%201.9%200%200%201-1.9%201.9H5.6L3.2%2010.4V9A1.9%201.9%200%200%201%201.5%207.1V4.2a1.9%201.9%200%200%201%201.9-1.9z'%2F%3E%3C%2Fsvg%3E"); }
/* UI operations (play, pause, seek, switch_*): they only move the editor UI and do not change the project. A blue one level deeper than "View" + a white clicking hand */
.ai-op--ui { --chip: #23489c; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'2.3'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9%2012.5V4.6a1.6%201.6%200%200%201%203.2%200V11'%2F%3E%3Cpath%20d%3D'M12.2%2010.6a1.6%201.6%200%200%201%203.2%200V12'%2F%3E%3Cpath%20d%3D'M15.4%2011.2a1.6%201.6%200%200%201%203.2%200v1.3'%2F%3E%3Cpath%20d%3D'M18.6%2012.2a1.6%201.6%200%200%201%203.2%200v3.3a6.5%206.5%200%200%201-6.5%206.5h-1.6a6%206%200%200%201-4.9-2.6l-4-5.7a1.7%201.7%200%200%201%202.6-2.2L9%2013.2'%2F%3E%3C%2Fsvg%3E"); }
/* View picture (see_frames, view_*): a blue one level deeper than "Process" + a white eye, kept apart from the magnifying glass for browsing data */
.ai-op--look { --chip: #2b5fc7; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.4'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M1.2%206C2.6%203.5%204.2%202.7%206%202.7s3.4.8%204.8%203.3C9.4%208.5%207.8%209.3%206%209.3S2.6%208.5%201.2%206z'%2F%3E%3Ccircle%20cx%3D'6'%20cy%3D'6'%20r%3D'1.5'%20fill%3D'%23fff'%20stroke%3D'none'%2F%3E%3C%2Fsvg%3E"); }
/*
 * Waiting: not working, gray-blue background + white Zzz. Fix the two ends first: a large Z at the bottom left (side 2.4, stroke 1.1) and a small Z at the top right (1.8, 0.95),
 * symmetric about the center of the square; the middle one interpolates between the two (center, side and stroke all take the midpoint) and lands exactly in the middle. Corner radius r = side/4.
 */
.ai-op--wait { --chip: #475569; --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20stroke-width%3D'1.1'%20d%3D'M1.25%208.35H3.05Q3.65%208.35%203.23%208.77L1.67%2010.33Q1.25%2010.75%201.85%2010.75H3.65'%2F%3E%3Cpath%20stroke-width%3D'1.02'%20d%3D'M4.95%204.95H6.53Q7.05%204.95%206.68%205.32L5.32%206.68Q4.95%207.05%205.48%207.05H7.05'%2F%3E%3Cpath%20stroke-width%3D'0.95'%20d%3D'M8.65%201.55H10Q10.45%201.55%2010.13%201.87L8.97%203.03Q8.65%203.35%209.1%203.35H10.45'%2F%3E%3C%2Fsvg%3E"); }
.ai-op--read {
  /* Dark gray: one level darker than the other actions (reading is the least worth noticing), but brighter than the panel, so it is not mistaken for an empty slot */
  --chip: #3c4552;
  --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%3E%3Ccircle%20cx%3D'5.2'%20cy%3D'5.2'%20r%3D'2.8'%2F%3E%3Cpath%20d%3D'M7.3%207.3l2.4%202.4'%2F%3E%3C%2Fsvg%3E");
}

/* No result yet: breathes gently, to tell it apart from "already done" */
.ai-op.is-run {
  animation: ai-op-pop 260ms cubic-bezier(0.16, 1, 0.5, 1) both,
    ai-op-breathe 1.1s ease-in-out 260ms infinite;
}
/* Failure: red square + white exclamation mark, overriding the color and icon of the action type: an error matters more than "which kind of action it was" */
.ai-op.is-err {
  --chip: var(--ui-danger, #f87171);
  --chip-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'1.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M6%202.6v4.2'%2F%3E%3Ccircle%20cx%3D'6'%20cy%3D'9.2'%20r%3D'.9'%20fill%3D'%23fff'%20stroke%3D'none'%2F%3E%3C%2Fsvg%3E");
  border-color: transparent;
}

@keyframes ai-op-pop {
  from { opacity: 0; scale: 0.3; }
  70% { scale: 1.12; }
  to { opacity: 1; scale: 1; }
}
@keyframes ai-op-breathe {
  50% { opacity: 0.45; }
}

/* People sensitive to motion only need the state, not the bouncing */
@media (prefers-reduced-motion: reduce) {
  .ai-op,
  .ai-op.is-run {
    animation: none;
    transition: none;
  }
  .ai-op:hover,
  .ai-op.is-selected {
    transform: none;
  }
}

/*
 * The step bar inside thinking.
 *
 * These "**Clarifying article link and scope**" lines are progress reported by the model, not reasoning meant to be read by people.
 * Laying them out as text verbatim would push the body text apart and break the reading flow, so they are compressed into lines of small text, like .ai-thinking
 * and stepped back to the ink-faint level: less prominent than the reply itself, yet it is clear at a glance which step we have reached.
 *
 * Only the last one, and only while the message has not finished, moves (is-live). Steps that have passed are static small dots,
 * because if the whole screen is breathing, you can no longer tell which step is the current one.
 */
/* One piece of thinking in detailed mode: step bar + (when "Show thinking" is on) the original text block, 6px between them, no margin on the outside */
.ai-thinking-part {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ai-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ai-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-faint);
  min-width: 0;
}
.ai-step-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}
.ai-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ai-step.is-live .ai-step-dot {
  opacity: 1;
  animation: ai-step-breathe 1.4s ease-in-out infinite;
}
.ai-step.is-live .ai-step-label {
  color: var(--ink-soft, var(--ink-faint));
}
@keyframes ai-step-breathe {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.6); opacity: 1; }
}
/* Follow the system "Reduce motion": breathing is only a hint and should not be forced on people sensitive to animation */
@media (prefers-reduced-motion: reduce) {
  .ai-step.is-live .ai-step-dot { animation: none; opacity: 1; }
}

/* ── One row in the operation list: name, success/failure, duration, result summary ── */
.ai-tool-chip.has-meta {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
}
.ai-tool-chip.has-meta .ai-tool-name {
  flex: none;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-tool-dur {
  flex: none;
  color: var(--ui-fg-faint, var(--ink-faint));
  font-variant-numeric: tabular-nums;
}
.ai-tool-sum {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ui-fg-faint, var(--ink-faint));
}

/*
 * Report card (the three groups of entries submitted by report_progress).
 * Now that text replies are hidden by default, this is the "conclusion" the user reads: the stage card is compact and one level back;
 * The round summary gets an extra semi-transparent accent-color outline: a bit more eye-catching, but without a solid accent color (the whole screen keeps only the one on the export button).
 */
.ai-report {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Equal padding on all four sides; the spacing to the blocks before and after it in the bubble is left to the bubble's gap, and it carries no margin of its own */
  padding: 10px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-panel, rgb(255 255 255 / 0.04));
  border: 1px solid var(--ui-border, var(--hairline));
  font-size: 12px;
  line-height: 1.55;
  min-width: 0;
}
.ai-report.is-final {
  padding: 12px;
  border-color: var(--ui-accent-soft, rgba(0, 219, 219, 0.45));
}
/* Waiting for the user to reply: the ball is in their court, so it switches to the reminder color, kept apart from the accent color of "done" */
.ai-report.is-blocked {
  border-color: var(--ui-warn, #e0a13a);
  box-shadow: inset 2px 0 0 var(--ui-warn, #e0a13a);
}
.ai-report-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--ui-fg-muted, var(--ink-muted));
}
.ai-report.is-final .ai-report-head {
  font-size: 12px;
  color: var(--ui-fg, var(--ink));
}
.ai-report.is-blocked .ai-report-head {
  color: var(--ui-warn, #e0a13a);
}
.ai-report-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ai-report-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ui-fg-muted, var(--ink-muted));
}
.ai-report-mark {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
/* Done: green ✓; to do: muted ○ (no background, lowest presence); issues: amber !: red is reserved for "failure" */
.ai-report-group.is-done .ai-report-mark {
  background: var(--ui-success, #4ade80);
  color: #0b0b0f;
}
.ai-report-group.is-todo .ai-report-mark {
  font-size: 12px;
  font-weight: 400;
  color: var(--ui-fg-faint, var(--ink-faint));
}
.ai-report-group.is-problem .ai-report-mark {
  background: var(--ui-warn, #f5a524);
  color: #0b0b0f;
}
.ai-report-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ui-fg, var(--ink));
  overflow-wrap: anywhere;
}
.ai-report-group.is-todo .ai-report-list {
  color: var(--ui-fg-muted, var(--ink-muted));
}
/* 1px between entries (the same as the original 1px margins on both sides after collapsing), no margin at the start and end: only then is the padding on all four sides of the report card equal */
.ai-report-list li {
  margin: 0;
}
.ai-report-list li + li {
  margin-top: 1px;
}
.ai-report-list li::marker {
  color: var(--ui-fg-faint, var(--ink-faint));
}
.ai-report-empty {
  color: var(--ui-fg-faint, var(--ink-faint));
}

/*
 * "Thinking and original text". Text replies and the original thinking text are both hidden by default, and this block appears at the bottom of the bubble only after "Show thinking" is turned on:
 * A 2px vertical line on the left and a background one level back, so it is obvious at a glance that this is working material, not a conclusion delivered to the user.
 */
.ai-rawlog {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Equal padding on all four sides; the distance to the report card above is left to the bubble's gap */
  padding: 10px;
  border-left: 2px solid var(--ui-border-strong, var(--hairline-strong));
  background: var(--ui-bg, rgb(0 0 0 / 0.12));
  border-radius: 0 var(--ui-radius, 6px) var(--ui-radius, 6px) 0;
  min-width: 0;
}
.ai-rawlog-head {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  color: var(--ui-fg-muted, var(--ink-muted));
  cursor: pointer;
}
.ai-rawlog-head:hover {
  color: var(--ui-fg, var(--ink));
}
.ai-rawlog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ai-rawlog-thinking {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ui-fg-faint, var(--ink-faint));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/*
 * Operation detail preview control (OpDetailPreview.tsx). A bubble holds only one; pictures, operation cards, summaries and received messages are all laid out here page by page.
 * The picture frame is fixed at 180px tall: the chat panel is only about three hundred pixels wide, and any taller would push the next message off a whole screen; text pages scroll inside the frame.
 * Turning pages translates the whole track with translateX; during a drag the transition is turned off so the picture follows the pointer.
 */
/* The width of an assistant bubble normally follows its content, but the picture frame has no content width of its own, so the bubble would shrink to the width of an icon.
   So a bubble with a carousel takes all the width it can (consistent with the max-width of .ai-message), and the carousel fills the bubble;
   the frame height is capped at 180px, and images are shown at their original size (shrink only, never enlarge), centered in the frame */
.ai-message.assistant:has(.ai-carousel) {
  width: 85%;
}
.ai-carousel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.ai-carousel-frame {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-bg, #0d0d10);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  /* Vertical touch scrolling is left to the message list, horizontal belongs to the carousel */
  touch-action: pan-y;
  outline: none;
}
.ai-carousel-frame:focus-visible {
  box-shadow: var(--ui-focus-ring, 0 0 0 2px var(--ui-accent, #00DBDB));
}
.ai-carousel-frame.is-dragging {
  cursor: grabbing;
}
.ai-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.ai-carousel-frame.is-dragging .ai-carousel-track {
  transition: none;
}
.ai-carousel-page {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Images must not be treated by the browser as something draggable, otherwise pressing and dragging produces the image's drag ghost instead of turning the page */
.ai-carousel img {
  -webkit-user-drag: none;
}
.ai-carousel-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
/* The current page is not rendered yet: cover it with a notice, so half an image is never shown */
.ai-carousel-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ui-fg-faint, var(--ink-faint));
  background: var(--ui-bg, #0d0d10);
  pointer-events: none;
}
.ai-carousel-note {
  padding: 0 12px;
  font-size: 12px;
  text-align: center;
  color: var(--ui-fg-faint, var(--ink-faint));
}
/* The left and right 22% are page-turning zones: the arrow shows only on the side where the mouse rests */
.ai-carousel-arrow {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}
.ai-carousel-arrow.is-prev {
  left: 8px;
}
.ai-carousel-arrow.is-next {
  right: 8px;
}
.ai-carousel-arrow.is-on {
  opacity: 1;
}
/* On keyboard focus both arrows show faintly, hinting that ← / → can be pressed */
.ai-carousel-frame:focus-visible .ai-carousel-arrow {
  opacity: 0.7;
}
/* Edit page: the before and after animated images on top, the parameter diff below; the frame is only 180px tall, so a long diff scrolls inside the frame */
.ai-carousel-change {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.ai-carousel-change .ai-visual-gifs {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  /* When the bubble widens the animated images do not stretch with it, and stay centered as a pair */
  justify-content: center;
}
.ai-carousel-change .ai-visual-gifs .ai-visual-gif {
  flex: 0 1 240px;
  min-height: 0;
}
.ai-carousel-change .ai-visual-gif .box {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
}
.ai-carousel-change .ai-visual-arrow {
  align-self: center;
}
.ai-carousel-change .ai-visual-diff {
  flex: 0 1 auto;
  max-height: 40%;
  overflow-y: auto;
  font-size: 11px;
}
.ai-carousel-diff {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;
  overflow-y: auto;
}
/* Text pages (operation cards, summaries, received messages) and the "Details" of picture pages: cards are stacked vertically and scroll inside the frame; text can be selected and copied */
.ai-carousel-page.is-ops,
.ai-carousel-page.is-summary,
.ai-carousel-page.is-inbound {
  align-items: stretch;
  justify-content: stretch;
}
.ai-odp-text {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: auto;
  user-select: text;
}
/* One card per operation / received message: the first row has the category square + category + name + duration, with the content below */
.ai-opcard {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel, #23222a);
}
.ai-opcard.is-err {
  box-shadow: inset 2px 0 0 var(--ui-danger, #e2564d);
}
.ai-opcard-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}
/* The square at the start of the row reuses the background color and glyph of the operation icons (ai-op--*, tone-*), shrunk to 20px, takes no mouse events and neither pops nor enlarges */
.ai-op.ai-opcard-chip {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background-size: 12px 12px;
  animation: none;
  transform: none;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.ai-opcard-kind {
  flex: none;
  font-weight: 600;
  color: var(--ui-fg, #f2f1f6);
}
.ai-opcard-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--ui-font-mono, monospace);
  font-size: 11px;
  color: var(--ui-fg-muted, #a6a4b2);
}
.ai-opcard-name.is-plain {
  font-family: inherit;
}
.ai-opcard-dur {
  flex: none;
  margin-left: auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg-faint, #6b6a75);
}
.ai-opcard-params {
  font-size: 11px;
  color: var(--ui-fg-faint, #6b6a75);
  overflow-wrap: anywhere;
}
.ai-opcard-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ui-fg, #f2f1f6);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-opcard-text.is-faint {
  color: var(--ui-fg-faint, #6b6a75);
}
.ai-opcard-to {
  font-size: 11px;
  color: var(--ui-fg-muted, #a6a4b2);
}
.ai-opcard-msg + .ai-opcard-msg {
  margin-top: 4px;
}
.ai-opcard-error {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ui-danger, #e2564d);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-opcard-fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.ai-opcard-fields .row {
  display: grid;
  grid-template-columns: minmax(56px, max-content) minmax(0, 1fr);
  gap: 8px;
}
.ai-opcard-fields dt {
  font-family: var(--ui-font-mono, monospace);
  font-size: 11px;
  color: var(--ui-fg-muted, #a6a4b2);
}
.ai-opcard-fields dd {
  margin: 0;
  color: var(--ui-fg, #f2f1f6);
  overflow-wrap: anywhere;
}
.ai-opcard-list {
  margin: 2px 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--ui-fg, #f2f1f6);
  overflow-wrap: anywhere;
}
.ai-opcard-list li.more {
  list-style: none;
  color: var(--ui-fg-faint, #6b6a75);
}
/* The two layers stacked on a picture page: on top, the first row of this operation (text with a shadow, legible even over a bright picture), and at the bottom, the note from the result (semi-transparent darkened background). Neither takes mouse events */
.ai-odp-over-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  pointer-events: none;
}
.ai-odp-over-head .ai-opcard-kind,
.ai-odp-over-head .ai-opcard-name,
.ai-odp-over-head .ai-opcard-dur {
  color: #fff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.8);
}
.ai-odp-over-head .ai-opcard-name,
.ai-odp-over-head .ai-opcard-dur {
  color: rgb(255 255 255 / 0.85);
}
.ai-odp-over-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  background: rgb(0 0 0 / 0.55);
  overflow-wrap: anywhere;
  pointer-events: none;
  /* Truncate to two lines if too long */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Edit pages / diff pages have their own labels and text: make room for the two layers above and below */
.ai-carousel-page:has(> .ai-odp-over-head) > .ai-carousel-change,
.ai-carousel-page:has(> .ai-odp-over-head) > .ai-carousel-diff {
  padding-top: 36px;
}
.ai-carousel-page:has(> .ai-odp-over-note) > .ai-carousel-change,
.ai-carousel-page:has(> .ai-odp-over-note) > .ai-carousel-diff {
  padding-bottom: 32px;
}
/* Top row: what this page is + "Details" + "Click to follow latest" when not following the latest */
.ai-odp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  min-width: 0;
  font-size: 11px;
  color: var(--ui-fg-muted, var(--ink-muted));
}
/* "Click to follow latest": icon + text, no background normally, a background appears only when the mouse moves over it */
.ai-odp-follow {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  background: transparent;
  font: inherit;
  font-size: 11px;
  color: var(--ui-accent, #00DBDB);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.ai-odp-follow svg {
  width: 12px;
  height: 12px;
}
.ai-odp-follow:hover {
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
}
.ai-odp-follow:focus-visible {
  outline: 2px solid var(--ui-accent, #00DBDB);
  outline-offset: 1px;
}
/* Bottom row: dots centered, page count on the right */
.ai-odp-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12px;
}
.ai-odp-foot .ai-carousel-count {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
}
.ai-carousel-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-carousel-count {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg-faint, var(--ink-faint));
}
.ai-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
/* The dot itself is 6px, and a ring of transparent border outside it extends the click area to 12px */
.ai-carousel-dot {
  width: 6px;
  height: 6px;
  box-sizing: content-box;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 6px;
  background: var(--ui-fg-faint, #6b6a75);
  background-clip: content-box;
  opacity: 0.55;
  cursor: pointer;
  transition: width 160ms ease, opacity 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.ai-carousel-dot:hover {
  opacity: 0.9;
}
.ai-carousel-dot.is-on {
  width: 14px;
  opacity: 1;
  background-color: var(--ui-accent, #00DBDB);
}
.ai-carousel-dot:focus-visible {
  outline: 2px solid var(--ui-accent, #00DBDB);
  outline-offset: -1px;
}
/* Only the few dots near the current page are shown (MAX_DOTS of OpDetailPreview): when there are more pages outside the window, the outermost dots shrink */
.ai-carousel-dot.is-edge {
  transform: scale(0.6);
}
/* Pages not rendered yet: the dot is fainter; once it has been clicked (it switches automatically when ready) it blinks */
.ai-carousel-dot.is-pending {
  opacity: 0.25;
  cursor: progress;
}
.ai-carousel-dot.is-wanted {
  animation: ai-carousel-wanted 1s ease-in-out infinite;
}
@keyframes ai-carousel-wanted {
  50% { opacity: 0.8; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-carousel-track,
  .ai-carousel-dot,
  .ai-carousel-arrow {
    transition: none;
  }
  .ai-carousel-dot.is-wanted {
    animation: none;
  }
}

/*
 * The thinking strip above the input box (ThinkingStrip.tsx): shows only the current step.
 * It used to be a vertical list of steps inside the bubble; after dozens of steps it got very long, and "now" sank to the very bottom.
 */
.ai-tstrip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Equal padding on all four sides: 16px line height + 8px above and below = 32px tall, and the single-line text, dot and timer are all centered */
  min-height: 32px;
  box-sizing: border-box;
  margin: 0 8px 6px;
  padding: 8px;
  line-height: 16px;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel, var(--fill-subtle));
  color: var(--ui-fg-muted, var(--ink-muted));
  font-size: 12px;
  min-width: 0;
}
.ai-tstrip-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-accent, #00DBDB);
  animation: ai-step-breathe 1.4s ease-in-out infinite;
}
.ai-tstrip-textwrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.ai-tstrip-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: ai-tstrip-in 220ms ease both;
}
.ai-tstrip-time {
  flex: none;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg-faint, var(--ink-faint));
}
/* The step changed: the new sentence fades in from below */
@keyframes ai-tstrip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-tstrip-dot,
  .ai-tstrip-text {
    animation: none;
  }
}

/*
 * What the Agent says in the bubble (send_message to user, or the text reply when it was not called) (user decision, 2026-10-20): "the bubble shows only what is being done".
 * One block per sentence, in chronological order; operations and reports are in "Agent operations" below.
 */
.ai-saying {
  overflow-wrap: anywhere;
}
.ai-saying > :first-child { margin-top: 0; }
.ai-saying > :last-child { margin-bottom: 0; }
.ai-saying-none {
  font-size: 12px;
  color: var(--ui-fg-muted, #A6A4B2);
}
/* Clicking a bubble switches "Agent operations" to that round: clickable ones get a hand cursor, and the round being viewed gets a faint accent-color outline */
.ai-message.assistant.is-selectable { cursor: pointer; }
.ai-message.assistant.is-selected {
  box-shadow: 0 0 0 1px var(--ui-accent-soft, rgba(0, 219, 219, 0.35));
}

/* "Agent operations" at the bottom of the AI panel: the operation icons of a round, the operation detail preview, stage / round summary (ActivityPanel.tsx) */
.pc-activity {
  margin: 0 10px 6px;
  border: 1px solid var(--ui-border, #3A3944);
  border-radius: 8px;
  background: var(--ui-panel, #23222A);
  font-size: 12px;
  flex: none;
  min-width: 0;
}
.pc-activity-head {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
}
.pc-activity-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: none;
  border: 0;
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.pc-activity-count {
  color: var(--ui-fg-faint, #77758A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-activity-nav {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.pc-activity-nav:hover:not(:disabled) { background: var(--ui-panel-2, #2C2B34); color: var(--ui-fg, #F2F1F6); }
.pc-activity-nav:disabled { opacity: 0.35; cursor: default; }
.pc-activity-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--ui-border, #3A3944);
  /* When the window is short, do not squeeze out the chat above: the body takes at most 30% of the height and the rest scrolls */
  max-height: 30vh;
  overflow-y: auto;
  min-width: 0;
}
/* Scroll when the content is taller than the maximum height; child blocks are not squashed */
.pc-activity-body > * { flex: none; }
.pc-activity-prompt {
  color: var(--ui-fg-faint, #77758A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-activity-empty {
  color: var(--ui-fg-faint, #77758A);
}
.ai-activity-verbose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* "Undo this step" in the top right of a picture page: the overlay itself takes no mouse events, the button does */
.ai-odp-over-undo {
  position: absolute;
  top: 4px;
  right: 6px;
  pointer-events: auto;
}
.ai-odp-over-undo .ai-opcard-undo { margin-top: 0 !important; }
/* The group of desktop app sessions inside the AI panel (DesktopSessionsStrip.tsx). Report cards reuse .ai-report from chat/agent.css */
.pc-desktop-sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--hairline, rgba(127, 127, 127, 0.2));
  max-height: 45%;
  overflow-y: auto;
  flex: 0 0 auto;
}

.pc-desktop-group {
  border: 1px solid var(--ui-border-strong, rgba(127, 127, 127, 0.3));
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2, transparent);
}
.pc-desktop-group.is-busy {
  border-color: var(--ui-accent);
}

.pc-desktop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.pc-desktop-vendor {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ui-accent-soft);
  color: var(--ui-fg);
  font-weight: 600;
}
.pc-desktop-id {
  flex: 0 0 auto;
  color: var(--ui-fg-muted);
}
.pc-desktop-op {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ui-fg-muted);
}
.pc-desktop-group.is-busy .pc-desktop-op {
  color: var(--ui-fg);
}
.pc-desktop-caret {
  flex: 0 0 auto;
  color: var(--ui-fg-muted);
}

.pc-desktop-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
}
.pc-desktop-empty {
  font-size: 12px;
  color: var(--ui-fg-muted);
}
.pc-desktop-error {
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger, #d33);
  white-space: pre-wrap;
  max-height: 6em;
  overflow: hidden;
}
/* SKILL dialog (register to the desktop app, connected sessions, enter SKILL). The base shell uses .pc-dialog from ui/toolbar.css; only its own things go here */
.pc-skill-dialog {
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.pc-skill-intro {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ui-fg-muted);
}

/* Two registration cards: Claude Code / Codex */
.pc-skill-providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pc-skill-provider {
  /* Grid items default to min-width:auto, so a long path would stretch the card out of the dialog */
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  text-align: left;
  font-family: inherit;
  transition: border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), background 160ms;
}
.pc-skill-provider:hover:not(:disabled) {
  border-color: color-mix(in oklab, var(--ui-border-strong) 60%, var(--ui-fg));
}
.pc-skill-provider.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft);
}
.pc-skill-provider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pc-skill-provider-name {
  font-size: 14px;
  font-weight: 600;
}
.pc-skill-provider-desc {
  font-size: 12px;
  color: var(--ui-fg-muted);
  line-height: 1.5;
}

.pc-skill-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--ui-fg-muted);
}
.pc-skill-meta code {
  font-family: var(--ui-font-mono, ui-monospace, monospace);
  color: var(--ui-fg);
  overflow-wrap: anywhere;
}

.pc-skill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-skill-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ui-fg-muted);
  cursor: pointer;
}
.pc-skill-check input { margin-top: 2px; flex: 0 0 auto; }

.pc-skill-msg {
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ui-fg);
  background: var(--ui-panel-2);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius, 4px);
  padding: 8px 10px;
}
.pc-skill-msg.is-err { color: var(--ui-danger); }

/* The status, the config file path and the two buttons inside a registration card */
.pc-skill-target-state { font-size: 12px; line-height: 1.5; }
.pc-skill-target-state.is-ok { color: var(--ui-success); }
.pc-skill-target-state.is-warn { color: var(--ui-warning, var(--ui-fg)); }
.pc-skill-target-state.is-muted { color: var(--ui-fg-muted); }
.pc-skill-target-state.is-err { color: var(--ui-danger); }
.pc-skill-target-file {
  font-family: var(--ui-font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--ui-fg-faint, var(--ui-fg-muted));
  overflow-wrap: anywhere;
}
.pc-skill-target-acts { display: flex; gap: 6px; margin-top: 4px; }

/* Desktop app sessions that have connected: one per row */
.pc-skill-sessions { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.pc-skill-session {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--ui-radius, 4px);
  font-size: 12px;
  color: var(--ui-fg-muted);
  background: var(--ui-panel-2);
}
.pc-skill-session b { color: var(--ui-fg); font-weight: 600; }
.pc-skill-session-op { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/*
 * Toolbar (design mockup, "Toolbar component table", sections 01/02/05).
 * Sizes: bar height 48 · button height 28 · padding 6/14 · gap 6 · corner radius 6 · font size 13.
 * Layering: the bar background has the same color as the canvas (L0 --ui-bg) and no bottom border line is drawn, so it merges with the canvas below;
 * Buttons are L3 (--ui-panel-2), hovered buttons L4 (--ui-float); a button is always lighter than the bar it sits in.
 * Each bar has only one solid accent-color button (the primary button), placed at the far right. Numeric text is monospaced, in the primary text color, with no container, 8px on the left and right.
 * All colors go through --ui-*, so the ten sets of values (five themes, light and dark) can be swapped in directly.
 */

/*
 * Menu bar → navigation bar transition band. Once the shell has sampled the menu bar color, it writes it into --pc-menubar and tags <html> with
 * pc-has-menubar; with no shell (running in a browser) its height is 0, as if it did not exist. 10px is the "stretch the height a little"
 * amount: taller would look like an extra empty bar, shorter and the gradient would be invisible.
 */
.pc-bar-fade {
  flex: 0 0 auto;
  height: 0;
  background: transparent;
}
html.pc-has-menubar .pc-bar-fade {
  height: 10px;
  background: linear-gradient(to bottom, var(--pc-menubar), var(--ui-bg));
}

.pc-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 6px;
  height: 48px;
  padding: 0 6px;
  background: var(--ui-bg);
  font-size: 13px;
  color: var(--ui-fg);
}

/* Groups within a bar: a thin divider between groups, 6px kept inside each group */
.pc-bar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pc-bar-sep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--ui-border-strong);
}

/* Secondary button: default style within a bar */
.pc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
/* Icon-only button: square, padding reduced to 6 */
.pc-btn--icon {
  padding: 0 6px;
  width: 28px;
  justify-content: center;
}

/* Collapsed button in the top bar: only the padding and gap shrink, no fixed width, so the box size transitions smoothly with its content */
.pc-btn--collapsed {
  padding: 0 5px;
  gap: 0;
  justify-content: center;
}

/* Button text label: collapses and expands with a smooth transition */
.pc-btn-label {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 220px;
  opacity: 1;
  transition: max-width 160ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-btn--collapsed .pc-btn-label {
  max-width: 0;
  opacity: 0;
}
.pc-more-menu .pc-btn-label {
  max-width: none;
  overflow: visible;
}
.pc-btn svg {
  color: var(--ui-fg-muted);
  flex: none;
  transition: color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pc-btn:hover {
  background: var(--ui-float);
  border-color: color-mix(in oklab, var(--ui-border-strong) 70%, var(--ui-fg));
}
.pc-btn:hover svg {
  color: var(--ui-fg);
}
/* Pressed: one step darker than the normal state, outline darkened */
.pc-btn:active {
  background: color-mix(in oklab, var(--ui-panel-2) 78%, var(--ui-bg));
  border-color: color-mix(in oklab, var(--ui-border-strong) 80%, var(--ui-bg));
}
.pc-btn:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 1px;
}
.pc-btn:disabled,
.pc-btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: default;
  background: var(--ui-panel-2);
  border-color: var(--ui-border);
}
.pc-btn:disabled:hover svg {
  color: var(--ui-fg-muted);
}

/* Primary button: the only solid accent-color button in a bar, the icon follows the button foreground color */
.pc-btn--primary {
  background: var(--ui-accent-grad);
  border-color: var(--ui-accent-press);
  color: var(--ui-accent-fg);
  font-weight: 600;
}
.pc-btn--primary svg {
  color: var(--ui-accent-fg);
}
.pc-btn--primary:hover {
  background: var(--ui-accent-grad-hover);
  border-color: var(--ui-accent);
}
.pc-btn--primary:hover svg {
  color: var(--ui-accent-fg);
}
.pc-btn--primary:active {
  background: var(--ui-accent-grad-press);
}

/* Numeric text: monospaced, primary text color, no container, 8px left and right */
.pc-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 8px;
  font-family: var(--ui-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg);
  font-size: 13px;
}
.pc-num svg {
  color: var(--ui-fg-faint);
}

/* Dropdown within a bar: same surface and outline as the secondary button */
.pc-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.pc-select:hover {
  background: var(--ui-float);
}
.pc-select:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 1px;
}
.pc-bar-label {
  color: var(--ui-fg-muted);
  font-size: 12px;
}

/* Product logo */
.pc-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.pc-logo-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}
.pc-logo-word {
  font-family: "Barlow Condensed", "Oswald", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-fg);
}
.pc-logo-sub {
  font-family: var(--ui-font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ui-fg-faint);
}

/* Project name and unsaved marker */
.pc-projname {
  color: var(--ui-fg-muted);
  font-size: 13px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-dirty {
  color: var(--ui-warn);
}

/* ⋯ More actions popup menu (popover) */
.pc-more-menu {
  position: fixed;
  z-index: 1000;
  min-width: 190px;
  padding: 10px;
  background: var(--ui-float);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-lg, 8px);
  box-shadow: var(--ui-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-more-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── "Project" button and dropdown ────────────────────────────────────────────── */
.pc-proj-btn { position: relative; gap: 6px; }
.pc-proj-btn.is-open {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
}
.pc-proj-caret { opacity: 0.7; transition: transform 160ms; }
.pc-proj-btn.is-open .pc-proj-caret { transform: rotate(180deg); }
/* With unsaved changes: a small dot at the top right of the button, and the "Save project" row in the menu gets one too */
.pc-proj-dirty {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ui-accent);
  box-shadow: 0 0 0 2px var(--ui-bg, #111);
}
.pc-proj-item .pc-proj-dirty { position: static; box-shadow: none; margin-left: auto; }

.pc-proj-menu {
  position: fixed;
  z-index: 1000;
  min-width: 232px;
  padding: 6px;
  background: var(--ui-float);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-lg, 8px);
  box-shadow: var(--ui-shadow, 0 12px 32px rgba(0, 0, 0, 0.4));
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: pc-proj-in 140ms ease-out;
}
@keyframes pc-proj-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.pc-proj-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius, 6px);
  background: transparent;
  color: var(--ui-text, inherit);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.pc-proj-item:hover, .pc-proj-item:focus-visible {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
  outline: none;
}
.pc-proj-item:disabled { opacity: 0.45; cursor: default; }
.pc-proj-item:disabled:hover { background: transparent; border-color: transparent; }
.pc-proj-item svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }
.pc-proj-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.pc-proj-text b { font-size: 12.5px; font-weight: 600; }
.pc-proj-text small { font-size: 11px; color: var(--ui-fg-muted); }
.pc-proj-sep { height: 1px; margin: 4px 6px; background: var(--ui-border-strong); opacity: 0.6; }

/* Project settings dialog */
.pc-dialog-mask {
  position: fixed;
  inset: 0;
  background: var(--ui-backdrop, rgba(0, 0, 0, 0.6));
  z-index: 1000;
  display: grid;
  place-items: center;
}
.pc-dialog {
  width: 360px;
  border-radius: var(--ui-radius, 6px);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel);
  color: var(--ui-fg);
  box-shadow: var(--ui-shadow, 0 8px 32px rgba(0, 0, 0, 0.45));
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--ui-font, inherit);
}
.pc-dialog-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ui-fg);
}
.pc-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pc-dialog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.pc-dialog-label {
  color: var(--ui-fg-muted);
  font-size: 13px;
}
.pc-dialog-options {
  display: flex;
  gap: 6px;
}
/* Dialog aspect ratio and orientation option buttons: normal state same as the secondary button, selected state in a light accent color */
.pc-dialog-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-dialog-opt:hover {
  background: var(--ui-float);
  border-color: color-mix(in oklab, var(--ui-border-strong) 70%, var(--ui-fg));
}
.pc-dialog-opt--on {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
  color: var(--ui-fg);
}
.pc-dialog-opt--on:hover {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
}
.pc-dialog-res {
  font-family: var(--ui-font-mono);
  color: var(--ui-fg);
  font-size: 13px;
  font-weight: 500;
}
.pc-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .pc-btn,
  .pc-btn svg,
  .pc-btn-label {
    transition: none;
  }
}


/* ── Color scheme diagnosis and correction v2, full screen: top bar 48 · button 30 · font size 12 ─────────────────
 * The component table section specified 36/28/13; the full-screen version enlarges the top bar to 48 high, controls to 30 high, and the font size to 12.
 * The top bar has the same color as the canvas, with no hairline drawn underneath and no accent-color inner shadow layered on, so it blends into the canvas.
 * The small bars of the preview area and the timeline have their own classes and do not follow --main here. */
.pc-bar--main {
  height: 48px;
  padding: 0 14px;
  gap: 14px;
  font-size: 12px;
}
.pc-bar--main .pc-bar-group {
  gap: 7px;
}
.pc-bar--main .pc-btn,
.pc-bar--main .pc-select {
  height: 30px;
  font-size: 12px;
}
.pc-bar--main .pc-btn {
  padding: 0 12px;
}
.pc-bar--main .pc-btn--icon,
.pc-bar--main .pc-btn--collapsed {
  width: 30px;
  padding: 0;
}
.pc-bar--main .pc-btn--primary {
  padding: 0 13px;
}
.pc-bar--main .pc-select {
  padding: 0 10px;
}
.pc-bar--main .pc-bar-sep {
  height: 22px;
  margin: 0;
  background: var(--ui-float);
}
.pc-bar--main .pc-bar-label {
  font-size: 11.5px;
}
.pc-bar--main .pc-logo-word {
  letter-spacing: 0.15em;
}
.pc-bar--main .pc-projname {
  font-size: 11.5px;
  color: var(--ui-fg-faint);
  letter-spacing: 0.02em;
}

/* ── Top bar project name: click once to rename in place ─────────────────────────
   The display state is a button (reachable with Tab, triggerable with Enter), but it looks like the old plain-text label
   in every detail; the editing state swaps in an input of the same width and font size, so the top bar doesn't jump between the two states. */
.pc-projname--btn {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  margin: 0 -4px;
  border-radius: var(--ui-radius-sm, 4px);
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  cursor: text;
  text-align: left;
}
.pc-projname--btn:hover {
  background: var(--ui-panel-2);
  color: var(--ui-fg);
}
.pc-projname--btn:focus-visible {
  outline: 1px solid var(--ui-accent);
  outline-offset: 0;
}
.pc-projname--editing {
  padding: 2px 4px;
  margin: 0 -4px;
  border: 1px solid var(--ui-accent);
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  letter-spacing: inherit;
  outline: none;
}

/* Read-only view: this page was opened with a read-only link that carries a key (the one given to the agent while a Skill task is running).
   Don't make it a glaring warning bar: it is the normal state, not a fault; but people should see at a glance that "this one can't be edited". */
.pc-viewonly-badge {
  flex: none;
  margin-right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--ui-fg-muted);
  background: var(--ui-panel-2);
  border: 1px solid var(--ui-border-strong);
  cursor: default;
}
/*
 * Preview area (center column).
 * The whole block sits inside the .pc-card-surface card of Editor.tsx (--ui-bg-2 background, --ui-radius-xl corners),
 * It paints no background of its own and uses smaller padding, so the card does not get another canvas-color layer nested inside and end up with double margins.
 * The tool row is a floating rounded group box (L2 background); the playback bar is a rounded card with a hairline.
 * Tool buttons are 28 square: selected = L3 background + accent-color outline, unselected = L2 background + hairline.
 */
.pc-pv {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 12px;
  height: 100%;
  min-height: 0;
  background: transparent;
}

/* ── Tool row ─────────────────────────────────────────────────────────── */
.pc-pv-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  background: var(--ui-panel);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg, 8px);
  padding: 4px 8px;
}
.pc-pv-tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--ui-panel);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm, 4px);
  color: var(--ui-fg-muted);
  cursor: pointer;
}
.pc-pv-tool:hover {
  color: var(--ui-fg);
  border-color: var(--ui-border-strong);
}
.pc-pv-tool.is-on {
  background: var(--ui-panel-2);
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}
.pc-pv-meta {
  margin-left: auto;
  font-family: var(--ui-font-mono);
  font-size: 11px;
  color: var(--ui-fg-faint);
  white-space: nowrap;
}
.pc-pv-badge {
  background: var(--ui-accent-soft);
  color: color-mix(in oklab, var(--ui-accent) 80%, var(--ui-fg));
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: var(--ui-radius-sm, 4px);
  white-space: nowrap;
}
/*
 * "Fit to window" used to be a <span>: it was labeled like something clickable, but clicking did nothing.
 * Now it is a real button: disabled while the view already fits the window (clicking it then changes nothing),
 * and it lights up only after the user has zoomed or panned manually; one click returns to fit-to-window.
 */
.pc-pv-fit {
  border: 1px solid transparent;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.4;
  cursor: pointer;
}
.pc-pv-fit:hover:not(:disabled) {
  border-color: var(--ui-accent);
}
.pc-pv-fit:disabled {
  cursor: default;
  background: var(--ui-panel-2);
  color: var(--ui-fg-faint);
}

/* ── 2D / 3D tabs ───────────────────────────────────────────────────── */
/* The two pages answer different questions: 2D shows what the final video looks like, 3D shows how these things are arranged in space. */
.pc-pv-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 6px 0;
  flex: 0 0 auto;
}
.pc-pv-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  font: 12px/1 system-ui, sans-serif;
  padding: 5px 12px;
  border-radius: var(--ui-radius-sm, 4px) var(--ui-radius-sm, 4px) 0 0;
  cursor: pointer;
}
.pc-pv-tabs button:hover { color: var(--ui-fg); }
.pc-pv-tabs button.is-on {
  color: var(--ui-fg);
  background: color-mix(in srgb, var(--ui-bg-2) 55%, var(--ui-panel));
}

/* ── Picture ───────────────────────────────────────────────────────────── */
.pc-pv-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.pc-pv-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ui-border);
}
/* Corner marks: 16 square, hairline one step stronger */
.pc-pv-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 11;
  border-color: var(--ui-border-strong);
  border-style: solid;
  border-width: 0;
}
.pc-pv-corner.tl { left: 10px; top: 10px; border-left-width: 1px; border-top-width: 1px; }
.pc-pv-corner.tr { right: 10px; top: 10px; border-right-width: 1px; border-top-width: 1px; }
.pc-pv-corner.bl { left: 10px; bottom: 10px; border-left-width: 1px; border-bottom-width: 1px; }
.pc-pv-corner.br { right: 10px; bottom: 10px; border-right-width: 1px; border-bottom-width: 1px; }

/* ── Playback bar: L1 card ─────────────────────────────────────────────────── */
.pc-pv-ctrl {
  flex-shrink: 0;
  background: var(--ui-bg-2);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg, 8px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Light skin: L1 is the same gray as the card background, so use L2 pure white instead, matching the selected button color */
[data-skin-mode="light"] .pc-pv-ctrl {
  background: var(--ui-panel);
}
.pc-pv-progress {
  position: relative;
  height: 3px;
  background: var(--ui-panel-2);
  cursor: pointer;
}
.pc-pv-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ui-accent);
}
.pc-pv-progress-knob {
  position: absolute;
  top: -4px;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  background: var(--ui-fg);
  border-radius: 50%;
  pointer-events: none;
}
.pc-pv-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pc-pv-btns {
  display: flex;
  gap: 7px;
}
.pc-pv-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--ui-panel-2);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm, 4px);
  color: var(--ui-fg-muted);
  cursor: pointer;
}
.pc-pv-btn:hover {
  color: var(--ui-fg);
  background: var(--ui-float);
}
.pc-pv-btn.is-on {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}
/* Play button: a circle in the primary text color + a canvas-color icon. On the dark skin it is a dark icon on white,
   on the light skin it flips to a light icon on dark, so it stays visible on a white card */
.pc-pv-btn--play {
  background: var(--ui-fg);
  border-color: var(--ui-fg);
  color: var(--ui-bg);
  border-radius: 50%;
}
.pc-pv-btn--play:hover {
  background: color-mix(in oklab, var(--ui-fg) 88%, var(--ui-bg));
  border-color: color-mix(in oklab, var(--ui-fg) 88%, var(--ui-bg));
  color: var(--ui-bg);
}
.pc-pv-time {
  font-family: var(--ui-font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ui-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: text;
}
.pc-pv-time input {
  width: 62px;
  background: transparent;
  color: inherit;
  border: 0;
  outline: none;
  font: inherit;
  text-align: right;
}
.pc-pv-time-total {
  font-family: var(--ui-font-mono);
  font-size: 13px;
  color: var(--ui-fg-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Volume: speaker + a 64×3 slider, the slider uses the secondary text color instead of the accent color (it is not a primary action) */
.pc-pv-vol {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-pv-vol-btn {
  background: none;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ui-fg-muted);
  cursor: pointer;
}
.pc-pv-vol-btn:hover {
  color: var(--ui-fg);
}
.pc-pv-vol-track {
  position: relative;
  width: 64px;
  height: 3px;
  background: var(--ui-panel-2);
  cursor: pointer;
}
.pc-pv-vol-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ui-fg-muted);
}
.pc-pv-vol input[type="range"] {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: 19px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── Selection outline + click pulse ─────────────────────────────────────────────
 * The outline hugs the clip's entity bounds (bounds() of the render surface), not a wrapper layer covering the whole screen.
 * Pulses once right after a click: the outline goes from thick to thin while a ring of accent color spreads out and fades,
 * so the user can see at a glance which control this click hit, especially when several cards are stacked. */
.pc-pv-hit {
  position: absolute;
  border: 2px solid var(--ui-accent);
  pointer-events: none;
  box-sizing: border-box;
}
.pc-pv-hit.is-pulse {
  animation: pc-pv-pulse 520ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pc-pv-pulse {
  0% {
    border-width: 4px;
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--ui-accent) 55%, transparent);
  }
  60% {
    border-width: 2px;
    box-shadow: 0 0 0 10px color-mix(in oklab, var(--ui-accent) 0%, transparent);
  }
  100% {
    border-width: 2px;
    box-shadow: 0 0 0 0 transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pc-pv-hit.is-pulse { animation: none; }
}

/*
 * "This is transparent" has **exactly one rendering across the whole project**: a mid-gray checkerboard.
 *
 * Transparency has to be shown in three places, which used to have three different sets of values:
 *   - CHECKER_A / CHECKER_B / CHECKER_PX in server/vite-plugin-vision.ts: used for the see_frames shown to the model;
 *   - .pc-3d-checker here: the background of the 3D view;
 *   - Another set hard-coded inline in Preview.tsx (darker, follows the skin): the background of the 2D picture.
 * The first two were aligned, the third was not. So the same project showed "transparent" differently on the 2D page and the 3D page,
 * and when people talked to each other or to the model about "that area is transparent", they never meant the same thing. It is now unified in this one place.
 *
 * **Why mid-gray, and not following the near-black skin.** The question this background has to answer is "is there nothing here at all".
 * Once the background is dark, a dark card and "nothing drawn" look exactly the same on screen. We have been bitten by this twice:
 * the black background of see_frames made the model look 20 times in a row and still think the card had not rendered (diagnostic report 20260909-045354),
 * and the near-black background of the 3D view had the same problem. Mid-gray (rather than black or white) is chosen so that both dark and light cards stand out against it.
 * The cost is that it looks bright inside a near-black UI, but it shows only where **the picture is truly transparent**,
 * and the more of it shows, the more the user needs to see that fact.
 *
 * If you change the values here, change those three constants in vite-plugin-vision.ts too, and vice versa.
 */
.pc-checker,
.pc-3d-checker {
  background-color: #6b707b;
  background-image:
    linear-gradient(45deg, #8b919c 25%, transparent 25%, transparent 75%, #8b919c 75%),
    linear-gradient(45deg, #8b919c 25%, transparent 25%, transparent 75%, #8b919c 75%);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

/*
 * Popovers on the checkerboard must bring their own background, otherwise #94a3b8 text on the mid-gray cells is unreadable.
 *
 * The two class names share this one rule, but **the class names are kept separate**: `.pc-3d-note` only means "status notice text",
 * and `.pc-3d-toggle` is a button. Anyone who looks for the "Rendering…" status notice by `.pc-3d-note`
 * should not match a button: this has already tripped us up once. Looking alike is not a reason to share a class name.
 */
.pc-3d-note,
.pc-3d-toggle {
  padding: 4px 10px;
  border-radius: var(--ui-radius, 6px);
  font: 12px/1.6 system-ui, sans-serif;
  background: color-mix(in srgb, var(--ui-panel) 92%, transparent);
  box-shadow: 0 1px 6px rgb(0 0 0 / 35%);
}

/*
 * The "2D view frame" toggle. When on, the button turns amber: **the same color** as the lines it draws in the scene,
 * so there is no need to guess "what did that click just add", the eye follows the color and finds it.
 * This amber (#f59e0b) is distinguishable from the cyan of the selection outline and the gray-blue of the aspect-ratio outline, so the three never get mixed up.
 */
.pc-3d-toggle {
  border: 1px solid var(--ui-border);
  color: var(--ui-fg-muted);
  cursor: pointer;
}
.pc-3d-toggle:hover {
  color: var(--ui-fg);
  border-color: var(--ui-border-strong);
}
.pc-3d-toggle.is-on {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* ── Framed preview zoom badge + Fit button (Vibe mode Detail editing, issue #15) ── */
.pc-pv--framed .pc-pv-stage[data-zoomed="true"] {
  cursor: grab;
}
.pc-pv-zoom-bar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 8px;
  border-radius: var(--ui-radius, 6px);
  border: 1px solid var(--ui-border);
  background: color-mix(in srgb, var(--ui-panel) 88%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 6px rgb(0 0 0 / 28%);
  user-select: none;
}
.pc-pv-zoom-pct {
  font-family: var(--ui-font-mono);
  font-size: 11px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg);
  white-space: nowrap;
}
.pc-pv-zoom-fit {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm, 4px);
  padding: 2px 7px;
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.4;
  background: var(--ui-accent-soft);
  color: color-mix(in oklab, var(--ui-accent) 80%, var(--ui-fg));
  cursor: pointer;
  white-space: nowrap;
}
.pc-pv-zoom-fit:hover:not(:disabled) {
  border-color: var(--ui-accent);
  color: var(--ui-fg);
}
.pc-pv-zoom-fit:disabled {
  cursor: default;
  background: var(--ui-panel-2);
  color: var(--ui-fg-faint);
}
/*
 * The loading overlay of K1. **Use only existing theme variables** (pinned interaction 2 / 3):
 * There is not a single fixed color here, so it changes along with the skin.
 */

.pc-probe-gate {
  position: fixed;
  inset: 0;
  /* The top bar, dialogs and AI panel are all below 60; the overlay must cover the whole editor */
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  /* Opaque: editing actions are blocked (the loading-phase overlay is an exception explicitly written into pinned render 1) */
  background: var(--ui-bg);
  color: var(--ui-fg);
  font-family: var(--ui-font);
  /* Keyboard input must not pass through either */
  user-select: none;
}

.pc-probe-gate-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--ui-border);
  border-top-color: var(--ui-accent);
  animation: pc-probe-spin 900ms linear infinite;
}

@keyframes pc-probe-spin {
  to { transform: rotate(360deg); }
}

/* Spinning makes some people uncomfortable; it is still clear that work is in progress without it (the progress bar and count below keep moving) */
@media (prefers-reduced-motion: reduce) {
  .pc-probe-gate-ring { animation-duration: 3s; }
}

.pc-probe-gate-title {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pc-probe-gate-card {
  font-size: 12px;
  color: var(--ui-fg-muted);
  font-family: var(--ui-font-mono);
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-probe-gate-bar {
  width: min(280px, 60vw);
  height: 3px;
  border-radius: 2px;
  background: var(--ui-panel-2);
  overflow: hidden;
}

.pc-probe-gate-bar > i {
  display: block;
  height: 100%;
  background: var(--ui-accent);
  transition: width 120ms linear;
}

.pc-probe-gate-note {
  font-size: 11px;
  color: var(--ui-fg-faint);
}
/*
 * Left rail (src/editor/left): vertical rail + drawer cards + five sections (media library / animation / effects / edit / captions).
 *
 * The shared classes .pc-rail* / .pc-card-surface / .pc-chip* / .pc-icon-btn / .pc-btn-primary / .pc-section-title
 * are in skins/studio.css and are not rewritten here; only the left rail's own .pc-left-* (shell, forms, common widgets) and .pc-lib-* (group browsing) are written here.
 * Variables always carry fallback values, so nothing falls apart even when the skin has not been merged in.
 * These rules are not inside a Tailwind layer, so they naturally outrank utility classes that set the same property: therefore the control classes here do not set a width, and width is left to the w-* utility classes.
 */

/* ── Shell: rail + drawer ─────────────────────────────────────────── */
.pc-left {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background-color: transparent;
}
/* shell.css paints a background color over the whole [data-pc="left"] block; in the new layout the rail must show the canvas, so the background color is given only to the drawer card */
[data-skin] [data-pc="left"].pc-left {
  background-color: transparent;
}
.pc-left > .pc-rail {
  flex: none;
  height: 100%;
}
/*
 * The drawer width is fixed to the --pc-left-drawer-w given by Editor.tsx and must never be squeezed narrower (normally it equals the column width minus the rail).
 * During the column-width transition when collapsing / expanding, the column changes but the drawer does not, and the extra stretch is clipped by overflow:hidden on the outer aside,
 * so the masonry layout inside does not reflow frame by frame. When the variable is unavailable (not inside the editor grid), it falls back to flex: 1 to fill the space.
 */
.pc-left-drawer {
  flex: 1 0 var(--pc-left-drawer-w, 0px);
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  color: var(--ui-fg, #F2F1F6);
}
/*
 * When the drawer collapses / expands the card fades out / in with a slight horizontal shift (Editor.tsx attaches data-pc-rail-anim to the grid only at the moment of switching).
 * Collapse: the inline display:none takes effect only after the fade-out finishes (allow-discrete); expand: fades in from @starting-style.
 */
@media (prefers-reduced-motion: no-preference) {
  [data-pc-rail-anim] .pc-left-drawer {
    transition:
      opacity 200ms cubic-bezier(0.16, 1, 0.3, 1),
      translate 220ms cubic-bezier(0.16, 1, 0.3, 1),
      display 220ms allow-discrete;
  }
  [data-pc-rail-anim] .pc-left-drawer[data-pc-collapsed] {
    opacity: 0;
    translate: -12px 0;
  }
  @starting-style {
    [data-pc-rail-anim] .pc-left-drawer {
      opacity: 0;
      translate: -12px 0;
    }
  }
}
.pc-left-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}
.pc-left-section {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Section header: title → primary button / search / pill */
.pc-left-head {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 10px;
}
/* Title row (SectionHead): section name on the left, "Collapse panel" in the top right.
 * The button uses a negative margin to absorb the part that is taller than the title, so the title row keeps its original height and the icon sits flush with the right content line */
.pc-left-titlerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.pc-left-titlerow .pc-left-collapse {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -6px -4px 0;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-left-titlerow .pc-left-collapse:hover {
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-primary {
  gap: 6px;
}
.pc-left-searchrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pc-left-filter {
  flex: none;
  position: relative;
  color: var(--ui-fg-muted, #A6A4B2);
}
/* When a tier is switched off, a small accent-color dot appears in the top right, reminding that "the cards you see now are not all of them" */
.pc-left-filter.is-narrowed::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-accent, #00DBDB);
}

/* ── Search box ────────────────────────────────────────────────────── */
.pc-left-search {
  flex: 1;
  min-width: 0;
  height: 32px;
  /* In the effects / captions sections it sits directly in a vertical flex header, where the 0 basis of flex: 1 would squash the height; in the search row the flex is horizontal and unaffected */
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 10px;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg-faint, #75737F);
  cursor: text;
}
.pc-left-search:focus-within {
  border-color: var(--ui-accent, #00DBDB);
}
.pc-left-search svg {
  flex: none;
}
.pc-left-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--ui-fg, #F2F1F6);
}
/* The outline is already drawn on the outer label, so the input inside must not stack another focus ring */
[data-pc-dock-kind="section"] .pc-left-search input:focus,
[data-pc-dock-kind="section"] .pc-left-search input:focus-visible {
  outline: none;
  border-color: transparent;
}
.pc-left-search input::placeholder {
  color: var(--ui-fg-faint, #75737F);
}
.pc-left-search-clear {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  color: var(--ui-fg-faint, #75737F);
  cursor: pointer;
}
.pc-left-search-clear:hover {
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-float, #35343F);
}

/* ── Scroll container ──────────────────────────────────────────────── */
.pc-left-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.pc-left-scroll::-webkit-scrollbar-thumb {
  background-color: var(--ui-scroll-thumb, #3f3f46);
  border-radius: 4px;
}
.pc-left-scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--ui-scroll-thumb-hover, #52525b);
}
.pc-left-scroll::-webkit-scrollbar-track {
  background-color: transparent;
}

/* ── Group browsing: pill row + overview / detail ───────────────────────────────── */
.pc-lib-browser {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pc-lib-bar {
  flex: none;
  padding: 0 12px 10px;
}
.pc-lib-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
}
/* Group boxes / detail blocks inside the vertical flex must not be squashed */
.pc-lib-scroll > * {
  flex-shrink: 0;
}

.pc-lib-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pc-lib-chips .pc-chip:not(.is-on):hover,
.pc-lib-seg .pc-chip:not(.is-on):hover {
  background-color: var(--ui-float, #35343F);
}
/* "Visual ▾": the pill body and the small arrow are two buttons, joined into one pill */
.pc-chip.pc-lib-split {
  position: relative;
  gap: 0;
  padding: 0;
}
.pc-lib-split-main,
.pc-lib-split-caret {
  height: 100%;
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.pc-lib-split-main {
  padding: 0 2px 0 10px;
  border-radius: var(--ui-radius, 6px) 0 0 var(--ui-radius, 6px);
}
.pc-lib-split-caret {
  padding: 0 7px 0 3px;
  border-radius: 0 var(--ui-radius, 6px) var(--ui-radius, 6px) 0;
}
.pc-lib-chip-group {
  max-width: 100%;
  padding-right: 6px;
}
.pc-lib-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-lib-chip-x {
  flex: none;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* The pill's small dropdown menu and filter popover */
.pc-lib-menu,
.pc-lib-popover {
  position: absolute;
  z-index: 40;
  background: var(--ui-float, #35343F);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-lg, 8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-menu {
  top: calc(100% + 4px);
  left: 0;
  min-width: 140px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.pc-lib-menu-item {
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.pc-lib-menu-item:hover,
.pc-lib-menu-item:focus-visible {
  background: var(--ui-panel-2, #2C2B34);
  outline: none;
}
.pc-lib-menu-empty {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ui-fg-faint, #75737F);
}
.pc-lib-popover {
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  padding: 10px 8px 8px;
}
.pc-lib-popover-title {
  padding: 0 4px;
  font-size: 12.5px;
  font-weight: 600;
}
.pc-lib-popover-hint {
  padding: 2px 4px 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ui-fg-muted, #A6A4B2);
}

/* Card filter (CardScopeBar) */
.pc-lib-scope {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.pc-lib-scope-chip {
  height: 24px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-sm, 4px);
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.pc-lib-scope-chip:hover {
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-scope-chip.is-on {
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
  border-color: var(--ui-accent, #00DBDB);
  color: var(--ui-accent, #00DBDB);
}
.pc-lib-scope-caret {
  height: 24px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--ui-fg-faint, #75737F);
  font-size: 11px;
  cursor: pointer;
}
.pc-lib-scope-caret:hover {
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-scope-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 41;
  min-width: 150px;
  padding: 8px;
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.pc-lib-scope-panel-title {
  margin-bottom: 4px;
  font-size: 10.5px;
  color: var(--ui-fg-faint, #75737F);
}
.pc-lib-scope-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 11.5px;
  color: var(--ui-fg-muted, #A6A4B2);
  cursor: pointer;
}
.pc-lib-scope-option input {
  accent-color: var(--ui-accent, #00DBDB);
}

/* ── Overview: group box ────────────────────────────────────────────── */
.pc-lib-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--ui-panel, #23222A);
  border: 1px solid transparent;
  border-radius: var(--ui-radius-lg, 8px);
  cursor: pointer;
  transition: border-color 120ms;
}
.pc-lib-group:hover {
  border-color: var(--ui-border-strong, #3A3944);
}
.pc-lib-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.pc-lib-group-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pc-lib-group-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-group-count {
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-group-arrow {
  flex: none;
  color: var(--ui-fg-muted, #A6A4B2);
  transition: transform 120ms, color 120ms;
}
.pc-lib-group:hover .pc-lib-group-arrow {
  color: var(--ui-fg, #F2F1F6);
  transform: translateX(2px);
}
.pc-lib-group-empty {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  text-align: center;
  background: none;
  border: 1px dashed var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}
.pc-lib-group-empty.is-action {
  width: 100%;
  cursor: pointer;
}
.pc-lib-group-empty.is-action:hover {
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
  border-color: var(--ui-accent, #00DBDB);
  color: var(--ui-fg, #F2F1F6);
}

/* Thumbnail preview: display only, clicking anywhere on the block opens the group */
.pc-lib-thumbs {
  display: grid;
  gap: 6px;
  pointer-events: none;
}
.pc-lib-thumbs.is-small_cube {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pc-lib-thumbs.is-middle_cube,
.pc-lib-thumbs.is-big_16_9 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pc-lib-thumbs.is-big_strip {
  grid-template-columns: minmax(0, 1fr);
}
.pc-lib-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--ui-radius, 6px);
}
.pc-lib-thumbs.is-small_cube > .pc-lib-thumb,
.pc-lib-thumbs.is-middle_cube > .pc-lib-thumb {
  aspect-ratio: 1 / 1;
}
.pc-lib-thumbs.is-big_16_9 > .pc-lib-thumb {
  aspect-ratio: 16 / 9;
}
.pc-lib-thumbs.is-big_strip > .pc-lib-thumb {
  height: 56px;
}
/* The cell height is set by aspect-ratio and the content is absolutely positioned to fill it, without relying on percentage heights */
.pc-lib-thumbs .pc-lib-thumb > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Hover-to-play for video thumbnails (ThumbTile onHover): only this cell takes pointer events back, so we know which cell is hovered;
 * clicks still bubble up to the group box and open the group. The <video> itself takes none, so right-click does not bring up the browser's built-in video menu */
.pc-lib-thumbs .pc-lib-card.is-hoverplay {
  pointer-events: auto;
}
.pc-lib-card.is-hoverplay video {
  pointer-events: none;
}

/* ── Detail: count + extra block + masonry layout ───────────────────────────────── */
.pc-lib-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-lib-count {
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}
/* The spacing must match GAP (8) in library/layout.ts, otherwise the masonry layout cannot be computed accurately */
.pc-lib-masonry {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pc-lib-masonry-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-lib-masonry-cell {
  position: relative;
  min-width: 0;
}
.pc-lib-fill {
  width: 100%;
  height: 100%;
}

.pc-lib-block {
  display: flex;
  flex-direction: column;
}
.pc-lib-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-label.is-spaced {
  margin-top: 10px;
}
.pc-lib-seg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pc-lib-seg .pc-chip {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
}
.pc-lib-seg-note {
  margin-left: 2px;
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-color {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-sm, 4px);
  cursor: pointer;
}
.pc-lib-color.is-on {
  box-shadow: 0 0 0 2px var(--ui-bg-2, #1B1A21), 0 0 0 4px var(--ui-accent, #00DBDB);
}
.pc-lib-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-lib-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
}
.pc-lib-row-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.pc-lib-tag {
  flex: none;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-float, #35343F);
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 10px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}
.pc-lib-tag.is-accent {
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
  color: var(--ui-accent, #00DBDB);
}
.pc-lib-ellipsis {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Reference notes (kinds of audio effects) */
.pc-lib-details {
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-details > summary {
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
}
.pc-lib-details > summary:hover {
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-details-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 1px solid var(--ui-border, #2A2932);
}
.pc-lib-details-kind {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-details-hint {
  margin: 1px 0 2px;
  font-size: 10px;
  color: var(--ui-fg-faint, #75737F);
}
.pc-lib-details-params {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 10px;
  color: var(--ui-fg-muted, #A6A4B2);
}

/* ── Preview card (PreviewCard / ThumbTile): shared by motion graphics cards / parts / transitions / emphasis / videos / images ──
 * Hovering only draws an outline and no inner shadow: the 3px left inner shadow of the `.cursor-grab.bg-neutral-900:hover` rule in the skin would leak into the fully filled preview image. */
.pc-lib-card-wrap {
  width: 100%;
  min-width: 0;
}
.pc-lib-card-wrap.is-fill {
  height: 100%;
}
.pc-lib-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--ui-panel-2, #2C2B34), var(--ui-bg-2, #1B1A21));
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  transition: border-color 140ms, box-shadow 140ms;
}
.pc-lib-card-wrap.is-fill > .pc-lib-card,
.pc-lib-card.is-static {
  height: 100%;
}
.pc-lib-card.is-click {
  cursor: pointer;
}
.pc-lib-card.is-grab {
  cursor: grab;
}
.pc-lib-card.is-hot {
  border-color: color-mix(in oklab, var(--ui-accent, #00DBDB) 70%, var(--ui-border, #2A2932));
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.pc-lib-card-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pc-lib-card-view > img,
.pc-lib-card-view > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
}
/* Deterministic representative-frame thumbnail for animation cards and composite parts */
.pc-anim-thumb {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 36%, rgba(40, 42, 54, 0.72), rgba(14, 15, 21, 0.94));
}
.pc-anim-thumb-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}
.pc-anim-thumb-fallback {
  display: block;
  width: 100%;
  height: 100%;
}
/* Text description inside the picture area (when a motion graphics card is not hovered) */
.pc-lib-card-text {
  padding: 8px 9px;
  pointer-events: none;
}
.pc-lib-card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-card-desc {
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-card-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 6px;
  background: linear-gradient(to top, rgba(8, 10, 16, 0.86), rgba(8, 10, 16, 0));
  pointer-events: none;
}
.pc-lib-card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  color: #eef2f8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.pc-lib-card-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.pc-lib-card-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgba(238, 242, 248, 0.72);
}
/* Small dark pill in the bottom left (video duration) */
.pc-lib-card-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: var(--ui-radius-sm, 4px);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  font-variant-numeric: tabular-nums;
}
.pc-lib-card-badge.is-corner {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  pointer-events: none;
}
/* Playback progress: sits on the bottom edge, view only, not draggable */
.pc-lib-card-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.pc-lib-card-bar-fill {
  height: 100%;
  background: var(--ui-accent, #00DBDB);
  transition: width 120ms linear;
}
.pc-lib-card-err {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 3px 4px;
  text-align: center;
  font-size: 10px;
  color: var(--ui-danger, #ef4444);
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
/* The row of actions under a seam card */
.pc-lib-card-foot {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
/* Seam card hover: the later clip fades in and out back and forth over the earlier one */
@keyframes pc-xfade {
  0%, 15% { opacity: 0; }
  50%, 65% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Audio strip (AudioStrip): audio media / audio effects / audio presets ───────────── */
.pc-lib-strip {
  position: relative;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 10px;
  overflow: hidden;
  background: var(--ui-panel-2, #2C2B34);
  border-radius: var(--ui-radius-lg, 8px);
  color: var(--ui-fg, #F2F1F6);
  transition: background-color 120ms;
}
.pc-lib-strip.is-click {
  cursor: pointer;
}
.pc-lib-strip.is-grab {
  cursor: grab;
}
.pc-lib-strip:hover {
  background: var(--ui-float, #35343F);
}
.pc-lib-strip-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ui-accent, #00DBDB);
  opacity: 0.22;
  pointer-events: none;
}
.pc-lib-strip-icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-strip-text {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pc-lib-strip-name {
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 12.5px;
}
.pc-lib-strip-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ui-fg-muted, #A6A4B2);
}
/* Action buttons show only on hover / keyboard focus; "Confirm delete" stays visible while awaiting confirmation */
.pc-lib-strip-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 28px;
  background: linear-gradient(to right, transparent, var(--ui-float, #35343F) 22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms;
}
.pc-lib-strip:hover .pc-lib-strip-actions,
.pc-lib-strip:focus-within .pc-lib-strip-actions,
.pc-lib-strip:focus-visible .pc-lib-strip-actions,
.pc-lib-strip.is-armed .pc-lib-strip-actions {
  opacity: 1;
  pointer-events: auto;
}
.pc-lib-strip .pc-left-btn.is-label {
  pointer-events: none;
}
@media (hover: none) {
  .pc-lib-strip-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Filter swatch card ────────────────────────────────────────────── */
.pc-lib-fxcard {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
}
.pc-lib-fxcard.is-on {
  border-color: var(--ui-accent, #00DBDB);
}
.pc-lib-fxcard-swatch {
  flex: 1;
  min-height: 24px;
}
.pc-lib-fxcard-body {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px 8px;
}
.pc-lib-fxcard-name {
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ui-fg, #F2F1F6);
}
.pc-lib-fxcard-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-lib-fxcard-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.pc-lib-fxcard-actions .pc-left-btn {
  flex: 1;
  min-width: 0;
}

/* ── Global style swatch card ────────────────────────────────────────────── */
.pc-lib-theme {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms;
}
.pc-lib-theme:hover {
  border-color: var(--ui-border-strong, #3A3944);
}
/* Current theme: selected outline in the accent color */
.pc-lib-theme.is-on {
  border-color: var(--ui-accent, #00DBDB);
  box-shadow: 0 0 0 1px var(--ui-accent, #00DBDB);
}
.pc-lib-theme.is-static {
  cursor: inherit;
}
.pc-lib-theme-swatch {
  flex: 1;
  min-height: 20px;
  display: flex;
}
.pc-lib-theme-swatch > span {
  flex: 1;
}
.pc-lib-theme-swatch > span.is-wide {
  flex: 2;
}
.pc-lib-theme-body {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px 8px;
}
.pc-lib-theme-name {
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}
.pc-lib-theme-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ui-fg-muted, #A6A4B2);
}

/* ── Description text, notice bar, empty state ────────────────────────────────────── */
.pc-left-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-left-hint {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ui-fg-muted, #A6A4B2);
  background: var(--ui-panel, #23222A);
  border-radius: var(--ui-radius, 6px);
}
.pc-left-hint.is-bar {
  flex: none;
  padding: 6px 12px;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--ui-border, #2A2932);
}
/* Brief notice that flashes by at the bottom of the section */
.pc-left-flash {
  flex: none;
  padding: 8px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-panel, #23222A);
  border-top: 1px solid var(--ui-border, #2A2932);
}
.pc-left-flash.is-top {
  border-top: 0;
  border-bottom: 1px solid var(--ui-border, #2A2932);
}
/* Empty state: dashed-box icon + two or three lines of description + one button, all centered */
.pc-left-empty {
  flex: 1;
  min-height: 200px;
  display: grid;
  place-items: center;
  padding: 24px 22px;
  text-align: center;
}
.pc-left-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-lg, 8px);
  color: var(--ui-fg-faint, #75737F);
}
.pc-left-empty-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-left-empty-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 12px;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.pc-left-empty-btn:hover {
  background: var(--ui-float, #35343F);
}

/* ── Caption tree ────────────────────────────────────────────────── */
.pc-left-cap-node {
  border-bottom: 1px solid var(--ui-border, #2A2932);
}
.pc-left-cap-head,
.pc-left-cap-seg {
  width: 100%;
  display: flex;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pc-left-cap-head {
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
}
.pc-left-cap-seg {
  gap: 8px;
  padding: 4px 12px 4px 20px;
}
.pc-left-cap-head:hover,
.pc-left-cap-seg:hover {
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-cap-head.is-focused {
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-cap-seg.is-active {
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-cap-seg.is-offline {
  opacity: 0.5;
}

/* ── Form controls (edit section, caption transcription panel) ───────────────────────────── */
.pc-left-input,
.pc-left-select {
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 120ms;
}
.pc-left-select {
  padding: 0 4px 0 6px;
}
.pc-left-input.is-sm,
.pc-left-select.is-sm {
  height: 24px;
  padding: 0 6px;
  font-size: 11.5px;
}
.pc-left-input:hover,
.pc-left-select:hover {
  border-color: var(--ui-border-strong, #3A3944);
}
[data-pc-dock-kind="section"] .pc-left-input:focus,
[data-pc-dock-kind="section"] .pc-left-select:focus {
  border-color: var(--ui-accent, #00DBDB);
}
[data-pc-dock-kind="section"] .pc-left-input.is-error,
[data-pc-dock-kind="section"] .pc-left-input.is-error:focus {
  border-color: var(--ui-danger, #ef4444);
}
.pc-left-input::placeholder {
  color: var(--ui-fg-faint, #75737F);
}
.pc-left-select option,
.pc-left-select optgroup {
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-color {
  flex: none;
  width: 32px;
  height: 28px;
  padding: 2px;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  cursor: pointer;
}
.pc-left-color.is-sm {
  width: 26px;
  height: 24px;
}
.pc-left-range {
  accent-color: var(--ui-accent, #00DBDB);
}
.pc-left-code {
  padding: 8px;
  resize: none;
  outline: none;
  background: var(--ui-bg, #131218);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg, #F2F1F6);
  font-family: ui-monospace, Consolas, "Segoe UI Symbol", monospace;
  font-size: 11px;
  line-height: 1.6;
}
[data-pc-dock-kind="section"] .pc-left-code:focus {
  border-color: var(--ui-accent, #00DBDB);
}
/* Invalid JSON: red border (scripts/left-check.mjs asserts on the border color) */
[data-pc-dock-kind="section"] .pc-left-code.is-error,
[data-pc-dock-kind="section"] .pc-left-code.is-error:focus {
  border-color: var(--ui-danger, #ef4444);
}

.pc-left-btn {
  flex: none;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  white-space: nowrap;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color 120ms, background-color 120ms, border-color 120ms;
}
.pc-left-btn:hover:not(:disabled) {
  background: var(--ui-float, #35343F);
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.pc-left-btn.is-sm {
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
}
.pc-left-btn.is-icon {
  width: 28px;
  padding: 0;
}
.pc-left-btn.is-block {
  width: 100%;
}
.pc-left-btn.is-primary {
  height: 30px;
  background: var(--ui-accent-grad, #00DBDB);
  border-color: transparent;
  color: var(--ui-accent-fg, #ffffff);
  font-weight: 500;
}
.pc-left-btn.is-primary:hover:not(:disabled) {
  background: var(--ui-accent-grad-hover, var(--ui-accent, #00DBDB));
  color: var(--ui-accent-fg, #ffffff);
}
.pc-left-btn.is-danger {
  border-color: var(--ui-danger, #ef4444);
  color: var(--ui-danger, #ef4444);
}
.pc-left-btn.is-danger-hover:hover:not(:disabled) {
  color: var(--ui-danger, #ef4444);
}
.pc-left-link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.pc-left-link:hover {
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-box {
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius, 6px);
}
.pc-left-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--ui-panel-2, #2C2B34);
}
.pc-left-progress-fill {
  height: 100%;
  background: var(--ui-accent, #00DBDB);
  transition: width 200ms;
}
.pc-left-muted {
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-left-faint {
  color: var(--ui-fg-faint, #75737F);
}
.pc-left-strong {
  color: var(--ui-fg, #F2F1F6);
}
.pc-left-divider {
  border-top: 1px solid var(--ui-border, #2A2932);
}
.pc-left-divider-b {
  border-bottom: 1px solid var(--ui-border, #2A2932);
}

/* ── Import from cloud drive (StorageImportButton)─────────────────────────────── */
/* Secondary button: same height and corner radius as the primary button, outlined and not filled: on the media page "Import media" is the primary action */
.pc-btn-ghost {
  min-height: 36px;
  border-radius: var(--ui-radius, 6px);
  background: transparent;
  color: var(--ui-fg, #F2F1F6);
  border: 1px solid var(--ui-border, #2A2932);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  box-sizing: border-box;
  cursor: pointer;
}
.pc-btn-ghost svg {
  flex: none;
}
:root[lang="ja"] .pc-left-head .pc-btn-ghost {
  padding: 6px 8px;
  font-size: 11.5px;
}
.pc-btn-ghost.is-block {
  width: 100%;
  display: flex;
}
.pc-btn-ghost:not(:disabled):hover {
  border-color: var(--ui-accent, #00DBDB);
  color: var(--ui-accent, #00DBDB);
}
.pc-btn-ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.pc-btn-ghost:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px var(--ui-accent, #00DBDB));
}

.pc-storage-import {
  position: relative;
}
.pc-storage-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 4px;
  border-radius: var(--ui-radius, 6px);
  border: 1px solid var(--ui-border, #2A2932);
  background: var(--ui-bg-raised, #1B1A21);
  box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
}
.pc-storage-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ui-fg, #F2F1F6);
  font-size: 13px;
  cursor: pointer;
}
.pc-storage-item:not(:disabled):hover {
  background: var(--ui-bg-hover, #26242F);
}
.pc-storage-item:disabled {
  color: var(--ui-fg-faint, #75737F);
  cursor: default;
}
.pc-storage-tag {
  font-size: 11px;
  color: var(--ui-fg-faint, #75737F);
}
.pc-storage-note {
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ui-fg-faint, #75737F);
}
.pc-storage-note code {
  font-size: 10px;
}
.pc-storage-sep {
  height: 1px;
  margin: 4px 2px;
  background: var(--ui-border, #2A2932);
}
.pc-storage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}
.pc-storage-rowmain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  color: var(--ui-fg, #F2F1F6);
}
.pc-storage-act {
  flex: none;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--ui-border, #2A2932);
  background: transparent;
  color: var(--ui-fg, #F2F1F6);
  font-size: 12px;
  cursor: pointer;
}
.pc-storage-act:not(:disabled):hover {
  border-color: var(--ui-accent, #00DBDB);
  color: var(--ui-accent, #00DBDB);
}
.pc-storage-act:disabled {
  opacity: 0.45;
  cursor: default;
}
/* Logo in front of the cloud drive name */
.pc-storage-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
/*
 * Free layout of the side rails (src/editor/dock): the rail list, the icon that follows the pointer while dragging and the drop-target indicator line, the "+", and the page nodes inside the host.
 * The shared .pc-rail / .pc-rail-item are in skins/studio.css; the Agent item's avatar, badge and close button (.pc-rr-*) are in right/chat/chat.css;
 * The host card's width and collapse animation are still handled by .pc-left-drawer in left.css and .pc-right-card in chat.css.
 * No divider is drawn between any items on a rail, only a 4px gap separates them; the drop-target indicator line appears only while dragging.
 */

/* ── rail ─────────────────────────────────────────────────────── */
.pc-dock-rail {
  flex: 0 0 var(--ui-rail-w, 64px);
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}
/*
 * With many items it must scroll, and when emptied by dragging it still fills the whole rail as a drop target. The container stretches to the full rail width (align-self: stretch) instead of shrinking to the 56px item width:
 * Once overflow is enabled, whatever sticks out of the child items is clipped; the accent-color vertical bar on the outer edge of the selected item (±4px) lands exactly in this 4px gap, and if the container were narrowed the bar would be clipped away.
 */
.pc-dock-rail-list {
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: var(--ui-radius-lg, 8px);
}
.pc-dock-rail-list::-webkit-scrollbar {
  display: none;
}
/* The rail being dragged over gets a faint accent-color wash: even an empty rail visibly accepts a drop (a background fill, not a line) */
[data-pc-drop-target] > .pc-dock-rail-list {
  background-color: color-mix(in oklab, var(--ui-accent, #00DBDB) 8%, transparent);
}

.pc-dock-slot {
  position: relative;
  flex: 0 0 auto;
}
/* On touch / pen drags, keep the browser from treating the gesture as scrolling (otherwise a drag fires pointercancel immediately) */
.pc-dock-slot > .pc-rail-item {
  touch-action: none;
}
/* The item being dragged fades in place */
.pc-dock-slot[data-pc-dragging] > .pc-rail-item {
  opacity: 0.35;
}
.pc-dock-slot[data-pc-dragging] .pc-rr-x,
.pc-dock-slot[data-pc-dragging] .pc-rr-badge {
  display: none;
}

/* "+": a + inside a chat bubble, a bit shorter than the items, placed right below the last Agent on this side */
.pc-rail-item.pc-dock-add {
  flex: 0 0 auto;
  height: 40px;
}

/* ── While dragging ───────────────────────────────────────────── */
body[data-pc-rail-dragging],
body[data-pc-rail-dragging] * {
  cursor: grabbing !important;
}
body[data-pc-rail-dragging] iframe {
  pointer-events: none;
}

/* Semi-transparent icon that follows the pointer: a clone of the rail item button, attached to body */
.pc-dock-ghost {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0.8;
  background-color: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  outline: 1px solid var(--ui-border-strong, #3A3944);
  will-change: transform;
  /* What is cloned is a button: the global hover brighten / press shrink / transform transition added to buttons (motion.css) must not carry over, otherwise the icon lags half a beat behind the pointer */
  transition: none !important;
  animation: none !important;
  filter: none !important;
}

/* Drop-target indicator line: appears only while dragging */
.pc-dock-drop-line {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483001;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ui-accent, #00DBDB);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .pc-dock-drop-line {
    transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .pc-dock-rail-list {
    transition: background-color 120ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ── Page nodes inside the host (pageNodes)─────────────────────────────── */
/* Visibility is handled by the node's own inline display: only the page selected on this side is shown, the rest are display:none but stay mounted */
.pc-dock-page {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pc-dock-page > .ai-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

/* ── The collapse button follows the side it is on ───────────────────── */
/* Section on the right side: the collapse button goes top left, with the title following it */
.pc-left-titlerow.is-right {
  justify-content: flex-start;
}
.pc-left-titlerow.is-right .pc-left-collapse {
  margin: -4px 0 -4px -6px;
}
/* Script page / assistant tab on the left side: the collapse button moves to the top right, and the left padding goes back to the title */
.pc-script-head.is-left {
  padding: 6px 8px 6px 14px;
}
.ai-panel-header.is-left {
  padding-left: 14px;
}

/* ── The stretch of the rail beside the timeline (RailBar part="tail", .pc-rail-tail-slot in Editor.tsx)──────── */
.pc-rail-tail-slot {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: center;
}
/* Top edge aligns with the top edge of the timeline card: drop the top padding of .pc-rail */
.pc-dock-rail--tail {
  padding-top: 0;
}
/* Small horizontal line at the top of that stretch: marks the boundary between the stretch beside the timeline and the upper part */
.pc-dock-tail-sep {
  flex: none;
  margin: 0 0 6px;
}
/*
 * The "▾ n" shown when the rail cannot fit everything, and the sub-window it pops up (railOverflow.tsx). Shared by the upper half of the rail and the cut group.
 * One row per item in the sub-window: icon + full name. A rail item button placed here is laid out horizontally, with the selected vertical bar on the outer side of the rail removed.
 */
.pc-rail-more {
  flex: 0 0 auto;
  width: calc(var(--ui-rail-w, 64px) - 8px);
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: var(--ui-radius, 6px);
  background: transparent;
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 10px;
  font-family: var(--ui-font-mono, monospace);
  cursor: pointer;
  touch-action: none;
}
.pc-rail-more:hover,
.pc-rail-more.is-open {
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-panel-2, #2C2B34);
}
/* The collapsed items include the currently selected one: the text switches to the accent color so you know it is in there */
.pc-rail-more.has-active {
  color: var(--ui-accent, #00DBDB);
}
.pc-rail-more svg {
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-rail-more.is-open svg {
  transform: rotate(180deg);
}

.pc-rail-menu {
  position: fixed;
  z-index: 1000;
  min-width: 150px;
  max-width: 240px;
  max-height: min(420px, calc(100vh - 16px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-radius: var(--ui-radius-lg, 8px);
  border: 1px solid var(--ui-border-strong, #3A3944);
  background: var(--ui-float, #383742);
  box-shadow: var(--ui-shadow, 0 6px 18px rgba(0, 0, 0, 0.45));
}
.pc-rail-menu .pc-dock-slot,
.pc-rail-menu .pc-rr-tab {
  width: 100%;
}
.pc-rail-menu .pc-rail-item {
  width: 100%;
  height: 34px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 26px 0 8px;
  border-radius: var(--ui-radius, 6px);
}
.pc-rail-menu .pc-rail-item:hover {
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
}
.pc-rail-menu .pc-rail-item svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.pc-rail-menu .pc-rail-item::before,
.pc-rail-menu .pc-rail-item::after {
  display: none;
}
.pc-rail-menu .pc-rail-item span,
.pc-rail-menu .pc-rr-label {
  max-width: none;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-rail-menu .pc-rr-x {
  top: 9px;
  right: 5px;
}
/* Badges and status dots cannot keep their original position within a single row, so they snap to the right */
.pc-rail-menu .pc-rr-badge {
  top: 9px;
  right: 24px;
}
.pc-rail-menu .pc-rr-state,
.pc-rail-menu .pc-rr-dot {
  top: 13px;
  left: auto;
  right: 10px;
}
/*
 * UI styles of the right rail: whole-column layout, the right-side rail, script page, top bar, message bubbles, input area.
 * The tool squares, step bar, thinking block and tool details inside Agent bubbles are in agent.css.
 * Colors always go through --ui-* variables with fallback values, so nothing blurs into a mess even before the skin has loaded.
 */

/* ── Right rail as a whole column: a card on the left, and a rail against the window edge on the right ─────────────────── */
/* Right-aligned: during the column-width transition when collapsing / expanding, the card width stays the same and the part wider than the column overflows on the left and gets clipped, so the rail always stays against the right edge of the window */
.pc-right {
  display: flex;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
/*
 * When collapsed, this card is only display:none (inline style), and none of the AiPanels inside is unmounted.
 * The width is fixed to the --pc-right-panel-w given by Editor.tsx and must not be squeezed narrower: the message area does not reflow frame by frame during the transition.
 */
.pc-right-card {
  flex: 1 0 var(--pc-right-panel-w, 0px);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* The card fades out / in with a slight horizontal shift when collapsing / expanding; same set as the left rail drawer (left.css), but toward the right */
@media (prefers-reduced-motion: no-preference) {
  [data-pc-rail-anim] .pc-right-card {
    transition:
      opacity 200ms cubic-bezier(0.16, 1, 0.3, 1),
      translate 220ms cubic-bezier(0.16, 1, 0.3, 1),
      display 220ms allow-discrete;
  }
  [data-pc-rail-anim] .pc-right-card[data-pc-collapsed] {
    opacity: 0;
    translate: 12px 0;
  }
  @starting-style {
    [data-pc-rail-anim] .pc-right-card {
      opacity: 0;
      translate: 12px 0;
    }
  }
}

/*
 * The script page and each AiPanel are no longer piled up inside this card: each lives in its own page node (dock/pageNodes), which the host moves in and out,
 * showing only the page selected on this side. For node styles and visibility, see dock/dock.css.
 */

/* ── AI-type items on the rail: script / each assistant tab (the rail itself is shared by left and right, in dock/RailBar.tsx + dock/dock.css) ── */
.pc-rr-tab {
  position: relative;
  flex: 0 0 auto;
}
.pc-dock-rail .pc-rail-item:focus-visible,
.pc-rr-x:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* The script already has content: a small dot at the top right of the icon */
.pc-rr-dot {
  position: absolute;
  top: 9px;
  left: calc(50% + 7px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ui-accent, #00DBDB);
  box-shadow: 0 0 0 2px var(--ui-bg, #131218);
}

/*
 * Agent avatar: a round glyph (the number or the first character of the title). Its color is the Agent-specific color --ui-agent: a yellow with the same lightness and chroma as the accent color
 * (computed by skins/agentColor.ts), kept apart from ordinary icons and from the accent color used for selection. The 11px of .pc-rail-item span in studio.css must be overridden here.
 * isolation: the two pseudo-elements of the flowing light below (z-index:-1) stay inside the avatar's own layer and do not slip behind the rail.
 */
.pc-rail-item .pc-rr-glyph {
  position: relative;
  isolation: isolate;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: color-mix(in oklab, var(--ui-agent, #d6b13c) 14%, var(--ui-panel-2, #2C2B34));
  color: var(--ui-agent, #d6b13c);
}
.pc-rail-item.is-on .pc-rr-glyph {
  background: color-mix(in oklab, var(--ui-agent, #d6b13c) 26%, var(--ui-panel-2, #2C2B34));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ui-agent, #d6b13c) 45%, transparent);
}

/*
 * Running: behind the avatar, a rotating conic gradient blurred into flowing light; the inner circle is covered with a layer of background color so only a bright rim remains, and the text is still legible.
 * What rotates is the transform (a compositing layer), so the gradient is not repainted every frame.
 */
.pc-rail-item.is-busy .pc-rr-glyph::before,
.pc-rail-item.is-busy .pc-rr-glyph::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.pc-rail-item.is-busy .pc-rr-glyph::before {
  inset: -4px;
  background: conic-gradient(
    transparent 0turn,
    var(--ui-agent, #d6b13c) 0.18turn,
    transparent 0.36turn,
    transparent 0.5turn,
    var(--ui-agent, #d6b13c) 0.68turn,
    transparent 0.86turn
  );
  filter: blur(2.5px);
  will-change: transform;
  animation: pc-rr-flow 1.6s linear infinite;
}
.pc-rail-item.is-busy .pc-rr-glyph::after {
  inset: 1.5px;
  background: color-mix(in oklab, var(--ui-agent, #d6b13c) 22%, var(--ui-panel-2, #2C2B34));
}
@keyframes pc-rr-flow {
  to { transform: rotate(1turn); }
}
/* Labels longer than 4 characters are truncated in JS; add an ellipsis fallback here, to stop a wider font from pushing past the rail item width */
.pc-rail-item .pc-rr-label {
  max-width: calc(var(--ui-rail-w, 64px) - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Finished / interrupted and the user has not viewed this page yet: a small dot at the bottom right of the avatar. Blue = finished (accent color), yellow = interrupted (warning color). No dot while running, only the flowing light */
.pc-rr-state {
  position: absolute;
  top: 26px;
  left: calc(50% + 7px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ui-bg, #131218);
  pointer-events: none;
}
.pc-rr-state.is-done {
  background: var(--ui-accent, #00DBDB);
}
.pc-rr-state.is-interrupted {
  background: var(--ui-warn, #E0A13A);
}

/* Messages from other Agents have not been delivered yet: badge at the top right. On hover it yields to the close button */
.pc-rr-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 8px;
  background: var(--ui-accent, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.pc-rr-tab:hover .pc-rr-badge {
  opacity: 0;
}

/* Close: hidden normally, and it appears only when this item is hovered (or keyboard-focused), so a row of × on the rail does not steal attention */
.pc-rr-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.pc-rr-tab:hover .pc-rr-x,
.pc-rr-x:focus-visible {
  opacity: 1;
}
.pc-rr-x:hover {
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-float, #34333D);
}
.pc-rr-x:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pc-rr-tab:hover .pc-rr-x:disabled {
  opacity: 0.35;
}

/* Follow the system "Reduce motion": the flowing light does not rotate, leaving only a static ring of light */
@media (prefers-reduced-motion: reduce) {
  .pc-rail-item.is-busy .pc-rr-glyph::before { animation: none; }
}

/* ── Script page: embedded in the right rail card, alongside the assistant tabs ─────────────────────── */
.pc-script-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--ui-fg, #F2F1F6);
}
/* Top bar: height, padding and bottom border line are the same as .ai-panel-header of the assistant tabs, so the "Collapse panel" on the left does not move when switching pages */
.pc-script-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  box-sizing: border-box;
  padding: 6px 14px 6px 8px;
  border-bottom: 1px solid var(--ui-border, #2A2932);
}
.pc-script-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}
.pc-script-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ui-fg-faint, #6E6C7A);
  font-variant-numeric: tabular-nums;
}
.pc-script-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-script-note {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
  color: var(--ui-fg, #F2F1F6);
}
.pc-script-text {
  flex: 1 1 auto;
  min-height: 120px;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-lg, 8px);
  outline: none;
}
.pc-script-text:focus-visible {
  border-color: var(--ui-accent, #00DBDB);
}
.pc-script-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.pc-script-saved {
  margin-right: auto;
  font-size: 12px;
  color: var(--ui-success, #4ade80);
}
.pc-script-btn {
  height: 32px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  cursor: pointer;
  white-space: nowrap;
}
.pc-script-btn:hover:not(:disabled) {
  background: var(--ui-float, #34333D);
}
.pc-script-actions .pc-btn-primary {
  height: 32px;
  font-size: 13px;
}
.pc-script-page button:disabled {
  opacity: 0.45;
  cursor: default;
}
.pc-script-page button:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* ── Top bar: "Collapse panel" + title + connection dot on the left, three icon buttons on the right ─────────── */
.ai-panel-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  box-sizing: border-box;
  padding: 6px 8px;
  border-bottom: 1px solid var(--ui-border, #2A2932);
  min-width: 0;
}
/* "Collapse panel" (CollapsePanelButton): at the far left of the top bar of assistant tabs and the script page, and it must not be squeezed narrower however long the title is */
.pc-collapse-btn {
  flex: 0 0 auto;
}
.ai-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-fg, #F2F1F6);
}
.ai-chat-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--ui-fg-faint, #6E6C7A);
}
.ai-status-dot.is-connected {
  background-color: var(--ui-success, #4ade80);
}
.ai-chat-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
/* "Think" is an activatable button with a label: icon + small label text, width follows the content */
.ai-chat-actions .ai-think-btn {
  width: auto;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
}
.ai-chat-actions .pc-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* The only button on the top bar when no driver is installed */
.ai-gear-btn {
  font-size: 13px;
  font-weight: 600;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg, #F2F1F6);
  cursor: pointer;
  padding: 6px 10px;
  min-height: 32px;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-gear-btn:hover {
  background: var(--ui-float, #34333D);
}
.ai-gear-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ── Login banner, notice bar, empty state ───────────────────────────────────── */
.ai-banner {
  flex: 0 0 auto;
  background: var(--ui-panel-2, #2C2B34);
  border-bottom: 1px solid var(--ui-danger, #f87171);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ui-fg, #F2F1F6);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ai-banner-btn {
  align-self: flex-start;
  max-width: 100%;
  padding: 4px 12px;
  background: var(--ui-accent-grad, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
  border: none;
  border-radius: var(--ui-radius-sm, 4px);
  font-size: 12px;
  cursor: pointer;
}
.ai-banner-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}
.ai-banner-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-toast {
  flex: 0 0 auto;
  background: var(--ui-panel-2, #2C2B34);
  border: 1px solid var(--ui-border, #2A2932);
  padding: 8px 12px;
  border-radius: var(--ui-radius, 6px);
  font-size: 12px;
  text-align: center;
  margin: 8px 12px;
  color: var(--ui-fg, #F2F1F6);
}

.ai-empty-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  align-items: center;
  text-align: center;
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-empty-example {
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-lg, 8px);
  cursor: pointer;
}
.ai-empty-example:hover {
  background: var(--ui-panel-2, #2C2B34);
}

/* ── Message area ─────────────────────────────────────────────────────── */
.ai-messages {
  flex: 1 1 auto;
  /* When the input box has been dragged taller and the thinking strip and queue list are both present, the input box shrinks first and the message area keeps at least 80px (MESSAGES_MIN_H in composerHeight.ts) */
  min-height: 80px;
  min-width: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--ui-bg-2, #1B1A21);
  /* The scroll position is anchored by MessageList itself (the height of the placeholder above changes after windowing), so browser scroll anchoring is turned off to stop both from moving together */
  overflow-anchor: none;
}

/* Windowing placeholder (MessageList, listWindow.ts): holds up the height of the messages that are not rendered. An empty div gets squashed in a flex column, so it must not shrink */
.ai-vspacer {
  flex: none;
  pointer-events: none;
}

/*
 * content-visibility: bubbles scrolled out of the viewport take no part in layout and painting. Every streaming fragment is one commit, and after a commit the browser has to lay out the whole
 * message list again. With a history of 1200 tool calls (5800 nodes), it measured 100+ ms per fragment and the UI froze;
 * after adding this rule it is 13 ms. contain-intrinsic-size gives bubbles scrolled out an estimated height, so the scrollbar does not jump around.
 * Each message is now wrapped in a .ai-row (avatar + bubble), and the rule is attached to this layer.
 */
.ai-messages > .ai-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}

/*
 * The scroll area is a flex column, and children can shrink by default. For rows skipped by content-visibility, the minimum height is 0 under size containment,
 * so as soon as the content exceeds the scroll area they get squashed to a few pixels tall and the estimated height above is never used (with a 2000-entry history the measured total scroll height was only about thirty-some thousand pixels,
 * and opening a history session could not scroll to the bottom). None may shrink; each is laid out at its own height (or estimated height).
 */
.ai-messages > * {
  flex-shrink: 0;
}

/* One row = one message: Agent on the left with an avatar, user on the right without one */
.ai-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.ai-row--user {
  justify-content: flex-end;
}
.ai-row-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
/* The role avatar is square by default (RoleAvatar.css); in chat rows it is made round throughout */
.ai-row-avatar .pc-role-avatar {
  border-radius: 50%;
}
.ai-avatar-ai {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg-muted, #A6A4B2);
  user-select: none;
}

/* A long gap between two rounds: a centered row of muted time text */
.ai-time-sep {
  align-self: center;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--ui-fg-faint, #6E6C7A);
  font-variant-numeric: tabular-nums;
}
/* A message from another Agent was received and no reply follows it yet to attach to (MessageList): a row of small text in place, not drawn as a user bubble */
.ai-inbound-note {
  align-self: center;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--ui-fg-faint, #6E6C7A);
}

/*
 * The bubble keeps the same 10px on all four sides; the blocks inside are separated only by gap (8px), and no block may carry its own top or bottom margin:
 * Previously a bubble holding only a one-line "Thinking" had 14px above and 8px below, so the single line did not look centered.
 */
.ai-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 85%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px;
  border-radius: var(--ui-radius-lg, 8px);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
/* Fallback: the top and bottom margins of direct child blocks are always zeroed. Two class names raise the specificity above each block's own margin rules, regardless of which stylesheet loads first */
.ai-message.assistant > *,
.ai-message.user > * {
  margin-top: 0;
  margin-bottom: 0;
}

/* Agent bubble: a panel color one level lighter than the message area background */
.ai-message.assistant {
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
}

/*
 * User bubble: solid accent color throughout. In chat apps "what I said" and "what the other side said" are told apart by color, left and right,
 * User messages are few and each one is the start of a round, so they deserve the most eye-catching level.
 */
.ai-message.user {
  background: var(--ui-accent, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
}
/* On an accent-color background the default colors of links, quotes and code blocks are hard to read, so they all follow the bubble's text color */
.ai-message.user .ai-message-text a,
.ai-message.user .ai-message-text blockquote {
  color: inherit;
}
.ai-message.user .ai-message-text a {
  text-decoration: underline;
}
.ai-message.user .ai-message-text pre,
.ai-message.user .ai-message-text code {
  color: inherit;
}
.ai-message.user .ai-message-text pre {
  background: rgb(0 0 0 / 0.2);
  border-color: transparent;
}
.ai-message.user .ai-message-error {
  color: inherit;
  font-weight: 600;
}
/* In a cloud chat, the message just sent whose server record has not come back yet (optimistic display): slightly faded while sending, with a warning border when it was not sent */
.ai-message.user.is-sending {
  opacity: 0.78;
}
.ai-message.user.is-failed {
  box-shadow: inset 0 0 0 1.5px var(--ui-danger, #e5484d);
}
.ai-message-send-state {
  font-size: 11.5px;
  opacity: 0.8;
  margin-top: 2px;
}
/* A message in the offline pending-send queue that will no longer be sent: a small "Resend" button inside the bubble (runs through again with the current state) */
.ai-message-resend {
  margin-top: 6px;
  padding: 2px 10px;
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 999px;
  cursor: pointer;
}
.ai-message-resend:hover {
  background: rgb(255 255 255 / 0.28);
}

/* Attachments in a user bubble: one small pill per file */
.ai-bubble-files {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ai-bubble-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: var(--ui-radius-sm, 4px);
  background: rgb(0 0 0 / 0.2);
  font-size: 11px;
}
.ai-bubble-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-message-text {
  min-width: 0;
}
.ai-message-text p {
  margin: 0 0 8px 0;
}
.ai-message-text p:last-child {
  margin: 0;
}
.ai-message-text pre {
  background: var(--ui-bg, #131218);
  padding: 8px;
  border-radius: var(--ui-radius-sm, 4px);
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--ui-border, #2A2932);
}
.ai-message-text code {
  font-family: var(--font-mono);
  font-size: 12px;
}
.ai-message-text ul {
  margin: 8px 0;
  padding-left: 20px;
}

/* The spacing to the blocks before and after is left to the bubble's gap, and these items carry no margin of their own */
.ai-message-error {
  color: var(--ui-danger, #f87171);
  font-size: 12px;
}

/* Explanation of an abnormal ending: a notice rather than an error, so the danger color is not used */
.ai-message-outcome {
  padding: 8px;
  border-left: 2px solid var(--ui-border-strong, #3A3944);
  background: var(--ui-panel-2, #2C2B34);
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: var(--ui-fg-muted, #A6A4B2);
  overflow-wrap: anywhere;
}

/* ── Message fragments ───────────────────────────────────────── */
/* In detailed mode, text and tools appear interleaved, and the breathing space between pieces is also the bubble's gap, so no extra margin is added here */
.ai-message-attach {
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
}

/* ── Markdown inside model replies ───────────────────────────── */
.ai-message-text h1,
.ai-message-text h2,
.ai-message-text h3,
.ai-message-text h4 {
  margin: 10px 0 6px;
  line-height: 1.35;
  font-weight: 600;
}
.ai-message-text h1 { font-size: 16px; }
.ai-message-text h2 { font-size: 15px; }
.ai-message-text h3 { font-size: 14px; }
.ai-message-text h4 { font-size: 13px; }
/* The first and last blocks carry no margin, so the padding on all four sides of the bubble is equal; list items and display formulas one level deeper are cleared as well */
.ai-message-text > :first-child { margin-top: 0; }
.ai-message-text > :last-child { margin-bottom: 0; }
.ai-message-text > :first-child > li:first-child,
.ai-message-text > :first-child > .katex-display:first-child { margin-top: 0; }
.ai-message-text > :last-child > li:last-child,
.ai-message-text > :last-child > .katex-display:last-child { margin-bottom: 0; }

.ai-message-text ol {
  margin: 8px 0;
  padding-left: 20px;
}
.ai-message-text li { margin: 2px 0; }
.ai-message-text li > p { margin: 0; }
/* Task lists (- [ ] / - [x]) get no bullets */
.ai-message-text li.task-list-item { list-style: none; margin-left: -16px; }
.ai-message-text li.task-list-item input { margin-right: 6px; }

.ai-message-text blockquote {
  margin: 8px 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid var(--ui-border-strong, #3A3944);
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-message-text hr {
  border: 0;
  border-top: 1px solid var(--ui-border, #2A2932);
  margin: 10px 0;
}
.ai-message-text a {
  color: var(--ui-accent, #00DBDB);
  overflow-wrap: anywhere;
}

/* Tables: scroll horizontally on their own, without stretching the panel wider */
.md-table-wrap {
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-sm, 4px);
}
.md-table-wrap table {
  border-collapse: collapse;
  font-size: 12px;
  width: max-content;
  min-width: 100%;
}
.md-table-wrap th,
.md-table-wrap td {
  border-bottom: 1px solid var(--ui-border, #2A2932);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.md-table-wrap th {
  background: var(--ui-bg, #131218);
  font-weight: 600;
}
.md-table-wrap tr:last-child td { border-bottom: 0; }

/* Formulas: a display formula scrolls horizontally when too wide; inherits the panel text color */
.ai-message-text .katex { font-size: 1.02em; }
.ai-message-text .katex-display {
  margin: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}
/* When a formula is wrong, KaTeX shows the raw expression in red; do not let it blur into a mess */
.ai-message-text .katex-error {
  color: var(--ui-danger, #f87171);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

/* ── Input area: takes 1/3 of the panel height ───────────────────────────────────── */
/*
 * It takes a fixed one third instead of growing with the content: long prompts are the norm, and an input box that keeps growing would squeeze out the message area,
 * so the user could no longer see the reply above while writing. When there is more text it scrolls inside the input box.
 *
 * Made as a standalone rounded input box: 10px from the panel edge on every side, with the input, attachments and the bottom toolbar all contained in the box,
 * so it is clearly separate from the message area above and you can tell at a glance "this is where I write". After subtracting the margins, the height is still one third.
 * overflow:hidden is not set: the "✦" and "⋯" popovers pop up from the toolbar, and clipping them would hide them.
 */
.ai-composer {
  /* Positioning reference for the top-right drag handle (.ai-composer-grip); popovers still use the toolbar as their reference and are unaffected */
  position: relative;
  flex: 0 0 calc(33.333% - 10px);
  min-height: 140px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0 10px 10px;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-xl, 10px);
  /*
   * Filled with L3 (--ui-panel-2). It used to be L2, only one level from the surrounding card background L1, so on dark skins it was hard to tell this was a filled box;
   * On light skins L2 is pure white and L3 is light gray, and L3 placed on L1 still reads as "this is the input box".
   * The input, attachment row and toolbar inside the box paint no background, so the whole block has just this one color;
   * Dropdowns, attachment cards and button hovers use L4 (--ui-float) instead, which still stands out on this background.
   */
  background: var(--ui-panel-2, #2C2B34);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
/* On light skins the L3 light gray looks dull, so use L2 pure white instead, the same color as the selected rail item and the selected cell of the mode switch */
[data-skin-mode="light"] .ai-composer {
  background: var(--ui-panel, #FFFFFF);
}

/* Attachment cards sit at the very top; beyond a certain amount they scroll on their own, so they do not squeeze out the input box. Room is left on the right for the drag handle */
.ai-attachments {
  flex: 0 0 auto;
  max-height: 40%;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 26px 0 12px;
}
.ai-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 4px 2px 8px;
  border-radius: var(--ui-radius-sm, 4px);
  border: 1px solid var(--ui-border, #2A2932);
  background: var(--ui-float, #34333D);
  color: var(--ui-fg, #F2F1F6);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.ai-attachment-name {
  min-width: 0;
}
.ai-attachment-remove {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  background: transparent;
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 11px;
  cursor: pointer;
}
.ai-attachment-remove:hover {
  color: var(--ui-danger, #f87171);
}

/* ── Importing / failed states of AI attachment cards ────────────────────────── */
.ai-attachment-chip.is-importing {
  opacity: 0.7;
}
.ai-attachment-chip.is-error {
  border-color: var(--ui-danger, #f87171);
  color: var(--ui-danger, #f87171);
  cursor: pointer;
}

/* The input fills the middle: it does not auto-grow, and overflow scrolls inside */
.ai-composer-input {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  /* 12px more room on the right: the first line of text and the placeholder hint do not slip under the drag handle at the top right */
  padding: 12px 26px 6px 14px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
}
.ai-composer-input::placeholder {
  color: var(--ui-fg-faint, #6E6C7A);
}
.ai-composer-input:disabled {
  opacity: 0.6;
}
/* The skin's scrollbar is 12px wide and sits against the right side of the input: the scroll track starts below the drag handle, so the top of the thumb is not covered by the handle and can still be clicked */
.ai-composer-input::-webkit-scrollbar-track {
  margin-top: 20px;
}

/*
 * The drag handle at the top right (ComposerGrip in Composer.tsx): 14px square, 6px from the top and right edges of the box, drawn as a "⌝".
 * Muted normally, brightened on hover and while dragging; the cursor is a vertical double arrow. The class name has no -btn, so it does not pick up the hover brighten / press shrink that the skin adds to buttons.
 */
.ai-composer-grip {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--ui-fg-faint, #6E6C7A);
  cursor: ns-resize;
  touch-action: none;
  transition: color 120ms ease;
}
.ai-composer-grip svg {
  display: block;
  pointer-events: none;
}
.ai-composer-grip:hover,
.ai-composer-grip.is-dragging {
  color: var(--ui-fg, #F2F1F6);
}
/* The input itself has no outline; on focus the whole rounded box switches to an accent-color outline + a faint glow, so you know the cursor is here */
.ai-composer:focus-within {
  border-color: var(--ui-accent, #00DBDB);
  box-shadow: 0 0 0 3px var(--ui-accent-soft, rgb(0 219 219 / 0.18));
}
/* The --ui-accent-soft of light skins is close to white, and the outer glow would look like the background spilling over the border; keep only the accent-color outline */
[data-skin-mode="light"] .ai-composer:focus-within {
  box-shadow: none;
}
/*
 * The skin (motion.css) gives every focused textarea an outline and a glow; here the input sits inside a rounded box,
 * and focus is shown by the whole outer box; another glow inside would draw a horizontal line above the toolbar.
 */
[data-skin] .ai-composer-input:focus {
  border-color: transparent;
  box-shadow: none;
}

/* Bottom 36px toolbar: a group of tools on the left, send / stop on the right. Popovers use it as their positioning reference */
.ai-composer-bar {
  position: relative;
  flex: 0 0 36px;
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 6px;
  min-width: 0;
}
.ai-composer-tools {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.ai-composer-bar .ai-bar-btn {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--ui-fg-muted, #A6A4B2);
}
/*
 * Hover / popover open: L4 background. The input box itself is already L3, and using L3 again would not be visible.
 * An extra .ai-composer is prefixed: its specificity beats the L3 hover of .pc-icon-btn in studio.css, regardless of stylesheet load order
 */
.ai-composer .ai-composer-bar .ai-bar-btn:hover:not(:disabled),
.ai-composer .ai-composer-bar .ai-bar-btn[aria-expanded="true"] {
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-float, #34333D);
}
.ai-composer-bar .ai-bar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.ai-spark-btn {
  font-size: 15px;
  line-height: 1;
}
/* The collapsed items contain non-default settings (split-work mode on, deep autonomy on…): a dot at the top right of the button */
.ai-bar-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-accent, #00DBDB);
}
/* Compact dropdowns for driver / model: in a narrow panel they shrink first with the text ellipsized, while the buttons and the send key stay put */
.ai-bar-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 112px;
  height: 26px;
  margin-left: 2px;
  padding: 0 4px;
  font: inherit;
  font-size: 12px;
  color: var(--ui-fg, #F2F1F6);
  /* L4: the input box background is L3, and the dropdown has to be one level brighter than that to read as a control. A solid background also ensures the expanded option list does not fall back to white */
  background: var(--ui-float, #34333D);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-sm, 4px);
  text-overflow: ellipsis;
  cursor: pointer;
}
.ai-bar-select:disabled {
  opacity: 0.5;
  cursor: default;
}
/*
 * While running, the right side has to hold the "Add to queue" and "■ Stop" buttons, and in a narrow panel the driver / model dropdowns would be squeezed down to a single letter;
 * the driver and model should not be changed while this round is running anyway (the model group is already disabled), so they are simply hidden first and reappear when it finishes.
 */
.ai-composer.is-streaming .ai-bar-select,
.ai-composer.is-streaming .ai-composer-tools > :not(.ai-bar-btn):not(.ai-pop-anchor) {
  display: none;
}
.ai-composer-bar .ai-bar-btn:focus-visible,
.ai-bar-select:focus-visible,
.ai-composer-bar .ai-send-btn:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* Send: a small primary button; while running it becomes a neutral-colored "■ Stop", so that "stop" does not look like "send again" */
.ai-composer-bar .ai-send-btn {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}
.ai-composer-bar .ai-send-btn:hover {
  filter: brightness(1.1);
}
.ai-composer-bar .ai-send-btn.is-stop {
  /* L4: so it still reads as a button on the L3 input box background */
  background: var(--ui-float, #34333D);
  color: var(--ui-fg, #F2F1F6);
  box-shadow: inset 0 0 0 1px var(--ui-border-strong, #3A3944);
}

/* ── Popovers on the toolbar ("✦" menu, "⋯" run options)────────────────────── */
/* Pops up from the toolbar and lands above the input box / message area; it is still inside the right rail card and is not clipped by the card */
.ai-pop {
  position: absolute;
  z-index: 30;
  left: 8px;
  bottom: calc(100% + 2px);
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--ui-float, #34333D);
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-lg, 8px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}
.ai-menu {
  min-width: 180px;
}
.ai-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 4px;
  border: 0;
  border-radius: var(--ui-radius, 6px);
  background: transparent;
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.ai-menu-item:hover:not(:disabled),
.ai-menu-item:focus-visible {
  outline: none;
  background: var(--ui-panel-2, #2C2B34);
}
.ai-menu-item:disabled {
  color: var(--ui-fg-faint, #6E6C7A);
  cursor: default;
}
/* A fixed-width icon slot on the left (checkmark, diagnostics, new), so the text lines up */
.ai-menu-icon {
  flex: 0 0 18px;
  text-align: center;
  color: var(--ui-accent, #00DBDB);
}
.ai-menu-sep {
  height: 1px;
  margin: 4px 2px;
  background: var(--ui-border, #2A2932);
}
/*
 * The cut tab bar above the timeline (CutTabBar in CutTabs.tsx) and the cut segments on the timeline (data-pc-cut-segment in ClipView).
 * Everything goes through --ui-* variables, so dark and light skins both follow.
 */
.pc-tl-cuts {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 30px;
  padding: 0 8px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-bg, #111016);
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.pc-tl-cut {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 200px;
  margin-top: 4px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 11.5px;
}
.pc-tl-cut:hover {
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 6%, transparent);
}
.pc-tl-cut.is-on {
  background: var(--ui-panel-2, #2C2B34);
  border-color: var(--ui-border, #3a3946);
  color: var(--ui-fg, #F2F1F6);
  box-shadow: inset 0 2px 0 var(--ui-accent, #00DBDB);
}

.pc-tl-cut-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
  padding: 0 4px 0 10px;
  cursor: pointer;
  user-select: none;
}
.pc-tl-cut-main:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
  border-radius: 4px;
}
.pc-tl-cut-glyph {
  display: grid;
  place-items: center;
  color: inherit;
  opacity: 0.8;
}
.pc-tl-cut.is-on .pc-tl-cut-glyph {
  color: var(--ui-accent, #00DBDB);
  opacity: 1;
}
.pc-tl-cut-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-tl-cut-input {
  width: 96px;
  box-sizing: border-box;
  padding: 0 4px;
  border: 0;
  border-radius: 3px;
  outline: 1px solid var(--ui-accent, #00DBDB);
  background: var(--ui-bg, #111016);
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  line-height: 18px;
}

.pc-tl-cut-x {
  width: 18px;
  height: 18px;
  margin: 0 4px 0 2px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.pc-tl-cut-x:hover {
  opacity: 1;
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 12%, transparent);
}
/* Last tab: do not draw the "×", just leave an empty slot of the same width (the title tooltip says why) */
.pc-tl-cut-x.is-off {
  cursor: default;
  opacity: 0;
}

.pc-tl-cut-add {
  align-self: center;
  width: 24px;
  height: 22px;
  margin-left: 4px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ui-fg-muted, #A6A4B2);
  cursor: pointer;
}
.pc-tl-cut-add:hover {
  color: var(--ui-fg, #F2F1F6);
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 8%, transparent);
}

/* Cut segments on the timeline: two rows of film sprocket holes, top and bottom, to tell them apart from media clips at a glance.
   The sprocket holes are drawn only inside the body cell (.pc-clip-body) and do not cross the overlay band above:
   if they crossed it, the band itself would become a dashed line and no longer line up with the other clips in the same row (spotted by the user, 2026-10-24).
   The base color is still painted by .pc-clip in skins.css; the whole background property is no longer rewritten here. */
.pc-clip[data-pc-cut-segment] .pc-clip-body {
  background:
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--clip-ink, #000) 40%, transparent) 0 4px, transparent 4px 9px) 0 2px / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--clip-ink, #000) 40%, transparent) 0 4px, transparent 4px 9px) 0 calc(100% - 2px) / 100% 3px no-repeat;
}
/* The referenced cut was shortened afterwards: the part beyond its total duration is transparent and silent, marked with diagonal stripes */
.pc-clip-cut-over {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0 4px, transparent 4px 8px);
}

/* Cells of the media library's "Cut" group */
/*
 * The name and duration are pinned to the bottom edge (same position and same starting font size as the title bar of video and image cells), and are not squeezed by the cell height:
 * the thumbnail in the overview group box is only about 95×53 pixels; the name used to be laid out in the upper half and got squeezed to 1 pixel high by flex, almost invisible (measured online, 2026-10-20).
 */
.pc-lib-cut {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  padding: 8px 8px 9px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--ui-border, #3a3946);
  background:
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--ui-fg, #F2F1F6) 14%, transparent) 0 5px, transparent 5px 11px) 0 4px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--ui-fg, #F2F1F6) 14%, transparent) 0 5px, transparent 5px 11px) 0 calc(100% - 4px) / 100% 4px no-repeat,
    var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  cursor: grab;
  position: relative;
  text-align: left;
  font: inherit;
}
.pc-lib-cut.is-on {
  border-color: var(--ui-accent, #00DBDB);
  box-shadow: inset 0 0 0 1px var(--ui-accent, #00DBDB);
}
.pc-lib-cut-name {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 17px;
  font-weight: 600;
  color: var(--ui-fg, #F2F1F6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-lib-cut-meta {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 14px;
  color: var(--ui-fg-muted, #A6A4B2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-lib-cut-acts {
  position: absolute;
  top: 10px;
  right: 6px;
  display: none;
  gap: 2px;
}
.pc-lib-cut:hover .pc-lib-cut-acts,
.pc-lib-cut:focus-within .pc-lib-cut-acts {
  display: flex;
}
.pc-lib-cut-act {
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: color-mix(in oklab, var(--ui-bg, #111016) 70%, transparent);
  color: var(--ui-fg, #F2F1F6);
  cursor: pointer;
  font-size: 12px;
}
.pc-lib-cut-act:hover {
  background: var(--ui-accent-soft, rgba(0, 219, 219, 0.2));
}
.pc-lib-cut-act:disabled {
  opacity: 0.35;
  cursor: default;
}
.pc-lib-cut-new {
  margin: 0 0 8px;
}

.pc-tl-cut-kind {
  flex: none;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.03em;
  color: var(--ui-fg-muted, #A6A4B2);
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 8%, transparent);
}
.pc-tl-cut-kind.is-3d {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.32);
}

.pc-tl-cut-add-kind {
  align-self: center;
  height: 22px;
  padding: 0 6px;
  margin-left: 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.pc-tl-cut-add-kind:hover:not(:disabled) {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}
.pc-tl-cut-add-kind:disabled {
  opacity: 0.4;
  cursor: default;
}

.pc-tl-cut-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  flex-shrink: 0;
}
.pc-tl-cut-mode-btn {
  height: 21px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--ui-border, #3a3946);
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 5%, transparent);
  color: var(--ui-fg-muted, #A6A4B2);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pc-tl-cut-mode-btn:hover:not(:disabled) {
  color: var(--ui-fg, #F2F1F6);
  background: color-mix(in oklab, var(--ui-fg, #F2F1F6) 11%, transparent);
}
.pc-tl-cut-mode-btn.is-3d {
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
}
.pc-tl-cut-mode-btn.is-3d:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
}
.pc-tl-cut-mode-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.pc-tl-cut-notice {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: #fb7185;
  cursor: pointer;
}
/* Node pipeline page: placed in the left rail's "Edit" section, background left to the drawer card, node cards use the panel level, active connection lines / nodes use the accent color */
.pc-node-page { position: relative; flex: 1; min-height: 0; height: 100%; overflow: auto; background: transparent; color: var(--ui-fg, #e5e7eb); }
.pc-node-help { position: sticky; top: 0; left: 0; z-index: 3; padding: 8px 12px; font-size: 11px; color: var(--ui-fg-muted, #94a3b8); background: var(--ui-bg-2, #0a0d12); border-bottom: 1px solid var(--ui-border, #1f2937); }
.pc-node-canvas { position: relative; padding: 1px; }
.pc-node-edges { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.pc-node-edges path { fill: none; stroke: var(--ui-border-strong, #334155); stroke-width: 2; opacity: .9; transition: stroke .15s, filter .15s; }
.pc-node-edges path.is-hot { stroke: var(--ui-accent, #22d3ee); filter: drop-shadow(0 0 4px var(--ui-accent-soft, rgba(34, 211, 238, .45))); stroke-width: 3; }
.pc-node-card { position: absolute; box-sizing: border-box; border: 1px solid var(--ui-border, #334155); border-radius: var(--ui-radius-lg, 8px); padding: 12px 16px; background: var(--ui-panel, #111827); transition: border-color .15s, box-shadow .15s; }
.pc-node-card.is-active { border-color: var(--ui-accent, #22d3ee); box-shadow: 0 0 0 1px var(--ui-accent, #22d3ee); }
.pc-node-card.pc-node-out { background: var(--ui-panel-2, #172033); border-color: var(--ui-border-strong, #64748b); border-radius: var(--ui-radius, 6px); }
.pc-node-kind { font-size: 10px; color: var(--ui-fg-muted, #94a3b8); }
.pc-node-label { margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ui-fg, #e5e7eb); }
.pc-node-port { position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ui-border-strong, #64748b); border: 2px solid var(--ui-bg-2, #0a0d12); }
.pc-node-card.is-active .pc-node-port { background: var(--ui-accent, #22d3ee); }
.pc-node-port.in { left: -6px; }
.pc-node-port.out { right: -6px; }
.pc-node-outbar { position: sticky; bottom: 0; left: 0; display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--ui-panel, #111827); border-top: 1px solid var(--ui-border, #334155); font-size: 11px; }
.pc-node-outbar span { font-weight: 700; color: var(--ui-accent, #22d3ee); }
.pc-node-outbar input { flex: 1; accent-color: var(--ui-accent, #22d3ee); }
/*
 * The container of one assistant tab. Only container-level rules are kept here: top to bottom, top bar → login banner → message area → thinking strip → queue → input area,
 * filling the whole card vertically. Each block's own styles are in chat/chat.css (layout, header, bubble, input area) and
 * chat/agent.css (tool squares, step bar, thinking block, tool details).
 */
.ai-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
/* The AI panel for the "Cloud" connection type (CloudAiPanel.tsx): just two extra lines of small text, everything else reuses the styles of the local AI panel */
.pc-cloud-note {
  flex: 0 0 auto;
  padding: 2px 12px 4px;
  font-size: 11px;
  color: var(--ink-muted);
  text-align: left;
}
.pc-cloud-reconnect { font-size: 12px; line-height: 1.5; }
.pc-cloud-sender { font-size: 12px; color: var(--muted, #90949d); margin: 0 8px; }

.pc-cloud-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 4px 12px;
  color: var(--ink-muted);
  font-size: 12px;
}
.pc-cloud-access-label { color: var(--ink-muted); }
.pc-cloud-control-btn {
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--ink);
  background: var(--fill, rgba(255,255,255,.04));
  cursor: pointer;
}
.pc-cloud-control-btn:hover:not(:disabled) { background: var(--fill-hover, rgba(255,255,255,.09)); }
.pc-cloud-control-btn:disabled { opacity: .55; cursor: default; }
.pc-cloud-control-note { flex-basis: 100%; line-height: 1.45; }
.pc-cloud-readonly {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--ink-muted);
  font-size: 12px;
}
@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/editor/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/editor/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/editor/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/editor/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/editor/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/editor/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/editor/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/editor/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/editor/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/editor/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/editor/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/editor/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/editor/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/editor/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/editor/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/editor/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/editor/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/editor/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/editor/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/editor/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/editor/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/editor/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/editor/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/editor/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/editor/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/editor/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/editor/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/editor/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/editor/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/editor/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/editor/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/editor/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/editor/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/editor/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/editor/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/editor/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/editor/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/editor/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/editor/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/editor/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/editor/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/editor/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/editor/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/editor/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/editor/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/editor/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/editor/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/editor/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/editor/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/editor/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.18.6"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
/* Make sure the parent panel has a positioning context */
.ai-panel {
  position: relative;
}

/* Drawer container: absolutely positioned over the AI panel, supporting a smooth slide-in */
.chat-history-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  animation: chat-drawer-slide-in 0.2s ease-out;
}

@keyframes chat-drawer-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-history-drawer {
    animation: none;
  }
}

/* Top title row and close button */
.chat-drawer-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-panel);
}

.chat-drawer-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.chat-drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* "New chat": the most frequently clicked item in the drawer, an accent-color small button */
.chat-drawer-new-btn {
  height: 28px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-accent-grad, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
  cursor: pointer;
  white-space: nowrap;
}
.chat-drawer-new-btn:hover {
  filter: brightness(1.1);
}
.chat-drawer-new-btn:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}
.chat-drawer-new-btn:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

.chat-drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-drawer-close-btn:hover {
  background: var(--fill-hover);
  color: var(--ink);
}

/* Search bar */
.chat-drawer-search-wrap {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-panel);
}

.chat-drawer-search-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg-canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: inherit;
  outline: none;
}

.chat-drawer-search-input:focus {
  border-color: var(--accent);
}

/* Session list area */
.chat-drawer-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Empty state and loading text */
.chat-drawer-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}

/* A single session item */
.chat-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--bg-canvas);
  transition: background 0.15s ease;
}

.chat-drawer-item:hover {
  background: var(--fill-hover);
}

/* Highlight for the currently selected session item */
.chat-drawer-item.is-current {
  background: var(--fill-subtle);
  border-color: var(--accent);
}

.chat-drawer-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Title truncated to one line */
.chat-drawer-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time and message count fields */
.chat-drawer-item-meta {
  font-size: 11px;
  color: var(--ink-muted);
}

/* Delete button */
.chat-drawer-delete-btn {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  padding: 0;
}

.chat-drawer-delete-btn:hover {
  background: var(--fill-hover);
  color: var(--danger);
}

/* The "Cloud" group (contract 7.4): a separate group after the local chats, and running chats carry "In progress" */
.chat-drawer-group { margin-top: 6px; border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08)); }
.chat-drawer-group-title { padding: 8px 12px 4px; font-size: 11px; letter-spacing: 0.04em; color: var(--ink-muted); }
.chat-drawer-item[data-state="running"] .chat-drawer-item-meta { color: var(--accent, #5aa9ff); }
.chat-drawer-item[data-state="interrupted"] .chat-drawer-item-meta,
.chat-drawer-item[data-state="failed"] .chat-drawer-item-meta,
.chat-drawer-item[data-state="revoked"] .chat-drawer-item-meta { color: var(--danger, #e5534b); }

/* Cloud group: limit-reached notice */
.chat-drawer-limit {
  padding: 6px 10px;
  margin-bottom: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--fill-subtle);
  border: 1px solid var(--accent);
  border-radius: 6px;
}
/*
 * The input queue (QueueList) and the "Roll back to here" on user bubbles (UserBubble).
 * Colors and corner radii always go through --ui-* variables with fallback values; icon buttons and primary buttons reuse .pc-icon-btn / .pc-btn-primary from studio.css.
 */

/* ── Input queue: between the thinking strip and the input area, at most 30% of the panel height, and it scrolls inside when longer ─────── */
.ai-queue {
  flex: 0 0 auto;
  max-height: 30%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ui-border, #2A2932);
  background: var(--ui-bg-2, #1B1A21);
}

/* Header row of muted text; when paused the text color is raised one level, with a "Resume" on the right */
.ai-queue-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 12px;
  box-sizing: border-box;
  font-size: 11px;
  color: var(--ui-fg-faint, #6E6C7A);
}
.ai-queue-head.is-paused {
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-queue-head-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-queue-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 0 8px 6px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* One row per entry: sequence number, single-line ellipsized text, attachment count, insert / edit / × */
.ai-queue-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 30px;
  /* Equal on all four sides: 22px inline buttons with 4px above and below, exactly 30px tall */
  padding: 4px;
  box-sizing: border-box;
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel, #23222A);
  color: var(--ui-fg, #F2F1F6);
  font-size: 12px;
}
.ai-queue-no {
  flex: 0 0 auto;
  min-width: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--ui-fg-faint, #6E6C7A);
  font-variant-numeric: tabular-nums;
}
.ai-queue-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-queue-text.is-faint {
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-queue-files {
  flex: 0 0 auto;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-panel-2, #2C2B34);
  font-size: 11px;
  color: var(--ui-fg-muted, #A6A4B2);
  white-space: nowrap;
}

/* Small inline buttons: transparent and muted by default; "Insert", "Resume" and "Replace" use the accent color */
.ai-queue-btn {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--ui-radius-sm, 4px);
  background: transparent;
  color: var(--ui-fg-muted, #A6A4B2);
  font: inherit;
  font-size: 11px;
  line-height: 22px;
  white-space: nowrap;
  cursor: pointer;
}
.ai-queue-btn:hover:not(:disabled) {
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
}
.ai-queue-btn.is-accent {
  background: var(--ui-accent-grad, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
}
.ai-queue-btn.is-accent:hover:not(:disabled) {
  background: var(--ui-accent-grad-hover, #9571FF);
  color: var(--ui-accent-fg, #ffffff);
}
.ai-queue-x {
  width: 22px;
  padding: 0;
  font-size: 13px;
}
.ai-queue-x:hover:not(:disabled) {
  color: var(--ui-danger, #f87171);
}
.ai-queue-btn:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* ── User bubble: small toolbar that appears on hover + inline confirmation layer ───────────────────────── */
/*
 * The confirmation layer sits in the document flow below the bubble instead of being an absolutely positioned popover: .ai-row has content-visibility:auto,
 * which brings its own paint clipping, so any part that floats out of the row box would be clipped.
 */
.ai-user-turn {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.ai-user-line {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
}
.ai-user-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.ai-row--user:hover .ai-user-tools,
.ai-user-tools:focus-within,
.ai-user-tools.is-open {
  opacity: 1;
}
.ai-user-tools .pc-icon-btn {
  width: 26px;
  height: 26px;
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-user-tools .pc-icon-btn:hover:not(:disabled),
.ai-user-tools .pc-icon-btn[aria-expanded="true"] {
  color: var(--ui-fg, #F2F1F6);
}

.ai-rewind-confirm {
  max-width: 85%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-float, #34333D);
  color: var(--ui-fg, #F2F1F6);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ai-rewind-confirm p {
  margin: 0;
}
.ai-rewind-confirm strong {
  font-weight: 600;
}
.ai-rewind-note {
  color: var(--ui-fg-muted, #A6A4B2);
}
.ai-rewind-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.ai-rewind-actions .pc-btn-primary {
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
}
.ai-rewind-cancel {
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: var(--ui-radius, 6px);
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ai-rewind-cancel:hover {
  background: var(--ui-float, #34333D);
}
.ai-rewind-cancel:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

@media (prefers-reduced-motion: reduce) {
  .ai-user-tools { transition: none; }
}

/*
 * Queue enter/exit (QueueList.tsx): a newly queued row gets pc-enter-fade, and when the queue goes from empty to non-empty the whole block gets pc-enter-rise (skins/motion.css);
 * a row that was sent / deleted / taken away for editing leaves a ghost row in place (.is-leaving), which fades out and collapses its height;
 * when the queue is emptied the header collapses too. The duration matches LEAVE_MS (160) in QueueList.
 */
.ai-queue-item.is-leaving,
.ai-queue-head.is-leaving {
  overflow: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes ai-queue-row-leave {
    from { height: 30px; min-height: 30px; opacity: 1; }
    to { height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
  }
  @keyframes ai-queue-head-leave {
    from { height: 28px; min-height: 28px; opacity: 1; }
    to { height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
  }
  .ai-queue-item.is-leaving {
    animation: ai-queue-row-leave 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .ai-queue-head.is-leaving {
    animation: ai-queue-head-leave 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
/*
 * Contents of the "⋯" run options popover: thinking effort dropdown + three switches.
 * The popover's own positioning, background and outline are in .ai-pop of chat/chat.css; the model dropdown on the toolbar uses .ai-bar-select.
 */
.ai-pop.ai-modelbar {
  width: 236px;
  gap: 10px;
  padding: 10px;
}
.ai-modelbar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ai-modelbar-label {
  font-size: 12px;
  color: var(--ui-fg-muted, #A6A4B2);
  white-space: nowrap;
}
.ai-modelbar-select {
  font-family: inherit;
  font-size: 12px;
  height: 28px;
  min-width: 0;
  max-width: 140px;
  padding: 0 4px;
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg, #F2F1F6);
  cursor: pointer;
}
.ai-modelbar-select:disabled {
  opacity: 0.5;
  cursor: default;
}

/* If the three switches do not fit in one row they wrap, and the switches themselves are not compressed */
.ai-modelbar-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* A switch is not a dropdown: when on, the whole block lights up, so you can tell at a glance that this run is in fast mode / deep autonomy */
.ai-modelbar-fast {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--ui-border-strong, #3A3944);
  border-radius: 999px;
  background: var(--ui-panel-2, #2C2B34);
  color: var(--ui-fg-muted, #A6A4B2);
  cursor: pointer;
  white-space: nowrap;
}
.ai-modelbar-fast:hover:not(:disabled) {
  color: var(--ui-fg, #F2F1F6);
}
.ai-modelbar-fast.is-on {
  background: var(--ui-accent, #00DBDB);
  border-color: var(--ui-accent, #00DBDB);
  color: var(--ui-accent-fg, #ffffff);
}
.ai-modelbar-fast:disabled {
  opacity: 0.4;
  cursor: default;
}
.ai-modelbar-fast:focus-visible,
.ai-modelbar-select:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}
/*
 * AI panel start page (StartHero.tsx). Dark, with a cyan-blue accent color, using the same set of variables as the input box and example sentences in chat.css.
 * There are only three animations: the light dot breathing, the arrow pointing at the input box sinking gently, and the outline pulse of the input box / send button;
 * Under prefers-reduced-motion all of them are turned off, leaving only a static outline.
 */
.pc-start {
  align-items: center;
  /* When the content is taller than the message area it is laid out from the top and can scroll; justify-content:center is not used (the top part would be clipped and unreachable by scrolling) */
  justify-content: flex-start;
  text-align: center;
  gap: 6px;
  padding: 12px 16px;
}
.pc-start > :first-child { margin-top: auto; }
.pc-start > :last-child { margin-bottom: auto; }
.pc-start-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ui-fg, #F2F1F6);
}
.pc-start-hint {
  max-width: 300px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ui-fg-muted, #A6A4B2);
}
.pc-start-preset {
  width: 100%;
  max-width: 280px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ui-fg, #F2F1F6);
  background: var(--ui-panel, #23222A);
  border: 1px solid var(--ui-border, #2A2932);
  border-radius: var(--ui-radius-lg, 8px);
  cursor: pointer;
}
.pc-start-preset:hover {
  background: var(--ui-panel-2, #2C2B34);
  border-color: var(--ui-accent, #00DBDB);
}
.pc-start-preset:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring, 0 0 0 2px #00DBDB);
}

/* Onboarding animation: light dot */
.pc-start-orb {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.pc-start-orb-core {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  color: var(--ui-accent-fg, #ffffff);
  background: var(--ui-accent-grad, var(--ui-accent, #00DBDB));
  animation: pc-start-breathe 2.8s ease-in-out infinite;
}
.pc-start-orb-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid var(--ui-accent, #00DBDB);
  opacity: 0;
  animation: pc-start-ripple 2.8s ease-out infinite;
}
.pc-start-orb-ring--2 { animation-delay: 1.4s; }
@keyframes pc-start-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes pc-start-ripple {
  0% { transform: scale(0.8); opacity: 0.55; }
  100% { transform: scale(1.6); opacity: 0; }
}
/* Arrow pointing at the input box */
.pc-start-cue {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1;
  color: var(--ui-accent, #00DBDB);
  animation: pc-start-nudge 1.6s ease-in-out infinite;
}
@keyframes pc-start-nudge {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* Guidance for the input box / send button: only on the start page (the guide property of Composer) */
.ai-composer.is-guide-input {
  border-color: var(--ui-accent, #00DBDB);
  animation: pc-guide-glow 2.2s ease-in-out infinite;
}
@keyframes pc-guide-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--ui-accent, #00DBDB) 35%, transparent); }
}
.ai-composer.is-guide-send .ai-send-btn[data-pc="ai-send"] {
  animation: pc-guide-flash 1.1s ease-in-out infinite;
}
@keyframes pc-guide-flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; filter: none; }
  50% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--ui-accent, #00DBDB) 45%, transparent); filter: brightness(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .pc-start-orb-core,
  .pc-start-orb-ring,
  .pc-start-cue,
  .ai-composer.is-guide-input,
  .ai-composer.is-guide-send .ai-send-btn[data-pc="ai-send"] {
    animation: none;
  }
  .pc-start-orb-ring { opacity: 0; }
  .ai-composer.is-guide-send .ai-send-btn[data-pc="ai-send"] {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--ui-accent, #00DBDB) 45%, transparent);
  }
}
.stt-install {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--fill-subtle);
  font-size: 12px;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.stt-install.is-compact { padding: 10px; }
.stt-install.done { border-color: var(--accent); }
.stt-install.failed { border-color: var(--danger); }

.stt-install-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stt-install-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.stt-install-engine {
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--bg-canvas);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.stt-install-elapsed {
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.stt-install-icon { flex: 0 0 auto; width: 12px; text-align: center; }
.stt-install.done .stt-install-icon { color: var(--accent); }
.stt-install.failed .stt-install-icon { color: var(--danger); }

.stt-install-spin {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--hairline);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: stt-install-spin 0.7s linear infinite;
}
@keyframes stt-install-spin { to { transform: rotate(360deg); } }

/* Progress track. In the indeterminate state the highlight block takes only 30% of the width and sweeps back and forth, so it is easy to tell apart from the determinate state */
.stt-install-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-canvas);
  overflow: hidden;
}
.stt-install-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}
.stt-install-fill.is-indeterminate { width: 30%; }
.stt-install.done .stt-install-fill { width: 100%; background: var(--accent); }
.stt-install.failed .stt-install-fill { width: 100%; background: var(--danger); }

.stt-install-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink-muted);
}
.stt-install-sub { font-size: 11px; opacity: 0.85; font-variant-numeric: tabular-nums; }

.stt-install details { font-size: 11px; color: var(--ink-muted); }
.stt-install summary { cursor: pointer; }
.stt-install pre {
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 11px;
  background: var(--bg-canvas);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 6px;
  margin: 6px 0 0;
}

/* Animation preference: turn off the sweep and the spinner, a static display is enough */
@media (prefers-reduced-motion: reduce) {
  .stt-install-spin { animation: none; }
  .stt-install-fill.is-indeterminate { width: 100%; opacity: 0.4; }
}
/* Diagnostic report sub-window. It sits above the AI settings dialog (z-index 10000), so it needs to be one level higher. */
.rpt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10010;
  padding: 16px;
}

.rpt-dialog {
  background: var(--bg-panel);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 16px;
  width: 720px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rpt-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpt-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1 1 auto;
}

.rpt-x {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.rpt-x:hover { background: var(--fill-hover); color: var(--ink); }

.rpt-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-muted);
}
.rpt-hint { flex: 1 1 auto; }

/* The report itself. It fills the remaining height: the whole point of this window is to let people see the report,
   and if the textarea shrank to a sliver it would be no better than the old "blind send" button. */
.rpt-text {
  flex: 1 1 auto;
  min-height: 220px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 8px;
  resize: none;
  white-space: pre;
  overflow: auto;
}

.rpt-warn,
.rpt-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
  background: var(--fill-subtle);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 8px;
}

.rpt-msg {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.rpt-msg.is-err { color: var(--danger, #e5484d); }

.rpt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rpt-spacer { flex: 1 1 auto; }

.rpt-btn {
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--fill-subtle);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
}
.rpt-btn:hover:not(:disabled) { background: var(--fill-hover); }
.rpt-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.rpt-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.rpt-primary:hover:not(:disabled) { filter: brightness(1.1); }
.pc-cloud-consent-backdrop { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; background: rgba(0, 0, 0, .55); padding: 20px; }
.pc-cloud-consent-dialog { width: min(100%, 440px); padding: 24px; border-radius: 12px; background: var(--panel-bg, #24242a); color: var(--ink, #fff); box-shadow: 0 16px 48px rgba(0, 0, 0, .4); }
.pc-cloud-consent-dialog h2 { margin: 0 0 12px; font-size: 18px; }
.pc-cloud-consent-dialog p { margin: 0 0 18px; line-height: 1.6; }
.pc-cloud-consent-error { color: #ffb3b3; }
.pc-cloud-consent-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pc-cloud-consent-actions button { padding: 7px 14px; }
/* Start page "Voiceover" panel. Reuses the skin variables, with the same border and background color as the extension card */
.vs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
  font-size: 12px;
}

.vs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vs-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vs-title { font-size: 13px; font-weight: 600; }

/* Default service: a row of segmented buttons */
.vs-seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 7px; overflow: hidden; }
.vs-seg-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 5px 12px;
  border: 0;
  background: var(--fill-subtle);
  color: var(--ink-muted);
  cursor: pointer;
}
.vs-seg-btn + .vs-seg-btn { border-left: 1px solid var(--hairline); }
.vs-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.vs-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 16px;
}
.vs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vs-label { color: var(--ink-muted); }
.vs-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vs-grow { flex: 1 1 auto; min-width: 0; }
.vs-note { grid-column: 1 / -1; }

.vs-input {
  font-family: inherit;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--fill-subtle);
  color: var(--ink);
  min-width: 0;
  box-sizing: border-box;
}
.vs-input:focus-visible { outline: none; border-color: var(--accent); }
.vs-area { resize: vertical; line-height: 1.5; }
.vs-range { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.vs-num { width: 38px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-muted); }

.vs-try { display: flex; align-items: center; gap: 8px; }
.vs-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vs-audio { width: 100%; height: 32px; }

.vs-msg { padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.vs-msg.is-ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.vs-msg.is-err { color: var(--danger); border: 1px solid var(--danger); }

/* My voices / New voice */
.vs-sub { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.vs-sub-title { font-size: 12px; font-weight: 600; }
.vs-create > summary { cursor: pointer; list-style-position: inside; }
.vs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vs-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-item-name { font-weight: 600; }
.vs-item-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.vs-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-muted);
}
.vs-id {
  font-family: var(--font-mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  font-size: 11px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
.vs-add .vs-input:first-child { flex: 0 0 auto; }

.vs-fee { color: var(--ink-muted); }
.vs-create-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.vs-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--fill-subtle);
}
.vs-card .vs-input { background: var(--bg-panel); }
.vs-card-title { font-weight: 600; }
.vs-file { font-family: inherit; font-size: 12px; color: var(--ink-muted); }
.vs-check { display: flex; align-items: center; gap: 6px; }
.vs-check input { accent-color: var(--accent); }

/* When embedded in a sub-window, the window supplies the border and title */
.vs.is-bare { padding: 0; border: 0; border-radius: 0; background: transparent; }

/* ── "Voiceover settings" sub-window ─────────────────────────────── */
.vsd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgb(0 0 0 / 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
}
.vsd-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.45);
  color: var(--ink);
  font-family: var(--font-sans);
}
.vsd-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}
.vsd-title { font-size: 14px; font-weight: 600; }
.vsd-x {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--ink-muted);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.vsd-x:hover { border-color: var(--hairline); color: var(--ink); }
.vsd-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px 16px; }
.cl-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgb(0 0 0 / 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
}

.cl-dialog {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.45);
  color: var(--ink);
}

.cl-head { display: flex; align-items: center; justify-content: space-between; }
.cl-title { font-size: 14px; font-weight: 600; }
.cl-x {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--ink-muted);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.cl-x:hover { border-color: var(--hairline); color: var(--ink); }

.cl-hint { font-size: 12px; color: var(--ink-muted); line-height: 1.6; }
.cl-hint b { color: var(--ink); font-weight: 600; }

.cl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); }
.cl-tabs button {
  padding: 6px 10px; font-size: 12px; color: var(--ink-muted);
  background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer;
}
.cl-tabs button.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.cl-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0; }
.cl-qr-box {
  position: relative; width: 220px; height: 220px; border-radius: 8px; overflow: hidden;
  background: #fff; display: grid; place-items: center;
}
.cl-qr-box img { width: 220px; height: 220px; display: block; }
.cl-qr-box.is-dim img { opacity: 0.15; }
.cl-qr-ph { color: #999; font-size: 24px; }
.cl-qr-retry { position: absolute; }

.cl-status { font-size: 12px; color: var(--ink-muted); text-align: center; line-height: 1.6; }
.cl-status.is-scanned { color: var(--ink); }
.cl-status.is-ok { color: var(--ok, #6c6); }
.cl-status.is-expired, .cl-status.is-error { color: var(--danger, #e66); }
.cl-sub { color: var(--ink-faint); font-size: 11px; }

.cl-browser { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 0; }

/* Desktop shell mode: the site login page (a child webview) is placed over this hole; the login page needs to be wider to be usable, so the box is enlarged accordingly */
.cl-shell-hole { width: 100%; height: 560px; background: #fff; border-radius: 6px; }
.cl-dialog:has(.cl-shell-hole) { width: min(960px, 100%); }

.cl-done { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cl-check {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(80 200 120 / 0.15); color: var(--ok, #6c6); font-size: 18px; flex: none;
}
.cl-done-line { font-size: 13px; font-weight: 600; }
.cl-done-sub { font-size: 12px; color: var(--ink-muted); }
.cl-done .cl-btn { margin-left: auto; }

.cl-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cl-btn {
  padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--hairline-strong); background: var(--bg-canvas); color: var(--ink);
}
.cl-btn:hover { border-color: var(--ink-muted); }
.cl-btn:disabled { opacity: 0.5; cursor: default; }
.cl-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--bg-canvas, #111); font-weight: 600; }
/* "Browser" panel: covers the entire editing area below the top bar, it is not a popup: the top bar stays clickable as usual, and clicking a tab switches back */
.abf-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* top is computed by the component from the bottom edge of the top bar */
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-top: 1px solid var(--hairline);
  color: var(--ink);
}

.abf-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title btn" "hint btn";
  gap: 2px 12px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--hairline);
}
.abf-title { grid-area: title; font-size: 13px; font-weight: 600; }
.abf-hint { grid-area: hint; font-size: 12px; color: var(--ink-muted); }
.abf-btns { grid-area: btn; display: flex; gap: 8px; align-items: center; }
.abf-btn {
  padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer;
  background: var(--accent); border: 1px solid var(--accent); color: var(--bg-canvas, #111); font-weight: 600;
}
.abf-btn.is-ghost {
  background: var(--bg-canvas); border-color: var(--hairline-strong); color: var(--ink); font-weight: 500;
}
.abf-btn.is-ghost:hover { border-color: var(--ink-muted); }

/* The child webview is laid over this block; the blank area is only a placeholder, and its color is for the moment when "it is not in place yet" */
.abf-hole {
  flex: 1 1 auto;
  min-height: 200px;
  background: #fff;
}
.diagonal-stripes {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 10px,
    transparent 10px,
    transparent 20px
  );
}

/* Sound being off must be visible at a glance, not only via hover or the parameters panel. For extremely narrow clips the icon is drawn by ClipView outside the clipping box. */
.pc-clip.is-audio-muted { border-color: #f5bf4f !important; box-shadow: inset 0 -3px 0 #f5bf4f; }
.pc-clip-mute-badge { position: absolute; right: 3px; bottom: 3px; z-index: 25; display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; min-height: 16px; border: 1px solid #ffdd91; border-radius: 4px; color: #211503; background: #f5bf4f; font-size: 10px; line-height: 14px; font-weight: 700; pointer-events: none; white-space: nowrap; }
.pc-clip-mute-badge.is-compact { width: 18px; height: 16px; padding: 1px 2px; bottom: auto; justify-content: center; }
.pc-track-mute-summary { flex: none; border-radius: 3px; padding: 1px 3px; color: #211503; background: #f5bf4f; font-size: 9px; font-weight: 700; white-space: nowrap; }

/* ── The timeline's two scrollbars: the right vertical bar (native) and the bottom horizontal bar (Scrollbar.tsx) share one look ──────────
 * The visible parts are both 10px thick and fully rounded, with the same faint groove and the same thumb color; 2px is left outside each, taking up 14px.
 * The vertical bar is changed only inside the timeline; the global skin's 6px scrollbar (skins.css) is left alone.
 * The selector is prefixed with [data-pc="timeline"], whose specificity beats the global [data-skin] ::-webkit-scrollbar-*,
 * so it does not matter which of the two CSS files loads first. */
[data-pc="timeline"] {
  --pc-tl-sb-track: color-mix(in oklab, var(--ui-fg, #e5e5e5) 6%, transparent);
  --pc-tl-sb-thumb: var(--ui-scroll-thumb, #404040);
  --pc-tl-sb-thumb-hover: var(--ui-scroll-thumb-hover, #737373);
  /* Grip caps at both ends of the horizontal bar: mix in a bit of the foreground color, so they are brighter in dark skins and darker in light skins, in any case more conspicuous than the bar body */
  --pc-tl-sb-cap: color-mix(in oklab, var(--pc-tl-sb-thumb) 68%, var(--ui-fg, #e5e5e5));
  --pc-tl-sb-cap-hover: color-mix(in oklab, var(--pc-tl-sb-thumb-hover) 72%, var(--ui-fg, #e5e5e5));
  --pc-tl-sb-cap-active: color-mix(in oklab, var(--pc-tl-sb-thumb-hover) 42%, var(--ui-fg, #e5e5e5));
  /* The vertical stripes on the grip go toward the background color, the opposite of the grip caps, so they are visible in both light and dark skins */
  --pc-tl-sb-grip: color-mix(in oklab, var(--ui-bg-2, #0a0a0a) 78%, transparent);
}

/* Once the custom horizontal scrollbar takes over, hide the native horizontal bar; keep the vertical one. */
[data-pc="timeline"] .pc-tl-scroll::-webkit-scrollbar:horizontal { height: 0; }
[data-pc="timeline"] .pc-tl-scroll::-webkit-scrollbar:vertical { width: 14px; }
/* Both groove and thumb use a 2px transparent border + padding-box clipping, so the visible width is exactly 10px, aligned with the bottom horizontal bar */
[data-pc="timeline"] .pc-tl-scroll::-webkit-scrollbar-track {
  background: var(--pc-tl-sb-track);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
[data-pc="timeline"] .pc-tl-scroll::-webkit-scrollbar-thumb {
  background: var(--pc-tl-sb-thumb);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
[data-pc="timeline"] .pc-tl-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--pc-tl-sb-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Bottom horizontal bar: one row 14px high = 2 on top + 10 bar body + 2 at the bottom.
 * The right padding is written in by Scrollbar.tsx according to the width the vertical bar actually takes, so the groove stops at the left edge of the vertical bar's cell,
 * leaving a 14×14 corner at the bottom right, like the corner of a native scrollbar; when there is no vertical bar the groove extends all the way to the right. */
.pc-tl-hbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 14px;
  background: var(--ui-bg-2, #0a0a0a);
}
.pc-tl-hbar-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 10px;
  margin: 0 2px;
  border-radius: 999px;
  background: var(--pc-tl-sb-track);
  cursor: pointer;
}
.pc-tl-hbar-thumb {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  border-radius: 999px;
  background: var(--pc-tl-sb-thumb);
  cursor: grab;
  transition: background-color 0.12s;
}
.pc-tl-hbar-thumb:hover,
.pc-tl-hbar-thumb[data-drag] {
  background: var(--pc-tl-sb-thumb-hover);
}
/* Middle section: press and drag to pan */
.pc-tl-hbar-pan {
  flex: 1;
  min-width: 0;
  cursor: grab;
}
.pc-tl-hbar-thumb[data-drag="pan"],
.pc-tl-hbar-thumb[data-drag="pan"] .pc-tl-hbar-pan {
  cursor: grabbing;
}
/* Grip caps at both ends: 12px wide, always shown, one step brighter than the bar body, with two 1×6 vertical stripes in the middle */
.pc-tl-hbar-grip {
  position: relative;
  flex: none;
  width: 12px;
  background: var(--pc-tl-sb-cap);
  color: var(--pc-tl-sb-grip);
  cursor: ew-resize;
  transition: background-color 0.12s;
}
.pc-tl-hbar-grip.is-left {
  border-radius: 999px 0 0 999px;
}
.pc-tl-hbar-grip.is-right {
  border-radius: 0 999px 999px 0;
}
.pc-tl-hbar-grip::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 1px;
  margin-left: -2px;
  background: currentColor;
  box-shadow: 3px 0 0 currentColor;
  pointer-events: none;
}
.pc-tl-hbar-thumb:hover .pc-tl-hbar-grip,
.pc-tl-hbar-thumb[data-drag] .pc-tl-hbar-grip {
  background: var(--pc-tl-sb-cap-hover);
}
/* The grip being pointed at and the grip being dragged get one step brighter */
.pc-tl-hbar-thumb .pc-tl-hbar-grip:hover,
.pc-tl-hbar-thumb[data-drag="left"] .pc-tl-hbar-grip.is-left,
.pc-tl-hbar-thumb[data-drag="right"] .pc-tl-hbar-grip.is-right {
  background: var(--pc-tl-sb-cap-active);
}

/* One continuous edge, shared with the footer. The resize hit target stays
 * six pixels wide but must not draw a second line inside the header column. */
.pc-tl-headers {
  border-right: 1px solid var(--ui-border);
  /* The track column casts a narrow shadow to the right to set it apart from the clips on the right; when scrolling horizontally, clips slide under the shadow.
     The column is sticky + z-30, and the shadow sits on top of the tracks. Dark and light skins use the same black: faint in light skins, and in dark skins it hardly does more than darken the edge */
  box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.28);
}
.pc-tl-header-resize [data-pc-resize="x"].pc-gutter {
  background-image: none;
}

/* ── Timeline (color scheme diagnosis and fix v2, full screen, bottom) ───────────────────────────────
 * Whole block L1 (see editor/shell.css); selected track row L2; controls L3. */

/* Top tool row: 40 high */
.pc-tl-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid var(--ui-border);
  flex-shrink: 0;
  font-size: 11.5px;
}
/* Row-height segments (small/medium/large): a control outline around the group, the selected cell filled with the emphasis color */
.pc-tl-seg {
  display: flex;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  overflow: hidden;
}
.pc-tl-seg button {
  padding: 3px 11px;
  font-size: 11.5px;
  font-family: inherit;
  color: var(--ui-fg-muted);
  background: var(--ui-panel-2);
  border: 0;
  cursor: pointer;
  line-height: 1.4;
}
.pc-tl-seg button:hover {
  color: var(--ui-fg);
}
.pc-tl-seg button.is-on {
  color: var(--ui-accent-fg);
  background: var(--ui-accent);
}
.pc-tl-meta {
  font-family: var(--ui-font-mono);
  font-size: 11px;
  color: var(--ui-fg-faint);
  white-space: nowrap;
}
.pc-tl-sep {
  width: 1px;
  height: 18px;
  background: var(--ui-float);
}
.pc-tl-iconbtn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--ui-radius, 6px);
  color: var(--ui-fg);
  cursor: pointer;
}
.pc-tl-iconbtn:hover {
  background: var(--ui-panel-2);
}
.pc-tl-iconbtn.is-on {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}
.pc-tl-zoom {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 28px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-panel);
  border: 1px solid var(--ui-border);
}
.pc-tl-zoom-track {
  position: relative;
  width: 96px;
  height: 3px;
  background: var(--ui-panel-2);
}
.pc-tl-zoom-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ui-fg-muted);
}
.pc-tl-zoom-knob {
  position: absolute;
  top: -4px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--ui-fg);
  border-radius: 50%;
  pointer-events: none;
}
.pc-tl-zoom input[type="range"] {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: 19px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* Track list header: same height as the ruler (index.tsx sets it inline from RULER_H), small monospaced text, wide letter spacing */
.pc-tl-hdr {
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-family: var(--ui-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ui-fg-faint);
}
/* The empty row below the ruler (.pc-tl-toprow in index.tsx): on the row header column side a divider line is drawn at the bottom edge, directly above the first track.
   An inset shadow is used instead of a border so it takes no height, and the empty rows on both sides stay equal to the row height */
.pc-tl-headers > .pc-tl-toprow {
  box-shadow: inset 0 -1px 0 var(--ui-border);
}
/* Track row: drag handle + name + two always-visible icons on the right (no longer shown only on hover) */
.pc-tl-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-fg-faint);
  cursor: grab;
}
.pc-tl-row:hover,
.pc-tl-row.is-on {
  background: var(--ui-panel);
}
.pc-tl-row.is-dragging {
  background: var(--ui-panel);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  cursor: grabbing;
}
.pc-tl-row-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ui-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-tl-row-name.is-muted {
  color: var(--ui-fg-muted);
}
.pc-tl-row-name input {
  width: 100%;
  background: var(--ui-bg-2);
  color: var(--ui-fg);
  border: 1px solid var(--ui-accent);
  outline: none;
  padding: 1px 4px;
  font: inherit;
  font-size: 12.5px;
  border-radius: var(--ui-radius-sm, 4px);
}
.pc-tl-row-acts {
  display: flex;
  gap: 8px;
  color: var(--ui-fg-faint);
}
.pc-tl-row-acts button {
  background: transparent;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: inherit;
  cursor: pointer;
  border-radius: var(--ui-radius-sm, 4px);
}
.pc-tl-row-acts button:hover {
  color: var(--ui-fg);
  background: var(--ui-panel-2);
}
.pc-tl-row-acts button.is-active {
  color: var(--ui-danger);
}
.pc-tl-addtrack-wrap {
  padding: 11px 12px;
}
.pc-tl-addtrack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ui-panel-2);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius, 6px);
  padding: 5px 11px;
  color: var(--ui-fg);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}
.pc-tl-addtrack:hover {
  background: var(--ui-float);
}

/* Ruler: the height is set inline from RULER_H in Ruler.tsx; the bottom edge line is drawn by the prerender progress (.pc-tl-ruler-progress) */
.pc-tl-ruler {
  box-sizing: border-box;
}
/* Minor tick: 1×4 short vertical line; major tick: 1×10 vertical line, with the time label 4px to its right. Both are vertically centered in the ruler row */
.pc-tl-tick {
  position: absolute;
  top: 8px;
  width: 1px;
  height: 4px;
  background: var(--ui-border-strong);
  pointer-events: none;
}
.pc-tl-tick.is-major {
  top: 5px;
  height: 10px;
  background: color-mix(in oklab, var(--ui-fg-faint) 70%, transparent);
}
.pc-tl-tick-label {
  position: absolute;
  left: 4px;
  /* The vertical center is aligned with the center of the major tick line and the center of the playhead time pill: the midline of the ruler row after subtracting the 2px progress line at the bottom edge (22 high → 10px).
     The label hangs inside the major tick line (top 5, height 10), so relative to it, it is 5px */
  top: 5px;
  transform: translateY(-50%);
  font-family: var(--ui-font-mono);
  font-size: 10.5px;
  line-height: 12px;
  color: var(--ui-fg-faint);
  white-space: nowrap;
}
/* Bottom edge line = prerender progress */
.pc-tl-ruler-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

/* New-track drop zone: 26 high, dashed control outline, faint emphasis-color background */
.pc-tl-newzone {
  height: 26px;
  background: color-mix(in oklab, var(--ui-accent) 7%, transparent);
  border: 1px dashed var(--ui-border-strong);
  border-radius: var(--ui-radius-lg, 8px);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--ui-fg-faint);
}
.pc-tl-newzone.is-armed {
  border-color: var(--ui-fg-muted);
  background: color-mix(in oklab, var(--ui-fg-muted) 10%, transparent);
}
.pc-tl-newzone.is-target {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft);
}

/* Trim handles at both ends of a clip: on hover a centered rounded white bar appears */
.pc-clip-trim:hover::after {
  content: "";
  position: absolute;
  top: 30%;
  bottom: 30%;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: white;
  border-radius: 1.5px;
}

/* Empty track placeholder: when the track row (.pc-tl-track on the TrackRow root) holds no clip at all, draw an inset 1px dashed,
   rounded box to hint that things can be dropped here. No element and no text is added, and the box disappears as soon as a clip is put in.
   The pseudo-element does not take mouse events, so drag and drop still lands on the row; the drop target preview (z-30) and the lock overlay (z-50) both cover it.
   Hidden tracks do not render clips, so they also show this box. */
.pc-tl-track:not(:has(.pc-clip))::before {
  content: "";
  position: absolute;
  inset: 4px 8px;
  border: 1px dashed var(--ui-border-strong);
  border-radius: var(--ui-radius-lg, 8px);
  pointer-events: none;
}

/* Time pill on the playhead: primary text color as background, background color as text. Vertical center = ruler row midline (top is set by Playhead.tsx),
   at the same height as the tick times on the ruler; horizontally centered on the playhead by its own width */
.pc-tl-playhead-label {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ui-fg);
  color: var(--ui-bg);
  font-family: var(--ui-font-mono);
  font-weight: 600;
  font-size: 10px;
  line-height: 14px;
  padding: 0 6px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

/* Bottom status bar: slimmer, placed on the canvas */
.pc-statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 24px;
  padding: 0 14px;
  flex-shrink: 0;
  background: transparent;
  font-family: var(--ui-font-mono);
  font-size: 10.5px;
  color: var(--ui-fg-faint);
}
.pc-statusbar-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pc-statusbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-success);
}
.pc-statusbar-dot.is-dirty {
  background: var(--ui-warn);
}

/* Timeline context menu: portaled onto body (see ContextMenu.tsx), not inside [data-pc="timeline"], so colors come straight from the skin variables.
   z must be higher than every panel in the editor, the same tier as the left rail context menu (z-[900]). */
.pc-tl-ctxmenu {
  z-index: 900;
  background: var(--ui-float, #262626);
  border: 1px solid var(--ui-border-strong, #404040);
  border-radius: var(--ui-radius-lg, 8px);
  box-shadow: var(--ui-shadow, 0 12px 32px rgba(0, 0, 0, 0.45));
  color: var(--ui-fg, #e5e5e5);
}
.pc-tl-ctxmenu-item:hover {
  background: var(--ui-panel-2, #404040);
}

/* ── Shot change markers ─────────────────────────────────────────────
   Drawn inside the clip, above the content, but does not take mouse events: dragging the clip and changing its length must work as usual. */
.pc-shot-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 12;
}

.pc-shot-cut,
.pc-shot-dissolve {
  position: absolute;
  top: 0;
  bottom: 0;
}

.pc-shot-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}
.pc-shot-line--end { right: 0; }

/* A dissolve is a span, and the background marks the gradient range; a hard cut has no span, only a line */
.pc-shot-dissolve {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.pc-shot-thumb {
  height: 22px;
  width: auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

/* Dissolve: two thumbnails drawn stacked, the later one semi-transparent on top of the earlier one */
.pc-shot-stack {
  position: absolute;
  width: max-content;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  display: block;
}
.pc-shot-thumb--over {
  position: absolute;
  left: 8px;
  top: 4px;
  opacity: 0.72;
}

/* The thumbnail of a hard cut sits to the right of the vertical line (the side after the switch), not centered */
.pc-shot-stack--cut {
  left: 2px;
  transform: none;
}

/* ── Prerender green bar (the one on top in AE)──────────────────────────────────
   Green = dragging there shows a picture immediately; blank = you have to wait for it to render (about 4 seconds each).
   The segment algorithm is in src/editor/preview/bakeCoverage.ts; when drawing, better to draw too little than too much. */

/* Groove: how long the whole video is. A bit brighter than the panel background, to show "how much is still not prerendered" */
.pc-tl-renderbar-track {
  background: var(--ui-panel-2);
}
/* The low frame rate tier: yellow. Dragging there shows a picture, but it can be off by up to 0.25 s */
.pc-tl-renderbar-coarse {
  background: var(--ui-warn);
}
/* The original frame rate tier: green. Frame-accurate, drawn over the yellow */
.pc-tl-renderbar-done {
  background: var(--ui-success);
}
/* The moment currently being rendered: a vertical line. When the green bar is not moving for a while, it shows "not dead, just stuck here" */
.pc-tl-renderbar-now {
  width: 2px;
  background: var(--ui-warn);
}

.pc-audio-waveform { position: absolute; left: 0; bottom: 1px; width: 100%; height: 16px; opacity: .45; pointer-events: none; }

.pc-clip-volume-dialog { margin: auto; width: min(360px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-xl, 12px); background: var(--ui-bg-2); color: var(--ui-fg); box-shadow: 0 12px 48px #0008; font-size: 13px; }
.pc-clip-volume-dialog::backdrop { background: #0008; }
.pc-clip-volume-dialog h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.pc-clip-volume-dialog p { margin: 10px 0; color: var(--ui-fg-muted); font-size: 12px; }
.pc-volume-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-volume-controls { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.pc-volume-controls input[type=range] { flex: 1; min-width: 0; accent-color: var(--ui-accent); }
.pc-volume-controls input[type=number] { width: 64px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm, 4px); padding: 4px; background: var(--ui-bg); color: var(--ui-fg); }
.pc-volume-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.pc-volume-actions button { padding: 6px 10px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius, 6px); cursor: pointer; }
.pc-volume-actions button[type=submit] { background: var(--ui-accent-grad); color: white; }
.pc-volume-actions button:disabled { opacity: .4; cursor: default; }

/* ── Overlay card: the band inside a clip (editor/timeline/OverlayBand.tsx, overlays.ts)──────
   What was attached to a clip used to show not a single word on the timeline; you could only dig through it in the left rail inspector.
   Colors all follow the clip: `--clip` is the track color and `--clip-ink` is its ink color (.pc-clip in skins.css). */

/* This cell is kept for every clip and is transparent when nothing is attached: if it were reserved only for clips with something attached, names in the same row would sit at uneven heights */
.pc-ov-band {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0 3px;
  overflow: hidden;
  background: color-mix(in oklab, var(--clip-ink) 20%, transparent);
  box-shadow: inset 0 -1px 0 color-mix(in oklab, var(--clip-ink) 26%, transparent);
}
.pc-ov-band.is-empty {
  background: transparent;
  box-shadow: none;
}
.pc-ov-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 92px;
  height: 13px;
  padding: 0 5px;
  border: 0;
  border-radius: 3px;
  background: color-mix(in oklab, var(--clip) 78%, var(--ui-fg));
  color: var(--clip-ink);
  font-family: inherit;
  font-size: 9.5px;
  line-height: 13px;
  cursor: pointer;
}
.pc-ov-chip:hover { background: color-mix(in oklab, var(--clip) 62%, var(--ui-fg)); }
.pc-ov-chip:focus-visible { outline: 1.5px solid var(--clip-ink); outline-offset: 1px; }
.pc-ov-chip .g { font-family: var(--ui-font-mono); opacity: 0.75; }
.pc-ov-chip .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* What does not fit in the band is collapsed into +N: the height does not grow with the count, click to open and pick */
.pc-ov-more,
.pc-ov-pill {
  flex: none;
  height: 13px;
  padding: 0 4px;
  border: 0;
  border-radius: 3px;
  background: color-mix(in oklab, var(--clip-ink) 30%, transparent);
  color: var(--clip-ink);
  font-family: var(--ui-font-mono);
  font-size: 9.5px;
  line-height: 13px;
  cursor: pointer;
}
.pc-ov-more:hover,
.pc-ov-pill:hover { background: color-mix(in oklab, var(--clip-ink) 46%, transparent); }
.pc-ov-more:focus-visible,
.pc-ov-pill:focus-visible { outline: 1.5px solid var(--clip-ink); outline-offset: 1px; }
/* The small row height tier has no band: +N follows the name, aligned right, looking the same as on the mobile app */
.pc-ov-pill { height: 14px; line-height: 14px; }
/* Appears only when pointing at the clip, so it does not draw attention normally */
.pc-ov-add {
  flex: none;
  margin-left: auto;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--clip-ink);
  font-family: var(--ui-font-mono);
  font-size: 11px;
  line-height: 13px;
  opacity: 0;
  cursor: pointer;
}
.pc-clip:hover .pc-ov-add,
.pc-ov-add:focus-visible { opacity: 0.8; }
.pc-ov-add:hover { background: color-mix(in oklab, var(--clip-ink) 26%, transparent); opacity: 1; }

/* Name and duration on the same row: if split over two lines, the medium row height minus the overlay band leaves only 23px, and the upper half of the title would be cut off */
.pc-clip-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  overflow: hidden;
}
.pc-clip-line {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.pc-clip-line .nm { font-weight: 500; }
.pc-clip-line .du { opacity: 0.7; }

/* ── Context menu: menu header and next level ────────────────────────────────────
   The menu header is the only evidence of "which segment / which card am I acting on now", and below it are copy and delete.
   The overlay card variant fills the header background (the fill takes the track color of that segment), so a wrong pick is visible at a glance; the menu of an ordinary clip has no fill. */
.pc-tl-ctxhead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin: 0 4px 4px;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--ui-border);
}
.pc-tl-ctxhead b {
  flex: none;
  max-width: 60%;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-tl-ctxhead span {
  min-width: 0;
  font-size: 11px;
  color: var(--ui-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-tl-ctxhead.is-fill {
  --hd: var(--ui-track-text);
  padding: 5px 8px;
  border-bottom: 0;
  border-radius: 5px;
  background: color-mix(in oklab, var(--hd) 22%, var(--ui-float));
  box-shadow: inset 2px 0 0 var(--hd);
}
.pc-tl-ctxhead.is-fill[data-track-kind="video"] { --hd: var(--ui-track-video); }
.pc-tl-ctxhead.is-fill[data-track-kind="audio"] { --hd: var(--ui-track-audio); }
.pc-tl-ctxhead.is-fill[data-track-kind="image"] { --hd: var(--ui-track-image); }
.pc-tl-ctxhead.is-fill[data-track-kind="fx"] { --hd: var(--ui-track-fx); }
.pc-tl-ctxhead.is-fill[data-track-kind="transition"] { --hd: var(--ui-track-transition); }
.pc-tl-ctxhead.is-fill[data-track-kind="sticker"] { --hd: var(--ui-track-sticker); }

.pc-tl-ctxmenu-item { display: flex; align-items: center; gap: 10px; }
.pc-tl-ctxmenu-item .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-tl-ctxmenu-item .hint {
  flex: none;
  font-family: var(--ui-font-mono);
  font-size: 10.5px;
  color: var(--ui-fg-muted);
  white-space: nowrap;
}
.pc-tl-ctxmenu-item .chev { flex: none; font-family: var(--ui-font-mono); color: var(--ui-fg-muted); }
.pc-tl-ctxmenu-item.has-sub:hover .chev { color: inherit; }
.pc-tl-ctxmenu-item.is-danger { color: var(--ui-danger); }

/* Disabled overlay card: dashed line + name struck through. The attachment and the per-segment parameters are all kept; they just take no effect on this segment:
   when you cannot get the effect you want, turn it off first and compare, instead of removing it, going back to the left rail library to find it again and re-entering the parameters. */
.pc-ov-chip.is-off {
  background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--clip-ink) 40%, transparent);
  opacity: 0.6;
}
.pc-ov-chip.is-off:hover { background: color-mix(in oklab, var(--clip-ink) 12%, transparent); opacity: 0.85; }
.pc-ov-chip.is-off .n { text-decoration: line-through; }
.pc-tl-ctxmenu-item.is-dim { opacity: 0.6; }
.pc-tl-ctxmenu-item.is-dim .lb { text-decoration: line-through; }

/* ── Dedicated Camera Lane & 3D Depth Hint ────────────────────────────── */
.pc-tl-camera-hdr {
  border-bottom: 1px solid var(--ui-border);
  background: color-mix(in oklab, #38bdf8 6%, var(--ui-panel, #18181b));
}
.pc-tl-camera-icon {
  display: inline-flex;
  align-items: center;
  color: #38bdf8;
  flex-shrink: 0;
}
.pc-tl-camera-kind {
  padding: 0 4px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}
.pc-tl-camera-lane {
  border-bottom: 1px solid var(--ui-border);
  background: color-mix(in oklab, #38bdf8 4%, var(--ui-bg, #111114));
}
.pc-tl-camera-subsep {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in oklab, var(--ui-border) 55%, transparent);
  pointer-events: none;
}
.pc-camera-clip {
  position: absolute;
  display: flex;
  align-items: stretch;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.38);
  color: #e0f2fe;
  font-size: 11px;
  cursor: grab;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 10;
}
.pc-camera-clip:hover {
  background: rgba(14, 116, 144, 0.52);
}
.pc-camera-clip.is-selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8, 0 2px 8px rgba(56, 189, 248, 0.25);
  z-index: 15;
}
.pc-camera-clip.is-disabled {
  opacity: 0.45;
  border-style: dashed;
}
.pc-camera-handle {
  width: 6px;
  flex-shrink: 0;
  cursor: ew-resize;
  background: rgba(56, 189, 248, 0.18);
}
.pc-camera-handle:hover {
  background: rgba(56, 189, 248, 0.55);
}
.pc-camera-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  overflow: hidden;
  white-space: nowrap;
}
.pc-camera-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-camera-summary {
  font-family: var(--ui-font-mono, monospace);
  font-size: 9.5px;
  opacity: 0.78;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-track-depth-badge {
  flex: none;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  white-space: nowrap;
}
/*
 * Editor shell: allocates the five surface levels of the design mockup (color diagnosis and correction v2) to the regions.
 *
 *   Window bar (native menu)  #101316: drawn by the system, not controlled here
 *   Canvas / preview        L0  --ui-bg
 *   Media library / timeline    L1  --ui-bg-2
 *   Toolbar / right rail      L2  --ui-panel
 *   Controls               L3  --ui-panel-2
 *   Floating / divider        L4  --ui-float
 *
 * The UI of each region uses a lot of Tailwind grayscale classes, which skins.css then maps uniformly to --ui-*.
 * That mapping table is "one size fits all" (950→L0, 900→L2, 800→L3), but the design mock-up requires
 * different areas to sit at different levels, with the whole media library at L1 and only the controls inside it at L3, so here we
 * add another override layer per data-pc area. Only the level assignment changes, not any color value.
 */

/* ── Media library (left rail) drawer L1, controls L3 ──────────────────────────────
 * The left rail root node does not paint a background color: the rail has to show the canvas, and the background comes from the drawer's .pc-card-surface.
 * Sections can be dragged to the right rail (editor/dock/), so pick by the section page node's data-pc-dock-kind="section",
 * not by "whether it is inside [data-pc=left]": otherwise a section moved to the right loses its colors, and the Agent moved to the left gets painted with the media library's level */
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-950,
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-950\/60 {
  background-color: var(--ui-bg-2);
}
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-900,
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-900\/60,
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-900\/40 {
  background-color: var(--ui-panel-2);
}
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-800,
[data-skin] [data-pc-dock-kind="section"] .bg-neutral-800\/60 {
  background-color: var(--ui-float);
}
[data-skin] [data-pc-dock-kind="section"] .hover\:bg-neutral-800:hover {
  background-color: var(--ui-float);
}

/* ── Timeline as a whole L1; selected / hovered rows rise to L2 ────────────────────────── */
[data-skin] [data-pc="timeline"],
[data-skin] [data-pc="timeline"].bg-neutral-900 {
  background-color: var(--ui-bg-2);
}
[data-skin] [data-pc="timeline"] .bg-neutral-950,
[data-skin] [data-pc="timeline"] .bg-neutral-900 {
  background-color: var(--ui-bg-2);
}
[data-skin] [data-pc="timeline"] .bg-neutral-800,
[data-skin] [data-pc="timeline"] .hover\:bg-neutral-800:hover {
  background-color: var(--ui-panel);
}

/*
 * ── Right rail (AI assistant) as a whole L1, the same color as the message area ─────────────────────────
 * The message area is L1. If the panel background were L2, the margins around "Agent actions" and the input box below the message area would show L2,
 * and the message area would be cut off flush above "Agent actions", looking like a slit (most obvious in dark skins);
 * in light skins, the 10px outside the input box would show white instead, as if the input box's white had spilled onto the panel edge.
 * Both skins use L1 for the whole block: "Agent actions" (L2) and the input box sit on a continuous background, and the divider line along the lower edge of the top bar sets it apart from the message area.
 */
[data-skin] .ai-panel {
  background-color: var(--ui-bg-2);
}

/*
 * The drag bar is an 8px gap, completely invisible at rest; on hover a 2px round-capped --ui-accent-soft line appears in the middle.
 */
.pc-gutter {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-gutter::after {
  content: "";
  background-color: var(--ui-accent-soft);
  border-radius: 99px;
  opacity: 0;
  transition: opacity 120ms;
}
[data-pc-resize="x"].pc-gutter::after {
  width: 2px;
  height: 32px;
}
[data-pc-resize="y"].pc-gutter::after {
  height: 2px;
  width: 32px;
}
.pc-gutter:hover::after,
body[data-pc-resizing] .pc-gutter::after {
  opacity: 1;
}
.pc-gutter.is-disabled::after {
  display: none !important;
}

[data-skin] [data-pc="editor"] > div > .grid > aside,
[data-skin] [data-pc="editor"] > div > .grid > main {
  border-left: 0;
  border-right: 0;
}

/*
 * When the side drawers / AI panel collapse or expand, the grid column widths transition over.
 * data-pc-rail-anim is attached by Editor.tsx for a short while only at the moment the collapsed state switches: dragging a drag bar to change width,
 * and panels auto-shrinking when the window narrows, neither goes through the transition (otherwise the column width trails the mouse by half a beat); during a drag it is forced off once more as insurance.
 * During the transition the drawer / panel cards keep their original width and are clipped by the column (left.css / chat.css), so the content inside does not reflow frame by frame;
 * the cards' own fade in / fade out also hangs off this attribute.
 */
@media (prefers-reduced-motion: no-preference) {
  .pc-editor-grid[data-pc-rail-anim] {
    transition: grid-template-columns 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}
body[data-pc-resizing] .pc-editor-grid {
  transition: none;
}

/* The timeline card's left/right inset (to clear the rails on both sides) slides along with collapse / expand, on the same curve as the grid column widths above */
@media (prefers-reduced-motion: no-preference) {
  .pc-editor-bottom {
    transition: margin 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}
/*
 * Floats centered below the top bar, takes up no layout space and does not intercept clicks: it is just a notice,
 * and the user is free to ignore it and keep editing the video.
 */
.dep-prompt {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(460px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dep-prompt-title {
  font-weight: 600;
  font-size: 13px;
}

.dep-prompt-body {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.dep-prompt-error {
  font-size: 12px;
  color: var(--danger);
}

.dep-prompt-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.dep-prompt-btn {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--fill-subtle);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.dep-prompt-btn:hover { border-color: var(--hairline-strong); }
.dep-prompt-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dep-prompt-btn.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
/* Start page. Uses the variables from the skin, the same color scheme as the editor */
.sp {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
}

.sp-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-panel);
}
.sp-brand { font-weight: 600; font-size: 14px; }
.sp-bar-spacer { flex: 1 1 auto; }

.sp-main {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── Start creating ─────────────────────────────────────── */
.sp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 140px;
  padding: 24px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--on-accent);
  /* Brand gradient, defined as --ui-accent-grad in skins.ts; changes along with the skin */
  background: var(--ui-accent-grad, linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 10%, #7b5cff)));
}
.sp-hero:hover { filter: brightness(1.06); }
.sp-hero:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sp-hero-plus { font-size: 26px; line-height: 1; }
.sp-hero-text { font-size: 17px; font-weight: 600; }
.sp-hero-sub { font-size: 12px; opacity: 0.85; }

/* ── Sections ─────────────────────────────────────────── */
.sp-section { display: flex; flex-direction: column; gap: 10px; }
.sp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sp-section-title { margin: 0; font-size: 14px; font-weight: 600; }
.sp-section-actions { display: flex; align-items: center; gap: 8px; }
.sp-muted { font-size: 12px; color: var(--ink-muted); }
.sp-ok { font-size: 12px; color: var(--accent); }

.sp-ghost-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--fill-subtle);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.sp-ghost-btn:hover:not(:disabled) { border-color: var(--hairline-strong); }
.sp-ghost-btn:disabled { opacity: 0.55; cursor: default; }

.sp-error {
  font-size: 12px;
  color: var(--danger);
  padding: 8px 10px;
  border: 1px solid var(--danger);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.sp-empty {
  font-size: 12px;
  color: var(--ink-muted);
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--hairline);
  border-radius: 8px;
}

/* ── Extension features ─────────────────────────────────────── */
.sp-ext-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.sp-ext-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
}
.sp-ext-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--fill-subtle);
  color: var(--accent);
}
.sp-ext-body { min-width: 0; flex: 1 1 auto; }
.sp-ext-name { font-size: 13px; font-weight: 600; }
.sp-ext-desc { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.sp-ext-state { font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }

/* ── Local drafts ─────────────────────────────────────── */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}
.sp-draft { position: relative; display: flex; flex-direction: column; gap: 6px; }
.sp-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.sp-draft-act {
  flex: 1 1 auto;
  font-family: inherit;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
  background: var(--fill-subtle);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.sp-draft-act:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.sp-draft-act:disabled {
  opacity: 0.5;
  cursor: default;
}
.sp-draft-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.sp-draft-thumb:hover:not(:disabled) { border-color: var(--accent); }
.sp-draft-thumb:disabled { cursor: default; }
.sp-draft-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-draft-placeholder { font-size: 12px; color: var(--ink-muted); }
.sp-draft-busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink);
  background: rgb(0 0 0 / 0.55);
}
.sp-draft-meta { min-width: 0; }
.sp-draft-name {
  font-size: 12px;
  font-weight: 600;
  /* Truncate long names so they don't stretch the cell out of shape */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-draft-sub { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sp-draft.is-broken .sp-draft-thumb { border-color: var(--danger); }
.sp-draft.is-broken .sp-draft-placeholder { color: var(--danger); }

/* The delete button stays hidden normally and only appears when the mouse enters the cell or the keyboard focuses it */
.sp-draft-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.sp-draft:hover .sp-draft-del,
.sp-draft-del:focus-visible { opacity: 1; }
.sp-draft-del:hover { background: var(--danger); }

/* Install progress and errors inside the speech-to-text extension card */
.sp-ext-progress { margin-top: 8px; }
.sp-ext-error { margin-top: 6px; font-size: 12px; color: var(--danger, #ef4444); overflow-wrap: anywhere; }

/* ── Storage ─────────────────────────────────────────── */
.sp-storage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.sp-storage-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
  font-size: 12px;
}
.sp-storage-label { font-size: 13px; font-weight: 600; }
.sp-storage-figure { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-storage-figure .sp-muted { font-weight: 400; }
.sp-storage-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--fill-subtle);
  overflow: hidden;
}
.sp-storage-bar > span { display: block; height: 100%; background: var(--accent); }
.sp-storage-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sp-storage-input {
  width: 72px;
  font-family: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--bg-canvas);
  color: var(--ink);
}
.sp-storage-notice {
  font-size: 12px;
  color: var(--accent);
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
}

.sp-export-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
  overflow: hidden;
}
.sp-export-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.sp-export-row + .sp-export-row { border-top: 1px solid var(--hairline); }
.sp-export-main { min-width: 0; flex: 1 1 260px; }
.sp-export-name {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-export-tag {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--fill-subtle);
  color: var(--ink-muted);
}
.sp-export-tag.is-warn { color: var(--danger); }
.sp-export-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-danger-btn:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.sp-account-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.sp-account-form label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; }
.sp-account-form input:not([type="checkbox"]) { min-width: 0; padding: 9px 12px; background: var(--bg-panel); color: inherit; border: 1px solid var(--hairline); border-radius: 8px; font: inherit; }
.sp-primary-btn { padding: 10px 14px; border: 0; border-radius: 8px; font: inherit; color: var(--on-accent); background: var(--accent); cursor: pointer; }
.sp-primary-btn:disabled { opacity: .55; cursor: default; }
.sp-account-form .sp-account-check { flex-direction: row; align-items: center; flex: 0 1 auto; }
.sp-account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.pc-app-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--ui-bg, #111);
  color: var(--ui-fg, #eee);
}

.pc-app-content {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.pc-titlebar {
  position: relative;
  z-index: 1100;
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  background: transparent;
  color: var(--ui-fg, #f5f7fa);
  border-bottom: none;
  font-family: var(--ui-font, system-ui, sans-serif);
  user-select: none;
}

/* Top-edge resize strip for the frameless window: covers the top 8px of the title bar, and the 12px at both ends are diagonal corners. The component doesn't draw it when maximized */
.pc-titlebar-resize {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 2;
  display: flex;
}

.pc-titlebar-resize > span { height: 100%; }
.pc-titlebar-resize-nw { flex: 0 0 12px; cursor: nwse-resize; }
.pc-titlebar-resize-n { flex: 1 1 auto; cursor: ns-resize; }
.pc-titlebar-resize-ne { flex: 0 0 12px; cursor: nesw-resize; }

.pc-titlebar-menus {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.pc-titlebar-menu-wrap { position: relative; height: 100%; display: flex; align-items: center; }

.pc-titlebar-menu-button {
  height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius, 6px);
  background: transparent;
  color: var(--ui-fg-muted, rgba(245, 247, 250, 0.72));
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pc-titlebar-menu-button:hover,
.pc-titlebar-menu-button.is-open {
  color: var(--ui-fg);
  background: color-mix(in oklab, var(--ui-accent) 14%, var(--ui-panel));
  border-color: color-mix(in oklab, var(--ui-accent) 42%, var(--ui-border));
}

.pc-titlebar-menu {
  position: absolute;
  top: 39px;
  left: 0;
  min-width: 196px;
  padding: 6px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-float, #222);
  box-shadow: var(--ui-shadow, 0 14px 34px rgba(0, 0, 0, 0.42));
}

.pc-titlebar-menu-item {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm, 4px);
  background: transparent;
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.pc-titlebar-menu-item:hover,
.pc-titlebar-menu-item:focus-visible {
  outline: none;
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent);
}

.pc-titlebar-menu-item kbd {
  color: var(--ui-fg-faint);
  font: 10px var(--ui-font-mono, ui-monospace, monospace);
}

.pc-titlebar-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--ui-border-strong);
}

.pc-titlebar-spacer { flex: 1 1 auto; height: 100%; }

.pc-titlebar-window-controls {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin-left: 8px;
}

.pc-window-control {
  width: 46px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  font: 18px/1 var(--ui-font, system-ui, sans-serif);
  cursor: pointer;
}

.pc-window-control:hover {
  background: color-mix(in oklab, var(--ui-fg) 10%, transparent);
  color: var(--ui-fg);
}

.pc-window-control--close:hover {
  background: #c42b3c;
  color: #fff;
}

@media (max-width: 700px) {
  .pc-titlebar { padding-left: 8px; }
  .pc-titlebar-menu-button { padding: 0 7px; }
  .pc-window-control { width: 40px; }
}

/* Items grayed out on the online page (desktop only, see desktopOnly in WindowTitleBar.tsx), styled the same as the grayed-out items in the top bar project menu */
.pc-titlebar-menu-item:disabled { opacity: 0.45; cursor: default; }
.pc-titlebar-menu-item:disabled:hover { background: transparent; border-color: transparent; }
/*
 * Styles of the WebGL canvas on the left side of the login page.
 *
 * A separate file, imported by `BrandCanvas.tsx` itself: `start.css` is being edited by another session right now (top bar, sidebar collapse),
 * and two sides touching the same file at once is bound to conflict, so not a single line of this branch's styles goes in there.
 */

/* The "Flow" style of the login button (shared with the mobile app, see the note in the file header) */

/*
 * The "Flow" primary button: the look of the "Open web version / Open on Web" button on the official website home page, saved as one fixed style.
 *
 * Source: `.btn` / `.btn-brand` in `site/assets/home.css` of the VisuHive repository
 * (user, 2026-10-23: "Save this button of the official website as a fixed style, and replace the 'Log in' button on the login screens of the mobile app and the desktop app.")
 *
 * Three things together make up that button:
 *   1. The brand gradient **flows slowly** inside the button: the gradient has the same color at both ends and is laid out at double width horizontally, so shifting by one full span joins up seamlessly, one cycle every 7 seconds;
 *   2. Every few seconds a **highlight sweeps across diagonally**, with the light band placed under the text (the button forms its own stacking context, and the band has z-index −1);
 *   3. A very faint **inner outline** along the top, which makes it look raised.
 *
 * **The colors are hardcoded** and do not follow the skin: the user wanted exactly a "fixed style". They are taken from the official website's dark set:
 * `--accent` #00dbdb, `--accent-2` #6f69fb, `--accent-fg` #111016.
 * Cost: when the skin is switched (`src/skins/`, ten sets) this button does not change with it and stays cyan→purple. To make it follow,
 * just change #00dbdb / #6f69fb / #111016 below back to something like `var(--ui-accent)`.
 *
 * **The geometry is not copied from the website's button** (46px high, 8px radius, 15.5px font): the button in the login form has to match the set used by the input boxes
 * (9px radius, 13px font, 10px 14px padding), so only the "look" is swapped here, and the size is still decided by each login style.
 *
 * Usage: add `.ps-brand-btn` to the element; the buttons of the two login pages are already named in the selectors below, so no markup change is needed.
 */

.ps-brand-btn,
.ps-login .ps-login-form .ps-primary-btn,
.pcm .ps-m-login-form .btn.primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(90deg, #00dbdb, #6f69fb 50%, #00dbdb) 0 0 / 200% 100%;
  color: #111016;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28);
  animation: ps-brand-flow 7s linear infinite;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.18s, filter 0.18s;
}

/* The highlight that sweeps across diagonally */
.ps-brand-btn::after,
.ps-login .ps-login-form .ps-primary-btn::after,
.pcm .ps-m-login-form .btn.primary::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  z-index: -1;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.5), transparent);
  transform: translateX(-140%) skewX(-20deg);
  animation: ps-brand-sheen 3.8s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
}

.ps-brand-btn:hover:not(:disabled),
.ps-login .ps-login-form .ps-primary-btn:hover:not(:disabled),
.pcm .ps-m-login-form .btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 10px 24px -14px #6f69fb;
  animation-duration: 3.5s;
  filter: none;
}

/*
 * When it cannot be pressed: stop the flow and the sweep (those signal "clickable", and moving while gray would make people think it is loading),
 * and **switch to a flat block**, instead of making the gradient semi-transparent.
 *
 * Previously it reused the `:disabled { opacity: .5 }` from each login style. That works fine with a solid-color button,
 * but with this gradient it became something "with the color still there but faded overall", which looks like it has not finished loading or like the opacity was set wrong
 * (this is what the user saw on 2026-10-23: "feels like the opacity is only about 60%").
 * Changed to an opaque gray background + faint text: it reads at a glance as "not clickable yet", and lights up once the account and password are filled in.
 */
.ps-brand-btn:disabled,
.ps-login .ps-login-form .ps-primary-btn:disabled,
.pcm .ps-m-login-form .btn.primary:disabled {
  opacity: 1;
  background: var(--fill-subtle);
  color: var(--ink-faint);
  box-shadow: none;
  animation-play-state: paused;
}
.ps-brand-btn:disabled::after,
.ps-login .ps-login-form .ps-primary-btn:disabled::after,
.pcm .ps-m-login-form .btn.primary:disabled::after {
  animation-play-state: paused;
  opacity: 0;
}

@keyframes ps-brand-flow {
  to { background-position: -200% 0; }
}

@keyframes ps-brand-sheen {
  0%, 58% { transform: translateX(-140%) skewX(-20deg); }
  100% { transform: translateX(340%) skewX(-20deg); }
}

/* When reduced motion is requested, rest on a static gradient (the left half of the gradient is exactly cyan→purple, which is how the website's button looks at rest) */
@media (prefers-reduced-motion: reduce) {
  .ps-brand-btn,
  .ps-brand-btn::after,
  .ps-login .ps-login-form .ps-primary-btn,
  .ps-login .ps-login-form .ps-primary-btn::after,
  .pcm .ps-m-login-form .btn.primary,
  .pcm .ps-m-login-form .btn.primary::after {
    animation: none;
  }
  .ps-brand-btn::after,
  .ps-login .ps-login-form .ps-primary-btn::after,
  .pcm .ps-m-login-form .btn.primary::after { opacity: 0; }
}
.ps-brand-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/*
 * `start.css` has a rule `.ps-login-art > *:not(.ps-aurora) { position: relative; z-index: 1; }`:
 * it exists to lift the text above the background pattern, but it lifts the canvas too, which then covers the heading instead.
 * Here one extra element selector (`canvas`) is added, so the specificity is one step higher, pressing the canvas back down to the bottom layer.
 */
/* Prerendered looping video: placed the same way as the canvas. object-fit: cover, so the left rail is filled however wide or tall it is,
 * cropping the overflowing side, without stretching */
.ps-brand-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Same reason as the canvas rule below: `.ps-login-art > *:not(.ps-aurora)` would lift it to the text layer,
 * so one extra element selector is added to press it back to the bottom layer */
.ps-login-art > video.ps-brand-loop {
  position: absolute;
  z-index: 0;
}

.ps-login-art > canvas.ps-brand-canvas {
  position: absolute;
  z-index: 0;
}

/*
 * What shows through the canvas should be the background color of the **whole page**.
 *
 * `start.css` paints `.ps-login-art` with `--bg-panel` (#23222A, which compared with the whole-page background `--bg-canvas` #111016
 * is one step lighter and purplish), so where the alpha lets it show through it does not match the right half, and looks like "mixed with a brightened light purple"
 * (pointed out by the user, 2026-10-23; measured: left block rgb(35,34,42), whole page rgb(17,16,22)). Here it is set back to the whole-page background color.
 *
 * The selector carries one extra element name, so its specificity beats the one in `start.css`; that file belongs to another session, so it is left alone.
 */
.ps-login > section.ps-login-art {
  background: var(--bg-canvas);
  /* Remove the vertical line between the left and right blocks (user decision, 2026-10-23): the picture fades out toward it anyway, and drawing a line would cut it off */
  border-right: 0;
}

/*
 * The checkbox on the desktop login page: `start.css` did not set an `accent-color` for it, so the browser draws it in its own default color
 * (a bright blue square on Chrome), which does not match the emphasis color of the whole page; the mobile app side has it set, so the two sides do not look like one set.
 * This rule draws it in the skin's emphasis color, unifying the two sides.
 *
 * **This rule belongs on `.ps-check input` in `start.css`**: that file is owned by another session right now,
 * so it is not touched and the rule is put here for now (this file is also loaded on the desktop login page: `OnlineLogin.tsx` renders `BrandCanvas`).
 * When merging, just move it into `start.css`.
 */
.ps-login .ps-check input { accent-color: var(--accent); }

/*
 * **The two text blocks must always be readable** (pointed out by the user, 2026-10-23: "the alpha of the login screen background fails to display").
 *
 * On investigation the alpha itself is fine: the canvas outputs straight alpha (`premultipliedAlpha: false`), and the measured alpha of this block
 * covers 0 to 255 with an average of about 121/255, and the dark areas do show the page background through. What is really broken is the **composition**: the aurora moves,
 * and its bright band drifts under the heading and the description at the top left, where white text on a cyan-green bright band cannot be read
 * (in the final screenshot `docs/archive/agent-reports/AGENT-claude-vibe-wire-shots/01-login.png` that part happened to be dark,
 * so it was not noticed then: it was "right by luck", not "right by design").
 *
 * So a vignette is laid above the canvas and below the text: the top edge covers the heading block and the bottom edge covers the badge row, while the middle is left completely untouched,
 * and the places where the aurora should be bright stay bright. `::after` is used instead of `::before` because within the same layer elements are drawn in document order and `::after` comes after the canvas,
 * so that only then can it cover the canvas; the text elements are `z-index: 1` and remain above this layer.
 * The color is hardcoded to the actual value of `--bg-canvas` (#111016) instead of `color-mix`: this layer needs to "fit the background color seamlessly",
 * and these two lines must change along when a skin changes the background color, so they are written right here instead of being scattered elsewhere.
 */
.ps-login > section.ps-login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg-canvas) 0%, rgba(17, 16, 22, 0.82) 14%, rgba(17, 16, 22, 0.35) 28%, transparent 42%),
    linear-gradient(to top, var(--bg-canvas) 0%, rgba(17, 16, 22, 0.55) 8%, transparent 20%);
}
/*
 * The login dialog of the online browser (`LoginDialog.tsx`, issue #2). Skin variables only, the same as
 * `start.css`, so light, dark and every skin follow along. Fields, the primary button and links reuse
 * `.ps-field`, `.ps-check`, `.ps-primary-btn`, `.ps-link` from `start.css`.
 * Class prefix `ps-ld-` (login dialog).
 */

.ps-ld-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  /* A track that can shrink below the content: without it the card's 100% resolves against its own width and overflows a phone */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg-canvas) 45%, rgb(0 0 0 / 0.55));
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  animation: ps-ld-fade 0.2s ease-out;
}

.ps-ld {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  padding: 28px 28px 22px;
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  background: var(--bg-panel);
  color: var(--ink);
  font-family: var(--font-sans);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.32), 0 2px 8px rgb(0 0 0 / 0.16);
  animation: ps-ld-rise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ps-ld[data-busy] .ps-ld-form,
.ps-ld[data-busy] .ps-ld-choices { opacity: 0.7; }

.ps-ld-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.ps-ld-close:hover { background: var(--fill-hover); color: var(--ink); }

/* Pages are stacked in one grid cell, so the outgoing and incoming page overlap while turning */
.ps-ld-stage {
  display: grid;
  perspective: 1100px;
}
.ps-ld-page {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  backface-visibility: hidden;
}
.ps-ld-page[hidden] { display: none; }
.ps-ld-page:not(.is-current) { pointer-events: none; }

/* Page turn: forward swings in from the right edge, back from the left; the old page swings away the other way */
.ps-ld-page.is-in-fwd { transform-origin: right center; animation: ps-ld-in-fwd 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.ps-ld-page.is-out-fwd { transform-origin: left center; animation: ps-ld-out-fwd 0.34s cubic-bezier(0.4, 0, 0.6, 1) both; }
.ps-ld-page.is-in-back { transform-origin: left center; animation: ps-ld-in-back 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.ps-ld-page.is-out-back { transform-origin: right center; animation: ps-ld-out-back 0.34s cubic-bezier(0.4, 0, 0.6, 1) both; }

@keyframes ps-ld-in-fwd { from { opacity: 0; transform: rotateY(-38deg); } to { opacity: 1; transform: none; } }
@keyframes ps-ld-out-fwd { from { opacity: 1; transform: none; } to { opacity: 0; transform: rotateY(38deg); } }
@keyframes ps-ld-in-back { from { opacity: 0; transform: rotateY(38deg); } to { opacity: 1; transform: none; } }
@keyframes ps-ld-out-back { from { opacity: 1; transform: none; } to { opacity: 0; transform: rotateY(-38deg); } }
@keyframes ps-ld-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ps-ld-rise { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ps-ld-mask,
  .ps-ld,
  .ps-ld-page { animation: none !important; }
  .ps-ld-page:not(.is-current) { display: none; }
}

/* ── choose ── */
.ps-ld-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  text-align: center;
}
.ps-ld-brand .ps-ld-title { margin-top: 6px; }
.ps-ld-title { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.3; }
.ps-ld-lead { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-muted); overflow-wrap: anywhere; }

.ps-ld-choices { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 8px; }
.ps-ld-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--fill-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.ps-ld-choice:hover { background: var(--fill-hover); }
.ps-ld-choice:focus-visible,
.ps-ld-quiet:focus-visible,
.ps-ld-back:focus-visible,
.ps-ld-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ps-ld-choice > span { flex: 1 1 auto; min-width: 0; }
.ps-ld-icon { flex: 0 0 auto; color: var(--ink-muted); }
.ps-ld-chev { flex: 0 0 auto; color: var(--ink-faint); }

/* Google's own button: centered at its own width; when the service has it off the slot is empty and takes no room */
.ps-ld-google { display: flex; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; border-radius: 999px; }
.ps-ld-google:empty { display: none; }
.ps-ld-google[data-state="unavailable"] { display: none; }
.ps-ld-note { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-muted); text-align: center; }

.ps-ld-terms { margin: 4px 0 0; font-size: 11px; line-height: 1.7; color: var(--ink-faint); text-align: center; }
.ps-ld-terms .ps-link { font-size: inherit; }

.ps-ld-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.ps-ld-quiet {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ps-ld-quiet:hover:not(:disabled) { color: var(--ink); text-decoration: underline; }
.ps-ld-quiet:disabled { opacity: 0.55; cursor: default; }
.ps-ld-link { align-self: stretch; }

/* ── form pages ── */
.ps-ld-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ps-ld-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: -6px;
  padding: 3px 8px 3px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ps-ld-back:hover { color: var(--ink); background: var(--fill-hover); }
.ps-ld-form { display: flex; flex-direction: column; gap: 12px; }
.ps-ld-hint { font-size: 11px; line-height: 1.6; color: var(--ink-faint); }
.ps-ld-submit { min-height: 40px; border-radius: 999px; }
.ps-ld-error { margin: 0; font-size: 12px; line-height: 1.6; color: var(--danger); overflow-wrap: anywhere; }
.ps-ld-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 12px;
}
.ps-ld-foot-center { justify-content: center; }

/* Phone width: the card fills the width with the 16px gutter from the mask */
@media (max-width: 480px) {
  .ps-ld { padding: 24px 18px 18px; border-radius: 16px; }
  .ps-ld-title { font-size: 18px; }
}

/*
 * The start page and login page of the online browser (computer identity). It uses the skin's set of variables (`src/skins/skins.css` wires --ui-* into
 * --bg-canvas / --ink / --accent and the like), so switching skins and light/dark both follow along, and no color is hardcoded on this page.
 *
 * Class name prefix `ps-` (page start), kept separate from `sp-` of the desktop start page: the two pages coexist, and the desktop app page is left untouched.
 */

.ps {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
}

/*
 * ── Top bar ─────────────────────────────────────────
 * Runs horizontally across the whole page, above the sidebar and the main area: so the positions of the collapse button and the Logo are fixed (user decision, 2026-10-23).
 */
.ps-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-panel);
}
.ps-top-spacer { flex: 1 1 auto; min-width: 0; }

/* Back to home, collapse sidebar: the same kind of small square button, fixed at the far left */
.ps-top-home,
.ps-top-collapse {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--fill-subtle);
  color: var(--ink-muted);
  cursor: pointer;
}
.ps-top-home:hover,
.ps-top-collapse:hover { border-color: var(--hairline-strong); color: var(--ink); }
.ps-top-collapse[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
/* Already on the start page: the house icon lights up but can still be clicked (a fixed position is easier to find than "sometimes absent") */
.ps-top-home[aria-current="page"] { color: var(--accent); border-color: var(--accent); }

.ps-top-title { display: flex; flex-direction: column; min-width: 0; margin-left: 4px; }
.ps-top-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-top-where { font-size: 11px; color: var(--ink-faint); }

/* Account: placed to the left of the buttons on the right */
.ps-top-account { display: flex; align-items: center; gap: 7px; }
.ps-top-account-name {
  max-width: 150px;
  font-size: 12px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Logged out: "Sign in" takes the account slot (issue #2, 2026-11-03); it opens the login dialog */
.ps-top-sign-in {
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ps-top-sign-in:hover { filter: brightness(1.08); }
.ps-top-sign-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The row below the top bar: sidebar + main area */
.ps-body-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

/* ── Left sidebar: all projects ───────────────────────────── */
.ps-side {
  /* The width is remembered by `sideWidth.ts`, which supplies flex-basis in an inline style; the 248 here is only a fallback for when it has not been read */
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 248px;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
  /*
   * No permanent vertical line is drawn (user decision, 2026-10-23): it and the main area are normally one continuous piece,
   * Only when dragging, with the mouse over the gap on the right, does a line light up (`.ps-grip`).
   */
  /* The background is the same as the main area; the list block is **one** panel floating above it (issue #5, see `.ps-side-scroll`) */
  background: var(--bg-canvas);
  transition: flex-basis 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
/*
 * Collapsing: the width goes to 0 (supplied by an inline style) and the whole content slides out.
 * `visibility` is switched only after the animation ends: this way the slide is visible, and once it is done the buttons inside can no longer be reached with Tab.
 */
.ps-side[data-collapsed="true"] {
  visibility: hidden;
  transition:
    flex-basis 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s 220ms;
}
@media (prefers-reduced-motion: reduce) {
  .ps-side,
  .ps-side[data-collapsed="true"] { transition: none; }
}
/* This inner layer pins the original width (supplied by an inline style): when collapsing, the content is not first squeezed into a strip and then disappears */
.ps-side-inner {
  flex: 0 0 auto;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-top: 10px;
}

/*
 * The gap that can be dragged to change the width (shared by both columns, `WidthGrip.tsx`). **No line is drawn at rest**,
 * only when the mouse is over it, or the keyboard focuses it, does an emphasis-color line light up (user, 2026-10-23: no permanent vertical line).
 */
.ps-grip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: col-resize;
  z-index: 3;
  touch-action: none;
}
.ps-grip[data-side="right"] { right: -3px; }
.ps-grip[data-side="left"] { left: -3px; }
.ps-grip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 1px;
  background: transparent;
  transition: background 120ms;
}
.ps-grip:hover::after,
.ps-grip:focus-visible::after { background: var(--accent); }
.ps-grip:focus-visible { outline: none; }
/*
 * The row at the top of the panel (user, 2026-10-24: put both search and new into the panel, side by side in one row). Both are **absolutely positioned** in this row:
 * the new button stays fixed on the right, the search box starts to its left, and when expanded its `right` goes to 0 and **covers** it.
 * Only one `right` changes; neither element is displaced or reflowed: if flex were used to squeeze them, the new button would be squashed and its text would wrap.
 * The collapsed value of that `right` is supplied by `ProjectSidebar.tsx` in an inline style after it measures the width of the new button; the 112px here is only a fallback until it has been measured.
 */
.ps-side-head {
  position: relative;
  flex: 0 0 auto;
  height: 32px;
  margin-bottom: 6px;
}
.ps-side-new {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  color: var(--on-accent);
  background: var(--ui-accent-grad, linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 10%, #7b5cff)));
}
.ps-side-new:hover { filter: brightness(1.06); }
.ps-side-new:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.ps-search {
  position: absolute;
  left: 0;
  top: 0;
  right: 112px;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  /* The background must be opaque: when expanded it has to cover the new button completely, and if it showed through, two layers of text would overlap */
  background: var(--fill-subtle);
  transition: right 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* For people who turned off motion: go straight into place, no sliding */
@media (prefers-reduced-motion: reduce) {
  .ps-search { transition: none; }
}
/* Do not use the built-in clear button: a custom one is drawn (`.ps-search-clear`), and two stacked together look odd */
.ps-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.ps-search-clear {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.ps-search-clear:hover { background: var(--fill-hover); color: var(--ink); }
.ps-search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ps-search:focus-within { border-color: var(--accent); box-shadow: var(--ui-glow); }
.ps-search input[type="search"]:focus { box-shadow: none; }
.ps-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.ps-search input::placeholder { color: var(--ink-faint); }

/*
 * The whole column is **one panel** (issue #5, the user's own words: "change the left list column into one unified panel, no longer divided into several"):
 * The border, background and rounded corners are drawn on this layer; the search-and-new row (`.ps-side-head`) is pinned to its top and does not scroll,
 * below it is a scrollable list, with the group / project / archived sections arranged one after another.
 * Previously each section was its own card (2026-10-23 "make the left side modular like the right side"), with gaps and separate borders between sections; that version has been replaced by this rule.
 * The side panel on the right (`.ps-ext-sec`) is left alone, since it was already several separate sections.
 */
.ps-side-panel {
  flex: 1 1 auto;
  min-height: 0;
  /* 12px left and right: the same position the old new button and search box stood in */
  margin: 2px 12px 12px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
}
.ps-side-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
/* A section is no longer a card: it has no border or background of its own and is not spaced apart from the others, since there is only one panel */
.ps-side-group {
  padding: 0;
  border: 0;
  background: transparent;
}
.ps-side-label {
  padding: 6px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
/* Once a card is collapsed, its header should no longer keep the bottom padding */
.ps-side-group[data-open="false"] .ps-card-head { padding-bottom: 0; }
.ps-side-body { padding: 0 2px 2px; }

/* One row of the sidebar: shared by groups, projects, Agent chats and "All projects" */
.ps-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ps-row:hover { background: var(--fill-hover); }
.ps-row:focus-visible,
.ps-row-main:focus-visible,
.ps-row-caret-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 5px; }

/*
 * After a project row is split into two buttons (issue #15: the little triangle only expands, and the name is what opens the project). The outer .ps-row is a div at that point,
 * and the styles, hover and drag-and-drop markers all still hang on it; the two buttons inside draw no background of their own, so it still looks like one whole row.
 */
.ps-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: inherit;
}
.ps-row-caret-btn { padding: 0; border: 0; background: transparent; font: inherit; line-height: 1; cursor: pointer; }
.ps-row-caret-btn:hover { color: var(--ink); }

/*
 * Other focusable elements: the focus ring is likewise drawn **inside** (`outline-offset` set negative).
 *
 * Why: several ancestors on this page are `overflow: hidden / auto` (the chat column, the small-window picture frame, the timeline frame,
 * the row of thumbnails, the side panel), and the browser's default focus ring is drawn outside the element: in those places half of it gets clipped,
 * which looks like "a glow that is cut off, showing half a box" (this is what the user reported, 2026-10-23). Drawn inside, it can never be clipped.
 *
 * Excluded: the gap for dragging the width (`.ps-grip`) shows focus with a vertical line of its own; the text input boxes themselves draw no ring,
 * focus is shown by the outer ring (the emphasis-color border from `:focus-within`), so drawing another ring would duplicate it; the two progress sliders (`.ps-ext-scrub`, `.ps-detail-scrub`) also draw no rectangular ring and use a `drop-shadow` that follows the outline of the track and the knob instead (issue #31).
 */
.ps-prompt-send:focus-visible,
.ps-mode-btn:focus-visible,
.ps-chip:focus-visible,
.ps-tile:focus-visible,
.ps-ghost-btn:focus-visible,
.ps-link:focus-visible,
.ps-card-toggle:focus-visible,
.ps-ext-action:focus-visible,
.ps-ext-play:focus-visible,
.ps-ext-seg-btn:focus-visible,
.ps-ext-undo:focus-visible,
.ps-ext-row-main:focus-visible,
.ps-detail-play:focus-visible,
.ps-top-home:focus-visible,
.ps-top-collapse:focus-visible,
.ps-chat-vis:focus-visible,
.ps-chat-ext-btn:focus-visible,
.ps-side-new:focus-visible,
.ps-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
/* Current item: when a row is a single button, aria-current is on .ps-row; after it is split into two buttons it is on the main button inside, and the outside is marked with data-current */
.ps-row[aria-current="true"],
.ps-row[data-current="true"] { background: var(--ui-accent-soft, var(--fill-subtle)); color: var(--accent); font-weight: 600; }
.ps-row-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-row-count { flex: 0 0 auto; font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ps-row-caret { flex: 0 0 auto; display: grid; place-items: center; width: 14px; color: var(--ink-muted); transition: transform 120ms; }
.ps-row-caret[data-open="true"] { transform: rotate(90deg); }
.ps-row-icon { flex: 0 0 auto; display: grid; place-items: center; width: 16px; color: var(--ink-muted); }
.ps-row[aria-current="true"] .ps-row-icon,
.ps-row[data-current="true"] .ps-row-icon { color: var(--accent); }

/*
 * Next level. Indentation plus a vertical guide line shows nesting, without per-row corner pieces: corners have to distinguish "the last one" from "a middle one",
 * which easily goes out of alignment as rows multiply. Nest .ps-sub as many levels as needed, and the guide lines naturally come out as many.
 */
.ps-sub {
  margin-left: 15px;
  padding-left: 9px;
  border-left: 1px solid var(--hairline);
}
/* Rows without a next level show no collapse arrow, but the space must be kept, otherwise icons at the same level do not line up */
.ps-row-caret[data-empty="true"] { visibility: hidden; }

/* The Agent row: one step lighter than a project, with the icon in the Agent-specific color (the same color as the avatar on the editor rail) */
.ps-row.is-agent { font-size: 12px; color: var(--ink-muted); }
.ps-row.is-agent:hover { color: var(--ink); }
.ps-row-icon.is-agent { color: var(--ui-agent, var(--accent)); }

/* The small pin icon for pinned items: placed between the name and the count */
.ps-row-pin {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent);
}

/* ── Drag to reorder ─────────────────────────────────── */
/* The row being dragged fades first, so people can see which one they are dragging */
.ps-row[data-dragging] { opacity: 0.45; }
/* Draw an emphasis-color line to show whether the drop target is on the upper or the lower side of the target */
.ps-row[data-drop]::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.ps-row[data-drop="before"]::after { top: -1px; }
.ps-row[data-drop="after"]::after { bottom: -1px; }

/* The row while renaming: same layout as a normal row, with the name cell replaced by an input box */
.ps-row.is-renaming { cursor: default; }
.ps-rename {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--bg-canvas);
  color: var(--ink);
  font: inherit;
  outline: none;
}

/* ── Chat page ───────────────────────────────────── */
/*
 * Two layers, top and bottom: the title bar fills the whole page horizontally, and only the row below is split left/right into "chat + side panel" (user decision, 2026-10-23):
 * the side panel only takes width from the chat block and does not cut the title bar apart.
 * The selector is written as `.ps-main.ps-chat`: `.ps-main` comes later in this stylesheet, and `.ps-chat` alone is also a single class, so it would not beat it.
 */
.ps-main.ps-chat { display: flex; flex-direction: column; overflow: hidden; }
.ps-chat-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.ps-chat-col {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/*
 * ── Right side panel ───────────────────────────────────
 * Not set apart as a column of its own (user decision, 2026-10-23): no divider line and no background of its own, it just floats on the same background as the chat,
 * and each section is a card. So only the padding and the spacing between cards are given here, and the background color is left to the `.ps` layer.
 */
.ps-ext {
  position: relative;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 320px; /* fallback; the actual width is remembered by `sideWidth.ts` and supplied by an inline style */
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
}
.ps-chat-ext-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--fill-subtle);
  color: var(--ink-muted);
  cursor: pointer;
}
.ps-chat-ext-btn:hover { border-color: var(--hairline-strong); color: var(--ink); }
.ps-chat-ext-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* A section is a card, not a horizontal bar. The header classes (`.ps-card-*`) are shared by the left and right columns */
.ps-ext-sec {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
}
.ps-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 4px;
}
.ps-card-toggle {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.ps-card-caret {
  display: grid;
  place-items: center;
  width: 14px;
  color: var(--ink-muted);
  transition: transform 120ms;
}
.ps-card-caret[data-open="true"] { transform: rotate(90deg); }
.ps-card-count { font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ps-ext-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }

/* Placeholder picture */
.ps-ext-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.ps-ext-frame-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
}
.ps-ext-play {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
}
.ps-ext-play:hover { background: rgba(0, 0, 0, 0.68); }

/* The action button at the top right of a section header ("Detail editing"). This used to be the fullscreen button inside the picture frame; the user replaced it on 2026-10-23 */
.ps-ext-action {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--fill-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.ps-ext-action:hover { border-color: var(--accent); color: var(--accent); }

/* The playback bar overlays the bottom of the picture: a bottom-to-top vignette is laid on, so the white text and the slider are legible on any picture */
.ps-ext-transport {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent);
}
.ps-ext-scrub { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
/* No wrapping even when the column is dragged narrower (user, 2026-10-23): this cell neither shrinks nor wraps, and the progress bar yields the width instead */
.ps-ext-time {
  flex: 0 0 auto;
  font-size: 11px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
/*
 * The small text line under a paragraph: when the column is narrow it takes only one line and gets an ellipsis if it does not fit (the full text is on title):
 * user, 2026-10-23: after the right side is shrunk it must not turn into several lines, and this small text line counts too.
 */
.ps-ext-todo {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The changes section: one operation per row */
.ps-ext-rows { display: flex; flex-direction: column; gap: 4px; }
.ps-ext-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--fill-subtle);
}
.ps-ext-row[data-picked] { border-color: var(--accent); }
.ps-ext-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.ps-ext-row-top { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.ps-ext-kind { color: var(--ui-agent, var(--accent)); font-weight: 600; }
.ps-ext-tool { color: var(--ink-muted); font-family: var(--font-mono); font-size: 11px; }
.ps-ext-ms { margin-left: auto; color: var(--ink-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.ps-ext-note { margin: 0; font-size: 11px; line-height: 1.6; color: var(--ink-muted); overflow-wrap: anywhere; }
.ps-ext-undo {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.ps-ext-undo:hover:not(:disabled) { border-color: var(--hairline-strong); color: var(--ink); }
.ps-ext-undo:disabled { opacity: 0.5; cursor: default; }

/* The before / after either-or toggle */
.ps-ext-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--fill-subtle);
}
.ps-ext-seg-btn {
  flex: 1 1 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ps-ext-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.ps-chat-vis {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--fill-subtle);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ps-chat-vis[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.ps-chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ps-chat-list {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 24px 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/*
 * The bubble colors are aligned item by item with the editor right rail's set (`.ai-message` in `src/editor/right/chat/chat.css`):
 * the user's own messages are a **solid emphasis color**, the Agent's messages are a **panel color one step brighter than the message area**, and both sides get bubbles;
 * the corner radius, padding, font size, line height and maximum width are aligned too, so that two chats in one product do not look different.
 *
 * This page used to tune a set of its own (18% emphasis color plus an outline, and no bubble at all on the Agent side), which did not match the software (pointed out by the user, 2026-10-23).
 * The user's own side is right-aligned with no avatar, and the Agent side is left-aligned with the avatar in front: this part is the same as the editor and has not changed.
 */
.ps-msg { display: flex; gap: 10px; }
.ps-msg.is-me { justify-content: flex-end; }
.ps-bubble {
  max-width: 85%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-accent, var(--accent));
  color: var(--ui-accent-fg, var(--on-accent));
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ps-msg-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--fill-subtle);
  color: var(--ui-agent, var(--accent));
}
/* Agent bubble: the same tier as the editor's `.ai-message.assistant`, a panel color one step brighter than the message area background */
.ps-msg-body {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 85%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-panel, var(--bg-panel));
  color: var(--ui-fg, var(--ink));
  font-size: 13px;
  line-height: 1.6;
}
.ps-msg-text {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* What the Agent did in this round. The blocks inside a bubble are separated only by gap and carry no top/bottom margin of their own (same reasoning as the editor's rule) */
.ps-actions {
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--fill-subtle);
}
.ps-actions-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ui-agent, var(--accent));
}
.ps-actions-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-muted);
}

/* No horizontal line above the input box (user decision, 2026-10-23): the input box has its own border, and another line would cut this block apart */
.ps-chat-foot {
  flex: 0 0 auto;
  padding: 10px 24px 16px;
  background: var(--bg-canvas);
}
.ps-chat-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  background: var(--bg-panel);
  box-sizing: border-box;
}
.ps-chat-box:focus-within { border-color: var(--accent); box-shadow: var(--ui-glow); }
.ps-chat-box textarea.ps-chat-input:focus { box-shadow: none; }
.ps-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 24px;
  max-height: 200px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.ps-chat-input::placeholder { color: var(--ink-faint); }
.ps-chat-note {
  max-width: 760px;
  margin: 7px auto 0;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}

/*
 * ── Detail editing ─────────────────────────────────────
 * Fills the whole chat column: **including the input box section** (changed by user decision, 2026-10-26, issue #4: the input box used to stay below it,
 * "feels odd right below the timeline editor"). The input box moves to the chat panel in the side panel (`ExtChatPanel.tsx`),
 * and only when the user collapses the side panel does it drop back below: which one renders is decided by `inPanel` in `ChatView.tsx`, and is not handled here.
 * The stage with a row of transport controls on top, the timeline below. The shape follows the editor in the software. There is a transition when it expands, and for people who turned off animation it goes straight into place.
 */
.ps-detail {
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 10px 16px 12px;
  animation: ps-detail-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ps-detail-in {
  from { opacity: 0; transform: scale(0.97) translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-detail { animation: none; }
}

.ps-detail-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
}
.ps-detail-title { font-size: 13px; font-weight: 600; }
/* "Enter Classic mode": the primary action on this header, in solid emphasis color; the neighboring "Collapse" is secondary and stays ghost */
.ps-mode-btn {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ps-mode-btn:hover { filter: brightness(1.08); }
.ps-detail-sub { font-size: 11px; color: var(--ink-faint); }

.ps-detail-stage {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  container-type: size;
  display: grid;
  place-items: center;
}
.ps-detail-screen {
  position: relative;
  width: min(100cqw, calc(100cqh * var(--stage-w, 16) / var(--stage-h, 9)));
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}
/* Viewfinder frame at the four corners */
.ps-detail-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}
.ps-detail-corner.is-tl { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.ps-detail-corner.is-tr { right: 8px; top: 8px; border-left: 0; border-bottom: 0; }
.ps-detail-corner.is-bl { left: 8px; bottom: 8px; border-right: 0; border-top: 0; }
.ps-detail-corner.is-br { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }

.ps-detail-transport {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
}
.ps-detail-play {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.ps-detail-play:hover { filter: brightness(1.08); }
.ps-detail-scrub { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }

/*
 * Progress slider (`input[type="range"]`, issue #31):
 *   1. The global `src/skins/motion.css` attaches `box-shadow: var(--ui-glow)` to every `[data-skin] input:focus` (specificity 0-2-1).
 *      `box-shadow` is drawn outward along the rectangular box of the `<input>` and cuts out the inside of the box; applied to a progress bar with a thin track and a transparent outer ring,
 *      it draws a rectangular box with a truncated glow. Here higher specificity is used to clear `box-shadow` and `outline`, and `drop-shadow` is used instead
 *      so that the glow follows the outline of the track and the knob themselves.
 *   2. The transport bar and sliders disable text selection (`user-select: none`) and make `caret-color` transparent: to avoid, when dragging the progress bar or clicking slightly off into
 *      the blank space above or below the slider, the whole content being selected, and the browser selection landing inside `<input type="range">` and drawing a vertical caret next to the knob.
 */
.ps-detail-head,
.ps-detail-stage,
.ps-detail-transport,
.ps-stage-over,
.ps-ext-transport,
.ps-card-head {
  user-select: none;
  -webkit-user-select: none;
}
.ps-ext-scrub,
.ps-detail-scrub {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  cursor: pointer;
}
.ps-ext-transport input.ps-ext-scrub:focus,
.ps-detail-transport input.ps-detail-scrub:focus,
[data-skin] input.ps-ext-scrub:focus,
[data-skin] input.ps-detail-scrub:focus {
  box-shadow: none;
  outline: none;
}
.ps-ext-scrub:focus-visible,
.ps-detail-scrub:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 55%, transparent));
}
@media (prefers-reduced-motion: no-preference) {
  .ps-ext-scrub:hover,
  .ps-ext-scrub:focus,
  .ps-detail-scrub:hover,
  .ps-detail-scrub:focus {
    filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 55%, transparent));
  }
}
.ps-detail-time {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/*
 * The frame of the real timeline (`TimelineView` in `src/editor/timeline/`). It is `h-full` itself,
 * so a definite height has to be given here: with auto it cannot measure a height and the whole strip would collapse to 0.
 * The stage above is `flex: 1` and takes what is left.
 *
 * The `flex-basis` below is the default height **before any dragging** and follows the window; after one drag, `DetailEdit.tsx`
 * overrides it with an inline `flex-basis` (issue #40), and double-clicking the gap goes back to this one.
 * `max-height` is the same number as the upper limit of the drag bar (`TL_MAX_RATIO`): the stored height will not squeeze the stage out of existence even in a small window.
 * The 8px above is the height of the gap itself (`h-2` of `.pc-gutter`), which takes over the old `margin-top: 8px`.
 */
.ps-detail-tl {
  flex: 0 0 clamp(240px, 42%, 420px);
  min-height: 0;
  max-height: 70%;
  border-radius: 8px;
  overflow: hidden;
}
/* ── Row context menu ─────────────────────────────── */
.ps-menu {
  position: fixed;
  z-index: 40;
  min-width: 168px;
  padding: 4px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}
.ps-menu-head {
  padding: 5px 8px 6px;
  font-size: 11px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-menu-item {
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ps-menu-item:hover,
.ps-menu-item:focus-visible { background: var(--fill-hover); outline: none; }
.ps-menu-item.is-danger { color: var(--danger); }
.ps-menu-item.is-danger:hover,
.ps-menu-item.is-danger:focus-visible { background: color-mix(in oklab, var(--danger) 16%, transparent); }
.ps-menu-sep { height: 1px; margin: 4px 2px; background: var(--hairline); }


/* Account avatar: the hue is hashed from the account name, the same approach as the AI role avatar (src/editor/right/RoleAvatar.tsx), no image */
.ps-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

/* ── Main area ─────────────────────────────────────── */
.ps-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ps-body {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ps-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 0 10px;
  text-align: center;
}
.ps-hero-kicker { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-muted); }
.ps-hero-title { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
.ps-hero-sub { font-size: 13px; color: var(--ink-muted); }

/* ── Create a project with one sentence ───────────────────────────── */
.ps-prompt {
  width: 100%;
  max-width: 760px;
  margin: 14px auto 0;
  padding: 12px 14px 8px;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  background: var(--bg-panel);
  box-sizing: border-box;
}
/*
 * Focus glow: the global style ("focus glow shadow" in `src/skins/motion.css`) attaches to every input / textarea
 * `box-shadow: var(--ui-glow)`. But the text input boxes on this page are all **nested in a rounded container** and have no rounded corners themselves,
 * so that rectangular halo inside a rounded box looks like "a box inside a box" (this is what the user reported, 2026-10-23).
 * So: the halo is moved onto the outer rounded container (following the rounded corners), and the input box inside does not glow itself.
 */
.ps-prompt:focus-within { border-color: var(--accent); box-shadow: var(--ui-glow); }
/* The selector is this long to beat the global `[data-skin] textarea:focus` (specificity 0-2-1); anything shorter would not beat it */
.ps-prompt textarea.ps-prompt-input:focus { box-shadow: none; }
.ps-prompt-input {
  display: block;
  width: 100%;
  min-height: 58px;
  max-height: 180px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.ps-prompt-input::placeholder { color: var(--ink-faint); }
.ps-prompt-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.ps-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ps-chip:hover { border-color: var(--hairline-strong); color: var(--ink); }
.ps-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/*
 * The call-to-action one (upload media): solid emphasis color, one step heavier than the aspect ratio chips next to it (user decision, 2026-10-23).
 * The border is kept but transparent, so the box size calculation matches the neighbors, and the weight is set apart by padding and font weight alone.
 */
.ps-chip.is-cta {
  padding: 6px 13px;
  font-weight: 650;
  color: var(--on-accent);
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 1px 8px color-mix(in oklab, var(--accent) 35%, transparent);
}
.ps-chip.is-cta:hover {
  color: var(--on-accent);
  border-color: transparent;
  background: var(--accent);
  filter: brightness(1.08);
}
.ps-chip-plus { font-size: 15px; line-height: 1; }
.ps-prompt-send {
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--on-accent);
  background: var(--accent);
}
.ps-prompt-send:disabled { opacity: 0.4; cursor: default; }
.ps-prompt-send:not(:disabled):hover { filter: brightness(1.08); }
.ps-prompt-note {
  max-width: 760px;
  margin: 8px auto 0;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

/* ── The row of project thumbnails ─────────────────────────── */
.ps-rail { margin-top: 28px; }
.ps-rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ps-rail-title { margin: 0; font-size: 14px; font-weight: 600; }
.ps-rail-spacer { flex: 1 1 auto; }
.ps-page-at { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ps-page-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: var(--fill-subtle);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
}
.ps-page-btn:hover:not(:disabled) { border-color: var(--hairline-strong); }
.ps-page-btn:disabled { opacity: 0.35; cursor: default; }

.ps-strip {
  display: flex;
  gap: 12px;
  overflow: hidden;
}
.ps-tile {
  flex: 0 0 196px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.ps-tile { border-radius: 12px; }

/* The outer frame of a thumbnail is a fixed 16:9; the project's own aspect ratio is fitted inside it proportionally, so the row has equal heights while portrait and square screens are still recognizable */
.ps-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  background: var(--fill-subtle);
  display: grid;
  place-items: center;
}
.ps-tile:hover .ps-frame { border-color: var(--hairline-strong); }
.ps-shot {
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.ps-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.ps-tile-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-tile-meta { font-size: 11px; color: var(--ink-faint); }

/* First cell: Create A New */
.ps-tile-new .ps-frame {
  border-style: dashed;
  border-color: var(--hairline-strong);
  background: transparent;
  gap: 6px;
  grid-auto-flow: row;
  align-content: center;
}
.ps-tile-new:hover .ps-frame { border-color: var(--accent); color: var(--accent); }
.ps-tile-new-plus { font-size: 24px; line-height: 1; }
.ps-tile-new-text { font-size: 12px; font-weight: 600; }

.ps-empty {
  padding: 28px;
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  color: var(--ink-muted);
  font-size: 12px;
  text-align: center;
}

.ps-muted { font-size: 12px; color: var(--ink-muted); }
.ps-ghost-btn {
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: var(--fill-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ps-ghost-btn:hover:not(:disabled) { border-color: var(--hairline-strong); }
.ps-ghost-btn:disabled { opacity: 0.55; cursor: default; }
.ps-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}
.ps-link:hover { text-decoration: underline; }

/* ── Login page ───────────────────────────────────── */
.ps-login {
  height: 100%;
  min-height: 0;
  display: flex;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
}
/*
 * A block on the left and the form on the right: at first glance in the browser it has the same tone as the desktop app.
 * The left block is a dark base + parametric cutouts (`BrandLattice.tsx`), and the brand gradient shows only through the cutouts:
 * it used to be a full-bleed, highly saturated cyan to purple, which was too glaring next to the dark form on the right (said by the user, 2026-10-23).
 */
.ps-login-art {
  position: relative;
  overflow: hidden;
  flex: 1 1 46%;
  min-width: 0;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  color: var(--ink);
  background: var(--bg-panel);
  border-right: 1px solid var(--hairline);
}
@media (min-width: 900px) { .ps-login-art { display: flex; } }
/*
 * Aurora base: three color blobs are moving, a layer of striped frosted glass covers them, and a layer of noise is laid on top (see `BrandAurora.tsx` for the drawing method and trade-offs).
 * All parameters are here: change these numbers to change the pattern, no need to touch the TSX.
 */
.ps-aurora {
  --aurora-blur: 64px;      /* how blurred the color blobs are */
  --aurora-alpha: 0.5;      /* how dense the color blobs are: this block sits next to the dark form, and too dense would be glaring */
  --stripe-width: 9px;      /* how wide one frosted stripe is */
  --stripe-gap: 13px;       /* how much to leave between two stripes (this part is clear) */
  --stripe-angle: 104deg;   /* tilt angle of the stripes */
  --glass-blur: 16px;       /* how much the frosting blurs */
  --grain-alpha: 0.055;     /* how heavy the grain is */
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* The color blobs are to be blurred into one patch, so this layer sets a base color of its own first, to keep the blurred edges from showing the canvas color */
  background: var(--bg-panel);
}
/*
 * Content sits on top of the background. The background layer has two implementations: the CSS aurora (`.ps-aurora`) and the WebGL canvas (`.ps-brand-canvas`,
 * in `brandCanvas.css`), and neither may be lifted up, otherwise they would cover the heading. **If another background implementation is added later, remember to add it to this exclusion as well.**
 * `:where()` makes what is inside the parentheses count for no specificity, so the backstop override in `brandCanvas.css` still beats this one.
 */
.ps-login-art > *:not(:where(.ps-aurora, .ps-brand-canvas)) { position: relative; z-index: 1; }

.ps-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--aurora-blur));
  opacity: var(--aurora-alpha);
  will-change: transform;
}
/* The three blobs each run on their own cycle, and the durations do not divide one another, so together they do not look like they repeat */
.ps-aurora-blob.is-a {
  left: -18%; top: 4%;
  width: 78%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, var(--ui-accent, #00DBDB), transparent 68%);
  animation: ps-drift-a 23s ease-in-out infinite alternate;
}
.ps-aurora-blob.is-b {
  right: -24%; top: 26%;
  width: 86%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, var(--ui-accent-2, #6F69FC), transparent 70%);
  animation: ps-drift-b 31s ease-in-out infinite alternate;
}
.ps-aurora-blob.is-c {
  left: 8%; bottom: -22%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--ui-accent, #00DBDB) 55%, var(--ui-accent-2, #6F69FC)), transparent 66%);
  animation: ps-drift-c 19s ease-in-out infinite alternate;
}
@keyframes ps-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14%, 10%, 0) scale(1.18); }
}
@keyframes ps-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to   { transform: translate3d(-16%, -12%, 0) scale(0.92); }
}
@keyframes ps-drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(10%, -16%, 0) scale(1.22); }
}

/*
 * Striped frosted glass: a whole-layer backdrop-filter blurs the aurora behind it, then a stripe mask keeps only diagonal bars:
 * between the stripes this layer is absent and the aurora stays clear, so it is cut into alternating light and dark bands.
 * The stripes themselves also get a touch of very faint white, to give the frosted side an edge.
 */
.ps-aurora-glass {
  position: absolute;
  inset: -2%;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
  background: repeating-linear-gradient(
    var(--stripe-angle),
    rgba(255, 255, 255, 0.05) 0 var(--stripe-width),
    transparent var(--stripe-width) calc(var(--stripe-width) + var(--stripe-gap))
  );
  mask-image: repeating-linear-gradient(
    var(--stripe-angle),
    #000 0 var(--stripe-width),
    transparent var(--stripe-width) calc(var(--stripe-width) + var(--stripe-gap))
  );
  -webkit-mask-image: repeating-linear-gradient(
    var(--stripe-angle),
    #000 0 var(--stripe-width),
    transparent var(--stripe-width) calc(var(--stripe-width) + var(--stripe-gap))
  );
}

/* Noise: grain generated by a filter, laid on top to remove the plastic look of the large color areas */
.ps-aurora-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--grain-alpha);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* People who turned off animation only see the still frame, with the composition unchanged */
@media (prefers-reduced-motion: reduce) {
  .ps-aurora-blob { animation: none; }
}
.ps-login-art-title { margin: 0; font-size: 26px; font-weight: 650; line-height: 1.35; }
.ps-login-art-sub { margin: 10px 0 0; font-size: 14px; color: var(--ink-muted); max-width: 34ch; line-height: 1.7; }
.ps-login-art-foot { font-size: 12px; color: var(--ink-faint); }

.ps-login-panel {
  flex: 1 1 54%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
}
.ps-login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-login-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.ps-login-title { margin: 0; font-size: 20px; font-weight: 650; }
.ps-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-muted); }
.ps-field input {
  padding: 9px 11px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--bg-panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.ps-field input:focus { border-color: var(--accent); }
.ps-check { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-muted); cursor: pointer; }
.ps-primary-btn {
  margin-top: 4px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--on-accent);
  background: var(--accent);
}
.ps-primary-btn:hover:not(:disabled) { filter: brightness(1.08); }
.ps-primary-btn:disabled { opacity: 0.5; cursor: default; }
.ps-login-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
}
.ps-login-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  font-size: 11px;
  color: var(--ink-faint);
}
.ps-login-sep::before,
.ps-login-sep::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--hairline); }
/* The third-party login block: only a placeholder for now, with the logic to be connected by the account side (see the comment in OnlineLogin.tsx) */
.ps-login-oauth { display: flex; flex-direction: column; gap: 8px; }
.ps-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: var(--bg-panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ps-oauth-btn:hover { background: var(--fill-hover); }
.ps-oauth-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  font-size: 11px;
  font-weight: 700;
}

.ps-login-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-faint);
}

/* Narrow window: the sidebar collapses and the main area scrolls on its own */
@media (max-width: 860px) {
  /* The width is set by the user dragging and is remembered on this machine, so it is no longer changed here according to the window width */
  .ps-body { padding: 0 16px 32px; }
  .ps-hero-title { font-size: 24px; }
}

/*
 * ── Additions made when connecting the business layer (2026-10-23, `docs/reports/AGENT-claude-vibe-wire.md`)───────────
 * The UI shape has been finalized by the user, so only the states that exist with real data are added here: sending state, error, empty state, loading, real picture, archived, join by link.
 * Always use the existing theme variables, and let the look follow the neighboring existing tier (small text follows `.ps-chat-note`, cards follow `.ps-menu`).
 */

/* Login page shell: the error and "Connecting" float at the top of the page */
.ps-vibe-login { position: relative; height: 100%; min-height: 0; }
.ps-vibe-login[data-busy] .ps-login-form { opacity: 0.6; pointer-events: none; }
.ps-vibe-login-error,
.ps-vibe-login-busy {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  max-width: min(420px, calc(100% - 28px));
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-panel);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.ps-vibe-login-error { border-color: var(--danger); color: var(--danger); }
.ps-vibe-loading {
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
}

/* When the small text line on the start page shows an error */
.ps-prompt-note.is-err { color: var(--danger); }

/* Sidebar: one status / hint line; when New is unavailable */
.ps-side-hint {
  margin: 4px 8px 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-faint);
}
.ps-side-hint .ps-link { margin-left: 6px; }
.ps-side-new:disabled { opacity: 0.5; cursor: default; filter: none; }
/* Both are needed: `.is-blocked` is the row grayed out when a guest opens a second chat (claude/guest-one-chat),
   `:disabled` is the group row grayed out when a guest has no groups (claude/groups-local-cloud). Same style, different origins */
.ps-row.is-blocked,
.ps-row:disabled { opacity: 0.5; cursor: default; }
.ps-row.is-archived .ps-row-icon { opacity: 0.55; }
.ps-tile:disabled { opacity: 0.5; cursor: default; }

/* Thumbnail: the real picture covers the whole cell, and the aspect ratio frame stays as before */
.ps-shot { position: relative; overflow: hidden; }
.ps-shot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Real picture (the editor's preview, in the mobile app's picture-only form): fills the container, with the play button and playback bar laid on top */
.ps-stage { position: relative; overflow: hidden; background: #000; }
.ps-stage .pc-pv--mobile { position: absolute; inset: 0; padding: 0; gap: 0; height: auto; }
.ps-stage .pc-pv--mobile .pc-pv-stage { border-radius: 0; }
.ps-stage .pc-pv--mobile .pc-pv-frame { border: 0; }
.ps-stage .pc-pv--mobile .pc-pv-corner { display: none; }
.ps-stage-over { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; }
.ps-ext-frame-img { background: var(--fill-subtle); }
.ps-ext-frame-img img { width: 100%; height: 100%; object-fit: contain; }

/* Chat: the sending state and sender on the user's own side; in-progress and error on the Agent side; the example sentences of an empty chat; the hint at the top */
.ps-me-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 85%; }
.ps-me-col .ps-bubble { max-width: 100%; }
.ps-msg-sender { font-size: 11px; color: var(--ink-faint); }
.ps-msg-state { font-size: 11px; color: var(--ink-faint); }
.ps-msg-state.is-err { color: var(--danger); }
.ps-md > :first-child { margin-top: 0; }
.ps-md > :last-child { margin-bottom: 0; }
.ps-md p { margin: 0 0 6px; }
.ps-msg-live { color: var(--ink-muted); font-size: 12px; }
.ps-msg-err { color: var(--danger); }
.ps-actions-list { list-style: none; padding-left: 0; }
.ps-actions-list li[data-state="err"],
.ps-actions-list li[data-state="ask"] { color: var(--danger); }
.ps-op-mark { display: inline-block; width: 14px; color: var(--ui-agent, var(--accent)); }
.ps-op-report { margin-top: 4px; font-weight: 600; color: var(--ink); }
.ps-chat-empty { display: grid; place-items: center; padding: 48px 0; }
.ps-chat-example {
  padding: 9px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ps-chat-example:hover { border-color: var(--accent); color: var(--accent); }
.ps-chat-banner {
  flex: 0 0 auto;
  max-width: 760px;
  width: calc(100% - 48px);
  margin: 10px auto 0;
  padding: 8px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--fill-subtle);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.ps-chat-input:disabled { cursor: not-allowed; }

/* Join by link: borrows the look of the context menu and is pinned at the bottom right of the top bar */
.ps-menu.ps-join {
  position: fixed;
  top: 52px;
  right: 16px;
  left: auto;
  width: min(340px, calc(100vw - 32px));
  z-index: 40;
}
.ps-join-form { display: flex; flex-direction: column; gap: 10px; padding: 6px 10px 10px; }
.ps-join-msg { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ps-join-msg[role="alert"] { color: var(--danger); }
.ps-join-actions { display: flex; justify-content: flex-end; gap: 8px; }

/*
 * ── The chat panel in the side panel ─────────────────────────
 * User decision, 2026-10-26 (issue #4): once "detail editing" is expanded, the timeline editing area fills the whole chat area (input box included),
 * The chat moves into this side panel: one more standalone card next to the two sections above, with an entrance animation.
 * Height follows option A: the two sections above spread out as usual, this block takes whatever is left of the panel; the input box is pinned to its own bottom.
 * The component is in `ExtChatPanel.tsx`; the input box is the very same one from the bottom of the chat column, moved over (`Composer.tsx`).
 */
.ps-ext-chat {
  flex: 1 1 auto;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg-panel);
  transform-origin: 100% 0;
  animation: ps-ext-chat-in 300ms cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes ps-ext-chat-in {
  0% { opacity: 0; transform: translateX(28px) scale(0.94); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-ext-chat { animation: none; }
}
.ps-ext-chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-bottom: 1px solid var(--hairline);
}
.ps-ext-chat-title { font-size: 12px; font-weight: 600; }
.ps-ext-chat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/*
 * The bubbles in this panel are a separate set (`ps-x…`, where x = the one in the side panel), kept apart from the chat column's `.ps-msg`:
 * That one is a 760px-wide reading layout, this one goes down to 250px at the narrowest (`EXT_WIDTH.min` in `sideWidth.ts`),
 * Font size, padding and avatars are all one size smaller. The avatar goes on the right for your own side and on the left for the Agent side, the same as in the chat column.
 */
.ps-xmsg { display: flex; gap: 7px; }
.ps-xmsg.is-me { justify-content: flex-end; }
.ps-xbubble {
  max-width: 90%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--ui-accent, var(--accent));
  color: var(--ui-accent-fg, var(--on-accent));
  font-size: 12px;
  line-height: 1.55;
}
.ps-xbody {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 92%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 9px;
  border-radius: var(--ui-radius-lg, 8px);
  background: var(--fill-subtle);
  color: var(--ui-fg, var(--ink));
  font-size: 12px;
  line-height: 1.55;
}
.ps-xavatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--fill-subtle);
  color: var(--ui-agent, var(--accent));
}
.ps-xtext { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/*
 * The collapsed ones (issue #4: "After two sentences, truncate to "...". Keep only the latest Agent reply"):
 * The text is truncated to two lines, with the trailing "…" added by line-clamp itself; this turn's "Agent actions" are folded away as one block,
 * with a separate "N more actions" line. Click to expand to the full text. Only text that really got truncated gets this look; a short sentence that fits on one line doesn't get it
 * (Whether truncation happened is measured, see `Foldable` in `ExtChatPanel.tsx`).
 */
.ps-xbubble[data-more],
.ps-xbody[data-more] { cursor: zoom-in; }
.ps-xbubble[data-folded] .ps-xtext,
.ps-xbody[data-folded] .ps-xtext {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}
.ps-xbody[data-folded] .ps-xops,
.ps-xbody[data-folded] .ps-xlive { display: none; }
.ps-xmore { align-self: flex-start; font-size: 11px; color: var(--ink-faint); }
.ps-xmsg.is-me .ps-xmore { color: var(--ui-accent-fg, var(--on-accent)); opacity: 0.65; }
.ps-xlatest { font-size: 10px; color: var(--ink-faint); padding: 0 2px 4px; }

.ps-xops {
  padding: 6px 8px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: var(--bg-panel);
}
.ps-xops-head { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--ui-agent, var(--accent)); }
.ps-xops-list { margin: 4px 0 0; padding-left: 16px; font-size: 11px; line-height: 1.7; color: var(--ink-muted); }
.ps-xlive { margin: 0; font-size: 11px; color: var(--ink-muted); }
.ps-xlive.is-err { color: var(--danger); }

/* Styles that apply once the input box has moved in: narrower outer frame, and the small line of text at the bottom is left-aligned instead of centered */
.ps-ext-chat-foot {
  flex: 0 0 auto;
  padding: 8px;
  border-top: 1px solid var(--hairline);
}
.ps-ext-chat-foot .ps-chat-box {
  max-width: none;
  padding: 7px 9px;
  border-radius: 11px;
  background: var(--bg-canvas);
}
.ps-ext-chat-foot .ps-chat-input { font-size: 12.5px; line-height: 1.55; min-height: 20px; max-height: 110px; }
.ps-ext-chat-foot .ps-prompt-send { width: 26px; height: 26px; }
.ps-ext-chat-foot .ps-chat-note { max-width: none; margin: 6px 2px 0; text-align: left; }
/*
 * Styles for Desktop New Project Modal (Issue #7).
 * Uses global --ui-* theme tokens to match editor & start page skins in both light and dark modes.
 */

.npd-mask {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(3px);
}

.npd-dialog {
  width: min(600px, 94vw);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--ui-border-strong, rgba(255, 255, 255, 0.14));
  background: var(--ui-panel, #181a1f);
  color: var(--ui-fg, #eceef2);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.48);
  font-family: var(--font-sans, system-ui, sans-serif);
  overflow: hidden;
}

.npd-dialog.is-wide {
  width: min(880px, 95vw);
}

.npd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--ui-border, rgba(255, 255, 255, 0.08));
}

.npd-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ui-fg);
}

.npd-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--ui-fg-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.npd-close:hover {
  background: var(--ui-panel-2);
  color: var(--ui-fg);
}

.npd-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.npd-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.npd-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.npd-choice:hover {
  border-color: color-mix(in oklab, var(--ui-border-strong) 55%, var(--ui-fg));
}

.npd-choice.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft, rgba(79, 140, 255, 0.14));
}

.npd-choice-title {
  font-size: 13.5px;
  font-weight: 600;
}

.npd-choice-sub {
  font-size: 11.5px;
  color: var(--ui-fg-muted);
  line-height: 1.35;
}

.npd-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

@media (max-width: 620px) {
  .npd-choices,
  .npd-meta-grid {
    grid-template-columns: 1fr;
  }
}

.npd-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.npd-field > label,
.npd-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ui-fg-muted);
}

.npd-field .pc-dialog-input,
.npd-field .pc-dialog-select {
  margin-left: 0;
  width: 100%;
  height: 32px;
  box-sizing: border-box;
}

.npd-ratios {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.npd-ratio-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.npd-ratio-btn.is-on {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft, rgba(79, 140, 255, 0.14));
  color: var(--ui-accent);
  font-weight: 600;
}

.npd-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 9px;
  border: 1px solid var(--ui-border);
  background: var(--ui-panel-2);
}

.npd-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 560px) {
  .npd-more-grid {
    grid-template-columns: 1fr;
  }
}

.npd-more-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border-radius: 9px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-panel-2);
  color: var(--ui-fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.npd-more-item:hover {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft, rgba(79, 140, 255, 0.1));
}

.npd-more-item > b {
  font-size: 13.5px;
  font-weight: 600;
}

.npd-more-item > span {
  font-size: 12px;
  color: var(--ui-fg-muted);
  line-height: 1.45;
}

.npd-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.npd-member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.npd-member-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--ui-border);
  background: var(--ui-panel);
  font-size: 12px;
}

.npd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 20px;
  border-top: 1px solid var(--ui-border, rgba(255, 255, 255, 0.08));
  background: var(--ui-panel);
}

.npd-foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
