@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-400.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-500.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-600.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-700.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/noto-serif-400.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/noto-serif-500.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  font-family: Inter, system-ui, sans-serif;
  color: #1c1f23;
  background: #f6f4ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: white;
  padding: 12px 20px;
  font-weight: 600;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: #0f766e;
}
.login {
  max-width: 440px;
  margin: 12vh auto;
  padding: 36px;
  background: white;
  border: 1px solid #e7e3da;
  border-radius: 14px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}
.dot {
  width: 10px;
  height: 10px;
  background: #dc2626;
  border-radius: 50%;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  margin-top: 28px;
}
.muted {
  color: #6b6f76;
  line-height: 1.6;
}
label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
input,
select,
textarea {
  padding: 11px;
  border: 1px solid #c9c3b6;
  border-radius: 8px;
  background: white;
  color: #1c1f23;
}
input:focus-visible,
button:focus-visible {
  outline: 3px solid #99d5ca;
  outline-offset: 3px;
}
#error {
  color: #b91c1c;
  min-height: 20px;
}
.login button {
  width: 100%;
}
.small-screen {
  display: none;
}
@media (max-width: 760px) {
  .small-screen {
    display: block;
    margin: 0;
    padding: 10px 16px;
    background: #fff4e5;
    color: #b45309;
    font-size: 14px;
  }
}
a.button {
  display: inline-block;
  border-radius: 8px;
  padding: 12px 20px;
  text-decoration: none;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: white;
  border-bottom: 1px solid #e7e3da;
  padding: 18px 28px;
}
.topbar nav {
  display: flex;
  gap: 5px;
  margin: auto;
}
.secondary {
  background: white;
  color: #1c1f23;
  border: 1px solid #e7e3da;
  font-weight: 500;
}
.topbar nav button {
  background: #f1eee7;
  color: #6b6f76;
  padding: 10px 14px;
}
.topbar nav button.active {
  background: #0f766e;
  color: white;
}
.studio-layout,
.admin-layout {
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 24px;
}
.statusline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6b6f76;
  font-size: 14px;
}
progress {
  width: 100%;
  height: 7px;
  accent-color: #0f766e;
  margin: 14px 0 26px;
}
.reading-card {
  padding: clamp(16px, 3vw, 32px);
  background: white;
  border: 1px solid #e7e3da;
  border-radius: 14px;
  min-height: 200px;
}
.sentence {
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(22px, 3vw, 32px);
  overflow-wrap: anywhere;
  line-height: 1.6;
  max-width: 68ch;
  margin: 22px 0;
}
.sentence.small {
  font-size: 22px;
}
.recording-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, max-content);
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f1eee7;
  color: #6b6f76;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.state-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
}
.state-wait {
  background: #fff4e5;
  color: #b45309;
}
.state-wait .state-dot {
  flex: none;
  background: #f59e0b;
}
.state-recording {
  background: #fdecec;
  color: #b91c1c;
}
.state-recording .state-dot {
  flex: none;
  background: #dc2626;
  animation: blink 1s infinite;
}
.state-done {
  background: #e8f5ec;
  color: #15803d;
}
.state-done .state-dot {
  flex: none;
  background: #16a34a;
}
.record-button {
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 2px solid #15803d;
  border-radius: 999px;
  color: white;
  background: #15803d;
  font-size: 18px;
  font-weight: 700;
}
.record-button.recording {
  border-color: #dc2626;
  background: #dc2626;
  color: white;
  animation: pulse 1.2s infinite;
}
.reading-card.is-recording {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px #fdecec;
}
.take-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}
.take-actions button {
  flex: 1 1 auto;
  min-height: 44px;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(220 38 38 / 50%);
  }
  70% {
    box-shadow: 0 0 0 14px rgb(220 38 38 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(220 38 38 / 0%);
  }
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
kbd {
  font-size: 11px;
  font-weight: 400;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: 8px;
  opacity: 0.75;
}
.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.panel {
  padding: 22px;
  background: white;
  border: 1px solid #e7e3da;
  border-radius: 12px;
}
.panel h2 {
  font-size: 16px;
  margin: 0 0 16px;
}
.panel label {
  margin: 10px 0;
}
.panel select {
  width: 100%;
  margin-bottom: 12px;
}
meter {
  width: 100%;
  height: 18px;
  margin-top: 16px;
}
canvas {
  width: 100%;
  height: 90px;
  display: block;
  margin-bottom: 24px;
}
.warning {
  color: #b45309;
}
.danger,
#notice {
  color: #b91c1c;
}
.good {
  color: #15803d;
}
.chip {
  display: inline-block;
  padding: 6px 10px;
  margin: 4px 4px 4px 0;
  border-radius: 7px;
  background: #f1eee7;
  font-size: 13px;
}
dialog {
  max-width: 560px;
  width: 90%;
  border: 1px solid #e7e3da;
  border-radius: 14px;
  padding: 28px;
}
dialog::backdrop {
  background: #1c1f2355;
}
dialog h2 {
  margin-top: 0;
}
dialog textarea {
  width: 100%;
}
.filters {
  display: flex;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
}
.filters label {
  margin: 0;
}
.admin-layout section[hidden] {
  display: none;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
.table th,
.table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #e7e3da;
}
.table th {
  font-size: 13px;
  color: #6b6f76;
}
.table td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}
.review-actions {
  display: flex;
  gap: 12px;
  margin: 22px 0;
}
.review-actions .approve {
  background: #15803d;
}
.review-actions .reject {
  background: #dc2626;
}
.report-item {
  padding: 18px 0;
  border-bottom: 1px solid #e7e3da;
}
.report-item button {
  margin: 8px 8px 0 0;
}
audio {
  width: 100%;
  margin: 16px 0;
}
.alert {
  padding: 14px;
  background: #fdecec;
  color: #b91c1c;
  border-radius: 8px;
  margin: 18px 0;
}
.chip.danger {
  background: #fdecec;
}
.chip.warning {
  background: #fff4e5;
}
.chip.good {
  background: #e8f5ec;
}
#waveform {
  cursor: pointer;
}
.sentence-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
#history-note {
  flex: 1;
  text-align: center;
  font-size: 14px;
}
.player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -10px 0 24px;
}
.player[hidden] {
  display: none;
}
.mini-player .play {
  width: 48px;
  padding: 10px 0;
}
.player input[type="range"] {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  accent-color: #0f766e;
}
.time,
#player-time {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.noise-line {
  margin: 12px 0 0;
  font-size: 14px;
}
.noise-good {
  color: #15803d;
  font-weight: 600;
}
.noise-fair {
  color: #b45309;
  font-weight: 600;
}
.noise-loud {
  color: #b91c1c;
  font-weight: 600;
}
#mic-status {
  min-height: 1.6em;
  margin: 8px 0 0;
  font-size: 14px;
}
#mic-status[data-kind="error"],
#mic-status[data-kind="silent"] {
  color: #b91c1c;
}
.panel.incoming {
  margin-bottom: 20px;
}
.account-layout {
  display: grid;
  gap: 20px;
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 24px;
}
.account-layout h1 {
  margin: 0;
}
.topbar .back {
  margin-right: auto;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.stat {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px;
  background: white;
  border: 1px solid #e7e3da;
  border-radius: 12px;
}
.stat-label {
  color: #6b6f76;
  font-size: 14px;
}
.stat strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.corpus-line {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.corpus-line progress {
  margin: 4px 0 0;
}
.take-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.take-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid #e7e3da;
}
.take-main {
  flex: 1;
  min-width: 0;
}
.take-meta {
  font-size: 13px;
}
.take-text {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  margin: 6px 0;
}
.mini-player {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    margin: 0;
  }
  .studio-layout,
  .admin-layout,
  .account-layout {
    padding: 0 16px;
  }
  .panels {
    grid-template-columns: 1fr;
  }
  .take-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .recording-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .studio-layout .statusline,
  .sentence-nav {
    flex-wrap: wrap;
    gap: 8px;
  }
  #history-note {
    order: 1;
    flex-basis: 100%;
  }
  .take-actions #save {
    flex-basis: 100%;
  }
}
