/* ============================================================
 * Reflection H5 — Production styles
 * Depends on: colors_and_type.css (design tokens + utility classes)
 * ============================================================ */

* {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

/* ─── Container (phone shell) ──────────────────────────── */

.container {
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  border: none;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─── Header ───────────────────────────────────────────── */

.header {
  background: var(--bg-surface);
  padding: 10px 12px 8px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule-line);
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
}

.header-brand-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-brand-left img {
  width: 24px;
  height: 24px;
}

.header-brand-left h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  letter-spacing: -0.005em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Tab bar ──────────────────────────────────────────── */

.page-switch-card {
  margin-top: 4px;
  padding: 3px;
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-input);
  background: var(--bg-canvas);
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.page-switch-card::-webkit-scrollbar { display: none; }

.page-switch-option {
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 5px 8px;
  min-height: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
  flex-shrink: 0;
  white-space: nowrap;
}

.page-switch-option.is-active {
  background: var(--bg-surface);
  color: var(--fg-primary);
  box-shadow: var(--shadow-1);
}

.page-switch-option-title {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--fg-secondary);
}

.page-switch-option.is-active .page-switch-option-title {
  color: var(--fg-primary);
}

/* ─── Page panels ──────────────────────────────────────── */

.form-container {
  padding: 8px 12px 12px;
}

.page-panel[hidden] {
  display: none !important;
}

/* ─── Form ─────────────────────────────────────────────── */

.compact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#formFieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: contents;
}

#formFieldset:disabled {
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group {
  margin-bottom: 0;
}

.form-group.time-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group.time-inline label {
  width: 78px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.form-group.time-inline input[type="datetime-local"] {
  flex: 1;
}

.form-group.time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group.time-row input[type="datetime-local"] {
  flex: 1;
  min-width: 0;
}

.time-row-sep {
  color: var(--fg-muted);
  flex-shrink: 0;
}

.start-time-controls {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}

.start-today-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  color: var(--fg-muted);
  font-size: 0.85em;
  cursor: pointer;
  white-space: nowrap;
}

.start-today-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

/* "pong" — sets 结束时间 = 开始时间 + 30min. Sits directly below the "ping" toggle. */
.pong-btn {
  padding: 1px 6px;
  font-size: 0.85em;
  line-height: 1.4;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
}

.pong-btn:hover {
  color: var(--fg-primary);
  border-color: var(--fg-muted);
}

.form-group.select-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group.select-inline label {
  width: 78px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.form-group.select-inline select {
  flex: 1;
}

#dodArchiveFilter,
#todayArchiveFilter {
  flex: 0 0 auto;
  width: 90px;
  font-size: 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-ui);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  color: var(--fg-primary);
}

input,
textarea,
select {
  width: 100%;
  padding: 9px 10px;
  border: 1.5px solid var(--rule-line);
  border-radius: var(--radius-input);
  font-size: 15px;
  font-family: var(--font-ui);
  line-height: 1.35;
  background: var(--bg-surface);
  color: var(--fg-primary);
  outline: none;
  transition: all var(--duration-base) var(--ease-standard);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink-cobalt);
  box-shadow: var(--shadow-inset);
}

textarea {
  resize: vertical;
  min-height: 72px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[readonly],
textarea[readonly] {
  background: var(--bg-surface);
  color: var(--fg-muted);
}

/* ─── Buttons ──────────────────────────────────────────── */

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.form-actions .secondary-btn {
  grid-column: 1 / -1;
}

.form-actions-3col {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-actions-3col .secondary-btn {
  grid-column: auto;
}

.submit-btn,
.secondary-btn,
.plan-btn,
.act-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
  min-height: 44px;
}

.submit-btn {
  flex: 1;
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 1.5px solid var(--ink-cobalt);
}

.submit-btn:active {
  background: var(--ink-cobalt-soft);
}

.act-btn {
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 2px solid var(--ink-cobalt);
  font-weight: var(--fw-bold);
}

.act-btn:active {
  background: var(--ink-cobalt-soft);
}

.plan-btn {
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 1.5px solid var(--rule-line-strong);
}

.plan-btn:active {
  background: var(--bg-canvas);
}

.secondary-btn {
  min-width: 90px;
  background: #ffffff;
  color: var(--fg-secondary);
  border: 1.5px solid var(--rule-line);
}

.secondary-btn:active {
  background: var(--bg-canvas);
}
.submit-btn:disabled,
.secondary-btn:disabled,
.plan-btn:disabled,
.act-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Loading ──────────────────────────────────────────── */

.loading {
  display: none;
  text-align: center;
  padding: 8px 0 2px;
}

.spinner {
  border: 3px solid var(--rule-line);
  border-top: 3px solid var(--ink-cobalt);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}

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

/* ─── Message ──────────────────────────────────────────── */

.message {
  padding: 9px 10px;
  border-radius: var(--radius-input);
  margin-top: 8px;
  display: none;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
}

.message.success,
.message.error {
  background: var(--bg-surface);
  color: var(--fg-primary);
  border: 1px solid var(--rule-line);
}

/* ─── Readonly section ─────────────────────────────────── */

.readonly-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.readonly-section h2 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
}

/* ─── AI Comments section ──────────────────────────────── */

.ai-comments-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-comments-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ai-comments-range {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  order: 10;
  width: 100%;
}

.ai-comments-range input[type="date"] {
  width: auto;
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font-size: 12px;
}

.ai-refresh-btn {
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-btn);
  color: var(--fg-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.ai-refresh-btn:active {
  background: var(--surface-hover);
}

.ai-comments-header h2 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  margin: 0;
  flex-shrink: 0;
}

.ai-status-banner {
  font-family: var(--font-ui);
  font-size: 12px;
  border-radius: 10px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--warn);
  border: 1px solid var(--rule-line);
  transition: opacity var(--duration-slow) var(--ease-standard);
}

.ai-status-banner[hidden] {
  display: none;
}

.ai-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}

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

.ai-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-comments-empty {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
}

/* ─── AI comment card (quote style) ────────────────────── */

.ai-comment-card {
  border: 1px solid var(--rule-line);
  border-left: 3px solid var(--ink-cobalt);
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 0 var(--radius-tight) var(--radius-tight) 0;
  transition: background 120ms ease;
}

.ai-comment-card.is-pending {
  border-left-color: var(--warn);
}

.ai-comment-card-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  font-weight: 600;
}

.ai-comment-card[data-record-type="act"] .ai-comment-card-badge,
.ai-comment-card-badge.type-act {
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 1px solid var(--ink-cobalt);
}

.ai-comment-card[data-record-type="subplan"] .ai-comment-card-badge,
.ai-comment-card-badge.type-subplan {
  background: #ffffff;
  color: var(--warn);
  border: 1px solid var(--warn);
}

.ai-comment-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-comment-card-dod {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.ai-comment-card-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--fg-muted);
  margin: 2px 0 4px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-comment-card-sub::before {
  content: "↳ ";
  color: var(--fg-disabled);
}

.ai-comment-card-act {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-primary);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 4px 0 0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-comment-card-body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  text-wrap: pretty;
  border-top: none;
  padding-top: 6px;
  margin-top: 6px;
}

.ai-comment-correct-btn {
  background: transparent;
  border: 1px solid var(--rule-line);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.ai-comment-correct-btn:hover {
  color: var(--fg-primary);
  border-color: var(--fg-muted);
}

.ai-comment-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--rule-line);
}

.ai-comment-correct-form {
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed var(--rule-line);
  border-radius: 4px;
  background: var(--bg-surface, transparent);
}
.ai-comment-correct-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px;
  border: 1px solid var(--rule-line);
  border-radius: 3px;
  resize: vertical;
  box-sizing: border-box;
}
.ai-comment-correct-time-row {
  margin-top: 6px;
}
.ai-comment-correct-time-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-comment-correct-time {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--rule-line);
  border-radius: 3px;
  padding: 2px 4px;
  flex: 1;
}
.ai-comment-correct-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 6px;
}
.ai-comment-correct-cancel,
.ai-comment-correct-submit {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid var(--rule-line);
}
.ai-comment-correct-submit {
  background: var(--fg-primary, #111);
  color: var(--bg-primary, #fff);
  border-color: var(--fg-primary, #111);
}
.ai-comment-correct-submit:disabled {
  opacity: 0.5;
  cursor: progress;
}
.ai-comment-correct-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 6px;
}

.ai-comment-card-body em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-cobalt);
  display: block;
  margin-top: 6px;
}

.ai-comment-card.is-pending .ai-comment-card-body {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--fg-muted);
  font-size: 13px;
}

/* ─── Checklist ────────────────────────────────────────── */

.checklist-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-section h2 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
}

.checklist-top-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.checklist-top-row .form-group {
  flex: 1;
}

.checklist-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.checklist-clear-btn,
.checklist-add-btn {
  width: auto;
  min-width: 44px;
  border: 1px solid var(--rule-line);
  background: #ffffff;
  color: var(--fg-secondary);
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard);
}

.checklist-add-btn {
  background: var(--ink-cobalt);
  color: #fff;
  border-color: var(--ink-cobalt);
  font-weight: var(--fw-semibold);
  font-size: 16px;
  padding: 6px 14px;
}

.checklist-clear-btn:hover { background: var(--bg-canvas); }
.checklist-add-btn:hover { opacity: 0.85; }

.checklist-name-actions {
  display: flex;
  gap: 8px;
}
.checklist-name-actions[hidden] {
  display: none;
}

.checklist-rename-btn,
.checklist-delete-btn {
  border: 1px solid var(--rule-line);
  background: var(--bg-canvas);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.checklist-rename-btn { color: var(--ink-cobalt); }
.checklist-delete-btn { color: var(--ink-red, #d32f2f); }
.checklist-rename-btn:hover,
.checklist-delete-btn:hover { background: var(--rule-line); }

.checklist-steps-card {
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-input);
  background: var(--bg-surface);
  padding: 8px;
}

.checklist-steps-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Swipe-to-reveal step row ──────────────────────────── */

.checklist-step-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--rule-line);
  background: var(--bg-canvas);
}

.checklist-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  background: var(--bg-canvas);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-primary);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.checklist-step-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--ink-cobalt);
  -webkit-appearance: checkbox;
  appearance: auto;
}

.checklist-step-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.checklist-step-item.done .checklist-step-text {
  color: var(--fg-muted);
  text-decoration: line-through;
}

.checklist-step-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.checklist-arrow-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 12px;
  cursor: pointer;
  color: var(--fg-muted);
  line-height: 1;
  border-radius: 4px;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checklist-arrow-btn:hover { background: var(--rule-line); }
.checklist-arrow-btn:disabled { opacity: 0.2; pointer-events: none; }

/* Hidden action buttons revealed on swipe */
.checklist-step-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  z-index: 0;
}

.checklist-step-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  border: none;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: #fff;
  cursor: pointer;
}

.checklist-step-action-btn.edit { background: var(--ink-cobalt); }
.checklist-step-action-btn.delete { background: var(--ink-red, #d32f2f); }

/* Inline edit input */
.checklist-step-edit-input {
  flex: 1;
  border: 1px solid var(--ink-cobalt);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  background: #fff;
}

/* Add step row */
.checklist-add-step-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px dashed var(--rule-line);
  margin-top: 4px;
}

.checklist-add-step-input {
  flex: 1;
  border: 1px solid var(--rule-line);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
}
.checklist-add-step-input:focus {
  border-color: var(--ink-cobalt);
}

.checklist-add-step-confirm {
  background: var(--ink-cobalt);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.checklist-empty-hint {
  color: var(--fg-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 4px;
}

/* ── Checklist modal ───────────────────────────────────── */

.checklist-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.checklist-modal-overlay[hidden] {
  display: none;
}

.checklist-modal {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.checklist-modal h3 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  margin-bottom: 14px;
}

.checklist-modal .form-group {
  margin-bottom: 12px;
}

.checklist-modal label {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-secondary);
  margin-bottom: 4px;
}

.checklist-modal input {
  width: 100%;
  border: 1px solid var(--rule-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.checklist-modal input:focus {
  border-color: var(--ink-cobalt);
}

.checklist-modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.checklist-modal-cancel,
.checklist-modal-confirm {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.checklist-modal-cancel {
  background: var(--bg-canvas);
  color: var(--fg-secondary);
}

.checklist-modal-confirm {
  background: var(--ink-cobalt);
  color: #fff;
}

/* ─── DOD Creator ──────────────────────────────────────── */

.dod-top-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.dod-top-row .form-group {
  flex: 1;
  margin: 0;
}

/* Active/archive segmented filter for the DOD picker. */
.dod-filter {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-btn);
  overflow: hidden;
  background: #ffffff;
}
.dod-filter-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  padding: 0 12px;
  min-height: 38px;
  border: none;
  background: transparent;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
}
.dod-filter-btn + .dod-filter-btn {
  border-left: 1px solid var(--rule-line);
}
.dod-filter-btn.active {
  background: var(--ink-cobalt);
  color: var(--fg-on-cobalt);
}

.dod-card {
  border: 1.5px solid var(--ink-cobalt);
  border-radius: var(--radius-card);
  padding: 8px;
  margin-bottom: 8px;
  background: var(--bg-surface);
}

.dod-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.dod-suggestions .dod-card h4 {
  margin: 0 0 6px 0;
}
.dod-suggestions .dod-card .dod-card-desc {
  margin: 0 0 6px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.dod-suggestions .dod-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.dod-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill.gen {
  background: var(--ink-cobalt-soft);
  color: var(--ink-cobalt);
}

.pill.proj {
  background: var(--bg-canvas);
  color: var(--fg-secondary);
  border: 1px solid var(--rule-line-strong);
}

.pill.done {
  background: var(--good-soft);
  color: var(--good);
  border: 1px solid #c9d9ce;
}

.dod-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.dod-reason {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-secondary);
  padding-left: 10px;
  border-left: 2px solid var(--rule-line);
  margin-bottom: 12px;
}

.dod-reason b {
  color: var(--fg-primary);
}

.dod-actions {
  display: flex;
  gap: 8px;
}

.dod-actions .btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-btn);
  padding: 9px 12px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
  min-height: 38px;
  flex: 1;
}

.dod-actions .btn.primary {
  background: var(--ink-cobalt);
  color: var(--fg-on-cobalt);
}

.dod-actions .btn.primary:active {
  background: var(--ink-cobalt-deep);
}

.dod-actions .btn.secondary {
  background: #ffffff;
  color: var(--fg-secondary);
  border: 1px solid var(--rule-line);
}

.dod-actions .btn.secondary:active {
  background: var(--bg-canvas);
}

.new-dod-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border: 1.5px dashed var(--rule-line-strong);
  border-radius: var(--radius-card);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-secondary);
  width: 100%;
  cursor: pointer;
  margin-bottom: 14px;
}

.new-dod-btn:active {
  background: var(--bg-canvas);
}

.dod-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-line);
}

.dod-section-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.dod-section-title h2 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  margin: 0;
}

/* ─── Responsive (iPhone 14: 390×844) ──────────────────── */

@media (max-width: 430px) {
  .header-brand-left h1 {
    font-size: 17px;
  }

  .form-group.time-inline label,
  .form-group.select-inline label {
    width: 68px;
    font-size: 12px;
  }

  .form-group.time-inline input[type="datetime-local"],
  .form-group.select-inline select,
  .form-group.time-row input[type="datetime-local"] {
    font-size: 14px;
    padding: 8px;
  }

  .dod-top-row {
    flex-direction: column;
    gap: 6px;
  }

  .checklist-top-row {
    flex-direction: column;
    gap: 6px;
  }

  .checklist-actions {
    display: flex;
    gap: 6px;
  }

  .checklist-clear-btn,
  .checklist-add-btn {
    flex: 1;
  }

  .dod-smart-row {
    grid-template-columns: 48px 1fr;
    gap: 4px;
  }

  .dod-smart-row .btn {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .dod-smart-modal-panel {
    width: calc(100vw - 16px);
    padding: 12px;
    max-height: calc(100dvh - 32px);
  }

  .talk-history {
    max-height: 50vh;
  }

  .review-abc-chat {
    max-height: 40vh;
  }

  .ai-comment-card-body {
    font-size: 13px;
    line-height: 1.5;
  }

  .ai-comment-card-act {
    font-size: 12px;
  }

  .ai-comment-card-sub {
    font-size: 11px;
  }

  .ai-comment-card-dod {
    font-size: 11px;
  }
}

/* Safe area insets for notched iPhones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .form-container {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
}

/* ─── Auth Gate ────────────────────────────────────────── */

.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  background: var(--bg-surface);
}

.auth-gate-inner {
  text-align: center;
  max-width: 280px;
}

.auth-gate-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.auth-gate-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  letter-spacing: -0.005em;
  margin-bottom: 24px;
}

.auth-gate-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-gate-loading .spinner {
  margin: 0;
}

.auth-gate-text {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin: 0;
}

.auth-gate-failed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-gate-loading[hidden] {
  display: none !important;
}

.auth-gate-failed[hidden] {
  display: none !important;
}

.auth-gate-error-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--warn);
}

.auth-gate-retry-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 2px solid var(--ink-cobalt);
  border-radius: var(--radius-btn);
  padding: 10px 32px;
  min-height: 44px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
}

.auth-gate-retry-btn:active {
  background: var(--ink-cobalt-soft);
}

.auth-gate-hint {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0;
}

#appMain[hidden] {
  display: none !important;
}

/* ─── Auth ────────────────────────────────────────────── */

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.user-name {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.auth-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ─── V2: Talk panel ──────────────────────────────────────────── */
.talk-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 0;
}
.talk-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.5;
}
.talk-bubble p { margin: 0; }
.talk-ai {
  background: var(--surface-secondary, #f3f3f5);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.talk-user {
  background: var(--accent-primary, #4a6cf7);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.talk-stage-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-secondary, #e8ecff);
  color: var(--accent-primary, #4a6cf7);
  margin-bottom: 4px;
}
.talk-header {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}
.talk-input-area {
  margin-top: 12px;
}
.talk-input-area textarea {
  width: 100%;
  resize: vertical;
}
.talk-done-section {
  text-align: center;
  padding: 16px;
}
.talk-commitment {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 15px;
}

/* ─── Talk record header (echoes ACT/PLAN context) ─────── */

.talk-record-header {
  background: var(--ink-cobalt-soft);
  border-left: 3px solid var(--ink-cobalt);
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.talk-record-type {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-cobalt);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.talk-record-kr {
  font-weight: 600;
  margin-bottom: 6px;
}

.talk-record-ai {
  font-size: 13px;
  color: #555;
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
}

/* ─── Review panel ─────────────────────────────────────── */

.review-step {
  margin-bottom: 16px;
}

.review-step[hidden] {
  display: none !important;
}

.review-step-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  margin-bottom: 10px;
}

.review-sub-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--fg-secondary);
  margin: 10px 0 6px;
}

.review-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-primary);
  cursor: pointer;
}

.review-check-label input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ink-cobalt);
}

.review-physio-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-physio-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-primary);
}

.review-physio-label {
  grid-column: 1;
  grid-row: 1;
}

.review-physio-row input[type="number"] {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  padding: 6px 8px;
  font-family: var(--font-ui);
  font-size: 14px;
}

.review-physio-hint {
  grid-column: 1;
  grid-row: 2;
  font-size: 12px;
  color: var(--fg-secondary);
}

.review-recognition-card {
  background: var(--bg-canvas);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-input);
  padding: 12px;
  margin-bottom: 8px;
}

.review-recognition-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
}

.review-recognition-row:last-child {
  margin-bottom: 0;
}

.review-recognition-label {
  color: var(--fg-muted);
  flex-shrink: 0;
  min-width: 80px;
}

.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.review-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--rule-line);
  color: var(--fg-secondary);
}

.review-chip.expert {
  background: var(--ink-cobalt-soft);
  border-color: var(--ink-cobalt);
  color: var(--ink-cobalt);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-standard);
}

.review-chip.expert.selected {
  background: var(--ink-cobalt);
  color: var(--fg-on-cobalt);
}

.review-chip.star {
  font-weight: var(--fw-semibold);
}

.review-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--rule-line);
  color: var(--fg-primary);
}

.review-expert-panel {
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-input);
  padding: 12px;
  margin-bottom: 10px;
}

.review-expert-panel-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--ink-cobalt);
  margin-bottom: 8px;
}

.review-expert-panel label {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.review-expert-panel .submit-btn {
  width: 100%;
  margin-top: 8px;
}

.review-step .form-actions {
  margin-top: 10px;
}

.review-expert-result {
  background: var(--bg-canvas);
  border-left: 3px solid var(--ink-cobalt);
  padding: 8px 10px;
  margin-top: 8px;
  border-radius: 4px;
}

.review-expert-result .breakthrough {
  font-weight: var(--fw-semibold);
  color: var(--fg-primary);
  margin-bottom: 4px;
}

.review-expert-result .method {
  font-size: 13px;
  color: var(--fg-secondary);
}

.review-terminal-banner {
  background: var(--bg-canvas);
  border: 1px solid var(--rule-line-strong);
  border-radius: var(--radius-input);
  padding: 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-primary);
  text-align: center;
}

.review-terminal-banner[hidden] {
  display: none !important;
}

.review-success-banner {
  background: var(--ink-cobalt-soft);
  border: 1px solid var(--ink-cobalt);
  border-radius: var(--radius-input);
  padding: 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-cobalt);
  text-align: center;
}

.review-success-banner[hidden] {
  display: none !important;
}

.ai-comment-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin-left: 4px;
  font-size: 11px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--rule-line);
  color: var(--fg-secondary);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ai-comment-time-pill:hover {
  border-color: var(--fg-muted);
}
.ai-comment-time-pill.is-editing {
  cursor: default;
  background: rgba(0, 100, 200, 0.12);
}
.ai-comment-pill-input {
  font-size: 12px;
  padding: 1px 4px;
  border: 1px solid rgba(0, 100, 200, 0.4);
  border-radius: 4px;
  background: #fff;
}
.ai-comment-pill-btn {
  border: none;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ai-comment-pill-btn:hover {
  color: #06f;
}
.ai-comment-pill-status {
  font-size: 11px;
  color: #c33;
}

/* SMART filling assistant modal */
.dod-smart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dod-smart-modal[hidden] { display: none; }
.dod-smart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.dod-smart-modal-panel {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-3);
  max-width: 860px;
  width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 16px;
}
.dod-smart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule-line);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.dod-smart-modal-header h3 { margin: 0; font-size: 16px; }
.dod-smart-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dod-smart-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 6px;
  align-items: start;
}
.dod-smart-row[data-row="orig"] {
  background: var(--ink-cobalt-soft);
  padding: 8px;
  border-radius: var(--radius-tight);
}
.dod-smart-label {
  font-size: 12px;
  color: var(--fg-secondary);
  padding-top: 6px;
  white-space: nowrap;
}
.dod-smart-row textarea {
  width: 100%;
  resize: vertical;
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--rule-line-strong);
  border-radius: var(--radius-tight);
  background: var(--bg-surface);
}
.dod-smart-row textarea.smart-adopted {
  background: #e8f5e9;
  border-color: #81c784;
}
button.smart-ack.smart-ack--done {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Step 1 ABC chat ─────────────────────────────────────── */
.review-abc-chat { max-height: 320px; overflow-y: auto; padding: 8px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 8px; }
.review-abc-msg { margin: 6px 0; padding: 6px 10px; border-radius: 6px; }
.review-abc-msg.ai { background: #f0f4ff; }
.review-abc-msg.user { background: #e8f5e9; text-align: right; }
.review-abc-input { display: flex; gap: 8px; align-items: flex-start; }
.review-abc-input textarea { flex: 1; }

/* ─── Journal Panel ───────────────────────────────────────────── */

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

.journal-date-picker {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-tight);
  background: var(--bg-surface);
  color: var(--fg-primary);
}

.journal-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journal-card {
  border: 1px solid var(--rule-line);
  border-left: 3px solid var(--ink-cobalt);
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 0 var(--radius-tight) var(--radius-tight) 0;
  transition: border-color 120ms ease;
}

.journal-card--plan {
  border-left-color: var(--warn);
}

.journal-card--dirty {
  border-left-color: #ff9f43;
}

.journal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.journal-card-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.journal-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.journal-card-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  flex-shrink: 0;
}

.journal-card-badge.type-act {
  background: #ffffff;
  color: var(--ink-cobalt);
  border: 1px solid var(--ink-cobalt);
}

.journal-card-badge.type-plan {
  background: #ffffff;
  color: var(--warn);
  border: 1px solid var(--warn);
}

.journal-card-title {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journal-card-dirty-tag {
  font-size: 10px;
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.journal-card-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.journal-card-arrow {
  font-size: 12px;
  color: var(--fg-muted);
}

.journal-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Edit form inside expanded card ──── */

.journal-card-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-line);
}

.journal-card-form .form-group {
  margin-bottom: 8px;
}

.journal-card-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  display: block;
  margin-bottom: 3px;
}

.journal-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-tight);
  background: var(--bg-surface);
  color: var(--fg-primary);
}

.journal-input:focus {
  outline: none;
  border-color: var(--ink-cobalt);
}

textarea.journal-input {
  resize: vertical;
  min-height: 40px;
}

.journal-time-row {
  display: flex;
  gap: 10px;
}

.journal-time-row .form-group {
  flex: 1;
}

.journal-subplan-row {
  display: flex;
  gap: 6px;
}

.journal-subplan-row select {
  flex: 1;
}

.journal-new-sp-form {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.journal-new-sp-form input {
  flex: 1;
}

.journal-btn-inline {
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  color: var(--ink-cobalt);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-tight);
  cursor: pointer;
  white-space: nowrap;
}

.journal-btn-inline:hover {
  background: rgba(74, 158, 255, 0.2);
}

.journal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.journal-autosave-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-disabled);
  margin-right: auto;
}

.journal-btn-save {
  background: var(--ink-cobalt);
  color: #ffffff;
  border: none;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-tight);
  cursor: pointer;
}

.journal-btn-save:hover {
  opacity: 0.9;
}

.journal-btn-delete {
  background: transparent;
  border: 1px solid var(--rule-line);
  color: var(--fg-muted);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-tight);
  cursor: pointer;
}

.journal-btn-delete:hover {
  color: var(--danger, #e74c3c);
  border-color: var(--danger, #e74c3c);
}

.journal-delete-confirm {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  align-items: center;
  gap: 4px;
}

.journal-delete-confirm[hidden] {
  display: none;
}

.journal-delete-confirm:not([hidden]) {
  display: inline-flex;
}

.journal-btn-delete-yes {
  background: var(--danger, #e74c3c);
  color: #ffffff;
  border: none;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-tight);
  cursor: pointer;
}

.journal-btn-delete-no {
  background: transparent;
  border: 1px solid var(--rule-line);
  color: var(--fg-muted);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-tight);
  cursor: pointer;
}

.journal-empty {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-muted);
  text-align: center;
  padding: 40px 0;
}
