/* ============================================================
   可点导览 · 专用样式
   思路：手机里是真机截图，图层上盖透明的「热区」——
   用户点在真实控件的位置，流程就往前走一步。
   ============================================================ */

.guide {
  padding: 34px 0 90px;
  position: relative;
  z-index: 1;
}

.guide-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 340px) minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

/* ---------------- 左侧步骤条 ---------------- */

.steps {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.steps-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
  padding-left: 12px;
}

.step-btn {
  display: flex;
  align-items: baseline;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-left: 1.5px solid transparent;
  padding: 10px 12px;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s, background 0.22s;
  border-radius: 0 8px 8px 0;
}
.step-btn .idx {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  min-width: 16px;
  transition: color 0.22s;
}
.step-btn:hover { color: var(--muted); background: rgba(255, 255, 255, 0.02); }
.step-btn.on {
  color: var(--text);
  border-left-color: var(--ember);
  background: linear-gradient(90deg, var(--ember-wash), transparent 70%);
}
.step-btn.on .idx { color: var(--ember); }
.step-btn.done { color: var(--muted); }
.step-btn.done .idx::after { content: " ✓"; color: var(--green); font-size: 9px; }

/* 自动播放 */
.play-btn {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-left: 12px;
  background: none;
  border: 1px solid var(--line-hi);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s;
}
.play-btn:hover { color: var(--text); border-color: rgba(242, 107, 58, 0.5); }
.play-btn.playing { color: var(--ember); border-color: rgba(242, 107, 58, 0.55); background: var(--ember-wash); }

/* 键盘提示 */
.key-hint {
  margin-top: 18px;
  margin-left: 12px;
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.9;
}
.key-hint kbd {
  font-family: var(--mono);
  font-size: 10px;
  border: 1px solid var(--line-hi);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--muted);
  margin: 0 1px;
}

/* ---------------- 中间手机舞台 ---------------- */

.stage { position: relative; }

/* 手机高度按视口算，保证整台机器在一屏内看得全 */
.stage .phone {
  max-width: min(320px, calc((100vh - 132px) * 1080 / 2340));
}

/* 热区：贴在真截图上，位置对应真实控件 */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1.5px dashed rgba(242, 107, 58, 0.6);
  background: rgba(242, 107, 58, 0.10);
  border-radius: 14px;
  cursor: pointer;
  z-index: 4;
  animation: hsPulse 2.8s ease-in-out infinite;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}
.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(242, 107, 58, 0.24);
  border-color: var(--ember);
  border-style: solid;
  outline: none;
  animation: none;
}
@keyframes hsPulse {
  0%, 100% { border-color: rgba(242, 107, 58, 0.55); background: rgba(242, 107, 58, 0.08); }
  50%      { border-color: rgba(242, 107, 58, 0.95); background: rgba(242, 107, 58, 0.18); }
}

/* 热区角标 */
.hotspot .hs-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ember);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.8);
}
.hotspot:hover .hs-label,
.hotspot:focus-visible .hs-label { opacity: 1; }

/* 屏幕内的相机视图（快门那一步用 HTML 画，不用截图） */
.cam-view {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 26%, rgba(242, 107, 58, 0.16), transparent 58%),
    repeating-linear-gradient(58deg, rgba(255, 255, 255, 0.014) 0 3px, transparent 3px 7px),
    #0a0a0b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px 20px 30px;
}
.cam-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(28, 28, 30, 0.85);
  color: #fff;
  display: grid; place-items: center;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.10);
}
/* 取景框里的实景：拿一张真实饭照当预览画面
   注意 1：img 是替换元素，必须显式给宽高，不能用 inset 四边拉伸
   注意 2：选择器要压过 style.css 里的 .phone-screen img（100% 宽高） */
.phone-screen img.cam-preview {
  position: absolute;
  top: 24%;
  left: 15%;
  width: 70%;
  height: 52%;
  object-fit: cover;
  border-radius: 16px;
  filter: brightness(0.88) saturate(0.92);
}
.cam-frame {
  position: absolute;
  inset: 24% 15%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}
.cam-frame::before, .cam-frame::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid rgba(242, 107, 58, 0.75);
}
.cam-frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.cam-frame::after  { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.cam-hint {
  text-align: center;
  font-family: var(--hand);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  letter-spacing: 0.02em;
}
.cam-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding-bottom: 12px;
}
.cam-album {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}
.cam-shutter {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid rgba(255, 255, 255, 0.85);
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
  animation: shutterPulse 2.4s ease-out infinite;
}
@keyframes shutterPulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 107, 58, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(242, 107, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 107, 58, 0); }
}
.cam-shutter::after {
  content: "";
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff;
  transition: background 0.2s, transform 0.15s;
}
.cam-shutter:hover::after { background: var(--ember-lite); }
.cam-shutter:active { transform: scale(0.93); }

/* 快门闪光 */
.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 9;
}
.flash.go { animation: flashAnim 0.42s ease-out; }
@keyframes flashAnim {
  0% { opacity: 0.92; }
  100% { opacity: 0; }
}

/* ---------------- 右侧说明 ---------------- */

.caption {
  padding-top: 34px;
  max-width: 34em;
}
.cap-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.cap-tag::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--ember);
}
.caption h2 {
  font-family: var(--hand);
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 18px;
  letter-spacing: 0.005em;
}
.caption p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 2;
  margin-bottom: 14px;
}
.caption p b { color: var(--text); font-weight: 500; }
.caption p code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ember-lite);
  background: var(--ember-wash);
  padding: 1px 6px;
  border-radius: 5px;
}

/* 说明里的「可以点这里」提示 */
.cap-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ember-wash);
  border: 1px solid rgba(242, 107, 58, 0.28);
  font-size: 12.5px;
  color: var(--ember-lite);
  line-height: 1.6;
}
.cap-tip::before { content: "☞"; font-size: 14px; }

/* 下一步按钮 */
.cap-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.cap-nav .pos {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  margin-left: 4px;
}
.cap-nav .pos b { color: var(--text); }

/* 进度条 */
.progress {
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 34px;
  overflow: hidden;
  max-width: 320px;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ember), var(--ember-lite));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 步骤切换时的屏幕推进感 */
.screen-enter img,
.screen-enter .cam-view {
  animation: screenIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes screenIn {
  0%   { opacity: 0.35; transform: scale(1.035); }
  100% { opacity: 1;    transform: scale(1); }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .guide-grid {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 44px;
  }
  .steps { display: none; }
  /* 注意：这里不能用 margin: 0 auto 居中 —— grid item 上的 auto 外边距会
     让它收缩到内容宽度，再被 aspect-ratio 反过来算，手机会缩成一条线。
     居中交给 .phone 自己的 margin: 0 auto。 */
  .caption { padding-top: 0; }
  .mobile-steps { display: flex !important; }
}

@media (max-width: 760px) {
  .guide { padding: 18px 0 60px; }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .stage .phone { max-width: min(260px, 64vw); }
  .caption { text-align: left; }
  .caption h2 { font-size: 1.7rem; }
  .cap-nav { position: sticky; bottom: 14px; z-index: 50; }
}

/* 手机版顶部横向步骤 chips */
.mobile-steps {
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.mobile-steps::-webkit-scrollbar { display: none; }
.mobile-steps button {
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.mobile-steps button.on {
  color: var(--ember);
  border-color: rgba(242, 107, 58, 0.5);
  background: var(--ember-wash);
}
