:root {
  --bg: #f6f4ee;
  --paper: #ffffff;
  --paper-soft: #fbfaf7;
  --ink: #192630;
  --ink-soft: #3d4d57;
  --muted: #62727b;
  --line: #e2e5e2;
  --line-strong: #cdd4d0;
  --accent: #c96432;
  --accent-deep: #a3481c;
  --wash: #f7eadd;
  --emerald: #1b7a56;
  --emerald-deep: #135c40;
  --emerald-bg: #ecf7f2;
  --emerald-line: #bce2d1;
  --blue: #2b677c;
  --blue-bg: #eef5f7;
  --danger: #bf2626;
  --danger-bg: #fff2f1;
  --danger-line: #f5c2c0;
  --amber-bg: #fff8e6;
  --amber-line: #f3d285;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(25, 38, 48, 0.045);
  --shadow-md: 0 12px 32px rgba(25, 38, 48, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: #ead0b9; color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
kbd, code { overflow-wrap: anywhere; word-break: break-word; }
kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #c5cdcb;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 600 0.88em/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(25, 38, 48, 0.055);
  font: 0.9em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.skip-link {
  position: absolute; left: 12px; top: -80px;
  padding: 8px 14px; background: #fff; border-radius: 8px; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.skip-link:focus { top: 10px; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* --- Top Built-in Browser Banner --- */
.browser-notice {
  padding: 11px 0;
  background: #fff6db;
  border-bottom: 1px solid #f0cb6e;
  color: #4a3008;
  font-size: 13.5px;
  line-height: 1.55;
}
.browser-notice.notice-warning {
  background: linear-gradient(90deg, #fff5d6 0%, #ffefd0 100%);
  border-bottom-color: #efb958;
  color: #462a06;
}
.browser-notice.notice-info {
  background: #edf6f8;
  border-bottom-color: #c2dfe7;
  color: #1c414d;
}
.browser-notice-content {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.notice-main-text { display: flex; align-items: flex-start; gap: 10px; max-width: 780px; }
.notice-icon { font-size: 20px; line-height: 1.3; flex-shrink: 0; }
.notice-title strong { color: var(--ink); font-weight: 800; font-size: 14px; }
.notice-desc { color: #53432c; font-size: 13px; margin-top: 2px; }
.browser-notice.notice-info .notice-desc { color: #3d5b66; }
.notice-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.notice-action-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.notice-action-btn:hover { background: var(--accent-deep); }
.notice-link-btn {
  background: #fff; color: var(--ink); border: 1px solid #ccd4d1;
  padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center;
}
.notice-link-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.notice-close-btn {
  background: transparent; border: none; color: #7c8990;
  font-size: 16px; padding: 4px 8px; cursor: pointer; border-radius: 6px; line-height: 1;
}
.notice-close-btn:hover { color: var(--ink); background: rgba(0, 0, 0, 0.06); }

/* --- Site Header & Mobile Quick Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 244, 238, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -0.02em; font-size: 18px; white-space: nowrap;
}
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink); color: #f7d48a; font-size: 20px; line-height: 1;
  box-shadow: 0 3px 10px rgba(25, 38, 48, 0.16);
}
.brand-tag {
  font-size: 11px; font-weight: 700; color: var(--emerald);
  background: var(--emerald-bg); border: 1px solid var(--emerald-line);
  padding: 2px 7px; border-radius: 999px; letter-spacing: 0;
}
.site-nav {
  display: flex; align-items: center; gap: 6px;
  color: #4f5f67; font-size: 14px;
}
.site-nav a {
  padding: 7px 12px; border-radius: 9px; font-weight: 600;
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.site-nav a:hover { background: rgba(25, 38, 48, 0.05); color: var(--ink); }
.site-nav a[aria-current="page"] {
  background: #fff; color: var(--accent-deep); font-weight: 800;
  box-shadow: 0 2px 8px rgba(25, 38, 48, 0.06);
}
.header-action {
  font-size: 13px; font-weight: 700; color: var(--accent-deep);
  background: #fff; border: 1px solid #dfcbb8; border-radius: 999px;
  padding: 7px 14px; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.header-action:hover { border-color: var(--accent); background: var(--wash); }

.mobile-nav-strip {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 7px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mobile-nav-strip::-webkit-scrollbar { display: none; }
.mobile-nav-inner {
  display: flex; align-items: center; gap: 6px;
}
.mobile-nav-inner a {
  flex: none; font-size: 13px; font-weight: 600; color: #526169;
  padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line); white-space: nowrap;
}
.mobile-nav-inner a[aria-current="page"] {
  background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700;
}

/* --- Common Buttons & Badges --- */
.eyebrow {
  color: var(--accent-deep); font-size: 12px; letter-spacing: 0.12em;
  font-weight: 800; text-transform: uppercase;
}
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 12px;
  border: 1px solid transparent; font-weight: 700; font-size: 14.5px;
  cursor: pointer; transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.button:active { transform: scale(0.985); }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: #2c3e4a; }
.button-accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(201, 100, 50, 0.24);
}
.button-accent:hover { background: var(--accent-deep); }
.button-emerald {
  background: linear-gradient(135deg, #1f865f 0%, #156748 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(27, 122, 86, 0.28);
}
.button-emerald:hover { background: linear-gradient(135deg, #197350 0%, #0f543a 100%); }
.button-ghost { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.button-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.fine-print { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* --- Homepage Hero & Device Triage --- */
.home-intro { padding: 38px 0 24px; }
.hero-pill-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: var(--emerald-bg); color: var(--emerald-deep); border: 1px solid var(--emerald-line);
}
.hero-pill.secondary {
  background: var(--wash); color: var(--accent-deep); border-color: #ebd0b7;
}
.home-intro h1 {
  font-size: clamp(29px, 3.8vw, 48px);
  line-height: 1.2; letter-spacing: -0.035em; margin: 0 0 12px; max-width: 920px;
}
.home-intro > p {
  color: var(--ink-soft); font-size: 16.5px; margin: 0 0 24px; max-width: 740px;
}

.device-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.device-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.device-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.device-card.recommended {
  background: linear-gradient(165deg, #f1faf6 0%, #ffffff 62%);
  border-color: #8fd0b5;
}
.device-card.recommended:hover { border-color: var(--emerald); }
.device-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px;
}
.device-icon {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: #f3f1eb; font-size: 22px;
}
.device-card.recommended .device-icon { background: #dcf2e8; }
.device-badge {
  font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  background: var(--wash); color: var(--accent-deep);
}
.device-card.recommended .device-badge {
  background: var(--emerald); color: #fff;
}
.device-card h2 {
  font-size: 21px; line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.02em;
}
.device-card p {
  font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 16px;
}
.device-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 800; color: var(--accent-deep);
  margin-top: auto; padding-top: 12px; border-top: 1px solid #eef0ee;
}
.device-card.recommended .device-cta { color: var(--emerald-deep); }

/* --- Highlight Banner (Free Paper Answers) --- */
.feature-callout {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 22px 0 12px; padding: 18px 22px;
  background: linear-gradient(90deg, #fff4f2 0%, #fff9f5 100%);
  border: 1px solid #f0c2bc; border-left: 5px solid var(--danger);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
.feature-callout-body strong {
  display: block; font-size: 16px; color: #8f1d1d; margin-bottom: 3px;
}
.feature-callout-body p {
  margin: 0; font-size: 14px; color: #644242;
}
.feature-callout .button { flex: none; white-space: nowrap; }

/* --- Homepage Sections & Grids --- */
.home-section { padding: 26px 0 24px; }
.section-heading {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; margin: 0 0 18px;
}
.section-heading h2 {
  font-size: clamp(23px, 3vw, 29px); line-height: 1.25;
  letter-spacing: -0.03em; margin: 5px 0 0;
}
.section-heading p { color: var(--muted); margin: 0; font-size: 14px; }

.project-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.project-grid article {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.card-step-num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--wash); color: var(--accent-deep);
  font-size: 13px; font-weight: 900; margin-bottom: 10px;
}
.project-grid h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px; }
.project-grid p { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.65; }

.tutorial-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.tutorial-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.tutorial-card:hover {
  transform: translateY(-2px); border-color: #d6b08e; box-shadow: var(--shadow-md);
}
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-kicker { font-size: 12px; letter-spacing: 0.08em; color: var(--accent-deep); font-weight: 800; }
.card-arrow { font-size: 22px; color: var(--accent-deep); line-height: 1; }
.tutorial-card h3 { font-size: 21px; line-height: 1.3; margin: 12px 0 6px; }
.tutorial-card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card-foot { margin-top: auto; padding-top: 14px; font-size: 12.5px; color: #75838a; }

.help-section {
  margin: 24px 0 54px; padding: 26px 28px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); scroll-margin-top: 96px;
  box-shadow: var(--shadow-sm);
}
.help-section h2 { margin: 4px 0 14px; font-size: 23px; }
.help-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.help-card {
  padding: 16px 18px; border-radius: 14px;
  background: var(--paper-soft); border: 1px solid var(--line);
}
.help-card strong { display: block; font-size: 15px; margin-bottom: 5px; color: var(--ink); }
.help-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* --- Detail Pages Layout --- */
.detail-shell {
  display: grid; grid-template-columns: 210px minmax(0, 1fr);
  gap: 42px; padding-top: 38px; padding-bottom: 72px;
}
.detail-nav { position: sticky; top: 96px; align-self: start; }
.detail-nav .label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  color: #7f8d94; margin: 0 0 12px; text-transform: uppercase;
}
.detail-nav a {
  display: block; border-left: 2.5px solid transparent;
  padding: 9px 13px; font-size: 14px; color: #5b6a72;
  border-radius: 0 8px 8px 0; margin-bottom: 2px;
}
.detail-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.detail-nav a[aria-current="page"] {
  border-left-color: var(--accent); color: var(--ink);
  background: #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.detail-main { min-width: 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.back-link:hover { color: var(--accent-deep); }
.detail-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.detail-head h1 {
  font-size: clamp(30px, 4vw, 46px); line-height: 1.2;
  letter-spacing: -0.035em; margin: 8px 0 12px;
}
.detail-head p { color: var(--ink-soft); font-size: 16px; max-width: 66ch; margin: 0 0 18px; }
.meta-line {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  font-size: 12.5px; color: #5c6b73;
}
.meta-line span, .meta-line a {
  border-radius: 999px; border: 1px solid #d5dcd9;
  background: #fff; padding: 4px 12px; font-weight: 600;
}
.meta-line a:hover { border-color: var(--accent); color: var(--accent-deep); }

/* --- Windows Drag & Browser Tabs --- */
.quick-install-box {
  margin: 24px 0;
  background: linear-gradient(180deg, #f3faf6 0%, #ffffff 100%);
  border: 1.5px solid #b7dfd0;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.quick-install-header h2 {
  font-size: 25px; line-height: 1.25; margin: 6px 0 8px; letter-spacing: -0.025em;
}
.quick-install-subtitle { color: var(--ink-soft); margin: 0 0 18px; font-size: 15px; }

.instruction-steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px;
}
.inst-step {
  display: flex; gap: 12px; background: #fff;
  border: 1px solid #dce7e2; border-radius: 14px; padding: 15px 16px;
}
.inst-num {
  flex-shrink: 0; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--emerald-bg); color: var(--emerald-deep);
  font-weight: 900; font-size: 13px; border: 1px solid var(--emerald-line);
}
.inst-step div { font-size: 14px; color: #44545c; line-height: 1.6; }
.inst-step div strong { color: var(--ink); display: block; margin-bottom: 3px; font-size: 15px; }

.drag-action-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 2px dashed #6bc09d; border-radius: 16px;
  padding: 24px 20px; margin-bottom: 22px; text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
body.is-dragging-bookmark .drag-action-area {
  background: #eefaf4; border-color: var(--emerald);
}
.drag-hint-bubble {
  font-size: 14px; font-weight: 800; color: var(--emerald-deep); margin-bottom: 12px;
}
.bookmarklet-drag {
  cursor: grab; user-select: none; -webkit-user-drag: element;
  font-size: 16.5px; font-weight: 800; padding: 14px 28px; border-radius: 999px;
  background: linear-gradient(135deg, #1f8b61 0%, #136847 100%);
  color: #fff !important; border: 2px solid #ffffff;
  box-shadow: 0 8px 22px rgba(21, 108, 74, 0.32), 0 0 0 3px rgba(31, 139, 97, 0.16);
  transition: transform 0.16s, box-shadow 0.16s;
  display: inline-flex; align-items: center; gap: 10px;
}
.bookmarklet-drag:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(21, 108, 74, 0.4), 0 0 0 4px rgba(31, 139, 97, 0.22);
}
.bookmarklet-drag:active { cursor: grabbing; transform: scale(0.98); }

.drag-top-cue {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  background: var(--emerald); color: #fff; text-align: center;
  padding: 10px 16px; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(-100%); transition: transform 0.18s ease;
  pointer-events: none;
}
body.is-dragging-bookmark .drag-top-cue { transform: translateY(0); }

.drag-fallback-note {
  margin-top: 14px; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.inline-link-btn {
  background: none; border: none; padding: 0; color: var(--blue);
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; font-size: 13px;
}
.inline-link-btn:hover { color: var(--accent-deep); }

/* --- Generic Interactive Tabs (Browser / Android Dual-Scheme / iOS) --- */
.scheme-tabs, .browser-tabs {
  display: flex; gap: 10px; background: #eae6dc;
  padding: 6px; border-radius: 14px; margin: 18px 0 20px;
}
.scheme-tab, .browser-tab {
  flex: 1; display: flex; align-items: center; justify-content: flex-start;
  gap: 12px; padding: 12px 16px; border: 1px solid transparent;
  border-radius: 10px; background: transparent; color: #5b6a72;
  cursor: pointer; transition: all 0.18s ease; text-align: left;
}
.scheme-tab:hover, .browser-tab:hover {
  background: rgba(255, 255, 255, 0.65); color: var(--ink);
}
.scheme-tab.active, .browser-tab.active {
  background: #fff; color: var(--ink); border-color: #d3dcd8;
  box-shadow: 0 4px 14px rgba(25, 38, 48, 0.08);
}
.tab-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.tab-text strong { display: block; font-size: 15px; line-height: 1.3; color: var(--ink); }
.tab-text small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.scheme-tab.active .tab-text small, .browser-tab.active .tab-text small {
  color: var(--emerald-deep); font-weight: 700;
}
.tab-panel { animation: fadeInPanel 0.2s ease-out; }
@keyframes fadeInPanel {
  from { opacity: 0.4; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; background: var(--blue-bg); color: var(--blue);
  font-size: 12.5px; font-weight: 800; border-radius: 8px; margin-bottom: 10px;
}
.drag-demo { margin: 0; }
.drag-demo img {
  display: block; width: 100%; height: auto;
  border: 1px solid #d5ddd9; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-md);
  cursor: zoom-in;
}
.drag-demo figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }

/* --- Browser Position Helper Wireframe --- */
.browser-wireframe {
  margin: 10px 0 8px; background: #f4f7f6; border: 1px solid #cbd7d3;
  border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column;
  gap: 6px; user-select: none;
}
.wireframe-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; border-radius: 6px; }
.wireframe-tabs { padding-bottom: 4px; border-bottom: 1px solid #dfe7e4; }
.wireframe-tab-pill { padding: 2px 9px; border-radius: 5px; font-size: 11px; background: #dfe7e5; color: #55646d; }
.wireframe-tab-pill.active { background: #fff; color: var(--ink); font-weight: 700; border: 1px solid #c8d3d0; }
.wireframe-url {
  background: #fff; border: 1px solid #b8c8c5; padding: 6px 10px;
  color: #3b505a; justify-content: space-between;
}
.wireframe-url .tag-name { font-weight: 800; color: var(--ink); }
.wireframe-url .tag-hint { font-size: 11.5px; color: var(--muted); }
.wireframe-bookmarks {
  background: var(--emerald-bg); border: 1.5px dashed var(--emerald);
  padding: 7px 10px; color: var(--emerald-deep); font-weight: 800; justify-content: space-between;
}
.wireframe-bookmarks .tag-action {
  background: var(--emerald); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px;
}

/* --- Collapsible Details Panels --- */
.manual-setup {
  margin: 18px 0; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.manual-setup > summary {
  padding: 15px 20px; cursor: pointer; font-weight: 700; font-size: 15px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: background 0.15s;
}
.manual-setup > summary:hover { background: var(--paper-soft); }
.manual-setup > summary::-webkit-details-marker { display: none; }
.manual-setup > summary::after {
  content: "展开 ▼"; font-size: 12px; font-weight: 700;
  color: var(--accent-deep); background: var(--wash);
  padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}
.manual-setup[open] > summary { border-bottom: 1px solid var(--line); background: var(--paper-soft); }
.manual-setup[open] > summary::after { content: "收起 ▲"; }
.manual-setup-content { padding: 18px 22px 22px; }

/* --- Copy Panel, Download Panel & Notices --- */
.copy-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  background: linear-gradient(135deg, #f8ecdf 0%, #fdf8f2 100%);
  border: 1px solid #e7c8aa; border-radius: var(--radius);
  padding: 22px 24px; margin: 22px 0;
}
.copy-panel strong, .copy-panel h2, .copy-panel h3 {
  display: block; font-size: 18px; margin: 0 0 5px; color: var(--ink);
}
.copy-panel p { font-size: 13.5px; color: #5c534c; margin: 4px 0 0; max-width: 60ch; }
.copy-panel .button { white-space: nowrap; flex-shrink: 0; }

.download-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px; align-items: center; margin: 20px 0; padding: 24px;
  background: linear-gradient(155deg, #f2faf6 0%, #ffffff 70%);
  border: 1.5px solid #9fd4be; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.download-panel h2 { font-size: 24px; line-height: 1.3; margin: 5px 0 6px; }
.download-panel p { color: var(--ink-soft); margin: 0 0 4px; font-size: 14.5px; }
.apk-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin: 14px 0;
}
.apk-meta div {
  padding: 11px 13px; background: var(--paper-soft);
  border: 1px solid var(--line); border-radius: 10px;
}
.apk-meta dt { font-size: 12px; color: #758288; }
.apk-meta dd { margin: 3px 0 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.checksum {
  min-width: 0; padding: 12px 14px; background: var(--blue-bg);
  border-radius: 10px; margin: 12px 0;
}
.checksum strong { display: block; font-size: 12px; color: #4e656e; margin-bottom: 4px; }
.checksum code { display: block; font-size: 12px; background: none; padding: 0; word-break: break-all; }

.notice {
  border-left: 4px solid var(--accent); background: #fff9ef;
  color: #4f4b45; padding: 14px 18px; margin: 18px 0;
  border-radius: 0 12px 12px 0; font-size: 14.5px;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice.emerald { border-left-color: var(--emerald); background: var(--emerald-bg); color: #1d4a38; }
.notice.blue { border-left-color: var(--blue); background: var(--blue-bg); color: #244854; }

.answer-warning {
  display: block; margin: 14px 0; padding: 14px 18px;
  border: 1px solid var(--danger-line); border-left: 5px solid var(--danger);
  border-radius: 10px; background: var(--danger-bg); color: #941b1b; font-weight: 700;
}
.answer-warning h2, .answer-warning h3 { font-size: 18px; margin: 0 0 6px; color: #8c1715; }
.answer-warning p { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.answer-warning p:last-child { margin-bottom: 0; }
.answer-warning a { color: #8c1715; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; }

/* --- Omnibox Star vs Search Visual Callout (iOS & Android Browser) --- */
.omnibox-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
.omnibox-option {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px; background: #fff; font-size: 13.5px;
}
.omnibox-option.correct {
  border: 2px solid var(--emerald); background: #f2fbf7; color: #124d36;
}
.omnibox-option.wrong {
  border: 1.5px dashed #dc7676; background: #fff8f8; color: #7e2525; opacity: 0.92;
}
.omnibox-badge {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; font-size: 16px; flex-shrink: 0; font-weight: 900;
}
.omnibox-option.correct .omnibox-badge { background: var(--emerald); color: #fff; }
.omnibox-option.wrong .omnibox-badge { background: #fbe0e0; color: var(--danger); }

/* --- 3-Card Summary Strip (Answers & iOS Quick Read) --- */
.summary-trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin: 22px 0;
}
.summary-trio-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow-sm);
}
.summary-trio-card .trio-step {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  padding: 2px 9px; border-radius: 999px;
  background: var(--wash); color: var(--accent-deep); margin-bottom: 8px;
}
.summary-trio-card h3 { font-size: 16px; line-height: 1.35; margin: 0 0 6px; }
.summary-trio-card p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* --- Stage Progress Bar (iOS 3-Stage Navigation) --- */
.stage-nav-bar {
  position: sticky; top: 71px; z-index: 25;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(246, 244, 238, 0.95); backdrop-filter: blur(10px);
  padding: 10px 0; margin: 16px 0 12px; border-bottom: 1px solid var(--line);
}
.stage-pill {
  flex: 1; min-width: 170px;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 11px;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.stage-pill:hover { border-color: var(--accent); color: var(--accent-deep); }
.stage-pill .stage-idx {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--wash); color: var(--accent-deep);
  font-size: 12px; font-weight: 900; flex-shrink: 0;
}
.stage-toggle-all {
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 700;
  color: var(--muted); cursor: pointer;
}
.stage-toggle-all:hover { color: var(--ink); border-color: var(--ink); }

.stage-block {
  margin: 0 0 22px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden;
  scroll-margin-top: 135px;
}
.stage-block > summary {
  padding: 18px 22px; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--paper-soft);
}
.stage-block > summary::-webkit-details-marker { display: none; }
.stage-summary-title { display: flex; align-items: center; gap: 12px; }
.stage-badge {
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.stage-summary-title strong { font-size: 18px; color: var(--ink); }
.stage-summary-title small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.stage-block > summary::after {
  content: "展开图解 ▼"; font-size: 12.5px; font-weight: 700;
  color: var(--accent-deep); background: var(--wash);
  padding: 5px 11px; border-radius: 999px; flex-shrink: 0;
}
.stage-block[open] > summary { border-bottom: 1px solid var(--line); }
.stage-block[open] > summary::after { content: "收起 ▲"; }
.stage-block-body { padding: 6px 24px 24px; }

/* --- Steps & Screenshots --- */
.steps { margin-top: 26px; }
.stage-block-body .steps { margin-top: 8px; }
.steps-heading {
  font-size: 13px; letter-spacing: 0.1em; color: #728087;
  font-weight: 800; text-transform: uppercase; margin-bottom: 12px;
}
.step {
  border-top: 1px solid var(--line); padding: 26px 0 30px;
  scroll-margin-top: 100px;
}
.stage-block-body .step:first-child { border-top: none; padding-top: 18px; }
.step-heading { display: flex; gap: 14px; align-items: flex-start; }
.step-number {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: #ede7da; color: var(--accent-deep); font-size: 13px; font-weight: 900;
}
.step h2, .step h3 { font-size: 21px; line-height: 1.35; margin: 2px 0 0; letter-spacing: -0.02em; }
.step-body { margin-left: 50px; min-width: 0; }
.step-body p { margin: 10px 0 0; color: #4c5b63; max-width: 70ch; overflow-wrap: anywhere; }
.step-body figure { margin: 16px 0 0; }
.step-body figure img {
  display: block; border: 1px solid #d9dfdc; border-radius: 12px;
  box-shadow: var(--shadow-sm); background: #fff;
  max-height: 680px; object-fit: contain; object-position: left top;
  cursor: zoom-in; transition: border-color 0.15s, box-shadow 0.15s;
}
.step-body figure img:hover, .pdf-page img:hover {
  border-color: var(--accent); box-shadow: var(--shadow-md);
}
.step-body figcaption { font-size: 12.5px; color: #7e8b92; margin-top: 7px; }
.step-extra {
  margin-top: 16px; border: 1px solid #e5d9cb; background: #fffbf6;
  border-radius: 12px; padding: 15px 18px;
}
.step-extra p { margin: 0 0 12px; }

/* Responsive 2-column grid for multi-page mobile/PDF guides */
.pdf-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-top: 16px;
}
.pdf-page {
  margin: 0; background: var(--paper-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; display: flex; flex-direction: column;
}
.pdf-page img {
  border: 1px solid #e6eae8; border-radius: 8px; width: 100%;
  background: #fff; cursor: zoom-in;
}
.pdf-page figcaption { font-size: 12px; color: #78858c; padding: 8px 4px 2px; text-align: center; }

/* URL Cleanup Visual Box in answers.html */
.url-clean-demo {
  margin-top: 12px; padding: 13px 16px; border-radius: 11px;
  background: #f7f9f8; border: 1px solid var(--line); font-size: 13.5px;
}
.url-clean-demo div + div { margin-top: 6px; }
.url-bad { color: #9c2b2b; text-decoration: line-through; opacity: 0.85; }
.url-good { color: var(--emerald-deep); font-weight: 700; }

/* --- FAQ Accordion --- */
.faq-section {
  margin: 34px 0; padding: 26px 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  scroll-margin-top: 96px; box-shadow: var(--shadow-sm);
}
.faq-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.faq-item {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-soft);
  transition: background 0.16s, border-color 0.16s;
}
.faq-item[open] { background: #fff; border-color: #d6b08e; box-shadow: var(--shadow-sm); }
.faq-item > summary {
  padding: 14px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "▼"; font-size: 11px; color: var(--muted); transition: transform 0.2s ease; flex-shrink: 0;
}
.faq-item[open] > summary::after { transform: rotate(180deg); color: var(--accent-deep); }
.faq-body {
  padding: 14px 18px 16px; font-size: 14px; color: #4d5c64;
  line-height: 1.7; border-top: 1px solid #efece6;
}
.faq-body p { margin: 0 0 10px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul, .faq-body ol { margin: 6px 0 10px; padding-left: 20px; }
.faq-body li { margin-bottom: 5px; }

/* --- Video & Original Panels --- */
.video-panel {
  margin-top: 28px; padding: 24px 26px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.video-copy { margin-bottom: 14px; }
.video-copy h2 { font-size: 22px; line-height: 1.35; margin: 5px 0 4px; }
.video-copy p { color: var(--muted); margin: 0; font-size: 14px; }
.video-drive-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 12px;
}
.video-drive-card p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 68ch; }
.video-drive-card .button { flex: none; white-space: nowrap; }
.video-note {
  margin: 20px 0; padding: 16px 18px; border: 1px solid #e6c6a8;
  background: #fff7ec; border-radius: 12px; color: #66584e; font-size: 14px;
}
.video-note strong { display: block; color: var(--accent-deep); margin-bottom: 3px; }
.guide-section { margin-top: 34px; }

.original-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line); padding-top: 26px; margin-top: 24px;
}
.original-panel h2 { font-size: 20px; margin: 0 0 4px; }
.original-panel p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0 40px;
  font-size: 13.5px; color: var(--muted); background: rgba(255, 255, 255, 0.45);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--blue); font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }

/* --- Toast & Image Lightbox Modal --- */
.toast {
  position: fixed; z-index: 160; bottom: 24px; left: 50%;
  transform: translate(-50%, 16px); background: var(--ink); color: #fff;
  border-radius: 12px; padding: 12px 20px;
  box-shadow: 0 14px 34px rgba(16, 38, 46, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(15, 23, 28, 0.86); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.lightbox-backdrop.open { opacity: 1; pointer-events: auto; }
.lightbox-toolbar {
  width: min(1100px, 100%); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; color: #fff; margin-bottom: 10px; font-size: 13.5px;
}
.lightbox-caption { font-weight: 600; color: #e5ecef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lightbox-btn {
  background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-stage {
  position: relative; max-width: min(1100px, 100%); max-height: calc(100vh - 96px);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-stage img {
  max-width: 100%; max-height: calc(100vh - 96px);
  border-radius: 10px; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  object-fit: contain;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1040px) {
  .site-nav { display: none; }
  .mobile-nav-strip { display: block; }
  .stage-nav-bar { top: 112px; }
}

@media (max-width: 880px) {
  .device-grid, .project-grid, .summary-trio { grid-template-columns: 1fr; }
  .help-grid, .instruction-steps, .omnibox-compare { grid-template-columns: 1fr; }
  .detail-shell { grid-template-columns: 1fr; gap: 0; padding-top: 22px; }
  .detail-nav { display: none; }
  .feature-callout { flex-direction: column; align-items: flex-start; }
  .feature-callout .button { width: 100%; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .header-inner { min-height: 58px; gap: 8px; }
  .brand { font-size: 16px; }
  .brand-tag { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: 18px; }
  .header-action { font-size: 12px; padding: 6px 11px; }
  .home-intro { padding: 24px 0 16px; }
  .home-intro h1 { font-size: 27px; }
  .home-intro > p { font-size: 14.5px; margin-bottom: 16px; }
  .device-card { padding: 16px 18px; }
  .device-card h2 { font-size: 18px; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .quick-install-box, .faq-section, .help-section { padding: 18px 16px; }
  .scheme-tabs, .browser-tabs { flex-direction: column; gap: 6px; }
  .bookmarklet-drag { font-size: 14.5px; padding: 12px 18px; width: 100%; justify-content: center; }
  .copy-panel, .download-panel, .original-panel, .video-drive-card { display: block; padding: 18px; }
  .copy-panel .button, .download-panel > .button, .original-panel .button, .video-drive-card .button {
    width: 100%; margin-top: 14px;
  }
  .apk-meta { grid-template-columns: 1fr 1fr; }
  .step-body { margin-left: 0; }
  .step-heading { gap: 10px; }
  .step h2, .step h3 { font-size: 18.5px; }
  .stage-block > summary { padding: 14px 16px; }
  .stage-block-body { padding: 4px 14px 18px; }
  .pdf-pages { grid-template-columns: 1fr; }
  .browser-notice-content { flex-direction: column; align-items: flex-start; gap: 8px; }
  .notice-actions { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


/* --- Cloudflare Edition: Dual APK Download Actions & In-App WebView Modal --- */
.download-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: stretch;
  min-width: 268px;
}
.button-backup {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  border-style: dashed;
}
.download-subnote {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.inapp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(15, 23, 28, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.inapp-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.inapp-modal-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
}
.inapp-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #8f1d1d;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.inapp-modal-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
}
.inapp-modal-steps {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.inapp-modal-steps p {
  margin: 0;
}
.inapp-modal-steps p + p {
  margin-top: 8px;
}
.inapp-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.inapp-modal-actions .button {
  width: 100%;
}
.inapp-modal-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}
.inapp-direct-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .download-actions {
    min-width: 0;
    margin-top: 14px;
  }
  .download-actions .button {
    width: 100%;
  }
}
