html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* スクロールバーを隠す */
    width: 100%;
    height: 100%;
}

.footer {
    position: absolute; /* キャンバス内の特定の位置に配置 */
    right: 1vh; /* 画面高さの1%分、右からの位置 */
    bottom: 1vh; /* 画面高さの1%分、下からの位置 */
    padding: 1vh 2vh; /* 画面高さの1%と2%でパディングを設定 */
    z-index: 100; /* キャンバスより上に表示 */
    font-size: min(3vh, 60px); /* 画面高さの3%と16pxのうち大きい方をフォントサイズとして適用 */
}

/* ⚙ ボタン */
.settings-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.settings-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    background: rgba(0, 0, 0, 0.85);
}

/* 設定パネル本体（デフォルトは非表示） */
.settings-panel {
    display: none;
    margin-top: 0.4rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    max-width: 60vw;
}

/* footer に .open が付いたときだけ表示 */
.footer.open .settings-panel {
    display: block;
}

/* 中の行のレイアウト */
.settings-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-panel label {
    font-size: 0.9em;
}

.settings-panel button,
.settings-panel select,
.settings-panel input[type="number"],
.settings-panel input[type="color"] {
    font-size: 0.9em;
}

.pcr-app {
    font-size: 12px;
    z-index: 10;
}
