/* Annapurna OS - Digital loyalty stamp card */
.lcard {
  --acc: #ffd166; position: relative; overflow: hidden; border-radius: 28px; padding: 22px 22px 18px; color: #fff;
  box-shadow: 0 30px 60px -22px rgba(20, 10, 50, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
  isolation: isolate; width: 100%; max-width: 440px; font-family: 'Poppins', sans-serif; user-select: none;
}
.lcard::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.5px); background-size: 16px 16px; opacity: .6; }
.lcard::after { content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -120px; top: -150px; z-index: -1; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); }
.lcard .holo { position: absolute; inset: -50%; z-index: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 45%, rgba(255, 220, 255, .15) 50%, rgba(180, 255, 255, .18) 55%, transparent 65%); animation: holoMove 5.5s ease-in-out infinite; mix-blend-mode: overlay; }
.lcard > *:not(.holo) { position: relative; z-index: 1; }
.lc-top { display: flex; align-items: center; gap: 12px; }
.lc-logo { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .95); display: grid; place-items: center; font-size: 24px; overflow: hidden; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.lc-logo img { width: 100%; height: 100%; object-fit: cover; }
.lc-biz { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.lc-title { font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.lc-tier { margin-left: auto; align-self: flex-start; font-size: 11px; font-weight: 800; padding: 5px 11px; border-radius: 30px; color: #3b2a00; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .7); background-size: 200% 100%; animation: shine 3s linear infinite; }
.tier-bronze { background-image: linear-gradient(90deg, #b87333, #f3c08b, #b87333); }
.tier-silver { background-image: linear-gradient(90deg, #9ca3af, #f3f4f6, #9ca3af); color: #1f2937; }
.tier-gold { background-image: linear-gradient(90deg, #d4a017, #fff1a8, #d4a017); }
.tier-platinum { background-image: linear-gradient(90deg, #7dd3fc, #f0f9ff, #c4b5fd, #7dd3fc); color: #1e1b4b; }
.lc-count { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 12px; }
.lc-count b { font-size: 34px; font-weight: 800; line-height: 1; }
.lc-count span { opacity: .85; font-size: 13px; }
.lc-grid { display: grid; gap: 10px; }
.lc-slot { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .55); transition: .3s; }
.lc-slot .gift { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; font-size: 11px; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); animation: giftBob 2.4s ease-in-out infinite; }
.lc-slot.last { border-style: solid; border-color: var(--acc); background: rgba(255, 255, 255, .14); color: var(--acc); font-size: 10px; letter-spacing: .05em; }
.lc-slot.on { border: 0; background: radial-gradient(circle at 35% 30%, #fff, #f3f0ff 70%); color: #000; font-size: 22px; box-shadow: 0 6px 14px rgba(0, 0, 0, .28), inset 0 -3px 0 rgba(0, 0, 0, .06); }
.lc-slot.on .ink { display: grid; place-items: center; width: 82%; height: 82%; border-radius: 50%; border: 2.5px solid var(--ink, #6c3cf0); transform: rotate(var(--r, -8deg)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.lc-slot.on.pop { animation: stampIn .7s cubic-bezier(.2, .8, .2, 1.2) both; }
.lc-slot.on.pop::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--acc); animation: ring .8s .35s ease-out both; }
.lc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 16px; }
.lc-next { font-size: 12.5px; font-weight: 600; background: rgba(0, 0, 0, .18); padding: 7px 12px; border-radius: 12px; backdrop-filter: blur(4px); }
.lc-next b { color: var(--acc); }
.lc-member { text-align: right; font-size: 11px; opacity: .85; line-height: 1.35; }
.lc-member b { display: block; font-size: 13.5px; opacity: 1; }
.lc-bar { height: 6px; background: rgba(255, 255, 255, .2); border-radius: 6px; overflow: hidden; margin-top: 14px; }
.lc-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--acc), #fff); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }

/* themes */
.lt-sunset { background: linear-gradient(135deg, #ff9500 0%, #ff5a1a 55%, #e11d2e 100%); --acc: #ffe066; --ink: #e5311b; }
.lt-royal { background: linear-gradient(135deg, #ff6b4a 0%, #e5311b 55%, #b91c1c 100%); --acc: #ffe066; --ink: #b91c1c; }
.lt-ocean { background: linear-gradient(135deg, #fb7185 0%, #e11d48 55%, #9f1239 100%); --acc: #fff1a8; --ink: #be123c; }
.lt-midnight { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #c2410c 100%); --acc: #fff7cc; --ink: #c2410c; }
.lt-mint { background: linear-gradient(135deg, #34d399 0%, #16a34a 55%, #0f7a35 100%); --acc: #fef08a; --ink: #15803d; }
.lt-coffee { background: linear-gradient(135deg, #d4a373 0%, #a0643a 55%, #7c4a2a 100%); --acc: #fde68a; --ink: #7c4a2a; }

@keyframes holoMove { 0%, 100% { transform: translateX(-30%) rotate(0deg); } 50% { transform: translateX(30%) rotate(8deg); } }
@keyframes shine { to { background-position: -200% 0; } }
@keyframes giftBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(10deg); } }
@keyframes stampIn { 0% { transform: scale(2.6) rotate(-35deg); opacity: 0; } 55% { transform: scale(.88); opacity: 1; } 75% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes ring { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.6); } }

/* ---------- card page ---------- */
body.cardpage { min-height: 100vh; background: linear-gradient(170deg, #fffaf4, #fff0e2 60%, #eafaf0); color: #231815; overflow-x: hidden; }
.cp-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.cp-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: blobMove 16s ease-in-out infinite; }
.cp-wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 60px; }
.cp-head { display: flex; align-items: center; gap: 12px; padding: 6px 0 18px; }
.cp-head .btn { background: #fff; color: #231815; border-color: #f2e3d6; }
.scene { perspective: 1400px; display: grid; place-items: center; }
.flipper { position: relative; width: 100%; max-width: 440px; transition: transform .9s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.flipper.flipped { transform: rotateY(180deg); }
.flipper .face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flipper .back { position: absolute; inset: 0; transform: rotateY(180deg); overflow-y: auto; }
.tilt { transition: transform .15s ease-out; transform-style: preserve-3d; will-change: transform; }
.cp-actions { display: flex; gap: 10px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.cp-actions .btn { background: #fff; color: #231815; border-color: #f2e3d6; box-shadow: 0 4px 0 -1px #f0dccd; backdrop-filter: blur(6px); }
.cp-sec { background: #fff; border: 1.5px solid #f2e3d6; box-shadow: 0 5px 0 -1px #f5e4d6, 0 20px 34px -24px rgba(150, 60, 20, .45); border-radius: 22px; padding: 18px; margin-top: 16px; backdrop-filter: blur(10px); animation: fadeUp .6s both; }
.cp-sec h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cp-sec .muted2 { color: #9a8a80; font-size: 12.5px; }
.ticket { position: relative; display: flex; align-items: stretch; background: linear-gradient(135deg, #fff, #fff7ed); color: #1b1530; border-radius: 16px; margin-bottom: 12px; overflow: hidden; border: 1.5px solid #f2e3d6; box-shadow: 0 10px 24px -14px rgba(150, 60, 20, .45); animation: popIn .5s both; }
.ticket .l { flex: 1; padding: 14px 16px; min-width: 0; }
.ticket .l b { display: block; font-size: 15px; }
.ticket .r { width: 118px; flex: none; border-left: 2px dashed #e5e0f0; display: grid; place-items: center; text-align: center; padding: 10px; background: linear-gradient(135deg, #fff1e6, #ffe4f0); position: relative; }
.ticket .r::before, .ticket .r::after { content: ''; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #f2e3d6; }
.ticket .r::before { top: -9px; } .ticket .r::after { bottom: -9px; }
.ticket .code { font-family: ui-monospace, 'Courier New', monospace; font-size: 17px; font-weight: 800; letter-spacing: .12em; color: #ff2d74; }
.ticket.used { filter: grayscale(1); opacity: .55; }
.ticket.used .r::marker { display: none; }
.stamp-used { position: absolute; right: 130px; top: 50%; transform: translateY(-50%) rotate(-14deg); border: 3px solid #dc2626; color: #dc2626; font-weight: 800; padding: 2px 10px; border-radius: 8px; font-size: 13px; letter-spacing: .1em; }
.chal { margin-bottom: 14px; }
.chal .row2 { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; gap: 10px; }
.chal .pb { height: 10px; border-radius: 10px; background: #fbeee3; overflow: hidden; }
.chal .pb span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #ffb300, #ff5a1a); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.tiers { display: flex; justify-content: space-between; position: relative; margin: 10px 4px 4px; }
.tiers::before { content: ''; position: absolute; left: 20px; right: 20px; top: 22px; height: 3px; background: #f2e3d6; }
.tiers .t { position: relative; text-align: center; font-size: 11px; width: 64px; }
.tiers .t .c { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #fff8f1; border: 2px solid #f2e3d6; }
.tiers .t.on .c { background: linear-gradient(135deg, #fcd34d, #f59e0b); border-color: #fff; box-shadow: 0 0 0 5px rgba(252, 211, 77, .3); }
.tiers .t.cur .c { animation: pulseGold 2s infinite; }
.days { display: flex; gap: 6px; }
.days span { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: #fff8f1; border: 1px solid #f2e3d6; font-size: 12px; font-weight: 600; }
.days span.on { background: linear-gradient(135deg, #22c55e, #0f9d58); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(22, 163, 74, .7); }
.days span.today { outline: 2px solid #ff5a1a; }
.hist { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #f2e3d6; font-size: 13px; }
.hist:last-child { border: 0; }
.hist .hi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff1e6; flex: none; }
.reward-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(0, 0, 0, .08); font-size: 13px; }
.reward-row .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
@keyframes pulseGold { 0% { box-shadow: 0 0 0 0 rgba(252, 211, 77, .6); } 70% { box-shadow: 0 0 0 14px rgba(252, 211, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(252, 211, 77, 0); } }
@keyframes blobMove { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.1); } 66% { transform: translate(-30px, 30px) scale(.95); } }

/* menu banner */
.loy-banner { position: relative; overflow: hidden; margin: 14px 14px 0; border-radius: 22px; padding: 16px 18px; color: #fff; display: flex; align-items: center; gap: 14px; cursor: pointer; box-shadow: 0 16px 30px -16px rgba(150, 60, 20, .55); animation: fadeUp .6s .2s both; }
.loy-banner .big { font-size: 38px; animation: giftBob 2.4s ease-in-out infinite; }
.loy-banner b { display: block; font-size: 15.5px; }
.loy-banner small { opacity: .9; font-size: 12px; }
.loy-banner .holo { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .25) 50%, transparent 60%); animation: holoMove 4s ease-in-out infinite; pointer-events: none; }

/* ---------- loyalty code before paying (order page) ---------- */
.code-card { border: 1.5px dashed #ffb48a; background: linear-gradient(135deg, #fff, #fff6ee); }
.code-card .cc-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-card .cc-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #ff7a1a, #e5311b); padding: 3px 10px; border-radius: 20px; }
.code-card .cc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.code-card .cc-row .input { flex: 1 1 120px; min-width: 0; }
.code-card .cc-code { font-family: ui-monospace, 'Courier New', monospace; font-size: 18px; font-weight: 800; letter-spacing: .3em; text-align: center; }
.code-card .cc-mine { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.code-card .cc-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1.5px solid #bdebcc; background: #f0fdf4; color: #14532d; border-radius: 12px; padding: 6px 12px; cursor: pointer; font: inherit; text-align: left; transition: transform .2s, box-shadow .2s; }
.code-card .cc-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(21, 128, 61, .6); }
.code-card .cc-chip b { font-family: ui-monospace, 'Courier New', monospace; font-size: 16px; letter-spacing: .2em; }
.code-card .cc-chip span { font-size: 11px; opacity: .8; }
.code-card.done { display: flex; align-items: center; gap: 14px; border-style: solid; border-color: #bdebcc; background: linear-gradient(135deg, #f0fdf4, #fff); }
.code-card .cc-ok { flex: none; font-weight: 800; color: #fff; background: linear-gradient(135deg, #16a34a, #0f7a35); border-radius: 14px; padding: 10px 12px; font-size: 15px; animation: popIn .5s both; }

/* ---------- my loyalty cards (one per restaurant) ---------- */
.mc-item { background: #fff; border: 1.5px solid #f2e3d6; border-radius: 26px; padding: 16px; margin-top: 18px; box-shadow: 0 24px 40px -30px rgba(150, 60, 20, .55); animation: fadeUp .6s both; }
.mc-item.focus { border-color: #ff9a5c; box-shadow: 0 0 0 4px rgba(255, 122, 26, .14), 0 24px 40px -30px rgba(150, 60, 20, .55); }
.mc-biz { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mc-logo { width: 44px; height: 44px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff9500, #e5311b); }
.mc-logo img { width: 100%; height: 100%; object-fit: cover; }
.mc-card { display: block; color: inherit; text-decoration: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.mc-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.mc-codes { margin-top: 14px; display: grid; gap: 10px; }
.mc-code { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 12px 14px; background: linear-gradient(135deg, #fff7ed, #fff); border: 1.5px dashed #ffb48a; }
.mc-code.big { background: linear-gradient(135deg, #16a34a, #0f7a35); color: #fff; border: 0; box-shadow: 0 16px 30px -18px rgba(15, 122, 53, .9); }
.mc-digits { display: flex; gap: 5px; border: 0; background: none; cursor: pointer; padding: 0; }
.mc-digits span { width: 30px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: #fff; color: #e5311b; font: 800 20px ui-monospace, 'Courier New', monospace; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); animation: popIn .5s both; }
.mc-digits span:nth-child(2) { animation-delay: .08s; } .mc-digits span:nth-child(3) { animation-delay: .16s; } .mc-digits span:nth-child(4) { animation-delay: .24s; }
.mc-code.big .mc-digits span { color: #0f7a35; }
.mc-rules { margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-rules div { background: #fffaf5; border: 1px solid #f5e6d8; border-radius: 14px; padding: 9px 11px; }
.mc-rules dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #9a8a80; font-weight: 600; }
.mc-rules dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: #231815; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12.5px; color: #9a8a80; }
.mc-empty { text-align: center; }
@media (max-width: 420px) { .mc-rules { grid-template-columns: 1fr; } .mc-digits span { width: 26px; height: 36px; font-size: 18px; } }
