:root {
  --bg: #120f11;
  --panel: #1d181b;
  --panel-soft: #261f23;
  --text: #fff7f1;
  --muted: #cbb9af;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff8a5b;
  --accent-strong: #ff6a2f;
  --tag: rgba(255, 255, 255, 0.08);
  --success: #78c68b;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
/* 提示浏览器使用暗色原生控件（影响 select 弹层/滚动条等） */
html { color-scheme: dark; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button, input, textarea, select { font: inherit; }

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 138, 91, 0.22), transparent 24rem),
    linear-gradient(180deg, #171214 0%, #120f11 100%);
}

.container {
  width: min(100% - 28px, 720px);
  margin: 0 auto;
}

.page {
  padding: 16px 0 96px;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(18, 15, 17, 0.82);
  border-bottom: 1px solid var(--line);
}

.mobile-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link {
  padding: 6px 10px;
}

.brand {
  display: grid;
  gap: 2px;
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.brand-sub,
.header-link,
.muted-text,
.photographer-head p,
.card-intro,
.appointment-info span,
.message-meta span,
.package-option span {
  color: var(--muted);
}

.header-link {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* 退出按钮比登录按钮更小，减少头部占用 */
.header-actions .header-link {
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1;
}

.header-greeting {
  font-size: 12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout {
  margin: 0;
}

.hero-card,
.photographer-card,
.detail-cover-card,
.booking-card,
.chat-summary-card,
.chat-card,
.empty-card,
.quick-item,
.appointment-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.booking-card,
.chat-summary-card,
.chat-card,
.empty-card {
  padding: 18px;
}

.chat-summary-card {
  margin-bottom: 10px;
}

.hero-card h1,
.detail-card-body h1,
.chat-summary-card h1,
.section-head h1,
.section-head h2 {
  margin: 6px 0 10px;
  line-height: 1.08;
}

.hero-card h1 {
  font-size: clamp(1.9rem, 9vw, 3rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.hero-text,
.card-intro,
.empty-card p,
.message p {
  /* line-height: 1.65; */
  margin: 0;
}

.hero-pills,
.mini-stats,
.tags,
.appointment-info,
.card-row,
.section-head,
.photographer-head,
.form-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero-pills span,
.tag,
.status-pill,
.score,
.tab-item {
  border-radius: 999px;
}

.hero-pills {
  margin-top: 14px;
}

.hero-pills span,
.tag {
  background: var(--tag);
  padding: 8px 12px;
}

.mini-stats span:empty {
  display: none;
}

.appointment-info span:empty {
  display: none;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-item {
  padding: 14px;
  display: grid;
  gap: 6px;
  text-align: center;
  align-content: start;
}

.quick-item strong {
  font-size: 1.2rem;
}

.quick-brief-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.quick-brief-list li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-section {
  margin-top: 18px;
}

.discover-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

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

.photo-item {
  margin: 0;
  display: grid;
  gap: 6px;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.photo-item figcaption {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  color: var(--muted);
  font-size: 12px;
  min-width: 32px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
}

.filter-chip.active {
  background: rgba(255, 138, 91, 0.16);
  border-color: rgba(255, 138, 91, 0.35);
  color: #fff4ef;
}

.section-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.photographer-list,
.appointment-list {
  display: grid;
  gap: 14px;
}

.photographer-card,
.detail-cover-card {
  overflow: hidden;
}

.photographer-cover,
.detail-cover {
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.photographer-card-body,
.detail-card-body {
  padding: 16px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.photographer-head {
  align-items: center;
  flex-wrap: nowrap;
}

.photographer-head > div {
  flex: 1;
  min-width: 0;
}

.photographer-head h3,
.photographer-head h1 {
  margin: 0 0 4px;
}

.score,
.status-pill {
  padding: 8px 10px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.score {
  background: rgba(255, 138, 91, 0.14);
  color: #ffd7c4;
}

.status-pill {
  background: rgba(120, 198, 139, 0.14);
  color: var(--success);
}

.mini-stats {
  margin-top: 14px;
}

.mini-stats span,
.appointment-info span {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}

.primary-button,
.secondary-button,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  cursor: pointer;
  padding: 0 18px;
  font-weight: 700;
  border-radius: 16px;
}

.primary-button {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}

.secondary-button {
  background: transparent;
  margin-top: 16px;
  color: var(--accent);
  border: 1px solid rgba(255, 138, 91, 0.28);
}

.booking-form,
.chat-form,
.field-group {
  display: grid;
  gap: 14px;
}

.field-title {
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 16px;
  padding: 14px;
}

/* 部分浏览器/系统的 select 弹出面板会使用默认浅色主题，这里强制 option 颜色提高可读性 */
select {
  background-color: var(--panel-soft);
}

select option {
  background-color: var(--panel);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.package-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.appointment-card {
  padding: 16px;
}

.appointment-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  /* gap: 10px; */
  margin-bottom: 10px;
}

.card-row {
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.chat-thread {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 220px;
  max-height: 46vh;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
}

.chat-card {
  display: flex;
  flex-direction: column;
}

.chat-role-hint {
  margin: 0 0 4px;
}

.message {
  padding: 10px;
  border-radius: 18px;
  max-width: 92%;
  justify-self: start;
  align-self: start;
}

.self-message {
  background: rgba(255, 138, 91, 0.14);
  justify-self: end;
}

.peer-message {
  background: rgba(255,255,255,0.05);
  justify-self: start;
}

.system-message {
  background: rgba(255,255,255,0.03);
  justify-self: center;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.empty-card {
  text-align: center;
}

.bottom-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(18, 15, 17, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.tab-item {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 6px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 12px;
}

.tab-item.active {
  background: rgba(255, 138, 91, 0.16);
  color: white;
}

/* ---------- Lightbox 大图查看 ---------- */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.28s ease;
}
.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
/* 点击图片时给个放大镜提示 */
.photo-item a[data-lightbox] {
  cursor: zoom-in;
  display: block;
}

@media (max-width: 560px) {
  .form-grid,
  .search-form,
  .quick-strip {
    grid-template-columns: 1fr;
  }

  .appointment-top,
  .card-row,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .score,
  .status-pill {
    align-self: flex-start;
  }
}
