.audience-gateway {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f4fafb;
  color: #102338;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html.audience-gateway-boot body {
  visibility: hidden;
}

html.audience-family-boot {
  background: #f4fafb;
}

html.audience-family-boot body {
  visibility: hidden;
}

html.audience-family-boot::before {
  content: "Piano Motion Lab";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  color: #147f89;
  background: #f4fafb;
  font: 800 18px/1.4 Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.audience-gateway-open {
  margin: 0;
  background: #f4fafb;
}

body.audience-gateway-open > *:not(#audienceGateway):not(script):not(.pwa-status-stack):not(.pwa-dialog) {
  display: none !important;
}

.audience-gateway-header {
  min-height: 72px;
  padding: max(14px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 14px max(22px, env(safe-area-inset-left));
  border-bottom: 1px solid #d8e6e9;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.audience-gateway-brand,
.audience-gateway-language,
.audience-option,
.audience-switch-link {
  text-decoration: none;
}

.audience-gateway-brand {
  color: #102338;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.audience-gateway-brand span {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(20, 127, 137, 0.24);
  border-radius: 6px;
  background: #061a3b url("./assets/pwa/icon-96.png?v=20260910-owner-reviewed-data-export-v359") center / cover no-repeat;
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 0;
  font-weight: 900;
}

.audience-gateway-brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.audience-gateway-language {
  color: #147f89;
  font-weight: 800;
}

.audience-gateway-main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 10vh, 120px) 0 64px;
}

.audience-gateway-kicker {
  margin: 0 0 12px;
  color: #147f89;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.audience-gateway-main h1 {
  margin: 0 0 42px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.audience-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.audience-option {
  min-height: 180px;
  padding: 28px;
  border: 1px solid #cadde1;
  border-left: 5px solid #147f89;
  border-radius: 8px;
  background: #fff;
  color: #102338;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  box-shadow: 0 12px 26px rgba(16, 35, 56, 0.08);
}

.audience-option-teacher {
  border-left-color: #d7a62a;
}

.audience-option:hover,
.audience-option:focus-visible {
  border-color: #147f89;
  transform: translateY(-2px);
}

.audience-option-teacher:hover,
.audience-option-teacher:focus-visible {
  border-color: #b98510;
}

.audience-option-number {
  color: #6a7a8f;
  font-weight: 900;
}

.audience-option strong,
.audience-option small {
  display: block;
  letter-spacing: 0;
}

.audience-option strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.audience-option small {
  margin-top: 10px;
  color: #63738a;
  font-size: 16px;
  font-weight: 700;
}

.audience-option b {
  color: #147f89;
  font-size: 25px;
}

.audience-option-teacher b {
  color: #b98510;
}

.audience-install-button {
  width: 100%;
  margin-top: 28px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #aacfd3;
  border-radius: 6px;
  background: #e7f6f7;
  color: #147f89;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.audience-switch-link {
  position: fixed;
  z-index: 1000;
  left: max(18px, env(safe-area-inset-left));
  top: max(18px, env(safe-area-inset-top));
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #b9d5d8;
  border-radius: 6px;
  background: #fff;
  color: #147f89;
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 35, 56, 0.12);
}

@media (max-width: 700px) {
  .audience-gateway-header {
    min-height: 64px;
  }

  .audience-gateway-brand strong {
    max-width: 210px;
    font-size: 14px;
    line-height: 1.2;
  }

  .audience-gateway-main {
    width: min(100% - 28px, 520px);
    padding-top: 48px;
  }

  .audience-gateway-main h1 {
    margin-bottom: 28px;
  }

  .audience-options {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .audience-option {
    min-height: 132px;
    padding: 22px 18px;
  }
}

/* Unified v327 entry screen. */
.audience-gateway {
  min-height: 100dvh;
  background-color: #f5fbfe;
  background-image:
    linear-gradient(rgba(15, 58, 101, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 58, 101, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  color: #05294f;
}

body.audience-gateway-open {
  background: #ecf8ff;
}

.audience-gateway-header {
  min-height: 76px;
  border-bottom-color: rgba(77, 231, 255, 0.2);
  background: #05294f;
}

.audience-gateway-brand {
  color: #ffffff;
}

.audience-gateway-language {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(77, 231, 255, 0.28);
  border-radius: 7px;
  background: #0f3a65;
  color: #d8edf7;
  font-size: 13px;
}

.audience-gateway-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audience-gateway-admin {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(77, 231, 255, 0.28);
  border-radius: 7px;
  background: transparent;
  color: #d8edf7;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.audience-gateway-admin:hover,
.audience-gateway-admin:focus-visible,
.audience-gateway-language:hover,
.audience-gateway-language:focus-visible {
  border-color: #4de7ff;
  color: #ffffff;
}

.audience-gateway-main {
  width: min(960px, calc(100% - 40px));
  padding-top: clamp(52px, 9vh, 96px);
}

.audience-gateway-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 13px;
  padding: 0 12px;
  border: 1px solid #9edfeb;
  border-radius: 6px;
  background: #e4f9fc;
  color: #087f95;
}

.audience-gateway-main h1 {
  margin-bottom: clamp(30px, 5vh, 44px);
  font-size: clamp(36px, 4.5vw, 50px);
}

.audience-options {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.audience-option {
  min-height: 142px;
  padding: 26px 30px 26px 34px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  border-color: #c9e1ec;
  border-left-width: 5px;
  box-shadow: 0 14px 34px rgba(15, 58, 101, 0.08);
}

.audience-option-number {
  display: none;
}

.audience-option > span:not(.audience-option-number) {
  min-width: 0;
}

.audience-option strong {
  color: #05294f;
  font-size: clamp(27px, 3vw, 36px);
}

.audience-option small {
  margin-top: 6px;
  color: #687e93;
  font-size: 14px;
}

.audience-option b {
  display: grid;
  place-items: center;
  min-width: 92px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #1680ff;
  border-radius: 7px;
  background: #1680ff;
  color: #ffffff;
  font-size: 0;
}

.audience-option b::after {
  content: "进入";
  font-size: 15px;
  font-weight: 900;
}

html[lang="en"] .audience-option b::after {
  content: "Open";
}

.audience-option-teacher {
  border-left-color: #17a9bc;
}

.audience-option-teacher b {
  border-color: #80d4df;
  background: #e6fafd;
  color: #087f95;
}

.audience-option-institution {
  border-left-color: #1680ff;
}

.audience-option-institution b {
  border-color: #1680ff;
  background: #e8f3ff;
  color: #0d68c8;
}

.audience-install-button {
  width: auto;
  min-width: 190px;
  margin-top: 22px;
  border-color: #9edfeb;
  background: #e4f9fc;
  color: #087f95;
}

@media (max-width: 700px) {
  .audience-gateway {
    background-size: 38px 38px;
  }

  .audience-gateway-header {
    min-height: 64px;
  }

  .audience-gateway-actions {
    gap: 6px;
  }

  .audience-gateway-language,
  .audience-gateway-admin {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .audience-gateway-main {
    width: min(100% - 28px, 520px);
    padding-top: 38px;
  }

  .audience-option {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 126px;
    padding: 21px 16px 21px 22px;
  }

  .audience-option strong {
    font-size: 24px;
  }

  .audience-option b {
    min-width: 64px;
    min-height: 44px;
    padding: 0 10px;
  }

  .audience-install-button {
    width: 100%;
  }
}
