/* ===================================================================
   futuRune / 未来予測AI  —  デザインシステム
   ロゴの世界観: ディープネイビー × シアンのグロー / ルーン石板 / 星座
   =================================================================== */

:root {
    /* ── ベースカラー（ディープネイビー） ── */
    --bg-900: #060a16;
    --bg-800: #0a1326;
    --bg-700: #0f1d38;
    --bg-650: #132446;
    --bg-600: #18305a;

    /* ── サーフェス（ガラス） ── */
    --surface: rgba(20, 36, 70, 0.55);
    --surface-solid: #101e3a;
    --surface-hi: rgba(36, 60, 110, 0.55);
    --border: rgba(110, 160, 240, 0.16);
    --border-hi: rgba(120, 190, 255, 0.40);

    /* ── アクセント（シアン／ルーンの光） ── */
    --accent: #4a9eff;
    --accent-bright: #6db8ff;
    --accent-glow: #8fd3ff;
    --accent-deep: #2b6fd6;
    --accent-soft: rgba(74, 158, 255, 0.14);

    /* ── テキスト ── */
    --text: #eaf2ff;
    --text-soft: #aebfdc;
    --text-mute: #6f82a6;

    /* ── 状態色 ── */
    --danger: #ff6b7d;
    --danger-soft: rgba(255, 107, 125, 0.14);
    --success: #4fd6a8;
    --warn: #ffcf6b;

    /* ── タイポ・形状 ── */
    --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
    --font-brand: "Cormorant Garamond", "Times New Roman", serif;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
    --glow: 0 0 24px rgba(74, 158, 255, 0.35);
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-900);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* 星空＋オーロラの背景 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1100px 700px at 78% -8%, rgba(43, 111, 214, 0.22), transparent 60%),
        radial-gradient(900px 600px at 12% 108%, rgba(74, 158, 255, 0.14), transparent 55%),
        linear-gradient(160deg, #060a16 0%, #0a1428 45%, #08101f 100%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.2px 1.2px at 70% 20%, rgba(180,215,255,0.7), transparent),
        radial-gradient(1.6px 1.6px at 40% 70%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.1px 1.1px at 85% 60%, rgba(150,200,255,0.7), transparent),
        radial-gradient(1.3px 1.3px at 55% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.2px 1.2px at 10% 85%, rgba(200,225,255,0.6), transparent),
        radial-gradient(1.1px 1.1px at 90% 90%, rgba(255,255,255,0.55), transparent);
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.75; } }

a { color: var(--accent-bright); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* スクロールバー */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(110,160,240,0.22); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(120,190,255,0.4); }

/* ===================================================================
   共通パーツ
   =================================================================== */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}
.brand__mark {
    width: 40px; height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(110, 190, 255, 0.5));
}
.brand__name {
    font-family: var(--font-brand);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text);
}
.brand__name b { color: var(--accent-bright); font-weight: 700; }
.brand__tag {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--text-mute);
    margin-left: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.btn:hover { border-color: var(--border-hi); background: var(--surface-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px -8px rgba(74, 158, 255, 0.7);
}
.btn--primary:hover { box-shadow: 0 10px 28px -8px rgba(110, 190, 255, 0.85); filter: brightness(1.06); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: var(--danger-soft); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--sm { padding: 7px 12px; font-size: 0.82rem; }
.btn--block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 0.82rem; color: var(--text-soft); font-weight: 500; letter-spacing: 0.02em; }
.input, .select, .textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(6, 12, 26, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.select { appearance: none; cursor: pointer;
    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='%236db8ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.select option { background: var(--surface-solid); color: var(--text); }

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    border: 1px solid transparent;
    margin-bottom: 14px;
}
.alert--error { background: var(--danger-soft); border-color: rgba(255,107,125,0.3); color: #ffc2cb; }
.alert--ok { background: rgba(79,214,168,0.12); border-color: rgba(79,214,168,0.3); color: #b8f2dd; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
    border: 1px solid var(--border);
    color: var(--text-soft);
}
.badge--admin { color: var(--accent-glow); border-color: var(--border-hi); background: var(--accent-soft); }
.badge--on { color: var(--success); border-color: rgba(79,214,168,0.35); }
.badge--off { color: var(--text-mute); }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================
   ログインページ
   =================================================================== */
.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login__card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px 34px 34px;
    position: relative;
    overflow: hidden;
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.login__card::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    opacity: 0.7;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.login__logo { display: grid; place-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.login__logo img {
    width: 116px; height: 116px; object-fit: contain;
    filter: drop-shadow(0 0 26px rgba(110, 190, 255, 0.55));
    animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.login__title { font-family: var(--font-brand); font-size: 2.1rem; font-weight: 600; letter-spacing: 1px; }
.login__title b { color: var(--accent-bright); }
.login__subtitle { font-size: 0.74rem; letter-spacing: 0.4em; color: var(--text-mute); margin-top: -4px; }
.login__lead { text-align: center; color: var(--text-soft); font-size: 0.9rem; margin-bottom: 24px; }
.login__hint { margin-top: 18px; font-size: 0.78rem; color: var(--text-mute); text-align: center; }

/* ===================================================================
   アプリ共通レイアウト（チャット・管理）
   =================================================================== */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: rgba(8, 16, 33, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sidebar__head { padding: 20px 18px 14px; border-bottom: 1px solid var(--border); }
.sidebar__new { margin: 14px 14px 8px; }
.sidebar__scroll { flex: 1; overflow-y: auto; padding: 6px 10px 14px; }
.sidebar__section { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--text-mute); padding: 12px 8px 6px; text-transform: uppercase; }
.sidebar__foot { border-top: 1px solid var(--border); padding: 12px 14px; }

.userchip {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: var(--radius-sm);
}
.userchip__avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff; font-weight: 700; font-size: 0.95rem;
    box-shadow: var(--glow);
}
.userchip__meta { min-width: 0; flex: 1; }
.userchip__name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip__role { font-size: 0.72rem; color: var(--text-mute); }

/* 履歴アイテム */
.conv {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 12px; margin: 3px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}
.conv:hover { background: var(--surface); }
.conv.is-active { background: var(--surface-hi); border-color: var(--border-hi); }
.conv__body { flex: 1; min-width: 0; }
.conv__title { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv__meta { font-size: 0.72rem; color: var(--text-mute); margin-top: 2px; }
.conv__del {
    opacity: 0; flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 7px;
    display: grid; place-items: center;
    background: transparent; border: none; color: var(--text-mute);
    transition: all 0.15s;
}
.conv:hover .conv__del { opacity: 1; }
.conv__del:hover { background: var(--danger-soft); color: var(--danger); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

.topbar {
    height: 62px; flex-shrink: 0;
    display: flex; align-items: center; gap: 14px;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 16, 33, 0.5);
    backdrop-filter: blur(10px);
}
.topbar__title { font-weight: 600; font-size: 1rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1; }

/* ===================================================================
   チャット
   =================================================================== */
.chat { flex: 1; overflow-y: auto; padding: 26px 0 8px; scroll-behavior: smooth; }
.chat__inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.msg { display: flex; gap: 14px; margin-bottom: 26px; animation: msgIn 0.35s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg__avatar {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.msg--user .msg__avatar { background: var(--surface-hi); border: 1px solid var(--border); color: var(--accent-bright); }
.msg--assistant .msg__avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: var(--glow); padding: 6px;
}
.msg--assistant .msg__avatar img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.msg__body { flex: 1; min-width: 0; padding-top: 5px; }
.msg__role { font-size: 0.78rem; color: var(--text-mute); margin-bottom: 5px; font-weight: 600; }
.msg__content { font-size: 0.97rem; line-height: 1.85; word-wrap: break-word; }
.msg__content p { margin: 0 0 0.8em; }
.msg__content p:last-child { margin-bottom: 0; }
.msg__content h1, .msg__content h2, .msg__content h3 { margin: 1em 0 0.5em; line-height: 1.4; color: var(--accent-glow); }
.msg__content h1 { font-size: 1.25rem; } .msg__content h2 { font-size: 1.12rem; } .msg__content h3 { font-size: 1rem; }
.msg__content ul, .msg__content ol { margin: 0.4em 0 0.9em; padding-left: 1.4em; }
.msg__content li { margin: 0.25em 0; }
.msg__content strong { color: var(--text); font-weight: 700; }
.msg__content code {
    background: rgba(6, 12, 26, 0.7); padding: 2px 6px; border-radius: 5px;
    font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.86em; color: var(--accent-glow);
}
.msg__content pre {
    background: rgba(6, 12, 26, 0.85); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 0.7em 0;
}
.msg__content pre code { background: none; padding: 0; color: var(--text); }
.msg__content blockquote {
    border-left: 3px solid var(--accent); padding-left: 14px; margin: 0.7em 0; color: var(--text-soft);
}
.msg__content a { text-decoration: underline; text-underline-offset: 2px; }

.typing { display: inline-flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing span {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-bright);
    animation: typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-5px); } }

/* 空状態（ウェルカム） */
.welcome { text-align: center; max-width: 620px; margin: 7vh auto 0; padding: 0 24px; animation: rise 0.6s ease; }
.welcome img {
    width: 140px; height: 140px; object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(110, 190, 255, 0.5));
    animation: float 5s ease-in-out infinite;
}
.welcome h1 { font-family: var(--font-brand); font-size: 2rem; margin: 14px 0 6px; }
.welcome h1 b { color: var(--accent-bright); }
.welcome p { color: var(--text-soft); margin-bottom: 26px; }
.suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suggest__item {
    text-align: left; padding: 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-soft);
    font-size: 0.9rem; transition: all 0.18s;
}
.suggest__item:hover { border-color: var(--border-hi); background: var(--surface-hi); color: var(--text); transform: translateY(-2px); }
.suggest__item b { display: block; color: var(--text); margin-bottom: 3px; font-size: 0.92rem; }

/* 入力エリア */
.composer { flex-shrink: 0; padding: 14px 24px 22px; border-top: 1px solid var(--border); background: rgba(8, 16, 33, 0.55); backdrop-filter: blur(10px); }
.composer__inner { max-width: 820px; margin: 0 auto; }
.composer__box {
    display: flex; align-items: flex-end; gap: 10px;
    background: rgba(6, 12, 26, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 8px 8px 16px;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.composer__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer__text {
    flex: 1; resize: none; border: none; background: transparent; color: var(--text);
    font-size: 0.97rem; line-height: 1.6; max-height: 200px; padding: 7px 0; outline: none;
}
.composer__send {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    border: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff; box-shadow: 0 6px 16px -6px rgba(74,158,255,0.8); transition: all 0.18s;
}
.composer__send:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.composer__send:disabled { opacity: 0.45; cursor: not-allowed; }
.composer__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; padding: 0 4px; }
.composer__hint { font-size: 0.74rem; color: var(--text-mute); }

/* ===================================================================
   管理ページ
   =================================================================== */
.admin { flex: 1; overflow-y: auto; padding: 30px; }
.admin__inner { max-width: 1080px; margin: 0 auto; }
.admin__head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.admin__head h1 { font-size: 1.5rem; font-weight: 600; }
.admin__head .badge { font-size: 0.74rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
}
.stat__num { font-size: 1.9rem; font-weight: 700; color: var(--accent-bright); font-family: var(--font-brand); }
.stat__label { font-size: 0.82rem; color: var(--text-mute); margin-top: 2px; }

.panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden; margin-bottom: 22px;
}
.panel__head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel__head h2 { font-size: 1.05rem; font-weight: 600; }
.panel__body { padding: 8px 0; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
    text-align: left; padding: 12px 18px;
    font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-mute); font-weight: 600; border-bottom: 1px solid var(--border);
}
.table td { padding: 13px 18px; border-bottom: 1px solid rgba(110,160,240,0.08); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(36, 60, 110, 0.18); }
.table__user { display: flex; align-items: center; gap: 11px; }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
.cell-mute { color: var(--text-mute); font-size: 0.84rem; }

/* モーダル */
.modal-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(4, 8, 18, 0.7); backdrop-filter: blur(4px);
    display: grid; place-items: center; padding: 24px;
    animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 100%; max-width: 440px;
    background: var(--surface-solid); border: 1px solid var(--border-hi);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden; animation: rise 0.3s cubic-bezier(0.2,0.7,0.2,1);
}
.modal__head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal__head h3 { font-size: 1.1rem; font-weight: 600; }
.modal__body { padding: 22px 24px; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal__close { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--text-mute); display: grid; place-items: center; }
.modal__close:hover { background: var(--surface-hi); color: var(--text); }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider { position: absolute; inset: 0; background: rgba(110,160,240,0.25); border-radius: 999px; transition: 0.2s; }
.switch__slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .switch__slider { background: var(--accent); }
.switch input:checked + .switch__slider::before { transform: translateX(18px); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty-state svg { opacity: 0.4; margin-bottom: 12px; }

/* アイコン（インラインSVG用） */
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--sm { width: 15px; height: 15px; }

/* ===================================================================
   未来予測レポート（チャット内表示）
   =================================================================== */
.report {
    border: 1px solid var(--border-hi);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(36,60,110,0.28), rgba(12,22,42,0.4));
    overflow: hidden;
    box-shadow: var(--shadow);
}
.report__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 16, 33, 0.5);
}
.report__badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em;
    color: var(--accent-glow);
}
.report__badge .icon { fill: var(--accent-glow); stroke: none; }
.report__part { font-size: 0.74rem; color: var(--text-mute); font-weight: 600; }
.report__content { padding: 18px 20px; }

/* Markdown 表（チャット内・ダークテーマ） */
.md-table { overflow-x: auto; margin: 0.9em 0; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.msg__content table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
.msg__content th {
    background: rgba(43, 111, 214, 0.28); color: var(--text);
    text-align: left; padding: 9px 12px; font-weight: 600; white-space: nowrap;
    border-bottom: 1px solid var(--border-hi);
}
.msg__content td { padding: 9px 12px; border-bottom: 1px solid rgba(110,160,240,0.10); border-right: 1px solid rgba(110,160,240,0.06); vertical-align: top; }
.msg__content tbody tr:nth-child(even) td { background: rgba(36, 60, 110, 0.14); }
.msg__content table tr:last-child td { border-bottom: none; }
.msg__content hr { border: none; border-top: 1px solid var(--border); margin: 1.3em 0; }
.msg__content h4 { margin: 1em 0 0.5em; font-size: 0.95rem; color: var(--accent-glow); }

/* レポート操作バー */
.report-actions {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: 4px 0 26px 52px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.report-actions__done {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--success); font-weight: 600; font-size: 0.9rem;
}
.report-actions__dl { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.report-actions__label { font-size: 0.8rem; color: var(--text-mute); }
.report-progress { margin-top: 8px; font-size: 0.82rem; color: var(--text-soft); }

@media (max-width: 860px) {
    .report-actions { margin-left: 0; }
    .report-actions__dl { margin-left: 0; width: 100%; }
}

/* ===================================================================
   レスポンシブ
   =================================================================== */
.sidebar__toggle { display: none; }
.scrim { display: none; }

@media (max-width: 860px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
        transform: translateX(-100%); transition: transform 0.25s ease;
        box-shadow: 0 0 60px rgba(0,0,0,0.6);
    }
    .app.is-open .sidebar { transform: translateX(0); }
    .app.is-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4,8,18,0.6); }
    .sidebar__toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
    .suggest { grid-template-columns: 1fr; }
    .admin { padding: 18px; }
    .table th:nth-child(4), .table td:nth-child(4),
    .table th:nth-child(5), .table td:nth-child(5) { display: none; }
}
