/* src/public/css/history-timeline.css … 「歴史年表メーカー」の見た目
   💡 ボタン・メッセージは、共通の calc-common.css・money.css を使います。ダークモードは theme-dark.css の末尾
   💡 詳細オプション・プレビュー・用紙・印刷の見た目は、年表系ツールで共通の timeline-core.css */

.ht-mini { padding: 6px 12px; font-size: 0.82rem; }

/* ---------- 入力（時代 → 出来事） ---------- */
.ht-editor-head,
.ht-preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 18px;
}
.ht-editor-head .mc-section-title,
.ht-preview-head .mc-section-title { margin: 0; }

.ht-eras { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 10px; }

.ht-era {
    --ht-era: #90a4ae;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--ht-era);
    border-radius: 10px;
    padding: 10px 12px 12px;
    background: #f8fafc;
    min-width: 0;
}
.ht-era-head,
.ht-event-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}
.ht-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 0.78rem; color: #475569; }
.ht-field span { font-weight: bold; }
.ht-field input,
.ht-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    font-size: 0.95rem;
    font-family: inherit;
}
.ht-field textarea { resize: vertical; line-height: 1.5; }
.ht-field-name { flex: 1 1 200px; }
.ht-field-year { flex: 0 1 120px; }

.ht-era-color-wrap {
    display: inline-flex;
    flex: 0 0 auto;
    padding-bottom: 2px;
    cursor: pointer;
}
.ht-era-color {
    width: 40px;
    height: 36px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.ht-tools { display: flex; gap: 4px; flex: 0 0 auto; margin-left: auto; padding-bottom: 2px; }
.ht-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}
.ht-icon-btn:hover { background: #e2e8f0; }
.ht-icon-btn.ht-del { color: #b91c1c; }

.ht-events { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 10px; padding-left: 10px; border-left: 2px dashed #cbd5e1; }
.ht-event {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}
.ht-events:empty { display: none; }
.ht-add-event { margin-top: 2px; }
.ht-add-era { width: 100%; justify-content: center; padding: 10px; }

@media (max-width: 420px) {
    .ht-field-year { flex: 1 1 100px; }
    .ht-tools { margin-left: 0; }
}
