/* 単語パーク（Web）の共通の見た目（2026-11-22）。各アトラクションのページが最初に読む */
:root {
  --mtp-ink: #1f2a37;
  --mtp-sub: #5b6676;
  --mtp-line: #e3e8ef;
  --mtp-bg: #f4f8fb;
  --mtp-card: #ffffff;
  --mtp-sky: #3fa9f5;
  --mtp-grass: #3cb371;
  --mtp-sun: #ffb400;
  --mtp-heart: #ff4d6d;
  --mtp-premium: #8a5cf6;
  --mtp-radius: 16px;
  --mtp-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

/* ---------- ゲームのページの上の帯（パークへ戻る・コース・ライフ） ---------- */
.mtp-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 6px max(12px, env(safe-area-inset-left)) 6px max(12px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--mtp-line);
  font-family: var(--mtp-font); color: var(--mtp-ink);
}
.mtp-bar__back {
  display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 44px;
  padding: 8px 10px 8px 6px; border-radius: 10px;
  color: var(--mtp-ink); text-decoration: none; font-weight: 700; font-size: 14px;
}
.mtp-bar__back::before { content: ""; width: 9px; height: 9px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin: 0 4px 0 6px; }
.mtp-bar__back:hover { background: var(--mtp-bg); }
.mtp-bar__title { flex: 1; min-width: 0; line-height: 1.25; }
.mtp-bar__game { display: block; font-weight: 800; font-size: 15px; }
.mtp-bar__course { display: block; font-size: 12px; color: var(--mtp-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtp-bar__course a { color: inherit; }

/* ---------- ライフ ---------- */
.mtp-lives { display: inline-flex; align-items: center; gap: 6px; flex: none; font-family: var(--mtp-font); color: var(--mtp-ink); }
.mtp-lives__hearts { display: inline-flex; gap: 2px; }
.mtp-heart {
  display: inline-block; width: 16px; height: 15px; position: relative;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.3 19.8C4.4 14.4.5 10.9.5 6.6.5 3.1 3.2.5 6.6.5c1.9 0 3.8.9 5.4 2.4C13.6 1.4 15.5.5 17.4.5c3.4 0 6.1 2.6 6.1 6.1 0 4.3-3.9 7.8-9.8 13.2z' fill='%23d5dbe3'/%3E%3C/svg%3E");
}
.mtp-heart.is-on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.3 19.8C4.4 14.4.5 10.9.5 6.6.5 3.1 3.2.5 6.6.5c1.9 0 3.8.9 5.4 2.4C13.6 1.4 15.5.5 17.4.5c3.4 0 6.1 2.6 6.1 6.1 0 4.3-3.9 7.8-9.8 13.2z' fill='%23ff4d6d'/%3E%3C/svg%3E"); }
.mtp-heart.is-inf { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.3 19.8C4.4 14.4.5 10.9.5 6.6.5 3.1 3.2.5 6.6.5c1.9 0 3.8.9 5.4 2.4C13.6 1.4 15.5.5 17.4.5c3.4 0 6.1 2.6 6.1 6.1 0 4.3-3.9 7.8-9.8 13.2z' fill='%238a5cf6'/%3E%3C/svg%3E"); }
.mtp-lives__n { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.mtp-lives__n small { font-size: 11px; color: var(--mtp-sub); font-weight: 700; }
.mtp-lives__sub { font-size: 11px; color: var(--mtp-sub); white-space: nowrap; }
@media (max-width: 420px) { .mtp-bar .mtp-lives__hearts { display: none; } .mtp-bar .mtp-lives__sub { display: none; } }

/* ---------- ライフがないときの窓 ---------- */
.mtp-out {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15, 23, 42, .55); font-family: var(--mtp-font);
  animation: mtp-fade .18s ease-out;
}
.mtp-out__card {
  position: relative; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 28px 20px 20px; border-radius: 20px; background: #fff; color: var(--mtp-ink); text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: mtp-pop .22s cubic-bezier(.2, 1.4, .4, 1);
}
.mtp-out__x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; color: var(--mtp-sub); cursor: pointer; }
.mtp-out__x:hover { background: var(--mtp-bg); }
.mtp-out__hearts { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.mtp-out__hearts .mtp-heart { width: 30px; height: 28px; }
.mtp-out__h { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.mtp-out__wait { margin: 0 0 18px; color: var(--mtp-sub); font-size: 14px; }
.mtp-out__wait b { color: var(--mtp-ink); }

.mtp-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin-top: 10px; padding: 10px 16px;
  border-radius: 14px; border: 2px solid transparent; text-decoration: none; text-align: left; box-sizing: border-box;
  font-family: var(--mtp-font); transition: transform .08s, filter .15s;
}
.mtp-btn:active { transform: scale(.98); }
.mtp-btn:hover { filter: brightness(1.04); }
.mtp-btn img { flex: none; border-radius: 10px; }
.mtp-btn span { display: flex; flex-direction: column; line-height: 1.3; }
.mtp-btn b { font-size: 16px; }
.mtp-btn small { font-size: 12px; opacity: .85; }
.mtp-btn--app { background: var(--mtp-sky); color: #fff; box-shadow: 0 4px 0 #1f86d1; }
.mtp-btn--login { background: #fff; color: var(--mtp-ink); border-color: var(--mtp-line); }
.mtp-btn--premium { background: linear-gradient(135deg, #8a5cf6, #c05cf6); color: #fff; box-shadow: 0 4px 0 #6a3fd0; }
.mtp-btn:focus-visible, .mtp-out__x:focus-visible, .mtp-bar__back:focus-visible { outline: 3px solid #ffb400; outline-offset: 2px; }

@keyframes mtp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtp-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mtp-out, .mtp-out__card { animation: none; } }
