/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700;800&family=Roboto+Slab:wght@500;600;700&display=swap");
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, 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;
    --spacing: 0.25rem;
    --container-md: 28rem;
    --container-2xl: 42rem;
    --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-xl: 1.25rem;
    --text-xl--line-height: calc(1.75 / 1.25);
    --font-weight-semibold: 600;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --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, ui-sans-serif, system-ui, 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 {
    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 {
  .invisible {
    visibility: hidden;
  }
  .visible {
    visibility: visible;
  }
  .relative {
    position: relative;
  }
  .sticky {
    position: sticky;
  }
  .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;
    }
  }
  .mx-auto {
    margin-inline: auto;
  }
  .mt-2 {
    margin-top: calc(var(--spacing) * 2);
  }
  .mt-4 {
    margin-top: calc(var(--spacing) * 4);
  }
  .mt-5 {
    margin-top: calc(var(--spacing) * 5);
  }
  .mt-6 {
    margin-top: calc(var(--spacing) * 6);
  }
  .mt-8 {
    margin-top: calc(var(--spacing) * 8);
  }
  .mr-2 {
    margin-right: calc(var(--spacing) * 2);
  }
  .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-5 {
    margin-bottom: calc(var(--spacing) * 5);
  }
  .mb-10 {
    margin-bottom: calc(var(--spacing) * 10);
  }
  .ml-2 {
    margin-left: calc(var(--spacing) * 2);
  }
  .block {
    display: block;
  }
  .flex {
    display: flex;
  }
  .grid {
    display: grid;
  }
  .hidden {
    display: none;
  }
  .inline {
    display: inline;
  }
  .table {
    display: table;
  }
  .h-2 {
    height: calc(var(--spacing) * 2);
  }
  .h-5 {
    height: calc(var(--spacing) * 5);
  }
  .h-8 {
    height: calc(var(--spacing) * 8);
  }
  .h-11 {
    height: calc(var(--spacing) * 11);
  }
  .h-12 {
    height: calc(var(--spacing) * 12);
  }
  .min-h-\[720px\] {
    min-height: 720px;
  }
  .min-h-screen {
    min-height: 100vh;
  }
  .w-2 {
    width: calc(var(--spacing) * 2);
  }
  .w-5 {
    width: calc(var(--spacing) * 5);
  }
  .w-8 {
    width: calc(var(--spacing) * 8);
  }
  .w-11 {
    width: calc(var(--spacing) * 11);
  }
  .w-12 {
    width: calc(var(--spacing) * 12);
  }
  .w-full {
    width: 100%;
  }
  .max-w-2xl {
    max-width: var(--container-2xl);
  }
  .max-w-\[1200px\] {
    max-width: 1200px;
  }
  .max-w-\[1320px\] {
    max-width: 1320px;
  }
  .max-w-md {
    max-width: var(--container-md);
  }
  .min-w-0 {
    min-width: calc(var(--spacing) * 0);
  }
  .flex-shrink {
    flex-shrink: 1;
  }
  .shrink-0 {
    flex-shrink: 0;
  }
  .border-collapse {
    border-collapse: collapse;
  }
  .transform {
    transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
  }
  .resize {
    resize: both;
  }
  .flex-col {
    flex-direction: column;
  }
  .flex-wrap {
    flex-wrap: wrap;
  }
  .items-center {
    align-items: center;
  }
  .items-start {
    align-items: flex-start;
  }
  .justify-between {
    justify-content: space-between;
  }
  .justify-center {
    justify-content: center;
  }
  .justify-end {
    justify-content: flex-end;
  }
  .gap-2 {
    gap: calc(var(--spacing) * 2);
  }
  .gap-3 {
    gap: calc(var(--spacing) * 3);
  }
  .gap-4 {
    gap: calc(var(--spacing) * 4);
  }
  .gap-5 {
    gap: calc(var(--spacing) * 5);
  }
  .gap-6 {
    gap: calc(var(--spacing) * 6);
  }
  .space-y-1 {
    :where(& > :not(:last-child)) {
      --tw-space-y-reverse: 0;
      margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));
      margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
    }
  }
  .space-y-2 {
    :where(& > :not(:last-child)) {
      --tw-space-y-reverse: 0;
      margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
      margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
    }
  }
  .space-y-4 {
    :where(& > :not(:last-child)) {
      --tw-space-y-reverse: 0;
      margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));
      margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
    }
  }
  .space-y-6 {
    :where(& > :not(:last-child)) {
      --tw-space-y-reverse: 0;
      margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));
      margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
    }
  }
  .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .overflow-hidden {
    overflow: hidden;
  }
  .overflow-x-auto {
    overflow-x: auto;
  }
  .rounded {
    border-radius: 0.25rem;
  }
  .rounded-full {
    border-radius: calc(infinity * 1px);
  }
  .rounded-lg {
    border-radius: var(--radius-lg);
  }
  .rounded-xl {
    border-radius: var(--radius-xl);
  }
  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }
  .border-0 {
    border-style: var(--tw-border-style);
    border-width: 0px;
  }
  .bg-transparent {
    background-color: transparent;
  }
  .object-cover {
    object-fit: cover;
  }
  .p-2 {
    padding: calc(var(--spacing) * 2);
  }
  .p-4 {
    padding: calc(var(--spacing) * 4);
  }
  .p-6 {
    padding: calc(var(--spacing) * 6);
  }
  .p-8 {
    padding: calc(var(--spacing) * 8);
  }
  .p-10 {
    padding: calc(var(--spacing) * 10);
  }
  .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-5 {
    padding-inline: calc(var(--spacing) * 5);
  }
  .px-6 {
    padding-inline: calc(var(--spacing) * 6);
  }
  .py-0 {
    padding-block: calc(var(--spacing) * 0);
  }
  .py-0\.5 {
    padding-block: calc(var(--spacing) * 0.5);
  }
  .py-1 {
    padding-block: calc(var(--spacing) * 1);
  }
  .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-20 {
    padding-block: calc(var(--spacing) * 20);
  }
  .pr-12 {
    padding-right: calc(var(--spacing) * 12);
  }
  .pl-2 {
    padding-left: calc(var(--spacing) * 2);
  }
  .pl-5 {
    padding-left: calc(var(--spacing) * 5);
  }
  .text-center {
    text-align: center;
  }
  .text-right {
    text-align: right;
  }
  .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-\[15px\] {
    font-size: 15px;
  }
  .text-\[26px\] {
    font-size: 26px;
  }
  .text-\[30px\] {
    font-size: 30px;
  }
  .leading-7 {
    --tw-leading: calc(var(--spacing) * 7);
    line-height: calc(var(--spacing) * 7);
  }
  .font-semibold {
    --tw-font-weight: var(--font-weight-semibold);
    font-weight: var(--font-weight-semibold);
  }
  .whitespace-pre-wrap {
    white-space: pre-wrap;
  }
  .uppercase {
    text-transform: uppercase;
  }
  .line-through {
    text-decoration-line: line-through;
  }
  .underline {
    text-decoration-line: underline;
  }
  .outline {
    outline-style: var(--tw-outline-style);
    outline-width: 1px;
  }
  .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,);
  }
  .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));
  }
  .ease-in-out {
    --tw-ease: var(--ease-in-out);
    transition-timing-function: var(--ease-in-out);
  }
  .outline-none {
    --tw-outline-style: none;
    outline-style: none;
  }
  .sm\:px-6 {
    @media (width >= 40rem) {
      padding-inline: calc(var(--spacing) * 6);
    }
  }
  .md\:text-\[34px\] {
    @media (width >= 48rem) {
      font-size: 34px;
    }
  }
  .lg\:flex-row {
    @media (width >= 64rem) {
      flex-direction: row;
    }
  }
  .lg\:items-center {
    @media (width >= 64rem) {
      align-items: center;
    }
  }
  .lg\:justify-between {
    @media (width >= 64rem) {
      justify-content: space-between;
    }
  }
  .lg\:px-8 {
    @media (width >= 64rem) {
      padding-inline: calc(var(--spacing) * 8);
    }
  }
  .xl\:block {
    @media (width >= 80rem) {
      display: block;
    }
  }
  .xl\:grid-cols-\[260px_1fr\] {
    @media (width >= 80rem) {
      grid-template-columns: 260px 1fr;
    }
  }
  .xl\:grid-cols-\[300px_1fr\] {
    @media (width >= 80rem) {
      grid-template-columns: 300px 1fr;
    }
  }
  .xl\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(320px\,0\.65fr\)\] {
    @media (width >= 80rem) {
      grid-template-columns: minmax(0,1.35fr) minmax(320px,0.65fr);
    }
  }
}
@layer base {
  *, *::before, *::after {
    box-sizing: border-box;
  }
  :root {
    --bg: #e6e1d8;
    --bg-deep: #ddd7ce;
    --surface: #fbfaf7;
    --surface-muted: #f2eee6;
    --surface-strong: #ece6dc;
    --border: #d7d0c5;
    --border-strong: #c4bcaf;
    --text: #1f211d;
    --muted: #586157;
    --muted-soft: #7d847b;
    --primary: #6d8f81;
    --primary-strong: #557365;
    --primary-soft: #dfe8e1;
    --success-bg: #e4ede6;
    --success-text: #4e6b5f;
    --warning-bg: #f4ebd7;
    --warning-text: #8a6d3d;
    --danger-bg: #f4e3de;
    --danger-text: #9a6257;
    --shadow-card: 0 1px 2px rgba(70, 65, 54, 0.04), 0 18px 36px rgba(92, 86, 74, 0.06);
    --shadow-hover: 0 10px 24px rgba(92, 86, 74, 0.08);
  }
  html {
    font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  body {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    color: var(--text);
  }
  textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    min-width: 0;
    overflow-x: hidden;
    overflow-wrap: break-word;
    white-space: pre-wrap;
  }
}
@layer components {
  .app-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    color: var(--text);
  }
  .page-frame {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding: 2rem;
  }
  .workspace-frame {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding: 1.5rem 2rem 2rem;
  }
  .workspace-frame > *, .workspace-frame section, .workspace-frame article {
    min-width: 0;
  }
  .story-sidebar-stack {
    position: sticky;
    top: 6rem;
  }
  .brand-title {
    font-family: "Roboto Slab", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  }
  .story-title-shell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
  }
  .title-edit-button {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: var(--muted);
    opacity: 0;
    transition: opacity 160ms ease, background-color 160ms ease, color 160ms ease;
  }
  .story-title-shell:hover .title-edit-button, .story-title-shell:focus-within .title-edit-button {
    opacity: 1;
  }
  .title-edit-button:hover, .title-edit-button:focus-visible {
    background: var(--surface-muted);
    color: var(--text);
    opacity: 1;
    outline: none;
  }
  .surface-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
  }
  .surface-card-hover {
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  }
  .surface-card-hover:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
  }
  .dashboard-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .dashboard-menu-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  .dashboard-menu-button {
    width: 6rem;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
  }
  .create-story-dialog {
    width: min(92vw, 30rem);
    border: 0;
    padding: 0;
    background: transparent;
    margin: auto;
  }
  .create-story-dialog::backdrop {
    background: rgba(31, 33, 29, 0.36);
    backdrop-filter: blur(4px);
  }
  .create-story-dialog-panel {
    width: 100%;
  }
  .document-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
  }
  .document-table th {
    padding: 0.9rem 1rem;
    color: var(--muted-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
  }
  .document-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  .document-table tbody tr {
    cursor: pointer;
    transition: background-color 160ms ease;
  }
  .document-table tbody tr:hover, .document-table tbody tr:focus-visible {
    background: var(--surface-muted);
    outline: none;
  }
  .document-table tbody tr:last-child td {
    border-bottom: 0;
  }
  .story-table-title {
    color: var(--text);
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
  }
  .document-table-badge {
    width: auto;
    min-width: 1.6rem;
    gap: 0.25rem;
    padding-inline: 0.45rem;
    white-space: nowrap;
  }
  .document-table-badge--recent {
    background: var(--success-bg);
    color: var(--success-text);
  }
  .document-table-badge--total {
    background: #000;
    color: #fff;
  }
  .inset-panel {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 250, 247, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 40px rgba(91, 88, 76, 0.08);
  }
  .brand-button, .secondary-button, .danger-button, .toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }
  .brand-button {
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(109, 143, 129, 0.22);
  }
  .brand-button:hover {
    background: var(--primary-strong);
  }
  .secondary-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
  }
  .secondary-button:hover {
    background: var(--surface-muted);
    border-color: var(--border-strong);
  }
  .danger-button {
    border: 1px solid #ddc3bb;
    background: var(--surface);
    color: var(--danger-text);
  }
  .danger-button:hover {
    background: var(--danger-bg);
  }
  .toolbar-button {
    min-height: 2.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
  }
  .toolbar-button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: var(--surface-muted);
  }
  .field-control {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  }
  .field-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 143, 129, 0.18);
  }
  .status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
  }
  .status-pill.success {
    background: var(--success-bg);
    color: var(--success-text);
  }
  .status-pill.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
  }
  .section-activity-pill {
    background: var(--primary-soft);
    color: var(--primary-strong);
  }
  .typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    min-height: 1.35rem;
    border-radius: 999px;
    background: var(--warning-bg);
    padding: 0 0.5rem;
  }
  .typing-indicator span {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 999px;
    background: var(--warning-text);
    animation: typing-pulse 900ms ease-in-out infinite;
  }
  .typing-indicator span:nth-child(2) {
    animation-delay: 120ms;
  }
  .typing-indicator span:nth-child(3) {
    animation-delay: 240ms;
  }
  @keyframes typing-pulse {
    0%, 80%, 100% {
      opacity: 0.35;
      transform: translateY(0);
    }
    40% {
      opacity: 1;
      transform: translateY(-2px);
    }
  }
  .notice-panel {
    border: 1px solid #dfcda6;
    border-radius: 0.75rem;
    background: var(--warning-bg);
    color: var(--warning-text);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
  }
  .change-summary-added {
    background: var(--success-bg);
    color: var(--success-text);
  }
  .change-summary-edited {
    background: var(--warning-bg);
    color: var(--warning-text);
  }
  .change-summary-removed {
    background: var(--danger-bg);
    color: var(--danger-text);
  }
  .change-summary-moved {
    background: var(--primary-soft);
    color: var(--primary-strong);
  }
  .change-summary-heading {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
  }
  .change-summary-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.375rem;
  }
  .change-summary-chip {
    display: inline-grid;
    min-height: 2rem;
    place-items: center;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
  }
  .outline-link {
    display: flex;
    width: 100%;
    align-items: center;
    border-radius: 0.5rem;
    padding: 0.375rem 0.5rem;
    color: var(--text);
    text-align: left;
    transition: background-color 160ms ease, color 160ms ease;
  }
  .outline-link:hover {
    background: var(--surface-muted);
  }
  .outline-dot {
    background: var(--border-strong);
  }
  .outline-dot-new {
    background: var(--success-text);
  }
  .outline-dot-edited {
    background: var(--warning-text);
  }
  .tab-shell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    background: var(--surface-muted);
    padding: 0.25rem;
  }
  .document-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .document-tabs {
    width: auto;
  }
  .preview-mode-toolbar {
    width: auto;
    margin-left: auto;
  }
  .tab-btn, .preview-mode-btn {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }
  .preview-count-badge {
    display: inline-grid;
    min-width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    padding: 0 0.38rem;
  }
  .tab-btn.is-active, .preview-mode-btn.is-active {
    background: var(--surface);
    color: var(--text);
    border-color: rgba(109, 143, 129, 0.24);
    box-shadow: 0 10px 22px rgba(92, 86, 74, 0.08);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  }
  .preview-mode-btn.is-active .preview-count-badge {
    background: #000;
    color: #fff;
    text-shadow: none;
  }
  .section-label {
    color: var(--muted-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  .story-sidebar-stack .section-label {
    color: #000;
    font-weight: 800;
  }
  .muted-copy {
    color: var(--muted);
  }
  .soft-copy {
    color: var(--muted-soft);
  }
  .markdown-editor {
    display: block;
    height: auto;
    min-height: 45rem;
    overflow: hidden;
    resize: none;
  }
  .prose-lite h1 {
    font-family: "Roboto Slab", Georgia, serif;
    font-size: 2rem;
    line-height: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
    color: var(--text);
  }
  .prose-lite h2 {
    font-size: 1.45rem;
    line-height: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2rem 0 0.75rem;
    color: var(--text);
  }
  .prose-lite h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
  }
  .prose-lite p {
    margin: 0.85rem 0;
    line-height: 1.8;
    color: var(--muted);
  }
  .prose-lite ul, .prose-lite ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--muted);
  }
  .prose-lite ul {
    list-style: disc;
  }
  .prose-lite ol {
    list-style: decimal;
  }
  .prose-lite li {
    margin: 0.35rem 0;
  }
  .prose-lite blockquote {
    border-left: 4px solid var(--border-strong);
    padding-left: 1rem;
    color: var(--muted);
    font-style: italic;
    margin: 1rem 0;
  }
  .prose-lite code {
    background: var(--surface-strong);
    padding: 0.15rem 0.3rem;
    border-radius: 0.35rem;
    color: var(--text);
  }
  .prose-lite pre {
    background: #2a2b26;
    color: #f2eee6;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow: auto;
    margin: 1rem 0;
  }
  .prose-lite pre code {
    background: transparent;
    padding: 0;
    color: inherit;
  }
  .change-block {
    position: relative;
    border-left: 4px solid transparent;
    border-radius: 0.75rem;
    padding: 0.55rem 0.85rem;
    margin: 0.18rem 0;
    transition: background 160ms ease, border 160ms ease;
  }
  .prose-lite .change-block > :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, pre) {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
  }
  .prose-lite .change-block > .change-pill + :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, pre) {
    margin-top: 0.5rem;
  }
  .prose-lite .change-block > :first-child {
    margin-top: 0;
  }
  .prose-lite .change-block > :last-child {
    margin-bottom: 0;
  }
  .change-block.changed {
    border-left-color: var(--warning-text);
    background: var(--warning-bg);
  }
  .change-block.added {
    border-left-color: var(--success-text);
    background: var(--success-bg);
  }
  .change-block.deleted {
    border-left-color: var(--danger-text);
    background: var(--danger-bg);
    color: var(--danger-text);
  }
  .change-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    line-height: 1rem;
    border-radius: 9999px;
    padding: 0.25rem 0.55rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
  }
  .change-pill.changed {
    background: #eadcbd;
    color: var(--warning-text);
  }
  .change-pill.added {
    background: var(--primary-soft);
    color: var(--success-text);
  }
  .change-pill.deleted {
    background: #ead2cb;
    color: var(--danger-text);
  }
  .inline-diff-panel {
    margin-top: 0.75rem;
    border: 1px solid rgba(138, 109, 61, 0.24);
    border-radius: 0.75rem;
    background: rgba(251, 250, 247, 0.72);
    padding: 0.75rem;
  }
  .inline-diff-label {
    margin-bottom: 0.35rem;
    color: var(--muted-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  .inline-diff-content {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.75;
    white-space: pre-wrap;
  }
  .inline-diff-added, .inline-diff-removed {
    border-radius: 0.35rem;
    padding: 0.05rem 0.18rem;
    font-weight: 600;
  }
  .inline-diff-added {
    background: var(--success-bg);
    color: var(--success-text);
  }
  .inline-diff-removed {
    background: var(--danger-bg);
    color: var(--danger-text);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }
  .change-map {
    position: absolute;
    bottom: 1.5rem;
    right: 1rem;
    top: 1.5rem;
    width: 0.75rem;
    border-radius: 9999px;
    background: var(--surface-strong);
  }
  .change-map-marker {
    position: absolute;
    left: 50%;
    height: 0.7rem;
    width: 0.7rem;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    border: 2px solid var(--surface);
    box-shadow: 0 1px 4px rgba(92, 86, 74, 0.22);
  }
  .change-map-marker.added {
    background: var(--success-text);
  }
  .change-map-marker.changed {
    background: var(--warning-text);
  }
  .change-map-marker.deleted {
    background: var(--danger-text);
  }
  @media (max-width: 640px) {
    .page-frame, .workspace-frame {
      padding-inline: 1rem;
    }
    .workspace-frame {
      padding-top: 1rem;
    }
  }
}
@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-space-y-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-leading {
  syntax: "*";
  inherits: false;
}
@property --tw-font-weight {
  syntax: "*";
  inherits: false;
}
@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-ease {
  syntax: "*";
  inherits: false;
}
@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-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-space-y-reverse: 0;
      --tw-border-style: solid;
      --tw-leading: initial;
      --tw-font-weight: initial;
      --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-ease: initial;
    }
  }
}
