:root {
  --brown: #422719;
  --brown-dark: #2c190f;
  --gold: #c99a43;
  --gold-light: #f4e5c5;
  --cream: #fbf7ef;
  --white: #fffefa;
  --text: #35291f;
  --muted: #8b8075;
  --border: #eadfce;
  --green: #52704b;
  --red: #b94335;
  --shadow: 0 8px 28px rgba(65,39,23,.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Microsoft YaHei", sans-serif;
}

header {
  background: linear-gradient(135deg, var(--brown-dark), #684128);
  color: #fff8e9;
  padding: 28px 0;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 18px rgba(44,25,15,.14);
}

header h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 1px;
}

header span {
  display: inline-block;
  margin-top: 5px;
  color: #e8d3ad;
  font-size: 13px;
  letter-spacing: 1px;
}

.wrap {
  width: min(100% - 32px, 1050px);
  margin: auto;
}

main {
  padding: 28px 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 22px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
}

.panel h2 {
  color: var(--brown);
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--gold);
}

.panel h3 {
  color: var(--brown);
}

.line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

input,
select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
  flex: 1;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border .2s, box-shadow .2s;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,154,67,.13);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #b9822e, #d4aa5e);
  color: #2d1b0e;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s, filter .15s;
}

button:hover {
  filter: brightness(1.05);
}

button:active {
  transform: scale(.98);
}

button.secondary {
  background: #f2e9d9;
  color: var(--brown);
  border: 1px solid #e7d8bd;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.plan {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #fffefa, #fbf2e3);
  border: 1px solid #e7d5b4;
  border-radius: 15px;
  padding: 19px;
  transition: transform .2s, box-shadow .2s;
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(65,39,23,.10);
}

.plan h3 {
  margin: 0;
  font-size: 18px;
}

.price {
  font-size: 29px;
  font-weight: 850;
  color: #a56d22;
  margin: 10px 0;
}

.plan p {
  color: #796d5f;
  min-height: 42px;
  font-size: 13px;
}

.plan button {
  width: 100%;
  margin-top: 5px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.stat {
  padding: 17px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf2e3, #f5e5c8);
  border: 1px solid #edddc0;
  color: #725638;
  font-size: 13px;
}

.stat b {
  display: block;
  font-size: 25px;
  color: var(--brown);
  margin-top: 4px;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.formgrid label {
  font-size: 13px;
  color: #796d5f;
}

.formgrid input,
.formgrid select {
  display: block;
  width: 100%;
  margin-top: 5px;
}

.tablewrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  background: white;
}

th,
td {
  text-align: left;
  padding: 11px;
  border-bottom: 1px solid #f0e8dc;
  white-space: nowrap;
}

th {
  color: var(--brown);
  background: #f8f0e2;
  font-weight: 750;
}

tr:last-child td {
  border-bottom: 0;
}

.hidden {
  display: none !important;
}

.good {
  color: var(--green);
}

.bad {
  color: var(--red);
}

.qr {
  padding: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: inline-block;
  margin: 10px 0;
}

footer {
  text-align: center;
  color: #9b8c7b;
  padding: 24px 15px;
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: #f7f0e5;
}

@media (max-width: 600px) {
  header {
    padding: 23px 0;
  }

  header h1 {
    font-size: 21px;
  }

  .wrap {
    width: min(100% - 22px, 1050px);
  }

  main {
    padding: 17px 0;
  }

  .panel {
    padding: 16px;
    border-radius: 14px;
  }

  .panel h2 {
    font-size: 17px;
  }

  .line input {
    flex-basis: 100%;
    width: 100%;
  }

  .line button {
    width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
  }

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

  .stat {
    padding: 13px;
  }

  .stat b {
    font-size: 22px;
  }

  .formgrid {
    grid-template-columns: 1fr;
  }
}
