/* 双人节拍 2.0 首页「今晚」：首屏两步流，container query 适配 320–1440px，下方保留完整 SEO 指南。 */
@layer home {
  .play-home.tonight {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0 14px;
    min-height: calc(100dvh - var(--header-h) - var(--nav-h) - 34px - env(safe-area-inset-bottom));
  }
  @media (min-width: 760px) {
    .play-home.tonight {
      min-height: calc(100dvh - var(--header-h) - 24px);
      max-width: 680px;
      margin-inline: auto;
      padding: 20px 0 22px;
    }
  }
  body[data-play-page] .play-home.tonight {
    display: none;
  }

  .tonight-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .tonight-greet {
    margin: 0;
    font-size: 13px;
    letter-spacing: .16em;
    color: var(--dim);
  }
  .tonight-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .age-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: var(--r-pill);
    border: 1px solid #ff8fb155;
    background: #ff5a9318;
    color: var(--gold-2);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
  }
  .online-count {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--soft);
  }
  .signal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mint);
  }

  .tonight-hero {
    position: relative;
    flex: 1 1 auto;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    container: hero / size;
  }
  .tonight-hero h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(26px, min(7vw, 48px), 48px);
    line-height: 1.18;
    letter-spacing: .03em;
    color: var(--text);
    text-shadow: 0 0 24px #ff5a9344;
  }
  .tonight-line {
    margin: 0;
    font-family: var(--hand);
    font-size: clamp(16px, 4.2vw, 21px);
    line-height: 1.45;
    color: var(--gold-2);
  }
  @container hero (max-height: 130px) {
    .tonight-hero h1 { font-size: clamp(22px, 18cqh, 30px); }
    .tonight-line { font-size: clamp(14px, 12cqh, 17px); }
  }

  /* Step 1：模式选择 */
  .mode-picker,
  .start-card {
    display: grid;
    gap: 10px;
  }
  .start-ask {
    margin: 0;
    font-size: 12.5px;
    letter-spacing: .2em;
    color: var(--dim);
    text-transform: uppercase;
  }
  .mode-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 44px;
    min-height: 60px;
    padding: 13px 14px;
    border-radius: var(--r-2);
    background: var(--panel-solid);
    border: 1px solid var(--hair);
    color: var(--text);
    text-decoration: none;
    text-align: start;
    transition: transform .22s var(--spring), border-color .2s, background-color .2s;
  }
  .mode-icon svg { width: 22px; height: 22px; }
  .mode-go svg { width: 18px; height: 18px; }
  .mode-card:active { transform: scale(.98); }
  @media (hover: hover) {
    .mode-card:hover { border-color: #ff8fb166; background: var(--panel-strong); }
  }
  .mode-card.mode-main {
    min-height: 76px;
    padding: 16px;
    border-radius: var(--r-3);
    background: linear-gradient(135deg, #3c1430 0%, #261022 65%, #200e26 100%);
    border-color: #ff8fb155;
    box-shadow: 0 12px 32px #00000055;
  }
  .mode-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: var(--veil-2);
    color: var(--gold);
    flex: none;
  }
  .mode-main .mode-icon {
    background: var(--rose-grad);
    color: var(--gold-ink);
  }
  .mode-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 3px;
  }
  .mode-copy b {
    font-size: 16px;
    line-height: 1.3;
    color: var(--text);
  }
  .mode-main .mode-copy b {
    font-family: var(--serif);
    font-size: clamp(19px, 4.8vw, 23px);
  }
  .mode-copy small {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--soft);
  }
  .mode-go {
    color: var(--gold);
    flex: none;
  }
  .mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  @media (max-width: 340px) {
    .mode-grid { grid-template-columns: 1fr; }
  }

  /* Step 2：角色动词选择（说停 / 忍住 / 都可以） */
  .start-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .mode-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px 0 8px;
    border-radius: var(--r-pill);
    background: var(--veil);
    color: var(--soft);
    font-size: 13.5px;
  }
  .role-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .role-pick-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 10px 8px;
    border-radius: var(--r-2);
    background: var(--panel-solid);
    border: 1px solid var(--hair);
    color: var(--soft);
    text-align: center;
    transition: transform .22s var(--spring), border-color .2s, background-color .2s, color .2s;
  }
  .role-pick-option b {
    font-family: var(--serif);
    font-size: clamp(17px, 4.5vw, 24px);
    line-height: 1.25;
  }
  .role-pick-option[aria-checked="true"] {
    color: var(--text);
    background: var(--panel-elev);
    border-color: var(--gold);
    box-shadow: 0 0 22px #ff5a9333;
  }
  .role-pick-option[data-role="controller"][aria-checked="true"] {
    border-color: var(--slow);
    box-shadow: 0 0 22px #ffa66e33;
  }
  .role-pick-option[data-role="either"][aria-checked="true"] {
    border-color: var(--stop);
    box-shadow: 0 0 22px #a99bff33;
  }
  .role-desc {
    margin: 0;
    min-height: 2.6em;
    font-family: var(--hand);
    font-size: 15px;
    line-height: 1.45;
    color: var(--soft);
  }
  .start-button {
    width: 100%;
    min-height: 58px;
    padding: 10px 20px;
    border-radius: var(--r-pill);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: var(--rose-grad);
    color: var(--gold-ink);
    box-shadow: 0 10px 30px #ff5a9344;
    transition: transform .24s var(--spring), filter .2s;
  }
  .start-button:active { transform: scale(.97); }
  .start-button .start-label {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .12em;
  }
  .start-button small {
    font-size: 12px;
    color: #2c0817cc;
  }
  .start-card[data-picked-role="controller"] .start-button { background: var(--lead-grad); }
  .start-card[data-picked-role="either"] .start-button { background: var(--either-grad); }

  /* 快捷入口行（全部 ≥44px 触区，不重叠） */
  .play-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-top: 6px;
  }
  .play-shortcuts a,
  .play-shortcuts button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 13px;
    border-radius: var(--r-pill);
    border: 1px solid var(--hair);
    background: var(--veil);
    color: var(--soft);
    font-size: 13px;
    text-decoration: none;
  }
  @media (max-height: 650px) {
    .play-home.tonight { gap: 8px; padding: 6px 0 8px; }
    .tonight-hero { min-height: 64px; gap: 4px; }
    .tonight-hero h1 { font-size: clamp(22px, 6.2vw, 30px); }
    .tonight-line { font-size: 14.5px; }
    .mode-card { min-height: 52px; padding: 10px 12px; }
    .mode-card.mode-main { min-height: 64px; padding: 12px 14px; }
  }
  .play-shortcuts a:hover,
  .play-shortcuts button:hover {
    border-color: var(--hair-2);
    color: var(--text);
  }
}
