/* =========================================================
   羽子板アレンジ作品集  ―  デザイン
   色を変えたいときは、下の :root の色コードだけ変えればOK
   ========================================================= */
:root {
  --ivory: #FAF7F2;
  --card: #FFFFFF;
  --pink: #D8B5BC;
  --rose: #B98996;
  --gold: #B79A6A;
  --ink: #51443F;
  --ink-soft: #7a6c66;
  --line: rgba(183, 154, 106, .45);

  --mincho: "Shippori Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;

  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .04em;
  line-break: strict;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.sp { display: inline; }
@media (min-width: 600px) { .sp { display: none; } }

/* ---------- ① ヘッダー ---------- */
.hero {
  text-align: center;
  padding: 56px var(--gutter) 20px;
}
.hero-en {
  font-family: var(--mincho);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.7;
  letter-spacing: .14em;
  margin: 0;
}
.mizuhiki { width: 120px; height: 16px; margin: 22px auto 0; color: var(--gold); display: block; }
@media (min-width: 768px) {
  .hero { padding-top: 88px; }
  .hero-title { font-size: 34px; }
  .hero-title br { display: none; }
}

/* ---------- ② ごあいさつ ---------- */
.intro {
  text-align: center;
  padding: 8px var(--gutter) 36px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- ③ ギャラリー ---------- */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter) 24px;
}
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* スマホ：2列 */
  gap: 14px;
}
@media (min-width: 600px)  { .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }  /* タブレット：3列 */
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 24px; } }  /* パソコン：4列 */

.work {
  display: block;
  width: 100%;
  padding: 10px;                 /* 写真のまわりの余白 */
  border: 0;
  background: var(--card);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(81, 68, 63, .06), 0 4px 16px rgba(81, 68, 63, .04);
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  .work:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(81, 68, 63, .06), 0 10px 24px rgba(81, 68, 63, .07); }
}
.work-frame {
  aspect-ratio: 3 / 4;           /* 枠の形をそろえて、写真が増えてもガタガタしない */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FCFAF7;
}
.work-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* トリミングせず、羽子板全体を表示 */
  opacity: 0;
  transition: opacity .4s ease;
}
.work-frame img.is-loaded { opacity: 1; }
.work-title {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.gallery-count {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 24px;
}
.more-wrap { text-align: center; margin-top: 14px; }
.btn-more {
  appearance: none;
  font: inherit;
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 36px;
  min-height: 48px;
  cursor: pointer;
}
.btn-more:hover { background: #fff; }

/* ---------- ④ レッスンへのご案内 ---------- */
.lesson {
  text-align: center;
  margin: 48px var(--gutter) 0;
  padding: 48px 20px 52px;
  border-top: 1px solid var(--line);
}
.lesson p { margin-bottom: 1em; }
.lesson-lead {
  font-family: var(--mincho);
  font-size: 20px;
  line-height: 1.8;
  letter-spacing: .1em;
  margin-bottom: 1.4em !important;
}
.heart { color: var(--rose); }
.lesson-btns {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .08em;
  line-height: 1.5;
  text-decoration: none;
  transition: opacity .2s ease, background .2s ease;
}
.btn-outline { border: 1px solid var(--rose); color: var(--rose); background: #fff; }
.btn-fill { background: var(--rose); color: #fff; }
.btn:hover { opacity: .85; }
@media (min-width: 768px) {
  .lesson-lead { font-size: 23px; }
}

/* ---------- ⑤ フッター ---------- */
.footer {
  text-align: center;
  padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom));
  background: #F3EDE6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font-size: 13px;
}
.footer-links a { text-decoration: none; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.copy { margin-top: 20px; font-size: 11px; color: var(--ink-soft); }

/* ---------- 拡大表示 ---------- */
.viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(32, 26, 24, .94);
  color: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
}
.viewer::backdrop { background: rgba(32, 26, 24, .94); }
.viewer[open] { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.viewer-stage {
  position: absolute;
  inset: 0;
  bottom: 72px;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.viewer-track {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.viewer-slide {
  position: absolute;
  top: 0; bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 12px 8px;
}
.viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer-caption {
  position: absolute;
  left: 0; right: 0; bottom: 30px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  padding: 0 56px;
}
.viewer-counter {
  position: absolute;
  left: 0; right: 0; bottom: calc(8px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
  opacity: .7;
}
.viewer button {
  position: absolute;
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.viewer button svg { width: 24px; height: 24px; }
.viewer-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.viewer-nav { top: 50%; transform: translateY(-50%); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
@media (hover: none) and (max-width: 767px) {
  .viewer-nav { display: none !important; }   /* スマホはスワイプで操作 */
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
