/* Card/list follow-up. Scoped to the composed demo; original Ambient shell is retained. */
#xpRing .ring-text,
#habitRing .ring-text {
  display: grid;
  place-items: center;
  inset: 0;
  padding: 6px;
  text-align: center;
  line-height: 1;
}
#xpRingValue {
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#habitRingValue {
  font-size: max(10px, min(24px, calc(76px / var(--ring-chars, 3))));
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#taskStreaks,
#journalStreaks,
#shiftStreaks,
.u-goal-task-streaks {
  grid-column: 1/-1;
  margin: 12px 0 0;
  gap: 6px;
}
.u-unified-streaks .streak-metric > span {
  font-size: 10px;
  line-height: 1.5;
  padding: 6px 10px;
  min-height: 30px;
}
.u-unified-streaks .streak-metric {
  min-width: 0;
  max-width: 100%;
}
.u-unified-streaks .small-note {
  margin: 4px 0;
  font-size: 10px;
  line-height: 1.5;
  color: #e3dce8;
}
.u-goals-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 8px 12px;
  padding: 20px;
}
.u-goals-overview > :not(.u-section-onyx):not(.u-goal-task-streaks) {
  grid-column: 1;
}
.u-goals-overview .u-section-onyx {
  grid-column: 2;
  grid-row: 1/4;
  align-self: center;
}
.u-goals-overview .u-onyx {
  flex-direction: column;
  gap: 8px;
  margin: 0;
  text-align: center;
}
.u-goals-overview h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}
.u-goals-overview .summary-numbers {
  margin: 4px 0;
  gap: 14px;
}
.u-goals-overview .summary-numbers b {
  font-size: 24px;
}
.u-goals-overview .summary-numbers span {
  font-size: 11px;
}
#allTasks {
  display: block;
}
.u-task-list.is-complete .u-task-list-title {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.u-task-list .u-linked-check {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 11px;
}
.u-task-list .u-goal-row.is-done .u-linked-check {
  background: #cef063;
  color: #202027;
  border-color: #cef063;
}
.u-task-list .u-linked-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
.u-task-list .u-actions {
  margin-bottom: 0;
}
#todayTasks > .u-task-list {
  margin: 10px 0;
  box-shadow: none;
}
.u-order-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #d8d2df;
}
.u-order-row > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.u-order-row > div {
  display: flex;
  gap: 6px;
  flex: none;
}
.u-order-row .btn {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
}
.u-transactions {
  padding: 0;
}
.u-transactions > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  min-height: 56px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.u-transactions > summary::-webkit-details-marker {
  display: none;
}
.u-transaction-body {
  padding: 0 18px 18px;
}
.u-progress {
  direction: ltr;
  text-align: left;
}
.u-progress > span {
  float: none;
  margin-left: 0;
  margin-right: auto;
  transform-origin: left center;
}
.u-finance-spotlight .u-progress > span {
  float: none;
  margin-left: 0;
  margin-right: auto;
}
/* Stable per-card atmospheric palettes, derived from identity rather than render count. */
.u-galaxy-surface {
  --text: #faf7ff;
  --muted: #ded8e7;
  --line: #ffffff32;
  --panel: #302b39;
  --panel2: #3b3446;
  --card-hue: 265;
  --cloud-x: 65%;
  position: relative;
  isolation: isolate;
  color: var(--text);
  background:
    radial-gradient(
      ellipse at var(--cloud-x) 12%,
      hsl(var(--card-hue) 55% 50% / 0.18),
      transparent 65%
    ),
    radial-gradient(
      ellipse at calc(100% - var(--cloud-x)) 95%,
      hsl(calc(var(--card-hue) + 40) 65% 55% / 0.13),
      transparent 60%
    ),
    #222127;
  border-color: #ffffff25;
}
.u-galaxy-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.35;
  background:
    radial-gradient(
      circle at var(--cloud-x) 19%,
      #ffffff 0 0.6px,
      transparent 1px
    ),
    radial-gradient(circle at 19% 76%, #eadfff 0 0.6px, transparent 1px);
}
.u-galaxy-surface :is(h2, h3, h4, strong, legend, label) {
  color: inherit;
}
.u-galaxy-surface :is(p, small, .sub, .muted, .small-note, .u-five-head) {
  color: var(--muted);
}
.u-galaxy-surface .btn.secondary,
.u-galaxy-surface .btn.dark {
  background: #ffffff13;
  color: #faf7ff;
  border: 1px solid #ffffff65;
}
.u-galaxy-surface .btn.ghost {
  color: #f4edfb;
  background: transparent;
}
.u-galaxy-surface .btn:not(.secondary):not(.ghost):not(.dark):not(.danger) {
  color: #202027;
}
.u-galaxy-surface .text-link {
  color: #e0d5ff;
}
.u-galaxy-surface
  :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: #faf7fd;
  color: #202027;
  border-color: #b8acbf;
}
.u-galaxy-surface .u-inline-add input {
  color: #202027;
}
.u-galaxy-surface .u-inline-add input::placeholder {
  color: #6c6176;
}
.u-galaxy-surface.u-goal-list > summary {
  background: #ffffff0c;
  color: #faf7ff;
}
.u-galaxy-surface.u-goal-list small {
  color: #ded8e7;
}
.u-galaxy-surface.u-goal-list .u-list-symbol {
  background: #cef063;
  color: #202027;
}
.u-galaxy-surface.u-goal-list .is-done :is(.u-linked-title, .u-check > span),
.u-galaxy-surface.u-goal-list.is-complete summary strong {
  color: #d0c8d8;
}
.u-galaxy-surface .u-progress {
  background: #ffffff35;
}
.u-galaxy-surface .u-progress > span {
  background: #cef063;
}
.u-galaxy-surface .u-five-name {
  color: #faf7ff;
}
.u-galaxy-surface .u-five-name .u-habit-icon {
  color: var(--habit-ink);
}
.u-galaxy-surface .u-day-check {
  background: #38313f;
  color: #f3edfa;
  border-color: #c8bbd5;
}
.u-galaxy-surface .u-day-check.partial {
  background: linear-gradient(
    to top,
    var(--habit-accent) var(--day-fill),
    #38313f var(--day-fill)
  );
  color: #fff;
  text-shadow: 0 1px 3px #202027;
}
.u-galaxy-surface .u-day-check.complete {
  background: var(--habit-accent);
  color: var(--habit-ink);
}
.u-galaxy-surface .u-habit-foot > span:not(.u-streak) {
  color: #ded8e7;
}
.u-galaxy-surface .u-streak {
  color: var(--habit-accent);
  background: #ffffff10;
}
.u-galaxy-surface .u-dot.pending,
.u-galaxy-surface .u-dot.missed {
  border-color: #a396b2;
}
.u-galaxy-surface .u-dot.rest {
  background: #ffffff16;
}
.u-galaxy-surface .shift-cal-head {
  color: #e2d8eb;
}
.u-galaxy-surface .shift-day {
  background: #ffffff09;
  color: #f7f2fc;
  border-color: #ffffff42;
}
.u-galaxy-surface .shift-day.has-shift {
  background: #d3e89a22;
}
.u-galaxy-surface .shift-day.outside {
  color: #c9bed2;
}
.u-galaxy-surface .shift-day[aria-pressed="true"] {
  border-color: #cef063;
  outline-color: #cef063;
  background: #cef0631a;
}
.u-galaxy-surface .shift-cell-label,
.u-galaxy-surface .shift-more {
  color: #eee6f5;
}
.u-galaxy-surface .selected-shift-details {
  background: #ffffff0a;
  color: #f7f2fc;
}
.u-galaxy-surface .u-next-shift {
  color: #f7f2fc;
}
.u-galaxy-surface :is(.u-chart-row, .u-data-table) {
  color: #eee5f7;
}
.u-galaxy-surface :focus-visible {
  outline: 3px solid #e0ceff;
  outline-offset: 3px;
}
@media (max-width: 374px) {
  #xpRingValue {
    font-size: 23px;
  }
  #habitRingValue {
    font-size: max(10px, min(21px, calc(68px / var(--ring-chars, 3))));
  }
  .u-goals-overview {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .u-progress > span {
    transition: none;
  }
}
/* Global streaks are compact summary badges, not separate panels or toolbar items. */
#taskStreaks,
#journalStreaks,
#shiftStreaks,
.u-goal-task-streaks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.u-overview-streak {
  padding: 6px 9px;
  min-height: 30px;
  gap: 4px;
  background: #e9efd9;
  color: #354525;
  font-size: 10px;
  line-height: 1.5;
}
.u-overview-streak :is(strong, small) {
  color: #354525;
  font-size: inherit;
  display: inline;
}
.u-overview-streak small {
  margin-left: 3px;
}
.u-overview-streak .icon {
  width: 14px;
  height: 14px;
}
#planView .workspace-summary > #taskStreaks {
  grid-column: 1/-1;
}
#planView .workspace-summary > .summary-foot {
  display: none;
}

.section-surface.u-galaxy-surface {
  padding: 18px;
  border-radius: 28px;
}
.u-galaxy-surface .u-day-amount {
  background: #1e1e24;
  color: #fff;
  padding: 2px 3px;
  border-radius: 5px;
  text-shadow: none;
}
