:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #60646c;
  --line: #e5e5e9;
  --blue: #0066cc;
  --blue-hover: #0056ad;
  --blue-soft: #eaf3ff;
  --green: #247347;
  --amber: #885614;
  --red: #b42318;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #7db4ee;
  outline-offset: 3px;
}
::selection {
  background: #cfe4ff;
  color: #132f52;
}
input,
textarea {
  caret-color: var(--blue);
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 650;
  margin-bottom: 10px;
}
h2 {
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin-bottom: 7px;
}
h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 5px;
}
p {
  margin-bottom: 14px;
}
.muted,
.help {
  color: var(--muted);
}
.help {
  font-size: 13px;
  line-height: 1.65;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}
button .icon {
  pointer-events: none;
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -70px;
  z-index: 100;
  background: white;
  padding: 10px;
}
.skip-link:focus {
  top: 12px;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.app-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 18px 18px;
  background: #ececf0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand img {
  width: 34px;
  height: 34px;
}
.brand span {
  font-size: 17px;
}
.side-nav {
  display: grid;
  gap: 5px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 9px;
  text-decoration: none;
  color: #50535a;
  font-weight: 550;
}
.nav-link:hover {
  background: #e1e1e6;
}
.nav-link[aria-current="page"] {
  background: white;
  color: var(--blue);
  box-shadow: 0 2px 5px #1d1d1f05;
}
.nav-count {
  margin-left: auto;
  font-size: 12px;
  min-width: 19px;
  text-align: center;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #d9d9df;
  padding-top: 18px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dcdce3;
  color: #45454b;
  display: grid;
  place-content: center;
  font-size: 13px;
}
.user-row strong {
  display: block;
  font-size: 13px;
}
.user-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.logout {
  margin: 12px 0 0 10px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 70px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.main {
  padding: 38px 40px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-head p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 3px;
}
.button {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid #d2d2d7;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.button:hover {
  background: #f0f0f3;
}
.button:active {
  box-shadow: inset 0 2px 3px #0000000a;
}
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.button.primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}
.button.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.button.quiet:hover {
  background: #e9e9ee;
  color: var(--ink);
}
.button.small {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13px;
}
.button.icon-only {
  padding: 9px;
  min-width: 40px;
}
.button.danger {
  color: var(--red);
}
.button .icon {
  width: 17px;
  height: 17px;
}
.surface {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 20px;
}
.text-tab {
  padding: 6px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  min-height: 40px;
}
.text-tab[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}
.search-field {
  position: relative;
  max-width: 280px;
  min-width: 200px;
}
.search-field > .icon {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #737780;
  width: 17px;
  height: 17px;
}
.search-field input {
  padding-left: 37px !important;
}
.search-field input,
.field input,
.field select,
.inline-input {
  width: 100%;
  height: 44px;
  border: 1px solid #ceced5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  min-width: 0;
}
input::placeholder {
  color: #6b6e76;
}
.summary-line {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
  margin-bottom: 22px;
}
.summary-line strong {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.list-head {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) 95px 95px 115px 38px;
  gap: 16px;
  padding: 12px 24px;
  background: #fbfbfc;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.material-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) 95px 95px 115px 38px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.material-row:last-child {
  border-bottom: 0;
}
.material-row:hover {
  background: #fafbfc;
}
.check-label {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 36px;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
}
.material-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}
.cover {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: #eff0f3;
}
.cover-empty {
  display: grid;
  place-items: center;
  color: #8c9099;
}
.cover-empty .icon {
  width: 25px;
  height: 25px;
}
.material-text {
  min-width: 0;
}
.material-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}
.material-byline {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.metric {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.metric small {
  display: none;
}
.time-cell {
  font-size: 12px;
  color: var(--muted);
}
.favorite.active {
  color: #936622;
  background: #fff7e5;
}
.empty {
  padding: 68px 24px 74px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #f1f2f5;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: #8b919c;
}
.empty-mark .icon {
  width: 30px;
  height: 30px;
}
.empty h2 {
  font-size: 23px;
  margin-bottom: 10px;
  font-weight: 600;
}
.empty p {
  max-width: 430px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 25px;
}
.empty .help {
  margin-top: 15px;
  margin-bottom: 0;
}
.empty.compact {
  padding: 42px 20px;
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #f2f7ff;
  border-bottom: 1px solid #dbe8f8;
  font-size: 13px;
}
.bulk-bar strong {
  margin-right: auto;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}
.scan-form {
  background: var(--surface);
  border-radius: var(--radius);
}
.form-section {
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
}
.step-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.step-heading h2 {
  margin: 0;
  font-size: 17px;
}
.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f1f4;
  color: #535860;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.segmented {
  display: flex;
  border-radius: 9px;
  background: #ededf1;
  padding: 3px;
  gap: 3px;
  margin-bottom: 21px;
  max-width: 320px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 7px;
  min-height: 37px;
  color: var(--muted);
  font-size: 13px;
}
.segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #0000000f;
  font-weight: 600;
}
.source-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.source-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 56px;
}
.source-choice:has(input:checked) {
  border-color: #86b4e6;
  background: #f7fbff;
}
.source-choice .source-copy {
  flex: 1;
}
.source-choice strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.source-choice small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.source-add {
  display: flex;
  gap: 8px;
  align-items: center;
}
.source-add input {
  flex: 1;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
}
.field .help {
  font-weight: 400;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field-full {
  grid-column: 1/-1;
}
.field-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.field-line .help {
  margin: 0;
}
.field-line input[type="number"] {
  max-width: 110px;
}
.field input:disabled,
.field select:disabled {
  background: #f5f5f7;
  color: var(--muted);
}
.disclosure {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.disclosure summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
}
.disclosure[open] summary {
  margin-bottom: 12px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  min-height: 40px;
  font-size: 14px;
}
.form-foot {
  padding: 23px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-foot .help {
  margin: 0;
  max-width: 300px;
}
.form-foot .button {
  min-width: 125px;
}
.form-aside {
  position: sticky;
  top: 30px;
  padding: 8px 0;
}
.form-aside h3 {
  font-size: 14px;
  margin-bottom: 12px;
}
.form-aside p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.aside-divider {
  border: 0;
  border-top: 1px solid #dddde3;
  margin: 26px 0;
}
.notice {
  padding: 16px 18px;
  border-radius: 10px;
  background: #edf3fa;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #35526f;
}
.notice .icon {
  margin-top: 2px;
}
.notice p {
  margin: 0;
}
.notice strong {
  display: block;
  color: #1f4163;
  margin-bottom: 3px;
}
.notice .button {
  margin-left: auto;
  flex: none;
}
.notice.warning {
  background: #fff6e8;
  color: #705322;
}
.notice.warning strong {
  color: #705322;
}
.inline-error {
  font-size: 13px;
  color: var(--red);
  margin: 10px 0 0;
}
.helper-line {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.job-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.job-row:last-child {
  border-bottom: 0;
}
.job-marker {
  padding-top: 3px;
  color: var(--muted);
}
.job-body {
  flex: 1;
  min-width: 0;
}
.job-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.job-top h3 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.job-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 0;
}
.job-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.job-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.5;
  padding: 3px 8px;
  border-radius: 5px;
  background: #ededf1;
  color: #60646c;
  font-weight: 550;
}
.badge.done {
  background: #edf7f0;
  color: #24623b;
}
.badge.running {
  background: #eaf3ff;
  color: #0059b3;
}
.badge.partial,
.badge.needs_login {
  background: #fff2dc;
  color: #825110;
}
.badge.failed,
.badge.interrupted {
  background: #fff0ee;
  color: #a02c24;
}
.progress-line {
  height: 3px;
  background: #e9edf3;
  border-radius: 3px;
  overflow: hidden;
  margin: 15px 0 10px;
}
.progress-line:after {
  content: "";
  display: block;
  height: 100%;
  width: 28%;
  background: var(--blue);
  animation: progress 2s linear infinite;
}
@keyframes progress {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(470%);
  }
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}
.settings-section {
  padding: 28px;
}
.settings-section + .settings-section {
  border-top: 1px solid var(--line);
}
.settings-section h2 {
  font-size: 17px;
  margin-bottom: 9px;
}
.settings-section > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}
.settings-section .fields {
  margin: 18px 0;
}
.settings-section .button {
  margin-top: 14px;
}
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.person:last-child {
  border: 0;
}
.person .badge {
  margin-left: auto;
}
.person strong {
  font-size: 14px;
}
.person small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.status-list li:last-child {
  border: 0;
}
.status-ok {
  color: var(--green);
}
.status-missing {
  color: var(--amber);
}
.auth-page {
  min-height: 100vh;
  padding: 38px 48px;
  display: flex;
  flex-direction: column;
}
.auth-page .brand {
  padding: 0;
}
.auth-content {
  margin: auto;
  width: 100%;
  max-width: 440px;
  padding: 56px 0;
}
.auth-content h1 {
  font-size: 32px;
  margin-bottom: 15px;
  letter-spacing: -0.025em;
}
.auth-content > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 30px;
}
.auth-form {
  display: grid;
  gap: 18px;
}
.auth-form .button {
  margin-top: 8px;
  min-height: 46px;
}
.auth-note {
  border-top: 1px solid #dedee4;
  margin-top: 28px;
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.auth-footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 20px;
  border-radius: 10px;
  background: #252527;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 30px #0002;
  z-index: 100;
  animation: toast-in 0.22s var(--ease);
}
.toast.error {
  background: #742920;
}
@keyframes toast-in {
  from {
    transform: translate(-50%, 8px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
.detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(560px, 100vw);
  max-width: 100vw;
  border: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -15px 0 50px #00000016;
}
.detail-panel::backdrop {
  background: #1d1d1f33;
  backdrop-filter: blur(2px);
}
.detail-panel[open] {
  animation: drawer-in 0.22s var(--ease);
}
@keyframes drawer-in {
  from {
    transform: translateX(30px);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.detail-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.detail-head h2 {
  font-size: 15px;
  margin: 0;
}
.detail-body {
  padding: 28px;
}
.detail-body h3 {
  font-size: 22px;
  margin: 18px 0;
  line-height: 1.55;
}
.detail-body .cover {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--bg);
}
.detail-body .cover-empty {
  height: 150px;
}
.detail-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.detail-data dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-data dd {
  margin: 0;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.detail-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.detail-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.85;
}
.detail-body video {
  width: 100%;
  max-height: 400px;
  background: #111;
  border-radius: 10px;
}
.frame-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.frame-list img {
  width: 100%;
  border-radius: 8px;
}
.detail-footnote {
  font-size: 12px;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.timeline {
  padding-left: 18px;
  font-size: 13px;
}
.timeline li {
  padding: 10px 0;
}
.timeline time {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
@media (min-width: 1600px) {
  .main {
    padding-top: 46px;
  }
  .sidebar {
    padding-top: 34px;
  }
}
@media (max-width: 1200px) {
  .app-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-aside {
    position: static;
    display: none;
  }
  .material-row,
  .list-head {
    grid-template-columns: 30px minmax(180px, 1fr) 70px 75px 36px;
    gap: 12px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .time-cell {
    display: none;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    gap: 16px;
  }
}
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 20px;
    gap: 12px;
    background: #f5f5f7f5;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .brand span {
    font-size: 15px;
  }
  .side-nav {
    display: flex;
    gap: 4px;
    justify-content: space-between;
  }
  .nav-link {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 13px;
    gap: 7px;
  }
  .nav-link .icon {
    width: 17px;
    height: 17px;
  }
  .sidebar-foot {
    display: none;
  }
  .topbar {
    height: 49px;
    padding: 0 24px;
  }
  .main {
    padding: 28px 24px 50px;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .page-head {
    margin-bottom: 24px;
  }
  .form-section {
    padding: 25px;
  }
  .form-foot {
    padding: 20px 25px;
  }
  .list-head {
    grid-template-columns: 26px minmax(180px, 1fr) 80px 75px 35px;
  }
  .material-row {
    grid-template-columns: 26px minmax(180px, 1fr) 80px 75px 35px;
  }
}
@media (max-width: 600px) {
  .sidebar {
    padding: 10px 14px;
    gap: 9px;
  }
  .sidebar > .brand {
    display: none;
  }
  .nav-link {
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    font-size: 11px;
    min-width: 64px;
  }
  .nav-count {
    display: none;
  }
  .topbar {
    padding: 0 18px;
    font-size: 11px;
  }
  .main {
    padding: 24px 16px 40px;
  }
  .page-head {
    display: block;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head p {
    font-size: 13px;
  }
  .page-actions {
    margin-top: 18px;
  }
  .toolbar {
    padding: 16px;
    gap: 12px;
  }
  .tabs {
    gap: 17px;
  }
  .text-tab {
    font-size: 13px;
  }
  .search-field {
    max-width: none;
    width: 100%;
  }
  .list-head {
    display: none;
  }
  .material-row {
    grid-template-columns: 24px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 16px 12px;
  }
  .material-main {
    gap: 12px;
  }
  .cover {
    width: 52px;
    height: 70px;
  }
  .material-title {
    font-size: 13px;
  }
  .material-byline {
    font-size: 11px;
  }
  .metric {
    font-size: 12px;
    grid-column: 2;
    padding-left: 64px;
    margin-top: -3px;
  }
  .metric small {
    display: inline;
    color: var(--muted);
    margin-right: 5px;
  }
  .metric.views {
    display: none;
  }
  .material-row > .favorite {
    grid-column: 3;
    grid-row: 1;
  }
  .empty {
    padding: 45px 20px;
  }
  .empty h2 {
    font-size: 20px;
  }
  .empty p {
    font-size: 13px;
  }
  .empty-mark {
    width: 60px;
    height: 60px;
  }
  .summary-line {
    font-size: 12px;
    gap: 12px;
  }
  .bulk-bar {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .bulk-bar strong {
    width: 100%;
  }
  .form-section {
    padding: 22px 19px;
  }
  .form-foot {
    padding: 18px 19px;
    align-items: stretch;
    flex-direction: column;
  }
  .fields {
    gap: 15px;
  }
  .notice {
    padding: 14px;
    flex-wrap: wrap;
  }
  .notice .button {
    margin-left: 30px;
  }
  .notice > div {
    flex: 1;
  }
  .source-add {
    flex-wrap: wrap;
  }
  .source-add input {
    flex-basis: 100%;
  }
  .job-row {
    padding: 19px 17px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .job-marker {
    display: none;
  }
  .job-actions {
    width: 100%;
    margin-top: 5px;
  }
  .settings-section {
    padding: 22px;
  }
  .auth-page {
    padding: 25px;
  }
  .auth-content {
    padding: 45px 0;
  }
  .auth-content h1 {
    font-size: 28px;
  }
  .detail-body {
    padding: 23px;
  }
  .detail-head {
    padding: 16px 23px;
  }
  .pagination {
    padding: 14px;
  }
  .pagination .button {
    padding: 6px 9px;
  }
  .toast {
    bottom: 16px;
  }
  .button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .progress-line:after {
    width: 100%;
    opacity: 0.5;
  }
}
.copy-text {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
.connection-dot.offline {
  background: var(--amber);
}
.connection-notice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
}
.notice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.connection-notice .button {
  margin-left: 0;
}
@media (max-width: 600px) {
  .connection-notice {
    grid-template-columns: 20px minmax(0, 1fr);
  }
  .notice-actions {
    grid-column: 2;
  }
}

.pair-code {
  font-size: 24px;
  letter-spacing: 0.16em;
  font-weight: 600;
}
