:root {
  --green: #315d49;
  --pale: #edf2e9;
  --line: #dce2d9;
  --ink: #26392e;
  --muted: #738075;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    14px/1.6 "Yu Gothic UI",
    "Meiryo",
    sans-serif;
  background: #fafbf8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 7px 12px;
}
button:hover {
  background: var(--pale);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
a {
  color: var(--green);
  text-decoration: none;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 25px;
}
h2 {
  font-size: 20px;
}
small {
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #cbd5cb;
  border-radius: 4px;
  padding: 8px;
  background: white;
  max-width: 100%;
  color: var(--ink);
}
label {
  display: block;
  font-size: 13px;
}
label input:not([type="checkbox"]),
label select,
label textarea {
  display: block;
  width: 100%;
  margin: 4px 0 12px;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
.shop-header {
  height: 100px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  gap: 20px;
}
.brand {
  font-size: 24px;
  font-weight: bold;
  white-space: nowrap;
}
.brand span {
  display: block;
  font-size: 10px;
  letter-spacing: 4px;
}
.shop-header small {
  font-size: 10px;
}
.store main {
  max-width: 1440px;
  margin: auto;
  padding: 26px 40px;
}
.intro {
  padding: 8px 0 12px;
}
.intro h1 {
  margin: 6px 0;
}
.intro p {
  color: var(--muted);
  margin: 0;
}
.category-strip {
  display: flex;
  gap: 12px;
  margin: 20px 0 26px;
}
.category-strip button {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f0f3e9;
  min-width: 120px;
}
.category-strip img {
  width: 38px;
  height: 38px;
}
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
}
#filters > h2 {
  font-size: 16px;
}
#filters label {
  margin-bottom: 8px;
}
.filtergroup {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.filtergroup strong {
  display: block;
  margin-bottom: 8px;
}
.check {
  display: flex;
  gap: 6px;
  align-items: center;
}
.filtergroup .check {
  margin: 5px 0;
}
.resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  gap: 10px;
}
.resultbar h2 {
  margin: 0;
}
.resultbar #count {
  font-size: 14px;
  font-weight: normal;
  margin-left: 12px;
}
.actions {
  display: flex;
  gap: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
  padding-top: 20px;
}
.card {
  min-width: 0;
}
.product-image {
  width: 100%;
  height: 185px;
  object-fit: contain;
  background: #f0f1eb;
  border-radius: 7px;
  display: block;
}
.card h3 {
  font-size: 14px;
  margin: 8px 0 4px;
}
.card .manufacturer {
  font-size: 12px;
  color: var(--muted);
}
.card .price {
  font-size: 20px;
  font-weight: 600;
  margin: 6px 0;
}
.badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 3px;
  padding: 2px 7px;
  background: #e5f0e8;
  color: #315d49;
}
.badge.backorder {
  background: #faf0d9;
  color: #8b6723;
}
.badge.unavailable {
  background: #eee;
  color: #777;
}
.card small {
  display: block;
  margin-top: 4px;
}
.feature {
  font-size: 10px;
  color: #66775e;
  margin-right: 6px;
}
.grid.list {
  grid-template-columns: 1fr;
}
.list .card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.list .product-image {
  height: 145px;
}
#pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 25px;
}
#notice,
#adminnotice {
  color: #99602c;
  padding-top: 8px;
}
footer {
  padding: 25px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.admin-header {
  height: 56px;
  background: var(--green);
  color: white;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-header a {
  color: white;
  margin-right: 20px;
}
.admin-nav {
  position: absolute;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 175px;
  background: #f0f3ed;
  border-right: 1px solid var(--line);
  padding: 24px 14px;
}
.admin-nav a {
  display: block;
  margin: 12px 0;
  padding: 8px;
}
.admin-nav .selected {
  background: #dce9dc;
  border-radius: 5px;
}
.admin-nav small {
  display: block;
  margin: 40px 10px;
}
.admin-main {
  margin-left: 175px;
  padding: 18px 24px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.heading h1 {
  font-size: 22px;
  margin: 0;
}
.stats {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}
.stats span {
  padding: 3px 10px;
  background: var(--pale);
  font-size: 12px;
  border-radius: 3px;
}
.admin #filters {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.admin #filters label {
  margin: 0;
}
.admin #filters input,
.admin #filters select {
  margin: 3px 0 0;
  padding: 6px;
}
.tablewrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}
th {
  text-align: left;
  background: #f0f3ed;
  color: #667565;
  font-weight: normal;
}
td,
th {
  padding: 9px;
  border-bottom: 1px solid #e8ece5;
}
td img {
  width: 40px;
  height: 48px;
  object-fit: contain;
  background: #f4f4ee;
}
td strong {
  display: block;
  font-size: 13px;
}
td small {
  display: block;
}
.login {
  max-width: 380px;
  margin: 90px auto;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login h1 {
  font-size: 22px;
}
dialog {
  width: min(960px, 95vw);
  max-height: 94vh;
  border: 0;
  border-radius: 10px;
  padding: 24px;
  color: var(--ink);
}
dialog::backdrop {
  background: #20332688;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 16px;
}
.formgrid .wide {
  grid-column: 1/-1;
}
.formgrid h3 {
  grid-column: 1/-1;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  margin: 16px 0 12px;
}
.formgrid textarea {
  min-height: 80px;
}
.schedule {
  background: #f3f6f0;
  padding: 12px;
  margin: 8px 0;
}
.period {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.period select {
  width: 80px;
}
.savebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: -24px;
  background: white;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.savebar span {
  font-size: 12px;
  color: var(--muted);
}
#saveerror,
#loginerror {
  color: #a43824;
}
.feature-editor {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.feature-editor input {
  width: 150px;
}
#imagepreview {
  width: 100px;
  height: 110px;
  object-fit: contain;
}
.benchmark-label {
  color: #a15f27;
  font-weight: bold;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b89141;
}
#products[aria-busy="true"] {
  opacity: 0.5;
}
@media (min-width: 1500px) {
  .product-image {
    height: 220px;
  }
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shop-header nav,
  .shop-header small {
    display: none;
  }
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
  }
  .store main {
    padding: 20px;
  }
  .formgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .shop-header {
    height: 76px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .workspace aside {
    border: 1px solid var(--line);
    padding: 12px;
  }
  .workspace aside label {
    display: inline-block;
    width: 48%;
    vertical-align: top;
  }
  .workspace aside .filtergroup {
    padding: 6px 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .product-image {
    height: 165px;
  }
  .intro h1 {
    font-size: 21px;
  }
  .category-strip {
    overflow: auto;
  }
  .resultbar {
    align-items: start;
  }
  .resultbar h2 {
    font-size: 17px;
  }
  .actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .admin-nav {
    display: none;
  }
  .admin-main {
    margin-left: 0;
    padding: 12px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .admin-header {
    padding: 0 10px;
    font-size: 12px;
  }
  .savebar span {
    max-width: 60%;
  }
  .store main {
    padding: 16px;
  }
  .category-strip button {
    min-width: 100px;
  }
  .list .card {
    grid-template-columns: 90px 1fr;
  }
}

.card .tax {
  display: inline;
}

.store #filters summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}
@media (min-width: 651px) {
  .store #filters summary {
    list-style: none;
  }
}
