/* Koi Launch manual: the hub (/docs/) and one page per chapter (/docs/<id>/).
   Loaded after homepage-ja.css; everything is scoped to body.manual / .km.
   Type follows the ElevenLabs site: light (300) headings with tight tracking in black, regular
   body text, on a plain white page. Inter for Latin/Cyrillic, Noto Sans JP Koi for Japanese.
   Friendly parts for beginners: Kohaku's speech bubbles, colour-coded icon tiles, chat bubbles
   for what to type, and copy boxes. */

body.manual.kj {
  --k-bg: #ffffff;
  --k-ink: #000000;
  --k-ink-2: #1f1f1f;
  --k-muted: #5c5c5c;
  --k-faint: #8a8a8a;
  --k-line: #ebebeb;
  --k-line-2: #dcdcdc;
  --k-card: #f6f6f6;
  --k-card-2: #f0f0f0;
  --bg: #ffffff;
  --bg-tint: #f7f7f7;
  --card-2: #f7f7f7;
  --line: #ebebeb;
  --line-2: #dcdcdc;
  --code: #f2f2f2;
  --bubble: #f2f2f2;
  background: #fff;
}
body.manual.kj main {
  background: #fff;
}
body.manual.kj .foot {
  background: #f7f7f7;
}

.km {
  --km-ink: #000;
  --km-text: #1f1f1f;
  --km-muted: #5c5c5c;
  --km-line: #ebebeb;
  --km-soft: #f6f6f6;
  --km-koi: #ff6a3d;
  --km-r: 20px;
  color: var(--km-text);
  font-family: Inter, "Noto Sans JP Koi", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
}
.km:lang(ja) {
  line-height: 1.85;
  letter-spacing: 0.01em;
}
.km-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}
.km h1,
.km h2,
.km h3 {
  margin: 0;
  color: var(--km-ink);
  font-family: inherit;
}
.km h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.km:lang(ja) h1 {
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.km-h2 {
  margin-bottom: 24px !important;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.km-eyebrow {
  margin: 0 0 14px;
  color: var(--km-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}
.km-lead {
  max-width: 36em;
  margin: 18px 0 0;
  color: var(--km-muted);
  font-size: 18px;
  line-height: 1.7;
}
/* Running text links only (chapter body); .btn links in the embedded connection guide keep
   their own colours. */
.km-body p a:not(.btn):not(.km-pill),
.km-body li a:not(.btn),
.km-body td a:not(.btn) {
  color: var(--km-ink);
  text-decoration: underline;
  text-decoration-color: rgb(0 0 0 / 0.3);
  text-underline-offset: 3px;
}
.km-body p a:not(.btn):not(.km-pill):hover,
.km-body li a:not(.btn):hover,
.km-body td a:not(.btn):hover {
  text-decoration-color: var(--km-koi);
}

/* ---------------------------------------------------------------- icons (colour-coded tiles) */
.km-ico {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffe9df;
  color: #c2410c;
}
.km-ico .i {
  width: 24px;
  height: 24px;
}
.km-ico.sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.km-ico.sm .i {
  width: 19px;
  height: 19px;
}
.km-ico.t1 { background: #e3efff; color: #1d5fbf; }
.km-ico.t2 { background: #dcf5e7; color: #17744b; }
.km-ico.t3 { background: #eee8ff; color: #6a43c7; }
.km-ico.t4 { background: #fff1c2; color: #8a6100; }

/* ---------------------------------------------------------------- speech bubbles */
.km-bubble {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--km-line);
  border-radius: 18px;
  background: #fff;
  color: var(--km-text);
  font-size: 15.5px;
  line-height: 1.7;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05);
}
.km-bubble p {
  margin: 0;
}
.km-bubble::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-bottom: 1px solid var(--km-line);
  border-left: 1px solid var(--km-line);
  background: #fff;
  transform: rotate(45deg);
}

/* What you type to your AI: a dark chat bubble, like your own message in a chat app. */
.km-say {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 16px 16px 4px 16px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.km-say-who {
  flex: none;
  color: rgb(255 255 255 / 0.55);
  font-size: 11.5px;
  font-weight: 500;
}

/* ---------------------------------------------------------------- hub: hero */
.km-hero {
  padding: 56px 0 40px;
}
.km-hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 40px;
}
.km-hero-mascot {
  position: relative;
  display: grid;
  justify-items: end;
  margin: 0;
}
.km-hero-mascot::before {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 260px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 180 143 / 0.35), rgb(255 255 255 / 0));
  pointer-events: none;
}
.km-hero-mascot .km-kohaku-img {
  position: relative;
  width: 168px;
  height: 168px;
  margin-right: 24px;
}
.km-hero-mascot figcaption {
  position: relative;
  margin: 2px 74px 0 0;
  color: var(--km-muted);
  font-size: 13px;
  font-weight: 500;
}
.km-bubble-hero {
  max-width: 300px;
  margin-bottom: 14px;
}
.km-bubble-hero::before {
  top: auto;
  right: 96px;
  bottom: -8px;
  left: auto;
  border: 0;
  border-right: 1px solid var(--km-line);
  border-bottom: 1px solid var(--km-line);
}

/* ---------------------------------------------------------------- hub: sections */
.km-band {
  padding: 40px 0;
}
.km-band-last {
  padding-bottom: 112px;
}
.km-desc {
  display: block;
  color: var(--km-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Beginner path: three numbered steps. */
.km-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.km-path li {
  display: flex;
}
.km-path-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 26px 64px;
  border-radius: var(--km-r);
  background: var(--km-soft);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}
.km-path-card:hover {
  background: #efefef;
  transform: translateY(-2px);
}
.km-path-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  margin-bottom: 26px;
}
.km-path-n {
  padding: 4px 12px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.km-path-card strong,
.km-tile strong {
  display: block;
  margin-bottom: 6px;
  color: var(--km-ink);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.km-go {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  transition: background-color 0.2s, color 0.2s;
}
.km-path-card:hover .km-go {
  background: #000;
  color: #fff;
}

/* Chapter tiles. */
.km-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-tiles li {
  display: flex;
}
.km-tile {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--km-line);
  border-radius: var(--km-r);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.km-tile:hover {
  border-color: #cfcfcf;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.06);
  transform: translateY(-2px);
}
.km-tile-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.km-tile-text .km-say,
.km-path-card .km-say {
  margin-top: auto;
}
.km-tile-text .km-desc,
.km-path-card .km-desc {
  margin-bottom: 14px;
}
.km-tile-n {
  display: block;
  margin-bottom: 4px;
  color: var(--km-faint, #8a8a8a);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.km-tile strong {
  font-size: 19px;
}

/* Help callout. */
.km-help {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  border-radius: 28px;
  background: #fff4ee;
}
.km-help .km-kohaku-img {
  flex: none;
  width: 96px;
  height: 96px;
}
.km-help h2 {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.km-help p {
  max-width: 40em;
  margin: 6px 0 16px;
  color: var(--km-text);
  font-size: 15.5px;
}

/* Pill links (black, like the ElevenLabs buttons). */
.km-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #000;
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 0.2s;
}
.km-pill:hover {
  background: #333;
}
.km-pill-quiet {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--km-line);
  background: #fff;
  color: var(--km-ink) !important;
  font-size: 14px;
}
.km-pill-quiet:hover {
  border-color: #000;
  background: #fff;
}

/* ---------------------------------------------------------------- chapter page */
.km-chapter {
  padding: 28px 0 112px;
}
.km-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--km-muted);
  font-size: 14px;
}
.km-crumbs a {
  color: var(--km-muted);
  text-decoration: none;
}
.km-crumbs a:hover {
  color: var(--km-ink);
}
.km-crumbs [aria-current] {
  color: var(--km-ink);
}
.km-ch-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
}

/* Chapter list. */
.km-side {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.km-side-title {
  margin: 0 0 10px;
  color: var(--km-muted);
  font-size: 13px;
  font-weight: 500;
}
.km-side ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-side a {
  display: flex;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--km-text);
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
}
.km-side a:hover {
  background: var(--km-soft);
}
.km-side a[aria-current="page"] {
  background: #000;
  color: #fff;
}
.km-side-n {
  flex: none;
  min-width: 1.4em;
  color: var(--km-faint, #8a8a8a);
  font-variant-numeric: tabular-nums;
}
.km-side a[aria-current="page"] .km-side-n {
  color: rgb(255 255 255 / 0.6);
}

.km-main {
  max-width: 760px;
  min-width: 0;
}
.km-ch-head {
  padding-bottom: 36px;
}
.km-ch-n {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--km-muted);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.km-hi {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 28px;
}
.km-hi .km-kohaku-img {
  flex: none;
  width: 56px;
  height: 56px;
}
.km-hi .km-bubble {
  margin-top: 4px;
}

/* Body text. */
/* :not(:first-child) outranks the lists' own margin: 0. */
.km-body > :not(:first-child) {
  margin-top: 22px;
}
.km-p {
  margin-bottom: 0;
}
.km-h3 {
  margin-top: 56px !important;
  padding-top: 32px;
  border-top: 1px solid var(--km-line);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.km-h3 + * {
  margin-top: 14px;
}

/* Numbered steps. */
.km-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-steps li {
  position: relative;
  display: flex;
  gap: 18px;
  padding-bottom: 22px;
}
.km-steps li:last-child {
  padding-bottom: 0;
}
.km-steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 4px;
  left: 17px;
  width: 2px;
  border-radius: 2px;
  background: var(--km-line);
}
.km-step-n {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.km-steps h3 {
  margin: 4px 0 4px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}
.km-steps p {
  margin: 0;
  color: var(--km-text);
}
.km-steps li > div > p:only-child {
  margin-top: 4px;
}

/* Cards. */
.km-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-cards li {
  padding: 22px;
  border-radius: var(--km-r);
  background: var(--km-soft);
}
.km-cards h3 {
  margin: 16px 0 6px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}
.km-cards p {
  margin: 0;
  color: var(--km-text);
  font-size: 15.5px;
  line-height: 1.7;
}

/* What to ask: a card with the chat bubble you can copy. */
.km-asks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-asks li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--km-line);
  border-radius: var(--km-r);
}
.km-ask-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.km-ask-head h3 {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.4;
}
.km-asks p {
  margin: 10px 0 0;
  color: var(--km-muted);
  font-size: 14.5px;
  line-height: 1.65;
}
.km-chat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  max-width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: 18px 18px 4px 18px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}
.km-chat:hover {
  background: #333;
}
.km-chat-who {
  color: rgb(255 255 255 / 0.55);
  font-size: 11.5px;
}
.km-chat .km-c {
  color: rgb(255 255 255 / 0.7);
  font-size: 12px;
}

/* Copy state inside buttons: "Copy" turns into "Copied" while site.js marks the button. */
.km-c {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.km-c .i {
  width: 14px;
  height: 14px;
}
.km-c-done,
.copied .km-c-idle {
  display: none;
}
.copied .km-c-done {
  display: inline;
}

/* Copy boxes for longer prompts. */
.km-copies {
  display: grid;
  gap: 14px;
}
.km-copy {
  overflow: hidden;
  border: 1px solid var(--km-line);
  border-radius: 18px;
  background: #fff;
}
.km-copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--km-line);
  background: #fafafa;
}
.km-copy-head b {
  color: var(--km-ink);
  font-size: 15px;
  font-weight: 500;
}
.km-copy-btn {
  flex: none;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
.km-copy-btn:hover {
  background: #333;
}
.km-copy-btn.copied {
  background: #17744b;
}
.km-copy-text {
  margin: 0;
  padding: 16px 20px 18px;
  font-size: 15.5px;
  line-height: 1.8;
}

/* Kohaku's tips. */
.km-tip {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px !important;
}
.km-tip .km-kohaku-img {
  flex: none;
  width: 64px;
  height: 64px;
}
.km-tip .km-bubble {
  margin-top: 6px;
  border-color: #ffd9c7;
  background: #fff6f1;
  box-shadow: none;
}
.km-tip .km-bubble::before {
  border-color: #ffd9c7;
  background: #fff6f1;
}
.km-tip-name {
  margin-bottom: 2px !important;
  color: #c2410c;
  font-size: 12.5px;
  font-weight: 600;
}

/* How it works: four steps in a row. */
.km-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.km-flow li {
  position: relative;
  padding: 18px;
  border-radius: 18px;
  background: #ffe9df;
}
.km-flow li.t1 { background: #e3efff; }
.km-flow li.t2 { background: #dcf5e7; }
.km-flow li.t3 { background: #eee8ff; }
.km-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -19px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #9a9a9a;
  border-right: 2px solid #9a9a9a;
  transform: translateY(-50%) rotate(45deg);
}
.km-flow b {
  display: block;
  color: var(--km-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.km-flow span {
  display: block;
  margin-top: 4px;
  color: var(--km-ink-2, #1f1f1f);
  font-size: 14px;
  line-height: 1.55;
}

/* Tables. */
.km-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--km-line);
  border-radius: 18px;
}
.km-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
}
.km-table th,
.km-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--km-line);
  text-align: left;
  vertical-align: top;
}
.km-table tbody tr:last-child th,
.km-table tbody tr:last-child td {
  border-bottom: 0;
}
.km-table thead th {
  background: #fafafa;
  color: var(--km-muted);
  font-size: 13px;
  font-weight: 500;
}
.km-table tbody th {
  color: var(--km-ink);
  font-weight: 500;
}

/* Questions and answers. */
.km-qa {
  border-top: 1px solid var(--km-line);
}
.km-qa details {
  border-bottom: 1px solid var(--km-line);
}
.km-qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  color: var(--km-ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.km-qa summary::-webkit-details-marker {
  display: none;
}
.km-qa summary .i {
  flex: none;
  transition: transform 0.2s;
}
.km-qa details[open] summary .i {
  transform: rotate(180deg);
}
.km-qa details p {
  margin: -4px 0 0;
  padding: 0 2px 20px;
  color: var(--km-text);
}

.km-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Embedded connection guide (unchanged markup from the landing page). */
.km-connect {
  margin-top: 8px;
}

/* Previous / next chapter. */
.km-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 72px;
}
.km-pager a {
  display: block;
  padding: 18px 22px;
  border: 1px solid var(--km-line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s;
}
.km-pager a:hover {
  border-color: #000;
}
.km-pager span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--km-muted);
  font-size: 13.5px;
}
.km-pager strong {
  display: block;
  margin-top: 2px;
  color: var(--km-ink);
  font-size: 18px;
  font-weight: 400;
}
.km-next {
  grid-column: 2;
  text-align: right;
}
.km-flip {
  transform: scaleX(-1);
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .km-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .km-ch-grid {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 40px;
  }
}
@media (max-width: 860px) {
  .km-hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .km-hero-mascot {
    grid-template-columns: auto auto;
    align-items: end;
    justify-content: start;
    justify-items: start;
    gap: 0 12px;
  }
  .km-hero-mascot .km-kohaku-img {
    grid-row: 1;
    grid-column: 1;
    width: 96px;
    height: 96px;
    margin: 0;
  }
  .km-bubble-hero {
    grid-row: 1;
    grid-column: 2;
    max-width: 260px;
    margin: 0 0 30px;
  }
  .km-bubble-hero::before {
    top: auto;
    right: auto;
    bottom: 20px;
    left: -8px;
    border: 0;
    border-bottom: 1px solid var(--km-line);
    border-left: 1px solid var(--km-line);
  }
  .km-hero-mascot figcaption {
    grid-row: 2;
    grid-column: 1;
    justify-self: center;
    margin: 0;
  }
  .km-hero-mascot::before {
    right: auto;
    left: -40px;
  }
  .km-path {
    grid-template-columns: minmax(0, 1fr);
  }
  .km-ch-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  /* The chapter list becomes a scrolling strip under the breadcrumb. */
  .km-side {
    position: static;
    max-height: none;
    margin: -12px -32px 28px;
    overflow: visible;
  }
  .km-side-title {
    display: none;
  }
  .km-side ol {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 2px 32px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .km-side ol::-webkit-scrollbar {
    display: none;
  }
  .km-side a {
    flex: none;
    border: 1px solid var(--km-line);
    border-radius: 999px;
    white-space: nowrap;
  }
  .km-side a[aria-current="page"] {
    border-color: #000;
  }
  .km-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .km-flow li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -17px;
    left: 26px;
    transform: rotate(135deg);
  }
}
@media (max-width: 640px) {
  .km {
    font-size: 16px;
  }
  .km-wrap {
    padding: 0 16px;
  }
  .km-side {
    margin: -12px -16px 24px;
  }
  .km-side ol {
    padding: 2px 16px 6px;
  }
  .km-hero {
    padding: 32px 0 16px;
  }
  .km-lead {
    font-size: 16.5px;
  }
  .km-band {
    padding: 28px 0;
  }
  .km-path-card {
    padding: 20px 20px 56px;
  }
  .km-path-top {
    margin-bottom: 16px;
  }
  .km-tiles,
  .km-cards,
  .km-asks,
  .km-pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .km-tile {
    flex-direction: row;
    gap: 16px;
    padding: 18px;
  }
  .km-tile strong,
  .km-path-card strong {
    font-size: 19px;
  }
  .km-help {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px 22px;
  }
  .km-help .km-kohaku-img {
    width: 72px;
    height: 72px;
  }
  .km-chapter {
    padding-top: 20px;
  }
  .km-h3 {
    font-size: 23px;
  }
  .km-tip .km-kohaku-img {
    width: 52px;
    height: 52px;
  }
  .km-copy-head {
    padding-left: 16px;
  }
  .km-copy-text {
    padding: 14px 16px 16px;
  }
  .km-table th,
  .km-table td {
    padding: 12px 14px;
  }
  .km-next {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .km-path-card,
  .km-tile {
    transition: none;
  }
  .km-path-card:hover,
  .km-tile:hover {
    transform: none;
  }
}

/* Focus rings are for keyboard users. site.js marks html[data-input="pointer"] after a tap or click,
   so no ring stays on a button the visitor just touched (Android Chrome shows one for scripted focus). */
html[data-input="pointer"] :focus,
html[data-input="pointer"] :focus-visible {
  outline: none !important;
}
