* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, sans-serif;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wrap, .support-main { width: min(100% - 36px, 1180px); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
header .wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px 28px;
  padding-block: 14px;
}
.detail-home { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.detail-home img { width: 32px; height: 32px; }
[data-theme="dark"] .detail-home img { filter: invert(1); }
header nav { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; }
header a { text-decoration: none; }
header nav a { color: var(--muted); font-size: 14px; }
header nav a:hover, header nav a[aria-current] { color: var(--ink); }
header nav a[aria-current] { font-weight: 650; }
.theme-toggle, .guide-close, .guide-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
}
.theme-toggle { white-space: nowrap; font-size: 13px; }
.theme-glyph { margin-inline-end: 6px; }
.support-main { flex: 1; padding-block: clamp(32px, 7vw, 92px); }
.support-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 500px));
  justify-content: center;
  align-items: start;
  gap: 24px;
}
.support-card, .guide-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.support-card { grid-column: 1 / -1; justify-self: center; width: min(100%, 500px); padding: clamp(24px, 5vw, 42px); }
.has-guide .support-card { grid-column: 1; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(28px, 4vw, 39px); font-weight: 650; }
h2 { font-size: 23px; }
h3 { font-size: 16px; }
.support-lead { color: var(--muted); margin: 16px 0 26px; }
.tip-button { display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; }
.tip-subcopy { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.guide-link { font-size: 14px; }
.guide-panel { display: flex; flex-direction: column; max-height: min(740px, 82dvh); overflow: hidden; }
.guide-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.guide-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; }
.guide-steps { padding-inline-start: 23px; margin: 0; }
.guide-step + .guide-step { margin-top: 22px; }
.guide-step p { margin: 8px 0; color: var(--muted); }
.pending-link { display: inline-block; margin-top: 8px; }
.guide-screenshot { display: block; max-width: 100%; height: auto; margin-top: 10px; border-radius: 5px; }
footer { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: 12px; }
footer .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 18px 28px; }
footer p { margin: 0; }
.footer-verse { text-align: center; }
.footer-verse span { display: block; margin-top: 6px; }
@media (max-width: 1060px) {
  .support-layout, .has-guide .support-card { grid-template-columns: minmax(0, 500px); grid-column: 1; }
  .guide-panel { position: fixed; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(500px, 100% - 28px); max-height: calc(100dvh - 32px); }
  body.guide-open { overflow: hidden; }
  body.guide-open::before { content: ""; position: fixed; inset: 0; z-index: 1; background: rgb(0 0 0 / .55); }
}
@media (max-width: 740px) {
  header .wrap { flex-wrap: wrap; }
  header nav { order: 3; flex-basis: 100%; margin: 0; gap: 8px 16px; }
  .theme-toggle { margin-inline-start: auto; }
  footer .wrap { grid-template-columns: 1fr; text-align: center; }
}

.tip-button { background: var(--brand-button); color: white; }
header nav a[aria-current], header nav a:hover { color: var(--brand); }
