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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1rem;
}

.header-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn-header {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-back {
    position: absolute;
    left: 20px;
    top: 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

main {
    padding: 30px;
}

/* ボタンスタイル */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-capture {
    background: #3b82f6;
    color: white;
}

.btn-cancel {
    background: #ef4444;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.icon {
    font-size: 1.2em;
}

/* アップロードセクション */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 40px 20px;
}

.upload-section .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

/* ドラッグ&ドロップエリア */
.drop-zone {
    width: 100%;
    max-width: 500px;
    min-height: 200px;
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.drop-zone:hover {
    border-color: #667eea;
    background: #f1f5f9;
    transform: scale(1.02);
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: scale(1.05);
}

.drop-zone-content {
    text-align: center;
    padding: 30px;
}

.drop-zone-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    filter: grayscale(0.3);
}

.drop-zone-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.drop-zone-subtext {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* カメラプレビュー */
#camera {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    margin: 20px auto;
    display: block;
}

/* プレビューセクション */
.preview-section {
    text-align: center;
}

.preview-section h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.preview-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

#previewCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ローディング */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f4f6;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* レシート結果画面 */
.receipt-preview {
    text-align: center;
    margin-bottom: 30px;
}

.receipt-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.receipt-info {
    background: #f9fafb;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* 商品明細 */
.items-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #667eea;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-card {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    position: relative;
}

.item-card .remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.success-message {
    background: #10b981;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* レスポンシブ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 20px;
    }

    .btn-back {
        left: 10px;
        top: 20px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .item-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* 家計簿一覧ページ */
.summary-section {
    margin-bottom: 40px;
}

.summary-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.summary-card-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.summary-card-total .summary-card-content h3,
.summary-card-total .summary-card-stats {
    color: white;
}

.summary-card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.summary-card-content {
    flex: 1;
}

.summary-card-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #374151;
}

.summary-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.summary-card-count {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.summary-card-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.summary-card-total .summary-card-count,
.summary-card-total .summary-card-amount {
    color: white;
}

/* レシート一覧 */
.receipts-section {
    margin-bottom: 30px;
}

.receipts-section h2 {
    color: #667eea;
    font-size: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    min-width: 150px;
    flex: 1;
}

.receipts-container {
    overflow-x: auto;
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.receipts-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.receipts-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.receipts-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.receipt-row {
    transition: background-color 0.2s ease;
}

.receipt-row:hover {
    background-color: #f9fafb;
}

.receipt-row:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.amount {
    font-weight: 700;
    color: #667eea;
    font-size: 1.05rem;
}

/* カテゴリーバッジ */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.manual-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    margin-left: 8px;
}

.expense-row {
    background-color: #fef3c7;
    opacity: 0.9;
}

.expense-row:hover {
    background-color: #fde68a !important;
}

.category-food {
    background: #fef3c7;
    color: #92400e;
}

.category-daily {
    background: #dbeafe;
    color: #1e40af;
}

.category-transport {
    background: #d1fae5;
    color: #065f46;
}

.category-medical {
    background: #fecaca;
    color: #991b1b;
}

.category-entertainment {
    background: #e9d5ff;
    color: #6b21a8;
}

.category-other {
    background: #e5e7eb;
    color: #374151;
}

/* 空状態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #374151;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 25px;
}

/* レスポンシブ - 家計簿一覧 */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .receipts-table {
        font-size: 0.85rem;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 10px 8px;
    }

    .summary-card-icon {
        font-size: 2rem;
    }

    .summary-card-amount {
        font-size: 1.1rem;
    }

    .header-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .btn-back {
        position: relative;
        left: 0;
        top: 0;
    }
}

/* 支出記録ページ */
.expense-form-section {
    background: #f9fafb;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.expense-form-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.expense-form {
    max-width: 600px;
}

.required {
    color: #ef4444;
    font-weight: bold;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6b7280;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 支出記録一覧 */
.expense-list-section {
    margin-bottom: 30px;
}

.expense-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.expense-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.expense-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.expense-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.expense-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.expense-card-body {
    margin-bottom: 15px;
}

.expense-date {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.expense-description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 10px;
}

.expense-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.expense-card-actions {
    display: flex;
    justify-content: flex-end;
}

/* カテゴリーアイコン追加 */
.category-communication {
    background: #fde68a;
    color: #78350f;
}

.category-utility {
    background: #fed7aa;
    color: #9a3412;
}

/* レスポンシブ - 支出記録 */
@media (max-width: 768px) {
    .expense-form-section {
        padding: 20px 15px;
    }

    .expense-amount {
        font-size: 1.2rem;
    }

    .expense-card {
        padding: 15px;
    }
}

/* ========================================
   eBay出品ツール用スタイル
   ======================================== */

/* 結果表示セクション */
.result-section {
    animation: fadeIn 0.5s ease-in;
}

.product-preview {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

/* 出品情報フォーム */
.listing-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

/* キーワードリスト */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    min-height: 60px;
}

.keyword-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.keyword-tag-small {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Item Specifics */
.item-specifics-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .item-specifics-container {
        grid-template-columns: 1fr;
    }
}

.item-specific-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
}

.item-specific-key {
    font-weight: 600;
    font-size: 0.8rem;
    color: #4b5563;
    white-space: nowrap;
    min-width: 80px;
}

.item-specific-value {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #1f2937;
    padding: 2px 0;
    outline: none;
}

.item-specific-value:focus {
    border-bottom: 2px solid #667eea;
}

/* eBay出品ボタン */
.btn-ebay {
    background: linear-gradient(135deg, #e53238 0%, #f5af02 50%, #86b817 100%);
    color: white;
    font-weight: 700;
}

.btn-ebay:hover {
    opacity: 0.9;
}

/* eBay認証ステータス */
.ebay-auth-status {
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
}

.ebay-auth-ok {
    background: #d1fae5;
    color: #065f46;
}

.ebay-auth-none {
    background: #fef3c7;
    color: #92400e;
}

/* プレビューモーダル */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.preview-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
}

.preview-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2937;
}

.preview-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.preview-close-btn:hover {
    color: #1f2937;
}

.preview-modal-body {
    padding: 25px;
}

.preview-listing-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9fafb;
    margin-bottom: 20px;
}

.preview-listing-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.preview-listing-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.preview-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.preview-listing-category {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.preview-listing-description {
    margin-bottom: 20px;
}

.preview-listing-description strong {
    display: block;
    margin-bottom: 8px;
    color: #374151;
}

.preview-desc-text {
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.95rem;
}

.preview-desc-text p {
    margin-bottom: 10px;
}

.preview-listing-specs {
    margin-bottom: 10px;
}

.preview-listing-specs strong {
    display: block;
    margin-bottom: 10px;
    color: #374151;
}

.preview-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.preview-spec-row {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
}

.preview-spec-key {
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.preview-spec-value {
    color: #1f2937;
}

.preview-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.preview-confirm-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.draft-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    color: #667eea;
    font-weight: 600;
}

.draft-result {
    margin-top: 15px;
}

.draft-success {
    background: #d1fae5;
    color: #065f46;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.draft-success p {
    margin-bottom: 8px;
}

.draft-success a {
    display: inline-flex;
    margin-top: 10px;
}

.draft-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .preview-specs-grid {
        grid-template-columns: 1fr;
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-actions .btn {
        width: 100%;
    }
}

.data-source-note {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ローディング詳細 */
.loading-detail {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 10px;
}

/* 下書き一覧コンテナ */
.drafts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* 下書きカード */
.draft-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.draft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.draft-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draft-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.draft-card-content {
    padding: 20px;
}

.draft-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.draft-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.draft-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #6b7280;
}

.draft-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.draft-card-price {
    font-weight: 700;
    color: #059669;
}

.draft-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.draft-card-actions {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.btn-view {
    background: #3b82f6;
    color: white;
}

.btn-view:hover {
    background: #2563eb;
}

.btn-export {
    background: #8b5cf6;
    color: white;
}

.btn-export:hover {
    background: #7c3aed;
}

/* 状態バッジ */
.condition-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.condition-new {
    background: #d1fae5;
    color: #065f46;
}

.condition-like-new {
    background: #dbeafe;
    color: #1e40af;
}

.condition-very-good {
    background: #e0e7ff;
    color: #4338ca;
}

.condition-good {
    background: #fef3c7;
    color: #92400e;
}

.condition-acceptable {
    background: #fed7aa;
    color: #9a3412;
}

.condition-for-parts {
    background: #fecaca;
    color: #991b1b;
}

/* カテゴリーバッジ（eBay用） */
.category-electronics {
    background: #dbeafe;
    color: #1e40af;
}

.category-clothing {
    background: #fce7f3;
    color: #9f1239;
}

.category-home {
    background: #d1fae5;
    color: #065f46;
}

.category-toys {
    background: #fef3c7;
    color: #92400e;
}

.category-books {
    background: #e0e7ff;
    color: #4338ca;
}

.category-sports {
    background: #fecaca;
    color: #991b1b;
}

.category-collectibles {
    background: #f3e8ff;
    color: #6b21a8;
}

/* レスポンシブ - eBay */
@media (max-width: 768px) {
    .drafts-container {
        grid-template-columns: 1fr;
    }

    .listing-form {
        padding: 20px 15px;
    }

    .draft-card-actions {
        flex-direction: column;
    }

    .draft-card-actions .btn {
        width: 100%;
    }
}

/* ========================================
   英語日記alpha用スタイル
   ======================================== */

/* 日付セクション */
.diary-date-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.diary-date-input {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.char-count {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 分割コンテナ */
.diary-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    min-height: 500px;
}

.diary-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.hint-text {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 翻訳ステータス */
.translation-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-idle {
    color: #9ca3af;
    font-size: 0.85rem;
}

.status-typing {
    color: #fbbf24;
    font-size: 0.85rem;
}

.status-translating {
    color: #3b82f6;
    font-size: 0.85rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-completed {
    color: #10b981;
    font-size: 0.85rem;
}

.status-error {
    color: #ef4444;
    font-size: 0.85rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 自然さバッジ */
.naturalness-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-excellent {
    background: #d1fae5;
    color: #065f46;
}

.score-good {
    background: #dbeafe;
    color: #1e40af;
}

.score-fair {
    background: #fef3c7;
    color: #92400e;
}

.score-poor {
    background: #fee2e2;
    color: #991b1b;
}

/* テキストエリア */
.diary-textarea {
    flex: 1;
    padding: 20px;
    border: none;
    font-size: 1rem;
    line-height: 1.8;
    resize: none;
    font-family: 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

.diary-textarea:focus {
    outline: none;
}

/* 英語表示エリア */
.english-display {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9fafb;
}

.empty-state-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.english-full-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #1f2937;
    white-space: pre-wrap;
}

/* 翻訳ローディング */
.translation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.spinner-small {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 解説セクション */
.explanation-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.explanation-section h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.explanation-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 文の解説 */
.sentence-explanation {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.sentence-pair {
    margin-bottom: 15px;
}

.sentence-japanese {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 8px;
}

.sentence-english {
    font-size: 1rem;
    color: #4b5563;
    font-style: italic;
}

/* 代替表現 */
.alternatives-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.alternatives-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.alternative-item {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* 文法ポイント */
.grammar-points {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.grammar-item {
    margin-bottom: 12px;
}

.grammar-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 5px;
}

.grammar-item p {
    margin: 5px 0;
    color: #4b5563;
    font-size: 0.9rem;
}

.grammar-item code {
    display: block;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* 語彙セクション */
.vocabulary-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.vocabulary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.vocab-word {
    color: #1f2937;
    font-weight: 600;
}

.vocab-arrow {
    color: #9ca3af;
}

.vocab-english {
    color: #667eea;
    font-weight: 600;
}

.vocab-usage {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* 改善提案セクション */
.suggestions-section {
    margin-top: 25px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.suggestions-section h4 {
    color: #92400e;
    margin-bottom: 15px;
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #78350f;
}

.suggestion-icon {
    font-size: 1.2rem;
}

/* カレンダーページ */
.diary-stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: #667eea;
    margin: 0;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* 日記一覧 */
.diary-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.diary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.diary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.diary-card-date {
    color: #1f2937;
    font-size: 1.1rem;
    margin: 0;
}

.diary-card-content {
    margin-bottom: 15px;
}

.diary-preview, .diary-preview-english {
    margin-bottom: 12px;
}

.diary-preview strong, .diary-preview-english strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.diary-preview p, .diary-preview-english p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.diary-card-actions {
    display: flex;
    gap: 10px;
}

/* レスポンシブ - 英語日記 */
@media (max-width: 768px) {
    .diary-split-container {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .diary-card-actions {
        flex-direction: column;
    }

    .diary-card-actions .btn {
        width: 100%;
    }
}

/* ========================================
   ヘアスタイル試着アプリ用スタイル
   ======================================== */

/* ステップインジケーター */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.step.active, .step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

/* アップロードステップ */
.upload-step {
    animation: fadeIn 0.5s ease-in;
}

.step-description {
    text-align: center;
    color: #6b7280;
    margin-bottom: 25px;
}

/* 画像プレビュー */
.image-preview {
    text-align: center;
    margin-top: 25px;
    animation: fadeIn 0.3s ease-in;
}

.image-preview h3 {
    margin-bottom: 15px;
    color: #1f2937;
}

.image-preview canvas {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

/* 比較表示 */
.comparison-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-item {
    text-align: center;
}

.comparison-item h3 {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.comparison-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comparison-arrow {
    font-size: 2rem;
    color: #667eea;
}

/* 似合う度スコア */
.compatibility-score {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 8px solid;
}

.score-circle.score-excellent {
    border-color: #10b981;
    background: #d1fae5;
}

.score-circle.score-good {
    border-color: #3b82f6;
    background: #dbeafe;
}

.score-circle.score-fair {
    border-color: #f59e0b;
    background: #fef3c7;
}

.score-circle.score-poor {
    border-color: #ef4444;
    background: #fee2e2;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
}

.score-label {
    font-size: 1rem;
    color: #6b7280;
}

.score-verdict {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* 分析カード */
.analysis-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.analysis-card h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.analysis-item {
    margin-bottom: 12px;
    color: #4b5563;
    line-height: 1.6;
}

.analysis-item strong {
    color: #667eea;
    margin-right: 8px;
}

/* 理由リスト */
.reasons-card {
    border-left: 4px solid #10b981;
}

.reasons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reasons-list li {
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    margin-bottom: 10px;
    color: #065f46;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reasons-list li::before {
    content: "✓";
    font-weight: 700;
    color: #10b981;
}

/* 注意点リスト */
.warnings-card {
    border-left: 4px solid #f59e0b;
}

.warnings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warnings-list li {
    padding: 12px;
    background: #fffbeb;
    border-radius: 8px;
    margin-bottom: 10px;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.warnings-list li::before {
    content: "⚠";
    font-weight: 700;
}

/* 代替スタイル */
.alternatives-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.alternative-item {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.alternative-item h4 {
    color: #667eea;
    margin: 0 0 10px 0;
}

.alternative-score {
    font-weight: 600;
    color: #059669;
    margin-bottom: 10px;
}

.alternative-item p {
    color: #4b5563;
    margin: 0;
    font-size: 0.9rem;
}

/* 美容院カード */
.salon-card {
    border-left: 4px solid #ec4899;
}

.salon-instructions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.salon-instructions p {
    padding: 15px;
    background: #fdf2f8;
    border-radius: 8px;
    color: #831843;
    line-height: 1.6;
    margin: 0;
}

/* 試着履歴 */
.hairstyle-stats-section {
    margin-bottom: 30px;
}

.hairstyle-list-section {
    margin-bottom: 30px;
}

.hairstyle-history-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.hairstyle-history-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hairstyle-history-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.history-card-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: #f9fafb;
}

.history-face-image, .history-style-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.history-arrow {
    font-size: 1.5rem;
    color: #667eea;
}

.history-card-content {
    padding: 20px;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-card-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.score-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.score-badge.score-excellent {
    background: #d1fae5;
    color: #065f46;
}

.score-badge.score-good {
    background: #dbeafe;
    color: #1e40af;
}

.score-badge.score-fair {
    background: #fef3c7;
    color: #92400e;
}

.score-badge.score-poor {
    background: #fee2e2;
    color: #991b1b;
}

.history-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.history-detail-item {
    font-size: 0.85rem;
    color: #6b7280;
}

.history-card-face-type {
    font-size: 0.9rem;
    color: #4b5563;
}

.history-card-actions {
    padding: 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* レスポンシブ - ヘアスタイル */
@media (max-width: 768px) {
    .step-indicator {
        gap: 15px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .comparison-view {
        flex-direction: column;
    }

    .comparison-arrow {
        transform: rotate(90deg);
    }

    .comparison-item img {
        width: 150px;
        height: 150px;
    }

    .hairstyle-history-container {
        grid-template-columns: 1fr;
    }

    .alternatives-list {
        grid-template-columns: 1fr;
    }
}
