/* ===== App Layout (75-82) ===== */
.app-container {
    display: flex;
    flex-direction: column; /* 全体を縦積みにして下部にバーを配置 */
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

.app-main-row {
    display: flex;
    flex: 1; /* 上部の余白をすべて埋める */
    width: 100%;
    min-height: 0;
    position: relative;
}

/* Label logic (212-230) */
.field-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    margin: 4px 0 10px;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label::after {
    content: "";
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
    flex: 1;
}

/* Main Area (476-484) */
.main {
    flex-grow: 1;
    min-width: 0;
    /* フレックス項目のはみ出し防止 */
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
}

/* Modal (702-730) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 400px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* Toggles & Dividers (1373-1407) */
.scope-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.scope-btn {
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--text-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.scope-btn.active {
    background: rgba(52, 120, 255, 0.15) !important;
    color: var(--accent) !important;
    box-shadow: 0 2px 8px var(--accent-glow);
}