:root {
    --bg-tertiary: #202225;
    --bg-secondary: #2f3136;
    --bg-primary: #36393f;
    --header-primary: #ffffff;
    --header-secondary: #b9bbbe;
    --text-normal: #dcddde;
    --accent: #5865f2;
    --danger: #ed4245;
    --success: #3ba55c;
}

* { box-sizing: border-box; }
body {
    margin: 0; padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-tertiary);
    color: var(--text-normal);
    height: 100vh; overflow: hidden;
    user-select: none;
}

/* =========================================
   1. オープニング演出
   ========================================= */
.intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Noto Serif JP', serif;
    pointer-events: auto;
    cursor: pointer;
}

.intro-content {
    position: absolute;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    width: 80%;
}
.intro-content.visible { opacity: 1; }
.intro-content.hidden { opacity: 0; pointer-events: none; }

.title-logo {
    font-size: 4rem;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 4px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.start-prompt {
    margin-top: 2rem;
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 2px;
    opacity: 0.8;
    animation: blinkPrompt 2s infinite;
}
@keyframes blinkPrompt {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

#intro-disclaimer p { font-size: 0.9rem; color: #888; line-height: 2; }
.story-text { font-size: 1.2rem; margin-bottom: 2rem; line-height: 1.8; }


/* =========================================
   2. デスクトップ画面 (背景・アイコン・タスクバー)
   ========================================= */
#desktop-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1478760329108-5c3ed9d495a0?q=80&w=1920&auto=format&fit=crop') center/cover;
    z-index: 1; 
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

/* --- デスクトップアイコン --- */
.desktop-icons-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.desktop-icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: default;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 2px;
}
.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-img {
    width: 48px; height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 5px;
}

.icon-label {
    font-size: 12px; color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    word-break: break-word; line-height: 1.2;
}

/* --- アイコン画像定義 (SVG) --- */
.trash-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3Cline x1='10' y1='11' x2='10' y2='17'%3E%3C/line%3E%3Cline x1='14' y1='11' x2='14' y2='17'%3E%3C/line%3E%3C/svg%3E");
}
.folder-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FCD53F'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
}
.browser-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230078d7' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E");
}
.discat-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235865f2'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
    border-radius: 50%;
}
.browser-icon-small {
    width: 16px; height: 16px; margin-right: 8px;
    background-size: contain; background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230078d7' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E");
}


/* --- 通知ポップアップ (デスクトップ版) --- */
.notification-popup {
    background: #202225; width: 320px; padding: 16px; border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); border-left: 4px solid var(--accent);
    display: flex; gap: 12px; cursor: pointer;
    position: absolute; bottom: 60px; right: 20px;
    z-index: 100;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.notif-icon {
    width: 40px; height: 40px; background: var(--accent); border-radius: 50%;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
    background-size: 60%; background-repeat: no-repeat; background-position: center;
}
.notif-content { flex: 1; font-size: 14px; text-align: left; }
.notif-header { display: flex; justify-content: space-between; color: #b9bbbe; font-size: 12px; margin-bottom: 4px; }
.notif-body { color: white; line-height: 1.4; }


/* --- タスクバー --- */
.taskbar {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 40px;
    background-color: rgba(32, 34, 37, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px; z-index: 1000;
    color: #dcddde; font-size: 12px;
}
.taskbar-left, .taskbar-right { display: flex; align-items: center; height: 100%; }

.start-button {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: default;
}
.start-button:hover { background-color: rgba(255, 255, 255, 0.1); }
.start-button svg { fill: #dcddde; transition: fill 0.2s; }
.start-button:hover svg { fill: #0078d7; }

.search-box {
    display: flex; align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    height: 30px; margin-left: 10px; padding: 0 10px;
    border-radius: 2px; color: #b9bbbe; width: 200px; cursor: text;
}
.search-box .material-icons { font-size: 18px; margin-right: 8px; }

.taskbar-icon {
    width: 40px; height: 40px; margin-left: 4px;
    background-size: 24px; background-repeat: no-repeat; background-position: center;
    cursor: default; position: relative;
}
.taskbar-icon:hover { background-color: rgba(255, 255, 255, 0.1); }
.taskbar-icon.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 30px; height: 2px; background-color: var(--accent);
}
.explorer-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FCD53F'%3E%3Cpath d='M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
}

.system-tray-icon {
    width: 30px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: default; color: #dcddde;
}
.system-tray-icon:hover { background-color: rgba(255, 255, 255, 0.1); }

.taskbar-clock {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    height: 40px; padding: 0 10px; cursor: default; font-size: 11px; line-height: 1.2;
}
.taskbar-clock:hover { background-color: rgba(255, 255, 255, 0.1); }
.taskbar-clock .time { font-size: 13px; }

.action-center-icon {
    position: relative; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: default; color: #dcddde; margin-left: 5px;
}
.action-center-icon:hover { background-color: rgba(255, 255, 255, 0.1); }
.action-center-icon .badge {
    position: absolute; bottom: 8px; right: 8px;
    background-color: var(--accent); color: white;
    font-size: 10px; font-weight: bold;
    min-width: 14px; height: 14px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #202225;
}


/* =========================================
   3. Discatアプリ画面 (チャットUI)
   ========================================= */
.app-container { display: flex; width: 100%; height: 100%; display: none; }

/* サイドバー */
.dm-sidebar { width: 240px; background: var(--bg-secondary); display: flex; flex-direction: column; border-right: 1px solid #202225; }
.search-bar-area { padding: 10px; border-bottom: 1px solid #202225; height: 48px; display: flex; align-items: center; }
.search-btn { width: 100%; background: #202225; border: none; color: #72767d; text-align: left; padding: 6px 10px; border-radius: 4px; font-size: 13px; cursor: pointer; }

.dm-list-label { font-size: 11px; font-weight: bold; color: #8e9297; padding: 16px 16px 8px; text-transform: uppercase; }
.dm-item { display: flex; align-items: center; padding: 8px 10px; margin: 2px 8px; border-radius: 4px; cursor: pointer; color: #8e9297; }
.dm-item:hover { background: rgba(79,84,92,0.32); color: var(--text-normal); }
.dm-item.active { background: rgba(79,84,92,0.6); color: var(--header-primary); }

.dm-avatar-wrapper { position: relative; margin-right: 12px; width: 32px; height: 32px; }
.dm-avatar { width: 32px; height: 32px; border-radius: 50%; background-size: cover; background-position: center; }
.friend-avatar { background-color: var(--accent); background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><circle cx="12" cy="8" r="4"/><path d="M12 14c-5 0-9 3.5-9 8h18c0-4.5-4-8-9-8z"/></svg>'); } 
.other-avatar { background-color: #747f8d; }

.status-dot { position: absolute; bottom: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--bg-secondary); }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: #747f8d; }
.friend-avatar + .status-dot { animation: blinkStatus 3s infinite; }
@keyframes blinkStatus { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

.dm-name { font-weight: 500; font-size: 15px; }
.user-status-bar { margin-top: auto; height: 52px; background: #292b2f; display: flex; align-items: center; padding: 0 8px; }
.user-avatar-mini { width: 32px; height: 32px; border-radius: 50%; background: #99aab5; margin-right: 8px; }
.user-info-mini { flex: 1; }
.username-mini { font-size: 14px; font-weight: bold; color: var(--header-primary); }
.userid-mini { font-size: 12px; color: var(--header-secondary); }


/* メインチャットエリア */
.chat-main { flex: 1; background: var(--bg-primary); display: flex; flex-direction: column; min-width: 0; }
.chat-header { height: 48px; border-bottom: 1px solid #26272d; display: flex; align-items: center; padding: 0 16px; flex-shrink: 0; }
.at-mark { color: #8e9297; font-size: 24px; margin-right: 8px; }
.header-username { font-weight: bold; color: var(--header-primary); margin-right: 8px; }
.header-status-dot { width: 10px; height: 10px; background: var(--success); border-radius: 50%; }
.progress-indicator { margin-left: auto; color: var(--header-primary); font-weight: bold; background: var(--bg-secondary); padding: 4px 10px; border-radius: 4px; }

.messages-wrapper { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; }
.dm-start-banner { margin-top: auto; margin-bottom: 20px; border-bottom: 1px solid #4f545c; padding-bottom: 20px; }
.dm-avatar-large { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 10px; }
.dm-start-banner h1 { margin: 0 0 8px; font-size: 32px; color: var(--header-primary); }
.dm-start-banner p { color: #b9bbbe; }

/* メッセージ本体 */
.message { display: flex; margin-top: 17px; }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 16px; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.my-avatar { background: #99aab5; }
.msg-header { display: flex; align-items: center; margin-bottom: 4px; }
.msg-username { font-weight: 500; color: var(--header-primary); margin-right: 8px; }
.msg-timestamp { font-size: 0.75rem; color: #72767d; }
.msg-content { color: var(--text-normal); line-height: 1.375rem; white-space: pre-wrap; word-break: break-all; }

/* リンクカード */
.link-embed { margin-top: 8px; background: var(--bg-secondary); border-left: 4px solid var(--accent); padding: 12px; border-radius: 4px; max-width: 400px; cursor: pointer; transition: 0.2s; }
.link-embed:hover { background: #292b2f; }
.embed-title { color: #00b0f4; font-weight: 600; margin-bottom: 4px; }
.embed-desc { font-size: 12px; color: var(--header-secondary); }

/* 入力エリア */
.input-area { padding: 0 16px 24px; flex-shrink: 0; }
.input-wrapper { background: #40444b; border-radius: 8px; padding: 0 16px; height: 44px; display: flex; align-items: center; margin-bottom: 10px; transition: 0.3s; }
.input-wrapper.active { border: 1px solid var(--accent); box-shadow: 0 0 0 2px rgba(88,101,242,0.3); }

.input-icon { color: #b9bbbe; font-weight: bold; font-size: 24px; margin-right: 16px; cursor: pointer; }
input.input-placeholder { background: transparent; border: none; color: #dcddde; flex: 1; font-size: 14px; outline: none; font-family: inherit; }

.input-send-btn { background: transparent; border: none; color: #b9bbbe; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.input-send-btn:not(:disabled) { color: var(--accent); }
.input-send-btn:disabled { cursor: not-allowed; opacity: 0.5; }

.controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.controls-guide { font-size: 12px; color: #b9bbbe; margin-right: 10px; }
.btn { padding: 8px 24px; border: none; border-radius: 3px; color: white; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-ok { background: #4f545c; } 
.btn-ng { background: #4f545c; }
.btn-ok:not(:disabled) { background: var(--success); }
.btn-ng:not(:disabled) { background: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }


/* =========================================
   4. モーダル・ウィンドウ (ブラウザ)
   ========================================= */
.overlay { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); z-index: 1000; }
.overlay-black { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index: 2000; display: none; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
#fullscreen-warning { pointer-events: auto !important; background: rgba(0, 0, 0, 0.95); }

/* ブラウザウィンドウ */
.browser-modal {
    display: none; position: fixed;
    top: 5%; left: 5%; width: 90%; height: 85%;
    background: white; z-index: 1001;
    flex-direction: column;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid #666;
    overflow: hidden;
}

/* タイトルバー */
.window-titlebar {
    height: 30px; background-color: #e1e1e1;
    display: flex; align-items: center; justify-content: space-between;
    user-select: none;
}
.window-title { display: flex; align-items: center; font-size: 12px; margin-left: 10px; color: #333; }
.window-controls { display: flex; height: 100%; }
.win-btn { width: 45px; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #555; cursor: default; transition: background-color 0.2s, color 0.2s; }
.win-btn:hover { background-color: #ccc; }
.win-btn.close { font-size: 16px; }
.win-btn.close:hover { background-color: #e81123; color: white; }

/* ★追加: 無効化された×ボタンのスタイル */
.win-btn.close.disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    pointer-events: none;
}

/* ツールバー */
.browser-toolbar { height: 36px; background: #f2f2f2; border-bottom: 1px solid #ddd; display: flex; align-items: center; padding: 0 10px; gap: 10px; }
.nav-buttons { display: flex; gap: 5px; color: #5f6368; }
.nav-buttons .material-icons { font-size: 20px; padding: 4px; border-radius: 50%; cursor: pointer; }
.nav-buttons .material-icons:hover { background-color: rgba(0,0,0,0.1); }
.nav-buttons .material-icons.disabled { color: #ccc; cursor: default; }

.url-bar-container {
    flex: 1; background: white; border: 1px solid #ccc; border-radius: 18px;
    height: 28px; display: flex; align-items: center; padding: 0 10px;
    font-size: 13px; color: #333;
}
.lock-icon { font-size: 14px; color: #5f6368; margin-right: 8px; }
.url-bar {
    background: transparent; flex: 1; border-radius: 0;
    font-size: inherit; line-height: normal; color: inherit;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-frame { flex: 1; border: none; width: 100%; height: 100%; background: white; }

/* 日付区切り */
.date-divider { display: flex; align-items: center; justify-content: center; margin: 20px 0; color: #72767d; font-size: 12px; font-weight: bold; }
.date-divider::before, .date-divider::after { content: ""; flex: 1; height: 1px; background: #4f545c; margin: 0 10px; }

/* エラー画面など (省略) */
.crash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #0078d7; color: white; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Segoe UI', sans-serif; padding: 10%; cursor: none;
}
.crash-content { max-width: 800px; }
.crash-face { font-size: 10rem; margin-bottom: 2rem; }
.crash-content h1 { font-size: 2rem; margin-bottom: 1.5rem; font-weight: normal; }
.crash-content p { font-size: 1.2rem; margin-bottom: 1rem; line-height: 1.5; }

.white-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: white; color: #333; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 3s ease-in; pointer-events: none;
}
.white-screen.visible { opacity: 1; pointer-events: auto; }
.ending-text-container { max-width: 600px; text-align: center; padding: 20px; }
.ending-p {
    font-family: 'Noto Serif JP', serif; font-size: 1.1rem; margin-bottom: 2rem;
    opacity: 0; transform: translateY(20px); transition: opacity 1s, transform 1s;
}
.ending-p.visible { opacity: 1; transform: translateY(0); }
.ending-title {
    margin-top: 4rem; font-size: 2rem; font-weight: bold;
    letter-spacing: 0.2rem; opacity: 0; transition: opacity 2s;
}
.ending-title.visible { opacity: 1; }


/* --- End B (Reality Invasion) --- */
.ending-overlay-black {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: black;
    color: white;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif JP', serif;
}

.ending-text-center {
    max-width: 700px;
    padding: 40px;
    text-align: center;
}

.fade-text {
    font-size: 1.2rem;
    line-height: 2;
    opacity: 0;
    transition: opacity 1s;
}
.fade-text.visible { opacity: 1; }


/* --- End C (Truth) --- */
.ending-overlay-white {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #f0f0f0; /* 少しグレーがかった白 */
    color: #333;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 穴あき背景の演出（簡易的） */
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 20px 20px;
}

.dialogue-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 4px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid #ddd;
}

.speaker-name {
    font-weight: bold;
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

.dialogue-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    min-height: 100px;
}

.click-prompt {
    text-align: right;
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.system-alert-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 20000; /* 最前面 */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.system-alert-box {
    width: 400px;
    background-color: #c0c0c0; /* レトロなグレー */
    border: 2px solid;
    border-color: #dfdfdf #000000 #000000 #dfdfdf; /* 立体的な枠線 */
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.alert-titlebar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-close-btn {
    background-color: #c0c0c0;
    color: black;
    width: 16px; height: 16px;
    line-height: 14px;
    text-align: center;
    border: 1px solid;
    border-color: #dfdfdf #000000 #000000 #dfdfdf;
    cursor: default;
    font-size: 12px;
}

.alert-body-content {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-icon-error {
    width: 32px; height: 32px;
    background-color: red;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
/* Xアイコンの描画（CSSのみ） */
.alert-icon-error::before, .alert-icon-error::after {
    content: ''; position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 4px;
    background-color: white;
    transform: translate(-50%, -50%) rotate(45deg);
}
.alert-icon-error::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.alert-message {
    color: black;
    font-size: 14px;
    line-height: 1.4;
}

.alert-footer {
    padding: 10px;
    display: flex;
    justify-content: center;
}

#sys-alert-ok-btn {
    padding: 4px 24px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000000 #000000 #dfdfdf;
    color: black;
    font-size: 14px;
    cursor: pointer;
}
#sys-alert-ok-btn:active {
    border-color: #000000 #dfdfdf #dfdfdf #000000;
}