/*--------------------------------------------------------------
  Setting フローティングボタン（左下）
----------------------------------------------------------------*/
.nfxv2-setting-toggle {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4a90e2;
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3006;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.nfxv2-setting-toggle:hover {
    background: #357abd;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}
.nfxv2-setting-toggle:active {
    transform: scale(0.95);
}
.nfxv2-setting-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
@media (max-width: 480px) {
    .nfxv2-setting-toggle {
        left: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
}

/*--------------------------------------------------------------
  Chat-box フローティングボタン（右下）
  ※ chat-box.js の toggleChatBox() を呼ぶ
----------------------------------------------------------------*/
.nfxv2-chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3006;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.nfxv2-chat-toggle:hover {
    background: #c52836;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.5);
}
.nfxv2-chat-toggle:active {
    transform: scale(0.95);
}
.nfxv2-chat-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
@media (max-width: 480px) {
    .nfxv2-chat-toggle {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
}

/*--------------------------------------------------------------
  Setting モーダル（スライドイン）
----------------------------------------------------------------*/
#nfxv2-setting-frame {
    position: fixed;
    top: 0;
    left: -100vw;
    width: 100vw;
    height: 100vh;
    background-color: rgba(13, 13, 14, 0.55);
    backdrop-filter: blur(4px);
    z-index: 3009;
    transition: left 0.4s ease-out;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
}
#nfxv2-setting-frame.active {
    left: 0;
}
#nfxv2-setting-frame .setting-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#nfxv2-setting-frame .setting-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
    padding: 18px 24px;
    font-size: 1.15rem;
    font-weight: 600;
    flex-shrink: 0;
}
#nfxv2-setting-frame .setting-navbar .setting-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
#nfxv2-setting-frame .setting-navbar svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}
#nfxv2-setting-frame .setting-navbar #nfxv2-setting-close {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s ease;
}
#nfxv2-setting-frame .setting-navbar #nfxv2-setting-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
#nfxv2-setting-frame .setting-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
#nfxv2-setting-frame .setting-item {
    margin-bottom: 28px;
}
#nfxv2-setting-frame .setting-item h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e3f2fd;
}
#nfxv2-setting-frame .setting-item .setting-hint {
    font-size: 0.78rem;
    color: #6c7a89;
    margin: -6px 0 10px;
    line-height: 1.5;
}
#nfxv2-setting-frame .setting-item .pref-divisions select {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a90e2' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
#nfxv2-setting-frame .setting-item .pref-divisions select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px #e3f2fd;
}
#nfxv2-setting-frame .toggle-group {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
}
#nfxv2-setting-frame .toggle-group input[type=radio] {
    display: none;
}
#nfxv2-setting-frame .toggle-group label {
    flex: 1;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}
#nfxv2-setting-frame .toggle-group label:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}
#nfxv2-setting-frame .toggle-group input[type=radio]:checked + label {
    background: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}
#nfxv2-setting-frame .setting-footer {
    padding: 16px 24px;
    border-top: 1px solid #e3f2fd;
    background: #fafbfc;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}
#nfxv2-setting-frame .setting-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}
#nfxv2-setting-frame .setting-footer .btn-cancel {
    background: #e9ecef;
    color: #495057;
}
#nfxv2-setting-frame .setting-footer .btn-cancel:hover {
    background: #dde2e6;
}
#nfxv2-setting-frame .setting-footer .btn-save {
    background: #4a90e2;
    color: #fff;
}
#nfxv2-setting-frame .setting-footer .btn-save:hover {
    background: #357abd;
}
@media (max-width: 480px) {
    #nfxv2-setting-frame .setting-container {
        max-width: 100%;
    }
}
