/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
@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-border-style: solid;
      --tw-outline-style: solid;
    }
  }
}
@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;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *,
  :after,
  :before,
  ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }
  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }
  html,
  :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    line-height: 1.5;
    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;
    -webkit-text-decoration: inherit;
    -webkit-text-decoration: 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 {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }
  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 {
    vertical-align: middle;
    display: block;
  }
  img,
  video {
    max-width: 100%;
    height: auto;
  }
  button,
  input,
  select,
  optgroup,
  textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }
  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }
  :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)) {
      ::placeholder {
        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 {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-year-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-month-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-day-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-hour-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-minute-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-second-field {
    padding-block: 0;
  }
  ::-webkit-datetime-edit-millisecond-field {
    padding-block: 0;
  }
  ::-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"]) {
    appearance: button;
  }
  ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button {
    height: auto;
  }
  ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer components;
@layer utilities {
  .visible {
    visibility: visible;
  }
  .relative {
    position: relative;
  }
  .start {
    inset-inline-start: var(--spacing);
  }
  .end {
    inset-inline-end: var(--spacing);
  }
  .block {
    display: block;
  }
  .grid {
    display: grid;
  }
  .hidden {
    display: none;
  }
  .table {
    display: table;
  }
  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }
  .italic {
    font-style: italic;
  }
  .underline {
    text-decoration-line: underline;
  }
  .outline {
    outline-style: var(--tw-outline-style);
    outline-width: 1px;
  }
}
.top .logo {
  flex: 0 225px;
  min-width: 0;
  overflow: hidden;
}
.top .logo > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.top .logo > span b,
.top .logo > span small {
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
  overflow: hidden;
}
.projectHomeIcon {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  flex: none;
  place-items: center;
  width: 31px;
  height: 31px;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
  display: grid;
}
.projectHomeIcon:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px #6c55c74a;
}
.projectHomeIcon:focus-visible {
  outline-offset: 2px;
  outline: 2px solid #9b87ed;
}
.projectHomeIcon svg {
  width: 17px;
}
.writeTools.docToolbar {
  align-items: center;
  gap: 10px;
  height: auto;
  min-height: 54px;
  padding: 7px 12px;
  overflow: visible;
}
.writeTools.docToolbar > div:first-child {
  display: flex;
}
.formatGroups {
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-bottom: 1px;
  display: flex;
  overflow-x: auto;
}
.formatGroup {
  border-right: 1px solid var(--line);
  flex: none;
  align-items: center;
  gap: 1px;
  padding-right: 5px;
  display: flex;
}
.formatGroup:last-child {
  border-right: 0;
}
.formatGroup button {
  justify-content: center;
  width: 30px;
  padding: 0;
}
.formatGroup select {
  background: 0 0;
  border: 0;
  border-radius: 5px;
  outline: none;
  max-width: 112px;
  height: 29px;
  padding: 0 6px;
  font-size: 9px;
}
.formatGroup select:hover {
  background: var(--accent2);
}
.colorTool {
  cursor: pointer;
  border-radius: 5px;
  place-items: center;
  width: 29px;
  height: 29px;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  position: relative;
}
.colorTool:hover {
  background: var(--accent2);
}
.colorTool:after {
  content: "";
  background: #343039;
  height: 2px;
  position: absolute;
  bottom: 4px;
  left: 7px;
  right: 7px;
}
.highlightTool:after {
  background: #f1cf45;
}
.colorTool input {
  opacity: 0;
  width: 1px;
  height: 1px;
  position: absolute;
}
.writeActions {
  flex: none;
  align-items: center;
  gap: 4px;
  display: flex !important;
}
.aiWriteDropdown {
  position: relative;
}
.aiWriteButton {
  color: var(--accent);
  white-space: nowrap;
  font-weight: 650;
  background: var(--accent2) !important;
  border: 1px solid #d7cdf0 !important;
}
.aiWriteButton svg:last-child {
  width: 11px;
}
.aiWriteMenu {
  border: 1px solid var(--line);
  width: 220px;
  box-shadow: var(--shadow);
  z-index: 20;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  position: absolute;
  top: 36px;
  right: 0;
}
.aiWriteMenu button {
  text-align: left;
  width: 100%;
  min-height: 44px;
  height: auto !important;
  padding: 7px 9px !important;
}
.aiWriteMenu button > svg {
  color: var(--accent);
  flex: none;
}
.aiWriteMenu button span {
  flex-direction: column;
  display: flex;
}
.aiWriteMenu button b {
  font-size: 9px;
}
.aiWriteMenu button small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 7px;
}
.richEditor {
  color: #343039;
  white-space: normal;
  outline: 0;
  width: 100%;
  min-height: 420px;
  font-family:
    Georgia,
    Noto Serif Thai,
    serif;
  font-size: 16px;
  line-height: 2;
}
.richEditor:empty:before {
  content: attr(data-placeholder);
  color: #aaa;
  pointer-events: none;
}
.richEditor p {
  margin: 0 0 1em;
}
.richEditor ul,
.richEditor ol {
  padding-left: 28px;
}
.write.focus {
  background: var(--bg);
  z-index: 50;
  position: fixed;
  inset: 0;
  overflow: auto;
}
.write.focus .paper {
  min-height: calc(100vh-100px);
}
@media (width<=1250px) {
  .optionalTools {
    display: none;
  }
  .formatGroup select:first-child {
    max-width: 82px;
  }
}
@media (width<=760px) {
  .writeTools.docToolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .formatGroups {
    width: 100%;
  }
  .writeActions {
    justify-content: space-between;
    width: 100%;
  }
  .optionalTools {
    display: none;
  }
  .richEditor {
    font-size: 15px;
  }
  .aiWriteMenu {
    left: 0;
    right: auto;
  }
}
.selectionCharacterButton {
  white-space: nowrap;
  font-weight: 700;
  width: auto !important;
  color: var(--accent) !important;
  background: #f4f0ff !important;
  border: 1px solid #cfc4ed !important;
  padding: 0 10px !important;
}
.editSelectionCharacterButton {
  white-space: nowrap;
  font-weight: 650;
  border: 1px solid var(--line) !important;
  color: #4b4552 !important;
  background: #fff !important;
  width: auto !important;
  padding: 0 10px !important;
}
.selectionLocationButton {
  white-space: nowrap;
  font-weight: 700;
  color: #267363 !important;
  background: #eefaf7 !important;
  border: 1px solid #b9d9d2 !important;
  width: auto !important;
  padding: 0 10px !important;
}
.entityTag {
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 5px;
  margin: 0 1px;
  padding: 1px 4px;
  text-decoration: none;
  display: inline;
  position: relative;
}
.entityTag.character {
  color: #5941a5;
  background: #eee9ff;
  border-bottom: 2px solid #8169d5;
}
.entityTag.location {
  color: #216d5d;
  background: #e7f7f3;
  border-bottom: 2px solid #4aa691;
}
.entityTag:hover {
  filter: saturate(1.15);
  box-shadow: 0 2px 8px #27202f24;
}
.entityTag:hover:after {
  content: attr(data-note);
  z-index: 90;
  color: #fff;
  white-space: normal;
  pointer-events: none;
  background: #292331;
  border-radius: 8px;
  width: max-content;
  max-width: 300px;
  padding: 9px 11px;
  font:
    500 10px/1.5 Anuphan,
    sans-serif;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  box-shadow: 0 10px 28px #21192f42;
}
.entityTag:hover:before {
  content: "";
  z-index: 91;
  border: 6px solid #0000;
  border-top-color: #292331;
  position: absolute;
  bottom: calc(100% + 2px);
  left: 14px;
}
.entityDetailModal > footer > [data-unlink] {
  color: #b34a5e;
  border-color: #eccbd2;
  margin-right: auto;
}
.selectionFloatToolbar {
  z-index: 140;
  color: #fff;
  background: #2d2735;
  border-radius: 9px;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 4px;
  display: flex;
  position: fixed;
  box-shadow: 0 12px 32px #1f192a55;
}
.selectionFloatToolbar button {
  color: #fff;
  white-space: nowrap;
  background: 0 0;
  border: 0;
  border-radius: 6px;
  min-width: 30px;
  height: 31px;
  padding: 0 8px;
  font-size: 10px;
}
.selectionFloatToolbar button:hover {
  background: #ffffff1d;
}
.advancedParagraphTools {
  gap: 3px !important;
}
.advancedParagraphTools .customFontSize {
  text-align: center;
  background: 0 0;
  border: 0;
  border-radius: 5px;
  width: 42px;
  height: 29px;
  font-size: 9px;
}
.advancedParagraphTools button {
  min-width: 30px;
  font-size: 8px;
  width: auto !important;
}
.docCommentAnchor {
  cursor: help;
  background: #fff1a8;
  border-bottom: 2px solid #d4a921;
}
.docCommentAnchor:hover:after {
  content: attr(data-comment);
  z-index: 100;
  color: #fff;
  background: #2d2735;
  border-radius: 7px;
  max-width: 280px;
  padding: 8px 10px;
  font-size: 10px;
  position: absolute;
}
.findReplacePanel {
  z-index: 150;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  width: 320px;
  padding: 14px;
  position: fixed;
  top: 82px;
  right: 22px;
  box-shadow: 0 18px 50px #21192f35;
}
.findReplacePanel header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  display: flex;
}
.findReplacePanel header b {
  font-size: 13px;
}
.findReplacePanel header button {
  background: 0 0;
  border: 0;
  font-size: 19px;
}
.findReplacePanel > label {
  color: var(--muted);
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 9px;
  display: flex;
}
.findReplacePanel > label input {
  border: 1px solid var(--line);
  border-radius: 7px;
  height: 36px;
  padding: 0 9px;
}
.findOptions {
  gap: 12px;
  font-size: 9px;
  display: flex;
}
.findReplacePanel p {
  color: var(--muted);
  font-size: 9px;
}
.findReplacePanel footer {
  justify-content: flex-end;
  gap: 6px;
  display: flex;
}
.findReplacePanel footer button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 34px;
  padding: 0 10px;
}
.findReplacePanel footer .primary {
  background: var(--accent);
  color: #fff;
  border: 0;
}
.documentStatusBar {
  z-index: 8;
  border-top: 1px solid var(--line);
  height: 32px;
  color: var(--muted);
  background: #fff;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  font-size: 8px;
  display: flex;
  position: sticky;
  bottom: 0;
}
.documentStatusBar b {
  color: var(--accent);
}
.documentStatusBar em {
  color: #33856f;
  margin-left: auto;
  font-style: normal;
}
.documentOutline {
  z-index: 6;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  width: 175px;
  max-height: calc(100vh-180px);
  padding: 8px;
  position: fixed;
  top: 120px;
  left: 270px;
  overflow: auto;
  box-shadow: 0 8px 24px #21192f14;
}
.documentOutline:empty {
  display: none;
}
.documentOutline header {
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 4px 6px;
  font-size: 7px;
}
.documentOutline button {
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: 0 0;
  border: 0;
  border-radius: 5px;
  width: 100%;
  padding: 5px 6px;
  font-size: 8px;
  display: block;
  overflow: hidden;
}
.documentOutline button:hover {
  background: var(--accent2);
}
.documentOutline .h2 {
  padding-left: 14px;
}
.documentOutline .h3,
.documentOutline .h4 {
  padding-left: 22px;
}
.richEditor h1 {
  margin: 1em 0 0.45em;
  font-size: 2em;
  line-height: 1.25;
}
.richEditor h2 {
  margin: 1em 0 0.45em;
  font-size: 1.55em;
  line-height: 1.3;
}
.richEditor h3 {
  margin: 1em 0 0.4em;
  font-size: 1.25em;
  line-height: 1.35;
}
.richEditor blockquote {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  padding-left: 16px;
}
@media (width<=1200px) {
  .documentOutline,
  .selectionFloatToolbar button[data-comment],
  .selectionFloatToolbar button[data-link] {
    display: none;
  }
}
@media (width<=760px) {
  .selectionFloatToolbar {
    max-width: calc(100vw-16px);
    overflow-x: auto;
  }
  .documentStatusBar span:nth-child(2),
  .documentStatusBar span:nth-child(3) {
    display: none;
  }
}
.docsMenuBar {
  z-index: 31;
  background: #fff;
  border-bottom: 0;
  align-items: center;
  gap: 1px;
  height: 34px;
  padding: 0 14px;
  display: flex;
  position: sticky;
  top: 0;
}
.docsMenuItem {
  position: relative;
}
.docsMenuItem > button {
  color: #302d35;
  background: 0 0;
  border: 0;
  border-radius: 5px;
  height: 28px;
  padding: 0 9px;
  font-size: 10px;
}
.docsMenuItem > button:hover,
.docsMenuItem.open > button {
  background: #edf1f5;
}
.docsDropdown {
  z-index: 70;
  background: #fff;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  width: 190px;
  padding: 6px;
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  box-shadow: 0 10px 30px #29313d2c;
}
.docsMenuItem.open .docsDropdown {
  display: block;
}
.docsDropdown button {
  text-align: left;
  background: 0 0;
  border: 0;
  border-radius: 5px;
  width: 100%;
  height: 32px;
  padding: 0 9px;
  font-size: 10px;
  display: block;
}
.docsDropdown button:hover {
  background: #edf1f5;
}
.writeTools.docToolbar {
  z-index: 30;
  border-radius: 22px;
  flex-wrap: nowrap;
  margin: 0 8px 8px;
  position: sticky;
  top: 34px;
  height: 44px !important;
  min-height: 44px !important;
  box-shadow: none !important;
  background: #edf1f5 !important;
  border: 0 !important;
  padding: 4px 8px !important;
}
.writeTools.docToolbar .formatGroups {
  scrollbar-width: none;
  flex: 1;
  overflow-x: auto;
}
.writeTools.docToolbar .formatGroups::-webkit-scrollbar {
  display: none;
}
.writeTools.docToolbar .formatGroup {
  border-right-color: #cfd4da;
  height: 32px;
  padding-right: 5px;
}
.writeTools.docToolbar button {
  border-radius: 5px;
  height: 32px;
}
.writeTools.docToolbar select,
.writeTools.docToolbar input {
  color: #30343a;
  height: 32px !important;
}
.docsZoomGroup select {
  width: 62px;
}
.docsZoomGroup button {
  font-size: 14px !important;
}
.docsEditingMode {
  color: #30343a;
  white-space: nowrap;
  border-left: 1px solid #cfd4da;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  font-size: 9px;
  display: flex;
}
.docsEditingMode b {
  font-weight: 600;
}
.pageBreak {
  border: 0;
  border-top: 2px dashed #aeb6c0;
  margin: 28px-20px;
  position: relative;
}
.pageBreak:after {
  content: attr(data-label);
  color: #8b949e;
  font-size: 8px;
  position: absolute;
  top: -17px;
  right: 0;
}
.write.focus .docsMenuBar {
  position: sticky;
  top: 0;
}
.write.focus .docToolbar {
  top: 34px;
}
@media (width<=1050px) {
  .docsMenuItem:nth-child(n + 6),
  .docsEditingMode {
    display: none;
  }
  .writeTools.docToolbar {
    margin-left: 4px;
    margin-right: 4px;
  }
}
@media (width<=760px) {
  .docsMenuBar {
    padding: 0 6px;
    overflow-x: auto;
  }
  .docsMenuItem > button {
    padding: 0 7px;
  }
  .writeTools.docToolbar {
    top: 34px;
    border-radius: 12px !important;
  }
  .docsZoomGroup button:nth-child(n + 4) {
    display: none;
  }
}
.writeTools.docToolbar {
  width: 100%;
  max-width: none;
  background: #fff !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
.writeTools.docToolbar button:hover {
  background: #edf1f5;
}
.writeTools.docToolbar .aiWriteButton {
  background: #f3efff !important;
}
@media (width<=1050px) {
  .writeTools.docToolbar {
    margin: 0 !important;
  }
}
@media (width<=760px) {
  .writeTools.docToolbar {
    border-radius: 0 !important;
    margin: 0 !important;
  }
}
.quickCharacterOverlay {
  z-index: 120;
  background: #21192f66;
  place-items: center;
  padding: 16px;
  display: grid;
  position: fixed;
  inset: 0;
}
.quickCharacterModal {
  background: #fff;
  border-radius: 14px;
  width: min(620px, 100vw-32px);
  max-height: calc(100vh-32px);
  overflow: auto;
  box-shadow: 0 24px 80px #1f172c55;
}
.quickCharacterModal > header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  display: flex;
}
.quickCharacterModal > header span {
  flex-direction: column;
  display: flex;
}
.quickCharacterModal > header small {
  color: var(--accent);
  letter-spacing: 0.1em;
  font-size: 9px;
}
.quickCharacterModal > header h2 {
  margin: 4px 0;
  font-size: 18px;
}
.quickCharacterModal > header button {
  background: 0 0;
  border: 0;
  font-size: 24px;
}
.quickCharacterContext {
  background: var(--accent2);
  color: var(--muted);
  border-radius: 8px;
  margin: 16px 20px 0;
  padding: 11px;
  font-size: 11px;
  line-height: 1.55;
}
.quickCharacterModal > div {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 20px;
  display: grid;
}
.quickCharacterModal label {
  color: var(--muted);
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  display: flex;
}
.quickCharacterModal label.wide {
  grid-column: 1/-1;
}
.quickCharacterModal input,
.quickCharacterModal textarea {
  border: 1px solid var(--line);
  font: inherit;
  color: #343039;
  border-radius: 8px;
  outline: none;
  padding: 10px;
}
.quickCharacterModal input {
  height: 40px;
}
.quickCharacterModal textarea {
  resize: vertical;
  min-height: 84px;
}
.quickCharacterModal input:focus,
.quickCharacterModal textarea:focus {
  border-color: var(--accent);
}
.quickCharacterModal > footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 20px;
  display: flex;
}
.quickCharacterModal > footer button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 36px;
  padding: 0 13px;
}
.quickCharacterModal > footer .primary {
  background: var(--accent);
  color: #fff;
  border: 0;
}
@media (width<=600px) {
  .quickCharacterModal > div {
    grid-template-columns: 1fr;
  }
  .quickCharacterModal label.wide {
    grid-column: auto;
  }
}
.quickCharacterModal select {
  border: 1px solid var(--line);
  height: 40px;
  font: inherit;
  background: #fff;
  border-radius: 8px;
  padding: 0 10px;
}
.selectionToNotes {
  align-items: center;
  color: #4b4552 !important;
  flex-direction: row !important;
}
.selectionToNotes input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.characterPickerModal {
  width: min(680px, 100vw-32px);
}
.characterPickerSearch {
  color: var(--muted);
  flex-direction: column;
  gap: 6px;
  margin: 16px 20px 10px;
  font-size: 11px;
  display: flex;
}
.characterPickerSearch input {
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  height: 40px;
  padding: 0 11px;
  font-size: 12px;
}
.characterPickerSearch input:focus {
  border-color: var(--accent);
}
.characterPickerList {
  max-height: 360px;
  overflow: auto;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 0 20px 18px !important;
  display: grid !important;
}
.characterPickerList button {
  border: 1px solid var(--line);
  text-align: left;
  background: #fff;
  border-radius: 9px;
  flex-direction: column;
  align-items: flex-start;
  min-height: 68px;
  padding: 10px 12px;
  display: flex;
}
.characterPickerList button:hover {
  border-color: var(--accent);
  background: var(--accent2);
}
.characterPickerList b {
  font-size: 12px;
}
.characterPickerList span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
}
.characterPickerList small {
  color: var(--accent);
  margin-top: 4px;
  font-size: 9px;
}
.characterPickerEmpty {
  text-align: center;
  color: var(--muted);
  grid-column: 1/-1;
  padding: 35px;
}
@media (width<=600px) {
  .characterPickerList {
    grid-template-columns: 1fr !important;
  }
  .editSelectionCharacterButton {
    font-size: 0 !important;
  }
  .editSelectionCharacterButton:after {
    content: "แก้ไข";
    font-size: 9px;
  }
}
.docsEditingMode {
  display: none !important;
}
.docsMenuBar {
  min-height: 27px;
  height: 27px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.docsMenuItem > button {
  height: 25px !important;
}
.writeTools.docToolbar {
  height: 40px !important;
  min-height: 40px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  top: 27px !important;
}
.docsZoomGroup button svg {
  stroke-width: 1.8px;
  width: 15px;
  height: 15px;
}
.globalSave b,
.globalSave small {
  line-height: 1.15;
  font-size: 11px !important;
}
.write {
  position: relative;
}
.documentRuler {
  --ruler-paper-width: 760px;
  --ruler-content-left: 70px;
  --ruler-content-right: 70px;
  color: #5f6368;
  -webkit-user-select: none;
  user-select: none;
  z-index: 12;
  background: #fff;
}
.horizontalRuler {
  width: min(var(--ruler-paper-width), calc(100% - 32px));
  border-bottom: 1px solid #dadce0;
  height: 18px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}
.horizontalRuler:before,
.horizontalRuler:after {
  content: "";
  background: #f1f3f4;
  position: absolute;
  top: 0;
  bottom: 0;
}
.horizontalRuler:before {
  width: var(--ruler-content-left);
  left: 0;
}
.horizontalRuler:after {
  width: var(--ruler-content-right);
  right: 0;
}
.rulerContentTrack {
  inset: 0 var(--ruler-content-right) 0 var(--ruler-content-left);
  position: absolute;
}
.horizontalRuler .rulerTicks span {
  border-left: 1px solid #bdc1c6;
  height: 4px;
  position: absolute;
  bottom: 0;
}
.horizontalRuler .rulerTicks b {
  font-size: 8px;
  font-weight: 400;
  line-height: 10px;
  position: absolute;
  top: -11px;
  left: -4px;
}
.verticalRuler {
  background: #fff;
  border-right: 1px solid #dadce0;
  width: 18px;
  position: absolute;
  overflow: hidden;
}
.verticalRuler .rulerTicks span {
  border-top: 1px solid #bdc1c6;
  width: 4px;
  position: absolute;
  left: 0;
}
.verticalRuler .rulerTicks b {
  font-size: 8px;
  font-weight: 400;
  position: absolute;
  top: -5px;
  left: 6px;
}
.rulerMarker {
  cursor: ew-resize;
  z-index: 3;
  position: absolute;
  transform: translate(-50%);
  background: #1a73e8 !important;
  border: 0 !important;
  border-radius: 1px !important;
  width: 10px !important;
  height: 7px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.firstLineMarker {
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  top: 0;
}
.leftIndentMarker,
.rightIndentMarker {
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  bottom: 0;
}
.rulerMarker:focus-visible {
  outline-offset: 2px;
  outline: 2px solid #174ea6 !important;
}
@media (width<=760px) {
  .verticalRuler {
    display: none;
  }
  .horizontalRuler {
    width: calc(100% - 16px);
  }
}
.globalSave,
.saveStamp {
  align-items: center;
  gap: 7px;
  min-width: 132px;
  display: flex;
}
.globalSave > i,
.saveStamp > i {
  background: #2baa78;
  border-radius: 50%;
  flex: none;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 4px #2baa7816;
}
.globalSave span,
.saveStamp span {
  flex-direction: column;
  min-width: 0;
  display: flex;
}
.globalSave b,
.saveStamp b {
  color: #2b8f69;
  font-size: 8px;
}
.globalSave small,
.saveStamp small {
  color: var(--muted);
  white-space: nowrap;
  font-size: 7px;
}
.rail footer .intelligenceLink {
  background: var(--accent2);
  color: var(--accent);
  font-weight: 700;
}
.intelligencePage {
  background: var(--bg);
  grid-template-columns: 220px 1fr;
  min-height: 100%;
  display: grid;
}
.intelNav {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 14px 9px;
  overflow: auto;
}
.intelNav header {
  flex-direction: column;
  padding: 6px 8px 12px;
  display: flex;
}
.intelNav header small {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 7px;
}
.intelNav header b {
  margin-top: 4px;
  font-size: 12px;
}
.intelNav button {
  text-align: left;
  width: 100%;
  min-height: 35px;
  color: var(--muted);
  background: 0 0;
  border: 0;
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  font-size: 8px;
  display: flex;
}
.intelNav button span {
  background: var(--soft);
  border-radius: 5px;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 7px;
  display: grid;
}
.intelNav button:hover,
.intelNav button.active {
  background: var(--accent2);
  color: var(--accent);
}
.intelNav button.active span {
  background: var(--accent);
  color: #fff;
}
.intelMain {
  min-width: 0;
  padding: 24px;
  overflow: auto;
}
.intelMain .pageHead {
  margin-bottom: 16px;
}
.saveStamp {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}
.intelComposer,
.intelPanel,
.intelList {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
}
.intelComposer {
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 10px;
  padding: 11px;
  display: flex;
}
.intelComposer > div {
  flex: 1;
  grid-template-columns: 1.1fr 1.7fr 150px;
  gap: 8px;
  display: grid;
}
.intelComposer label {
  color: var(--muted);
  flex-direction: column;
  gap: 4px;
  font-size: 7px;
  display: flex;
}
.intelComposer input,
.intelComposer select,
.intelList select {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  height: 34px;
  padding: 0 8px;
  font-size: 8px;
}
.intelList {
  padding: 7px;
}
.intelList article {
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 10px;
  padding: 10px;
  display: flex;
}
.intelList article:last-child {
  border-bottom: 0;
}
.intelList article > i {
  background: #e6aa36;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.intelList article > i.critical {
  background: #dc516a;
}
.intelList article > i.locked-canon,
.intelList article > i.accepted,
.intelList article > i.resolved {
  background: #35a878;
}
.intelList article > span {
  flex: 1;
  min-width: 0;
}
.intelList article b {
  font-size: 9px;
}
.intelList article p {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 8px;
}
.intelList article select {
  width: 120px;
}
.intelList article > button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  height: 31px;
  font-size: 8px;
}
.intelEmpty {
  height: 280px;
  color: var(--muted);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
}
.intelEmpty svg {
  width: 30px;
}
.intelEmpty b {
  margin-top: 8px;
  font-size: 11px;
}
.intelEmpty p {
  font-size: 8px;
}
.intelPanel {
  padding: 14px;
}
.intelPanel > header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  padding-bottom: 10px;
  display: flex;
}
.intelPanel > header b {
  font-size: 10px;
}
.intelPanel > header small {
  color: var(--muted);
  font-size: 8px;
}
.heatTable {
  min-width: 560px;
  margin-top: 8px;
}
.heatRow {
  border-bottom: 1px solid var(--line);
  grid-template-columns: 200px repeat(3, 1fr);
  align-items: center;
  min-height: 40px;
  display: grid;
}
.heatRow > * {
  padding: 8px;
  font-size: 8px;
}
.heatRow.head {
  background: var(--soft);
  border-radius: 7px;
}
.heatRow button {
  background: #f2eff9;
  border: 0;
  border-radius: 5px;
  height: 28px;
  margin: 4px;
}
.heatRow button.h1 {
  color: #5c46af;
  background: #ded5fa;
}
.heatRow button.h2 {
  color: #fff;
  background: #a996e8;
}
.heatRow button.h3 {
  color: #fff;
  background: #6c55c7;
}
.healthCards {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  display: grid;
}
.healthCards article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 15px;
}
.healthCards small {
  color: var(--muted);
  font-size: 8px;
}
.healthCards b {
  margin: 7px 0;
  font-size: 12px;
  display: block;
}
.healthCards > article > i {
  background: var(--soft);
  border-radius: 5px;
  height: 6px;
  display: block;
}
.healthCards > article > i span {
  background: var(--accent);
  border-radius: 5px;
  height: 100%;
  display: block;
}
.healthCards em {
  color: var(--accent);
  font-size: 8px;
  font-style: normal;
}
.contextComposer label {
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 9px;
  padding: 10px;
  display: flex;
}
.contextComposer label span {
  flex-direction: column;
  display: flex;
}
.contextComposer label b {
  font-size: 9px;
}
.contextComposer label small {
  color: var(--muted);
  font-size: 7px;
}
@media (width<=1100px) {
  .globalSave {
    display: none;
  }
  .intelligencePage {
    grid-template-columns: 180px 1fr;
  }
  .intelComposer > div {
    grid-template-columns: 1fr 1fr;
  }
  .intelComposer label:last-child {
    grid-column: 1/-1;
  }
  .healthCards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (width<=760px) {
  .intelligencePage {
    display: block;
  }
  .intelNav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 5px;
    display: flex;
    overflow: auto;
  }
  .intelNav header {
    display: none;
  }
  .intelNav button {
    white-space: nowrap;
    width: auto;
  }
  .intelMain {
    padding: 14px;
  }
  .intelComposer {
    flex-direction: column;
    align-items: stretch;
  }
  .intelComposer > div {
    flex-direction: column;
    display: flex;
  }
  .healthCards {
    grid-template-columns: 1fr;
  }
}
.creatorOverlay {
  z-index: 80;
  background: #21192f66;
  place-items: center;
  padding: 18px;
  display: grid;
  position: fixed;
  inset: 0;
}
.characterCreator {
  background: #f7f6f9;
  border-radius: 14px;
  flex-direction: column;
  width: min(1180px, 98vw);
  height: min(880px, 96vh);
  display: flex;
  overflow: hidden;
  box-shadow: 0 24px 80px #1f172c55;
}
.characterCreator > header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  justify-content: space-between;
  align-items: center;
  height: 62px;
  padding: 0 18px;
  display: flex;
}
.characterCreator > header span {
  flex-direction: column;
  display: flex;
}
.characterCreator > header small {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 7px;
}
.characterCreator > header h2 {
  margin: 3px 0;
  font-size: 17px;
}
.characterCreator > header button {
  background: 0 0;
  border: 0;
}
.characterCreator > header svg {
  width: 18px;
}
.characterCreator > nav {
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 4px;
  padding: 8px 14px;
  display: flex;
  overflow: auto;
}
.characterCreator > nav button {
  white-space: nowrap;
  background: 0 0;
  border: 0;
  border-radius: 7px;
  height: 31px;
  padding: 0 11px;
  font-size: 8px;
}
.characterCreator > nav button.active {
  background: var(--accent2);
  color: var(--accent);
  font-weight: 700;
}
.creatorBody {
  flex: 1;
  grid-template-columns: 1fr 310px;
  min-height: 0;
  display: grid;
}
.creatorBody > main {
  padding: 14px;
  overflow: auto;
}
.creatorAssistant {
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  overflow: auto;
}
.characterPreview {
  color: #fff;
  background: linear-gradient(135deg, #30274a, #6c55c7);
  border-radius: 11px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px;
  display: flex;
}
.characterPreview > div {
  flex: 1;
  align-items: center;
  gap: 10px;
  display: flex;
}
.characterPreview > div > b {
  background: #fff2;
  border-radius: 10px;
  place-items: center;
  width: 42px;
  height: 42px;
  display: grid;
}
.characterPreview h3 {
  margin: 0;
  font-size: 13px;
}
.characterPreview p {
  color: #ded8f6;
  margin: 3px 0;
  font-size: 8px;
}
.characterPreview em {
  background: #fff2;
  border-radius: 12px;
  padding: 5px 7px;
  font-size: 8px;
  font-style: normal;
}
.characterPreview strong {
  font-size: 9px;
}
.generatorBox {
  background: #fff;
  border: 1px solid #d8cff0;
  border-radius: 10px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 11px;
  display: flex;
}
.generatorBox textarea {
  border: 1px solid var(--line);
  resize: vertical;
  border-radius: 7px;
  flex: 1;
  min-height: 66px;
  padding: 8px;
  font-size: 9px;
}
.generatorBox > select {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  flex: 1;
  height: 37px;
  padding: 0 8px;
  font-size: 9px;
}
.generatorBox > p {
  color: var(--muted);
  flex: 1;
  font-size: 9px;
}
.generatorBox > label {
  font-size: 8px;
}
.creatorSections > section {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  margin-bottom: 7px;
  overflow: hidden;
}
.sectionHead {
  background: #fff;
  border: 0;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  display: flex;
}
.sectionHead span {
  text-align: left;
  flex-direction: column;
  display: flex;
}
.sectionHead b {
  font-size: 10px;
}
.sectionHead small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 7px;
}
.sectionHead svg {
  width: 15px;
}
.creatorSections > section.open .sectionHead svg {
  transform: rotate(180deg);
}
.fieldGrid {
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 12px;
  display: grid;
}
.fieldGrid label {
  color: var(--muted);
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  display: flex;
}
.fieldGrid label > span {
  justify-content: space-between;
  align-items: center;
  display: flex;
}
.fieldGrid label > span button {
  background: 0 0;
  border: 0;
  width: 23px;
  height: 20px;
  font-size: 9px;
}
.fieldGrid label > span button.locked {
  background: var(--accent2);
  border-radius: 5px;
}
.fieldGrid input,
.fieldGrid textarea {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  outline: none;
  padding: 8px;
  font-size: 9px;
}
.fieldGrid input {
  height: 36px;
}
.fieldGrid textarea {
  resize: vertical;
  min-height: 65px;
}
.fieldGrid input:focus,
.fieldGrid textarea:focus {
  border-color: var(--accent);
  background: #fff;
}
.randomize {
  background: var(--accent2);
  height: 35px;
  color: var(--accent);
  border: 1px solid #d8cff0;
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 8px;
  display: flex;
}
.randomize svg {
  width: 14px;
}
.creatorAssistant > section {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 9px;
  padding: 11px;
}
.creatorAssistant > section > small {
  letter-spacing: 0.1em;
  color: var(--accent);
  font-size: 7px;
}
.creatorAssistant > section > b {
  margin: 5px 0;
  font-size: 16px;
  display: block;
}
.creatorAssistant > section > p {
  align-items: center;
  margin: 6px 0;
  font-size: 8px;
  display: flex;
}
.creatorAssistant > section > p i {
  background: #c7c1ce;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  margin-right: 6px;
}
.creatorAssistant > section > p i.done {
  background: #35a878;
}
.creatorAssistant > section > p em {
  color: var(--accent);
  margin-left: auto;
  font-style: normal;
}
.creatorAssistant > section > button,
.creatorAssistant article button {
  border: 1px solid var(--line);
  text-align: left;
  background: #fff;
  border-radius: 6px;
  width: 100%;
  min-height: 30px;
  margin-top: 5px;
  padding: 5px 7px;
  font-size: 8px;
}
.creatorAssistant > section > button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.creatorAssistant .duplicate {
  background: #fff8f9;
  border-color: #edcbd2;
}
.creatorAssistant .duplicate > b {
  color: #b53d55;
  font-size: 10px;
}
.creatorAssistant article {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}
.creatorAssistant article b {
  font-size: 8px;
}
.creatorAssistant article p {
  color: var(--muted);
  font-size: 7px;
}
.assistantResult {
  background: var(--bg);
  border-radius: 7px;
  margin-top: 8px;
  padding: 8px;
}
.assistantResult b {
  color: var(--accent);
  font-size: 7px;
}
.assistantResult p {
  white-space: pre-line;
  max-height: 180px;
  font-size: 8px;
  line-height: 1.6;
  overflow: auto;
}
.variantCards {
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 9px;
  display: grid;
}
.variantCards article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px;
}
.variantCards small {
  color: var(--accent);
  font-size: 7px;
}
.variantCards b {
  margin-top: 4px;
  font-size: 9px;
  display: block;
}
.variantCards p {
  color: var(--muted);
  max-height: 90px;
  font-size: 8px;
  overflow: auto;
}
.variantCards button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: 7px;
}
.characterCreator > footer {
  border-top: 1px solid var(--line);
  background: #fff;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  height: 60px;
  padding: 0 15px;
  display: flex;
}
.characterCreator > footer label {
  align-items: center;
  gap: 7px;
  margin-right: auto;
  font-size: 8px;
  display: flex;
}
.characterCreator > footer select {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  height: 32px;
  font-size: 8px;
}
.characterCreator > footer > button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 34px;
  padding: 0 11px;
  font-size: 8px;
}
.characterCreator > footer > button.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
}
@media (width<=900px) {
  .creatorBody {
    grid-template-columns: 1fr;
  }
  .creatorAssistant {
    display: none;
  }
  .fieldGrid {
    grid-template-columns: 1fr;
  }
  .characterCreator {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
  }
  .variantCards {
    grid-template-columns: 1fr;
  }
  .characterPreview em {
    display: none;
  }
}
:root {
  --bg: #f6f5f8;
  --panel: #fff;
  --soft: #f0eef4;
  --text: #26232b;
  --muted: #7c7784;
  --line: #e4e0e8;
  --accent: #6c55c7;
  --accent2: #eeeafd;
  --shadow: 0 18px 55px #2d22351c;
}
* {
  box-sizing: border-box;
}
html,
body {
  background: var(--bg);
  height: 100%;
  color: var(--text);
  margin: 0;
  font-family:
    Inter,
    Noto Sans Thai,
    Leelawadee UI,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
.studio {
  height: 100vh;
  overflow: hidden;
}
.top {
  border-bottom: 1px solid var(--line);
  background: #fff;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 12px;
  display: flex;
}
.icon {
  background: 0 0;
  border: 0;
  border-radius: 7px;
  place-items: center;
  width: 32px;
  height: 32px;
  display: grid;
}
.icon svg {
  width: 17px;
}
.logo {
  align-items: center;
  gap: 9px;
  width: 202px;
  display: flex;
}
.logo > i {
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  place-items: center;
  width: 31px;
  height: 31px;
  display: grid;
}
.logo svg {
  width: 17px;
}
.logo span {
  flex-direction: column;
  display: flex;
}
.logo b {
  font-size: 11px;
}
.logo small {
  color: var(--muted);
  font-size: 8px;
}
.top nav {
  flex: 1;
  height: 100%;
  display: flex;
}
.top nav button {
  color: var(--muted);
  background: 0 0;
  border: 0;
  border-bottom: 2px solid #0000;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  font-size: 10px;
  display: flex;
}
.top nav svg {
  width: 15px;
}
.top nav button.active {
  color: var(--accent);
  border-color: var(--accent);
  background: linear-gradient(0deg, var(--accent2), transparent);
}
.actions {
  align-items: center;
  gap: 6px;
  display: flex;
}
.actions > button:first-child {
  border: 1px solid var(--line);
  background: var(--bg);
  height: 32px;
  color: var(--muted);
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  display: flex;
}
.actions svg {
  width: 15px;
}
.actions kbd {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
}
.actions > b {
  color: #503b9b;
  background: #ddd5fa;
  border-radius: 50%;
  place-items: center;
  width: 31px;
  height: 31px;
  font-size: 9px;
  display: grid;
}
.body {
  height: calc(100vh-56px);
  display: flex;
}
.rail {
  border-right: 1px solid var(--line);
  background: #fff;
  flex-direction: column;
  flex: none;
  width: 232px;
  padding: 11px 8px;
  display: flex;
  overflow: auto;
}
.railHead {
  justify-content: space-between;
  padding: 8px;
  display: flex;
}
.railHead small {
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 8px;
}
.rail button {
  background: 0 0;
  border: 0;
}
.railHead svg {
  width: 15px;
}
.rail section > header {
  cursor: pointer;
  align-items: center;
  padding: 7px 4px;
  display: flex;
}
.rail section > header svg {
  width: 14px;
  color: var(--muted);
}
.rail section > header span {
  flex-direction: column;
  flex: 1;
  display: flex;
}
.rail section > header b {
  font-size: 9px;
}
.rail section > header small {
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 150px;
  font-size: 7px;
  overflow: hidden;
}
.rail section > header em {
  color: var(--muted);
  font-size: 7px;
}
.rail section > button {
  width: 100%;
  height: 30px;
  color: var(--muted);
  border-radius: 6px;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 20px;
  font-size: 8px;
  display: flex;
}
.rail section > button svg {
  width: 12px;
}
.rail section > button span {
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  flex: 1;
  overflow: hidden;
}
.rail section > button i {
  background: #b4afbb;
  border-radius: 50%;
  width: 5px;
  height: 5px;
}
.rail section > button i.draft {
  background: #41a985;
}
.rail section > button.active {
  background: var(--accent2);
  color: var(--accent);
}
.rail footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 7px;
}
.rail footer button {
  width: 100%;
  height: 31px;
  color: var(--muted);
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  font-size: 8px;
  display: flex;
}
.rail footer svg {
  width: 14px;
}
.rail footer p {
  color: var(--muted);
  padding-left: 10px;
  font-size: 7px;
}
.rail footer p i {
  background: #2ca578;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  display: inline-block;
}
.main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.context {
  border-left: 1px solid var(--line);
  background: #fff;
  flex: none;
  width: 290px;
  padding: 15px;
  overflow: auto;
}
.context header span {
  flex-direction: column;
  display: flex;
}
.context header small,
.pageHead small,
.workshop header small {
  letter-spacing: 0.13em;
  color: var(--accent);
  font-size: 7px;
}
.context header b {
  font-size: 10px;
}
.context label,
.detail label {
  color: var(--muted);
  flex-direction: column;
  gap: 5px;
  margin: 9px 0;
  font-size: 8px;
  display: flex;
}
.context textarea,
.context input,
.context select,
.detail textarea,
.detail select {
  border: 1px solid var(--line);
  background: var(--bg);
  resize: vertical;
  border-radius: 6px;
  padding: 7px;
  font-size: 9px;
}
.context section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}
.context h3 {
  justify-content: space-between;
  font-size: 9px;
  display: flex;
}
.context h3 button,
.beat button {
  background: 0 0;
  border: 0;
}
.context svg {
  width: 14px;
}
.beat {
  align-items: center;
  gap: 4px;
  display: flex;
}
.beat input {
  flex: 1;
}
.toggle {
  justify-content: space-between;
  align-items: center;
  flex-direction: row !important;
}
.toggle input {
  width: auto;
}
.page {
  max-width: 1320px;
  margin: auto;
  padding: 24px 25px 50px;
}
.pageHead {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  display: flex;
}
.pageHead > span {
  display: block;
}
.pageHead h1 {
  margin: 3px 0;
  font-size: 24px;
}
.pageHead p {
  color: var(--muted);
  margin: 0;
  font-size: 9px;
}
.pageHead > div {
  gap: 7px;
  display: flex;
}
.primary,
.danger {
  border: 0;
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  font-size: 9px;
  display: flex;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.danger {
  color: #b63d55;
  background: #fff;
  border: 1px solid #edccd3;
}
.primary svg,
.danger svg {
  width: 14px;
}
.seg {
  background: var(--soft);
  border-radius: 7px;
  padding: 3px;
  display: flex;
}
.seg button {
  text-transform: capitalize;
  background: 0 0;
  border: 0;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 8px;
}
.seg button.active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 2px 6px #0001;
}
.board {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  display: grid;
}
.board > section {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 10px;
  min-height: 440px;
  padding: 8px;
}
.board section > header {
  justify-content: space-between;
  align-items: center;
  padding: 7px;
  display: flex;
}
.board header span {
  flex-direction: column;
  display: flex;
}
.board header small {
  color: var(--accent);
  font-size: 7px;
}
.board header b {
  margin-top: 3px;
  font-size: 10px;
}
.board header button {
  background: 0 0;
  border: 0;
}
.board header svg {
  width: 14px;
}
.board article {
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 7px;
  padding: 9px;
}
.board article > div {
  justify-content: space-between;
  display: flex;
}
.board article svg {
  width: 12px;
  color: var(--muted);
}
.board article em {
  color: var(--accent);
  font-size: 7px;
  font-style: normal;
}
.board article > b {
  margin: 5px 0;
  font-size: 9px;
  display: block;
}
.board article p {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.board article footer {
  gap: 5px;
  display: flex;
}
.board article footer span {
  background: var(--soft);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 7px;
}
.outline section {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  margin-bottom: 9px;
  padding: 12px;
}
.outline h3 {
  font-size: 10px;
}
.outline button {
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  background: 0 0;
  grid-template-columns: 180px 1fr 60px;
  width: 100%;
  padding: 10px;
  display: grid;
}
.outline button b {
  font-size: 9px;
}
.outline button span,
.outline button em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.matrix {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  min-width: 900px;
  overflow: hidden;
}
.matrixRow {
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: #fff;
  grid-template-columns: 190px repeat(5, 60px) 120px 100px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  display: grid;
}
.matrixRow > * {
  border-right: 1px solid var(--line);
  padding: 7px;
  font-size: 8px;
}
.matrixRow span {
  text-align: center;
}
.matrixRow i {
  background: var(--accent2);
  color: var(--accent);
  border-radius: 4px;
  padding: 3px;
  font-size: 6px;
  font-style: normal;
}
.matrixRow.head {
  background: var(--soft);
}
.write {
  min-height: 100%;
  position: relative;
}
.writeTools {
  border-bottom: 1px solid var(--line);
  z-index: 5;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  display: flex;
  position: sticky;
  top: 0;
}
.writeTools > div {
  display: flex;
}
.writeTools button {
  background: 0 0;
  border: 0;
  border-radius: 6px;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 8px;
  font-size: 8px;
  display: flex;
}
.writeTools button:hover {
  background: var(--accent2);
  color: var(--accent);
}
.writeTools svg {
  width: 14px;
}
.aiTools {
  border: 1px solid var(--line);
  border-radius: 7px;
}
.paper {
  background: #fff;
  max-width: 760px;
  min-height: calc(100vh-102px);
  margin: 22px auto;
  padding: 50px 70px;
  box-shadow: 0 5px 30px #3023420b;
}
.paper .title {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 23px;
  font-weight: 700;
}
.meta {
  gap: 9px;
  margin: 8px 0 30px;
  display: flex;
}
.meta span {
  color: var(--muted);
  background: var(--soft);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 7px;
}
.paper > textarea {
  resize: none;
  color: #343039;
  border: 0;
  outline: 0;
  width: 100%;
  height: calc(100vh-275px);
  min-height: 420px;
  font-family:
    Georgia,
    Noto Serif Thai,
    serif;
  font-size: 14px;
  line-height: 2;
}
.beatInput {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 7px;
  align-items: center;
  margin-bottom: 15px;
  padding: 7px;
  display: flex;
}
.beatInput svg {
  width: 15px;
}
.beatInput input {
  border: 0;
  outline: 0;
  flex: 1;
  margin-left: 7px;
  font-size: 9px;
}
.beatInput kbd {
  font-size: 7px;
}
.history {
  border: 1px solid var(--line);
  width: 235px;
  box-shadow: var(--shadow);
  background: #fff;
  border-radius: 9px;
  padding: 10px;
  position: absolute;
  top: 58px;
  right: 13px;
}
.history header {
  align-items: center;
  gap: 6px;
  font-size: 8px;
  display: flex;
}
.history header svg {
  width: 13px;
}
.history header button {
  background: 0 0;
  border: 0;
  margin-left: auto;
}
.history article {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}
.history article small {
  color: var(--accent);
  font-size: 6px;
}
.history p {
  font-size: 8px;
  line-height: 1.5;
}
.history article button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  font-size: 7px;
}
.codex {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  grid-template-columns: 170px 260px 1fr;
  min-height: 600px;
  display: grid;
  overflow: hidden;
}
.codex > aside {
  border-right: 1px solid var(--line);
  padding: 10px;
}
.codex > aside label {
  border: 1px solid var(--line);
  border-radius: 6px;
  align-items: center;
  height: 30px;
  margin-bottom: 9px;
  padding: 0 7px;
  display: flex;
}
.codex > aside label svg {
  width: 13px;
}
.codex > aside input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 8px;
}
.codex > aside > button {
  background: 0 0;
  border: 0;
  border-radius: 6px;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 32px;
  font-size: 8px;
  display: flex;
}
.codex > aside > button:first-of-type {
  background: var(--accent2);
  color: var(--accent);
}
.codex > aside button svg {
  width: 13px;
}
.codex > aside button span {
  text-align: left;
  flex: 1;
}
.codex > aside button em {
  font-style: normal;
}
.entries {
  border-right: 1px solid var(--line);
  padding: 8px;
  overflow: auto;
}
.entries > button {
  text-align: left;
  background: 0 0;
  border: 0;
  border-radius: 7px;
  align-items: center;
  width: 100%;
  padding: 8px;
  display: flex;
}
.entries > button.active {
  background: var(--accent2);
}
.entries > button > b,
.detail header > b {
  color: #fff;
  background: linear-gradient(145deg, #735dcc, #a790dc);
  border-radius: 8px;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 8px;
  display: grid;
}
.entries span {
  flex-direction: column;
  flex: 1;
  margin-left: 7px;
  display: flex;
}
.entries strong {
  font-size: 8px;
}
.entries small {
  color: var(--muted);
  font-size: 7px;
}
.entries em {
  font-size: 6px;
}
.detail {
  padding: 17px;
  overflow: auto;
}
.detail header {
  align-items: center;
  gap: 9px;
  display: flex;
}
.detail header > b {
  width: 46px;
  height: 46px;
}
.detail header input {
  border: 0;
  outline: 0;
  font-weight: 700;
}
.empty {
  color: var(--muted);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
}
.empty svg {
  width: 30px;
}
.empty b {
  margin-top: 8px;
  font-size: 10px;
}
.empty p {
  font-size: 8px;
}
.workshop {
  flex-direction: column;
  max-width: 900px;
  height: 100%;
  margin: auto;
  display: flex;
}
.workshop > header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  height: 68px;
  padding: 0 20px;
  display: flex;
}
.workshop header span {
  flex-direction: column;
  display: flex;
}
.workshop header b {
  margin-top: 3px;
  font-size: 15px;
}
.workshop select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 7px;
  font-size: 8px;
}
.messages {
  flex: 1;
  padding: 25px;
  overflow: auto;
}
.messages article {
  gap: 9px;
  margin-bottom: 18px;
  display: flex;
}
.messages article > span {
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  flex: none;
  place-items: center;
  width: 27px;
  height: 27px;
  font-size: 7px;
  display: grid;
}
.messages article.user {
  flex-direction: row-reverse;
}
.messages article.user > span {
  color: #514b59;
  background: #ddd7e5;
}
.messages p {
  white-space: pre-line;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  max-width: 650px;
  margin: 0;
  padding: 11px;
  font-size: 9px;
  line-height: 1.7;
}
.messages article > button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  align-self: flex-end;
  height: 25px;
  font-size: 7px;
}
.workshop > footer {
  padding: 12px 20px 18px;
}
.presets {
  gap: 5px;
  margin-bottom: 7px;
  display: flex;
}
.presets button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 5px 8px;
  font-size: 7px;
}
.workshop footer > div:last-child {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 7px;
  display: flex;
}
.workshop textarea {
  resize: none;
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 9px;
}
.metrics {
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 12px;
  display: grid;
}
.metrics article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 15px;
}
.metrics small {
  color: var(--muted);
  font-size: 8px;
  display: block;
}
.metrics b {
  font-size: 23px;
}
.review {
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  display: grid;
}
.panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 14px;
}
.panel h3 {
  font-size: 10px;
}
.bar {
  background: 0 0;
  border: 0;
  grid-template-columns: 130px 1fr 35px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px;
  display: grid;
}
.bar span,
.bar em {
  text-align: left;
  font-size: 8px;
  font-style: normal;
}
.bar i {
  background: var(--soft);
  border-radius: 5px;
  height: 6px;
}
.bar i b {
  background: var(--accent);
  border-radius: 5px;
  height: 100%;
  display: block;
}
.issue {
  border-top: 1px solid var(--line);
  gap: 8px;
  padding: 10px 0;
  display: flex;
}
.issue > i {
  background: #e1a532;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  margin-top: 3px;
}
.issue > i.bad {
  background: #d64e67;
}
.issue span {
  flex-direction: column;
  display: flex;
}
.issue b {
  font-size: 8px;
}
.issue small {
  color: var(--muted);
  font-size: 7px;
}
.toast {
  z-index: 30;
  color: #fff;
  box-shadow: var(--shadow);
  background: #2b2730;
  border-radius: 8px;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  font-size: 8px;
  display: flex;
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translate(-50%);
}
.toast svg {
  width: 14px;
}
@media (width<=1050px) {
  .context {
    display: none;
  }
  .top nav button {
    padding: 0 9px;
  }
  .board {
    grid-template-columns: 1fr 1fr;
  }
  .codex {
    grid-template-columns: 150px 230px 1fr;
  }
}
@media (width<=760px) {
  .rail,
  .actions > button:first-child,
  .logo small {
    display: none;
  }
  .logo {
    width: auto;
  }
  .top nav button {
    padding: 0 10px;
    font-size: 0;
  }
  .page {
    padding: 16px;
  }
  .board {
    display: flex;
    overflow: auto;
  }
  .board > section {
    min-width: 270px;
  }
  .paper {
    margin: 0;
    padding: 35px 25px;
  }
  .aiTools button {
    font-size: 0;
  }
  .codex {
    grid-template-columns: 1fr;
  }
  .detail {
    z-index: 10;
    background: #fff;
    position: fixed;
    inset: 56px 0 0;
  }
  .review {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
}
@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
@property --tw-outline-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
.softBtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  display: flex;
}
.softBtn svg {
  width: 16px;
}
.dashMetrics {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  display: grid;
}
.dashMetrics article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  align-items: center;
  gap: 13px;
  padding: 18px;
  display: flex;
}
.dashMetrics article > i {
  background: var(--accent2);
  width: 44px;
  height: 44px;
  color: var(--accent);
  border-radius: 10px;
  place-items: center;
  display: grid;
}
.dashMetrics svg {
  width: 20px;
}
.dashMetrics span {
  grid-template-columns: auto auto;
  align-items: end;
  gap: 2px 8px;
  display: grid;
}
.dashMetrics small {
  color: var(--muted);
  grid-column: 1/-1;
  font-size: 11px;
}
.dashMetrics b {
  font-size: 25px;
}
.dashMetrics em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.dashGrid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  display: grid;
}
.dashPanel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 245px;
  padding: 18px;
}
.dashPanel > header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 13px;
  display: flex;
}
.dashPanel > header > b {
  align-items: center;
  gap: 7px;
  font-size: 13px;
  display: flex;
}
.dashPanel > header > b svg {
  width: 17px;
  color: var(--accent);
}
.dashPanel > header > em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.healthBar {
  background: var(--soft);
  border-radius: 8px;
  height: 8px;
  margin: 16px 0;
}
.healthBar i {
  background: var(--accent);
  border-radius: 8px;
  width: 82%;
  height: 100%;
  display: block;
}
.canonHealth > button,
.recentScene {
  text-align: left;
  background: 0 0;
  border: 0;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 4px;
  display: flex;
}
.canonHealth > button > i {
  background: #e2a73b;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.canonHealth > button > i.bad {
  background: #dc526b;
}
.canonHealth button span,
.recentScene span {
  flex-direction: column;
  flex: 1;
  display: flex;
}
.canonHealth button b,
.recentScene b {
  font-size: 11px;
}
.canonHealth button small,
.recentScene small {
  color: var(--muted);
  font-size: 9px;
}
.canonHealth button svg,
.recentScene > svg:last-child {
  width: 15px;
  color: var(--muted);
}
.recentScene > svg:first-child {
  width: 18px;
  color: var(--accent);
}
.chapterProgress {
  grid-template-columns: 155px 1fr 55px;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  display: grid;
}
.chapterProgress span {
  flex-direction: column;
  display: flex;
}
.chapterProgress span b {
  font-size: 11px;
}
.chapterProgress span small {
  color: var(--muted);
  font-size: 9px;
}
.chapterProgress > i {
  background: var(--soft);
  border-radius: 7px;
  height: 7px;
}
.chapterProgress > i b {
  background: var(--accent);
  border-radius: 7px;
  height: 100%;
  display: block;
}
.chapterProgress em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.suggestion {
  background: linear-gradient(145deg, #fff, var(--accent2));
}
.suggestion h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  line-height: 1.5;
}
.suggestion p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.suggestion footer {
  gap: 8px;
  margin-top: 20px;
  display: flex;
}
.suggestion footer button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 10px;
}
@media (width>=1051px) {
  .top {
    height: 64px;
    padding: 0 16px;
  }
  .body {
    height: calc(100vh-64px);
  }
  .logo {
    width: 225px;
  }
  .logo b {
    font-size: 14px;
  }
  .logo small {
    font-size: 10px;
  }
  .top nav button {
    padding: 0 13px;
    font-size: 12px;
  }
  .top nav svg {
    width: 17px;
  }
  .actions > button:first-child {
    height: 36px;
    font-size: 11px;
  }
  .rail {
    width: 260px;
    padding: 14px 10px;
  }
  .railHead small {
    font-size: 10px;
  }
  .rail section > header {
    padding: 9px 5px;
  }
  .rail section > header b {
    font-size: 11px;
  }
  .rail section > header small {
    width: 170px;
    font-size: 9px;
  }
  .rail section > header em {
    font-size: 9px;
  }
  .rail section > button {
    height: 36px;
    font-size: 10px;
  }
  .rail section > button svg {
    width: 14px;
  }
  .rail footer button {
    height: 38px;
    font-size: 10px;
  }
  .rail footer p {
    font-size: 9px;
  }
  .context {
    width: 340px;
    padding: 19px;
  }
  .context header small,
  .pageHead small,
  .workshop header small {
    font-size: 9px;
  }
  .context header b {
    font-size: 13px;
  }
  .context label,
  .detail label {
    font-size: 10px;
  }
  .context textarea,
  .context input,
  .context select,
  .detail textarea,
  .detail select {
    padding: 9px;
    font-size: 11px;
  }
  .context h3 {
    font-size: 11px;
  }
  .page {
    padding: 30px 32px 60px;
  }
  .pageHead h1 {
    font-size: 30px;
  }
  .pageHead p {
    font-size: 12px;
  }
  .primary {
    height: 38px;
    padding: 0 14px;
    font-size: 11px;
  }
  .board header small {
    font-size: 9px;
  }
  .board header b {
    font-size: 12px;
  }
  .board article > b {
    font-size: 11px;
  }
  .board article p {
    font-size: 10px;
  }
  .board article footer span {
    font-size: 9px;
  }
  .paper {
    max-width: 830px;
    padding: 55px 75px;
  }
  .paper .title {
    font-size: 28px;
  }
  .paper > textarea {
    font-size: 17px;
    line-height: 2;
  }
  .writeTools {
    height: 54px;
  }
  .writeTools button {
    height: 34px;
    font-size: 10px;
  }
  .workshop header b {
    font-size: 18px;
  }
  .messages p {
    font-size: 12px;
  }
  .presets button {
    font-size: 9px;
  }
  .workshop textarea {
    font-size: 12px;
  }
}
@media (width<=1200px) {
  .dashMetrics {
    grid-template-columns: 1fr 1fr;
  }
  .dashGrid {
    grid-template-columns: 1fr;
  }
}
.projectHub {
  background: #f7f6f9;
  min-height: 100vh;
}
.projectHub > header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  padding: 0 34px;
  display: flex;
}
.hubBrand {
  align-items: center;
  gap: 11px;
  display: flex;
}
.hubBrand > i {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
}
.hubBrand svg {
  width: 19px;
}
.hubBrand span {
  flex-direction: column;
  display: flex;
}
.hubBrand b {
  font-size: 14px;
}
.hubBrand small {
  color: var(--muted);
  font-size: 10px;
}
.hubActions {
  align-items: center;
  gap: 8px;
  display: flex;
}
.hubActions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
}
.hubActions svg {
  width: 16px;
}
.hubActions > b {
  color: #503b9b;
  background: #ddd5fa;
  border-radius: 50%;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 10px;
  display: grid;
}
.projectHub > main {
  max-width: 1280px;
  margin: auto;
  padding: 48px 34px 80px;
}
.hubHero {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  display: flex;
}
.hubHero small {
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}
.hubHero h1 {
  margin: 6px 0;
  font-size: 34px;
}
.hubHero p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.newProject {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 17px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
}
.newProject svg {
  width: 17px;
}
.hubToolbar {
  gap: 10px;
  margin-bottom: 18px;
  display: flex;
}
.hubToolbar > label {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  display: flex;
}
.hubToolbar label svg {
  width: 17px;
  color: var(--muted);
}
.hubToolbar input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 12px;
}
.hubToolbar select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 11px;
}
.hubToolbar > div {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 3px;
  display: flex;
}
.hubToolbar > div button {
  background: 0 0;
  border: 0;
  border-radius: 6px;
  width: 34px;
}
.hubToolbar > div button.active {
  background: var(--accent2);
  color: var(--accent);
}
.hubToolbar > div svg {
  width: 15px;
}
.projectGrid {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  display: grid;
}
.projectGrid > article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  grid-template-columns: 145px 1fr;
  min-height: 235px;
  transition: all 0.18s;
  display: grid;
  overflow: hidden;
}
.projectGrid > article:hover {
  box-shadow: var(--shadow);
  border-color: #b9acd9;
  transform: translateY(-2px);
}
.cover {
  color: #fff;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px;
  display: flex;
}
.cover > svg {
  width: 29px;
}
.cover span {
  background: #ffffff18;
  border: 1px solid #ffffff52;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 9px;
}
.projectInfo {
  flex-direction: column;
  padding: 17px;
  display: flex;
}
.projectInfo > header {
  justify-content: space-between;
  display: flex;
}
.projectInfo header span {
  min-width: 0;
}
.projectInfo h2 {
  margin: 0 0 5px;
  font-size: 16px;
}
.projectInfo p {
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 10px;
  overflow: hidden;
}
.projectInfo header button {
  background: 0 0;
  border: 0;
}
.projectInfo header svg {
  width: 17px;
}
.projectStats {
  gap: 24px;
  margin: 22px 0;
  display: flex;
}
.projectStats span {
  flex-direction: column;
  display: flex;
}
.projectStats b {
  font-size: 13px;
}
.projectStats small {
  color: var(--muted);
  font-size: 8px;
}
.projectProgress > span {
  justify-content: space-between;
  font-size: 9px;
  display: flex;
}
.projectProgress > span small {
  color: var(--muted);
}
.projectProgress > i {
  background: var(--soft);
  border-radius: 6px;
  height: 6px;
  margin-top: 7px;
  display: block;
}
.projectProgress > i b {
  background: var(--accent);
  border-radius: 6px;
  height: 100%;
  display: block;
}
.projectInfo > footer {
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  display: flex;
}
.projectInfo > footer > small {
  color: var(--muted);
  font-size: 8px;
}
.projectInfo > footer button {
  color: var(--accent);
  background: 0 0;
  border: 0;
  align-items: center;
  font-size: 10px;
  display: flex;
}
.projectInfo > footer svg {
  width: 14px;
}
.projectList {
  flex-direction: column;
  gap: 10px;
  display: flex;
}
.projectList > article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  grid-template-columns: 90px 1fr;
  display: grid;
  overflow: hidden;
}
.projectList .cover {
  min-height: 135px;
}
.projectList .projectStats {
  margin: 12px 0;
}
.projectList .projectInfo {
  grid-template-columns: 1.3fr 0.8fr 1fr;
  column-gap: 20px;
  display: grid;
}
.projectList .projectInfo > footer {
  grid-column: 1/-1;
}
.projectModal {
  z-index: 50;
  background: #241d326e;
  place-items: center;
  display: grid;
  position: fixed;
  inset: 0;
}
.projectModal > section {
  width: 470px;
  box-shadow: var(--shadow);
  background: #fff;
  border-radius: 14px;
  padding: 23px;
}
.projectModal header {
  justify-content: space-between;
  display: flex;
}
.projectModal header small {
  color: var(--accent);
  letter-spacing: 0.13em;
  font-size: 9px;
}
.projectModal h2 {
  margin: 4px 0 20px;
  font-size: 22px;
}
.projectModal header button {
  background: 0 0;
  border: 0;
}
.projectModal header svg {
  width: 18px;
}
.projectModal label {
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  display: flex;
}
.projectModal input {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 42px;
  padding: 0 11px;
  font-size: 12px;
}
.projectModal p {
  color: var(--muted);
  font-size: 10px;
}
.projectModal footer {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  display: flex;
}
.projectModal footer > button:first-child {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 36px;
  padding: 0 13px;
  font-size: 11px;
}
.noProjects {
  height: 300px;
  color: var(--muted);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
}
.noProjects svg {
  width: 35px;
}
.noProjects b {
  margin-top: 10px;
  font-size: 14px;
}
.noProjects p {
  font-size: 11px;
}
@media (width<=800px) {
  .projectHub > main {
    padding: 28px 16px;
  }
  .hubHero {
    align-items: flex-start;
  }
  .hubHero h1 {
    font-size: 27px;
  }
  .projectGrid {
    grid-template-columns: 1fr;
  }
  .projectGrid > article {
    grid-template-columns: 105px 1fr;
  }
  .hubToolbar select {
    display: none;
  }
  .projectModal > section {
    width: calc(100vw-30px);
  }
}
.backProjects {
  text-align: left;
  background: 0 0;
  border: 0;
  border-radius: 8px;
  align-items: center;
  gap: 5px;
  width: 180px;
  height: 44px;
  display: flex;
}
.backProjects:hover {
  background: var(--accent2);
  color: var(--accent);
}
.backProjects > svg {
  width: 16px;
  transform: rotate(180deg);
}
.backProjects span {
  flex-direction: column;
  display: flex;
}
.backProjects small {
  color: var(--muted);
  font-size: 8px;
}
.backProjects b {
  font-size: 11px;
}
.aiTop {
  font-weight: 600;
  background: var(--accent2) !important;
  height: 36px !important;
  color: var(--accent) !important;
  border: 1px solid #cfc4ed !important;
  border-radius: 8px !important;
  padding: 0 11px !important;
}
.aiFloat {
  background: var(--accent);
  color: #fff;
  z-index: 18;
  border: 0;
  border-radius: 22px;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 15px;
  font-size: 11px;
  display: flex;
  position: fixed;
  bottom: 20px;
  right: 362px;
  box-shadow: 0 9px 25px #49359e45;
}
.aiFloat svg {
  width: 17px;
}
.aiOverlay {
  z-index: 60;
  background: #21192f45;
  justify-content: flex-end;
  display: flex;
  position: fixed;
  inset: 0;
}
.aiCopilot {
  background: #fff;
  flex-direction: column;
  width: 460px;
  height: 100%;
  padding: 20px;
  display: flex;
  overflow: auto;
  box-shadow: -15px 0 45px #21172d24;
}
.aiCopilot > header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  padding-bottom: 17px;
  display: flex;
}
.aiCopilot > header > span {
  align-items: center;
  gap: 10px;
  display: flex;
}
.aiCopilot > header > span > i {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
}
.aiCopilot > header > span > i svg {
  width: 18px;
}
.aiCopilot > header > span > span {
  flex-direction: column;
  display: flex;
}
.aiCopilot > header small {
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 8px;
}
.aiCopilot > header b {
  font-size: 14px;
}
.aiCopilot > header button,
.aiContext button {
  background: 0 0;
  border: 0;
}
.aiCopilot > header button svg {
  width: 18px;
}
.aiContext {
  background: var(--accent2);
  border: 1px solid #ddd4f3;
  border-radius: 9px;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  padding: 11px;
  display: flex;
}
.aiContext > span {
  flex-direction: column;
  display: flex;
}
.aiContext b {
  font-size: 10px;
}
.aiContext small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 8px;
}
.aiContext svg {
  width: 15px;
}
.aiCopilot > section > small {
  color: var(--muted);
  letter-spacing: 0.12em;
  font-size: 8px;
}
.aiPresets {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
  display: grid;
}
.aiPresets button {
  border: 1px solid var(--line);
  text-align: left;
  background: #fff;
  border-radius: 8px;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  font-size: 10px;
  display: flex;
}
.aiPresets button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent2);
}
.aiPresets svg {
  width: 14px;
}
.aiResult {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 15px 0;
  padding: 13px;
}
.aiResult > small {
  color: var(--accent);
  font-size: 8px;
}
.aiResult p {
  white-space: pre-line;
  font-size: 10px;
  line-height: 1.7;
}
.aiResult footer {
  justify-content: flex-end;
  gap: 6px;
  display: flex;
}
.aiResult footer button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  height: 31px;
  padding: 0 9px;
  font-size: 9px;
}
.aiResult footer .primary {
  background: var(--accent);
  color: #fff;
}
.aiPrompt {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  gap: 7px;
  margin-top: auto;
  padding: 8px;
  display: flex;
}
.aiPrompt textarea {
  resize: none;
  border: 0;
  outline: 0;
  flex: 1;
  min-height: 65px;
  font-size: 10px;
}
.aiPrompt button {
  align-self: flex-end;
}
.aiPrompt button:disabled {
  opacity: 0.45;
}
.aiPrompt svg {
  width: 14px;
}
@media (width<=1050px) {
  .backProjects {
    width: 52px;
  }
  .backProjects span {
    display: none;
  }
  .aiFloat {
    right: 20px;
  }
  .aiCopilot {
    width: min(460px, 100vw);
  }
}
.projectInfo > header {
  position: relative;
}
.projectMenu {
  border: 1px solid var(--line);
  z-index: 12;
  width: 145px;
  box-shadow: var(--shadow);
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  position: absolute;
  top: 28px;
  right: 0;
}
.projectMenu button {
  text-align: left;
  border-radius: 5px;
  width: 100%;
  height: 31px;
  padding: 0 8px;
  font-size: 9px;
  background: 0 0 !important;
  border: 0 !important;
}
.projectMenu button:hover {
  color: var(--accent);
  background: var(--accent2) !important;
}
.projectGrid > article,
.projectList > article {
  cursor: pointer;
}
.projectGrid > article:focus,
.projectList > article:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.projectModal label select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  height: 42px;
  padding: 0 10px;
  font-size: 11px;
}
.toolEmpty {
  border: 1px solid var(--line);
  height: 380px;
  color: var(--muted);
  background: #fff;
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
}
.toolEmpty > svg {
  width: 36px;
}
.toolEmpty > b {
  margin-top: 10px;
  font-size: 14px;
}
.toolEmpty > p {
  font-size: 10px;
}
.settingsGrid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  display: grid;
}
.settingsGrid label {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
  font-size: 10px;
  display: flex;
}
.settingsGrid select {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  height: 37px;
  padding: 0 9px;
  font-size: 10px;
}
.snippetComposer textarea {
  border: 1px solid var(--line);
  resize: vertical;
  border-radius: 10px;
  width: 100%;
  height: 110px;
  margin-bottom: 12px;
  padding: 13px;
  font-size: 11px;
}
.snippetList {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  display: grid;
}
.snippetList article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  align-items: center;
  gap: 8px;
  padding: 12px;
  display: flex;
}
.snippetList svg {
  width: 16px;
  color: var(--accent);
}
.snippetList input {
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 10px;
}
.snippetList button {
  background: 0 0;
  border: 0;
}
.snippetList button svg {
  color: #c84a62;
}
.aiContext button,
.writeTools > div:first-child,
.codex > aside > button:not(:first-of-type) {
  display: none;
}
.keyBox {
  background: #f7f4ff;
  border: 1px solid #d9cfee;
  border-radius: 9px;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-top: 14px;
  padding: 10px;
  display: grid;
}
.keyBox label {
  color: var(--muted);
  flex-direction: column;
  gap: 5px;
  font-size: 9px;
  display: flex;
}
.keyBox input {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  height: 34px;
  padding: 0 8px;
  font-size: 10px;
}
.keyBox button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  align-self: end;
  height: 34px;
  padding: 0 10px;
  font-size: 9px;
}
.keyBox small {
  color: var(--muted);
  grid-column: 1/-1;
  font-size: 8px;
}
.aiLoading,
.aiError {
  border-radius: 8px;
  margin: 12px 0;
  padding: 10px;
  font-size: 9px;
}
.aiLoading {
  background: var(--accent2);
  color: var(--accent);
  align-items: center;
  gap: 7px;
  display: flex;
}
.aiLoading svg {
  width: 14px;
}
.aiError {
  color: #b43d55;
  background: #fff0f2;
  border: 1px solid #f1ccd4;
}
.keyBox .providerTabs {
  background: #e9e3f7;
  border-radius: 7px;
  grid-column: 1/-1;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 3px;
  display: grid;
}
.keyBox .providerTabs button {
  height: 30px;
  color: var(--muted);
  background: 0 0;
  font-weight: 600;
}
.keyBox .providerTabs button.active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 1px 4px #34275b20;
}
.projectModal > .projectCreate {
  width: min(720px, 100vw-30px);
  max-height: 92vh;
  overflow: auto;
}
.importProject {
  width: 100%;
  min-height: 68px;
  color: var(--accent);
  background: #f8f5ff;
  border: 1px dashed #9d8eca;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 11px;
  display: flex;
}
.importProject svg {
  width: 21px;
}
.importProject span {
  text-align: left;
  flex-direction: column;
  display: flex;
}
.importProject b {
  font-size: 11px;
}
.importProject small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 8px;
}
.modalDivider {
  color: var(--muted);
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 8px;
  display: flex;
}
.modalDivider:before,
.modalDivider:after {
  content: "";
  background: var(--line);
  flex: 1;
  height: 1px;
}
.createFields {
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  display: grid;
}
.periodBox {
  border: 1px solid var(--line);
  background: #faf9fc;
  border-radius: 10px;
  margin-top: 14px;
  padding: 12px;
}
.periodBox > header {
  align-items: center;
}
.periodBox > header span {
  flex-direction: column;
  display: flex;
}
.periodBox > header b {
  font-size: 10px;
}
.periodBox > header small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 8px;
}
.periodBox > header > button {
  border: 1px solid var(--line);
  height: 29px;
  color: var(--accent);
  background: #fff;
  border-radius: 6px;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  display: flex;
}
.periodBox > header > button svg {
  width: 12px;
}
.periodRow {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
  display: grid;
}
.periodRow input {
  height: 36px;
  font-size: 9px;
}
.secondaryPeriods .periodRow {
  grid-template-columns: 1fr 1fr 1fr 30px;
}
.secondaryPeriods .periodRow > button {
  color: #b43d55;
  background: #fff0f2;
  border: 0;
  border-radius: 6px;
  height: 36px;
}
.secondaryPeriods .periodRow > button svg {
  width: 14px;
}
.projectTimeline {
  background: var(--accent2);
  color: var(--accent);
  border-radius: 6px;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 6px 8px;
  font-size: 8px;
  display: flex;
}
.projectTimeline small {
  color: var(--muted);
  margin-left: auto;
}
@media (width<=650px) {
  .createFields,
  .periodRow,
  .secondaryPeriods .periodRow {
    grid-template-columns: 1fr;
  }
  .secondaryPeriods .periodRow > button {
    width: 100%;
  }
}
.aiProviderBox {
  display: block;
}
.aiProviderBox .providerTabs {
  grid-template-columns: 1.35fr 1fr 1fr;
  margin-bottom: 10px;
}
.ollamaSetup {
  gap: 9px;
  display: grid;
}
.ollamaSetup label {
  grid-template-columns: 110px 1fr;
  align-items: center;
  display: grid;
}
.ollamaSetup input,
.ollamaSetup select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  width: 100%;
  height: 35px;
  padding: 0 8px;
  font-size: 10px;
}
.connectionState {
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  padding: 8px;
  font-size: 9px;
  display: flex;
}
.connectionState i {
  background: #a8a2ad;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.connectionState.online {
  color: #177a55;
  background: #f1fbf7;
  border-color: #b9e1d1;
}
.connectionState.online i {
  background: #21a76f;
  box-shadow: 0 0 0 3px #bfead8;
}
.connectionState.testing i {
  background: #e1a631;
}
.connectionState.error {
  color: #b43d55;
  background: #fff5f6;
  border-color: #efcbd3;
}
.connectionState.error i {
  background: #d74d68;
}
.ollamaActions {
  gap: 7px;
  display: flex;
}
.ollamaActions button {
  color: var(--accent);
  background: #fff;
  border: 1px solid #cfc4ed;
  flex: 1;
}
.ollamaActions button.primary {
  background: var(--accent);
  color: #fff;
}
.ollamaSetup details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.ollamaSetup summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 9px;
}
.ollamaSetup details p {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.ollamaSetup code {
  white-space: pre-wrap;
  word-break: break-all;
  color: #f6f2ff;
  background: #27232d;
  border-radius: 6px;
  padding: 8px;
  font-size: 8px;
  line-height: 1.5;
  display: block;
}
.ollamaSetup details button {
  color: var(--accent);
  background: #fff;
  border: 1px solid #cfc4ed;
  margin-top: 7px;
}
.fallbackRow {
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 95px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
}
.fallbackRow label {
  color: var(--muted);
  flex-direction: row;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  display: flex;
}
.fallbackRow input {
  width: 14px;
  height: 14px;
}
.fallbackRow select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  height: 32px;
  padding: 0 6px;
  font-size: 9px;
}
@media (width<=520px) {
  .ollamaSetup label {
    grid-template-columns: 1fr;
  }
  .ollamaActions {
    flex-direction: column;
  }
  .fallbackRow,
  .aiProviderBox .providerTabs {
    grid-template-columns: 1fr;
  }
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
@media (width>=761px) {
  .studio,
  .projectHub {
    zoom: 1.12;
    width: 100%;
    max-width: 100%;
  }
  .studio {
    height: 100vh;
  }
  .projectHub {
    min-height: 100vh;
  }
  .creatorOverlay,
  .aiOverlay {
    zoom: 0.892857;
  }
  .top nav button {
    font-size: 11px;
  }
  .rail section > button,
  .rail footer button {
    font-size: 10px;
  }
  .rail section > header b {
    font-size: 11px;
  }
  .rail section > header small {
    font-size: 9px;
  }
  .pageHead p,
  .board article p,
  .context label,
  .detail label,
  .dashPanel button b,
  .recentScene b,
  .entries strong {
    font-size: 10px;
  }
  .dashPanel button small,
  .recentScene small,
  .entries small {
    font-size: 9px;
  }
}
@media (width<=760px) {
  html,
  body {
    font-size: 16px;
  }
  .top {
    height: 60px;
  }
  .body {
    height: calc(100vh-60px);
  }
}
.moduleGrid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  display: grid;
}
.moduleGrid article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  display: flex;
}
.moduleGrid article.enabled {
  border-color: #cfc4ed;
}
.moduleGrid article span b {
  font-size: 12px;
}
.moduleGrid article p {
  color: var(--muted);
  margin: 4px 0;
  font-size: 9px;
}
.moduleGrid article em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.moduleToggle {
  background: #ddd8e2;
  border: 0;
  border-radius: 18px;
  align-items: center;
  gap: 6px;
  width: 66px;
  height: 31px;
  padding: 4px 8px;
  font-size: 8px;
  display: flex;
}
.moduleToggle i {
  background: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}
.moduleToggle.on {
  background: var(--accent);
  color: #fff;
  flex-direction: row-reverse;
}
.moduleNotice {
  background: var(--accent2);
  color: var(--accent);
  border: 1px solid #d7cef0;
  border-radius: 10px;
  gap: 9px;
  margin-top: 12px;
  padding: 13px;
  display: flex;
}
.moduleNotice svg {
  width: 18px;
}
.moduleNotice b {
  font-size: 10px;
}
.moduleNotice p {
  margin: 3px 0;
  font-size: 8px;
}
.rail footer .deckLink {
  color: #fff;
  background: linear-gradient(135deg, #34294e, #745bd1);
}
.deckStudio {
  background: var(--bg);
  grid-template-columns: 200px 1fr;
  min-height: 100%;
  display: grid;
}
.deckStudio > aside {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 14px 9px;
}
.deckStudio > aside header {
  flex-direction: column;
  padding: 7px;
  display: flex;
}
.deckStudio > aside small {
  color: var(--accent);
  font-size: 7px;
}
.deckStudio > aside b {
  margin-top: 3px;
  font-size: 13px;
}
.deckStudio > aside button {
  text-align: left;
  width: 100%;
  height: 37px;
  color: var(--muted);
  background: 0 0;
  border: 0;
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  display: flex;
}
.deckStudio > aside button.active {
  background: var(--accent2);
  color: var(--accent);
}
.deckStudio > main {
  padding: 24px;
  overflow: auto;
}
.deckArchitecture,
.cardWizard,
.systemBoard,
.spreadBuilder,
.guidebook,
.consistency,
.exportDeck {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 15px;
}
.deckArchitecture h3,
.cardWizard h3,
.systemBoard h3,
.guidebook h3,
.consistency h3,
.exportDeck h3 {
  margin-top: 0;
  font-size: 13px;
}
.deckFields,
.cardFields,
.printSpec {
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  display: grid;
}
.deckFields label,
.cardFields label,
.printSpec label {
  color: var(--muted);
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  display: flex;
}
.deckFields input,
.deckFields select,
.cardFields textarea,
.cardFields select,
.printSpec input {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  padding: 8px;
  font-size: 9px;
}
.deckFields input,
.deckFields select {
  height: 37px;
}
.cardFields textarea {
  resize: vertical;
  min-height: 58px;
}
.deckArchitecture > .primary,
.cardWizard > .primary {
  margin-top: 10px;
}
.deckCards {
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
  display: grid;
}
.deckCards article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 13px;
}
.deckCards small {
  color: var(--accent);
  font-size: 7px;
}
.deckCards b {
  margin: 4px 0;
  font-size: 12px;
  display: block;
}
.deckCards p,
.deckCards em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.cardWizard > header {
  justify-content: space-between;
  display: flex;
}
.cardWizard > header small {
  color: var(--accent);
  font-size: 7px;
}
.cardWizard > header em {
  color: var(--muted);
  font-size: 8px;
}
.aiCard {
  background: var(--accent2);
  border-radius: 9px;
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px;
  display: flex;
}
.aiCard textarea {
  border: 1px solid #d5caef;
  border-radius: 7px;
  flex: 1;
  min-height: 58px;
  padding: 8px;
  font-size: 9px;
}
.aiCard button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 0 11px;
  font-size: 8px;
}
.systemBoard article {
  border-top: 1px solid var(--line);
  padding: 12px;
}
.systemBoard article > b {
  font-size: 10px;
}
.systemBoard article span {
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
  display: flex;
}
.systemBoard article em {
  background: var(--accent2);
  color: var(--accent);
  border-radius: 12px;
  padding: 4px 6px;
  font-size: 7px;
  font-style: normal;
}
.systemBoard p {
  color: var(--muted);
  font-size: 8px;
}
.spreadBuilder > header {
  gap: 7px;
  display: flex;
}
.spreadBuilder input,
.spreadBuilder select {
  border: 1px solid var(--line);
  border-radius: 7px;
  height: 36px;
  padding: 0 8px;
  font-size: 9px;
}
.spreadBuilder input {
  flex: 1;
}
.spreadCanvas {
  background: radial-gradient(circle, #ddd 1px, #0000 1px) 0 0/20px 20px;
  border: 1px dashed #cfc7d9;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 320px;
  margin-top: 12px;
  display: flex;
  overflow: auto;
}
.spreadCanvas article {
  color: #fff;
  cursor: grab;
  background: linear-gradient(145deg, #3a2d55, #7258c9);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 72px;
  height: 120px;
  display: flex;
  box-shadow: 0 8px 20px #30234228;
}
.spreadCanvas article b {
  font-size: 18px;
}
.spreadCanvas article span {
  font-size: 7px;
}
.savedSpreads {
  gap: 6px;
  margin-top: 8px;
  display: flex;
}
.savedSpreads span {
  background: var(--soft);
  border-radius: 12px;
  padding: 5px 7px;
  font-size: 7px;
}
.guidebook article,
.consistency article {
  border-top: 1px solid var(--line);
  align-items: center;
  gap: 9px;
  padding: 10px;
  display: flex;
}
.guidebook article b {
  width: 180px;
  font-size: 9px;
}
.guidebook article p {
  flex: 1;
  font-size: 8px;
}
.guidebook article em {
  color: var(--accent);
  font-size: 7px;
}
.consistency article > i {
  background: #35a878;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.consistency article > i.warn {
  background: #e3a93b;
}
.consistency article span {
  flex: 1;
}
.consistency article b {
  font-size: 9px;
}
.consistency article p {
  color: var(--muted);
  margin: 2px 0;
  font-size: 8px;
}
.consistency article button,
.exportDeck button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 32px;
  font-size: 8px;
}
.exportDeck > div:last-child {
  gap: 7px;
  margin-top: 12px;
  display: flex;
}
@media (width<=900px) {
  .deckStudio {
    grid-template-columns: 1fr;
  }
  .deckStudio > aside {
    display: flex;
    overflow: auto;
  }
  .deckStudio > aside header {
    display: none;
  }
  .deckStudio > aside button {
    white-space: nowrap;
    width: auto;
  }
  .deckStudio > main {
    padding: 14px;
  }
  .moduleGrid,
  .deckFields,
  .cardFields,
  .printSpec,
  .deckCards {
    grid-template-columns: 1fr;
  }
}
html,
body {
  height: 100%;
  overflow: hidden;
}
* {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
}
@media (width>=761px) {
  .studio {
    min-height: 0;
    overflow: hidden;
    height: 89.2858vh !important;
  }
  .projectHub {
    overflow: hidden;
    height: 89.2858vh !important;
    min-height: 0 !important;
  }
  .top {
    gap: 9px;
    height: 52px;
    padding: 0 10px;
  }
  .body {
    min-height: 0;
    overflow: hidden;
    height: calc(100% - 52px) !important;
  }
  .logo {
    width: 205px;
  }
  .top nav button {
    padding: 0 10px;
  }
  .actions {
    gap: 4px;
  }
  .actions .aiTop {
    white-space: nowrap;
    flex: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-width: 112px;
    max-width: none;
    overflow: hidden;
    height: 34px !important;
    padding: 0 11px !important;
    line-height: 1 !important;
    display: inline-flex !important;
  }
  .actions .aiTop svg {
    flex: none;
    width: 15px;
    height: 15px;
  }
  .globalSave {
    min-width: 112px;
  }
  .rail {
    width: 236px;
    padding: 7px;
    overflow: auto;
  }
  .railHead {
    padding: 5px 7px;
  }
  .rail section > header {
    padding: 5px 4px;
  }
  .rail section > button {
    height: 29px;
  }
  .rail footer {
    padding-top: 4px;
  }
  .rail footer button {
    height: 29px;
  }
  .rail footer p {
    margin: 4px 0;
  }
  .main {
    overscroll-behavior: contain;
    height: 100%;
    min-height: 0;
    overflow: auto;
  }
  .context {
    width: 300px;
    padding: 11px;
    overflow: auto;
  }
  .context label,
  .detail label {
    margin: 6px 0;
  }
  .context section {
    margin-top: 9px;
    padding-top: 7px;
  }
  .page {
    max-width: none;
    padding: 16px 20px 22px;
  }
  .pageHead {
    align-items: center;
    margin-bottom: 12px;
  }
  .pageHead h1 {
    margin: 1px 0;
    font-size: 25px;
  }
  .primary,
  .danger,
  .softBtn {
    height: 32px;
  }
  .dashMetrics {
    gap: 9px;
    margin-bottom: 10px;
  }
  .dashMetrics article {
    gap: 9px;
    padding: 11px;
  }
  .dashMetrics article > i {
    width: 36px;
    height: 36px;
  }
  .dashMetrics b {
    font-size: 20px;
  }
  .dashGrid {
    gap: 9px;
  }
  .dashPanel {
    min-height: 0;
    padding: 12px;
  }
  .dashPanel > header {
    padding-bottom: 8px;
  }
  .canonHealth > button,
  .recentScene {
    padding: 7px 3px;
  }
  .chapterProgress {
    padding: 8px 0;
  }
  .suggestion h3 {
    margin: 10px 0 5px;
  }
  .suggestion footer {
    margin-top: 10px;
  }
  .board {
    gap: 8px;
    height: calc(89.2858vh-132px);
  }
  .board > section {
    height: 100%;
    min-height: 0;
    padding: 6px;
    overflow: auto;
  }
  .board article {
    margin-bottom: 5px;
    padding: 7px;
  }
  .board article p {
    margin: 5px 0;
  }
  .codex {
    height: calc(89.2858vh-124px);
    min-height: 420px;
  }
  .detail {
    padding: 12px;
  }
  .writeTools {
    height: 43px;
    padding: 0 9px;
  }
  .writeTools button {
    height: 29px;
    padding: 0 6px;
  }
  .paper {
    max-width: 820px;
    min-height: calc(89.2858vh-78px);
    margin: 12px auto;
    padding: 32px 58px;
  }
  .paper .title {
    font-size: 25px;
  }
  .meta {
    margin: 6px 0 18px;
  }
  .paper > textarea {
    height: calc(89.2858vh-194px);
    min-height: 260px;
    line-height: 1.75;
  }
  .intelligencePage,
  .deckStudio {
    height: 100%;
    min-height: 0;
  }
  .intelNav,
  .deckStudio > aside {
    padding-top: 9px;
    overflow: auto;
  }
  .intelMain,
  .deckStudio > main {
    height: 100%;
    padding: 14px 16px;
    overflow: auto;
  }
  .intelMain .pageHead {
    margin-bottom: 10px;
  }
  .intelComposer {
    margin-bottom: 8px;
    padding: 8px;
  }
  .intelList article {
    padding: 7px 9px;
  }
  .healthCards {
    gap: 8px;
  }
  .healthCards article,
  .deckArchitecture,
  .cardWizard,
  .systemBoard,
  .spreadBuilder,
  .guidebook,
  .consistency,
  .exportDeck {
    padding: 11px;
  }
  .deckCards {
    gap: 7px;
  }
  .deckCards article {
    padding: 9px;
  }
  .spreadCanvas {
    min-height: 250px;
  }
  .workshop > header {
    height: 54px;
  }
  .messages {
    padding: 14px 20px;
  }
  .messages article {
    margin-bottom: 11px;
  }
  .workshop > footer {
    padding: 8px 20px 11px;
  }
  .presets {
    margin-bottom: 5px;
  }
  .projectHub > header {
    height: 58px;
    padding: 0 26px;
  }
  .projectHub > main {
    height: calc(100% - 58px);
    overflow: auto;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
  .hubHero {
    margin-bottom: 14px;
  }
  .projectGrid {
    gap: 11px;
  }
  .projectGrid > article {
    min-height: 170px;
  }
  .characterCreator {
    height: min(790px, 88vh);
  }
  .characterCreator > header {
    height: 52px;
  }
  .characterCreator > nav {
    padding: 5px 12px;
  }
  .creatorBody > main {
    padding: 10px;
  }
  .characterPreview {
    margin-bottom: 7px;
    padding: 9px;
  }
  .generatorBox {
    margin-bottom: 7px;
    padding: 8px;
  }
  .sectionHead {
    height: 39px;
  }
  .fieldGrid {
    gap: 7px;
    padding: 9px;
  }
  .characterCreator > footer {
    height: 50px;
  }
  .aiCopilot {
    padding: 14px;
    overflow: hidden;
  }
  .aiCopilot > section {
    flex: none;
    overflow: visible;
  }
  .aiContext {
    margin: 9px 0;
    padding: 8px;
  }
  .aiResult {
    margin: 9px 0;
    padding: 9px;
  }
}
.aiProviderSummary {
  text-align: left;
  background: #f7f4ff;
  border: 1px solid #d8cff0;
  border-radius: 9px;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 10px 0 8px;
  padding: 7px 10px;
  display: flex;
}
.aiProviderSummary > span {
  align-items: center;
  gap: 8px;
  display: flex;
}
.aiProviderSummary > span:first-child > i {
  background: #e1a631;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px #e1a63118;
}
.aiProviderSummary > span:first-child > i.ready {
  background: #29a775;
  box-shadow: 0 0 0 3px #29a77518;
}
.aiProviderSummary > span span {
  flex-direction: column;
  gap: 2px;
  display: flex;
}
.aiProviderSummary small {
  color: var(--accent);
  letter-spacing: 0.1em;
  font-size: 7px;
}
.aiProviderSummary b {
  font-size: 10px;
}
.aiProviderSummary > span:last-child {
  color: var(--accent);
  white-space: nowrap;
  font-size: 8px;
}
.aiProviderSummary svg {
  width: 13px;
  height: 13px;
}
.aiProviderSummary > span:last-child svg:last-child {
  transition: transform 0.2s;
}
.aiProviderSummary[aria-expanded="true"] > span:last-child svg:last-child {
  transform: rotate(180deg);
}
.aiCopilot > .aiProviderBox {
  max-height: 48vh;
  margin-top: 0;
  overflow: auto;
}
.aiCopilot > .aiPrompt {
  flex: none;
  margin-top: auto;
  position: sticky;
  bottom: 0;
}
.aiHeaderActions {
  align-items: center;
  gap: 7px;
  display: flex;
}
.aiTextSize {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  align-items: center;
  height: 29px;
  display: flex;
  overflow: hidden;
}
.aiTextSize button {
  width: 29px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  background: 0 0 !important;
  border: 0 !important;
  height: 29px !important;
}
.aiTextSize b {
  text-align: center;
  min-width: 22px;
  color: var(--muted);
  font-size: 8px;
}
.aiConversation {
  scrollbar-width: thin;
  scrollbar-color: #b7add0 transparent;
  flex: 1;
  min-height: 0;
  padding-right: 7px;
  overflow: hidden auto;
}
.aiConversation::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.aiConversation::-webkit-scrollbar-track {
  background: 0 0;
}
.aiConversation::-webkit-scrollbar-thumb {
  background: #b7add0;
  border: 2px solid #fff;
  border-radius: 10px;
}
.aiConversation .aiContext {
  margin-top: 2px;
}
.aiConversation .aiPresets button,
.aiConversation .aiResult p,
.aiConversation .aiSelectionContext blockquote {
  font-size: inherit;
}
.aiResult footer {
  flex-wrap: wrap;
}
.aiSelectionContext {
  background: #faf8ff;
  border: 1px solid #cfc4ed;
  border-radius: 9px;
  margin: 0 0 9px;
  padding: 9px 10px;
}
.aiSelectionContext > small {
  letter-spacing: 0.1em;
  color: var(--accent);
  font-size: 7px;
  font-weight: 700;
}
.aiSelectionContext blockquote {
  border-left: 3px solid var(--accent);
  white-space: pre-wrap;
  background: #fff;
  border-radius: 0 6px 6px 0;
  max-height: 96px;
  margin: 6px 0;
  padding: 7px 9px;
  font-size: 9px;
  line-height: 1.55;
  overflow: auto;
}
.aiSelectionContext > span {
  color: #2b8f69;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  display: flex;
}
.aiSelectionContext > span:before {
  content: "✓";
  background: #dff5ec;
  border-radius: 50%;
  place-items: center;
  width: 14px;
  height: 14px;
  font-weight: 700;
  display: grid;
}
.aiFloat span {
  white-space: nowrap;
}
@media (width<=760px) {
  html,
  body {
    overflow: hidden;
  }
  .studio,
  .projectHub {
    height: 100vh;
    overflow: hidden;
  }
  .main,
  .projectHub > main {
    height: 100%;
    overflow: auto;
  }
  .page {
    padding-bottom: 18px;
  }
  .actions .aiTop {
    white-space: nowrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    height: 34px !important;
    line-height: 1 !important;
    display: inline-flex !important;
  }
}
.codexTabs {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}
.codexTabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 34px;
  padding: 0 12px;
  font-size: 10px;
  color: var(--muted);
}
.codexTabs button.active {
  background: var(--accent2);
  border-color: #cfc4ed;
  color: var(--accent);
  font-weight: 700;
}
.codexToolPanel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 14px;
}
.codexToolPanel > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.codexToolPanel > header b {
  font-size: 13px;
}
.codexToolPanel > header small {
  color: var(--muted);
  font-size: 9px;
}
.relationForm {
  display: grid;
  grid-template-columns: 1fr 1fr 130px 130px;
  gap: 8px;
}
.relationForm select,
.relationForm textarea {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  padding: 8px;
  font-size: 10px;
}
.relationForm textarea {
  grid-column: 1/-2;
  min-height: 70px;
  resize: vertical;
}
.relationForm button {
  align-self: stretch;
}
.relationshipList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.relationshipList article {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 11px;
}
.relationshipList b {
  display: block;
  font-size: 11px;
}
.relationshipList small {
  color: var(--accent);
  font-size: 8px;
}
.relationshipList p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  margin: 6px 0;
}
.relationshipList button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  height: 28px;
  padding: 0 9px;
  font-size: 8px;
}
.chapterPicker {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow: auto;
}
.chapterPicker button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  height: 34px;
  padding: 0 10px;
  font-size: 9px;
  white-space: nowrap;
}
.chapterPicker button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chapterPicker em {
  margin-left: 6px;
  font-style: normal;
  opacity: 0.75;
}
.chapterCastGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.chapterCastGrid button {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  min-height: 68px;
  padding: 9px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.chapterCastGrid button.active {
  background: #f2edff;
  border-color: #b9a9e7;
}
.chapterCastGrid b {
  background: var(--accent2);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 10px;
}
.chapterCastGrid span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.chapterCastGrid strong {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapterCastGrid small {
  color: var(--muted);
  font-size: 8px;
}
.chapterCastGrid em {
  margin-left: auto;
  color: var(--accent);
  font-size: 8px;
  font-style: normal;
}
@media (width<=900px) {
  .relationForm,
  .relationshipList,
  .chapterCastGrid {
    grid-template-columns: 1fr;
  }
  .relationForm textarea {
    grid-column: 1/-1;
  }
}
