:root {
  color-scheme: dark;
  font-family:
    "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #e9ebf6;
  background: #141722;
  --bg: #141722;
  --side: #191c29;
  --panel: #1d2130;
  --line: #34394a;
  --muted: #a3a9bf;
  --mint: #a0e9cd;
  --lilac: #c1b3ff;
  --gold: #efc890;
  --radius: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}
a {
  color: var(--mint);
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
  background: none;
}
#shell {
  display: flex;
  min-height: 100vh;
}
.ico {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.workspace {
  min-width: 0;
  flex: 1;
}
#side {
  height: 100dvh;
  position: sticky;
  top: 0;
  width: 222px;
  flex: none;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 28px 16px 18px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 0 9px;
}
.brand img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}
.brand strong {
  font-size: 21px;
  letter-spacing: 1px;
  display: block;
  line-height: 1.45;
}
.brand small,
.mono,
.eyebrow {
  font:
    600 12px/1.4 "IBM Plex Mono",
    ui-monospace,
    monospace;
  letter-spacing: 1.4px;
}
.brand small {
  font-size: 11px;
  letter-spacing: 2.2px;
  color: var(--mint);
}
.navgroup {
  margin-top: 40px;
}
.navgroup + .navgroup {
  margin-top: 26px;
}
.navlabel {
  color: #9198ae;
  font-size: 12px;
  letter-spacing: 1.2px;
  padding: 0 14px;
  margin-bottom: 10px;
}
.navitem {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border-radius: 9px;
  color: #afb5c9;
  font-size: 15px;
  text-align: left;
  padding: 12px 15px;
  margin: 3px 0;
}
.navitem:hover,
.quiet:hover,
.account:hover {
  background: #282d3e;
  color: white;
}
.navitem.active {
  background: #293d3c;
  color: var(--mint);
  font-weight: 650;
}
.navitem i {
  font: 600 12px monospace;
  margin-left: auto;
  background: #3d3956;
  color: var(--lilac);
  padding: 3px 6px;
  border-radius: 5px;
}
.account {
  margin-top: auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 16px 6px 2px;
}
.account strong,
.account small {
  display: block;
}
.account small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.account .ico:last-child {
  margin-left: auto;
  width: 15px;
}
.avatar {
  width: 39px;
  height: 39px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #343447;
  color: #c6bbef;
}
.avatar.mint {
  color: var(--mint);
  background: #2b443e;
}
.avatar.gold {
  color: var(--gold);
  background: #494033;
}
.avatar.lilac {
  color: var(--lilac);
  background: #3b3450;
}
.pixel {
  width: 64%;
  height: 64%;
  image-rendering: pixelated;
  fill: currentColor;
}
.avatar.big {
  width: 60px;
  height: 60px;
  border-radius: 14px;
}
#top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 63px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 3.25vw, 57px);
  background: #171a26;
}
.crumb,
.top-actions,
.row,
.title-row,
.btn,
.label-icon,
.chips,
.panel-h,
.location,
.meta,
.switcher {
  display: flex;
  align-items: center;
}
.crumb {
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.crumb .ico {
  width: 14px;
}
.crumb strong {
  font-weight: 550;
  color: #dcdfec;
}
.top-actions {
  gap: 17px;
}
.top-time {
  font:
    12px/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.7px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.top-time .ico {
  width: 14px;
  color: var(--gold);
}
.mobile-only {
  display: none;
}
.btn,
.quiet,
.iconbtn {
  border-radius: 8px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn {
  justify-content: center;
  gap: 8px;
  background: var(--mint);
  color: #17382e;
  font-weight: 700;
  font-size: 14px;
  min-height: 40px;
  padding: 9px 16px;
  letter-spacing: 0.25px;
}
.btn:hover {
  background: #b7f5dd;
  transform: translateY(-1px);
}
.btn .ico,
.quiet .ico {
  width: 16px;
  height: 16px;
}
.btn.secondary {
  background: #2a3041;
  border: 1px solid #40475b;
  color: #e0e4ef;
}
.btn.secondary:hover {
  background: #343b50;
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.quiet,
.iconbtn {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  font-size: 14px;
}
.iconbtn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
}
.iconbtn:hover {
  background: #33394a;
}
main {
  max-width: 1536px;
  margin: 0 auto;
  padding: 32px clamp(20px, 3.25vw, 57px) 60px;
  outline: none;
}
.title-row,
.panel-h {
  justify-content: space-between;
  gap: 12px;
}
.title-row {
  margin-bottom: 22px;
}
.title-row h1 {
  font-size: clamp(26px, 2.3vw, 35px);
  letter-spacing: 1px;
}
.sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-top: 6px;
}
.hero {
  min-height: 265px;
  border: 1px solid #48475a;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: #2b2c53 url("/town.webp") center 55% / cover no-repeat;
  display: flex;
  align-items: center;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(14, 20, 39, 0.93) 0%,
    rgba(21, 23, 49, 0.75) 28%,
    rgba(30, 27, 51, 0.19) 60%,
    transparent 82%
  );
  z-index: -1;
}
.hero-copy {
  padding: 29px clamp(22px, 2.6vw, 42px);
  max-width: 670px;
}
.eyebrow {
  color: var(--mint);
  font-size: 12px;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e0d9fb;
}
.hero .eyebrow .ico {
  width: 15px;
  height: 15px;
}
.hero h2 {
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 1px;
  margin: 12px 0 9px;
}
.hero h2 em {
  color: #adebd1;
  font-style: normal;
}
.hero p {
  color: #e1dfeb;
  font-size: 15px;
  line-height: 1.7;
}
.hero .btn {
  margin-top: 19px;
}
.location {
  position: absolute;
  bottom: 15px;
  right: 16px;
  color: #f2e8ff;
  gap: 6px;
  background: #232039b8;
  border: 1px solid #a79cbb6b;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
}
.location .ico {
  width: 13px;
  height: 13px;
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(245px, 1fr);
  gap: 20px;
  margin-top: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px 23px;
  min-width: 0;
}
.panel-h {
  margin-bottom: 20px;
}
.panel h2,
.section-title {
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0.5px;
}
.label-icon {
  gap: 10px;
}
.label-icon > .ico {
  color: var(--lilac);
}
.tag,
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  border-radius: 5px;
  padding: 4px 8px;
  line-height: 1.3;
}
.tag {
  background: #2c3143;
  color: #c9cfe1;
}
.status {
  color: #c2b6ed;
  background: #343047;
}
.status.mint {
  background: #263f38;
  color: var(--mint);
}
.status.gold {
  color: var(--gold);
  background: #40382f;
}
.status .ico {
  width: 12px;
  height: 12px;
}
.demo-step {
  display: flex;
  gap: 13px;
  position: relative;
  align-items: flex-start;
  padding: 4px 0 16px;
}
.demo-step + .demo-step {
  padding-bottom: 0;
}
.demo-step:first-child:after {
  content: "";
  position: absolute;
  left: 19px;
  top: 46px;
  bottom: 3px;
  border-left: 1px dashed #5a5770;
}
.demo-step h3,
.card h3 {
  font-size: 16px;
  font-weight: 680;
}
.demo-step p,
.card p {
  font-size: 15px;
  color: #bbc1d1;
  line-height: 1.7;
  margin-top: 5px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.demo-foot,
.panel-foot {
  margin-top: 19px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.demo-foot .meta {
  font-size: 13px;
}
.meta {
  color: var(--muted);
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
}
.meta .ico {
  width: 15px;
  height: 15px;
}
.agentplate {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #252a38;
  background-image: radial-gradient(#434a5c 1px, transparent 1px);
  background-size: 9px 9px;
  border: 1px solid #3a4051;
  padding: 17px;
  border-radius: 9px;
}
.agentplate strong {
  display: block;
  font-size: 19px;
  margin-bottom: 6px;
}
.agentplate small {
  color: #c3c9d8;
}
.agent-text {
  margin: 14px 0;
  color: #bac1d2;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.full {
  width: 100%;
}
.chips {
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.row {
  gap: 9px;
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #222636;
  padding: 17px;
}
.card .meta {
  margin-bottom: 8px;
}
.empty {
  text-align: center;
  padding: 35px 12px;
}
.empty > .ico {
  width: 29px;
  height: 29px;
  color: var(--lilac);
  margin-bottom: 12px;
}
.empty strong,
.empty p {
  display: block;
}
.empty p {
  font-size: 15px;
  color: var(--muted);
  margin: 8px 0 14px;
  line-height: 1.7;
}
.empty .btn {
  margin: 0 auto;
}
.form {
  display: grid;
  gap: 17px;
}
.form label {
  display: grid;
  gap: 8px;
  color: #dce0ee;
  font-size: 14px;
  font-weight: 600;
}
.form small {
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
input,
textarea,
select {
  min-width: 0;
  background: #141825;
  border: 1px solid #41475a;
  color: #f0f1f6;
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
  font-size: 16px;
}
textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #9098ad;
}
.form .toggle {
  display: flex;
  align-items: center;
  gap: 9px;
}
.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
}
.narrow {
  max-width: 730px;
}
.formerr {
  color: #ffb7ad;
  font-size: 14px;
}
.formerr:empty {
  display: none;
}
dialog {
  border: 1px solid #4b5268;
  background: #202535;
  color: inherit;
  border-radius: 16px;
  padding: 24px;
  width: min(450px, calc(100vw - 28px));
  box-shadow: 0 24px 100px #05071188;
}
dialog::backdrop {
  background: #090b15b5;
  backdrop-filter: blur(4px);
}
dialog .panel-h {
  margin-bottom: 14px;
}
dialog .sub {
  margin: 0 0 18px;
}
.room-list {
  padding: 0;
  overflow: hidden;
}
.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  width: 100%;
  border-bottom: 1px solid var(--line);
}
.room-item:hover,
.room-item.sel {
  background: #2b3042;
}
.room-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.room-item b,
.room-item small {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.room-item small {
  color: var(--muted);
  margin-top: 5px;
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2.5fr);
  gap: 14px;
}
.chat {
  display: flex;
  flex-direction: column;
  min-height: 415px;
  height: min(650px, 70dvh);
}
.chat .panel-h {
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.history {
  overflow: auto;
  flex: 1;
  padding: 14px 0;
  overscroll-behavior: contain;
}
.bubble {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin: 9px 0;
}
.bubble.mine {
  align-items: flex-end;
}
.bubble span {
  font-size: 15px;
  background: #32384b;
  border-radius: 10px;
  padding: 8px 13px;
  line-height: 1.65;
  max-width: 85%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.mine span {
  background: #34554c;
  color: #e3fff3;
}
.bubble time {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 4px 0;
}
.compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}
.compose textarea {
  min-height: 44px;
  max-height: 135px;
  height: 45px;
}
.compose .btn {
  height: 44px;
}
.earlier {
  display: block;
  margin: 0 auto;
  color: var(--mint);
  font-size: 13px;
}
.choice {
  display: grid;
  gap: 10px;
}
.choice .btn {
  justify-content: flex-start;
}
.mobile-shade {
  display: none;
}
#toast:not(:empty) {
  position: fixed;
  z-index: 20;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #daeadd;
  color: #143c2b;
  padding: 11px 19px;
  border-radius: 9px;
  box-shadow: 0 4px 24px #0005;
  max-width: 92vw;
  font-size: 14px;
}
.sidebar-town {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  margin: 27px 2px -14px;
  color: #c1c7d8;
  font-size: 13px;
}
.sidebar-town span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-town .ico {
  width: 15px;
}
.sidebar-town .ico:last-child {
  margin-left: auto;
}
.spread {
  justify-content: space-between;
}
.detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.home-rooms {
  margin-top: 20px;
}
.form .hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.subtle {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
@media (min-width: 1600px) {
  #side {
    width: 250px;
  }
  .hero {
    min-height: 320px;
  }
}
@media (max-width: 1000px) {
  #side {
    width: 190px;
    padding-inline: 12px;
  }
  .cols {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
    gap: 14px;
  }
  .panel {
    padding: 17px;
  }
  .demo-foot {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .hero {
    min-height: 245px;
  }
  .chat-layout {
    grid-template-columns: 165px 1fr;
  }
}
@media (max-width: 760px) {
  #side {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.18s;
    width: 235px;
  }
  body.menu #side {
    transform: translateX(0);
  }
  body.menu .mobile-shade {
    display: block;
    position: fixed;
    inset: 0;
    background: #080a1688;
    z-index: 4;
  }
  .mobile-only {
    display: inline-flex;
  }
  #top {
    min-height: 55px;
    padding: 0 15px;
  }
  .crumb {
    gap: 7px;
  }
  .top-actions {
    gap: 8px;
  }
  .top-time {
    display: none;
  }
  main {
    padding: 23px 15px 40px;
  }
  .title-row {
    margin-bottom: 15px;
  }
  .hero {
    min-height: 250px;
  }
  .hero-copy {
    padding: 22px;
    max-width: 100%;
  }
  .hero:before {
    background: linear-gradient(90deg, #12162be8, #1a2036a8 56%, #18192d33);
  }
  .hero h2 {
    font-size: 33px;
  }
  .hero p {
    font-size: 14px;
    max-width: 255px;
  }
  .hero .location {
    font-size: 11px;
    bottom: 10px;
    right: 10px;
  }
  .cols {
    grid-template-columns: 1fr;
    margin-top: 15px;
  }
  .panel {
    padding: 18px;
  }
  .brand {
    margin-top: 12px;
  }
  .title-row .btn {
    font-size: 13px;
    padding: 8px 11px;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .room-list {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  .room-item {
    width: auto;
    min-width: 160px;
    max-width: 230px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .chat {
    height: 57dvh;
  }
  .demo-foot {
    flex-wrap: nowrap;
  }
  .status {
    white-space: nowrap;
  }
  .panel h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 761px) {
  #top .mobile-only {
    display: none;
  }
}
@media (max-width: 760px) {
  #side {
    visibility: hidden;
  }
  body.menu #side {
    visibility: visible;
  }
}
