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

:root {
  --guide-accent: #009D96;
  --guide-accent-dark: #007A75;
  --guide-accent-soft: #E6F7F7;
  --guide-border: #B8DEDB;
  --guide-bg: #E3F2F1;
  --guide-surface: #FFFFFF;
  --guide-text: #173D3C;
  --guide-muted: #557372;
  --guide-shadow: 0 8px 18px rgba(15, 131, 151, 0.14);
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-size: 14px;
  background: var(--guide-bg);
  color: var(--guide-text);
}

#guide-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 12px;
}

#map-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  border: 1px solid rgba(23, 61, 60, 0.16);
  box-shadow: var(--guide-shadow);
}

#map-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

#tab-nav {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: flex-end;
  padding: 0;
  background: none;
}

.tab-btn {
  flex: 1;
  min-height: 56px;
  padding: 14px 10px 12px;
  border: 2px solid #0F8397;
  border-radius: 8px 8px 0 0;
  background: #0F8397;
  cursor: pointer;
  font-size: 12px;
  color: #FFFFFF;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  word-break: break-all;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tab-btn.active {
  background: var(--guide-surface);
  border-bottom-color: var(--guide-surface);
  color: var(--guide-accent-dark);
  font-weight: bold;
  position: relative;
  z-index: 1;
  margin-bottom: -2px;
}

.tab-btn:hover:not(.active) {
  background: #167F91;
}

.tab-btn:focus-visible {
  outline: 2px solid var(--guide-accent-dark);
  outline-offset: -2px;
}

#tab-content {
  background: var(--guide-surface);
  padding: 0;
  border: 2px solid #0F8397;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: var(--guide-shadow);
}

.tab-panel {
  display: none;
  padding: 28px 24px 20px;
  min-height: 240px;
  background: var(--guide-surface);
  line-height: 1.7;
}

.tab-panel.active {
  display: block;
}

.tab-panel p {
  margin-bottom: 10px;
}

.tab-panel ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 10px;
}

.tab-panel ul li {
  padding: 2px 0;
}

.tab-panel ol.steps {
  list-style: decimal;
  padding-left: 1.5em;
  margin-bottom: 10px;
}

.tab-panel ol.steps li {
  padding: 2px 0;
}

.tab-panel a {
  color: var(--guide-accent);
  text-decoration: underline;
}

.tab-panel a:hover {
  opacity: 0.85;
}

.func-section {
  margin-top: 12px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--guide-accent-dark);
}

.note {
  font-size: 12px;
  color: var(--guide-muted);
  margin-top: 4px;
}

/* iOS用注記（全画面ボタン説明内インライン） */
.ios-note {
  font-size: 12px;
  color: var(--guide-muted);
}
.ios-note-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin: 0 2px;
}

.guide-topic-title {
  display: inline-block;
  color: var(--guide-accent);
  font-weight: 700;
  text-decoration: none;
}

.guide-step-heading {
  display: inline-block;
  margin-bottom: 4px;
  padding-left: 0.25em;
  color: #EB7B40;
  font-weight: 700;
  text-decoration: none;
}

.guide-step-item {
  list-style: inherit;
}

.guide-step-item::marker {
  color: #EB7B40;
  font-weight: 700;
}

.guide-step-body {
  margin-left: 0.25em;
}

.guide-feature-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.guide-feature-item {
  display: grid;
  grid-template-columns: clamp(180px, 23vw, 280px) minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
  padding: 4px 0;
}

.guide-feature-label {
  font-weight: 700;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  color: var(--guide-accent-dark);
}

.guide-feature-body {
  min-width: 0;
}

.guide-feature-body br {
  display: block;
  content: "";
  margin-top: 2px;
}

.guide-inline-figure {
  margin: 16px auto 18px;
  max-width: 980px;
  width: 100%;
}

.guide-panel-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.guide-panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 460px);
  gap: 28px;
  align-items: start;
}

.guide-panel-layout--wide-media {
  grid-template-columns: minmax(0, 1fr) clamp(320px, 38vw, 620px);
}

.guide-panel-copy {
  min-width: 0;
}

.guide-panel-media {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-self: start;
  justify-self: end;
  width: 100%;
}

.guide-figure {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.guide-figure--legend img {
  object-fit: contain;
}

#panel-1 .guide-panel-rows > .guide-panel-layout:last-child .func-section > p:not(.section-title),
#panel-1 .guide-panel-rows > .guide-panel-layout:last-child .func-section > ul {
  margin-left: 1.8em;
}

#panel-1 .guide-panel-rows > .guide-panel-layout:last-child .func-section > p > strong,
#panel-1 .guide-panel-rows > .guide-panel-layout:last-child .func-section > ul li > strong {
  font-weight: 400;
}

#panel-2 .guide-panel-rows > .guide-panel-layout:first-child > .guide-panel-copy > .func-section,
#panel-3 .guide-panel-copy > .func-section:first-of-type {
  padding-left: 1.5em;
}

#panel-2 .section-title + ol.steps,
#panel-3 .section-title + ol.steps {
  list-style: decimal;
  padding-left: 1.5em;
  margin-left: 1.8em;
}

#panel-2 .section-title + ol.steps + ul,
#panel-3 .section-title + ol.steps + ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-left: 1.8em;
}

@media (max-width: 480px) {
  #guide-wrapper {
    padding: 10px 10px 16px;
  }

  #map-container {
    aspect-ratio: 5 / 8;
    margin-bottom: 14px;
  }

  #tab-nav {
    gap: 4px;
    padding: 0;
  }

  #tab-content {
    padding: 0;
  }

  .tab-btn {
    font-size: 10px;
    min-height: 44px;
    padding: 8px 4px 7px;
  }

  .tab-panel {
    padding: 10px 12px;
    font-size: 13px;
  }

  .guide-feature-item {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }

  .guide-feature-label {
    white-space: normal;
  }
}

@media (max-width: 960px) {
  .guide-panel-layout,
  .guide-panel-layout--wide-media {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .guide-inline-figure,
  .guide-panel-media {
    max-width: 100%;
  }
}
