/* ==========================================================================
   六花书画投稿系统 · 统一样式
   标准网页配色：白底 / 灰阶文字 / 蓝色主色，无纹理与背景图
   ========================================================================== */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #111827;
  --text-2: #374151;
  --text-3: #6b7280;
  --muted: #9ca3af;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff4ff;
  --success: #15803d;
  --success-soft: #ecfdf3;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 6px -2px rgba(16, 24, 40, 0.05), 0 12px 16px -4px rgba(16, 24, 40, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--text-2);
  background-color: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

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

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

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ------------------------------------------------------------------ 页头 */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.seal {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 1px;
  padding: 0 0 1px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-text b {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-3);
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ------------------------------------------------------------------ 首页主视觉 */

main {
  flex: 1 0 auto;
  padding-bottom: 40px;
}

.hero {
  position: relative;
  padding: clamp(32px, 7vw, 72px) 0 clamp(8px, 2vw, 16px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--primary);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2rem, 6.4vw, 3.1rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.lede {
  margin: 16px auto 0;
  max-width: 30em;
  font-size: clamp(0.92rem, 3.4vw, 1rem);
  color: var(--text-3);
}

/* 入口卡片 */

.entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.4vw, 18px);
  max-width: 760px;
  margin: clamp(26px, 4vw, 40px) auto 0;
}

.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(20px, 3.4vw, 28px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 140px;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.entry:active {
  transform: translateY(0);
}

.entry-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  margin-bottom: 4px;
}

.entry b {
  font-size: clamp(1.05rem, 3.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.entry small {
  font-size: 0.82rem;
  color: var(--text-3);
}

.entry--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2), 0 8px 20px -8px rgba(37, 99, 235, 0.5);
}

.entry--primary b {
  color: #fff;
}

.entry--primary small {
  color: rgba(255, 255, 255, 0.82);
}

.entry--primary .entry-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.entry--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25), 0 14px 28px -10px rgba(37, 99, 235, 0.55);
}

.entry--primary::after {
  content: "→";
  position: absolute;
  right: clamp(16px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 20px);
  font-size: 1rem;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.entry--primary:hover::after {
  transform: translateX(4px);
  opacity: 1;
}

.hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--muted);
}

.hints li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hints li + li::before {
  content: "·";
  margin-right: 4px;
  color: var(--border-strong);
}

/* ------------------------------------------------------------------ 画廊 */

.section {
  padding: clamp(32px, 6vw, 56px) 0 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(18px, 3vw, 24px);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.1rem, 3.6vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.section-head p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-3);
}

.count {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 16px);
}

.art {
  position: relative;
  flex: 1 1 clamp(160px, 21vw, 260px);
  max-width: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.art:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.art:hover img {
  transform: scale(1.03);
}

.art .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(17, 24, 39, 0.7));
  color: #f9fafb;
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.art:hover .cap,
.art:focus-visible .cap {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: #d97706;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
}

.rank-badge[data-rank="2"] {
  background: #64748b;
}

.rank-badge[data-rank="3"] {
  background: #92400e;
}

.empty {
  grid-column: 1 / -1;
  flex: 1 1 100%;
  width: 100%;
  padding: clamp(34px, 8vw, 60px) 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 0.9rem;
  background: var(--surface);
}

/* ------------------------------------------------------------------ 表单 */

.panel {
  width: min(620px, 100%);
  margin: clamp(20px, 4vw, 32px) auto 0;
  padding: clamp(20px, 5vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-title {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.page-sub {
  margin: 0 0 24px;
  font-size: 0.86rem;
  color: var(--text-3);
}

.field {
  margin-bottom: 20px;
}

.field > label:not(.drop),
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-2);
}

.field-label .opt {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  font-size: 0.78rem;
}

.input {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:hover {
  border-color: #9ca3af;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input::placeholder {
  color: var(--muted);
}

.hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
}

/* 来源选择 */

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

.source {
  position: relative;
  display: block;
  cursor: pointer;
}

.source input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.source span {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.16s;
}

.source:hover span {
  border-color: #9ca3af;
  background: var(--surface-2);
}

.source input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.source input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 「其他来源」自由输入框：和上面的来源按钮同高同宽 */
.source-input {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
}

.source-input.has-value {
  text-align: left;
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

/* 拖拽区 */

.drop {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: clamp(26px, 6vw, 40px) 18px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
  min-height: 168px;
  overflow: hidden;
}

.drop:hover,
.drop.is-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.drop-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.drop-sub {
  font-size: 0.79rem;
  color: var(--text-3);
}

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-wrap {
  display: none;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.preview-wrap.is-on {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
}

.preview-wrap img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.preview-meta {
  min-width: 0;
  font-size: 0.8rem;
  color: var(--text-3);
}

.preview-meta > span {
  display: block;
  line-height: 1.5;
}

.preview-meta b {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-meta .ok {
  color: var(--success);
}

.preview-meta .warn {
  color: var(--danger);
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.12s;
  background: var(--primary);
  color: #fff;
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--block {
  width: 100%;
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border-strong);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: #9ca3af;
}

.btn--sm {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 0.82rem;
}

.btn--seal {
  background: var(--primary);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 进度条 */

.progress {
  display: none;
  height: 4px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress.is-on {
  display: block;
}

.progress i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.status-line {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--text-3);
  min-height: 1.2em;
}

/* 成功态 */

.done {
  display: none;
  text-align: center;
  padding: 12px 0 4px;
}

.done.is-on {
  display: block;
}

.done-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  background: var(--success);
}

.done h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.done p {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* 提示条 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  z-index: 90;
  max-width: min(90vw, 460px);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #f9fafb;
  font-size: 0.86rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  text-align: center;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-bad {
  background: #991b1b;
}

/* 灯箱 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(17, 24, 39, 0.85);
}

.lightbox.is-on {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(1000px, 100%);
  max-height: 100%;
}

.lightbox-figure img {
  max-height: 78dvh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.lightbox-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: center;
  font-size: 0.8rem;
  color: rgba(249, 250, 251, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(249, 250, 251, 0.25);
  background: rgba(249, 250, 251, 0.1);
  color: #f9fafb;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(249, 250, 251, 0.2);
}

/* ------------------------------------------------------------------ 管理后台 */

.admin-main {
  padding-bottom: 48px;
}

.login-card {
  width: min(400px, 100%);
  margin: clamp(30px, 9vh, 70px) auto 0;
  padding: clamp(24px, 6vw, 36px) clamp(20px, 5vw, 32px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.login-card .seal {
  margin: 0 auto 14px;
  width: 48px;
  height: 48px;
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.login-card p {
  margin: 0 0 22px;
  font-size: 0.82rem;
  color: var(--text-3);
}

.login-card .field {
  text-align: left;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.admin-bar h1 {
  margin: 0;
  font-size: clamp(1.1rem, 3.6vw, 1.3rem);
  font-weight: 600;
  color: var(--text);
}

.admin-bar .who {
  font-size: 0.78rem;
  color: var(--text-3);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stat {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat b {
  display: block;
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

.stat span {
  font-size: 0.74rem;
  color: var(--text-3);
}

.stat--seal b {
  color: var(--primary);
}

.stat--rank[data-rank="1"] b {
  color: #d97706;
}

.stat--rank[data-rank="2"] b {
  color: #64748b;
}

.stat--rank[data-rank="3"] b {
  color: #92400e;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-3);
  transition: all 0.16s;
  min-height: 34px;
}

.chip:hover {
  border-color: #9ca3af;
  color: var(--text);
}

.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.toolbar .spacer {
  flex: 1 1 auto;
}

.search {
  position: relative;
  min-width: 150px;
  flex: 0 1 200px;
}

.search .input {
  padding-left: 32px;
  font-size: 0.86rem;
}

.search::before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--muted);
  pointer-events: none;
}

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.work {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s;
  align-items: flex-start;
}

.work:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.work-thumb {
  flex: none;
  width: 92px;
  height: 116px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  padding: 0;
  position: relative;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-3);
  white-space: nowrap;
  background: var(--surface-2);
}

.tag--pending {
  background: var(--warning-soft);
  border-color: #fcd34d;
  color: var(--warning);
}

.tag--approved {
  background: var(--success-soft);
  border-color: #86efac;
  color: var(--success);
}

.tag--rejected {
  background: var(--danger-soft);
  border-color: #fca5a5;
  color: #b91c1c;
}

.tag--rank {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.tag--rank[data-rank="2"] {
  background: #64748b;
  border-color: #64748b;
}

.tag--rank[data-rank="3"] {
  background: #92400e;
  border-color: #92400e;
}

.work-qq {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.work-meta {
  font-size: 0.73rem;
  color: var(--text-3);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.work-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.rank-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.8rem;
  padding: 5px 8px;
  min-height: 34px;
  cursor: pointer;
}

.rank-select:hover {
  border-color: #9ca3af;
}

.note-input {
  width: 100%;
  font-size: 0.79rem;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.note-input:hover {
  border-color: var(--border-strong);
}

.note-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ------------------------------------------------------------------ 页脚 */

.site-foot {
  flex: none;
  padding: 20px 0 26px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: space-between;
  align-items: center;
}

.site-foot a:hover {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ 响应式 */

@media (max-width: 640px) {
  .site-head {
    padding: 12px 0 4px;
  }

  .brand-text span {
    display: none;
  }

  .brand-text b {
    font-size: 0.95rem;
  }

  .seal {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .site-nav a {
    padding: 8px 9px;
    font-size: 0.82rem;
  }

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

  .entry {
    min-height: 96px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .entry-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    margin-bottom: 0;
  }

  .entry b {
    flex: 1 1 auto;
  }

  .entry small {
    flex: 1 1 100%;
    padding-left: 42px;
  }

  .entry--primary::after {
    bottom: 50%;
    transform: translateY(50%);
  }

  .entry--primary:hover::after {
    transform: translateY(50%) translateX(4px);
  }

  .gallery {
    gap: 8px;
  }

  .art {
    flex: 0 0 calc(50% - 4px);
    max-width: none;
  }

  .hints li + li::before {
    content: none;
  }

  .hints {
    gap: 4px 8px;
  }

  .panel {
    padding: 20px 16px;
  }

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

  .work-thumb {
    width: 78px;
    height: 100px;
  }

  .toolbar {
    gap: 6px;
  }

  .search {
    flex: 1 1 100%;
  }

  .lightbox-figure img {
    max-height: 74dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* 细滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
