:root {
  color-scheme: light;
  --bg: #ddfbef;
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.9);
  --ink: #09231d;
  --text: #243833;
  --muted: #647a73;
  --line: rgba(7, 133, 103, 0.16);
  --line-strong: rgba(7, 133, 103, 0.3);
  --accent: #0fa57f;
  --accent-dark: #06725c;
  --accent-soft: #e8fff7;
  --danger: #b43e47;
  --amber: #9a6a12;
  --focus: rgba(15, 165, 127, 0.22);
  --shadow: 0 24px 70px rgba(7, 77, 59, 0.16);
  --shadow-soft: 0 14px 38px rgba(7, 77, 59, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.96), transparent 260px),
    radial-gradient(circle at 82% 12%, rgba(95, 237, 196, 0.58), transparent 260px),
    radial-gradient(circle at 8% 38%, rgba(255, 255, 255, 0.7), transparent 240px),
    linear-gradient(180deg, #dffdef 0%, #f4fff9 48%, #e3f8ef 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 114, 92, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6, 114, 92, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 74%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100% - 16px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.site-header {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-bottom: 34px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 12px;
  min-height: 62px;
  padding: 9px 18px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand-dot {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #083227, #0fa57f);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.16);
}

.brand-name {
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.status-grid {
  display: grid;
  width: 100%;
  gap: 8px;
}

.status-pill,
.tiny-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 10px 24px rgba(7, 77, 59, 0.08);
  backdrop-filter: blur(18px);
}

.status-pill::before,
.tiny-status::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #a8bbb4;
}

.status-pill.good,
.tiny-status.good {
  color: var(--accent-dark);
}

.status-pill.good::before,
.tiny-status.good::before {
  background: var(--accent);
}

.status-pill.warn,
.tiny-status.warn {
  color: var(--amber);
}

.status-pill.warn::before,
.tiny-status.warn::before {
  background: #d99a16;
}

.status-pill.bad,
.tiny-status.bad {
  color: var(--danger);
}

.status-pill.bad::before,
.tiny-status.bad::before {
  background: var(--danger);
}

.hero-panel,
.workspace {
  display: grid;
  gap: 14px;
}

.hero-panel {
  margin-bottom: 14px;
}

.hero-copy,
.control-strip,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(223, 255, 244, 0.66)),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-copy {
  padding: 34px 30px 30px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-kicker {
  color: var(--muted);
  font-size: 11px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 340px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 48px;
  line-height: 1.02;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

.hero-subtitle {
  margin: 20px 0 0;
  color: #435a53;
  font-size: 15px;
  line-height: 1.75;
}

.hero-slogan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 28px rgba(7, 77, 59, 0.08);
}

.hero-slogan strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.5;
}

.slogan-emoji {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.control-strip {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tabs {
  display: flex;
  gap: 9px;
  margin: 0 0 14px;
  overflow-x: auto;
  padding: 3px 2px 8px;
}

.tab {
  flex: 0 0 auto;
  min-width: 138px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #536961;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(7, 77, 59, 0.09);
}

.tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.panel {
  background: rgba(255, 255, 255, 0.78);
}

.form-panel {
  min-height: auto;
}

.result-panel {
  overflow: hidden;
}

.tab-panel {
  display: none;
  padding: 22px;
}

.tab-panel.active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.field.grow {
  margin-bottom: 0;
}

.field span,
.check-row span {
  color: #526961;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  outline: none;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  min-height: 158px;
  line-height: 1.55;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.mode-fields.hidden,
.hidden {
  display: none;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 3px 0 15px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.btn,
.text-action {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 900;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 26px rgba(16, 169, 130, 0.25);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  border-color: rgba(16, 169, 130, 0.32);
  background: rgba(232, 255, 246, 0.9);
  color: var(--accent-dark);
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: #526961;
}

.text-action {
  min-height: 38px;
  padding: 0 13px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-dark);
}

.progress {
  height: 4px;
  background: rgba(14, 95, 76, 0.1);
  overflow: hidden;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.progress.active span {
  animation: loading 1.4s ease-in-out infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-70%);
    width: 48%;
  }
  50% {
    width: 68%;
  }
  100% {
    transform: translateX(210%);
    width: 48%;
  }
}

.result-box {
  padding: 18px 20px 22px;
  min-height: 300px;
  overflow: auto;
}

.result-box.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.result-title strong {
  font-size: 18px;
  color: var(--ink);
}

.kv {
  display: grid;
}

.kv-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(14, 95, 76, 0.1);
}

.kv-row dt {
  color: #526961;
  font-weight: 900;
}

.kv-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.message {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 13px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.message.good {
  border-color: rgba(16, 169, 130, 0.3);
  background: var(--accent-soft);
}

.message.bad {
  border-color: rgba(180, 62, 71, 0.22);
  background: #fff1f2;
}

.message.warn {
  border-color: rgba(154, 106, 18, 0.24);
  background: #fff8e8;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.batch-table th,
.batch-table td {
  border-bottom: 1px solid rgba(14, 95, 76, 0.1);
  padding: 10px 6px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.batch-table th {
  color: #526961;
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100% - 12px, 420px);
  }

  .hero-copy {
    padding: 30px 26px 26px;
  }

  h1 {
    font-size: 42px;
  }

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

  .hero-slogan {
    padding: 15px 13px;
  }
}
