/* =========================================================
   css/postmenu.css — 願いを記すメニュー専用
   2026-07-01
========================================================= */

body.page-postmenu main,
.page-postmenu main {
  min-height: 100vh;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

.pm-wrap {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 10px 8px calc(130px + env(safe-area-inset-bottom));
  color: #3f2710;
}

.pm-head {
  text-align: center;
  margin: 0 auto 16px;
}

.pm-title {
  margin: 0;
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.25;
  font-weight: 950;
  letter-spacing: .07em;
  color: #43260d;
  text-shadow: 0 2px 0 rgba(255,255,255,.72);
}

.pm-lead {
  max-width: 780px;
  margin: 10px auto 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.65;
  font-weight: 800;
  color: #66471f;
}

.pm-scroll {
  position: relative;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  overflow: visible;
}

.pm-scroll-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 14px 28px rgba(77, 48, 14, .22));
}

.pm-scroll-inner {
  position: absolute;
  left: 15.2%;
  top: 5.2%;
  width: 69.6%;
  height: 44%;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.pm-grid {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.7vw, 18px);
}

.pm-card {
  --wood1: #fff5d2;
  --wood2: #e7b85c;
  --wood3: #b77721;
  --wood4: #6e3d0d;
  position: relative;
  isolation: isolate;
  min-height: clamp(118px, 18.5vw, 162px);
  padding: clamp(8px, 2vw, 14px) clamp(7px, 1.9vw, 12px) clamp(10px, 2.2vw, 15px);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  text-decoration: none;
  color: #3f250c;
  border-radius: clamp(14px, 3vw, 22px);
  border: 2px solid rgba(255, 239, 178, .92);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255,255,255,.76), transparent 38%),
    repeating-linear-gradient(92deg,
      rgba(112, 61, 13, .08) 0 1px,
      rgba(255, 242, 190, .02) 1px 9px),
    linear-gradient(180deg, #fff7d8 0%, #f3d184 44%, #d79532 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.78),
    inset 0 -5px 0 rgba(139, 75, 16, .26),
    inset 5px 0 8px rgba(255,255,255,.18),
    inset -5px 0 9px rgba(94, 48, 9, .14),
    0 7px 0 #9a611a,
    0 13px 20px rgba(70, 39, 9, .24);
  transform: translateY(0);
  overflow: hidden;
  transition:
    transform .55s cubic-bezier(.18, .85, .18, 1),
    box-shadow .55s cubic-bezier(.18, .85, .18, 1),
    filter .32s ease;
}

.pm-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent),
    radial-gradient(circle at var(--x, 50%) var(--y, 36%), rgba(255, 246, 168, .92), rgba(255, 213, 76, .20) 30%, transparent 52%);
  opacity: 0;
  z-index: 0;
  transition: opacity .35s ease;
}

.pm-card::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 7px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(89, 47, 6, .38), rgba(89,47,6,.12) 55%, transparent 76%);
  z-index: 0;
}

.pm-card:hover,
.pm-card:focus-visible {
  filter: brightness(1.035) saturate(1.04);
  transform: translateY(-3px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.78),
    inset 0 -5px 0 rgba(139, 75, 16, .26),
    inset 5px 0 8px rgba(255,255,255,.18),
    inset -5px 0 9px rgba(94, 48, 9, .14),
    0 9px 0 #9a611a,
    0 17px 24px rgba(70, 39, 9, .28);
}

.pm-card.is-press {
  transform: translateY(13px) scale(.968);
  filter: brightness(.98) saturate(1.06);
  box-shadow:
    inset 0 3px 8px rgba(81, 42, 7, .25),
    inset 0 -1px 0 rgba(139, 75, 16, .18),
    0 1px 0 #9a611a,
    0 4px 9px rgba(70, 39, 9, .20);
}

.pm-card.is-press::before {
  opacity: 1;
}

.pm-ico,
.pm-headline,
.pm-sub,
.pm-action {
  position: relative;
  z-index: 1;
}

.pm-ico {
  display: block;
  font-size: clamp(22px, 3.8vw, 33px);
  line-height: 1;
  margin-bottom: 3px;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.78));
}

.pm-headline {
  display: block;
  font-family: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(19px, 3.45vw, 31px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: .02em;
  color: #3b2109;
  text-shadow:
    0 1px 0 rgba(255,255,255,.76),
    0 2px 2px rgba(80,43,8,.14);
}

.pm-headline::after {
  content: "";
  display: block;
  width: min(105px, 72%);
  height: 10px;
  margin: 4px auto 3px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(114, 70, 14, .48), rgba(181, 128, 35, .22) 58%, transparent 80%);
}

.pm-sub {
  display: block;
  min-height: 1.4em;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(13px, 2.2vw, 18px);
  line-height: 1.35;
  font-weight: 850;
  color: #503416;
  text-shadow: 0 1px 0 rgba(255,255,255,.64);
}

.pm-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  min-width: 76px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: clamp(11px, 1.75vw, 14px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: .03em;
  color: #3e2409;
  background:
    radial-gradient(circle at 50% 0, rgba(255,255,255,.75), transparent 45%),
    linear-gradient(180deg, #ffe7a0, #d99a2e 72%, #a76517);
  border: 1px solid rgba(117, 67, 12, .34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 2px 0 rgba(107, 61, 8, .42);
}

.pm-bbs {
  width: min(92%, 420px);
  margin: 18px auto 0;
}

.pm-card--bbs {
  min-height: 104px;
}

.pm-fx-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.pm-petal {
  position: fixed;
  width: 15px;
  height: 19px;
  border-radius: 70% 30% 75% 28%;
  opacity: 0;
  background:
    radial-gradient(circle at 28% 28%, rgba(255,255,255,.95), rgba(255,255,255,.22) 25%, transparent 26%),
    linear-gradient(180deg, #fff0f6 0%, #ffc6d8 56%, #f48caf 100%);
  box-shadow:
    0 0 8px rgba(255, 209, 225, .82),
    0 0 18px rgba(255, 180, 208, .22);
  transform: translate3d(0,0,0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  animation: pmPetalDrift var(--dur, 4.5s) ease-in-out forwards;
  animation-delay: var(--delay, 0s);
}

.pm-sparkle {
  position: fixed;
  width: 11px;
  height: 11px;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c8 0%, #ffd861 46%, rgba(255,216,97,0) 74%);
  box-shadow: 0 0 12px rgba(255, 218, 93, .72);
  animation: pmSparklePop var(--dur, 1.4s) ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes pmPetalDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, -40px, 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  }
  10% {
    opacity: .96;
  }
  52% {
    transform: translate3d(var(--sway, 40px), 45vh, 0) rotate(calc(var(--rot, 0deg) + 170deg)) scale(var(--scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), 108vh, 0) rotate(calc(var(--rot, 0deg) + 360deg)) scale(var(--scale, 1));
  }
}

@keyframes pmSparklePop {
  0% {
    opacity: 0;
    transform: translate(0,0) scale(.2);
  }
  20% {
    opacity: 1;
    transform: translate(calc(var(--tx) * .25), calc(var(--ty) * .25)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(1.8);
  }
}

@media (max-width: 820px) {
  .pm-scroll-inner {
    left: 14.8%;
    top: 5.0%;
    width: 70.4%;
  }

  .pm-card {
    min-height: 138px;
  }
}

@media (max-width: 640px) {
  .pm-wrap {
    padding: 0 4px calc(118px + env(safe-area-inset-bottom));
  }

  .pm-head {
    display: none;
  }

  .pm-scroll {
    width: min(100vw, 430px);
    margin: 0 auto;
  }

  .pm-scroll-inner {
    left: 16.0%;
    top: 5.15%;
    width: 68.0%;
    height: 43.0%;
  }

  .pm-grid {
    gap: 11px 10px;
  }

  .pm-card {
    min-height: 112px;
    padding: 8px 6px 9px;
    border-radius: 16px;
    border-width: 1.5px;
    box-shadow:
      inset 0 2px 0 rgba(255,255,255,.76),
      inset 0 -4px 0 rgba(139, 75, 16, .24),
      0 5px 0 #9a611a,
      0 9px 14px rgba(70, 39, 9, .22);
  }

  .pm-card.is-press {
    transform: translateY(10px) scale(.965);
    box-shadow:
      inset 0 3px 8px rgba(81, 42, 7, .25),
      0 1px 0 #9a611a,
      0 3px 7px rgba(70, 39, 9, .18);
  }

  .pm-ico {
    font-size: 22px;
    margin-bottom: 2px;
  }

  .pm-headline {
    font-size: clamp(15px, 5.0vw, 22px);
    line-height: 1.14;
  }

  .pm-headline::after {
    width: 64%;
    height: 8px;
    margin: 3px auto 2px;
  }

  .pm-sub {
    font-size: clamp(10px, 3.3vw, 14px);
    line-height: 1.25;
    font-weight: 900;
  }

  .pm-action {
    min-width: 62px;
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .pm-bbs {
    width: min(88%, 330px);
    margin-top: 14px;
  }

  .pm-card--bbs {
    min-height: 92px;
  }
}

@media (max-width: 390px) {
  .pm-scroll-inner {
    left: 16.4%;
    top: 5.25%;
    width: 67.2%;
  }

  .pm-grid {
    gap: 10px 9px;
  }

  .pm-card {
    min-height: 105px;
    padding: 7px 5px 8px;
    border-radius: 15px;
  }

  .pm-ico {
    font-size: 20px;
  }

  .pm-headline {
    font-size: clamp(14px, 4.75vw, 19px);
  }

  .pm-sub {
    font-size: clamp(9px, 3.05vw, 12px);
  }

  .pm-action {
    min-width: 58px;
    font-size: 9px;
    padding: 4px 7px;
  }
}
