/**
 * YOS 资料站 v9 · 角色分流页样式
 * 100vh 无滚动 · 手机垂直 snap · PC 横向 3 列
 */

@layer page-layout {
  /* 禁止滚动 */
  .v9-body--noscroll {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  
  /* 紧凑导航 */
  .v9-nav--compact {
    padding: var(--g-sm) var(--g-md);
  }
  
  .v9-nav--compact .v9-nav__brand {
    font-size: 14px;
  }
  
  /* 角色舞台 */
  .v9-role-stage {
    min-height: calc(100dvh - 88px);
    display: flex;
    flex-direction: column;
    padding: var(--g-md);
  }
  
  /* 标题区 */
  .v9-role-header {
    text-align: center;
    padding: var(--g-md) 0;
    flex-shrink: 0;
  }
  
  .v9-role-header__compass {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--g-sm);
    animation: compass-rotate 20s linear infinite;
  }
  
  @keyframes compass-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  
  .v9-role-header__title {
    font-family: "Noto Serif SC", serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--foam);
    margin-bottom: var(--g-xs, 4px);
  }
  
  .v9-role-header__sub {
    font-size: 13px;
    color: var(--foam-mute);
  }
  
  /* 角色卡片容器 · 手机垂直 snap */
  .v9-role-snap {
    flex: 1;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .v9-role-snap::-webkit-scrollbar {
    display: none;
  }
  
  /* 角色卡片 */
  .v9-role-card {
    position: relative;
    min-height: calc(100dvh - 200px);
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--g-md);
  }
  
  .v9-role-card__bg {
    position: absolute;
    inset: 0;
    background: var(--depth-2);
    opacity: 0.9;
  }
  
  .v9-role-card__content {
    position: relative;
    z-index: 1;
    padding: var(--g-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: inherit;
  }
  
  .v9-role-card h2 {
    font-family: "Noto Serif SC", serif;
    font-size: 32px;
    font-weight: 700;
    margin: var(--g-sm) 0;
  }
  
  .v9-role-card__tagline {
    font-size: 16px;
    color: var(--gold);
    margin-bottom: var(--g-md);
  }
  
  .v9-role-card__desc {
    font-size: 14px;
    color: var(--foam-mute);
    line-height: 1.6;
    margin-bottom: var(--g-xl);
  }
  
  .v9-role-card__actions {
    display: flex;
    flex-direction: column;
    gap: var(--g-md);
  }
  
  /* 游客卡 · 羊皮纸浅色 */
  .v9-role-card--tourist {
    background: var(--parchment);
  }
  
  .v9-role-card--tourist .v9-role-card__content {
    color: var(--parchment-ink);
  }
  
  .v9-role-card--tourist h2 {
    color: var(--parchment-ink);
  }
  
  .v9-role-card--tourist .v9-role-card__tagline {
    color: var(--gold-deep);
  }
  
  .v9-role-card--tourist .v9-role-card__desc {
    color: var(--parchment-ink);
    opacity: 0.8;
  }
  
  /* 商户卡 · 沙金高亮 + 呼吸动画 */
  .v9-role-card--merchant {
    border: 2px solid var(--gold);
  }
  
  .v9-role-card--merchant .v9-role-card__glow {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    box-shadow: 0 0 30px rgba(232, 180, 90, 0.3);
    animation: merchant-glow 3s ease-in-out infinite;
    pointer-events: none;
  }
  
  @keyframes merchant-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(232, 180, 90, 0.3); }
    50% { box-shadow: 0 0 40px rgba(232, 180, 90, 0.5); }
  }
  
  .v9-role-card--merchant h2 {
    color: var(--gold);
  }
  
  /* 运营卡 · 深色玻璃态 */
  .v9-role-card--operator {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  
  /* mini AI 披露条 */
  .v9-ai-disclosure--mini {
    padding: var(--g-sm) var(--g-md);
    font-size: 12px;
  }
  
  /* 平板断点 · 横向 3 列 */
  @media (min-width: 768px) {
    .v9-role-stage {
      flex-direction: row;
      align-items: stretch;
    }
    
    .v9-role-header {
      position: absolute;
      top: var(--g-xl);
      left: 50%;
      transform: translateX(-50%);
      z-index: 10;
    }
    
    .v9-role-snap {
      display: flex;
      flex-direction: row;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x mandatory;
      gap: var(--g-lg);
      padding-top: 100px;
    }
    
    .v9-role-card {
      flex: 1;
      min-width: 280px;
      min-height: auto;
      scroll-snap-align: center;
      margin-bottom: 0;
    }
  }
  
  /* 电脑断点 */
  @media (min-width: 1280px) {
    .v9-role-card__content {
      padding: var(--g-2xl);
    }
    
    .v9-role-card h2 {
      font-size: 36px;
    }
    
    .v9-role-card__actions {
      flex-direction: row;
    }
  }
}

@layer page-component {
  /* 卡片进入动画 */
  .v9-role-card {
    animation: card-enter var(--dur-slow) var(--ease-pagein) both;
  }
  
  .v9-role-card:nth-child(1) { animation-delay: 0ms; }
  .v9-role-card:nth-child(2) { animation-delay: 100ms; }
  .v9-role-card:nth-child(3) { animation-delay: 200ms; }
  
  @keyframes card-enter {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 高亮卡特殊动画 */
  .v9-role-card--merchant.is-highlight {
    animation: card-enter var(--dur-slow) var(--ease-pagein) both,
               merchant-glow 3s ease-in-out infinite 1s;
  }
}
