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

:root {
    /* ダークモード（デフォルト） */
    --primary: #ffd659;
    --primary-dark: #f5cb4c;
    --bg-dark: #000000;
    --bg-card: #222222;
    --text-primary: #FAF3E1;
    --text-secondary: #C9B8A8;
    --border: #3a3a2e;
    --success: #00d084;
    --error: #ff4444;
}

/* ライトモード */
@media (prefers-color-scheme: light) {
    :root {
        --primary: #f7be45;
        --primary-dark: #dfb742;
        --bg-dark: #EAEFEF;
        --bg-card: #BFC9D1;
        --text-primary: #25343F;
        --text-secondary: #5A6B7A;
        --border: #A8B3BD;
        --success: #00d084;
        --error: #ff4444;
    }
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
}

/* ==================== スタート画面 ==================== */
.start-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    transition: opacity 0.3s ease;
}

.start-screen.hidden {
    display: none;
    pointer-events: none;
}

.start-container {
    text-align: center;
    padding: 40px;
    max-width: 600px;
}

.start-container h1 {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.start-container p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn {
    padding: 14px 28px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 155, 81, 0.4);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: #000;
    transform: translateY(-2px);
}

.btn-install {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    margin-top: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.btn-install:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 155, 81, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 155, 81, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 155, 81, 0.5);
    }
}

/* ==================== スタート画面 - Copyright ==================== */
.start-copyright {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 20px;
}

.start-copyright p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== ビューアコンテナ ==================== */
.viewer-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    position: relative;
}

.viewer-container.hidden {
    display: none;
    pointer-events: none;
}

/* ==================== シート表示エリア ==================== */
.sheet-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
    overflow: hidden;
    position: relative;
    user-select: none;
    touch-action: none;
    height: 100%;
}

.sheet-container:focus {
    outline: none;
}

#sheetCanvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-stack {
    display: none;
    width: 100%;
    padding: 16px 0 32px;
    gap: 16px;
    flex-direction: column;
    align-items: center;
}

.page-stack .page-canvas {
    display: block;
    background-color: var(--bg-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border-radius: 6px;
}

/* ==================== メニューバー ==================== */
.menu-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    gap: 12px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
}

.top-menu {
    border-bottom: 1px solid var(--border);
    top: 0;
}

.bottom-menu {
    border-top: 1px solid var(--border);
    bottom: 0;
}

.menu-bar.hidden {
    opacity: 0;
    pointer-events: none;
}

.top-menu.hidden {
    transform: translateY(-100%);
}

.bottom-menu.hidden {
    transform: translateY(100%);
}

/* ==================== ランドスケープ表示 ==================== */
body.landscape .sheet-container {
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    touch-action: pan-y;
}

body.landscape #sheetCanvas {
    display: none;
}

body.landscape .page-stack {
    display: flex;
}

.menu-btn {
    padding: 8px 12px;
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-btn:hover {
    background-color: var(--primary);
    color: #000;
}

.menu-btn:active {
    transform: scale(0.95);
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#fileName {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

#pageIndicator {
    font-size: 12px;
    color: var(--text-secondary);
}

.page-slider {
    flex: 1;
    min-width: 100px;
    margin: 0 12px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--bg-card), var(--border));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.page-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.page-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ==================== コンテキストメニュー/WebRTCダイアログ ==================== */
.context-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 300px;
    overflow: hidden;
    padding: 0;
}

.context-menu.hidden {
    display: none;
    pointer-events: none;
}

.webrtc-header {
    padding: 16px;
    background-color: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webrtc-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.webrtc-actions .menu-item {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    margin-top: 0;
    border-radius: 6px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
}

.webrtc-actions .menu-item:hover {
    background-color: var(--border);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.webrtc-actions #closeWebrtcBtn,
.webrtc-actions #closeOffsetDialogBtn {
    background-color: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff8888;
}

.webrtc-actions #closeWebrtcBtn:hover,
.webrtc-actions #closeOffsetDialogBtn:hover {
    background-color: rgba(255, 68, 68, 0.2);
    border-color: #ff4444;
    color: #ff4444;
}

.close-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-btn:hover {
    color: #ff4444;
    transform: scale(1.15);
}

.menu-item {
    width: 100%;
    padding: 12px 16px;
    background-color: transparent;
    color: var(--text-primary);
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background-color: var(--border);
    color: var(--primary);
}

/* ローディングアニメーション */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ファイルダウンロードプログレスバー */
.progress-bar-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.progress-bar-container.hidden {
    display: none;
}

.progress-bar-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    text-align: center;
}

.progress-track {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #00ffff);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-percentage {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.context-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* ==================== ダイアログ ==================== */
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.dialog.hidden {
    display: none;
    pointer-events: none;
}

.dialog-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

.dialog-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
    color: var(--primary);
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-close:hover {
    color: var(--text-primary);
}

/* インストール手順スタイル */
.install-instructions {
    text-align: left;
    margin-top: 20px;
}

.install-instructions h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.install-instructions ol {
    margin: 0;
    padding-left: 24px;
    color: var(--text-primary);
}

.install-instructions li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.install-instructions strong {
    color: var(--primary);
    font-weight: 600;
}

.install-note {
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-dark);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.qr-container {
    background-color: var(--bg-dark);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin: 16px 16px;
}

.qr-container canvas {
    max-width: 100%;
    height: auto;
}

.connection-code {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 2px;
    margin: 0 16px 16px 16px;
}

.info-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 16px 16px 16px;
    line-height: 1.6;
}

/* QRコードリーダー */
#qrScannerDialog {
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

#qrScannerDialog .webrtc-header {
    background: linear-gradient(135deg, rgba(255, 214, 89, 0.15) 0%, rgba(255, 214, 89, 0.05) 100%);
    border-bottom: 2px solid var(--primary);
}

#qrScannerDialog .webrtc-header span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.qr-reader {
    margin: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-reader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

#qrReader {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* html5-qrcode のビデオ要素 */
#qrReader video {
    width: 100% !important;
    max-height: 400px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    border: 3px solid var(--primary) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 214, 89, 0.1),
                0 0 40px rgba(255, 214, 89, 0.2) !important;
    background: #000 !important;
}

/* html5-qrcode のコンテナ */
#qrReader > div {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
}

/* html5-qrcode のスキャンリージョン */
#qrReader #qr-shaded-region {
    border: 3px solid var(--primary) !important;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6),
                inset 0 0 20px rgba(255, 214, 89, 0.3) !important;
    animation: qr-scan-pulse 2s ease-in-out infinite !important;
}

@keyframes qr-scan-pulse {
    0%, 100% {
        border-color: var(--primary);
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6),
                    inset 0 0 20px rgba(255, 214, 89, 0.3),
                    0 0 20px rgba(255, 214, 89, 0.5);
    }
    50% {
        border-color: var(--primary-dark);
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6),
                    inset 0 0 30px rgba(255, 214, 89, 0.5),
                    0 0 30px rgba(255, 214, 89, 0.8);
    }
}

/* html5-qrcode のボタン */
#qrReader #html5-qrcode-button-camera-permission,
#qrReader #html5-qrcode-button-camera-start,
#qrReader #html5-qrcode-button-camera-stop,
#qrReader button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #000 !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 8px 4px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(255, 214, 89, 0.3) !important;
}

#qrReader #html5-qrcode-button-camera-permission:hover,
#qrReader #html5-qrcode-button-camera-start:hover,
#qrReader #html5-qrcode-button-camera-stop:hover,
#qrReader button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 214, 89, 0.5) !important;
}

#qrReader #html5-qrcode-button-camera-permission:active,
#qrReader #html5-qrcode-button-camera-start:active,
#qrReader #html5-qrcode-button-camera-stop:active,
#qrReader button:active {
    transform: translateY(0) !important;
}

/* html5-qrcode のセレクトボックス */
#qrReader select {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--border) !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    margin: 8px 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#qrReader select:hover {
    border-color: var(--primary) !important;
}

#qrReader select:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 214, 89, 0.2) !important;
}

/* html5-qrcode のリンク */
#qrReader #html5-qrcode-anchor-scan-type-change {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
}

#qrReader #html5-qrcode-anchor-scan-type-change:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* html5-qrcode のテキスト */
#qrReader span,
#qrReader div {
    color: var(--text-primary) !important;
    font-size: 14px !important;
}

/* html5-qrcode のダッシュボードセクション */
#qrReader #html5-qrcode-dashboard-section-csr {
    background-color: transparent !important;
    padding: 12px 0 !important;
}

#qrReader #html5-qrcode-dashboard-section-csr > div {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

/* ファイル選択セクション */
#qrReader #html5-qrcode-dashboard-section-fsr {
    background-color: rgba(0, 0, 0, 0.2) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin-top: 12px !important;
}

/* QRスキャナーダイアログのインフォテキスト */
#qrScannerDialog .info-text {
    background: linear-gradient(135deg, rgba(255, 214, 89, 0.1) 0%, rgba(255, 214, 89, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* QRスキャナーのキャンセルボタン */
#qrScannerDialog .webrtc-actions {
    padding: 0 16px 16px 16px;
    margin-top: 0;
}

#qrScannerDialog #stopScanBtn {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15) 0%, rgba(255, 68, 68, 0.1) 100%);
    border: 2px solid rgba(255, 68, 68, 0.4);
    color: #ff6666;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#qrScannerDialog #stopScanBtn:hover {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.25) 0%, rgba(255, 68, 68, 0.15) 100%);
    border-color: #ff4444;
    color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

/* ==================== ヘルプダイアログ ==================== */
#helpDialog {
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
}

.help-content {
    padding: 20px 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 20px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.help-section p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.help-section ul {
    list-style-position: inside;
    padding-left: 10px;
}

.help-section ul li {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 6px;
}

.help-section ol {
    list-style-position: inside;
    padding-left: 10px;
}

.help-section ol li {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 6px;
}

/* ==================== レスポンシブ ==================== */
@media (max-width: 600px) {
    .start-container {
        padding: 20px;
    }

    .start-container h1 {
        font-size: 36px;
    }

    .start-container p {
        font-size: 16px;
    }

    .menu-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .menu-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .file-info {
        flex: 1;
    }

    .page-slider {
        display: none;
    }

    .dialog-content {
        padding: 24px;
    }

    .connection-code {
        font-size: 20px;
    }

    /* QRスキャナーのモバイル対応 */
    #qrScannerDialog {
        width: 95%;
        max-width: none;
    }

    .qr-reader {
        padding: 12px;
    }

    #qrScannerDialog .info-text {
        font-size: 13px;
        padding: 12px;
        margin: 12px;
    }

    #qrReader #html5-qrcode-button-camera-permission,
    #qrReader #html5-qrcode-button-camera-start,
    #qrReader #html5-qrcode-button-camera-stop,
    #qrReader button {
        padding: 10px 18px !important;
        font-size: 13px !important;
        margin: 6px 2px !important;
    }

    #qrReader select {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
}

/* ==================== ダークモード対応 ==================== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg-dark);
        color: var(--text-primary);
    }
}

/* ==================== プリント対応 ==================== */
@media print {
    .menu-bar,
    .context-menu,
    .dialog {
        display: none !important;
    }

    .sheet-container {
        background-color: white;
    }
}
