.site-tool-page {
  --site-pink: #f391a9;
  --site-mint: #44d7b6;
  --site-ink: #444;
  --site-muted: rgba(68, 68, 68, 0.68);
  --site-card: hsla(0, 0%, 100%, 0.72);
  --site-card-strong: hsla(0, 0%, 100%, 0.88);
  --site-border: hsla(0, 0%, 100%, 0.76);
  --site-shadow: 0 14px 38px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.06);
  --primary: var(--site-mint);
  --primary-light: #76e4cb;
  --primary-color: var(--site-mint);
  --secondary-color: var(--site-pink);
  --text-color: var(--site-ink);
  --text-primary: var(--site-ink);
  --text-secondary: var(--site-muted);
  --text-light: rgba(68, 68, 68, 0.55);
  --text-muted: rgba(68, 68, 68, 0.45);
  --background: transparent;
  --light-bg: transparent;
  --card-bg: var(--site-card-strong);
  --panel: var(--site-card-strong);
  --panel-soft: hsla(0, 0%, 100%, 0.58);
  --input-bg: hsla(0, 0%, 100%, 0.8);
  --input-focus-bg: #fff;
  --border: rgba(68, 68, 68, 0.12);
  --border-color: rgba(68, 68, 68, 0.12);
  --divider: rgba(68, 68, 68, 0.1);
  --line: rgba(68, 68, 68, 0.13);
  --line-strong: rgba(68, 68, 68, 0.22);
  --box-shadow: var(--site-shadow);
  --shadow-sm: 0 3px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: var(--site-shadow);
  --gradient-bg: linear-gradient(135deg, var(--site-pink), var(--site-mint));
  --primary-gradient: linear-gradient(
    135deg,
    var(--site-pink),
    var(--site-mint)
  );
  min-height: 100vh;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui,
    sans-serif;
  color: var(--site-ink);
  background: radial-gradient(
      circle at 12% 10%,
      rgba(243, 145, 169, 0.18),
      transparent 32%
    ),
    radial-gradient(
      circle at 88% 2%,
      rgba(68, 215, 182, 0.18),
      transparent 30%
    ),
    linear-gradient(
      90deg,
      rgba(247, 149, 51, 0.1),
      rgba(243, 112, 85, 0.1) 15%,
      rgba(239, 78, 123, 0.1) 30%,
      rgba(161, 102, 171, 0.1) 44%,
      rgba(80, 115, 184, 0.1) 58%,
      rgba(16, 152, 173, 0.1) 72%,
      rgba(7, 179, 155, 0.1) 86%,
      rgba(109, 186, 130, 0.1)
    );
  padding: 22px 16px 40px;
}

html,
body.site-tool-page {
  cursor:
    url("/shared/assets/icons/site-cursor.png") 1 1,
    auto;
}

.site-tool-page a,
.site-tool-page button,
.site-tool-page label,
.site-tool-page select,
.site-tool-page [role="button"] {
  cursor:
    url("/shared/assets/icons/site-cursor.png") 1 1,
    pointer;
}

.site-tool-page input,
.site-tool-page textarea {
  cursor: text;
}

.site-tool-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
      rgba(255, 255, 255, 0.42),
      rgba(255, 255, 255, 0.58)
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 2px,
      transparent 2px 12px
    );
}

.tool-hero {
  width: min(1180px, 100%);
  margin: 0 auto 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.78),
      rgba(255, 255, 255, 0.54)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.09), rgba(68, 215, 182, 0.08));
  box-shadow: 0 8px 22px rgba(68, 68, 68, 0.06);
  overflow: hidden;
  position: relative;
}

.tool-hero::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(
    90deg,
    var(--site-pink),
    #ffe07a,
    var(--site-mint)
  );
  opacity: 0.72;
}

.tool-hero-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tool-hero-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--site-pink), var(--site-mint));
  box-shadow: 0 8px 16px rgba(68, 215, 182, 0.16);
}

.tool-hero-copy {
  min-width: 0;
}

.tool-kicker {
  margin: 0;
  color: var(--site-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-hero h1 {
  margin: 0;
  color: var(--site-ink);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.2;
}

.tool-hero p {
  display: none;
}

.tool-hero-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 420px;
}

.tool-tag {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(68, 68, 68, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: rgba(68, 68, 68, 0.72);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tool-hero-home {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(68, 68, 68, 0.78);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(68, 68, 68, 0.06);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.tool-hero-home svg {
  width: 17px;
  height: 17px;
  box-sizing: content-box;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(243, 145, 169, 0.18),
    rgba(68, 215, 182, 0.2)
  );
  color: var(--site-pink);
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}

.tool-hero-home:hover {
  color: #333;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(68, 68, 68, 0.09);
}

.tool-hero-home:hover svg {
  color: var(--site-mint);
  transform: translateX(-2px);
}

.tool-hero-home:focus-visible {
  outline: 3px solid rgba(68, 215, 182, 0.28);
  outline-offset: 2px;
}

.tool-section-panel {
  border: 1px solid rgba(68, 68, 68, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 20px rgba(68, 68, 68, 0.05);
}

.tool-section-panel + .tool-section-panel {
  margin-top: 14px;
}

.tool-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--site-ink);
  font-size: 15px;
  font-weight: 900;
}

.tool-section-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-pink), var(--site-mint));
  box-shadow: 0 0 0 4px rgba(68, 215, 182, 0.12);
}

.tool-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(68, 68, 68, 0.18);
  border-radius: 8px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.72),
      rgba(255, 255, 255, 0.46)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.1), rgba(68, 215, 182, 0.1));
  color: var(--site-muted);
  text-align: center;
}

.tool-empty-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, var(--site-pink), var(--site-mint));
  box-shadow: 0 10px 20px rgba(68, 215, 182, 0.18);
}

.tool-empty strong {
  color: var(--site-ink);
  font-size: 15px;
}

.tool-empty span {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.55;
}

.tool-actions,
.tool-mobile-actions {
  display: grid;
  gap: 10px;
}

.site-tool-page .calculator-container,
.site-tool-page .app-card,
.site-tool-page .main-card,
.site-tool-page .brand,
.site-tool-page .card,
.site-tool-page .input-section,
.site-tool-page .results-section,
.site-tool-page .history-section,
.site-tool-page .result-container,
.site-tool-page .result-card,
.site-tool-page .optimization-section,
.site-tool-page .advanced-section {
  border-color: rgba(68, 68, 68, 0.1);
  background-color: var(--site-card-strong);
  box-shadow: var(--site-shadow);
}

.site-tool-page .calculator-header,
.site-tool-page .card-header,
.site-tool-page .result-header,
.site-tool-page .brand::before,
.site-tool-page .app-card::before {
  background: linear-gradient(
    90deg,
    var(--site-pink),
    var(--site-mint)
  ) !important;
}

.site-tool-page .calculator-header,
.site-tool-page .card-header,
.site-tool-page .result-header {
  color: #fff !important;
}

.site-tool-page .calculator-header,
.site-tool-page .card-header,
.site-tool-page .unified-page-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(
    100deg,
    var(--site-pink),
    #d8a8b8 46%,
    var(--site-mint)
  ) !important;
  color: #fff !important;
  text-align: left;
  box-shadow: 0 12px 24px rgba(68, 215, 182, 0.14);
  position: relative;
  overflow: hidden;
}

.site-tool-page .calculator-header::after,
.site-tool-page .card-header::after,
.site-tool-page .unified-page-bar::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  top: -105px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.site-tool-page .calculator-header h2,
.site-tool-page .card-header,
.site-tool-page .unified-page-bar strong {
  color: #fff !important;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.site-tool-page .unified-page-bar {
  width: 100%;
  margin-bottom: 18px;
}

.site-tool-page .unified-page-bar-card {
  margin: calc(var(--container-padding, 1.2rem) * -1);
  margin-bottom: 18px;
  width: calc(100% + var(--container-padding, 1.2rem) * 2);
}

.site-tool-page .unified-page-bar-wide {
  width: min(1180px, 100%);
  margin: 0 auto 10px;
  border-radius: 8px;
}

.site-tool-page .unified-page-bar-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.site-tool-page .unified-page-bar > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-tool-page .unified-page-bar small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.site-tool-page .section-title,
.site-tool-page .section-head,
.site-tool-page .tool-section-label,
.site-tool-page .result-header,
.site-tool-page .history-title,
.site-tool-page .history-head,
.site-tool-page .result-title {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(
    110deg,
    rgba(243, 145, 169, 0.92),
    rgba(68, 215, 182, 0.9)
  ) !important;
  color: #fff !important;
  box-shadow: 0 9px 20px rgba(68, 68, 68, 0.08);
}

.site-tool-page .section-title *,
.site-tool-page .section-head *,
.site-tool-page .tool-section-label *,
.site-tool-page .result-header *,
.site-tool-page .history-title *,
.site-tool-page .history-head *,
.site-tool-page .result-title * {
  color: inherit !important;
}

.site-tool-page .section-head .title,
.site-tool-page .section-head .title i,
.site-tool-page .section-head .section-note {
  color: #fff !important;
}

.site-tool-page .section-head .section-note {
  margin-top: 3px;
  opacity: 0.82;
}

.site-tool-page .section-head .quality-pill {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
}

.site-tool-page .section-title,
.site-tool-page .tool-section-label,
.site-tool-page .result-header,
.site-tool-page .history-title,
.site-tool-page .result-title {
  justify-content: flex-start;
}

.site-tool-page .tool-section-label::before {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.site-tool-page .result-title {
  justify-content: center;
}

.site-tool-page .history-head .btn,
.site-tool-page .history-head .clear-history {
  min-height: 30px;
  padding: 5px 10px;
  margin: 0;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: none !important;
}

.site-tool-page .header-section {
  padding: 16px 0 22px;
  margin-bottom: 0;
}

.site-tool-page .app-title,
.site-tool-page h1,
.site-tool-page h2,
.site-tool-page .section-title,
.site-tool-page .title,
.site-tool-page .result-title,
.site-tool-page .result-header,
.site-tool-page .result-content strong {
  letter-spacing: 0;
}

.site-tool-page .app-title,
.site-tool-page .section-title,
.site-tool-page .title,
.site-tool-page .result-title,
.site-tool-page .result-header,
.site-tool-page .result-content strong {
  color: var(--site-ink);
}

.site-tool-page .app-title::after,
.site-tool-page h1::after {
  background: linear-gradient(90deg, var(--site-pink), var(--site-mint));
}

.site-tool-page input,
.site-tool-page select,
.site-tool-page textarea {
  border-color: rgba(68, 68, 68, 0.14);
  background-color: rgba(255, 255, 255, 0.82);
}

.site-tool-page input:focus,
.site-tool-page select:focus,
.site-tool-page textarea:focus {
  border-color: var(--site-mint);
  box-shadow: 0 0 0 4px rgba(68, 215, 182, 0.16);
  background-color: #fff;
}

.site-tool-page button,
.site-tool-page .btn,
.site-tool-page .action-button,
.site-tool-page .paper-size-btn {
  border-radius: 6px;
}

.site-tool-page .paper-size-btn {
  text-decoration: none;
}

.site-tool-page .btn.primary,
.site-tool-page .action-button,
.site-tool-page button:not(.clear-history):not(.chip):not(.mini-btn),
.site-tool-page .paper-size-btn {
  background: linear-gradient(135deg, var(--site-pink), var(--site-mint));
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(68, 215, 182, 0.16);
}

.site-tool-page .btn:hover,
.site-tool-page .action-button:hover,
.site-tool-page button:hover,
.site-tool-page .paper-size-btn:hover {
  transform: translateY(-2px);
}

.site-tool-page .secondary-button,
.site-tool-page .btn.subtle,
.site-tool-page .clear-btn,
.site-tool-page .clear-history {
  background: hsla(0, 0%, 100%, 0.76) !important;
  color: var(--site-ink) !important;
  border: 1px solid rgba(68, 68, 68, 0.12) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05) !important;
}

.site-tool-page .brand {
  border-radius: 6px;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.66)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.16), rgba(68, 215, 182, 0.14));
}

.site-tool-page .brand-mark,
.site-tool-page .result-icon {
  border-radius: 6px;
  background: linear-gradient(135deg, var(--site-pink), var(--site-mint));
}

.site-tool-page .brand-stat,
.site-tool-page .limit-box,
.site-tool-page #resultBlock .row,
.site-tool-page .valuation-method-item,
.site-tool-page .finance-summary,
.site-tool-page .valuation-form,
.site-tool-page .empty-result,
.site-tool-page .history-item {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(68, 68, 68, 0.1);
}

.site-tool-page .optimization-section {
  background: linear-gradient(
      135deg,
      rgba(243, 145, 169, 0.16),
      rgba(68, 215, 182, 0.16)
    ),
    rgba(255, 255, 255, 0.72);
}

.site-tool-page .footer-info,
.site-tool-page .system-info,
.site-tool-page .header-description,
.site-tool-page .section-note,
.site-tool-page .input-hint,
.site-tool-page .limit-note {
  color: var(--site-muted);
}

.site-tool-page .info-badge,
.site-tool-page .quality-pill {
  border: 1px solid rgba(68, 68, 68, 0.1);
  background: rgba(255, 255, 255, 0.58);
  color: var(--site-ink);
}

.site-tool-page .form-group,
.site-tool-page .input-group,
.site-tool-page .field {
  position: relative;
}

.site-tool-page label {
  color: rgba(68, 68, 68, 0.78);
  font-weight: 800;
}

.site-tool-page .result-total,
.site-tool-page #price-result-total,
.site-tool-page #finalOut {
  color: #2b8f7e;
}

.site-tool-page .action-section {
  width: min(1180px, 100%);
  margin: 18px auto 0 !important;
  padding: 0 !important;
}

.site-tool-page #generate-quote-btn {
  width: min(420px, 100%);
  background: linear-gradient(
    135deg,
    var(--site-pink),
    var(--site-mint)
  ) !important;
  border-radius: 6px !important;
  box-shadow: var(--site-shadow) !important;
}

.site-tool-page .calculator-header,
.site-tool-page .card-header,
.site-tool-page .result-header,
.site-tool-page .result-header * {
  color: #fff !important;
}

@media (max-width: 760px) {
  .site-tool-page {
    padding: 12px 10px 96px;
  }

  .tool-hero {
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }

  .tool-hero-main {
    align-items: center;
  }

  .tool-hero-mark {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .tool-hero-tags {
    justify-content: flex-start;
    max-width: none;
  }

  .site-tool-page .calculator-header,
  .site-tool-page .card-header,
  .site-tool-page .unified-page-bar {
    min-height: 56px;
    padding: 12px 14px;
  }

  .site-tool-page .calculator-header h2,
  .site-tool-page .card-header,
  .site-tool-page .unified-page-bar strong {
    font-size: 17px;
  }

  .site-tool-page .unified-page-bar small {
    font-size: 11px;
  }

  .site-tool-page .section-title,
  .site-tool-page .section-head,
  .site-tool-page .tool-section-label,
  .site-tool-page .result-header,
  .site-tool-page .history-title,
  .site-tool-page .history-head,
  .site-tool-page .result-title {
    padding: 9px 11px;
    border-radius: 7px;
  }

  .site-tool-page .section-head {
    align-items: center;
  }

  .tool-mobile-actions {
    position: sticky;
    bottom: 10px;
    z-index: 15;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.86),
        rgba(255, 255, 255, 0.68)
      ),
      linear-gradient(
        90deg,
        rgba(243, 145, 169, 0.12),
        rgba(68, 215, 182, 0.12)
      );
    box-shadow: 0 18px 38px rgba(51, 64, 80, 0.16);
    backdrop-filter: blur(14px);
  }

  .tool-mobile-actions .btn,
  .tool-mobile-actions .action-button,
  .tool-mobile-actions button {
    margin-top: 0;
  }
}

.tool-toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.tool-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  color: var(--site-ink, #444);
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.94),
      rgba(255, 255, 255, 0.78)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.14), rgba(68, 215, 182, 0.14));
  box-shadow: 0 18px 38px rgba(51, 64, 80, 0.16);
  backdrop-filter: blur(14px);
  animation: toolToastIn 0.22s ease both;
  pointer-events: auto;
}

.tool-toast.success .tool-toast-dot {
  background: #44d7b6;
}

.tool-toast.error .tool-toast-dot,
.tool-toast.danger .tool-toast-dot {
  background: #f05f74;
}

.tool-toast.info .tool-toast-dot {
  background: #6b9bff;
}

.tool-toast-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--site-pink, #f391a9),
    var(--site-mint, #44d7b6)
  );
  box-shadow: 0 0 0 4px rgba(68, 215, 182, 0.12);
}

.tool-toast-message {
  display: block;
  min-width: 0;
  color: rgba(68, 68, 68, 0.72);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  word-break: break-word;
}

.tool-toast-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tool-toast-title {
  color: var(--site-ink, #444);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.tool-toast.error {
  border-color: rgba(240, 95, 116, 0.24);
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.97),
      rgba(255, 245, 247, 0.92)
    ),
    linear-gradient(90deg, rgba(240, 95, 116, 0.12), rgba(243, 145, 169, 0.1));
}

.tool-input-invalid,
.site-tool-page input.tool-input-invalid,
.site-tool-page select.tool-input-invalid,
.site-tool-page textarea.tool-input-invalid {
  border-color: #ef6077 !important;
  background-color: #fff8f9 !important;
  box-shadow: 0 0 0 4px rgba(239, 96, 119, 0.13) !important;
  outline: none !important;
  animation: toolFieldShake 0.28s ease both;
}

.tool-field-invalid > label,
.tool-field-invalid label[for] {
  color: #c93652 !important;
}

.tool-field-invalid .input-icon {
  color: #ef6077 !important;
}

.tool-field-error {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 7px 0 0;
  padding: 6px 9px;
  border: 1px solid rgba(239, 96, 119, 0.16);
  border-radius: 7px;
  color: #b52f49;
  background: linear-gradient(
    135deg,
    rgba(255, 245, 247, 0.98),
    rgba(255, 250, 250, 0.9)
  );
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 7px 16px rgba(181, 47, 73, 0.07);
}

.tool-field-error > span {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef6077, #f391a9);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.tool-field-error strong {
  font-weight: 750;
}

@keyframes toolFieldShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-3px);
  }
  60% {
    transform: translateX(3px);
  }
}

.tool-toast-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(68, 68, 68, 0.1) !important;
  border-radius: 6px !important;
  color: rgba(68, 68, 68, 0.6) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.tool-toast.is-leaving {
  animation: toolToastOut 0.18s ease both;
}

.tool-dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 38, 48, 0.32);
  backdrop-filter: blur(10px);
  animation: toolDialogFade 0.18s ease both;
}

.tool-dialog-modal.is-leaving {
  animation: toolDialogFadeOut 0.18s ease both;
}

.tool-dialog-panel {
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96),
      rgba(255, 255, 255, 0.82)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.14), rgba(68, 215, 182, 0.12));
  box-shadow: 0 24px 70px rgba(34, 49, 63, 0.24);
}

.tool-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tool-dialog-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    var(--site-pink, #f391a9),
    var(--site-mint, #44d7b6)
  );
  box-shadow: 0 10px 20px rgba(68, 215, 182, 0.18);
}

.tool-dialog-panel.danger .tool-dialog-mark,
.tool-dialog-panel.error .tool-dialog-mark {
  background: linear-gradient(135deg, #f05f74, #f391a9);
}

.tool-dialog-head h2 {
  margin: 0 0 6px;
  color: var(--site-ink, #444);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.tool-dialog-head p {
  margin: 0;
  color: rgba(68, 68, 68, 0.72);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.tool-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.tool-dialog-btn {
  min-width: 88px;
  min-height: 38px;
  border-radius: 6px !important;
  border: 1px solid rgba(68, 68, 68, 0.12) !important;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.tool-dialog-btn.primary {
  color: #fff !important;
  background: linear-gradient(
    135deg,
    var(--site-pink, #f391a9),
    var(--site-mint, #44d7b6)
  ) !important;
  box-shadow: 0 10px 22px rgba(68, 215, 182, 0.18) !important;
}

.tool-dialog-btn.ghost {
  color: var(--site-ink, #444) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
}

.quote-profile-panel {
  margin-top: var(--spacing-lg, 18px);
  border: 1px solid rgba(68, 68, 68, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.76),
      rgba(255, 255, 255, 0.54)
    ),
    linear-gradient(90deg, rgba(243, 145, 169, 0.1), rgba(68, 215, 182, 0.1));
}

.quote-profile-summary {
  padding: 14px;
}

.quote-profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-profile-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-profile-badge {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--site-pink, #f391a9),
    var(--site-mint, #44d7b6)
  );
  box-shadow: 0 8px 18px rgba(68, 215, 182, 0.16);
}

.quote-profile-title strong,
.quote-profile-title small {
  display: block;
}

.quote-profile-title strong {
  color: var(--site-ink, #444);
  font-size: 15px;
  line-height: 1.25;
}

.quote-profile-title small {
  margin-top: 2px;
  color: var(--site-muted, #777);
  font-size: 12px;
  font-weight: 700;
}

.quote-profile-toggle {
  width: auto !important;
  min-width: 76px;
  min-height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 800;
  white-space: nowrap;
}

.quote-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.quote-profile-chip,
.quote-profile-more,
.quote-profile-empty {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.quote-profile-chip,
.quote-profile-more {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(68, 68, 68, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.quote-profile-chip {
  gap: 5px;
}

.quote-profile-chip strong {
  flex: 0 0 auto;
  color: var(--site-muted, #777);
}

.quote-profile-chip span {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  color: var(--site-ink, #444);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-profile-more {
  color: var(--site-muted, #777);
  font-weight: 800;
}

.quote-profile-empty {
  color: var(--site-muted, #777);
}

.quote-profile-form {
  padding: 14px;
  border-top: 1px solid rgba(68, 68, 68, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.quote-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quote-profile-grid .wide {
  grid-column: 1 / -1;
}

.quote-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.quote-profile-actions .action-button {
  margin: 0;
}

.quote-profile-actions .secondary-button {
  width: auto;
  min-width: 96px;
  margin: 0;
}

@keyframes toolToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toolToastOut {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

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

@keyframes toolDialogFadeOut {
  to {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .tool-toast-host {
    top: 12px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .tool-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quote-profile-grid,
  .quote-profile-actions {
    grid-template-columns: 1fr;
  }

  .quote-profile-title-row {
    align-items: flex-start;
  }

  .quote-profile-chip span {
    max-width: min(190px, 54vw);
  }
}
