:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #201f1c;
  --muted: #66635c;
  --line: #e1ded6;
  --orange: #ed674a;
  --white: #fffdfa;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
button, a, select, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #b9432a; outline-offset: 3px; }
[hidden] { display: none !important; }
.page-width { width: calc(100% - 96px); max-width: 1280px; margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .header-inner nav, .brand, .footer-inner { display: flex; align-items: center; }
.header-inner { justify-content: space-between; min-height: 72px; }
.header-inner nav { gap: 28px; }
.brand { gap: 9px; white-space: nowrap; }
.brand strong { font-size: 1.2rem; letter-spacing: .05em; }
.brand-en { align-self: center; margin-left: 2px; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .19em; }
.brand-mark { width: 32px; height: 32px; background: url("/icon.svg") center / contain no-repeat; }
.nav-discover { font-size: .875rem; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; min-height: 42px; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: #403d35; }
.button-light { background: var(--white); color: var(--ink); }
.button-light:hover { background: #f2e8db; }
.button-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.button-outline:hover { border-color: #a49d90; }
.plus { font-size: 1.25rem; line-height: 1; font-weight: 400; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 377px; margin-top: 30px; background: #252822; border-radius: 14px; color: var(--white); }
.hero-image { position: absolute; z-index: -2; right: 0; top: 0; width: 73%; height: 100%; object-fit: cover; object-position: 56% 44%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #252822 21%, rgba(37,40,34,.98) 29%, rgba(37,40,34,.69) 49%, rgba(37,40,34,0) 76%); }
.hero-inner { padding: 36px 6%; }
.hero-label { display: flex; align-items: center; gap: 10px; font-size: .875rem; letter-spacing: .16em; font-weight: 600; color: #e1ded1; }
.hero-label span { display: inline-block; width: 21px; height: 2px; background: var(--orange); }
.hero h1 { margin: 16px 0 15px; font-size: clamp(3rem, 5.5vw, 5rem); font-weight: 800; letter-spacing: -.08em; line-height: 1.14; }
.hero h1 em { display: block; font-style: normal; color: #f28a71; }
.hero p:not(.hero-label) { margin: 0 0 22px; color: #eeece5; line-height: 1.5; }
.directory { margin: 38px 0 62px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-heading h2 { margin: 0 0 7px; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.065em; line-height: 1.15; }
.section-heading p { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.section-heading .result-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter-bar { padding-bottom: 17px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.filter-fields { display: flex; align-items: center; gap: 8px; }
.filter-fields > .category-picker { flex: 0 1 158px; margin-right: auto; }
.category-picker { position: relative; min-width: 0; }
.category-summary { display: flex; position: relative; align-items: center; min-height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); cursor: pointer; list-style: none; font-size: .875rem; font-weight: 400; }
.category-summary::-webkit-details-marker { display: none; }
.category-summary::after { content: ""; position: absolute; right: 13px; top: calc(50% - 5px); width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.category-summary-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-picker[open] > .category-summary, .category-summary:hover { border-color: #a49d90; }
.category-picker[open] > .category-summary::after { top: calc(50% - 2px); transform: rotate(225deg); }
.category-options { position: absolute; top: calc(100% + 5px); inset-inline: 0; z-index: 3; min-width: 118px; max-height: min(265px, 45vh); overflow-y: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); box-shadow: 0 8px 24px #201f1c1f; }
.category-options .category-choice { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 8px; border-radius: 4px; font-size: .875rem; font-weight: 400; cursor: pointer; }
.category-choice span { min-width: 0; overflow-wrap: anywhere; }
.category-choice:hover, .category-choice:focus-within { background: #f0ede6; }
.category-options .category-choice input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--ink); }
.category-clear { display: block; width: 100%; margin-top: 3px; padding: 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: .875rem; }
.category-clear:disabled { cursor: default; }
.city-field, .search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.filter-fields svg { position: absolute; z-index: 1; width: 18px; height: 18px; left: 10px; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.filter-fields .chevron { left: auto; right: 9px; width: 15px; }
.city-field select, .search-field input { height: 40px; min-width: 0; padding: 0 10px 0 32px; border-radius: 6px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: .875rem; }
.city-field select { appearance: none; padding-right: 27px; width: 135px; text-overflow: ellipsis; }
.search-field input { width: 170px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 17px; }
.card { display: block; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card:hover { border-color: #bfb8ab; }
.card-photo { position: relative; display: block; overflow: hidden; background: #ddd8ce; aspect-ratio: 1 / 1.14; }
.card-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 43%; transition: transform .24s ease-out; }
.card:hover img { transform: scale(1.035); }
.card-class, .card-video { position: absolute; top: 10px; padding: 5px 8px; border-radius: 4px; background: #fffdf3; font-size: .75rem; font-weight: 800; line-height: 1.2; }
.card-class { left: 10px; max-width: calc(100% - 56px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-video { right: 10px; background: #24231ee6; color: #fff8ed; }
.card-content { display: block; padding: 12px 13px 14px; }
.card-title { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.card-title strong { font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-city { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-bio { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 7px; font-size: .875rem; line-height: 1.45; min-height: 2.9em; color: var(--muted); overflow-wrap: anywhere; }
.empty { text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; min-height: 160px; padding: 20px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { justify-content: space-between; min-height: 78px; gap: 18px; }
.footer-inner > span { color: var(--muted); font-size: .75rem; }
.overlay { position: fixed; inset: 0; z-index: 10; background: #1d1b16a6; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog-open { overflow: hidden; }
.dialog { background: var(--paper); border-radius: 13px; padding: 20px; width: min(100%, 630px); max-height: calc(100% - 4px); overflow: auto; overscroll-behavior: contain; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dialog-heading h2 { font-size: 1.55rem; margin: 0; overflow-wrap: anywhere; }
.close-button { min-width: 40px; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font-size: 1.5rem; }
.profile-page { margin-top: 24px; margin-bottom: 54px; }
.back-link { display: inline-block; margin-bottom: 16px; padding-block: 4px; color: var(--muted); font-size: .875rem; font-weight: 700; }
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.profile-status { min-height: 160px; color: var(--muted); }
.profile-header { display: grid; grid-template-columns: minmax(240px, .95fr) minmax(0, 1.55fr); background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.profile-cover { position: relative; min-height: 325px; background: #ddd8ce; }
.profile-cover img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 50% 39%; }
.profile-summary { padding: clamp(24px, 5vw, 70px); align-self: center; min-width: 0; }
.profile-summary h1 { margin: 11px 0 17px; font-size: clamp(2.9rem, 5.8vw, 5.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.065em; overflow-wrap: anywhere; }
.profile-labels, .profile-actions, .profile-categories { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-class { max-width: 100%; padding: 5px 9px; border-radius: 4px; background: #fbe4dc; color: #8c321f; font-size: .875rem; font-weight: 800; overflow-wrap: anywhere; }
.demo-label { font-size: .8125rem; color: var(--muted); }
.profile-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 14px 30px; }
.profile-facts dt { font-size: .8125rem; color: var(--muted); margin-bottom: 5px; }
.profile-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.profile-intro { margin: 17px 0 21px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: var(--muted); }
.profile-section { margin-top: 35px; scroll-margin-top: 16px; }
.profile-section .section-heading { border-bottom: 1px solid var(--line); margin-bottom: 14px; padding-bottom: 10px; align-items: center; }
.profile-section .section-heading h2 { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.photo-tile { border: 1px solid var(--line); border-radius: 8px; padding: 0; background: #ddd8ce; overflow: hidden; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }
.photo-tile:hover { border-color: #a49d90; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.video-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--white); }
.video-card h3 { font-size: 1rem; margin: 12px 14px; }
.profile-video { width: 100%; height: min(43vw, 410px); min-height: 190px; display: block; background: #1d1b17; object-fit: contain; }
.video-error { color: #a03520; margin: 8px 14px 14px; }
.photo-overlay { z-index: 11; background: #1d1b16e8; }
.photo-dialog { width: min(100%, 700px); max-height: 100%; overflow: auto; color: #fffdfa; }
.viewer-top, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.viewer-top { margin-bottom: 8px; }
.viewer-top p { margin: 0; font-variant-numeric: tabular-nums; }
.photo-dialog img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.viewer-controls { margin-top: 8px; justify-content: center; }
.form { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label, .form .category-field { min-width: 0; display: grid; gap: 5px; font-size: .875rem; font-weight: 700; }
.city-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.city-picker legend { margin-bottom: 5px; padding: 0; font-size: .875rem; font-weight: 700; }
.category-field-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.add-category { min-height: 34px; padding-inline: 9px; }
.category-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.category-create .status { grid-column: 1 / -1; }
.category-create .status:empty { display: none; }
.form .category-summary { min-height: 42px; border-color: #d8d3c9; font-size: 1rem; }
.form .category-summary:hover, .form .category-picker[open] > .category-summary { border-color: #a49d90; }
.form input, .form select, .form textarea { display: block; width: 100%; min-height: 42px; color: var(--ink); padding: 9px 10px; border: 1px solid #d8d3c9; border-radius: 6px; background: var(--white); font-size: 1rem; font-weight: 400; }
.city-picker select { min-width: 0; appearance: none; padding-right: 27px; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.city-picker select:disabled { color: var(--muted); background-color: var(--paper); }
.form textarea { min-height: 94px; resize: vertical; }
.form input[type="checkbox"] { width: auto; min-height: auto; }
.form label.check-label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.form .help, .form .status { color: var(--muted); margin: 0; line-height: 1.45; font-size: .875rem; }
.form .status:not(:empty) { color: #a03520; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.danger { color: #a03520; }
@media (max-width: 850px) {
  .page-width { width: calc(100% - 56px); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page-width { width: calc(100% - 28px); }
  .header-inner { min-height: 57px; }
  .header-inner nav { gap: 0; }
  .nav-discover { display: none; }
  .publish-button { min-height: 36px; padding-inline: 10px; }
  .hero { margin-top: 13px; min-height: 258px; border-radius: 10px; }
  .hero-image { width: 86%; object-position: 60% 44%; }
  .hero::after { background: linear-gradient(90deg, #252822 1%, rgba(37,40,34,.93) 26%, rgba(37,40,34,.58) 51%, rgba(37,40,34,0) 96%); }
  .hero-inner { padding: 16px 5.4%; }
  .hero h1 { font-size: clamp(2.15rem, 8vw, 3rem); margin-block: 10px; }
  .hero p:not(.hero-label) { max-width: 11em; font-size: .875rem; margin-bottom: 13px; }
  .hero .button { min-height: 37px; padding-inline: 11px; }
  .directory { margin: 24px 0 38px; }
  .section-heading { margin-bottom: 12px; gap: 6px; }
  .section-heading h2 { margin-bottom: 4px; }
  .section-heading p { font-size: .8125rem; }
  .filter-bar { margin-bottom: 11px; padding-bottom: 11px; }
  .filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-fields > .category-picker { margin-right: 0; }
  .search-field { grid-column: 1 / -1; }
  .city-field select, .search-field input { width: 100%; height: 40px; font-size: 1rem; }
  .category-options .category-choice { min-height: 42px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; }
  .card { border-radius: 8px; }
  .card-photo { aspect-ratio: 1 / 1.2; }
  .card-content { padding: 8px 8px 10px; }
  .card-title strong { font-size: 1rem; }
  .card-class, .card-video { top: 6px; padding: 4px 6px; }
  .card-class { left: 6px; }
  .card-video { right: 6px; }
  .card-bio { margin-top: 4px; }
  .footer-inner { min-height: 62px; }
  .overlay { padding: 10px max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .dialog { padding: 14px; }
  .profile-page { margin-top: 13px; margin-bottom: 37px; }
  .back-link { margin-bottom: 10px; }
  .profile-header { grid-template-columns: minmax(0, 1fr); border-radius: 10px; }
  .profile-cover { min-height: 0; aspect-ratio: 1.19 / 1; }
  .profile-summary { padding: 17px; }
  .profile-summary h1 { margin: 10px 0 13px; font-size: clamp(2.55rem, 11vw, 3.7rem); }
  .profile-intro { margin: 13px 0 17px; }
  .profile-actions { gap: 6px; }
  .profile-actions .button { padding-inline: 10px; }
  .profile-section { margin-top: 25px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .profile-video { height: min(78vw, 380px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
