:root {
  --bg: #f1f5f4;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --text: #14201d;
  --muted: #5b6c66;
  --line: #d8e3df;
  --line-strong: #bed0c9;
  --blue: #0f766e;
  --blue-dark: #0b5f59;
  --gold: #c9912f;
  --green: #11845b;
  --red: #d73d4a;
  --amber: #a56a12;
  --shadow: 0 22px 54px rgba(20, 32, 29, 0.13);
  --shadow-soft: 0 12px 30px rgba(20, 32, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(201, 145, 47, 0.16), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(232, 240, 237, 0.96)),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

h1,
h2,
p {
  margin: 0;
}

.tool-shell {
  position: relative;
  width: min(1040px, calc(100% - 1.25rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.6rem 0;
  display: grid;
  align-content: center;
  gap: 0;
}

.tool-header,
.tool-body,
.source-note {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6rem;
  border-radius: 14px 14px 0 0;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

.brand-logo {
  flex: 0 0 auto;
  width: 4.2rem;
  height: 4.2rem;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  padding: 0.32rem;
  background: #fff;
  object-fit: contain;
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 0.22rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.tagline {
  margin-top: 0.34rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 750;
}

.unit-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.7rem;
  color: #7a5214;
  background: #fff8eb;
  border-color: rgba(201, 145, 47, 0.34);
  font-size: 0.78rem;
  font-weight: 800;
}

.tool-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 1.05rem;
  padding: 1.05rem;
  border-top: 0;
}

.judge-form {
  display: grid;
  gap: 0.8rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.95rem;
  background: var(--panel-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

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

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

.judge-form label {
  display: grid;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.wide,
.model-meta {
  grid-column: 1 / -1;
}

.model-meta {
  min-height: 1.25rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.58rem 0.68rem;
  color: var(--text);
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

select {
  cursor: pointer;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

small {
  margin-top: -0.05rem;
  color: #748094;
  font-size: 0.76rem;
  font-weight: 750;
}

.price-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.2rem;
  gap: 0.45rem;
  align-items: center;
}

.confirm-button {
  min-height: 2.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.confirm-button:hover {
  border-color: var(--blue);
  background: #edfdfa;
  box-shadow: none;
}

.confirm-button.confirmed {
  border-color: rgba(15, 143, 101, 0.34);
  color: #fff;
  background: var(--green);
}

.optional {
  opacity: 0.72;
}

button[type="submit"] {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #148478);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button[type="submit"]:hover {
  background: var(--blue-dark);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.24);
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

.result-panel {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.78), rgba(255, 255, 255, 0) 9rem),
    #fff;
  box-shadow: var(--shadow-soft);
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border-radius: 999px;
  padding: 0 0.65rem;
  color: #fff;
  background: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
}

.status-pill.good {
  background: var(--green);
}

.status-pill.warn {
  background: var(--amber);
}

.status-pill.bad {
  background: var(--red);
}

h2 {
  min-width: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.result-panel p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.official-line {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--panel-soft);
  overflow-wrap: anywhere;
}

.result-list {
  display: grid;
  gap: 0.55rem;
}

.result-row {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.68rem;
  background: rgba(248, 250, 249, 0.92);
}

.result-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.result-row strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.source-note {
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 0.76rem 1.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.source-note a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.source-note a:hover {
  text-decoration: underline;
}

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

@media (max-width: 860px) {
  .tool-shell {
    align-content: start;
  }

  .tool-body {
    grid-template-columns: 1fr;
  }

  .status-head {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .tool-shell {
    width: min(100% - 0.7rem, 980px);
    padding: 0.45rem 0;
  }

  .tool-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-logo {
    width: 3.6rem;
    height: 3.6rem;
  }

  .tool-body,
  fieldset,
  .result-panel {
    padding: 0.75rem;
  }

  .field-group,
  .grid-3,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .price-control {
    grid-template-columns: minmax(0, 1fr) 4.8rem;
  }

  h2 {
    text-align: left;
  }
}
