@charset "UTF-8";
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Thin-29e3dfd3.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-ThinItalic-5443b61f.woff2") format("woff2");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-ThinOblique-5afd194b.woff2") format("woff2");
  font-weight: 100;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-ExtraLight-cc6488cd.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-ExtraLightItalic-b2c04173.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-ExtraLightOblique-36d4a4eb.woff2") format("woff2");
  font-weight: 200;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Light-d17bf688.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-LightItalic-3eb979c0.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-LightOblique-8f1befa5.woff2") format("woff2");
  font-weight: 300;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Regular-d874a5c4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Italic-06aa9ad5.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-Oblique-a7a2ef0d.woff2") format("woff2");
  font-weight: 400;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Medium-7a7319fc.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-MediumItalic-49482366.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-MediumOblique-4ccbd3b2.woff2") format("woff2");
  font-weight: 500;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-SemiBold-346da744.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-SemiBoldItalic-55de780f.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-SemiBoldOblique-91f88e2f.woff2") format("woff2");
  font-weight: 600;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-Bold-b576d92e.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImported";
  src: url("/assets/victor-mono/VictorMono-BoldItalic-783a7548.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "VictorMonoImportedOblique";
  src: url("/assets/victor-mono/VictorMono-BoldOblique-febb78e1.woff2") format("woff2");
  font-weight: 700;
  font-style: oblique;
  font-display: swap;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss06" 1, "ss07" 1, "ss03" 0, "ss04" 0, "ss05" 0, "ss08" 0;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/assets/ia-writer-mono-s/iAWriterMonoS-Regular-e77836ba.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/assets/ia-writer-mono-s/iAWriterMonoS-Italic-ffb5f634.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/assets/ia-writer-mono-s/iAWriterMonoS-Bold-844fdceb.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/assets/ia-writer-mono-s/iAWriterMonoS-BoldItalic-a6500a1d.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/assets/ia-writer-quattro-s/iAWriterQuattroS-Regular-3f726b00.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/assets/ia-writer-quattro-s/iAWriterQuattroS-Italic-cc8207ad.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/assets/ia-writer-quattro-s/iAWriterQuattroS-Bold-c82883f9.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/assets/ia-writer-quattro-s/iAWriterQuattroS-BoldItalic-80982697.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Regular-CyrillicExt-35ca5558.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Regular-Cyrillic-74359172.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Regular-LatinExt-dfe25727.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Regular-Latin-578a0041.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Italic-CyrillicExt-6b2cf8f1.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Italic-Cyrillic-8a388dc3.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Italic-LatinExt-a15ce97c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 100 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/ibm-plex-sans/IBMPlexSans-Italic-Latin-83276898.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-CyrillicExt-df42e439.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Cyrillic-da036171.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Greek-2901386b.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Vietnamese-c3f7870b.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-LatinExt-45521d1e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Latin-88e013b5.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-CyrillicExt-24ef0b6e.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-Cyrillic-b2dff0a5.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-Greek-1044df96.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-Vietnamese-680fa6ea.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-LatinExt-19739600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/source-serif-4/SourceSerif4-Italic-Latin-d304b70c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* Base */
  --c-white: #ffffff;
  --c-black: #000000;
  /* Text */
  --c-text-body: #333;
  --c-text-absolute: #000;
  --c-text-strong: #222;
  --c-text-muted: #999;
  --c-text-conv: #475569;
  --c-text-active: #222;
  /* Surfaces */
  --c-surface-app: #f8fafc;
  --c-surface-canvas: #fafafa;
  --c-surface-panel: #ffffff;
  --c-surface-hover: #eee;
  --c-surface-active: #eee;
  --c-surface-drop: #eff6ff;
  --c-surface-overlay: rgba(255, 255, 255, 0.9);
  /* Borders/Outlines */
  --c-border: #ccc;
  --c-border-strong: #999;
  --c-outline-drop: #ff0000;
  /* Accents */
  --c-accent: #3b82f6;
  --c-accent-hover: #ccc;
  --c-success: #10b981;
  --c-success-hover: #059669;
  --c-focus: #2563eb;
  --c-error: #b91c1c;
  /* Color labels */
  --c-label-red: #FFA8A8;
  --c-label-orange: #FFC48C;
  --c-label-yellow: #F6EE80;
  --c-label-yellow-darker: #FFDD00;
  --c-label-green: #B6F680;
  --c-label-blue: #80E1F6;
  --c-label-purple: #E9B3FF;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text-body);
}

html.loom, html.loom body,
html.chat, html.chat body,
html.canvas, html.canvas body {
  overflow: hidden;
}

.btn-trigger-sidebar {
  display: none;
}

.loom-container {
  display: grid;
  grid-template-columns: 300px 1fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "sidebar header header" "sidebar editor canvas";
  height: 100dvh;
  background: var(--c-surface-app);
  overflow: hidden;
}
.loom-container > .loom-sidebar {
  grid-area: sidebar;
}
.loom-container > .loom-main-header {
  grid-area: header;
}
.loom-container > .loom-editor {
  grid-area: editor;
}
.loom-container > .loom-canvas-container {
  grid-area: canvas;
}

.loom-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 15px;
  background: var(--c-surface-panel);
  border-bottom: 1px solid var(--c-border);
}
.loom-main-header .header-left {
  display: flex;
  align-items: center;
  overflow: hidden;
}
.loom-main-header .header-left .doc-title {
  margin: 0;
  font-size: 25px;
  line-height: 30px;
  font-weight: 600;
  color: var(--c-text-strong);
}
.loom-main-header .header-left .doc-actions {
  margin-left: 15px;
  display: inline-flex;
  gap: 15px;
}
.loom-main-header .header-left .doc-actions .btn-delete-chat {
  color: #f33;
}
.loom-main-header .header-right {
  display: flex;
  align-items: center;
}
.loom-main-header .main-nav {
  display: inline-flex;
  gap: 15px;
}
.loom-main-header .main-nav a {
  color: #000;
  text-decoration: none;
  font-size: 18px;
  line-height: 20px;
  padding: 5px 10px;
}
.loom-main-header .main-nav a.current {
  color: #fff;
  background: #000;
}
.loom-main-header .main-nav a.current:hover {
  background: #000;
}
.loom-main-header .main-nav a:hover {
  background: #eee;
}
.loom-main-header .mobile-triggers {
  display: none;
}
.loom-main-header .mobile-triggers button.active {
  background: #000;
  color: #fff;
}

.loom-sidebar {
  background: #ffffff;
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.loom-sidebar .sidebar-header {
  padding: 10px;
  height: 51px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.loom-sidebar .sidebar-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-strong);
}
.loom-sidebar .sidebar-header .sidebar-actions {
  display: flex;
  width: 100%;
  gap: 15px;
  flex-direction: row;
  justify-content: space-between;
}
.loom-sidebar .sidebar-header .sidebar-actions .btn-new {
  color: #222;
  background-color: var(--c-label-green);
}
.loom-sidebar.visible .sidebar-actions .btn-trigger-sidebar {
  background: #333;
  color: #fff;
}
.loom-sidebar .folder-list {
  flex: 1;
  overflow-y: auto;
}
.loom-sidebar .folder.default {
  margin-top: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid #eee;
}
.loom-sidebar .folder svg {
  width: 16px;
  stroke-width: 2px;
  display: inline-block;
  vertical-align: bottom;
  position: relative;
  top: 2px;
}
.loom-sidebar .folder.trash {
  margin-top: auto;
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
}
.loom-sidebar .folder-header {
  padding: 5px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-body);
  cursor: pointer;
}
.loom-sidebar .folder-header.active {
  background: var(--c-surface-active);
  color: var(--c-text-active);
}
.loom-sidebar .sidebar-item-actions {
  float: right;
  display: inline-flex;
  gap: 0.25rem;
}
.loom-sidebar .sidebar-item-actions button {
  border: none;
  background: var(--c-surface-panel);
  color: var(--c-text-muted);
  font-size: 10px;
  line-height: 14px;
  padding: 0 5px;
  cursor: pointer;
}
.loom-sidebar .sidebar-item-actions button:hover {
  color: var(--c-text-strong);
  background: var(--c-surface-hover);
}
.loom-sidebar .weave-list {
  padding-left: 0;
}
.loom-sidebar .weave {
  padding: 5px 0 5px 10px;
  font-size: 14px;
  color: var(--c-text-body);
  cursor: pointer;
}
.loom-sidebar .weave:hover {
  background: var(--c-surface-hover);
}
.loom-sidebar .weave.active {
  background: var(--c-surface-active);
  color: var(--c-text-active);
}
.loom-sidebar .weave .sidebar-item-actions {
  padding-right: 10px;
}
.loom-sidebar .weave .sidebar-item-actions button:hover {
  background: #ccc;
}
.loom-sidebar .folder.drop-target {
  outline: 1px dashed var(--c-outline-drop);
  outline-offset: 1px;
  background: var(--c-surface-drop);
}
.loom-sidebar .main-nav {
  display: inline-flex;
  gap: 5px;
  margin-top: 10px;
  border-bottom: 1px solid var(--c-border);
}
.loom-sidebar .main-nav a {
  color: #000;
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  padding: 2px 5px;
}
.loom-sidebar .main-nav a.current {
  color: #fff;
  background: #000;
}
.loom-sidebar .main-nav a.current:hover {
  background: #000;
}
.loom-sidebar .main-nav a:hover {
  background: #eee;
}

.canvas-generation {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--c-surface-panel);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  /* Status text positioned just above the bar, aligned bottom-right */
}
.canvas-generation .generation-status {
  position: absolute;
  right: 12px;
  bottom: 100%;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--c-text-muted);
  pointer-events: none;
}
.canvas-generation .generation-status.is-error {
  color: var(--c-error);
  pointer-events: auto;
  cursor: pointer;
}
.canvas-generation .generation-settings {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.canvas-generation .generation-settings .row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.canvas-generation .generation-settings label {
  font-size: 12px;
  color: var(--c-text-muted);
}
.canvas-generation .generation-settings select {
  min-width: 160px;
}
.canvas-generation .generation-settings #gen-n {
  width: 5ch;
}
.canvas-generation .generation-settings #gen-temp {
  width: 6ch;
}
.canvas-generation .generation-settings #gen-max-tokens {
  width: 9ch;
}
.canvas-generation [type=text] {
  text-align: center;
}
.canvas-generation button {
  font-family: "IBM Plex Sans";
}
.canvas-generation select, .canvas-generation input[type=text] {
  background: #eee;
  border: none;
  border-bottom: 1px solid #333;
  border-radius: 0px;
  outline: none;
  font-family: "IBM Plex Sans";
  font-size: 12px;
  padding: 5px 10px;
}
.canvas-generation .generation-footer {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.canvas-generation .btn-generate {
  background: #fff;
  color: var(--c-text-strong);
  border: none;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #999;
  width: 150px;
}
.canvas-generation .btn-generate:hover {
  border-color: #000;
}
.canvas-generation .btn-generate:active {
  opacity: 0.5;
}
.canvas-generation .btn-generate.is-busy {
  color: #FF4236;
}
.canvas-generation .btn-generate.is-busy::after {
  content: "Streaming...";
}
.canvas-generation .btn-generate.is-busy:hover::after {
  content: "Cancel";
}
.canvas-generation .btn-generate:not(.is-busy)::after {
  content: "Generate";
}

.loom-canvas-container {
  display: flex;
  flex-direction: column;
  background: #fafafa;
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--c-surface-canvas);
}
.loom-canvas-container .canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.loom-canvas-container #loom-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}
.loom-canvas-container .strand-edit-overlay {
  position: absolute;
  z-index: 1000;
  padding: 0.5rem;
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 2px solid var(--c-accent);
  border-radius: 4px;
  background: var(--c-surface-panel);
  box-shadow: 0 4px 12px var(--c-overlay-shadow);
  resize: none;
  outline: none;
}
.loom-canvas-container .strand-edit-overlay:focus {
  border-color: var(--c-focus);
}
.loom-canvas-container .canvas-hints {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  align-items: center;
}
.loom-canvas-container .canvas-hints .canvas-controls {
  display: flex;
  flex-direction: column;
}
.loom-canvas-container .canvas-hints .canvas-controls .canvas-controls-row {
  display: flex;
  flex-direction: row;
  background: var(--c-surface-overlay);
}
.loom-canvas-container .canvas-hints .canvas-controls .canvas-controls-column {
  display: flex;
  flex-direction: column;
  background: var(--c-surface-overlay);
  flex-shrink: 0;
  width: fit-content;
}
.loom-canvas-container .canvas-hints .canvas-controls button {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--c-surface-panel);
  cursor: pointer;
  font-size: 14px;
  line-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loom-canvas-container .canvas-hints .canvas-controls button:hover {
  background: var(--c-surface-hover);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color {
  box-sizing: border-box;
  border: 5px solid #fff;
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-red {
  background-color: var(--c-label-red);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-orange {
  background-color: var(--c-label-orange);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-yellow {
  background-color: var(--c-label-yellow);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-green {
  background-color: var(--c-label-green);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-blue {
  background-color: var(--c-label-blue);
}
.loom-canvas-container .canvas-hints .canvas-controls button.btn-color.btn-color-purple {
  background-color: var(--c-label-purple);
}

.sidebar-actions .btn-trigger-sidebar {
  display: none;
}

.loom-sidebar a, .chat-sidebar a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.color-indicator {
  display: inline-block;
  border-radius: 4px;
  vertical-align: middle;
  font-size: 12px;
  padding: 1px 3px;
  line-height: 14px;
  border: 1px solid transparent;
}
.color-indicator.label-red {
  border-color: var(--c-label-red);
  color: var(--c-label-red);
}
.color-indicator.label-orange {
  border-color: var(--c-label-orange);
  color: var(--c-label-orange);
}
.color-indicator.label-yellow {
  border-color: var(--c-label-yellow-darker);
  color: var(--c-label-yellow-darker);
}
.color-indicator.label-green {
  border-color: var(--c-label-green);
  color: var(--c-label-green);
}
.color-indicator.label-blue {
  border-color: var(--c-label-blue);
  color: var(--c-label-blue);
}
.color-indicator.label-purple {
  border-color: var(--c-label-purple);
  color: var(--c-label-purple);
}

.chat-sidebar .conversation.active .label-red {
  border-color: var(--c-label-red);
  background-color: var(--c-label-red);
  color: #333;
}
.chat-sidebar .conversation.active .label-orange {
  border-color: var(--c-label-orange);
  background-color: var(--c-label-orange);
  color: #333;
}
.chat-sidebar .conversation.active .label-yellow {
  border-color: var(--c-label-yellow);
  background-color: var(--c-label-yellow);
  color: #333;
}
.chat-sidebar .conversation.active .label-green {
  border-color: var(--c-label-green);
  background-color: var(--c-label-green);
  color: #333;
}
.chat-sidebar .conversation.active .label-blue {
  border-color: var(--c-label-blue);
  background-color: var(--c-label-blue);
  color: #333;
}
.chat-sidebar .conversation.active .label-purple {
  border-color: var(--c-label-purple);
  background-color: var(--c-label-purple);
  color: #333;
}

button, .ui-button, .message-action-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:active, .ui-button:active, .message-action-btn:active {
  position: relative;
  top: 1px;
  background-color: #ececec;
}

button.ui-button {
  box-sizing: border-box;
  color: #333;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: #f0f0f0;
  box-sizing: border-box;
  border-radius: 4px;
  border: none;
  box-shadow: inset rgba(0, 0, 0, 0.2) 0px -1px 0px;
  cursor: pointer;
  user-select: none;
}
button.ui-button:hover {
  background: var(--c-surface-hover);
}
button.ui-button {
  font-family: "IBM Plex Sans";
  font-size: 14px;
  padding: 5px 10px;
}
button.ui-button img, button.ui-button svg {
  display: inline-block;
  vertical-align: middle;
  line-height: 30px;
}

.loom-sidebar .color-indicator {
  font-size: 11px;
  padding: 0 2px;
  margin-right: 3px;
  float: right;
}

.loom-editor {
  background: #ffffff;
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.loom-editor .editor-overlay-controls {
  display: none;
}
.loom-editor .text-editor {
  flex: 1;
  padding: 1rem 8rem;
  border: none;
  font-family: "iA Writer Quattro S", "SF Mono", Monaco, "Courier New", monospace;
  font-size: 18px;
  line-height: 1.5em;
  color: #111;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 0;
}
.loom-editor .text-editor:empty::before {
  content: "Select a node to view its path...";
  color: #94a3b8;
}
.loom-editor .text-editor.editing {
  color: #666;
}
.loom-editor .text-editor.editing .strand-span:not(.selected) {
  color: #666;
}
.loom-editor .text-editor.editing .strand-span:focus {
  outline: none;
  color: #000;
  caret-color: red;
}
.loom-editor .text-editor .strand-span {
  display: inline;
  padding: 0;
}
.loom-editor .text-editor .strand-span.label-red {
  text-decoration: underline;
  text-decoration-color: #FFA8A8;
  text-decoration-thickness: 2px;
}
.loom-editor .text-editor .strand-span.label-orange {
  text-decoration: underline;
  text-decoration-color: #FFC48C;
  text-decoration-thickness: 2px;
}
.loom-editor .text-editor .strand-span.label-yellow {
  text-decoration: underline;
  text-decoration-color: #F6EE80;
  text-decoration-thickness: 2px;
}
.loom-editor .text-editor .strand-span.label-green {
  text-decoration: underline;
  text-decoration-color: #B6F680;
  text-decoration-thickness: 2px;
}
.loom-editor .text-editor .strand-span.label-blue {
  text-decoration: underline;
  text-decoration-color: #80E1F6;
  text-decoration-thickness: 2px;
}
.loom-editor .text-editor .strand-span.label-purple {
  text-decoration: underline;
  text-decoration-color: #E9B3FF;
  text-decoration-thickness: 2px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--c-border);
}

.chat-messages-container {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  padding: 20px;
  background: #fff;
}

.chat-load-next {
  display: none;
  padding-bottom: 40px;
  margin: 0 10px;
}
.chat-load-next button {
  outline: none;
  background: #fff;
  font-family: "IBM Plex Sans";
  width: 100%;
  border: 0.5px solid #ccc;
  border-radius: 50px;
  line-height: 30px;
  font-size: 16px;
  color: #333;
}
.chat-load-next.is-visible {
  display: block;
}

.chat-messages {
  display: flex;
  flex-direction: column;
}

.chat-message {
  padding: 20px;
  min-width: 40%;
  max-width: 80%;
  box-sizing: border-box;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-absolute);
  font-family: "IBM Plex Sans";
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4em;
  position: relative;
}
.chat-message .message-edit-textarea {
  width: 100%;
  height: 2000px;
  max-height: 30dvh;
  font-family: "IBM Plex Sans";
  font-size: 16px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 7px;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 2px;
  border: 1px solid #ccc;
}
.chat-message .message-edit-textarea:focus {
  outline: none;
  border-color: var(--c-label-red);
}
.chat-message .message-content h1, .chat-message .message-content h2, .chat-message .message-content h3, .chat-message .message-content h4, .chat-message .message-content h5, .chat-message .message-content h6 {
  margin: 0;
  padding: 0;
  margin-block: 0;
  font-weight: 600;
  line-height: 1.4em;
}
.chat-message .message-content hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0 0 1rem 0;
}
.chat-message .message-content h1 {
  font-size: 30px;
  padding-bottom: 0.5rem;
  line-height: 1.2em;
}
.chat-message .message-content h2 {
  font-size: 24px;
  padding-bottom: 0.75rem;
  line-height: 1.3em;
}
.chat-message .message-content h3 {
  font-size: 21px;
  padding-bottom: 0.75rem;
  line-height: 1.3em;
}
.chat-message .message-content h4 {
  font-size: 18px;
  padding-bottom: 1rem;
}
.chat-message .message-content h5 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 1rem;
}
.chat-message .message-content h5 {
  font-size: 16px;
  font-style: italic;
  padding-bottom: 1rem;
}
.chat-message .message-content p {
  margin: 0;
  margin-block: 0;
  padding: 0;
  margin-bottom: 1em;
}
.chat-message .message-content ul, .chat-message .message-content ol {
  margin: 0;
  margin-bottom: 1em;
}
.chat-message .message-content strong {
  font-weight: 600;
}
.chat-message .message-content code, .chat-message .message-content pre {
  font-family: "VictorMonoImported";
  font-weight: 500;
}
.chat-message .message-content code {
  background: #f6f6f6;
  padding: 0 3px;
  border-radius: 3px;
  border: 1px solid #ddd;
  white-space: wrap;
  font-size: 16px;
  box-sizing: border-box;
  white-space: pre-wrap;
}
.chat-message .message-content pre {
  background: #f6f6f6;
  margin: 0;
  margin-bottom: 1em;
  padding: 10px 15px;
  line-height: 1.4em;
  position: relative;
  overflow-x: auto;
  white-space: pre;
}
.chat-message .message-content pre code, .chat-message .message-content pre .code {
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 16px;
  white-space: pre;
}
.chat-message .message-content .code-block-lang-label {
  font-size: 12px;
  padding: 0px 15px;
  background: #f6f6f6;
  display: inline-block;
}
.chat-message .message-content blockquote {
  border-left: 2px solid #eee;
  margin: 0 0 1em 0;
  padding-left: 1em;
}
.chat-message .message-content table {
  margin: 0 0 1em 0;
}
.chat-message .message-content {
  /* Basic Table Styling */
}
.chat-message .message-content table {
  width: 100%; /* Makes the table use the full width of its container */
  border-collapse: collapse; /* This is the magic part! It merges adjacent borders into a single line. */
  margin: 1em 0; /* Adds some space above and below the table */
}
.chat-message .message-content {
  /* Styling for Header and Data Cells */
}
.chat-message .message-content th, .chat-message .message-content td {
  border: 1px solid #ccc; /* A light grey, 1px solid border on every cell */
  padding: 7px 12px; /* Adds some internal spacing so text isn't touching the borders */
  text-align: left; /* Aligns text to the left, which is standard for tables */
}
.chat-message .message-content {
  /* Header-Specific Styling */
}
.chat-message .message-content th {
  background-color: #f4f4f4; /* A very light grey background for the header row to distinguish it */
  font-weight: normal;
}

.chat-message.user-message {
  align-self: flex-end;
  margin-left: auto;
  border-left: 0.5px solid var(--c-border);
  border-radius: 2px 0 0 0;
}

.chat-message.assistant-message {
  align-self: flex-start;
  border-right: 1px solid var(--c-border);
  border-radius: 0 2px 0 0;
}
.chat-message.assistant-message .message-content {
  font-family: "Source Serif 4";
  font-size: 19px;
}
.chat-message.assistant-message .message-content .code-block-lang-label {
  font-family: "IBM Plex Sans";
}
.chat-message.assistant-message .message-content strong {
  font-weight: 600;
  color: #000;
}

.chat-message.user-message.is-context-start,
.chat-message.assistant-message.is-context-start {
  border-color: red;
}

.chat-message.label-red {
  border-left: 4px solid var(--c-label-red);
}
.chat-message.label-orange {
  border-left: 4px solid var(--c-label-orange);
}
.chat-message.label-yellow {
  border-left: 4px solid var(--c-label-yellow);
}
.chat-message.label-green {
  border-left: 4px solid var(--c-label-green);
}
.chat-message.label-blue {
  border-left: 4px solid var(--c-label-blue);
}
.chat-message.label-purple {
  border-left: 4px solid var(--c-label-purple);
}

.message-spinner {
  display: none;
  position: absolute;
  z-index: 10;
}

.message-spinner {
  width: 16px;
  height: 16px;
  background-image: url("/assets/spiral-bfb763cd.svg");
  background-size: contain;
  background-repeat: no-repeat;
  animation: spin 1s linear infinite;
  opacity: 0.5;
}

.message-error {
  color: #fff;
  font-size: 14px;
  background-color: #ff0000;
}

.chat-message.is-streaming .message-spinner {
  display: block;
}

.chat-message.has-error .message-error {
  display: block;
}

.chat-message.user-message .message-spinner {
  top: 8px;
  left: 8px;
}

.chat-message.assistant-message .message-spinner {
  top: 8px;
  right: 8px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}
.message-role {
  text-transform: lowercase;
  font-style: italic;
  padding-bottom: 0.5em;
}
.message-role::after {
  content: ":";
}
.message-role {
  display: none;
}

.message-model {
  display: block;
  font-style: normal;
  font-size: 0.75em;
  opacity: 0.5;
  margin-bottom: 0.5em;
}

.reasoning-toggle {
  color: #999;
  text-decoration: underline;
  margin-bottom: 1em;
  cursor: pointer;
  user-select: none;
}

.message-reasoning {
  font-size: 14px;
  line-height: 15px;
  color: #999;
  height: 0px;
  overflow: hidden;
}
.message-reasoning.open {
  height: auto;
}

.message-content {
  min-height: 3em;
  padding-bottom: 1em;
}

.message-artifacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.message-content + .message-artifacts {
  margin-top: -1em;
  padding-bottom: 2em;
}

.message-artifact-image img {
  display: block;
  height: auto;
  max-height: 40vh;
  max-width: 80vw;
  border-radius: 3px;
  border: 1px solid var(--c-border);
}
.message-artifact-image .image-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.message-artifact-image a.artifact-download-link, .message-artifact-image div.reuse-image, .message-artifact-image div.show-grid-lightbox {
  color: #333;
  text-decoration: none;
  padding: 3px;
  line-height: 20px;
  height: 25px;
  display: inline-block;
  background: #fff;
  border-radius: 3px;
  transition: background-color 0.15s;
}
.message-artifact-image a.artifact-download-link:hover, .message-artifact-image div.reuse-image:hover, .message-artifact-image div.show-grid-lightbox:hover {
  background: #ddd;
  color: #000;
}

.message-artifact-file .artifact-file-link {
  display: inline-block;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}
.message-artifact-file .artifact-file-link:hover {
  background: #e8e8e8;
  border-color: #999;
}

.user-message .message-artifacts {
  justify-content: right;
}

.user-message .message-artifact-image img {
  max-height: 10vh;
  max-width: 10vh;
}

.user-message .message-color-picker.is-visible {
  flex-direction: row;
  left: auto;
  right: 0;
}

.message-actions {
  position: absolute;
  top: -30px;
  left: -1px;
  display: flex;
}

.message-actions-top {
  display: inline-flex;
  height: 31px;
  border: 1px solid var(--c-border);
  border-bottom: none;
  background: #fff;
}

.message-actions-toggle {
  display: none;
  position: absolute;
  top: -1px;
  font-size: 20px;
  line-height: 20px;
  padding: 5px 0;
  color: #666;
  user-select: none;
  cursor: pointer;
  width: 30px;
  text-align: right;
}
.message-actions-toggle:active {
  background: #eee;
}

.chat-message:hover .message-actions-side {
  display: inline-flex;
  opacity: 1;
}

.message-actions-side {
  display: none;
  position: relative;
  top: -1px;
  left: 10px;
}
.message-actions-side:hover {
  opacity: 1;
}
.message-actions-side {
  background: #fff;
  flex-direction: row;
  align-items: flex-end;
  gap: 5px;
}

.message-edit-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-bottom: 1em;
}
.message-edit-actions .ui-button {
  color: #000;
}
.message-edit-actions .ui-button svg {
  line-height: 14px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-right: 5px;
}

.chat-message.user-message .message-actions {
  justify-content: space-between;
  width: 100%;
}
.chat-message.user-message .message-actions .message-actions-side {
  flex-direction: row-reverse;
}

.branch-indicator {
  border: 1px solid var(--c-border);
  border-bottom: none;
  background: #fff;
  height: 30px;
}

.branch-count {
  font-size: 18px;
}

.message-color-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 1px;
  background: #fff;
  height: 30px;
  display: none;
  align-items: center;
  padding: 0 5px;
  gap: 3px;
}

.message-color-picker.is-visible {
  display: flex;
  flex-direction: row-reverse;
}

.color-btn {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid var(--c-border);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
}
.color-btn:hover {
  transform: scale(1.1);
}
.color-btn:active {
  transform: scale(0.95);
}

.color-btn-red {
  background: var(--c-label-red);
}

.color-btn-orange {
  background: var(--c-label-orange);
}

.color-btn-yellow {
  background: var(--c-label-yellow);
}

.color-btn-green {
  background: var(--c-label-green);
}

.color-btn-blue {
  background: var(--c-label-blue);
}

.color-btn-purple {
  background: var(--c-label-purple);
}

.color-btn-clear {
  background: #fff;
  font-size: 16px;
  line-height: 1;
  color: #666;
  font-weight: bold;
}

.branch-nav-btn, .branch-nav-disabled {
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  padding: 5px 20px;
  font-size: 20px;
}
.branch-nav-btn:hover, .branch-nav-disabled:hover {
  background: rgba(0, 0, 0, 0.1);
}
.branch-nav-btn:active, .branch-nav-disabled:active {
  background: rgba(0, 0, 0, 0.2);
}

.branch-nav-disabled {
  opacity: 0.3;
  cursor: default;
}

.message-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  text-align: center;
  color: #666;
  padding: 8px;
}
.message-action-btn:hover {
  background: #eee;
  color: #000;
  opacity: 1;
}
.message-action-btn:active {
  background: #ccc;
}
.message-action-btn.delete-btn:hover {
  color: red;
}
.message-action-btn.context-btn.is-active {
  background: #fdd;
  color: red;
}

.chat-attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.chat-attachments-preview .attachment-preview {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  position: relative;
  margin: 10px;
}
.chat-attachments-preview .attachment-preview .attachment-preview-delete {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 25px;
  height: 25px;
  background: red;
  color: #fff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  opacity: 0.8;
  border-top-right-radius: 0;
}
.chat-attachments-preview .attachment-preview .attachment-preview-delete:hover {
  opacity: 1;
  background: #cc0000;
}
.chat-attachments-preview .attachment-preview-image {
  width: 80px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-attachments-preview .attachment-preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.chat-attachments-preview .attachment-preview-file {
  padding: 8px 12px;
  padding-right: 30px;
  min-width: 120px;
}
.chat-attachments-preview .attachment-preview-file .attachment-filename {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.chat-attachments-preview:empty {
  display: none;
}

html.chat .canvas-generation {
  position: static;
  padding-bottom: 30px;
}
html.chat .canvas-generation.visible {
  display: flex;
}
html.chat .canvas-generation {
  display: none;
  flex-shrink: 0;
  justify-content: center;
  flex-wrap: wrap;
}
html.chat .canvas-generation .generation-settings {
  box-sizing: border-box;
  padding: 10px;
  gap: 10px;
  justify-content: center;
}
html.chat .canvas-generation .generation-settings input[type=text] {
  line-height: 20px;
  padding: 0 5px;
  width: 3em;
}
html.chat .canvas-generation .generation-settings .model-select-row {
  width: 100%;
}
html.chat .canvas-generation .generation-settings .model-select-row label {
  display: none;
}
html.chat .canvas-generation .generation-settings .model-select-row select {
  line-height: 20px;
  width: 100%;
  overflow: hidden;
}
html.chat .canvas-generation .generation-footer {
  display: none;
}

.chat-input-container {
  flex-shrink: 0;
  position: relative;
}
.chat-input-container .model-options {
  position: absolute;
  top: -20px;
  left: 5px;
  right: 60px;
  z-index: 200;
  display: flex;
  gap: 5px;
}
.chat-input-container .llm-config-select {
  background: #fff;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  font-family: inherit;
  color: #333;
  font-size: 14px;
  height: 25px;
  padding: 0 10px;
  margin: 0;
  line-height: 20px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  background-color: rgba(255, 255, 255, 0.8);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-input-container .chat-btn-options {
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 25px;
  width: 40px;
  height: 25px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  background: #fff;
  text-align: center;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  background-color: rgba(255, 255, 255, 0.8);
  color: #666;
  font-size: 18px;
  line-height: 10px;
}
.chat-input-container .chat-btn-reasoning.active {
  color: #3988ff;
  border-color: #3988ff;
  box-shadow: inset #3988ff 0px 0px 4px;
}
.chat-input-container .chat-btn-group-mode.active {
  color: #e67e22;
  border-color: #e67e22;
  box-shadow: inset #e67e22 0px 0px 4px;
}
.chat-input-container .chat-btn-generate {
  display: block;
  width: 40px;
  height: 30px;
  position: absolute;
  right: 6px;
  top: -24px;
  outline: none;
  background: #3988ff;
  z-index: 200;
  border: none;
  box-shadow: rgba(92, 0, 0, 0.2) 0px -2px 2px;
  color: #fff;
  font-size: 16px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-weight: bold;
}
.chat-input-container .chat-btn-generate.is-busy {
  background: #FF3939;
  box-shadow: inset rgba(92, 0, 0, 0.8) 0px 2px 3px;
}
.chat-input-container .chat-btn-append {
  display: block;
  width: 40px;
  height: 30px;
  position: absolute;
  right: 6px;
  top: -70px;
  outline: none;
  background: #82B5CE;
  z-index: 200;
  border: none;
  box-shadow: rgba(92, 0, 0, 0.2) 0px 0px 2px;
  color: #fff;
  font-size: 16px;
  border-radius: 10px;
  font-weight: bold;
}
.chat-input-container .chat-user-name-display {
  display: block;
  position: absolute;
  right: 61px;
  top: -65px;
  outline: none;
  background: rgba(200, 200, 200, 0.2);
  z-index: 200;
  border: none;
  box-shadow: rgba(92, 0, 0, 0.2) 0px 0px 2px;
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  border-radius: 10px;
  color: #000;
  padding: 0px 10px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(3px);
}

.chat-input {
  display: block;
  width: calc(100% - 10px);
  margin: 5px;
  min-height: 4em;
  max-height: 60dvh;
  padding: 10px;
  border: 1px solid #ccc;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 7px;
  border-radius: 2px;
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
  resize: none;
}
.chat-input:focus {
  outline: none;
  border-color: var(--accent-color, #4a9eff);
}

.chat-sidebar .conversation-list {
  padding-left: 0;
}
.chat-sidebar .conversation {
  padding: 5px 0 5px 10px;
  font-size: 14px;
  color: var(--c-text-body);
  cursor: pointer;
}
.chat-sidebar .conversation:hover {
  background: var(--c-surface-hover);
}
.chat-sidebar .conversation.active {
  background: var(--c-surface-active);
  color: var(--c-text-active);
}
.chat-sidebar .conversation .color-indicator {
  font-size: 11px;
  padding: 0 2px;
  margin-right: 3px;
  float: right;
}

.chat-container {
  grid-template-columns: 300px 9fr 6fr;
  background: transparent;
}
.chat-container > .chat-panel {
  grid-area: editor;
}
.chat-container .canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.chat-container #chat-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}

.image-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.image-lightbox.is-visible {
  display: flex;
}

.lightbox-image {
  max-width: 90dvw;
  max-height: 90dvh;
  object-fit: contain;
}

.lightbox-download {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.lightbox-download:hover {
  background: #fff;
}

.lightbox-grid-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-grid-button svg {
  color: #fff;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}
.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 20px;
  line-height: 1;
}
.lightbox-arrow:hover {
  opacity: 0.7;
}
.lightbox-arrow.lightbox-arrow-left {
  left: 20px;
}
.lightbox-arrow.lightbox-arrow-right {
  right: 20px;
}

.lightbox-no-image {
  display: none;
  color: #fff;
  font-size: 24px;
  text-align: center;
}

.image-grid-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10001;
  padding: 60px 40px 40px;
  overflow-y: auto;
}
.image-grid-lightbox.is-visible {
  display: block;
}

.grid-lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  z-index: 10002;
}
.grid-lightbox-close:hover {
  opacity: 0.7;
}

.grid-lightbox-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
}
.grid-lightbox-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.canvas-container {
  grid-template-columns: 200px 1fr 4fr;
  grid-template-areas: "sidebar header header" "sidebar prompts display";
}
.canvas-container > .canvas-sidebar {
  grid-area: sidebar;
}
.canvas-container > .canvas-header {
  grid-area: header;
}
.canvas-container > .canvas-prompts-panel {
  grid-area: prompts;
}
.canvas-container > .canvas-display-panel {
  grid-area: display;
}

.canvas-sidebar .canvas-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.canvas-sidebar .canvas-item {
  padding: 8px 10px;
  font-size: 14px;
  color: var(--c-text-body);
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
}
.canvas-sidebar .canvas-item:hover {
  background: var(--c-surface-hover);
}
.canvas-sidebar .canvas-item.active {
  background: var(--c-surface-active);
  color: var(--c-text-active);
}
.canvas-sidebar .canvas-item.complete::after {
  content: "✓";
  opacity: 0.6;
  font-size: 10px;
  position: relative;
  top: -2px;
}
.canvas-sidebar .canvas-item.streaming::after {
  content: "◉";
  opacity: 0.8;
  font-size: 10px;
  position: relative;
  top: -1px;
}
.canvas-sidebar .canvas-item.rendered::before {
  display: inline-block;
  content: "*";
  color: rgba(255, 0, 0, 0.8);
  width: 10px;
  margin-left: -10px;
  line-height: 12px;
  text-align: center;
  vertical-align: bottom;
}
.canvas-sidebar .canvas-item.rendered.published::before {
  color: #00bd1c;
  font-weight: bold;
  font-size: 16px;
  line-height: 14px;
}

.canvas-prompts-panel {
  display: flex;
  flex-direction: column;
  background: var(--c-surface-panel);
  border-right: 1px solid var(--c-border);
  overflow: hidden;
  min-width: 350px;
}
.canvas-prompts-panel .prompt-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px;
  border-bottom: 1px solid var(--c-border);
}
.canvas-prompts-panel .prompt-section label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-body);
  margin-bottom: 8px;
}
.canvas-prompts-panel .prompt-section .canvas-prompt-textarea {
  width: 100%;
  flex: 1;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--c-border);
  font-family: "iA Writer Mono S", monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
}
.canvas-prompts-panel .prompt-section .canvas-prompt-textarea:focus {
  outline: none;
  border-color: var(--c-accent, #4a9eff);
}
.canvas-prompts-panel .canvas-generation {
  flex: 0 0 auto;
  position: static;
  border-top: 1px solid var(--c-border);
  padding: 15px;
  background: var(--c-surface-panel);
}

.canvas-display-panel {
  background: #fff;
  overflow-y: auto;
  padding: 20px;
  border-left: 1px solid var(--c-border);
}

.canvas-art {
  margin: 0;
  padding: 20px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1em;
  height: 100%;
  white-space: pre;
  border: none;
  background: #fff;
  color: #222;
}
.canvas-art.pre-wrapped {
  white-space: pre-wrap;
}
.canvas-art.font-0xproto {
  font-family: "0xProto";
}
.canvas-art.font-hack {
  font-family: "Hack";
  line-height: 16px;
}
.canvas-art.font-iawritermonos {
  font-family: "iA Writer Mono S";
}
.canvas-art.font-ibmplexmono {
  font-family: "IBM Plex Mono";
}
.canvas-art.font-m1m {
  font-family: "M+ 1m";
  line-height: 1.4em;
}
.canvas-art.font-victormono {
  font-family: "VictorMonoImported", monospace;
  line-height: 23px;
  font-weight: 500;
}
.canvas-art.exporting {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  height: auto;
  padding: 0;
}
.canvas-art.measurement {
  position: absolute;
  visibility: hidden;
  padding: 0;
  height: auto;
}

.strokes-list {
  margin-top: 20px;
  color: #999;
  font-size: 14px;
}
.strokes-list ol {
  margin: 0;
  padding-top: 0px;
  padding-bottom: 0px;
}

.ui-button.btn-delete-canvas {
  color: #f00;
  font-size: 20px;
}

.devise-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("/assets/loom-7bbaf9fd.png");
  background-repeat: no-repeat;
  background-position-x: center;
  background-position-y: top;
}
.devise-container h2 {
  margin: 0 0 1.5rem;
  color: var(--c-text-strong);
  font-size: 18px;
}
.devise-container .field {
  margin-bottom: 1rem;
}
.devise-container .field label {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--c-text-body);
  font-size: 0.875rem;
  font-weight: 500;
}
.devise-container .field input[type=text],
.devise-container .field input[type=password] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.devise-container .field input[type=text]:focus,
.devise-container .field input[type=password]:focus {
  outline: none;
  border-color: var(--c-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.devise-container .field input[type=checkbox] {
  margin-right: 0.5rem;
}
.devise-container .actions {
  margin-top: 1.5rem;
}
.devise-container .actions input[type=submit] {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--c-accent);
  color: var(--c-white);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.devise-container .actions input[type=submit]:hover {
  background: var(--c-focus);
}
.devise-container .actions input[type=submit]:active {
  transform: translateY(1px);
}

.devise-card {
  width: 240px;
  background: rgba(255, 255, 255, 0.2);
  padding: 20px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.devise-links {
  margin-top: 1.5rem;
  text-align: center;
}
.devise-links a {
  color: var(--c-accent);
  text-decoration: none;
  font-size: 0.875rem;
}
.devise-links a:hover {
  text-decoration: underline;
}

.alert,
.notice {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.alert {
  background: #fef2f2;
  color: var(--c-error);
  border: 1px solid #fecaca;
}

.notice {
  background: #f0fdf4;
  color: var(--c-success);
  border: 1px solid #bbf7d0;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  z-index: 10000;
}
.search-overlay.is-visible {
  display: flex;
}

.search-modal {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 0.5rem;
}

.search-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #999;
}
.search-close:hover {
  color: #333;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}
.search-result-item:hover {
  background: #f0f0f0;
}
.search-result-item.selected {
  background: #e3f2fd;
}

.search-result-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.search-result-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
}

.search-no-results {
  text-align: center;
  padding: 2rem;
  color: #999;
}

.search-footer {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0.75rem;
  border-top: 1px solid #eee;
  font-size: 0.875rem;
  color: #666;
}

.type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.type-chat {
  background: #e3f2fd;
  color: #1976d2;
}

.type-message {
  background: #f3e5f5;
  color: #7b1fa2;
}

.type-weave {
  background: #e8f5e9;
  color: #388e3c;
}

.type-strand {
  background: #fff3e0;
  color: #f57c00;
}

.global-search-result {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.result-preview {
  font-size: 0.875rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes sidebarFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 1400px) {
  .loom-container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "header header" "editor canvas";
  }
  .btn-trigger-sidebar {
    display: block;
  }
  .sidebar-actions .btn-trigger-sidebar {
    display: block;
  }
  .loom-sidebar {
    display: none;
    height: 100dvh;
    max-height: 100dvh;
  }
  .loom-sidebar.visible {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    bottom: 0;
    width: 30%;
    min-width: 300px;
    z-index: 1000;
    box-shadow: rgba(0, 0, 0, 0.2) 2px 0px 10px;
    animation: sidebarFadeIn 0.2s ease forwards;
  }
  .loom-sidebar .main-nav, .loom-sidebar .sidebar-header {
    flex-shrink: 0;
  }
  .loom-sidebar .sidebar-header {
    padding: 5px;
    height: auto;
    border-bottom: none;
  }
  .loom-sidebar .folder-list {
    flex: 1;
    overflow-y: scroll;
  }
}
@media (max-width: 1000px) {
  .loom-container, .chat-container {
    overflow-x: hidden;
    overflow-y: auto;
  }
  .loom-container {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "editor";
  }
  .loom-main-header .mobile-triggers {
    display: inline-flex;
    gap: 5px;
  }
  .loom-main-header .header-left .doc-actions {
    display: none;
    margin-left: 0;
  }
  .loom-main-header .header-left .doc-actions.visible {
    display: flex;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 10px;
  }
  .loom-main-header .header-left .doc-actions.visible button {
    height: 25px;
    line-height: 10px;
  }
  .loom-main-header .header-left .doc-actions.visible button svg {
    height: 15px;
    width: 15px;
  }
  .loom-main-header .header-left .doc-actions.visible {
    background: rgba(221, 221, 221, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--c-border);
    animation: sidebarFadeIn 0.2s ease forwards;
  }
  .loom-editor {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: none;
    box-sizing: border-box;
    height: 100dvh;
  }
  .loom-editor .text-editor {
    flex: 1;
    padding: 1rem 4rem;
    padding-top: 70px;
    overflow-y: auto;
  }
  .loom-editor .text-editor .strand-span {
    display: block;
    position: relative;
    padding-left: 5px;
    border-left: 2px solid #eee;
    text-decoration: none !important;
  }
  .loom-editor .text-editor .strand-span:before {
    content: "―";
    color: #ccc;
    position: absolute;
    top: -14px;
    font-size: 14px;
    left: 0px;
    transform: translateX(-100%);
  }
  .loom-editor .text-editor .strand-span:focus {
    border-color: #ccc;
  }
  .loom-editor .text-editor .strand-span:after {
    content: "<";
    font-size: 12px;
    color: #ccc;
  }
  .loom-editor .text-editor .strand-span.label-red {
    border-color: var(--c-label-red);
  }
  .loom-editor .text-editor .strand-span.label-orange {
    border-color: var(--c-label-orange);
  }
  .loom-editor .text-editor .strand-span.label-yellow {
    border-color: var(--c-label-dark-yellow);
  }
  .loom-editor .text-editor .strand-span.label-green {
    border-color: var(--c-label-green);
  }
  .loom-editor .text-editor .strand-span.label-blue {
    border-color: var(--c-label-blue);
  }
  .loom-editor .text-editor .strand-span.label-purple {
    border-color: var(--c-label-purple);
  }
  .loom-editor .editor-overlay-controls {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-items: center;
    background: #f6f6f6;
    background: #ddd;
  }
  .loom-editor .editor-overlay-controls .last-strand-mirror {
    display: block;
    width: 100%;
    font-size: 11px;
    overflow: hidden;
    text-align: center;
    line-height: 13px;
    padding: 2px 10px 5px;
    height: 15px;
    color: #666;
  }
  .loom-editor .editor-overlay-controls .button-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    padding: 0 0 5px;
  }
  .loom-editor .editor-overlay-controls button {
    font-size: 16px;
    font-weight: 500;
    height: 24px;
    background: #999;
    color: #fff;
    outline: none;
    user-select: none;
    border: none;
    width: 40px;
    border-radius: 4px;
  }
  .loom-editor .editor-overlay-controls .mobile-gen-btn {
    margin-left: 20px;
    color: orange;
    font-weight: 800;
  }
  .loom-canvas-container {
    display: none;
  }
  .loom-canvas-container.visible {
    display: block;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    height: calc(100dvh - 31px);
    z-index: 300;
    animation: sidebarFadeIn 0.2s ease forwards;
  }
  .loom-canvas-container.visible .canvas-wrapper {
    width: 100%;
    height: 100%;
  }
  .loom-canvas-container.visible .canvas-generation {
    bottom: 10px;
  }
  .chat-messages-container {
    padding: 20px 0 0 0;
  }
  .user-message .message-artifacts img {
    max-height: 20vh;
    max-width: 20vh;
  }
  .chat-message .message-actions-side {
    display: inline-flex;
    opacity: 0.5;
  }
  .chat-message.user-message .message-actions {
    padding-right: 20px;
  }
  .loom-container {
    display: flex;
    height: 100dvh;
    padding: 0;
  }
  .loom-main-header, .chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.75);
    padding: 5px;
    height: 40px;
  }
  .loom-main-header {
    display: flex;
  }
  .loom-main-header .header-right {
    float: right;
  }
  .loom-main-header .main-nav {
    display: none;
  }
  .loom-sidebar {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  .loom-sidebar.visible {
    display: flex;
    flex-direction: column;
    animation: sidebarFadeIn 0.2s ease forwards;
  }
  .sidebar-actions .btn-trigger-sidebar {
    display: block;
  }
  .chat-panel {
    padding-top: 31px;
    width: 100%;
    border: none;
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
  }
  .chat-messages-container {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
  }
  .chat-messages {
    display: block;
  }
  .chat-input-container {
    flex-shrink: 0;
  }
}
@media (max-width: 600px) {
  .loom-main-header .header-left h1.doc-title, .chat-header .header-left h1.doc-title {
    font-size: 18px;
    line-height: 20px;
    white-space: nowrap;
    overflow-x: hidden;
  }
  .loom-main-header .header-left .ui-button + .doc-title {
    margin-left: 10px;
  }
  .loom-editor .text-editor {
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 3em;
    font-size: 16px;
    line-height: 1.4em;
  }
  .loom-editor .text-editor .strand-span:before {
    top: -12px;
    color: #999;
  }
  .chat-input-container textarea {
    padding: 10px;
    box-sizing: border-box;
  }
  .chat-message {
    padding: 10px;
    font-size: 15px;
    line-height: 1.4em;
    background: white;
    border-width: 0.5px;
    border-right-width: 0.5px !important;
    min-width: 50%;
    width: auto;
    max-width: 100%;
  }
  .chat-message.user-message {
    margin-left: 30px;
  }
  .chat-message.assistant-message {
    margin-right: 30px;
  }
  .chat-message.assistant-message.assistant-message .message-content {
    font-size: 16px;
  }
  .chat-message {
    padding-bottom: 2em;
  }
  .chat-message .message-content {
    min-height: 2em;
  }
  .chat-message .message-content pre, .chat-message .message-content code, .chat-message .message-content pre .code, .chat-message .message-content pre code {
    font-size: 14px;
  }
  .chat-message .message-content pre {
    padding: 5px 7px;
  }
  .chat-message .message-content pre .lang-label {
    font-size: 10px;
    font-weight: 500;
  }
  .chat-message .message-content .code-block-lang-label {
    padding: 0px 7px;
    font-size: 10px;
  }
  .chat-message .branch-indicator {
    left: 0px;
    top: 1px;
    line-height: 30px;
  }
  .chat-message .branch-indicator .branch-count {
    font-size: 15px;
  }
  .chat-message .branch-indicator .branch-nav-btn, .chat-message .branch-indicator .branch-nav-disabled {
    padding: 0 10px;
    font-size: 18px;
  }
  .reasoning-toggle {
    text-decoration: none;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: inline-block;
    padding: 0px 7px;
    background: #f9f9f9;
  }
  .reasoning-toggle:active {
    background: #999;
  }
  .message-reasoning {
    font-size: 12px;
    line-height: 15px;
  }
  .message-action-btn {
    font-size: 14px;
    width: 25px;
  }
  .message-actions-left .branch-indicator {
    border-width: 0.5px;
  }
  .image-grid-lightbox {
    padding: 40px 20px 20px;
  }
  .grid-lightbox-container {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}
