/* =====================================================================
   チェンマイの歩き方 — 共通スタイル
   旧サイト（2010年版）の配色と部品を引き継ぎ、スマホでも崩れないようにしたもの.
   ビルド不要のプレーンな CSS.
   ===================================================================== */

:root {
  --bg: #eaf2f5;             /* 外側の水色 */
  --surface: #ffffff;
  --text: #000000;
  --text-muted: #666666;
  --border: #dedede;
  --link: #ff6600;           /* 基本のリンク（オレンジ） */
  --link-side: #339900;      /* サイドバーのリンク（緑） */
  --link-blue: #0066cc;
  --green: #83ae00;          /* h1 の見出し */
  --green-bright: #99cc00;   /* 新着クチコミの帯 */
  --menu-pill: #e8f4d8;
  --menu-pill-hover: #ffffe8;
  --tab: #ffe493;
  --tab-active: #ffcc33;
  --box: #ebf2f9;            /* クチコミの箱 */
  --side: #eaf2f5;           /* サイドバー */
  --side-heading: #eafcff;
  --shell: 990px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, "MS PGothic", sans-serif;
}

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

@media (min-width: 1000px) {
  body {
    background: var(--bg) url("/images/back2010.png") no-repeat left top;
  }
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.blue-link {
  color: var(--link-blue);
}

:focus-visible {
  outline: 2px solid var(--tab-active);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  z-index: 10;
  background: #fff;
  padding: 6px 10px;
}

.empty {
  margin: 10px 0;
  color: var(--text-muted);
}

/* -------------------------------------------------------------- shell */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 5px 15px;
  background: var(--surface);
  border-inline: 1px solid #eaeaea;
}

/* ------------------------------------------------------------- header */

.site-header__intro {
  font-size: 11px;
  margin-bottom: 5px;
}

.site-header__logo {
  display: inline-block;
}

.site-header__logo img {
  display: block;
  width: 250px;
}

@media (max-width: 640px) {
  .site-header__intro {
    display: none;
  }

  .site-header__logo img {
    width: 200px;
    margin-top: 6px;
  }
}

/* --------------------------------------------------------- global nav */

.global-nav {
  margin-top: 12px;
  padding: 6px 12px;
  background: #97df4b url("/images/menuback.jpg");
}

.global-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  display: block;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--menu-pill);
  color: #000;
  font-weight: bold;
  line-height: 20px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  background: var(--menu-pill-hover);
  text-decoration: none;
}

.global-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 2px var(--tab-active);
}

@media (max-width: 640px) {
  .global-nav ul {
    gap: 6px;
  }

  .global-nav a {
    padding: 2px 10px;
    font-size: 13px;
  }
}

/* ------------------------------------------------------------- layout */

.site-main {
  margin: 10px 0;
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.layout__main {
  min-width: 0;
}

@media (min-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

/* ------------------------------------------------------------ headings */

.heading {
  margin: 12px 0 10px;
  padding-left: 5px;
  border-left: 5px solid var(--green);
  color: var(--green);
  font-size: 22px;
  line-height: 1.3;
}

.heading--link a {
  color: var(--link);
}

.big-title {
  margin: 12px 0 10px;
  padding-left: 5px;
  border-left: 5px solid var(--green);
  font-size: 20px;
  font-weight: bold;
}

.sub-heading {
  margin: 18px 0 8px;
  padding-left: 5px;
  border-left: 5px solid #ffc617;
  font-size: 16px;
}

.lead {
  margin-bottom: 10px;
}

.small-link {
  margin-top: 8px;
  font-size: 12px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "›";
  margin-inline: 6px;
}

/* ------------------------------------------------------- category tabs */

.category-tabs {
  margin: 10px 0;
  border-bottom: 4px solid var(--tab-active);
}

.category-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-tabs a {
  display: block;
  padding: 4px 10px;
  background: var(--tab);
  color: #000;
  line-height: 1.3;
}

.category-tabs a:hover,
.category-tabs a[aria-current="page"] {
  background: var(--tab-active);
  text-decoration: none;
}

.category-tabs a[aria-current="page"] {
  font-weight: bold;
}

/* ---------------------------------------------------------------- map */

.guide-map {
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 260px;
  margin: 10px 0;
  border: 1px solid #ccc;
  background: #f5f5f5;
}

.mini-map {
  width: 100%;
  height: 150px;
  margin: 6px 0 2px;
  border: 1px solid #aaa;
  background: #f5f5f5;
}

.maplibregl-popup-content {
  padding: 10px;
}

.map-info {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  max-width: 260px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.5;
}

.map-info img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #aaa;
}

.map-info__category {
  color: var(--text-muted);
}

.map-info__title {
  display: block;
  font-weight: bold;
  font-size: 14px;
  color: var(--link);
}

.map-info__excerpt {
  margin-top: 2px;
}

/* ------------------------------------------------------ top: new list */

.new-list {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.new-list__title {
  padding: 5px 10px 5px 52px;
  background: var(--green-bright) url("/images/label_new.png") no-repeat left center;
  color: #fff;
  font-size: 20px;
}

.new-list__items {
  margin: 10px;
  padding: 0;
  list-style: none;
}

.compact-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--border);
}

.compact-item__image img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  padding: 2px;
  border: 1px solid #aaa;
  background: #fff;
}

.compact-item h3 {
  font-size: 20px;
  line-height: 1.4;
}

.compact-item p {
  margin-top: 5px;
  line-height: 1.4;
}

.compact-item__user {
  font-size: 12px;
}

.new-list__more {
  padding: 4px 12px 8px;
  text-align: right;
}

.new-list__more a {
  padding-left: 24px;
  background: url("/images/arrow_right_blue_round.png") no-repeat left center / 16px;
}

@media (max-width: 640px) {
  .compact-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .compact-item__image img {
    width: 60px;
    height: 60px;
  }

  .compact-item h3 {
    font-size: 17px;
  }
}

/* -------------------------------------------------- city: tips list */

.tips-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tips-list__item {
  margin-bottom: 10px;
}

.tips-list__title {
  font-size: 18px;
}

.city-wiki {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------- place box (list/detail) */

.place-box,
.place-detail {
  margin-bottom: 15px;
  padding: 5px 8px 10px;
  border: 1px solid var(--border);
  background: var(--box);
}

.place-box__title,
.place-detail__title {
  margin-top: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #aaa;
  font-size: 24px;
  line-height: 1.3;
}

.place-detail__title {
  font-size: 30px;
}

.place-box__title > a {
  color: #000;
}

.place-box__sub {
  display: block;
  padding-top: 5px;
  font-size: 12px;
  font-weight: normal;
}

.place-box__sub a {
  color: var(--link-blue);
}

.place-box__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 640px) {
  .place-box__content:has(.place-box__side) {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .place-box__side {
    padding-left: 10px;
    border-left: 1px solid var(--border);
  }
}

.place-box__text,
.place-detail__text {
  line-height: 1.5;
}

.place-detail__text {
  font-size: 15px;
}

.place-box__address {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

.place-box__url {
  margin-top: 6px;
  font-size: 12px;
}

.place-box__map {
  margin-top: 6px;
  font-size: 11px;
}

.place-box__map img {
  display: block;
  margin-bottom: 2px;
  padding: 4px;
  border: 1px solid #aaa;
  background: #fff;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  padding: 2px;
  border: 1px solid #aaa;
  background: #fff;
}

.thumbs--large img {
  width: 150px;
  height: 150px;
}

.place-box__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 15px;
  margin: 10px 0 0;
  padding: 5px 0 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  list-style: none;
}

.place-box__user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.place-box__user img {
  width: 25px;
  height: 25px;
  object-fit: cover;
  padding: 1px;
  border: 1px solid #aaa;
  background: #fff;
}

.place-box__user time {
  margin-left: auto;
}

/* ---------------------------------------------------------- comments */

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  margin-bottom: 10px;
}

.comment__avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  padding: 2px;
  border: 1px solid #aaa;
}

.comment__body {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
}

.comment__meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.back-links {
  margin-top: 15px;
  padding-top: 8px;
  border-top: 1px solid #aaa;
}

.back-links ul {
  margin: 0;
  padding-left: 1.2em;
}

/* ------------------------------------------------------------ sidebar */

.sidebar {
  padding: 5px 5px 10px;
  background: var(--side);
  font-size: 12px;
}

.sidebar a {
  color: var(--link-side);
  text-decoration: underline;
}

.sidebar a:hover {
  text-decoration: none;
}

.sidebar__block {
  padding: 6px 0;
  border-bottom: 1px solid #d5e1e6;
}

.sidebar__block:last-child {
  border-bottom: 0;
}

.sidebar__block h2 {
  margin-bottom: 5px;
  padding-left: 5px;
  background: var(--side-heading);
  font-size: 14px;
}

.sidebar__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar__photos img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  padding: 2px;
  border: 1px solid #aaa;
  background: #fff;
}

.sidebar__clock {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.sidebar__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar__links li {
  padding: 2px 0;
}

/* ------------------------------------------------------------- misc */

.bullet-list {
  margin: 0;
  padding-left: 1.5em;
}

.bullet-list li {
  margin-bottom: 4px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.profile-head__icon {
  width: 60px;
  height: 60px;
  object-fit: cover;
  padding: 2px;
  border: 1px solid #aaa;
}

.profile-head__name {
  font-size: 22px;
}

.profile-head__love {
  margin-top: 4px;
}

.ranking {
  margin: 0;
  padding-left: 1.8em;
}

.ranking li {
  padding: 3px 0;
}

.ranking img {
  width: 25px;
  height: 25px;
  object-fit: cover;
  border: 1px solid #aaa;
}

.ranking__count {
  margin-left: 8px;
  color: var(--text-muted);
}

.prose {
  line-height: 1.7;
}

.prose h2 {
  margin: 15px 0 10px;
  padding-left: 5px;
  border-left: 5px solid #ff79ff;
  color: #ff79ff;
  font-size: 16px;
}

.prose h3 {
  margin: 15px 0 10px;
  padding-left: 5px;
  border-left: 5px solid #ffc617;
  color: #ffc617;
  font-size: 14px;
}

.prose p {
  margin: 0 0 10px;
}

.prose ul,
.prose ol {
  margin: 0 0 10px;
  padding-left: 30px;
}

.error-page {
  padding: 30px 0;
}

/* ---------------------------------------------------------- pagination */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid #aaa;
  background: #fff;
}

.pagination a:hover {
  border-color: #005a84;
  background: #eeeff7;
  text-decoration: none;
}

.pagination span[aria-current="page"] {
  border-color: var(--tab-active);
  background: var(--tab-active);
  font-weight: bold;
}

/* -------------------------------------------------------------- footer */

.site-footer__top {
  margin-top: 10px;
  text-align: right;
  font-size: 11px;
}

.site-footer__box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 10px;
  padding: 15px;
  border-top: 2px solid #aaa;
  background: var(--bg);
  color: #333;
}

.site-footer__box h2 {
  margin-bottom: 4px;
  font-size: 14px;
}

.site-footer__box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__box a {
  color: #0099aa;
}

.site-footer__copy {
  margin: 15px 0 20px;
  text-align: center;
  font-size: 12px;
}

.site-footer__copy p + p {
  margin-top: 6px;
}

/* ---------------------------------------------------------- スマホ調整 */

@media (max-width: 640px) {
  .heading {
    font-size: 19px;
  }

  .new-list__title {
    font-size: 16px;
  }

  .place-box__title {
    font-size: 19px;
  }

  .place-detail__title {
    font-size: 22px;
  }

  .thumbs--large img {
    width: 100px;
    height: 100px;
  }
}

/* ---------------------------------------------------- 古い情報の注意書き */

.notice-box {
  margin: 10px 0 15px;
  padding: 10px 12px;
  border: 1px solid #ffcc33;
  background: #ffffe8;
}

.stale-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------------------------------------------------------- 写真ページ */

.photo-view {
  margin: 10px 0 0;
  padding: 8px;
  border: 1px solid var(--border);
  background: #222;
}

.photo-view__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.photo-view__image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.photo-view__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 64px;
  transform: translateY(-50%);
  border-radius: 6px;
  background: rgb(0 0 0 / 45%);
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.photo-view__nav:hover {
  background: rgb(0 0 0 / 70%);
  text-decoration: none;
}

.photo-view__nav--prev {
  left: 4px;
}

.photo-view__nav--next {
  right: 4px;
}

.photo-view__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  color: #fff;
  font-size: 13px;
}

.photo-view__by a {
  color: #ffcc33;
}

.photo-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
}

.photo-pager > :last-child {
  text-align: right;
}

.thumbs a[aria-current="page"] img {
  border-color: var(--tab-active);
  outline: 2px solid var(--tab-active);
}

/* ---------------------------------------------------------- 手動の広告枠 */

.ad {
  margin: 15px 0;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}

.ad__label {
  display: block;
  font-size: 10px;
  color: #999;
}

.sidebar .ad {
  margin: 6px 0;
}

/* PC 用・スマホ用の出し分け（768px で切り替え） */
@media (max-width: 767px) {
  .ad__unit--pc,
  .ad--pc-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .ad__unit--sp,
  .ad--sp-only {
    display: none !important;
  }
}


/* 広告が後から差し込まれてレイアウトがずれないよう、伸び縮みする枠も高さを先に確保する（固定サイズの枠は ins に幅と高さを指定済み） */
.ad ins.adsbygoogle[data-ad-format] {
  min-height: 100px;
}
