#ck-goals-open, #ck-contract-open {
  min-height: 44px;
}

#ck-goals-open[data-first-session] {
  border-color: #e0b86b;
  background: #473b26;
  font-weight: 700;
}

#ck-goals, #ck-chronicle {
  box-sizing: border-box;
  width: min(100% - 24px, 34rem);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.45;
}

:is(#ck-goals, #ck-chronicle)[open] {
  display: flex;
  flex-direction: column;
}

#ck-goals .ck-goals-content, #ck-chronicle .ck-chronicle-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

#ck-goals header, #ck-chronicle header {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

#ck-goals h2, #ck-goals h3, #ck-chronicle h2 { margin: 0; }
#ck-goals button, #ck-chronicle button { min-height: 44px; white-space: normal; }

#ck-goals section {
  padding: 12px;
  border: 1px solid #9b8152;
  border-radius: 6px;
  background: #252d22;
}

#ck-goals-checklist {
  padding-inline-start: 1.45em;
  margin-block: 16px;
}

#ck-goals-checklist li { padding-block: 3px; }

#ck-chronicle ul { padding-inline-start: 1.5em; }
#ck-chronicle li { margin-block: 8px; }
#ck-chronicle a { color: #ffe0a3; }
#ck-chronicle progress { width: 100%; accent-color: #c4a060; }

@media (max-height: 480px) {
  #ck-goals, #ck-chronicle { padding: 12px; }
  #ck-goals header, #ck-chronicle header { margin-bottom: 8px; }
  #ck-goals section { padding: 8px; }
  #ck-goals section p, #ck-goals-checklist { margin-block: 8px; }
  #ck-goals-checklist li { padding-block: 1px; }
}

@media (prefers-reduced-motion: no-preference) {
  :is(#ck-goals, #ck-chronicle)[open] { animation: ck-panel-enter 120ms ease-out; }
  @keyframes ck-panel-enter { from { opacity: .86; } }
}

html[data-ck-large-text] :is(dialog, .management-panel) :is(p, li, label, input, button, select, td, th) {
  font-size: max(1.125rem, 16px) !important;
  line-height: 1.45;
}

html[data-ck-large-text] :is(dialog, .management-panel) :is(p, li, label, button, td, th) {
  white-space: normal;
  overflow-wrap: anywhere;
}
