:root {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: #222d29;
  background: #f6f5ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  width: min(1200px, 92vw);
  margin: auto;
}
header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d6d8cf;
}
.brand,
.provider,
.controls,
.live,
.asidehead {
  display: flex;
  align-items: center;
}
.brand {
  gap: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
}
.brandmark {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #213f33;
  color: #e6f4ad;
  width: 36px;
  height: 36px;
  font-size: 19px;
  letter-spacing: -4px;
  padding-right: 4px;
}
.provider,
small,
#count,
#time {
  font:
    11px/1.2 ui-monospace,
    monospace;
  letter-spacing: 0.09em;
}
.provider {
  gap: 9px;
  color: #5d695f;
}
.provider i,
.live i {
  width: 6px;
  height: 6px;
  background: #92a966;
  border-radius: 50%;
}
main {
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(278px, 1fr);
  gap: 22px;
  align-items: stretch;
}
.room,
aside {
  background: #fffefa;
  border: 1px solid #d7dad1;
  border-radius: 20px;
  overflow: hidden;
}
.viewport {
  height: clamp(400px, 65vh, 670px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 67% 21%, #edf0d9 0, transparent 53%),
    linear-gradient(115deg, #829380 0, #c5cfb3 48%, #8d9c85 100%);
}
#stage,
#stage canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.live {
  position: absolute;
  top: 20px;
  left: 20px;
  border: 1px solid #ffffff59;
  border-radius: 30px;
  background: #f8f9f0df;
  padding: 8px 13px;
  gap: 8px;
  font-size: 12px;
}
.live i {
  background: #487351;
}
.name {
  position: absolute;
  left: 26px;
  bottom: 20px;
  color: white;
  text-shadow: 0 1px 10px #35413880;
}
.name small {
  letter-spacing: 0.12em;
}
.name h1 {
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.1;
  margin: 7px 0 0;
  font-weight: 550;
}
.subtitle {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 66%;
  padding: 8px 12px;
  border-radius: 9px;
  background: #15231fdc;
  color: white;
  font-size: 14px;
  line-height: 1.55;
  max-height: 32%;
  overflow: auto;
}
.viewport:has(.subtitle:not([hidden])) .name {
  opacity: 0;
}
.controls {
  padding: 18px 20px;
  gap: 10px;
}
.controls #time {
  margin-left: auto;
  color: #57645c;
  font-variant-numeric: tabular-nums;
}
button,
input {
  font: inherit;
}
button {
  border: 1px solid #d5d9cc;
  border-radius: 100px;
  background: #fffefa;
  color: inherit;
  padding: 11px 16px;
  font-size: 14px;
  cursor: pointer;
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
button:disabled {
  color: #858b82;
  cursor: default;
}
.primary {
  background: #234937;
  color: white;
  border-color: transparent;
}
.primary.on {
  background: #753f35;
}
aside {
  padding: 22px;
  display: flex;
  min-height: 0;
  flex-direction: column;
  height: 100%;
  max-height: calc(clamp(400px, 65vh, 670px) + 83px);
}
.asidehead {
  justify-content: space-between;
  border-bottom: 1px solid #e0e3d8;
  padding-bottom: 18px;
}
.asidehead h2 {
  font-size: 18px;
  margin: 0;
}
.asidehead span {
  color: #697367;
}
#thread {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 0;
  scrollbar-width: thin;
}
#welcome {
  padding: 26px 0;
}
#welcome h3 {
  font-size: 23px;
  font-weight: 550;
  margin: 0 0 8px;
}
#welcome p,
#notice {
  font-size: 13px;
  color: #616e64;
  line-height: 1.6;
}
.suggest {
  display: block;
  margin: 9px 0;
  border-radius: 9px;
  background: #f4f5eb;
  font-size: 13px;
}
.suggest b {
  font-weight: 400;
  margin-left: 16px;
}
.entry {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.entry.user {
  align-items: flex-end;
}
.entry small {
  color: #637265;
  margin: 0 4px 5px;
}
.entry p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 9px 13px;
  border-radius: 12px;
  background: #edf3e5;
  line-height: 1.6;
  font-size: 14px;
  max-width: 96%;
}
.entry.user p {
  background: #efece5;
}
form {
  margin-top: 10px;
  border: 1px solid #cfd5c8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 6px;
  background: white;
}
input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px;
  font-size: 14px;
}
form button {
  background: #234937;
  border: 0;
  color: white;
  font-size: 22px;
  width: 36px;
  height: 36px;
  padding: 0;
}
#notice {
  font-size: 11px;
  margin-top: 8px;
  min-height: 18px;
}
.sr {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
:focus-visible {
  outline: 2px solid #52734f;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  header,
  main {
    width: 94vw;
  }
  header {
    height: 60px;
  }
  main {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px auto;
  }
  .viewport {
    height: clamp(300px, 48svh, 470px);
  }
  aside {
    min-height: 280px;
    max-height: 460px;
    padding: 16px;
  }
  .controls {
    padding: 12px;
  }
  #welcome {
    padding: 8px 0;
  }
  #welcome h3 {
    font-size: 19px;
  }
  .suggest {
    display: inline-block;
    margin: 3px 4px 3px 0;
    padding: 8px 11px;
  }
  .live {
    top: 12px;
    left: 12px;
  }
}

.engine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
}
.engine select {
  font: inherit;
  color: inherit;
  background: #f4f5ed;
  border: 1px solid #d5d9cc;
  border-radius: 6px;
  padding: 5px;
}
