/* 指南沿用官网的玻璃材质，长文区使用对比更清晰的底色。 */
html { scroll-padding-top: 100px; }
html[data-theme=dark] { color-scheme: dark; }

.guide-page {
  --guide-surface: rgba(249,252,250,.93);
  --guide-surface-soft: rgba(247,251,248,.79);
  --guide-tint: rgba(44,98,70,.085);
  --guide-accent: #285a44;
}
html[data-theme=dark] .guide-page {
  --guide-surface: rgba(19,31,32,.94);
  --guide-surface-soft: rgba(20,34,35,.83);
  --guide-tint: rgba(167,223,195,.105);
  --guide-accent: #b4e1cb;
}

.guide-header,.guide-shell,.guide-footer {
  width: min(1120px, calc(100% - 56px));
  margin-inline: auto;
}
.guide-header.glass {
  position: sticky;
  z-index: 10;
  top: 12px;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 23px;
  background: var(--guide-surface-soft);
}
.guide-header .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; line-height: 1; }
.guide-header .brand-avatar { width: 34px; height: 34px; object-fit: contain; }
.guide-header-actions { display: flex; align-items: center; gap: 12px; }
.guide-home,.guide-theme select {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--guide-tint);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.guide-home:hover { color: var(--guide-accent); }

.guide-shell { padding-block: 36px 20px; }
.guide-overview.glass,.guide-topic.glass,.guide-contents.glass { background: var(--guide-surface); }
.guide-overview.glass {
  padding: clamp(24px, 4vw, 56px);
  border-radius: 29px;
  background:
    radial-gradient(ellipse at 96% 0%, var(--guide-tint), transparent 65%),
    var(--guide-surface-soft);
}
.guide-kicker {
  margin-bottom: 8px;
  color: var(--guide-accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
}
.guide-overview h1 { font-size: clamp(31px, 4.5vw, 50px); line-height: 1.18; letter-spacing: -.045em; }
.guide-overview h1 + p { max-width: 49ch; margin-top: 11px; color: var(--muted); }
.guide-overview .btn { min-height: 42px; margin-top: 19px; }

.guide-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2.5vw, 30px);
  margin-top: 22px;
}
.guide-contents {
  position: sticky;
  top: 94px;
  padding: 17px;
  border-radius: 21px;
}
.guide-contents p {
  padding-inline: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.guide-contents ul { display: grid; gap: 3px; margin: 8px 0 0; padding: 0; list-style: none; }
.guide-contents a {
  display: block;
  min-height: 37px;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.guide-contents a:hover,.guide-contents a[aria-current] { background: var(--guide-tint); color: var(--guide-accent); }
.guide-contents a[aria-current] { font-weight: 650; }

.guide-topics { display: grid; min-width: 0; gap: 17px; }
.guide-topic {
  min-width: 0;
  padding: clamp(19px, 3.3vw, 38px);
  border-radius: 24px;
  line-height: 1.75;
}
.guide-topic:target { border-color: var(--guide-accent); }
.guide-topic h2 { margin-bottom: 10px; font-size: clamp(23px, 3vw, 33px); line-height: 1.25; }
.guide-topic h3 { margin: 19px 0 4px; font-size: 15px; }
.guide-topic p:not(.guide-kicker) { color: var(--muted); }
.guide-topic code,.guide-topic kbd { padding: .1em .35em; border-radius: 5px; background: var(--guide-tint); color: var(--ink); }
.guide-table { width: 100%; margin-top: 15px; border-collapse: collapse; font-size: 14px; }
.guide-table th,.guide-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.guide-table thead { background: var(--guide-tint); }
.guide-table tbody th { font-weight: 550; }
.guide-steps { display: grid; gap: 10px; margin: 15px 0 0; padding-inline-start: 22px; }
.guide-steps li::marker { color: var(--guide-accent); font-weight: 650; }
.guide-topic .guide-note {
  margin-top: 16px;
  padding: 9px 12px;
  border-inline-start: 2px solid var(--guide-accent);
  border-radius: 0 8px 8px 0;
  background: var(--guide-tint);
  font-size: 13px;
}
.guide-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--guide-accent); font-weight: 650; }
.guide-link:hover,.guide-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

.guide-faq details { padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide-faq summary { min-height: 32px; padding: 4px; cursor: pointer; font-weight: 600; }
.guide-faq summary::marker { color: var(--guide-accent); }
.guide-faq summary:focus-visible,.guide-theme select:focus-visible,#feedback :is(input,select,textarea):focus-visible { outline: 2px solid var(--guide-accent); outline-offset: 2px; }
.guide-faq details p { margin: 6px 0 8px; padding-inline: 5px; }
.guide-feedback-form,.guide-feedback-result { margin-top: 17px; }
.guide-feedback-form > p { font-size: 13px; }
.guide-feedback-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 13px 14px;
  margin: 12px 0 15px;
}
.guide-feedback-wide { grid-column: 1 / -1; }
.guide-feedback-fields label,.guide-feedback-result label { display: block; min-width: 0; font-size: 14px; font-weight: 620; }
#feedback :is(input,select,textarea) {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--guide-tint);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
#feedback :is(input,textarea)::placeholder { color: var(--muted); opacity: .86; }
#feedback textarea { resize: vertical; }
.guide-feedback-result { padding-top: 15px; border-top: 1px solid var(--line); }
.guide-feedback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.guide-feedback-form .btn,.guide-feedback-actions .btn { min-height: 44px; }
.guide-feedback-status { margin-top: 10px; font-size: 13px; }
.guide-feedback-status:empty { display: none; }

.guide-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-block: 10px 24px;
  padding: 10px 2px max(8px, env(safe-area-inset-bottom));
  color: var(--ink);
  font-size: 12px;
}
.guide-footer a { white-space: nowrap; }

@media (max-width:740px) {
  .guide-header,.guide-shell,.guide-footer { width: calc(100% - 28px); }
  .guide-header { min-height: 56px; }
  .guide-shell { padding-top: 24px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
  .guide-contents { position: static; }
  .guide-contents ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-contents a { min-height: 44px; padding-block: 11px; }
}
@media (max-width:400px) {
  .guide-header.glass { gap: 8px; padding-inline: 10px; }
  .guide-header .brand { gap: 5px; font-size: 17px; }
  .guide-header .brand-avatar { width: 29px; height: 29px; }
  .guide-header-actions { gap: 5px; }
  .guide-home,.guide-theme select { padding-inline: 6px; font-size: 11px; }
}
@media (max-width:480px) {
  .guide-feedback-fields { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
