:root {
  --ink: #102228;
  --ink-soft: #3a4a52;
  --muted: #6b7c85;
  --paper: #eef3f4;
  --paper-2: #f7fafb;
  --surface: color-mix(in srgb, var(--paper) 72%, #fff);
  --brand: #128a5c;
  --brand-deep: #0d3d6e;
  --brand-bright: #1db87a;
  --accent: #ff5c3a;
  --accent-soft: #ff8f74;
  --accent-ink: #fff;
  --logo-yellow: #e8b923;
  --logo-magenta: #c41e8a;
  --line: rgba(16, 34, 40, 0.1);
  --shadow: 0 18px 50px rgba(8, 72, 68, 0.12);
  --radius: 18px;
  --header-h: 72px;
  --tabbar-h: 0px;
  --font-display: "Outfit", "Noto Sans TC", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans TC", "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(20, 163, 154, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 90, 47, 0.12), transparent 50%),
    linear-gradient(180deg, #e7f1f1 0%, var(--paper) 40%, var(--paper-2) 100%);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

body.nav-open,
body.sheet-open {
  overflow: hidden;
}

/* Hidden on desktop; shown as app chrome on mobile */
.app-tabbar,
.app-sheet,
.app-sheet-backdrop,
.pwa-banner {
  display: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(238, 243, 244, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 250, 251, 0.92);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 14px rgba(10, 42, 92, 0.14);
}

.brand-logo-footer {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-text small,
.brand-slogan {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.nav-main {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-main > a,
.nav-item > summary {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-main > a:hover,
.nav-item > summary:hover {
  background: rgba(18, 138, 92, 0.1);
  color: var(--brand-deep);
}

.header-tools .nav-login {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.header-tools .nav-login:hover {
  background: rgba(18, 138, 92, 0.1);
  color: var(--brand-deep);
}

.nav-item {
  position: relative;
}

.nav-item > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-item > summary::-webkit-details-marker {
  display: none;
}

.nav-item > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 40;
}

.nav-item[open] > .nav-dropdown {
  display: grid;
  gap: 2px;
}

.nav-dropdown a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.nav-dropdown a:hover {
  background: rgba(18, 138, 92, 0.08);
  color: var(--brand-deep);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px rgba(255, 92, 58, 0.28);
}

.btn-primary:hover {
  background: #ff734f;
  box-shadow: 0 14px 30px rgba(255, 92, 58, 0.34);
}

.btn-secondary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 138, 92, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-join {
  background: #ff6b4a;
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 107, 74, 0.28);
}

.btn-join:hover {
  background: #ff8266;
}

.join-band .btn-primary,
.join-band .btn-join {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.join-band .btn-primary:hover,
.join-band .btn-join:hover {
  background: #fff7f4;
  color: var(--brand-deep);
}

.btn-ghost:hover {
  background: #fff;
}

.flash {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 12px 18px;
  border-radius: 12px;
  width: calc(100% - 44px);
  animation: rise 0.45s var(--ease);
}

.flash-success {
  background: rgba(20, 163, 154, 0.14);
  color: var(--brand-deep);
}

.flash-error {
  background: rgba(255, 90, 47, 0.14);
  color: #9b2c0f;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 42, 92, 0.9) 0%, rgba(11, 110, 63, 0.72) 48%, rgba(227, 6, 19, 0.55) 100%),
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.2), transparent 34%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.035) 18px,
      rgba(255, 255, 255, 0.035) 19px
    );
  animation: heroShift 14s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% 40%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(232, 185, 35, 0.35), transparent 65%);
  filter: blur(20px);
  animation: floatBlob 9s var(--ease) infinite alternate;
}

.hero-logo {
  width: min(120px, 26vw);
  height: min(120px, 26vw);
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 8px;
  margin-bottom: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  animation: rise 0.7s var(--ease) both;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 22px 80px;
  box-sizing: border-box;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 18px;
  animation: rise 0.7s var(--ease) both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: min(14ch, 100%);
  animation: rise 0.8s var(--ease) 0.08s both;
}

.hero-lead {
  margin: 22px 0 0;
  max-width: 36rem;
  font-size: 1.08rem;
  opacity: 0.92;
  animation: rise 0.8s var(--ease) 0.16s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: rise 0.8s var(--ease) 0.24s both;
}

.hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 22px;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 40px;
}

.section-head.has-more {
  max-width: none;
}

.section-head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head-top h2 {
  margin: 0;
}

.section-more {
  flex-shrink: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.section-more:hover {
  color: var(--brand-deep);
  border-bottom-color: rgba(13, 61, 110, 0.35);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar {
  padding: 8px 0 0;
  border-top: 2px solid var(--brand);
  animation: rise 0.7s var(--ease) both;
}

.pillar:nth-child(2) {
  animation-delay: 0.08s;
  border-top-color: var(--accent);
}

.pillar:nth-child(3) {
  animation-delay: 0.16s;
  border-top-color: var(--brand-bright);
}

.pillar h3 {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.pillar p {
  margin: 0;
  color: var(--ink-soft);
}

.event-list {
  display: grid;
  gap: 16px;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.catalog-search {
  display: flex;
  flex: 1 1 260px;
  max-width: 420px;
  gap: 8px;
}

.catalog-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.catalog-search input[type="search"]:focus {
  border-color: rgba(18, 138, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(18, 138, 92, 0.12);
}

.catalog-meta {
  font-size: 0.86rem;
  color: var(--muted);
  white-space: nowrap;
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catalog-item {
  display: grid;
  grid-template-columns: 72px 108px minmax(0, 1fr) auto;
  gap: 16px 18px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.catalog-thumb {
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 72, 68, 0.06);
  flex-shrink: 0;
}

.catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  padding: 6px;
}

.catalog-item:hover {
  transform: translateY(-2px);
  background: var(--paper-2);
  box-shadow: 0 12px 28px rgba(8, 72, 68, 0.08);
}

.catalog-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand);
  line-height: 1.35;
}

.catalog-date small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.catalog-body {
  min-width: 0;
}

.catalog-title {
  display: inline;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

a.catalog-title:hover {
  color: var(--brand-deep);
}

.catalog-summary {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.status-pill.is-open {
  background: rgba(18, 138, 92, 0.14);
  color: #0b6b45;
}

.status-pill.is-ended {
  background: rgba(16, 34, 40, 0.08);
  color: var(--muted);
}

@media (max-width: 720px) {
  .catalog-item {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .catalog-date {
    grid-column: 2;
  }

  .catalog-body {
    grid-column: 1 / -1;
  }

  .catalog-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

.event-poster {
  margin: 0 0 28px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  max-width: 420px;
}

.event-poster img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster-preview {
  margin: 10px 0;
  max-width: 220px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.poster-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster-field .hint {
  margin: 6px 0 10px;
}

.rail-wrap {
  position: relative;
  margin-inline: -6px;
}

.rail-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 6px 4px 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.rail-scroll::-webkit-scrollbar {
  height: 6px;
}

.rail-scroll::-webkit-scrollbar-thumb {
  background: rgba(16, 34, 40, 0.2);
  border-radius: 999px;
}

.rail-card {
  flex: 0 0 min(78vw, 300px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(8, 72, 68, 0.05);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.rail-card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(8, 72, 68, 0.06);
  flex-shrink: 0;
}

.rail-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.rail-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1;
}

.rail-card:hover {
  transform: translateY(-3px);
  background: var(--paper-2);
  box-shadow: 0 12px 28px rgba(8, 72, 68, 0.08);
}

.rail-card .event-date {
  font-size: 0.88rem;
}

.rail-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
}

.rail-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.rail-card-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

.rail-nav {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.rail-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.rail-nav-btn:hover:not(:disabled) {
  background: var(--paper-2);
  border-color: rgba(18, 138, 92, 0.35);
}

.rail-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (min-width: 900px) {
  .rail-card {
    flex-basis: 280px;
  }

  .rail-nav {
    display: flex;
  }
}

.question-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.event-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.25s var(--ease);
}

.event-row:hover {
  padding-left: 8px;
}

.event-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand);
}

.event-date small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

.event-row h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.event-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 107, 102, 0.1);
  color: var(--brand-deep);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.about-visual {
  position: relative;
  min-height: 340px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(10, 42, 92, 0.94), rgba(11, 110, 63, 0.82) 55%, rgba(227, 6, 19, 0.75)),
    repeating-radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 28px);
  color: #fff;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.about-visual .about-logo {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: #fff;
  border-radius: 50%;
  padding: 6px;
}

.about-visual strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.stat span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.join-band {
  margin: 0 22px 88px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 28px;
  padding: 48px 40px;
  background:
    linear-gradient(125deg, #0f5f9a 0%, #14a06e 48%, #ff7a5c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.join-band::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(2px);
  animation: floatBlob 7s var(--ease) infinite alternate;
}

.join-band > * {
  position: relative;
  z-index: 1;
}

.join-band h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.join-band p {
  margin: 0;
  opacity: 0.92;
  max-width: 36rem;
}

.page-hero {
  padding: 56px 22px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero-compact {
  padding-bottom: 8px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.page-hero-compact p {
  margin-left: auto;
  margin-right: auto;
}

.prose {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 22px 88px;
}

.prose-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
}

.prose article > p,
.mission-list {
  color: var(--ink-soft);
}

.mission-list {
  padding-left: 1.1rem;
}

.mission-list li + li {
  margin-top: 10px;
}

.speech-stack {
  display: grid;
  gap: 18px;
}

.speech {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.speech h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.speech .role {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.speech p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filters a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.filters a.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 24px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.detail-body {
  white-space: pre-wrap;
  color: var(--ink-soft);
  max-width: 46rem;
}

.auth-shell,
.member-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 22px 88px;
}

.auth-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: stretch;
}

.auth-aside {
  border-radius: 28px;
  padding: 36px;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(10, 42, 92, 0.96), rgba(11, 110, 63, 0.88) 55%, rgba(227, 6, 19, 0.78));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
}

.auth-aside .auth-logo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  margin-bottom: 24px;
}

.auth-aside h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 2rem;
}

.auth-form {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  backdrop-filter: blur(10px);
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

label.field input,
label.field select,
label.field textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

label.field input:focus,
label.field select:focus,
label.field textarea:focus {
  outline: 2px solid rgba(20, 163, 154, 0.35);
  border-color: var(--brand-bright);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.member-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.member-card-stage {
  max-width: 560px;
  margin: 0 auto;
}

.member-card {
  position: relative;
  border-radius: 24px;
  padding: 28px;
  color: #fff;
  min-height: 240px;
  overflow: hidden;
  background: #071a3a;
  box-shadow:
    0 20px 50px rgba(7, 26, 58, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;
  animation: rise 0.6s var(--ease) both;
}

.member-card-v2 {
  padding: 0;
  min-height: 0;
  aspect-ratio: 1.72 / 1;
}

.member-card-v2 .card-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5, 18, 42, 0.92) 0%, rgba(7, 36, 68, 0.72) 42%, rgba(8, 40, 58, 0.45) 68%, rgba(6, 22, 48, 0.55) 100%),
    url("../img/card-diaolou-bg.jpg") right center / cover no-repeat;
  transform: scale(1.02);
}

.member-card-v2 .card-body {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
}

.member-card-v2 .card-shine {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(ellipse 55% 45% at 88% 70%, rgba(56, 189, 248, 0.12), transparent 55%),
    repeating-linear-gradient(
      -18deg,
      transparent 0,
      transparent 11px,
      rgba(125, 211, 252, 0.035) 11px,
      rgba(125, 211, 252, 0.035) 12px
    );
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.member-card-v2 .card-stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 5px;
  background: linear-gradient(180deg, #7dd3fc, #e8c96a 45%, #ff5c3a);
}

.member-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.member-card .card-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.member-card .card-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: #071a3a;
  background: linear-gradient(145deg, #e8c96a, #f5e6b0 55%, #7dd3fc);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.member-card .card-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.member-card .card-slogan {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.member-card .card-status {
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.member-card .card-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.member-card .card-identity {
  min-width: 0;
  flex: 1;
}

.member-card .card-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.member-card .card-name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.15;
}

.member-card .card-nick {
  margin: 0 0 10px;
  font-size: 0.88rem;
  opacity: 0.8;
}

.member-card .card-no {
  font-size: 0.88rem;
  opacity: 0.92;
  letter-spacing: 0.06em;
}

.member-card .card-no strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.member-card .card-foot {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.75rem;
  opacity: 0.85;
}

.member-card .card-qr {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.member-card .card-qr img {
  width: 108px;
  height: 108px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.member-card .card-qr span {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.card-help {
  text-align: center;
  margin: 14px 0 0;
}

/* Check-in verify page */
.checkin-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 22px 80px;
  text-align: center;
}

.checkin-ok,
.checkin-bad {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
}

.checkin-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  background: #0b6e3f;
  color: #fff;
  margin-bottom: 18px;
}

.checkin-badge.is-bad {
  background: #c4121a;
}

.checkin-logo {
  border-radius: 50%;
  margin: 0 auto 12px;
  display: block;
}

.checkin-ok h1,
.checkin-bad h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 8px;
}

.checkin-meta {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}

.panel h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.reg-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.reg-item:last-child {
  border-bottom: none;
}

.contact-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.contact-block {
  padding: 22px 0;
  border-top: 2px solid var(--brand);
}

.contact-block h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.contact-block p {
  margin: 0;
  color: var(--ink-soft);
}

.site-footer {
  background: #07152e;
  color: rgba(255, 255, 255, 0.86);
  padding: 56px 22px 28px;
  margin-top: 40px;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.2fr;
  gap: 28px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.site-footer h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #fff;
}

.contact-list {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroShift {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(8deg);
  }
}

@keyframes floatBlob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-30px, 20px) scale(1.08);
  }
}

.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.home-link {
  padding: 22px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.home-link:hover {
  background: var(--paper-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.home-link strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.home-link span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.structure-card {
  padding: 22px 18px;
  border-top: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.7);
}

.structure-card:nth-child(2) { border-top-color: var(--brand); }
.structure-card:nth-child(3) { border-top-color: var(--brand-deep); }
.structure-card:nth-child(4) { border-top-color: var(--logo-yellow, #e8b923); }
.structure-card:nth-child(5) { border-top-color: var(--logo-magenta, #c41e8a); }
.structure-card:nth-child(6) { border-top-color: #5b7cfa; }

.structure-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.structure-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.assoc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.assoc-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
}

/* App-like mobile / tablet shell */
@media (max-width: 1100px) {
  :root {
    --header-h: 56px;
    --tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .brand-slogan {
    display: none;
  }

  /* Top header stays light; primary nav moves to bottom tabs */
  .nav-main,
  .header-tools {
    display: none !important;
  }

  .site-header {
    background: rgba(247, 250, 251, 0.92);
  }

  .header-inner {
    padding: 0 14px;
  }

  body.has-app-shell {
    padding-bottom: var(--tabbar-h);
  }

  #main {
    min-height: calc(100dvh - var(--header-h) - var(--tabbar-h));
  }

  .app-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: var(--tabbar-h);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -8px 28px rgba(7, 26, 58, 0.08);
  }

  .app-tabbar .tab {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 4px 2px;
    color: var(--muted);
    font: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 14px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
  }

  .app-tabbar .tab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  .app-tabbar .tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-tabbar .tab.is-active {
    color: var(--brand-deep);
    background: rgba(13, 61, 110, 0.08);
  }

  .app-tabbar .tab:active {
    transform: scale(0.96);
  }

  .app-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(7, 26, 58, 0.42);
    border: 0;
  }

  .app-sheet-backdrop[hidden],
  .app-sheet[hidden],
  .pwa-banner[hidden] {
    display: none !important;
  }

  .app-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    max-height: min(78dvh, 560px);
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background: #f7fafb;
    box-shadow: 0 -16px 40px rgba(7, 26, 58, 0.18);
    animation: sheetUp 0.28s var(--ease);
  }

  .app-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 4px auto 12px;
    border-radius: 999px;
    background: rgba(16, 34, 40, 0.18);
  }

  .app-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  .app-sheet-head strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
  }

  .app-sheet-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(16, 34, 40, 0.06);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
  }

  .app-sheet-links {
    display: grid;
    gap: 4px;
  }

  .app-sheet-links a,
  .app-sheet-action {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 12px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
  }

  .app-sheet-links a:active,
  .app-sheet-action:active {
    background: rgba(13, 61, 110, 0.08);
  }

  .pwa-banner {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-h) + 10px);
    z-index: 85;
    animation: rise 0.35s var(--ease);
  }

  .pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 18px;
    background: rgba(7, 26, 58, 0.94);
    color: #fff;
    box-shadow: 0 12px 32px rgba(7, 26, 58, 0.28);
  }

  .pwa-banner-inner img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .pwa-banner-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .pwa-banner-copy strong {
    font-size: 0.88rem;
    font-family: var(--font-display);
  }

  .pwa-banner-copy span {
    font-size: 0.72rem;
    opacity: 0.82;
    line-height: 1.35;
  }

  .pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .pwa-banner-actions .btn {
    white-space: nowrap;
  }

  .pwa-dismiss {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.25rem;
    cursor: pointer;
  }

  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .site-footer {
    display: none;
  }

  .home-grid,
  .structure-grid,
  .assoc-list,
  .home-links {
    grid-template-columns: 1fr;
  }

  .pillars,
  .about-strip,
  .prose-grid,
  .auth-panel,
  .member-grid,
  .contact-blocks,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .join-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 22px;
  }

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

  .hero {
    min-height: auto;
    padding: 48px 18px 56px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }

  .hero-lead {
    font-size: 0.98rem;
  }

  .page-hero {
    padding: 32px 16px 12px;
  }

  .page-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }

  .prose,
  .auth-shell,
  .member-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .auth-shell,
  .member-shell {
    padding-top: 16px;
    padding-bottom: 56px;
  }

  .member-card-stage {
    max-width: 100%;
  }

  .member-card-v2 {
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 20px;
  }

  .member-card-v2 .card-body {
    padding: 16px 14px 14px 18px;
  }

  .member-card .card-main {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .member-card .card-qr {
    align-self: center;
    flex-direction: row;
    gap: 12px;
  }

  .member-card .card-qr img {
    width: 112px;
    height: 112px;
  }

  .member-card .card-qr span {
    writing-mode: vertical-rl;
    letter-spacing: 0.14em;
  }

  .member-card .card-slogan {
    display: none;
  }

  .reg-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .checkin-shell {
    padding: 24px 16px 56px;
  }

  .panel {
    padding: 16px;
    border-radius: 16px;
  }

  .site-footer {
    padding: 36px 16px 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 52px;
  }

  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .member-card .card-status {
    font-size: 0.62rem;
    padding: 4px 8px;
  }

  .member-card .card-name {
    font-size: 1.3rem;
  }

  .member-card .card-qr img {
    width: 100px;
    height: 100px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn,
  .join-band .btn,
  .checkin-shell .btn {
    width: 100%;
    justify-content: center;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Forms */
.form-section {
  grid-column: 1 / -1;
  margin: 18px 0 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.hkyouth-field {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.hkyouth-field legend {
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-panel-wide {
  grid-template-columns: 0.7fr 1.3fr;
}
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  width: 100%;
  resize: vertical;
}

/* Admin */
.admin-body {
  background: #f3f6f8;
  min-height: 100vh;
}
.admin-header {
  background: #07152e;
  color: #fff;
}
.admin-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-header .brand-text strong,
.admin-header .brand-text small { color: #fff; }
.admin-header .brand-text small { opacity: 0.7; }
.admin-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-nav a {
  color: rgba(255,255,255,0.85);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
}
.admin-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.admin-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}
.admin-login {
  max-width: 420px;
  margin: 48px auto;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.admin-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.admin-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
}
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-toolbar h1 { margin: 0; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: #f7fafb; font-size: 0.8rem; text-transform: none; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-row-actions .linkish,
button.linkish {
  background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font: inherit;
}
.admin-filter { margin-bottom: 16px; }
.admin-filter select { margin-left: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form select, .inline-form input[type="text"] {
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 0.85rem;
}
@media (max-width: 960px) {
  .auth-panel-wide, .admin-stats { grid-template-columns: 1fr; }
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}

.analytics-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}

.analytics-panel h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.funnel-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.funnel-meta span {
  color: var(--muted);
  white-space: nowrap;
}

.funnel-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(8, 72, 68, 0.08);
  overflow: hidden;
}

.funnel-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
  border-radius: 999px;
}

.daily-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  margin-top: 18px;
  padding-top: 8px;
}

.daily-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
  min-width: 0;
}

.daily-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
}

.daily-col span {
  font-size: 0.7rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

.admin-stats {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
}
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: #ff5c3a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.is-unread-row td { background: rgba(255, 92, 58, 0.06); }

.install-guide {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.install-card {
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.install-card.is-preferred {
  border-color: rgba(18, 138, 92, 0.45);
  box-shadow: 0 10px 28px rgba(8, 72, 68, 0.08);
}

.install-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.install-card ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.install-card li {
  margin: 0 0 8px;
}

.admin-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-top: 16px;
}
.admin-form-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}
.admin-tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.admin-tabs a.is-active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.admin-content-grid .field textarea {
  min-height: 96px;
}
@media (max-width: 960px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
}
