* {
  box-sizing: border-box;
}
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20372d;
  background: var(--page-background);
  font-synthesis: none;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ce8c31;
  outline-offset: 3px;
}
button {
  touch-action: manipulation;
}
main {
  max-width: 640px;
  margin: auto;
  padding: 24px 20px 28px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--brand-color);
  border-radius: 12px;
  color: white;
  font-weight: 800;
  font-size: 25px;
}
.brand strong {
  display: block;
  font-size: 23px;
  letter-spacing: -1px;
}
.brand div > span {
  display: block;
  font-size: 12px;
  color: #64756c;
}
.device-label {
  font-size: 11px;
  color: #536b5e;
  border: 1px solid #d6dfd5;
  padding: 7px 9px;
  border-radius: 20px;
}
nav {
  display: flex;
  background: #e7ece4;
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
}
nav button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px;
  border-radius: 10px;
  font-weight: 650;
  color: #596d60;
}
nav button.active {
  background: white;
  box-shadow: 0 2px 5px #20372d0d;
  color: var(--brand-color);
}
nav span {
  background: #e7eee6;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 12px;
  margin-left: 5px;
}
.heading {
  margin: 30px 0 24px;
}
.eyebrow {
  font-size: 10px !important;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #627e6b !important;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin: 10px 0;
}
p {
  font-size: 14px;
  line-height: 1.5;
  color: #64756c;
  margin: 8px 0;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
.card {
  border: 1px solid #e0e6da;
  border-radius: 18px;
  background: white;
  padding: 20px;
  margin: 14px 0;
}
.section-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.section-title > span {
  font-size: 11px;
  background: #eef2e8;
  color: #728167;
  border-radius: 6px;
  padding: 5px;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row > label,
.field-row > fieldset {
  flex: 1;
  min-width: 0;
}
.class-field {
  max-width: 42%;
}
label,
legend {
  font-weight: 600;
  font-size: 13px;
  display: block;
}
label > span {
  font-weight: 400;
  color: #768275;
  font-size: 11px;
}
input:not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid #d6dfd5;
  border-radius: 10px;
  padding: 13px 12px;
  background: #fcfdf9;
  color: #20372d;
  margin-top: 8px;
  font-size: 16px;
  min-height: 46px;
}
input::placeholder {
  color: #97a195;
}
.name-label {
  margin-top: 21px;
}
.name-label > span {
  float: right;
}
.name-label input {
  font-size: 25px;
  letter-spacing: 3px;
  font-weight: 650;
  text-transform: uppercase;
}
.help {
  font-size: 12px;
  margin: 9px 0 0;
}
.preview-wrap {
  background: #f1f4ed;
  border-radius: 12px;
  padding: 18px 12px;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#preview {
  display: flex;
  border-radius: 7px;
  padding: 4px;
  gap: 3px;
  min-height: 38px;
  align-items: center;
  max-width: 100%;
}
.key {
  height: 32px;
  min-width: 26px;
  width: 30px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 -3px 0 #0002,
    inset 0 1px 0 #fff8;
  font-size: 20px;
  font-weight: 700;
}
.price {
  text-align: right;
}
.price small {
  display: block;
  color: #71816c;
  font-size: 11px;
}
.price strong {
  display: block;
  font-size: 21px;
  margin-top: 4px;
  letter-spacing: -0.5px;
}
.colour-group {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
  min-width: 0;
}
.colour-group legend {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.colour-group legend span {
  font-weight: 400;
  color: #6b7b6b;
  font-size: 12px;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  margin-top: 11px;
}
.swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #0002;
  max-height: 42px;
  position: relative;
  box-shadow: inset 0 -3px #0001;
  padding: 0;
}
.swatch[aria-checked="true"] {
  outline: 2px solid var(--brand-color);
  outline-offset: 3px;
}
.swatch[aria-checked="true"]:after {
  content: "✓";
  font-size: 18px;
  font-weight: 700;
}
.swatch[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
.payment {
  border: 0;
  margin: 0;
  padding: 0;
}
.segments {
  display: flex;
  border: 1px solid #d6dfd5;
  border-radius: 10px;
  padding: 3px;
  margin-top: 8px;
  height: 46px;
}
.segments label {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.segments input {
  position: absolute;
  opacity: 0;
}
.segments span {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #70816e;
}
.segments input:checked + span {
  background: #e9f1e4;
  color: var(--brand-color);
}
.segments input:focus-visible + span {
  outline: 3px solid #ce8c31;
}
.stepper {
  display: flex;
  border: 1px solid #d6dfd5;
  border-radius: 10px;
  margin-top: 8px;
  height: 46px;
  overflow: hidden;
}
.stepper button {
  width: 42px;
  border: 0;
  background: #f1f4ed;
  color: var(--brand-color);
  font-size: 23px;
}
.stepper input {
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  text-align: center;
  min-width: 0;
  padding: 8px !important;
  min-height: 0 !important;
  appearance: textfield;
}
.stepper input::-webkit-inner-spin-button {
  appearance: none;
}
.notes-label {
  margin-top: 17px;
}
.notes-label span {
  margin-left: 5px;
}
.primary,
.secondary {
  border: 0;
  border-radius: 11px;
  min-height: 48px;
  padding: 13px 17px;
  font-weight: 650;
}

.primary,
.secondary2 {
  border: 0;
  border-radius: 11px;
  min-height: 48px;
  padding: 13px 17px;
  font-weight: 650;
  margin-top: 10px;
}

.primary {
  background: var(--brand-color);
  color: white;
}
.primary:hover {
  background: var(--brand-hover);
}
.secondary {
  background: #eef2e8;
  color: #365440;
  border: 1px solid #dce5d6;
}
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--savebar-background);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
  z-index: 2;
}
.save-bar > div {
  min-width: 94px;
}
.save-bar small {
  display: block;
  font-size: 11px;
  color: #6b7b6b;
}
.save-bar strong {
  display: block;
  font-size: 23px;
  margin-top: 4px;
  letter-spacing: -0.5px;
}
.save-bar .primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  min-height: 54px;
}
.text-button {
  background: none;
  border: 0;
  padding: 10px;
  color: var(--brand-color);
  text-decoration: underline;
}
.error {
  color: #b13d32;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #dce6d5;
  border: 1px solid #dce6d5;
  border-radius: 14px;
  overflow: hidden;
}
.stats > div {
  background: #edf2e7;
  padding: 16px 10px;
}
.stats small {
  display: block;
  font-size: 11px;
  color: #677b61;
}
.stats strong {
  font-size: 20px;
  display: block;
  margin-top: 5px;
  letter-spacing: -0.5px;
}
.list-tools {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.list-tools input {
  min-width: 0;
}
.list-tools select {
  width: 135px;
  font-size: 13px;
}
.order-card {
  background: white;
  border: 1px solid #e0e6da;
  border-radius: 14px;
  padding: 17px;
  margin-top: 12px;
}
.order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.order-top strong {
  font-size: 17px;
}
.order-top small {
  display: block;
  font-size: 12px;
  color: #6b7b6b;
  margin-top: 5px;
}
.badge {
  font-size: 11px;
  padding: 5px 8px;
  background: #fcf0da;
  border-radius: 7px;
  color: #8c672c;
  white-space: nowrap;
}
.badge.paid {
  background: #e5f1df;
  color: #3d702e;
}
.order-name {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 17px 0 8px;
}
.order-colours {
  font-size: 16px;
  line-height: 1.8;
  color: #667662;
}
.order-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0e8;
  padding-top: 13px;
  margin-top: 12px;
  gap: 10px;
}
.order-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.order-actions button {
  border: 0;
  background: none;
  color: var(--brand-color);
  font-size: 12px;
  padding: 7px 0;
  min-height: 36px;
}
.order-actions button.delete {
  color: #a14b40;
}
.empty {
  padding: 35px 20px;
  text-align: center;
  border: 1px dashed #d4decc;
  border-radius: 14px;
  margin-top: 15px;
}
.empty h2 {
  font-size: 19px;
}
.export-card {
  margin-top: 24px;
}
.export-buttons {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.export-buttons > button {
  flex: 1;
  font-size: 13px;
}
details {
  margin-top: 21px;
  border-top: 1px solid #e6ecdf;
  padding-top: 17px;
}
summary {
  font-size: 13px;
  color: #526c46;
  cursor: pointer;
}
details p {
  font-size: 12px;
}
footer {
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: #7b8874;
  margin: 22px 0 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  background: #20372d;
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0002;
  font-size: 13px;
  z-index: 10;
}
#toast button {
  background: none;
  border: 0;
  color: #c7e4a8;
  font-weight: 700;
  padding: 4px 0 4px 14px;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: #20372d;
}
dialog::backdrop {
  background: #20372d80;
}
dialog textarea {
  height: 280px;
  font-size: 13px;
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
@media (max-width: 380px) {
  main {
    padding: 18px 12px;
  }
  .card {
    padding: 16px;
  }
  .swatches {
    gap: 6px;
  }
  .key {
    width: 25px;
    min-width: 22px;
  }
  .device-label {
    font-size: 10px;
  }
  .stats strong {
    font-size: 17px;
  }
  .save-bar {
    gap: 10px;
  }
  .save-bar .primary {
    padding: 12px;
    font-size: 14px;
  }
}

.fulfilment {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0e8;
}
.fulfilment select {
  max-width: 220px;
  font-size: 14px;
}
.fulfilment .help {
  color: #365440;
}
