/* 投票状況ページ（mypage.php）。ボタン・見出しは css/theme.css。 */

.mypage-main {
  margin: 0 auto;
  max-width: 44rem;
  padding: var(--gap-8) var(--gap-5) var(--gap-12);
  width: 100%;
}

/* --- スタンプ ---------------------------------------------------------
   3 つの丸。押した所は橙になって王冠が載る（投票したときの手応えと同じ絵）。
   必要投票数（REQUIRED_VOTES）からループで作る。 */
.stamp-card {
  margin-top: var(--gap-6);
}

.stamp-row {
  display: flex;
  align-items: center;
  gap: var(--gap-4);
}

.stamp {
  position: relative;
  display: flex;
  width: 5.5rem;
  height: 5.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--cream-50);
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 2px var(--line-strong);
}

/* 数字の形は行の箱の中心より 0.086em 下にある（字体のつくり）。丸の真ん中に見えるよう、下の詰めで持ち上げる。
   押した後の王冠は絵なので対象外（2026-10-27） */
.stamp:not(.is-filled) {
  padding-bottom: 0.17em;
}

.stamp.is-filled {
  background: var(--orange);
  box-shadow: none;
  animation: stamp-in 0.5s var(--ease-pop) both;
}

/* 一番新しい押印だけ少し遅らせて、開いた瞬間に「押された」のが分かるように */
.stamp.is-filled.is-latest {
  animation-delay: 0.25s;
}

@keyframes stamp-in {
  from { transform: scale(0.6) rotate(-14deg); }
  to { transform: scale(1) rotate(0); }
}

.stamp__crown {
  width: 3rem;
  height: auto;
}

.stamp-note {
  margin-top: var(--gap-5);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
}

.stamp-note__num {
  /* 大きな数字は「店」の下端より 1.8px 浮いて見えたので下げる（2026-10-27。home.css の .hero__facts .num と同じ理由） */
  position: relative;
  top: 0.06em;
  margin: 0 0.1em;
  font-size: 1.6em;
  font-weight: 900;
  line-height: 1;
  color: var(--orange-deep); /* 意味のある数字は深い橙（明るい橙は 2.4 で読めない） */
}

.stamp-note--done {
  color: var(--ink);
}

.stamp-note__sub {
  margin-top: var(--gap-2);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-align: start; /* 本文は左揃え（css/home.css の「本文は左揃え」の注。2026-10-28） */
}

.stamp-note__sub a {
  color: var(--orange-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* 本文のリンクと同じく、乗せたら薄くする（css/theme.css の「本文のリンク」） */
@media (hover: hover) and (pointer: fine) {
  .stamp-note__sub a:hover {
    opacity: 0.6;
  }
}

/* 引ける回数（アンケート込み）は My企画Page で見る。この画面ではアンケートに答えたかが分からないため */
.stamp-card__mypage {
  margin-top: var(--gap-4);
}

.voted-empty p {
  text-align: start;
}

/* --- 投票した模擬店 -------------------------------------------------- */
.voted-section {
  margin-top: var(--gap-12);
}

.voted-empty {
  margin-top: var(--gap-4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-4);
}

.voted-empty p {
  color: var(--ink-soft);
}

.voted-list {
  margin-top: var(--gap-5);
  display: flex;
  flex-direction: column;
  gap: var(--gap-3);
}

.voted-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-4);
  border-radius: var(--radius-lg);
  background: var(--cream-50);
  padding: var(--gap-4) var(--gap-5);
  box-shadow: var(--shadow-raise);
}

.voted-item__body {
  min-width: 0;
}

.voted-item__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-lg);
  font-weight: 900;
  color: var(--ink);
}

.voted-item__place {
  margin-top: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--ink-soft);
}

.voted-item__rating {
  margin-top: 0.375rem;
}

.voted-item__score {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.voted-item__score-label {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--ink-soft);
}

/* 「星4」。数字だけだと何の点か分かりにくかったので「星」を小さく添える */
.voted-item__score-value {
  margin-top: 0.125rem;
  font-size: var(--text-base);
  font-weight: 900;
  line-height: 1;
  color: var(--orange-deep);
}

.voted-item__score-num {
  margin-left: 0.1em;
  font-size: var(--text-3xl);
}

/* 数字の下に星 5 つ。付けた数まで橙（.is-on。mypage.php と js/mypage.js が付ける）、残りは薄く */
.voted-item__mine {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.0625rem;
  font-size: 0.9375rem;
  line-height: 1;
  color: var(--cream-200);
}

.voted-item__mine .is-on {
  color: var(--orange);
}

.voted-item__change {
  margin-top: var(--gap-3);
}

.voted-item__change .icon {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .mypage-main {
    padding-top: var(--gap-10);
  }
  .stamp {
    width: 6.5rem;
    height: 6.5rem;
  }
  .stamp__crown {
    width: 3.5rem;
  }
}

/* PC（1024px〜）はトップと同じ枠と 2 列（左に見出し、右に中身）。2026-10-24 */
@media (min-width: 1024px) {
  .mypage-main {
    max-width: var(--container);
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    display: grid;
    grid-template-columns: var(--side-col) minmax(0, 1fr);
    column-gap: var(--side-gap);
    align-items: start;
  }

  .mypage-main > .title {
    grid-column: 1;
  }

  .stamp-card {
    grid-column: 2;
    margin-top: 0;
  }

  .voted-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: var(--side-col) minmax(0, 1fr);
    column-gap: var(--side-gap);
    align-items: start;
  }

  .voted-section > * {
    grid-column: 2;
  }

  .voted-section > .title {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .voted-section > .title + * {
    margin-top: 0;
  }

  .stamp {
    width: 7rem;
    height: 7rem;
  }

  .stamp__crown {
    width: 4rem;
  }
}
