/* =========================================================
   拾光导航 · 公共首页
   A quiet, editorial home for the good corners of the web.
   ========================================================= */

:root {
  color-scheme: light;
  --bg: #f2efe6;
  --bg-soft: #eae5d8;
  --surface: #faf8f1;
  --surface-2: #f6f2e8;
  --ink: #1c1d19;
  --ink-soft: #3d3e37;
  --muted: #717269;
  --faint: #99998e;
  --line: rgba(28, 29, 25, 0.13);
  --line-strong: rgba(28, 29, 25, 0.28);
  --accent: #c54c34;
  --accent-strong: #a73b27;
  --accent-soft: #f1d8cd;
  --accent-ink: #fff9f3;
  --forest: #20362b;
  --forest-soft: #2b4638;
  --forest-ink: #f3efe4;
  --card: rgba(252, 250, 244, 0.74);
  --shadow-sm: 0 1px 2px rgba(32, 29, 22, 0.05), 0 10px 30px rgba(32, 29, 22, 0.05);
  --shadow-lg: 0 24px 70px rgba(32, 29, 22, 0.16);
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-h: 76px;
  --page: 1360px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11120f;
  --bg-soft: #171814;
  --surface: #1b1c17;
  --surface-2: #22231d;
  --ink: #efebe0;
  --ink-soft: #d6d1c4;
  --muted: #9e9e92;
  --faint: #74746a;
  --line: rgba(239, 235, 224, 0.13);
  --line-strong: rgba(239, 235, 224, 0.28);
  --accent: #df7058;
  --accent-strong: #eb8b75;
  --accent-soft: #38221b;
  --accent-ink: #1b1410;
  --forest: #1b2b23;
  --forest-soft: #24382d;
  --forest-ink: #f1eee4;
  --card: rgba(27, 28, 23, 0.76);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 34px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.3;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 38% at 82% 8%, rgba(197, 76, 52, 0.11), transparent 70%),
    radial-gradient(ellipse 42% 34% at 8% 24%, rgba(47, 92, 72, 0.09), transparent 70%);
}

::selection {
  color: var(--accent-ink);
  background: var(--accent);
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

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

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

svg {
  display: block;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.header-inner {
  width: min(100%, var(--page));
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(14deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-copy small {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

.text-button {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.text-button:hover {
  color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

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

.button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-dark {
  background: var(--ink);
  color: var(--bg);
}

.button-dark:hover {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(197, 76, 52, 0.2);
}

.button-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.button-block {
  width: 100%;
  min-height: 48px;
}

.header-submit {
  min-height: 39px;
  padding: 0 17px;
}

.header-submit svg {
  width: 13px;
  height: 13px;
}

/* ---------- User menu ---------- */

.user-menu {
  position: relative;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.avatar-button:hover {
  border-color: var(--line-strong);
}

.avatar {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--forest-ink);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1;
}

.avatar-name {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.dropdown-head {
  padding: 9px 11px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}

.dropdown-head strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.dropdown-head span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.dropdown-item.is-danger {
  color: var(--accent);
}

.dropdown-item .mini-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
}

/* ---------- Hero ---------- */

.hero {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 92px 32px 66px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  align-items: center;
  gap: 52px;
  min-height: 630px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  margin: 0;
  max-width: 820px;
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.1vw, 74px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.hero-title > span {
  display: block;
}

.hero-title-accent {
  color: var(--accent);
  padding-left: 0.45em;
}

.hero-intro {
  max-width: 585px;
  margin: 28px 0 32px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.95;
}

.search-shell {
  position: relative;
  width: min(100%, 640px);
  height: 66px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 15px 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.search-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm);
  transform: translateY(-1px);
}

.search-icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.search-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-shell input::placeholder {
  color: var(--faint);
}

.search-shell input::-webkit-search-cancel-button {
  display: none;
}

.search-kbd {
  flex-shrink: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.search-clear {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.hero-meta b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.meta-divider {
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.meta-note {
  color: var(--muted);
}

/* Hero artwork */

.hero-art {
  position: relative;
  justify-self: end;
  width: min(100%, 440px);
  aspect-ratio: 1;
  animation: art-in 1.1s var(--ease) both 0.15s;
}

@keyframes art-in {
  from { opacity: 0; transform: scale(0.94) rotate(-2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-outer {
  inset: 0;
}

.orbit-outer::before {
  content: "";
  position: absolute;
  top: 11.5%;
  right: 10.5%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit-outer::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  animation: spin 80s linear infinite;
}

.orbit-inner {
  inset: 15.5%;
  border-color: var(--line-strong);
}

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

.sun-disc {
  position: absolute;
  inset: 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.2), transparent 38%),
    radial-gradient(circle at 70% 78%, rgba(84, 17, 8, 0.22), transparent 52%),
    var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 34px 70px rgba(151, 50, 31, 0.22);
  transform: rotate(-7deg);
}

.sun-disc::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 249, 243, 0.22);
  border-radius: 50%;
}

.sun-glyph {
  font-family: var(--font-serif);
  font-size: clamp(72px, 8vw, 112px);
  line-height: 1;
  text-shadow: 0 2px 20px rgba(80, 16, 7, 0.12);
}

.sun-caption {
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.24em;
  text-align: center;
  opacity: 0.8;
}

.art-label {
  position: absolute;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.65;
  letter-spacing: 0.16em;
}

.art-label-top {
  top: 3%;
  left: 4%;
}

.art-label-bottom {
  right: 0;
  bottom: 9%;
  text-align: right;
}

.art-cross {
  position: absolute;
  width: 13px;
  height: 13px;
}

.art-cross::before,
.art-cross::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.art-cross::before {
  top: 6px;
  left: 0;
  width: 13px;
  height: 1px;
}

.art-cross::after {
  top: 0;
  left: 6px;
  width: 1px;
  height: 13px;
}

.art-cross-a {
  top: 34%;
  left: 3%;
}

.art-cross-b {
  right: 4%;
  bottom: 27%;
}

/* ---------- Announcement ---------- */

.announcement {
  width: min(calc(100% - 64px), var(--page));
  margin: 0 auto 36px;
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.announcement-label {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.announcement p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.announcement-link {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.announcement-link span {
  color: var(--accent);
}

/* ---------- Collection ---------- */

.collection {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 34px 32px 100px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.result-count {
  margin: 0 0 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.category-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.category-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.chip-icon {
  color: var(--accent);
  font-size: 11px;
}

.category-chip.is-active .chip-icon {
  color: var(--accent);
}

.chip-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.category-chip.is-active .chip-count {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.category-note {
  min-height: 22px;
  margin: 19px 0 25px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.site-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s, background 0.3s;
}

.site-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.site-card:hover::before {
  transform: scaleX(1);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 23px;
}

.site-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 14px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.site-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
}

.tone-0 { background: #e9ddcb; color: #8a4e2e; }
.tone-1 { background: #dbe6df; color: #315e48; }
.tone-2 { background: #e4dfe9; color: #594b72; }
.tone-3 { background: #f0dcd5; color: #9c4b37; }
.tone-4 { background: #e0e5ea; color: #405b70; }
.tone-5 { background: #eee5c9; color: #77602c; }

[data-theme="dark"] .tone-0 { background: #3a2d21; color: #e6bea0; }
[data-theme="dark"] .tone-1 { background: #23382e; color: #a8cfb9; }
[data-theme="dark"] .tone-2 { background: #302c3b; color: #c8b9e4; }
[data-theme="dark"] .tone-3 { background: #39251f; color: #e3a68f; }
[data-theme="dark"] .tone-4 { background: #25313a; color: #b0cadc; }
[data-theme="dark"] .tone-5 { background: #37311d; color: #dac886; }

.card-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--faint);
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}

.card-arrow svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-card:hover .card-arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: rotate(45deg);
}

.card-body {
  flex: 1;
}

.card-category {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.featured-mark {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: none;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.card-description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.78;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-tag {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.card-clicks {
  flex-shrink: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.skeleton-card {
  min-height: 248px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 75%, transparent) 38%, transparent 56%) 0 0 / 220% 100%,
    var(--card);
  animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
  to { background-position: -220% 0, 0 0; }
}

.empty-state {
  padding: 76px 24px 60px;
  text-align: center;
}

.empty-glyph {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- About ---------- */

.about {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 0 32px 110px;
}

.about-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 6vw, 76px);
  border-radius: 30px;
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, rgba(197, 76, 52, 0.2), transparent 70%),
    var(--forest);
  color: var(--forest-ink);
}

.about-inner::before {
  content: "拾";
  position: absolute;
  right: -10px;
  bottom: -100px;
  color: rgba(243, 239, 228, 0.045);
  font-family: var(--font-serif);
  font-size: 360px;
  line-height: 1;
  pointer-events: none;
}

.about-head {
  position: relative;
  display: grid;
  grid-template-columns: 0.7fr 1.6fr;
  gap: 30px;
  align-items: start;
}

.about-head .section-eyebrow {
  color: #d9826c;
  padding-top: 12px;
}

.about-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.03em;
}

.principles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 62px;
  padding-top: 30px;
  border-top: 1px solid rgba(243, 239, 228, 0.18);
}

.principle-index {
  display: block;
  margin-bottom: 20px;
  color: #d9826c;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.principle h3 {
  margin: 0 0 9px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
}

.principle p {
  margin: 0;
  color: rgba(243, 239, 228, 0.62);
  font-size: 12.5px;
  line-height: 1.8;
}

.about-stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 42px;
  margin-top: 66px;
  padding-top: 28px;
  border-top: 1px solid rgba(243, 239, 228, 0.18);
}

.about-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-stats strong {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.about-stats span {
  color: rgba(243, 239, 228, 0.5);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

/* ---------- Footer ---------- */

.site-footer {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 0 32px 32px;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

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

.footer-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 17px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.footer-brand p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  font-size: 11.5px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom p:nth-child(2):empty {
  display: none;
}

.back-top {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.back-top:hover {
  color: var(--accent);
}

/* ---------- Dialogs & forms ---------- */

.sheet {
  width: min(calc(100% - 32px), 468px);
  max-height: min(88vh, 780px);
  margin: auto;
  padding: 34px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.sheet-wide {
  width: min(calc(100% - 32px), 620px);
}

.sheet::backdrop {
  background: rgba(17, 18, 15, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sheet[open] {
  animation: sheet-in 0.32s var(--ease);
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}

.sheet-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: rotate(90deg);
}

.sheet-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.sheet-head {
  padding-right: 22px;
  margin-bottom: 24px;
}

.sheet-kicker {
  margin: 0 0 9px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.17em;
}

.sheet-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.sheet-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--surface-2);
}

.auth-tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.field > span em {
  color: var(--faint);
  font-style: normal;
  font-weight: 400;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.7;
}

.field select {
  appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}

.field-hint {
  color: var(--faint);
  font-size: 9.5px;
}

.form-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  line-height: 1.5;
}

.sheet-foot {
  margin: 18px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 11px;
}

.inline-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: inherit;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.submission-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.submission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.submission-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 14px;
}

.submission-main {
  min-width: 0;
  flex: 1;
}

.submission-main strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-main span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--faint);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.status-pending { background: #f1e7cb; color: #826821; }
.status-approved { background: #dce9df; color: #2c6446; }
.status-rejected { background: #efddd8; color: #934332; }

[data-theme="dark"] .status-pending { background: #3a311c; color: #dcc277; }
[data-theme="dark"] .status-approved { background: #20362a; color: #9dceb1; }
[data-theme="dark"] .status-rejected { background: #3a241f; color: #e0a08d; }

/* ---------- Toast & misc ---------- */

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(calc(100% - 44px), 340px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  line-height: 1.6;
  pointer-events: auto;
  animation: toast-in 0.35s var(--ease);
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  margin-top: 6px;
  border-radius: 50%;
  background: #8fc3a3;
}

.toast.is-error::before {
  background: #e68b75;
}

.toast.is-leaving {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 400;
  padding: 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 26px;
  }

  .hero-art {
    width: min(100%, 380px);
  }

  .main-nav {
    gap: 20px;
  }

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

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 66px;
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(48px, 7.5vw, 74px);
  }

  .hero-art {
    display: none;
  }

  .hero-copy {
    max-width: 760px;
  }

  .about-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .about-head .section-eyebrow {
    padding-top: 0;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .principles article {
    max-width: 520px;
  }

  .main-nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 66px;
  }

  .header-inner {
    padding: 0 17px;
    gap: 10px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 6.5px;
    margin-top: 4px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-submit {
    min-height: 34px;
    padding: 0 12px;
  }

  .header-submit span {
    display: none;
  }

  .header-submit svg {
    width: 15px;
    height: 15px;
  }

  .avatar-name {
    display: none;
  }

  .avatar-button {
    padding: 3px;
    border: 0;
    background: none;
  }

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

  .icon-button {
    width: 33px;
    height: 33px;
  }

  .text-button {
    font-size: 12px;
    padding: 6px 2px;
  }

  .hero {
    padding: 48px 17px 38px;
  }

  .kicker {
    margin-bottom: 20px;
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .hero-title {
    font-size: clamp(30px, 9vw, 54px);
    line-height: 1.2;
    letter-spacing: -0.05em;
  }

  .hero-title-accent {
    padding-left: 0.15em;
  }

  .hero-intro {
    margin: 20px 0 24px;
    font-size: 13.5px;
    line-height: 1.85;
  }

  .search-shell {
    height: 58px;
    padding: 0 12px 0 16px;
    border-radius: 13px;
    gap: 10px;
  }

  .search-shell input {
    font-size: 14px;
  }

  .search-kbd {
    display: none;
  }

  .hero-meta {
    gap: 9px;
    margin-top: 16px;
    font-size: 8.5px;
  }

  .hero-meta b {
    font-size: 10px;
  }

  .meta-note {
    display: none;
  }

  .meta-divider:last-of-type {
    display: none;
  }

  .announcement {
    width: calc(100% - 34px);
    margin-bottom: 16px;
    padding: 12px 0;
    gap: 10px;
  }

  .announcement p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .announcement-link {
    display: none;
  }

  .collection {
    padding: 22px 17px 70px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .result-count {
    font-size: 8.5px;
  }

  .category-chip {
    height: 36px;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .category-note {
    margin: 15px 0 19px;
    font-size: 11px;
  }

  .site-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .site-card {
    min-height: 0;
    padding: 19px;
  }

  .card-top {
    margin-bottom: 17px;
  }

  .card-description {
    font-size: 12.5px;
    -webkit-line-clamp: 2;
  }

  .card-foot {
    margin-top: 17px;
    padding-top: 12px;
  }

  .card-title {
    font-size: 19px;
  }

  .about {
    padding: 0 17px 70px;
  }

  .about-inner {
    padding: 34px 24px;
    border-radius: 22px;
  }

  .about-quote {
    font-size: 28px;
    line-height: 1.5;
  }

  .principles {
    margin-top: 40px;
  }

  .about-stats {
    gap: 26px;
    margin-top: 40px;
  }

  .about-stats strong {
    font-size: 26px;
  }

  .site-footer {
    padding: 0 17px 24px;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 26px 0;
  }

  .footer-links {
    gap: 17px;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 8px 15px;
  }

  .back-top {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .sheet {
    width: calc(100% - 20px);
    padding: 28px 22px;
    border-radius: 18px;
    max-height: calc(100vh - 20px);
  }

  .sheet-head h2 {
    font-size: 26px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
