﻿.splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(720px 360px at 50% 28%, rgba(78, 180, 255, .28), transparent 60%),
    linear-gradient(165deg, #071a36 0%, #0d3a78 48%, #1565c0 100%);
  color: #fff;
  overflow: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 42%, #000 18%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 18%, transparent 72%);
}
.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
}
.splash-orb-a {
  width: 220px;
  height: 220px;
  left: 8%;
  top: 18%;
  background: rgba(245, 180, 0, .18);
  animation: ambiGlow 8s ease-in-out infinite alternate;
}
.splash-orb-b {
  width: 260px;
  height: 260px;
  right: 4%;
  bottom: 14%;
  background: rgba(26, 168, 122, .16);
  animation: ambiGlow 10s ease-in-out infinite alternate-reverse;
}

.splash-stage {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
}
.splash-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  animation: pulseRing 2.8s ease-out infinite;
}
.splash-ring-2 { animation-delay: .9s; inset: -10px; border-color: rgba(168, 220, 255, .35); }
.splash-ring-3 { animation-delay: 1.8s; inset: -22px; border-color: rgba(245, 180, 0, .28); }

.splash-mark {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
  animation: splashFloat 2.4s var(--ease) infinite;
}
.splash-mark img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 22%;
}
.splash-name {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  animation: rise 0.55s var(--ease) both;
}
.splash-en {
  margin-top: 8px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.18em;
  opacity: 0.72;
  animation: rise 0.55s var(--ease) .08s both;
}
.splash-pillars {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  animation: rise 0.55s var(--ease) .14s both;
}
.splash-pillars span {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: var(--fw-regular);
  letter-spacing: .08em;
}
.splash-pillars span:nth-child(1) { border-color: rgba(26, 168, 122, .45); }
.splash-pillars span:nth-child(2) { border-color: rgba(168, 220, 255, .5); }
.splash-pillars span:nth-child(3) { border-color: rgba(245, 180, 0, .5); }

.splash-bar {
  width: 112px;
  height: 3px;
  margin-top: 22px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
  overflow: hidden;
}
.splash-bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #9fd0ff, #fff);
  animation: loadbar 1.05s ease-in-out infinite;
}

@keyframes splashFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(var(--safe-t) + 6px) var(--gutter) 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid rgba(230, 234, 240, 0.9);
}

.topbar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-medium);
  letter-spacing: .02em;
}
.brand-sub {
  display: none;
  font-family: var(--font-en);
}

.top-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #646a73;
  border: 1px solid rgba(229, 232, 237, .9);
  box-shadow: 0 3px 10px rgba(31, 35, 41, .05);
  transition: transform .2s var(--ease), color .2s, box-shadow .2s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.is-ghost {
  background: rgba(255,255,255,.86);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-medium);
  display: grid;
  place-items: center;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(31, 35, 41, .12);
  transition: transform .2s var(--ease);
}
.avatar-btn:active { transform: scale(.94); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title-wrap h1 { font-size: 18px; font-weight: var(--fw-medium); }

.desktop-nav { display: none; }
.desktop-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: var(--fw-regular);
  transition: background .18s var(--ease), color .18s;
}
.desktop-nav a:hover { background: rgba(47, 124, 246, .06); color: var(--ink); }
.desktop-nav a.is-active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: var(--fw-medium);
}

@media (min-width: 960px) {
  .desktop-nav { display: flex; align-items: center; gap: 4px; }
  .brand-sub { display: block; font-size: 12px; color: var(--muted); }
  .topbar {
    box-shadow: 0 1px 0 rgba(230, 234, 240, .9), 0 8px 24px rgba(24, 39, 75, .04);
  }
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + var(--safe-b));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(230, 234, 240, .95);
  box-shadow: 0 -8px 28px rgba(24, 39, 75, .05);
}
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8a9199;
  font-size: 12px;
  font-weight: var(--fw-regular);
  padding: 2px 0;
  transition: color .18s var(--ease);
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.is-active { color: var(--blue); font-weight: var(--fw-medium); }
.tabbar button.is-active[data-go="#/"] svg {
  fill: currentColor;
}
body.is-desktop .tabbar { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
  transition: transform .18s var(--ease), box-shadow .18s, filter .18s, background .18s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(105deg, #2f7cf6 0%, #4b94ff 100%);
  box-shadow: 0 8px 20px rgba(47, 124, 246, .26);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #f7f9fc; }
.btn-soft { background: var(--blue-soft); color: var(--blue); }
.btn-danger {
  color: #cb2634;
  background: #fff1f0;
  border: 1px solid #ffccc7;
}
.btn-block { width: 100%; }
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
}
.btn-logout { color: #86909c; }

.btn-search {
  flex: none;
  height: 46px;
  padding: 0 19px;
  border-radius: 14px;
  color: #fff;
  font-weight: var(--fw-medium);
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: 0 7px 16px rgba(255, 138, 26, .22);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-search:active { transform: scale(.96); }

.field { display: flex; flex-direction: column; gap: 7px; }
.form-card .field + .field { margin-top: 14px; }
.form-card .btn { margin-top: 12px; }
.form-card .btn-primary { margin-top: 18px; }
.field label { font-size: 14px; font-weight: var(--fw-regular); color: var(--ink-2); }
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #e5e8ee;
  background: #fbfcfe;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 17px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 134, 255, 0.12);
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid rgba(230, 234, 240, .95);
  box-shadow: var(--shadow-sm);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  background: #fff;
  border-radius: 15px;
  border: 1px solid #e4e8ee;
  box-shadow: 0 5px 18px rgba(31, 35, 41, .045);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within {
  border-color: rgba(47, 134, 255, .55);
  box-shadow: 0 0 0 3px rgba(47, 134, 255, .09), 0 7px 20px rgba(31, 35, 41, .05);
}
.search svg { width: 18px; height: 18px; color: #9aa3ad; flex: none; }
.search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  min-width: 0;
  font-size: 16px;
}
.search input::placeholder { color: #b0b7c0; }

.section-h {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin: 26px 2px 14px;
}
.section-h h2 {
  font-size: 19px;
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .02em;
}
.section-h h2::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-2), var(--blue));
}
.section-h p {
  margin: 3px 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.section-h span {
  font-size: 13px;
  color: var(--muted);
}

/* 手机固定 5 列居左均分；居中的是 #main 内容柱，不是图标组 */
.edit-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--blue-soft, #edf4ff);
  color: var(--blue, #2f7cf6);
  font-size: 11px;
  font-weight: var(--fw-medium, 500);
  vertical-align: middle;
}
.is-editable {
  outline: 2px dashed rgba(47, 124, 246, .5);
  outline-offset: 5px;
  border-radius: 12px;
  caret-color: #2f7cf6;
  transition: outline-color .2s ease;
}
.is-editable:focus {
  outline-color: #2f7cf6;
}
@media print {
  .is-editable { outline: none; outline-offset: 0; }
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 19px 5px;
  justify-content: start;
  justify-items: start;
}
.tools-panel .tool-grid {
  grid-template-columns: repeat(5, 1fr);
  justify-content: start;
  justify-items: start;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  border-radius: 15px;
  transition: transform .2s var(--ease), background .2s;
  animation: riseSoft 0.42s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.tool:active { transform: scale(.94); }
.tool-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  box-shadow: 0 8px 16px rgba(31, 35, 41, .12), inset 0 1px 0 rgba(255,255,255,.28);
  overflow: visible;
  transition: transform .22s var(--ease), box-shadow .22s;
}
.tool:hover .tool-ico { transform: translateY(-2px); }
.tool-ico svg { width: 22px; height: 22px; stroke-width: 1.9; }
.tool span {
  font-size: 12px;
  color: var(--ink);
  font-weight: var(--fw-regular);
  width: 48px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.tool-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: var(--fw-medium);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.tool-badge.hot { background: #ff4d4f; }
.tool-badge.new { background: var(--orange); }
.tool-badge.vip { background: #ff9f1a; }

@media (min-width: 720px) {
  .tool-ico { width: 52px; height: 52px; border-radius: 15px; }
  .tool span { width: 52px; font-size: 13px; }
}

@media (min-width: 640px) {
  .tool-grid,
  .tools-panel .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 22px 10px;
    justify-content: start;
    justify-items: start;
  }
}

@media (min-width: 960px) {
  .tool-grid,
  .tools-panel .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 28px 16px;
  }
  .tool:hover { transform: translateY(-3px); }
  .tool:hover .tool-ico { box-shadow: 0 12px 22px rgba(31, 35, 41, .16), inset 0 1px 0 rgba(255,255,255,.28); }
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 24, 32, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}
.modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + var(--safe-b));
  animation: rise 0.28s var(--ease);
  max-height: 92dvh;
  overflow: auto;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, .16);
}
.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #e5e6eb;
  margin: 6px auto 10px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.modal-head .icon-btn {
  width: 32px;
  height: 32px;
  box-shadow: none;
}
.modal h3 { font-size: 19px; font-weight: var(--fw-semibold); }
.modal .hint { margin: 4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.modal-body { color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* AI 超时弹窗 */
.ai-timeout-modal { text-align: center; max-width: 300px; }
.ai-timeout-icon {
  width: 64px;
  height: 64px;
  margin: 2px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-soft);
}
.ai-timeout-icon svg { width: 34px; height: 34px; }
.ai-timeout-modal h3 { margin-bottom: 6px; }
.ai-timeout-modal .hint { margin-bottom: 4px; }
.ai-timeout-modal .ai-timeout-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.ai-timeout-btns { display: flex; gap: 10px; margin-top: 18px; }
.ai-timeout-btns .btn { flex: 1; }


.lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 16, 32, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 24px;
  animation: fade .2s ease;
}
.lightbox-mask img {
  max-width: min(920px, 100%);
  max-height: 86dvh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: calc(var(--safe-t) + 14px);
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  display: grid;
  place-items: center;
}
.lightbox-close svg { width: 18px; height: 18px; }

@media (min-width: 720px) {
  .modal-mask { align-items: center; padding: 24px; }
  .modal { border-radius: 18px; padding: 22px; }
  .modal-handle { display: none; }
}

.toasts {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 72px);
  transform: translateX(-50%);
  z-index: 90;
  width: min(400px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  background: rgba(22, 28, 40, 0.94);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
  animation: rise 0.22s var(--ease);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: var(--fw-medium);
}
.chip-guest { background: #f2f3f5; color: #86909c; }
.chip-member { background: #e8f3ff; color: var(--blue); }
.chip-vip { background: #fff4e5; color: #d46b08; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: var(--fw-regular);
  background: rgba(47, 134, 255, .08);
}
.copy-btn:active { background: rgba(47, 134, 255, .16); }

.empty {
  text-align: center;
  padding: 52px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .55);
  border: 1px dashed rgba(200, 208, 220, .85);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: var(--fw-medium);
}
