/* Extraction-card UI extracted from NeronApp/decompose/styles.css. */
/* Only `.ec-*` rules + ec-prefixed @keyframes / nested @media blocks. */

.ec-card-shell,
.sheet-demo,
.tweaks {
  clip-path: var(--apple-clip, none);
}

.tl-card,
.ec-body-row,
.ec-activity-row,
.ec-task-row,
.ec-person-row,
.ec-subcard,
.ec-mood-matrix,
.ec-reflection-wrap,
.ec-row-add,
.sheet-opt-solo,
.ec-card,
.ec-action {
  clip-path: var(--apple-clip, none);
}

.ec-card-shell,
.sheet-demo,
.sheet-opt-solo,
.tweaks,
.tl-card,
.ec-body-row,
.ec-activity-row,
.ec-task-row,
.ec-person-row,
.ec-subcard,
.ec-mood-matrix,
.ec-reflection-wrap,
.ec-row-add,
.ec-card,
.ec-action {
  position: relative;
}

.ec-card-shell::after,
.sheet-demo::after,
.sheet-opt-solo::after,
.tweaks::after,
.tl-card::after,
.ec-body-row::after,
.ec-activity-row::after,
.ec-task-row::after,
.ec-person-row::after,
.ec-subcard::after,
.ec-mood-matrix::after,
.ec-reflection-wrap::after,
.ec-row-add::after,
.ec-card::after,
.ec-action::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--apple-border, none);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 3;
}

.ec-card-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  /* Shadow via filter so it tracks the squircle clip-path alpha. */
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45));
  font-family: 'Inter', system-ui, sans-serif;
  position: relative;
  overflow: hidden;
}

.ec-card-shell.glow-purple {
  border-color: rgba(168,85,247,0.25);
  box-shadow:
    0 0 60px rgba(168,85,247,0.25),
    inset 0 0 40px rgba(168,85,247,0.25);
}

.ec-card-shell .ec-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ec-card-shell .ec-card-counter {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255,255,255,0.3);
}

.ec-edit {
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  margin: 0;
}

.ec-edit-enum {
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ec-edit-enum::after {
  content: " ▾";
  font-size: 0.85em;
  opacity: 0.5;
}

.ec-row-del {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.25);
  font-size: 14px;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
}

.ec-row-add {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.4);
  border-radius: 12px;
  padding: 10px 12px;
  font: 500 11px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
}

.ec-chip {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: linear-gradient(to bottom, #151515, #1b1b1b);
  border: 0.5px solid #252525;
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
  font-family: 'Inter', system-ui, sans-serif;
  display: inline-block;
}

.ec-chip--neutral {
  padding: 2px 10px;
  background: var(--surface-row-border);
  color: rgba(255,255,255,0.65);
  border: 1px solid #252525;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  text-transform: none;
}

.ec-chip--suggest {
  padding: 3px 10px;
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0;
  text-transform: none;
  font-weight: var(--fw-regular);
}

.ec-chip--emotion {
  padding: 2px 10px;
  background: var(--surface-row-border);
  color: rgba(255,255,255,0.65);
  border: 1px solid #252525;
}

.ec-chip--tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(168,85,247,0.08);
  color: rgba(168,85,247,0.65);
  border: 1px solid rgba(168,85,247,0.15);
}

.ec-chip--tag.soft {
  background: rgba(168,85,247,0.04);
  color: rgba(168,85,247,0.45);
  border-color: rgba(168,85,247,0.1);
  text-transform: none;
  letter-spacing: 0;
}

.ec-chip--badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #151515;
  color: rgba(255,255,255,0.3);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

.ec-chip-remove {
  margin-left: 4px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
}

.ec-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
  align-items: center;
}

.ec-confidence {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  padding-top: 6px;
}

.ec-confidence-track {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface-row-border);
}

.ec-confidence-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.25);
  opacity: 0.6;
}

.ec-confidence-pct {
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255,255,255,0.2);
}

.ec-subcard {
  background: #0d0d0d;
  border: 1px solid var(--surface-row-border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  width: 100%;
  max-width: 240px;
}

.ec-subcard-text {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,0.4);
}

.ec-mood-matrix {
  position: relative;
  width: 200px;
  height: 200px;
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
}

.ec-mood-matrix .axis-v {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.06);
}

.ec-mood-matrix .axis-h {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.ec-mood-matrix .corner {
  position: absolute;
  font: 8px/1 'Inter', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
}

.ec-mood-matrix .corner.tl { top: 8px; left: 10px; }

.ec-mood-matrix .corner.tr { top: 8px; right: 10px; }

.ec-mood-matrix .corner.bl { bottom: 8px; left: 10px; }

.ec-mood-matrix .corner.br { bottom: 8px; right: 10px; }

.ec-mood-matrix .dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px var(--success), 0 0 32px rgba(34,197,94,0.55);
  transform: translate(-50%, -50%);
}

.ec-mood-matrix .ping {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34,197,94,0.18);
  transform: translate(-50%, -50%);
  animation: ec-mood-ping 2s ease-out infinite;
}

@keyframes ec-mood-ping {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.6; }
  75%, 100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.ec-mood-quadrant {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--success);
}

.ec-mood-readout {
  display: flex;
  gap: 14px;
  font: 10px/1 ui-monospace, SFMono-Regular, monospace;
  color: rgba(255,255,255,0.55);
}

.ec-mood-readout .lab {
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-right: 6px;
}

.ec-suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ec-suggest-label {
  font: 9px/1 'Inter', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  padding-bottom: 4px;
}

.ec-trigger-edit {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  text-align: center;
  max-width: 240px;
}

.ec-body-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-row-border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-body-row .icon {
  font-size: 16px;
  line-height: 1.1;
  flex-shrink: 0;
}

.ec-body-row .body-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ec-body-row .body-meta .lab {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ec-body-row .body-meta .val {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.35;
}

.ec-body-row--physical .lab  { color: rgba(96,165,250,0.5);  }

.ec-body-row--sleep .lab     { color: rgba(167,139,250,0.5); }

.ec-body-row--substance .lab { color: rgba(248,113,113,0.5); }

.ec-food-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-food-header .meal {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  text-transform: capitalize;
}

.ec-food-header .total {
  font: 300 20px/1 ui-monospace, SFMono-Regular, monospace;
  color: var(--warning);
}

.ec-food-header .total .unit {
  font-size: 10px;
  margin-left: 2px;
  color: rgba(255,255,255,0.25);
}

.ec-food-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-food-row .name {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-transform: capitalize;
}

.ec-food-row .bar-track {
  flex: 0 0 60px;
  height: 5px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface-row-border);
}

.ec-food-row .bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--warning);
  opacity: 0.5;
}

.ec-food-row .cal {
  font: 11px/1 ui-monospace, SFMono-Regular, monospace;
  color: rgba(255,255,255,0.45);
  width: 32px;
  text-align: right;
}

.ec-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-row-border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-activity-row .emoji {
  font-size: 18px;
  line-height: 1.1;
  flex-shrink: 0;
}

.ec-activity-row .meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.ec-activity-row .desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.35;
}

.ec-activity-row .sub {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
}

.ec-activity-row .sub .dot-sep {
  color: rgba(255,255,255,0.2);
}

.ec-prod-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a1a;
  color: rgba(255,255,255,0.45);
  font: 9px/1 ui-monospace, SFMono-Regular, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ec-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-row-border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-task-row.in-progress {
  background: rgba(59,130,246,0.05);
  border-color: rgba(59,130,246,0.15);
}

.ec-task-row.done {
  opacity: 0.45;
}

.ec-task-row .status-icon {
  font: 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  flex-shrink: 0;
  padding-top: 1px;
  color: rgba(255,255,255,0.25);
}

.ec-task-row.in-progress .status-icon { color: var(--info); }

.ec-task-row.done        .status-icon { color: var(--success); }

.ec-task-row .task-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ec-task-row .task-content {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.35;
}

.ec-task-row.done .task-content {
  color: rgba(255,255,255,0.35);
  text-decoration: line-through;
}

.ec-task-row .task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 9px;
  color: rgba(255,255,255,0.4);
}

.ec-counter-line {
  display: flex;
  justify-content: flex-end;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255,255,255,0.2);
  width: 100%;
  max-width: 240px;
}

.ec-reflection-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 240px;
  padding: 16px 12px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(168,85,247,0.04);
  border: 1px solid rgba(168,85,247,0.18);
}

.ec-reflection-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
}

.ec-reflection-orb--purple {
  width: 110px; height: 110px;
  top: -30px; right: -30px;
  background: radial-gradient(circle, rgba(168,85,247,0.5) 0%, transparent 70%);
}

.ec-reflection-orb--pink {
  width: 80px; height: 80px;
  bottom: -20px; left: -20px;
  background: radial-gradient(circle, rgba(236,72,153,0.45) 0%, transparent 70%);
}

.ec-reflection-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-reflection-quote {
  font: 300 italic 13px/1.55 'Inter', system-ui, sans-serif;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 30px rgba(168,85,247,0.3);
  margin: 0;
}

.ec-reflection-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ec-reflection-source {
  font: italic 10px 'Inter', system-ui, sans-serif;
  color: rgba(255,255,255,0.22);
}

.ec-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-row-bg);
  border: 1px solid var(--surface-row-border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  width: 100%;
  max-width: 240px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ec-person-row .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ec-person-row .person-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.ec-person-row .name {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.ec-person-row .context {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.35;
}

.ec-link-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(77,226,167,0.95);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.ec-link-picker .glyph {
  font-size: 11px;
  opacity: 0.9;
}

.ec-link-picker .star,
.ec-project-picker .star {
  color: rgba(255,200,80,0.7);
  font-size: 10px;
}

.ec-project-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(245,158,11,0.95);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.ec-project-picker .glyph {
  font-size: 11px;
  opacity: 0.9;
}

.ec-project-picker .new {
  border-bottom: 1px dashed rgba(245,158,11,0.4);
  color: rgba(245,158,11,0.95);
  padding: 0 2px;
  min-width: 80px;
  display: inline-block;
}

.ec-task-row .task-relations,
.ec-person-row .person-relations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.07);
}

.ec-person-row .person-relations {
  margin-top: 4px;
  padding-top: 4px;
}

.ec-overlay-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 28px;
}

.ec-overlay-progress {
  display: flex;
  gap: 3px;
  flex: 1 1 auto;
  margin: 0 10px;
  min-width: 0;
  align-items: center;
}

.ec-overlay-progress .ec-seg {
  flex: 1 1 0;
  height: 3px;
  min-width: 6px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.ec-overlay-progress .ec-seg.accepted { background: rgba(34,197,94,0.55); }

.ec-overlay-progress .ec-seg.declined { background: rgba(239,68,68,0.45); }

.ec-overlay-progress .ec-seg.current {
  background: rgba(255,255,255,0.75);
  height: 5px;
  box-shadow: 0 0 6px rgba(255,255,255,0.25);
}

.ec-overlay-progress .ec-seg.current.accepted { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.5); }

.ec-overlay-progress .ec-seg.current.declined { background: var(--danger);  box-shadow: 0 0 6px rgba(239,68,68,0.5); }

.ec-overlay-counter {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.ec-overlay-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ec-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.4));
}

.ec-card.glow-purple {
  border-color: rgba(168,85,247,0.25);
  filter:
    drop-shadow(0 0 60px rgba(168,85,247,0.25))
    drop-shadow(0 0 0 rgba(168,85,247,0.25));
}

.ec-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.ec-card-body::-webkit-scrollbar { width: 0; }

.ec-overlay-actionbar {
  display: flex;
  gap: 10px;
  height: 56px;
  flex-shrink: 0;
}

.ec-action {
  flex: 1 1 0;
  border-radius: var(--r-md);
  border: 1px solid;
  background: transparent;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ec-decline {
  background: rgba(239,68,68,0.12);
  border-color: var(--danger);
  color: var(--danger);
}

.ec-accept {
  background: rgba(34,197,94,0.12);
  border-color: var(--success);
  color: var(--success);
}

.ec-card-body .ec-body-row,
.ec-card-body .ec-activity-row,
.ec-card-body .ec-task-row,
.ec-card-body .ec-person-row,
.ec-card-body .ec-food-row,
.ec-card-body .ec-confidence,
.ec-card-body .ec-row-add {
  max-width: 100%;
  width: 100%;
}

.ec-card-body .ec-mood-matrix {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1 / 1;
  align-self: center;
}
