/* MBTIツムツム（旧仮名 もふなぞ・ひとりで遊ぶパズル）2026-09-30 — 全画面・縦持ち優先。page-mofunazo.php 専用 */
html, body.mfb { margin: 0; padding: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body.mfb { background: #8fd3ff linear-gradient(160deg, #9fdcff 0%, #ffd6ec 100%); -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mf, .mf * { box-sizing: border-box; }
.mf { position: fixed; inset: 0; display: flex; justify-content: center; font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; font-weight: 700; color: #3b3355; touch-action: manipulation; }
.mf button, .mf a { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:where(.mf button) { cursor: pointer; border: 0; background: none; padding: 0; }
.mf img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.mf-boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.mf-boot b { font-size: 34px; color: #fff; letter-spacing: .12em; text-shadow: 0 3px 0 #ff7fb3, 0 6px 14px rgba(120, 60, 140, .3); }
.mf-boot i { width: 44px; height: 44px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: mfSpin .8s linear infinite; }
@keyframes mfSpin { to { transform: rotate(360deg); } }

/* ---------- 遊ぶ画面 ---------- */
.mf-app { position: relative; width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: linear-gradient(180deg, #a8e0ff 0%, #d7f0ff 45%, #ffe3f1 100%); }
.mf-hud { flex: none; display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto 18px; align-items: center; gap: 4px 8px; padding: 8px 10px 6px; }
.mf-pause { width: 40px; height: 40px; border-radius: 50%; background: #fff !important; box-shadow: 0 3px 0 #c9b7e8; display: flex; align-items: center; justify-content: center; gap: 5px; }
.mf-pause i { display: block; width: 5px; height: 16px; border-radius: 3px; background: #6b5a8e; }
.mf-score { text-align: center; line-height: 1; }
.mf-score small, .mf-best small { display: block; font-size: 10px; letter-spacing: .12em; color: #6f86a8; }
.mf-score b { display: block; font-size: 27px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 #5b8fd6, 0 0 1px #5b8fd6, 1px 1px 0 #5b8fd6, -1px 1px 0 #5b8fd6; font-variant-numeric: tabular-nums; margin-top: 2px; }
.mf-best { text-align: right; line-height: 1.1; min-width: 60px; }
.mf-best b { font-size: 13px; color: #5b6f95; font-variant-numeric: tabular-nums; }
.mf-time { grid-column: 1 / -1; position: relative; height: 16px; border-radius: 10px; background: rgba(255, 255, 255, .75); box-shadow: inset 0 1px 3px rgba(60, 70, 120, .2); overflow: hidden; }
.mf-time i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 10px; background: linear-gradient(90deg, #5fd38a, #a6e86b); transition: width .12s linear; }
.mf-time span { position: absolute; right: 8px; top: 0; line-height: 16px; font-size: 12px; font-weight: 800; color: #2f5d3a; font-variant-numeric: tabular-nums; }
.mf-time.is-low i { background: linear-gradient(90deg, #ff5f7e, #ffab5c); }
.mf-time.is-low span { color: #8a1f35; }
.mf-time.is-low { animation: mfLow .5s ease-in-out infinite alternate; }
@keyframes mfLow { to { box-shadow: 0 0 0 3px rgba(255, 95, 126, .55), inset 0 1px 3px rgba(60, 70, 120, .2); } }

.mf-board { position: relative; flex: 1 1 auto; min-height: 0; margin: 0 8px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #bfe8ff, #fff0f7); box-shadow: 0 4px 0 rgba(255, 255, 255, .8), 0 6px 18px rgba(80, 90, 150, .18); touch-action: none; }
.mf-board canvas { position: absolute; left: 0; top: 0; display: block; touch-action: none; }
.mf.is-fever .mf-board { animation: mfFever 1.2s linear infinite; }
@keyframes mfFever { 0% { box-shadow: 0 0 0 4px #ff7fb3, 0 6px 18px rgba(80, 90, 150, .18); } 33% { box-shadow: 0 0 0 4px #ffd84d, 0 6px 18px rgba(80, 90, 150, .18); } 66% { box-shadow: 0 0 0 4px #6fd3ff, 0 6px 18px rgba(80, 90, 150, .18); } 100% { box-shadow: 0 0 0 4px #ff7fb3, 0 6px 18px rgba(80, 90, 150, .18); } }
.mf.is-fever .mf-board::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255, 127, 179, .18), rgba(255, 216, 77, .14), rgba(111, 211, 255, .18)); background-size: 300% 300%; animation: mfFeverBg 1.6s linear infinite; }
@keyframes mfFeverBg { to { background-position: 300% 0; } }
.mf.is-freeze .mf-board::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 40px 10px rgba(160, 200, 255, .75); }
.mf.is-wild .mf-board::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 36px 8px rgba(255, 127, 209, .6); }
.mf.is-rain .mf-board::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 36px 8px rgba(160, 230, 110, .6); }
.mf-combo { position: absolute; right: 10px; top: 8px; transform-origin: right center; white-space: nowrap; z-index: 3; pointer-events: none; font-size: 13px; color: #fff; text-shadow: 0 2px 0 #b65fd6, 0 0 6px rgba(120, 50, 160, .5); opacity: 0; transition: opacity .2s; }
.mf-combo b { font-size: 26px; margin-right: 2px; font-weight: 800; }
.mf-combo.is-on { opacity: 1; }
.mf-combo.is-pop { animation: mfPop .25s ease-out; }
@keyframes mfPop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.mf-banner { position: absolute; left: 0; right: 0; top: 34%; z-index: 4; text-align: center; pointer-events: none; opacity: 0; }
.mf-banner b { display: block; font-size: 38px; font-weight: 800; color: #fff; letter-spacing: .04em; -webkit-text-stroke: 1.5px #ff4f93; text-shadow: 0 4px 0 #ff4f93, 0 8px 18px rgba(120, 40, 100, .35); }
.mf-banner small { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #b1386f; font-size: 14px; }
.mf-banner.is-on { animation: mfBanner 1.3s ease-out forwards; }
.mf-banner.is-fever b { color: #fff36b; -webkit-text-stroke-color: #ff5f7e; text-shadow: 0 4px 0 #ff5f7e, 0 0 24px rgba(255, 200, 80, .9); font-size: 50px; }
.mf-banner.is-big b { font-size: 46px; color: #fff36b; }
.mf-banner.is-time b { -webkit-text-stroke-color: #2b7fd6; text-shadow: 0 4px 0 #2b7fd6, 0 8px 18px rgba(40, 90, 160, .35); }
.mf-banner.is-skill b { -webkit-text-stroke-color: #7b61d9; text-shadow: 0 4px 0 #7b61d9, 0 8px 18px rgba(80, 50, 160, .35); font-size: 34px; }
.mf-banner.is-end b { -webkit-text-stroke-color: #3b3355; text-shadow: 0 4px 0 #3b3355, 0 8px 18px rgba(0, 0, 0, .3); font-size: 44px; }
@keyframes mfBanner { 0% { opacity: 0; transform: scale(.4); } 14% { opacity: 1; transform: scale(1.12); } 24% { transform: scale(1); } 78% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05) translateY(-12px); } }
.mf-count { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; pointer-events: none; font-size: 96px; font-weight: 800; color: #fff; -webkit-text-stroke: 3px #5b8fd6; text-shadow: 0 6px 0 #5b8fd6, 0 10px 30px rgba(40, 70, 140, .35); opacity: 0; }
.mf-count.is-on { animation: mfCount .62s ease-out forwards; }
.mf-count.is-go { font-size: 54px; -webkit-text-stroke-color: #ff4f93; text-shadow: 0 5px 0 #ff4f93, 0 10px 30px rgba(140, 40, 90, .3); }
.mf-count.is-last { font-size: 120px; -webkit-text-stroke-color: #ff5f7e; text-shadow: 0 6px 0 #ff5f7e; }
.mf-count.is-last.is-on { animation: mfCountLast .9s ease-out forwards; }
@keyframes mfCount { 0% { opacity: 0; transform: scale(2); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.8); } }
@keyframes mfCountLast { 0% { opacity: 0; transform: scale(1.6); } 20% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(.9); } }
.mf-status { position: absolute; left: 50%; top: 10px; z-index: 4; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #7b61d9; font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.mf-status.is-on { opacity: 1; }

.mf-foot { flex: none; display: grid; grid-template-columns: 58px 1fr 84px; grid-template-rows: 1fr 1fr; grid-template-areas: "me fever skill" "me info skill"; align-items: center; column-gap: 8px; height: 90px; padding: 6px 12px 8px; }
.mf-me { grid-area: me; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mf-me img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 2px 6px rgba(80, 60, 120, .25); background: #fff; }
.mf-me span { font-size: 11px; color: #5b6f95; }
.mf-fever { grid-area: fever; position: relative; align-self: end; height: 20px; border-radius: 12px; background: rgba(255, 255, 255, .8); overflow: hidden; box-shadow: inset 0 1px 3px rgba(60, 70, 120, .2); }
.mf-fever span { position: absolute; left: 10px; top: 0; z-index: 2; line-height: 20px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #fff; text-shadow: 0 1px 2px rgba(120, 40, 100, .6); }
.mf-fever i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ff7fb3, #ffb347); border-radius: 12px; transition: width .15s; }
.mf.is-fever .mf-fever i { background: linear-gradient(90deg, #ff5f7e, #ffd84d, #6fd3ff, #b56cff, #ff5f7e); background-size: 200% 100%; animation: mfFeverBg 1s linear infinite; }
.mf-info { grid-area: info; align-self: start; padding-top: 5px; font-size: 11px; color: #7b61d9; min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-skill { grid-area: skill; position: relative; justify-self: end; width: 76px; height: 76px; border-radius: 50%; padding: 6px !important; background: conic-gradient(var(--c, #ff7fb3) var(--p, 0%), rgba(255, 255, 255, .7) 0) !important; box-shadow: 0 4px 0 rgba(120, 90, 170, .35), 0 6px 14px rgba(80, 60, 120, .2); }
.mf-skill img { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; filter: grayscale(.55) brightness(.95); transition: filter .2s; }
.mf-skill em { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 1px 8px; border-radius: 99px; background: #fff; color: #6b5a8e; font-size: 11px; font-style: normal; white-space: nowrap; box-shadow: 0 1px 3px rgba(80, 60, 120, .25); }
.mf-skill.is-ready img { filter: none; }
.mf-skill.is-ready { animation: mfReady .8s ease-in-out infinite alternate; }
.mf-skill.is-ready em { background: #ff4f93; color: #fff; }
@keyframes mfReady { from { transform: scale(1); box-shadow: 0 4px 0 rgba(120, 90, 170, .35), 0 0 0 0 rgba(255, 79, 147, .6); } to { transform: scale(1.07); box-shadow: 0 4px 0 rgba(120, 90, 170, .35), 0 0 0 10px rgba(255, 79, 147, 0); } }
.mf-skill:active { transform: scale(.95); }

/* ---------- 重ねる画面 ---------- */
.mf.is-menu .mf-hud, .mf.is-menu .mf-foot { visibility: hidden; }
.mf-layer { position: absolute; top: 0; bottom: 0; left: 50%; width: 100%; max-width: 480px; transform: translateX(-50%); z-index: 20; display: none; }
.mf-layer.is-on { display: block; }
.mf-scr { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 22px); background: linear-gradient(180deg, rgba(240, 249, 255, .96), rgba(255, 240, 248, .97)); }
.mf-scr.is-title { background: linear-gradient(180deg, rgba(255, 255, 255, .15) 0%, rgba(255, 255, 255, .55) 40%, rgba(255, 250, 253, .9) 70%); display: flex; flex-direction: column; }
.mf-scr.is-result { background: linear-gradient(180deg, rgba(255, 246, 214, .96), rgba(255, 236, 246, .97)); }
.mf-title { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; max-width: 420px; width: 100%; margin: 0 auto; }
.mf-logo { margin: 0 0 2px; text-align: center; line-height: 1; }
.mf-logo span { display: inline-block; width: 1.3em; height: 1.3em; line-height: 1.32em; margin: 0 .04em; border-radius: 50%; font-size: 40px; font-weight: 800; color: #fff; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 4px 10px rgba(120, 60, 140, .25); animation: mfBob 2.4s ease-in-out infinite; }
.mf-logo span:nth-of-type(1) { background: #ff7fb3; }
.mf-logo span:nth-of-type(2) { background: #ffb347; animation-delay: .15s; }
.mf-logo span:nth-of-type(3) { background: #5fc9f0; animation-delay: .3s; }
.mf-logo span:nth-of-type(4) { background: #8bd36a; animation-delay: .45s; }
.mf-logo em { display: table; margin: 0 auto 6px; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); font-style: normal; font-size: 22px; font-weight: 800; letter-spacing: .18em; color: #6b5a8e; }
.mf-logo small { display: table; margin: 10px auto 0; padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .86); box-shadow: 0 2px 8px rgba(120, 90, 160, .14); font-size: 13px; color: #6b5a8e; letter-spacing: .06em; }
.mf-logo.is-img img { max-width: 78%; max-height: 110px; }
@keyframes mfBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.mf-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .95) !important; box-shadow: 0 3px 0 #e6d6f5, 0 6px 16px rgba(90, 60, 140, .12); text-align: left; }
.mf-card__face { flex: none; width: 58px; height: 58px; border-radius: 50%; }
.mf-card__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-card__b b { font-size: 16px; color: #3b3355; }
.mf-card__b b em, .mf-detail h3 em { font-style: normal; font-size: 11px; color: #9a8fb5; margin-left: 6px; }
.mf-card__lv { font-size: 11px; color: #ff4f93; }
.mf-card__sk { font-size: 11px; color: #6d5f78; line-height: 1.45; font-weight: 500; }
.mf-card__go { flex: none; font-size: 11px; padding: 4px 8px; border-radius: 99px; background: #f1ebff; color: #7b61d9; }
.mf-play { width: 100%; height: 64px; border-radius: 22px; background: linear-gradient(180deg, #ff8fbf, #ff5f9e) !important; color: #fff !important; font-size: 26px; font-weight: 800; letter-spacing: .1em; box-shadow: 0 5px 0 #d23f7e, 0 10px 20px rgba(210, 63, 126, .3); text-shadow: 0 2px 0 rgba(160, 30, 80, .4); }
.mf-play small { font-size: 12px; letter-spacing: 0; margin-left: 8px; opacity: .9; }
.mf-play:active, .mf-btn:active { transform: translateY(3px); box-shadow: none; }
.mf-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mf-menu button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 16px; background: #fff !important; box-shadow: 0 3px 0 #e2d8f2; font-size: 12px; color: #5a4a7a; }
.mf-menu i { font-style: normal; font-size: 22px; line-height: 1.1; }
.mf-dot { position: absolute; right: 10px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ff4f93; }
.mf-tinfo { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #6d5f78; }
.mf-tinfo b { color: #3b3355; font-variant-numeric: tabular-nums; }
.mf-join { display: block; padding: 9px 12px; border-radius: 14px; background: #fff8d9; border: 1.5px dashed #f2c94c; color: #6d5a20; font-size: 12px; line-height: 1.5; text-decoration: none; text-align: center; font-weight: 500; }
.mf-join b { color: #c7581a; }
.mf-sub { display: flex; justify-content: center; gap: 16px; font-size: 12px; }
.mf-sub button, .mf-sub a { color: #7b6d99; text-decoration: underline; text-underline-offset: 3px; }

.mf-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 10px; }
.mf-head h2 { margin: 0; text-align: center; font-size: 18px; color: #3b3355; }
.mf-back { width: 38px; height: 38px; border-radius: 50%; background: #fff !important; box-shadow: 0 2px 0 #e2d8f2; font-size: 26px !important; line-height: 34px; color: #7b61d9 !important; }
.mf-lead { margin: 0 0 12px; font-size: 12px; color: #6d5f78; line-height: 1.7; font-weight: 500; }
.mf-lead b { color: #3b3355; }
.mf-note { margin: 10px 0 0; font-size: 11px; color: #8a7f9e; line-height: 1.6; font-weight: 500; text-align: center; }
.mf-note b { color: #3b3355; }
.mf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mf-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 14px; background: #fff !important; box-shadow: 0 2px 0 #e8e0f4; min-width: 0; }
.mf-cell .mf-face { width: 54px; height: 54px; border-radius: 50%; }
.mf-cell b { font-size: 11px; color: #3b3355; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mf-cell small { font-size: 10px; color: #8a7f9e; }
.mf-cell.is-lock .mf-face { filter: grayscale(1) brightness(1.1); opacity: .55; }
.mf-cell.is-sel { box-shadow: 0 0 0 3px #ff7fb3, 0 2px 0 #e8e0f4; }
.mf-first { max-width: 420px; margin: 0 auto; text-align: center; }
.mf-first h2 { margin: 6px 0 4px; font-size: 20px; }
.mf-first .mf-btn { margin-top: 12px; }

.mf-mis { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mf-mis li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 8px; gap: 5px 10px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 #e8e0f4; }
.mf-mis__t { grid-column: 1; grid-row: 1; font-size: 13px; text-align: left; }
.mf-mis__v { grid-column: 2; grid-row: 1; font-size: 12px; color: #7b61d9; font-variant-numeric: tabular-nums; }
.mf-mis__bar { grid-column: 1 / -1; grid-row: 2; height: 8px; border-radius: 6px; background: #efe9f7; overflow: hidden; }
.mf-mis__bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #7fd0ff, #b58cff); }
.mf-mis li.is-got { background: #f3fff0; }
.mf-mis li.is-got .mf-mis__bar i { background: linear-gradient(90deg, #5fd38a, #a6e86b); }
.mf-mis li.is-got .mf-mis__v { color: #2f9a58; }
.mf-mis.is-compact li { padding: 7px 10px; }
.mf-mis.is-compact .mf-mis__t { font-size: 12px; }
.mf-reward { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: #fff8d9; font-size: 12px; line-height: 1.7; font-weight: 500; text-align: center; }
.mf-reward b { color: #b0560f; }
.mf-reward p { margin: 4px 0; }
.mf-reward .mf-btn { margin-top: 8px; }

.mf-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.mf-tabs button { padding: 6px 18px; border-radius: 99px; background: #fff !important; box-shadow: 0 2px 0 #e2d8f2; font-size: 13px; color: #7b6d99; }
.mf-tabs button.is-on { background: #7b61d9 !important; color: #fff !important; box-shadow: 0 2px 0 #5a44b0; }
.mf-rank ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mf-rank li { display: grid; grid-template-columns: 30px 36px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: #fff; font-size: 13px; }
.mf-rank li.is-me { box-shadow: 0 0 0 2px #ff7fb3; background: #fff2f8; }
.mf-rank__no { text-align: center; font-weight: 800; color: #9a8fb5; }
.mf-rank li.is-top1 .mf-rank__no { color: #e8a300; font-size: 17px; }
.mf-rank li.is-top2 .mf-rank__no { color: #8f9bb3; font-size: 16px; }
.mf-rank li.is-top3 .mf-rank__no { color: #c7883f; font-size: 15px; }
.mf-rank__face { width: 34px; height: 34px; border-radius: 50%; background: #eee; display: block; }
.mf-rank__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-rank__s { font-variant-numeric: tabular-nums; color: #3b3355; }
.mf-rank__me { text-align: center; font-size: 13px; margin: 10px 0 0; }

.mf-skins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mf-skin { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 2px 0 #e8e0f4; text-align: center; }
.mf-skin.is-sel { box-shadow: 0 0 0 3px #ff7fb3; }
.mf-skin__pv { width: 100%; height: 64px; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.mf-skin small { font-size: 10px; color: #8a7f9e; font-weight: 500; }
.mf-skin .mf-btn { width: 100%; padding: 7px 4px; font-size: 12px; }

.mf-set { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: #fff; }
.mf-set label { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.mf-set input[type=range] { width: 100%; accent-color: #ff5f9e; }
.mf-set .mf-chk { grid-template-columns: auto 1fr; }
.mf-set .mf-chk input { width: 20px; height: 20px; accent-color: #ff5f9e; }
.mf-set.is-mini { display: none; margin-top: 12px; background: #f7f3ff; }
.mf-set.is-mini.is-open { display: flex; }

.mf-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mf-btns.is-row { flex-direction: row; }
.mf-btns.is-row .mf-btn { flex: 1; }
.mf-btn { display: block; width: 100%; padding: 11px 12px; border-radius: 16px; background: #fff !important; box-shadow: 0 3px 0 #ddd0ee; font-size: 14px; text-align: center; text-decoration: none; color: #5a4a7a !important; }
.mf-btn.is-main { background: linear-gradient(180deg, #ff8fbf, #ff5f9e) !important; color: #fff !important; box-shadow: 0 3px 0 #d23f7e; }
.mf-btn.is-big { font-size: 18px; padding: 13px 12px; }
.mf-btn.is-x { background: #1d1d1f !important; color: #fff !important; box-shadow: 0 3px 0 #000; }
.mf-btn.is-ghost { background: transparent !important; box-shadow: none; color: #7b6d99 !important; }
.mf-btn.is-dis, .mf-btn:disabled { opacity: .5; box-shadow: none; }

.mf-modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(40, 24, 70, .45); }
.mf-modal[hidden] { display: none; }
.mf-mbox { width: 100%; max-width: 380px; max-height: 88%; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 18px 16px; border-radius: 22px; background: #fff; box-shadow: 0 10px 40px rgba(40, 24, 70, .3); animation: mfIn .22s ease-out; }
@keyframes mfIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mf-detail { text-align: center; }
.mf-detail__face { width: 96px; height: 96px; border-radius: 50%; }
.mf-detail h3 { margin: 6px 0 8px; font-size: 18px; }
.mf-sk { padding: 10px 12px; border-radius: 14px; background: #f7f3ff; text-align: left; }
.mf-sk b { color: #7b61d9; font-size: 15px; }
.mf-sk p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; font-weight: 500; }
.mf-sk__lv span { color: #9a8fb5; }
.mf-sk__need { color: #8a7f9e; }
.mf-xp { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.mf-xp i { display: block; height: 10px; border-radius: 6px; background: #efe9f7; overflow: hidden; }
.mf-xp i b { display: block; height: 100%; background: linear-gradient(90deg, #ffd84d, #ffb347); border-radius: 6px; }
.mf-pausebox h3 { margin: 0; text-align: center; font-size: 20px; }

.mf-how { text-align: center; }
.mf-how h3 { margin: 12px 0 6px; font-size: 16px; line-height: 1.5; }
.mf-how p { margin: 0; font-size: 12px; line-height: 1.7; color: #6d5f78; font-weight: 500; }
.mf-how__art { position: relative; height: 120px; border-radius: 16px; background: linear-gradient(180deg, #bfe8ff, #fff0f7); display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.mf-how__art img { width: 52px; height: 52px; border-radius: 50%; }
.mf-how__art.is-link img:nth-child(4) { opacity: .5; }
.mf-how__line { position: absolute; left: calc(50% - 115px); top: 50%; height: 8px; width: 0; margin-top: -4px; border-radius: 6px; background: rgba(255, 255, 255, .95); box-shadow: 0 0 0 3px rgba(255, 127, 179, .6); animation: mfHowLine 2s ease-in-out infinite; z-index: 0; }
.mf-how__art.is-link img { position: relative; z-index: 1; }
.mf-how__finger { position: absolute; z-index: 2; left: calc(50% - 118px); top: 58%; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 79, 147, .75); box-shadow: 0 0 0 6px rgba(255, 79, 147, .25); animation: mfHowFinger 2s ease-in-out infinite; }
@keyframes mfHowLine { 0% { width: 0; } 60%, 85% { width: 118px; } 100% { width: 0; opacity: 0; } }
@keyframes mfHowFinger { 0% { transform: translateX(0); opacity: 1; } 60%, 85% { transform: translateX(118px); opacity: 1; } 100% { transform: translateX(118px); opacity: 0; } }
.mf-how__art.is-bomb img { width: 44px; height: 44px; animation: mfBob 2s ease-in-out infinite; }
.mf-how__num { position: absolute; left: 10px; top: 8px; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; background: #ff4f93; color: #fff; font-size: 16px; }
.mf-how__art.is-skill { flex-direction: column; gap: 2px; }
.mf-how__art.is-skill img { width: 70px; height: 70px; box-shadow: 0 0 0 6px #ff7fb3; animation: mfReady .8s ease-in-out infinite alternate; }
.mf-how__art.is-skill em { font-style: normal; font-size: 12px; background: #ff4f93; color: #fff; padding: 1px 10px; border-radius: 99px; margin-top: 8px; }
.mf-how__dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.mf-how__dots i { width: 8px; height: 8px; border-radius: 50%; background: #e2d8f2; }
.mf-how__dots i.is-on { background: #ff7fb3; }

.mf-result { max-width: 420px; margin: 0 auto; text-align: center; }
.mf-result__h { margin: 4px 0 0; font-size: 16px; color: #8a6d2f; letter-spacing: .1em; }
.mf-new { display: inline-block; padding: 4px 14px; border-radius: 99px; background: linear-gradient(90deg, #ff5f7e, #ffb347); color: #fff; letter-spacing: .04em; animation: mfPop .5s ease-out; }
.mf-result__score b { font-size: 50px; font-weight: 800; color: #fff; -webkit-text-stroke: 2px #ff8a3d; text-shadow: 0 4px 0 #ff8a3d, 0 10px 24px rgba(200, 100, 30, .25); font-variant-numeric: tabular-nums; }
.mf-result__score small { font-size: 16px; color: #b0560f; margin-left: 4px; }
.mf-result__best { margin: 0 0 10px; font-size: 12px; color: #8a7f9e; }
.mf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mf-stats span { padding: 6px 4px; border-radius: 12px; background: rgba(255, 255, 255, .85); }
.mf-stats small { display: block; font-size: 10px; color: #8a7f9e; }
.mf-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.mf-grow { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border-radius: 14px; background: #fff; text-align: left; }
.mf-grow__face { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.mf-grow > div { flex: 1; min-width: 0; }
.mf-grow b { font-size: 14px; }
.mf-grow em { font-style: normal; color: #fff; background: #ff4f93; padding: 1px 8px; border-radius: 99px; font-size: 11px; animation: mfPop .5s ease-out; }
.mf-grow .mf-xp { margin-top: 4px; grid-template-columns: 1fr auto; }
.mf-gets { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; color: #6d5f78; }
.mf-shard { display: inline-flex; align-items: center; gap: 2px; }
.mf-shard .mf-face { width: 28px; height: 28px; border-radius: 50%; }
.mf-acorn { color: #8a5a20; }
.mf-joined { margin: 8px 0 0; font-size: 14px; color: #ff4f93; animation: mfPop .5s ease-out; }
.mf-srv { margin-top: 8px; }
.mf-srvline { margin: 6px 0 0; font-size: 13px; }
.mf-srvline b { color: #7b61d9; font-size: 16px; }
.mf-srvline.is-stamp b { color: #d2641a; }
.mf-result__mh { margin: 14px 0 6px; font-size: 13px; color: #8a6d2f; }
.mf-result .mf-join { margin-top: 12px; }

.mf-toast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 100px); z-index: 60; transform: translateX(-50%) translateY(20px); padding: 9px 18px; border-radius: 99px; background: rgba(40, 24, 70, .88); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; }
.mf-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 低い画面（360×640 など）: 上下を詰めて盤を広く */
@media (max-height: 700px) {
	.mf-hud { padding: 6px 10px 4px; grid-template-rows: auto 14px; }
	.mf-pause { width: 36px; height: 36px; }
	.mf-score b { font-size: 23px; }
	.mf-time { height: 14px; }
	.mf-time span { line-height: 14px; font-size: 11px; }
	.mf-foot { height: 80px; grid-template-columns: 50px 1fr 70px; padding: 4px 12px 8px; }
	.mf-skill { width: 66px; height: 66px; padding: 5px !important; }
	.mf-me img { width: 40px; height: 40px; }
	.mf-title { gap: 8px; }
	.mf-logo span { font-size: 34px; }
	.mf-logo em { margin-bottom: 3px; font-size: 18px; }
	.mf-logo small { margin-top: 6px; }
	.mf-play { height: 56px; font-size: 23px; }
	.mf-card { padding: 8px 10px; }
	.mf-card__face { width: 50px; height: 50px; }
	.mf-result__score b { font-size: 42px; }
}
@media (max-height: 580px) {
	.mf-logo small { display: none; }
	.mf-card__sk { display: none; }
}
/* PC: 横長の画面では真ん中に縦長のアプリとして置く */
@media (min-width: 520px) {
	.mf-app { border-radius: 0; box-shadow: 0 0 40px rgba(60, 60, 120, .18); }
}
/* SGC1002 第2段 ガチャのツム（顔札の見本・マイツムの見出し） */
.mf-tpv { border-radius: 50% !important; background: #fff !important; }
.mf-tpv img { width: 136%; height: 136%; object-fit: cover; margin-top: -6%; }
.mf-tpv::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px #7cc8ff; pointer-events: none; }
.mf-tpv.is-face img { width: 100%; height: 100%; margin: 0; }
.mf-tpv.is-face::after { display: none; }
.mf-tsh { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 8px; font-size: 16px; color: #5a4a7a; }
.mf-tsh small { padding: 1px 8px; border-radius: 99px; background: #e8f6ff; color: #2b7fd6; font-size: 11px; }
.mf-cell small .mf-gtag { margin-left: 0; }
.mf[data-skin="yoru"] .mf-app { background: linear-gradient(180deg, #2b2f6b 0%, #3a2d6e 60%, #5b3f8f 100%); }
.mf[data-skin="yoru"] .mf-score small, .mf[data-skin="yoru"] .mf-best small, .mf[data-skin="yoru"] .mf-best b, .mf[data-skin="yoru"] .mf-me span, .mf[data-skin="yoru"] .mf-info { color: #d9d2ff; }
.mf[data-skin="umi"] .mf-app { background: linear-gradient(180deg, #7fdde6 0%, #c9f5ee 60%, #e6fff8 100%); }
.mf[data-skin="sakura"] .mf-app { background: linear-gradient(180deg, #ffd0e4 0%, #ffe9f2 60%, #fff6e6 100%); }
/* SGC1002 ガチャの入口とレアの印 */
.mf-gcbar { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 9px 14px; border-radius: 16px; background: linear-gradient(90deg, #fff1f8, #fff7df) !important; box-shadow: 0 3px 0 #f3b8d4; text-align: left; }
.mf-gcbar b { flex: none; font-size: 15px; color: #e0408a; }
.mf-gcbar span { flex: 1; min-width: 0; font-size: 11.5px; color: #9a6a88; line-height: 1.35; }
.mf-gcbar .mf-dot { right: 8px; top: 8px; }
.mf-gcbar.is-skin { margin-top: 12px; }
.mf-gtag { display: inline-block; margin-left: 2px; padding: 0 5px; border-radius: 6px; font-style: normal; font-size: 10px; line-height: 16px; vertical-align: 1px; color: #fff; background: #9fb3c8; }
.mf-gtag.is-r { background: #5aa9e6; }
.mf-gtag.is-sr { background: linear-gradient(90deg, #b48cff, #ff8ad0); }
.mf-gtag.is-ur { background: linear-gradient(90deg, #ff7a7a, #ffc46e, #7ee08a, #6ec8ff, #b98bff); text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { .mf-logo span, .mf-skill.is-ready, .mf-time.is-low { animation: none; } }
