/* 体育アプリ ランチャー v1.6.3 */
.pe-launcher-root {
    position: relative;
    font-family: "BIZ UDGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    box-sizing: border-box;
}
.pe-launcher-root *, .pe-launcher-root *::before, .pe-launcher-root *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
/* 詳細度を下げ、各ボタンの背景・枠線を優先する。 */
:where(.pe-launcher-root) button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}
.pe-launcher-root .pe-launcher-hidden { display: none !important; }
.pe-launcher-picker {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    background: linear-gradient(160deg, #f4f6f9, #e9edf4);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.pe-launcher-picker::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
    background: linear-gradient(transparent, rgba(30, 58, 95, .12));
    pointer-events: none;
}
.pe-launcher-card {
    width: 100%;
    max-width: 980px;
    min-height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.pe-launcher-brand {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #1e3a5f;
    margin-bottom: 10px;
}
.pe-launcher-lanes { display: flex; flex-direction: column; gap: 10px; }
.pe-launcher-lane {
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-height: 150px;
    background: var(--cat-bg);
    border-radius: 16px;
    padding: 10px 14px;
}
.pe-launcher-lane-label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: var(--cat);
    border-radius: 10px;
    padding: 8px 5px;
    flex-shrink: 0;
    letter-spacing: .12em;
}
.pe-launcher-lane-tiles { flex: 1; display: flex; align-items: stretch; gap: 12px; }
.pe-launcher-root .pe-launcher-tile-sport {
    flex: 0 1 190px;
    width: 100%;
    min-width: 0;
    max-width: 190px;
    min-height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 6px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(30,58,95,.08);
    transition: border-color .12s, transform .1s;
}
.pe-launcher-root .pe-launcher-tile-sport:hover,
.pe-launcher-root .pe-launcher-tile-sport:focus-visible { border-color: var(--cat); }
.pe-launcher-root .pe-launcher-tile-sport:active { transform: scale(.97); }
.pe-launcher-tile-icon {
    width: auto;
    height: clamp(60px, 11vh, 120px);
    max-width: 90%;
    object-fit: contain;
}
.pe-launcher-tile-title { font-size: clamp(14px, 1.6vw, 16px); font-weight: 800; color: #1e3a5f; line-height: 1.3; }
.pe-launcher-empty { padding: 40px 20px; color: #6b7a8d; font-size: 14px; font-weight: 700; }
.pe-launcher-utility-bar {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 12px 8px;
    font-size: 14px;
}
.pe-launcher-root .pe-launcher-utility-tile {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1e3a5f;
    font-weight: 800;
    border: 2px solid #d4af37;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 16px;
}
.pe-launcher-root .pe-launcher-utility-tile:hover { background: #fbf3da; }
.pe-launcher-utility-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #1e3a5f;
    font-weight: 800;
    text-decoration: underline;
    padding: 8px 10px;
    border-radius: 8px;
}
.pe-launcher-utility-link:hover { background: #eef1f6; }
.pe-launcher-utility-sep { width: 1px; height: 28px; background: #d7dde6; }
.pe-launcher-settings { width: 100%; color: #1e3a5f; }
.pe-launcher-settings summary {
    width: fit-content;
    min-height: 44px;
    margin: auto;
    padding: 10px;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}
.pe-launcher-settings summary::-webkit-details-marker { display: none; }
.pe-launcher-settings summary img { display: inline-block; vertical-align: middle; margin-right: 5px; }
.pe-launcher-settings-body { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 12px 0; }
.pe-launcher-utility-label { width: 100%; color: #6b7a8d; font-weight: 700; }
.pe-launcher-root .pe-launcher-reset-btn {
    min-height: 44px;
    background: #fff;
    color: #b04040;
    border: 2px solid #ecd3d3;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 700;
}
.pe-launcher-root .pe-launcher-reset-btn:hover,
.pe-launcher-root .pe-launcher-reset-btn:focus-visible { border-color: #b04040; background: #fff5f5; }
.pe-launcher-reset-message { width: 100%; font-size: 14px; font-weight: 700; color: #1e3a5f; }
.pe-launcher-root .pe-launcher-switch-btn {
    position: fixed;
    left: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 2147482001;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 3px 12px rgba(30,58,95,.35);
}
.pe-launcher-root .pe-launcher-switch-btn:hover { background: #27496f; }
.pe-launcher-root .pe-launcher-switch-btn img { display: block; width: 24px; height: 24px; filter: brightness(0) invert(1); }
.pe-launcher-root .pe-launcher-switch-label { margin-left: 6px; }
.pe-launcher-app-slot { position: relative; }
@media (max-width: 720px) {
    .pe-launcher-lane { flex-direction: column; }
    .pe-launcher-lane-label { writing-mode: horizontal-tb; padding: 6px 12px; align-self: flex-start; }
    .pe-launcher-lane-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pe-launcher-root .pe-launcher-tile-sport { max-width: 190px; min-height: 132px; justify-self: stretch; }
    .pe-launcher-tile-icon { height: 78px; }
}
@media (max-width: 480px) {
    .pe-launcher-brand { font-size: 18px; }
    .pe-launcher-lane { padding: 10px; }
    .pe-launcher-root .pe-launcher-tile-sport { max-width: none; }
    .pe-launcher-utility-sep { display: none; }
    .pe-launcher-root .pe-launcher-utility-tile { width: 100%; }
    .pe-launcher-root .pe-launcher-switch-btn { left: 10px; }
}

/* v1.6.2: 戻るボタンは各アプリの既存ツール領域に置く。主操作ボタンに重ねない。 */
.pe-launcher-root .pe-toolbar .pe-launcher-switch-btn,
.pe-launcher-root .gym-toolbar .pe-launcher-switch-btn {
    position: static;
    inset: auto;
    width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 0;
    border: 2px solid #d4af37 !important;
    border-radius: 50%;
    background: #1e3a5f !important;
    color: #fff !important;
    font-size: 25px !important;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(30,58,95,.3);
}
.pe-launcher-root .pe-toolbar .pe-launcher-switch-label,
.pe-launcher-root .gym-toolbar .pe-launcher-switch-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pe-launcher-root #peLauncherSlotPairGrouping {
    position: fixed;
    inset: 0;
    z-index: 2147481900;
    overflow: auto;
    overscroll-behavior: contain;
    background: #f5f7fa;
}
.pe-launcher-root #peLauncherSlotPairGrouping .ppg-root { min-height: 100%; }
.pe-launcher-root .ppg-header .pe-launcher-switch-btn {
    position: static;
    min-width: 92px;
    min-height: 44px;
    margin-left: auto;
    padding: 8px;
    font-size: 13px;
    border: 2px solid #d4af37 !important;
    border-radius: 8px;
    background: #fff !important;
    color: #1e3a5f !important;
}
.pe-launcher-root .ppg-header .pe-launcher-switch-btn img { filter: none; }
.pe-launcher-root .pe-launcher-reset-all { width: 100%; max-width: 390px; }
@media (max-width: 480px) {
    .pe-launcher-root #peLauncherSlotPairGrouping .ppg-header-status { display: none; }
    .pe-launcher-root .ppg-header .pe-launcher-switch-btn { margin-left: auto; }
}
