/* ════════════════════════════════════════════════════════════
   KAIRÓS · 移动端统一样式 (max-width 响应式)
   从 style.css / tarot-ritual.css / lenormand-theme.css 提取
   桌面端不加载此文件 (media="(max-width:600px)")
   ════════════════════════════════════════════════════════════ */

/* ── 来源: style.css ── */



  .count-group,.spread-group,.style-group{overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:.5rem;padding:.3rem 0;scrollbar-width:none;-ms-overflow-style:none}.count-group::-webkit-scrollbar,.spread-group::-webkit-scrollbar{display:none}.count-btn,.spread-btn,.style-btn{scroll-snap-align:center;flex:0 0 auto;white-space:nowrap;padding:.4rem 1.1rem;font-size:.85rem}
  .card-slot{padding:.6rem .5rem .9rem;min-height:150px}.slot-img-wrap{max-width:150px}
  #app{padding:1rem .7rem 3rem}h1{font-size:1.5rem}.landing-title{font-size:2.2rem}
  .card-slot,.chat-section,#result,.portal-card,.chat-bubble,.hb-drawer,.content-view-inner,.auth-modal{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
	  /* 移动端：暂停背景星轨旋转+静态阴影，大幅降低 GPU 负载 */
	  .bg-rings{animation:none!important}
	  .bg-ring{animation:none!important;box-shadow:0 0 1px rgba(255,223,140,0.15),0 0 2px rgba(241,213,146,0.06)!important}
  /* 触控加速：消除 300ms tap 延迟 + 禁用双击缩放 */
  html,body{ touch-action:manipulation }
  button,a,input,select,.card-back,.hb-item,.count-btn,.spread-btn,.style-btn,.tone-btn,.ritual-cap{ touch-action:manipulation;-webkit-tap-highlight-color:transparent }
  /* 提交按钮金脉冲关停 */
  #submit-btn.btn-pulse-active{ animation:none!important }
  .selection-area{gap:.55rem}
  .slot-img-wrap{max-width:130px}.slot-card-name{font-size:.82rem}
  .deck-grid{grid-template-columns:repeat(5,1fr);gap:5px;padding:.65rem;max-height:55vh;background:#141215!important;border-color:rgba(255,255,255,0.16)!important}.card-back{background:linear-gradient(145deg,#0f0c14 0%,#0a0810 60%,#06040a 100%)!important;border-color:rgba(201,160,139,0.2)!important}.card-back::before{border-color:rgba(201,160,139,0.18)!important}.card-back-inner::after{color:rgba(201,160,139,0.28)!important;text-shadow:0 0 10px rgba(201,160,139,0.12)!important}.search-input,.manual-row{background:rgba(10,8,6,0.65)!important;border-color:rgba(255,255,255,0.14)!important}
  .card-back{border-radius:2px}.card-back::before{inset:2px}
  button{align-self:stretch;text-align:center}
  #reset-btn,#export-btn,.shuffle-btn,.mode-tab,.count-btn{width:auto}
  .mode-switch{flex-direction:row;align-items:center;gap:.4rem;margin-bottom:.4rem}.mode-tab{flex:1 1 0;text-align:center}.mode-hint{margin-left:0;text-align:center;font-size:.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;flex:0 0 100%;opacity:.5;margin-top:.25rem}
  .manual-row{flex-direction:column;align-items:stretch;gap:.35rem}.manual-pos-label{text-align:center}
  .chat-bubble{max-width:95%}.action-row{flex-direction:column}#reset-btn,#export-btn{width:100%}
  .home-link{position:static;display:block;margin-bottom:.8rem}
  /* 手机端精修 */
  #app{padding:1rem .5rem calc(5rem + env(safe-area-inset-bottom, 0px));max-width:100vw}
  h1{font-size:1.35rem;margin-bottom:.2rem}
  .subtitle{font-size:.8rem}
  /* ── 触控目标 ≥ 44px（仅功能性按钮，胶囊保持原尺寸）── */
  .hb-btn{width:44px;height:44px}
  #submit-btn{min-height:48px}
  #chat-send{min-height:44px}
  /* ── 呼吸感：间距松开 ── */
  #app{padding:.75rem .5rem calc(5rem + env(safe-area-inset-bottom,0px))!important}
  .card-slot{gap:.5rem}
  .selection-area{gap:.5rem}
  /* 卡牌槽位 — 均分等宽 */
  .card-slot{flex:1 1 0;min-width:0;padding:.5rem .4rem .7rem}
  .slot-img-wrap{max-width:140px;border-radius:4px}
  .slot-card-name{font-size:.76rem;line-height:1.2}
  /* 选择区 — 紧凑但不挤 */
  .selection-area{gap:.5rem;padding:.5rem 0}
  /* 牌背网格 — 触控友好 */
  .deck-grid{gap:3px;padding:.4rem}
  .card-back{border-radius:3px;min-height:40px}
  /* 提交按钮全宽 */
  #submit-btn{width:100%;padding:.75rem;font-size:.95rem;border-radius:12px}
  /* 搜索下拉触控优化 */
  .search-item{padding:.55rem .7rem;font-size:.82rem;min-height:38px}
  /* 弹窗全屏化 */
  .auth-modal{max-width:100vw!important;width:96vw!important;max-height:85vh!important;border-radius:14px 14px 0 0;padding:1.2rem 1rem!important}   /* 2026-08-04：移动端个人中心防顶屏 */
  .disclaimer-modal{max-width:100vw!important;width:96vw!important;height:80vh;border-radius:14px 14px 0 0}
  /* Toast上移避让 */
  .toast{bottom:calc(5rem + env(safe-area-inset-bottom, 0px));font-size:.78rem;padding:.5rem 1rem}
  /* 登录按钮触控 */
  .login-btn,.reg-btn,.forgot-btn{padding:.55rem 1rem;font-size:.85rem}
  /* 追问输入区 */
  #chat-input{font-size:.82rem;padding:.5rem .6rem}
  #chat-send{padding:.5rem .9rem;font-size:.82rem}
  /* 顶部安全区 + 三合一胶囊手机适配 */
  .top-right-controls{top:.5rem;right:.5rem}
  .auth-btn.logged-in{font-size:.6rem;padding:4px 1.4rem 4px 7px;gap:0;line-height:1.2;max-width:160px}
  .auth-btn.logged-in::after{font-size:.45rem;right:.35rem}
  .top-login-btn{top:calc(.6rem + env(safe-area-inset-top, 0px));right:.8rem;font-size:.72rem;padding:.35rem .7rem}

  #result {
    padding: .8rem .25rem !important;
    border-radius: 6px !important;
    margin-left: 0;
    margin-right: 0;
  }
  #result h2 {
    font-size: .95rem;
    letter-spacing: .05em;
    padding-bottom: .35rem;
    margin-bottom: .6rem;
  }
  .report-divider {
    margin: 2rem 0;
  }
  .report-divider-symbol {
    padding: 0 0.8rem;
    font-size: clamp(0.6rem, 3vw, 0.75rem);
  }


/* ── 来源: tarot-ritual.css ── */

  .hero-intro {
    flex-direction: column;
    gap: 1.2rem;
    margin: 1.5rem auto 0;
  }

  .hero-central-stage {
    min-height: 60vh;
  }
  .portal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }
  .portal-card-v2 {
    padding: 2rem 1.2rem 1.8rem;
  }
  .hero-section {
    padding: 2rem 1.2rem 1rem;
  }
  .footer-meta {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
  /* 移动端 footer 换行变高，body 底部留白需同步增大，否则最后面内容被截断 */
  body { padding-bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px)); }

  .kairos-header {
    height: 52px;
  }
  .hero-central-stage {
    min-height: 70vh;
  }
  .site-sigil {
    width: 34px; height: 34px;
  }
  .hero-section {
    padding: 1.5rem 1rem 0.5rem;
  }
  .hero-title {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
    letter-spacing: 0.08em;
  }
  .hero-subtext {
    font-size: 0.78rem;
  }
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem auto 3rem;
  }
  .portal-card-v2 {
    padding: 2rem 1rem 1.5rem;
  }
  .portal-card-v2 .portal-title {
    font-size: 1.1rem;
  }
  .footer-meta {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    font-size: 0.65rem;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  /* S4 阅读报告: 手机端全宽 + 舒适字号（!important 全线防层叠覆盖） */
  .reading-report-paper {
    max-width:100%!important;
    padding:1rem .5rem!important;
    margin:0!important;
    font-size:.9rem!important;
    line-height:1.8!important;
    letter-spacing:.015em!important;
  }
  .reading-report-paper h2 { font-size:1.1rem!important; }
  .reading-report-paper h3 { font-size:.95rem!important; }
  .report-paragraph { margin-bottom:1.3rem!important; }
  /* 修复Safari/Blink: backface-visibility 导致文本被GPU层裁剪 */
  #result{backface-visibility:visible!important;-webkit-backface-visibility:visible!important}
  /* ── 移动端性能降级：关停所有无限循环动画 + 去滤镜 ── */
  /* 洗牌/提交按钮脉冲 → 静态阴影 */
  .shuffle-btn,.ritual-go{ animation:none!important;box-shadow:0 0 12px rgba(212,175,55,.25)!important }
  /* 顶栏 sigil 呼吸 */
  .site-sigil{ animation:none!important;opacity:.55!important }
  /* 黄金铰链呼吸 */
  .hinge-dot{ animation:none!important }
  /* 落地页中央辉光呼吸 → 静态径向渐变 */
  .hero-central-stage::before{ animation:none!important;background:radial-gradient(circle,rgba(212,175,55,.12) 0%,transparent 70%)!important }
  /* 入场动画去 blur（保留位移+透明度） */
  .hero-title{ animation-name:hero-reveal-mobile!important;filter:none!important }
  .content-view:not(.hidden){ animation-name:content-in-mobile!important;filter:none!important }
  /* 浑天仪日核 drop-shadow → box-shadow */
  .sun-lens-disc{ filter:none!important;box-shadow:0 0 20px rgba(252,211,77,.6)!important }
  /* Footer 毛玻璃关停 */
  .kairos-footer{ backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:rgba(7,7,9,.94)!important }

  .ritual-s3{overflow-y:auto;-webkit-overflow-scrolling:touch}
  .ritual-s3 .deck-grid{max-width:100vw!important;width:100%!important;height:420px!important;overflow:hidden!important;touch-action:pan-y}
  .ritual-s3 .deck-grid::-webkit-scrollbar{display:none}
  .ritual-s3 .card-back,.ritual-s3 #card-glow-proxy{width:58px!important;height:81px!important}
  .ritual-s2 .ritual-row{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .ritual-s2 .ritual-row::-webkit-scrollbar{display:none}
  .hexagram-stage{width:480px!important;height:480px!important;opacity:1!important}

  /* 顶层容器: 外边距收紧 */
  #app{padding:.75rem .5rem calc(5rem + env(safe-area-inset-bottom,0px))!important;max-width:100vw!important;overflow-x:hidden!important}

  /* result 容器: 阻绝玻璃壳吃掉宽度 */
  body[data-system="tarot"] #result,
  #result{width:100%!important;box-sizing:border-box!important;padding:.8rem .25rem!important;border-radius:6px!important}

  body[data-system="tarot"] #result-content,
  #result-content{width:100%!important;box-sizing:border-box!important}

  /* 报告卷轴: width:100% 阻断 Flex shrink-wrap（max-width 不够） */
  body[data-system="tarot"] .reading-report-paper,
  .ritual-s4 .reading-report-paper,
  .reading-report-paper{
    width:100%!important;max-width:100%!important;min-width:100%!important;
    margin:0!important;padding:1rem .5rem!important;
    box-sizing:border-box!important;display:block!important;float:none!important
  }

  /* CJK 两端对齐 + 强制断行 → 消灭右侧锯齿留白 */
  .reading-report-paper p,
  .reading-report-paper .report-paragraph{
    font-size:.88rem!important;line-height:1.8!important;
    letter-spacing:.02em!important;
    text-align:justify!important;text-justify:inter-ideograph!important;
    word-break:break-all!important;word-wrap:break-word!important;
    margin-bottom:1.2rem!important
  }

  .reading-report-paper h2,
  .reading-report-paper h3{font-size:1.1rem!important;margin:1.2rem 0 .8rem!important;text-align:center!important}
  .report-divider{margin:1.8rem 0!important;font-size:.65rem!important}

  .slot-card-en{font-size:.6rem}
  .slot-orient{font-size:.58rem;padding:.06rem .35rem;border-radius:8px}
  .slot-detail{font-size:.58rem}
  .slot-label{font-size:.62rem}
  .slot-placeholder{font-size:.72rem;padding:1rem 0}
  .slot-info{gap:.1rem}
  .orient-btn{font-size:.65rem;padding:.25rem .5rem}

/* ── 落地页 lore 卡片 ── */
.lore-grid{grid-template-columns:1fr}
.lore-card{padding:1.5rem 1rem!important}
.lore-title{font-size:1.2rem!important}
.lore-body p{font-size:.78rem!important;line-height:1.65!important}
