/* Cam Hub operation manual (guide.html).
 *
 * Loaded only by guide.html, after styles.css. Everything is scoped under .guide
 * (the <main> element), uses the site's own variables (--text, --muted, --cyan, --blue,
 * --panel, --panel-strong, --line, --line-strong, --shadow, --bg) and follows the site's
 * theme switch: dark by default, light through prefers-color-scheme or [data-theme="light"].
 * Logical properties throughout, so the layout holds in right-to-left languages.
 */

.guide {
  /* Height of the sticky site header (+ the mobile contents bar); site.js keeps both in sync. */
  --g-topbar: 76px;
  --g-offset: 96px;
  --g-body: #d5deef;
  --g-green: #3fd88a;
  --g-red: #ff7d7d;
  --g-amber: #ffb347;
  --g-chip: rgba(36, 119, 255, 0.22);
  --g-card: rgba(255, 255, 255, 0.035);
  --g-card-strong: rgba(18, 217, 238, 0.08);
  --g-code: rgba(2, 8, 28, 0.62);
  --g-on-accent: #00131a;
  --g-radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .guide {
    --g-body: #1f2d4d;
    --g-green: #0f7f46;
    --g-red: #b52a2a;
    --g-amber: #985000;
    --g-chip: rgba(29, 88, 183, 0.12);
    --g-card: rgba(255, 255, 255, 0.62);
    --g-card-strong: rgba(0, 117, 140, 0.08);
    --g-code: rgba(29, 88, 183, 0.08);
    --g-on-accent: #ffffff;
  }
}

:root[data-theme="light"] .guide {
  --g-body: #1f2d4d;
  --g-green: #0f7f46;
  --g-red: #b52a2a;
  --g-amber: #985000;
  --g-chip: rgba(29, 88, 183, 0.12);
  --g-card: rgba(255, 255, 255, 0.62);
  --g-card-strong: rgba(0, 117, 140, 0.08);
  --g-code: rgba(29, 88, 183, 0.08);
  --g-on-accent: #ffffff;
}

/* ───── hero ───── */
.guide .page-hero { padding-block-end: 36px; }
.guide .page-hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.12; letter-spacing: -0.03em; }
.guide .page-hero .summary { max-width: 46em; }

.guide-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  border-radius: 12px;
}
.guide-notice::before {
  content: "i";
  flex: none;
  width: 20px;
  height: 20px;
  margin-block-start: 1px;
  display: grid;
  place-items: center;
  color: var(--bg);
  font: 700 12px/1 Georgia, serif;
  background: var(--blue);
  border-radius: 50%;
}
.guide-notice[hidden] { display: none; }

/* ───── layout: contents column + article ───── */
.guide-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.guide-layout :is(h1, h2, h3, h4, p, li, a, td, th, dt, dd, summary, figcaption, span) {
  /* styles.css sets keep-all for CJK pages and relies on injected <wbr>; the manual is not
     phrase-wrapped, so ordinary CJK line breaking applies here. */
  word-break: normal;
}
.guide-layout:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif; }

.guide-layout:not(.has-toc) { grid-template-columns: minmax(0, 1fr); }
.guide-layout:not(.has-toc) .guide-side { display: none; }
.guide-side { position: sticky; top: calc(var(--g-topbar) + 16px); align-self: start; min-width: 0; }

.guide-toc-toggle { display: none; }

.guide-toc {
  max-height: calc(100vh - var(--g-topbar) - 32px);
  padding: 12px;
  padding-inline: 12px 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: linear-gradient(145deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}
.guide-toc:empty { display: none; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; }
.guide-toc a {
  display: flex;
  gap: 0.6em;
  align-items: baseline;
  padding: 6px 10px;
  color: var(--g-body);
  border-radius: 8px;
}
.guide-toc a:hover { color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.guide-toc a.is-parent { color: var(--cyan); }
.guide-toc a.is-active { color: var(--cyan); font-weight: 650; background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.guide-toc a.no-num { padding-inline-start: calc(10px + 2.1em); }
.guide-toc .toc-num { flex: none; min-width: 1.5em; color: var(--cyan); font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-toc .toc-code { flex: none; color: var(--cyan); font-size: 0.82em; font-weight: 700; letter-spacing: 0.04em; }
.guide-toc ol ol {
  display: none;
  margin: 2px 0 6px;
  margin-inline-start: 1.2em;
  padding-inline-start: 0.4em;
  border-inline-start: 1px solid var(--line);
}
.guide-toc li.is-current > ol { display: block; }
.guide-toc ol ol a { padding-block: 4px; font-size: 13px; color: var(--muted); }
.guide-toc ol ol a:hover { color: var(--text); }
.guide-toc ol ol a.is-active { color: var(--cyan); }

/* ───── article ───── */
.guide-article {
  min-width: 0;
  padding: clamp(18px, 4vw, 44px);
  color: var(--g-body);
  font-size: 16px;
  line-height: 1.8;
  background: linear-gradient(145deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px var(--shadow);
}
.guide-article { overflow-anchor: none; } /* a chapter swap must not be "corrected" by the browser */
.guide-article [id] { scroll-margin-top: var(--g-offset); }
.guide-article [tabindex="-1"]:focus { outline: none; }
.guide-article > :first-child { margin-top: 0; }
.guide-article p { margin: 10px 0; }
.guide-article a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
.guide-article a:hover { text-decoration-color: currentColor; }
.guide-article a.xref { white-space: normal; }
.guide-article strong, .guide-article b { color: var(--text); }
.guide-article img { max-width: 100%; height: auto; }

.guide-status { margin: 0; padding: 32px 0; color: var(--muted); text-align: center; }
.guide-status.is-loading { animation: guide-pulse 1.4s ease-in-out infinite; }
.guide-status .guide-button { margin-block-start: 14px; }
@keyframes guide-pulse { 50% { opacity: 0.45; } }
.guide-button {
  min-height: 40px;
  padding: 8px 20px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--g-card-strong);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.guide-button:hover { background: color-mix(in srgb, var(--cyan) 18%, transparent); }

/* chapters and headings */
.guide section.chapter { margin-block: 0; }
.guide section.chapter + section.chapter { margin-block-start: 56px; padding-block-start: 44px; border-block-start: 1px solid var(--line); }
.guide section.chapter > h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(25px, 3.4vw, 32px);
  line-height: 1.3;
}
.guide section.chapter > h2 .num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding-inline: 0.2em;
  color: var(--cyan);
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--cyan) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, transparent);
  border-radius: 10px;
}
.guide h3 { margin: 38px 0 8px; color: var(--text); font-size: 21px; line-height: 1.4; }
.guide h4 { margin: 24px 0 4px; color: var(--text); font-size: 17px; line-height: 1.45; }
.guide h2 + h3, .guide .lead + h3 { margin-block-start: 24px; }
.guide .lead { color: var(--muted); font-size: 17px; line-height: 1.75; }
.guide ul, .guide ol { margin-block: 10px; padding-inline-start: 1.5em; }
.guide li { margin-block: 5px; }
.guide li::marker { color: var(--cyan); }
.guide dl { margin: 10px 0; }
.guide hr { margin-block: 28px; border: 0; border-block-start: 1px solid var(--line); }

/* Previous / Next chapter, at the end of each chapter; the arrows follow the reading direction */
.guide-article .guide-pager {
  display: flex;
  gap: 12px;
  margin-block-start: 48px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--line);
}
.guide-article .guide-pager a {
  flex: 0 1 calc(50% - 6px);
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  color: var(--g-body);
  line-height: 1.45;
  text-decoration: none;
  background: var(--g-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--g-radius);
}
.guide-article .guide-pager a:hover { background: var(--g-card-strong); border-color: color-mix(in srgb, var(--cyan) 55%, transparent); }
.guide-article .guide-pager .guide-next { margin-inline-start: auto; text-align: end; }
.guide-article .guide-pager .guide-prev { text-align: start; }
.guide-pager .pager-dir { color: var(--cyan); font-size: 13px; font-weight: 700; }
.guide-pager .pager-title { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.guide-pager .guide-prev .pager-dir::before { content: "\2190\00a0"; }
.guide-pager .guide-next .pager-dir::after { content: "\00a0\2192"; }
.guide-layout[dir="rtl"] .guide-pager .guide-prev .pager-dir::before { content: "\2192\00a0"; }
.guide-layout[dir="rtl"] .guide-pager .guide-next .pager-dir::after { content: "\00a0\2190"; }

/* on-screen labels, navigation paths, typed values */
.guide span.ui {
  display: inline-block;
  max-width: 100%;
  padding: 0.04em 0.4em;
  color: var(--text);
  font-weight: 650;
  background: var(--g-chip);
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.guide span.path {
  padding: 0.08em 0.55em;
  background: color-mix(in srgb, var(--cyan) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 34%, transparent);
  border-radius: 9px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.guide span.path .ui { padding-inline: 0.1em; background: none; }
.guide code, .guide kbd {
  padding: 0.06em 0.4em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--text);
  background: var(--g-code);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: break-word;
  unicode-bidi: isolate;
  direction: ltr;
}
.guide pre {
  margin: 14px 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
  background: var(--g-code);
  border: 1px solid var(--line);
  border-radius: 12px;
  direction: ltr;
  text-align: left;
}
.guide pre code { padding: 0; background: none; border: 0; overflow-wrap: normal; }

/* numbered steps with a result line */
.guide ol.steps, .guide .sop ol { margin: 14px 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide li.step, .guide .sop ol > li {
  position: relative;
  margin: 12px 0;
  padding-block: 14px;
  padding-inline: 58px 16px;
  counter-increment: guide-step;
  background: var(--g-card);
  border: 1px solid var(--line);
  border-radius: var(--g-radius);
}
.guide li.step::before, .guide .sop ol > li::before {
  content: counter(guide-step);
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 15px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--g-on-accent);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--cyan);
  border-radius: 50%;
}
.guide li.step > :first-child { margin-block-start: 0; }
.guide li.step > :last-child { margin-block-end: 0; }
.guide .check {
  display: block;
  margin: 10px 0 0;
  padding: 6px 12px;
  color: var(--g-body);
  font-size: 0.94em;
  line-height: 1.65;
  background: color-mix(in srgb, var(--g-green) 11%, transparent);
  border-inline-start: 3px solid var(--g-green);
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
}
.guide .check .check-label { margin-inline-end: 0.15em; color: var(--g-green); }

/* a step that carries a picture: text on one side, a single screenshot on the other */
@media (min-width: 721px) {
  .guide li.step:has(> figure, > .shots) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 260px);
    column-gap: 26px;
    align-items: start;
  }
  .guide li.step:has(> figure, > .shots) > * { grid-column: 1; }
  .guide li.step:has(> figure, > .shots) > figure.phone,
  .guide li.step:has(> figure, > .shots) > .shots:not(.pair):not(.triple):not(.quad):not(.land-pair) {
    grid-column: 2;
    grid-row: 1 / span 12;
    margin-block: 0;
  }
  .guide li.step:has(> figure, > .shots) > figure.land,
  .guide li.step:has(> figure, > .shots) > figure.device,
  .guide li.step:has(> figure, > .shots) > .shots.pair,
  .guide li.step:has(> figure, > .shots) > .shots.triple,
  .guide li.step:has(> figure, > .shots) > .shots.quad,
  .guide li.step:has(> figure, > .shots) > .shots.land-pair { grid-column: 1 / -1; }
}

/* call-outs */
.guide .callout {
  --c: var(--blue);
  position: relative;
  margin: 18px 0;
  padding-block: 12px;
  padding-inline: 50px 16px;
  font-size: 15px;
  line-height: 1.7;
  background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 34%, transparent);
  border-inline-start: 4px solid var(--c);
  border-radius: 12px;
}
.guide .callout::before {
  content: "i";
  position: absolute;
  inset-block-start: 13px;
  inset-inline-start: 15px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--bg);
  font: 700 13px/1 Georgia, serif;
  background: var(--c);
  border-radius: 50%;
}
.guide .callout.tip { --c: var(--g-green); }
.guide .callout.tip::before { content: "★"; font: 12px/1 system-ui, sans-serif; }
.guide .callout.warn { --c: var(--g-amber); }
.guide .callout.danger { --c: var(--g-red); }
.guide .callout.warn::before, .guide .callout.danger::before { content: "!"; font: 800 14px/1 system-ui, sans-serif; }
.guide .callout > :first-child { margin-block-start: 0; }
.guide .callout > :last-child { margin-block-end: 0; }
.guide .callout > .t, .guide .callout > .callout-title, .guide .callout > strong:first-child { display: block; margin-block-end: 2px; color: var(--text); font-weight: 700; }

/* tables */
.guide .table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  background: var(--g-card);
  border: 1px solid var(--line);
  border-radius: var(--g-radius);
}
.guide table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; }
.guide th, .guide td { padding: 10px 14px; text-align: start; vertical-align: top; line-height: 1.6; border-block-end: 1px solid var(--line); }
.guide th { color: var(--muted); font-weight: 650; background: color-mix(in srgb, var(--blue) 9%, transparent); }
/* Human-eye reading: a header or a short value is never broken into single characters; the long text column gives way instead. */
.guide th { white-space: nowrap; }
.guide td:not(:has(p, ul, ol, figure, div)):is(:first-child, :last-child:not(:first-child)) { min-width: 7em; }
.guide td span.ui:not(.ui-long) { white-space: nowrap; }
.guide td code { white-space: nowrap; }
.guide td code:where(:not(:only-child)) { white-space: normal; overflow-wrap: break-word; }
.guide tr:last-child > td { border-block-end: 0; }
.guide td > :first-child { margin-block-start: 0; }
.guide td > :last-child { margin-block-end: 0; }
.guide caption { padding: 10px 14px; color: var(--muted); font-size: 13px; text-align: start; caption-side: bottom; }

/* screenshots */
.guide figure { margin: 20px 0; }
.guide figcaption { margin-block-start: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.guide .shots { display: grid; gap: 14px; justify-items: center; align-items: start; margin: 18px 0; }
.guide .shots > figure { margin: 0; width: 100%; }
.guide .shots.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 540px; margin-inline: auto; gap: 10px; }
.guide .shots.triple { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; margin-inline: auto; gap: 8px; }
.guide .shots.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 880px; margin-inline: auto; gap: 8px; }
.guide .shots.land-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide figure.phone { text-align: center; }
.guide figure.phone img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: 0 14px 34px var(--shadow);
}
.guide .shots.pair figure.phone img { border-radius: 18px; }
.guide .shots.triple figure.phone img, .guide .shots.quad figure.phone img { border-radius: 13px; }
/* iPhone Duo pictures taken with the device itself in view: the frame is the border, the background is clear */
.guide figure.device { text-align: center; margin: 18px 0; }
.guide figure.device img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  filter: drop-shadow(0 12px 22px var(--shadow));
}
.guide figure.device.tall img { max-width: 380px; }
.guide figure.land { text-align: center; }
.guide figure.land img {
  display: block;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 14px 34px var(--shadow);
}

/* several recorders feeding one wall (the .mixmap illustration) */
.guide .mixmap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 22px 0 8px;
  padding: 18px;
  background: var(--g-card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.guide .mixmap figcaption { font-size: 14px; }
.guide .mm-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.guide .mm-src { display: grid; gap: 6px; min-width: 0; }
.guide .mm-src > b { color: var(--text); font-size: 16px; }
.guide .mm-src > b + span { margin-block-start: -4px; color: var(--muted); font-size: 13px; }
.guide .mm-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.guide .mm-thumbs img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.guide .mm-arrow { display: grid; grid-auto-flow: column; gap: 10px; justify-content: center; align-items: center; color: var(--blue); font-size: 28px; line-height: 1; }
.guide .mm-arrow i { display: inline-block; font-style: normal; transform: rotate(90deg); }
.guide .mm-arrow small { color: var(--muted); font-size: 14px; }
.guide .mm-wall img { display: block; width: 100%; height: auto; margin-inline: auto; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }

/* standard procedures */
.guide .sop {
  margin: 26px 0;
  overflow: hidden;
  background: var(--g-card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.guide .sop > header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  padding: 14px 20px;
  background: var(--g-card-strong);
  border-block-end: 1px solid var(--line);
}
.guide .sop > header b.id { color: var(--cyan); font-size: 13px; font-weight: 800; letter-spacing: 0.1em; }
.guide .sop > header h3 { margin: 0; font-size: 19px; }
.guide .sop > header .time { margin-inline-start: auto; }
.guide .sop > :not(header) { margin-inline: 20px; }
.guide .sop > .inner { margin-inline: 0; padding: 6px 20px 18px; }
.guide .sop > .inner > :first-child { margin-block-start: 10px; }
.guide .sop ol > li { margin: 0; padding-inline-end: 6px; background: none; border: 0; border-block-end: 1px dashed var(--line); border-radius: 0; }
.guide .sop ol > li:last-child { border-block-end: 0; }
.guide .sop dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; color: var(--muted); font-size: 14.5px; }
.guide .sop dt { color: var(--text); font-weight: 700; }
.guide .sop dd { margin: 0; }
.guide .time {
  display: inline-block;
  padding: 1px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* troubleshooting */
.guide details.faq { margin: 10px 0; padding: 0 16px; background: var(--g-card); border: 1px solid var(--line); border-radius: 12px; }
.guide details.faq > summary {
  position: relative;
  padding-block: 12px;
  padding-inline-end: 28px;
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.guide details.faq > summary::-webkit-details-marker { display: none; }
.guide details.faq > summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 6px;
  inset-block-start: 50%;
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid var(--cyan);
  border-block-end: 2px solid var(--cyan);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}
.guide details.faq[open] > summary { color: var(--cyan); border-block-end: 1px solid var(--line); margin-block-end: 8px; }
.guide details.faq[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.guide details.faq > :last-child { margin-block-end: 14px; }
.guide div.faq, .guide section.faq { margin: 14px 0; padding: 4px 16px 10px; background: var(--g-card); border: 1px solid var(--line); border-radius: 12px; }

/* back to top */
.guide-top {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  z-index: 15;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  cursor: pointer;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 8px 24px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.guide-top::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-block-start: 5px;
  border-inline-start: 2.5px solid currentColor;
  border-block-start: 2.5px solid currentColor;
  transform: rotate(45deg);
}
.guide-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.guide-top:hover { background: color-mix(in srgb, var(--cyan) 16%, var(--panel-strong)); }

/* ───── narrow screens: contents become a collapsible bar ───── */
@media (max-width: 920px) {
  .guide-layout { display: block; }
  .guide-side {
    position: sticky;
    top: var(--g-topbar);
    z-index: 12;
    margin: 0 calc(var(--gutter) * -1) 14px;
    padding: 8px var(--gutter);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border-block-end: 1px solid var(--line);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .guide-toc-toggle {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 14px;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .guide-toc-label { flex: none; font-weight: 700; }
  .guide-toc-current { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13.5px; text-align: start; text-overflow: ellipsis; white-space: nowrap; }
  .guide-toc-toggle::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-block-start: -3px;
    border-inline-end: 2px solid var(--cyan);
    border-block-end: 2px solid var(--cyan);
    transform: rotate(45deg);
    transition: transform 0.15s;
  }
  .guide-toc-toggle[aria-expanded="true"]::after { margin-block-start: 3px; transform: rotate(-135deg); }
  .guide-toc {
    position: absolute;
    inset-inline: var(--gutter);
    top: 100%;
    z-index: 13;
    display: none;
    max-height: min(68vh, calc(100vh - var(--g-offset) - 24px));
    margin-block-start: 6px;
    background: var(--bg-soft);
    box-shadow: 0 24px 60px var(--shadow);
  }
  .guide-toc.is-open { display: block; }
  .guide-toc a { padding-block: 9px; }
}

@media (max-width: 720px) {
  .guide { --g-topbar: 68px; }
  .guide .page-hero { padding-block-start: 8px; padding-block-end: 22px; }
  .guide-article { font-size: 15.5px; line-height: 1.75; border-radius: 14px; }
  .guide section.chapter + section.chapter { margin-block-start: 44px; padding-block-start: 34px; }
  .guide h3 { font-size: 19px; margin-block-start: 30px; }
  .guide li.step, .guide .sop ol > li { padding-inline: 50px 12px; }
  .guide .sop ol > li { padding-inline-end: 0; }
  .guide li.step::before, .guide .sop ol > li::before { inset-inline-start: 12px; width: 28px; height: 28px; }
  .guide .sop > header { padding: 12px 14px; }
  .guide .sop > header .time { margin-inline-start: 0; }
  .guide .sop > :not(header) { margin-inline: 14px; }
  .guide .sop > .inner { margin-inline: 0; padding: 4px 14px 14px; }
  .guide .sop dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide .sop dd { margin-block-end: 6px; }
  .guide .shots.land-pair { grid-template-columns: minmax(0, 1fr); }
  .guide .shots.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }
  .guide .callout { padding-inline: 44px 12px; }
  .guide .callout::before { inset-inline-start: 12px; }
  .guide .mixmap { padding: 12px; }
  .guide-top { inset-block-end: 12px; inset-inline-end: 12px; }
  /* Tables: one card per row, so a phone never has to scroll sideways to read them. The first column is the card's title,
     the other cells carry their column name (data-label, set by guideTableLabels in site.js); the header row is kept for screen readers. */
  .guide .table-wrap { overflow: visible; margin: 14px 0; background: none; border: 0; border-radius: 0; }
  .guide table { display: block; min-width: 0; width: auto; font-size: 15px; }
  .guide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .guide tbody { display: block; }
  .guide tbody tr { display: block; margin: 0 0 12px; padding: 6px 14px 8px; background: var(--g-card); border: 1px solid var(--line); border-radius: var(--g-radius); }
  .guide td { display: block; min-width: 0; padding: 6px 0; border: 0; }
  .guide td:not(:has(p, ul, ol, figure, div)):is(:first-child, :last-child:not(:first-child)) { min-width: 0; }
  .guide td:first-child { font-weight: 650; }
  .guide td[data-label]::before { content: attr(data-label); display: block; margin-block-end: 1px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: 0.02em; }
  .guide td:first-child[data-label]::before { content: none; }
  .guide td code { overflow-wrap: anywhere; }
  .guide pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .guide pre code { overflow-wrap: anywhere; }
  /* A long unbroken heading (a Japanese compound in katakana, a German word) wraps instead of pushing the whole page wider than the phone. */
  .guide :is(h1, h2, h3, h4) { overflow-wrap: anywhere; }
  .guide :is(p, li, dd, dt, figcaption, summary, .callout) { overflow-wrap: break-word; }
}

@media (max-width: 520px) {
  .guide .mm-sources { grid-template-columns: minmax(0, 1fr); }
  .guide .shots.triple { gap: 5px; }
  .guide figure.phone img { max-width: 260px; }
  .guide .shots figure.phone img { max-width: 100%; }
}

/* The chevrons below are drawn with logical borders; in right-to-left languages they are turned the other way
   so that they still point up / down. */
html[dir="rtl"] .guide-top::before { transform: rotate(-45deg); }
html[dir="rtl"] .guide-toc-toggle::after { transform: rotate(-45deg); }
html[dir="rtl"] .guide-toc-toggle[aria-expanded="true"]::after { transform: rotate(135deg); }
html[dir="rtl"] .guide details.faq > summary::after { transform: translateY(-70%) rotate(-45deg); }
html[dir="rtl"] .guide details.faq[open] > summary::after { transform: translateY(-30%) rotate(135deg); }

@media (prefers-reduced-motion: reduce) {
  .guide-status.is-loading { animation: none; }
  .guide-top, .guide-toc-toggle::after, .guide details.faq > summary::after { transition: none; }
}

/* ───── print: the manual alone, on white ───── */
@media print {
  html, body { background: #fff !important; }
  body::before { display: none !important; }
  .topbar, .footer, .guide-side, .guide-top, .guide-notice, .guide-pager, .page-hero .eyebrow, .page-hero .summary, .guide-status .guide-button { display: none !important; }
  main.guide { width: 100%; margin: 0; padding: 0; }
  .guide .page-hero { padding: 0 0 12pt; text-align: start; }
  .guide .page-hero h1 { color: #000; background: none; font-size: 24pt; }
  .guide-layout { display: block; }
  .guide-article { padding: 0; color: #000; font-size: 10.5pt; line-height: 1.55; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .guide { --g-body: #000; --g-card: #fff; --g-card-strong: #f2f5fa; --g-code: #f2f5fa; --g-chip: #e6ecf7; --g-green: #0f6b3a; --g-red: #a02020; --g-amber: #7a4200; --g-on-accent: #fff; --text: #000; --muted: #444; --cyan: #00596b; --blue: #1d4a99; --line: #b8c2d6; --line-strong: #8a98b4; --bg: #fff; --shadow: transparent; --panel: #fff; --panel-strong: #fff; }
  .guide section.chapter + section.chapter { break-before: page; margin-block-start: 0; padding-block-start: 0; border: 0; }
  .guide section.chapter > h2, .guide h3, .guide h4 { break-after: avoid; }
  .guide figure, .guide li.step, .guide .callout, .guide .sop > header, .guide .sop ol > li, .guide .table-wrap, .guide details.faq, .guide .mixmap { break-inside: avoid; }
  .guide figure.phone img { max-width: 200px; box-shadow: none; }
  .guide .shots.pair, .guide .shots.triple, .guide .shots.quad { max-width: 100%; }
  .guide .table-wrap { overflow: visible; }
  .guide table { min-width: 0; }
  .guide a { color: inherit; text-decoration: none; }
  .guide-article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; word-break: break-all; }
  .guide details.faq > summary::after { display: none; }
}

/* Short silent demonstration clips (guide/vid/*.mp4): same frame as a screenshot. */
.guide figure.clip { text-align: center; }
.guide figure.clip video {
  display: block;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: 0 14px 34px var(--shadow);
}
.guide figure.clip.land video { max-width: 100%; border-radius: 16px; aspect-ratio: 1600 / 736; }
/* The frame is reserved up front: a clip has no source or poster while it is away from the screen. */
.guide figure.clip video { aspect-ratio: 900 / 1956; object-fit: contain; }
.guide figure.clip figcaption::before { content: "\25B6\FE0E  "; opacity: .7; }
