:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #2b2531;
  background: #f3eee4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 86% 6%, rgb(198 168 102 / 11%), transparent 34rem),
    #f3eee4;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topbar,
.page-heading,
.list-heading,
.form-actions,
.command-row,
.command-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 42px;
}

.brand {
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand span {
  margin-left: 8px;
  color: #827a88;
  font-size: 12px;
  font-weight: 500;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.045em;
}

h2 {
  font-size: 17px;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin-bottom: 10px;
  color: #8e7650;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.muted,
.version {
  color: #817989;
  font-size: 13px;
}

.panel {
  padding: 26px;
  border: 1px solid rgb(43 37 49 / 9%);
  border-radius: 20px;
  background: rgb(255 253 248 / 82%);
  box-shadow: 0 12px 40px rgb(43 37 49 / 5%);
}

.login-panel {
  width: min(440px, 100%);
  margin: 10vh auto 0;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #5e5665;
  font-size: 12px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e1dcd3;
  border-radius: 10px;
  outline: none;
  background: #fffefa;
  color: #2b2531;
  font-size: 14px;
}

input:focus,
textarea:focus {
  border-color: #9c8b6c;
  box-shadow: 0 0 0 3px rgb(156 139 108 / 14%);
}

input[type="file"] {
  padding: 9px;
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #28242d;
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.button:hover {
  background: #41394a;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-quiet {
  border: 1px solid #ded8ce;
  background: transparent;
  color: #4a4350;
}

.button-quiet:hover {
  background: #eee9df;
}

[hidden] {
  display: none !important;
}

.page-heading {
  align-items: end;
  margin-bottom: 24px;
}

.section-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 2px;
}

.section-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #ded8ce;
  border-radius: 10px;
  background: transparent;
  color: #5e5665;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.section-tab.active {
  border-color: #28242d;
  background: #28242d;
  color: white;
}

.version {
  padding-bottom: 4px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(290px, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 18px;
}

.editor-panel > h2 {
  margin-bottom: 20px;
}

.editor-panel form {
  margin-top: 0;
}

.check-row {
  display: flex;
  align-items: center;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.sound-preview {
  color: #817989;
  font-size: 12px;
}

.sound-preview audio {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 8px;
}

.form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.list-heading {
  align-items: end;
  margin-bottom: 18px;
}

.list-heading .muted {
  margin-top: 5px;
}

.list-heading input {
  max-width: 240px;
}

.command-list {
  display: grid;
  gap: 9px;
  max-height: 70vh;
  overflow: auto;
}

.command-row {
  align-items: flex-start;
  padding: 13px;
  border: 1px solid #ece7de;
  border-radius: 12px;
  background: #fffefa;
}

.command-details {
  min-width: 0;
}

.command-category,
.command-description {
  margin-top: 4px;
  color: #817989;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.command-name {
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.command-actions {
  flex-shrink: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.command-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.command-actions audio {
  width: min(220px, 100%);
  height: 34px;
}

.empty-list {
  padding: 24px 12px;
  color: #817989;
  font-size: 13px;
  text-align: center;
}

.status {
  min-height: 24px;
  margin-top: 18px;
  color: #527b4d;
  font-size: 13px;
}

.status[data-error="true"] {
  color: #b34f42;
}

@media (max-width: 840px) {
  .columns {
    grid-template-columns: 1fr;
  }

  .command-list {
    max-height: none;
  }
}

@media (max-width: 540px) {
  .shell {
    width: min(100% - 24px, 620px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .panel {
    padding: 19px;
  }

  .page-heading {
    display: block;
  }

  .version {
    margin-top: 14px;
  }

  .list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .list-heading input {
    max-width: none;
  }

  .command-row {
    flex-direction: column;
  }

  .command-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .command-actions audio {
    width: 100%;
  }
}
