:root {
  color-scheme: light;
  --forest: #183e35;
  --leaf: #255c47;
  --muted: #5e6c63;
  --line: #d7dfd6;
  --paper: #f8f9f5;
  --card: #fff;
  --green: #e6f2e7;
  --ink: #203029;
  --bad: #963d32;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    14px/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 14px;
}
small,
.sub,
.crumb,
time {
  color: var(--muted);
}
small {
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  text-decoration: none;
  color: inherit;
}
button:hover,
.button:hover {
  background: var(--green);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #b38f41;
  outline-offset: 2px;
}
.primary,
.primary:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}
.danger {
  color: var(--bad);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--forest);
  color: #f4f8ee;
  padding: 14px 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand i {
  font: italic 700 32px/1 Georgia;
  color: #cee5aa;
}
.brand b {
  font-size: 23px;
  letter-spacing: 2px;
}
.brand span {
  border-left: 1px solid #769084;
  padding-left: 13px;
}
.shell {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}
nav {
  background: #eff2eb;
  border-right: 1px solid var(--line);
  padding: 20px 12px;
}
nav p {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  padding: 12px 10px 5px;
}
nav button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  text-align: left;
}
nav button.active {
  color: #fff;
  background: var(--forest);
}
main {
  padding: 25px clamp(16px, 3vw, 45px);
  min-width: 0;
  max-width: 1550px;
  width: 100%;
  margin: auto auto 0;
  align-self: start;
  margin-top: 0;
}
.crumb {
  font-size: 12px;
}
.title,
.bar,
.actions,
.dialogtitle,
.spread,
footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.title,
.spread,
.dialogtitle {
  justify-content: space-between;
}
.title {
  margin: 14px 0 20px;
}
.panel,
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 16px;
  overflow: hidden;
}
.pad {
  padding: 16px;
}
.bar {
  padding: 12px 15px;
}
.tabs {
  display: flex;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tabs button,
.link {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--leaf);
}
.tabs button {
  padding: 12px 0;
  border-bottom: 2px solid transparent;
}
.tabs button.on {
  border-bottom-color: var(--leaf);
  font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.tile {
  margin: 0;
  padding: 18px;
  text-align: left;
}
.tile b {
  display: block;
  margin: 5px 0;
  font-size: 19px;
}
.tile.feature {
  background: var(--forest);
  color: #fff;
}
.feature small {
  color: #c4dfcd;
}
.badge {
  display: inline-block;
  background: var(--green);
  color: var(--leaf);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
}
.pro {
  background: #f2e9cd;
  color: #73591c;
}
.scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
td,
th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: var(--paper);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
td {
  font-size: 13px;
}
td small {
  font-size: 12px;
}
.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.controls {
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
}
.empty {
  color: var(--muted);
  padding: 25px;
  text-align: center;
}
.foot {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 9px;
  background: #fff;
  max-width: 100%;
}
label {
  display: grid;
  gap: 5px;
}
textarea {
  min-height: 73px;
  resize: vertical;
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 20px;
  color: var(--ink);
}
dialog::backdrop {
  background: #163a2e55;
}
.dialogtitle {
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  margin-bottom: 18px;
}
#fields,
.stack {
  display: grid;
  gap: 15px;
}
dl {
  margin: 4px 0;
}
dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
footer {
  justify-content: flex-end;
  margin-top: 18px;
}
#problem {
  color: var(--bad);
  margin-top: 10px;
}
#menu {
  position: fixed;
  z-index: 4;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  min-width: 150px;
  background: #fff;
  box-shadow: 0 5px 24px #183e3529;
}
#menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
}
#toast:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--forest);
  color: white;
  padding: 9px 16px;
  border-radius: 7px;
  z-index: 10;
}
.history article {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.history article p {
  margin-top: 4px;
}
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
}
.catalog img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.media {
  max-width: 100%;
  max-height: 300px;
}
#operator {
  font-size: 13px;
}
output {
  display: block;
  color: var(--leaf);
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  nav {
    display: flex;
    overflow: auto;
    padding: 5px;
  }
  nav p {
    display: none;
  }
  nav button {
    width: auto;
    white-space: nowrap;
  }
  header {
    padding: 10px;
  }
  main {
    padding: 13px;
  }
  td,
  th {
    padding: 7px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile {
    padding: 12px;
  }
  .scroll table {
    min-width: 560px;
  }
}
