:root {
  --ink: #1f1f1b;
  --ink-soft: #55534d;
  --muted: #8f8b82;
  --line: #e7e3da;
  --paper: #fffefa;
  --canvas: #f4f1ea;
  --sand: #ebe4d7;
  --clay: #9f6547;
  --clay-soft: #f2e7e0;
  --green: #55735d;
  --green-soft: #e6eee8;
  --red: #a54d42;
  --shadow: 0 18px 60px rgba(46, 39, 31, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.eyebrow {
  color: var(--clay);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.eyebrow.light {
  color: #e7c5ae;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--ink);
  border-radius: 13px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  place-items: center;
}

.brand-mark.inverse {
  color: var(--ink);
  background: #e5c7b4;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-copy strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  transition: 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 9px 22px rgba(28, 27, 23, 0.16);
}

.primary-button:hover {
  background: #35342e;
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--ink-soft);
  background: #f1eee7;
  border: 1px solid #e0dcd3;
}

.secondary-button:hover {
  color: var(--ink);
  background: #e9e5dc;
}

.login-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 0.92fr);
}

.login-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: flex-end;
  padding: clamp(48px, 7vw, 100px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(16, 21, 17, 0.03), rgba(16, 21, 17, 0.76)),
    linear-gradient(125deg, #24352b 0%, #58715e 42%, #a77658 100%);
}

.login-visual::before,
.login-visual::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
}

.login-visual::before {
  top: -18vw;
  right: -13vw;
  width: 48vw;
  height: 48vw;
}

.login-visual::after {
  top: 14vw;
  right: 9vw;
  width: 18vw;
  height: 18vw;
  background: rgba(255, 255, 255, 0.035);
}

.visual-noise {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.45px, transparent 0.45px);
  background-size: 5px 5px;
}

.visual-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.visual-copy h1 {
  margin: 22px 0 20px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.23;
  letter-spacing: -0.04em;
}

.visual-copy p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.visual-index {
  position: absolute;
  top: 48px;
  left: clamp(48px, 7vw, 100px);
  color: rgba(255, 255, 255, 0.48);
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.login-panel {
  display: grid;
  padding: 56px;
  background: var(--paper);
  place-items: center;
}

.login-card {
  width: min(100%, 420px);
}

.login-heading {
  margin: 78px 0 34px;
}

.login-heading h2 {
  margin: 14px 0 11px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 34px;
  font-weight: 600;
}

.login-heading p,
.login-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.password-field {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 14px 0 17px;
  background: #f7f5f0;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.password-field:focus-within {
  background: #fff;
  border-color: #928276;
  box-shadow: 0 0 0 3px rgba(159, 101, 71, 0.08);
}

.password-field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.text-button {
  padding: 8px;
  color: var(--clay);
  background: transparent;
  font-size: 12px;
}

.form-error {
  min-height: 22px;
  margin: 9px 2px 0;
  color: var(--red);
  font-size: 12px;
}

.login-button {
  width: 100%;
  height: 52px;
}

.login-help {
  margin-top: 20px;
  text-align: center;
}

.login-help code {
  color: var(--clay);
}

.app-version {
  font-family: Georgia, serif;
  letter-spacing: 0.05em;
}

.app-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 236px;
  padding: 30px 20px;
  color: #fff;
  background: #24251f;
  flex-direction: column;
}

.sidebar-brand {
  padding: 0 8px;
}

.sidebar .brand-copy small {
  color: rgba(255, 255, 255, 0.44);
}

.sidebar-nav {
  display: flex;
  margin-top: 52px;
  gap: 9px;
  flex-direction: column;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  border-radius: 12px;
  gap: 13px;
  font-size: 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item.is-active {
  box-shadow: inset 3px 0 #d3a282;
}

.nav-icon {
  width: 22px;
  font-family: Georgia, serif;
  font-size: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.server-status {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  gap: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #73b381;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(115, 179, 129, 0.1);
}

.logout-button {
  margin-top: 18px;
  padding: 0;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  font-size: 12px;
}

.logout-button:hover {
  color: #fff;
}

.main-content {
  min-width: 0;
  padding: 46px clamp(28px, 4vw, 64px) 64px;
  grid-column: 2;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.topbar h1 {
  margin: 11px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 36px;
  font-weight: 600;
}

.create-button {
  min-width: 132px;
  gap: 7px;
}

.create-button span {
  font-size: 21px;
  font-weight: 400;
}

.stats-grid {
  display: grid;
  margin-top: 34px;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid rgba(36, 32, 26, 0.035);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(44, 38, 30, 0.045);
}

.stat-card.accent {
  color: #fff;
  background: #657965;
}

.stat-card.accent::after {
  position: absolute;
  top: -35px;
  right: -25px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.stat-label,
.stat-note {
  display: block;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-card.accent .stat-label,
.stat-card.accent .stat-note {
  color: rgba(255, 255, 255, 0.62);
}

.stat-value {
  display: block;
  margin-top: 14px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 500;
}

.stat-note {
  margin-top: 9px;
  color: #b0aba2;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.library-card {
  margin-top: 22px;
  overflow: hidden;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.filter-tabs {
  display: flex;
  padding: 5px;
  background: #f3f0e9;
  border-radius: 12px;
  gap: 3px;
}

.filter-tab {
  min-width: 68px;
  height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
}

.filter-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 12px rgba(41, 35, 28, 0.08);
  font-weight: 650;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-field {
  display: flex;
  align-items: center;
  width: min(290px, 26vw);
  height: 40px;
  padding: 0 13px;
  background: #f7f5f0;
  border: 1px solid transparent;
  border-radius: 11px;
  gap: 9px;
}

.search-field:focus-within {
  background: #fff;
  border-color: #d8d2c8;
}

.search-field span {
  color: #78746b;
  font-family: Georgia, serif;
  font-size: 22px;
  transform: rotate(-12deg);
}

.search-field input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  color: #77736a;
  background: #f3f0e9;
  border-radius: 11px;
  font-size: 19px;
}

.table-wrap {
  overflow-x: auto;
}

.album-table {
  width: 100%;
  border-collapse: collapse;
}

.album-table th {
  height: 45px;
  padding: 0 18px;
  color: #9a968d;
  background: #fbfaf7;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: left;
}

.album-table td {
  height: 92px;
  padding: 12px 18px;
  border-top: 1px solid #efede7;
  font-size: 12px;
  vertical-align: middle;
}

.album-table tbody tr {
  transition: 120ms ease;
}

.album-table tbody tr:hover {
  background: #fbfaf6;
}

.album-table .align-right {
  text-align: right;
}

.album-cell {
  display: flex;
  align-items: center;
  min-width: 265px;
  gap: 14px;
}

.album-cover {
  flex: none;
  width: 68px;
  height: 64px;
  object-fit: cover;
  background: #e6e1d7;
  border-radius: 10px;
}

.album-copy {
  min-width: 0;
}

.album-copy strong,
.album-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-copy strong {
  max-width: 260px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 14px;
  font-weight: 600;
}

.album-copy span {
  max-width: 260px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.status-badge.published {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.draft {
  color: #8b704a;
  background: #f1eadc;
}

.status-badge.offline,
.status-badge.archived {
  color: #77736b;
  background: #eceae5;
}

.data-cell,
.date-cell,
.category-cell {
  color: #66635c;
  white-space: nowrap;
}

.data-cell span {
  display: block;
  line-height: 1.8;
}

.edit-button {
  padding: 8px 12px;
  color: var(--clay);
  background: var(--clay-soft);
  border-radius: 9px;
  font-size: 11px;
}

.table-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--muted);
  font-size: 13px;
  flex-direction: column;
}

.empty-symbol {
  margin-bottom: 14px;
  color: #bcb6aa;
  font-family: Georgia, serif;
  font-size: 50px;
}

.table-state strong {
  color: var(--ink);
  font-size: 15px;
}

.table-state p {
  margin: 8px 0 0;
}

.editor-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(20, 20, 17, 0.46);
  backdrop-filter: blur(4px);
}

.editor {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(720px, 100vw);
  background: var(--paper);
  box-shadow: -24px 0 80px rgba(22, 20, 17, 0.18);
}

.editor-form {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.editor-header,
.editor-footer {
  display: flex;
  align-items: center;
}

.editor-header {
  justify-content: space-between;
  min-height: 92px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
}

.editor-header h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 600;
}

.close-button {
  width: 42px;
  height: 42px;
  color: #77736a;
  background: #f1eee7;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 28px;
}

.editor-body {
  overflow-y: auto;
  padding: 30px;
}

.form-section {
  margin-bottom: 42px;
}

.compact-section {
  margin-bottom: 10px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 13px;
}

.section-number {
  display: grid;
  width: 33px;
  height: 33px;
  color: var(--clay);
  background: var(--clay-soft);
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 11px;
  place-items: center;
}

.section-heading h3 {
  margin: 0;
  font-size: 15px;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  position: relative;
  display: flex;
  gap: 9px;
  flex-direction: column;
}

.form-field.full,
.check-field.full {
  grid-column: 1 / -1;
}

.form-field > span {
  color: #5f5c55;
  font-size: 12px;
  font-weight: 650;
}

.form-field em {
  color: var(--clay);
  font-style: normal;
}

.form-field input,
.form-field textarea,
.form-field select,
.url-import input {
  width: 100%;
  color: var(--ink);
  background: #f7f5f0;
  border: 1px solid transparent;
  border-radius: 11px;
  outline: none;
}

.form-field input,
.form-field select,
.url-import input {
  height: 46px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 120px;
  padding: 13px 14px 25px;
  line-height: 1.65;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.url-import input:focus {
  background: #fff;
  border-color: #b9a99c;
  box-shadow: 0 0 0 3px rgba(159, 101, 71, 0.07);
}

.form-field small {
  position: absolute;
  right: 11px;
  bottom: 9px;
  color: #aaa69e;
  font-size: 9px;
}

.check-field {
  display: flex;
  align-items: center;
  padding: 14px;
  background: #f7f5f0;
  border-radius: 12px;
  cursor: pointer;
  gap: 12px;
}

.check-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fake-check {
  display: grid;
  width: 25px;
  height: 25px;
  color: transparent;
  background: #fff;
  border: 1px solid #d9d4ca;
  border-radius: 7px;
  font-size: 12px;
  place-items: center;
}

.check-field input:checked + .fake-check {
  color: #fff;
  background: var(--clay);
  border-color: var(--clay);
}

.check-field > span:last-child {
  display: flex;
  gap: 4px;
  flex-direction: column;
}

.check-field strong {
  font-size: 12px;
}

.check-field small {
  color: var(--muted);
  font-size: 10px;
}

.upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 28px;
  color: var(--muted);
  background: #f7f5f0;
  border: 1.5px dashed #cec7bb;
  border-radius: 16px;
  cursor: pointer;
  gap: 7px;
  flex-direction: column;
  transition: 150ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  color: var(--clay);
  background: #f6eee9;
  border-color: #bd8b6e;
}

.upload-zone strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.upload-zone span:last-child {
  font-size: 10px;
}

.upload-symbol {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  color: var(--clay);
  background: var(--clay-soft);
  border-radius: 50%;
  font-size: 24px;
  place-items: center;
}

.upload-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 12px;
  color: var(--clay);
  background: #f7eee9;
  border-radius: 10px;
  font-size: 11px;
  gap: 9px;
}

.progress-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(159, 101, 71, 0.22);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.url-import {
  display: flex;
  margin-top: 14px;
  gap: 9px;
}

.url-import input {
  flex: 1;
  min-width: 0;
  font-size: 11px;
}

.image-list {
  display: grid;
  margin-top: 18px;
  gap: 11px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-item {
  position: relative;
  overflow: hidden;
  background: #ece8df;
  border-radius: 13px;
  aspect-ratio: 4 / 3;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-label {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(29, 28, 24, 0.68);
  border-radius: 999px;
  font-size: 9px;
  backdrop-filter: blur(6px);
}

.image-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  padding: 18px 7px 7px;
  background: linear-gradient(transparent, rgba(20, 19, 17, 0.72));
  gap: 5px;
}

.image-action {
  display: grid;
  width: 28px;
  height: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 12px;
  place-items: center;
  backdrop-filter: blur(6px);
}

.image-action:hover {
  background: rgba(255, 255, 255, 0.28);
}

.image-empty {
  padding: 22px 0 0;
  color: #a39f96;
  font-size: 11px;
  text-align: center;
}

.editor-footer {
  min-height: 78px;
  padding: 13px 24px;
  background: rgba(255, 254, 250, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 34px rgba(39, 34, 28, 0.05);
  gap: 9px;
}

.footer-spacer {
  flex: 1;
}

.danger-text-button {
  padding: 10px 0;
  color: var(--red);
  background: transparent;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 200;
  top: 24px;
  left: 50%;
  min-width: 220px;
  padding: 14px 20px;
  color: #fff;
  background: rgba(31, 31, 27, 0.94);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(20, 19, 16, 0.2);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

.plugin-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding: 22px 24px;
  background: #e9eee8;
  border: 1px solid rgba(85, 115, 93, 0.09);
  border-radius: 16px;
  gap: 20px;
}

.plugin-guide strong,
.toolbar-title {
  display: block;
  font-size: 14px;
}

.plugin-guide p {
  margin: 7px 0 0;
  color: #68716a;
  font-size: 11px;
  line-height: 1.7;
}

.plugin-guide code {
  color: var(--green);
  font-weight: 700;
}

.safe-badge {
  flex: none;
  padding: 8px 12px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.plugin-library {
  margin-top: 18px;
}

.toolbar-subtitle {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.plugin-upload-progress {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  color: var(--clay);
  background: #f7eee9;
  border-bottom: 1px solid #ead9ce;
  font-size: 11px;
  gap: 9px;
}

.plugin-list {
  display: flex;
  flex-direction: column;
}

.plugin-item {
  display: grid;
  align-items: center;
  min-height: 112px;
  padding: 18px 20px;
  border-top: 1px solid #efede7;
  gap: 16px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.plugin-item:first-child {
  border-top: 0;
}

.plugin-mark {
  display: grid;
  width: 52px;
  height: 52px;
  color: #fff;
  background: linear-gradient(140deg, #647766, #303d32);
  border-radius: 15px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  place-items: center;
}

.plugin-copy {
  min-width: 0;
}

.plugin-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-title-line strong {
  overflow: hidden;
  max-width: 340px;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-version {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 10px;
}

.plugin-title-line .status-badge {
  height: 23px;
  padding: 0 8px;
}

.plugin-copy p {
  overflow: hidden;
  margin: 7px 0 6px;
  color: #66635c;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-copy > span {
  color: #aaa69e;
  font-size: 9px;
}

.plugin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-toggle {
  min-height: 36px;
  padding: 0 14px;
  font-size: 11px;
}

.plugin-delete {
  padding: 9px;
  color: var(--red);
  background: transparent;
  font-size: 11px;
}

.upload-diagnostics {
  display: flex;
  align-items: center;
  margin-top: 34px;
  padding: 14px 17px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 13px;
  font-size: 11px;
  gap: 10px;
}

.upload-diagnostics.has-error {
  color: var(--red);
  background: #f5e6e3;
}

.upload-diagnostics.has-error .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(165, 77, 66, 0.1);
}

.media-library {
  margin-top: 18px;
}

.media-grid {
  display: grid;
  padding: 20px;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.media-card {
  overflow: hidden;
  background: #f8f6f1;
  border: 1px solid #ede9e1;
  border-radius: 15px;
}

.media-preview {
  position: relative;
  overflow: hidden;
  background: #e8e4dc;
  aspect-ratio: 4 / 3;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.media-card:hover .media-preview img {
  transform: scale(1.025);
}

.media-used {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(39, 50, 41, 0.78);
  border-radius: 999px;
  font-size: 9px;
  backdrop-filter: blur(5px);
}

.media-card-copy {
  padding: 12px 13px 9px;
}

.media-card-copy strong,
.media-card-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-copy strong {
  font-size: 11px;
}

.media-card-copy span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.media-card-actions {
  display: flex;
  padding: 0 8px 9px;
  gap: 5px;
}

.media-card-actions button {
  flex: 1;
  min-height: 32px;
  color: var(--ink-soft);
  background: #ece8df;
  border-radius: 8px;
  font-size: 10px;
}

.media-card-actions button:hover:not(:disabled) {
  background: #e2ddd3;
}

.media-card-actions button.danger {
  color: var(--red);
  background: #f4e8e5;
}

.media-picker-backdrop {
  position: fixed;
  z-index: 115;
  inset: 0;
  background: rgba(20, 20, 17, 0.62);
  backdrop-filter: blur(5px);
}

.media-picker {
  position: fixed;
  z-index: 120;
  top: 8vh;
  bottom: 8vh;
  left: 50%;
  display: grid;
  width: min(920px, 92vw);
  overflow: hidden;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 28px 100px rgba(20, 19, 17, 0.3);
  grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translateX(-50%);
}

.media-picker-header,
.media-picker-footer {
  display: flex;
  align-items: center;
  padding: 18px 22px;
}

.media-picker-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.media-picker-header h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
}

.media-picker-grid {
  display: grid;
  overflow-y: auto;
  align-content: start;
  padding: 20px;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-picker-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #e8e4dc;
  border: 3px solid transparent;
  border-radius: 13px;
  aspect-ratio: 1;
}

.media-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-picker-item span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(31, 31, 27, 0.7);
  border-radius: 999px;
  font-size: 9px;
}

.media-picker-item.is-selected {
  border-color: var(--clay);
}

.media-picker-item.is-selected span {
  background: var(--clay);
}

.media-picker-item.is-used {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.48;
}

.media-picker-footer {
  min-height: 74px;
  color: var(--muted);
  background: #faf8f3;
  border-top: 1px solid var(--line);
  font-size: 11px;
  gap: 9px;
}

.settings-layout {
  display: grid;
  max-width: 980px;
  margin-top: 34px;
  gap: 20px;
}

.settings-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid rgba(36, 32, 26, 0.04);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.settings-card-heading {
  display: flex;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 13px;
}

.settings-card-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  font-weight: 600;
}

.settings-card-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.settings-note,
.settings-status {
  color: #6b7069;
  background: var(--green-soft);
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.7;
}

.settings-note {
  grid-column: 1 / -1;
  padding: 12px 14px;
}

.settings-status {
  padding: 14px 17px;
}

.settings-status.is-saving {
  color: var(--clay);
  background: var(--clay-soft);
}

.settings-upload-row {
  display: flex;
  gap: 10px;
}

.settings-upload-row input {
  flex: 1;
  min-width: 0;
}

.settings-upload-row .secondary-button {
  flex: none;
}

.settings-image-preview {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  overflow: hidden;
  width: min(100%, 420px);
  min-height: 190px;
  color: var(--muted);
  background: #f3f0e9;
  border: 1px dashed #d3ccc0;
  border-radius: 15px;
  place-items: center;
}

.settings-image-preview img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.settings-image-preview:not(.is-empty) span {
  display: none;
}

.collector-top-actions {
  display: flex;
  gap: 10px;
}

.collector-notice {
  margin-top: 24px;
}

.collector-status-grid {
  display: grid;
  margin-top: 26px;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.collector-status-card {
  min-width: 0;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid rgba(36, 32, 26, 0.04);
  border-radius: 15px;
  box-shadow: 0 8px 28px rgba(44, 38, 30, 0.045);
}

.collector-status-card span,
.collector-status-card strong {
  display: block;
}

.collector-status-card span {
  color: var(--muted);
  font-size: 10px;
}

.collector-status-card strong {
  overflow: hidden;
  margin-top: 10px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collector-message {
  max-width: 980px;
  margin-top: 14px;
}

.collector-message.is-error {
  color: var(--red);
  background: #f5e6e3;
}

.collector-layout {
  margin-top: 20px;
}

.collector-categories {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.collector-category {
  min-width: 0;
  padding: 15px;
  background: #f7f5f0;
  border-radius: 12px;
}

.collector-category strong,
.collector-category span {
  display: block;
}

.collector-category strong {
  font-size: 12px;
}

.collector-category span {
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collector-rule-heading {
  align-items: center;
}

.collector-rule-heading > div {
  flex: 1;
}

.collector-rule-labels,
.collector-tag-rule {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: minmax(110px, 0.35fr) minmax(240px, 1fr) 38px;
}

.collector-rule-labels {
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 10px;
}

.collector-tag-rules {
  display: flex;
  gap: 9px;
  flex-direction: column;
}

.collector-tag-rule input {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  background: #f7f5f0;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: 0;
  font-size: 11px;
}

.collector-tag-rule input:focus {
  background: #fff;
  border-color: #b9a99c;
}

.collector-rule-delete {
  width: 38px;
  height: 38px;
  color: var(--red);
  background: #f4e8e5;
  border-radius: 10px;
}

.collector-recent-card {
  max-width: 980px;
}

.collector-recent-list {
  display: flex;
  flex-direction: column;
}

.collector-recent-item {
  display: grid;
  align-items: center;
  min-height: 94px;
  padding: 15px 20px;
  border-top: 1px solid #efede7;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.collector-recent-item:first-child {
  border-top: 0;
}

.collector-recent-copy {
  min-width: 0;
}

.collector-recent-copy strong {
  display: block;
  overflow: hidden;
  font-family: Georgia, "Songti SC", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collector-recent-copy p {
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collector-recent-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  text-align: right;
  white-space: nowrap;
}

.collector-recent-meta a {
  display: block;
  color: var(--clay);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-table th:nth-child(5),
  .album-table td:nth-child(5) {
    display: none;
  }

  .collector-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collector-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 34px 24px;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 18px 20px;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    margin-top: 16px;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav .nav-item {
    width: auto;
  }

  .app-view {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 30px 18px 48px;
    grid-column: 1;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .search-field {
    width: 100%;
  }

  .search-field {
    flex: 1;
  }

  .plugin-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .plugin-mark {
    width: 48px;
    height: 48px;
  }

  .plugin-actions {
    grid-column: 2;
  }

  .media-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar h1 {
    font-size: 30px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    min-height: 126px;
    padding: 18px;
  }

  .stat-value {
    font-size: 30px;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .filter-tab {
    min-width: 66px;
  }

  .editor-body,
  .editor-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .form-grid,
  .image-list {
    grid-template-columns: 1fr;
  }

  .editor-footer {
    padding: 12px;
  }

  .danger-text-button {
    display: none;
  }

  .plugin-guide,
  .plugin-title-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .safe-badge {
    display: none;
  }

  .plugin-item {
    align-items: start;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .plugin-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .url-import {
    flex-wrap: wrap;
  }

  .settings-card {
    padding: 20px;
  }

  .settings-upload-row {
    align-items: stretch;
    flex-direction: column;
  }

  .collector-topbar {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .collector-top-actions {
    width: 100%;
  }

  .collector-top-actions button {
    flex: 1;
  }

  .collector-status-grid,
  .collector-categories {
    grid-template-columns: 1fr 1fr;
  }

  .collector-rule-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .collector-rule-heading .secondary-button {
    margin-left: 46px;
  }

  .collector-rule-labels {
    display: none;
  }

  .collector-tag-rule {
    align-items: stretch;
    grid-template-columns: 1fr 38px;
  }

  .collector-tag-rule input:first-child {
    grid-column: 1 / -1;
  }

  .collector-recent-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .collector-recent-meta {
    text-align: left;
  }

  .url-import input {
    width: 100%;
    flex-basis: 100%;
  }

  .media-grid {
    padding: 12px;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-picker {
    top: 3vh;
    bottom: 3vh;
    width: 94vw;
  }

  .media-picker-grid {
    padding: 12px;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
