/* 会員ページ（マイページ）。tp.css の変数を使い、.mp 配下だけに効かせる */

.mp-tabs { text-align: center; margin-top: 14px; }
.mp-tabs .tp-tabs { margin-bottom: 14px; }
.mp-section { margin-bottom: 22px; }
.mp-muted { color: #a3b0ab; }
.mp-note { color: var(--tp-sub); font-size: 13px; margin-top: 12px !important; }

/* ---------- プロフィールヒーロー ---------- */
.mp-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  margin: 0 0 22px; padding: 30px 32px;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(circle at 92% -10%, rgba(255, 255, 255, .16) 0, transparent 38%),
    radial-gradient(circle at -5% 130%, rgba(255, 107, 61, .45) 0, transparent 45%),
    linear-gradient(135deg, #0f2f26 0%, #1a6a4f 55%, #2f9e76 100%);
  box-shadow: 0 18px 44px rgba(10, 30, 22, .32);
}
.mp-hero__deco { position: absolute; right: -10px; bottom: -40px; font-size: 230px; line-height: 1; color: rgba(255, 255, 255, .06); transform: rotate(-12deg); pointer-events: none; }
.mp-hero__profile { position: relative; display: flex; align-items: center; gap: 22px; min-width: 0; }
.mp-hero__who { min-width: 0; }
.mp-hero__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .22em; color: rgba(255, 255, 255, .6); }
.mp-hero__name { font-size: 30px; font-weight: 800; line-height: 1.25; margin: 2px 0 2px !important; color: #fff !important; word-break: break-all; }
.mp-hero__name small { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.mp-hero__sub { font-size: 12.5px; color: rgba(255, 255, 255, .7); }

/* アバター（クリックで変更） */
.mp-avatar { position: relative; display: block; flex: none; width: 112px; height: 112px; margin: 0; }
.mp .mp-avatar img { display: block; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; border-radius: 50%; background: #e4ebe8; border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 4px rgba(47, 174, 127, .5), 0 10px 24px rgba(0, 0, 0, .3); }
.mp-avatar__edit {
  position: absolute; right: 0; bottom: 2px; width: 36px; height: 36px; margin: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #fff; background: var(--tp-hot); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  transition: transform .15s;
}
.mp-avatar__edit:hover { transform: scale(1.1); }
.mp .mp-avatar__edit input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* ランク */
.mp-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
.mp-rank__badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #3b2a00; background: linear-gradient(135deg, #ffd96a, #f5b301); box-shadow: 0 4px 12px rgba(245, 179, 1, .35); }
.mp-rank__bar { position: relative; width: 140px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.mp-rank__bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd96a, #fff); }
.mp-rank small { font-size: 11.5px; color: rgba(255, 255, 255, .75); }

/* 数字 */
.mp-stats { position: relative; display: grid; grid-template-columns: repeat(5, minmax(84px, 1fr)); gap: 8px; }
.mp-stats a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px 12px;
  border-radius: 14px; color: #fff !important; text-align: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .15s, transform .15s;
}
.mp-stats a:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.mp-stats .fa { font-size: 15px; color: #8ff0c6; }
.mp-stats .fa-star { color: var(--tp-gold); }
.mp-stats .fa-heart { color: #ff9a9a; }
.mp-stats .fa-trophy { color: #ffd96a; }
.mp-stats b { font-size: 24px; font-weight: 800; line-height: 1.2; font-family: "Open Sans", "Hiragino Sans", sans-serif; }
.mp-stats span { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .72); white-space: nowrap; }

/* ---------- スタンプラリー ---------- */
.mp-rallies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mp-rally {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 14px; border-radius: 14px;
  background: #fffaf0; background-image: radial-gradient(rgba(120, 90, 40, .05) 1px, transparent 1px); background-size: 6px 6px;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 40, .22), 0 4px 14px rgba(10, 30, 22, .08);
}
.mp-rally__head { display: flex; flex-direction: column; gap: 2px; color: var(--tp-ink) !important; padding-right: 50px; }
.mp-rally__head small { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: #c8372d; }
.mp-rally__head b { font-size: 15.5px; font-weight: 800; line-height: 1.45; }
.mp-rally__head:hover b { text-decoration: underline; }
.mp-rally__progress { display: flex; align-items: center; gap: 10px; }
.mp-rally__count { flex: none; font-size: 13px; font-weight: 700; color: var(--tp-sub); }
.mp-rally__count b { font-size: 24px; font-weight: 900; color: #c8372d; }
.mp-rally__bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(120, 90, 40, .12); overflow: hidden; }
.mp-rally__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e3584c, #c8372d); }
.mp-rally .gr-dots { margin: 0; }
.mp-rally .gr-dots a { display: block; transition: transform .15s; }
.mp-rally .gr-dots a:hover { transform: scale(1.12); }
.mp-rally__next { font-size: 12.5px; color: var(--tp-sub); margin-top: auto !important; padding-top: 8px; border-top: 1px dashed rgba(120, 90, 40, .25); }
.mp-rally__next a { font-weight: 700; color: var(--tp-accent) !important; }
.mp-rally__next .fa { color: var(--tp-hot); }
.mp-rally__done { font-weight: 800; color: #c8372d; }
.mp-rally__done .fa { color: var(--tp-gold); }
.mp-rally__seal {
  position: absolute; right: 12px; top: 12px; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; letter-spacing: .1em; color: #c8372d;
  border: 3px solid #c8372d; box-shadow: inset 0 0 0 2px #fffaf0, inset 0 0 0 4px #c8372d;
  transform: rotate(-14deg); mix-blend-mode: multiply; opacity: .9;
}
.mp-rally.is-complete { box-shadow: inset 0 0 0 2px rgba(200, 55, 45, .45), 0 6px 18px rgba(200, 55, 45, .12); }

/* ---------- 写真グリッド ---------- */
.mp-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mp-photos--small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-photos--wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mp-photo { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #e4ebe8; color: #fff !important; aspect-ratio: 1 / 1; box-shadow: 0 4px 12px rgba(10, 30, 22, .12); }
.mp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.mp-photo:hover img { transform: scale(1.07); }
.mp-photo__badge { position: absolute; left: 8px; top: 8px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(0, 0, 0, .6); }
.mp-photo__meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.mp-photo__meta b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-photo__meta small { font-size: 11px; opacity: .9; }
.mp-photo__meta .fa-heart { color: #ff9a9a; }

/* ---------- フォトコンテスト ---------- */
.mp-contest-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; padding: 16px 20px;
  border-radius: 14px; color: #fff !important; background: linear-gradient(135deg, #ff8a3d, #e5486d);
  box-shadow: 0 8px 22px rgba(229, 72, 109, .28); transition: transform .15s;
}
.mp-contest-cta:hover { transform: translateY(-2px); }
.mp-contest-cta__label { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.mp-contest-cta b { font-size: 17px; font-weight: 800; }
.mp-contest-cta__go { margin-left: auto; font-size: 13px; font-weight: 800; padding: 6px 16px; border-radius: 999px; color: #e5486d; background: #fff; }
.mp-contests { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mp-contest { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--tp-soft); }
.mp-contest__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mp-contest__head small { display: block; font-size: 11px; font-weight: 700; color: var(--tp-sub); }
.mp-contest__head a { color: var(--tp-ink) !important; font-size: 15.5px; }
.mp-status { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: #8a9a94; }
.mp-status.is-open { background: var(--tp-hot); }
.mp-status.is-voting { background: #e5486d; }
.mp-status.is-closed { background: var(--tp-accent); }
.mp-contest__result { font-size: 13px; color: var(--tp-sub); }
.mp-contest__result b { font-size: 26px; font-weight: 900; color: var(--tp-ink); font-family: "Open Sans", sans-serif; }
.mp-medal { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: 15px; font-weight: 900; color: #3b2a00; }
.mp-medal--gold { background: linear-gradient(135deg, #ffe17a, #f5b301); }
.mp-medal--silver { background: linear-gradient(135deg, #f1f3f5, #c4ccd3); }
.mp-medal--bronze { background: linear-gradient(135deg, #f3c497, #d08a4e); }
.mp-contest__entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mp-entry { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #dfe7e3; color: #fff !important; }
.mp-entry img { width: 100%; height: 100%; object-fit: cover; }
.mp-entry__rank { position: absolute; left: 5px; top: 5px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--tp-ink); background: rgba(255, 255, 255, .92); }
.mp-entry__votes { position: absolute; right: 5px; bottom: 5px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(0, 0, 0, .55); }
.mp-entry.is-rank1 { box-shadow: 0 0 0 3px #f5b301; }
.mp-entry.is-rank2 { box-shadow: 0 0 0 3px #c4ccd3; }
.mp-entry.is-rank3 { box-shadow: 0 0 0 3px #d08a4e; }
.mp-entry.is-rank1 .mp-entry__rank { background: #f5c542; }
.mp-entry.is-rank2 .mp-entry__rank { background: #d9dee3; }
.mp-entry.is-rank3 .mp-entry__rank { background: #e0a46e; }

/* ---------- いいね ---------- */
.mp-likes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.mp-likes > .tp-panel { min-width: 0; }
.mp-spotgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mp-spotgrid .tp-card__desc { display: none; }
.mp-likes .tp-empty { padding: 28px 10px; }

.mp-subtabs { display: flex; gap: 6px; margin: 0 0 16px; }
.mp-subtabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 800; color: var(--tp-ink) !important; background: rgba(255, 255, 255, .92); box-shadow: 0 4px 12px rgba(10, 30, 22, .14); }
.mp-subtabs a small { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--tp-soft); color: var(--tp-sub); }
.mp-subtabs a.is-active { color: #fff !important; background: var(--tp-accent); }
.mp-subtabs a.is-active small { background: rgba(255, 255, 255, .22); color: #fff; }
.mp-likecard { position: relative; display: flex; min-width: 0; }
.mp-likecard > .tp-card { flex: 1; }
.mp-likecard__cancel {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 0; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #e5486d; background: rgba(255, 255, 255, .94); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: background .15s, color .15s;
}
.mp-likecard__cancel:hover { color: #fff; background: #e5486d; }

/* ---------- 地図・アカウント ---------- */
.mp-ichiran-toggle { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 14px; }
.mp-ichiran-toggle .fa { color: var(--tp-accent); }
.mp .tp-mapfilters .btn { border-radius: 999px !important; padding: 4px 12px !important; font-weight: 700; }
/* 地図内のスポット一覧（/api/mlist の HTML は float する .col-xs-12 で包まれてくる） */
.mp .tp-panel { display: flow-root; }
.mp .tp-mapbox > .col-sm-12 { float: none; width: auto; }
.mp #mission_ichiran { max-height: 620px; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 4px 6px 8px; border-radius: 12px; }
.mp #mission_ichiran > [class*="col-"] { float: none; width: auto; padding: 0; }
.mp #mission_ichiran .tp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mp #mission_ichiran .tp-card__desc { display: none; }
.mp #mission_ichiran .tp-card:hover { transform: none; }
.mp-account__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.mp-account__list > div { padding: 12px 14px; border-radius: 12px; background: var(--tp-soft); min-width: 0; }
.mp-account__list dt { font-size: 11px; font-weight: 700; color: var(--tp-sub); }
.mp-account__list dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-account__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px !important; font-size: 13px; }
.mp-account__links a { color: var(--tp-sub) !important; font-weight: 700; }
.mp-account__links a:hover { color: var(--tp-accent) !important; }

@media (max-width: 991px) {
  .mp-hero { grid-template-columns: 1fr; }
  .mp-likes { grid-template-columns: 1fr; }
  .mp-account__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .mp-hero { padding: 22px 16px 16px; gap: 18px; border-radius: 16px; }
  .mp-hero__profile { gap: 14px; }
  .mp-avatar { width: 84px; height: 84px; }
  .mp-avatar__edit { width: 30px; height: 30px; font-size: 12px; }
  .mp-hero__name { font-size: 22px; }
  .mp-rank__bar { width: 100px; }
  .mp-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .mp-stats a { padding: 10px 2px 8px; border-radius: 10px; }
  .mp-stats b { font-size: 17px; }
  .mp-stats span { font-size: 9px; white-space: normal; line-height: 1.3; }
  .mp-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mp-photos--small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mp-photos--small .mp-photo__meta { display: none; }
  .mp-photos--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mp-contests { grid-template-columns: 1fr; }
  .mp-contest-cta__go { margin-left: 0; }
  .mp-account__list { grid-template-columns: 1fr; }
  .mp .tp-panel { padding: 18px 16px; }
  .mp .tp-section__head { flex-direction: row; align-items: flex-start; }
  .mp .tp-section__head > div { min-width: 0; }
  .mp #mission_ichiran { max-height: 480px; }
  .mp #mission_ichiran .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mp #mission_ichiran .tp-card__body { padding: 8px 10px 10px; }
  .mp #mission_ichiran .tp-card__title { font-size: 13px; }
  .mp .tp-section__head:has(.tp-mapfilters) { flex-wrap: wrap; }
}
