@charset "utf-8";
/* ============================================================
    機器チェック（キーボード・マウス・カメラ・マイク・スピーカー・画面）
    ============================================================ */

/* 画面テストで出す色（ドット抜けを見つけるための、混じりけのない色） */
:root{
    --screenWhite: #ffffff;
    --screenBlack: #000000;
    --screenRed: #ff0000;
    --screenGreen: #00ff00;
    --screenBlue: #0000ff;
    --screenGray: #808080;
    --screenHint: rgba(128, 128, 128, 0.85);
}

/* ▼ キーボード */
.keyTestNow{
    margin: 0 0 var(--spaceMd);
    padding: 0.75rem 1rem;
    border-radius: var(--radiusSm);
    background: var(--catSoft);
    color: var(--catText);
    font-weight: 700;
    text-align: center;
}
.keyTestBoard{
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: var(--radiusMd);
    background: var(--bgMuted);
    overflow-x: auto;
}
.keyRow{
    display: flex;
    gap: 4px;
    min-width: 640px;
}
.keyCap{
    flex: 1 1 0;
    display: grid;
    place-items: center;
    min-width: 0;
    height: 40px;
    border-radius: 6px;
    background: var(--bgCard);
    box-shadow: 0 2px 0 var(--lineStrong);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 80ms ease, transform 80ms ease;
}
.keyCap.isEnterTail{
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.keyCap.isTested{
    background: var(--catSoft);
    color: var(--catText);
}
.keyCap.isDown{
    background: var(--catColor);
    color: var(--textOnAccent);
    transform: translateY(2px);
    box-shadow: none;
}
.keyTestInfo{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--spaceLg);
    margin: var(--spaceLg) 0;
}
.keyTestDetail,
.mediaInfo,
.mouseStats{
    display: grid;
    gap: var(--spaceXs);
    margin: 0;
}
.keyTestDetail div,
.mediaInfo div,
.mouseStats div{
    display: grid;
    grid-template-columns: 10em minmax(0, 1fr);
    gap: var(--spaceSm);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}
.keyTestDetail dt,
.mediaInfo dt,
.mouseStats dt{
    font-size: 0.8125rem;
    color: var(--textSub);
}
.keyTestDetail dd,
.mediaInfo dd,
.mouseStats dd{
    margin: 0;
    font-family: var(--fontMono);
    font-weight: 700;
    overflow-wrap: anywhere;
}
.keyTestLog{
    margin: 0;
    padding-left: 1.6em;
    font-family: var(--fontMono);
    font-size: 0.8125rem;
    color: var(--textSub);
}
.keyTestLog li{
    margin: 0;
}
@media (max-width: 719px){
    .keyTestInfo{
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ▼ マウス */
.mouseArea{
    display: grid;
    justify-items: center;
    gap: var(--spaceSm);
    padding: var(--spaceXl) var(--spaceLg);
    border: 3px dashed var(--catColor);
    border-radius: var(--radiusLg);
    background: var(--catSoft);
    user-select: none;
    cursor: pointer;
}
.mouseArea:focus-visible{
    outline: 3px solid var(--focusRing);
    outline-offset: 2px;
}
.mouseFigure{
    position: relative;
    width: 120px;
    height: 180px;
    border: 3px solid var(--textMain);
    border-radius: 60px 60px 56px 56px;
    background: var(--bgCard);
}
.mouseBtn{
    position: absolute;
    top: 0;
    width: 50%;
    height: 42%;
    border-bottom: 3px solid var(--textMain);
}
.mouseLeft{
    left: 0;
    border-right: 1.5px solid var(--textMain);
    border-radius: 57px 0 0 0;
}
.mouseRight{
    right: 0;
    border-left: 1.5px solid var(--textMain);
    border-radius: 0 57px 0 0;
}
.mouseWheel{
    position: absolute;
    top: 16%;
    left: 50%;
    z-index: 1;
    width: 16px;
    height: 34px;
    margin-left: -8px;
    border: 3px solid var(--textMain);
    border-radius: 8px;
    background: var(--bgCard);
}
.mouseSide{
    position: absolute;
    left: -9px;
    width: 8px;
    height: 22px;
    border: 3px solid var(--textMain);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: var(--bgCard);
}
.mouseForward{
    top: 46%;
}
.mouseBack{
    top: 62%;
}
.mouseFigure .isTested{
    background: var(--highlightSoft);
}
.mouseFigure .isDown{
    background: var(--catColor);
}
.mouseNow{
    margin: 0;
    font-weight: 700;
    text-align: center;
}
.mousePos{
    margin: 0;
    min-height: 1.5em;
    font-size: 0.8125rem;
    color: var(--textSub);
}
.mouseStats{
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    column-gap: var(--spaceXl);
    margin: var(--spaceLg) 0;
}
.mouseStats dd.isWarn{
    color: var(--danger);
}

/* ▼ カメラ・マイク */
.mediaStage{
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    margin-bottom: var(--spaceLg);
    border-radius: var(--radiusMd);
    background: var(--bgCode);
    overflow: hidden;
}
.camVideo{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.camVideo.isMirror{
    transform: scaleX(-1);
}
.mediaPlaceholder{
    position: absolute;
    margin: 0;
    color: var(--textOnCode);
}
.mediaInfo{
    margin: var(--spaceLg) 0;
}
.micMeter{
    --level: 0;
    height: 28px;
    border-radius: var(--radiusPill);
    background: var(--bgMuted);
    overflow: hidden;
}
.micMeterBar{
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success) 0 60%, var(--highlight) 60% 85%, var(--danger) 85%);
    transform: scaleX(var(--level));
    transform-origin: left center;
}
.micAudio{
    display: block;
    width: 100%;
    margin-top: var(--spaceMd);
}

/* ▼ スピーカー */
.speakerButtons{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spaceMd);
    margin-bottom: var(--spaceLg);
}
.speakerBtn{
    display: grid;
    justify-items: center;
    gap: var(--spaceSm);
    padding: 1.25rem 0.5rem;
    border: 2px solid var(--line);
    border-radius: var(--radiusMd);
    background: var(--bgCard);
    font-weight: 700;
}
.speakerBtn .icon{
    width: 36px;
    height: 36px;
    color: var(--catText);
}
.speakerBtn[aria-pressed="true"]{
    border-color: var(--catColor);
    background: var(--catSoft);
}
.speakerBtn:focus-visible{
    outline: 3px solid var(--focusRing);
    outline-offset: 2px;
}
@media (hover: hover){
    .speakerBtn:hover{
        border-color: var(--catColor);
    }
}
@media (max-width: 719px){
    .speakerButtons{
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ▼ 画面テスト */
.screenColors{
    display: flex;
    flex-wrap: wrap;
    gap: var(--spaceSm);
    margin-bottom: var(--spaceMd);
}
.screenColor{
    display: inline-flex;
    align-items: center;
    gap: var(--spaceSm);
    min-height: 44px;
    padding: 0.3em 1em 0.3em 0.5em;
    border: 2px solid var(--line);
    border-radius: var(--radiusPill);
    background: var(--bgCard);
    font-weight: 700;
}
.screenColor:focus-visible{
    outline: 3px solid var(--focusRing);
    outline-offset: 2px;
}
@media (hover: hover){
    .screenColor:hover{
        border-color: var(--catColor);
    }
}
.screenSwatch{
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--lineStrong);
}
.screenSwatch.isWhite,
.screenFull[data-color="white"]{
    background: var(--screenWhite);
}
.screenSwatch.isBlack,
.screenFull[data-color="black"]{
    background: var(--screenBlack);
}
.screenSwatch.isRed,
.screenFull[data-color="red"]{
    background: var(--screenRed);
}
.screenSwatch.isGreen,
.screenFull[data-color="green"]{
    background: var(--screenGreen);
}
.screenSwatch.isBlue,
.screenFull[data-color="blue"]{
    background: var(--screenBlue);
}
.screenSwatch.isGray,
.screenFull[data-color="gray"]{
    background: var(--screenGray);
}
.screenSwatch.isGradient,
.screenFull[data-color="gradient"]{
    background: linear-gradient(90deg, var(--screenBlack), var(--screenWhite));
}
/* 全画面（全画面にできない端末でも、画面いっぱいに広げる） */
.screenFull{
    position: fixed;
    inset: 0;
    z-index: var(--zSkipLink);
    display: grid;
    place-items: center;
    cursor: none;
}
.screenFull:focus{
    outline: none;
}
.screenFullHint{
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: var(--radiusPill);
    background: var(--screenHint);
    color: var(--screenWhite);
    font-size: 0.875rem;
}
.isScreenTest body{
    overflow: hidden;
}
