/* おしごとみえるっち マニュアル共通スタイル - PDF最適化版 */

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.5;
    color: #333;
    max-width: 210mm;
    margin: 0 auto;
    padding: 15mm;
    background: #fff;
    font-size: 13px;
}

.header-logo {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 15px;
}

.header-logo img {
    max-height: 100px;
    margin-bottom: 20px;
}

.header-logo h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

.header-logo p {
    margin: 10px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
}

h1 {
    color: #1e3c72;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 20px;
}

h2 {
    color: #1e3c72;
    border-left: 4px solid #1e3c72;
    padding-left: 12px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    page-break-before: auto;
    page-break-after: avoid;
}

.section-break {
    page-break-before: always;
}

h3 {
    color: #444;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

h4 {
    color: #555;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 14px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.toc {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.toc h2 {
    margin-top: 0;
    color: #495057;
    font-size: 20px;
    text-align: center;
}

.toc-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.toc ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.toc li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.toc li:before {
    content: "▶";
    color: #1e3c72;
    position: absolute;
    left: 0;
    font-size: 12px;
}

.step-list {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.step-list ol {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.step-list li {
    margin: 8px 0;
    font-size: 13px;
}

.step-list li ul {
    list-style-type: none;
    padding-left: 20px;
}

.step-list li ul li {
    position: relative;
    padding-left: 15px;
}

.step-list li ul li:before {
    content: "•";
    color: #666;
    position: absolute;
    left: 0;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.warning h4 {
    color: #856404;
    margin-top: 0;
    font-size: 14px;
}

.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.info h4 {
    color: #0c5460;
    margin-top: 0;
    font-size: 14px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature-card h4 {
    color: #1e3c72;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 15px;
}

.feature-card ul {
    margin: 10px 0 0 0;
    padding-left: 18px;
}

.feature-card li {
    font-size: 13px;
    margin: 6px 0;
}

.button-example {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary { background: #007bff; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-secondary { background: #6c757d; color: white; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    font-size: 13px;
}

th, td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

.page-break {
    page-break-before: always;
}

.avoid-break {
    page-break-inside: avoid;
}

ul, ol {
    padding-left: 20px;
}

li {
    margin: 5px 0;
    font-size: 13px;
}

p {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
}

/* 画像サイズ最適化 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* サイズ別画像クラス */
.large-image {
    max-width: 80%;
}

.medium-image {
    max-width: 60%;
}

.small-image {
    max-width: 300px;
}

/* インラインスタイルでwidth指定された画像を小さく */
img[style*="width: 80%"] {
    max-width: 70% !important;
}

img[style*="width: 85%"] {
    max-width: 75% !important;
}

.compact-section {
    margin: 20px 0;
}

.compact-section h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
    body {
        padding: 15px;
        max-width: 100%;
        font-size: 13px;
    }
    
    .two-column,
    .toc-content,
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
    }
    
    .header-logo h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
}

@media print {
    /* ヘッダー・フッターを非表示にする設定 */
    @page {
        size: A4 portrait;
        margin: 10mm;
        /* ヘッダー・フッターを無効化 */
        @top-left { content: none; }
        @top-center { content: none; }
        @top-right { content: none; }
        @bottom-left { content: none; }
        @bottom-center { content: none; }
        @bottom-right { content: none; }
    }
    
    body {
        margin: 0;
        padding: 10mm;
        font-size: 11px;
        line-height: 1.4;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .header-logo {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .header-logo h1 { font-size: 20px; }
    .header-logo p { font-size: 12px; }
    h1 { font-size: 16px; }
    h2 { font-size: 14px; margin-top: 20px; margin-bottom: 10px; }
    h3 { font-size: 13px; margin-top: 15px; margin-bottom: 8px; }
    h4 { font-size: 12px; margin-top: 12px; margin-bottom: 6px; }
    
    .page-break, .section-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
    
    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .two-column {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .toc {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .step-list, .info, .warning {
        padding: 10px 15px;
        margin: 10px 0;
    }
    
    .feature-card {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }
    
    /* ブラウザのデフォルトヘッダー・フッターを非表示 */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-top: 3px solid #1e3c72;
}

.intro-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.intro-text {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #1e3c72;
}

/* スマートウォッチ版専用のスタイル */
.watch-specific {
    background: #e8f4fd;
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.watch-specific h4 {
    color: #004085;
    margin-top: 0;
    font-size: 14px;
}

.device-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin: 0 4px;
}

.status-connected {
    background: #d4edda;
    color: #155724;
}

.status-disconnected {
    background: #f8d7da;
    color: #721c24;
}

.status-charging {
    background: #fff3cd;
    color: #856404;
}

.image-with-caption {
    text-align: center;
    margin: 20px 0;
}

.image-with-caption img {
    max-width: 100%;
    height: auto;
    border: none;
    border-radius: 8px;
    margin-bottom: 10px;
}

.image-with-caption .caption {
    text-align: center;
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

.watch-screenshot {
    max-width: 200px;
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.setup-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.indicator-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.indicator-success {
    background: #28a745;
}

.indicator-warning {
    background: #ffc107;
}

.indicator-error {
    background: #dc3545;
}
