:root {
  --ink: #161a22;
  --muted: #667085;
  --line: #d8e0ea;
  --soft: #f4f7fb;
  --panel: #ffffff;
  --blue: #1e3a5f;
  --blue-dark: #12243d;
  --teal: #33b8a5;
  --teal-dark: #248c7c;
  --pink: #8b5d77;
  --amber: #8f6a35;
  --sage: #e8f9f7;
  --shadow: 0 18px 48px rgba(38, 54, 71, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f7faf9 0%, #edf3f1 48%, #f6f4ef 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--blue-dark);
}

button.ghost {
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--line);
}

button.ghost:hover {
  color: #ffffff;
  border-color: var(--blue-dark);
}

button.wide {
  width: 100%;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(23, 92, 211, 0.2);
  outline-offset: 2px;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 16px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 32px rgba(38, 54, 71, 0.06), inset 0 2px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(38, 54, 71, 0.08), inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.brand-text strong {
  background: linear-gradient(135deg, #1e3a5f 0%, #33b8a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.brand-text span {
  color: #64748B;
  font-size: 0.85rem;
  font-weight: 500;
}

.domain-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e8f9f7;
  color: #248c7c;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin-bottom: 10px;
  color: #65758a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  color: #5e6b7a;
  font-size: 1.12rem;
  line-height: 1.65;
}

.result-hero,
.quick-card {
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.result-hero {
  padding: 24px;
}

.onboarding-card {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: #344054;
  font-weight: 900;
}

.result-hero span,
.story-card small,
.care-summary small,
.modal-review small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.result-hero strong {
  display: block;
  margin: 8px 0;
  color: var(--teal-dark);
  font-size: 2.65rem;
  line-height: 1;
}

.result-hero p,
.section-head p,
.story-card p,
.legal-note,
.subtle {
  color: var(--muted);
  line-height: 1.55;
}

.momentum-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(300px, 0.9fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px 24px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.momentum-copy h2 {
  margin-bottom: 6px;
}

.momentum-copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-level {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(111, 137, 168, 0.32);
  border-radius: 999px;
  background: #f3f7fc;
}

.game-level small {
  color: #5f7186;
  font-weight: 800;
}

.game-level strong {
  color: #2a5878;
  font-size: 1rem;
}

.score-ring {
  --score: 0deg;
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
    conic-gradient(#d54d4d 0deg, #eca83f 180deg, #42a56f var(--score), #e6eaf1 0);
}

.score-ring span {
  color: var(--teal-dark);
  font-size: 1.45rem;
  font-weight: 950;
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #475467;
  background: linear-gradient(180deg, #fbfcff 0%, #f5f9ff 100%);
  font-weight: 850;
}

.quest-item span {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cdd5df;
}

.quest-item.is-complete {
  color: #064e3b;
  border-color: rgba(77, 140, 131, 0.32);
  background: var(--sage);
}

.quest-item.is-complete span {
  background: #6f9f96;
  box-shadow: 0 0 0 5px rgba(77, 140, 131, 0.1);
}

.quick-card {
  padding: 24px;
  margin-bottom: 18px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head.inline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.role-grid.compact {
  margin-bottom: 0;
}

.role-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.role-choice:has(input:checked) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(77, 140, 131, 0.12);
}

.role-choice input {
  width: 18px;
  min-height: 18px;
}

.child-add {
  display: grid;
  align-content: start;
}

.add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 10px;
}

.microcopy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.scope-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.scope-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  font-weight: 700;
  cursor: pointer;
}

.scope-option:has(input:checked) {
  border-color: #73a198;
  box-shadow: inset 0 0 0 2px rgba(115, 161, 152, 0.18);
  background: #eff8f5;
}

.scope-option input {
  width: 18px;
  min-height: 18px;
}

.child-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.child-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(77, 140, 131, 0.28);
  border-radius: 999px;
  color: #315e57;
  background: var(--sage);
  font-weight: 850;
}

.child-tag button {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 999px;
  color: #315e57;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1;
}

.money-grid,
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.money-field {
  gap: 6px;
}

.money-input {
  display: grid;
  grid-template-columns: minmax(160px, 280px) auto;
  align-items: center;
  gap: 10px;
}

.money-input span {
  color: var(--muted);
  font-weight: 700;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.compact-control {
  width: 150px;
}

.children-list {
  display: grid;
  gap: 12px;
}

.child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.child-meta {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.child-meta > label {
  margin-bottom: 0;
}

.row-scope-group {
  margin-top: 0;
}

.empty-children {
  padding: 16px;
  border: 1px dashed #b9c6d5;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcff;
  line-height: 1.5;
}

.care-panel {
  align-self: start;
}

.quick-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.preset-chip {
  min-height: 54px;
  padding: 10px 12px;
  color: #456176;
  background: #f7f8f8;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.2;
}

.preset-chip:hover,
.preset-chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #557c9c, #4c8b82);
  border-color: transparent;
}

.quick-care-slider {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fbff 0%, #f4f8ff 100%);
}

.quick-care-slider label {
  margin-bottom: 10px;
}

.quick-care-slider input,
.slider-card input {
  accent-color: #42a56f;
}

.quick-care-slider input[type="range"],
.slider-card input[type="range"] {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
}

.regular-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.regular-split div {
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d9e3ef;
}

.regular-split small {
  display: block;
  color: #66788f;
  font-weight: 800;
}

.regular-split strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
  line-height: 1;
  color: #244a67;
}

.helper-callout {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px dashed #b6c8dc;
  border-radius: 8px;
  background: #f7fbff;
  color: #4d647d;
}

.care-summary,
.modal-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.care-summary div,
.modal-review div {
  padding: 16px;
  border-radius: 8px;
  background: var(--sage);
}

.care-summary strong,
.modal-review strong {
  display: block;
  margin: 5px 0;
  font-size: 1.35rem;
}

.care-bar {
  overflow: hidden;
  height: 16px;
  margin: 18px 0;
  border-radius: 999px;
  background: #e6e9ef;
}

.care-bar div {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #7aa99f, #7e9bb6);
}

.money-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.story-card {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.story-card.primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #527f78, #416b8f);
}

.story-card.quiet {
  background: #f7f8f8;
}

.story-card.primary small,
.story-card.primary p {
  color: rgba(255, 255, 255, 0.86);
}

.story-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 2rem;
  line-height: 1;
}

.child-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.direction-breakdown {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.direction-breakdown h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.child-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.child-result-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.child-result-card strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: 1.45rem;
}

.legal-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fff8ed;
  color: #73430b;
}

/* --- Percentage Table --- */
.table-panel {
  margin-top: 24px;
}

.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.percentage-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.percentage-table th,
.percentage-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.percentage-table th {
  background: #f4f7fb;
  color: #344054;
  font-weight: 800;
  font-size: 0.92rem;
}

.percentage-table td {
  color: #475467;
  font-size: 0.95rem;
}

.percentage-table tbody tr:last-child td {
  border-bottom: none;
}

.percentage-table tbody tr:hover td {
  background: #fbfcff;
}

.percentage-table td:first-child {
  font-weight: 700;
  color: #31638f;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.icon-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--ink);
  background: #eef2f7;
  font-size: 1.5rem;
}

.modal-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.step-dot {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 130px;
  min-height: 52px;
  padding: 8px 10px;
  color: var(--blue);
  background: #eef3ff;
  border: 1px solid #d8e3f0;
}

.step-dot span {
  font-weight: 900;
}

.step-dot small {
  color: #5a7390;
  font-size: 0.72rem;
  font-weight: 800;
}

.step-dot.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #4f7b9f, #508a83);
  border-color: transparent;
}

.step-dot.is-active small {
  color: rgba(255, 255, 255, 0.88);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.slider-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f2fbf9 0%, #eef7ff 100%);
}

.holiday-list {
  display: grid;
  gap: 12px;
}

.holiday-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 120px 120px minmax(150px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.holiday-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.boost-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: min(340px, calc(100% - 44px));
  padding: 16px 18px;
  border: 1px solid rgba(77, 140, 131, 0.26);
  border-radius: 8px;
  color: #315e57;
  background: #f0f7f4;
  box-shadow: 0 14px 38px rgba(38, 54, 71, 0.14);
  animation: boost-in 260ms ease-out;
}

.boost-toast[hidden] {
  display: none;
}

.boost-toast strong {
  font-size: 1rem;
}

.boost-toast span {
  color: #4c716b;
  line-height: 1.4;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -18px;
  width: 7px;
  height: 9px;
  border-radius: 999px;
  opacity: 0.55;
  animation: confetti-fall 820ms ease-out forwards;
}

.pulse-win {
  animation: pulse-win 720ms ease-out;
}

@keyframes boost-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confetti-fall {
  to {
    opacity: 0;
    transform: translate(var(--drift), 105vh) rotate(540deg);
  }
}

@keyframes pulse-win {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
  35% {
    transform: scale(1.01);
    box-shadow: 0 20px 54px rgba(77, 140, 131, 0.14);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
}

/* --- Feedback Widget --- */
.feedback-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.feedback-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(30, 58, 95, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.feedback-button:hover {
  transform: scale(1.05);
  background: var(--teal-dark);
}

.feedback-button svg {
  width: 28px;
  height: 28px;
}

.feedback-popover {
  width: 320px;
  max-width: calc(100vw - 48px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(30, 58, 95, 0.15);
  overflow: hidden;
  transform-origin: bottom right;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.feedback-popover[hidden] {
  display: none;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.feedback-header strong {
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 800;
}

.feedback-header .icon-button {
  width: 32px;
  min-height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  background: transparent;
  color: var(--muted);
}

.feedback-header .icon-button:hover {
  background: #e6edf4;
  color: var(--ink);
}

.feedback-body {
  padding: 20px 16px;
}

.feedback-body p {
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475467;
}

#feedbackForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#feedbackForm textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

#feedbackForm input[type="email"] {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

#feedbackForm textarea:focus,
#feedbackForm input[type="email"]:focus {
  outline: 2px solid rgba(51, 184, 165, 0.4);
  border-color: var(--teal);
}

.feedback-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.feedback-submit:hover {
  background: var(--teal-dark);
}

#feedbackSuccess {
  margin-top: 10px;
  padding: 12px;
  background: var(--sage);
  color: var(--teal-dark);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .boost-toast,
  .confetti-piece,
  .pulse-win {
    animation: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .dashboard,
  .money-story,
  .momentum-card {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 96px;
  }

  .child-results {
    grid-template-columns: 1fr;
  }

  .child-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .quick-card,
  .modal,
  .onboarding-card {
    padding: 18px;
  }

  .start-grid,
  .add-row,
  .role-grid,
  .scope-group,
  .money-grid,
  .two-col,
  .quick-presets,
  .care-summary,
  .modal-review,
  .regular-split,
  .child-row,
  .holiday-row,
  .quest-list {
    grid-template-columns: 1fr;
  }

  .child-meta {
    grid-template-columns: 1fr;
  }

  .money-input {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .section-head.inline,
  .modal-actions {
    display: grid;
  }

  .compact-control {
    width: 100%;
  }
}

/* --- Blog Preview Panel --- */
.blog-preview-panel {
  margin-top: 24px;
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .blog-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.preview-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--soft, #f4f7fb);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--line);
}

.preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.preview-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.preview-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--blue);
  line-height: 1.4;
}

/* --- Print Styles --- */
@media print {
  .no-print, .feedback-widget, .nav-blog-link, .modal-overlay {
    display: none !important;
  }
  body, .app-shell, .brand-header, .quick-card, .result-hero, .hero {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .result-hero {
    border: 2px solid #000 !important;
    padding: 20px !important;
    margin-top: 20px !important;
    border-radius: 12px !important;
  }
  #mainAmount {
    color: #000 !important;
  }
  .app-shell {
    max-width: 100% !important;
  }
  input, select {
    border: 1px solid #ccc !important;
    background: transparent !important;
  }
}
