* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
}
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}
h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}
.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9ff;
}
.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
}
.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}
.upload-icon {
    font-size: 60px;
    margin-bottom: 20px;
}
.upload-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}
.upload-hint {
    color: #666;
    font-size: 0.9em;
}
input[type="file"] {
    display: none;
}
.file-info {
    display: none;
}
.file-info.active {
    display: block;
}
.file-name {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}
.metadata-section {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.metadata-title {
    font-size: 1.1em;
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
}
.metadata-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 20px;
}
.metadata-item:last-child {
    border-bottom: none;
}
.metadata-key {
    color: #666;
    font-weight: 500;
}
.metadata-value {
    color: #333;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}
.button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}
.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.button.secondary {
    background: #6c757d;
}
.button.download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}
.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.feature-title {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}
.feature-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}
.status-message {
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    line-height: 1.6;
}
.status-message.success {
    background: #d4edda;
    color: #155724;
}
.status-message.error {
    background: #f8d7da;
    color: #721c24;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}
.warning-box {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #0c5460;
    line-height: 1.6;
}
.warning-box strong {
    display: block;
    margin-bottom: 5px;
}
#downloadBtn {
    display: none;
}
#downloadBtn.active {
    display: inline-block;
}

/* --- パターンA: 使い方セクションの追加スタイル --- */
.guide-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}
.guide-card h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 12px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}
.guide-intro {
    color: #444;
    font-size: 0.98em;
    line-height: 1.6;
    margin-bottom: 25px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.step-item {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    border-top: 4px solid #667eea;
}
.step-num {
    position: absolute;
    top: -15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}
.step-item h3 {
    font-size: 1.1em;
    color: #333;
    margin-top: 5px;
    margin-bottom: 8px;
}
.step-item p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}
.security-info {
    background: #e2f0d9;
    border-left: 4px solid #385723;
    padding: 15px;
    border-radius: 5px;
    color: #385723;
    line-height: 1.6;
}
.security-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.95em;
}
.security-info p {
    font-size: 0.9em;
    margin: 0;
}

/* --- パターンB: FAQセクションの追加スタイル --- */
.faq-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}
.faq-card h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 8px;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.faq-item {
    background: #fcfbfe;
    border: 1px solid #e8e5ed;
    border-radius: 10px;
    padding: 18px;
}
.faq-q {
    font-weight: 600;
    color: #764ba2;
    font-size: 1em;
    margin-bottom: 8px;
}
.faq-a {
    color: #555;
    font-size: 0.92em;
    line-height: 1.6;
}

/* --- 免責事項・アコーディオンエリアの設定 --- */
.disclaimer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 10px 20px;
    margin-top: 30px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.disclaimer details {
    padding: 12px 0;
}
.disclaimer summary {
    font-size: 0.98em;
    font-weight: 600;
    color: #856404;
    cursor: pointer;
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.disclaimer summary::-webkit-details-marker {
    display: none;
}
.disclaimer summary::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
    opacity: 0.7;
}
.disclaimer details[open] summary::after {
    transform: rotate(180deg);
}
.accordion-content {
    padding-top: 15px;
    padding-bottom: 5px;
    animation: accordionFadeIn 0.3s ease;
}
.disclaimer p {
    color: #856404;
    font-size: 0.92em;
    line-height: 1.6;
    margin: 0;
}
.accordion-divider {
    border: none;
    border-top: 1px solid rgba(133, 100, 4, 0.15);
    margin: 0;
}
@keyframes accordionFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- レスポンシブ対応（スマホ表示） --- */
@media (max-width: 600px) {
    body {
        padding: 14px;
    }
    h1 {
        font-size: 1.8em;
        line-height: 1.35;
    }
    .subtitle {
        font-size: 0.98em;
        line-height: 1.6;
    }
    .card, .guide-card, .faq-card {
        padding: 20px;
    }
    .guide-card h2, .faq-card h2 {
        font-size: 1.3em;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .step-item {
        padding-top: 25px;
    }
    .upload-area {
        padding: 44px 16px;
    }
    .button-group {
        flex-direction: column;
    }
    .button {
        width: 100%;
    }
    .metadata-item {
        flex-direction: column;
        gap: 4px;
    }
    .metadata-value {
        max-width: 100%;
        text-align: left;
    }
    .features {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}