/* MBTI卓球 — 画面の見た目（#pp の中だけ） */
html, body.ppb { margin: 0; padding: 0; height: 100%; background: #ffd9a8; overflow: hidden; overscroll-behavior: none; }
body.ppb { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.pp { position: fixed; inset: 0; overflow: hidden; color: #3b2a4a; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
	font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Meiryo", sans-serif; font-weight: 700; }
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp-cv { position: absolute; inset: 0; display: block; touch-action: none; }
.pp-boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; text-align: center; }

/* 点数 */
.pp-hud { position: absolute; left: 0; right: 0; top: 0; display: none; align-items: flex-start; justify-content: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 56px 0; pointer-events: none; }
.pp-hud.on { display: flex; }
.pp-sc { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, .92); box-shadow: 0 3px 0 rgba(120, 70, 30, .25); }
.pp-sc b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 5.5em; }
.pp-me b { color: #d62839; } .pp-op b { color: #2f5aa8; }
.pp-n { font-size: 30px; line-height: 1; min-width: 1.2em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.pp-n.bump { animation: ppbump .45s ease-out; }
@keyframes ppbump { 0% { transform: scale(1.7); color: #ff9f1c; } 100% { transform: scale(1); } }
.pp-sv { width: 12px; height: 12px; border-radius: 50%; background: #f08a1c; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .15); opacity: 0; transition: opacity .2s; }
.pp-sv.on { opacity: 1; }
.pp-g { position: absolute; left: 0; right: 0; bottom: -15px; font-size: 10px; font-style: normal; letter-spacing: 2px; text-align: center; color: #7a4b2a; }
.pp-hud { position: absolute; }
.pp-mid { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); }
.pp-st { display: block; font-size: 11px; color: #7a4b2a; white-space: nowrap; }
.pp-st.hot { color: #fff; background: #e63946; padding: 3px 8px; border-radius: 10px; animation: pphot 1s ease-in-out infinite; }
@keyframes pphot { 50% { transform: scale(1.08); } }
.pp-pause { position: absolute; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #3b2a4a; font: 800 14px/40px inherit; font-family: inherit; letter-spacing: -1px; pointer-events: auto; box-shadow: 0 3px 0 rgba(120, 70, 30, .25); cursor: pointer; }

/* 知らせ */
.pp-banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; text-align: center; transition: opacity .15s, transform .25s cubic-bezier(.2, 1.6, .4, 1); width: max-content; max-width: calc(100% - 32px); }
.pp-banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pp-banner b { display: block; padding: 10px 22px; border-radius: 22px; background: #fff; font-size: 22px; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.pp-banner.win b { background: #ffd23f; color: #6b3a00; }
.pp-banner.lose b { background: #eef1f8; color: #44506b; }
.pp-banner.hot b { background: #e63946; color: #fff; }
.pp-banner.start b { background: #3a86ff; color: #fff; }
.pp-banner small { display: block; margin-top: 8px; font-size: 13px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.pp-hint { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); margin: 0 auto; max-width: 420px; padding: 10px 14px; border-radius: 16px; background: rgba(40, 25, 60, .78); color: #fff; font-size: 14px; line-height: 1.45; text-align: center; pointer-events: none; opacity: 0; transform: translateY(10px); transition: .2s; }
.pp-hint.on { opacity: 1; transform: none; animation: pphint 1.6s ease-in-out infinite; }
.pp-hint small { font-size: 11px; opacity: .85; }
@keyframes pphint { 50% { transform: translateY(-4px); } }

/* 重ねる画面 */
.pp-ui { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pp-ui.on { display: flex; }
.pp-ui.dim { background: rgba(50, 25, 60, .35); }
.pp-ui.tut { display: block; inset: auto 0 0 0; padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 14px); pointer-events: none; }
.pp-card { width: 100%; max-width: 440px; margin: auto; padding: 20px 18px; border-radius: 24px; background: #fffaf2; box-shadow: 0 8px 0 rgba(120, 70, 30, .25), 0 20px 40px rgba(0, 0, 0, .18); text-align: center; }
.pp-card h2 { margin: 0 0 14px; font-size: 20px; }
.pp-title { width: 100%; max-width: 420px; margin: auto; text-align: center; }
.pp-logo { margin: 0; font-size: 64px; line-height: 1; color: #fff; letter-spacing: 2px; text-shadow: 0 4px 0 #e63946, 0 8px 0 #9d1f2b, 0 12px 24px rgba(0, 0, 0, .25); font-weight: 800; }
.pp-logo small { display: block; font-size: 24px; letter-spacing: 6px; margin-bottom: 4px; color: #ffd23f; text-shadow: 0 3px 0 #9d1f2b; }
.pp-sub { margin: 18px auto 10px; padding: 8px 14px; max-width: 320px; border-radius: 14px; background: rgba(255, 255, 255, .88); font-size: 14px; line-height: 1.5; }
.pp-chip { display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 999px; background: #3a86ff; color: #fff; font-size: 12px; }
.pp-foot { margin: 16px 0 0; font-size: 13px; }
.pp-foot a { color: #7a3b10; background: rgba(255, 255, 255, .8); padding: 4px 10px; border-radius: 10px; }
.pp-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.pp-btns.col { flex-direction: column; align-items: stretch; max-width: 300px; margin-left: auto; margin-right: auto; }
.pp-row { display: flex; gap: 10px; } .pp-row .pp-b { flex: 1; }
.pp-b { appearance: none; border: 0; border-radius: 18px; padding: 13px 18px; min-height: 48px; background: #fff; color: #3b2a4a; font: inherit; font-size: 16px; font-weight: 800; box-shadow: 0 4px 0 rgba(120, 70, 30, .3); cursor: pointer; transition: transform .08s; }
.pp-b:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(120, 70, 30, .3); }
.pp-b.main { background: #e63946; color: #fff; box-shadow: 0 4px 0 #9d1f2b; }
.pp-b.big { font-size: 22px; padding: 16px; }
.pp-b.ghost { background: rgba(255, 255, 255, .7); }
.pp-b.sm { font-size: 13px; padding: 8px 12px; min-height: 40px; }
.pp-b.sel { background: #3a86ff; color: #fff; box-shadow: 0 4px 0 #2459b5; }
.pp-b:focus-visible, .pp-lv:focus-visible { outline: 3px solid #3a86ff; outline-offset: 2px; }

/* 強さえらび */
.pp-levels { max-width: 460px; }
.pp-lv { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; width: 100%; margin: 0 0 10px; padding: 10px 12px; border: 3px solid var(--c); border-radius: 20px; background: #fff; text-align: left; font: inherit; color: inherit; box-shadow: 0 4px 0 var(--d); cursor: pointer; }
.pp-lv:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d); }
.pp-face { grid-row: 1 / 4; width: 72px; height: 72px; border-radius: 16px; background: color-mix(in srgb, var(--c) 18%, #fff); }
.pp-lv-t { display: flex; align-items: baseline; gap: 8px; }
.pp-lv-t b { font-size: 19px; color: var(--d); }
.pp-lv-t em { font-style: normal; font-size: 14px; }
.pp-lv-t small { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: var(--c); color: #fff; font-size: 10px; }
.pp-lv-d { font-size: 12px; line-height: 1.45; color: #5d4a6a; font-weight: 700; }
.pp-lv-r { font-size: 11px; color: #8a7a92; }
.pp-fmt { display: flex; gap: 8px; justify-content: center; margin: 6px 0 12px; }

/* 結果 */
.pp-res-h { font-size: 54px; line-height: 1.1; font-weight: 800; }
.pp-res.win .pp-res-h { color: #e63946; text-shadow: 0 4px 0 #ffd23f; animation: ppwin .7s cubic-bezier(.2, 1.8, .4, 1); }
.pp-res.lose .pp-res-h { color: #5b6b8c; }
@keyframes ppwin { 0% { transform: scale(.3) rotate(-10deg); } 100% { transform: none; } }
.pp-res-s { margin: 6px 0; font-size: 14px; }
.pp-games { list-style: none; display: flex; justify-content: center; gap: 12px; margin: 8px 0; padding: 0; font-size: 26px; }
.pp-games b.w { color: #e63946; }
.pp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 6px; }
.pp-stats span { padding: 8px 2px; border-radius: 12px; background: #fff; font-size: 10px; color: #7a6a82; }
.pp-stats b { display: block; font-size: 18px; color: #3b2a4a; }
.pp-new { margin: 8px 0; padding: 6px 10px; border-radius: 12px; background: #ffd23f; color: #6b3a00; font-size: 13px; }
.pp-stamp { min-height: 22px; margin: 8px 0 0; font-size: 13px; }
.pp-stamp small { color: #6b5a72; font-size: 12px; } .pp-stamp a { color: #2f5aa8; }
.pp-got { display: block; color: #2a9d55; font-size: 16px; }

/* 記録・ルール */
.pp-tw { overflow-x: auto; }
.pp-rec table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pp-rec th, .pp-rec td { padding: 8px 4px; border-bottom: 1px solid #f0e2cf; white-space: nowrap; }
.pp-rec thead th { font-size: 10px; color: #8a7a92; }
.pp-rec tbody th small { display: block; font-size: 10px; color: #8a7a92; }
.pp-note { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: #8a7a92; }
.pp-rules ul { margin: 0; padding: 0 0 0 1.2em; text-align: left; font-size: 14px; line-height: 1.7; }

/* れんしゅう */
.pp-tut { position: relative; max-width: 460px; margin: 0 auto; padding: 12px 14px 12px; border-radius: 18px; background: rgba(255, 250, 242, .95); box-shadow: 0 5px 0 rgba(120, 70, 30, .25); pointer-events: auto; }
.pp-tut-h { display: flex; align-items: center; gap: 8px; }
.pp-tut-h span { font-size: 11px; color: #8a7a92; }
.pp-tut-h b { font-size: 17px; color: #e63946; }
.pp-tut-h em { font-style: normal; font-size: 15px; color: #2a9d55; }
.pp-tut p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; font-weight: 700; }
.pp-tut p small { color: #8a7a92; }
.pp-tut .pp-b { margin-left: auto; flex: none; }
.pp.tutmode .pp-hint { bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }

@media (min-width: 700px) and (min-height: 600px) {
	.pp-logo { font-size: 84px; }
	.pp-hud { gap: 16px; }
	.pp-sc b { font-size: 15px; max-width: 8em; }
	.pp-n { font-size: 38px; }
	.pp-st { font-size: 14px; }
}
@media (max-height: 560px) {
	.pp-logo { font-size: 44px; } .pp-logo small { font-size: 18px; }
	.pp-card { padding: 14px; }
	.pp-res-h { font-size: 38px; }
	.pp-lv { grid-template-columns: 52px 1fr; padding: 6px 10px; } .pp-face { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
	.pp-hint.on, .pp-st.hot, .pp-res.win .pp-res-h { animation: none; }
}

/* オンライン対戦（PPNET1023）: 入口・部屋・声のボタン・応援スタンプ・知らせ */
.pp-b.online { background: #3a86ff; color: #fff; box-shadow: 0 4px 0 #2459b5; }
.pp-b.online small { display: block; font-size: 11px; opacity: .9; }
.pp-online h2 small, .pp-room h2 small { font-size: 12px; color: #8a7a92; }
.pp-net-lead { margin: 0 0 6px; font-size: 14px; line-height: 1.6; }
.pp-net-msg { margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; background: #fff0f0; color: #a3263a; font-size: 13px; line-height: 1.5; }
.pp-code { display: flex; gap: 6px; justify-content: center; margin: 14px auto 0; max-width: 300px; }
.pp-code input { flex: 1; min-width: 0; height: 40px; border: 2px solid #e6d5f2; border-radius: 14px; padding: 0 10px; font: inherit; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; text-align: center; background: #fff; color: #3b2a4a; }
.pp-roomcode { margin: 0 auto 10px; }
.pp-roomcode small { display: block; font-size: 11px; color: #8a7a92; }
.pp-roomcode b { font-size: 30px; letter-spacing: .18em; color: #2f5aa8; }
.pp-people { list-style: none; margin: 0 auto; padding: 0; max-width: 320px; text-align: left; }
.pp-people li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 14px; background: #fff; margin: 0 0 6px; min-width: 0; }
.pp-people li b { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-people li em { font-style: normal; font-size: 11px; color: #8a7a92; white-space: nowrap; }
.pp-people li.wait { opacity: .7; } .pp-people li.wait b { font-size: 13px; }
.pp-people li.sub { display: block; background: none; font-size: 12px; color: #8a7a92; padding: 2px 8px; }
.pp-av { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #f1e6f7 center / cover no-repeat; }
.ppvc { position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 5; }
.ppvc-b { appearance: none; border: 0; display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px; border-radius: 999px; background: rgba(40, 25, 60, .82); color: #fff; font: inherit; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.ppvc-b span { font-size: 11px; }
.ppvc-b.on { background: #2a9d6a; } .ppvc-b.on.mute { background: #6b6f80; } .ppvc-b.off { background: rgba(255, 255, 255, .85); color: #6b3a4a; min-height: 32px; padding: 4px 10px; font-size: 12px; }
.ppvc-opp { max-width: 9em; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .85); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: box-shadow .1s; }
.ppvc-opp.talk { box-shadow: 0 0 0 3px #2a9d6a; }
.ppch { position: absolute; left: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.ppch button { appearance: none; border: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .8); font-size: 20px; cursor: pointer; box-shadow: 0 3px 0 rgba(120, 70, 30, .25); }
.ppch button:active { transform: scale(.9); }
.pp-toast { position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); transform: translate(-50%, -8px); max-width: calc(100% - 32px); width: max-content; padding: 8px 14px; border-radius: 14px; background: rgba(40, 25, 60, .88); color: #fff; font-size: 13px; line-height: 1.45; text-align: center; opacity: 0; pointer-events: none; transition: .2s; z-index: 6; }
.pp-toast.on { opacity: 1; transform: translate(-50%, 0); }
