:root {
  --wr-ink: #2c1f18;
  --wr-paper: rgba(255, 251, 242, 0.9);
  --wr-paper-deep: rgba(244, 232, 209, 0.95);
  --wr-line: #8c7a5f;
  --wr-accent: #6e311f;
  --wr-accent-hover: #8f4f38;
  --wr-accent-text: #fff9ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 14px;
  color: var(--wr-ink);
  font-family: "Book Antiqua", Palatino, "Palatino Linotype", Georgia, serif;
  line-height: 1.45;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(239, 226, 202, 0.25), rgba(210, 193, 159, 0.25));
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: #7a2f1f;
}

a:hover,
a:focus-visible {
  color: #4b1b12;
}

table {
  max-width: 100%;
}

table.results,
table.altrowstable,
table.gridtable {
  display: block;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--wr-line);
  background: var(--wr-paper);
}

table.results {
  background: transparent;
}

table.results td,
table.results th,
table.altrowstable td,
table.altrowstable th,
table.gridtable td,
table.gridtable th {
  border-color: var(--wr-line) !important;
  color: var(--wr-ink);
}

table.results tr,
table.results tr.odd,
table.altrowstable tr,
table.gridtable tr {
  background-color: transparent !important;
}

input,
select,
textarea,
button {
  max-width: 100%;
  border: 1px solid var(--wr-line);
  border-radius: 8px;
  background: var(--wr-paper);
  color: var(--wr-ink);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.98rem;
}

input[type="submit"],
button,
input[type="button"] {
  border: 2px solid #2e120c;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wr-accent), #42170f);
  color: var(--wr-accent-text);
  font-weight: 700;
  cursor: pointer;
}

input[type="submit"]:hover,
button:hover,
input[type="button"]:hover {
  background: linear-gradient(180deg, var(--wr-accent-hover), #542014);
}

hr {
  border: 0;
  border-top: 1px solid var(--wr-line);
}

img {
  max-width: 100%;
  height: auto;
}

.wr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}

.wr-btn {
  display: inline-block;
  text-decoration: none;
  border: 2px solid #2e120c;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wr-accent), #42170f);
  color: var(--wr-accent-text) !important;
  padding: 7px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.wr-btn:hover,
.wr-btn:focus-visible {
  background: linear-gradient(180deg, var(--wr-accent-hover), #542014);
  color: #ffffff !important;
}

.wr-results-wrap {
  overflow-x: auto;
  text-align: center;
}

table.results.wr-results-fit {
  display: inline-table;
  width: auto !important;
  max-width: none;
  margin: 0 auto;
}

@media (max-width: 900px) {
  body {
    padding: 10px;
  }

  font[size="6"] {
    font-size: 1.7rem !important;
  }

  font[size="5"] {
    font-size: 1.25rem !important;
  }

  table[width],
  td[width] {
    width: auto !important;
  }

  input[type="file"] {
    width: 100%;
  }
}
