:root {
  --paper: #e8e0cf;
  --paper-light: #f3ecdd;
  --paper-bright: #f8f3e8;
  --ink: #292a22;
  --ink-soft: #686353;
  --ink-faint: #9b927c;
  --line: #c9bda5;
  --line-dark: #92836b;
  --green: #2e3c2d;
  --green-deep: #202b21;
  --rust: #a74e2e;
  --orange: #d07b4b;
  --gold: #c7a468;
  --leather: #4d2418;
  --grain: url("./assets/paper-grain.svg");
  --fiber: url("./assets/paper-fiber.svg");
  --flecks: url("./assets/paper-flecks.svg");
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --hand: "Kaiti SC", "KaiTi", "STKaiti", "FangSong", cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
  background:
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    radial-gradient(ellipse at 44% 2%, rgba(255, 252, 243, .78), transparent 48%),
    radial-gradient(ellipse at 51% 108%, rgba(171, 149, 111, .18), transparent 50%),
    linear-gradient(112deg, #ece5d6, #e3d9c6 58%, #ebe3d4);
  background-blend-mode: soft-light, multiply, normal, normal, normal;
}

body::before {
  content: "";
  position: fixed;
  inset: 7px;
  z-index: 1000;
  pointer-events: none;
  border: 1px solid rgba(88, 72, 47, .16);
  box-shadow: inset 0 0 25px rgba(78, 60, 34, .055);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
  opacity: .92;
  background:
    var(--flecks) 0 0 / 260px 260px repeat,
    var(--grain) 0 0 / 220px 220px repeat;
  mix-blend-mode: multiply;
}

.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(239, 243, 242, .13), rgba(20, 27, 24, .1)),
    linear-gradient(90deg, rgba(232, 226, 214, .12), transparent 34% 70%, rgba(20, 25, 22, .08)),
    url("./assets/winter-detective.png") 67% 50% / cover no-repeat;
  filter: saturate(.82) contrast(.92) brightness(.82);
  transform: scale(1.018);
  transition: opacity .48s ease, transform .9s cubic-bezier(.2, .75, .25, 1);
}

html.snow-scene .scene-backdrop {
  opacity: 1;
  transform: scale(1);
}

button,
textarea,
input {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(55, 78, 54, .7);
  outline-offset: 2px;
}

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.focus-app {
  position: relative;
  z-index: 1;
  display: flex;
  width: auto;
  min-width: 0;
  height: 100vh;
  min-height: 690px;
  flex: 1;
  flex-direction: column;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100vh;
  min-height: 690px;
}

.home-sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  width: 228px;
  height: 100vh;
  flex: 0 0 228px;
  flex-direction: column;
  padding: 14px 12px 11px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid rgba(109, 96, 74, .24);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .2), transparent 72%),
    var(--grain) 0 0 / 220px 220px repeat,
    #dfd5c3;
  box-shadow: inset -1px 0 rgba(255, 255, 255, .28);
  transition:
    width .24s ease,
    flex-basis .24s ease,
    padding .24s ease;
  overscroll-behavior: contain;
  scrollbar-color: rgba(99, 88, 67, .28) transparent;
  scrollbar-width: thin;
}

.home-sidebar::-webkit-scrollbar {
  width: 5px;
}

.home-sidebar::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(99, 88, 67, .24);
}

.home-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 7px;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: rgba(255, 255, 255, .2);
}

.home-sidebar-head {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.home-brand {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 3px 4px;
  color: inherit;
  text-decoration: none;
}

.home-brand-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(94, 82, 62, .35);
  border-radius: 50%;
  background: #eee6d7;
}

.home-brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
}

.home-brand-copy b {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
}

.home-brand-copy small {
  color: #8c816d;
  font-family: Georgia, serif;
  font-size: 6px;
  letter-spacing: .17em;
}

.sidebar-collapse,
.mobile-sidebar-menu {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  color: #615c4f;
  border: 1px solid rgba(106, 95, 75, .26);
  border-radius: 8px;
  background: rgba(247, 241, 230, .44);
  transition: transform .24s ease, background .18s ease;
}

.sidebar-collapse:hover,
.mobile-sidebar-menu:hover {
  background: rgba(250, 245, 235, .72);
}

.mobile-sidebar-menu {
  display: none;
  margin-right: 2px;
}

.sidebar-new-chat {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  color: #f1e8d8;
  border: 1px solid #1d291e;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), transparent 55%),
    #2b392b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 3px 8px rgba(49, 43, 31, .12);
  font-family: var(--serif);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.sidebar-new-chat svg {
  width: 15px;
  height: 15px;
}

.sidebar-new-chat kbd {
  margin-left: auto;
  padding: 3px 5px;
  color: #b9b8a6;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 5px;
  background: rgba(0, 0, 0, .12);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 7px;
}

.embedded-history {
  display: flex;
  max-height: 190px;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 5px;
  margin: 10px 2px 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(105, 93, 72, .2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, .38), rgba(240, 232, 217, .2)),
    rgba(235, 226, 210, .32);
}

.embedded-history[hidden] {
  display: none;
}

.embedded-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px 2px;
  color: #716957;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .05em;
}

.embedded-history-head small {
  color: #9a907c;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0;
}

.embedded-history-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.embedded-history-item {
  display: flex;
  width: 100%;
  min-height: 29px;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  color: #625b4d;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 9px;
  text-align: left;
}

.embedded-history-item:hover,
.embedded-history-item.is-active {
  color: #243225;
  background: rgba(255, 253, 247, .55);
}

.embedded-history-item span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embedded-history-item time {
  color: #9b927f;
  font-size: 7px;
}

body.sidebar-collapsed .embedded-history {
  display: none;
}

.sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 5px 6px;
  color: #6b6557;
  font-family: var(--serif);
  font-size: 10px;
}

.sidebar-label-root {
  gap: 8px;
  margin: 15px 5px 7px;
  color: #4f4b3e;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
}

.sidebar-label-root > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.sidebar-label-root > span::before {
  width: 3px;
  height: 13px;
  flex: 0 0 3px;
  border-radius: 99px;
  background: #6b775c;
  content: "";
}

.sidebar-label-root::after {
  min-width: 18px;
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(111, 99, 76, .28), transparent);
  content: "";
}

.sidebar-label small {
  color: #9c927e;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-work-tree {
  min-width: 0;
  flex: 0 0 auto;
}

.sidebar-tree-branch {
  position: relative;
  display: grid;
  gap: 1px;
  padding-left: 10px;
}

.sidebar-tree-branch + .sidebar-tree-branch {
  margin-top: 5px;
}

.sidebar-tree-branch::before {
  position: absolute;
  top: 27px;
  bottom: 3px;
  left: 3px;
  border-left: 1px dashed rgba(112, 100, 75, .26);
  content: "";
  pointer-events: none;
}

.sidebar-tree-heading {
  display: flex;
  min-height: 23px;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 2px 1px;
  color: #817765;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1;
}

.sidebar-tree-heading::before {
  width: 7px;
  height: 1px;
  flex: 0 0 7px;
  background: rgba(112, 100, 75, .42);
  content: "";
}

.sidebar-tree-heading small {
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  margin-left: auto;
  border: 1px solid rgba(112, 100, 75, .16);
  border-radius: 99px;
  color: #a39a87;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0;
}

.home-sidebar-nav .sidebar-tree-branch > a {
  min-height: 33px;
  margin-left: 2px;
  padding: 0 8px;
}

.sidebar-tree-branch > a svg:first-child {
  width: 14px;
  height: 14px;
}

.sidebar-tree-branch > a span {
  font-size: 10.8px;
}

.home-sidebar-nav .sidebar-tree-branch > a.is-active {
  box-shadow:
    inset 3px 0 0 rgba(240, 229, 204, .4),
    inset 0 0 0 1px rgba(255, 255, 255, .055);
}

.home-sidebar-nav a {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  overflow: hidden;
  color: #5d5a4d;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.home-sidebar-nav a:hover {
  color: #292d25;
  border-color: rgba(104, 94, 75, .18);
  background: rgba(247, 241, 230, .38);
}

.home-sidebar-nav a.is-active {
  color: #eee7d8;
  border-color: #1e2a1e;
  background: linear-gradient(180deg, #344534, #273527);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .055);
}

.home-sidebar-nav svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.sidebar-group .home-sidebar-nav {
  position: relative;
  margin-left: 10px;
  padding: 1px 0 5px 7px;
  border-left: 1px dashed rgba(112, 100, 75, .24);
}

.sidebar-group .home-sidebar-nav a {
  min-height: 32px;
  padding-inline: 8px;
  font-size: 10.5px;
}

.home-sidebar-spacer {
  min-height: 12px;
  flex: 1;
}

.sidebar-community {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  color: #4e4c41;
  border: 1px solid rgba(113, 99, 76, .25);
  border-radius: 8px;
  background: rgba(245, 238, 225, .36);
  text-decoration: none;
}

.sidebar-community > i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #4a6650;
  box-shadow: 0 0 0 3px rgba(74, 102, 80, .1);
}

.sidebar-community span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.sidebar-community b {
  font-family: var(--serif);
  font-size: 10px;
}

.sidebar-community small {
  color: #8b816e;
  font-size: 8px;
}

.sidebar-local {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 3px 0;
  color: #8d8370;
  font-size: 8px;
  white-space: nowrap;
}

.sidebar-local i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #6f6552;
}

.sidebar-scrim {
  display: none;
}

@media (min-width: 901px) {
  body.sidebar-collapsed .home-sidebar {
    width: 64px;
    flex-basis: 64px;
    padding-inline: 9px;
  }

  body.sidebar-collapsed .home-sidebar-head {
    justify-content: center;
  }

  body.sidebar-collapsed .home-brand {
    flex: 0 0 34px;
    justify-content: center;
    padding: 0;
  }

  body.sidebar-collapsed .home-brand-copy,
  body.sidebar-collapsed .sidebar-new-chat span,
  body.sidebar-collapsed .sidebar-new-chat kbd,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .home-sidebar-nav a span,
  body.sidebar-collapsed .sidebar-community span,
  body.sidebar-collapsed .sidebar-local span {
    display: none;
  }

  body.sidebar-collapsed .sidebar-collapse {
    position: absolute;
    top: 54px;
    z-index: 2;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e7dece;
  }

  body.sidebar-collapsed .sidebar-collapse svg {
    transform: rotate(180deg);
  }

  body.sidebar-collapsed .sidebar-new-chat,
  body.sidebar-collapsed .home-sidebar-nav a,
  body.sidebar-collapsed .sidebar-community {
    width: 38px;
    height: 38px;
    min-height: 38px;
    justify-content: center;
    padding: 0;
    margin-inline: auto;
  }

  body.sidebar-collapsed .sidebar-label {
    display: none;
  }

  body.sidebar-collapsed .home-sidebar-nav {
    margin-top: 16px;
  }

  body.sidebar-collapsed .sidebar-local {
    justify-content: center;
  }
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  height: 62px;
  flex: 0 0 62px;
  align-items: center;
  gap: 16px;
  padding: 0 13px 0 16px;
  border-bottom: 1px solid rgba(128, 113, 89, .16);
  background:
    var(--fiber) 0 0 / 320px 320px repeat,
    linear-gradient(180deg, rgba(244, 238, 227, .83), rgba(238, 231, 218, .69));
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 -1px rgba(255, 255, 255, .34);
}

.topbar-leading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.page-title {
  display: flex;
  min-width: 54px;
  flex-direction: column;
  gap: 1px;
  color: inherit;
  text-decoration: none;
}

.page-title b {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .03em;
}

.top-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  white-space: nowrap;
}

.scene-toggle {
  display: inline-flex;
  height: 31px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 10px;
  color: #5f625a;
  border: 1px solid rgba(104, 101, 87, .33);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(242, 238, 229, .38)),
    var(--grain) 0 0 / 220px 220px repeat;
  background-blend-mode: soft-light, soft-light;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .34),
    1px 2px 0 rgba(55, 52, 41, .07);
  font-family: var(--serif);
  font-size: 9.5px;
  letter-spacing: .04em;
  transition:
    color .22s ease,
    border-color .22s ease,
    background .22s ease,
    transform .14s ease;
}

.scene-toggle:hover {
  transform: translateY(-1px);
}

.scene-toggle svg {
  width: 13px;
  height: 13px;
  color: #60716c;
}

.scene-toggle[aria-pressed="true"] {
  color: #f2f3ee;
  border-color: rgba(30, 47, 42, .7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 52%),
    linear-gradient(180deg, rgba(52, 70, 63, .92), rgba(31, 47, 42, .94));
  box-shadow:
    inset 0 -2px 5px rgba(11, 24, 20, .2),
    1px 2px 0 rgba(36, 43, 36, .12);
}

.scene-toggle[aria-pressed="true"] svg {
  color: #e5ebe8;
}

.scene-switch {
  position: relative;
  width: 20px;
  height: 11px;
  flex: 0 0 20px;
  border: 1px solid rgba(100, 92, 75, .35);
  border-radius: 999px;
  background: rgba(141, 134, 119, .28);
  transition: background .22s ease, border-color .22s ease;
}

.scene-switch i {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff9ed;
  box-shadow: 0 1px 2px rgba(30, 28, 21, .2);
  transition: transform .22s ease;
}

.scene-toggle[aria-pressed="true"] .scene-switch {
  border-color: rgba(214, 225, 218, .34);
  background: rgba(177, 197, 187, .34);
}

.scene-toggle[aria-pressed="true"] .scene-switch i {
  transform: translateX(9px);
  background: #edf2ec;
}

.nav-pill,
.nav-quiet {
  display: inline-flex;
  height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid rgba(111, 97, 73, .34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(244, 238, 225, .42)),
    var(--grain) 0 0 / 220px 220px repeat;
  background-blend-mode: soft-light, soft-light;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .46),
    1px 2px 0 rgba(72, 60, 40, .055);
  color: #48463b;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: .02em;
  transition: transform .14s ease, background .14s ease;
}

.nav-pill:hover,
.nav-quiet:hover {
  transform: translateY(-1px);
  background-color: rgba(255, 251, 243, .66);
}

.nav-pill svg {
  width: 14px;
  height: 14px;
}

.nav-quiet {
  min-width: 55px;
  padding-inline: 5px;
  color: #696253;
  border-color: transparent;
  background: none;
  box-shadow: none;
}

.nav-dark {
  padding-inline: 16px;
  color: #f3ecdc;
  border-color: #1d241c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 48%),
    linear-gradient(180deg, #394737, #273327);
  box-shadow:
    inset 0 -2px 5px rgba(19, 27, 19, .2),
    2px 2px 0 rgba(54, 49, 35, .14);
}

.nav-dark:hover {
  background: linear-gradient(180deg, #43513f, #2c392c);
}

.nav-orange {
  color: #fff5e5;
  border-color: #a75a35;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .11), transparent 46%),
    linear-gradient(180deg, #d17c4a, #af5b35);
  box-shadow:
    inset 0 -2px 4px rgba(97, 44, 22, .16),
    2px 2px 0 rgba(89, 49, 30, .1);
}

.nav-rust {
  color: #a45131;
  border-color: rgba(161, 78, 46, .66);
  background: rgba(247, 237, 222, .35);
}

.service-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #857c69;
  font-family: var(--serif);
  font-size: 10px;
}

.service-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9b907a;
  box-shadow: 0 0 0 2px rgba(156, 143, 121, .1);
}

.service-state.is-online {
  color: #4b6250;
}

.service-state.is-online i {
  background: #56755b;
  box-shadow: 0 0 0 2px rgba(86, 117, 91, .13);
}

.stage {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  background:
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    radial-gradient(ellipse at 48% 35%, rgba(255, 253, 246, .36), transparent 46%),
    linear-gradient(90deg, rgba(101, 84, 57, .025), transparent 24% 77%, rgba(101, 84, 57, .03));
  background-blend-mode: soft-light, multiply, normal, normal;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 109, 82, .32) transparent;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .48;
  background:
    var(--flecks) 0 0 / 260px 260px repeat,
    var(--grain) 0 0 / 220px 220px repeat;
  mix-blend-mode: multiply;
}

.conversation-workspace {
  display: flex;
  width: 100%;
  height: calc(100vh - 88px);
  min-height: 600px;
  flex: none;
  overflow: hidden;
  background: transparent;
}

.conversation-workspace[hidden] {
  display: none;
}

.conversation-workspace iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

body.conversation-mode {
  overflow: hidden;
}

body.conversation-mode .focus-app,
body.conversation-mode .app-shell {
  height: 100vh;
  min-height: 0;
}

body.conversation-mode .content-column {
  display: flex;
  height: calc(100vh - 88px);
  min-height: 0;
  flex-direction: column;
  gap: 10px;
}

body.conversation-mode .content-column > :not(.conversation-workspace):not(.composer-wrap) {
  display: none !important;
}

body.conversation-mode .conversation-workspace {
  min-height: 0;
  flex: 1;
  opacity: 1;
}

body.conversation-mode .composer-wrap {
  z-index: 8;
  flex: none;
  margin-top: 0;
}

body.conversation-mode .visitor-chip,
body.conversation-mode .visit-danmaku,
body.conversation-mode #visitDanmaku {
  display: none !important;
}

html.snow-scene .topbar {
  background:
    var(--fiber) 0 0 / 320px 320px repeat,
    linear-gradient(180deg, rgba(243, 237, 226, .8), rgba(234, 226, 212, .58));
  backdrop-filter: blur(12px) saturate(.72);
}

html.snow-scene .stage {
  background:
    linear-gradient(180deg, rgba(237, 231, 218, .2), rgba(228, 220, 204, .34)),
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    radial-gradient(ellipse at 48% 35%, rgba(255, 253, 246, .22), transparent 48%),
    linear-gradient(90deg, rgba(101, 84, 57, .025), transparent 24% 77%, rgba(101, 84, 57, .03));
  background-blend-mode: normal, soft-light, multiply, normal, normal;
}

html.snow-scene .stage::before {
  opacity: .32;
}

.usage-map {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  z-index: 0;
  overflow: hidden;
  color: rgba(81, 76, 62, .38);
  font-family: var(--serif);
}

.usage-row {
  display: grid;
  height: 48px;
  grid-template-columns: minmax(0, 1fr) 112px 112px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border-bottom: 1px dashed rgba(126, 111, 86, .27);
}

a.usage-row {
  color: inherit;
  text-decoration: none;
}

a.usage-row:hover {
  color: rgba(64, 58, 46, .72);
  background: rgba(255, 252, 242, .2);
}

.usage-row > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.usage-row > span::before {
  content: "";
  width: 3px;
  height: 3px;
  flex: none;
  border-radius: 50%;
  background: rgba(100, 91, 72, .42);
}

.usage-row b {
  font-weight: 400;
  text-align: right;
}

.usage-head {
  height: 31px;
  grid-template-columns: 1fr 112px 112px;
  border: 1px solid rgba(126, 111, 86, .22);
  background: rgba(239, 231, 217, .32);
}

.usage-head > span::before {
  display: none;
}

.visitor-note {
  position: absolute;
  top: 53px;
  right: -15px;
  z-index: 2;
  display: flex;
  width: 134px;
  height: 46px;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  color: #403f35;
  border: 1px solid rgba(126, 110, 84, .41);
  border-radius: 8px 0 0 8px;
  background:
    var(--grain),
    #ebe3d4;
  box-shadow: -3px 5px 12px rgba(68, 52, 31, .11);
}

.visitor-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid rgba(119, 99, 70, .32);
  border-radius: 50%;
  color: #7e7059;
}

.visitor-avatar svg {
  width: 14px;
  height: 14px;
}

.visitor-note > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.visitor-note b,
.visitor-note small {
  white-space: nowrap;
}

.visitor-note b {
  font-family: var(--serif);
  font-size: 9px;
}

.visitor-note small {
  color: #aa9e86;
  font-size: 7px;
}

.visitor-note > i {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border: 2px solid #b7663d;
  border-radius: 50%;
}

.content-column {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 4;
  width: min(1136px, calc(100% - 72px));
  transform: translateX(-50%);
}

.hero-card {
  position: relative;
  z-index: 4;
  width: min(820px, 100%);
  height: 292px;
  margin: 0 auto;
  padding: 66px 48px 22px;
  text-align: center;
}

.hero-under,
.hero-sheet {
  position: absolute;
  pointer-events: none;
}

.hero-under {
  border: 1px solid rgba(130, 115, 89, .42);
  background:
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #d8ccb7;
  box-shadow: 0 12px 22px rgba(70, 53, 31, .1);
}

.hero-under-a {
  inset: 8px -7px 0 8px;
  clip-path: polygon(.7% 2%, 12% 1%, 24% 2.4%, 38% 1%, 53% 2.1%, 68% .9%, 83% 2%, 99% 1%, 99.4% 24%, 98.8% 48%, 99.4% 73%, 98.8% 98%, 82% 97%, 64% 98.4%, 46% 97%, 27% 98.4%, 4% 97%, .7% 84%, 1.3% 58%, .5% 27%);
  transform: rotate(.35deg);
}

.hero-under-b {
  inset: 3px 1px 3px 1px;
  clip-path: polygon(1% 1%, 18% 2%, 37% .8%, 57% 2%, 78% 1%, 99% 2%, 98.8% 24%, 99.4% 49%, 98.7% 72%, 99% 98%, 80% 97.2%, 60% 98.4%, 40% 97%, 20% 98.2%, 1% 97%, .4% 74%, 1.1% 50%, .5% 24%);
  opacity: .9;
}

.hero-sheet {
  inset: 0;
  z-index: 0;
  clip-path: polygon(
    .7% 5%, 5% 3%, 10% 4.3%, 17% 2%, 25% 3.6%, 34% 1.5%, 44% 3%,
    54% 1.6%, 64% 3.5%, 74% 2%, 83% 4%, 92% 2%, 99% 4%, 98.7% 17%,
    99.5% 33%, 98.5% 51%, 99.4% 70%, 98.6% 88%, 99% 97%, 89% 95.8%,
    78% 97.7%, 66% 96%, 54% 98%, 42% 96.4%, 31% 98%, 20% 96.2%,
    10% 97.5%, 1.4% 96%, .7% 81%, 1.4% 64%, .6% 47%, 1.2% 30%, .5% 15%
  );
  background:
    linear-gradient(166deg, rgba(255, 255, 255, .55), transparent 35%),
    radial-gradient(ellipse at 14% 82%, rgba(105, 84, 51, .1), transparent 31%),
    radial-gradient(ellipse at 84% 13%, rgba(102, 83, 52, .08), transparent 33%),
    var(--flecks) 0 0 / 260px 260px repeat,
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #eee5d4;
  background-blend-mode: soft-light, multiply, multiply, multiply, soft-light, multiply, normal;
  box-shadow:
    inset 0 0 34px rgba(103, 81, 49, .08),
    0 17px 30px rgba(66, 51, 31, .12);
  filter: drop-shadow(0 5px 8px rgba(68, 51, 30, .07));
}

.hero-kicker,
.hero-title-line,
.hero-sub,
.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-tape {
  position: absolute;
  z-index: 3;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .11) 0 2px, transparent 2px 4px),
    rgba(198, 178, 135, .55);
  box-shadow: 0 1px 2px rgba(79, 60, 33, .1);
  mix-blend-mode: multiply;
}

.tape-a {
  top: 63px;
  left: -58px;
  width: 89px;
  height: 24px;
  transform: rotate(39deg);
}

.tape-b {
  right: 27px;
  bottom: 20px;
  width: 63px;
  height: 91px;
  transform: rotate(41deg);
  opacity: .62;
}

.portrait {
  position: absolute;
  top: -25px;
  left: 50%;
  z-index: 5;
  width: 75px;
  margin: 0 0 0 -37.5px;
  padding: 5px 5px 16px;
  border: 1px solid #bba98b;
  background:
    var(--grain),
    #f1e8d9;
  box-shadow:
    0 5px 12px rgba(65, 49, 29, .25),
    inset 0 0 0 2px rgba(255, 255, 255, .32);
  transform: rotate(.8deg);
}

.portrait::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -9px;
  width: 92px;
  height: 36px;
  opacity: .66;
  background:
    var(--grain),
    rgba(196, 177, 139, .63);
  transform: rotate(-1.5deg);
}

.portrait-face {
  position: relative;
  z-index: 1;
  width: 63px;
  height: 63px;
  overflow: hidden;
  border: 3px solid #fbf6eb;
  border-radius: 50%;
  background: #ccc4b6;
  box-shadow: 0 0 0 1px rgba(134, 116, 89, .3);
}

.portrait-face img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 32%;
  filter: saturate(.87) sepia(.08);
}

.portrait figcaption {
  position: absolute;
  right: -7px;
  bottom: -7px;
  left: -7px;
  display: grid;
  height: 16px;
  place-items: center;
  color: #86775e;
  border: 1px solid #b5a488;
  background: #e8dcc8;
  font-family: Georgia, var(--serif);
  font-size: 6px;
  letter-spacing: .1em;
}

.info-stamp {
  position: absolute;
  top: 31px;
  right: 44px;
  z-index: 3;
  display: flex;
  width: 82px;
  height: 45px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(105, 83, 57, .7);
  border: 1px solid rgba(137, 105, 72, .61);
  background: rgba(235, 224, 205, .5);
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 235, .42),
    inset 0 0 0 3px rgba(151, 111, 75, .16);
  transform: rotate(2deg);
}

.info-stamp b {
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: .08em;
}

.info-stamp span {
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: .05em;
}

.visitor-chip {
  position: absolute !important;
  top: 90px !important;
  right: -64px !important;
  z-index: 5 !important;
  padding: 8px 13px;
  color: #514d40;
  border: 1px solid rgba(142, 127, 102, .52);
  border-radius: 9px;
  background:
    var(--grain),
    #eee6d7;
  box-shadow: 0 3px 8px rgba(65, 50, 30, .1);
  font-family: var(--serif);
  font-size: 9px;
  white-space: nowrap;
}

.hero-kicker {
  margin: 0 0 3px;
  color: #895438;
  font-family: var(--hand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
}

.hero-title-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-title-line > span {
  width: 92px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 75, 62, .75));
}

.hero-title-line > span:last-child {
  background: linear-gradient(90deg, rgba(79, 75, 62, .75), transparent);
}

.hero-title-line h1 {
  margin: 0;
  color: #24241e;
  font-family: var(--serif);
  font-size: 41px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.hero-sub {
  margin: 9px 0 8px;
  color: #454339;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.hero-copy {
  max-width: 445px;
  margin: 0 auto;
  color: #5d5547;
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.85;
  letter-spacing: .02em;
}

.tool-ribbon {
  position: relative;
  z-index: 8;
  display: grid;
  height: 56px;
  grid-template-columns: 194px repeat(4, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 12px;
  padding: 6px 11px;
  color: #e9d8bb;
  border: 1px solid #32170f;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04), transparent 24% 78%, rgba(0, 0, 0, .15)),
    radial-gradient(ellipse at 13% 0, rgba(160, 91, 57, .23), transparent 44%),
    radial-gradient(ellipse at 80% 108%, rgba(20, 7, 4, .22), transparent 40%),
    repeating-linear-gradient(3deg, transparent 0 8px, rgba(255, 220, 169, .018) 9px, transparent 10px),
    var(--grain) 0 0 / 220px 220px repeat,
    var(--fiber) 0 0 / 320px 320px repeat,
    linear-gradient(180deg, #5a2e20, #471e15 57%, #34150f);
  background-blend-mode: normal, screen, multiply, soft-light, soft-light, soft-light, normal;
  box-shadow:
    inset 0 0 0 2px rgba(231, 196, 146, .075),
    inset 0 1px 0 rgba(255, 221, 172, .09),
    0 8px 16px rgba(65, 31, 18, .22),
    0 2px 0 rgba(255, 246, 229, .32);
}

.tool-ribbon::after {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px dashed rgba(226, 191, 141, .16);
  border-radius: 8px;
}

.ribbon-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 7px 12px;
}

.ribbon-title::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 0;
  bottom: 7px;
  width: 1px;
  background: rgba(233, 204, 158, .17);
}

.ribbon-title > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.ribbon-title small {
  color: #b89a73;
  font-size: 6.5px;
  letter-spacing: .04em;
}

.ribbon-title b {
  color: #eddcc0;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

.orbit {
  position: relative;
  display: block;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 1px solid rgba(236, 211, 169, .28);
  border-radius: 50%;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(238, 212, 167, .44);
  border-radius: 50%;
  transform: rotate(32deg) scaleY(.4);
}

.orbit::after {
  transform: rotate(-32deg) scaleY(.4);
}

.orbit i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ead8b8;
}

.orbit i:nth-child(1) { top: 4px; left: 8px; }
.orbit i:nth-child(2) { top: 12px; right: 3px; background: #dba05d; }
.orbit i:nth-child(3) { right: 7px; bottom: 4px; }
.orbit i:nth-child(4) { top: 13px; left: 4px; background: #da9855; }

.tool-ribbon > button {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #d4c09e;
  border-left: 1px solid rgba(231, 205, 163, .14);
  font-family: var(--serif);
  font-size: 9px;
  white-space: nowrap;
}

.tool-ribbon > button:hover {
  background: rgba(239, 205, 157, .055);
}

.tool-ribbon > button > i {
  color: #d7a768;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: normal;
}

.key {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid rgba(218, 186, 134, .34);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 7px;
}

.community-strip {
  position: relative;
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 0 3px;
  color: #414337;
}

.community-pill {
  display: inline-flex;
  height: 35px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  color: #3d4137;
  border: 1px solid rgba(117, 103, 81, .45);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(240, 234, 222, .34)),
    var(--grain) 0 0 / 220px 220px repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .28),
    1px 2px 0 rgba(67, 54, 34, .06);
}

.community-pill > i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #304e36;
  box-shadow: 0 0 0 2px rgba(48, 78, 54, .08);
}

.community-pill b {
  color: #263a30;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .07em;
}

.community-join {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  color: #8e7b64;
  border-bottom: 1px dashed rgba(147, 126, 96, .55);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .03em;
}

.community-join i {
  color: #c4a466;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: normal;
}

body.capability-window-open {
  overflow: hidden;
}

.capability-window {
  width: min(1040px, calc(100vw - 36px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.capability-window::backdrop {
  background: rgba(31, 29, 22, .48);
  backdrop-filter: blur(5px);
}

.capability-window[open] {
  animation: capability-window-in .22s cubic-bezier(.2, .72, .24, 1) both;
}

.capability-window-paper {
  position: relative;
  display: flex;
  max-height: min(820px, calc(100dvh - 36px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(74, 65, 48, .62);
  border-radius: 11px;
  background:
    radial-gradient(ellipse at 8% 0, rgba(255, 255, 255, .58), transparent 34%),
    radial-gradient(ellipse at 92% 104%, rgba(123, 99, 60, .1), transparent 42%),
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #f1e9da;
  background-blend-mode: soft-light, multiply, soft-light, multiply, normal;
  box-shadow:
    inset 0 0 0 3px rgba(255, 252, 244, .48),
    0 28px 70px rgba(35, 30, 21, .3),
    2px 4px 0 rgba(69, 57, 37, .16);
}

.capability-window-paper::before,
.capability-window-paper::after {
  position: absolute;
  width: 27px;
  height: 27px;
  pointer-events: none;
  border-color: rgba(126, 46, 55, .52);
  content: "";
}

.capability-window-paper::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.capability-window-paper::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.capability-window-stamp {
  position: absolute;
  top: 18px;
  right: 76px;
  color: rgba(120, 73, 46, .58);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: .15em;
  transform: rotate(1deg);
}

.capability-window-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px 18px;
  border-bottom: 1px dashed rgba(116, 100, 74, .28);
}

.capability-window-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #7c382f;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.capability-window-kicker::before {
  width: 16px;
  height: 1px;
  background: #8c3b31;
  content: "";
}

.capability-window-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.capability-window-head p {
  max-width: 560px;
  margin: 7px 0 0;
  color: #665e50;
  font-size: 11px;
  line-height: 1.65;
}

.capability-window-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #5c594c;
  border: 1px solid rgba(105, 92, 69, .3);
  border-radius: 50%;
  background: rgba(250, 246, 237, .55);
}

.capability-window-close:hover {
  color: #742f28;
  border-color: rgba(126, 47, 39, .42);
  background: rgba(255, 250, 241, .86);
}

.capability-window-close svg {
  width: 16px;
  height: 16px;
}

.capability-window-body {
  display: grid;
  min-height: 0;
  gap: 18px;
  padding: 18px 28px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(102, 88, 64, .3) transparent;
  scrollbar-width: thin;
}

.capability-window-group {
  display: grid;
  gap: 8px;
}

.capability-window-group-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.capability-window-group-head b {
  color: #393b32;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
}

.capability-window-group-head small {
  color: #756c5a;
  font-size: 8.5px;
}

.capability-window-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.capability-window-option {
  display: grid;
  min-height: 68px;
  grid-template-columns: 38px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  color: #45443a;
  border: 1px solid rgba(100, 89, 69, .34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .68), rgba(244, 236, 223, .58)),
    rgba(250, 246, 237, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.capability-window-option:hover {
  border-color: rgba(126, 64, 45, .46);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .9), rgba(246, 237, 223, .82)),
    rgba(252, 248, 239, .84);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    1px 2px 0 rgba(65, 53, 34, .07);
}

.capability-window-option > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.capability-window-option b {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.capability-window-option small {
  overflow: hidden;
  color: #6e6656;
  font-size: 8.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-window-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #425e4a;
  border: 1px solid rgba(81, 105, 83, .24);
  border-radius: 8px;
  background: rgba(223, 233, 218, .68);
}

.capability-window-icon.is-warm {
  color: #8f4b30;
  border-color: rgba(161, 92, 59, .22);
  background: rgba(244, 225, 205, .72);
}

.capability-window-icon svg {
  width: 16px;
  height: 16px;
}

.capability-window-chevron {
  width: 12px;
  height: 12px;
  color: #b0a58f;
  transform: rotate(90deg);
}

.capability-window-foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px 16px;
  border-top: 1px dashed rgba(116, 100, 74, .26);
}

.capability-window-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6c6454;
  font-size: 9px;
}

.capability-window-foot > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6e8568;
  box-shadow: 0 0 0 3px rgba(110, 133, 104, .1);
}

.capability-window-foot > button {
  min-width: 68px;
  min-height: 40px;
  padding: 0 14px;
  color: #5a5649;
  border: 1px solid rgba(104, 91, 68, .3);
  border-radius: 99px;
  background: rgba(251, 247, 239, .62);
  font-size: 10px;
}

.capability-window-foot > button:hover {
  border-color: rgba(126, 56, 42, .4);
  background: rgba(255, 250, 242, .9);
}

.mode-window {
  --mode-accent: #8c3b31;
  --mode-accent-deep: #633028;
  --mode-accent-soft: rgba(140, 59, 49, .08);
  width: min(820px, calc(100vw - 36px));
}

.mode-window .capability-window-paper {
  max-height: min(720px, calc(100dvh - 36px));
}

.mode-window-head {
  align-items: center;
}

.mode-window-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 16px;
}

.mode-window-heading > div {
  min-width: 0;
}

.mode-window-symbol {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  color: #f3e7d5;
  border: 1px solid rgba(94, 43, 29, .7);
  border-radius: 16px 5px 16px 5px;
  background:
    radial-gradient(circle at 34% 24%, rgba(224, 167, 102, .32), transparent 48%),
    linear-gradient(145deg, #693625, #3e1d15);
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 194, .08),
    2px 3px 0 rgba(70, 43, 27, .12);
  font-family: Georgia, serif;
  font-size: 25px;
}

.mode-window-body {
  display: grid;
  min-height: 0;
  gap: 14px;
  padding: 20px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(102, 88, 64, .3) transparent;
  scrollbar-width: thin;
}

.mode-window-story {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(112, 82, 55, .3);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(255, 252, 245, .72), rgba(244, 231, 210, .58)),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(126, 91, 57, .035) 23px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36);
}

.mode-window-story::after {
  position: absolute;
  top: 12px;
  right: 14px;
  bottom: 12px;
  width: 54px;
  pointer-events: none;
  border: 1px solid rgba(134, 55, 43, .14);
  border-radius: 50%;
  content: "";
}

.mode-window-story-index {
  color: rgba(132, 65, 44, .54);
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.mode-window-story-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.mode-window-story-copy > span {
  color: var(--mode-accent);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .04em;
}

.mode-window-story-copy p {
  max-width: 610px;
  margin: 0;
  color: #665d4d;
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.75;
}

.mode-window-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.mode-window-outcome {
  display: grid;
  min-height: 64px;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(102, 90, 69, .25);
  border-radius: 8px;
  background: rgba(250, 246, 237, .52);
}

.mode-window-outcome-marker {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(140, 59, 49, .7);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--mode-accent-soft);
}

.mode-window-outcome > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mode-window-outcome b {
  color: #3d3a31;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 650;
}

.mode-window-outcome small {
  color: #766c5b;
  font-size: 8.5px;
  line-height: 1.5;
}

.mode-window-field {
  display: grid;
  gap: 7px;
}

.mode-window-field > span {
  color: #4b473b;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 650;
}

.mode-window-field textarea {
  width: 100%;
  min-height: 102px;
  padding: 11px 13px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid rgba(100, 88, 67, .34);
  border-radius: 8px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .84), rgba(247, 240, 229, .68)),
    var(--paper-bright);
  box-shadow: inset 0 1px 3px rgba(77, 61, 38, .06);
  font: 11px/1.7 var(--serif);
}

.mode-window-field textarea:focus {
  border-color: rgba(126, 57, 42, .62);
  box-shadow:
    inset 0 1px 3px rgba(77, 61, 38, .06),
    0 0 0 3px rgba(143, 61, 43, .09);
}

.mode-window-field small {
  color: #847968;
  font-size: 8.5px;
  line-height: 1.55;
}

.mode-window-foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px 16px;
  border-top: 1px dashed rgba(116, 100, 74, .26);
}

.mode-window-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6c6454;
  font-size: 9px;
}

.mode-window-foot > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mode-accent);
  box-shadow: 0 0 0 3px var(--mode-accent-soft);
}

.mode-window-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-window-actions button {
  min-height: 40px;
  padding: 0 17px;
  border-radius: 99px;
  font-size: 10px;
}

.mode-window-cancel {
  color: #5a5649;
  border: 1px solid rgba(104, 91, 68, .3);
  background: rgba(251, 247, 239, .62);
}

.mode-window-cancel:hover {
  border-color: rgba(126, 56, 42, .4);
  background: rgba(255, 250, 242, .9);
}

.mode-window-apply {
  color: #f8efe0;
  border: 1px solid #3a1d14;
  background: linear-gradient(180deg, #74402d, #4b251a);
  box-shadow:
    inset 0 1px rgba(255, 235, 205, .14),
    1px 2px 0 rgba(67, 39, 25, .13);
}

.mode-window-apply:hover {
  background: linear-gradient(180deg, #81503a, #542b1e);
}

.tool-ribbon > button:focus-visible {
  z-index: 2;
  outline: 2px solid rgba(241, 215, 173, .8);
  outline-offset: -4px;
  background: rgba(239, 205, 157, .1);
}

@keyframes capability-window-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
}

.capability-grid {
  display: grid;
  height: 250px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
  transition: height .22s cubic-bezier(.2, .72, .24, 1);
}

.capability-grid.is-collapsed {
  height: 119px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.capability-grid.is-collapsed .cap-card.compact {
  display: none;
}

.capability-fold {
  display: flex;
  justify-content: center;
  margin-top: 7px;
}

.capability-fold button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  color: #8e7b64;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed rgba(147, 126, 96, .48);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}

.capability-fold button:hover {
  color: #a65331;
  border-color: rgba(166, 83, 49, .55);
}

.capability-fold svg {
  width: 12px;
  height: 12px;
  transition: transform .22s cubic-bezier(.2, .72, .24, 1);
}

.capability-fold button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.cap-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  overflow: hidden;
  color: #44443a;
  border: 1px solid rgba(89, 83, 69, .5);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(244, 238, 226, .68)),
    radial-gradient(ellipse at 14% 116%, rgba(104, 83, 54, .08), transparent 50%),
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #eee8dc;
  background-blend-mode: soft-light, multiply, soft-light, multiply, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .48),
    1px 2px 0 rgba(69, 58, 39, .075);
  text-align: left;
  transition: transform .14s ease, box-shadow .14s ease;
}

.cap-card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .54),
    2px 3px 0 rgba(69, 58, 39, .085);
}

.cornered::before,
.cornered::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
  border-color: rgba(177, 93, 52, .72);
  border-style: solid;
}

.cornered::before {
  top: 4px;
  left: 4px;
  border-width: 1px 0 0 1px;
}

.cornered::after {
  right: 4px;
  bottom: 4px;
  border-width: 0 1px 1px 0;
}

.cap-card > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.cap-card b {
  overflow: hidden;
  color: #3d3b31;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-card small {
  overflow: hidden;
  color: #958a75;
  font-family: var(--serif);
  font-size: 7.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  color: #595648;
  border: 1px solid rgba(130, 114, 88, .5);
  border-radius: 7px;
  background: rgba(246, 240, 228, .58);
}

.cap-icon svg {
  width: 15px;
  height: 15px;
}

.cap-icon.orange {
  color: #b25d34;
  background: #f1dbca;
}

.cap-icon.violet {
  color: #8e4e4e;
  background: #efd8cf;
}

.cap-icon.amber {
  color: #b27645;
  background: #f0e5ce;
}

.cap-dark {
  color: #f1ecdf;
  border-color: #253025;
  background:
    radial-gradient(ellipse at 11% 0, rgba(133, 151, 112, .1), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 50%),
    var(--grain) 0 0 / 220px 220px repeat,
    linear-gradient(180deg, #3e4b3a, #293529);
  background-blend-mode: normal, normal, soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(238, 227, 202, .07),
    2px 3px 0 rgba(43, 49, 37, .17);
}

.cap-dark b {
  color: #f1ecdf;
}

.cap-dark small {
  color: #b1a991;
}

.cap-dark .cap-icon {
  color: #e6dac0;
  border-color: rgba(214, 201, 171, .22);
  background: rgba(241, 233, 215, .05);
}

.compact {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(245, 239, 228, .7)),
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #f0eade;
  background-blend-mode: soft-light, soft-light, multiply, normal;
}

.composer-wrap {
  position: relative;
  margin-top: 12px;
}

.selected-mode {
  position: relative;
  z-index: 4;
  display: flex;
  width: 530px;
  height: 48px;
  align-items: center;
  gap: 10px;
  margin: 0 auto 4px;
  padding: 6px 12px;
  color: #433f34;
  border: 1px solid rgba(96, 88, 72, .47);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(241, 233, 220, .72)),
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat;
  background-blend-mode: soft-light, soft-light, multiply;
  box-shadow:
    2px 4px 0 rgba(72, 58, 38, .08),
    0 6px 13px rgba(72, 56, 34, .06);
}

.selected-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  color: #b05e36;
  border-radius: 7px;
  background: #f0dbc9;
}

.selected-icon svg {
  width: 14px;
  height: 14px;
}

.selected-mode > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.selected-mode b {
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 600;
}

.selected-mode small {
  color: #968a74;
  font-family: var(--serif);
  font-size: 7.5px;
}

.selected-mode > button {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: auto;
  place-items: center;
  color: #817661;
  border: 1px solid rgba(130, 115, 92, .34);
  border-radius: 50%;
  background: #f6efe3;
}

.selected-mode > button svg {
  width: 13px;
  height: 13px;
}

.selected-mode[hidden] {
  display: none !important;
}

.composer {
  position: relative;
  display: flex;
  height: 151px;
  flex-direction: column;
  padding: 12px 14px 10px;
  border: 1.5px solid #37362c;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .61), rgba(240, 232, 218, .8)),
    radial-gradient(ellipse at 88% 115%, rgba(105, 83, 53, .11), transparent 43%),
    linear-gradient(86deg, transparent 0 37%, rgba(106, 87, 56, .04) 37.2%, transparent 37.7%),
    var(--flecks) 0 0 / 260px 260px repeat,
    var(--fiber) 0 0 / 320px 320px repeat,
    var(--grain) 0 0 / 220px 220px repeat,
    #f1eadc;
  background-blend-mode: soft-light, multiply, multiply, multiply, soft-light, multiply, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    inset 0 0 20px rgba(93, 73, 44, .035),
    3px 5px 0 rgba(76, 61, 40, .075),
    0 11px 24px rgba(66, 50, 28, .08);
}

.composer textarea {
  width: 100%;
  height: 43px;
  padding: 2px 3px;
  resize: none;
  color: #34362c;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #8b826f;
}

.composer::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 55px;
  left: 18px;
  height: 1px;
  border-top: 1px dashed rgba(130, 115, 91, .27);
}

.local-note {
  margin: 1px 3px 0;
  color: #a39986;
  font-family: var(--serif);
  font-size: 7px;
}

.composer-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 15px;
}

.tool-left,
.tool-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.tool-left {
  overflow: hidden;
}

.tool-pill {
  display: inline-flex;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  color: #5d594d;
  border: 1px solid rgba(117, 104, 82, .36);
  border-radius: 999px;
  background: rgba(246, 239, 227, .64);
  font-family: var(--serif);
  font-size: 8.5px;
}

.tool-pill:hover {
  background: rgba(255, 251, 243, .8);
}

.tool-pill svg {
  width: 13px;
  height: 13px;
}

.ability-pill {
  min-width: 78px;
  justify-content: center;
  color: #69627d;
  border-color: rgba(142, 128, 168, .24);
  background: #e8e1ee;
}

.local-toggle {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: #94886f;
  border: 1px solid rgba(132, 116, 91, .27);
  border-radius: 999px;
  background: rgba(244, 236, 222, .42);
  font-family: var(--serif);
  font-size: 8px;
}

.local-toggle i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a54c2c;
}

.local-toggle:not(.is-on) {
  color: #817761;
  background: rgba(225, 216, 199, .48);
}

.local-toggle:not(.is-on) i {
  background: #9e947f;
}

.optimize {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  color: #635c4c;
  font-family: var(--serif);
  font-size: 8.5px;
  white-space: nowrap;
}

.optimize svg {
  width: 13px;
  height: 13px;
}

.icon-button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #545348;
  border: 1px solid rgba(117, 102, 80, .37);
  border-radius: 50%;
  background: rgba(245, 238, 226, .48);
}

.icon-button.is-listening {
  color: #a24d2e;
  box-shadow: 0 0 0 4px rgba(162, 77, 46, .1);
  animation: listenPulse .9s ease-in-out infinite;
}

.send-button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #3f4739;
  border: 1px solid rgba(72, 79, 65, .46);
  border-radius: 7px;
  background: rgba(248, 242, 231, .66);
}

.send-button:hover {
  color: #f2ecdf;
  background: #354332;
}

.send-button svg {
  width: 14px;
  height: 14px;
}

.send-status {
  position: absolute;
  right: 18px;
  bottom: 173px;
  max-width: 370px;
  margin: 0;
  padding: 8px 12px;
  color: #f2eadb;
  border-radius: 8px;
  background: #354333;
  box-shadow: 0 8px 20px rgba(45, 46, 33, .2);
  font-family: var(--serif);
  font-size: 8.5px;
  line-height: 1.55;
}

.file-hint {
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  margin: 0;
  color: #a39986;
  font-family: var(--serif);
  font-size: 7px;
  text-align: center;
  pointer-events: none;
}

.legal {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #9d937f;
  font-family: var(--serif);
  font-size: 7px;
}

.legal button {
  padding: 0;
  color: inherit;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.legal button:hover {
  color: #6f3e28;
}

.legal a {
  color: #8b7b64;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  width: min(330px, calc(100vw - 36px));
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.toast {
  padding: 9px 13px;
  color: #f3ebdc;
  border: 1px solid #273226;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent),
    #334133;
  box-shadow: 0 10px 24px rgba(56, 49, 33, .2);
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1.5;
  animation: toastIn .18s ease both;
}

.toast.is-leaving {
  animation: toastOut .18s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

@keyframes listenPulse {
  50% {
    box-shadow: 0 0 0 6px rgba(162, 77, 46, .04);
  }
}

@media (max-width: 1600px) {
  .top-actions .nav-pill:nth-of-type(3),
  .top-actions .nav-pill:nth-of-type(4),
  .top-actions .nav-pill:nth-of-type(5),
  .top-actions .nav-pill:nth-of-type(6) {
    display: none;
  }
}

@media (max-width: 1360px) {
  .topbar {
    gap: 8px;
  }

  .top-actions {
    gap: 5px;
  }

  .nav-pill {
    padding-inline: 9px;
    font-size: 9.5px;
  }

  .nav-quiet {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .focus-app {
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  body.conversation-mode .focus-app,
  body.conversation-mode .app-shell {
    height: 100dvh;
    min-height: 0;
  }

  body.conversation-mode .conversation-workspace {
    height: calc(100dvh - 58px);
    flex: 0 0 auto;
  }

  .home-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 160;
    width: min(286px, 86vw);
    height: 100vh;
    flex-basis: auto;
    transform: translateX(-105%);
    transition: transform .24s cubic-bezier(.2, .72, .24, 1);
    box-shadow: 18px 0 40px rgba(42, 34, 22, .2);
  }

  body.sidebar-open .home-sidebar {
    transform: translateX(0);
  }

  .sidebar-collapse {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(44, 37, 26, .24);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease;
  }

  body.sidebar-open .sidebar-scrim {
    pointer-events: auto;
    opacity: 1;
  }

  .mobile-sidebar-menu {
    display: grid;
  }
}

@media (max-width: 1160px) {
  body {
    overflow: auto;
  }

  .focus-app {
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    position: sticky;
    top: 0;
    overflow: hidden;
  }

  .top-actions .nav-pill:nth-of-type(4),
  .top-actions .nav-pill:nth-of-type(5),
  .service-state {
    display: none;
  }

  .visitor-note {
    display: none;
  }

  .stage {
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding: 22px 16px 42px;
  }

  .content-column {
    position: relative;
    top: auto;
    left: auto;
    width: min(682px, 100%);
    margin: 0 auto;
    transform: none;
    order: 1;
  }

  .usage-map {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    order: 2;
    width: min(682px, 100%);
    margin: 18px auto 0;
    color: rgba(70, 65, 54, .68);
    border: 1px solid rgba(124, 110, 86, .22);
    border-right: 1px solid rgba(124, 110, 86, .22);
    background: rgba(244, 238, 227, .3);
  }

  .usage-row {
    height: 43px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 58px;
    flex-basis: 58px;
    padding-inline: 12px;
  }

  .page-title {
    min-width: 68px;
  }

  .page-title b {
    font-size: 15px;
  }

  .topbar-leading {
    gap: 7px;
  }

  .scene-toggle {
    padding-inline: 8px;
    font-size: 9px;
  }

  .top-actions {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .top-actions .nav-pill:nth-of-type(3),
  .top-actions .nav-pill:nth-of-type(6) {
    display: none;
  }

  .stage {
    padding: 14px 10px 32px;
  }

  .hero-card {
    width: 100%;
    height: 288px;
    padding: 79px 22px 20px;
  }

  .visitor-chip {
    display: none;
  }

  .hero-title-line {
    gap: 8px;
  }

  .hero-title-line > span {
    width: 38px;
  }

  .hero-title-line h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .hero-copy {
    font-size: 10px;
  }

  .tool-ribbon {
    height: auto;
    grid-template-columns: 1fr;
    padding: 7px;
  }

  .ribbon-title {
    min-height: 49px;
  }

  .ribbon-title::after {
    top: auto;
    right: 8px;
    bottom: 0;
    left: 8px;
    width: auto;
    height: 1px;
  }

  .tool-ribbon > button {
    min-height: 45px;
    justify-content: flex-start;
    padding-inline: 14px;
    border-top: 1px solid rgba(231, 205, 163, .12);
    border-left: 0;
  }

  .community-strip {
    height: 44px;
    padding-inline: 1px;
  }

  .community-pill {
    height: 33px;
    padding-inline: 12px;
  }

  .community-join {
    font-size: 9px;
  }

  .capability-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .capability-grid.is-collapsed {
    height: auto;
    grid-template-rows: none;
  }

  .cap-card {
    min-height: 58px;
  }

  .cap-card:last-child {
    grid-column: span 2;
  }

  .selected-mode {
    width: 100%;
  }

  .composer {
    height: auto;
    min-height: 170px;
    padding-bottom: 11px;
  }

  .composer-tools {
    margin-bottom: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .file-hint {
    position: static;
    margin-top: 7px;
  }

  .tool-left {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .tool-left::-webkit-scrollbar {
    display: none;
  }

  .tool-right {
    width: 100%;
    justify-content: flex-end;
  }

  .local-toggle {
    margin-right: auto;
  }

  .legal {
    height: auto;
    min-height: 34px;
    flex-wrap: wrap;
    padding-top: 7px;
  }
}

@media (max-width: 480px) {
  .stage {
    padding-inline: 8px;
  }

  .hero-card {
    height: 305px;
    padding-inline: 16px;
  }

  .scene-toggle > span:not(.scene-switch) {
    display: none;
  }

  .scene-toggle {
    gap: 5px;
    padding-inline: 8px;
  }

  .info-stamp {
    top: 27px;
    right: 20px;
    width: 70px;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .cap-card:last-child {
    grid-column: auto;
  }

  .tool-pill:nth-child(5),
  .tool-pill:nth-child(6),
  .optimize {
    display: none;
  }

  .send-status {
    right: 8px;
  }
}

@media (max-width: 900px) {
  .capability-window {
    width: min(720px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }

  .capability-window-paper {
    max-height: calc(100dvh - 20px);
  }

  .capability-window-head {
    gap: 14px;
    padding: 21px 20px 15px;
  }

  .capability-window-body {
    padding: 15px 20px 17px;
  }

  .capability-window-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-window-foot {
    padding: 12px 20px 14px;
  }
}

@media (max-width: 560px) {
  .capability-window {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .capability-window-paper {
    max-height: calc(100dvh - 14px);
  }

  .capability-window-stamp {
    display: none;
  }

  .capability-window-head {
    padding: 18px 16px 13px;
  }

  .capability-window-head h2 {
    font-size: 23px;
  }

  .capability-window-head p {
    font-size: 10px;
  }

  .capability-window-body {
    gap: 15px;
    padding: 13px 14px 15px;
  }

  .capability-window-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .capability-window-option {
    min-height: 64px;
    padding: 9px 10px;
  }

  .capability-window-option small {
    white-space: normal;
  }

  .capability-window-foot {
    padding: 11px 14px 13px;
  }

  .capability-window-foot > span {
    max-width: 180px;
    line-height: 1.45;
  }

  .capability-window-foot > button {
    min-height: 44px;
  }
}

@media (max-width: 720px) {
  .mode-window {
    width: min(620px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }

  .mode-window .capability-window-paper {
    max-height: calc(100dvh - 20px);
  }

  .mode-window-head {
    padding: 20px 20px 15px;
  }

  .mode-window-heading {
    gap: 12px;
  }

  .mode-window-symbol {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 21px;
  }

  .mode-window-body {
    padding: 16px 20px;
  }

  .mode-window-foot {
    padding: 12px 20px 14px;
  }
}

@media (max-width: 540px) {
  .mode-window {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .mode-window .capability-window-paper {
    max-height: calc(100dvh - 14px);
  }

  .mode-window-head {
    gap: 10px;
    padding: 17px 15px 13px;
  }

  .mode-window-symbol {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px 4px 12px 4px;
    font-size: 18px;
  }

  .mode-window-head .capability-window-kicker {
    margin-bottom: 5px;
    font-size: 8px;
  }

  .mode-window-head h2 {
    font-size: 23px;
  }

  .mode-window-head p {
    font-size: 9.5px;
  }

  .mode-window .capability-window-close {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .mode-window-body {
    gap: 11px;
    padding: 13px 14px;
  }

  .mode-window-story {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .mode-window-story-index {
    font-size: 22px;
  }

  .mode-window-story-copy p {
    font-size: 9.5px;
  }

  .mode-window-outcomes {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mode-window-outcome {
    min-height: 52px;
    padding: 8px 10px;
  }

  .mode-window-field textarea {
    min-height: 88px;
  }

  .mode-window-foot {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 11px 14px 13px;
  }

  .mode-window-actions {
    justify-content: flex-end;
  }

  .mode-window-actions button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
