﻿        @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600&family=Poppins:wght@300;400;600&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            overflow: hidden;
            background: #000;
            cursor: default;
        }
        
        /* === GAME CONTAINER === */
        #gameContainer {
            position: relative;
            width: 100vw;
            height: 100vh;
        }
        
        /* === CONTROLS UI === */
        #controls {
            position: absolute;
            bottom: 20px;
            right: 20px;
            text-align: right;
            color: white;
            background: rgba(0, 0, 0, 0.3);
            padding: 8px 12px;
            border-radius: 8px;
            backdrop-filter: blur(5px);
            font-size: 11px;
            opacity: 0.6;
            transition: opacity 0.3s ease;
        }
        
        #controls:hover {
            opacity: 0.9;
        }
        
        #controls div {
            margin: 2px 0;
        }
        
        /* === LOADING SCREEN === */
        #loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 24px;
            font-family: 'Cinzel', serif;
            text-align: center;
            z-index: 10001;
        }
        
        .loading-bar {
            width: 300px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            margin-top: 20px;
            overflow: hidden;
        }
        
        .loading-progress {
            height: 100%;
            background: linear-gradient(90deg, #FFD700, #FFA500);
            border-radius: 2px;
            animation: loading 2s ease-in-out;
        }
        
        @keyframes loading {
            0% { width: 0%; }
            100% { width: 100%; }
        }
        
        /* === START SCREEN === */
        #startScreen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(135deg, rgba(20, 25, 50, 0.95), rgba(30, 35, 70, 0.9));
            backdrop-filter: blur(10px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }
        
        #startScreen.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }
        
        #startScreenTitle {
            color: #E5E7EB;
            font-size: 48px;
            font-family: 'Cinzel', serif;
            text-align: center;
            margin-bottom: 60px;
            text-shadow: 0 0 20px rgba(139, 92, 246, 0.5),
                         0 0 40px rgba(139, 92, 246, 0.3);
        }
        
        #startScreenButtons {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
        }
        
        .startScreenButton {
            background: linear-gradient(135deg, #8B5CF6, #7C3AED);
            color: white;
            border: none;
            padding: 16px 48px;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                        0 0 20px rgba(139, 92, 246, 0.4);
            transition: all 0.3s ease;
            min-width: 200px;
        }
        
        .startScreenButton:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4),
                        0 0 30px rgba(139, 92, 246, 0.6);
        }
        
        .startScreenButton:active {
            transform: translateY(0);
        }
        
        .startScreenButton.loadButton {
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        
        /* === GAME CLEAR MESSAGE === */

        #interactPrompt {
            position: absolute;
            bottom: 160px;
            left: 50%;
            transform: translateX(-50%);
            color: #e0f2fe;
            font-family: 'Poppins', sans-serif;
            font-size: 15px;
            font-weight: 500;
            background: linear-gradient(145deg, 
                        rgba(20, 25, 50, 0.85), 
                        rgba(30, 35, 70, 0.8));
            padding: 12px 20px;
            border-radius: 6px;
            display: none;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(100, 150, 255, 0.3);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                        0 0 10px rgba(100, 150, 255, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            opacity: 0.9;
            text-align: center;
        }
        
        /* === GRIMOIRE UI === */
        #grimoire {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: linear-gradient(135deg, rgba(30, 20, 60, 0.95), rgba(50, 30, 90, 0.9));
            padding: 15px;
            border-radius: 12px;
            backdrop-filter: blur(15px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 
                        inset 0 1px 0 rgba(255, 255, 255, 0.1),
                        0 0 30px rgba(150, 100, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 300px;
        }
        
        #grimoireTitle {
            color: #E5E7EB;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 5px;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }
        
        #promptInput {
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-family: 'Poppins', sans-serif;
            font-size: 13px;
            outline: none;
            transition: all 0.3s ease;
        }
        
        #itemPromptInput:focus {
            border-color: #8B5CF6;
            box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
        }
        
        #itemPromptInput::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }
        
        #generateBtn {
            background: linear-gradient(135deg, #8B5CF6, #7C3AED);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            font-family: 'Poppins', sans-serif;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }
        
        #generateItemBtn:hover:not(:disabled) {
            background: linear-gradient(135deg, #9F7AEA, #8B5CF6);
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
        }
        
        #generateItemBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        #grimoireStatus {
            color: #A1A1AA;
            font-size: 11px;
            text-align: center;
            min-height: 15px;
        }
        
        .loading-dots::after {
            content: '';
            animation: loadingDots 1.5s infinite;
        }
        
        @keyframes loadingDots {
            0% { content: ''; }
            33% { content: '.'; }
            66% { content: '..'; }
            100% { content: '...'; }
        }
        
        /* === SPEECH BUBBLES === */
        .speech-bubble {
            position: absolute;
            background: white;
            border: 3px solid #000;
            border-radius: 20px;
            padding: 16px 20px;
            max-width: 300px;
            font-family: 'Poppins', sans-serif;
            font-size: 15px;
            color: #000;
            line-height: 1.5;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 1000;
        }
        
        .speech-bubble.visible {
            opacity: 1;
        }
        
        .speech-bubble.npc-bubble::after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 20px solid transparent;
            border-right: 20px solid transparent;
            border-top: 20px solid #000;
        }
        
        .speech-bubble.npc-bubble::before {
            content: '';
            position: absolute;
            bottom: -14px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 17px solid transparent;
            border-right: 17px solid transparent;
            border-top: 17px solid white;
            z-index: 1;
        }
        
        .speech-bubble.player-bubble::after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 20px solid transparent;
            border-right: 20px solid transparent;
            border-top: 20px solid #000;
        }
        
        .speech-bubble.player-bubble::before {
            content: '';
            position: absolute;
            bottom: -14px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 17px solid transparent;
            border-right: 17px solid transparent;
            border-top: 17px solid white;
            z-index: 1;
        }
        
        /* === CONVERSATION INPUT === */
        #conversationInputArea {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
            gap: 12px;
            background: linear-gradient(135deg, rgba(20, 15, 50, 0.95), rgba(40, 25, 80, 0.92));
            padding: 16px 20px;
            border-radius: 16px;
            backdrop-filter: blur(20px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                        0 0 40px rgba(139, 92, 246, 0.3);
            border: 2px solid rgba(139, 92, 246, 0.3);
            min-width: 500px;
        }
        
        #conversationInputArea.active {
            display: flex;
        }
        
        /* === CONFIRMATION DIALOG === */
        #confirmDialog {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: none;
            flex-direction: column;
            gap: 20px;
            background: linear-gradient(135deg, rgba(30, 20, 60, 0.98), rgba(50, 30, 90, 0.95));
            padding: 30px 40px;
            border-radius: 16px;
            backdrop-filter: blur(25px);
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6),
                        0 0 60px rgba(139, 92, 246, 0.4);
            border: 2px solid rgba(139, 92, 246, 0.4);
            min-width: 400px;
            z-index: 20001;
        }
        
        #confirmDialog.active {
            display: flex;
        }
        
        #confirmDialog h3 {
            color: #E5E7EB;
            font-size: 20px;
            font-weight: 600;
            margin: 0;
            text-align: center;
            text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
        }
        
        #confirmDialog p {
            color: #D1D5DB;
            font-size: 16px;
            margin: 0;
            text-align: center;
            line-height: 1.5;
        }
        
        #confirmButtons {
            display: flex;
            gap: 15px;
            justify-content: center;
        }
        
        .confirm-btn {
            padding: 12px 30px;
            border: none;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }
        
        #confirmYes {
            background: linear-gradient(135deg, #EF4444, #DC2626);
            color: white;
        }
        
        #confirmYes:hover {
            background: linear-gradient(135deg, #F87171, #EF4444);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
        }
        
        #confirmNo {
            background: linear-gradient(135deg, #6B7280, #4B5563);
            color: white;
        }
        
        #confirmNo:hover {
            background: linear-gradient(135deg, #9CA3AF, #6B7280);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
        }
        
        #dialogOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            display: none;
            z-index: 20000;
        }
        
        #dialogOverlay.active {
            display: block;
        }
        
        #conversationInput {
            flex: 1;
            background: rgba(0, 0, 0, 0.4);
            border: 2px solid rgba(139, 92, 246, 0.3);
            color: #E5E7EB;
            padding: 12px 16px;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 14px;
            outline: none;
            transition: all 0.3s ease;
        }
        
        #conversationInput:focus {
            border-color: #8B5CF6;
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
        }
        
        #conversationInput::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }
        
        #sendMessage {
            background: linear-gradient(135deg, #8B5CF6, #7C3AED);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }
        
        #sendMessage:hover:not(:disabled) {
            background: linear-gradient(135deg, #9F7AEA, #8B5CF6);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
        }
        
        #sendMessage:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        #closeConversation {
            background: rgba(255, 100, 100, 0.8);
            border: none;
            color: white;
            padding: 12px 20px;
            border-radius: 12px;
            font-family: 'Poppins', sans-serif;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        #closeConversation:hover {
            background: rgba(255, 80, 80, 1);
            transform: translateY(-2px);
        }
        
        /* === SETTINGS BUTTON === */
        #settingsButton {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            padding: 15px;
            width: 66px;
            height: 66px;
            font-size: 36px;
            font-weight: normal;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }
        
        #settingsButton:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
            color: rgba(255, 255, 255, 1);
            transform: rotate(90deg) scale(1.1);
        }
        
        #settingsButton.glow-warm {
            background: rgba(255, 165, 0, 0.3);
            border-color: rgba(255, 200, 100, 0.6);
            box-shadow: 0 0 20px rgba(255, 165, 0, 0.6),
                        0 0 40px rgba(255, 200, 100, 0.4),
                        inset 0 0 20px rgba(255, 200, 100, 0.2);
            animation: warmGlow 2s ease-in-out infinite;
        }
        
        @keyframes warmGlow {
            0%, 100% {
                box-shadow: 0 0 20px rgba(255, 165, 0, 0.6),
                            0 0 40px rgba(255, 200, 100, 0.4),
                            inset 0 0 20px rgba(255, 200, 100, 0.2);
            }
            50% {
                box-shadow: 0 0 30px rgba(255, 165, 0, 0.8),
                            0 0 60px rgba(255, 200, 100, 0.6),
                            inset 0 0 30px rgba(255, 200, 100, 0.3);
            }
        }
        
        /* === QUEST NOTIFICATION === */
        #questNotification {
            position: absolute;
            top: 20px;
            right: 106px; /* 設定ボタンの左側（66px + 20px余白 + 20px間隔） */
            z-index: 1000;
            background: white;
            color: #000;
            border: 3px solid #000;
            border-radius: 20px;
            padding: 16px 20px;
            max-width: 300px;
            font-size: 15px;
            font-family: 'Poppins', sans-serif;
            cursor: pointer;
            transition: all 0.4s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transform: translateX(20px);
            pointer-events: none;
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.5;
        }
        
        #questNotification.show {
            opacity: 1;
            transform: translateX(0);
            pointer-events: auto;
            animation: questBounce 0.6s ease;
        }
        
        @keyframes questBounce {
            0%, 100% { transform: translateX(0) scale(1); }
            50% { transform: translateX(0) scale(1.05); }
        }
        
        /* 吹き出しの先っぽ（外側・黒） */
        #questNotification::after {
            content: '';
            position: absolute;
            top: 50%;
            right: -20px;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-top: 15px solid transparent;
            border-bottom: 15px solid transparent;
            border-left: 20px solid #000;
        }
        
        /* 吹き出しの先っぽ（内側・白） */
        #questNotification::before {
            content: '';
            position: absolute;
            top: 50%;
            right: -14px;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-top: 12px solid transparent;
            border-bottom: 12px solid transparent;
            border-left: 17px solid white;
            z-index: 1;
        }
        
        /* 絵文字を別要素で表示 */
        #questNotification .quest-icon {
            font-size: 18px;
        }
        
        #questNotification:hover {
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
            transform: scale(1.05);
        }
        
        /* === SETTINGS MODAL === */
        #settingsModal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: none;
            flex-direction: column;
            gap: 20px;
            background: linear-gradient(135deg, rgba(20, 15, 50, 0.95), rgba(40, 25, 80, 0.92));
            padding: 30px 40px;
            border-radius: 20px;
            backdrop-filter: blur(20px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                        0 0 40px rgba(139, 92, 246, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(139, 92, 246, 0.3);
            min-width: 760px;
            max-width: 860px;
            max-height: calc(100vh - 80px);
            overflow-x: hidden;
            overflow-y: auto;
            z-index: 2001;
        }
        
        /* 設定ウィンドウ用スクロールバー */
        #settingsModal::-webkit-scrollbar {
            width: 8px;
        }
        
        #settingsModal::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.25);
            border-radius: 10px;
        }
        
        #settingsModal::-webkit-scrollbar-thumb {
            background: rgba(139, 92, 246, 0.6);
            border-radius: 10px;
        }
        
        #settingsModal::-webkit-scrollbar-thumb:hover {
            background: rgba(139, 92, 246, 0.8);
        }
        
        #settingsModal {
            -ms-overflow-style: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(139, 92, 246, 0.6) rgba(0, 0, 0, 0.25);
        }
        
        #settingsModal.active {
            display: flex;
        }
        
        #settingsModal h2 {
            color: #E5E7EB;
            font-size: 28px;
            font-weight: 700;
            font-family: 'Cinzel', serif;
            margin: 0 0 10px 0;
            text-align: center;
            text-shadow: 0 0 20px rgba(139, 92, 246, 0.6),
                         0 0 40px rgba(139, 92, 246, 0.3);
            letter-spacing: 1px;
        }
        
        #settingsModalContent {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .settings-section {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .settings-section h3 {
            color: #E5E7EB;
            font-size: 16px;
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            margin: 0;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }
        
        .settings-section.accordion h3 {
            cursor: pointer;
            user-select: none;
            padding: 12px 16px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border: 1px solid rgba(139, 92, 246, 0.2);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }
        
        .settings-section.accordion h3:hover {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(124, 58, 237, 0.15));
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                        0 0 15px rgba(139, 92, 246, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.08);
            transform: translateY(-1px);
        }
        
        .settings-section.accordion h3::after {
            content: '▼';
            font-size: 12px;
            color: #8B5CF6;
        }
        
        .settings-section.accordion.collapsed h3::after {
            content: '▶';
        }
        
        .settings-section.accordion .accordion-content {
            max-height: none;
            overflow: visible;
            opacity: 1;
            padding-top: 10px;
        }
        
        .settings-section.accordion.collapsed .accordion-content {
            display: none;
        }
        
        .settings-section.accordion .quest-list {
            max-height: none;
            overflow: visible;
        }
        
        .settings-section .controls-list {
            color: #D1D5DB;
            font-size: 13px;
            font-family: 'Poppins', sans-serif;
            line-height: 1.9;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 10, 40, 0.3));
            padding: 16px;
            border-radius: 10px;
            border: 1px solid rgba(139, 92, 246, 0.15);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .settings-section .controls-list div {
            margin: 5px 0;
            padding: 4px 0;
            border-left: 2px solid transparent;
            padding-left: 8px;
            transition: all 0.2s ease;
        }
        
        .settings-section .controls-list div:hover {
            border-left-color: rgba(139, 92, 246, 0.5);
            color: #E5E7EB;
        }
        
        .quest-list {
            color: #D1D5DB;
            font-size: 13px;
            font-family: 'Poppins', sans-serif;
            line-height: 1.8;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 10, 40, 0.3));
            padding: 16px;
            border-radius: 10px;
            border: 1px solid rgba(139, 92, 246, 0.15);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            position: relative;
            z-index: 0;
        }
        
        .quest-item {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0;
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(139, 92, 246, 0.05);
            border: 1px solid transparent;
            transition: all 0.2s ease;
            position: relative;
            z-index: 1;
        }
        
        .quest-item:hover {
            background: rgba(139, 92, 246, 0.12);
            border-color: rgba(139, 92, 246, 0.3);
            transform: translateX(3px);
            box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
        }
        
        .quest-item-hint {
            position: relative;
            cursor: help;
            z-index: 2;
            isolation: isolate;
        }
        
        .quest-tooltip {
            position: fixed;
            left: -9999px;
            top: -9999px;
            padding: 6px 10px;
            background: #000000;
            background-color: #000000;
            color: #E5E7EB;
            font-size: 11px;
            font-family: 'Poppins', sans-serif;
            max-width: 280px;
            min-width: 150px;
            line-height: 1.4;
            white-space: normal;
            word-wrap: break-word;
            overflow-wrap: break-word;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            box-sizing: border-box;
            border-radius: 6px;
            border: 1px solid rgba(139, 92, 246, 0.4);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 20000;
            visibility: hidden;
        }
        
        .quest-tooltip.show {
            opacity: 1;
            visibility: visible;
        }
        
        .quest-checkmark {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            border-radius: 4px;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
            border: 2px solid rgba(16, 185, 129, 0.3);
            color: #10b981;
            font-weight: bold;
            font-size: 12px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .quest-name {
            flex: 1;
            color: #E5E7EB;
            font-weight: 500;
            font-size: 12px;
            line-height: 1.4;
        }
        
        .quest-name.completed {
            text-decoration: line-through;
            opacity: 0.5;
            color: #9CA3AF;
        }
        
        /* === TITLES (SETTINGS MODAL) === */
        .titles-grid {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 18px;
            width: 100%;
            padding: 10px 0;
        }
        
        .titles-row {
            display: flex;
            justify-content: center;
            gap: 22px;
            width: 100%;
            max-width: 640px;
            margin: 0 auto;
        }
        
        .titles-row[data-row="top"] {
            justify-content: space-between;
        }
        
        .title-pedestal {
            position: relative;
            width: 185px;
            padding: 22px 18px 26px;
            border-radius: 16px;
            background: linear-gradient(145deg, rgba(0, 0, 0, 0.45), rgba(20, 10, 40, 0.35));
            border: 2px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            isolation: isolate;
        }
        
        .title-pedestal:hover {
            background: linear-gradient(145deg, rgba(20, 10, 50, 0.55), rgba(40, 20, 80, 0.4));
            border-color: rgba(245, 158, 11, 0.4);
            transform: translateY(-4px);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
        }
        
        .title-orb-container {
            width: 110px;
            height: 100px;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            position: relative;
        }
        
        .title-orb {
            position: absolute;
            width: 82px;
            height: 82px;
            border-radius: 50%;
            opacity: 0;
            transform: scale(0);
            bottom: 28px;
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        
        .title-pedestal-base {
            width: 110px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(180deg, rgba(150, 130, 100, 0.9), rgba(80, 60, 50, 0.7));
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5),
                        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
                        inset 0 3px 8px rgba(255, 255, 255, 0.08);
            position: relative;
        }
        
        .title-pedestal-base::before {
            content: '';
            position: absolute;
            top: -4px;
            left: 50%;
            transform: translateX(-50%);
            width: 92%;
            height: 4px;
            border-radius: 50%;
            background: linear-gradient(90deg, transparent, rgba(255, 220, 150, 0.5), transparent);
        }
        
        .title-pedestal-base::after {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            height: 10px;
            border-radius: 50%;
            background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), transparent 70%);
            filter: blur(5px);
        }
        
        .title-name {
            color: #D1D5DB;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
            min-height: 34px;
        }
        
        .title-pedestal.earned .title-name {
            color: #FBBF24;
            text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
        }
        
        .title-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translate(-50%, -10px);
            padding: 12px 16px;
            border-radius: 10px;
            border: 1px solid rgba(245, 158, 11, 0.4);
            background: rgba(15, 15, 30, 0.95);
            color: #E5E7EB;
            font-size: 12px;
            line-height: 1.4;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s ease, transform 0.2s ease;
            white-space: nowrap;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
            z-index: 2;
        }
        
        .title-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: rgba(15, 15, 30, 0.95);
        }
        
        .title-pedestal:hover .title-tooltip {
            opacity: 1;
            transform: translate(-50%, -18px);
        }
        
        .title-tooltip-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: #FBBF24;
        }
        
        .title-tooltip-progress {
            margin-top: 4px;
            font-size: 11px;
            color: #9CA3AF;
        }
        
        .title-pedestal.earned .title-orb {
            opacity: 1;
            transform: scale(1);
            animation: orbFloat 3s ease-in-out infinite, orbGlow 2.4s ease-in-out infinite;
        }
        
        .title-orb::before {
            content: '';
            position: absolute;
            top: 18%;
            left: 26%;
            width: 32%;
            height: 32%;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2), transparent);
            filter: blur(2px);
        }
        
        .title-orb::after {
            content: '';
            position: absolute;
            bottom: 18%;
            right: 22%;
            width: 24%;
            height: 24%;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(0, 0, 0, 0.3), transparent);
            filter: blur(3px);
        }
        
        .title-pedestal[data-title="fledgling"] .title-orb {
            background: radial-gradient(circle at 35% 35%, #F9FAFB, #D1D5DB, #9CA3AF);
            box-shadow: 0 0 30px rgba(209, 213, 219, 0.7), inset -8px -8px 18px rgba(0, 0, 0, 0.25), inset 8px 8px 18px rgba(255, 255, 255, 0.4);
        }
        
        .title-pedestal[data-title="cleaner"] .title-orb {
            background: radial-gradient(circle at 35% 35%, #DBEAFE, #93C5FD, #1E3A8A);
            box-shadow: 0 0 30px rgba(59, 130, 246, 0.7), inset -8px -8px 18px rgba(0, 0, 0, 0.25), inset 8px 8px 18px rgba(147, 197, 253, 0.5);
        }
        
        .title-pedestal[data-title="chief"] .title-orb {
            background: radial-gradient(circle at 35% 35%, #DDD6FE, #A78BFA, #6D28D9);
            box-shadow: 0 0 30px rgba(139, 92, 246, 0.7), inset -8px -8px 18px rgba(0, 0, 0, 0.25), inset 8px 8px 18px rgba(196, 181, 253, 0.5);
        }
        
        .title-pedestal[data-title="fullyfledged"] .title-orb {
            background: radial-gradient(circle at 35% 35%, #FDE68A, #F59E0B, #B45309);
            box-shadow: 0 0 30px rgba(245, 158, 11, 0.7), inset -8px -8px 18px rgba(0, 0, 0, 0.25), inset 8px 8px 18px rgba(253, 230, 138, 0.5);
        }
        
        .title-pedestal[data-title="master"] .title-orb {
            background: radial-gradient(circle at 35% 35%, #FFFFFF, #DDD6FE, #FDE68A, #38BDF8);
            box-shadow: 0 0 35px rgba(255, 255, 255, 0.8), inset -8px -8px 18px rgba(0, 0, 0, 0.2), inset 8px 8px 18px rgba(255, 255, 255, 0.6);
        }
        
        @keyframes orbFloat {
            0%, 100% {
                transform: translateY(0) scale(1);
            }
            50% {
                transform: translateY(-10px) scale(1.05);
            }
        }
        
        @keyframes orbGlow {
            0%, 100% {
                filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
            }
            50% {
                filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.9));
            }
        }
        
        .titles-helper-text {
            text-align: center;
            color: #9CA3AF;
            font-size: 11px;
            margin-top: 8px;
        }
        
        @media (max-width: 700px) {
            #settingsModal {
                min-width: 90vw;
                max-width: 95vw;
            }
            .titles-row {
                flex-wrap: wrap;
                justify-content: center;
            }
            .title-pedestal {
                width: min(220px, 100%);
            }
        }
        
        #closeSettingsModal {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(124, 58, 237, 0.2));
            color: #E5E7EB;
            border: 1px solid rgba(139, 92, 246, 0.4);
            border-radius: 10px;
            padding: 10px 32px;
            font-size: 14px;
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            cursor: pointer;
            margin-top: 10px;
            transition: all 0.3s ease;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }
        
        #closeSettingsModal:hover {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(124, 58, 237, 0.3));
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                        0 0 15px rgba(139, 92, 246, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }
        
        #closeSettingsModal:active {
            transform: translateY(0);
        }
        
        #settingsModalOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            display: none;
            z-index: 2000;
        }
        
        #settingsModalOverlay.active {
            display: block;
        }        
        /* === VOLUME SLIDERS === */
        .volume-control {
            margin-top: 15px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .volume-item {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .volume-label {
            color: #D1D5DB;
            font-size: 13px;
            font-family: 'Poppins', sans-serif;
            min-width: 50px;
        }
        
        .volume-slider-container {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .volume-slider {
            flex: 1;
            height: 6px;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 10, 40, 0.3));
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
            cursor: pointer;
            border: 1px solid rgba(139, 92, 246, 0.15);
        }
        
        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            background: linear-gradient(135deg, #8B5CF6, #7C3AED);
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(139, 92, 246, 0.5);
            transition: all 0.2s ease;
        }
        
        .volume-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 3px 8px rgba(139, 92, 246, 0.7);
        }
        
        .volume-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: linear-gradient(135deg, #8B5CF6, #7C3AED);
            border-radius: 50%;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(139, 92, 246, 0.5);
            transition: all 0.2s ease;
        }
        
        .volume-slider::-moz-range-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 3px 8px rgba(139, 92, 246, 0.7);
        }
        
        .volume-value {
            color: #E5E7EB;
            font-size: 12px;
            font-family: 'Poppins', sans-serif;
            min-width: 35px;
            text-align: right;
        }
