:root {
  --navy: #0b1f3a;
  --ink: #0b1f3a;
  --muted: #52617a;
  --line: #dbe3ee;
  --bg: #f1f5f9;
  --card: #ffffff;
  --green: #059669;
  --green-dark: #047857;
  --danger: #b42318;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #6366f1;
  outline-offset: 2px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--navy);
  color: #fff;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
}
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-weight: 600;
}
.cart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green);
  text-align: center;
  font-size: 0.8rem;
  line-height: 22px;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}
.intro h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}
.intro p {
  margin: 0 0 28px;
  max-width: 60ch;
  color: var(--muted);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.glyph {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #e8f5ef;
  color: var(--green-dark);
  display: grid;
  place-items: center;
}
.glyph svg {
  width: 34px;
  height: 34px;
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price {
  font-weight: 800;
  font-size: 1.1rem;
}
.btn {
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.btn:hover {
  background: #12305c;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn.block {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
}
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.notice {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(11, 31, 58, 0.45);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--card);
  box-shadow: -12px 0 40px rgba(11, 31, 58, 0.25);
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.drawer.open {
  transform: none;
}
.drawer[hidden],
.scrim[hidden] {
  display: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 1.4rem;
  line-height: 1;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}
.drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}
.empty {
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
}
.line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.line:last-child {
  border-bottom: 0;
}
.line .name {
  flex: 1;
  font-weight: 600;
}
.line .name small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: #fff;
  font-size: 1.1rem;
}
.stepper button:hover {
  background: var(--bg);
}
.stepper button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.stepper span {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}
.total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.1rem;
}
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3f2;
  color: var(--danger);
  font-size: 0.9rem;
}
.done {
  padding: 28px 0;
  text-align: center;
}
.done .tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e8f5ef;
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.done h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}
.done p {
  margin: 4px 0;
  color: var(--muted);
}
.done ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .drawer {
    transition: none;
  }
}
@media (max-width: 480px) {
  main {
    padding: 24px 16px 48px;
  }
  .top {
    padding: 12px 16px;
  }
}
