:root {
  color-scheme: light;
  --paper: #f6f1ea;
  --card: #fffdf9;
  --ink: #2a2420;
  --muted: #74685f;
  --line: rgba(42, 36, 32, 0.1);
  --berry: #c45c6a;
  --berry-dark: #a84656;
  --berry-soft: rgba(196, 92, 106, 0.12);
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(880px 420px at 100% -8%, rgba(196, 92, 106, 0.1), transparent 55%),
    radial-gradient(640px 360px at -10% 20%, rgba(120, 150, 120, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

button, input { font: inherit; color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 560;
  font-style: italic;
  letter-spacing: -0.03em;
}

.logo__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3c2c8, var(--berry) 55%, #8d3542);
  box-shadow: 0 0 0 4px var(--berry-soft);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  font-weight: 560;
}

.cart-btn__count {
  min-width: 1.4rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--berry);
  color: #fffaf7;
  font-size: 0.82rem;
  text-align: center;
}

.intro { max-width: 38rem; margin-top: 34px; }

.eyebrow {
  margin: 0;
  color: var(--berry-dark);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf7;
}

.find input {
  width: min(240px, 46vw);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.find input:focus,
.cart-btn:focus-visible,
.chip:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.card__open:focus-visible {
  outline: 2px solid var(--berry);
  outline-offset: 2px;
}

.status {
  min-height: 1.2rem;
  margin: 14px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.card__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.card__art {
  display: block;
  height: 210px;
  overflow: hidden;
  background: #efe8e0;
}

.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__body { display: block; padding: 4px 16px 0; }

.card__cat,
.card__name,
.card__note { display: block; }

.card__cat {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card__name {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.card__note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 16px;
}

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 560;
}

.btn-primary { background: var(--berry); color: #fffaf7; }
.btn-primary:hover { background: var(--berry-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: default; }

.btn-quiet {
  border-color: var(--line);
  background: var(--card);
}

.btn-block { width: 100%; }

.foot {
  margin-top: 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot p { margin: 0; }

dialog {
  padding: 0;
  border: 0;
  color: inherit;
  background: var(--card);
}

dialog::backdrop {
  background: rgba(42, 36, 32, 0.38);
}

.modal {
  width: min(520px, calc(100% - 24px));
  border-radius: 22px;
  padding: 22px;
}

.modal__head,
.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.product-view__art {
  height: 280px;
  margin: 8px 0 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #efe8e0;
}

.product-view__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-view h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.product-view p { margin: 10px 0 0; color: var(--muted); }

.product-view__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
}

.stepper span {
  min-width: 1.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.drawer {
  width: min(420px, 100%);
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  border-radius: 0;
}

.drawer__head,
.drawer__foot { padding: 18px 18px 8px; }

.drawer__head h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 560;
}

.drawer__body {
  height: calc(100% - 168px);
  overflow: auto;
  padding: 8px 18px 18px;
}

.drawer__foot { padding-top: 8px; padding-bottom: 18px; }

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.line__name { font-weight: 560; }
.line__note { color: var(--muted); font-size: 0.86rem; }

.line__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.empty {
  margin: 24px 0;
  color: var(--muted);
}

.total {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.order-no {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}

.order-lead { color: var(--muted); }

.order-list {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.order-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

html:has(dialog[open]) { overflow: hidden; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .toolbar { align-items: stretch; flex-direction: column; }
  .find input { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .logo { font-size: 1.7rem; }
  .order-no { font-size: 2.4rem; }
}
