:root {
  --ink: #111;
  --muted: #6b6b6b;
  --faint: #8b8b8b;
  --line: #e3e3e0;
  --paper: #fff;
  --soft: #f6f6f3;
  --soft-2: #ededeb;
  --ok: #1d6b34;
  --err: #9b2c2c;
  --radius: 8px;
  --measure: 860px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.topbar-inner {
  width: min(100% - 32px, var(--measure));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.brand-text {
  white-space: nowrap;
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mainnav a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
}

.mainnav a:hover {
  color: var(--ink);
  background: var(--soft);
  text-decoration: none;
}

.mainnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--soft);
}

.main {
  width: min(100% - 32px, var(--measure));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.view {
  min-width: 0;
}

.route-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

h1 {
  margin-bottom: 3px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.route-head__sub,
.meta,
.hint,
.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.hint {
  margin-bottom: 0;
}

.inline-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.inline-form input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d5d5d1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.inline-form input::placeholder {
  color: #a0a09a;
}

.inline-form input:focus {
  border-color: #777;
  outline: 1px solid #777;
  outline-offset: 0;
}

.inline-form button,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
}

.inline-form button:hover,
.button:hover {
  background: #2c2c2c;
  text-decoration: none;
}

.button--quiet {
  border-color: #d2d2ce;
  background: #fff;
  color: var(--ink);
}

.button--quiet:hover {
  background: var(--soft);
}

.id-form,
.direct-lookup {
  max-width: 420px;
  margin-bottom: 26px;
}

.direct-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  margin: 8px 0 0;
  color: var(--err);
  font-size: 13px;
}

.search-panel {
  margin-bottom: 26px;
}

.search-panel .inline-form {
  max-width: 560px;
}

.search-summary {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.result-list,
.work-list,
.artist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.result-list li,
.work-list li {
  border-bottom: 1px solid var(--line);
}

.artist-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 10px 3px;
}

.artist-row:hover {
  background: #fbfbf9;
  text-decoration: none;
}

.artist-row__text {
  min-width: 0;
}

.artist-row__name {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-row__account {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-row__id {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
}

.avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--soft-2);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.avatar--large {
  width: 72px;
  height: 72px;
}

.avatar__fallback {
  color: var(--muted);
  font-weight: 650;
  font-size: 18px;
  line-height: 1;
}

.avatar--large .avatar__fallback {
  font-size: 25px;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0 24px;
}

.artist-profile__main {
  min-width: 0;
}

.artist-profile h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-profile__id {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 3px;
}

.work-row:hover {
  background: #fbfbf9;
  text-decoration: none;
}

.work-row__main {
  min-width: 0;
}

.work-row__title {
  display: block;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-row__meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.work-row__id {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 10px;
}

.section-head h2 {
  margin: 0;
}

.section-head .meta {
  margin: 0;
}

.artwork-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.artwork-head h1 {
  margin-bottom: 8px;
}

.artwork-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 13px;
}

.artwork-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}

.zip-box {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.zip-box:empty {
  display: none;
}

.zip-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.zip-result .meta {
  margin: 0;
}

.image-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.image-page {
  margin: 0;
}

.image-page img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 3px;
  background: var(--soft);
  min-height: 80px;
}

.image-page figcaption {
  margin-top: 5px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.image-error {
  padding: 28px 14px;
  border: 1px dashed #d2d2ce;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.empty-state,
.loading-state {
  padding: 42px 18px;
  border: 1px dashed #d8d8d3;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.loading-state {
  border-style: solid;
  border-color: var(--line);
  background: #fcfcfa;
}

.status-area {
  margin-bottom: 22px;
}

.status {
  border: 1px solid var(--line);
  border-left: 3px solid #8f8f8a;
  border-radius: var(--radius);
  background: var(--soft);
  padding: 12px 14px;
  font-size: 14px;
}

.status p {
  margin: 0;
}

.status__line + .status__line {
  margin-top: 5px !important;
}

.status--cache {
  background: #fafaf7;
}

.status--success {
  border-left-color: var(--ok);
}

.status--success .status__lead {
  color: var(--ok);
  font-weight: 600;
}

.status--error {
  border-left-color: var(--err);
  background: #fdf8f7;
}

.status--error .status__lead {
  color: var(--err);
  font-weight: 600;
}

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

.status__warning {
  color: #8a5a00;
  font-size: 12px;
}

.linklike {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 2px;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 600;
  line-height: inherit;
}

.linklike:hover {
  color: #444;
}

.linklike:disabled {
  color: var(--muted);
  cursor: default;
}

.status__actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.footer {
  width: min(100% - 32px, var(--measure));
  margin: 0 auto;
  padding: 18px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.noscript {
  width: min(100% - 32px, var(--measure));
  margin: 24px auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

@media (max-width: 600px) {
  .topbar-inner {
    min-height: 56px;
    gap: 10px;
  }

  .brand-text {
    display: none;
  }

  .main {
    padding-top: 22px;
  }

  .artist-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .artist-row__id {
    display: none;
  }

  .artist-profile {
    align-items: flex-start;
  }

  .avatar--large {
    width: 62px;
    height: 62px;
  }

  .work-row {
    gap: 10px;
  }

  .work-row__id {
    display: none;
  }

  .inline-form {
    gap: 7px;
  }

  .inline-form button,
  .button {
    padding-left: 13px;
    padding-right: 13px;
  }

  .status {
    padding: 11px 12px;
    font-size: 13px;
  }
}
