:root {
  color-scheme: dark;
  --background: #0b0c0d;
  --paper: #141817;
  --ink: #edf2ef;
  --muted: #a7b5af;
  --line: #34413c;
  --green: #9ce4ae;
  --control: #1b2722;
  --control-hover: #293b32;
  --selected: #245644;
  --cover-background: radial-gradient(ellipse at 65% 120%, #315d4b, transparent 63%), linear-gradient(115deg, #10251f, #263d33);
  --mint: #b9f492;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f6f7f4;
  --paper: #fff;
  --ink: #192630;
  --muted: #58676e;
  --line: #e0e7e3;
  --green: #17664e;
  --control: #f4f8f4;
  --control-hover: #e8f3e9;
  --selected: #174d3f;
  --cover-background: radial-gradient(ellipse at 65% 120%, #cef1d5, transparent 63%), linear-gradient(115deg, #1b604b, #9ccb9c);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
a { color: inherit; text-decoration: none; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) min(40vw, 380px) minmax(max-content, 1fr); align-items: center; gap: 16px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; justify-self: end; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 11px; font-size: 30px; font-weight: 850; line-height: 1.05; white-space: nowrap; }
.brand-mark { flex: none; border-radius: 11px; }
#random { white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 700; }
.button-quiet { background: var(--control); color: var(--green); border: 1px solid var(--line); }
.button-quiet:hover:not(:disabled) { background: var(--control-hover); }
.shuffle { font-size: 20px; line-height: 1; }
.theme-toggle { flex: none; width: 44px; height: 44px; padding: 0; }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .theme-icon-moon, [data-theme="light"] .theme-icon-sun { display: none; }

.hero { position: relative; isolation: isolate; margin-top: 24px; min-height: 290px; overflow: hidden; border-radius: 22px; padding: 28px 44px; display: flex; align-items: center; justify-content: space-between; gap: 28px; color: white; background: radial-gradient(ellipse at 82% 70%, #226450, transparent 48%), linear-gradient(115deg, #0d2525 11%, #123d33 65%, #0e413d); }
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .2; background-image: radial-gradient(#8ec2ae 1px, transparent 1px); background-size: 19px 19px; mask-image: linear-gradient(100deg, transparent 25%, #000); }
.eyebrow { font: 700 11px/1.3 ui-monospace, monospace; letter-spacing: .19em; color: #c1e6c8; margin: 0 0 13px; display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 7px; height: 7px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 12px #b9f492a0; }
h1 { margin: 0; font-size: clamp(31px, 3.9vw, 55px); font-weight: 850; letter-spacing: -.065em; line-height: 1.15; }
h1 span { color: var(--mint); display: block; }
.stats { display: flex; margin: 20px 0 0; gap: 22px; }
.stats div { display: flex; flex-direction: column-reverse; gap: 3px; padding-right: 21px; border-right: 1px solid #ffffff2b; }
.stats div:last-child { padding-right: 0; border: 0; }
.stats dt { color: #aac6bc; font-size: 11px; }
.stats dd { margin: 0; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.orbit { pointer-events: none; position: absolute; z-index: -1; width: 600px; height: 430px; right: -40px; top: -49px; transform: rotate(-24deg); }
.orbit i { position: absolute; inset: 11% 4%; border: 1px solid #b0f1a454; border-radius: 50%; }
.orbit i:nth-child(2) { inset: 20% 1%; }
.orbit i:nth-child(3) { inset: 29% 5%; }
.orbit i:nth-child(4) { inset: 37% -3%; }
.orbit b { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #c3fca0; box-shadow: 0 0 17px #c3fc9fbd; top: 23%; left: 19%; }
.orbit b:nth-last-child(2) { top: 61%; left: 90%; width: 6px; height: 6px; }
.orbit b:last-child { top: 72%; left: 66%; width: 5px; height: 5px; }
.spotlight { width: 290px; flex: none; padding: 18px; margin-top: 35px; border-radius: 15px; background: #102c26d9; backdrop-filter: blur(10px); border: 1px solid #e3ffdf3b; box-shadow: 0 12px 42px #09292277; }
.spotlight-label { font-weight: 700; font-size: 11px; color: #c9efc0; letter-spacing: .12em; margin-bottom: 12px; }
.spotlight-label span { color: var(--mint); margin-right: 3px; }
.spotlight-profile { width: 100%; padding: 0; color: white; border: 0; background: transparent; display: flex; align-items: center; gap: 11px; text-align: left; border-radius: 8px; }
.spotlight-profile:focus-visible { outline-color: var(--mint); }
.spotlight-avatar { width: 44px !important; height: 44px !important; border-width: 1px !important; }
.spotlight-identity { flex: 1; min-width: 0; }
.spotlight-identity strong, .spotlight-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotlight-identity strong { font-size: 15px; }
.spotlight-identity small { margin-top: 3px; color: #b3cdc4; font-size: 11px; }
.spotlight-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #ffffff14; color: var(--mint); }
.spotlight-profile:hover .spotlight-arrow { background: #ffffff2a; }

#directory { scroll-margin-top: 20px; padding-top: 24px; }
.searchbox { width: 100%; height: 43px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; padding: 0 11px; gap: 11px; }
.searchbox:focus-within { border-color: var(--green); }
.search-icon { width: 12px; height: 12px; color: var(--muted); border: 1.5px solid currentColor; border-radius: 50%; position: relative; flex: none; margin-right: 2px; }
.search-icon::after { content: ""; position: absolute; background: currentColor; width: 5px; height: 1.5px; left: 8px; top: 9px; transform: rotate(45deg); }
.searchbox input { border: 0; min-width: 0; flex: 1; height: 100%; background: transparent; color: var(--ink); font-size: 13px; }
.searchbox input::placeholder { color: var(--muted); opacity: 1; }
.searchbox input:focus-visible { outline: none; }
.searchbox kbd { border-radius: 4px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); background: var(--control); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; min-width: 0; }
.filter { border-radius: 8px; border: 1px solid var(--line); padding: 7px 12px; white-space: nowrap; font-size: 12px; font-weight: 650; color: var(--ink); background: var(--paper); min-height: 35px; }
.filter[data-tag] { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.filter:hover { border-color: var(--green); }
.filter[aria-pressed="true"] { color: #fff; background: var(--selected); border-color: var(--selected); }
#filter-count { margin-left: 3px; color: #b9efcc; }
.filter:not([aria-pressed="true"]) #filter-count { color: var(--green); }
.sort { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; flex: none; align-self: flex-start; }
.sort select { border-radius: 8px; padding: 7px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.status { margin: 13px 0 10px; color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.more { display: flex; margin: 18px auto 0; }
.data-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card { overflow: hidden; border-radius: 15px; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover, .card:focus-within { box-shadow: 0 12px 25px #1b52411a; transform: translateY(-2px); }
.cover { position: relative; height: 117px; flex: none; overflow: hidden; background: var(--cover-background); }
.cover-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { position: relative; display: flex; flex-direction: column; flex: 1; padding: 0 16px; min-width: 0; }
.avatar-row { display: flex; align-items: center; min-height: 34px; }
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; width: 60px; height: 60px; aspect-ratio: 1; border: 3px solid var(--paper); border-radius: 50%; overflow: hidden; color: var(--green); background: var(--control); font-size: 18px; font-weight: 800; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-row .avatar { margin-top: -31px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin: 6px 0 0; padding: 0; list-style: none; }
.tag { max-width: 100%; border-radius: 6px; padding: 3px 8px; color: var(--green); background: var(--control); font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.profile-name { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.profile-name h3, .profile-name h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
.verified { width: 15px; height: 15px; border-radius: 50%; background: #1779bf; color: #fff; display: inline-grid; place-items: center; font: 800 11px/1 system-ui; flex: none; }
.handle { margin-top: 3px; color: var(--muted); font: 12px/1.35 ui-monospace, monospace; overflow-wrap: anywhere; }
.bio { color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.card .bio { margin: 9px 0 13px; min-height: 42px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-footer { margin-top: auto; padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.follower-count { font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.detail-button, .card-link { border: 0; border-radius: 6px; padding: 4px 5px; color: var(--green); background: transparent; font-size: 12px; font-weight: 750; white-space: nowrap; }
.detail-button:hover, .card-link:hover { background: var(--control-hover); }
.card-link span { font-size: 14px; }
.feedback { max-width: 640px; margin: 40px 0 0; }
.feedback h2 { margin: 0 0 10px; font-size: 24px; }
.feedback iframe { display: block; width: 100%; border: 0; }
[data-theme="dark"] .feedback iframe { color-scheme: light; background: #fff; border-radius: 12px; }
.feedback-link { color: var(--green); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 35px; padding-block: 20px 27px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.footer-links a { width: 44px; height: 44px; padding: 0; }
.footer-links svg { width: 18px; height: 18px; }

#profile { position: fixed; background: var(--paper); color: var(--ink); border: 0; border-radius: 18px; padding: 0; width: min(470px, calc(100% - 30px)); box-shadow: 0 20px 80px #071f2a60; }
#profile::backdrop { background: #0f222bb0; backdrop-filter: blur(4px); }
#profile .cover { height: 148px; }
.close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: #14302cdd; font-size: 23px; line-height: 1; }
.dialog-body { position: relative; padding: 0 22px 22px; }
.dialog-body .avatar { width: 76px; height: 76px; margin-top: -38px; }
.profile-data { display: flex; flex-wrap: wrap; gap: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-data dt { font-size: 12px; color: var(--muted); }
.profile-data dd { margin: 3px 0 0; font-size: 14px; font-weight: 700; }
.visit { color: white; background: var(--selected); }
.visit:hover { background: #246952; }

@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .hero { padding: 36px 32px; }
  .spotlight { width: 240px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding-block: 10px; }
  .brand { font-size: 26px; }
  .shuffle { display: none; }
  .searchbox { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 380px; }
  .searchbox input { font-size: 16px; }
  .hero { margin-top: 15px; padding: 27px 20px; border-radius: 16px; display: block; min-height: auto; }
  .stats { gap: 13px; }
  .stats div { padding-right: 13px; }
  .orbit { right: -300px; top: -65px; }
  .spotlight { width: min(100%, 290px); margin-top: 20px; padding: 12px; }
  .toolbar { flex-wrap: wrap; }
  .sort { margin-left: auto; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
