:root {
  --bg0: #f4f1ea;
  --bg1: #e7f0ec;
  --ink: #1d1a16;
  --muted: rgba(29, 26, 22, 0.58);
  --accent: #0d6b57;
  --accent-2: #c45d2c;
  --card: rgba(255, 253, 248, 0.94);
  --line: rgba(29, 26, 22, 0.1);
  --shadow: 0 18px 50px rgba(40, 30, 16, 0.12);
  --beian-h: 56px;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
}
body {
  min-height: 100%;
  height: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  overscroll-behavior-x: none;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 420px at 8% -10%, #d8efe6 0, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #f3d7b5 0, transparent 45%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
}

.hidden { display: none !important; }
.shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.site-beian {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.2;
  color: #8c8c8c;
  background: transparent;
  pointer-events: auto;
}
html.is-auth .site-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: calc(var(--beian-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 16px env(safe-area-inset-bottom, 0px);
  pointer-events: none;
}
html.is-auth .site-beian .site-beian-inner {
  pointer-events: auto;
}
.site-beian-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}
.beian-sep {
  width: 1px;
  height: 12px;
  background: #cfcfcf;
  flex-shrink: 0;
}
.site-beian a {
  color: #8c8c8c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.site-beian a:hover {
  color: #595959;
  text-decoration: underline;
}
.beian-gongan-icon {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 15px;
}

.auth-panel {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 20px 20px calc(var(--beian-h) + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(96, 165, 250, 0.28) 0, transparent 55%),
    radial-gradient(720px 400px at 100% 8%, rgba(167, 139, 250, 0.22) 0, transparent 48%),
    linear-gradient(165deg, #f7f4ef, #eaf2f8);
}
.auth-landing {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px 36px;
  align-items: center;
}
.auth-brand-block {
  text-align: left;
  padding: 8px 4px;
}
.auth-logo {
  width: 148px;
  height: 148px;
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
  display: block;
  margin-bottom: 18px;
  object-fit: cover;
}
.auth-brand-name {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 760;
  letter-spacing: 0.06em;
  color: #1e293b;
}
.auth-wechat-hint {
  margin: 0 0 14px;
  max-width: 26em;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #c2410c;
  background: #fff7ed;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: #9a3412;
  word-break: break-word;
}
@media (max-width: 720px) {
  .auth-wechat-hint {
    font-size: 13px;
    max-width: none;
    padding: 8px 10px;
  }
}
.auth-tagline {
  margin: 0 0 16px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: #334155;
  font-weight: 560;
}
.auth-promo {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.auth-promo p { margin: 0 0 4px; }
.miniprogram-qr {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.miniprogram-qr-img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  display: block;
}
.miniprogram-qr-tip {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  letter-spacing: 0.02em;
}
.miniprogram-qr-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
  color: #1e293b;
}
.miniprogram-qr--profile {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
}
.miniprogram-qr--profile .miniprogram-qr-img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: none;
}
.miniprogram-qr-copy {
  min-width: 0;
}
html.is-phone-web .desktop-only-mp {
  display: none !important;
}

/* 网络受限：顶部短横幅（写死文案，手机友好） */
.net-blocked-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  box-sizing: border-box;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: #b45309;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
}
.net-blocked-banner.hidden {
  display: none !important;
}
html.has-net-blocked-banner {
  scroll-padding-top: 52px;
}
html.has-net-blocked-banner body {
  padding-top: calc(44px + env(safe-area-inset-top, 0px));
}
.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  /* 三种登录方式共用固定高度，切换时不跳动；需盖住微信二维码与注册表单 */
  min-height: 640px;
  height: 640px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tabs-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  flex-shrink: 0;
}
.auth-tabs-3 .tab {
  width: 100%;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  font-size: 13px;
}
.auth-tabs-3 .tab[hidden] {
  display: none !important;
}
.auth-tabs-3:not(:has(#tabWxLogin:not([hidden]))) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.auth-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.auth-card:has(#forgotForm:not(.hidden)) {
  height: auto;
  min-height: 640px;
}
.auth-card:has(#forgotForm:not(.hidden)) .auth-body {
  overflow: visible;
}
.auth-pane {
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}
.auth-pane.hidden {
  display: none !important;
}
#loginForm.auth-pane:not(.hidden),
#registerForm.auth-pane:not(.hidden) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
}
.auth-field-label {
  display: block;
  margin: 10px 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.02em;
}
#loginForm .auth-field-label:first-child {
  margin-top: 0;
}
#loginForm input {
  margin-top: 4px;
  margin-bottom: 4px;
}
#forgotForm.auth-pane:not(.hidden) {
  display: block;
  padding-top: 4px;
}
.wx-login-box.auth-pane:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100%;
}
.wx-qr-host {
  width: 100%;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.wx-qr-host iframe {
  max-width: 100%;
}
.auth-msg {
  flex-shrink: 0;
  min-height: 22px;
  margin: 10px 0 0;
  line-height: 1.45;
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .auth-msg {
    font-size: 12px;
  }
}
@media (max-width: 720px) {
  .auth-card {
    height: auto;
    min-height: 560px;
  }
  .auth-body {
    overflow: visible;
  }
}
@media (max-height: 860px) {
  .auth-logo {
    width: 92px;
    height: 92px;
    margin-bottom: 8px;
    border-radius: 20px;
  }
  .auth-brand-name {
    font-size: 30px;
    margin-bottom: 6px;
  }
  .auth-card {
    height: auto;
    min-height: 0;
  }
}
@media (max-width: 480px) {
  .site-beian {
    font-size: 12px;
  }
  .site-beian-inner {
    gap: 8px;
  }
}

.brand {
  font-size: 32px;
  font-weight: 760;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.brand-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: 0.03em;
}
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}
.empty-logo {
  display: block;
  margin: 0 auto 14px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.14);
}
.empty-tagline {
  font-size: 16px;
  color: #334155;
  font-weight: 560;
  margin: 0 0 10px;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent, #0d9488);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.link-btn:hover { text-decoration: underline; }
.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 0 0 10px;
}
.code-row input { flex: 1; margin: 0 !important; }
.code-row button {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 102px;
}
.captcha-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 0 0 10px;
}
.captcha-row input { flex: 1; margin: 0 !important; }
.captcha-img {
  flex-shrink: 0;
  width: 140px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f3f4f6;
  cursor: pointer;
}
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

input, textarea, select {
  width: 100%;
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
textarea { resize: vertical; }
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
}
button.primary { background: var(--accent); color: #fff; }
button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(13, 107, 87, 0.35);
}
.auth-guest-btn {
  width: 100%;
  margin-top: 4px;
}
html.is-guest #messagesOpenBtn,
html.is-guest #profileOpenBtn,
html.is-guest #profileDownloadsBtn,
html.is-guest #accountRechargeBtn,
html.is-guest #logoutBtn,
html.is-guest #applyOpenBtn,
html.is-guest #applyOpenBtn2,
html.is-guest #downloadMenuBtn,
html.is-guest #photoSelectToggleBtn {
  display: none !important;
}
button.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.btn-with-icon .btn-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  display: block;
}
button.text-btn {
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
}
.hint { color: var(--muted); font-size: 14px; line-height: 1.5; }
.muted-hint { margin: 4px 0 0; min-height: 1.2em; font-size: 13px; color: #0f766e; }
.msg { min-height: 1.2em; color: #8a3b12; font-size: 14px; margin-top: 8px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
  padding: 6px 16px;
  min-height: 40px;
  backdrop-filter: blur(10px);
  background: rgba(244, 241, 234, 0.9);
  border-bottom: 1px solid var(--line);
}
.topbar .brand-sm {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.topbar .ghost,
.topbar .text-btn {
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.2;
}
.topbar .project-select {
  padding: 4px 10px;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  min-height: 28px;
  border-radius: 8px;
}
.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.project-activity-ticker {
  display: inline-flex;
  align-items: stretch;
  min-width: 160px;
  max-width: min(360px, 34vw);
  height: 28px;
  padding: 0 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
.project-activity-ticker:hover {
  border-color: #c4a574;
  background: rgba(255, 248, 235, 0.9);
}
.project-activity-viewport {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.project-activity-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.project-activity-track.is-scrolling {
  animation: project-activity-scroll var(--activity-duration, 18s) linear infinite;
}
.project-activity-item {
  height: 28px;
  line-height: 28px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #4a3f32;
}
@keyframes project-activity-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(var(--activity-shift, -50%)); }
}
.project-activity-list {
  max-height: min(55vh, 420px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.project-activity-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.45;
}
.project-activity-row-time {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.msg-bell-btn {
  position: relative;
}
.msg-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
}
.messages-card .messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.messages-card .messages-header h2 {
  margin: 0;
}
.messages-header-actions {
  display: flex;
  gap: 8px;
}
.messages-list {
  max-height: min(60vh, 480px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.message-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}
.message-item.unread {
  border-color: #c4a574;
  background: rgba(255, 248, 235, 0.9);
}
.message-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.message-item-title {
  font-weight: 650;
  font-size: 14px;
}
.message-item-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.message-item-body {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.message-item-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.message-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.messages-empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 12px;
}
.project-select {
  width: auto;
  min-width: 160px;
  margin: 0;
  background: #fff;
}
.user-meta { color: var(--muted); font-size: 12px; line-height: 1.2; }
.link-balance {
  border: 0;
  background: transparent;
  color: var(--accent, #0f766e);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.profile-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.profile-balance {
  margin-top: 0;
  font-size: 13px;
}
.recharge-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.recharge-amt.active {
  border-color: var(--accent, #0f766e);
  color: var(--accent, #0f766e);
}
.recharge-qr-wrap {
  margin-top: 12px;
  text-align: center;
}
.recharge-qr-wrap img {
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}

.workspace { padding: 12px 20px 48px; max-width: 1680px; margin: 0 auto; }
.quota-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  background: #f7f3ee;
  border-radius: 14px;
}
.quota-item {
  width: auto;
  box-sizing: border-box;
  background: #fffdf9;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.quota-item .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.quota-buy-btn {
  padding: 2px 10px !important;
  font-size: 12px !important;
  flex-shrink: 0;
  color: #c45c26 !important;
  border: 1px solid #e0a88a !important;
  border-radius: 999px !important;
  background: #fff !important;
  line-height: 1.4;
}
.quota-buy-btn:hover {
  background: #f3e0d4 !important;
}
.quota-item .value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.quota-item .value.link {
  color: #c45c26;
  text-decoration: underline;
  cursor: pointer;
}
.quota-item .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.storage-parts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(50vh, 360px);
  overflow: auto;
  margin: 8px 0 4px;
}
.storage-part {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
}
.storage-part .row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.storage-part .part-size {
  margin-left: auto;
  color: #c45c26;
}
.storage-part .muted {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.browse-sticky {
  position: sticky;
  top: var(--topbar-sticky-h, 40px);
  z-index: 25;
  margin: 0 0 10px;
  padding: 8px 0 10px;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.view-switch {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.view-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 14px;
  font-size: 13px;
}
.view-btn.active {
  background: var(--accent);
  color: #fff;
}
.view-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.view-hint.is-loading {
  color: var(--accent);
}
.browse-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.browse-meta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.settings-music-block {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.settings-music-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.settings-music-upload input[type="file"] {
  flex: 1 1 180px;
  min-width: 0;
  padding: 6px;
}
.project-music-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-top: 6px;
}
.project-music-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}
.project-music-item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-music-item .meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.slideshow-start-btn {
  font-size: 13px;
  padding: 4px 12px;
}
.sort-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}
.sort-shortcuts .sort-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.sort-shortcuts .sort-btn:hover {
  color: var(--accent);
}
.sort-shortcuts .sort-btn.active {
  color: var(--accent);
  font-weight: 600;
}
.sort-shortcuts .sort-arrow {
  display: inline-block;
  margin-right: 2px;
  font-size: 12px;
}
.search-error {
  margin: 0 0 8px;
  color: #b42318;
  font-size: 13px;
}
.browse-body {
  position: relative;
  min-height: 200px;
}
.search-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 48px;
  background: rgba(244, 241, 234, 0.72);
  backdrop-filter: blur(2px);
}
.search-loading.hidden {
  display: none;
}
.search-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.search-progress {
  width: 180px;
  height: 4px;
  border-radius: 999px;
  background: #e8e4dc;
  overflow: hidden;
}
.search-progress > i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  animation: search-bar-slide 1.05s ease-in-out infinite;
}
@keyframes search-bar-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.workspace.map-mode .pager,
.workspace.map-mode #photoEmpty {
  display: none !important;
}
.photo-map {
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #1a2332;
}
.map-thumb-marker {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  background: #334155;
  cursor: pointer;
  display: block;
}
.map-thumb-marker.map-spider-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  z-index: 6;
}
.map-spider-hub {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  box-sizing: border-box;
}
.map-thumb-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #475569;
}
.map-thumb-marker.no-thumb::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #64748b;
}
.ol-viewport,
.ol-layers {
  border-radius: 14px;
}
.search-wrap {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 240px;
  align-items: center;
}
.search-wrap input {
  margin: 0;
  padding: 8px 12px;
  flex: 1;
  min-width: 160px;
}
.toolbar .ghost,
.toolbar .primary {
  padding: 8px 14px;
}

.batch-filter-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  height: 100px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}
.batch-filter-wrap .chip-all {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  height: 28px;
  box-sizing: border-box;
  margin: 0;
  width: auto;
  max-width: none;
}
.batch-filter-wrap .batch-filter {
  align-self: stretch;
  height: calc(100% - 0px);
}
.batch-filter {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  grid-auto-columns: max-content;
  align-content: start;
  justify-content: start;
  gap: 8px;
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  cursor: grab;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.batch-filter .chip {
  width: max-content;
  max-width: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.browse-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 8px;
}
.mode-toggle {
  width: 100%;
  height: 40px;
  flex-shrink: 0;
}
.mode-toggle-3 .mode-toggle-item {
  font-size: 13px;
  padding: 0 4px;
  margin: 3px 2px;
  border-radius: 999px;
}
.mode-toggle-track {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #efe9e1;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}
.mode-toggle-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #f3e0d4;
  transition: left 0.22s ease, opacity 0.18s ease, width 0.22s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
/* 三栏用各段底色区分，不再依赖滑动拇指 */
.mode-toggle-3 .mode-toggle-thumb {
  display: none;
}
.mode-toggle-thumb.at-batch {
  left: 3px;
  opacity: 1;
}
.mode-toggle-thumb.at-person {
  left: calc(50%);
  opacity: 1;
}
.mode-toggle-item {
  position: relative;
  z-index: 1;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.mode-toggle-3 .mode-toggle-item:not(.on) {
  background: rgba(255, 255, 255, 0.55);
  color: #7a7168;
}
.mode-toggle-item.on {
  color: #c45c26;
  font-weight: 700;
}
.mode-toggle-3 .mode-toggle-item.on {
  background: #f3e0d4;
  color: #c45c26;
  box-shadow: inset 0 0 0 1px rgba(196, 92, 38, 0.32);
}
.mode-toggle-item:hover:not(.on) {
  filter: brightness(0.97);
  color: #5a524a;
}
.year-axis-wrap {
  position: relative;
  width: 100%;
  height: 100px;
  min-width: 0;
}
.year-axis-wrap.hidden {
  display: none;
}
.year-axis-scroll {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  cursor: grab;
  touch-action: pan-x pan-y;
}
.year-axis-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.year-axis-scroll.is-dragging .year-chip,
.year-axis-scroll.is-dragging .year-card {
  pointer-events: none;
}
.year-axis-scroll::-webkit-scrollbar {
  height: 6px;
}
.year-axis-scroll::-webkit-scrollbar-thumb {
  background: #c8c2b6;
  border-radius: 999px;
}
.year-axis-track {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  padding: 4px 6px;
  box-sizing: border-box;
  gap: 8px;
}
.year-card {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(170, 140, 120, 0.32);
  background: rgba(245, 239, 232, 0.92);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}
.year-card-1 {
  border-color: rgba(120, 150, 138, 0.35);
  background: rgba(232, 240, 236, 0.92);
}
.year-card.year-on {
  border-color: rgba(196, 92, 38, 0.45);
  background: rgba(243, 224, 212, 0.95);
}
.year-card-label {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 1px;
  box-sizing: border-box;
}
.year-card-year {
  font-size: 14px;
  font-weight: 700;
  color: #5a524a;
  line-height: 1.1;
}
.year-card.year-on .year-card-year {
  color: #c45c26;
}
.year-card-count {
  font-size: 11px;
  color: #9a9188;
}
.year-card-chips {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  height: 100%;
  max-height: 92px;
  padding: 4px 6px 4px 0;
  box-sizing: border-box;
  gap: 4px 6px;
}
.year-card-chips.chips-sparse {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
}
.year-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 26px;
  max-height: 52px;
  line-height: 1.3;
  padding: 2px 10px;
  max-width: 160px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  color: #4a433c;
  cursor: pointer;
  white-space: normal;
}
.year-chip.tall {
  align-self: stretch;
  min-height: 0;
  min-width: 40px;
  max-width: 96px;
  max-height: none;
  padding: 4px 8px;
  font-size: 11px;
}
.year-chip-text {
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.year-chip-name {
  display: inline;
}
.year-chip-count {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
}
.year-chip.on {
  border-color: rgba(196, 92, 38, 0.5);
  background: #f3e0d4;
  color: #c45c26;
  font-weight: 600;
}
.year-chip:hover:not(.on) {
  border-color: rgba(196, 92, 38, 0.28);
}
.year-axis-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.year-axis-empty.hidden {
  display: none;
}
.batch-filter.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.batch-filter.is-dragging .chip {
  pointer-events: none;
}
.batch-filter::-webkit-scrollbar {
  height: 6px;
}
.batch-filter::-webkit-scrollbar-thumb {
  background: #c8c2b6;
  border-radius: 999px;
}
.batch-filter::-webkit-scrollbar-track {
  background: transparent;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  white-space: nowrap;
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 0;
}
.pager-info {
  color: var(--muted);
  font-size: 13px;
}
.pager .pager-btn {
  padding: 6px 12px;
  font-size: 13px;
}
.pager .pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#pagerBottom {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.pager-count {
  justify-content: center;
}
.photo-infinite-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}
.photo-load-more {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}
.photo-card {
  position: relative;
  border-radius: 12px;
  overflow: visible;
  background: #d7d2c8;
  border: 1px solid var(--line);
  cursor: pointer;
  aspect-ratio: 1;
}
.photo-card .photo-check {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 6;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #b45309;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.photo-grid.select-mode .photo-card .photo-check,
.photo-card:hover .photo-check,
.photo-card.selected .photo-check {
  opacity: 1;
  pointer-events: auto;
}
.photo-card.selected {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}
.ghost.danger,
.text-btn.danger {
  color: #9a3412;
  border-color: #e7c3b0;
}
.ghost.danger:hover:not(:disabled) {
  background: #fff1eb;
}
.ghost.active {
  background: rgba(180, 83, 9, 0.12);
  border-color: #b45309;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  background: #e7e1d5;
}
.photo-card img.is-placeholder {
  object-fit: cover;
}
.photo-tip {
  position: absolute;
  left: 8px;
  top: 8px;
  right: auto;
  z-index: 5;
  min-width: 220px;
  max-width: min(420px, 70vw);
  width: max-content;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.92);
  color: #f3f4f6;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  overflow: visible;
  white-space: normal;
}
.photo-card:hover .photo-tip {
  opacity: 1;
  transform: translateX(0);
}
.photo-tip .tip-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.photo-tip .tip-row:last-child { margin-bottom: 0; }
.photo-tip .tip-k {
  flex: 0 0 auto;
  color: rgba(243,244,246,.55);
}
.photo-tip .tip-v {
  flex: 1 1 auto;
  word-break: break-word;
  white-space: normal;
}
.photo-card .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-card .media-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 6px;
  pointer-events: none;
}
.photo-card .status {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  color: var(--ink);
}

.empty-state {
  max-width: 560px;
  margin: 10vh auto 0;
  text-align: center;
  padding: 24px;
}
.pending-apps {
  margin-top: 18px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
}
.discover-list {
  margin: 20px auto 0;
  width: min(520px, 100%);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.discover-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.discover-card .name {
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.school-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.22em;
  color: #0f766e;
  flex: 0 0 auto;
  vertical-align: -0.12em;
}
.school-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}
.discover-card .owner {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.discover-card .desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.discover-card.compact {
  border-radius: 10px;
  padding: 8px 10px;
  gap: 8px;
}
.discover-card.compact .name {
  font-size: 14px;
  font-weight: 600;
}
.discover-card.compact .owner {
  margin-top: 2px;
  font-size: 11px;
}
.discover-card.compact .desc {
  margin-top: 2px;
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-card.compact .join-project-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.join-request-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  max-height: 220px;
  overflow: auto;
}
.join-request-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}
.join-request-item .meta {
  font-size: 13px;
  color: var(--muted);
}
.join-request-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 16, 12, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
}
/* 上传未关时加购/充值必须压在上传窗之上，否则会「有节点但不显示」 */
#buyQuotaModal,
#storagePartsModal,
#rechargeModal {
  z-index: 90;
}
#slideshowNarrationModal {
  z-index: 80;
}
#appDialogModal {
  z-index: 120;
}
.modal-card {
  width: min(460px, 100%);
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal-card.wide { width: min(560px, 100%); }
#membersModal .modal-card {
  max-height: min(88vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-card.tips-guide-card {
  width: min(480px, 100%);
  text-align: left;
}
.tips-guide-progress {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.tips-guide-body {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
  color: var(--ink);
  margin: 10px 0 4px;
  max-height: min(50vh, 360px);
  overflow: auto;
}
.tips-guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tips-guide-actions .text-btn {
  margin-right: auto;
}
.modal-card.profile-card {
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
}
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.profile-tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.profile-tab.active {
  color: var(--text, #1c1917);
  border-color: var(--accent, #0f766e);
  background: rgba(15, 118, 110, 0.08);
  font-weight: 600;
}
.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }
.managed-project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}
.managed-project-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.managed-project-row .managed-project-item {
  flex: 1;
  min-width: 0;
}
.managed-leave-btn {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}
.managed-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.managed-project-item:hover {
  border-color: var(--accent, #0f766e);
}
.managed-project-item.is-member {
  cursor: pointer;
}
.managed-project-item .name {
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.managed-project-item .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.managed-project-item .role-tag {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}
.managed-project-item .role-tag.owner {
  color: var(--accent, #0f766e);
  font-weight: 600;
}
.profile-section-title {
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.profile-project-search {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
}
.profile-project-search input {
  margin: 0;
  flex: 1;
}
.profile-discover-list {
  max-height: 200px;
  overflow: auto;
  gap: 6px;
}
.profile-discover-list.discover-list {
  gap: 6px;
}
.member-add {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.member-add input { margin: 0; flex: 1; }
.member-search-result,
#memberList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
#memberList {
  max-height: min(50vh, 480px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.member-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}
.member-row .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.subhead {
  margin: 14px 0 8px;
  font-size: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.qq-import-qr {
  margin: 12px 0;
  text-align: center;
}
.qq-import-qr img {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}
.qq-import-album-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.qq-import-album-list {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
}
.qq-import-album-list .qq-album-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 14px;
  line-height: 1.4;
}
.qq-import-album-list .qq-album-row:last-child {
  border-bottom: none;
}
.qq-import-album-list .qq-album-cb {
  flex: 0 0 16px;
  width: 16px !important;
  max-width: 16px;
  height: 16px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border-radius: 3px;
  align-self: flex-start;
  box-sizing: border-box;
}
.qq-import-album-list .qq-album-name {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
.app-dialog-card {
  width: min(420px, 100%);
}
.app-dialog-body {
  margin: 10px 0 4px;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--ink);
  font-size: 14px;
  max-height: min(50vh, 360px);
  overflow: auto;
}
.app-dialog-input-wrap {
  display: block;
  margin: 8px 0 4px;
}
.app-dialog-input-wrap.hidden {
  display: none;
}
.app-dialog-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}
.app-dialog-input-wrap input:focus {
  outline: none;
  border-color: rgba(196, 92, 38, 0.55);
  box-shadow: 0 0 0 3px rgba(243, 224, 212, 0.8);
}
.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 130;
  max-width: min(90vw, 420px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(28, 22, 18, 0.92);
  color: #fffdf9;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.app-toast.hidden {
  display: none;
}
.slideshow-narration-card {
  width: min(440px, 100%);
}
.slideshow-narration-actions {
  flex-wrap: wrap;
}
.slideshow-narration-bar {
  margin: 14px 0 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.slideshow-narration-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c45c26, #e08a4d);
  transition: width 0.35s ease;
}
.field-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.check-row input {
  width: auto;
  margin: 0;
}
.check-row.hidden { display: none; }
.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.settings-toggle input {
  margin-top: 3px;
  flex-shrink: 0;
  width: auto;
}
.settings-toggle-sub {
  margin-top: -6px;
  margin-left: 22px;
  color: var(--muted);
}
.settings-toggle-sub.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.pack-quote-body {
  margin: 12px 0 4px;
  font-size: 14px;
  line-height: 1.7;
}
.pack-quote-body .amount {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}
.pack-payer-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.pack-payer-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.pack-payer-opt.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.pack-payer-opt.is-disabled input[type="radio"] {
  cursor: not-allowed;
}
.pack-payer-opt input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: auto;
}
.pack-payer-opt .opt-text {
  flex: 1;
  min-width: 0;
}
.pack-split-tip {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6e8;
  border: 1px solid #f0d2a0;
  color: #7a4e00;
  font-size: 14px;
  line-height: 1.45;
}
.download-package-list {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.download-package-summary {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8f6f2;
  font-size: 13px;
  color: var(--ink);
}
.download-package-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 13px;
}
.download-package-item .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.download-package-item .meta {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}
.download-package-item .status-ready { color: #0f766e; }
.download-package-item .status-failed { color: #b45309; }
.download-package-item .status-pending,
.download-package-item .status-running { color: #64748b; }
.download-package-item .status-expired { color: #94a3b8; }

.deduction-list {
  display: flex;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
  flex-direction: column;
  gap: 8px;
}
.deduction-summary,
.deduction-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 13px;
}
.deduction-summary { background: var(--card); }
.deduction-item .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.deduction-item strong {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.deduction-item .amount {
  flex-shrink: 0;
  color: #b42318;
  font-weight: 700;
}
.deduction-item .amount.amount-in {
  color: #0f766e;
}
.deduction-item .amount.amount-out {
  color: #b42318;
}
.deduction-item .meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.upload-tabs { display: flex; gap: 8px; margin: 8px 0 12px; }
.drop-zone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  min-height: 140px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.drop-zone:hover,
.drop-zone:focus {
  border-color: var(--accent);
  outline: none;
}
.drop-zone.is-dragover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.drop-zone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
}
.drop-zone-inner {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 18px 16px;
  text-align: center;
}
.drop-zone-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.drop-zone-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.upload-file-actions {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 0;
}
.upload-file-actions .ghost {
  padding: 4px 10px;
  font-size: 12px;
}
.drop-zone-summary {
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent);
  max-width: 100%;
  word-break: break-all;
}
.upload-progress-wrap {
  margin-top: 12px;
}
.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}
.upload-progress-bar {
  width: 100%;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #efeae1;
  accent-color: var(--accent);
}
.upload-progress-bar::-webkit-progress-bar {
  background: #efeae1;
  border-radius: 999px;
}
.upload-progress-bar::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}
.upload-progress-bar::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.viewer-card {
  width: min(92vw, 1280px);
  height: min(90vh, 900px);
  max-height: 92vh;
  overflow: hidden;
  background: #111827;
  border-radius: 16px;
  padding: 16px;
  color: #f3f4f6;
  position: relative;
  display: flex;
  flex-direction: column;
}
.viewer-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 40;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.viewer-close:hover {
  background: rgba(31, 41, 55, 0.98);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.detail-image-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0b0b0b;
  border-radius: 12px;
  padding: 10px;
  min-height: 0;
  position: relative;
}
.detail-media-host {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.detail-media-host .detail-viewport {
  flex: 1;
  min-height: 0;
}
.viewer-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 52px;
  height: 88px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.88);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: auto;
}
.viewer-nav-arrow:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.viewer-nav-arrow:active:not(:disabled) {
  background: rgba(0, 0, 0, 0.65);
}
.viewer-nav-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}
.viewer-nav-prev { left: 6px; }
.viewer-nav-next { right: 6px; }
.viewer-download-fab {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 26;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.viewer-download-fab:hover:not(:disabled) {
  background: rgba(31, 41, 55, 0.9);
}
.viewer-download-fab:disabled {
  opacity: 0.45;
  cursor: default;
}
.viewer-nav-pos-overlay {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 24;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
}
.viewer-nav-pos-overlay:empty {
  display: none;
}
.detail-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 8px;
  background: #050505;
  position: relative;
  /* 放大后靠拖动平移，隐藏原生滚动条，避免挡住右上角关闭按钮 */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 拦截浏览器默认双指缩放，改由 JS 只缩放照片 */
  touch-action: none;
}
.detail-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.detail-viewport.can-pan { cursor: grab; }
.detail-viewport.can-pan.dragging {
  cursor: grabbing;
  user-select: none;
}
.detail-viewport.swipe-nav-active {
  overflow: hidden;
}
.detail-viewport-inner.swipe-dragging,
.detail-viewport-inner.swipe-animating {
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.detail-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  padding: 28px 24px;
  box-sizing: border-box;
  white-space: pre-wrap;
  background: rgba(11, 11, 11, 0.92);
  z-index: 3;
}
.detail-loading.hidden { display: none; }
.detail-viewport-inner {
  min-width: 100%;
  min-height: 100%;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  box-sizing: border-box;
  padding: 8px;
  width: max-content;
  height: max-content;
}
.detail-viewport-inner.is-overflow-x {
  justify-content: flex-start;
}
.detail-viewport-inner.is-overflow-y {
  align-items: flex-start;
}
.detail-image-stage {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
  width: fit-content;
  height: fit-content;
}
.detail-image-stage.hidden { display: none; }
.detail-image-stage img,
.detail-image-stage .viewer-video {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
.detail-image-stage .viewer-video {
  max-width: 100%;
  max-height: min(70vh, 720px);
  background: #000;
}
.detail-image-stage .viewer-video.hidden,
.detail-image-stage img.hidden,
#faceCanvas.hidden {
  display: none !important;
}
.video-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.video-mode-bar.hidden { display: none; }
.video-mode-bar .view-btn {
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #374151;
  color: #e5e7eb;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.video-mode-bar .view-btn:hover {
  background: #4b5563;
  color: #fff;
}
.video-mode-bar .view-btn.active {
  background: #14b8a6;
  border-color: #0d9488;
  color: #fff;
}
.video-frame-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.video-frame-picker.hidden { display: none; }
.video-frame-picker button {
  min-width: 40px;
  padding: 4px 10px;
  background: #374151;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  border-radius: 8px;
  cursor: pointer;
}
.video-frame-picker button:hover {
  background: #4b5563;
  color: #fff;
}
.video-frame-picker button.active {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.35);
  color: #fff;
}
#faceCanvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}
.detail-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.face-annotate-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  font-size: 13px;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.face-annotate-toggle input {
  width: 15px;
  height: 15px;
  accent-color: #14b8a6;
  cursor: pointer;
}
.detail-meta.face-annotate-off .face-annotate-block {
  opacity: 0.45;
  pointer-events: none;
}
.detail-zoom-bar button {
  min-width: 36px;
  padding: 6px 12px;
  background: #1f2937;
  color: #f9fafb;
  border: 1px solid #374151;
  border-radius: 8px;
  cursor: pointer;
}
.detail-zoom-bar button:hover { background: #374151; }
#zoomLabel {
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  color: #d1d5db;
}
.detail-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding-right: 4px;
  padding-top: 36px;
}
.face-annotate-block {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-top: 4px;
}
.detail-meta h2 {
  margin: 0 0 10px 0;
  font-size: 17px;
  word-break: break-all;
  color: #fff;
  flex-shrink: 0;
}
.detail-meta h3 {
  margin: 12px 0 8px;
  font-size: 14px;
  color: #e5e7eb;
  flex-shrink: 0;
}
.face-scope-hint {
  margin: -4px 0 10px !important;
  font-size: 12px !important;
  color: rgba(243,244,246,.55) !important;
  flex-shrink: 0;
}
.detail-meta > p {
  flex-shrink: 0;
}
.detail-meta p {
  margin: 0 0 8px;
  color: rgba(243,244,246,.72);
  line-height: 1.5;
  font-size: 13px;
}
.detail-ai {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #e5e7eb !important;
  flex-shrink: 0;
  max-height: 220px;
  overflow-y: auto;
}
.detail-ai-text {
  margin: 0;
  white-space: pre-wrap;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.5;
}
.detail-aigc-trace {
  margin: 8px 0 0;
  font-size: 11px;
  color: rgba(243,244,246,.55);
}
.ai-gen-badge,
.viewer-ai-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #c2410c;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 4px 10px;
  margin: 0 0 8px;
  line-height: 1.3;
}
.viewer-ai-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 28;
  margin: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  pointer-events: none;
}
.slideshow-caption .ai-gen-badge {
  display: block;
  margin: 0 auto 6px;
  width: fit-content;
}
.slideshow-narration-card .ai-gen-badge {
  color: #9a3412;
  background: rgba(194, 65, 12, 0.1);
  border-color: rgba(194, 65, 12, 0.28);
}
#faceList {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: min(240px, 28vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-top: 4px;
  margin-bottom: 8px;
}
.face-item {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  background: rgba(255,255,255,.03);
}
.face-item.active {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.12);
}
.face-item strong { color: #fff; font-size: 13px; }
.face-item div { margin-top: 4px; font-size: 12px; color: rgba(243,244,246,.7); }
.assign-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.assign-input-wrap {
  position: relative;
  min-width: 0;
}
.person-suggest-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  max-height: 132px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #1f2937;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.person-suggest-panel.hidden {
  display: none !important;
}
.person-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3f4f6;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}
.person-suggest-item + .person-suggest-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.person-suggest-item:hover,
.person-suggest-item:focus {
  background: rgba(20, 184, 166, 0.22);
  outline: none;
}
.assign-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 0;
  flex-shrink: 0;
  align-items: center;
}
.assign-box input {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.assign-box button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
#assignMsg {
  flex-shrink: 0;
  min-height: 1.2em;
}

@media (max-width: 1400px) {
  .photo-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .photo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #viewerModal.modal {
    padding: 0;
    place-items: stretch;
    background: #111827;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  #viewerModal .viewer-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
    min-height: 100dvh;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
  }
  #viewerModal .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(260px, 48%);
    gap: 0;
    height: 100%;
    max-width: 100%;
    min-width: 0;
  }
  #viewerModal .detail-image-wrap {
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    gap: 0;
    overflow: hidden;
  }
  #viewerModal .viewer-nav-arrow {
    width: 48px;
    height: 96px;
    font-size: 56px;
    background: rgba(0, 0, 0, 0.4);
  }
  #viewerModal .viewer-nav-prev { left: 2px; }
  #viewerModal .viewer-nav-next { right: 2px; }
  #viewerModal .viewer-download-fab {
    top: 10px;
    left: 10px;
    padding: 10px 16px;
    font-size: 14px;
  }
  #viewerModal .detail-viewport {
    max-width: 100%;
    border-radius: 0;
  }
  #viewerModal .detail-viewport-inner {
    padding: 0;
    max-width: none; /* 放大平移仍需要 */
  }
  #viewerModal .detail-meta {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
    max-width: 100%;
    min-height: 0;
  }
  #viewerModal .detail-meta > h2 {
    font-size: 15px;
    margin-bottom: 6px;
  }
  #viewerModal #detailGps,
  #viewerModal #detailEdited,
  #viewerModal #detailCamera {
    display: none;
  }
  #viewerModal .detail-ai {
    max-height: 140px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 12px;
  }
  #viewerModal .face-annotate-block {
    flex: 1 1 auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
  }
  #viewerModal .face-scope-hint {
    display: none;
  }
  #viewerModal #faceList {
    flex: 1 1 auto;
    min-height: 48px;
    max-height: none;
    margin-bottom: 8px;
  }
  #viewerModal .assign-wrap {
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0) 0%, #111827 18%, #111827 100%);
  }
  #viewerModal .assign-box {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  #viewerModal #assignMsg {
    position: static;
    background: transparent;
    margin: 0;
    padding-bottom: 2px;
  }
  #viewerModal .person-suggest-panel {
    max-height: 120px;
  }
  #viewerModal .viewer-close {
    right: 8px;
    top: 8px;
  }
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-landing {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .auth-brand-block {
    text-align: center;
  }
  .auth-logo {
    margin-left: auto;
    margin-right: auto;
    width: 120px;
    height: 120px;
  }
  .miniprogram-qr {
    align-items: center;
  }
}

@media (max-width: 720px) {
  /* 手机打开网页版：不展示小程序码（本机已是手机） */
  .desktop-only-mp {
    display: none !important;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .browse-sticky {
    position: sticky;
    top: var(--topbar-sticky-h, 40px);
    z-index: 25;
    margin-left: 0;
    margin-right: 0;
  }
  .workspace {
    padding: 10px 12px 40px;
    max-width: 100%;
    width: 100%;
  }
  .browse-body,
  .photo-grid,
  #mainPanel {
    max-width: 100%;
  }
  .photo-card {
    overflow: hidden;
  }
  /* 悬浮详情在窄屏会撑出横向滚动，手机改为不显示 */
  .photo-tip {
    display: none !important;
  }
  .project-select {
    min-width: 0;
    width: auto;
    flex: 1 1 auto;
    max-width: 46vw;
  }
  .top-left,
  .top-right {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .top-left {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
  }
  .project-activity-ticker {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    height: 26px;
    padding: 0 8px;
  }
  .project-activity-item {
    height: 26px;
    line-height: 26px;
    font-size: 11px;
  }
  .top-left .brand-sm {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .top-left .brand-sm span {
    font-size: 14px;
  }
  .topbar .project-select {
    padding: 3px 6px;
    font-size: 12px;
    min-height: 26px;
  }
  .top-right {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .top-right .ghost,
  .top-right .text-btn {
    flex-shrink: 0;
    padding: 3px 6px !important;
    font-size: 12px !important;
    white-space: nowrap;
    line-height: 1.2;
  }
  .top-right .user-meta {
    display: none;
  }
  .toolbar {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }
  .search-wrap {
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .search-wrap input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 5px 8px;
    font-size: 12px;
  }
  .search-wrap .ghost,
  .search-wrap .primary {
    flex-shrink: 0;
    padding: 5px 6px !important;
    font-size: 12px !important;
    white-space: nowrap;
    line-height: 1.2;
  }
  .toolbar > .primary,
  .toolbar > .ghost {
    padding: 5px 8px;
    font-size: 12px;
  }
  .quota-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }
  .quota-item {
    padding: 8px 10px;
  }
  .quota-item .value {
    font-size: 14px;
    line-height: 1.35;
  }
  .pager {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }
  .pager-info {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pager .pager-btn {
    flex-shrink: 0;
    padding: 4px 8px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机：地图入口仍藏；管理项已收进菜单，不再整颗藏掉 */
  .view-switch {
    display: inline-flex;
  }
}

.slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0b;
  color: #f4f4f5;
  display: flex;
  flex-direction: column;
}
.slideshow-overlay.hidden { display: none !important; }
.slideshow-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.slideshow-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1);
  transition: none;
  z-index: 1;
}
.slideshow-img.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
.slideshow-stage.is-animating .slideshow-img {
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slideshow-img.is-face-zooming {
  will-change: transform;
}
.slideshow-stage.fx-fade .slideshow-img.is-leaving { opacity: 0; }
.slideshow-stage.fx-fade .slideshow-img.is-entering { opacity: 1; }
.slideshow-stage.fx-slide-left .slideshow-img.is-leaving {
  opacity: 0; transform: translate3d(-12%, 0, 0);
}
.slideshow-stage.fx-slide-left .slideshow-img.is-entering {
  opacity: 1; transform: translate3d(0, 0, 0);
}
.slideshow-stage.fx-slide-left .slideshow-img.is-prep {
  opacity: 0; transform: translate3d(12%, 0, 0);
}
.slideshow-stage.fx-slide-right .slideshow-img.is-leaving {
  opacity: 0; transform: translate3d(12%, 0, 0);
}
.slideshow-stage.fx-slide-right .slideshow-img.is-entering {
  opacity: 1; transform: translate3d(0, 0, 0);
}
.slideshow-stage.fx-slide-right .slideshow-img.is-prep {
  opacity: 0; transform: translate3d(-12%, 0, 0);
}
.slideshow-stage.fx-slide-up .slideshow-img.is-leaving {
  opacity: 0; transform: translate3d(0, -10%, 0);
}
.slideshow-stage.fx-slide-up .slideshow-img.is-entering {
  opacity: 1; transform: translate3d(0, 0, 0);
}
.slideshow-stage.fx-slide-up .slideshow-img.is-prep {
  opacity: 0; transform: translate3d(0, 10%, 0);
}
.slideshow-stage.fx-zoom .slideshow-img.is-leaving {
  opacity: 0; transform: scale(1.08);
}
.slideshow-stage.fx-zoom .slideshow-img.is-entering {
  opacity: 1; transform: scale(1);
}
.slideshow-stage.fx-zoom .slideshow-img.is-prep {
  opacity: 0; transform: scale(0.92);
}
.slideshow-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 15px;
}
.slideshow-loading.hidden { display: none; }
.slideshow-caption {
  position: absolute;
  left: 50%;
  bottom: 11%;
  z-index: 6;
  transform: translateX(-50%);
  max-width: min(86vw, 720px);
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: clamp(15px, 2.4vw, 20px);
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 1;
  transition: opacity .35s ease;
}
.slideshow-caption.hidden {
  display: none;
}
.slideshow-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 18%, transparent 72%, rgba(0,0,0,.62) 100%);
  opacity: 1;
  transition: opacity .45s ease;
}
.slideshow-overlay.hud-hidden .slideshow-hud {
  opacity: 0;
  pointer-events: none;
}
.slideshow-overlay.hud-hidden .slideshow-hud-top,
.slideshow-overlay.hud-hidden .slideshow-hud-bottom {
  pointer-events: none;
}
.slideshow-hud-top,
.slideshow-hud-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 18px;
  pointer-events: auto;
}
.slideshow-hud-bottom { justify-content: center; }
.slideshow-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.82);
  font-size: 13px;
}
.slideshow-icon-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.slideshow-icon-btn:hover { background: rgba(255,255,255,.22); }
.slideshow-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
.slideshow-field select {
  background: rgba(20,20,22,.9);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

/* —— 相册页改版：顶栏 / 菜单 / 浏览条 —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.topbar {
  min-height: 56px;
  padding: 8px 18px;
  gap: 14px;
  justify-content: flex-start;
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
}
.topbar .brand-sm span { white-space: nowrap; }
.top-left, .top-right {
  flex-wrap: nowrap;
  gap: 8px;
}
.top-right { margin-left: auto; }
#mainPanel.no-project .project-switch,
#mainPanel.no-project .header-search,
#mainPanel.no-project .header-activity,
#mainPanel.no-project #uploadSplit {
  display: none !important;
}

.project-switch { position: relative; min-width: 0; }
.project-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, 34vw);
  padding: 4px 10px 4px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.project-switch-btn:hover,
.project-switch-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--line);
}
.project-switch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1aa37a;
  box-shadow: 0 0 0 4px rgba(26, 163, 122, 0.14);
  flex-shrink: 0;
}
.project-switch-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#projectSwitchName {
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-switch-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(29, 26, 22, 0.38);
  margin-left: 2px;
  flex-shrink: 0;
}

.header-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 520px));
  max-width: 520px;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 200px;
  z-index: 2;
}
.header-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.header-search input {
  flex: 1;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 72px 0 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
}
.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 107, 87, 0.12);
}
.header-search-btn {
  position: absolute;
  right: 4px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.header-search-btn:hover { background: var(--accent); color: #fff; }
.header-search-btn:disabled { opacity: 0.55; cursor: default; }

.upload-split {
  display: inline-flex;
  position: relative;
  align-items: stretch;
}
.upload-split .primary {
  border-radius: 999px 0 0 999px;
  padding: 0 12px 0 12px;
  height: 36px;
}
.upload-split-caret {
  width: 34px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0 999px 999px 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upload-split-caret:hover { filter: brightness(1.08); }

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.7); }
.icon-btn svg { width: 18px; height: 18px; }
.topbar .msg-bell-btn { padding: 0; }
.topbar .msg-badge { top: 2px; right: 2px; }

.account-switch { position: relative; }
.account-avatar-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #1d3d34;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 0;
  text-align: center;
  letter-spacing: 0;
  overflow: hidden;
}
.account-avatar-char {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  font-size: 15px;
}
.account-avatar-btn:hover { filter: brightness(1.08); }

.chrome-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: min(360px, 92vw);
  max-height: min(78vh, 640px);
  overflow: auto;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 50;
}
.chrome-menu-project { left: 0; right: auto; min-width: 300px; }
.chrome-menu-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(29, 26, 22, 0.4);
}
.chrome-menu-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}
.chrome-menu-item:hover { background: #e5f3ee; }
.chrome-menu-item:disabled {
  opacity: 0.45;
  cursor: default;
}
.chrome-menu-item.danger { color: #9b2c2c; }
.chrome-menu-item .check {
  width: 14px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.chrome-menu-item .sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.chrome-menu-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}
.chrome-menu-user {
  display: block;
  padding: 8px 10px 6px;
  font-size: 13px;
}

.quota-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 4px 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.quota-bar:empty { display: none; }
.quota-item {
  background: #f6f1e8;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
}
.quota-item .value { font-size: 13px; }
.quota-bar .quota-progress {
  height: 6px;
  margin: 6px 0 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.quota-bar .quota-progress > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.browse-nav { gap: 8px; }
.browse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.browse-row .mode-toggle {
  width: auto;
  height: 34px;
  flex-shrink: 0;
}
.browse-row .mode-toggle-item {
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 13px;
}
.browse-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tool-menu-wrap { position: relative; }
.tool-btn {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.tool-btn:hover,
.tool-btn.active,
.tool-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.75);
}
.tool-btn:disabled { opacity: 0.4; cursor: default; }
.tool-btn .btn-icon { width: 16px; height: 16px; }
.browse-tools .view-switch {
  height: 32px;
}
.browse-tools .view-btn {
  padding: 0 10px;
  font-size: 12px;
  height: 100%;
}
.browse-tools .sort-shortcuts {
  gap: 2px 8px;
  padding: 0 4px;
}
.browse-meta {
  align-items: center;
}
.browse-sticky .project-activity-ticker {
  min-width: 0;
  max-width: none;
  flex: 1;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.header-activity {
  flex: 0 1 280px;
  min-width: 180px;
  max-width: 360px;
  height: 36px;
  margin: 0 0 0 auto;
  padding: 0 12px;
}
.header-activity .project-activity-item {
  height: 36px;
  line-height: 36px;
}
@media (max-width: 1919px) {
  .header-activity {
    display: none !important;
  }
}
.browse-sticky .project-activity-ticker:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}
.browse-sticky .project-activity-item {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
  color: var(--muted);
}

.workspace { padding-bottom: 88px; }

.photo-select-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 18px;
  background: #1c1915;
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.photo-select-bar.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.photo-select-bar .ghost {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
}
.photo-select-bar .ghost:disabled { opacity: 0.4; }
.photo-select-bar .danger { background: #9b2c2c; }
.photo-select-bar .btn-with-icon { background: var(--accent); }

@media (max-width: 1100px) {
  .header-search {
    width: min(320px, calc(100% - 420px));
    max-width: 320px;
    min-width: 160px;
  }
  .project-switch-meta { display: none; }
  .tool-btn-label { display: none; }
}
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
    padding: 8px 12px;
    gap: 8px;
  }
  .top-left, .top-right {
    width: auto;
    overflow: visible;
  }
  .top-right {
    margin-left: auto;
    justify-content: flex-end;
  }
  .chrome-menu .user-meta { display: block; }
  .header-search {
    position: relative;
    left: auto;
    transform: none;
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
  }
  .project-switch-btn { max-width: 46vw; }
  .top-left .brand-sm span { display: none; }
  .upload-split .primary span { display: none; }
  .browse-row {
    flex-wrap: wrap;
  }
  .browse-tools {
    margin-left: auto;
  }
  .browse-tools .sort-shortcuts .sort-btn {
    font-size: 12px;
  }
  .view-switch { display: none !important; }
}
