:root {
  color-scheme: light;
  --ink: #163b3a;
  --muted: #607673;
  --green: #167464;
  --line: #dfe8e3;
  --paper: #f4f7f2;
  --white: #fff;
  --accent: #dceacf;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.5 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  font-weight: 650;
  color: var(--ink);
  background: #e7eee8;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-right: auto;
}
.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--muted);
}
.badge {
  padding: 8px 12px;
  font-size: 12px;
  background: var(--accent);
  border-radius: 30px;
}
.quiet {
  background: transparent;
  padding: 8px;
}
.primary {
  background: var(--green);
  color: white;
}
.secondary {
  border: 1px solid var(--green);
  background: white;
  color: var(--green);
}
.danger {
  background: #f8e7e1;
  color: #a13520;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 40px 32px 80px;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 12px 0 14px;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
  margin: 28px 0 12px;
}
p {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 640px;
}
.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 28px #294b3c05;
}
.login {
  max-width: 430px;
  margin: 50px auto 100px;
}
.login h1 {
  font-size: 44px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.intro p {
  margin-bottom: 30px;
}
nav {
  display: flex;
  gap: 6px;
  margin: 12px 0 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.tab {
  background: transparent;
  color: var(--muted);
}
.tab.active {
  background: var(--accent);
  color: var(--ink);
}
.commands-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(380px, 1.3fr);
  gap: 28px;
  align-items: start;
}
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 18px;
}
input:not([type="checkbox"]):not([type="range"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfded6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  margin-top: 7px;
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 75px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #16746412;
}
small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 7px;
}
form > .primary {
  margin-top: 18px;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  background: var(--accent);
  font-size: 12px;
  margin-right: 6px;
}
.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
}
.checkbox input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.search {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.intent-card {
  width: 100%;
  padding: 20px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  font-weight: 400;
  transition: border 0.15s;
}
.intent-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.intent-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 7px;
}
.intent-card .phrases {
  display: block;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.intent-card .label {
  display: inline-block;
  border-radius: 5px;
  background: #edf3ec;
  font-size: 11px;
  padding: 3px 6px;
  margin-top: 10px;
}
.off {
  opacity: 0.55;
}
.empty {
  padding: 22px;
  color: var(--muted);
  border: 1px dashed #cbdacf;
  border-radius: 12px;
  font-size: 14px;
}
.media-item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.media-item:last-child {
  border: 0;
}
.media-item strong {
  display: block;
}
.media-item small {
  margin-top: 4px;
}
.recording {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.result {
  background: #edf5e9;
  padding: 16px;
  border-radius: 12px;
  margin-top: 24px;
  white-space: pre-line;
}
audio {
  max-width: 100%;
  width: 100%;
  margin-top: 16px;
}
.stat {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.stat span {
  color: var(--muted);
}
.turn {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.turn strong {
  display: block;
}
#notice {
  position: fixed;
  right: 28px;
  bottom: 28px;
  padding: 17px 23px;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  max-width: 460px;
  box-shadow: 0 10px 40px #0002;
  z-index: 10;
}
#notice.error {
  background: #a83b27;
}
footer {
  padding: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
input[type="range"] {
  display: block;
  width: 100%;
  accent-color: var(--green);
  margin-top: 12px;
}
output {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 780px) {
  header {
    padding: 18px 20px;
  }
  .brand {
    font-size: 22px;
  }
  .badge {
    font-size: 10px;
  }
  main {
    padding: 26px 18px 60px;
  }
  h1 {
    font-size: 28px;
  }
  .intro {
    display: block;
  }
  .intro > .primary {
    margin-bottom: 24px;
  }
  .commands-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 22px;
  }
  nav {
    overflow-x: auto;
  }
  .tab {
    white-space: nowrap;
    padding: 10px 12px;
  }
  .login {
    margin: 26px auto 50px;
  }
  #notice {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }
}
