:root {
  --brand: #1fa0ae;
  --brand-dark: #17818c;
  --accent: #e64340;
  --ink: #1a1f28;
  --muted: #7a8290;
  --line: #e8ebf0;
  --bg: #f3f5f8;
  --card: #fff;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 56px;
  --top-h: 52px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 320px at 8% -8%, rgba(230,67,64,.07), transparent 55%),
    radial-gradient(720px 280px at 96% 0%, rgba(31,160,174,.12), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }

#app { min-height: 100%; padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h);
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 0 6px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.topbar__logo {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff; font-size: 16px;
}
.topbar__title {
  font-weight: 800; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__back, .topbar__action {
  border: 0; background: transparent; font-size: 22px;
  color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
}
.main { padding: 12px 14px 24px; max-width: 640px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(26,31,40,.06);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 9px; color: var(--muted); padding-top: 4px; min-width: 0;
}
.tabbar__item i { font-size: 19px; line-height: 1; }
.tabbar__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar__item.is-active { color: var(--brand); font-weight: 700; }

.hero {
  border-radius: 18px;
  padding: 22px 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, #1a3a4a 0%, var(--brand) 52%, #3ec6c9 100%);
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(31,160,174,.28);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero__brand { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: .02em; position: relative; z-index: 1; }
.hero__desc { margin: 0; opacity: .92; font-size: 13px; line-height: 1.6; position: relative; z-index: 1; }
.hero__phone { margin-top: 12px; font-size: 12px; opacity: .85; position: relative; z-index: 1; }
.hero__phone a { color: #fff; text-decoration: underline; }

.quick-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.quick-nav a {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 6px; text-align: center; font-size: 11px; color: var(--ink);
  box-shadow: 0 2px 8px rgba(26,31,40,.04);
}
.quick-nav i { display: block; font-size: 22px; color: var(--brand); margin-bottom: 6px; }
.quick-nav--dense { grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }

.nav-group { margin-bottom: 14px; }
.nav-group__title { font-size: 12px; color: var(--muted); font-weight: 700; margin: 0 0 8px 12px; text-transform: uppercase; letter-spacing: .04em; }
.nav-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.nav-grid a {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px; font-weight: 600;
}
.nav-grid a i { color: var(--brand); font-size: 18px; }

.intro-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px;
}
.intro-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; text-align: center;
}
.intro-stat strong { display: block; font-size: 20px; color: var(--brand); }
.intro-stat span { font-size: 11px; color: var(--muted); }

.feature-card {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f2f5;
}
.feature-card:last-child { border-bottom: 0; }
.feature-card i { font-size: 22px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.feature-card h4 { margin: 0 0 4px; font-size: 14px; }
.feature-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.55; }

.step-list { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.step-list li {
  position: relative; padding: 0 0 16px 36px; font-size: 13px;
}
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-list li strong { display: block; margin-bottom: 2px; }
.step-list li span { color: var(--muted); font-size: 12px; }

.site-footer {
  text-align: center; font-size: 11px; color: var(--muted); line-height: 1.7;
  padding: 16px 8px 8px; margin-top: 8px;
}
.site-footer a { color: var(--brand); }

.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 10px 0 10px;
}
.sec-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.sec-head a { font-size: 12px; color: var(--brand); font-weight: 600; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.search-bar {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.search-bar input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  background: #fff; font-size: 14px;
}
.search-bar button {
  width: 44px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-size: 18px;
}

.card-list { display: grid; gap: 12px; }
.event-card {
  display: grid; grid-template-columns: 112px 1fr; gap: 0;
  background: var(--card); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(26,31,40,.05);
}
.event-card__cover { position: relative; min-height: 100px; background: linear-gradient(145deg, #dfe7ec, #c5d4de); }
.event-card__cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.event-card__body { padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.event-card__title {
  margin: 0 0 6px; font-size: 14px; font-weight: 800;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.event-card__meta { margin: 0; padding: 0; list-style: none; font-size: 11px; color: var(--muted); line-height: 1.65; }

.news-row {
  display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 10px;
}
.news-row__date {
  flex-shrink: 0; width: 48px; text-align: center; color: var(--brand); font-weight: 800;
}
.news-row__day { font-size: 22px; line-height: 1; }
.news-row__ym { font-size: 10px; color: var(--muted); }
.news-row__title { font-size: 14px; font-weight: 700; margin: 0 0 4px; line-height: 1.4; }
.news-row__sub { font-size: 11px; color: var(--muted); margin: 0; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; color: #fff;
  background: var(--brand); font-weight: 600;
}
.badge--full { background: #f0a020; }
.badge--ended, .badge--closed { background: #9aa3af; }

.detail-page { padding-bottom: calc(76px + var(--safe-b)); margin: -12px -14px 0; }
.detail-hero {
  position: relative; aspect-ratio: 16/10; max-height: 240px;
  background: linear-gradient(145deg, #dfe7ec, #c5d4de); overflow: hidden;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero__mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 100%);
}
.detail-hero__info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px 16px; color: #fff;
}
.detail-hero__badge { margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.detail-hero__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.detail-hero__price {
  margin-top: 8px; font-size: 18px; font-weight: 800;
}
.detail-hero__price small { font-size: 12px; font-weight: 600; opacity: .85; margin-left: 6px; }

.detail-body { padding: 14px 14px 0; }

.detail-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.detail-info__item {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 11px; min-height: 68px;
}
.detail-info__icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31,160,174,.1); color: var(--brand); font-size: 16px;
}
.detail-info__label { display: block; font-size: 10px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.detail-info__value { display: block; font-size: 12px; font-weight: 700; line-height: 1.45; color: var(--ink); }

.detail-quota {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px;
}
.detail-quota__head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 8px; }
.detail-quota__head strong { font-size: 13px; }
.detail-quota__bar { height: 6px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.detail-quota__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #3ec9d6); transition: width .3s ease; }

.detail-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.detail-tabs button {
  flex: 1; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600;
}
.detail-tabs button.is-active {
  background: rgba(31,160,174,.1); border-color: var(--brand); color: var(--brand);
}
.detail-panel { display: none; }
.detail-panel.is-active { display: block; }

.detail-cover { margin: -12px -14px 14px; aspect-ratio: 16/9; background: #dfe7ec; overflow: hidden; border-radius: 0 0 16px 16px; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { margin: 0 0 10px; font-size: 21px; font-weight: 800; line-height: 1.35; }
.detail-meta { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.detail-html {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  border: 1px solid var(--line); font-size: 14px; line-height: 1.8;
  color: var(--ink);
}
.detail-html p { margin: 0 0 .75em; }
.detail-html p:last-child { margin-bottom: 0; }
.detail-html img { border-radius: 8px; max-width: 100%; margin: 8px 0; }

.detail-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 46px 1fr; gap: 10px;
  max-width: 640px; margin: 0 auto;
}
.hidden-tab .detail-bar { padding-bottom: calc(10px + var(--safe-b)); }
.detail-bar .btn { min-height: 44px; }
.detail-bar__share {
  width: 46px; min-height: 44px; padding: 0; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.detail-bar__share:active { background: #f5f7fa; }

.detail-actions {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  margin-top: 18px; z-index: 5;
}

.detail-skeleton { padding: 14px; }
.detail-skeleton__hero {
  height: 180px; border-radius: 14px; margin-bottom: 14px;
  background: linear-gradient(90deg, #e8ebf0 25%, #f3f5f8 50%, #e8ebf0 75%);
  background-size: 200% 100%; animation: detail-shimmer 1.2s infinite;
}
.detail-skeleton__line {
  height: 14px; border-radius: 8px; margin-bottom: 10px;
  background: linear-gradient(90deg, #e8ebf0 25%, #f3f5f8 50%, #e8ebf0 75%);
  background-size: 200% 100%; animation: detail-shimmer 1.2s infinite;
}
.detail-skeleton__line--short { width: 55%; }
@keyframes detail-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 46px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(31,160,174,.25);
}
.btn:active { background: var(--brand-dark); transform: translateY(1px); }
.btn--accent { background: var(--accent); box-shadow: 0 6px 16px rgba(230,67,64,.22); }
.btn--ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); box-shadow: none; }
.btn--sm { min-height: 36px; font-size: 13px; padding: 0 14px; width: auto; }
.btn--block { margin-top: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

.form {
  background: #fff; border-radius: 14px; padding: 16px;
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(26,31,40,.04);
}
.form label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.form input, .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; background: #fafbfc; font-size: 15px;
}
.form textarea { min-height: 88px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button {
  flex: 1; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer; font-size: 13px;
}
.tabs button.is-active {
  background: rgba(31,160,174,.12); border-color: var(--brand);
  color: var(--brand); font-weight: 700;
}

.empty { text-align: center; color: var(--muted); padding: 36px 16px; font-size: 13px; }
.empty i { font-size: 36px; display: block; margin-bottom: 10px; opacity: .5; }

.list-item {
  display: flex; gap: 12px; background: #fff; border-radius: 14px; padding: 12px;
  border: 1px solid var(--line); margin-bottom: 10px;
}
.list-item img { width: 76px; height: 58px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title { font-weight: 800; font-size: 14px; margin: 0 0 4px; line-height: 1.35; }
.list-item__sub { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.list-item__links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.list-item__links a { color: var(--brand); font-weight: 600; }

.panel {
  background: #fff; border-radius: 14px; border: 1px solid var(--line);
  padding: 14px 16px; margin-bottom: 12px;
}
.panel h3 { margin: 0 0 10px; font-size: 15px; }

.help-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; font-weight: 600;
}
.help-item:last-child { border-bottom: 0; }
.help-item i { color: var(--muted); }

.ticket {
  background: linear-gradient(165deg, #fff 0%, #f0fafb 100%);
  border: 1px solid rgba(31,160,174,.35);
  border-radius: 18px; padding: 22px 16px; text-align: center;
  box-shadow: 0 10px 28px rgba(31,160,174,.12);
}
.ticket__title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.ticket__qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; margin: 12px 0; }
.ticket__code {
  font-size: 24px; font-weight: 800; letter-spacing: .1em;
  color: var(--brand); font-family: Consolas, Monaco, monospace;
  background: #f6f8fa; padding: 8px 12px; border-radius: 10px; display: inline-block;
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 24px + var(--safe-b));
  transform: translateX(-50%);
  background: rgba(26,31,40,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 50; max-width: 86%; text-align: center;
}

.hidden-tab .tabbar { display: none; }
.hidden-tab #app { padding-bottom: var(--safe-b); }
.hidden-tab .topbar__action { visibility: hidden; }
.detail-mode .topbar__logo { display: none; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pager button, .pager span {
  min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; color: var(--ink);
}
.pager button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; }

.footer-link {
  text-align: center; margin-top: 20px; font-size: 12px; color: var(--muted);
}
.footer-link a { color: var(--brand); font-weight: 600; }

.member-menu {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.member-menu a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.member-menu a i { font-size: 20px; color: var(--brand); }

.order-row {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.order-row__top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.order-row__title { font-weight: 800; font-size: 14px; margin: 0 0 6px; }
.order-row__amount { font-size: 18px; font-weight: 800; color: var(--accent); }
.order-row__actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.order-row__actions a { color: var(--brand); font-weight: 600; }

.ticket-row {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.ticket-row__title { font-weight: 800; font-size: 14px; margin: 0 0 6px; }
.ticket-row__meta { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chat { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.chat__item { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.chat__item--me { align-self: flex-end; background: rgba(31,160,174,.12); border: 1px solid rgba(31,160,174,.25); }
.chat__item--other { align-self: flex-start; background: #f3f5f8; border: 1px solid var(--line); }
.chat__item--sys { align-self: center; background: #fff8e6; border: 1px solid #ffe0a3; font-size: 12px; color: #8a6d3b; max-width: 100%; }
.chat__who { font-size: 10px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.chat__time { font-size: 10px; color: var(--muted); margin-top: 4px; }
