/* Furusato Plan Core: functional UI shared by all plugin shortcodes. */
:root {
  --fp-bg: #fff9f2;
  --fp-text: #25334a;
  --fp-main: #23765b;
  --fp-main-dark: #185a45;
  --fp-cta: #e96f51;
  --fp-cta-dark: #c9533b;
  --fp-soft: #f1f6f3;
  --fp-warning: #fff4d8;
  --fp-error: #c94a45;
  --fp-white: #fff;
  --fp-border: #cbd8d2;
  --fp-muted: #5b6678;
  --fp-focus: #0b63ce;
  --fp-shadow: 0 12px 32px rgb(37 51 74 / 9%);
  --fp-radius: 16px;
  --fp-radius-small: 10px;
  --fp-content: 1200px;
  --fp-reading: 760px;
}

.fp-app,
.fp-app *,
.fp-app *::before,
.fp-app *::after {
  box-sizing: border-box;
}

.fp-app {
  color: var(--fp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.fp-app :where(button, input, select, textarea) {
  color: inherit;
  font: inherit;
}

.fp-app :where(button, a, input, select, summary):focus-visible {
  outline: 3px solid var(--fp-focus);
  outline-offset: 3px;
}

.fp-app [hidden] {
  display: none !important;
}

.fp-shell {
  width: min(100%, var(--fp-content));
  margin-inline: auto;
  padding: clamp(24px, 5vw, 64px) 16px;
}

.fp-shell__head {
  max-width: var(--fp-reading);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.fp-shell__head h2,
.fp-result h3,
.fp-empty h3 {
  margin: 0 0 12px;
  color: var(--fp-text);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
}

.fp-shell__head > p:last-child {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.fp-eyebrow {
  margin: 0 0 8px;
  color: var(--fp-main-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fp-live {
  min-height: 1px;
  margin-bottom: 16px;
  border-radius: var(--fp-radius-small);
}

.fp-live:not(:empty) {
  padding: 12px 16px;
  background: var(--fp-soft);
  color: var(--fp-main-dark);
  font-weight: 600;
}

.fp-live.fp-notice--error,
.fp-notice--error {
  padding: 16px;
  border: 1px solid var(--fp-error);
  background: #fff5f4;
  color: #862d2a;
}

.fp-demo-banner {
  position: sticky;
  z-index: 4;
  top: 8px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 2px solid #876400;
  border-radius: var(--fp-radius-small);
  background: var(--fp-warning);
  color: #523d00;
  font-weight: 800;
  text-align: center;
}

.fp-form,
.fp-filter,
.fp-plan-summary,
.fp-result,
.fp-empty {
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  background: var(--fp-white);
  box-shadow: var(--fp-shadow);
}

.fp-form,
.fp-plan-summary,
.fp-result {
  padding: clamp(20px, 4vw, 40px);
}

.fp-form > * + *,
.fp-result > * + *,
.fp-plan-summary > * + * {
  margin-top: 28px;
}

.fp-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fp-form legend {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  font-size: clamp(1.05rem, 2.3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.5;
}

.fp-question {
  scroll-margin-top: 20px;
}

.fp-question legend span {
  display: block;
  margin-bottom: 4px;
  color: var(--fp-main);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

.fp-mode__grid,
.fp-choice-grid,
.fp-fields-grid {
  display: grid;
  gap: 12px;
}

.fp-mode__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fp-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fp-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
}

.fp-mode-card,
.fp-choice {
  position: relative;
  display: flex;
  min-height: 56px;
  cursor: pointer;
}

.fp-mode-card input,
.fp-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.fp-mode-card > span,
.fp-choice > span {
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 2px solid var(--fp-border);
  border-radius: 12px;
  background: var(--fp-white);
  align-items: center;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.fp-mode-card > span {
  flex-direction: column;
  align-items: flex-start;
}

.fp-mode-card small {
  display: block;
  margin-top: 4px;
  color: var(--fp-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fp-mode-card input:checked + span,
.fp-choice input:checked + span {
  border-color: var(--fp-main);
  background: var(--fp-soft);
  box-shadow: 0 0 0 1px var(--fp-main);
}

.fp-mode-card input:focus-visible + span,
.fp-choice input:focus-visible + span {
  outline: 3px solid var(--fp-focus);
  outline-offset: 3px;
}

.fp-choice input[type="checkbox"] + span::before {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border: 2px solid var(--fp-muted);
  border-radius: 5px;
  content: "";
  flex: 0 0 auto;
}

.fp-choice input[type="checkbox"]:checked + span::before {
  border-color: var(--fp-main);
  background: var(--fp-main);
  box-shadow: inset 0 0 0 4px var(--fp-white);
}

.fp-field {
  min-width: 0;
}

.fp-field > label,
.fp-filter label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.fp-required {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fbe1dc;
  color: #8d2c24;
  font-size: 0.75rem;
  vertical-align: 2px;
}

.fp-field input,
.fp-field select,
.fp-filter input,
.fp-filter select {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #8b9a94;
  border-radius: 10px;
  background: var(--fp-white);
}

.fp-field input[aria-invalid="true"],
.fp-field select[aria-invalid="true"] {
  border: 2px solid var(--fp-error);
  background: #fff8f7;
}

.fp-money {
  position: relative;
}

.fp-money input {
  padding-right: 48px;
  text-align: right;
}

.fp-money > span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--fp-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.fp-help,
.fp-privacy,
.fp-disclaimer,
.fp-verified,
.fp-data-count,
.fp-ranking-audit {
  color: var(--fp-muted);
  font-size: 0.875rem;
}

.fp-help {
  margin: 0 0 8px;
}

.fp-field-error {
  margin: 6px 0 0;
  color: var(--fp-error);
  font-size: 0.875rem;
  font-weight: 700;
}

.fp-button {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.fp-button--primary {
  border-color: var(--fp-cta);
  background: var(--fp-cta);
  color: #211b19;
}

.fp-button--primary:hover {
  border-color: var(--fp-cta-dark);
  background: var(--fp-cta-dark);
  color: var(--fp-white);
}

.fp-button--secondary {
  border-color: var(--fp-main);
  background: var(--fp-white);
  color: var(--fp-main-dark);
}

.fp-button--secondary:hover {
  background: var(--fp-soft);
}

.fp-button--danger {
  border-color: var(--fp-error);
  background: var(--fp-white);
  color: #862d2a;
}

.fp-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.fp-link-button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--fp-error);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fp-details {
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius-small);
  background: var(--fp-soft);
}

.fp-details summary {
  min-height: 52px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 700;
}

.fp-details > :not(summary) {
  margin-inline: 16px;
}

.fp-details > :last-child {
  margin-bottom: 16px;
}

.fp-result,
.fp-empty {
  margin-top: 32px;
  scroll-margin-top: 20px;
}

.fp-result--blocked {
  border-color: var(--fp-error);
  background: #fff8f7;
}

.fp-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  background: var(--fp-border);
}

.fp-result-grid > div {
  padding: 16px;
  background: var(--fp-white);
}

.fp-result-grid dt {
  color: var(--fp-muted);
  font-size: 0.8125rem;
}

.fp-result-grid dd {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.35;
}

.fp-result-grid__safe {
  background: var(--fp-soft) !important;
  color: var(--fp-main-dark);
}

/* The simulation summary has five values. Let the final value span both
 * desktop columns so the implicit sixth grid cell cannot read as an empty
 * result card. Other result grids (for example My Plan's six values) keep
 * their regular two-column layout. */
[data-fp-simulation-result] .fp-result-grid > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.fp-policy,
.fp-warning-list {
  padding: 16px;
  border-radius: 12px;
  background: var(--fp-warning);
}

.fp-policy p,
.fp-warning-list ul {
  margin: 6px 0 0;
}

.fp-warning-list__error {
  color: #862d2a;
  font-weight: 700;
}

.fp-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.fp-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fp-home-card {
  display: flex;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  background: var(--fp-white);
  box-shadow: var(--fp-shadow);
  color: var(--fp-text);
  flex-direction: column;
  text-decoration: none;
}

.fp-home-card:hover {
  border-color: var(--fp-main);
  background: var(--fp-soft);
}

.fp-home-card > span {
  color: var(--fp-main);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fp-home-card strong {
  margin-top: 14px;
  font-size: 1.15rem;
}

.fp-home-card small {
  margin-top: 8px;
  color: var(--fp-muted);
  font-size: 0.875rem;
}

.fp-home-plan {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--fp-radius);
  background: var(--fp-soft);
}

.fp-home-plan h3 {
  margin-top: 0;
}

.fp-home-plan dl {
  display: flex;
  gap: 20px 40px;
  flex-wrap: wrap;
}

.fp-home-plan dd {
  margin: 2px 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.fp-home-plan > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.fp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fp-actions .fp-button {
  flex: 1 1 180px;
}

.fp-actions .fp-affiliate-cta {
  display: inline-flex;
  flex: 1 1 220px;
  margin: 0;
  gap: 8px;
  align-items: center;
}

.fp-actions .fp-affiliate-cta .fp-button {
  flex: 1 1 auto;
}

.fp-actions .fp-affiliate-cta .fp-pr-label {
  display: inline-grid;
  min-width: 36px;
  min-height: 28px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: var(--fp-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  place-items: center;
}

.fp-plan-card {
  padding: 20px;
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  background: var(--fp-white);
}

.fp-plan-card__label {
  color: var(--fp-main);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fp-plan-card h4 {
  min-height: 3.4em;
  margin: 6px 0 16px;
  line-height: 1.5;
}

.fp-plan-card dl {
  display: grid;
  margin: 0;
  gap: 8px;
}

.fp-plan-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fp-plan-card dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.fp-plan-items,
.fp-saved-list,
.fp-ranking-list {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.fp-plan-items li {
  padding-block: 14px;
  border-top: 1px solid var(--fp-border);
}

.fp-plan-items span {
  display: block;
  margin-block: 3px 10px;
  color: var(--fp-muted);
  font-size: 0.875rem;
}

.fp-status {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 700;
}

.fp-status--ok {
  background: var(--fp-soft);
  color: var(--fp-main-dark);
}

.fp-status--warning {
  background: var(--fp-warning);
  color: #6c4d00;
}

.fp-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 20px;
  gap: 14px;
  align-items: end;
}

.fp-filter .fp-field,
.fp-filter .fp-button {
  margin: 0;
}

.fp-check {
  display: flex !important;
  min-height: 44px;
  margin: 0;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.fp-check input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.fp-ranking-list {
  counter-reset: rank;
}

.fp-ranking-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  background: var(--fp-white);
  box-shadow: var(--fp-shadow);
}

.fp-rank {
  display: flex;
  background: var(--fp-soft);
  color: var(--fp-main-dark);
  align-items: flex-start;
  justify-content: center;
}

.fp-rank span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-top: 20px;
  border-radius: 50%;
  background: var(--fp-main);
  color: var(--fp-white);
  font-size: 1.15rem;
  font-weight: 800;
  place-items: center;
}

.fp-ranking-card__body {
  padding: 20px;
}

.fp-ranking-card__body h4 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.fp-ranking-card__body dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  gap: 10px;
}

.fp-ranking-card__body dl > div {
  padding: 10px;
  border-radius: 8px;
  background: var(--fp-soft);
}

.fp-ranking-card__body dt {
  color: var(--fp-muted);
  font-size: 0.75rem;
}

.fp-ranking-card__body dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.fp-tabs {
  display: flex;
  margin-bottom: 28px;
  gap: 8px;
  flex-wrap: wrap;
}

.fp-tabs button {
  min-height: 52px;
  padding: 10px 18px;
  border: 2px solid var(--fp-main);
  border-radius: 999px;
  background: var(--fp-white);
  color: var(--fp-main-dark);
  cursor: pointer;
  font-weight: 700;
}

.fp-tabs button[aria-selected="true"] {
  background: var(--fp-main);
  color: var(--fp-white);
}

.fp-view-options {
  display: flex;
  margin-block: 18px;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.fp-view-options label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.fp-view-options input {
  width: 20px;
  height: 20px;
}

.fp-compare {
  display: grid;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--fp-border);
  border-radius: var(--fp-radius);
  background: var(--fp-white);
}

.fp-compare__names,
.fp-compare__row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) repeat(3, minmax(160px, 1fr));
}

.fp-compare__names strong,
.fp-compare__row > * {
  margin: 0;
  padding: 13px;
  border-right: 1px solid var(--fp-border);
  border-bottom: 1px solid var(--fp-border);
}

.fp-compare__names strong,
.fp-compare__row dt {
  background: var(--fp-soft);
  font-weight: 700;
}

.fp-compare__row.is-different dd {
  background: #fffdf5;
}

.fp-empty {
  padding: clamp(28px, 6vw, 64px) 20px;
  text-align: center;
}

.fp-empty__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border: 2px solid var(--fp-border);
  border-radius: 50%;
  color: var(--fp-main);
  font-size: 2rem;
  place-items: center;
}

.fp-empty-inline {
  padding: 18px;
  border-radius: 10px;
  background: var(--fp-soft);
}

.fp-saved-list li {
  display: flex;
  min-height: 64px;
  padding: 12px 0;
  border-top: 1px solid var(--fp-border);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fp-saved-list li span {
  display: inline-block;
  margin: 4px 8px 0 0;
  color: var(--fp-muted);
  font-size: 0.875rem;
}

.fp-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--fp-soft);
  color: var(--fp-main-dark) !important;
  font-weight: 700;
}

.fp-plan-meta {
  display: flex;
  gap: 16px 32px;
  flex-wrap: wrap;
}

.fp-app[aria-busy="true"] {
  cursor: progress;
}

@media (max-width: 900px) {
  .fp-mode__grid,
  .fp-plan-grid {
    grid-template-columns: 1fr;
  }

  .fp-plan-card h4 {
    min-height: 0;
  }

  .fp-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-compare__names {
    display: none;
  }

  .fp-compare__row {
    display: block;
    padding: 14px;
    border-bottom: 1px solid var(--fp-border);
  }

  .fp-compare__row dt,
  .fp-compare__row dd {
    display: grid;
    grid-template-columns: minmax(110px, 0.45fr) 1fr;
    padding: 8px;
    border: 0;
  }

  .fp-compare__row dt {
    margin: -14px -14px 8px;
    padding: 12px 14px;
  }

  .fp-compare__row dd::before {
    color: var(--fp-muted);
    content: attr(data-label);
    font-size: 0.8125rem;
    font-weight: 700;
  }
}

@media (max-width: 640px) {
  .fp-shell {
    padding-inline: 16px;
  }

  .fp-form,
  .fp-result,
  .fp-plan-summary {
    padding: 20px 16px;
  }

  .fp-choice-grid,
  .fp-fields-grid,
  .fp-result-grid,
  .fp-filter,
  .fp-ranking-card__body dl {
    grid-template-columns: 1fr;
  }

  .fp-home-grid {
    grid-template-columns: 1fr;
  }

  .fp-button {
    width: 100%;
  }

  .fp-actions .fp-affiliate-cta {
    width: 100%;
  }

  .fp-ranking-card {
    grid-template-columns: 48px 1fr;
  }

  .fp-rank span {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .fp-ranking-card__body {
    padding: 16px 12px;
  }

  .fp-tabs button {
    width: 100%;
  }

  .fp-view-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fp-saved-list li {
    align-items: flex-start;
  }

  .fp-plan-meta {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fp-app *,
  .fp-app *::before,
  .fp-app *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .fp-mode-card input:checked + span,
  .fp-choice input:checked + span,
  .fp-tabs button[aria-selected="true"] {
    border: 3px solid CanvasText;
  }
}

/* --------------------------------------------------------------------------
 * Visual refresh 2026: align the application with the theme design system.
 * -------------------------------------------------------------------------- */
:root {
  --fp-bg: var(--furu-color-canvas, #fffaf4);
  --fp-text: var(--furu-color-text, #25334a);
  --fp-main: var(--furu-color-primary, #23765b);
  --fp-main-dark: var(--furu-color-primary-dark, #185640);
  --fp-cta: var(--furu-color-cta, #e96f51);
  --fp-cta-dark: #c9533b;
  --fp-soft: var(--furu-color-primary-soft, #e8f3ee);
  --fp-warning: var(--furu-color-notice, #fff4d8);
  --fp-border: var(--furu-color-line-soft, #e2e9e5);
  --fp-muted: var(--furu-color-muted, #5d6878);
  --fp-shadow: var(--furu-shadow-card, 0 18px 48px rgb(27 63 52 / 11%));
  --fp-radius: 20px;
  --fp-radius-small: 12px;
}

.fp-app {
  font-weight: 450;
}

.fp-shell {
  padding-block: clamp(28px, 5vw, 52px);
}

.fp-shell__head {
  position: relative;
  max-width: 820px;
  margin-bottom: clamp(24px, 4vw, 36px);
  padding-left: 20px;
}

.fp-shell__head::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 5px;
  border-radius: 99px;
  background: var(--fp-cta);
  content: "";
}

.fp-shell__head h2,
.fp-result h3,
.fp-empty h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

.fp-shell__head > p:last-child {
  color: var(--fp-muted);
  line-height: 1.8;
}

.fp-eyebrow {
  color: var(--fp-main-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.fp-demo-banner {
  position: static;
  top: auto;
  margin-bottom: 24px;
  padding: 10px 14px;
  border: 1px solid #d6b65a;
  border-radius: 12px;
  background: #fff8df;
  color: #654b00;
  font-size: 0.82rem;
  font-weight: 750;
  box-shadow: none;
}

.fp-demo-banner::before {
  margin-right: 0.45rem;
  content: "●";
  color: #d49a00;
  font-size: 0.68rem;
}

.fp-form,
.fp-filter,
.fp-plan-summary,
.fp-result,
.fp-empty {
  border-color: var(--fp-border);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgb(27 63 52 / 8%);
}

.fp-form,
.fp-plan-summary,
.fp-result {
  padding: clamp(22px, 4vw, 38px);
}

.fp-form > * + *,
.fp-result > * + *,
.fp-plan-summary > * + * {
  margin-top: 32px;
}

.fp-form fieldset + fieldset {
  padding-top: 30px;
  border-top: 1px solid var(--fp-border);
}

.fp-form legend {
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fp-question legend span {
  width: max-content;
  margin-bottom: 8px;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--fp-soft);
  color: var(--fp-main-dark);
  font-size: 0.7rem;
  font-weight: 800;
}

.fp-mode__grid,
.fp-choice-grid,
.fp-fields-grid {
  gap: 12px;
}

.fp-mode-card > span,
.fp-choice > span {
  min-height: 60px;
  padding: 14px 16px;
  border: 1px solid #cbd8d2;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgb(37 51 74 / 4%);
  font-weight: 650;
}

.fp-mode-card > span:hover,
.fp-choice > span:hover {
  border-color: var(--fp-main);
  background: #fbfdfc;
}

.fp-mode-card input:checked + span,
.fp-choice input:checked + span {
  border-color: var(--fp-main);
  background: var(--fp-soft);
  box-shadow: 0 0 0 1px var(--fp-main), 0 8px 20px rgb(35 118 91 / 9%);
}

.fp-field > label,
.fp-filter label {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.fp-field input,
.fp-field select,
.fp-filter input,
.fp-filter select {
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid #9cacA5;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgb(37 51 74 / 4%);
}

.fp-field input:focus,
.fp-field select:focus,
.fp-filter input:focus,
.fp-filter select:focus {
  border-color: var(--fp-main);
  box-shadow: 0 0 0 4px rgb(35 118 91 / 12%);
  outline: 0;
}

.fp-help,
.fp-privacy,
.fp-disclaimer,
.fp-verified,
.fp-data-count,
.fp-ranking-audit {
  color: var(--fp-muted);
  line-height: 1.7;
}

.fp-button {
  min-height: 54px;
  border-radius: 14px;
  font-weight: 750;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.fp-button--primary {
  border-color: var(--fp-cta);
  background: var(--fp-cta);
  color: #2a211f;
  box-shadow: 0 10px 24px rgb(201 83 59 / 20%);
}

.fp-button--primary:hover {
  border-color: var(--fp-cta-dark);
  background: var(--fp-cta-dark);
  box-shadow: 0 13px 28px rgb(201 83 59 / 26%);
  color: var(--fp-white);
  transform: translateY(-2px);
}

.fp-button--secondary {
  border-color: rgb(35 118 91 / 55%);
  background: #fff;
}

.fp-button--secondary:hover {
  background: var(--fp-soft);
  transform: translateY(-1px);
}

.fp-details {
  border-color: var(--fp-border);
  border-radius: 14px;
  background: #f7faf8;
}

.fp-result,
.fp-empty {
  margin-top: 36px;
}

.fp-result-grid {
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fp-result-grid > div {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--fp-border);
  border-radius: 15px;
  background: #fafcfb;
}

.fp-result-grid dt {
  margin-bottom: 6px;
  color: var(--fp-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.fp-result-grid dd {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}

.fp-result-grid__safe {
  position: relative;
  overflow: hidden;
  border-color: rgb(35 118 91 / 30%) !important;
  background: linear-gradient(135deg, #e7f3ed, #f7fbf9) !important;
  color: var(--fp-main-dark);
}

.fp-result-grid__safe::after {
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 110px;
  height: 110px;
  border: 16px solid rgb(35 118 91 / 7%);
  border-radius: 50%;
  content: "";
}

.fp-policy,
.fp-warning-list {
  padding: 18px;
  border: 1px solid #ecd89f;
  border-radius: 14px;
  background: #fff9e9;
}

.fp-plan-grid {
  gap: 18px;
}

.fp-plan-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-color: var(--fp-border);
  border-radius: 19px;
  box-shadow: 0 8px 28px rgb(27 63 52 / 7%);
}

.fp-plan-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--fp-main);
  content: "";
}

.fp-plan-card:nth-child(2)::before {
  background: var(--fp-cta);
}

.fp-plan-card:nth-child(3)::before {
  background: #d9a62b;
}

.fp-plan-card__label {
  margin-top: 4px;
  font-size: 0.74rem;
}

.fp-plan-card h4 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.fp-home-plan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 32px);
  margin-top: 0;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgb(35 118 91 / 18%);
  border-radius: 22px;
  background: linear-gradient(135deg, #eaf4ef, #f8fbf9);
}

.fp-home-plan__icon {
  display: grid;
  width: clamp(56px, 8vw, 76px);
  height: clamp(56px, 8vw, 76px);
  border-radius: 22px;
  background: var(--fp-main);
  box-shadow: 0 12px 30px rgb(35 118 91 / 20%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  place-items: center;
}

.fp-home-plan h3 {
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.fp-home-plan__body > p:not(.fp-eyebrow) {
  max-width: 650px;
  color: var(--fp-muted);
}

.fp-home-plan dl {
  margin-block: 18px;
}

.fp-home-plan > a,
.fp-home-plan__body > a {
  width: max-content;
  text-decoration: none;
}

.fp-filter {
  padding: 18px;
  border-color: var(--fp-border);
  background: #f7faf8;
  box-shadow: none;
}

.fp-ranking-card {
  grid-template-columns: 78px 172px minmax(0, 1fr);
  margin-top: 18px;
  border-color: var(--fp-border);
  border-radius: 20px;
  box-shadow: 0 9px 30px rgb(27 63 52 / 8%);
}

.fp-ranking-card:first-child {
  border-color: rgb(217 166 43 / 42%);
  box-shadow: 0 14px 38px rgb(147 106 8 / 11%);
}

.fp-rank {
  background: linear-gradient(180deg, #edf6f2, #f8fbf9);
}

.fp-ranking-card:first-child .fp-rank {
  background: linear-gradient(180deg, #fff1bd, #fff9e6);
}

.fp-rank span {
  width: 46px;
  height: 46px;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgb(35 118 91 / 15%);
}

.fp-ranking-card:first-child .fp-rank span {
  background: #d3a126;
}

.fp-gift-visual {
  display: grid;
  min-height: 100%;
  padding: 18px;
  background:
    radial-gradient(circle at 80% 18%, rgb(255 255 255 / 72%) 0 24px, transparent 25px),
    linear-gradient(145deg, #dcefe5, #f4f9f6);
  color: var(--fp-main-dark);
  place-content: center;
  text-align: center;
}

.fp-gift-visual__icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin-inline: auto;
  border: 1px solid rgb(35 118 91 / 20%);
  border-radius: 24px 24px 24px 8px;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 12px 24px rgb(35 118 91 / 10%);
  font-size: 1.65rem;
  font-weight: 800;
  place-items: center;
}

.fp-gift-visual__icon svg {
  display: block;
  width: 46px;
  height: 46px;
}

.fp-gift-visual small {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 750;
}

.fp-gift-visual--beef,
.fp-gift-visual--pork_chicken {
  background: linear-gradient(145deg, #f9ded7, #fff4ef);
  color: #98412f;
}

.fp-gift-visual--seafood {
  background: linear-gradient(145deg, #dcecf2, #f3f9fb);
  color: #285f75;
}

.fp-gift-visual--fruit,
.fp-gift-visual--sweets {
  background: linear-gradient(145deg, #fff0cd, #fff9ea);
  color: #89630a;
}

.fp-gift-visual--daily_goods,
.fp-gift-visual--appliances {
  background: linear-gradient(145deg, #e6e5f3, #f7f6fb);
  color: #58517f;
}

.fp-gift-visual--health {
  background: linear-gradient(145deg, #dff1e8, #f4fbf7);
  color: #287359;
}

.fp-gift-visual--beauty {
  background: linear-gradient(145deg, #f7e2ed, #fff6fa);
  color: #8d4567;
}

.fp-ranking-card__body {
  padding: 24px;
}

.fp-ranking-card__body h4 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.fp-ranking-card__body dl {
  gap: 8px;
}

.fp-ranking-card__body dl > div {
  padding: 11px;
  border: 1px solid #edf1ef;
  border-radius: 10px;
  background: #f8faf9;
}

.fp-tabs {
  width: max-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  background: #f2f6f4;
}

.fp-tabs button {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.fp-tabs button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 4px 15px rgb(27 63 52 / 10%);
  color: var(--fp-main-dark);
}

.fp-compare {
  border-color: var(--fp-border);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgb(27 63 52 / 7%);
}

.fp-compare__names strong,
.fp-compare__row dt {
  background: #edf5f1;
}

.fp-empty {
  background: linear-gradient(145deg, #fff, #f8fbf9);
}

.fp-empty__icon {
  border: 0;
  background: var(--fp-soft);
}

.fp-live:not(:empty) {
  border: 1px solid rgb(35 118 91 / 18%);
}

@media (max-width: 900px) {
  .fp-ranking-card {
    grid-template-columns: 64px 1fr;
  }

  .fp-gift-visual {
    grid-column: 2;
    min-height: 168px;
    border-top-right-radius: 20px;
  }

  .fp-ranking-card__body {
    grid-column: 1 / -1;
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .fp-shell {
    padding-inline: 16px;
  }

  .fp-shell__head {
    padding-left: 15px;
  }

  .fp-form,
  .fp-result,
  .fp-plan-summary {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .fp-result-grid {
    gap: 8px;
  }

  .fp-result-grid > div {
    min-height: 96px;
    padding: 15px;
  }

  .fp-home-plan {
    grid-template-columns: 1fr;
  }

  .fp-home-plan__icon {
    width: 56px;
    height: 56px;
    border-radius: 17px;
  }

  .fp-home-plan > a,
  .fp-home-plan__body > a {
    width: 100%;
  }

  .fp-ranking-card {
    grid-template-columns: 48px 1fr;
    border-radius: 16px;
  }

  .fp-gift-visual {
    min-height: 142px;
    border-top-right-radius: 16px;
  }

  .fp-ranking-card__body {
    padding: 17px 13px;
  }

  .fp-ranking-card__body dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-tabs {
    display: grid;
    width: 100%;
    padding: 5px;
  }

  .fp-tabs button {
    width: 100%;
  }
}

/* Ranking tabs, evidence and portal-aware offer presentation. */
.fp-ranking-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 14px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.fp-ranking-tab {
  flex: 1 0 max-content;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.fp-ranking-tab:hover {
  transform: translateY(-1px);
}

.fp-ranking-tab:focus-visible {
  outline: 3px solid var(--fp-main);
  outline: 3px solid color-mix(in srgb, var(--fp-main) 38%, transparent);
  outline-offset: 2px;
}

.fp-ranking-filter {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.fp-ranking-filters {
  border: 1px solid var(--fp-border);
  border-radius: 14px;
  background: #f7faf8;
}

.fp-ranking-filters summary {
  padding: 14px 16px;
  color: var(--fp-main-dark);
  cursor: pointer;
  font-weight: 750;
}

.fp-ranking-filters summary span {
  margin-left: 6px;
  color: var(--fp-muted);
  font-size: .75rem;
  font-weight: 650;
}

.fp-ranking-filters[open] summary {
  border-bottom: 1px solid var(--fp-border);
}

.fp-ranking-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px;
  gap: 12px;
  align-items: end;
}

.fp-ranking-filter__actions {
  display: flex;
  grid-column: span 2;
  gap: 10px;
  justify-content: flex-end;
}

.fp-ranking-filter__actions .fp-button {
  width: auto;
  min-width: 116px;
}

.fp-ranking-panel.is-active {
  animation: fp-ranking-panel-in .2s ease both;
}

@keyframes fp-ranking-panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fp-ranking-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.fp-ranking-card:hover {
  border-color: rgb(35 118 91 / 30%);
  box-shadow: 0 14px 38px rgb(27 63 52 / 12%);
  transform: translateY(-2px);
}

.fp-ranking-card__media {
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--fp-soft);
}

.fp-ranking-card__media > .fp-gift-visual,
.fp-ranking-card__media > [data-fp-image-fallback],
.fp-ranking-card__media > [data-fp-image-fallback] > .fp-gift-visual {
  width: 100%;
  height: 100%;
}

.fp-ranking-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 214px;
  object-fit: cover;
}

.fp-ranking-card__offer {
  display: flex;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgb(35 118 91 / 18%);
  border-radius: 12px;
  background: var(--fp-soft);
  gap: 8px 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.fp-ranking-card__offer span {
  color: var(--fp-muted);
  font-size: .75rem;
}

.fp-ranking-card__offer strong {
  color: var(--fp-main-dark);
}

.fp-ranking-card__offer b {
  margin-left: auto;
  font-size: 1.05rem;
}

.fp-ranking-card__match {
  display: flex;
  margin: -4px 0 12px;
  color: var(--fp-muted);
  gap: 8px;
  align-items: center;
  font-size: .78rem;
}

.fp-ranking-card__match strong {
  padding: 3px 8px;
  border: 1px solid rgb(35 118 91 / 22%);
  border-radius: 999px;
  background: #fff;
  color: var(--fp-main-dark);
  font-size: .75rem;
}

.fp-ranking-card__body .fp-ranking-card__evidence {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 10px;
}

.fp-ranking-card__body .fp-ranking-card__evidence > div {
  background: #fffaf0;
}

.fp-ranking-card__source {
  color: var(--fp-main-dark);
  overflow-wrap: anywhere;
  text-underline-offset: 2px;
}

.fp-ranking-card__price-cell {
  grid-column: span 2;
}

.fp-ranking-card__price-equation,
.fp-ranking-card__source-links {
  display: grid;
  gap: 3px;
}

.fp-ranking-card__price-equation strong {
  color: var(--fp-main-dark);
}

.fp-ranking-card__source-links > span {
  min-width: 0;
}

.ranking-page .furusato-plan-app .fp-ranking-card__body .fp-ranking-card__evidence {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fp-ranking-card__market-note {
  margin: 12px 0 8px;
  padding: 9px 11px;
  border-left: 3px solid #d3a126;
  background: #fffaf0;
  color: var(--fp-muted);
  font-size: .8rem;
  line-height: 1.65;
}

@media (max-width: 64rem) {
  .ranking-page .furusato-plan-app .fp-ranking-card__body .fp-ranking-card__evidence {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fp-ranking-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-ranking-card__media {
    grid-column: 2;
    min-height: 168px;
  }

  .fp-ranking-card__image {
    min-height: 168px;
  }

  .fp-ranking-card__body .fp-ranking-card__evidence {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-page .furusato-plan-app .fp-ranking-card__body .fp-ranking-card__evidence {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fp-ranking-tabs {
    display: flex;
    padding: 4px;
  }

  .fp-ranking-tabs .fp-ranking-tab {
    width: auto;
    min-height: 44px;
    padding: 9px 13px;
  }

  .fp-ranking-filter-grid,
  .fp-ranking-card__body .fp-ranking-card__evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-page .furusato-plan-app .fp-ranking-card__body .fp-ranking-card__evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-ranking-filter__actions {
    grid-column: 1 / -1;
  }

  .fp-ranking-filter__actions .fp-button {
    width: 100%;
    min-width: 0;
  }

  .fp-ranking-card__media,
  .fp-ranking-card__image {
    min-height: 142px;
  }

  .fp-ranking-card__offer b {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fp-ranking-tab,
  .fp-ranking-card,
  .fp-ranking-panel.is-active {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .fp-ranking-tab[aria-selected="true"] {
    border: 3px solid CanvasText;
  }
}

/* --------------------------------------------------------------------------
 * Simulation flow: compact, progressive and touch-friendly.
 * -------------------------------------------------------------------------- */
.fp-simulation-form .fp-scope-check {
  padding: 18px;
  border: 1px solid #e5cf91;
  border-radius: 16px;
  background: #fffaf0;
}

.fp-simulation-form .fp-scope-check > legend {
  margin-bottom: 8px;
  color: var(--fp-text);
}

.fp-simulation-form .fp-scope-check .fp-help {
  margin-bottom: 14px;
}

.fp-special-case-options {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5cf91;
}

.fp-special-case-options > p {
  margin: 0 0 12px;
}

.fp-simulation-form .fp-choice-grid,
.fp-simulation-form .fp-fields-grid,
.fp-simulation-form .fp-mode__grid {
  grid-template-columns: minmax(0, 1fr);
}

.fp-scope-status:empty {
  display: none;
}

.fp-scope-status:not(:empty) {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--fp-main);
  border-radius: 8px;
  background: var(--fp-soft);
  color: var(--fp-main-dark);
  font-size: 0.875rem;
  font-weight: 700;
}

.fp-scope-status[data-state="blocked"],
.fp-scope-status.is-blocked,
.fp-scope-status--warning {
  border-left-color: var(--fp-error);
  background: #fff5f4;
  color: #862d2a;
}

.fp-mode-note {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--fp-soft);
  color: var(--fp-main-dark);
  font-size: 0.875rem;
  font-weight: 650;
}

.fp-sim-progress {
  margin: 26px 0 18px;
}

.fp-sim-progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.fp-sim-progress li {
  display: grid;
  min-width: 0;
  color: var(--fp-muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  justify-items: center;
  gap: 6px;
}

.fp-sim-progress li > span {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid #aab8b2;
  border-radius: 50%;
  background: #fff;
  color: var(--fp-muted);
  font-size: 0.8125rem;
  font-weight: 800;
  place-items: center;
}

.fp-sim-progress li[aria-current="step"] {
  color: var(--fp-main-dark);
  font-weight: 800;
}

.fp-sim-progress li[aria-current="step"] > span {
  border-color: var(--fp-main);
  background: var(--fp-main);
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fp-main) 13%, transparent);
}

.fp-sim-progress li:is(.is-complete, [data-complete="true"]) > span {
  border-color: var(--fp-main);
  background: var(--fp-soft);
  color: var(--fp-main-dark);
}

.fp-sim-step {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  background: #fff;
  scroll-margin-top: 24px;
}

.fp-sim-step > h3 {
  margin: 0 0 16px;
  color: var(--fp-text);
  font-size: clamp(1.15rem, 5vw, 1.4rem);
  line-height: 1.4;
}

.fp-sim-step > .fp-field + .fp-field,
.fp-dependent-fields,
.fp-step-actions,
.fp-submit-area,
.fp-form-tools {
  margin-top: 20px;
}

.fp-step-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: 10px;
}

.fp-step-actions .fp-button {
  width: 100%;
  min-width: 0;
  padding-inline: 12px;
}

.fp-simulation-form .fp-button--primary,
[data-fp-simulation-result] .fp-button--primary {
  color: #fff;
}

.fp-callout {
  padding: 14px 15px;
  border-left: 5px solid var(--fp-main);
  border-radius: 10px;
  background: var(--fp-soft);
  color: var(--fp-text);
}

.fp-callout strong {
  color: var(--fp-main-dark);
}

.fp-callout p {
  margin: 4px 0 0;
  font-size: 0.875rem;
}

.fp-mode-intro {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--fp-border);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fp-soft), #fff);
}

.fp-mode-intro h3 {
  margin: 0;
  color: var(--fp-main-dark);
  font-size: 1.25rem;
}

.fp-mode-intro p {
  margin: 5px 0 0;
  color: var(--fp-muted);
}

.fp-simulation-form .fp-field-group {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  background: #fff;
}

.fp-simulation-form .fp-field-group + .fp-field-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--fp-border);
}

.fp-simulation-form .fp-field-group > legend {
  margin-bottom: 8px;
  color: var(--fp-text);
}

.fp-simulation-form .fp-field-group > .fp-help {
  margin-bottom: 16px;
}

.fp-dependent-grid {
  margin-top: 14px;
}

.fp-count {
  position: relative;
}

.fp-count input {
  padding-right: 48px;
  text-align: right;
}

.fp-count > span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--fp-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.fp-money-preview {
  display: block;
  margin-top: 5px;
  color: var(--fp-main-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: right;
}

.fp-money-preview:empty {
  display: none;
}

.fp-optional-fields {
  margin-top: 20px;
}

.fp-optional-fields .fp-fields-grid {
  padding-bottom: 2px;
}

.fp-submit-area {
  padding: 18px;
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  background: #f7faf8;
}

.fp-submit-area .fp-button {
  width: 100%;
}

.fp-submit-area .fp-privacy {
  margin: 12px 0 0;
}

.fp-form-tools {
  display: flex;
  padding-top: 16px;
  border-top: 1px solid var(--fp-border);
  justify-content: center;
}

.fp-form-tools .fp-link-button,
.fp-sim-back {
  min-height: 44px;
}

.fp-sim-back {
  display: flex;
  width: fit-content;
  margin: 12px auto 0;
  align-items: center;
  justify-content: center;
}

[data-fp-simulation-result] :where(.fp-result-accuracy, .fp-accuracy) {
  display: flex;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  background: #f7faf8;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

[data-fp-simulation-result] :where(.fp-accuracy-badge, [data-fp-accuracy], .fp-accuracy > strong) {
  display: inline-flex;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--fp-main);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  align-items: center;
}

[data-fp-simulation-result] :where(.fp-result-accuracy, .fp-accuracy) :where(p, span) {
  min-width: min(100%, 20rem);
  margin: 0;
  color: var(--fp-muted);
  flex: 1 1 20rem;
}

.fp-result-heading {
  display: grid;
  gap: 14px;
}

.fp-result-heading h3 {
  margin-bottom: 0;
}

.fp-result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.fp-result-actions .fp-button,
.fp-result-actions .fp-link-button {
  width: 100%;
}

.fp-result-actions + .fp-save-note {
  margin-top: 10px;
}

.fp-save-note {
  color: var(--fp-muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.fp-result--blocked > .fp-button {
  width: 100%;
}

@media (min-width: 48rem) {
  .fp-simulation-form .fp-mode__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fp-simulation-form .fp-choice-grid,
  .fp-simulation-form .fp-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-simulation-form .fp-choice-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-sim-progress li {
    font-size: 0.8125rem;
  }

  .fp-sim-step,
  .fp-simulation-form .fp-field-group {
    padding: 24px;
  }

  .fp-simulation-form .fp-field-group + .fp-field-group {
    padding-top: 24px;
  }

  .fp-step-actions {
    width: min(100%, 34rem);
    margin-left: auto;
  }

  .fp-submit-area {
    display: grid;
    grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 18px;
  }

  .fp-submit-area .fp-privacy {
    margin: 0;
  }

  .fp-form-tools {
    justify-content: flex-end;
  }

  .fp-result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fp-result-heading {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.72fr);
    align-items: start;
  }

  .fp-result--blocked > .fp-button {
    width: auto;
  }
}

@media (forced-colors: active) {
  .fp-sim-progress li[aria-current="step"] > span,
  .fp-sim-progress li:is(.is-complete, [data-complete="true"]) > span,
  [data-fp-simulation-result] :where(.fp-accuracy-badge, [data-fp-accuracy], .fp-accuracy > strong) {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .fp-simulation-form .fp-scope-check,
  .fp-callout,
  .fp-mode-intro,
  .fp-simulation-form .fp-field-group,
  .fp-submit-area {
    border: 1px solid CanvasText;
  }
}
