/* ==========================================
   ピアステーション・シリウス  共通スタイル
   ========================================== */

/* ---- デザイントークン ---- */
:root {
  --bg: #fbf8f2;          /* 生成り */
  --surface: #ffffff;
  --surface-alt: #f3ede2; /* 木の明るい色 */
  --text: #2b2a33;
  --muted: #6b6774;
  --line: #e7e0d3;

  --navy: #1f2b4d;        /* 夜空 */
  --navy-soft: #2e3d66;
  --star: #e8a33d;        /* 星の金色 */
  --star-soft: #fbefd9;
  --green: #5b8a6a;       /* 窓の外の緑 */

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 43, 77, .04), 0 8px 24px rgba(31, 43, 77, .06);

  --font-body: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-head: "Zen Maru Gothic", var(--font-body);
}

/* ---- ベース ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
}

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

a { color: var(--navy-soft); text-underline-offset: 3px; }
a:hover { color: var(--star); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; border-radius: 4px; }

.container {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-200%);
  padding: 6px 12px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { transform: none; }

/* ---- ヘッダー ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
}
.brand:hover { color: var(--navy); }

.brand-mark { width: 36px; height: 36px; flex: none; }

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
}
.brand-name small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .08em;
}

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

.nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-alt); color: var(--navy); }
.nav a[aria-current="page"] { background: var(--navy); color: #fff; }

@media (max-width: 760px) {
  html { scroll-padding-top: 120px; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 8px; padding-block: 10px 8px; }
  .nav ul { justify-content: space-between; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 6px 8px; font-size: 13.5px; letter-spacing: 0; }
}

/* ---- ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--star); color: var(--navy); }
.btn-primary:hover { background: #f0b55a; color: var(--navy); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { color: inherit; background: rgba(255, 255, 255, .12); }

/* ---- ヒーロー（トップ） ---- */
.hero {
  position: relative;
  color: #fff;
  background: var(--navy);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(31, 43, 77, .92) 0%, rgba(31, 43, 77, .55) 60%, rgba(31, 43, 77, .2) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 12vw, 140px);
  max-width: 640px;
  margin-left: max(16px, (100% - 1080px) / 2);
  margin-right: 16px;
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--star);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
}
.hero h1 {
  color: #fff;
  font-size: clamp(28px, 5vw, 46px);
  margin-bottom: 20px;
}
.hero p { font-size: clamp(15px, 1.8vw, 17px); opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- ページ見出し（下層） ---- */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding-block: 56px 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  /* 星空のドット */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 28% 70%, rgba(255,255,255,.5), transparent),
    radial-gradient(2px 2px at 64% 22%, rgba(232,163,61,.9), transparent),
    radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 92% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 46% 85%, rgba(255,255,255,.4), transparent);
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--star); font-size: 14px; font-weight: 700; letter-spacing: .12em; margin-bottom: 8px; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4.5vw, 40px); }
.page-hero .lead { margin-top: 12px; opacity: .9; max-width: 40em; }

/* ---- セクション ---- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-alt { background: var(--surface-alt); }

.section-head { margin-bottom: 36px; }
.section-head .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--star);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 6px;
}
.section-head .eyebrow::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); }
.section-head p { margin-top: 12px; color: var(--muted); max-width: 40em; }

/* ---- 拠点カード ---- */
.base-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.base-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.base-card:hover { color: inherit; transform: translateY(-4px); box-shadow: 0 2px 4px rgba(31,43,77,.06), 0 16px 40px rgba(31,43,77,.12); }
.base-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.base-card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.base-card .area { color: var(--green); font-size: 13px; font-weight: 700; }
.base-card h3 { font-size: 24px; margin: 2px 0 10px; }
.base-card p { color: var(--muted); font-size: 15px; }
.base-card .more { margin-top: auto; padding-top: 16px; color: var(--navy-soft); font-weight: 700; font-size: 15px; }
.base-card:hover .more { color: var(--star); }

@media (max-width: 760px) {
  .base-cards { grid-template-columns: 1fr; }
}

/* ---- 特徴（アイコン付きリスト） ---- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--star-soft);
  color: var(--star);
  margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

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

/* ---- 2カラム（本文＋情報） ---- */
.split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.prose h2 { font-size: 24px; margin-bottom: 16px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose .tagline {
  font-family: var(--font-head);
  color: var(--green);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
}

/* ---- 情報カード ---- */
.info-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.info-card h2, .info-card h3 { font-size: 19px; margin-bottom: 8px; }

.info-list { margin: 0; }
.info-list div {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); font-size: 14px; font-weight: 700; }
.info-list dd { margin: 0; }
.info-list .sub { display: block; color: var(--muted); font-size: 13px; }
.info-list a[href^="tel"] { font-weight: 700; color: var(--navy); text-decoration: none; }

@media (max-width: 480px) {
  .info-list div { grid-template-columns: 1fr; gap: 2px; }
}

.map-link { display: inline-block; margin-top: 4px; font-size: 14px; }

/* ---- タイムライン風の活動リスト ---- */
.activities { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.activities li {
  position: relative;
  padding: 20px 24px 20px 64px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.activities li::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  width: 22px;
  height: 22px;
  background: var(--star);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.activities h3 { font-size: 18px; margin-bottom: 4px; }
.activities p { color: var(--muted); font-size: 15px; }

/* ---- ギャラリー ---- */
/* 3枚以上：1枚目を大きく、残りは3列で何枚でも並ぶ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 16px;
  margin: 0;
}
.gallery-n1 { grid-template-columns: 1fr; }
.gallery-n2 { grid-template-columns: 1fr 1fr; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.gallery-nmany figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-link { display: block; height: 100%; cursor: zoom-in; }
.gallery picture { display: block; height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .3s; }
.gallery-link:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(31, 43, 77, .78);
  color: #fff;
  font-size: 13px;
}
@media (max-width: 640px) {
  .gallery, .gallery-n2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-n1 { grid-template-columns: 1fr; }
  .gallery-nmany figure:first-child { grid-column: span 2; grid-row: auto; }
  .gallery figcaption { left: 8px; bottom: 8px; font-size: 12px; padding: 2px 10px; }
}

/* 写真の拡大表示 */
.lightbox {
  max-width: min(1200px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: #111;
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 14, 28, .85); }
.lightbox img { max-width: 100%; max-height: calc(92vh - 48px); margin-inline: auto; object-fit: contain; }
.lightbox-caption { margin: 0; padding: 10px 16px; font-size: 14px; text-align: center; }
.lightbox-caption:empty { display: none; }
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* ---- お知らせ ---- */
.news { margin: 0; padding: 0; list-style: none; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.news li { display: flex; gap: 24px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news time { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.news .empty { color: var(--muted); }
@media (max-width: 560px) {
  .news li { flex-direction: column; gap: 2px; padding: 16px 20px; }
}

/* ---- ダウンロードリンク ---- */
.doc-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.doc-link:hover { color: inherit; box-shadow: 0 2px 4px rgba(31,43,77,.06), 0 12px 32px rgba(31,43,77,.1); }
.doc-link .doc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--star-soft);
  color: var(--star);
}
.doc-link strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 18px; }
.doc-link span { color: var(--muted); font-size: 14px; }

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.doc-grid a::after { content: "PDF"; font-size: 11px; font-weight: 700; color: var(--star); }
.doc-grid a:hover { border-color: var(--star); }

/* ---- お問い合わせ帯 ---- */
.contact-band {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 40px;
  align-items: center;
}
.contact-band h2 { color: #fff; font-size: clamp(22px, 3vw, 28px); margin-bottom: 8px; }
.contact-band p { opacity: .85; }
.contact-tel {
  display: block;
  color: var(--star);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  text-decoration: none;
  white-space: nowrap;
}
.contact-tel:hover { color: #f0b55a; }
.contact-band .sub { display: block; font-size: 13px; opacity: .75; }
@media (max-width: 760px) {
  .contact-band { grid-template-columns: 1fr; }
}

/* ---- フッター ---- */
.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 40px 32px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.footer-inner .brand { margin-bottom: 8px; }
.footer-inner address { font-style: normal; line-height: 1.8; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--star); }
.copyright { margin-top: 32px; font-size: 12px; }

.section + .site-footer, .section-alt + .site-footer { margin-top: 0; }

/* ---- 小さなユーティリティ ---- */
.note-text { margin-top: 24px; color: var(--muted); font-size: 15px; }
.block-gap { margin-top: 32px; }
.block-gap-sm { margin-bottom: 24px; }
.narrow { max-width: 760px; }
.more-link { margin-top: 16px; text-align: right; font-size: 15px; }
.news a { color: var(--text); text-decoration: none; }
.news a:hover { color: var(--star); text-decoration: underline; }

.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---- お知らせ記事 ---- */
.post-date { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.post-body img { border-radius: var(--radius-sm); margin-block: 16px; }

/* ---- トップ：お知らせ＋たより ---- */
.news-tayori {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .news-tayori { grid-template-columns: 1fr; gap: 56px; }
}

.tayori-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.tayori-card:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31,43,77,.06), 0 16px 40px rgba(31,43,77,.12); }
.tayori-card picture,
.tayori-card picture img,
.tayori-cover {
  flex: none;
  width: 120px;
  aspect-ratio: 210 / 297;
  border-radius: 6px;
  background: var(--surface-alt);
  box-shadow: 0 2px 8px rgba(31, 43, 77, .15);
  overflow: hidden;
  object-fit: cover;
}
.tayori-cover canvas { width: 100%; height: 100%; object-fit: cover; }
.tayori-card-body { display: flex; flex-direction: column; gap: 4px; }
.tayori-card-body strong { font-family: var(--font-head); color: var(--navy); font-size: 18px; line-height: 1.5; }
.tayori-card-body span { color: var(--muted); font-size: 14px; }
.tayori-card-body .more { margin-top: 8px; color: var(--navy-soft); font-weight: 700; }

/* ---- PDFビューア ---- */
.pdf-viewer {
  background: #e9e5dd;
  border-radius: var(--radius);
  padding: 0 clamp(8px, 3vw, 32px) clamp(8px, 3vw, 32px);
}
.pdf-toolbar {
  position: sticky;
  top: 61px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-inline: calc(-1 * clamp(8px, 3vw, 32px));
  margin-bottom: clamp(8px, 3vw, 24px);
  padding: 12px clamp(12px, 3vw, 32px);
  background: rgba(233, 229, 221, .95);
  backdrop-filter: blur(6px);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 14px;
}
.pdf-status { color: var(--muted); }
.pdf-actions { display: flex; gap: 16px; }
.pdf-actions a { font-weight: 700; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 2vw, 20px); }
.pdf-page {
  width: 100%;
  max-width: 820px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.pdf-page.is-landscape { max-width: 1040px; }
.pdf-page:not(.is-loaded) { background: #fff linear-gradient(90deg, #fff, #f3f0ea, #fff) 0 0 / 200% 100%; animation: pdf-loading 1.4s infinite linear; }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.pdf-fallback { padding: 24px; text-align: center; }
@keyframes pdf-loading { to { background-position: -200% 0; } }
@media (max-width: 760px) {
  .pdf-toolbar { top: 98px; }
}
