/* Daily check-in extends the dashboard's existing type, palette and radius scale. */
.daily-checkin {
  box-sizing: border-box;
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: min(860px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong, #2b3749);
  border-radius: var(--radius-xl, 24px);
  background: var(--surface, #0a0e14);
  color: var(--text, #fcfdff);
  font: inherit;
  box-shadow: var(--shadow-md, 0 28px 80px rgba(0, 0, 0, .44));
  overflow: hidden;
  overscroll-behavior: contain;
  color-scheme: dark;
}
.daily-checkin::backdrop { background: rgba(0, 0, 0, .68); backdrop-filter: blur(4px); }
.daily-checkin[open] { animation: checkin-enter 160ms ease-out; }
body:has(.daily-checkin[open]) { overflow: hidden; }
.daily-checkin form { display: flex; flex-direction: column; max-height: min(860px, calc(100dvh - 50px)); margin: 0; padding: 0; gap: 0; }
.daily-checkin .checkin-head, .daily-checkin .checkin-footer { flex-shrink: 0; }
.daily-checkin .checkin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0 32px; color: var(--text-muted, #97a2b3); font-size: 14px; font-weight: 600; }
.daily-checkin .checkin-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted, #97a2b3); font: inherit; font-size: 26px; cursor: pointer; }
.daily-checkin .checkin-body { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 32px 8px; scrollbar-width: thin; scrollbar-color: var(--border-strong, #2b3749) transparent; }
.daily-checkin .checkin-question { max-width: 440px; margin: 0 0 14px; color: var(--text, #fcfdff); font-size: 28px; line-height: 1.16; letter-spacing: -.035em; font-weight: 750; }
.daily-checkin .checkin-question:focus { outline: none; }
.daily-checkin .checkin-hint { display: block; margin: 12px 0 18px; color: var(--text-muted, #97a2b3); font-size: 14px; line-height: 1.55; font-weight: 400; }
.daily-checkin .checkin-plan { display: flex; flex-direction: column; gap: 5px; margin: 24px 0; padding: 16px 0; border-block: 1px solid var(--border, #202836); }
.daily-checkin .checkin-plan strong { font-size: 16px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.daily-checkin .checkin-plan span { color: var(--text-muted, #97a2b3); font-size: 13px; line-height: 1.4; }
.daily-checkin .checkin-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 24px 0 4px; }
.daily-checkin .checkin-answer { min-width: 0; min-height: 56px; padding: 12px 8px; border: 1px solid var(--border-strong, #2b3749); border-radius: 14px; background: var(--surface-2, #111722); color: var(--text, #fcfdff); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.daily-checkin .checkin-options span { min-width: 0; overflow-wrap: anywhere; }
.daily-checkin .checkin-options { display: grid; gap: 8px; margin: 20px 0; }
.daily-checkin .checkin-options label, .daily-checkin .checkin-evidence label { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 13px 14px; border: 1px solid var(--border, #202836); border-radius: 12px; background: transparent; color: var(--text, #fcfdff); font-size: 14px; line-height: 1.45; cursor: pointer; }
.daily-checkin .checkin-options label:has(input:checked), .daily-checkin .checkin-evidence label:has(input:checked), .daily-checkin .is-selected { border-color: var(--accent, #00b4ff); background: var(--accent-soft, rgba(0,180,255,.14)); }
.daily-checkin input[type='checkbox'], .daily-checkin input[type='radio'] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent, #00b4ff); }
.daily-checkin .checkin-body > label, .daily-checkin details label { display: block; margin: 18px 0 8px; color: var(--text-muted, #97a2b3); font-size: 14px; line-height: 1.5; }
.daily-checkin input:not([type='checkbox']):not([type='radio']), .daily-checkin select, .daily-checkin textarea { box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 48px; margin: 8px 0 18px; padding: 12px 14px; border: 1px solid var(--border-strong, #2b3749); border-radius: 10px; background: var(--surface-2, #111722); color: var(--text, #fcfdff); font: inherit; font-size: 16px; line-height: 1.45; }
.daily-checkin textarea { resize: vertical; min-height: 88px; }
.daily-checkin input::placeholder, .daily-checkin textarea::placeholder { color: var(--text-muted, #97a2b3); opacity: .8; }
.daily-checkin .checkin-evidence { display: grid; gap: 6px; margin: 20px 0; }
.daily-checkin .checkin-evidence label { border-width: 0 0 1px; border-radius: 0; padding-inline: 2px; }
.daily-checkin .checkin-evidence span { min-width: 0; overflow-wrap: anywhere; }
.daily-checkin .checkin-evidence small { display: block; margin-top: 3px; color: var(--text-muted, #97a2b3); font-size: 12px; }
.daily-checkin details { margin: 18px 0; font-size: 13px; color: var(--text-muted, #97a2b3); }
.daily-checkin summary, .today-call summary { width: fit-content; padding-block: 8px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.daily-checkin .checkin-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px 24px; }
.daily-checkin .checkin-actions { display: flex; align-items: center; gap: 8px; }
.checkin-primary, .checkin-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none; cursor: pointer; }
.checkin-primary { background: var(--accent, #00b4ff); color: #03121b; }
.checkin-secondary { background: transparent; color: var(--text-muted, #97a2b3); }
.daily-checkin .checkin-error { margin: 14px 0 0; color: var(--danger, #ff6c8e); font-size: 13px; line-height: 1.5; }
.daily-checkin .checkin-error:empty { display: none; }
.daily-checkin .checkin-progress { color: var(--text-muted, #97a2b3); font-size: 12px; line-height: 1.5; }
.daily-checkin :is(button, input, select, textarea, summary):focus-visible, .today-call :is(button, summary):focus-visible { outline: 2px solid var(--accent, #00b4ff); outline-offset: 3px; }
.daily-checkin button:disabled { cursor: wait; opacity: .5; }
.today-call { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 28px 32px; border: 1px solid var(--border-strong, #2b3749); border-radius: 18px; background: var(--surface, #0a0e14); }
.today-call > div { min-width: 0; }
.today-call .today-call-label { display: block; margin-bottom: 8px; color: var(--text-muted, #97a2b3); font-size: 11px; line-height: 1.4; letter-spacing: .1em; font-weight: 750; text-transform: uppercase; }
.today-call .today-call-value { margin: 0; color: var(--text, #fcfdff); font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.035em; font-weight: 750; text-transform: uppercase; }
.today-call .today-call-copy { max-width: 62ch; margin: 10px 0 0; color: var(--text-muted, #97a2b3); font-size: 14px; line-height: 1.5; }
.today-call .today-call-actions { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; gap: 4px; max-width: 320px; }
.today-call details { color: var(--text-muted, #97a2b3); font-size: 13px; line-height: 1.5; }
.today-call details summary { margin-left: auto; }
.today-call details p { margin: 8px 0; }
@media (hover: hover) {
  .daily-checkin .checkin-answer:hover, .daily-checkin .checkin-options label:hover { border-color: var(--text-muted, #97a2b3); background: var(--surface-2, #111722); }
  .daily-checkin .checkin-close:hover, .checkin-secondary:hover { color: var(--text, #fcfdff); background: var(--surface-2, #111722); }
  .checkin-primary:hover { filter: brightness(1.08); }
}
body[data-theme='light'] .daily-checkin { color-scheme: light; }
@keyframes checkin-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .daily-checkin { position: fixed; inset: auto 0 0; width: 100%; max-height: 92dvh; margin: 0; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .daily-checkin form { max-height: calc(92dvh - 1px); }
  .daily-checkin .checkin-head { padding: 12px 16px 0 24px; }
  .daily-checkin .checkin-body { padding: 16px 24px 8px; }
  .daily-checkin .checkin-question { font-size: 26px; }
  .daily-checkin .checkin-footer { padding: 12px 16px max(20px, env(safe-area-inset-bottom)); }
  .daily-checkin .checkin-answer { min-height: 52px; }
  .today-call { flex-direction: column; align-items: stretch; padding: 24px; gap: 18px; }
  .today-call .today-call-actions { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; max-width: none; gap: 8px; }
  .today-call .today-call-actions details[open] { flex-basis: 100%; }
  .today-call details summary { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .daily-checkin[open] { animation: none; } }
/* Keep repeat Yes / No / Unsure relationships as compact as the first answer. */
.daily-checkin .checkin-options:has(input[name='sleep']),
.daily-checkin .checkin-options:has(input[name='latest']),
.daily-checkin .checkin-options:has(input[name='exposure']) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.daily-checkin .checkin-options:has(input[name='sleep']) label,
.daily-checkin .checkin-options:has(input[name='latest']) label,
.daily-checkin .checkin-options:has(input[name='exposure']) label { justify-content: center; gap: 7px; padding: 12px 6px; }
.daily-checkin .checkin-plan:has(.checkin-plan-change) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.daily-checkin .checkin-plan > strong, .daily-checkin .checkin-plan > span { grid-column: 1; }
.daily-checkin .checkin-plan .checkin-plan-change { grid-column: 2; grid-row: 1 / 3; min-height: 44px; padding: 8px 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
