:root {
  color-scheme: dark;
  --bg: #11100e;
  --body-glow: rgba(86, 12, 30, .28);
  --panel: #1b1214;
  --panel-2: #2b171d;
  --text: #f8f3ea;
  --muted: #c7aea7;
  --line: #4a2730;
  --gold: #f1bd54;
  --teal: #ff647d;
  --berry: #d72f5a;
  --paper: #fffaf0;
  --header-bg: rgba(20, 8, 12, .92);
  --field-bg: #151310;
  --chip-bg: #14120f;
  --profile-bg: #170b0f;
  --compact-start: #251117;
  --bottom-bg: rgba(27, 25, 22, .96);
  --mobile-rule: rgba(255, 255, 255, .08);
  --danger-text: #ffb4b4;
  --warning-bg: rgba(241, 189, 84, .12);
  --warning-line: rgba(241, 189, 84, .35);
  --warning-text: #ffe1a6;
  --shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3ec;
  --body-glow: rgba(202, 164, 92, .28);
  --panel: #fffdf8;
  --panel-2: #efe5d8;
  --text: #241813;
  --muted: #74635b;
  --line: #e2d4c3;
  --gold: #a8751d;
  --teal: #b83250;
  --berry: #bf3555;
  --paper: #ffffff;
  --header-bg: rgba(255, 252, 246, .92);
  --field-bg: #fffaf2;
  --chip-bg: #f5eadc;
  --profile-bg: #fff8ee;
  --compact-start: #fff3e6;
  --bottom-bg: rgba(255, 252, 246, .96);
  --mobile-rule: rgba(82, 55, 39, .12);
  --danger-text: #a3213c;
  --warning-bg: rgba(168, 117, 29, .1);
  --warning-line: rgba(168, 117, 29, .28);
  --warning-text: #6d4611;
  --shadow: 0 18px 45px rgba(88, 60, 34, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--body-glow), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  padding-bottom: 78px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 8px;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { line-height: 1.1; }
.brand small { color: var(--muted); font-size: 12px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.desktop-nav { display: none; align-items: center; gap: 18px; color: var(--muted); }
.desktop-nav button {
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}
.theme-toggle span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--gold);
}
.theme-toggle strong { font-size: 12px; }

main { width: min(1180px, calc(100% - 24px)); margin: 0 auto; }
.hero {
  display: grid;
  gap: 22px;
  min-height: auto;
  align-content: center;
  padding: 24px 0 18px;
}
.hero h1, .page-title h1, .detail h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(30px, 8vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}
.hero p { max-width: 620px; color: var(--muted); margin: 16px 0 0; }
.eyebrow {
  color: #ff6f8a;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 24px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 650; }
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 800;
}
.btn.primary { background: var(--gold); border-color: var(--gold); color: #17130c; }
.btn.ghost { background: transparent; color: var(--text); }
.btn.full { width: 100%; }
.hero-card {
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 47, 90, .32), rgba(241, 189, 84, .12)),
    var(--panel);
  box-shadow: var(--shadow);
}
.hero-card span { color: var(--teal); font-weight: 800; }
.hero-card strong { display: block; margin-top: 10px; font-size: 24px; line-height: 1.15; }
.hero-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.section { padding: 18px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h1, .section-head h2 { margin: 0; font-size: 21px; }
.section-head a { color: var(--gold); font-weight: 800; }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.listing-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cover {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--panel-2);
}
.cover img, .gallery img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 9px; }
.meta, .card-foot, .stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.meta span, .card-foot span, .stat-row span, .chip, .mini-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
}
.listing-card h3 { margin: 9px 0 5px; font-size: 16px; line-height: 1.2; }
.listing-card p {
  height: 42px;
  overflow: hidden;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.talent-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.talent-dense-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.talent-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.talent-card {
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.talent-photo {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--panel-2);
}
.talent-photo img, .talent-portrait img { width: 100%; height: 100%; object-fit: cover; }
.talent-info { padding: 14px; }
.talent-info h3 { margin: 10px 0 5px; font-size: 24px; line-height: 1.1; }
.talent-info p { margin: 0 0 10px; color: var(--muted); min-height: 48px; }
.talent-info small, .style-tags { color: var(--gold); font-weight: 800; }
.shop-link { display: block; margin-top: 12px; color: var(--teal); font-weight: 800; }
.talent-compact-card {
  overflow: hidden;
  background: linear-gradient(180deg, var(--compact-start), var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
}
.talent-compact-card::before {
  content: "HOT";
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--berry);
  color: white;
  font-size: 10px;
  font-weight: 900;
}
.compact-photo {
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--panel-2);
}
.compact-photo img { width: 100%; height: 100%; object-fit: cover; }
.compact-info { padding: 7px; }
.compact-info h3 {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.12;
}
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}
.compact-meta span {
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
}
.hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 5px;
}
.hint-row span {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(215, 47, 90, .22);
  border: 1px solid rgba(255, 100, 125, .45);
  color: #ffd7df;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}
.detail-hints { margin-top: 10px; }
.detail-hints span { font-size: 12px; padding: 5px 8px; }
.compact-info p {
  height: 30px;
  overflow: hidden;
  margin: 5px 0 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.compact-info > a {
  display: inline-flex;
  color: #ff8fa2;
  font-size: 11px;
  font-weight: 800;
}
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { color: var(--text); }
.two-columns { display: grid; gap: 18px; }

.page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 0 16px;
}
.catalog-layout { display: grid; gap: 18px; }
.filters {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: none;
  padding: 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.filters.open { display: block; }
.filters form { display: grid; gap: 12px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filter-head button { background: transparent; border: 0; color: var(--text); font-size: 28px; }
.empty, .auth-panel, .static-page, .admin-note {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
}

.detail {
  display: grid;
  gap: 18px;
  padding: 28px 0;
}
.gallery {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.lead, .description, .muted, .static-page p { color: var(--muted); }
.info-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}
.info-list p {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.report-form { display: grid; gap: 12px; margin-top: 16px; }
.environment-panel, .shop-summary {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(215, 47, 90, .22), rgba(241, 189, 84, .1)), var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.environment-panel h2, .shop-summary h2 { margin: 0 0 8px; font-size: 22px; }
.environment-panel p, .shop-summary p { color: var(--muted); }
.talent-detail {
  display: grid;
  gap: 18px;
  padding: 28px 0;
}
.talent-portrait {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.talent-media {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.talent-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.talent-gallery a {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.talent-gallery img { width: 100%; height: 100%; object-fit: cover; }
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.score-grid div {
  padding: 12px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.score-grid span { display: block; color: var(--muted); font-size: 12px; }
.score-grid strong { color: var(--gold); font-size: 24px; }
.profile-info-card {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 12px;
  background: var(--profile-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.warning-box {
  padding: 9px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}
.contact-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.detail-contact-buttons { margin: 14px 0 0; }
.contact-cta {
  display: block;
  padding: 10px;
  color: #16080c;
  background: var(--gold);
  border-radius: 6px;
  text-align: center;
  font-weight: 900;
}
.contact-cta.whatsapp {
  color: white;
  background: #1fa855;
}
.contact-cta.call {
  background: #ff6f8a;
}
.profile-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mobile-rule);
  color: var(--muted);
}
.profile-row strong { color: var(--text); }
.profile-row a { color: #ff8fa2; font-weight: 900; }
.profile-row small { color: var(--muted); }
.profile-row.block {
  grid-template-columns: 1fr;
}
.status-open {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  color: #101008;
  background: #aeea74;
  border-radius: 999px;
  font-weight: 900;
}
.pre-line { white-space: pre-line; }
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-cloud a {
  padding: 5px 8px;
  color: #ffd7df;
  background: rgba(215, 47, 90, .22);
  border: 1px solid rgba(255, 100, 125, .45);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.mini-talent-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mini-talent-list a {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mini-talent-list img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }
.mini-talent-list small { color: var(--gold); }
.review-box {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.review-box h2 { margin: 0; font-size: 22px; }
.review-box form { display: grid; gap: 12px; }
.review {
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.review p { margin: 6px 0 0; color: var(--muted); }

.auth-panel, .static-page {
  width: min(460px, 100%);
  margin: 42px auto;
}
.auth-panel form { display: grid; gap: 14px; }
.error { color: #ffb4b4; }
.flash {
  width: min(1180px, calc(100% - 24px));
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(78, 179, 165, .5);
  border-radius: 8px;
  color: var(--teal);
  background: rgba(78, 179, 165, .08);
}

.admin-shell { display: grid; gap: 14px; padding: 16px 0 24px; }
.admin-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 6px;
  scrollbar-width: thin;
}
.admin-nav a {
  white-space: nowrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.admin-main { min-width: 0; }
.admin-main h1 { margin-top: 0; line-height: 1.15; }
.metric-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.metric {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { font-size: 28px; color: var(--gold); }
.table-wrap { overflow: visible; border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; min-width: 0; background: transparent; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold); font-size: 13px; }
.table-actions { display: flex; gap: 12px; align-items: center; }
.table-actions button, table button {
  color: var(--danger-text);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.admin-form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; }
.checks input { min-height: auto; width: auto; }
.mini-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 719px) {
  .site-header { padding: 12px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; font-size: 13px; }
  .brand small { display: none; }
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .btn { width: 100%; }
  .page-title { align-items: start; }
  .page-title h1 { width: 100%; }
  .section-head .btn { flex: 1 1 160px; }
  .metric { padding: 14px; }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
  }
  .table-wrap thead { display: none; }
  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }
  .table-wrap tr {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(78px, 34%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--mobile-rule);
    word-break: break-word;
  }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before {
    content: attr(data-label);
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
  }
  .table-actions {
    align-items: start;
    flex-wrap: wrap;
  }
  .table-actions::before { flex: 0 0 34%; }
  .admin-note { padding: 16px; }
  .info-list p,
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bottom-bg);
  border-top: 1px solid var(--line);
}
.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 64px;
  color: var(--muted);
  font-size: 12px;
}
.bottom-nav span { color: var(--gold); font-size: 18px; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 26px 16px 92px;
  color: var(--muted);
  font-size: 13px;
}
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 16, 14, .92);
  backdrop-filter: blur(16px);
}
.age-gate[hidden] { display: none !important; }
.age-panel {
  max-width: 460px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.age-panel h1 { margin: 0; line-height: 1.15; }
.age-panel p { color: var(--muted); }
.age-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .desktop-nav { display: flex; }
  .bottom-nav { display: none; }
  .site-footer { padding-bottom: 34px; }
  .hero { grid-template-columns: 1.4fr .8fr; align-items: center; }
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .talent-rail { grid-auto-columns: 31%; }
  .talent-dense-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
  .talent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-filter-btn { display: none; }
  .catalog-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .filters {
    position: sticky;
    top: 86px;
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
  }
  .filter-head button { display: none; }
  .detail { grid-template-columns: .95fr 1.05fr; align-items: start; }
  .talent-detail { grid-template-columns: .78fr 1.22fr; align-items: start; }
  .mini-talent-list { grid-template-columns: repeat(3, 1fr); }
  .admin-shell { grid-template-columns: 220px 1fr; }
  .admin-nav { display: grid; grid-auto-flow: row; grid-auto-columns: auto; align-content: start; overflow: visible; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
  table { min-width: 720px; background: var(--panel); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .talent-dense-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero { min-height: calc(100svh - 140px); }
}
