/*
  よすが舎 静的ポータルサイト
  HTML + CSS only / 画像なし / シンプルな言葉 + 淡くカラフルなクレヨン地図風案内所版
*/

:root {
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-soft: #fff7df;
  --ink: #243044;
  --muted: #657184;
  --line: rgba(74, 86, 112, 0.16);
  --accent: #315c8a;
  --accent-soft: #e8f3ff;
  --sky: #dff2ff;
  --lemon: #fff1b8;
  --peach: #ffe1d6;
  --mint: #ddf6ea;
  --lavender: #eee7ff;
  --rose: #ffe7ef;
  --shadow: 0 18px 44px rgba(49, 64, 92, 0.11);
  --shadow-soft: 0 10px 28px rgba(49, 64, 92, 0.08);
  --radius: 22px;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  background:
    radial-gradient(circle at 7% 68%, rgba(255, 177, 122, 0.48), transparent 18rem),
    radial-gradient(circle at 93% 24%, rgba(157, 221, 255, 0.56), transparent 20rem),
    radial-gradient(circle at 82% 84%, rgba(190, 174, 255, 0.42), transparent 18rem),
    radial-gradient(circle at 28% 10%, rgba(255, 235, 155, 0.48), transparent 17rem),
    linear-gradient(180deg, #fffdf8 0%, #f8fbff 58%, #fffaf2 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-header,
main,
.site-footer,
.error-main {
  position: relative;
  z-index: 1;
}

body::before {
  background-image:
    linear-gradient(rgba(49, 92, 138, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 92, 138, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 26%, rgba(255, 151, 115, 0.26) 0 7px, transparent 8px),
    radial-gradient(circle at 74% 18%, rgba(93, 178, 219, 0.22) 0 6px, transparent 7px),
    radial-gradient(circle at 82% 70%, rgba(149, 126, 230, 0.20) 0 7px, transparent 8px),
    radial-gradient(circle at 25% 78%, rgba(102, 197, 151, 0.20) 0 6px, transparent 7px);
  background-size: 34px 34px, 34px 34px, 520px 360px, 620px 420px, 560px 520px, 480px 460px;
  background-position: 0 0, 0 0, 20px 32px, center 22px, right 120px, left 180px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

body::after {
  opacity: 0.72;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20viewBox%3D%220%200%201200%20900%22%3E%20%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%3Cpath%20d%3D%22M-70%20190%20C%20120%20115%20220%20270%20365%20210%20S%20610%20120%20760%20225%20S%20980%20375%201270%20300%22%20stroke%3D%22%23ff9e73%22%20stroke-width%3D%2210%22%20opacity%3D%220.42%22%20stroke-dasharray%3D%223%2022%22/%3E%20%3Cpath%20d%3D%22M75%20765%20C%20250%20650%20345%20760%20510%20640%20S%20735%20465%20935%20520%20S%201065%20420%201230%20455%22%20stroke%3D%22%235db2db%22%20stroke-width%3D%229%22%20opacity%3D%220.38%22%20stroke-dasharray%3D%224%2020%22/%3E%20%3Cpath%20d%3D%22M980%20-60%20C%20880%20110%20760%20135%20700%20270%20S%20680%20560%20520%20690%20S%20315%20800%20150%20950%22%20stroke%3D%22%2370c995%22%20stroke-width%3D%229%22%20opacity%3D%220.34%22%20stroke-dasharray%3D%223%2021%22/%3E%20%3Cpath%20d%3D%22M-80%20520%20C%20120%20440%20220%20500%20340%20430%20S%20535%20310%20690%20350%20S%20880%20480%201015%20385%20S%201120%20270%201280%20260%22%20stroke%3D%22%23bda7ff%22%20stroke-width%3D%228%22%20opacity%3D%220.30%22%20stroke-dasharray%3D%222%2024%22/%3E%20%3Cpath%20d%3D%22M270%20-80%20C%20300%2090%20420%20115%20435%20260%20S%20360%20505%20470%20585%20S%20700%20650%20760%20815%22%20stroke%3D%22%23ffd66b%22%20stroke-width%3D%2211%22%20opacity%3D%220.30%22%20stroke-dasharray%3D%223%2024%22/%3E%20%3C/g%3E%20%3Cg%20opacity%3D%220.40%22%3E%20%3Ccircle%20cx%3D%22365%22%20cy%3D%22210%22%20r%3D%2212%22%20fill%3D%22%23fffdf8%22%20stroke%3D%22%23ff9e73%22%20stroke-width%3D%226%22/%3E%20%3Ccircle%20cx%3D%22760%22%20cy%3D%22225%22%20r%3D%2210%22%20fill%3D%22%23fffdf8%22%20stroke%3D%22%23ffd66b%22%20stroke-width%3D%225%22/%3E%20%3Ccircle%20cx%3D%22935%22%20cy%3D%22520%22%20r%3D%2211%22%20fill%3D%22%23fffdf8%22%20stroke%3D%22%235db2db%22%20stroke-width%3D%225%22/%3E%20%3Ccircle%20cx%3D%22520%22%20cy%3D%22690%22%20r%3D%2210%22%20fill%3D%22%23fffdf8%22%20stroke%3D%22%2370c995%22%20stroke-width%3D%225%22/%3E%20%3Ccircle%20cx%3D%22690%22%20cy%3D%22350%22%20r%3D%2210%22%20fill%3D%22%23fffdf8%22%20stroke%3D%22%23bda7ff%22%20stroke-width%3D%225%22/%3E%20%3C/g%3E%20%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: min(1200px, 140vw) auto;
  background-position: center -48px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 88%, transparent 100%);
}
a {
  color: inherit;
}

a:hover {
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:focus-visible {
  outline: 3px solid #f0be45;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(49, 92, 138, 0.14);
  backdrop-filter: blur(16px);
}

.site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--lemon), var(--peach), var(--mint), var(--lavender));
}

.site-header-inner,
.site-footer-inner,
.section,
.hero-inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd66b, #8bc7ff 50%, #bda7ff);
  box-shadow: 0 0 0 5px rgba(255, 214, 107, 0.17);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--muted);
}

.site-nav a {
  padding: 6px 9px;
  border-radius: 999px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  background: rgba(232, 243, 255, 0.9);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 52px;
  border-bottom: 1px solid rgba(49, 92, 138, 0.12);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

.hero::before {
  width: 230px;
  height: 230px;
  left: max(-120px, calc(50% - 740px));
  top: 122px;
  background: rgba(255, 196, 136, 0.50);
}

.hero::after {
  width: 290px;
  height: 290px;
  right: max(-120px, calc(50% - 720px));
  top: -64px;
  background: rgba(160, 224, 255, 0.56);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  text-align: center;
}

.site-label,
.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.site-label {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  min-height: 30px;
  padding: 2px 14px;
  border: 1px solid rgba(49, 92, 138, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 5.2rem);
  line-height: 1.12;
  letter-spacing: 0.08em;
}

.lead {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.34rem);
  font-weight: 760;
}

.summary {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 18px;
  border: 1px solid rgba(49, 92, 138, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, #315c8a, #5579ae);
  border-color: transparent;
}

.section {
  padding: 64px 0;
}

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

.section-heading h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.35;
}

.section-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(49, 92, 138, 0.12);
}

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

.guide-card,
.info-box,
.news-list,
.error-panel {
  border: 1px solid rgba(49, 92, 138, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.guide-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.guide-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background:
    linear-gradient(90deg, var(--card-color, var(--sky)), rgba(255,255,255,0.30));
}

.guide-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -52px;
  bottom: -48px;
  border-radius: 50%;
  background: var(--card-color, var(--sky));
  opacity: 0.34;
  box-shadow: -34px -18px 0 rgba(255, 255, 255, 0.28);
}

.guide-card:nth-child(1) { --card-color: var(--sky); }
.guide-card:nth-child(2) { --card-color: var(--lemon); }
.guide-card:nth-child(3) { --card-color: var(--lavender); }
.guide-card:nth-child(4) { --card-color: var(--mint); }

.guide-card[href]:hover {
  transform: translateY(-4px);
  border-color: rgba(49, 92, 138, 0.28);
  box-shadow: 0 22px 48px rgba(49, 64, 92, 0.15);
}

.guide-card.is-preparing {
  background: rgba(255, 255, 255, 0.70);
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-tag,
.card-status,
.news-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
  border: 1px solid rgba(49, 92, 138, 0.12);
}

.news-label {
  width: 78px;
  justify-self: center;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(49, 64, 92, 0.08);
}


.gamepad-icon {
  position: relative;
}

.gamepad-body {
  position: relative;
  display: block;
  width: 28px;
  height: 18px;
  border: 3px solid #315c8a;
  border-radius: 10px 10px 12px 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(238, 231, 255, 0.9));
}

.gamepad-body::before,
.gamepad-body::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gamepad-body::before {
  left: 5px;
  width: 8px;
  height: 8px;
  background:
    linear-gradient(#315c8a, #315c8a) center / 8px 2px no-repeat,
    linear-gradient(#315c8a, #315c8a) center / 2px 8px no-repeat;
}

.gamepad-body::after {
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #315c8a;
  box-shadow: 7px 0 0 #315c8a;
}

.guide-card h3,
.guide-card p,
.card-link,
.card-status {
  position: relative;
  z-index: 1;
}

.guide-card h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  line-height: 1.35;
}

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

.card-link,
.card-status {
  margin-top: auto;
  font-weight: 850;
}

.card-link::after {
  content: " →";
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 8px 22px;
}

.news-list li {
  display: grid;
  grid-template-columns: 110px 78px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.news-list li:last-child {
  border-bottom: 0;
}

.news-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-list a {
  color: var(--accent);
  font-weight: 760;
}

.about-box {
  display: grid;
  grid-template-columns: 1fr;
}

.about-box .info-box {
  max-width: 760px;
}

.info-box {
  padding: 24px;
}

.info-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.90), rgba(223, 242, 255, 0.68));
}

.info-box h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.info-box p,
.info-box ul {
  margin: 0;
  color: var(--muted);
}

.info-box ul {
  padding-left: 1.2em;
}

.site-footer {
  margin-top: 32px;
  padding: 34px 0;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(36, 48, 68, 0.98), rgba(49, 92, 138, 0.96));
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  opacity: 0.86;
}

.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.error-main {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.error-panel {
  width: min(100%, 720px);
  padding: 38px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(223, 242, 255, 0.62));
}

.error-code {
  display: block;
  color: var(--accent);
  font-size: clamp(3rem, 14vw, 6rem);
  font-weight: 900;
  line-height: 1;
}

.error-panel h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.45rem, 5vw, 2.2rem);
}

.error-panel p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 920px) {
  .site-header-inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    padding: 52px 0 40px;
  }

  .section {
    padding: 46px 0;
  }

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

  .guide-card {
    min-height: auto;
  }

  .news-list {
    padding: 6px 16px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-nav {
    gap: 8px;
    font-size: 0.9rem;
  }

  .site-nav a {
    padding: 5px 8px;
  }
}

/* 更新：よすが舎トップへの導線 */
.site-nav .nav-home {
  color: var(--accent);
  font-weight: 850;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(49, 92, 138, 0.14);
}

.floating-home {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(49, 92, 138, 0.18);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #315c8a, #5579ae);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(49, 64, 92, 0.22);
  line-height: 1;
}


.floating-home::before {
  content: "⌂";
  margin-right: 5px;
  font-size: 0.95rem;
  line-height: 1;
}

.floating-home::after {
  content: "HOME";
}

.floating-home:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.site-footer-inner {
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  .floating-home {
    right: 12px;
    bottom: 12px;
    min-width: 64px;
    min-height: 40px;
    padding: 7px 12px;
    font-size: 0.78rem;
  }
}


/* note制作記・メンバーシップ */
.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(49, 92, 138, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.note-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--rose), var(--lemon), var(--sky));
}

.note-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -62px;
  bottom: -62px;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.32;
}

.note-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--mint), var(--sky), var(--lavender));
}

.note-card:nth-child(2)::after {
  background: var(--mint);
}


.note-card:hover {
  transform: translateY(-4px);
  border-color: rgba(49, 92, 138, 0.28);
  box-shadow: 0 22px 48px rgba(49, 64, 92, 0.15);
}

.note-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
  border: 1px solid rgba(49, 92, 138, 0.12);
}

.note-card h3,
.note-card p,
.note-card .card-link {
  position: relative;
  z-index: 1;
}

.note-card h3 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  line-height: 1.4;
}

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

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

  .note-card {
    min-height: auto;
  }
}

/* noteカード表示調整：キャッシュ更新後もボタン・ラベルが崩れないように固定 */
.note-card .note-label {
  display: inline-flex;
  align-self: flex-start;
  white-space: nowrap;
}

.note-card .card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 38px;
  margin-top: auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(49, 92, 138, 0.16);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.note-card .card-link::after {
  content: " →";
}
