/* Drinks, tap to buy (docs/superpowers/specs/2026-10-03-drinks-tap-to-buy.md). Layout only: every colour is a token from
   tokens.css. Primary targets are at least 44px, pins 40px; no text under 12px; an undone line says 已撤銷, the strike-through only repeats it. */
.buy-button{min-height:44px;width:100%;margin-top:auto;border:0;border-radius:var(--radius-control);background:var(--accent);color:var(--surface);font-size:var(--font-secondary);font-weight:700}
.buy-button:disabled{background:var(--ink2)}
.tile .tile-badge{font-size:12px}
.tile-recent{font-size:12px;line-height:1.4;color:var(--ink2);margin:0}
.type-chips .chip{min-height:44px;font-size:13px}
.buy-receipt{list-style:none;margin:0;padding:0;border:1px solid var(--rule);border-radius:var(--radius-card);background:var(--surface);overflow:hidden}
.buy-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:var(--row-height);padding:6px 12px;border-top:1px solid var(--rule);font-size:var(--font-secondary);line-height:1.5}
.buy-line:first-child{border-top:0}
.buy-line .time{flex-shrink:0;font-size:13px;color:var(--ink2);font-variant-numeric:tabular-nums}
.buy-line .what{flex:1;min-width:0;overflow-wrap:anywhere}
.buy-line .tag{display:inline-block;margin-left:6px;padding:0 6px;font-size:var(--font-caption);color:var(--ink2);border:1px solid var(--rule);border-radius:var(--radius-pill);white-space:nowrap}
.buy-line .price{flex-shrink:0;font-variant-numeric:tabular-nums}
.buy-line.is-undone .name,.buy-line.is-undone .price{text-decoration:line-through;color:var(--ink2)}
.buy-line button{flex-shrink:0;min-height:44px;min-width:64px}
.buy-line.is-empty{color:var(--ink2)}
.buy-view{display:flex;flex-wrap:wrap;align-items:center;gap:12px;border-color:var(--rule-2);background:var(--accent-soft);color:var(--ink)}
.buy-view p{flex:1;margin:0}
.buy-view button{flex-shrink:0;min-height:44px}
.buy-bar{position:static;display:block;margin:16px 0;padding:16px;border:1px solid var(--rule-2);border-radius:var(--radius-card);background:var(--accent-soft)}
.buy-bar .error{margin:0 0 8px}
/* The day's total sits in the summary row; this card only shows a purchase just made, an error or a reload. */
.buy-bar:not(:has(.error:not([hidden]))):not(:has(#bar-reload:not([hidden]))):has(#bar-last:empty){display:none}
.buy-bar-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.buy-bar-row button{flex-shrink:0;min-height:44px;min-width:72px}
.buy-last{flex:1 1 160px;min-width:0;margin:0;font-size:var(--font-secondary);font-weight:600;text-align:right;overflow-wrap:anywhere}
.fold{margin-top:28px;font-size:14px;border-top:1px solid var(--rule)}
.fold input{min-height:44px}
#content .section-head>span,#content footer,#content .summary-strip small,.buy-bar small{font-size:12px}
#content footer .text-button{font-size:13px}
#products .tile-photo-caption,#products .tile-photo-pkg{font-size:12px}
.buy-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:8px 0 16px;border-bottom:1px solid var(--rule);margin-bottom:16px}
.buy-summary #identity{flex:1 1 140px;min-width:0;overflow-wrap:anywhere}.buy-summary small{font-size:var(--font-secondary);color:var(--ink2)}
.staff-page .topbar{position:sticky;top:0;z-index:3}
#product-section{--buy-header-height:77px;--buy-chips-height:60px;min-width:0}
#category-chips{position:sticky;top:var(--buy-header-height);z-index:2;display:flex;gap:8px;width:100%;max-width:100%;min-width:0;padding:8px 4px;overflow-x:auto;overscroll-behavior-x:contain;background:var(--ground)}
.category-chip{flex:none;min-height:44px;padding:6px 14px;border-radius:var(--radius-pill);font-size:var(--font-secondary);white-space:nowrap}
.category-chip[aria-current=true]{color:var(--accent);background:var(--accent-soft);border-color:var(--accent);font-weight:700}
.drink-category{margin:20px 0;scroll-margin-top:calc(var(--buy-header-height) + var(--buy-chips-height))}.drink-category h3{margin-bottom:8px;color:var(--ink2);font-size:var(--font-secondary)}
/* Leave enough scroll range to align the final heading below the sticky controls. */
.drink-category.is-last{min-height:calc(100svh - var(--buy-header-height) - var(--buy-chips-height))}
.drink-rows{display:flex;flex-direction:column;gap:8px}
#products .tile{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:64px;padding:6px;cursor:default}
#products .tile-photo{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;margin:0;padding:0;border:0;background:transparent}
#products .tile-photo svg{display:block;width:48px;height:48px}
#product-section[hidden]{display:none}
#receipt-toggle{min-width:44px;min-height:44px;margin-top:8px}
#products .tile-info{flex:1;min-width:0}
#products .tile-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:18px}
#products .tile-meta{display:flex;align-items:center;gap:4px;min-width:0;overflow:hidden;line-height:18px;white-space:nowrap}
#products .tile-price{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#products .tile-recent{flex:none;padding:0 3px;border:1px solid var(--rule);border-radius:var(--radius-pill);line-height:16px}
#products .tile-badge{position:static;display:inline-block;flex:none;margin:0 0 0 auto;padding:0 4px;line-height:16px}
#products .buy-button{width:64px;min-width:64px;min-height:44px;flex:none;margin:0;padding:4px;line-height:18px;color:var(--surface)}
.pin-button{display:grid;place-items:center;min-width:40px;min-height:40px;width:40px;flex:none;color:var(--ink2);border:0;background:transparent}
.pin-button[aria-pressed=true]{color:var(--accent)}
.pin-button[aria-pressed=true] svg{fill:currentColor}
.pin-button.is-pinning svg{animation:pin-fill .18s ease-out}
@keyframes pin-fill{0%,100%{transform:scale(1)}50%{transform:scale(1.25)}}
@media (prefers-reduced-motion:reduce){.pin-button.is-pinning svg{animation:none}}
/* After a purchase (owner, 2026-10-03: "a light animation after purchase"): 「已買 ✓」 on the pressed button, the count
   pops, the new receipt line fades from a highlight, the confirmation rises in. Transform, opacity and colour only — no
   layout moves — and none of it for a device that asks for reduced motion; the words change regardless. */
.buy-button{transition:background-color .2s ease-out}
.buy-button.is-done{background:var(--good)}
.tile .tile-badge.is-pop{animation:buy-pop .32s ease-out}
.buy-line.is-new{animation:buy-new 1.6s ease-out}
.buy-last.is-fresh{animation:buy-rise .26s ease-out}
@keyframes buy-pop{0%{transform:scale(1)}45%{transform:scale(1.2)}100%{transform:scale(1)}}
@keyframes buy-new{from{background-color:var(--soft);background-color:color-mix(in srgb,var(--good) 16%,var(--surface))}to{background-color:var(--surface)}}
@keyframes buy-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.buy-button{transition:none}.tile .tile-badge.is-pop,.buy-line.is-new,.buy-last.is-fresh{animation:none}}
