@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/space-mono-400-subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/space-mono-700-subset.woff2') format('woff2');
}

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

html {
  font-size: 16px;
  color-scheme: light dark;
  scroll-behavior: smooth;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #fafafa;
  --bg2: #efeff1;
  --surface: #ffffff;
  --ink: #17171a;
  --ink2: #5b5b63;
  --dim: #9a9aa3;
  --accent: #e8542f;
  --line: rgba(23, 23, 26, 0.08);
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.05), 0 2px 10px rgba(23, 23, 26, 0.05);
  --shadow-md: 0 4px 14px rgba(23, 23, 26, 0.09), 0 14px 36px rgba(23, 23, 26, 0.12);
  --toc-bg: rgba(250, 250, 250, 0.82);
  --font-sans: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN',
    'Hiragino Sans', 'Noto Sans JP', Meiryo, system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101013;
    --bg2: #1e1e23;
    --surface: #17171c;
    --ink: #f5f5f7;
    --ink2: #a8a8b3;
    --dim: #6b6b76;
    --accent: #ff8b66;
    --line: rgba(245, 245, 247, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.45);
    --toc-bg: rgba(16, 16, 19, 0.82);
  }
}

:root[data-theme="dark"] {
  --bg: #101013;
  --bg2: #1e1e23;
  --surface: #17171c;
  --ink: #f5f5f7;
  --ink2: #a8a8b3;
  --dim: #6b6b76;
  --accent: #ff8b66;
  --line: rgba(245, 245, 247, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.45);
  --toc-bg: rgba(16, 16, 19, 0.82);
}

.r-root {
  container-type: inline-size;
  container-name: r;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 1rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 6px;
  border-radius: 999px;
  border: 0;
  background: var(--bg2);
  color: var(--ink2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
}
.theme-toggle:hover {
  color: var(--ink);
  transform: translateY(-1px);
}
.theme-toggle-icon {
  grid-area: 1 / 1;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-toggle-icon-dark {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle-icon-dark {
  opacity: 1;
  transform: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
  }
  :root:not([data-theme="light"]) .theme-toggle-icon-dark {
    opacity: 1;
    transform: none;
  }
}

.r-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 72px;
  flex: 1;
}

.r-hero {
  margin-bottom: 40px;
  max-width: 62rem;
}
.r-hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.r-hero-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}
.r-hero-actions button {
  position: relative;
}
.r-hero-actions button:active {
  transform: scale(0.92);
}
.r-hero-actions button::after {
  content: attr(aria-label);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink2);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.r-hero-actions button:hover::after,
.r-hero-actions button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.r-title {
  font-size: 50px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.r-map-trigger {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 6px;
  color: var(--ink2);
  background: var(--bg2);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.r-map-trigger:hover,
.r-map-trigger:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
}
.r-lede {
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.7;
  max-width: 44rem;
}
.r-nowrap {
  white-space: nowrap;
}

.r-toc {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: var(--toc-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.r-toc-main {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.r-toc-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.r-toc-tabs::-webkit-scrollbar {
  display: none;
}
.r-toc-tabs-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 32px),
    transparent
  );
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.r-toc-tabs-fade-left {
  -webkit-mask-image: linear-gradient(
    to left,
    #000 calc(100% - 32px),
    transparent
  );
  mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent);
}
.r-toc-tabs-fade-left.r-toc-tabs-fade-right {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 32px,
    #000 calc(100% - 32px),
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 32px,
    #000 calc(100% - 32px),
    transparent
  );
}
.r-toc-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  background: transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  border: 0;
  line-height: 1.4;
  cursor: pointer;
  font-family: inherit;
}
.r-toc-tab:hover {
  background: var(--bg2);
  color: var(--ink);
}
.r-toc-tab-on,
.r-toc-tab-on:hover {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.r-toc-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.r-toc-tab-off {
  opacity: 0.35;
  pointer-events: none;
}

.r-toc-controls {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  justify-content: flex-end;
}
.r-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg2);
  border-radius: 999px;
}
.r-seg-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.r-seg-btn:hover {
  color: var(--ink);
}
.r-seg-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.r-seg-btn-on,
.r-seg-btn-on:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.r-modal-open {
  overflow: hidden;
}
.r-map-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  min-height: 100dvh;
}
.r-map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 10, 0.72);
  border: 0;
  cursor: pointer;
}
.r-map-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  height: min(780px, calc(100vh - 56px));
  height: min(780px, calc(100dvh - 56px));
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}
.r-map-modal-close {
  display: grid;
  place-items: center;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  color: var(--ink2);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.r-map-modal-close:hover,
.r-map-modal-close:focus-visible {
  color: var(--ink);
  transform: scale(1.06);
}
.r-map-modal-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
}
.r-map-modal-panel .map-layout {
  width: 100%;
  height: 100%;
  max-height: none;
}
.r-map-modal-panel .map-canvas {
  height: 100%;
}
.r-map-modal-panel .map-sidebar {
  height: 100%;
}

.r-area {
  margin-bottom: 52px;
  scroll-margin-top: 72px;
}
.r-area-name {
  font-size: 27px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.r-cat {
  margin-bottom: 28px;
  scroll-margin-top: 72px;
}
.r-cat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.r-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 20px;
}

.r-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}
.r-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.r-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg2);
  position: relative;
  display: grid;
  place-items: center;
}
.r-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.r-card:hover .r-card-img img {
  transform: scale(1.03);
}
.r-card-placeholder {
  font-size: 42px;
  font-weight: 700;
  color: var(--dim);
  opacity: 0.5;
  font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', serif;
}
.r-card--todo .r-card-img::after {
  content: '未訪問';
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.r-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px 15px;
}
.r-card-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-card--todo .r-card-name {
  color: var(--ink2);
}
.r-card-foot {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}
.r-link::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink2);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 2px);
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.r-link:hover::after,
.r-link:focus::after,
.r-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.r-link {
  display: grid;
  place-items: center;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg2);
  color: var(--ink2);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.r-link:hover {
  background: var(--ink);
  color: var(--bg);
}
.r-link svg {
  display: block;
}
.r-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 72px;
  flex: 1;
}
.page-header {
  margin-bottom: 32px;
}
.page-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 16px;
}
.page-description {
  max-width: 42rem;
  color: var(--ink2);
  font-size: 15px;
  line-height: 1.6;
}
.toc-filter-btn {
  flex-shrink: 0;
  padding: 4px 11px;
  font-size: 12px;
  color: var(--ink2);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.toc-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.map-page {
  overflow: hidden;
  min-height: 100vh;
}
.map-container {
  max-width: none;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  padding: 0;
}
.map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 52fr) minmax(0, 48fr);
  flex: 1;
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  box-shadow: none;
}
.map-canvas {
  height: 100%;
  min-height: 0;
  background: var(--bg2);
}
.map-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.map-sidebar-header {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.map-search-label {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.map-search {
  width: 100%;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--bg2);
  border: 0;
  border-radius: 12px;
  font: inherit;
}
.map-search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.map-visit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.map-status {
  padding: 11px 14px;
  color: var(--dim);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.map-place-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  list-style: none;
}
.map-place-item + .map-place-item {
  border-top: 1px solid var(--line);
}
.map-place-button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 11px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.map-place-button:hover,
.map-place-button:focus-visible {
  background: var(--bg2);
}
.map-place-button span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.map-place-button small {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.35;
}
.map-info-window {
  max-width: 15rem;
  color: #111113;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN',
    'Hiragino Sans', 'Noto Sans JP', Meiryo, system-ui, sans-serif;
}
.map-info-window h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}
.map-info-window p {
  margin: 0 0 8px;
  color: #55555b;
  font-size: 12px;
}
.map-info-links {
  display: flex;
  gap: 8px;
}
.map-info-links a {
  color: #c2361f;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.gm-style .gm-style-iw-c {
  padding: 14px 16px !important;
}
.gm-style .gm-style-iw-d {
  overflow: auto !important;
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

@container r (max-width: 940px) {
  .r-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@container r (max-width: 640px) {
  .r-inner {
    padding: 28px 12px 48px;
  }
  .r-hero-title-row {
    gap: 12px;
  }
  .r-title {
    font-size: 34px;
    min-width: 0;
  }
  .r-map-trigger {
    width: 40px;
    height: 40px;
    margin-top: 0;
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
    margin-top: 0;
  }
  .r-area-name {
    font-size: 22px;
  }
  .r-toc-main {
    gap: 8px;
  }
  .r-toc-tab {
    padding: 5px 11px;
    font-size: 13px;
  }
  .r-seg-btn {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .r-map-modal {
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .r-map-modal-panel {
    height: calc(100vh - 24px);
    height: calc(
      100dvh - max(12px, env(safe-area-inset-top)) -
        max(12px, env(safe-area-inset-bottom))
    );
  }
  .r-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .r-card-img {
    aspect-ratio: 16 / 10;
  }
  .r-card-name {
    font-size: 14px;
  }
  .container {
    padding: 28px 12px 48px;
  }
  .page-title {
    font-size: 34px;
  }
  .map-header {
    flex-direction: column;
  }
}
@container r (max-width: 360px) {
  .r-title {
    font-size: 28px;
  }
}

@media (min-width: 900px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
    grid-template-rows: minmax(0, 1fr);
  }
  .map-canvas {
    height: 100%;
    min-height: 0;
  }
  .map-sidebar {
    height: 100%;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .r-map-modal-panel .map-canvas,
  .r-map-modal-panel .map-sidebar {
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
