:root {
  --bg: #f6f6f3;
  --surface: #fff;
  --border: #e2e2dc;
  --text: #1d1c22;
  --muted: #62616c;
  --primary: #e8590c;
  --primary-hover: #d14f0a;
  --danger: #c92a2a;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  background: var(--bg);
  color: var(--text);
  word-break: keep-all;
}
.notice {
  background: #fff4e6;
  color: #a33f00;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.topbar {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { font-weight: 800; font-size: 20px; color: var(--primary); text-decoration: none; }
.topbar nav { display: flex; gap: 12px; align-items: center; }
.topbar a, .linklike {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
main { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }
h1 { font-size: 24px; margin: 8px 0 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.narrow { max-width: 400px; margin: 40px auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
.field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}
.field .error { color: var(--danger); font-size: 13px; min-height: 0; }
.hint { color: var(--muted); font-size: 13px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }
.alert { background: #fff5f5; color: var(--danger); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.search { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.product { display: flex; flex-direction: column; gap: 8px; }
.product .thumb {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #f1efe9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.product .name { font-weight: 600; }
.product .price { color: var(--muted); }
.badge { align-self: flex-start; background: #495057; color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.cart-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}
.total { font-size: 18px; font-weight: 700; }
.summary { margin-top: 16px; color: var(--muted); }
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 1fr auto; }
  /* (의도된 결함 6 — docs/demo-defects.md) */
  .cart-footer .btn { position: absolute; left: 0; top: 0; }
}
