/* R49 活动通知报名 v1 · 5色 + 明暗双主题 + 通知报名一体化 */
:root {
  --primary: #1565C0; --accent: #42A5F5; --bg: #F0F4FA; --bg-light: #E3F2FD;
  --card: #FFF; --text: #0D2137; --text-muted: #607D8B; --text-dark: #0D2137;
  --border: #BBDEFB; --shadow: 0 4px 24px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  transition: background .35s, color .35s;
}
html.has-mobile-bar body { padding-bottom: calc(8.75rem + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.persona-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center;
  padding: .55rem 1rem; background: var(--card); border-bottom: 1px solid var(--border);
}
.persona-btn {
  padding: .4rem .9rem; border-radius: 999px; border: 2px solid var(--border);
  background: var(--bg); cursor: pointer; font-weight: 600; font-size: .82rem;
}
.persona-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }

.top-nav { position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: .25s; }
body[data-appearance='dark'] .top-nav { background: rgba(15,15,20,.92); }
.top-nav.is-scrolled { border-color: var(--border); box-shadow: var(--shadow); }
.top-nav__row { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; }
.top-nav__brand { font-weight: 800; color: var(--primary); font-size: .9rem; flex-shrink: 0; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-nav__menu { margin-left: auto; border: 1px solid var(--border); background: var(--card); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; }
.top-nav__links { display: none; width: 100%; flex-direction: column; gap: .2rem; padding: 0 1rem 1rem; }
.top-nav__links.is-open { display: flex; }
.top-nav__links a { color: var(--text-muted); padding: .45rem .65rem; border-radius: 6px; font-size: .82rem; }
.top-nav__links a:hover { color: var(--primary); background: var(--bg-light); }
.top-nav__cta { color: var(--primary) !important; font-weight: 700; }
.top-nav__share { border: 1px dashed var(--border) !important; font-size: .78rem !important; padding: .35rem .55rem !important; border-radius: 6px; white-space: nowrap; }
@media (min-width: 768px) {
  .top-nav__menu { display: none; }
  .top-nav__links { display: flex !important; flex-direction: row; width: auto; margin-left: auto; padding: 0; }
}

.theme-panel {
  position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 180;
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: var(--card); border-radius: 10px; border: 1px solid var(--border);
  box-shadow: var(--shadow); max-height: min(50vh, 280px); overflow-y: auto;
}
.theme-appearance-btn, .theme-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; padding: 0; flex-shrink: 0;
}
.theme-appearance-btn { background: var(--card); font-size: .72rem; line-height: 22px; text-align: center; }
.theme-dot.active { outline: 2px solid var(--text-dark); }

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: calc(4.25rem + env(safe-area-inset-bottom)); z-index: 840;
  display: flex; background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.mobile-bar__btn {
  flex: 1; padding: .55rem .25rem; border: none; background: none; font-size: .68rem; color: var(--text-muted);
  text-decoration: none; text-align: center; cursor: pointer;
}
.mobile-bar__btn--primary { color: var(--primary); font-weight: 700; }
@media (min-width: 768px) {
  .mobile-bar { display: none; }
  html.has-mobile-bar body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
  padding: .45rem .75rem calc(.45rem + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--border);
  backdrop-filter: blur(10px); box-shadow: 0 -4px 20px rgba(0,0,0,.04);
}
.contact-footer__btns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; max-width: 420px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn {
  flex: 0 1 auto; padding: .4rem .85rem; border-radius: 999px; font-size: .74rem; font-weight: 600; text-align: center; white-space: nowrap;
}
.contact-footer__cta { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
body[data-appearance='dark'] .contact-footer__cta { color: #111; }
.contact-footer__btn { background: var(--card); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.contact-footer__brand { text-align: center; font-size: .62rem; color: var(--text-muted); margin: .35rem 0 0; }

.section { padding: 2.5rem 1.25rem; max-width: 720px; margin: 0 auto; }
.section__title { font-size: 1.35rem; font-weight: 800; color: var(--primary); margin-bottom: .35rem; text-align: center; }
.section__sub, .section__intro { text-align: center; font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.section__intro { text-align: left; line-height: 1.75; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .88rem;
  border: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
body[data-appearance='dark'] .btn-primary { color: #111; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; margin-top: .75rem; }
.link-btn { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; text-decoration: underline; }

.glass-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem; box-shadow: var(--shadow);
}

.hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; padding: 0; max-width: none; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,.15) 100%); }
.hero__content { position: relative; z-index: 1; color: #fff; padding: 2rem 1.25rem 2.5rem; max-width: 720px; margin: 0 auto; width: 100%; text-align: center; }
.hero__badge { display: inline-block; background: var(--primary); color: #fff; padding: .25rem .75rem; border-radius: 999px; font-size: .72rem; font-weight: 700; margin-bottom: .75rem; }
.hero__name { font-size: 1.5rem; font-weight: 800; margin-bottom: .35rem; }
.hero__slogan { font-size: .95rem; opacity: .92; margin-bottom: .5rem; }
.hero__meta { font-size: .82rem; opacity: .85; margin-bottom: 1rem; line-height: 1.6; }
.hero__spots { font-size: .78rem; margin: .75rem 0 1rem; opacity: .9; }
.hero__btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.countdown { display: flex; justify-content: center; gap: .5rem; margin: .5rem 0; }
.countdown__unit { background: rgba(255,255,255,.15); backdrop-filter: blur(6px); border-radius: 8px; padding: .4rem .55rem; min-width: 48px; }
.countdown__unit b { display: block; font-size: 1.25rem; font-weight: 800; }
.countdown__unit span { font-size: .65rem; opacity: .85; }
.countdown__label { font-size: .72rem; opacity: .8; margin-top: .25rem; }
.countdown--live, .countdown--ended { display: block; font-weight: 700; font-size: .95rem; padding: .65rem 1rem; background: rgba(255,255,255,.12); border-radius: 10px; }

.agenda-list { display: flex; flex-direction: column; gap: .65rem; margin: 1rem 0; }
.agenda-item { display: flex; gap: .75rem; align-items: flex-start; }
.agenda-item__time { font-weight: 800; color: var(--primary); min-width: 3.5rem; font-size: .85rem; }
.agenda-item p { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1rem; }
.tag-cloud span { background: var(--bg-light); border: 1px solid var(--border); padding: .25rem .65rem; border-radius: 999px; font-size: .72rem; color: var(--text-muted); }

.register-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .register-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.form-box__title { font-size: .88rem; font-weight: 700; margin: 1rem 0 .5rem; color: var(--primary); }
.form-box__title:first-child { margin-top: 0; }
.form-field { margin-bottom: .65rem; }
.form-field label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: .25rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: .88rem;
}
.notify-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.notify-chip {
  display: inline-flex; align-items: center; padding: .35rem .65rem; border-radius: 999px;
  border: 2px solid var(--border); background: var(--bg); font-size: .75rem; cursor: pointer;
}
.notify-chip input { display: none; }
.notify-chip.active { border-color: var(--primary); background: var(--bg-light); color: var(--primary); font-weight: 600; }

.loop-steps { list-style: none; margin: .75rem 0; }
.loop-steps li { display: flex; align-items: center; gap: .5rem; font-size: .82rem; margin-bottom: .45rem; }
.loop-steps span {
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; flex-shrink: 0;
}
.loop-note { font-size: .75rem; color: var(--text-muted); margin-top: .5rem; }
.reg-done-banner { margin-bottom: 1rem; text-align: center; font-size: .85rem; }

.notify-timeline { display: flex; flex-direction: column; gap: .65rem; }
.notify-item { position: relative; padding-right: 4.5rem; }
.notify-item__time { font-size: .72rem; color: var(--text-muted); margin-bottom: .25rem; }
.notify-item__body p { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.notify-item__status {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  font-size: .65rem; font-weight: 700; padding: .2rem .45rem; border-radius: 6px;
}
.notify-item--sent .notify-item__status { background: #E8F5E9; color: #2E7D32; }
.notify-item--pending .notify-item__status { background: #FFF3E0; color: #E65100; }
.notify-item--scheduled .notify-item__status { background: var(--bg-light); color: var(--primary); }

.organizer-card { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.organizer-card__logo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.stat-card { text-align: center; padding: .75rem .5rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.stat-card__value { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.stat-card__label { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; }
.partner-row { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.partner-row span { font-size: .72rem; padding: .25rem .55rem; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); }

.location-card p { font-size: .85rem; margin-bottom: .45rem; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: .88rem; }
.faq-item p { font-size: .82rem; color: var(--text-muted); margin-top: .5rem; padding-left: .25rem; }

.modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal__box {
  position: relative; background: var(--card); border-radius: 16px; padding: 1.5rem;
  max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow);
}
.modal__close { position: absolute; right: .75rem; top: .75rem; border: none; background: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); }
.ticket-code { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: .05em; margin: .5rem 0 1rem; }
.ticket-hint { font-size: .75rem; color: var(--text-muted); margin-top: 1rem; }

.notice-toast {
  position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.85); color: #fff; padding: .55rem 1rem; border-radius: 999px;
  font-size: .82rem; z-index: 999; opacity: 0; pointer-events: none; transition: .3s;
}
.notice-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 767px) {
  .theme-panel {
    top: auto; bottom: calc(7.75rem + env(safe-area-inset-bottom)); transform: none; right: 8px;
    flex-direction: row; flex-wrap: nowrap; max-height: none; max-width: calc(100vw - 4.5rem); overflow-x: auto;
  }
}
