:root {
  --bg: #071220;
  --panel: #0d1b2f;
  --panel-soft: #12243d;
  --ink: #f8fbff;
  --muted: #b7c2d2;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #f0c468;
  --orange: #ff7b2f;
  --blue: #38a8ff;
  --green: #b7e52e;
  --paper: #f7f8fb;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 18, 32, 0.92), rgba(7, 18, 32, 1)),
    radial-gradient(circle at 20% 12%, rgba(255, 123, 47, 0.24), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(56, 168, 255, 0.18), transparent 30%),
    var(--bg);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 100svh;
  color: white;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: #081525;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 12, 22, 0.18), rgba(5, 12, 22, 0.12) 42%, rgba(5, 12, 22, 0.92) 100%),
    linear-gradient(90deg, rgba(5, 12, 22, 0.48), transparent 48%, rgba(5, 12, 22, 0.32));
}

.topbar {
  position: absolute;
  z-index: 3;
  inset: max(18px, env(safe-area-inset-top)) 16px auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.music-button {
  position: fixed;
  z-index: 30;
  top: max(18px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(8, 18, 32, 0.5);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(56vw, 268px);
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.58);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand-logo img {
  width: 100%;
  max-height: 30px;
  object-fit: contain;
}

.music-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
}

.music-button__dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(240, 196, 104, 0.22);
}

.music-button.is-playing .music-button__dot {
  animation: pulse 1.35s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.18);
  }
}

.hero__copy {
  width: min(100%, 760px);
  padding: 0 22px calc(42px + env(safe-area-inset-bottom));
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 0;
  max-width: 8.3em;
  font-size: clamp(42px, 11vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 560px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.75;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 22px;
  padding: 0 22px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, var(--gold), #fff0ad);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(240, 196, 104, 0.3);
}

.sport-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: min(1060px, calc(100% - 24px));
  margin: -26px auto 0;
  position: relative;
  z-index: 4;
}

.sport-card {
  min-width: 0;
  min-height: 94px;
  padding: 10px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(13, 27, 47, 0.88);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  cursor: pointer;
}

.sport-card.is-active {
  border-color: rgba(240, 196, 104, 0.85);
  background:
    linear-gradient(180deg, rgba(240, 196, 104, 0.16), rgba(13, 27, 47, 0.94)),
    rgba(13, 27, 47, 0.88);
  box-shadow: 0 0 0 2px rgba(240, 196, 104, 0.18), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.sport-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.sport-card span {
  color: white;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.intro-band,
.coach-stage,
.profile-panel,
.detail-grid,
.poster-panel,
.share-panel,
.footer {
  width: min(1060px, calc(100% - 28px));
  margin: 0 auto;
}

.intro-band {
  margin-top: 34px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 24px;
  align-items: end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-band h2,
.section-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-band p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.coach-stage {
  padding: 36px 0 16px;
}

.section-heading {
  margin-bottom: 18px;
}

.coach-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.coach-card {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: white;
  background: linear-gradient(180deg, rgba(18, 36, 61, 0.9), rgba(8, 18, 32, 0.94));
  overflow: hidden;
  text-align: left;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.coach-card[hidden] {
  display: none;
}

.coach-card img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  object-position: center top;
  background: #071220;
}

.coach-card__copy {
  min-height: 88px;
  padding: 11px;
}

.coach-card span {
  display: block;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.18;
}

.coach-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.coach-card.is-active {
  border-color: rgba(240, 196, 104, 0.85);
  box-shadow: 0 0 0 2px rgba(240, 196, 104, 0.2), 0 22px 56px rgba(0, 0, 0, 0.3);
}

.profile-panel {
  padding: 22px 0 0;
}

.profile-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(240, 196, 104, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 123, 47, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(18, 36, 61, 0.98), rgba(8, 18, 32, 0.98));
  box-shadow: var(--shadow);
}

.profile-card__media img {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.profile-card__copy {
  align-self: center;
}

.profile-card__sport,
.profile-card__role {
  margin: 0;
  color: var(--gold);
  font-weight: 900;
}

.profile-card h2 {
  margin: 6px 0;
  font-size: clamp(38px, 10vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.profile-card__quote {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid {
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid article,
.share-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(13, 27, 47, 0.92);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.detail-grid article {
  padding: 18px;
}

.detail-grid h3 {
  margin: 0 0 12px;
  color: white;
  font-size: 22px;
}

.detail-grid ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
  line-height: 1.75;
}

.detail-grid li + li {
  margin-top: 7px;
}

#methodText {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.poster-panel {
  padding-top: 28px;
}

.poster-panel img {
  width: min(520px, 100%);
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.share-panel {
  padding: 30px 0 26px;
}

.share-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  padding: 18px;
}

.share-card__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.share-url-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.share-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.share-url-row input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.share-url-row button,
.share-actions button,
.download-qr {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #071220;
  background: linear-gradient(135deg, var(--gold), #fff0ad);
  font-weight: 900;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.share-actions button,
.download-qr {
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
}

.download-qr {
  max-width: 100%;
  white-space: normal;
}

.download-qr.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.share-status {
  min-height: 24px;
  margin-top: 10px !important;
  color: var(--gold) !important;
  font-size: 13px;
}

.qr-box {
  min-height: 232px;
  padding: 12px;
  border-radius: 8px;
  background: white;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}

#coachQrCode {
  display: grid;
  place-items: center;
}

#coachQrCode img,
#coachQrCode canvas {
  width: 168px !important;
  height: 168px !important;
}

.qr-caption {
  margin: 0;
  color: #071220;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  text-align: center;
}

.qr-save-note {
  max-width: 190px;
  margin: -2px 0 0;
  color: #45566f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.footer {
  padding: 30px 0 calc(34px + env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0 0 10px;
}

.footer a {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.footer .icp-record {
  margin: 0;
}

.footer .icp-record a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.floating-roster-button {
  position: fixed;
  z-index: 20;
  left: max(16px, env(safe-area-inset-left));
  top: calc(max(18px, env(safe-area-inset-top)) + 54px);
  min-width: 92px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(240, 196, 104, 0.62);
  border-radius: 999px;
  color: #071220;
  background: linear-gradient(180deg, #fff0ad, var(--gold));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  display: inline-grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.is-hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .intro-band,
  .profile-card,
  .share-card {
    grid-template-columns: 1fr;
  }

  .coach-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .profile-card__media {
    width: min(310px, 100%);
    margin: 0 auto;
  }

  .qr-box {
    min-height: 224px;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 100svh;
  }

  .hero__copy {
    padding-inline: 18px;
  }

  .hero h1 {
    max-width: 7em;
    font-size: 38px;
    line-height: 1.05;
  }

  .topbar {
    inset-inline: 12px;
  }

  .brand-logo {
    width: min(58vw, 210px);
    min-height: 40px;
    padding-inline: 10px;
  }

  .music-button {
    min-width: 70px;
    padding-inline: 10px;
  }

  .sport-strip {
    grid-template-columns: repeat(5, 74px);
    overflow-x: auto;
    justify-content: start;
    scrollbar-width: none;
  }

  .sport-strip::-webkit-scrollbar {
    display: none;
  }

  .sport-card {
    min-height: 88px;
  }

  .sport-card img {
    width: 48px;
    height: 48px;
  }

  .coach-roster {
    gap: 10px;
  }

  .coach-card__copy {
    min-height: 84px;
    padding: 10px;
  }

  .coach-card span {
    font-size: 16px;
  }

  .share-url-row {
    grid-template-columns: 1fr;
  }

  .floating-roster-button {
    left: max(12px, env(safe-area-inset-left));
    top: calc(max(18px, env(safe-area-inset-top)) + 52px);
    min-width: 82px;
    min-height: 32px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .music-button {
    top: max(14px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    min-height: 34px;
    padding-inline: 12px;
    font-size: 12px;
  }
}
