/* Shared styles for /app_tutorial/* pages. */
:root {
  --bg: oklch(14% 0.01 240);
  --surface: oklch(18% 0.015 240);
  --surface-2: oklch(21% 0.015 240);
  --fg: oklch(98% 0.005 240);
  --muted: oklch(70% 0.01 240);
  --border: oklch(28% 0.01 240);
  --accent: oklch(68% 0.19 250);
  --mark: #ff6a00;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'PingFang TC', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font);
  line-height: 1.65; margin: 0; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.container { max-width: 980px; margin: 0 auto; padding: 32px 20px 96px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.back-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.lang-controls { display: flex; gap: 6px; }
.lang-controls button {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px;
}
.lang-controls button.active { color: var(--accent); border-color: var(--accent); }

.hero { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.25; margin: 0 0 8px; }
.hero .lead { color: var(--muted); margin: 0 0 6px; font-size: 16px; }
.hero .date { color: var(--muted); font-size: 13px; }

/* Step index */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.toc a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg); font-size: 14px; text-decoration: none;
}
.toc a span { color: var(--accent); font-weight: 700; }

/* Steps */
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; margin-bottom: 24px;
  display: grid; gap: 24px; align-items: start;
}
.step.phone { grid-template-columns: minmax(0, 1fr) 320px; }
.step.tv { grid-template-columns: 1fr; }
.step.phone .step-text { position: sticky; top: 24px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-num {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 18%, transparent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.step h2 { font-size: 20px; line-height: 1.35; margin: 0; }
.step p { margin: 0 0 12px; font-size: 16px; }
.points { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: pt; }
.points li { position: relative; padding-left: 34px; margin-bottom: 10px; font-size: 15.5px; }
.points li::before {
  counter-increment: pt; content: counter(pt);
  position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--mark); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.note { color: var(--muted); font-size: 14px; }
.tip {
  background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 10px 14px; color: var(--muted); font-size: 14px; margin: 0 0 12px;
}

/* Screenshot with numbered markers (positions are % of the image). */
.shot { position: relative; margin: 0; cursor: zoom-in; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  background: #0b0d12;
}
.step.phone .shot img { border-radius: 26px; }
.shot .zoom-hint {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px;
  background: rgb(0 0 0 / 0.6); color: #fff; font-size: 12px; pointer-events: none;
}
.marker {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--mark); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.9), 0 4px 10px rgb(0 0 0 / 0.5);
  pointer-events: none;
}
.ring {
  position: absolute; border: 3px solid var(--mark); border-radius: 12px; pointer-events: none;
}

/* Import/copy box */
.import-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px;
}
.import-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; }
.copy-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 6px 12px;
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; flex: none;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgb(0 0 0 / 0.92); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 16px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-inner { position: relative; max-width: 100%; max-height: 100%; }
.lightbox .shot img { box-shadow: none; }
.lightbox .close {
  position: fixed; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 22px; cursor: pointer;
}

.footer-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .container { padding: 20px 14px 72px; }
  .step { padding: 18px; gap: 16px; }
  .step.phone { grid-template-columns: 1fr; }
  .step.phone .step-text { position: static; }
  .step.phone .shot { max-width: 340px; margin: 0 auto; width: 100%; }
  .marker { width: 22px; height: 22px; font-size: 12px; }
}
