html, body {
    height: 100%;
    margin: 0;
    background: #0f172a;
    overflow: hidden;
    font-family: sans-serif;
}

.dots {
    position: absolute;
    top: 60%;
    left: 0;
    right: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 0;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fef9c3;
}

.dot.red {
    background: #f87171;
}

.stage {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: manipulation;
    cursor: pointer;
    z-index: 1;
}

.ripple {
    position: absolute;
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.001);
    opacity: 1;
    will-change: transform, opacity;
    animation: rippleLine var(--ripple-duration, 800ms) linear forwards;
    -webkit-transform: translate(-50%, -50%) scale(0.001);
    -webkit-animation: rippleLine var(--ripple-duration, 800ms) linear forwards;
}

@keyframes rippleLine {
    0% {
    transform: translate(-50%, -50%) scale(0.001);
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(0.001);
    }
    100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    -webkit-transform: translate(-50%, -50%) scale(1);
    }
}

.hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e1;
    text-align: center;
    user-select: none;
    font-size: 16px;
    line-height: 1.6;
}

.controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    color: #e2e8f0;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    -webkit-display: flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2;
}

.controls > * + * {
    margin-top: 8px;
}

.controls-row {
    display: flex;
    -webkit-display: flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: flex-start;
    -webkit-justify-content: flex-start;
}

.controls-row > * + * {
    margin-left: 12px;
}

.controls-break {
    width: 100%;
    height: 0;
}

.controls input[type="range"] {
    width: 120px;
    -webkit-appearance: slider-horizontal;
}

.controls input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.controls label {
    display: flex;
    -webkit-display: flex;
    align-items: center;
    -webkit-align-items: center;
    white-space: nowrap;
}

.speed-value {
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
}

.frequency-value {
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
}

.last-updated {
    position: fixed;
    right: 12px;
    bottom: 12px;
    font-size: 12px;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
}

/* 観測者モードの5角形（右向き矢印） */
.observer-pentagon {
    clip-path: polygon(0% 0%, 60% 0%, 100% 50%, 60% 100%, 0% 100%);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}