/* drawer */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--bg); z-index: 70; display: flex; flex-direction: column; animation: slide 0.28s cubic-bezier(.2, .7, .2, 1); padding-top: env(safe-area-inset-top, 0px); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 12px 22px; }
.drawer h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.04em; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 8px 22px 22px; display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.drawer > footer { padding: 16px 22px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.line .th { width: 68px; border-radius: 14px; }

.line h4 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.line small { color: var(--muted); font-size: 0.86rem; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; margin-top: 6px; }
.stepper button { width: 34px; height: 34px; background: none; border: none; font-size: 1.15rem; border-radius: 50%; }
.stepper span { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.line .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.line .rm { background: none; border: none; color: var(--muted); font-size: 0.8rem; text-decoration: underline; padding: 4px 0; display: block; margin-left: auto; }
.gift-line { background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 14px; }
.gift-line .line small { color: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.gift-line .tl { font-weight: 700; margin-bottom: 8px; }
.gift-line label { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 600; margin-top: 12px; }
.gift-line .field-in { background-color: rgba(255, 255, 255, 0.6); border-color: transparent; color: #1b1518; }
.gift-line select.field-in { background-image: var(--chevron-ink); }
.progress p { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }
.progress p b { color: var(--fg); }
.meter { height: 8px; border-radius: 4px; background: var(--line); position: relative; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); transition: width 0.4s; }
.meter u { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--fg); opacity: 0.35; }
.offers { display: grid; gap: 8px; }
.offers h3 { font-size: 1rem; font-weight: 700; }
.offer { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; background: transparent; text-align: left; width: 100%; }
.offer[aria-pressed="true"] { border-color: var(--fg); background: var(--surface); }
.offer .r { width: 18px; height: 18px; border: 1.5px solid var(--fg); border-radius: 50%; margin-top: 2px; display: grid; place-items: center; }
.offer[aria-pressed="true"] .r::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); }
.offer b { font-weight: 700; display: block; line-height: 1.25; }
.offer span { color: var(--muted); font-size: 0.9rem; }
.totals { display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.totals div.save { color: var(--ok); font-weight: 600; }
.totals div.total { color: var(--fg); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.hint { font-size: 0.82rem; color: var(--muted); text-align: center; }
.empty-cart { padding: 60px 8px; color: var(--muted); font-size: 1.1rem; }
.details { display: grid; gap: 12px; }
.details h3 { font-size: 1rem; font-weight: 700; }
.details .field-in { width: 100%; }
.details .field-in[aria-invalid="true"] { border-color: var(--danger); }
