:root {
  --paper:#f5f4ef;
  --panel:#fffefa;
  --ink:#202d2b;
  --muted:#69726c;
  --line:#dce0d7;
  --accent:#176a5b;
  --accent-dark:#0f5145;
  --accent-soft:#e9f2eb;
  --gold:#ae7018;
  --gold-soft:#fff1d5;
  --danger:#a63e32;
  --radius:12px;
  --shadow:0 4px 18px #263e2b09;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:14px;
  line-height:1.5
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

body.has-player {
  padding-bottom:124px
}

button,input,select,textarea {
  font:inherit
}

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}

button {
  cursor:pointer
}

button:disabled {
  cursor:default;
  opacity:.5
}

button,a {
  touch-action:manipulation
}

button {
  border:1px solid var(--line);
  border-radius:7px;
  padding:8px 12px;
  color:var(--ink);
  background:var(--panel);
  transition:background .12s,border-color .12s
}

button:hover:not(:disabled) {
  background:#edf0e8;
  border-color:#bec7bb
}

a {
  color:var(--accent);
  text-decoration:none
}

a:hover {
  text-decoration:underline
}

input,select,textarea {
  border:1px solid #cbd2c7;
  border-radius:7px;
  padding:9px 11px;
  background:var(--panel);
  color:var(--ink);
  min-width:0
}

input::placeholder,textarea::placeholder {
  color:#7c857f
}

input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible {
  outline:3px solid #94bdab;
  outline-offset:3px
}

textarea {
  resize:vertical;
  min-height:95px;
  width:100%
}

h1,h2,h3,p {
  margin-top:0
}

h1 {
  font-size:32px;
  letter-spacing:-1.1px;
  line-height:1.15;
  margin-bottom:12px
}

h2 {
  font-size:22px;
  letter-spacing:-.5px;
  line-height:1.3;
  margin-bottom:10px
}

h3 {
  font-size:15px;
  line-height:1.4;
  margin-bottom:9px
}

p {
  margin-bottom:14px
}

.muted {
  color:var(--muted)
}

.small {
  font-size:12px
}

.eyebrow {
  font-size:10px;
  font-weight:750;
  letter-spacing:1.6px;
  color:var(--accent)
}

.primary {
  background:var(--accent);
  color:#fff;
  border-color:var(--accent)
}

.primary:hover:not(:disabled) {
  background:var(--accent-dark);
  border-color:var(--accent-dark)
}

.quiet {
  background:transparent;
  border-color:transparent
}

.icon-button {
  display:inline-grid;
  place-items:center;
  min-width:36px;
  width:36px;
  height:36px;
  padding:0
}

.star {
  font-size:21px;
  color:#7d847a;
  line-height:1
}

.star[aria-pressed=true] {
  color:var(--gold);
  background:var(--gold-soft);
  border-color:#ecd7ab
}

.brand-mark {
  display:grid;
  place-items:center;
  width:37px;
  height:37px;
  background:var(--accent);
  border-radius:9px;
  color:white;
  font-size:31px;
  line-height:1
}

.skip-link {
  position:fixed;
  left:10px;
  top:-80px;
  z-index:20;
  background:white;
  padding:10px
}

.skip-link:focus {
  top:10px
}

.starting {
  display:grid;
  place-items:center;
  gap:16px;
  min-height:70vh
}

.starting .brand-mark {
  margin-top:auto
}

.starting p {
  margin-bottom:auto
}

.topbar {
  background:var(--panel);
  border-bottom:1px solid var(--line);
  height:76px;
  display:flex;
  align-items:center;
  padding:0 32px;
  gap:32px
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  color:var(--ink);
  white-space:nowrap
}

.brand:hover {
  text-decoration:none
}

.brand strong {
  font-size:15px;
  display:block;
  letter-spacing:-.2px
}

.brand small {
  display:block;
  font-size:11px;
  color:var(--muted)
}

.main-nav {
  display:flex;
  align-self:stretch;
  gap:22px
}

.main-nav a {
  display:flex;
  align-items:center;
  color:var(--muted);
  border-bottom:3px solid transparent;
  padding-top:3px;
  font-weight:600;
  font-size:13px
}

.main-nav a.active {
  color:var(--accent);
  border-bottom-color:var(--accent)
}

.main-nav a:hover {
  text-decoration:none;
  color:var(--ink)
}

.account {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px
}

.avatar {
  display:inline-grid;
  place-items:center;
  background:#e8ebdf;
  color:#4c5b47;
  border-radius:50%;
  width:29px;
  height:29px;
  font-size:11px;
  font-weight:700
}

.account-name {
  font-size:12px;
  display:flex;
  align-items:center;
  gap:8px
}

.workspace {
  max-width:1600px;
  margin:auto;
  padding:32px
}

.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px
}

.page-heading h1 {
  font-size:28px;
  margin-bottom:5px
}

.page-heading p {
  margin:0;
  font-size:13px
}

.heading-actions {
  display:flex;
  gap:10px;
  align-items:center
}

.count-badge {
  background:#e8ece3;
  border:1px solid #d9e0d2;
  border-radius:5px;
  padding:3px 7px;
  font-size:11px;
  white-space:nowrap
}

.work-area {
  display:grid;
  grid-template-columns:minmax(0,1fr) 390px;
  gap:22px;
  align-items:start
}

.work-area.no-detail {
  grid-template-columns:1fr
}

.catalog-panel,.detail-panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  min-width:0
}

.catalog-panel {
  overflow:hidden
}

.filters {
  padding:18px 20px;
  border-bottom:1px solid var(--line)
}

.search-wrap {
  position:relative
}

.search-wrap input {
  width:100%;
  padding-left:35px
}

.search-icon {
  position:absolute;
  left:12px;
  top:9px;
  color:var(--muted);
  pointer-events:none
}

.filter-row {
  display:flex;
  align-items:end;
  gap:10px;
  margin-top:13px;
  flex-wrap:wrap
}

.source-filters {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:15px
}

.source-label {
  flex-basis:100%;
  font-size:11px;
  font-weight:600;
  color:var(--muted)
}

.source-filter {
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  min-height:44px;
  padding:7px 10px;
  font-size:12px;
  text-align:left
}

.source-filter > span:first-child {
  overflow-wrap:anywhere
}

.source-filter[aria-pressed=true] {
  color:var(--accent-dark);
  background:var(--accent-soft);
  border-color:var(--accent);
  font-weight:650
}

.source-filter[aria-pressed=true]:hover {
  background:#dcece1;
  border-color:var(--accent)
}

.source-count {
  flex-shrink:0;
  color:var(--muted);
  font-size:11px;
  font-variant-numeric:tabular-nums
}

.source-filter[aria-pressed=true] .source-count {
  color:var(--accent-dark)
}

.filter-row label {
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:11px;
  color:var(--muted)
}

.filter-row select {
  max-width:230px;
  font-size:12px;
  padding:7px 9px;
  min-height:34px
}

.filter-row .duration-label {
  margin-left:auto
}

.duration-fields {
  display:flex;
  align-items:center;
  gap:5px
}

.duration-fields input {
  width:66px;
  padding:7px;
  font-size:12px;
  min-height:34px
}

.results-bar {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:11px 20px;
  background:#f8f9f3;
  color:var(--muted);
  font-size:11px;
  border-bottom:1px solid var(--line)
}

.sound-list {
  list-style:none;
  padding:0;
  margin:0
}

.sound-row {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto 34px;
  gap:11px;
  align-items:center;
  padding:13px 19px;
  border-bottom:1px solid #e7e9e1;
  min-height:75px
}

.sound-row:last-child {
  border-bottom:0
}

.sound-row.selected {
  background:var(--accent-soft);
  box-shadow:inset 3px 0 var(--accent)
}

.sound-row:hover {
  background:#f7f8f1
}

.sound-row.selected:hover {
  background:var(--accent-soft)
}

.play-button {
  width:32px;
  height:32px;
  padding:0;
  border-radius:50%;
  font-size:12px;
  display:grid;
  place-items:center;
  color:var(--accent)
}

.sound-main {
  min-width:0
}

.sound-title {
  display:block;
  color:var(--ink);
  font-size:12px;
  font-weight:650;
  overflow-wrap:anywhere;
  line-height:1.4
}

.sound-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px 9px;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  line-height:1.5
}

.sound-duration {
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  white-space:nowrap
}

.favorite-names {
  color:var(--gold)
}

.tag {
  display:inline-flex;
  border-radius:4px;
  padding:2px 6px;
  font-size:10px;
  font-weight:600;
  line-height:1.5;
  background:#eef1e8;
  color:#647159
}

.tag.missing {
  color:#8c5841;
  background:#f6ebe3
}

.tag.current {
  background:var(--accent-soft);
  color:var(--accent)
}

.event-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  padding:17px 20px;
  border-bottom:1px solid #e7e9e1
}

.event-row.selected {
  background:var(--accent-soft);
  box-shadow:inset 3px 0 var(--accent)
}

.event-row .sound-title {
  font-size:13px
}

.event-group {
  font-size:10px;
  letter-spacing:.8px;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:4px
}

.pagination {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:15px 20px;
  border-top:1px solid var(--line);
  font-size:11px;
  color:var(--muted)
}

.pagination div {
  display:flex;
  gap:7px
}

.pagination button {
  padding:6px 10px;
  font-size:12px
}

.detail-panel {
  padding:23px;
  position:sticky;
  top:20px
}

.detail-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:14px
}

.detail-title {
  font-size:19px;
  overflow-wrap:anywhere;
  letter-spacing:-.3px;
  margin-bottom:10px
}

.detail-description {
  font-size:12px;
  color:var(--muted);
  overflow-wrap:anywhere
}

.detail-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:17px 0
}

.detail-actions button {
  font-size:12px
}

.detail-section {
  padding-top:20px;
  margin-top:20px;
  border-top:1px solid var(--line)
}

.detail-section h3 {
  display:flex;
  align-items:center;
  gap:8px
}

.file-meta {
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  font-size:11px;
  gap:7px 8px;
  margin:0
}

.file-meta dt {
  color:var(--muted)
}

.file-meta dd {
  margin:0;
  overflow-wrap:anywhere
}

.file-meta .path {
  font:10px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;
  color:#687267
}

.suggest-form {
  display:flex;
  gap:7px;
  align-items:center
}

.suggest-form select {
  flex:1;
  max-width:100%;
  font-size:12px;
  padding:8px
}

.suggest-form button {
  font-size:12px;
  white-space:nowrap
}

.note-list {
  list-style:none;
  padding:0;
  margin:0 0 17px
}

.note {
  font-size:12px;
  padding:13px 0;
  border-bottom:1px solid #e8ebe2
}

.note:first-child {
  padding-top:0
}

.note:last-child {
  border-bottom:none
}

.note-top {
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:6px
}

.note-author {
  font-size:11px;
  font-weight:700
}

.note time {
  font-size:10px;
  color:var(--muted);
  margin-left:auto
}

.note-body {
  margin:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.6
}

.note-context {
  font-size:10px;
  margin-bottom:7px
}

.note-edit {
  font-size:10px;
  padding:3px 5px;
  margin-top:5px;
  color:var(--muted)
}

.note-form label {
  font-size:11px;
  font-weight:600;
  display:block;
  margin-bottom:6px
}

.note-form textarea {
  font-size:12px
}

.note-form select {
  width:100%;
  font-size:12px;
  margin-bottom:10px
}

.sound-suggestions {
  margin-top:12px
}

.form-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:8px
}

.form-footer button {
  font-size:12px
}

.form-footer .small {
  font-size:10px
}

.field-error {
  color:var(--danger);
  font-size:12px;
  margin-top:8px;
  margin-bottom:0
}

.notice {
  background:#fff3df;
  border:1px solid #ecd5ab;
  color:#775322;
  border-radius:8px;
  padding:12px 14px;
  font-size:12px
}

.error-notice {
  background:#fff0ec;
  border-color:#e9c4ba;
  color:var(--danger)
}

.empty {
  padding:48px 25px;
  text-align:center;
  color:var(--muted)
}

.empty h3 {
  font-size:15px;
  color:var(--ink)
}

.empty p {
  font-size:12px;
  max-width:330px;
  margin:0 auto 15px
}

.detail-empty {
  padding:50px 20px;
  text-align:center
}

.detail-empty .empty-icon {
  font-size:30px;
  color:#a2b3a0;
  margin-bottom:12px
}

.detail-empty p {
  font-size:12px;
  color:var(--muted)
}

.current-sound,.suggestion {
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px;
  margin:9px 0;
  background:#fafbf6
}

.candidate-top {
  display:flex;
  gap:9px;
  align-items:start
}

.candidate-top .play-button {
  flex-shrink:0
}

.candidate-copy {
  flex:1;
  min-width:0
}

.candidate-copy a {
  font-size:11px;
  font-weight:600;
  overflow-wrap:anywhere
}

.candidate-copy .small {
  font-size:10px
}

.candidate-footer {
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:9px;
  font-size:10px;
  color:var(--muted)
}

.candidate-footer button {
  font-size:10px;
  padding:3px 6px;
  margin-left:auto
}

.credit {
  font-size:10px;
  color:var(--muted);
  overflow-wrap:anywhere;
  margin-top:10px
}

.picker {
  margin-top:13px
}

.picker label {
  display:block;
  font-size:11px;
  font-weight:600;
  margin-bottom:6px
}

.picker input,.picker select {
  width:100%;
  font-size:12px;
  margin-bottom:8px
}

.picker button {
  font-size:12px
}

.catalog-foot {
  margin:13px 3px;
  font-size:10px;
  color:var(--muted)
}

.player-dock {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#233a32;
  color:#fff;
  z-index:10;
  padding:17px 32px;
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(280px,480px) 36px;
  gap:22px;
  align-items:center;
  box-shadow:0 -4px 25px #19342918
}

.player-dock[hidden] {
  display:none
}

.player-copy {
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:2px
}

.player-copy .eyebrow {
  color:#a7cdb4;
  font-size:9px
}

.player-copy a {
  color:#fff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:12px;
  font-weight:600
}

.player-copy .muted {
  color:#bacbbe;
  font-size:10px
}

.player-dock audio {
  width:100%;
  height:38px
}

.player-dock .icon-button {
  background:#354f44;
  color:#fff;
  border-color:#567061
}

.player-error {
  grid-column:1/-1;
  font-size:12px;
  color:#ffd4bd;
  margin:0
}

.toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  background:#263b31;
  color:white;
  border-radius:8px;
  padding:11px 18px;
  z-index:30;
  box-shadow:0 5px 25px #0002;
  font-size:12px;
  max-width:calc(100vw - 32px)
}

body.has-player .toast {
  bottom:112px
}

.toast.error {
  background:#8d392f
}

.login-page {
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr
}

.login-intro {
  background:#203a30;
  color:#f8faf0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:48px 10vw 48px 6vw
}

.login-intro .brand-mark {
  background:#d7e2b4;
  color:#203a30
}

.login-intro .brand strong {
  color:#f8faf0
}

.login-intro .brand small {
  color:#b7c8b9
}

.login-intro h1 {
  font-size:clamp(34px,4vw,54px);
  line-height:1.12;
  letter-spacing:-1.8px;
  max-width:400px;
  margin-bottom:22px
}

.login-intro p {
  color:#c3cfbd;
  font-size:15px;
  line-height:1.8;
  max-width:370px
}

.login-intro .eyebrow {
  color:#c8d8a6;
  margin-bottom:18px
}

.login-intro .footnote {
  font-size:11px;
  color:#9bb09e;
  margin:0
}

.login-form-area {
  display:flex;
  justify-content:center;
  align-items:center;
  padding:45px
}

.login-form {
  width:100%;
  max-width:340px
}

.login-form h2 {
  font-size:28px;
  margin-bottom:7px
}

.login-form>p {
  font-size:13px;
  color:var(--muted);
  margin-bottom:28px
}

.login-form label {
  font-size:12px;
  font-weight:600;
  display:block;
  margin:17px 0 7px
}

.login-form input {
  width:100%;
  padding:11px 12px
}

.login-form .primary {
  width:100%;
  margin-top:24px;
  padding:11px
}

.login-form .footnote {
  font-size:11px;
  margin-top:20px;
  text-align:center;
  color:var(--muted)
}

.loading-line {
  padding:25px;
  color:var(--muted);
  font-size:12px
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}

[hidden] {
  display:none!important
}

@media(min-width:1500px) {
  .work-area {
    grid-template-columns:minmax(0,1fr) 430px
  }
  .detail-panel {
    padding:26px
  }
}

@media(max-width:1050px) {
  .workspace {
    padding:24px
  }
  .work-area {
    grid-template-columns:minmax(0,1fr) 340px;
    gap:16px
  }
  .detail-panel {
    padding:18px
  }
  .topbar {
    padding:0 24px;
    gap:25px
  }
  .filter-row .duration-label {
    margin-left:0
  }
  .filter-row select {
    max-width:190px
  }
  .sound-row {
    padding:12px 15px;
    gap:8px
  }
  .login-intro {
    padding:40px
  }
  .player-dock {
    padding:16px 24px;
    gap:16px
  }
}

@media(max-width:820px) {
  .topbar {
    height:auto;
    min-height:72px;
    flex-wrap:wrap;
    padding:14px 18px 0;
    gap:12px
  }
  .brand {
    margin-right:auto
  }
  .account {
    margin-left:0
  }
  .account-name .avatar {
    display:none
  }
  .main-nav {
    order:3;
    width:100%;
    gap:28px;
    height:42px
  }
  .main-nav a {
    font-size:13px
  }
  .workspace {
    padding:22px 16px
  }
  .work-area {
    grid-template-columns:1fr
  }
  .detail-panel {
    position:static;
    scroll-margin-top:15px
  }
  .work-area:not(.no-detail) .detail-panel {
    order:-1
  }
  .page-heading h1 {
    font-size:25px
  }
  .page-heading {
    align-items:start
  }
  .heading-actions {
    align-items:end;
    flex-direction:column;
    gap:5px
  }
  .heading-actions button {
    font-size:11px
  }
  .player-dock {
    grid-template-columns:1fr 36px;
    gap:10px;
    padding:12px 16px
  }
  .player-copy {
    grid-column:1/-1
  }
  .player-dock audio {
    height:34px
  }
  .player-dock .icon-button {
    height:32px
  }
  .player-copy a {
    font-size:11px
  }
  .player-copy .muted {
    display:none
  }
  body.has-player {
    padding-bottom:145px
  }
  body.has-player .toast {
    bottom:133px
  }
  .login-page {
    grid-template-columns:1fr
  }
  .login-intro {
    padding:24px;
    gap:30px
  }
  .login-intro h1 {
    font-size:32px;
    max-width:none;
    margin-bottom:13px
  }
  .login-intro p {
    max-width:none;
    font-size:13px;
    margin:0
  }
  .login-intro .footnote {
    display:none
  }
  .login-intro .eyebrow {
    margin-bottom:8px
  }
  .login-form-area {
    padding:35px 24px 50px
  }
  .login-form {
    max-width:440px
  }
}

@media(max-width:470px) {
  .account-name {
    font-size:11px
  }
  .account {
    gap:3px
  }
  .account .quiet {
    font-size:10px;
    padding:6px
  }
  .brand strong {
    font-size:13px
  }
  .brand small {
    font-size:10px
  }
  .brand-mark {
    width:32px;
    height:32px;
    font-size:27px
  }
  .filters {
    padding:15px
  }
  .filter-row {
    gap:9px
  }
  .filter-row select {
    max-width:165px
  }
  .sound-row {
    grid-template-columns:30px minmax(0,1fr) 30px;
    gap:8px;
    padding:12px
  }
  .sound-duration {
    display:none
  }
  .sound-row .icon-button {
    width:30px;
    min-width:30px
  }
  .results-bar {
    padding:10px 15px
  }
  .results-bar .right-hint {
    display:none
  }
  .page-heading {
    gap:10px
  }
  .page-heading p {
    font-size:12px
  }
  .page-heading h1 {
    font-size:23px
  }
  .count-badge {
    font-size:10px
  }
  .pagination {
    padding:13px 15px
  }
  .login-intro h1 {
    font-size:29px
  }
  .detail-panel {
    padding:19px
  }
  .detail-actions {
    gap:6px
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
}


.note-dates {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: var(--muted);
}

.note-dates time {
  margin-left: 0;
}

.missing-files {
  margin: 8px 0 0;
  padding-left: 17px;
  font: 10px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
