[data-tool-root="whr-calculator"] {
  --whr-space-xs: 4px;
  --whr-space-sm: 8px;
  --whr-space-md: 12px;
  --whr-space-lg: 16px;
  --whr-space-xl: 24px;
  --whr-space-2xl: 32px;
  --whr-space-3xl: 48px;
  --whr-gray-50: #fbfbfb;
  --whr-gray-100: #f7f7f7;
  --whr-gray-150: #f2f2f2;
  --whr-gray-200: #eeeeee;
  --whr-gray-300: #dddddd;
  --whr-gray-400: #bbbbbb;
  --whr-gray-600: #666666;
  --whr-gray-800: #222222;
  --whr-gray-900: #111111;
  --whr-success: #276749;
  --whr-danger: #a12424;
  --whr-radius-sm: 4px;
  --whr-radius: 6px;
  --whr-radius-round: 999px;
  --whr-font: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
  width: 100%;
  padding: 0 360px 48px 30px;
  color: var(--whr-gray-900);
  background: #fff;
  font: 15px/1.7 var(--whr-font);
}

[data-tool-root="whr-calculator"],
[data-tool-root="whr-calculator"] *,
[data-tool-root="whr-calculator"] *::before,
[data-tool-root="whr-calculator"] *::after { box-sizing: border-box; }

[data-tool-root="whr-calculator"] :focus-visible {
  outline: 2px solid var(--whr-gray-900);
  outline-offset: 2px;
}

[data-tool-root="whr-calculator"] .whr-preview-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--whr-space-sm);
  min-height: 48px;
  border-bottom: 1px solid var(--whr-gray-300);
}

[data-tool-root="whr-calculator"] .whr-preview-bar label {
  color: var(--whr-gray-600);
  font-size: 13px;
  font-weight: 700;
}

[data-tool-root="whr-calculator"] .whr-preview-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--whr-gray-300);
}

[data-tool-root="whr-calculator"] .whr-preview-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.5px;
}

[data-tool-root="whr-calculator"] .whr-page-description {
  max-width: 72ch;
  margin: 4px 0 0;
  color: var(--whr-gray-600);
}

[data-tool-root="whr-calculator"] .whr-preview-note {
  margin: 8px 0 0;
  color: var(--whr-gray-600);
  font-size: 13px;
}

[data-tool-root="whr-calculator"] .whr-content-column { padding-top: 16px; }

[data-tool-root="whr-calculator"] h2 {
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--whr-gray-900);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

[data-tool-root="whr-calculator"] .whr-content-column > h2:first-child { margin-top: 0; }

[data-tool-root="whr-calculator"] h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

[data-tool-root="whr-calculator"] .whr-card {
  margin: 0 0 16px;
  padding: 16px 24px;
  background: var(--whr-gray-100);
  border: 1px solid var(--whr-gray-300);
  border-radius: var(--whr-radius);
}

[data-tool-root="whr-calculator"] .whr-tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 12px;
}

[data-tool-root="whr-calculator"] .whr-panel {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--whr-gray-300);
  border-radius: var(--whr-radius);
}

[data-tool-root="whr-calculator"] .whr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

[data-tool-root="whr-calculator"] .whr-field { min-width: 0; }
[data-tool-root="whr-calculator"] .whr-field-full { grid-column: 1 / -1; }

[data-tool-root="whr-calculator"] label,
[data-tool-root="whr-calculator"] .whr-label {
  display: block;
  margin-bottom: 4px;
  color: #444;
  font-size: 13px;
  font-weight: 700;
}

[data-tool-root="whr-calculator"] .whr-required { color: var(--whr-danger); }

[data-tool-root="whr-calculator"] .whr-optional {
  display: inline-block;
  margin-left: 4px;
  color: var(--whr-gray-600);
  font-size: 12px;
  font-weight: 400;
}

[data-tool-root="whr-calculator"] .whr-input-wrap { position: relative; }

[data-tool-root="whr-calculator"] .whr-input,
[data-tool-root="whr-calculator"] .whr-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--whr-gray-900);
  background: #fff;
  border: 1px solid var(--whr-gray-300);
  border-radius: var(--whr-radius);
  font: 15px/1 var(--whr-font);
  font-variant-numeric: tabular-nums;
}

[data-tool-root="whr-calculator"] .whr-input { padding-right: 52px; }
[data-tool-root="whr-calculator"] .whr-input::placeholder { color: #999; }
[data-tool-root="whr-calculator"] .whr-input:focus,
[data-tool-root="whr-calculator"] .whr-select:focus { border-color: var(--whr-gray-900); }
[data-tool-root="whr-calculator"] .whr-input[aria-invalid="true"],
[data-tool-root="whr-calculator"] .whr-select[aria-invalid="true"] { border-color: var(--whr-danger); }

[data-tool-root="whr-calculator"] .whr-language-select { width: min(220px, 48vw); }

[data-tool-root="whr-calculator"] .whr-unit-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--whr-gray-600);
  pointer-events: none;
}

[data-tool-root="whr-calculator"] .whr-help,
[data-tool-root="whr-calculator"] .whr-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
}

[data-tool-root="whr-calculator"] .whr-help { color: var(--whr-gray-600); }
[data-tool-root="whr-calculator"] .whr-error { min-height: 19px; color: var(--whr-danger); }

[data-tool-root="whr-calculator"] .whr-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--whr-gray-150);
  border: 1px solid var(--whr-gray-300);
  border-radius: var(--whr-radius);
}

[data-tool-root="whr-calculator"] .whr-segment {
  min-height: 36px;
  padding: 0 12px;
  color: var(--whr-gray-900);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--whr-radius-sm);
  font: 600 14px/1 var(--whr-font);
  cursor: pointer;
}

[data-tool-root="whr-calculator"] .whr-segment:hover { background: var(--whr-gray-200); }
[data-tool-root="whr-calculator"] .whr-segment[aria-pressed="true"] { color: #fff; background: var(--whr-gray-900); }

[data-tool-root="whr-calculator"] .whr-presets,
[data-tool-root="whr-calculator"] .whr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

[data-tool-root="whr-calculator"] .whr-chip,
[data-tool-root="whr-calculator"] .whr-button {
  min-height: 44px;
  padding: 0 16px;
  color: var(--whr-gray-900);
  background: #fff;
  border: 1px solid var(--whr-gray-300);
  border-radius: var(--whr-radius);
  font: 600 14px/1.2 var(--whr-font);
  cursor: pointer;
}

[data-tool-root="whr-calculator"] .whr-chip { border-radius: var(--whr-radius-round); }
[data-tool-root="whr-calculator"] .whr-chip:hover,
[data-tool-root="whr-calculator"] .whr-button:hover { background: var(--whr-gray-200); }
[data-tool-root="whr-calculator"] .whr-button:active,
[data-tool-root="whr-calculator"] .whr-chip:active { transform: translateY(1px); }
[data-tool-root="whr-calculator"] .whr-button-primary { color: #fff; background: var(--whr-gray-900); border-color: var(--whr-gray-900); }
[data-tool-root="whr-calculator"] .whr-button-primary:hover { background: var(--whr-gray-800); }
[data-tool-root="whr-calculator"] .whr-button:disabled { color: #999; background: var(--whr-gray-200); cursor: not-allowed; }

[data-tool-root="whr-calculator"] .whr-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--whr-success);
}

[data-tool-root="whr-calculator"] .whr-error-summary {
  margin-top: 12px;
  padding: 12px;
  color: var(--whr-danger);
  background: #fff;
  border: 1px solid var(--whr-danger);
  border-radius: var(--whr-radius);
}

[data-tool-root="whr-calculator"] .whr-result-panel { display: flex; flex-direction: column; }

[data-tool-root="whr-calculator"] .whr-result-strong {
  padding: 24px;
  color: #fff;
  background: var(--whr-gray-900);
  border-radius: var(--whr-radius);
}

[data-tool-root="whr-calculator"] .whr-result-label,
[data-tool-root="whr-calculator"] .whr-result-caption { display: block; color: rgba(255,255,255,.76); }
[data-tool-root="whr-calculator"] .whr-result-value { display: block; margin: 4px 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.1; font-variant-numeric: tabular-nums; }

[data-tool-root="whr-calculator"] .whr-gauge { margin-top: 16px; }
[data-tool-root="whr-calculator"] .whr-gauge-track { position: relative; height: 12px; background: var(--whr-gray-200); border: 1px solid var(--whr-gray-300); border-radius: var(--whr-radius-round); }
[data-tool-root="whr-calculator"] .whr-gauge-threshold { position: absolute; top: -5px; width: 2px; height: 22px; background: var(--whr-danger); transform: translateX(-1px); }
[data-tool-root="whr-calculator"] .whr-gauge-marker { position: absolute; top: 50%; width: 14px; height: 14px; background: var(--whr-gray-900); border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); }
[data-tool-root="whr-calculator"] .whr-gauge-labels { display: flex; justify-content: space-between; margin-top: 4px; color: var(--whr-gray-600); font-size: 12px; font-variant-numeric: tabular-nums; }

[data-tool-root="whr-calculator"] .whr-result-list { margin: 16px 0 0; }
[data-tool-root="whr-calculator"] .whr-result-list div { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 1.4fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--whr-gray-300); }
[data-tool-root="whr-calculator"] .whr-result-list dt { color: var(--whr-gray-600); }
[data-tool-root="whr-calculator"] .whr-result-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
[data-tool-root="whr-calculator"] .whr-result-note { margin: 12px 0 0; font-weight: 700; }
[data-tool-root="whr-calculator"] .whr-source-inline { margin: 4px 0 0; color: var(--whr-gray-600); }
[data-tool-root="whr-calculator"] .whr-result-actions { margin-top: auto; padding-top: 16px; }

[data-tool-root="whr-calculator"] .whr-key-points,
[data-tool-root="whr-calculator"] .whr-limitations,
[data-tool-root="whr-calculator"] .whr-source-list { margin: 0; padding-left: 22px; }
[data-tool-root="whr-calculator"] .whr-key-points li + li,
[data-tool-root="whr-calculator"] .whr-limitations li + li,
[data-tool-root="whr-calculator"] .whr-source-list li + li { margin-top: 8px; }
[data-tool-root="whr-calculator"] .whr-caution { font-weight: 700; }

[data-tool-root="whr-calculator"] .whr-how-to { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: whr-step; }
[data-tool-root="whr-calculator"] .whr-how-to li { padding: 14px; background: #fff; border: 1px solid var(--whr-gray-300); border-radius: var(--whr-radius); counter-increment: whr-step; }
[data-tool-root="whr-calculator"] .whr-how-to li::before { content: counter(whr-step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px; color: #fff; background: var(--whr-gray-900); border-radius: 50%; font-weight: 700; }
[data-tool-root="whr-calculator"] .whr-how-to strong,
[data-tool-root="whr-calculator"] .whr-how-to span { display: block; }
[data-tool-root="whr-calculator"] .whr-how-to span { margin-top: 4px; color: #444; }

[data-tool-root="whr-calculator"] .whr-accordion { padding-block: 0; }
[data-tool-root="whr-calculator"] .whr-accordion details + details { border-top: 1px solid var(--whr-gray-300); }
[data-tool-root="whr-calculator"] .whr-accordion summary { display: flex; align-items: center; min-height: 52px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
[data-tool-root="whr-calculator"] .whr-accordion summary::-webkit-details-marker { display: none; }
[data-tool-root="whr-calculator"] .whr-accordion summary::after { content: "+"; margin-left: auto; color: var(--whr-gray-600); font-size: 20px; }
[data-tool-root="whr-calculator"] .whr-accordion details[open] summary::after { content: "−"; }
[data-tool-root="whr-calculator"] .whr-accordion details[open] summary { border-bottom: 1px solid var(--whr-gray-300); }
[data-tool-root="whr-calculator"] .whr-accordion details > p,
[data-tool-root="whr-calculator"] .whr-accordion details > ul { margin-top: 12px; margin-bottom: 16px; }
[data-tool-root="whr-calculator"] .whr-source-list a { color: var(--whr-gray-900); text-decoration-thickness: 1px; text-underline-offset: 3px; }

[data-tool-root="whr-calculator"] .whr-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100vw - 24px);
  padding: 10px 16px;
  color: #fff;
  background: var(--whr-gray-900);
  border-radius: var(--whr-radius);
  transform: translateX(-50%);
}

[data-tool-root="whr-calculator"] .whr-toast[hidden] { display: none; }

@media (max-width: 900px) {
  [data-tool-root="whr-calculator"] { padding-right: 8px; padding-left: 8px; }
}

@media (max-width: 720px) {
  [data-tool-root="whr-calculator"] .whr-tool-grid,
  [data-tool-root="whr-calculator"] .whr-form-grid,
  [data-tool-root="whr-calculator"] .whr-how-to { grid-template-columns: 1fr; gap: 8px; }
  [data-tool-root="whr-calculator"] .whr-field-full { grid-column: auto; }
  [data-tool-root="whr-calculator"] .whr-card { padding-right: 14px; padding-left: 14px; }
}

@media (max-width: 430px) {
  [data-tool-root="whr-calculator"] .whr-preview-bar { justify-content: stretch; align-items: stretch; flex-direction: column; padding: 8px 0; }
  [data-tool-root="whr-calculator"] .whr-language-select { width: 100%; }
  [data-tool-root="whr-calculator"] .whr-actions .whr-button { flex: 1 1 100%; }
  [data-tool-root="whr-calculator"] .whr-result-list div { grid-template-columns: 1fr; gap: 2px; }
  [data-tool-root="whr-calculator"] .whr-result-list dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  [data-tool-root="whr-calculator"],
  [data-tool-root="whr-calculator"] *,
  [data-tool-root="whr-calculator"] *::before,
  [data-tool-root="whr-calculator"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
[data-tool-root="whr-calculator"] .whr-status[data-tone="error"] { color: var(--whr-danger); }
[data-tool-root="whr-calculator"] .whr-status[data-tone="success"] { color: var(--whr-success); }
