:root {
  color-scheme: dark;
  --canvas: #171318;
  --surface: #221c23;
  --ink: #fff7f0;
  --muted: #c4b6bd;
  --line: #41323b;
  --accent: #aa2b44;
  --accent-hover: #bf3450;
  --accent-text: #ffb3bb;
  --tint: #38252e;
  --focus: #ffcbb7;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  padding-bottom: calc(91px + env(safe-area-inset-bottom));
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--accent-text); color: var(--canvas); }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; flex: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: min(1096px, calc(100% - 64px)); margin-inline: auto; }

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  min-height: 71px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 750 1.36rem/1 var(--sans);
  letter-spacing: .065em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  border: 1px solid #e0647777;
  background: linear-gradient(145deg, #b93852, #8e213a);
  color: #fff4ed;
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-type {
  margin-left: 11px;
  padding-left: 11px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .07em;
}

.contact-link, .hero-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-size: .9rem;
  text-align: center;
  transition: background-color .2s ease, border-color .2s ease;
}
.contact-outline { color: var(--ink); background: transparent; border-color: #69515e; }
.contact-outline:hover { background: var(--tint); }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 375px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid #4b303a;
  border-radius: 24px;
  color: #fffaf0;
  background: #21151c;
}
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right 55%; z-index: -2; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #171017f5 1%, #191119c7 28%, #1d111951 53%, transparent 76%);
}
.hero-copy { padding: 34px clamp(28px, 6vw, 78px); }
.hero h1 {
  font: 700 clamp(2.75rem, 5vw, 4.15rem)/1.13 var(--serif);
  letter-spacing: .035em;
  text-shadow: 0 3px 24px #0f0b0ed9;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.hero p { margin-top: 16px; color: #f5dfe0; white-space: pre-line; }
.hero-action {
  margin-top: 21px;
  border-color: #ffffff26;
  color: #fff;
  background: var(--accent);
  padding-inline: 22px;
}
.hero-action:hover { background: var(--accent-hover); }

.directory { margin-top: 34px; scroll-margin-top: 16px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-head h1, .section-head h2, .sheet h2 {
  font: 700 2rem/1.25 var(--serif);
  letter-spacing: .04em;
}
.section-head p { color: var(--muted); margin-top: 6px; font-size: .94rem; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(280px, 100%);
  min-height: 44px;
  padding: 0 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.search-box:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-box input { min-width: 0; width: 100%; padding: 8px 0; outline: none; border: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: var(--muted); }

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 14px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}
.filter:hover { background: var(--tint); }
.filter[aria-pressed="true"] { background: var(--tint); border-color: #bf6277; color: #ffd0d4; }
.results { flex: none; color: var(--muted); font-size: .875rem; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: border-color .2s ease;
}
.card:hover, .card:focus-within { border-color: #ac6376; }
.card-button {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  text-align: left;
  background: transparent;
}
.card-button:focus-visible { outline-offset: -3px; }
.card-media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.18; background: var(--tint); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.card-initial { color: var(--accent-text); font-size: 2.5rem; }
.card-body { display: flex; flex: 1; width: 100%; flex-direction: column; align-items: start; gap: 9px; padding: 13px 14px; }
.card-name { font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { max-width: 100%; padding: 2px 7px; border-radius: 5px; background: var(--tint); color: #ebc8cf; font-size: .8125rem; overflow-wrap: anywhere; }
.card-action {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  min-height: 37px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--accent-text);
  font-size: .875rem;
  font-weight: 650;
}
.empty {
  padding: 35px 16px;
  text-align: center;
  background: var(--surface);
  color: var(--muted);
  border: 1px dashed #725762;
  border-radius: 16px;
}
.empty p { margin: 7px 0 4px; }
.text-button { min-height: 44px; background: transparent; padding-inline: 14px; border: 0; text-decoration: underline; color: var(--accent-text); }

.latest { margin-top: 34px; }
.latest-link { display: flex; align-items: center; gap: 16px; margin-top: 13px; padding: 12px; border-block: 1px solid var(--line); }
.latest-link:hover { background: var(--surface); }
.latest-link img { width: 96px; height: 68px; object-fit: cover; flex: none; border-radius: 8px; }
.latest-link time { display: block; color: var(--muted); font-size: .8125rem; }
.latest-link strong { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.latest-more { margin-left: auto; flex: none; color: var(--accent-text); font-size: .875rem; }
.updates { width: min(100%, 740px); margin: 31px auto 0; }
.feed { display: grid; gap: 16px; margin-top: 18px; }
.post {
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.post-body { padding: 18px; }
.post-byline { display: flex; gap: 10px; align-items: center; margin-bottom: 13px; }
.post-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: var(--accent-text);
  background: var(--tint);
}
.post-author { display: block; color: var(--ink); font-size: .875rem; font-weight: 650; }
.post time { display: block; color: var(--muted); font-size: .8125rem; }
.post h2 { font-size: 1.125rem; line-height: 1.35; }
.post p { margin-top: 7px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.post-image { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tint); }
.updates .empty { margin-top: 16px; }

.footer { padding: 22px 0; color: var(--muted); text-align: center; font-size: .8125rem; }
.footer span { display: block; }
.icp-link { display: inline-flex; min-height: 44px; align-items: center; padding: 5px 8px; text-decoration: underline; text-underline-offset: 3px; }
.dock {
  position: fixed;
  z-index: 2;
  inset: auto 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -4px 24px #0805094f;
}
.dock-inner {
  width: min(100%, 552px);
  margin-inline: auto;
  padding: 4px max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.dock-item {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 11px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.3;
  text-align: center;
}
.dock-item svg { width: 22px; height: 22px; }
.dock-item:hover { background: var(--tint); }
.dock-item[aria-current="page"] { background: var(--tint); color: var(--accent-text); font-weight: 700; }
.dock-contact { color: #ffe2e6; }
.dock-contact svg { color: var(--accent-text); }

.sheet {
  width: min(455px, calc(100% - 32px));
  max-height: min(92dvh, 720px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 15px 64px #080508b3;
}
.sheet::backdrop { background: #0c080cbb; }
.close-button {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
}
.profile-photo { width: 100%; height: min(33dvh, 290px); object-fit: cover; object-position: center 41%; background: var(--tint); }
.sheet-content { padding: 22px 22px 25px; }
.sheet .tags { margin: 9px 0 15px; }
.sheet p { color: var(--muted); }
#profile-bio { white-space: pre-line; overflow-wrap: anywhere; }
.service-note { margin-top: 12px; font-size: .875rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-actions .primary { flex: 1; }
.copy-status { margin-top: 9px; font-size: .875rem; }
.notice .sheet-content { padding-top: 30px; }
.notice-icon { display: grid; place-items: center; margin-bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--accent-text); }
.notice p { margin: 12px 0 18px; }

@media (max-width: 780px) {
  .wrap { width: calc(100% - 36px); }
  .hero { min-height: 320px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-media { aspect-ratio: 1.3; }
}

@media (max-width: 500px) {
  .topbar-inner { min-height: 64px; }
  .brand { font-size: 1.2rem; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-type { margin-left: 8px; padding-left: 8px; }
  .hero { min-height: 252px; border-radius: 16px; margin-top: 14px; }
  .hero-image { object-position: 65% center; }
  .hero::before { background: linear-gradient(90deg, #160f17eb, #160f17a0 39%, #160f172b 76%), linear-gradient(0deg, #170f17b3, transparent 55%); }
  .hero-copy { padding: 24px 19px; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.7rem); }
  .hero p { margin-top: 12px; font-size: .875rem; }
  .hero-action { margin-top: 15px; }
  .directory { margin-top: 25px; }
  .section-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .section-head h1, .section-head h2 { font-size: 1.75rem; }
  .search-box { width: 100%; }
  .filter-row { gap: 6px; margin: 12px 0; align-items: flex-start; flex-direction: column; }
  .filters { gap: 5px; }
  .filter { padding: 5px 10px; }
  .results { font-size: .8125rem; }
  .card-media { aspect-ratio: 1.16; }
  .card-body { padding: 9px 10px; gap: 7px; }
  .card-name { font-size: 1.06rem; }
  .tag { font-size: .75rem; padding: 2px 5px; }
  .latest { margin-top: 26px; }
  .latest-link { gap: 10px; padding-inline: 0; }
  .latest-link img { width: 62px; height: 54px; }
  .updates { margin-top: 23px; }
  .post-body { padding: 14px; }
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .sheet-content { padding-bottom: calc(25px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
