/* ===== 운영 로그 허브 (개요 / 회의 / 타임라인 / 일지) =====
   #view-journal 안의 네 뷰. 기존 일지 화면(journal.css)은 "일지" 탭으로 그대로 들어가고, 여기서는
   허브 골격·통합 달력·회의·타임라인·개요를 그린다. 색은 전부 design-tokens.css 토큰이다 — 트랙은
   data-track, 화자는 data-speaker 로 칠하고 TS 는 색 값을 들고 있지 않다.
   밀도·컴포넌트 언어는 #todo 화면 기준: 세그먼트 탭(.ui-tabs, 래퍼로만 배치), 얇은 테두리 카드,
   알약 필터, 짧은 빈 상태. */

/* ----- 트랙·화자 색 매핑 (색의 단일 출처는 design-tokens.css) ----- */
[data-track] { --tc: var(--text-muted); --tc-soft: var(--bg-tertiary); }
[data-track="geo"] { --tc: var(--track-geo); --tc-soft: var(--track-geo-soft); }
[data-track="auto"] { --tc: var(--track-auto); --tc-soft: var(--track-auto-soft); }
[data-track="edu"] { --tc: var(--track-edu); --tc-soft: var(--track-edu-soft); }
[data-track="org"] { --tc: var(--track-org); --tc-soft: var(--track-org-soft); }
[data-track="sales"] { --tc: var(--track-sales); --tc-soft: var(--track-sales-soft); }
[data-track="lecture"] { --tc: var(--track-lecture); --tc-soft: var(--track-lecture-soft); }

[data-speaker] { --sc: var(--speaker-0); --sc-soft: var(--speaker-0-soft); }
[data-speaker="1"] { --sc: var(--speaker-1); --sc-soft: var(--speaker-1-soft); }
[data-speaker="2"] { --sc: var(--speaker-2); --sc-soft: var(--speaker-2-soft); }
[data-speaker="3"] { --sc: var(--speaker-3); --sc-soft: var(--speaker-3-soft); }
[data-speaker="4"] { --sc: var(--speaker-4); --sc-soft: var(--speaker-4-soft); }
[data-speaker="5"] { --sc: var(--speaker-5); --sc-soft: var(--speaker-5-soft); }
[data-speaker="6"] { --sc: var(--speaker-6); --sc-soft: var(--speaker-6-soft); }
[data-speaker="7"] { --sc: var(--speaker-7); --sc-soft: var(--speaker-7-soft); }

/* ----- 골격 ----- */
.journal-view-header {
  margin-bottom: 12px;
}

/* 저장 상태 표시는 일지 탭에서만 — journal.css 의 display:flex 가 hidden 을 이기지 않게 */
.journal-save-status[hidden] {
  display: none;
}

.journal-hub-tabbar {
  max-width: 460px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.journal-hub-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 카드 그림자·포커스 링이 잘리지 않도록 스크롤 영역 안쪽에 숨 쉴 틈을 둔다 */
  margin: 0 -4px;
  padding: 0 4px 24px;
}

.journal-hub-panel[hidden] {
  display: none;
}

.journal-hub-panel--log {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.journal-hub-panel--log .journal-columns {
  flex: 1;
}

.jh-card {
  min-width: 0;
  background: var(--surface-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.jh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.jh-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-card-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.jh-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tc, var(--sc, var(--text-muted)));
}

.jh-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--tc-soft);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  vertical-align: 1px;
}

.jh-tag .jh-dot {
  width: 6px;
  height: 6px;
}

.jh-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jh-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}

.jh-pill--muted {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.jh-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-control-selected);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.jh-chip:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.jh-chip[aria-pressed="true"] {
  background: var(--tc-soft);
  border-color: var(--tc);
  color: var(--text-primary);
  font-weight: 600;
}

.jh-chip:focus-visible,
.jh-list-item:focus-visible,
.jh-recent-row:focus-visible,
.jh-album:focus-visible,
.jh-tl-dot:focus-visible,
.jh-tl-label:focus-visible,
.jh-cal-day:focus-visible,
.jh-day-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.jh-empty-inline {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.jh-empty-inline.is-error,
.jh-list-note.is-error {
  color: var(--status-error);
}

.jh-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.jh-banner.is-error {
  background: var(--status-error-soft);
  color: var(--status-error);
}

.jh-nav-btn,
.jh-link-btn,
.jh-full-btn,
.jh-load-earlier,
.jh-back,
.jh-day-clear {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.jh-nav-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.jh-nav-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.jh-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.jh-link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 4px;
}

.jh-primary-btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 18px;
  background: var(--accent);
  color: var(--neutral-white);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.jh-primary-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.jh-primary-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ----- 통합 달력 ----- */
.journal-cal-month {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.jh-cal-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.journal-cal-grid {
  gap: 2px;
}

.jh-cal-day {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 38px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.jh-cal-day.is-blank {
  cursor: default;
}

.jh-cal-day:not(.is-blank):hover {
  background: var(--bg-hover);
}

.jh-cal-day.has-meeting,
.jh-cal-day.has-journal {
  color: var(--text-primary);
  font-weight: 600;
}

.jh-cal-day.is-today .jh-cal-num {
  color: var(--accent);
  font-weight: 800;
}

.jh-cal-day.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.jh-cal-num {
  line-height: 1;
}

.jh-cal-marks {
  display: flex;
  gap: 3px;
  height: 9px;
  align-items: center;
}

.jh-cal-mark {
  display: inline-block;
}

/* 회의 = 채운 점, 일지 = 짧은 막대 — 색만이 아니라 모양으로도 구분한다 */
.jh-cal-mark--meeting {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.jh-cal-mark--journal {
  width: 9px;
  height: 3px;
  border-radius: 2px;
  background: var(--evidence);
}

.jh-cal-badge {
  margin-left: -1px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.jh-cal-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-muted);
}

.jh-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.jh-day-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.jh-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.jh-day-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-day-clear {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 4px;
}

.jh-day-clear:hover {
  color: var(--text-primary);
}

.jh-day-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jh-day-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  border-radius: var(--radius-md);
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.jh-day-row:hover {
  background: var(--bg-hover);
}

.jh-day-kind {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 700;
}

.jh-day-kind--meeting {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.jh-day-kind--journal {
  background: var(--evidence-soft);
  color: var(--evidence);
}

.jh-day-time {
  flex-shrink: 0;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.jh-day-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jh-day-go {
  color: var(--text-muted);
}

.jh-day-empty {
  padding: 6px 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- 개요 ----- */
.jh-scope {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.jh-scope b {
  color: var(--text-secondary);
  font-weight: 600;
}

.jh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.jh-stat {
  padding: 16px 18px;
  background: var(--surface-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.jh-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.jh-stat-value {
  margin: 6px 0 4px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.jh-stat-value small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.jh-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.jh-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px;
  margin-bottom: 16px;
}

.jh-overview-grid > .jh-card,
.jh-sync {
  padding: 18px 20px;
}

.jh-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jh-bar-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
}

.jh-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jh-bar-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  overflow: hidden;
}

.jh-bar-fill {
  --pct: 0%;
  display: block;
  width: var(--pct);
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--tc);
  transition: width 300ms ease;
}

.jh-bar-value {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.jh-recent {
  display: flex;
  flex-direction: column;
}

.jh-recent-row {
  appearance: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.jh-recent-row:last-child {
  border-bottom: none;
}

.jh-recent-row:hover {
  background: var(--bg-hover);
}

.jh-recent-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.jh-recent-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jh-recent-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jh-recent-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.jh-list-dots {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}

.jh-list-dots .jh-dot {
  width: 7px;
  height: 7px;
}

/* ----- 동기화 카드 ----- */
.jh-sync .jh-card-head {
  margin-bottom: 8px;
}

.jh-sync-row {
  margin-bottom: 10px;
}

.jh-sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.jh-sync-state.is-ok {
  background: var(--status-success-soft);
  color: var(--status-success);
}

.jh-sync-state.is-warn {
  background: var(--status-warning-soft);
  color: var(--status-warning);
}

.jh-sync-state.is-running {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.jh-sync-state.is-muted {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.jh-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: jh-spin 0.8s linear infinite;
}

@keyframes jh-spin {
  to { transform: rotate(360deg); }
}

.jh-sync-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 10px;
}

.jh-sync-facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jh-sync-facts dt {
  font-size: 11px;
  color: var(--text-muted);
}

.jh-sync-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.jh-sync-facts dd.is-warn,
.jh-sync-error {
  color: var(--status-warning);
}

.jh-sync-error {
  margin-bottom: 8px;
  font-size: 12.5px;
}

.jh-sync-message {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.5;
}

.jh-sync-message.is-info {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.jh-sync-message.is-warn {
  background: var(--status-warning-soft);
  color: var(--status-warning);
}

.jh-sync-message.is-error {
  background: var(--status-error-soft);
  color: var(--status-error);
}

.jh-sync-help {
  font-size: 12px;
  color: var(--text-muted);
}

/* 자동 동기화: 공용 스위치(.routine-switch)·선택(.routine-form-select)은 그대로 쓰고 이 래퍼가 배치·크기만 맡는다. */
.jh-sync-auto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 4px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.jh-sync-auto-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jh-sync-auto-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.jh-sync-auto-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.jh-sync-auto[data-enabled="true"] .jh-sync-auto-meta {
  color: var(--text-secondary);
}

.jh-sync-auto-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.jh-sync-auto-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jh-sync-auto-time .routine-form-select {
  width: auto;
  min-width: 58px;
  padding: 6px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.jh-sync-auto-time .routine-form-select:disabled {
  opacity: 0.6;
}

.jh-sync-auto-sep {
  font-weight: 600;
  color: var(--text-muted);
}

.jh-sync-auto .routine-switch input:focus-visible + .routine-switch-slider {
  box-shadow: 0 0 0 3px var(--accent-light);
}

.jh-sync-auto .routine-switch input:disabled + .routine-switch-slider {
  cursor: default;
  opacity: 0.6;
}

.jh-sync-auto-error {
  flex-basis: 100%;
  margin: 0;
  font-size: 12.5px;
  color: var(--status-error);
}

/* ----- 회의 ----- */
.jh-meetings {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.jh-meetings-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.jh-search {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.jh-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.jh-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jh-cal-slot .journal-calendar-card {
  margin-bottom: 0;
}

.jh-list-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 2px;
}

.jh-meeting-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  overflow: hidden;
}

.jh-meeting-list > .jh-empty-inline {
  padding: 16px;
}

.jh-list-month {
  padding: 8px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.jh-list-item {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid transparent;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.jh-list-item:hover {
  background: var(--bg-hover);
}

.jh-list-item[aria-current="true"] {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.jh-list-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jh-list-top .jh-list-dots {
  margin-left: auto;
}

.jh-list-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.jh-list-time {
  font-weight: 500;
  color: var(--text-muted);
}

.jh-list-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
}

.jh-list-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.jh-list-note {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--status-warning);
}

.jh-load-earlier {
  padding: 11px 14px;
  border: none;
  background: var(--surface-panel);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

.jh-load-earlier:hover:not(:disabled) {
  background: var(--accent-soft);
}

.jh-load-earlier:disabled {
  color: var(--text-muted);
  cursor: progress;
}

.jh-detail {
  padding: 22px 26px 26px;
  min-height: 320px;
}

.jh-back {
  display: none;
  margin-bottom: 10px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.jh-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 280px;
  text-align: center;
}

.jh-detail-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-detail-empty-sub {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.jh-detail-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jh-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.jh-detail-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  word-break: keep-all;
}

.jh-subtabbar {
  max-width: 280px;
  margin: 18px 0 6px;
}

.jh-detail-body {
  min-width: 0;
}

.jh-section {
  margin-top: 22px;
}

.jh-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-count {
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

.jh-decisions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jh-decision {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 6px;
  padding: 11px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface-panel-soft);
}

.jh-decision-idx {
  padding-top: 1px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.jh-decision-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-primary);
  word-break: keep-all;
}

.jh-decision-text .jh-tag {
  margin-left: 2px;
}

.jh-actions {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.jh-actions thead th {
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
}

.jh-actions thead th:first-child { width: 20%; }
.jh-actions thead th:last-child { width: 20%; }

.jh-owner-group {
  border-bottom: 1px solid var(--border);
}

.jh-actions td,
.jh-actions .jh-owner {
  padding: 10px;
  vertical-align: top;
  line-height: 1.6;
  text-align: left;
}

.jh-owner-group tr + tr td {
  border-top: 1px dashed var(--border-light);
}

.jh-owner {
  font-weight: 700;
  color: var(--accent-hover);
  word-break: keep-all;
}

.jh-owner-group.is-unassigned .jh-owner {
  color: var(--text-muted);
  font-weight: 600;
  font-style: italic;
}

.jh-task {
  color: var(--text-primary);
}

.jh-due {
  color: var(--text-secondary);
  font-size: 12.5px;
}

.jh-done {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--status-success-soft);
  color: var(--status-success);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

.jh-notes {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.jh-notes li + li {
  margin-top: 4px;
}

.jh-story {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.jh-story:last-child {
  border-bottom: none;
}

.jh-story-title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-story-body {
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* 원문: 줄마다 [화자 칩 / 시간] | 발화 */
.jh-tr-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.jh-transcript {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}

.jh-tr-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.jh-tr-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.jh-speaker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--sc-soft);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.jh-speaker .jh-dot {
  width: 6px;
  height: 6px;
  background: var(--sc);
}

.jh-speaker.is-none {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.jh-tr-time {
  padding-left: 2px;
  font-family: SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.jh-tr-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-primary);
}

/* ----- 타임라인 ----- */
.jh-tl-monthbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}

.jh-tl-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.jh-tl-month small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.jh-tl-gridcard {
  padding: 4px 0;
  overflow: hidden;
}

.jh-tl-grid-scroll {
  overflow-x: auto;
}

.jh-tl-grid {
  min-width: 640px;
}

.jh-tl-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 42px;
  border-bottom: 1px solid var(--border-light);
  transition: opacity 150ms ease, background 150ms ease;
}

.jh-tl-row:last-child {
  border-bottom: none;
}

.jh-tl-row.is-head {
  min-height: 30px;
}

.jh-tl-row.is-selected {
  background: var(--tc-soft);
}

.jh-tl-row.is-dim {
  opacity: 0.45;
}

.jh-tl-row.is-dim:hover {
  opacity: 0.8;
}

.jh-tl-label {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 14px;
  border: none;
  border-right: 1px solid var(--border-light);
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.jh-tl-row.is-head .jh-tl-label {
  color: var(--text-muted);
  font-size: 11px;
  cursor: default;
}

button.jh-tl-label:hover {
  background: var(--bg-hover);
}

.jh-tl-lane {
  position: relative;
  min-width: 0;
}

.jh-tl-week,
.jh-tl-tick,
.jh-tl-line,
.jh-tl-dot {
  --x: 0%;
  --w: 0%;
  --stack: 0;
}

.jh-tl-week {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  border-left: 1px dashed var(--border-light);
}

.jh-tl-tick {
  position: absolute;
  top: 50%;
  left: var(--x);
  transform: translate(-50%, -50%);
  font-size: 10.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.jh-tl-line {
  position: absolute;
  top: 50%;
  left: var(--x);
  width: var(--w);
  height: 2px;
  transform: translateY(-50%);
  background: var(--tc-soft);
}

.jh-tl-dot {
  position: absolute;
  top: 50%;
  left: calc(var(--x) + var(--stack) * 10px);
  width: 16px;
  height: 16px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid var(--surface-panel);
  border-radius: 50%;
  background: var(--tc);
  box-shadow: 0 0 0 1px var(--tc);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.jh-tl-dot:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.jh-tl-dot.is-selected {
  box-shadow: 0 0 0 3px var(--tc);
  transform: translate(-50%, -50%) scale(1.15);
}

.jh-tl-note {
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

.jh-tl-note.is-error {
  color: var(--status-error);
}

.jh-tl-stripcard {
  margin-top: 20px;
}

.jh-tl-sectitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.jh-tl-stripcard .jh-tl-sectitle {
  margin-top: 0;
}

.jh-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.jh-tl-guide,
.jh-tl-detail-empty {
  padding: 26px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.jh-tl-detail-empty {
  border: none;
}

.jh-strip-wrap {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
}

.jh-strip-btn {
  appearance: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-panel);
  color: var(--text-secondary);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.jh-strip-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.jh-strip {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 2px 10px;
}

.jh-album-month {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  padding: 0 2px 6px;
  border-left: 1px solid var(--border);
}

.jh-album-month span {
  writing-mode: vertical-rl;
  padding-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.jh-album {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 248px;
  min-height: 170px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--tc);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.jh-album:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.jh-album.is-selected {
  border-color: var(--tc);
  background: var(--tc-soft);
  box-shadow: var(--shadow-md);
}

.jh-album-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.jh-album-type {
  font-weight: 500;
}

.jh-album-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
}

.jh-album-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.jh-album-sub {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.jh-album-list {
  margin: 0;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.jh-album-action {
  display: flex;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.jh-album-action b {
  flex-shrink: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.jh-album-action b.is-unassigned {
  color: var(--text-muted);
  font-weight: 600;
}

.jh-album-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jh-album-alt {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.jh-tl-detail {
  padding: 20px 24px 24px;
}

.jh-tl-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.jh-full-btn {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  background: var(--surface-panel);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.jh-full-btn:hover {
  background: var(--accent-soft);
}

.jh-tl-tip {
  position: fixed;
  z-index: 50;
  width: 290px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  box-shadow: var(--shadow-card);
  pointer-events: none;
}

.jh-tl-tip[hidden] {
  display: none;
}

.jh-tip-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.jh-tip-title {
  margin: 2px 0 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.jh-tip-badge {
  font-size: 11px;
  color: var(--text-secondary);
}

.jh-tip-list {
  margin: 8px 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.jh-tip-hint {
  font-size: 11px;
  color: var(--accent);
}

/* ----- 좁은 화면 ----- */
@media (max-width: 1080px) {
  .jh-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jh-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .jh-meetings {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  /* 폰 폭 좌우 여백 16px (journal.css 는 14px) */
  .journal-scroll {
    padding: 16px;
  }

  .journal-hub-tabbar {
    max-width: none;
  }

  /* 모바일에서는 .journal-scroll 이 스크롤을 맡는다(journal.css) — 패널은 늘어나기만 한다 */
  .journal-hub-panel,
  .journal-hub-panel--log {
    overflow: visible;
    margin: 0;
    padding: 0 0 16px;
  }

  .journal-hub-panel--log {
    display: block;
  }

  .jh-stats {
    gap: 8px;
  }

  .jh-stat {
    padding: 12px 14px;
  }

  .jh-stat-value {
    font-size: 22px;
  }

  .jh-overview-grid > .jh-card,
  .jh-sync {
    padding: 16px;
  }

  .jh-bar-row {
    grid-template-columns: 104px minmax(0, 1fr) 24px;
  }

  .jh-meetings {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 목록 ↔ 상세 한 화면씩 */
  .jh-meetings[data-mobile="detail"] .jh-meetings-side,
  .jh-meetings[data-mobile="list"] .jh-detail {
    display: none;
  }

  .jh-back {
    display: inline-block;
  }

  .jh-detail {
    padding: 16px;
  }

  .jh-detail-title {
    font-size: 17px;
  }

  .jh-subtabbar {
    max-width: none;
  }

  /* 액션 표 → 담당별 카드 */
  .jh-actions thead {
    display: none;
  }

  .jh-actions,
  .jh-owner-group,
  .jh-owner-group tr,
  .jh-actions td,
  .jh-actions .jh-owner {
    display: block;
    width: 100%;
  }

  .jh-owner-group {
    padding: 10px 0;
  }

  .jh-actions .jh-owner {
    padding: 0 0 4px;
  }

  .jh-actions td {
    padding: 0;
  }

  .jh-owner-group tr {
    padding: 6px 0 6px 10px;
    border-left: 2px solid var(--border);
  }

  .jh-owner-group tr + tr td {
    border-top: none;
  }

  .jh-due {
    margin-top: 2px;
  }

  .jh-due:not(:empty)::before {
    content: "기한 · ";
    color: var(--text-muted);
  }

  .jh-tr-line {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .jh-tl-monthbar {
    gap: 10px;
  }

  .jh-tl-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .jh-tl-label {
    padding: 0 10px;
    font-size: 12px;
  }

  .jh-strip-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .jh-strip-btn {
    display: none;
  }

  .jh-album {
    flex-basis: 78%;
  }

  .jh-tl-detail {
    padding: 16px;
  }

  .jh-full-btn {
    margin-left: 0;
  }
}

/* 운영 로그 통합 화면 */
.jh-title-row {
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.jh-title-row .journal-hub-tabbar {
  margin: 0 0 0 auto;
  max-width: none;
}

.jh-ops-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
}

.jh-ops-cards > * { min-width: 0; }
.jh-ops-cards .jh-sync,
.jh-ops-cards .journal-routine-card { height: 100%; margin: 0; }

.journal-hub-panel--log .jh-meetings {
  flex: 1;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.journal-hub-panel--log .jh-meetings-side {
  min-height: 0;
  overflow: hidden;
}

.journal-hub-panel--log .jh-meeting-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.journal-hub-panel--log .jh-detail {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.jh-list-kind {
  display: inline-block;
  min-width: 36px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.jh-list-journal .jh-list-kind { color: var(--accent); }

.jh-list-sentinel {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.jh-detail-heading {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.jh-detail-ident { flex: 1; min-width: 180px; }
.jh-detail-heading .jh-subtabbar { margin: 0 0 0 auto; max-width: none; }
.jh-detail-heading .ui-tab { flex: 0 0 auto; }

.jh-memo { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.jh-memo h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-secondary); }
.jh-memo-content { white-space: pre-wrap; line-height: 1.7; color: var(--text-primary); }
.jh-memo-editor {
  box-sizing: border-box;
  width: 100%; min-height: 160px; padding: 12px;
  resize: vertical; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-panel);
  color: var(--text-primary); font: inherit; line-height: 1.6;
}
.jh-memo-editor:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.jh-memo-status { display: block; margin-top: 7px; font-size: 11px; color: var(--text-muted); }
.jh-detail .journal-delegate-btn { margin-top: 16px; }

.jh-tl-dot.is-journal { border-radius: 4px; transform: translate(-50%, -50%) rotate(45deg); }
.jh-tl-dot.is-journal:hover { transform: translate(-50%, -50%) rotate(45deg) scale(1.2); }
.jh-tl-dot.is-journal.is-selected { transform: translate(-50%, -50%) rotate(45deg) scale(1.15); }

@media (max-width: 767px) {
  .jh-ops-cards { grid-template-columns: minmax(0, 1fr); }
  .journal-hub-panel--log .jh-meetings { height: auto; }
  .journal-hub-panel--log .jh-meetings-side { overflow: visible; }
  .journal-hub-panel--log .jh-meeting-list { max-height: 48vh; }
  .journal-hub-panel--log .jh-detail { overflow: visible; }
  .jh-detail-heading .jh-subtabbar { width: 100%; margin: 0; }
}
