:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #17201f;
  background: #eef2f0;
  --green: #1f6f5b;
  --green-dark: #155746;
  --coral: #b9483e;
  --ink: #17201f;
  --muted: #687370;
  --line: #d8e0dd;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #eef2f0;
}

button,
input {
  font: inherit;
}

button {
  min-height: 48px;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--green);
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid #b9c5c1;
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.14);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 430px);
  height: 60px;
  margin: 0 auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--green);
}

.page-shell {
  width: min(100%, 430px);
  min-height: calc(100vh - 60px);
  margin: 0 auto;
  padding: 12px 0 48px;
  background: #f7f9f8;
}

.banner {
  position: relative;
  width: calc(100% - 24px);
  height: 202px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d4ddd9;
  border-radius: 8px;
  background: #ffffff;
}

.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% center;
  opacity: 0.68;
}

.banner-copy {
  position: relative;
  width: 74%;
  padding: 38px 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.3;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
}

.query-section {
  position: relative;
  z-index: 1;
  width: calc(100% - 24px);
  margin: -22px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(23, 32, 31, 0.08);
}

.search-form label {
  display: block;
  margin-bottom: 9px;
  font-size: 16px;
  font-weight: 800;
}

.search-row {
  display: grid;
  gap: 10px;
}

.search-row button {
  width: 100%;
}

.status {
  min-height: 22px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status.error {
  color: #a43730;
}

.results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.result-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 18px;
  background: #f8fbf9;
}

.result-label {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.result-item > p:last-child {
  margin: 10px 0 0;
  color: #3e4b48;
  font-size: 14px;
  line-height: 1.7;
}

.secondary-button {
  border-color: #aebbb7;
  color: #33413e;
  background: #ffffff;
}

.secondary-button:hover {
  background: #eef2f0;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-page {
  padding: 20px 12px 40px;
}

.admin-shell {
  width: min(100%, 680px);
  margin: 0 auto;
}

.admin-heading {
  margin-bottom: 18px;
}

.admin-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mapping-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 31, 0.07);
}

.mapping-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mapping-header,
.mapping-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.mapping-header {
  border-bottom: 1px solid var(--line);
  color: #485451;
  background: #eef3f1;
  font-size: 12px;
  font-weight: 800;
}

.mapping-row {
  border-bottom: 1px solid #e6ebe9;
}

.mapping-row:last-child {
  border-bottom: 0;
}

.sheet-name {
  font-size: 14px;
  font-weight: 800;
}

.mapping-row input {
  height: 44px;
  font-size: 14px;
}

@media (min-width: 600px) {
  .topbar,
  .page-shell {
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}
