:root {
  color-scheme: light dark;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --page-max-width: 1200px;
  --hero-gradient-light: linear-gradient(135deg, #bef5cf, #bae6fd, #c7d2fe);
  --hero-gradient-dark: linear-gradient(135deg, rgba(16, 185, 129, 0.55), rgba(14, 165, 233, 0.45), rgba(67, 56, 202, 0.45));
  --surface-light: rgba(255, 255, 255, 0.85);
  --surface-dark: rgba(24, 24, 27, 0.7);
  --shadow-soft: 0 24px 48px -24px rgba(15, 23, 42, 0.25);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #0f172a;
  font-family: inherit;
  line-height: 1.5;
}

body.dark {
  background: linear-gradient(180deg, #09090b, #18181b);
  color: #f8fafc;
}

body:not(.landing-active) {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff, #f1f5f9);
}

body.dark:not(.landing-active) {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    linear-gradient(180deg, #09090b, #18181b);
}

body.landing-active {
  background: #f8fafc;
  color: #0f172a;
}

body.dark.landing-active {
  background: #09090b;
  color: #f8fafc;
}

.landing-bottom-cta {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 24px));
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.landing-bottom-cta-visible .landing-bottom-cta {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .landing-bottom-cta {
    transition: none;
  }
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

.page {
  margin: 0 auto;
  max-width: var(--page-max-width);
  padding: 24px 16px 48px;
}

.page[data-step="landing"] {
  max-width: none;
  padding: 0;
}

.page[data-step="landing"] .top-bar {
  display: none;
}

.page[data-step="planner"] {
  max-width: none;
  padding: 0;
}

@media (min-width: 768px) {
  .page[data-step="planner"] {
    padding: 0;
  }
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 48px 32px;
  background: var(--hero-gradient-light);
  color: #0f172a;
  box-shadow: var(--shadow-soft);
}

body.dark .hero {
  background: var(--hero-gradient-dark);
  color: #f1f5f9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

body.dark .hero::after {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.45), transparent);
}

.hero__layout {
  position: relative;
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 40px;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  color: #0f766e;
}

body.dark .hero__badge {
  background: rgba(255, 255, 255, 0.12);
  color: #ccfbf1;
}

.hero__title {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
}

.hero__text {
  margin: 0 0 24px;
  max-width: 520px;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(15, 23, 42, 0.75);
}

body.dark .hero__text {
  color: rgba(226, 232, 240, 0.8);
}

.hero__list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: rgba(15, 23, 42, 0.8);
  font-size: clamp(14px, 2vw, 18px);
}

.hero__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.dark .hero__list {
  color: rgba(226, 232, 240, 0.85);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 600;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  background: #0b1120;
  color: #ffffff;
  box-shadow: 0 18px 32px -20px rgba(15, 118, 110, 0.45);
}

.button-primary:hover {
  transform: translateY(-2px);
  background: #111827;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.button-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
}

body.dark .button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.35);
}

body.dark .button-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button-ghost {
  background: transparent;
  color: inherit;
}

.button-ghost:hover {
  transform: translateY(-2px);
}

.hero__preview {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), var(--shadow-soft);
  padding: 12px;
}

body.dark .hero__preview {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), var(--shadow-soft);
}

.hero__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

body.dark .hero__preview::after {
  border-color: rgba(255, 255, 255, 0.2);
}

.hero__preview img {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  height: 100%;
  object-fit: cover;
}

.planner-shell {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 32px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 900px) {
  .planner-shell {
    padding: 48px 24px 120px;
    gap: 40px;
  }
}

.planner-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.planner-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

body.dark .planner-header {
  background: rgba(24, 24, 27, 0.65);
  border-color: rgba(63, 63, 70, 0.65);
}

.planner-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.planner-brand__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: #0f172a;
  color: #ffffff;
}

body.dark .planner-brand__icon {
  background: #f8fafc;
  color: #0f172a;
}

.planner-brand__name {
  font-weight: 700;
  font-size: 16px;
}

.planner-brand__tagline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.55);
}

body.dark .planner-brand__tagline {
  color: rgba(226, 232, 240, 0.6);
}

.planner-header__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.planner-header__step {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(15, 23, 42, 0.55);
}

body.dark .planner-header__step {
  color: rgba(226, 232, 240, 0.6);
}

.planner-header__title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
}

.planner-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.planner-header__actions:empty {
  display: none;
}

.planner-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.planner-section--results {
  width: min(calc(100vw - 32px), 1440px);
  align-self: center;
}

@media (max-width: 640px) {
  .planner-section--results {
    width: min(calc(100vw - 16px), 1440px);
  }
}

.planner-layout {
  display: grid;
  gap: 24px;
}

.planner-layout__aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.planner-layout--split {
  align-items: start;
}

@media (min-width: 960px) {
  .planner-layout--split {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  }
}

.planner-layout--results {
  align-items: start;
}

@media (min-width: 900px) {
  .planner-layout--results {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 24px;
  }
}

.planner-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

body.dark .planner-card {
  background: rgba(24, 24, 27, 0.65);
  border-color: rgba(63, 63, 70, 0.65);
}

.planner-card--accent {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.95), rgba(203, 213, 225, 0.75));
  border-color: rgba(148, 163, 184, 0.25);
}

body.dark .planner-card--accent {
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.85), rgba(63, 63, 70, 0.75));
  border-color: rgba(82, 82, 91, 0.65);
}

.planner-card__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.planner-section__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.planner-section__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.7);
}

body.dark .planner-section__text {
  color: rgba(226, 232, 240, 0.75);
}

.corner-kitchen-step {
  display: grid;
  gap: 24px;
}

.corner-kitchen-step__intro {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.corner-kitchen-step__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 700;
}

body.dark .corner-kitchen-step__eyebrow {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 250, 252, 0.82);
}

.corner-kitchen-step__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.corner-kitchen-step__body {
  display: grid;
  gap: 20px;
}

.kitchen-type-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 560px) {
  .kitchen-type-picker {
    grid-template-columns: 1fr;
  }
}

.kitchen-type-card {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.kitchen-type-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.18);
}

.kitchen-type-card:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.36);
  outline-offset: 3px;
}

.kitchen-type-card[data-selected="true"] {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(236, 253, 245, 0.74);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.14);
}

body.dark .kitchen-type-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

body.dark .kitchen-type-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

body.dark .kitchen-type-card[data-selected="true"] {
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(52, 211, 153, 0.44);
}

.kitchen-type-card strong,
.kitchen-type-card small {
  display: block;
}

.kitchen-type-card__content {
  display: block;
}

.kitchen-type-card small {
  margin-top: 2px;
  color: rgba(15, 23, 42, 0.58);
  font-size: 12px;
}

body.dark .kitchen-type-card small {
  color: rgba(226, 232, 240, 0.62);
}

.kitchen-type-scheme {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10.5;
  border-radius: 18px;
  overflow: visible;
}

.kitchen-type-scheme__floor {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(226, 232, 240, 0.74));
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

body.dark .kitchen-type-scheme__floor {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(135deg, rgba(39, 39, 42, 0.86), rgba(24, 24, 27, 0.82));
}

.kitchen-type-scheme__wall {
  position: absolute;
  background: #0f172a;
  border-radius: 999px;
  box-shadow: 0 16px 30px -24px rgba(15, 23, 42, 0.7);
}

body.dark .kitchen-type-scheme__wall {
  background: #e2e8f0;
}

.kitchen-type-scheme__wall--top {
  top: 34px;
  left: 34px;
  right: 34px;
  height: 20px;
}

.kitchen-type-scheme__wall--right {
  top: 34px;
  right: 34px;
  bottom: 34px;
  width: 20px;
}

.kitchen-type-scheme__wall--linear {
  left: 34px;
  right: 34px;
  top: 50%;
  height: 20px;
  transform: translateY(-50%);
}

.kitchen-type-scheme__size {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 7px 6px 9px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 36px -24px rgba(15, 23, 42, 0.65);
  color: #ffffff;
  z-index: 2;
  cursor: text;
}

body.dark .kitchen-type-scheme__size {
  background: #e2e8f0;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

.kitchen-type-scheme__size span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 700;
  color: inherit;
}

body.dark .kitchen-type-scheme__size span {
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.kitchen-type-scheme__size input {
  width: 74px;
  min-width: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  padding: 7px 9px;
  font: inherit;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

body.dark .kitchen-type-scheme__size input {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.kitchen-type-scheme__size--top {
  top: 23px;
  left: 50%;
  transform: translateX(-50%);
}

.kitchen-type-scheme__size--right {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.kitchen-type-scheme__size--linear {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.kitchen-type-scheme__hint {
  position: absolute;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.kitchen-type-scheme__hint--corner {
  right: 48px;
  top: 54px;
}

.kitchen-type-scheme__hint--linear {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

body.dark .kitchen-type-scheme__hint {
  background: rgba(248, 250, 252, 0.88);
  color: #0f172a;
}

.planner-aside__title {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}

body.dark .planner-aside__title {
  color: rgba(226, 232, 240, 0.6);
}

.planner-aside__note {
  margin: 16px 0 0;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
  text-align: center;
}

body.dark .planner-aside__note {
  color: rgba(226, 232, 240, 0.65);
}

.layout-card {
  background: var(--surface-light);
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.layout-card--active {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22), var(--shadow-soft);
}

body.dark .layout-card {
  background: var(--surface-dark);
  border-color: rgba(63, 63, 70, 0.65);
}

body.dark .layout-card--active {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25), var(--shadow-soft);
}

.layout-card__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(226, 232, 240, 0.65), rgba(148, 163, 184, 0.25));
}

body.dark .layout-card__figure {
  background: radial-gradient(circle at 30% 20%, rgba(39, 39, 42, 0.75), rgba(63, 63, 70, 0.45));
}

.layout-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.layout-card__figure--plan {
  aspect-ratio: auto;
  min-height: auto;
  overflow: visible;
  padding: 12px;
  display: block;
}

.layout-card__figure--plan img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.layout-card__plan {
  display: grid;
  gap: 12px;
}

.layout-card__plan-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.6);
}

body.dark .layout-card__plan-title {
  color: rgba(226, 232, 240, 0.7);
}

.layout-card__plan-figure {
  position: relative;
  width: 100%;
  aspect-ratio: unset;
  border-radius: 18px;
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 252, 0.8);
  display: block;
  padding: 12px;
  box-sizing: border-box;
}

body.dark .layout-card__plan-figure {
  background: rgba(24, 24, 27, 0.6);
  border-color: rgba(63, 63, 70, 0.6);
}

.layout-card__plan-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  display: block;
  background: transparent;
}

.layout-card__render {
  display: grid;
  gap: 12px;
}

.layout-card__render-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at 30% 20%, rgba(226, 232, 240, 0.65), rgba(148, 163, 184, 0.25));
  display: block;
}

body.dark .layout-card__render-figure {
  background: radial-gradient(circle at 30% 20%, rgba(39, 39, 42, 0.75), rgba(63, 63, 70, 0.45));
  border-color: rgba(63, 63, 70, 0.6);
}

.layout-card__render-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.dark .layout-card__plan-figure img {
  background: transparent;
}

.layout-card__plan-loading,
.layout-card__plan-error {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  color: rgba(15, 23, 42, 0.7);
  font-size: 14px;
}

body.dark .layout-card__plan-loading,
body.dark .layout-card__plan-error {
  color: rgba(226, 232, 240, 0.75);
}

.spinner--small {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.layout-card__index {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
}

.layout-card__body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.layout-card__agent-slot {
  margin-top: 8px;
}

.layout-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.layout-card__description {
  margin: 0;
  font-size: 15px;
  color: rgba(15, 23, 42, 0.75);
}

body.dark .layout-card__description {
  color: rgba(226, 232, 240, 0.8);
}

.layout-card__details {
  border-radius: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  padding: 16px;
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
}

body.dark .layout-card__details {
  background: rgba(24, 24, 27, 0.5);
  border-color: rgba(113, 113, 122, 0.8);
}

.layout-card__details ul {
  margin: 0;
  padding-left: 20px;
  color: inherit;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 20px);
  margin-top: 8px;
}

.plan-list > .layout-card {
  min-width: 0;
}

.plan-list .layout-card__figure--plan {
  padding: 10px;
}

.plan-list .layout-card__body {
  padding: 20px;
}

.plan-list .layout-card__render {
  gap: 10px;
}

.plan-list .layout-card__title {
  line-height: 1.2;
}

.plan-list .footer-actions {
  margin-top: 0 !important;
}

@media (max-width: 640px) {
  .planner-card--results {
    padding: 14px;
  }

  .planner-card--results .planner-card__content {
    gap: 16px;
  }

  .planner-card--results .planner-section__title {
    font-size: 22px;
  }

  .planner-card--results .planner-section__text {
    font-size: 14px;
    line-height: 1.45;
  }

  .plan-list {
    gap: 10px;
    margin-top: 0;
  }

  .plan-list .layout-card {
    border-radius: 18px;
  }

  .plan-list .layout-card__figure--plan {
    padding: 6px;
  }

  .plan-list .layout-card__index {
    right: 6px;
    bottom: 6px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .plan-list .layout-card__body {
    padding: 10px;
    gap: 10px;
  }

  .plan-list .layout-card__render {
    gap: 6px;
  }

  .plan-list .layout-card__plan-title {
    font-size: 10px;
  }

  .plan-list .layout-card__render-figure {
    border-radius: 12px;
    aspect-ratio: 4 / 3;
  }

  .plan-list .layout-card__title {
    font-size: 15px;
  }

  .plan-list .layout-card__pricing-block {
    gap: 8px;
    margin-top: 8px;
  }

  .plan-list .pricing-summary {
    gap: 5px;
    padding: 8px;
    border-radius: 12px;
  }

  .plan-list .pricing-summary__row {
    display: grid;
    gap: 2px;
    font-size: 11px;
  }

  .plan-list .pricing-summary__value {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .plan-list .pricing-summary__value--price {
    font-size: 14px;
  }

  .plan-list .layout-card__metrics {
    gap: 4px;
    font-size: 11px;
  }

  .plan-list .footer-actions {
    display: grid;
    gap: 8px;
  }

  .plan-list .button-primary,
  .plan-list .button-secondary--small {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 12px;
  }
}

.results-status {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  color: rgba(15, 23, 42, 0.75);
}

.results-status p {
  margin: 0;
}

.results-status--loading {
  grid-template-columns: auto 1fr;
}

.results-status--loading .spinner {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

.results-status--error {
  border-color: rgba(248, 113, 113, 0.45);
}

.results-status--error p {
  color: #b91c1c;
}

body.dark .results-status {
  background: rgba(24, 24, 27, 0.6);
  border-color: rgba(63, 63, 70, 0.65);
  color: rgba(226, 232, 240, 0.85);
}

body.dark .results-status--error {
  border-color: rgba(248, 113, 113, 0.55);
}

body.dark .results-status--error p {
  color: #fecaca;
}

@media (min-width: 900px) {
  .results-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
}

.summary-card {
  position: sticky;
  top: 32px;
  background: var(--surface-light);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
  width: 100%;
}

body.dark .summary-card {
  background: var(--surface-dark);
  border-color: rgba(63, 63, 70, 0.65);
}

.summary-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
}

.summary-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
  font-size: 14px;
}

.summary-card dt {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
}

.summary-card dd {
  margin: 0;
}

body.dark .summary-card dt {
  color: rgba(226, 232, 240, 0.8);
}

.room-preview {
  position: relative;
  margin: 0 auto;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
}

.room-preview__background {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(135deg, #f5f5f5, #f1f5f9);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

body.dark .room-preview__background {
  background: linear-gradient(135deg, #27272a, #18181b);
  box-shadow: inset 0 0 0 1px rgba(63, 63, 70, 0.65);
}

.room-preview__wall {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 32px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  background: rgba(148, 163, 184, 0.25);
  color: rgba(15, 23, 42, 0.75);
}

.room-preview__wall:hover {
  transform: scale(1.03);
  background: rgba(148, 163, 184, 0.4);
}

.room-preview__wall[data-selected="true"] {
  background: rgba(16, 185, 129, 0.22);
  color: #047857;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.55);
}

body.dark .room-preview__wall {
  background: rgba(63, 63, 70, 0.5);
  color: rgba(226, 232, 240, 0.82);
}

body.dark .room-preview__wall[data-selected="true"] {
  background: rgba(16, 185, 129, 0.32);
  color: #bbf7d0;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.55);
}

.room-preview__inner {
  position: absolute;
  inset: 32px;
  border-radius: 28px;
  border: 2px dashed rgba(148, 163, 184, 0.5);
}

body.dark .room-preview__inner {
  border-color: rgba(113, 113, 122, 0.75);
}

.size-inputs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.input-field label {
  font-weight: 600;
}

.input-field input {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
}

body.dark .input-field input {
  background: rgba(24, 24, 27, 0.65);
  color: inherit;
  border-color: rgba(71, 85, 105, 0.6);
}

.helper-text {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
  margin-top: 12px;
}

body.dark .helper-text {
  color: rgba(226, 232, 240, 0.7);
}

.footer-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
}

.footer-actions--center {
  justify-content: center;
}

.footer-actions--step {
  margin-top: auto;
}

.appliance-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.appliance-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: border 0.2s ease, background 0.2s ease;
}

.appliance-tile input {
  width: 18px;
  height: 18px;
}

.appliance-tile[data-active="true"] {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(236, 253, 245, 0.9);
}

body.dark .appliance-tile {
  background: rgba(24, 24, 27, 0.65);
  border-color: rgba(63, 63, 70, 0.65);
}

body.dark .appliance-tile[data-active="true"] {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.65);
}

.color-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
}

.color-layout__palette {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

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

@media (max-width: 640px) {
  .color-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.color-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.color-tile__swatch {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  background: var(--tile-color, #a49487);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.color-tile__label {
  font-weight: 600;
}

.color-tile__code {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.color-tile[data-selected="true"] {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 12px 24px -18px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

body.dark .color-tile {
  background: rgba(24, 24, 27, 0.65);
  border-color: rgba(63, 63, 70, 0.6);
}

body.dark .color-tile__code {
  color: rgba(226, 232, 240, 0.6);
}

body.dark .color-tile__swatch {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.dark .color-tile[data-selected="true"] {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 12px 24px -18px rgba(16, 185, 129, 0.5);
}

.custom-color {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-color__label {
  font-weight: 600;
}

.custom-color__picker {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.custom-color__picker input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 16px;
  background: none;
  cursor: pointer;
}

.custom-color__picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 16px;
}

.custom-color__picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 16px;
}

.custom-color__picker input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 16px;
}

.custom-color__value {
  font-weight: 600;
  letter-spacing: 0.08em;
}


.color-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.color-summary__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--summary-color, #a49487);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

body.dark .color-summary {
  background: rgba(24, 24, 27, 0.6);
  border-color: rgba(63, 63, 70, 0.6);
}

body.dark .color-summary__swatch {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.85);
  font-size: 14px;
}

body.dark .loading-overlay {
  background: rgba(0, 0, 0, 0.45);
  color: rgba(248, 250, 252, 0.85);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(16, 185, 129, 0.4);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alert {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #b91c1c;
  font-size: 14px;
}

body.dark .alert {
  background: rgba(153, 27, 27, 0.35);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

.empty-state {
  padding: 40px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  color: rgba(15, 23, 42, 0.7);
}

body.dark .empty-state {
  background: rgba(24, 24, 27, 0.55);
  border-color: rgba(113, 113, 122, 0.6);
  color: rgba(226, 232, 240, 0.75);
}

input:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.noscript {
  max-width: 520px;
  margin: 32px auto 0;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-align: center;
  font-size: 14px;
}

body.dark .noscript {
  background: rgba(24, 24, 27, 0.6);
  color: rgba(248, 250, 252, 0.85);
  border-color: rgba(63, 63, 70, 0.65);
}

.room-preview--mini {
  width: min(100%, 280px);
}

/* Pricing styles */
.layout-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.layout-card__pricing-total {
  font-size: 24px;
  font-weight: 700;
  color: #047857;
}

body.dark .layout-card__pricing-total {
  color: #34d399;
}

.layout-card__pricing-coverage {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
}

body.dark .layout-card__pricing-coverage {
  color: rgba(226, 232, 240, 0.7);
}

.layout-card__pricing-loading {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.5);
  margin-top: 8px;
  display: block;
}

body.dark .layout-card__pricing-loading {
  color: rgba(226, 232, 240, 0.6);
}

.layout-card__pricing-error {
  font-size: 14px;
  color: #b91c1c;
  margin-top: 8px;
  display: block;
}

body.dark .layout-card__pricing-error {
  color: #fca5a5;
}

.layout-card__pricing-empty {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.4);
  margin-top: 8px;
  display: block;
}

/* Metrics styles */
.layout-card__metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
  margin-top: 8px;
}

body.dark .layout-card__metrics {
  color: rgba(226, 232, 240, 0.65);
}

/* Pricing details */
.layout-card__pricing-details {
  margin-top: 12px;
}

.layout-card__pricing-source {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
  margin: 0 0 12px;
}

body.dark .layout-card__pricing-source {
  color: rgba(226, 232, 240, 0.65);
}

.layout-card__pricing-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layout-card__pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.layout-card__pricing-link {
  color: #2563eb;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.layout-card__pricing-link:hover {
  text-decoration: underline;
}

body.dark .layout-card__pricing-link {
  color: #60a5fa;
}

.layout-card__pricing-price {
  font-weight: 600;
  white-space: nowrap;
}

.layout-card__pricing-more {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.5);
}

body.dark .layout-card__pricing-more {
  color: rgba(226, 232, 240, 0.6);
}

.layout-card__pricing-missing {
  margin: 12px 0 0;
  font-size: 13px;
  color: #ea580c;
}

body.dark .layout-card__pricing-missing {
  color: #fb923c;
}

.layout-card__details-empty {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.5);
}

body.dark .layout-card__details-empty {
  color: rgba(226, 232, 240, 0.6);
}

/* Loading hint */
.loading-hint {
  font-size: 13px;
  color: #047857;
  margin-top: 4px;
}

body.dark .loading-hint {
  color: #34d399;
}

.loading-overlay--error {
  background: rgba(248, 113, 113, 0.1);
}

body.dark .loading-overlay--error {
  background: rgba(153, 27, 27, 0.35);
}

/* Pricing summary block in card */
.layout-card__pricing-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.pricing-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

body.dark .pricing-summary {
  background: rgba(24, 24, 27, 0.5);
  border-color: rgba(63, 63, 70, 0.5);
}

.pricing-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.pricing-summary__label {
  color: rgba(15, 23, 42, 0.6);
}

body.dark .pricing-summary__label {
  color: rgba(226, 232, 240, 0.65);
}

.pricing-summary__value {
  font-weight: 600;
}

.pricing-summary__value--price {
  font-size: 18px;
  color: #047857;
}

body.dark .pricing-summary__value--price {
  color: #34d399;
}

.button-secondary--small {
  padding: 8px 16px;
  font-size: 13px;
}

/* Estimate Modal */
.estimate-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

body.dark .estimate-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.estimate-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 32px 64px -24px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

body.dark .estimate-modal {
  background: #18181b;
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.estimate-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

body.dark .estimate-modal__header {
  border-color: rgba(63, 63, 70, 0.5);
}

.estimate-modal__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.estimate-modal__subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.6);
}

body.dark .estimate-modal__subtitle {
  color: rgba(226, 232, 240, 0.65);
}

.estimate-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.15);
  color: rgba(15, 23, 42, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.estimate-modal__close:hover {
  background: rgba(148, 163, 184, 0.25);
  color: rgba(15, 23, 42, 0.9);
}

body.dark .estimate-modal__close {
  background: rgba(63, 63, 70, 0.4);
  color: rgba(226, 232, 240, 0.7);
}

body.dark .estimate-modal__close:hover {
  background: rgba(63, 63, 70, 0.6);
  color: rgba(226, 232, 240, 0.9);
}

.estimate-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.estimate-modal__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estimate-modal__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

body.dark .estimate-modal__item {
  background: rgba(63, 63, 70, 0.25);
  border-color: rgba(63, 63, 70, 0.4);
}

.estimate-modal__item-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
}

.estimate-modal__item-name a {
  color: #2563eb;
  text-decoration: none;
}

.estimate-modal__item-name a:hover {
  text-decoration: underline;
}

body.dark .estimate-modal__item-name a {
  color: #60a5fa;
}

.estimate-modal__item-name span {
  color: rgba(15, 23, 42, 0.85);
}

body.dark .estimate-modal__item-name span {
  color: rgba(226, 232, 240, 0.85);
}

.estimate-modal__item-price {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  color: #047857;
}

body.dark .estimate-modal__item-price {
  color: #34d399;
}

.estimate-modal__missing {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  font-size: 13px;
  color: #c2410c;
}

body.dark .estimate-modal__missing {
  background: rgba(251, 146, 60, 0.15);
  border-color: rgba(251, 146, 60, 0.35);
  color: #fb923c;
}

.estimate-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.05);
}

body.dark .estimate-modal__footer {
  border-color: rgba(63, 63, 70, 0.5);
  background: rgba(24, 24, 27, 0.5);
}

.estimate-modal__total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 16px;
}

.estimate-modal__total-price {
  font-size: 28px;
  font-weight: 700;
  color: #047857;
}

body.dark .estimate-modal__total-price {
  color: #34d399;
}

.estimate-modal__coverage {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.6);
}

body.dark .estimate-modal__coverage {
  color: rgba(226, 232, 240, 0.65);
}

.agent-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #e0dfdb;
  border-radius: 12px;
  background: #f8f7f4;
}

.agent-panel--inline {
  margin-top: 0;
}

.agent-panel__controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.agent-panel__controls input {
  flex: 1;
  min-width: 220px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #c8c5be;
}

.agent-item {
  padding: 10px;
  border: 1px solid #dfddd7;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
}

.agent-item--user {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(239, 246, 255, 0.9);
}

.agent-item__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.agent-item__head span {
  opacity: 0.75;
}

.agent-timeline {
  margin: 8px 0 0;
  padding-left: 16px;
}

.agent-panel__status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #1d4ed8;
}

.agent-panel__status--thinking {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-thinking-spinner {
  border-color: rgba(59, 130, 246, 0.45);
  border-top-color: transparent;
}

.agent-panel__status--warn {
  color: #b45309;
}

.button-secondary[data-undo-state="pending"] {
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.button-secondary[data-undo-state="delayed"] {
  border-color: #b45309;
  color: #b45309;
}

body.dark .agent-panel__status {
  color: #93c5fd;
}

body.dark .agent-thinking-spinner {
  border-color: rgba(147, 197, 253, 0.55);
  border-top-color: transparent;
}

body.dark .agent-panel__status--warn {
  color: #fcd34d;
}

body.dark .button-secondary[data-undo-state="pending"] {
  border-color: #60a5fa;
  color: #bfdbfe;
}

body.dark .button-secondary[data-undo-state="delayed"] {
  border-color: #f59e0b;
  color: #fcd34d;
}

body.dark .agent-item--user {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 41, 59, 0.8);
}

.feedback-widget {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  width: min(460px, calc(100vw - 36px));
  font-size: 14px;
}

.feedback-widget[data-revealing="true"] .feedback-widget__trigger {
  animation: feedback-slide-up 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feedback-widget__trigger {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
}

@keyframes feedback-slide-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-widget[data-revealing="true"] .feedback-widget__trigger {
    animation: none;
  }
}

.feedback-widget__panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  box-shadow: 0 24px 70px -36px rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

body.dark .feedback-widget__panel {
  background: rgba(24, 24, 27, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

body.dark .feedback-widget__trigger {
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
}

.feedback-widget__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.feedback-widget__header strong {
  display: block;
  font-size: 17px;
}

.feedback-widget__header p {
  margin: 3px 0 0;
  color: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

body.dark .feedback-widget__header p {
  color: rgba(226, 232, 240, 0.68);
}

.feedback-widget__close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 20px;
  line-height: 1;
}

body.dark .feedback-widget__close {
  background: rgba(255, 255, 255, 0.1);
}

.feedback-widget__field {
  display: grid;
  gap: 7px;
}

.feedback-widget__field span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.64);
}

body.dark .feedback-widget__field span {
  color: rgba(226, 232, 240, 0.72);
}

.feedback-widget__field select,
.feedback-widget__field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.96);
  color: inherit;
  padding: 10px 12px;
  font: inherit;
}

.feedback-widget__field textarea {
  resize: vertical;
  min-height: 136px;
}

body.dark .feedback-widget__field select,
body.dark .feedback-widget__field textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.feedback-widget__ratings {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.feedback-widget__rating {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.84);
  color: inherit;
  padding: 8px 0;
  font-weight: 800;
}

.feedback-widget__rating[data-selected="true"] {
  border-color: rgba(16, 185, 129, 0.62);
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

body.dark .feedback-widget__rating {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark .feedback-widget__rating[data-selected="true"] {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.22);
}

.feedback-widget__submit {
  justify-content: center;
}

.feedback-widget__error {
  margin: -4px 0 0;
  color: #b91c1c;
  font-size: 13px;
}

.feedback-widget__thanks {
  display: grid;
  gap: 12px;
}

@media (max-width: 560px) {
  .feedback-widget {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}
