/* ====================================================
   Variables & Reset
   ==================================================== */
:root {
    /* Atlassian Design System Tokens */
    --color-text-primary: #292a2e;
    --color-text-secondary: #505258;
    --color-text-tertiary: #DC2626;
    --color-surface-muted: #ffffff;
    --color-surface-base: #000000;
    --color-surface-raised: #f8f8f8;
    --color-border-strong: #0b120e;
    
    --space-1: 6px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 80px;

    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 16px;
    --radius-xl: 40px;
    --radius-2xl: 9999px;

    --font-family-stack: 'Atlassian Sans', ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Ubuntu, 'Helvetica Neue', sans-serif;

    /* Legacy Mappings */
    --bg-color: var(--color-surface-raised);
    --sidebar-bg: var(--color-surface-muted);
    --panel-bg: var(--color-surface-muted);
    --panel-border: var(--color-border-strong);
    --text-primary: var(--color-text-primary);
    --text-secondary: var(--color-text-secondary);
    --text-muted: var(--color-text-secondary);
    --accent-color: var(--color-text-tertiary);
    --accent-hover: #B91C1C;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --font-heading: var(--font-family-stack);
    --font-body: var(--font-family-stack);
    --font-number: var(--font-family-stack);
    --radius: var(--radius-md);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* ====================================================
   アプリ全体レイアウト
   ==================================================== */
.l-app { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

.l-app__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.l-app__header {
    height: 80px;
    min-height: 80px;
    border-bottom: 2px solid var(--panel-border);
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.l-app__content {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ====================================================
   グローバルナビ
   ==================================================== */
.c-gnav { padding: 24px 0; height: 100%; display: flex; flex-direction: column; }
.c-gnav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 32px;
}
.c-gnav__logo-mark {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.c-gnav__logo-text { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.c-gnav__menu { flex: 1; display: flex; flex-direction: column; }
.c-gnav__link {
    padding: 11px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.c-gnav__link:hover { color: var(--text-primary); background: var(--bg-color); }
.c-gnav__link.is-active {
    border-left-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(99,102,241,0.05);
    font-weight: 700;
}

/* ====================================================
   同期ボタン
   ==================================================== */
.c-sync-btn {
    width: 100%;
    padding: 16px;
    border-radius: 0;
    border: 2px solid var(--panel-border);
    background: var(--text-primary);
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.c-sync-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.c-sync-status {
    font-size: 11px;
    color: var(--success);
    white-space: nowrap;
    display: none;
}

/* ====================================================
   ヘッダー
   ==================================================== */
.c-header { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 16px; }
.c-header__left { display: flex; align-items: center; gap: 12px; }
.c-header__right { display: flex; align-items: center; gap: 12px; }
.c-header__company { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.04em; }
.c-header__separator { color: #ccc; font-size: 20px; font-weight: 300; margin: 0 4px; }
.c-avatar {
    width: 34px;
    height: 34px;
    background: var(--text-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ====================================================
   レポートレイアウト（メインエリア）
   ==================================================== */
.l-report-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.report-main {
    flex: 1;
    padding: 60px 80px; /* 大胆な余白（ガイドライン準拠） */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 80px; /* セクション間の余裕 */
}

/* ====================================================
   レポート報告セクション
   ==================================================== */
.report-section {
    background: transparent;
    border: none;
    border-radius: 0;
}

.report-section__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 0 32px 0;
    border-bottom: 2px solid var(--panel-border);
    margin-bottom: 40px;
}

.report-section__title {
    font-family: var(--font-heading);
    font-size: 26px; /* c-header__company と同じフォントサイズ */
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.report-section__period {
    font-size: 12px;
    color: var(--text-muted);
}

/* ====================================================
   PDFスライダー（PDF.jsベース）
   ==================================================== */
.pdf-slider {
    position: relative;
    width: 100%;
    background: #e5e4df; /* 紙のような質感に近いグレーベージュ */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 660px;
    border: 2px solid var(--panel-border);
    margin-top: 10px;
    overflow: hidden;
    user-select: none;
}

.pdf-slider__viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 24px 0;
}

.pdf-slider__canvas {
    display: block;
    max-width: 100%;
    /* 意図のある境界線。シャドウは極限まで薄く */
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 20px 20px 0 rgba(0,0,0,0.05); /* エディトリアルなオフセット表現 */
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pdf-slider__canvas.is-sliding-out-left  { opacity: 0; transform: translateX(-60px); }
.pdf-slider__canvas.is-sliding-out-right { opacity: 0; transform: translateX(60px); }
.pdf-slider__canvas.is-sliding-in-left   { opacity: 0; transform: translateX(60px); }
.pdf-slider__canvas.is-sliding-in-right  { opacity: 0; transform: translateX(-60px); }

.pdf-slider__loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    background: #1a1a2e;
    z-index: 5;
    transition: opacity 0.3s;
}
.pdf-slider__loading.is-hidden { opacity: 0; pointer-events: none; }

/* ナビゲーション矢印 */
.pdf-slider__nav {
    width: 60px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}
.pdf-slider__nav:hover { background: rgba(0,0,0,0.05); color: var(--accent-color); }
.pdf-slider__nav:disabled { opacity: 0.2; cursor: default; }

/* ページインジケーター */
.pdf-slider__indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    font-family: var(--font-number);
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    z-index: 10;
    letter-spacing: 0.05em;
}

/* ====================================================
   アクションバー（音声・理解度ボタン）
   ==================================================== */
.action-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    background: #fff;
    border: 2px solid var(--panel-border);
    padding: 32px 40px;
    margin-top: -2px; /* PDFスライダーの枠と重ねる（オーバーラップ） */
}

.action-bar__understanding {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-left: auto;
}

/* ページ選択 */
.action-bar__page-select {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-right: 8px;
}

.action-bar__page-label {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.action-bar__page-dropdown {
    padding: 12px 16px;
    border: 2px solid var(--panel-border);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.action-bar__page-dropdown:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* ====================================================
   ボタン共通
   ==================================================== */
.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid var(--panel-border);
    border-radius: 0; /* シャープな矩形 */
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 800;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.c-btn--audio {
    padding: 14px 28px;
    font-size: 15px;
    background: var(--text-primary);
    color: #fff;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.c-btn--audio:hover { background: #333; transform: translateY(-1px); }
.c-btn--audio.is-playing { background: var(--danger); }

.c-btn--ok {
    padding: 10px 20px;
    font-size: 13px;
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
    min-width: 140px;
}
.c-btn--ok:hover, .c-btn--ok.is-selected {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.c-btn--ng {
    padding: 10px 20px;
    font-size: 13px;
    background: #fff;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    min-width: 140px;
}
.c-btn--ng:hover, .c-btn--ng.is-selected {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.c-btn--send {
    padding: 0 40px;
    font-size: 14px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    border-left: 2px solid var(--panel-border);
    border-radius: 0;
}
.c-btn--send:hover { background: #333; }

/* ====================================================
   チャットセクション
   ==================================================== */
.chat-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 0;
    border: 2px solid var(--panel-border);
    background: #fff;
}

.chat-section {
    background: #fff;
    border: none;
    border-right: 2px solid var(--panel-border);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 540px;
    flex-shrink: 0;
    position: relative;
}

.chat-section__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    border-bottom: 2px solid var(--panel-border);
    background: #fff;
}

.chat-section__avatar {
    width: 48px;
    height: 48px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-section__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.chat-section__sub {
    font-size: 12px;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;               /* 残りの高さをすべて使用 */
    padding: 20px 24px;
    overflow-y: auto;      /* メッセージが増えたらスクロール */
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-color);
}

/* チャットメッセージ */
.c-msg { display: flex; }
.c-msg--ai  { justify-content: flex-start; }
.c-msg--user { justify-content: flex-end; }

.c-msg__bubble {
    max-width: 85%;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    border-radius: 0; /* 徹底した矩形 */
    word-break: break-word;
}
.c-msg--ai  .c-msg__bubble {
    background: #fff;
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
}
.c-msg--user .c-msg__bubble {
    background: var(--text-primary);
    color: #fff;
}

.chat-input-area {
    display: flex;
    gap: 0;
    padding: 0;
    border-top: 2px solid var(--panel-border);
}

.chat-input {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 24px 32px;
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    background: #fff;
}
.chat-input:focus { border-color: var(--accent-color); }

.chat-api-key {
    padding: 8px 24px 14px;
    border-top: 1px solid var(--panel-border);
    background: #fafafa;
}
.chat-api-key__input {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    color: var(--text-muted);
    outline: none;
    font-family: monospace;
    background: #fff;
}

/* ====================================================
   弊社への問い合わせフォーム（デモ用）
   ==================================================== */
.contact-form-section {
    padding: 32px 40px;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 540px;
}

.contact-form-section__header {
    margin-bottom: 24px;
}

.contact-form-section__title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.contact-form-section__sub {
    font-size: 13px;
    color: var(--text-muted);
}

.c-form-group {
    margin-bottom: 20px;
}

.c-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.c-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--panel-border);
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.c-input:focus {
    border: 2px solid var(--text-primary);
    padding: 11px 15px; /* Border thickness adjustment */
}

.c-textarea {
    width: 100%;
    height: 100px;
    resize: none;
}

.c-btn--form {
    align-self: flex-start;
    margin-top: auto;
    padding: 16px 48px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
}
.c-btn--form:hover { background: #333; }

/* ====================================================
   詳細データ参照ボタン（縦書き）
   ==================================================== */
.detail-tab-trigger {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: var(--text-primary);
    color: #fff;
    border: none;
    padding: 32px 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2em;
    cursor: pointer;
    border-radius: 0;
    z-index: 50;
    transition: all 0.2s;
    text-transform: uppercase;
}
.detail-tab-trigger:hover { background: var(--accent-color); }

/* ====================================================
   詳細データサイドパネル
   ==================================================== */
.detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 100;
    backdrop-filter: blur(2px);
}
.detail-overlay.is-open { display: block; }

.detail-panel {
    position: fixed;
    top: 0;
    right: -680px;
    width: 660px;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.detail-panel.is-open { right: 0; }

.detail-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--panel-border);
    background: var(--bg-color);
    flex-shrink: 0;
}

.detail-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-panel__close {
    background: none;
    border: 1px solid var(--panel-border);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    transition: all 0.15s;
}
.detail-panel__close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.detail-panel__kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 24px 0;
    flex-shrink: 0;
}

.detail-panel__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.detail-panel__chart-wrap {
    background: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

.detail-panel__insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* ====================================================
   タブ
   ==================================================== */
.dashboard__tabs {
    display: flex;
    gap: 24px;
    border-bottom: 2px solid var(--panel-border);
    padding: 0 24px;
    flex-shrink: 0;
}
.tab-btn {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    padding: 12px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.is-active { color: var(--accent-color); }
.tab-btn.is-active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.tab-pane { display: none; padding: 0 24px; }
.tab-pane.is-active { display: block; overflow-y: auto; max-height: calc(100vh - 280px); }

/* ====================================================
   KPIカード
   ==================================================== */
.kpi-card {
    background: #fff;
    border: 1px solid var(--panel-border);
    padding: 16px 18px;
    border-radius: 8px;
}
.kpi-card__label { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.kpi-card__value { font-family: var(--font-number); font-size: 22px; font-weight: 800; }
.kpi-card__value--danger { color: var(--danger); }

/* ====================================================
   インサイトカード
   ==================================================== */
.insight-card {
    background: #fff;
    border: 1px solid var(--panel-border);
    padding: 18px;
    border-radius: 8px;
}

.c-card__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chart-container { position: relative; width: 100%; }

/* ====================================================
   Voice Chat Section (AI Voice Concierge)
   ==================================================== */
.voice-chat-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: #fff;
    padding: 80px 60px;
    border: 2px solid var(--panel-border);
    margin-top: -2px;
    margin-bottom: 80px; /* 最後の余白を確保 */
    position: relative;
    min-height: 520px; /* 高さをしっかり確保 */
    flex-shrink: 0; /* 潰れないように固定 */
    display: flex;
    align-items: center;
}

.voice-chat-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotateGradient 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.voice-chat-section__inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.voice-chat-status {
    display: flex;
    align-items: center;
    gap: 24px;
}

.voice-chat-status__ai {
    position: relative;
    width: 100px;
    height: 100px;
}

.voice-chat-avatar {
    width: 100%;
    height: 100%;
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.voice-chat-visualizer {
    position: absolute;
    inset: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.voice-chat-visualizer.is-active {
    opacity: 1;
}

.voice-chat-visualizer .bar {
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: pulse 1s infinite ease-in-out;
}

.voice-chat-visualizer .bar:nth-child(2) { animation-delay: 0.2s; }
.voice-chat-visualizer .bar:nth-child(3) { animation-delay: 0.4s; }
.voice-chat-visualizer .bar:nth-child(4) { animation-delay: 0.6s; }
.voice-chat-visualizer .bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes pulse {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}

.voice-chat-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    font-style: italic;
    margin-bottom: 8px;
}

.voice-chat-sub {
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.voice-chat-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.voice-chat-placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.voice-chat-input-wrap {
    display: flex;
    gap: 0;
    background: #fff;
    padding: 4px;
    border-radius: 0;
}

.voice-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 20px 30px;
    font-size: 16px;
    font-family: var(--font-body);
    outline: none;
    color: #1a1a1a;
}

.voice-chat-send-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 0 40px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.voice-chat-send-btn:hover {
    background: var(--accent-color);
}

.voice-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ====================================================
   Accessibility: Focus Visible
   ==================================================== */
*:focus-visible {
    outline: 2px solid var(--color-text-tertiary);
    outline-offset: 2px;
}

/* ====================================================
   スライド・解説2カラム固定レイアウト (.pdf-slider-layout)
   ==================================================== */
.pdf-slider-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-top: 10px;
    width: 100%;
}

.pdf-slider-layout__main {
    flex: 1;
    min-width: 0;
    position: relative;
}

.pdf-slider-layout__sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* スライダー側 (左側) のサイズ調整 */
.pdf-slider-layout__main .pdf-slider {
    min-height: auto;
    height: 520px;
    margin-top: 0;
    border: 2px solid var(--panel-border);
}

.pdf-slider-layout__main .pdf-slider__viewport {
    padding: 10px 0;
}

.pdf-slider-layout__main .slide-frame-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.pdf-slider-layout__main #slide-frame {
    box-shadow: 10px 10px 0 rgba(0,0,0,0.05) !important;
}

/* 右側スライド解説パネル */
.slide-explanation-panel {
    background: #fff;
    border: 2px solid var(--panel-border);
    height: 520px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.05);
}

.slide-explanation-panel__header {
    padding: 14px 20px;
    border-bottom: 2px solid var(--panel-border);
    background: var(--bg-color);
    flex-shrink: 0;
}

.slide-explanation-panel__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin: 0;
}

.slide-explanation-panel__content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fff;
}

/* フローティングナビゲーションボタン */
.pdf-slider-layout__main .pdf-slider__nav {
    position: absolute;
    top: auto;
    bottom: 24px;
    transform: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--panel-border);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
    z-index: 20;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.15s ease;
    padding: 0;
}

.pdf-slider-layout__main .pdf-slider__nav--prev {
    left: 16px;
}

.pdf-slider-layout__main .pdf-slider__nav--next {
    right: 16px;
}

.pdf-slider-layout__main .pdf-slider__nav:hover:not(:disabled) {
    background: var(--text-primary);
    color: #fff;
    transform: scale(1.05);
}

.pdf-slider-layout__main .pdf-slider__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-muted);
}

/* アクションバーとスライダーの間隔調整 */
.pdf-slider-layout + .action-bar {
    margin-top: 24px; /* 隙間を設けて綺麗にする */
}

/* ====================================================
   レスポンシブ対応 (768px未満)
   ==================================================== */
@media (max-width: 768px) {
    .pdf-slider-layout {
        flex-direction: column;
        gap: 16px;
    }
    
    .pdf-slider-layout__sidebar {
        width: 100%;
    }
    
    .pdf-slider-layout__main .pdf-slider {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .slide-explanation-panel {
        height: 250px;
    }
}
