:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #131416;
  color: #f5f2ee;
  --muted: #acadb4;
  --surface: #1b1d21;
  --line: #34363c;
  --accent: #f9ad6d;
  --error: #ffaba4;
  --success: #a9dfb4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 288px; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.top { border-bottom: 1px solid #2c2e33; }
.top-inner, .layout {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}
.top-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-actions { display: flex; align-items: center; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 680;
  letter-spacing: .005em;
}
.text-button {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 9px 4px;
}
.text-button:hover { color: #fff; }
.layout { padding-block: 65px 75px; }
.search-intro { max-width: 770px; }
h1, h2, p { margin: 0; }
h1 {
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  font-weight: 730;
  letter-spacing: -.065em;
  line-height: 1.04;
}
h2 { font-size: 1.375rem; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.search-intro > .muted, .auth-panel > .muted {
  margin-top: 15px;
  font-size: 1.075rem;
  line-height: 1.5;
}
.search-form {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 0 15px;
  color: var(--muted);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field svg { flex: none; }
input {
  color: #f5f2ee;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface);
  min-height: 50px;
  width: 100%;
}
input::placeholder { color: #a1a2ab; opacity: 1; }
.search-field input {
  min-height: 56px;
  padding-inline: 0;
  border: 0;
  outline: none;
  background: transparent;
}
.primary {
  background: var(--accent);
  color: #20160f;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 48px;
  padding: 0 25px;
  font-weight: 700;
}
.primary:hover { background: #ffc18d; }
.primary:disabled { opacity: .76; }
.primary.secondary {
  color: #f5f2ee;
  border-color: var(--line);
  background: var(--surface);
}
.primary.secondary:hover { border-color: var(--accent); }
.message {
  margin-top: 14px;
  color: var(--muted);
  min-height: 1.3em;
  font-size: .875rem;
  line-height: 1.5;
}
.error, .message.error { color: var(--error); }

.auth-panel { max-width: 460px; }
.auth-panel h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.auth-panel form {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.auth-panel form label { font-size: .9375rem; }
.auth-panel form button { justify-self: start; margin-top: 4px; }
.auth-panel > .primary { margin-top: 22px; }
.auth-panel .message:empty { display: none; }

dialog {
  width: min(470px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: inherit;
}
dialog::backdrop { background: #0b0b0dc9; }
.dialog-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.passkey-list { list-style: none; margin: 0; padding: 0; }
.passkey-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.passkey-list .text-button { flex-shrink: 0; }
.confirm-form { display: grid; gap: 10px; margin-top: 18px; }
.confirm-form label { font-size: .9375rem; }
.confirm-form .primary { justify-self: start; }
#passkey-add { margin-top: 16px; }
#passkey-message:empty { display: none; }

#results-panel { margin-top: 50px; }
.results-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
#result-count { font-size: .9375rem; font-variant-numeric: tabular-nums; }
select {
  appearance: none;
  margin-left: auto;
  padding: 9px 31px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #f5f2ee;
  font-size: .875rem;
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, #acadb4 50%), linear-gradient(135deg, #acadb4 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 2.8fr) minmax(74px, .69fr) minmax(0, 1.2fr) minmax(79px, .7fr) minmax(35px, .29fr) 120px;
  padding: 15px 18px;
  align-items: center;
  gap: 13px;
}
.table-heading {
  color: var(--muted);
  background: #202227;
  font-size: .875rem;
}
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list .row { border-top: 1px solid var(--line); min-height: 78px; }
.release-title { display: block; overflow-wrap: anywhere; line-height: 1.35; font-weight: 610; }
.source { display: block; margin-top: 5px; color: var(--muted); font-size: .8125rem; }
.meta { font-size: .875rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.meta.unknown { color: var(--muted); }
.mobile-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.actions { display: grid; gap: 5px; }
.add-button {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid #6b513e;
  border-radius: 7px;
  color: var(--accent);
  background: #2b2521;
  font-size: .875rem;
  font-weight: 650;
}
.add-button:hover:enabled { background: #392e25; }
.add-button[data-status="added"] { color: var(--success); border-color: #466650; background: #232d26; }
.add-button[data-status="submitted"] { color: #f1d4a4; border-color: #6f5c42; }
.add-message { font-size: .8125rem; line-height: 1.35; }
.notes { margin-top: 12px; font-size: .8125rem; line-height: 1.5; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 770px) {
  .table-heading { display: none; }
  .table { border: 0; background: transparent; border-radius: 0; }
  .result-list { display: grid; gap: 9px; }
  .result-list .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
  }
  .release, .actions { grid-column: 1 / -1; }
  .mobile-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    color: var(--muted);
    display: block;
    font-size: .8125rem;
    margin-bottom: 4px;
  }
  .add-button { width: fit-content; min-width: 115px; }
}
@media (max-width: 460px) {
  .layout, .top-inner { width: calc(100% - 32px); }
  .top-inner { min-height: 62px; }
  .layout { padding-block: 45px 55px; }
  .primary { padding-inline: 15px; }
  .search-field { gap: 7px; padding-inline: 10px; }
  .search-field input { min-height: 52px; }
  .result-list .row { gap: 10px 7px; padding: 12px; }
  .results-heading { gap: 7px; }
  h2 { font-size: 1.15rem; }
}
