:root {
  --ink: #1c1a16;
  --ink-2: #6b655c;
  --ink-3: #9a9288;
  --hairline: #e5e0d8;
  --page: #faf8f5;
  --raised: #f1ede6;
  --yellow: #f8d418;
  --yellow-edge: #e6bc00;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-x: clip;
}
.brand {
  background: var(--yellow);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  justify-content: center;
}
.brand img { height: 56px; width: auto; }

.head { display: flex; flex-direction: column; gap: 8px; }
.head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}
.fact { margin: 0; color: #0e7c6b; font-weight: 600; font-size: 14px; }
.intro { margin: 4px 0 0; color: var(--ink); }

.draft {
  background: var(--raised);
  border: 1px dashed var(--ink-3);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
}

.nav {
  display: flex;
  gap: 32px;
  padding: 4px 0;
  font-size: 15px;
}
.nav a {
  color: var(--ink);
  padding: 6px 2px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav a.on { font-weight: 700; text-decoration: none; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.chips button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.chips button.on { background: var(--yellow); border-color: var(--yellow-edge); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile {
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}
.tile.picked { border-color: var(--yellow-edge); box-shadow: 0 0 0 1px var(--yellow) inset; }
.photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
}
.nophoto {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--raised);
  color: var(--ink-2);
  font-size: 13px;
  border-radius: 8px;
}
.name { font-weight: 600; font-size: 14px; line-height: 20px; }
.meta { color: var(--ink-2); font-size: 12px; line-height: 18px; }

.controls { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.units { display: flex; gap: 6px; }
.units button {
  flex: 1;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.units button.on { background: var(--yellow); border-color: var(--yellow-edge); font-weight: 600; }
.units button .q { font-weight: 700; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--raised);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper span { font-weight: 600; font-size: 16px; min-width: 24px; text-align: center; }

.empty { color: var(--ink-2); font-size: 14px; line-height: 24px; }

.orderlist { display: flex; flex-direction: column; }
.orow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.orow img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; }
.onum { color: var(--ink-2); font-size: 13px; min-width: 18px; }
.oinfo { flex: 1; min-width: 0; }
.remove {
  width: 44px; height: 44px;
  border: none; background: transparent;
  color: var(--ink-2); font-size: 22px; cursor: pointer;
}

.field { display: block; margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
}

.preview {
  white-space: pre-wrap;
  background: var(--raised);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  line-height: 22px;
  margin-top: 12px;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 10px; }

h2 { font-size: 21px; font-weight: 500; margin: 0 0 8px; }
.foot { color: var(--ink-2); font-size: 13px; line-height: 22px; }
