:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #183632;
  background: #f6f4ed;
  --green: #173b37;
  --muted: #69746b;
  --line: #dedfd4;
  --accent: #e7b979;
  --paper: #fffef9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding-bottom: 210px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  padding: 10px 15px;
  color: var(--green);
}
button:hover {
  background: #eeefe4;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  color: inherit;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
header {
  height: 90px;
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 1260px;
  padding: 0 40px;
  margin: auto;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 31px;
  font-weight: 760;
  letter-spacing: -1.5px;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand span {
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 450;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 8px;
  margin: auto;
}
nav button {
  border-color: transparent;
  background: transparent;
  font-size: 14px;
}
nav button.active {
  background: var(--green);
  color: white;
}
.private-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
main {
  max-width: 1180px;
  margin: 52px auto;
  padding: 0 28px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.1px;
  font-weight: 700;
  color: #74826a;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 580;
  letter-spacing: -1.6px;
  line-height: 1.12;
  margin: 0 0 14px;
}
h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
p {
  line-height: 1.7;
}
.muted,
.sub {
  color: var(--muted);
  font-size: 14px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.section-head p {
  margin: 4px 0;
}
.badge {
  font-size: 11px;
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  background: #e7eddf;
  color: #486247;
  margin-right: 5px;
}
.badge.warning {
  background: #f7ead2;
  color: #815b27;
}
.empty {
  border: 1px dashed #bfc7b6;
  border-radius: 15px;
  padding: 40px;
  margin: 25px 0;
  background: #eeefe4;
}
.empty h2 {
  margin-top: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 244px;
}
.card .show {
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 650;
  color: #74826a;
  text-transform: uppercase;
}
.card h2 {
  margin: 0;
  line-height: 1.35;
}
.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.card-footer button {
  font-size: 13px;
}
.progress {
  height: 3px;
  background: #e9ecdf;
  border-radius: 3px;
}
.progress span {
  display: block;
  height: 100%;
  background: #78927b;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
select,
input[type="search"],
input[type="date"],
input[type="password"],
input[type="number"] {
  border: 1px solid #cad1c2;
  border-radius: 9px;
  padding: 12px;
  background: var(--paper);
  color: var(--green);
  max-width: 100%;
}
input[type="search"] {
  flex: 1;
  min-width: 180px;
}
.search-form {
  display: flex;
  gap: 10px;
}
.search-result {
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
}
.search-result p {
  margin: 10px 0;
}
.search-result button {
  font-size: 13px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  gap: 45px;
}
.summary {
  font-size: 18px;
  line-height: 1.8;
}
.highlights {
  list-style: none;
  padding: 0;
}
.highlights li {
  margin: 12px 0;
  line-height: 1.7;
}
.time-link {
  border: 0;
  padding: 2px 7px;
  background: #e8eddf;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  margin-right: 8px;
}
.chapters {
  list-style: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.chapters li + li {
  border-top: 1px solid var(--line);
}
.chapters button {
  display: flex;
  text-align: left;
  gap: 15px;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 17px;
  background: var(--paper);
  font-size: 14px;
}
.chapters .current button {
  background: #e4ebdd;
}
.chapters time {
  font-size: 12px;
  color: var(--muted);
  min-width: 44px;
}
.transcript {
  max-height: 600px;
  overflow: auto;
  margin-top: 20px;
}
.transcript p {
  display: flex;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.transcript p.current {
  background: #e8eddf;
}
.transcript button {
  flex-shrink: 0;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.settings {
  max-width: 740px;
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.setting strong {
  display: block;
  font-size: 15px;
}
.setting p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0;
}
.setting select {
  max-width: 210px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
td,
th {
  padding: 17px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
}
.notice {
  background: #eeeade;
  border-left: 3px solid #bca173;
  padding: 13px 18px;
  font-size: 14px;
  line-height: 1.6;
}
.login {
  max-width: 430px;
  margin: 10vh auto;
}
.login label {
  display: block;
  font-size: 13px;
}
.login input {
  width: 100%;
  margin: 10px 0 16px;
}
.login button {
  width: 100%;
}
#loginError {
  color: #9b4438;
  font-size: 13px;
}
#player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green);
  color: #fffef9;
  z-index: 10;
  padding: 21px max(25px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px 30px;
  align-items: center;
  border-top: 3px solid #e7b979;
}
#player[hidden] {
  display: none;
}
.player-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}
.player-info span {
  font-size: 11px;
  color: #c3d1c5;
}
.player-info strong {
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.transport {
  display: flex;
  gap: 7px;
  align-items: center;
}
.transport button,
.player-actions button {
  border-color: transparent;
  background: transparent;
  color: #fffef9;
  padding: 8px;
  font-size: 13px;
}
.transport .play {
  background: #e7b979;
  color: #173b37;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.seek {
  grid-column: 1/4;
  grid-row: 2;
}
.seek input {
  width: 100%;
  accent-color: #e7b979;
  height: 4px;
}
.seek div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #c3d1c5;
  margin-top: 6px;
}
.player-actions {
  display: flex;
  justify-content: end;
  gap: 5px;
}
.player-actions button {
  font-size: 11px;
}
#toast {
  position: fixed;
  bottom: 185px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffef9;
  border: 1px solid #b5c0ae;
  box-shadow: 0 5px 25px #0002;
  padding: 14px 20px;
  border-radius: 12px;
  z-index: 20;
  max-width: 90vw;
  font-size: 14px;
}
#toast button {
  margin-left: 12px;
  padding: 5px 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 440px;
  padding: 26px;
  background: var(--paper);
  color: var(--green);
}
dialog::backdrop {
  background: #10282080;
}
.sleep-options {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}
.back-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  margin-bottom: 25px;
}
details {
  margin: 25px 0;
}
summary {
  cursor: pointer;
  font-weight: 550;
}
.boundary-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.boundary-edit input {
  width: 100px;
}
.loading {
  color: var(--muted);
  padding: 25px 0;
}
.error {
  color: #9b4438;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #d49c51;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    padding: 18px 20px;
    gap: 15px;
  }
  .brand {
    font-size: 28px;
  }
  .private-label {
    margin-left: auto;
  }
  nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin: 0;
    gap: 3px;
  }
  nav button {
    padding: 9px 12px;
    font-size: 12px;
  }
  main {
    margin-top: 30px;
    padding: 0 20px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-head {
    align-items: start;
  }
  .section-head h1 {
    font-size: 34px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 210px;
    padding: 22px;
  }
  #player {
    padding: 15px 18px calc(15px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .seek {
    grid-column: 1/3;
  }
  .player-actions {
    grid-column: 1/3;
    justify-content: center;
  }
  .transport {
    gap: 0;
  }
  .transport button {
    padding: 6px;
  }
  .player-info strong {
    max-width: 160px;
    font-size: 12px;
  }
  .player-info span {
    font-size: 10px;
  }
  #playerChapter {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search-form {
    flex-wrap: wrap;
  }
  .filters input[type="date"] {
    width: 46%;
  }
  td,
  th {
    padding: 14px 6px;
    font-size: 12px;
  }
  .setting {
    gap: 12px;
  }
  .setting select {
    max-width: 155px;
    font-size: 12px;
  }
  #toast {
    bottom: 220px;
  }
  .login {
    margin-top: 7vh;
  }
}

[hidden] {
  display: none !important;
}
.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  text-decoration: none;
  font-size: 14px;
}

progress.progress {
  width: 100%;
  border: 0;
  appearance: none;
}
progress.progress::-webkit-progress-bar {
  background: #e9ecdf;
}
progress.progress::-webkit-progress-value {
  background: #78927b;
}
