
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
}

#permBtn {
    display: none;
    padding: 0.5rem 0;
    width: 100%;
    border: none;
    border-radius: 3px;
    background-color: #2196F3;
    color: #fff;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

#permBtn:active {
    transform: translateY(1px);
}

#modeBanner {
    display: none;
    width: 100%;
    padding: 10px 14px;
    border-radius: 3px;
    line-height: 1.6;
}

#modeBanner.live {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

#modeBanner.demo {
    display: block;
    background: #fff8e1;
    color: #b26a00;
    border: 1px solid #ffe082;
}

.night #modeBanner.demo{
    display: block;
    background: #181a1b;
    border: 1px solid #444;
}



.levelmain {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin: auto;
    border: 1px solid #eee;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 3px;
}

.night .levelmain{
    border:1px solid #444;
}

.levelmain:last-child{
    margin-bottom: 0;
}

/* ============ 方形水平盘（响应式） ============ */

.level-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    margin-bottom: 0.5rem;
}

@supports not (aspect-ratio: 1/1) {
    .level-wrap {
        height: 0;
        padding-top: 100%;
    }

    .level-disc {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }
}

.level-disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    overflow: hidden;
    background: linear-gradient(150deg, #9ad89a 0%, #76c376 52%, #5cae5c 100%);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.grid {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

#target {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 100%;
    pointer-events: none;
}

#target.ok {
    border: 2px solid rgba(255, 255, 255, .9);
}

#target.near {
    border: 2px solid #f39c12;
}

#target.err {
    border: 2px solid #e74c3c;
}

.bubble {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .98), rgba(255, 255, 255, .5) 55%, rgba(255, 255, 255, .06));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .55),
        0 0 10px rgba(255, 255, 255, .35),
        0 2px 6px rgba(0, 0, 0, .3);
    transition: box-shadow .3s ease;
    will-change: transform;
    pointer-events: none;
}

.bubble.ok {
    box-shadow:
        0 0 0 1px rgba(180, 255, 180, .9),
        0 0 14px 4px rgba(120, 255, 140, .55),
        0 2px 6px rgba(0, 0, 0, .3);
}

#calToast {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    padding: 10px 22px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    white-space: nowrap;
    z-index: 5;
}

#calToast.show {
    opacity: 1;
}

.readouts {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    width: 100%;
}

.readout {
    padding: 0.6rem 0.8rem;
    border-radius: 3px;
    text-align: center;
    border: 1px solid #eee;
}

.night .readout{
    border:1px solid #444;
}

.readout .label {
    font-size: 0.5rem;
    color: #9aa0a6;
    margin-bottom: 0.3rem;
    letter-spacing: .5px;
}

.readout .value {
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

#guiling{
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    color: #fff;
    height: 1rem;
    width: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    cursor: pointer;
    background: linear-gradient(150deg, #daebda 0%, #4da24d 52%, #536753 100%);
}

#guiling i{
    font-size: 0.55rem;
    font-weight: bold;
}

@media screen and (max-width: 350px) {
    .readouts {
        grid-template-columns: repeat(2, 1fr);
    }

    .readouts .readout:last-child{
        grid-column: 1 / -1;
    }
}