/* YuMemo Thought Cards v2.5 - Note-style Simple UI */

/* ================== カード一覧グリッド ================== */
.yumemo-cards-container {
    margin: 30px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.yumemo-card-grid-note {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ================== note風カードデザイン ================== */
.yumemo-card-note {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.yumemo-card-note a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ================== サムネイル画像 ================== */
.card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yumemo-card-note:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-type-badge-note {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.yumemo-card-note.card-type-turning-point .card-type-badge-note {
    background: rgba(231,76,60,0.9);
}

.yumemo-card-note.card-type-moya .card-type-badge-note {
    background: rgba(243,156,18,0.9);
}

.yumemo-card-note.card-type-wish .card-type-badge-note {
    background: rgba(52,152,219,0.9);
}

/* ================== カード情報 ================== */
.card-content-note {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title-note {
    font-size: 1em;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.card-date-note {
    font-size: 0.75em;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-date-note svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.card-shared-badge-note {
    background: #27ae60;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 600;
}

/* ================== クイックアクション ================== */
.card-actions-note {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card-action-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-action-icon:hover {
    background: #f5f5f5;
    color: #333;
}

.card-action-icon svg {
    width: 18px;
    height: 18px;
}

/* ================== 記事風詳細ページ ================== */
.yumemo-article-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    margin-bottom: 40px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.article-back:hover {
    color: #333;
}

.article-type-badge {
    display: inline-block;
    background: #f5f5f5;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    margin-bottom: 16px;
}

.article-title {
    font-size: 2em;
    font-weight: 900;
    color: #333;
    line-height: 1.4;
    margin: 0 0 16px 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #999;
    font-size: 0.9em;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9em;
}

.article-btn-primary {
    background: #667eea;
    color: #fff;
}

.article-btn-primary:hover {
    background: #5568d3;
}

.article-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.article-btn-secondary:hover {
    background: #e8e8e8;
}

.article-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.article-btn-danger:hover {
    background: #c0392b;
}

/* ================== 記事本文 ================== */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.article-content {
    margin-top: 40px;
}

.article-field {
    margin-bottom: 32px;
}

.field-label {
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.field-value {
    color: #555;
    line-height: 1.8;
    font-size: 1em;
    white-space: pre-wrap;
}

/* ================== フォームスタイル ================== */
.yumemo-form-container {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.yumemo-card-form h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
}

.yumemo-card-form .form-group {
    margin-bottom: 24px;
}

.yumemo-card-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.yumemo-card-form .required {
    color: #e74c3c;
    margin-left: 4px;
}

.yumemo-card-form input[type="text"],
.yumemo-card-form input[type="date"],
.yumemo-card-form textarea,
.yumemo-card-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.yumemo-card-form input:focus,
.yumemo-card-form textarea:focus,
.yumemo-card-form select:focus {
    outline: none;
    border-color: #667eea;
}

.yumemo-card-form .button-primary {
    background: #667eea;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.yumemo-card-form .button-primary:hover {
    background: #5568d3;
}

/* ================== メッセージ ================== */
.yumemo-message {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 6px;
    font-weight: 500;
}

.yumemo-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.yumemo-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.yumemo-notice {
    padding: 16px 20px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    color: #004085;
    margin-bottom: 24px;
}

.yumemo-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 1.1em;
}

/* ================== レスポンシブ ================== */
@media (max-width: 1199px) {
    .yumemo-card-grid-note {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .yumemo-card-grid-note {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .yumemo-cards-container {
        padding: 0 16px;
    }
    
    .card-content-note {
        padding: 12px;
    }
    
    .card-title-note {
        font-size: 0.9em;
    }
    
    .yumemo-article-container {
        padding: 0 16px;
    }
    
    .article-title {
        font-size: 1.5em;
    }
    
    .article-actions {
        flex-direction: column;
    }
    
    .article-btn {
        width: 100%;
        justify-content: center;
    }
    
    .yumemo-form-container {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .card-thumbnail {
        aspect-ratio: 4 / 3;
    }
    
    .card-title-note {
        font-size: 0.85em;
        -webkit-line-clamp: 3;
    }
}

/* ================== トレーディングカード（画像保存用） ================== */
.yumemo-trading-card {
    width: 600px;
    aspect-ratio: 2.5 / 3.5;
}

.card-frame {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4af37 0%, #f4e5b8 50%, #d4af37 100%);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.card-border-outer {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border-radius: 16px;
    padding: 3px;
}

.card-border-inner {
    width: 100%;
    height: 100%;
    background: #f5f5f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.yumemo-trading-card[data-card-type="turning-point"] .card-header-trading {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.yumemo-trading-card[data-card-type="moya"] .card-header-trading {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

.yumemo-trading-card[data-card-type="wish"] .card-header-trading {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.card-type-badge-trading {
    background: rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.5);
}

.card-logo-trading img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.card-image-area {
    flex-shrink: 0;
    height: 35%;
    background: #e0e0e0;
    border: 4px solid #d4af37;
    margin: 12px;
    border-radius: 8px;
    overflow: hidden;
}

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

.card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.2em;
    font-weight: 600;
}

.card-info-area {
    padding: 16px 20px 12px 20px;
    background: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
    border-top: 3px solid #d4af37;
    border-bottom: 3px solid #d4af37;
}

.card-info-area.info-turning-point {
    background: linear-gradient(to bottom, #ffebee 0%, #ffcdd2 100%);
    border-color: #e74c3c;
}

.card-info-area.info-moya {
    background: linear-gradient(to bottom, #fff3e0 0%, #ffe0b2 100%);
    border-color: #f39c12;
}

.card-info-area.info-wish {
    background: linear-gradient(to bottom, #e3f2fd 0%, #bbdefb 100%);
    border-color: #3498db;
}

.card-title-trading {
    font-size: 1.4em;
    font-weight: 900;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.card-date-trading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #555;
    font-size: 0.9em;
    font-weight: 600;
}

.card-fields-area {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
}

.card-field-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px dashed #d4af37;
}

.card-field-item:last-child {
    border-bottom: none;
}

.field-label-trading {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value-trading {
    color: #444;
    line-height: 1.6;
    font-size: 0.95em;
}

.card-footer-trading {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ecf0f1;
    font-size: 0.75em;
    font-weight: 600;
}

.card-rarity {
    color: #f39c12;
    font-size: 1.2em;
}
