*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --text: #20242a;
  --muted: #6d747d;
  --line: #e2e5e9;
  --accent: #1f5eff;
  --accent-dark: #1645bd;
  --accent-soft: #eef3ff;
  --good: #0a7a55;
  --good-bg: #eefaf5;
  --warn: #a26500;
  --warn-bg: #fff8e8;
  --danger: #b13838;
  --danger-bg: #fff1f1;
  --shadow: 0 18px 50px rgba(19, 28, 45, .07);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

code {
  padding: .12em .45em;
  border-radius: 6px;
  background: #eef0f3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  height: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: .02em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.brand__text {
  font-size: 14px;
}

.brand__text strong {
  font-weight: 800;
}

.header-badge,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.pill--ghost {
  color: var(--muted);
  background: #f0f1f3;
}

.layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  max-width: 1520px;
  margin: 0 auto;
}

.sidebar {
  border-right: 1px solid var(--line);
}

.sidebar__inner {
  position: sticky;
  top: 68px;
  padding: 42px 28px;
}

.sidebar__eyebrow,
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.toc {
  display: grid;
  gap: 2px;
}

.toc a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #505761;
  text-decoration: none;
  font-size: 13px;
  transition: .2s ease;
}

.toc a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-note {
  margin-top: 32px;
  padding: 16px;
  border: 1px solid #dbe5ff;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 12px;
}

.sidebar-note p {
  margin: 6px 0 0;
  color: #596273;
}

.main {
  min-width: 0;
  padding: 54px clamp(28px, 5vw, 84px) 80px;
}

.hero {
  padding: clamp(34px, 5vw, 62px);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255,255,255,.18), transparent 32%),
    linear-gradient(135deg, #171b22 0%, #252d3c 58%, #1647c7 100%);
  box-shadow: var(--shadow);
}

.hero__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.hero h1 span {
  color: #9fc0ff;
}

.hero__lead {
  max-width: 780px;
  margin: 28px 0 0;
  color: #dfe5ee;
  font-size: clamp(15px, 1.8vw, 19px);
}

.hero__notice {
  display: flex;
  gap: 14px;
  max-width: 760px;
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.hero__notice p {
  margin: 3px 0 0;
  color: #dfe5ee;
  font-size: 14px;
}

.hero__notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #173b93;
  background: #a9c4ff;
  font-weight: 900;
}

.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 34px;
}

.section-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.flow {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(300px, 1.5fr);
  gap: 18px;
  align-items: center;
  margin: 26px 0;
}

.flow-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.flow-card--master {
  border-color: #bfd0ff;
  background: var(--accent-soft);
}

.flow-card__tag {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.flow-card strong,
.flow-card small {
  display: block;
}

.flow-card small {
  margin-top: 4px;
  color: var(--muted);
}

.flow-arrow {
  color: #99a1ad;
  font-size: 26px;
}

.flow-sites {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.flow-sites div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
}

.callout {
  margin-top: 26px;
  padding: 19px 22px;
  border: 1px solid #d9e1f2;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #f8fbff;
}

.callout p {
  margin: 4px 0 0;
  color: #596273;
}

.callout--good {
  border-color: #cce9dd;
  border-left-color: var(--good);
  background: var(--good-bg);
}

.callout--warn {
  border-color: #f0ddb7;
  border-left-color: var(--warn);
  background: var(--warn-bg);
}

.callout--danger {
  border-color: #efcece;
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  display: flex;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.step__number {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.step h3,
.guide h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: start;
}

.guide-grid--reverse {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}

.check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 24px;
}

.check-list li {
  break-inside: avoid;
  position: relative;
  padding: 5px 0 5px 24px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.screenshot {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(19,28,45,.07);
  text-decoration: none;
}

.screenshot img {
  width: 100%;
  height: auto;
}

.screenshot span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23,27,34,.8);
  font-size: 11px;
  font-weight: 700;
}

.screenshot--wide {
  margin-top: 24px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.site-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.site-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.site-card > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.site-card h3 {
  margin: 7px 0 8px;
}

.site-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.site-card code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.check-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.check-flow__item {
  padding: 20px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.check-flow__item strong,
.check-flow__item span {
  display: block;
}

.check-flow__item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.check-flow__arrow {
  color: #a6acb5;
}

.status-table-wrap {
  margin-top: 26px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.status-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.status-table th,
.status-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.status-table thead th {
  color: #555e69;
  background: #f5f6f8;
  font-size: 12px;
}

.status-table tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status--ok {
  color: var(--good);
  background: var(--good-bg);
}

.status--ng {
  color: var(--danger);
  background: var(--danger-bg);
}

.trouble-steps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: trouble;
}

.trouble-steps li {
  counter-increment: trouble;
  position: relative;
  min-height: 62px;
  margin-bottom: 12px;
  padding: 16px 18px 16px 70px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.trouble-steps li::before {
  content: counter(trouble);
  position: absolute;
  left: 18px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 800;
}

.trouble-steps p {
  margin: 3px 0 0;
  color: var(--muted);
}

.dont-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dont-grid div {
  position: relative;
  padding: 15px 18px 15px 44px;
  border: 1px solid #ead6d6;
  border-radius: 12px;
  background: #fff7f7;
}

.dont-grid div::before {
  content: "×";
  position: absolute;
  left: 17px;
  color: var(--danger);
  font-weight: 900;
}

.final-message {
  margin-top: 36px;
  padding: 34px;
  border-radius: 20px;
  color: #fff;
  text-align: center;
  background: #171b22;
}

.final-message p {
  margin: 0;
  color: #cfd5dd;
}

.final-message strong {
  display: block;
  margin: 9px 0;
  color: #a8c2ff;
  font-size: clamp(22px, 3vw, 34px);
}

.page-footer {
  padding: 36px 0 0;
  color: var(--muted);
}

.page-footer p,
.page-footer small {
  margin: 0;
}

.page-footer p {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .guide-grid,
  .guide-grid--reverse {
    grid-template-columns: 1fr;
  }

  .site-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    height: 60px;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
  }

  .main {
    padding: 22px 16px 60px;
  }

  .hero {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .hero__meta {
    margin-bottom: 20px;
  }

  .hero__notice {
    align-items: flex-start;
  }

  .section {
    padding: 56px 0;
    scroll-margin-top: 70px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-no {
    width: 38px;
    height: 38px;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .flow-sites {
    grid-template-columns: 1fr 1fr;
  }

  .check-list {
    columns: 1;
  }

  .check-flow {
    grid-template-columns: 1fr;
  }

  .check-flow__arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .dont-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .sidebar,
  .screenshot span {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .layout {
    display: block;
  }

  .main {
    padding: 0;
  }

  .hero {
    color: #000;
    background: #fff;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .hero h1 span,
  .hero__lead,
  .hero__notice p {
    color: #333;
  }

  .section,
  .step,
  .site-card,
  .screenshot,
  .callout,
  .status-table-wrap {
    break-inside: avoid;
    box-shadow: none;
  }
}


/* =========================================================
   v2 usability refinements
   - compact hero
   - readable content width
   - current section highlight with CSS only
   - mobile/tablet horizontal contents navigation
   - clearer "Update" action
   ========================================================= */

.mobile-toc {
  display: none;
}

/* Keep the reading line length comfortable on very wide screens. */
.main > .hero,
.main > .section,
.main > .back-top,
.main > .page-footer {
  width: min(100%, 1120px);
  margin-inline: auto;
}

/* Slightly more compact first view so the next section enters the viewport sooner. */
.hero {
  padding: clamp(30px, 4vw, 50px);
  border-radius: 22px;
}

.hero__meta {
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.06;
}

.hero__lead {
  margin-top: 22px;
  font-size: clamp(15px, 1.45vw, 18px);
}

.hero__notice {
  margin-top: 24px;
  padding: 16px 18px;
}

/* Sections become a little denser without feeling cramped. */
.section {
  padding: 68px 0;
}

.section-heading {
  margin-bottom: 30px;
}

/* Make screenshots feel clickable without adding animation noise. */
.screenshot {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.screenshot:hover {
  border-color: #c8d5fa;
  box-shadow: 0 18px 45px rgba(19,28,45,.10);
  transform: translateY(-2px);
}

/* Most important UI action in the whole manual. */
.update-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 10px 9px 14px;
  border: 1px solid #d9e2f8;
  border-radius: 10px;
  background: #f7f9ff;
}

.update-action__label {
  color: #5f6876;
  font-size: 12px;
  font-weight: 700;
}

.wp-update-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 36px;
  padding: 7px 18px;
  border-radius: 4px;
  color: #fff;
  background: #3858e9;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
  font-size: 13px;
  font-weight: 700;
}

/* Current location indicator: HTML/CSS only, using :target + :has(). */
body:not(:has(.section:target)) .toc a[href="#overview"],
body:has(#overview:target) .toc a[href="#overview"],
body:has(#quick:target) .toc a[href="#quick"],
body:has(#basic:target) .toc a[href="#basic"],
body:has(#officers:target) .toc a[href="#officers"],
body:has(#locations:target) .toc a[href="#locations"],
body:has(#business:target) .toc a[href="#business"],
body:has(#legal:target) .toc a[href="#legal"],
body:has(#destinations:target) .toc a[href="#destinations"],
body:has(#check:target) .toc a[href="#check"],
body:has(#trouble:target) .toc a[href="#trouble"],
body:has(#dont-touch:target) .toc a[href="#dont-touch"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.section:target .section-no {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.section:target .section-heading h2 {
  text-decoration: underline;
  text-decoration-color: #dbe5ff;
  text-decoration-thickness: 7px;
  text-underline-offset: 4px;
}

/* Small utility link at the end. */
.back-top {
  padding-top: 34px;
  text-align: right;
}

.back-top a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.back-top a:hover {
  color: var(--accent);
}

/* Tablet/mobile: keep navigation available instead of hiding it completely. */
@media (max-width: 1050px) {
  .mobile-toc {
    position: sticky;
    top: 60px;
    z-index: 90;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
  }

  .mobile-toc::-webkit-scrollbar {
    display: none;
  }

  .mobile-toc a {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #59616c;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
  }

  body:not(:has(.section:target)) .mobile-toc a[href="#overview"],
  body:has(#overview:target) .mobile-toc a[href="#overview"],
  body:has(#quick:target) .mobile-toc a[href="#quick"],
  body:has(#basic:target) .mobile-toc a[href="#basic"],
  body:has(#officers:target) .mobile-toc a[href="#officers"],
  body:has(#locations:target) .mobile-toc a[href="#locations"],
  body:has(#business:target) .mobile-toc a[href="#business"],
  body:has(#legal:target) .mobile-toc a[href="#legal"],
  body:has(#destinations:target) .mobile-toc a[href="#destinations"],
  body:has(#check:target) .mobile-toc a[href="#check"],
  body:has(#trouble:target) .mobile-toc a[href="#trouble"],
  body:has(#dont-touch:target) .mobile-toc a[href="#dont-touch"] {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
  }

  .main {
    padding-top: 34px;
  }

  .section {
    scroll-margin-top: 112px;
  }
}

@media (max-width: 700px) {
  .mobile-toc {
    top: 60px;
  }

  .hero {
    padding: 26px 20px;
  }

  .hero h1 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .section {
    padding: 50px 0;
  }

  .update-action {
    width: 100%;
    justify-content: space-between;
  }
}

@media print {
  .mobile-toc,
  .back-top,
  .update-action {
    display: none !important;
  }
}


/* =========================================================
   v3 readability refinements
   - larger body copy
   - stronger contrast
   - easier-to-scan sidebar
   - more comfortable spacing
   ========================================================= */

:root {
  --text: #171b22;
  --muted: #505864;
}

/* Base text: a little larger and darker. */
body {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text);
}

/* Paragraphs should not feel faint. */
.section p,
.guide p,
.step p,
.site-card p,
.trouble-steps p,
.callout p {
  color: #4d5662;
}

/* Sidebar: increase size and contrast. */
.sidebar__eyebrow,
.eyebrow {
  font-size: 12px;
}

.toc a {
  padding: 9px 11px;
  color: #424a55;
  font-size: 14px;
  line-height: 1.55;
}

.sidebar-note {
  font-size: 13.5px;
  line-height: 1.75;
}

.sidebar-note p {
  color: #4f5967;
}

/* Main section copy. */
.section h3,
.guide h3,
.step h3 {
  font-size: 18px;
}

.section > p,
.guide-grid > div > p {
  font-size: 16.5px;
}

/* Lists are important operational instructions: make them easy to scan. */
.check-list li {
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 16px;
  line-height: 1.65;
}

/* Callouts should read like key operational notes, not captions. */
.callout {
  padding: 21px 23px;
}

.callout strong {
  font-size: 16.5px;
}

.callout p {
  margin-top: 6px;
  font-size: 15.5px;
  line-height: 1.8;
}

/* Steps: slightly more emphasis. */
.step {
  padding: 24px;
}

.step p {
  font-size: 15.5px;
}

/* Site cards and table text. */
.site-card p {
  font-size: 15px;
}

.status-table th,
.status-table td {
  padding: 15px 17px;
  font-size: 14.5px;
}

/* Small helper text can stay secondary, but not too pale. */
.muted {
  color: #626b77;
  font-size: 14px;
}

.site-card code,
code {
  font-size: .94em;
}

/* Slightly stronger image caption button. */
.screenshot span {
  font-size: 12px;
}

/* Mobile readability. */
@media (max-width: 700px) {
  body {
    font-size: 16px;
    line-height: 1.85;
  }

  .toc a,
  .mobile-toc a {
    font-size: 12px;
  }

  .section > p,
  .guide-grid > div > p,
  .check-list li {
    font-size: 16px;
  }
}
