:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #202b24;
  background: #fff;
  font-size: 16px;
  --green: #167946;
  --pale: #e8f4ec;
  --line: #d5e2d9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: 28px;
}
header {
  margin-bottom: 25px;
}
h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.1;
  margin: 12px 0;
}
h2 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.05rem;
  margin: 25px 0 12px;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  font-weight: 750;
  color: var(--green);
}
p {
  line-height: 1.65;
  color: #526057;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.file-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 15px;
  background: #fff;
  color: #203b2b;
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
}
button:hover {
  background: var(--pale);
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button.primary,
nav button[aria-current="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.danger {
  color: #963c2d;
  border-color: #e6c8c1;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #d09019;
  outline-offset: 3px;
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #819387;
  border-radius: 10px;
  padding: 12px;
  color: #202b24;
  background: #fff;
}
textarea {
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 12px 0;
}
small,
.hint {
  font-weight: 400;
  color: #5a6a5f;
  line-height: 1.55;
}
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.45fr);
  gap: 14px;
  align-items: end;
}
.controls label {
  margin: 0;
}
.store-row,
nav,
.toolbar,
.actions,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
nav {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 22px;
}
.add-actions {
  margin-top: 16px;
}
.store-row {
  margin: 15px 0;
}
.store-row button {
  background: var(--pale);
  border-color: transparent;
}
.store-row button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
#notice {
  background: #f4f8f5;
  border: 1px solid var(--line);
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 0.9rem;
  margin: 18px 0;
}
#notice.error {
  color: #882d1b;
  background: #fff5f0;
  border-color: #e8bfb0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}
.item {
  border-radius: 15px;
  background: var(--green);
  overflow: hidden;
  color: white;
  min-width: 0;
  position: relative;
}
.item .buy {
  width: 100%;
  min-height: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px 13px 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
}
.item .buy:hover {
  background: #ffffff13;
}
.item .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
}
.item .name {
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: center;
}
.item .description {
  font-size: 0.85rem;
  font-weight: 400;
  overflow-wrap: anywhere;
  color: #e0f3e8;
}
.item .edit {
  border: 0;
  border-radius: 0;
  padding: 5px 10px;
  background: #0000000f;
  color: inherit;
  width: 100%;
  font-size: 0.75rem;
  min-height: 36px;
}
.purchased .item {
  background: #edf5ef;
  color: #213c2b;
}
.purchased .description {
  color: #4d6557;
}
.purchased {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.empty {
  border: 1px dashed #b2c8b9;
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}
.summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.summary h2 {
  margin: 0;
}
.toolbar {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 28px;
}
.file-button {
  position: relative;
  font-size: 0.87rem;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.file-button:focus-within {
  outline: 3px solid #d09019;
}
.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 20px;
  background: #f8fbf9;
}
.panel h2 {
  margin-top: 0;
}
.panel form {
  max-width: 720px;
}
.panel .actions {
  margin-top: 20px;
}
.order {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
}
.order li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #f3f8f4;
  border-radius: 12px;
  min-width: 0;
}
.order .label {
  flex: 1;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.order .position {
  color: var(--green);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
}
.order button {
  padding: 8px 12px;
}
.order .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.compact {
  max-width: 760px;
}
footer {
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 13px;
}
a {
  color: var(--green);
}
.preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 400px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.count {
  font-size: 0.85rem;
  color: #58725f;
}
#editor:empty {
  display: none;
}
@media (max-width: 550px) {
  main {
    padding: 18px 14px;
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .item .buy {
    min-height: 128px;
    padding: 14px 9px;
  }
  .order li {
    flex-wrap: wrap;
  }
  .order .label {
    min-width: 110px;
  }
  .order .row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .panel {
    padding: 16px;
  }
  button,
  .file-button {
    font-size: 0.86rem;
  }
  .toolbar {
    gap: 7px;
  }
  h1 {
    font-size: 2rem;
  }
}
@media print {
  nav,
  #tools,
  #editor,
  #notice,
  footer,
  .controls,
  .store-row,
  .edit,
  .actions {
    display: none !important;
  }
  .item {
    break-inside: avoid;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #aaa;
  }
  .description {
    color: #222 !important;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  main {
    max-width: none;
    padding: 0;
  }
}
