:root {
  color-scheme: light;
  --ink: #132e4a;
  --secondary: #405c77;
  --muted: #61778b;
  --blue: #246cae;
  --deep: #155c97;
  --line: #d8e5ef;
  --wash: #eaf4fd;
  --bg: #f9fbfd;
  --white: #fff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  line-height: 1.6;
}
a {
  color: var(--deep);
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
select,
input,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button {
  color: var(--ink);
}
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.wrap,
.head-inner {
  width: min(1216px, calc(100% - 104px));
  margin: 0 auto;
}
.site-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.head-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #284864;
  flex: none;
}
.brand img {
  width: 113px;
  height: auto;
  display: block;
}
.brand span {
  border-left: 1px solid #cfdae4;
  padding-left: 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.site-menu-button { display: none; }
.topnav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 28px;
}
.topnav a {
  display: flex;
  align-items: center;
  position: relative;
  color: var(--secondary);
  font-weight: 550;
  font-size: 14px;
}
.topnav a:hover,
.topnav a[aria-current] {
  color: var(--deep);
}
.topnav a[aria-current]:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background: #438ed2;
  left: 1px;
  right: 1px;
  border-radius: 2px;
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 324px;
  border-radius: 21px;
  overflow: hidden;
  border: 1px solid #c6deee;
  background: linear-gradient(110deg, #eef7fd 0%, #e6f3fd 48%, #c8e6fa 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 44px 0 35px clamp(30px, 4vw, 61px);
}
.hero h1 {
  font-size: clamp(40px, 4vw, 64px);
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.061em;
  font-weight: 760;
  color: #133453;
}
.hero p {
  margin: 14px 0 23px;
  color: #46627a;
  font-size: 16px;
}
.search {
  display: flex;
  align-items: center;
  max-width: 550px;
  gap: 12px;
  background: #fff;
  border: 1px solid #c8ddeb;
  border-radius: 10px;
  box-shadow: 0 4px 10px #254c7108;
  padding: 5px 5px 5px 16px;
  color: #6283a0;
}
.search input {
  border: 0;
  background: none;
  min-width: 0;
  width: 100%;
  font-size: 14px;
  color: var(--ink);
}
.search input:focus {
  outline: none;
}
.search:focus-within {
  outline: 2px solid #6ca6d7;
}
.search button,
.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  border-radius: 7px;
  font-weight: 600;
  padding: 8px 17px;
  white-space: nowrap;
}
.search button:hover,
.primary:hover {
  background: #195d9a;
}
.hero-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 13px;
}
.hero-links .start-link { margin-top: 0; }
.start-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  font-size: 12px;
  font-weight: 550;
  color: #3e688a;
}
.hero-art {
  position: relative;
  align-self: stretch;
  width: 38%;
  overflow: hidden;
  background: radial-gradient(ellipse at 55% 64%, #f4fbff90, transparent 70%);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 54% 72%, transparent 0 54px, #8dbedf44 55px, transparent 56px 96px);
  mask-image: linear-gradient(90deg, transparent, black 20%);
}
.hero-art img {
  position: absolute;
  bottom: 0;
  left: 52%;
  transform: translateX(-50%);
  height: 97%;
  width: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(8px 2px 8px #44698523);
}
h1,
h2,
h3,
h4 {
  line-height: 1.35;
  color: var(--ink);
}
.collection {
  margin-top: 35px;
  scroll-margin-top: 90px;
}
.filter {
  margin: 14px 0 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.filter label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.filter select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  color: var(--ink);
  padding: 6px 8px;
  max-width: 250px;
}
.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}
.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { flex: 1; min-width: 0; padding: 30px 0 50px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; }
h2 { font-size: 24px; letter-spacing: -.035em; }
h3 { font-size: 18px; }
button, .button {
  color: var(--ink); background: white; border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 12px; line-height: 1.6;
}
button:hover, .button:hover { background: var(--wash); border-color: #9fc2de; }
button.primary, .search button { background: var(--blue); color: white; border-color: var(--blue); padding: 8px 17px; }
button.primary:hover, .search button:hover { background: var(--deep); }
button.plain { background: none; border: 0; color: var(--deep); }
button.plain:hover { background: var(--wash); }
.small, .tools { font-size: 13px; }
.small { padding: 5px 10px; }
.tools, .row, .actions, .tags, .section-heading, .card-foot {
  display: flex; align-items: center; gap: 10px;
}
.tools { margin-left: auto; min-width: 0; }
.tools button { white-space: nowrap; }
#account { overflow: hidden; text-overflow: ellipsis; max-width: 10em; }
.head-inner { position: relative; }
.topnav a { white-space: nowrap; }
.search input { padding: 6px 0; }
.search button { flex: none; }
.start-link { min-height: 28px; }
.section-heading, .card-foot, .between { justify-content: space-between; }
.section-heading > span, .card-foot, .hint, .meta { color: var(--muted); font-size: 13px; }
.filter { row-gap: 8px; }
.filter label { min-width: 0; }
.filter select { text-overflow: ellipsis; }
.list-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.list-actions select { border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; background: white; color: var(--ink); cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--white);
  transition: border-color .16s, box-shadow .16s;
}
.card:hover, .card:focus-within { border-color: #93b9d8; box-shadow: 0 4px 15px #28557a10; }
.cover {
  position: relative; display: block; isolation: isolate; overflow: hidden;
  aspect-ratio: 49/20; background: linear-gradient(115deg, #e7f2fb, #deecf8);
  border-bottom: 1px solid var(--line);
}
.cover-placeholder, .cover-photo { position: absolute; inset: 0; }
.cover-placeholder {
  display: grid; place-items: center;
  background: radial-gradient(circle, #a5c0db80 1px, transparent 1.4px) 0 0 / 14px 14px, linear-gradient(115deg, #edf7ff, #d6e7f8);
}
.cover-placeholder .icon {
  width: 70px; height: 70px; padding: 16px; color: var(--blue);
  background: var(--white); border: 1px solid #adcae3; border-radius: 14px;
  box-shadow: 4px 4px 0 #accce8, 8px 8px 0 #8eb9dc; transform: rotate(-8deg);
}
.cover-photo { width: 100%; height: 100%; object-fit: contain; display: block; padding: 8px 12px; background: linear-gradient(115deg, #e7f2fb, #deecf8); }
.cover-photo.custom-cover, .cover-fill .cover-photo { object-fit: cover; padding: 0; }
.card-kind, .tag {
  display: inline-flex; align-items: center; font-size: 12px;
  color: #2a5477; background: var(--wash); border-radius: 5px; padding: 2px 8px;
}
.card-kind { position: absolute; bottom: 10px; left: 12px; background: #f8fcfff5; border: 1px solid #fff8; font-weight: 650; }
.cardbody { flex: 1; padding: 15px 17px 8px; }
.cardbody small { color: var(--muted); font-size: 11px; }
.card h3 { margin-top: 4px; overflow-wrap: anywhere; }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--deep); }
.cardbody p { font-size: 13px; color: var(--secondary); margin-top: 7px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.card-foot { padding: 5px 17px 15px; font-size: 12px; }
.card-foot span { overflow-wrap: anywhere; min-width: 0; }
.card-foot label { white-space: nowrap; }
.empty { color: var(--muted); padding: 36px 16px; text-align: center; }
.grid > .empty { grid-column: 1/-1; border: 1px dashed var(--line); border-radius: 13px; }
.lead { color: var(--secondary); margin: 8px 0 20px; overflow-wrap: anywhere; }
.row, .actions, .tags { flex-wrap: wrap; }
.box, dialog, .page-intro {
  background: white; border: 1px solid var(--line); border-radius: 13px; padding: 24px; min-width: 0;
}
.page-intro { background: var(--wash); }
.block { margin-top: 20px; }
.back { display: inline-block; margin-bottom: 14px; font-size: 13px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .85fr); gap: 18px; align-items: start; margin-top: 18px; }
.detail.detail-single { grid-template-columns: minmax(0,1fr); }
.detail aside { min-width: 0; }
.box + .box { margin-top: 14px; }
.box h3 { margin-bottom: 8px; }
.box p { white-space: pre-wrap; overflow-wrap: anywhere; }
.tags { gap: 6px; }
.meta button, .box h1, .detail h3 { overflow-wrap: anywhere; max-width: 100%; }
.viewer-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 0 7px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: var(--wash);
}
.viewer-tabs {
  position: relative; display: flex; flex: 1; align-self: stretch; align-items: flex-end; min-width: 0; gap: 4px;
  overflow-x: auto; scrollbar-width: thin;
}
.viewer-tab {
  flex: none; max-width: min(100%, 260px); margin-top: 5px; padding: 6px 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px;
  border-color: transparent; border-bottom: 0; border-radius: 7px 7px 0 0;
  background: transparent; color: var(--secondary);
}
.viewer-tab[aria-selected="true"] { background: var(--white); color: var(--deep); border-color: var(--line); font-weight: 650; }
.viewer-tab:focus-visible { outline-offset: -3px; }
.preview-fullscreen { display: inline-flex; align-items: center; flex: none; gap: 5px; margin: 4px 0 4px auto; white-space: nowrap; }
.preview-fullscreen .icon { flex: none; width: 15px; height: 15px; }
.viewer-identity { display: flex; align-items: center; gap: clamp(7px,2vw,14px); min-width: 0; }
.viewer-identity:has(+ .viewer-tabs > .viewer-tab:nth-child(2)) { max-width: 48%; }
.viewer-brand { display: block; flex: none; width: clamp(74px,23vw,113px); height: auto; }
.viewer-divider { flex: none; width: 1px; height: 24px; background: var(--line); }
.viewer-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.preview { display: block; width: 100%; height: clamp(320px, 53vh, 660px); border: 1px solid var(--line); border-radius: 0 0 7px 7px; object-fit: contain; background: #f5f9fc; }
#viewer-panel .empty { border: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.viewer-footer:empty { display: none; }
.viewer-footer:not(:empty) { margin-top: 8px; }
body:has(#viewer.viewer-expanded) { overflow: hidden; visibility: hidden; }
#viewer.viewer-expanded { position: fixed; inset: 0; z-index: 30; visibility: visible; }
#viewer:is(:fullscreen,.viewer-expanded) { display: flex; flex-direction: column; background: var(--bg); }
#viewer:is(:fullscreen,.viewer-expanded) .viewer-toolbar {
  flex: none; min-height: 48px; padding: 0 14px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--white);
}
#viewer:is(:fullscreen,.viewer-expanded) .viewer-tabs:not(:has(> .viewer-tab:nth-child(2))) { display: none; }
#viewer:is(:fullscreen,.viewer-expanded) .viewer-tab[aria-selected="true"] { background: var(--wash); }
#viewer:is(:fullscreen,.viewer-expanded) #viewer-panel { flex: 1 1 0; min-height: 0; }
#viewer:is(:fullscreen,.viewer-expanded) .preview { height: 100%; border: 0; border-radius: 0; }
#viewer:is(:fullscreen,.viewer-expanded) .viewer-footer:not(:empty) { margin: 0; padding: 8px 16px; }
pre { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: var(--ink); background: #f0f6fc; border-radius: 7px; padding: 13px 15px; }
.links { display: grid; gap: 7px; overflow-wrap: anywhere; }
.form { width: min(100%,800px); margin: 0 auto; padding: clamp(20px,3.1vw,42px); }
.form h1 { font-size: 30px; }
.form .hint { margin-top: 5px; }
.form-section { border-top: 1px solid var(--line); margin: 22px 0; padding-top: 20px; }
.form-section h2 { font-size: 19px; }
.form label, dialog label { display: block; margin-top: 13px; font-size: 13px; font-weight: 600; color: var(--secondary); }
input:not([type="checkbox"]):not([type="search"]), textarea, .form select {
  display: block; width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid #c8d9e7;
  border-radius: 7px; background: white; color: var(--ink); font-size: 14px; font-weight: 400;
}
textarea { resize: vertical; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); vertical-align: middle; }
.form .upload-zone { background: #f4f9fe; border: 1px dashed #a8c7df; padding: 14px 16px; border-radius: 9px; }
.web-upload-help { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--wash); color: var(--secondary); font-size: 13px; }
.web-upload-help h3 { margin: 0 0 4px; color: var(--ink); font-size: 14px; }
.web-upload-help ol { margin: 8px 0 12px; padding-left: 1.5em; }
.web-upload-help code { overflow-wrap: anywhere; }
.upload-zone.is-over { background: var(--wash); outline: 2px solid #83b4d9; }
.upload-zone input[type="file"] { background: transparent; padding: 3px 0; border: 0; }
input::file-selector-button { font: inherit; color: var(--deep); background: white; border: 1px solid #bcd4e7; padding: 5px 11px; border-radius: 5px; margin-right: 10px; cursor: pointer; }
.two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.fileLine { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(105px,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fileLine span { overflow-wrap: anywhere; font-size: 14px; }
.fileLine label, .fileLine select { margin: 0; }
.cover-selection { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.cover-selection span { min-width: 0; overflow-wrap: anywhere; }
.cover-selection button { flex: none; }
.feedback { color: #a23e45; font-size: 14px; margin-top: 8px; }

table { border-collapse: collapse; width: 100%; min-width: 540px; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 15px; text-align: left; vertical-align: top; }
th { white-space: nowrap; background: var(--wash); }
td { min-width: 160px; overflow-wrap: anywhere; }
dialog { width: min(430px,calc(100% - 32px)); max-height: 90vh; color: var(--ink); }
dialog::backdrop { background: #17314e66; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 25; max-width: 85vw; padding: 9px 16px; border-radius: 7px; background: var(--ink); color: white; }
#toast:empty, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid #438ed2; outline-offset: 3px; }
@media(max-width: 950px) {
  .wrap,.head-inner { width: calc(100% - 44px); }
  .head-inner { gap: 24px; }
  .topnav { gap: 16px; }
  .hero-art { width: 32%; }
}
@media(max-width: 880px) {
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .detail { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 759px) {
  .wrap,.head-inner { width: calc(100% - 28px); }
  main.wrap { padding: 14px 0 32px; }
  .head-inner { height: 57px; gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 92px; }
  .brand span { font-size: 12px; padding-left: 8px; }
  .tools { gap: 2px; margin-left: auto; }
  .tools button { padding: 6px 8px; font-size: 12px; }
  #account { max-width: 5em; }
  .site-menu-button { order: 3; display: block; padding: 7px 4px; border: 0; font-size: 13px; }
  .topnav { display: none; position: absolute; right: 0; top: calc(100% + 4px); width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 6px 22px #203d5c21; }
  .site-menu-button[aria-expanded="true"] + .topnav { display: grid; gap: 0; }
  .topnav a { padding: 9px 13px; border-radius: 6px; }
  .topnav a[aria-current] { background: var(--wash); }
  .topnav a[aria-current]::after { display: none; }
  .hero { min-height: 235px; border-radius: 13px; }
  .hero-copy { min-width: 0; padding: 22px 0 18px 18px; }
  .hero h1 { font-size: clamp(26px,7vw,36px); }
  .hero p { font-size: 13px; margin: 12px 0 17px; }
  .hero-art { width: 26%; }
  .hero-art img { left: auto; right: -6%; transform: none; width: 114%; height: 90%; object-position: right bottom; }
  .search { gap: 7px; padding-left: 9px; }
  .search input { font-size: 13px; }
  .search button { padding: 6px 10px; font-size: 13px; }
  .section-heading h2 { font-size: 21px; }
  .collection { margin-top: 24px; scroll-margin-top: 72px; }
  .filter { gap: 8px; }
  .filter label { font-size: 12px; gap: 4px; }
  .filter select { max-width: 120px; padding: 5px; font-size: 12px; }
  .form, .box, .page-intro { padding: 17px; }
  .fileLine { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer .wrap { flex-wrap: wrap; }
}
@media(max-width: 599px) {
  .grid,.two { grid-template-columns: minmax(0,1fr); }
  .two { gap: 0; }
}
@media(max-width: 370px) {
  .head-inner { gap: 3px; }
  .brand img { width: 77px; }
  #account { max-width: 4em; }
}
#formError:empty, #fileError:empty { display: none; }

.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }
.button.primary:hover { background: var(--deep); }
.admin-entry { margin-left: 16px; color: var(--muted); }
.catalog { display: grid; grid-template-columns: 208px minmax(0,1fr); gap: 28px; align-items: start; }
.catalog-sidebar { position: sticky; top: 100px; max-height: calc(100vh - 122px); overflow-y: auto; padding-right: 20px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.catalog-sidebar h2 { font-size: 13px; font-weight: 550; letter-spacing: 0; color: var(--muted); margin: 4px 0 12px; }
.type-list { display: grid; gap: 3px; }
.type-item { display: flex; align-items: center; width: 100%; gap: 11px; padding: 10px 12px; border-color: transparent; background: transparent; font-size: 13px; text-align: left; }
.type-item small { color: var(--muted); margin-left: auto; font-size: 12px; }
.type-item[aria-pressed="true"] { background: #e5f0fa; color: var(--deep); font-weight: 650; }
.type-item:hover { background: var(--wash); border-color: transparent; }
.tag-navigation { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.tag-options { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tag-option { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; max-width: 100%; text-align: left; }
.tag-option small { color: var(--muted); font-size: 11px; }
.tag-option[aria-pressed="true"] { background: #e4f1fc; color: var(--deep); border-color: #9ebfdb; }
.catalog-content { min-width: 0; }
.catalog-progress { text-align: center; color: var(--muted); font-size: 13px; }
.catalog-progress p:not(:empty), .catalog-progress button { margin-top: 16px; }
.catalog-content > .section-heading { margin-bottom: 20px; min-height: 33px; flex-wrap: wrap; }
.catalog-content > .section-heading h2 { font-size: 23px; }
.filters-toggle { display: none; }
.cardbody h3 { margin-top: 0; }
.cardbody .tags { margin-top: 12px; }
.cardbody .tag { font-size: 11px; padding: 1px 6px; max-width: 100%; overflow-wrap: anywhere; }
.card-foot { padding-bottom: 10px; }
.like-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px; min-height: 38px; border: 0; color: var(--secondary); background: transparent; }
.like-button[aria-pressed="true"] { color: var(--deep); background: var(--wash); }
.like-button[aria-pressed="true"] .icon { fill: #bdddf6; }
.admin-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 8px 0 24px; }
.admin-heading .lead { margin-bottom: 0; }
.admin-list { padding: 0 22px 18px; }
.admin-tabs { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-tabs button { display: flex; gap: 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 14px 4px; background: transparent; font-size: 14px; color: var(--secondary); }
.admin-tabs button[aria-pressed="true"] { color: var(--deep); border-bottom-color: var(--blue); font-weight: 650; }
.admin-tabs span { font-weight: 400; font-size: 12px; color: var(--muted); align-self: center; }
.admin-search { display: flex; align-items: center; gap: 12px; color: var(--secondary); font-size: 13px; margin-bottom: 16px; }
.admin-search input { width: min(400px,70%); border: 1px solid #c8d9e7; border-radius: 7px; padding: 8px 10px; background: white; color: var(--ink); font-size: 14px; }
.admin-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.admin-cover { position: relative; flex: none; display: block; width: 116px; height: 76px; border: 1px solid var(--line); border-radius: 7px; background: var(--wash); overflow: hidden; }
.admin-cover .cover-placeholder .icon { width: 35px; height: 35px; padding: 7px; border-radius: 7px; box-shadow: 3px 3px 0 #accce8, 5px 5px 0 #8eb9dc; }
.admin-cover .cover-photo { padding: 2px; }
.admin-cover .custom-cover { padding: 0; }
.admin-info { flex: 1; min-width: 0; }
.admin-info h3 { overflow-wrap: anywhere; }
.admin-info h3 a { color: var(--ink); }
.admin-info p { color: var(--muted); font-size: 12px; margin: 5px 0; }
.admin-info .tag { font-size: 11px; }
.admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; }
.admin-actions a { color: var(--ink); }
.status-label { font-size: 12px; color: var(--deep); background: var(--wash); padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
.muted-status { color: var(--muted); background: #f0f3f6; }
.danger { color: #a23e45; border-color: #e5c8cd; }
.danger:hover { background: #fff1f1; border-color: #dbaab1; }
.admin-login { display: grid; place-items: center; min-height: 65vh; }
.admin-login form { width: min(100%,420px); padding: 28px; }
.admin-login h1 { font-size: 28px; }
.admin-login .lead { font-size: 14px; }
.admin-login label, .review-reason, .settings-form label { display: block; margin-top: 15px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.review-reason textarea { margin-top: 6px; }
.tag-picker { border: 0; padding: 0; margin: 20px 0 10px; min-width: 0; }
.tag-picker legend { padding: 0; font-size: 13px; color: var(--secondary); font-weight: 600; margin-bottom: 9px; }
.custom-tag { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.custom-tag input { flex: 1; min-width: 0; margin-top: 0 !important; }
.custom-tag button { flex: none; font-size: 13px; }
.tag-picker .feedback:empty { display: none; }
.fileLine small { display: block; color: var(--muted); font-size: 11px; }
.received { max-width: 680px; margin: 8vh auto; padding: 40px; }
.received h1 { font-size: 32px; }
.work-facts { margin: 14px 0; font-size: 13px; }
.work-facts > div { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 10px; padding: 5px 0; }
.work-facts dt { color: var(--muted); }
.work-facts dd { margin: 0; overflow-wrap: anywhere; }
.settings-form { max-width: 850px; }
.settings-form h2 { font-size: 21px; }
.settings-form input[type="search"], .settings-form select {
  display: block; width: 100%; margin-top: 5px; border: 1px solid #c8d9e7; padding: 8px 10px; border-radius: 7px; color: var(--ink); background: white; font-size: 14px; font-weight: 400;
}
#modelSearch { display: block; width: 100%; border: 1px solid #c8d9e7; padding: 8px 10px; border-radius: 7px; margin-top: 5px; font-weight: 400; }
#modelSelect, #defaultModelSelect { text-overflow: ellipsis; }
#customModelForm .feedback:empty { display: none; }
input[readonly] { background: #f3f7fa !important; color: var(--muted) !important; }
@media (max-width: 1100px) {
  .catalog { grid-template-columns: 185px minmax(0,1fr); gap: 20px; }
  .catalog .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-sidebar { padding-right: 14px; }
  .admin-row { flex-wrap: wrap; gap: 12px; }
  .admin-actions { margin-left: auto; }
}
@media (max-width: 759px) {
  .catalog { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
  .filters-toggle { display: block; text-align: left; color: var(--deep); }
  .filters-toggle::after { content: "＋"; float: right; }
  .filters-toggle[aria-expanded="true"]::after { content: "−"; }
  .catalog-sidebar { display: none; position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: white; }
  .filters-open .catalog-sidebar { display: block; }
  .type-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tag-navigation { margin-top: 15px; padding-top: 15px; }
  .catalog-content > .section-heading { margin-bottom: 14px; }
  .catalog-content > .section-heading h2 { font-size: 21px; }
  .list-actions { gap: 8px; }
  .list-actions .small { padding-inline: 4px; }
  .admin-heading { align-items: flex-start; gap: 12px; }
  .admin-heading h1 { font-size: 25px; }
  .admin-heading .lead { font-size: 13px; }
  .admin-heading .button { font-size: 13px; white-space: nowrap; }
  .admin-list { padding: 0 14px 14px; }
  .admin-tabs { gap: 10px; }
  .admin-tabs button { font-size: 12px; gap: 4px; padding: 11px 0; }
  .admin-row { align-items: flex-start; }
  .admin-cover { width: 75px; height: 58px; }
  .admin-info h3 { font-size: 16px; }
  .admin-info { flex-basis: calc(100% - 90px); }
  .admin-actions { gap: 5px; }
  .admin-actions .small { font-size: 12px; padding: 5px 7px; }
}
@media (max-width: 599px) {
  .catalog .grid { grid-template-columns: minmax(0,1fr); }
}
