/* Kartu stamp loyalti. Memakai token tema open-design-v4 (--accent, --surface, --border, ...). */
.stamp-card { display:grid; gap:10px; min-width:0; }
.stamp-card-scene { perspective:1100px; }
.stamp-card-flip { position:relative; display:grid; width:100%; padding:0; border:0; background:none; font:inherit; color:inherit; text-align:left; cursor:pointer; border-radius:var(--radius-lg); transform-style:preserve-3d; transition:transform .6s cubic-bezier(.4,.2,.2,1); }
.stamp-card-flip.is-flipped { transform:rotateY(180deg); }
.stamp-card-flip:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.stamp-card-face { grid-area:1/1; display:grid; align-content:space-between; gap:14px; min-height:176px; padding:16px 18px; border:1px solid color-mix(in srgb,var(--accent) 25%,var(--border)); border-radius:var(--radius-lg); backface-visibility:hidden; -webkit-backface-visibility:hidden; overflow:hidden; box-shadow:var(--shadow-md); }
.stamp-card-front { background:linear-gradient(135deg,var(--accent-subtle),var(--surface) 70%); }
.stamp-card-back { background:linear-gradient(135deg,var(--surface-subtle),var(--accent-subtle)); transform:rotateY(180deg); align-content:start; }
.stamp-card.is-disabled .stamp-card-face { filter:grayscale(.7); }
.stamp-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.stamp-card-head strong { display:block; font-size:14px; font-weight:700; color:var(--fg); }
.stamp-card-head small { display:block; margin-top:2px; max-width:22ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; }
.stamp-count { color:var(--accent-hover); font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.stamp-grid { display:grid; grid-template-columns:repeat(var(--stamp-cols,4),minmax(0,1fr)); gap:8px; }
.stamp-slot { position:relative; display:grid; place-items:center; aspect-ratio:1; max-height:44px; justify-self:center; width:100%; max-width:44px; border:2px dashed var(--border-strong); border-radius:50%; color:var(--muted); background:var(--surface); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.stamp-slot.is-filled { border-style:solid; border-color:var(--accent); color:var(--accent-hover); background:var(--accent-subtle); }
.stamp-slot.is-reward { border-color:var(--warning); color:var(--warning-strong,var(--fg)); }
.stamp-slot.is-reward.is-filled { background:var(--warning-bg); }
.stamp-mark { display:grid; place-items:center; width:62%; height:62%; }
.stamp-star { width:100%; height:100%; fill:currentColor; }
.stamp-gift { width:58%; height:58%; }
.stamp-slot.is-stamping { border-style:solid; border-color:var(--accent); background:var(--accent-subtle); color:var(--accent-hover); }
.stamp-slot.is-stamping .stamp-mark { animation:stamp-press .6s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes stamp-press { 0% { opacity:0; transform:scale(2.4) rotate(-24deg); } 55% { opacity:1; transform:scale(.88) rotate(4deg); } 100% { opacity:1; transform:scale(1) rotate(0); } }
.stamp-card-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:11px; }
.stamp-flip-hint { color:var(--accent-hover); font-size:11px; font-weight:600; white-space:nowrap; }
.stamp-visits { display:grid; justify-items:start; gap:0; }
.stamp-visits strong { font-size:34px; line-height:1.1; font-weight:700; color:var(--accent-hover); font-variant-numeric:tabular-nums; }
.stamp-visits small { color:var(--muted); font-size:11px; }
.stamp-history { display:grid; gap:4px; max-height:78px; overflow:auto; font-size:11px; }
.stamp-history-row { display:flex; justify-content:space-between; gap:8px; color:var(--fg); }
.stamp-history-row.is-reversed { color:var(--muted); text-decoration:line-through; }
.stamp-history-empty { color:var(--muted); }
.stamp-reward-banner { display:flex; align-items:center; gap:8px; margin:0; padding:8px 12px; border:1px solid color-mix(in srgb,var(--warning) 35%,var(--border)); border-radius:var(--radius-md); background:var(--warning-bg); color:var(--fg); font-size:12px; }
.stamp-reward-banner .stamp-gift { width:18px; height:18px; flex:none; }
.stamp-claim { display:grid; gap:6px; }
.stamp-claim-error { margin:0; color:var(--danger); font-size:12px; }
.stamp-claim-error:empty { display:none; }
.stamp-profile-section { margin:0 28px 20px; max-width:420px; }
#payment-stamp-card { margin:16px 0; padding:14px 16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
#payment-stamp-card:empty { display:none; }
#payment-stamp-card .stamp-claim .btn { min-height:40px; }
.stamp-toast { position:fixed; right:20px; bottom:20px; z-index:2600; width:min(340px,calc(100vw - 32px)); padding:12px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); box-shadow:0 12px 32px rgba(0,0,0,.18); }
.stamp-toast-close { position:absolute; top:-10px; right:-10px; width:28px; height:28px; border:1px solid var(--border); border-radius:50%; background:var(--surface); color:var(--fg); font-size:16px; line-height:1; cursor:pointer; }
@media (max-width:640px) {
  .stamp-profile-section { margin:0 16px 16px; }
  #payment-stamp-card .stamp-claim .btn, .stamp-toast-close { min-height:44px; min-width:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .stamp-card-flip { transition:none; }
  .stamp-slot.is-stamping .stamp-mark { animation:none; }
}
