/* 首页底部：安装指南 / 输入技巧演示 / 使用教程（includes/home-guide.php） */

.guide-install, .guide-tips, .guide-tutorials { margin-top: 6.52vw; }
.guide-more { text-align: center; margin-top: 1.6vw; font-size: .85vw; }
.guide-more a { color: var(--blue); }
.guide-more a:hover { text-decoration: underline; }

/* ---------- 模拟窗口通用 ---------- */
.mock {
  position: relative; overflow: hidden; border-radius: .9vw; background: #fff;
  border: 1px solid #e6eaf3; box-shadow: 0 .6vw 2vw #1c3ba614; font-size: .72vw; color: #333;
}
.mock-bar { display: flex; align-items: center; gap: .3vw; height: 1.9vw; padding: 0 .8vw; background: #f5f7fc; border-bottom: 1px solid #eceff5; }
.mock-bar i { width: .5vw; height: .5vw; border-radius: 50%; background: #ff6058; }
.mock-bar i:nth-child(2) { background: #ffbd2e; }
.mock-bar i:nth-child(3) { background: #28c940; }
.mock-bar span { margin-left: .5vw; color: #0008; font-size: .68vw; }

/* ---------- 安装三步 ---------- */
.install-steps { list-style: none; margin-top: 2.6vw; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4vw; counter-reset: none; }
.install-step {
  position: relative; display: flex; flex-direction: column; gap: 1.2vw; padding: 1.5vw;
  border-radius: 1.2vw; background: linear-gradient(180deg, #f2f5ff, #fff 70%); border: 1px solid #e8edfb;
}
.install-step:not(:last-child)::after {
  content: ""; position: absolute; right: -1.05vw; top: 2.4vw; width: .7vw; height: .7vw; z-index: 1;
  border: solid #b9c6f5; border-width: 2px 2px 0 0; transform: rotate(45deg);
}
.install-head { display: flex; gap: .9vw; align-items: flex-start; }
.install-head b { flex: none; font-size: 1.9vw; line-height: 1; color: var(--blue); font-weight: 800; font-family: ui-rounded, "SF Pro Rounded", sans-serif; }
.install-head h3 { font-size: 1.05vw; color: #161616; }
.install-head p { margin-top: .35vw; font-size: .76vw; line-height: 1.7; color: #0009; }
.install-step .mock { margin-top: auto; height: 12.6vw; }

.dl-row { display: flex; align-items: center; gap: .7vw; padding: .9vw .9vw .4vw; }
.dl-row.is-muted { opacity: .45; padding-top: .5vw; }
.dl-file { flex: none; width: 2.2vw; height: 2.6vw; border-radius: .35vw; display: grid; place-items: center; color: #fff; font-size: .55vw; font-weight: 700; background: var(--blue); }
.is-muted .dl-file { background: #999; }
.dl-info { flex: 1; min-width: 0; display: grid; gap: .3vw; }
.dl-info strong { font-size: .72vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-info em { font-style: normal; font-size: .62vw; color: #22a35a; }
.is-muted .dl-info em { color: #d9534f; }
.dl-track { height: .3vw; border-radius: .3vw; background: #eceff5; overflow: hidden; }
.dl-track span { display: block; height: 100%; background: #22a35a; }
.dl-open { flex: none; padding: .25vw .8vw; border-radius: 1vw; color: #fff; background: var(--blue); font-size: .65vw; }

.setup-body { display: flex; flex-direction: column; align-items: center; gap: .45vw; padding: .9vw 1.2vw; }
.setup-body img { width: 6vw; height: auto; }
.setup-track { width: 100%; height: .35vw; border-radius: .3vw; background: #eceff5; overflow: hidden; }
.setup-track span { display: block; width: 68%; height: 100%; background: linear-gradient(90deg, #6d86ff, var(--blue)); }
.setup-pct { font-size: .62vw; color: #0008; }
.setup-body label { align-self: flex-start; display: flex; align-items: center; gap: .35vw; font-size: .62vw; color: #0009; }
.setup-body label i { width: .65vw; height: .65vw; border-radius: .15vw; border: 1px solid #bbb; }
.setup-body label i.is-on { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.2 7.4 8 3' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% no-repeat; }
.setup-btn { margin-top: .1vw; padding: .3vw 1.6vw; border-radius: 1vw; color: #fff; background: var(--blue); font-size: .65vw; }

.def-body { padding: 1vw 1.1vw; display: grid; gap: .5vw; }
.def-label { font-size: .68vw; color: #0009; }
.def-select { border: 1px solid #d5ddf3; border-radius: .5vw; overflow: hidden; }
.def-select span { display: block; padding: .38vw .7vw; font-size: .68vw; color: #0008; }
.def-select span + span { border-top: 1px solid #f0f2f7; }
.def-select .is-picked { color: var(--blue); background: #eef2ff; font-weight: 600; position: relative; }
.def-select .is-picked::after { content: "✓"; position: absolute; right: .7vw; }
.def-ok { font-size: .65vw; color: #22a35a; }

/* ---------- 输入技巧左右交替 ---------- */
.tip-rows { margin-top: 2.6vw; display: grid; gap: 1.6vw; }
.tip-row {
  display: grid; grid-template-columns: 1fr 1.08fr; gap: 3vw; align-items: center;
  padding: 2.4vw 2.8vw; border-radius: 1.4vw; background: #f7f8fb;
}
.tip-row.is-reverse { grid-template-columns: 1.08fr 1fr; }
.tip-row.is-reverse .tip-text { order: 2; }
.tip-text h3 { font-size: 1.5vw; color: #161616; line-height: 1.4; }
.tip-text p { margin-top: .8vw; font-size: .85vw; line-height: 1.9; color: #000a; }
.tip-text ul { margin: .9vw 0 0; padding: 0; list-style: none; display: grid; gap: .45vw; font-size: .8vw; color: #000b; }
.tip-text li { position: relative; padding-left: 1.2vw; }
.tip-text li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5vw; height: .5vw; border-radius: 50%; background: var(--orange); opacity: .85; }
.tip-text a { display: inline-block; margin-top: 1.2vw; color: var(--blue); font-size: .85vw; font-weight: 600; }
.tip-text a:hover { text-decoration: underline; }
.tip-text kbd {
  display: inline-block; min-width: 1.4em; padding: 0 .4em; font: inherit; font-size: .9em; line-height: 1.5; text-align: center;
  color: var(--blue); background: #fff; border: 1px solid #d5ddff; border-bottom-width: 2px; border-radius: .3vw;
}

/* 候选框模拟 */
.mock-ime { padding: 1.6vw 1.6vw 2vw; min-height: 14vw; }
.doc-lines { display: grid; gap: .6vw; }
.doc-lines span { height: .55vw; border-radius: .3vw; background: #eef0f5; }
.doc-lines .short { width: 45%; position: relative; }
.doc-lines .short::after { content: ""; position: absolute; right: -.5vw; top: -.35vw; width: 2px; height: 1.25vw; background: var(--blue); animation: guide-blink 1s steps(1) infinite; }
.ime-box {
  position: relative; margin-top: 1.6vw; margin-left: 40%; width: max-content; min-width: 14vw;
  border-radius: .7vw; background: #fff; border: 1px solid #e3e8f5; box-shadow: 0 .5vw 1.6vw #1c3ba61f; overflow: hidden;
}
.ime-input { padding: .5vw .9vw .4vw; color: var(--blue); font-size: .8vw; letter-spacing: .02em; border-bottom: 1px solid #f0f2f7; }
.ime-cands { display: flex; gap: 1vw; padding: .55vw .9vw .65vw; font-size: 1vw; color: #222; white-space: nowrap; }
.ime-cands em { font-style: normal; font-size: .7vw; color: #0007; margin-right: .2vw; }
.ime-cands small { font-size: .62vw; color: #0007; margin-left: .2vw; }
.ime-cands .is-first { color: var(--orange); font-weight: 600; }
.ime-cands .is-first em, .ime-cands .is-first small { color: var(--orange); opacity: .8; }
@keyframes guide-blink { 50% { opacity: 0; } }

.is-money { display: grid; gap: .6vw; align-content: start; }
.form-row { display: flex; justify-content: space-between; align-items: center; padding: .6vw .9vw; border-radius: .5vw; border: 1px solid #eceff5; font-size: .72vw; }
.form-row span { color: #0008; }
.form-row b { font-weight: 600; }
.form-row.is-active { border-color: var(--blue); box-shadow: 0 0 0 2px #254dff1f; }
.form-row .caret { width: 2px; height: 1vw; background: var(--blue); animation: guide-blink 1s steps(1) infinite; }
.is-money .ime-box { margin: .2vw 0 0 auto; }

/* 自定义短语模拟 */
.mock-phrase { align-self: stretch; }
.phrase-table { padding: .9vw 1.1vw 1.2vw; display: grid; gap: .45vw; }
.phrase-table > div { display: grid; grid-template-columns: 3.4vw 1fr; gap: .8vw; align-items: center; padding: .55vw .8vw; border-radius: .5vw; background: #f7f8fb; font-size: .72vw; }
.phrase-table .phrase-head { background: none; color: #0007; font-size: .65vw; padding-block: 0; }
.phrase-table code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--blue); font-weight: 600; }
.phrase-table span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phrase-table .is-new { background: none; border: 1px dashed #c9d4ff; color: var(--blue); }

/* ---------- 使用教程 ---------- */
.tut-list { margin-top: 2.4vw; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1vw; }
.tut-item {
  display: flex; gap: 1vw; padding: 1.3vw 1.4vw; border-radius: 1vw; background: #fff; border: 1px solid #eceff5;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tut-item:hover { border-color: #c9d4ff; box-shadow: 0 .4vw 1.6vw #254dff14; transform: translateY(-2px); }
.tut-item i {
  flex: none; width: 2.6vw; height: 2.6vw; border-radius: .7vw; display: grid; place-items: center;
  font-style: normal; font-weight: 700; font-size: .95vw; color: #fff; background: linear-gradient(135deg, #4d6bff, #254dff);
}
.tut-item h3 { font-size: .95vw; color: #161616; line-height: 1.5; }
.tut-item:hover h3 { color: var(--blue); }
.tut-item p { margin-top: .3vw; font-size: .76vw; line-height: 1.7; color: #0009; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .doc-lines .short::after, .form-row .caret { animation: none; }
}

/* ---------- 手机 ---------- */
@media (max-width: 700px) {
  .guide-more { font-size: 3vw; margin-top: 4vw; }
  .mock { font-size: 2.6vw; border-radius: 2.4vw; }
  .mock-bar { height: 6vw; gap: 1vw; padding: 0 2.4vw; }
  .mock-bar i { width: 1.6vw; height: 1.6vw; }
  .mock-bar span { font-size: 2.4vw; margin-left: 1.4vw; }

  .install-steps { grid-template-columns: 1fr; gap: 4vw; margin-top: 5vw; }
  .install-step { padding: 4vw; gap: 3vw; border-radius: 3vw; }
  .install-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -2.6vw; width: 2vw; height: 2vw; transform: translateX(-50%) rotate(135deg); }
  .install-head { gap: 3vw; }
  .install-head b { font-size: 6vw; }
  .install-head h3 { font-size: 3.6vw; }
  .install-head p { font-size: 2.8vw; }
  .install-step .mock { height: auto; min-height: 36vw; }
  .dl-row { gap: 2.4vw; padding: 3vw 3vw 1.4vw; }
  .dl-file { width: 7vw; height: 8.4vw; font-size: 2vw; border-radius: 1.2vw; }
  .dl-info strong { font-size: 2.6vw; }
  .dl-info em { font-size: 2.2vw; }
  .dl-track { height: 1vw; }
  .dl-open { font-size: 2.4vw; padding: .8vw 2.6vw; border-radius: 3vw; }
  .setup-body { gap: 1.6vw; padding: 3vw 4vw; }
  .setup-body img { width: 20vw; }
  .setup-track { height: 1.2vw; }
  .setup-pct, .setup-body label, .def-ok { font-size: 2.4vw; }
  .setup-body label { gap: 1.2vw; }
  .setup-body label i { width: 2.4vw; height: 2.4vw; }
  .setup-btn { font-size: 2.6vw; padding: 1vw 5vw; border-radius: 3vw; }
  .def-body { padding: 3vw 3.6vw; gap: 1.8vw; }
  .def-label, .def-select span { font-size: 2.6vw; }
  .def-select { border-radius: 1.6vw; }
  .def-select span { padding: 1.4vw 2.4vw; }

  .tip-rows { gap: 4vw; margin-top: 5vw; }
  .tip-row, .tip-row.is-reverse { grid-template-columns: 1fr; gap: 5vw; padding: 5vw; border-radius: 3.4vw; }
  .tip-row.is-reverse .tip-text { order: 0; }
  .tip-text h3 { font-size: 4.6vw; }
  .tip-text p { font-size: 3vw; margin-top: 2vw; }
  .tip-text ul { font-size: 2.9vw; gap: 1.4vw; margin-top: 2.6vw; }
  .tip-text li { padding-left: 3.4vw; }
  .tip-text li::before { width: 1.5vw; height: 1.5vw; }
  .tip-text a { font-size: 3vw; margin-top: 3vw; }
  .tip-text kbd { border-radius: 1vw; }
  .mock-ime { padding: 5vw; min-height: 0; }
  .doc-lines { gap: 2vw; }
  .doc-lines span { height: 1.8vw; }
  .doc-lines .short::after { height: 4vw; top: -1.1vw; right: -1.6vw; }
  .ime-box { margin: 5vw 0 0 auto; min-width: 0; border-radius: 2vw; }
  .ime-input { font-size: 2.8vw; padding: 1.6vw 3vw 1.2vw; }
  .ime-cands { font-size: 3.4vw; gap: 3vw; padding: 1.8vw 3vw 2.2vw; }
  .ime-cands em { font-size: 2.4vw; }
  .ime-cands small { font-size: 2.2vw; }
  .is-money { gap: 2vw; }
  .form-row { font-size: 2.6vw; padding: 2vw 3vw; border-radius: 1.6vw; }
  .form-row .caret { height: 3.4vw; }
  .phrase-table { padding: 3vw 3.6vw 4vw; gap: 1.6vw; }
  .phrase-table > div { grid-template-columns: 9vw 1fr; gap: 2.4vw; padding: 1.8vw 2.6vw; border-radius: 1.6vw; font-size: 2.6vw; }
  .phrase-table .phrase-head { font-size: 2.3vw; }

  .tut-list { grid-template-columns: 1fr; gap: 2.4vw; margin-top: 5vw; }
  .tut-item { padding: 3.6vw; gap: 3vw; border-radius: 2.6vw; }
  .tut-item i { width: 9vw; height: 9vw; font-size: 3.2vw; border-radius: 2.4vw; }
  .tut-item h3 { font-size: 3.4vw; }
  .tut-item p { font-size: 2.8vw; }
}
