* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  --bg: #101314;
  --panel: #191d1e;
  --inset: #111516;
  --fg: #f0f4f0;
  --dim: #abb5b0;
  --line: #333d39;
  --accent: #94edc6;
  --ink: #0b2019;
  --radius: 18px;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f4ef;
  --panel: #fff;
  --inset: #f6f8f4;
  --fg: #17231f;
  --dim: #53615a;
  --line: #c7d3ca;
  --accent: #227856;
  --ink: #fff;
}
html[data-accent="iris"] {
  --accent: #c7acf9;
  --ink: #261c38;
}
html[data-accent="peach"] {
  --accent: #ffb598;
  --ink: #32190d;
}
html[data-accent="azure"] {
  --accent: #9bcff6;
  --ink: #122835;
}
html[data-theme="light"][data-accent="iris"] {
  --accent: #71519b;
  --ink: white;
}
html[data-theme="light"][data-accent="peach"] {
  --accent: #9a482b;
  --ink: white;
}
html[data-theme="light"][data-accent="azure"] {
  --accent: #27688f;
  --ink: white;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.55 "Inter",
    system-ui,
    sans-serif;
}
header {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--fg);
  font-size: 34px;
  letter-spacing: -2px;
  font-weight: 760;
  line-height: 1;
}
.symbol {
  width: 31px;
  height: 31px;
  margin-right: 9px;
  background: repeating-linear-gradient(
    118deg,
    var(--accent) 0 5px,
    transparent 5px 8px
  );
  border-radius: 50%;
}
.dot {
  color: var(--accent);
}
.appearance,
.row,
.actions,
.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.appearance label {
  font-size: 12px;
  color: var(--dim);
}
select,
input,
textarea,
button {
  font: inherit;
}
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  color: var(--fg);
  padding: 10px 12px;
  max-width: 100%;
}
.appearance select {
  padding: 5px;
  font-size: 13px;
}
button,
.filebtn {
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--fg);
  background: var(--panel);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
}
button:hover,
.filebtn:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: var(--ink);
  border-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
main {
  width: min(1260px, 100%);
  margin: auto;
  padding: clamp(20px, 4vw, 64px);
}
.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: 550px;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
  margin: 3vh auto;
  max-width: 1000px;
}
.cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #142420;
  color: #e6f6ed;
  position: relative;
  padding: clamp(24px, 4vw, 60px);
}
.cover h1 {
  font-size: clamp(44px, 5.7vw, 86px);
  letter-spacing: -0.075em;
  line-height: 0.98;
  margin: auto 0 0;
  z-index: 1;
}
.cover small {
  color: #b2c8bc;
  letter-spacing: 0.08em;
}
.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3%;
  height: 172px;
  margin: 38px 0 10px;
  transform: rotate(-9deg);
  opacity: 0.86;
}
.wave i {
  width: 4%;
  background: var(--accent);
  border-radius: 100px;
  height: 30%;
}
.wave i:nth-child(3n) {
  height: 66%;
}
.wave i:nth-child(4n) {
  height: 87%;
}
.wave i:nth-child(5n) {
  height: 48%;
}
.wave i:nth-child(7n) {
  height: 99%;
}
.entry {
  padding: clamp(22px, 4vw, 48px);
  align-self: center;
  width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0 0 14px;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(34px, 4vw, 56px);
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}
p,
.muted,
small {
  color: var(--dim);
}
form.stack,
.stack {
  display: grid;
  gap: 14px;
}
.stack label {
  display: grid;
  gap: 5px;
  font-size: 14px;
}
.stack label.check {
  display: flex;
  align-items: center;
}
.stack code,
code {
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 14px;
}
.shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 60px);
}
aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
aside strong {
  padding: 12px 12px 21px;
}
aside button {
  text-align: left;
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
aside button.active {
  background: var(--panel);
  border-color: var(--line);
  color: var(--accent);
}
.content > h1 {
  margin: 12px 0 30px;
}
.card {
  padding: clamp(18px, 3vw, 32px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.item:first-of-type {
  border-top: 0;
}
.item span {
  overflow-wrap: anywhere;
}
.actions {
  justify-content: space-between;
}
.card h2 {
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.avatar {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--accent);
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  font-weight: bold;
}
.chat {
  max-height: 45vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.bubble {
  width: fit-content;
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--inset);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mine {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
}
.bubble small {
  display: block;
  font-size: 11px;
}
.compose textarea {
  width: 100%;
  resize: vertical;
}
.filebtn {
  font-size: 14px;
}
.filebtn input {
  display: none;
}
#notice {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 9px;
  z-index: 5;
  max-width: 95vw;
}
dialog {
  max-width: min(530px, 94vw);
  width: 100%;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
}
dialog::backdrop {
  background: #0009;
}
.dialog-head {
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  main {
    padding: 16px;
  }
  .welcome {
    grid-template-columns: 1fr;
    min-height: 0;
    margin: 8px auto;
  }
  .cover {
    min-height: 140px;
  }
  .cover h1 {
    font-size: 36px;
    max-width: 60%;
  }
  .wave {
    position: absolute;
    right: 0;
    bottom: 10px;
    width: 38%;
    height: 100px;
  }
  .shell {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  aside {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  aside strong {
    padding: 6px;
  }
  .appearance label {
    display: grid;
  }
  .content > h1 {
    margin: 16px 0;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  header {
    padding: 10px 16px;
  }
}

#tracks audio,
#tracks video {
  display: block;
  max-width: 100%;
  margin: 6px 0 16px;
}
#tracks video {
  width: 100%;
  border-radius: 10px;
  background: #111;
}
