/* W1 host chrome. Theme-adjacent ink/paper. Not a second SPA. */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Sans+TC:wght@400;700&family=Noto+Sans+HK:wght@400;700&display=swap");

.hv-funnel {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #12081f;
  color: #f4ecd8;
  font-family: "Noto Sans SC", "Noto Sans TC", "Noto Sans HK", "PingFang SC", "PingFang HK", "Hiragino Sans GB", "Microsoft YaHei", "Microsoft JhengHei", sans-serif;
  box-sizing: border-box;
}

.hv-funnel[hidden] {
  display: none !important;
}

.hv-funnel-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 3px solid #ff2d95;
  background: #1a0e2c;
  padding: 16px 18px 14px;
  box-shadow: 8px 8px 0 #ffd60a;
  box-sizing: border-box;
}

.hv-funnel [data-i18n] {
  display: none !important;
}

.hv-funnel[data-locale="en"] [data-i18n="en"],
.hv-funnel[data-locale="zh-Hans"] [data-i18n="zh-Hans"],
.hv-funnel[data-locale="zh-Hant"] [data-i18n="zh-Hant"] {
  display: revert !important;
}

.hv-funnel-langs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 10px;
}

.hv-funnel-langs button {
  min-width: 44px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 2px solid #ffd60a;
  background: transparent;
  color: #ffd60a;
  cursor: pointer;
}

.hv-funnel-langs button[aria-pressed="true"] {
  background: #ffd60a;
  color: #12081f;
}

.hv-funnel-brand {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: #ffd60a;
}

.hv-funnel[data-locale="en"] .hv-funnel-brand {
  margin-bottom: 8px;
}

.hv-funnel-zh {
  margin: 0 0 8px;
  font-size: 18px;
  color: #00e5ff;
}

.hv-funnel-not-rmg,
.hv-funnel-honesty {
  margin: 0 0 6px;
  line-height: 1.35;
  font-size: 14px;
}

.hv-funnel-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}

.hv-funnel-primary-cta {
  margin: 12px 0 8px;
}

.hv-funnel-primary-cta a {
  min-width: 220px;
}

.hv-funnel-cta a {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  min-width: 140px;
  text-align: center;
  border: 2px solid #12081f;
}

.hv-funnel-play {
  background: #ff2d95;
  color: #f4ecd8;
}

.hv-funnel-press {
  background: #ffd60a;
  color: #12081f;
}

.hv-funnel-lab {
  background: #00e5ff;
  color: #12081f;
}

.hv-funnel-watch {
  background: #f4ecd8;
  color: #12081f;
}

.hv-funnel-race {
  background: #ffb3c6;
  color: #12081f;
}

.hv-funnel-signin {
  background: #00e5ff;
  color: #12081f;
}

.hv-funnel-recovery {
  margin: 0 0 10px;
}

.hv-funnel-recap {
  margin: 0 0 10px;
}

.hv-funnel-recap-seed {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #ffd60a;
  word-break: break-all;
}

.hv-funnel-skip,
.hv-funnel-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 12px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: #00e5ff;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

/* CLA-654: invite landings match W5 recap hierarchy (title > honesty > CTA). */
.hv-funnel-friend,
.hv-funnel-party {
  margin: 0 0 10px;
}

.hv-funnel-invite {
  padding: 12px 12px 4px;
  border: 2px solid #00e5ff;
  background: rgba(0, 229, 255, 0.06);
  box-sizing: border-box;
}

.hv-funnel-invite-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00e5ff;
}

.hv-funnel-invite-title {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: #ffd60a;
  line-height: 1.3;
}

.hv-funnel-invite .hv-funnel-honesty {
  margin: 0 0 8px;
  color: #f4ecd8;
}

.hv-funnel-invite .hv-funnel-cta {
  margin: 8px 0 4px;
}

.hv-funnel-invite .hv-funnel-cta a {
  min-width: 160px;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Invite sign-in stays quieter than 开新局 (CLA-747). */
.hv-funnel-invite .hv-funnel-signin {
  background: transparent;
  color: #00e5ff;
  border: 2px solid #00e5ff;
}

.hv-funnel[data-hv-funnel-recap] .hv-funnel-cta:not(.hv-funnel-recap-cta),
.hv-funnel[data-hv-funnel-recap] .hv-funnel-recovery,
.hv-funnel[data-hv-funnel-recap] .hv-funnel-friend,
.hv-funnel[data-hv-funnel-recap] .hv-funnel-party,
.hv-funnel[data-hv-funnel-recap] .hv-funnel-more,
.hv-funnel[data-hv-funnel-recap] > .hv-funnel-card > .hv-funnel-honesty {
  display: none !important;
}

/* CLA-747: invite keeps 开新局 primary; hide the six-button home grid. */
.hv-funnel[data-hv-funnel-friend] .hv-funnel-secondary-cta,
.hv-funnel[data-hv-funnel-friend] .hv-funnel-recovery,
.hv-funnel[data-hv-funnel-friend] .hv-funnel-recap,
.hv-funnel[data-hv-funnel-friend] .hv-funnel-party,
.hv-funnel[data-hv-funnel-friend] .hv-funnel-more,
.hv-funnel[data-hv-funnel-friend] .hv-funnel-skip,
.hv-funnel[data-hv-funnel-friend] > .hv-funnel-card > .hv-funnel-honesty {
  display: none !important;
}

.hv-funnel[data-hv-funnel-party] .hv-funnel-secondary-cta,
.hv-funnel[data-hv-funnel-party] .hv-funnel-recovery,
.hv-funnel[data-hv-funnel-party] .hv-funnel-recap,
.hv-funnel[data-hv-funnel-party] .hv-funnel-friend,
.hv-funnel[data-hv-funnel-party] .hv-funnel-more,
.hv-funnel[data-hv-funnel-party] .hv-funnel-skip,
.hv-funnel[data-hv-funnel-party] > .hv-funnel-card > .hv-funnel-honesty {
  display: none !important;
}

/* CLA-747 / CLA-781: soft-start home is disclaimer + Play (+ quiet More).
 * data-hv-funnel-cold stays 1 until this tab expands, even if played=1. */
.hv-funnel[data-hv-funnel-cold="1"] .hv-funnel-secondary-cta,
.hv-funnel[data-hv-funnel-cold="1"] .hv-funnel-recovery,
.hv-funnel[data-hv-funnel-cold="1"] > .hv-funnel-card > .hv-funnel-honesty {
  display: none !important;
}

.hv-funnel:not([data-hv-funnel-cold="1"]) .hv-funnel-more {
  display: none !important;
}

/* Invite / recap / party plates stay off the default home (honour flag
 * un-hide would otherwise paint 好友邀请 on every cold load). */
.hv-funnel:not([data-hv-funnel-friend]) #hv-funnel-friend,
.hv-funnel:not([data-hv-funnel-party]) #hv-funnel-party,
.hv-funnel:not([data-hv-funnel-recap]) #hv-funnel-recap {
  display: none !important;
}

.hv-funnel-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.hv-funnel-nav a {
  color: #00e5ff;
}

/* CLA-438 / CLA-423: hide flagged-off CTAs and honesty. `.hv-funnel-cta a`
 * display:inline-block and locale `display:revert !important` otherwise
 * keep Watch / Daily race painted after `hidden` is set. */
.hv-funnel [hidden],
.hv-funnel[data-locale] [hidden],
.hv-funnel [data-hv-flag-off],
.hv-funnel[data-locale] [data-hv-flag-off] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hv-funnel,
  .hv-funnel-cta a {
    transition: none;
  }
}

/* CLA-628: short landscape (web-mobile) — denser start card, CTAs stay in view. */
@media (max-height: 520px) {
  .hv-funnel {
    padding: 4px 8px;
    align-items: stretch;
    min-height: 0;
  }

  .hv-funnel-card {
    max-height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 8px;
    box-shadow: 4px 4px 0 #ffd60a;
  }

  .hv-funnel-brand {
    font-size: 20px;
    margin: 0 0 2px;
  }

  .hv-funnel-zh {
    font-size: 16px;
    margin: 0 0 4px;
  }

  .hv-funnel-not-rmg,
  .hv-funnel-honesty {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.3;
  }

  .hv-funnel-invite {
    padding: 8px 8px 2px;
  }

  .hv-funnel-invite-title {
    font-size: 16px;
    margin: 0 0 4px;
  }

  .hv-funnel-invite-kicker {
    font-size: 11px;
  }

  .hv-funnel-cta {
    margin: 6px 0;
    gap: 6px;
  }

  .hv-funnel-cta a {
    padding: 8px 12px;
    min-width: 120px;
  }

  .hv-funnel-langs {
    margin: 0 0 6px;
  }
}
