/* Inner pages: pricing, checkout, order status and records */
.purchase-main, .records-main { padding-top: 48px; }
.intro { max-width: 640px; text-align: center; }
.intro h1, .page-title { margin-top: 14px; font: 600 clamp(30px, 4.6vw, 46px)/1.25 var(--serif); letter-spacing: 1.5px; }
.subtitle, .page-sub { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.pill { display: inline-block; align-self: flex-start; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); font-size: 12px; font-weight: 500; }
h2 { font-size: 20px; font-weight: 600; margin: 12px 0 16px; }
.prototype-note { margin-top: 24px; font-size: 13px; color: var(--ink-3); }

/* Pricing hero: a kraft shop sign hung on a red string, the cat seal on top and the shop's stamp */
.shop-hero { position: relative; display: flex; justify-content: center; width: min(860px, 100%); padding: 6px 0 4px; }
.shop-hero .confetti { inset: 0 -10px; }
.shop-sign { position: relative; width: min(600px, 100%); padding-top: 64px; transform-origin: 50% 0; animation: sign-hang 1.6s var(--spring) .1s both; }
@keyframes sign-hang { 0% { opacity: 0; transform: translateY(-18px) rotate(-5deg); } 40% { opacity: 1; transform: rotate(2.4deg); } 70% { transform: rotate(-1.6deg); } 100% { transform: rotate(-.8deg); } }
.sign-string { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 72px; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sign-string path { vector-effect: non-scaling-stroke; }
.sign-nail { position: absolute; left: 50%; top: -3px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f2d9a8, var(--kraft-deep) 70%); box-shadow: 0 2px 3px rgb(60 40 20 / 45%); }
.sign-board { position: relative; padding: 52px 36px 34px; border-radius: 18px; background: linear-gradient(172deg, #f3e0bb, #e6c895); text-align: center; isolation: isolate; box-shadow: 0 3px 0 #b98f5c, 0 22px 40px -22px rgb(70 45 20 / 60%); }
.sign-board::before { content: ''; position: absolute; inset: 9px; z-index: -1; border-radius: 12px; border: 1.5px dashed rgb(120 80 40 / 32%); pointer-events: none; }
.sign-board::after { content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: var(--fiber); mix-blend-mode: multiply; opacity: .35; pointer-events: none; }
.sign-cat { position: absolute; left: 50%; top: -40px; width: 76px; height: 76px; margin-left: -38px; border-radius: 50%; box-shadow: 0 0 0 5px var(--card), 0 3px 0 5px var(--kraft), 0 12px 20px -6px rgb(60 35 15 / 50%); transition: transform .6s var(--spring); }
.shop-sign:hover .sign-cat { transform: rotate(-8deg) scale(1.05); }
.sign-stamp { display: inline-block; padding: 4px 12px 3px; border: 1.5px solid var(--accent); border-radius: 6px; color: var(--accent); font: 600 14px/1.3 var(--serif); letter-spacing: 6px; text-indent: 6px; box-shadow: inset 0 0 0 2px #f1dcb5, inset 0 0 0 3px rgb(199 91 40 / 35%); transform: rotate(-3deg); }
.sign-board h1 { margin-top: 14px; font: 600 clamp(26px, 4.2vw, 40px)/1.4 var(--serif); letter-spacing: 2px; color: var(--ink); }
.sign-board .phrase { display: inline-block; }
.sign-board em { position: relative; font-style: normal; color: var(--accent); }
.sign-board em::after { content: ''; position: absolute; z-index: -1; left: -.08em; right: -.08em; bottom: .06em; height: .32em; border-radius: 3px; background: var(--mustard); opacity: .6; transform: rotate(-1.5deg); transform-origin: left; animation: underline 1s var(--ease) 1.2s both; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; width: min(860px, 100%); margin-top: 40px; }
.shop-hero + .plans { margin-top: 34px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); }
.plan h2 { margin: 16px 0 6px; font: 600 24px var(--serif); letter-spacing: 1px; }
.family { background: var(--jade) var(--grain); background-blend-mode: soft-light; color: #f6ecdb; box-shadow: 0 3px 0 var(--jade-deep), 0 28px 50px -24px rgb(30 60 60 / 55%); overflow: hidden; }
.family::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 60% at 100% 0%, rgb(227 167 60 / 28%), transparent 70%); }
.family .pill { background: var(--mustard); color: #3a2a12; box-shadow: 0 2px 0 #b67d1c; }
.family .price span, .plan.family ul { color: rgb(246 236 219 / 82%); }
.family ul { border-color: rgb(255 255 255 / 16%) !important; }
.family .primary { background: var(--accent); }
.family .primary:hover { background: var(--accent-hover); }
.price { margin-top: 6px; }
.price strong { font: 600 44px/1.1 var(--sans); letter-spacing: -1px; }
.price span { font-size: 14px; color: var(--ink-3); }
.plan ul { flex: 1; margin: 22px 0 26px; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 2.3; color: var(--ink-2); }
.plan li::before { content: '✓'; margin-right: 10px; color: var(--accent); font-weight: 700; }
.family li::before { color: var(--mustard); }
.plan .primary { width: 100%; }
/* First-purchase bonus: a kraft gift tag with a punched hole and red string, pinned to the plan's corner */
.plan:not(.has-bonus) .first-gift, .plan:not(.has-bonus) .bonus-line { display: none; }
.first-gift { position: absolute; top: 16px; right: 20px; z-index: 2; filter: drop-shadow(0 2px 0 rgb(120 80 40 / 35%)) drop-shadow(0 8px 10px rgb(60 40 24 / 25%)); transform-origin: 50% 0; animation: gift-swing 1.4s var(--spring) .5s both; }
.first-gift::before { content: ''; position: absolute; left: 50%; top: -12px; width: 18px; height: 22px; margin-left: -9px; border: 1.5px solid var(--accent); border-bottom-color: transparent; border-radius: 50% 50% 0 0; }
.first-gift-tag { position: relative; display: flex; flex-direction: column; align-items: center; width: 74px; padding: 20px 0 10px; background: linear-gradient(170deg, #f6e6c6, #e9cf9f); color: var(--ink); clip-path: polygon(22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%, 0 16%); }
.first-gift-tag::before { content: ''; position: absolute; left: 50%; top: 7px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: rgb(80 50 20 / 55%); box-shadow: inset 0 1px 1px rgb(0 0 0 / 40%); }
.first-gift-tag::after { content: ''; position: absolute; inset: 0; background: var(--fiber); mix-blend-mode: multiply; opacity: .3; pointer-events: none; }
.first-gift small { font-size: 11px; letter-spacing: 1px; color: #6b5640; }
.first-gift b { margin: 1px 0 -1px; font: 700 30px/1.05 var(--sans); letter-spacing: -1px; color: var(--accent); font-variant-numeric: tabular-nums; }
.family .first-gift b { color: var(--accent-hover); }
@keyframes gift-swing { 0% { opacity: 0; transform: rotate(-24deg) translateY(-10px); } 45% { opacity: 1; transform: rotate(10deg); } 70% { transform: rotate(3deg); } 100% { transform: rotate(6deg); } }
.bonus-line { align-self: flex-start; margin-top: 12px; padding: 5px 12px 5px 10px; border-radius: 6px; background: var(--accent-soft) var(--grain); background-blend-mode: soft-light; color: var(--accent-hover); font-size: 13px; transform: rotate(-.6deg); box-shadow: 0 1px 0 rgb(150 60 20 / 18%); }
.bonus-line::before { content: '✂'; margin-right: 6px; opacity: .7; }
.bonus-line b { font-size: 15px; }
.family .bonus-line { background-color: var(--mustard); color: #3a2a12; box-shadow: 0 2px 0 #b67d1c; }
.service-rules { width: min(860px, 100%); margin-top: 24px; padding: 22px 26px; border-radius: var(--radius); background: rgb(255 250 242 / 60%); box-shadow: inset 0 0 0 1px var(--line); }
.service-rules h2 { font-size: 15px; margin: 0 0 8px; }
.service-rules p { font-size: 13px; line-height: 1.9; color: var(--ink-2); }

/* Checkout and order cards */
.checkout { width: min(600px, 100%); margin-top: 34px; padding: 30px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); }
.order-heading { display: flex; align-items: center; justify-content: space-between; }
.order-heading h2 { margin: 12px 0 18px; font: 600 24px var(--serif); }
.checkout dl { margin: 0; padding-top: 6px; border-top: 1px solid var(--line); }
.checkout dl > div { display: flex; justify-content: space-between; gap: 16px; margin: 13px 0; font-size: 14px; }
.checkout dt { color: var(--ink-3); }
.checkout dd { margin: 0; text-align: right; }
.bonus-row dt::before { content: '✂'; margin-right: 6px; color: var(--accent); }
.bonus-row dd { color: var(--accent-hover); font-weight: 600; }
.payment-method { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 15px 18px; border-radius: var(--radius-md); background: #eef4ff; box-shadow: inset 0 0 0 1px rgb(22 119 255 / 25%); font-size: 13px; color: var(--ink-2); }
.alipay-word { color: #1677ff; font-size: 16px; font-weight: 600; white-space: nowrap; }
.payment-method span:last-child { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1677ff; color: #fff; font-size: 12px; }
.checkout-rules { margin-top: 16px; font-size: 13px; line-height: 1.85; color: var(--ink-3); }
.total { display: flex; justify-content: space-between; align-items: center; margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.total strong { font-size: 34px; font-weight: 600; letter-spacing: -.5px; }
.pay-button { width: 100%; background: #1677ff; box-shadow: 0 8px 22px -8px rgb(22 119 255 / 70%); }
.pay-button:hover { background: #1265d9; }
.payment-status { margin-top: 12px; font-size: 13px; line-height: 1.8; color: var(--ink-3); text-align: center; }

/* Order receipt: a cut-paper ticket on kraft sheets with the cat seal; it turns green and counts up the credits once paid */
.receipt-wrap { position: relative; width: min(520px, 100%); margin-top: 12px; filter: drop-shadow(0 3px 0 rgb(140 100 60 / 30%)) drop-shadow(0 22px 28px rgb(60 40 24 / 16%)); }
.receipt-wrap::before, .receipt-wrap::after { content: ''; position: absolute; inset: 14px 6px 30px; border-radius: 26px; background: var(--fiber, var(--grain)), var(--kraft, #c89f6c); background-blend-mode: multiply; transform: rotate(-2.4deg) translate(-6px, 8px); }
.receipt-wrap::after { inset: 24px 18px 40px; background: var(--fiber, var(--grain)), var(--jade); transform: rotate(2deg) translate(10px, 14px); z-index: -1; }
.receipt { --tone: var(--go); --tone-deep: var(--go-deep); --tooth: 9px; position: relative; z-index: 1; padding: 40px 34px calc(30px + var(--tooth)); border-radius: 26px 26px 0 0; background: var(--card); text-align: center; isolation: isolate;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x; }
/* Paper fibres over the cream card */
.receipt::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--fiber, var(--grain)); mix-blend-mode: multiply; opacity: .22; }
.receipt-head { position: relative; }
.receipt-head::before { content: ''; position: absolute; left: -34px; right: -34px; top: -40px; height: 280px; z-index: -1; pointer-events: none; background: radial-gradient(60% 80% at 50% 0%, rgb(60 207 134 / 18%), transparent 70%); opacity: 0; transition: opacity 1.2s var(--ease); }
.receipt[data-state="paid"] .receipt-head::before { opacity: 1; }
.receipt[data-state="closed"], .receipt[data-state="error"] { --tone: var(--ink-3); --tone-deep: var(--ink-3); }
.receipt[data-state="review"] { --tone: var(--mustard, #e3a73c); --tone-deep: #d9773a; }
.receipt[data-state="login"] { --tone: #1677ff; --tone-deep: #1677ff; }
.receipt-head .eyebrow { margin-top: 24px; }
.receipt h1 { margin-top: 8px; font: 600 clamp(28px, 4.4vw, 36px)/1.25 var(--serif); letter-spacing: 2px; }
#result-status { max-width: 380px; margin: 10px auto 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* Seal: cat mark on stacked paper discs inside a progress ring */
.receipt-badge { position: relative; width: 112px; height: 112px; margin: 0 auto; }
.receipt-badge::before, .receipt-badge::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--fiber, var(--grain)), var(--mustard, #e3a73c); background-blend-mode: multiply; box-shadow: 0 2px 0 rgb(140 90 30 / 35%); transform: translate(-7px, 5px); }
.receipt-badge::after { background: var(--fiber, var(--grain)), #d9773a; transform: translate(7px, 6px); z-index: 0; }
.badge-ring { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; transform: rotate(-90deg); stroke-width: 5; }
.ring-track { stroke: rgb(36 27 21 / 7%); }
.ring-fill { stroke: var(--tone); stroke-dasharray: 22 78; filter: drop-shadow(0 0 6px rgb(60 207 134 / 45%)); transition: stroke .5s, stroke-dasharray 1s var(--ease); }
.receipt[data-state="loading"] .badge-ring, .receipt[data-state="pending"] .badge-ring { animation: ring-spin 1.6s linear infinite; }
.receipt[data-state="pending"] .badge-ring { animation-duration: 2.6s; }
.receipt[data-state="paid"] .ring-fill { stroke-dasharray: 100 0; animation: ring-close 1s var(--ease) both; }
.receipt[data-state="closed"] .ring-fill, .receipt[data-state="review"] .ring-fill, .receipt[data-state="login"] .ring-fill, .receipt[data-state="error"] .ring-fill { stroke-dasharray: 100 0; filter: none; }
@keyframes ring-spin { to { transform: rotate(270deg); } }
@keyframes ring-close { from { stroke-dasharray: 22 78; } }
.badge-cat { position: absolute; inset: 18px; z-index: 1; width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 3px var(--card), 0 3px 0 3px rgb(140 100 60 / 28%), 0 8px 16px -4px rgb(70 40 15 / 35%); transition: filter .6s; }
.receipt[data-state="loading"] .badge-cat, .receipt[data-state="pending"] .badge-cat { animation: cat-breathe 2.4s ease-in-out infinite; }
.receipt[data-state="paid"] .badge-cat { transform-origin: 50% 90%; animation: cat-purr .5s ease-in-out .9s 2 alternate; }
.receipt[data-state="closed"] .badge-cat, .receipt[data-state="error"] .badge-cat { filter: grayscale(1) opacity(.7); }
@keyframes cat-breathe { 50% { transform: scale(.95); } }
@keyframes cat-purr { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.badge-mark { position: absolute; right: 2px; bottom: 2px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tone-deep); color: #fff; box-shadow: 0 0 0 4px var(--card), 0 3px 0 4px rgb(140 100 60 / 25%); transform: scale(0); transition: transform .5s var(--spring), background .3s; }
.badge-mark svg, .badge-mark b { display: none; }
.badge-mark svg { width: 18px; height: 18px; stroke-width: 2.6; }
.badge-mark b { font: 700 18px/1 var(--sans); }
.receipt[data-state="paid"] .badge-mark { transform: scale(1); transition-delay: .7s; }
.receipt[data-state="paid"] .mark-ok { display: block; }
.mark-ok path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.receipt[data-state="paid"] .mark-ok path { animation: draw .5s var(--ease) 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt[data-state="closed"] .badge-mark, .receipt[data-state="review"] .badge-mark { transform: scale(1); }
.receipt[data-state="closed"] .mark-no, .receipt[data-state="review"] .mark-warn { display: block; }
.badge-sparks { position: absolute; left: 50%; top: 50%; z-index: 3; }
.badge-sparks i { position: absolute; width: 7px; height: 7px; margin: -3px; border-radius: 2px; background: var(--go); opacity: 0; animation: spark 1.1s var(--ease) both; animation-delay: var(--t); }
.badge-sparks i:nth-child(3n) { background: var(--mustard, #e3a73c); transform: rotate(45deg); }
.badge-sparks i:nth-child(3n+1) { background: #d9773a; border-radius: 50%; }

/* Credits that just landed: a kraft tag taped onto the ticket */
.receipt-gain { position: relative; margin: 30px 6px 0; padding: 22px 20px 16px; border-radius: 6px; background: linear-gradient(170deg, #f4e3c2, #ecd5ab); isolation: isolate; box-shadow: 0 2px 0 rgb(140 100 60 / 30%), 0 10px 18px -10px rgb(60 40 24 / 35%); transform: rotate(-1deg); animation: tag-in .8s var(--spring) .35s both; }
.receipt-gain::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--fiber, var(--grain)); mix-blend-mode: multiply; opacity: .28; pointer-events: none; }
@keyframes tag-in { from { opacity: 0; transform: rotate(-5deg) translateY(16px) scale(.96); } }
.tape { position: absolute; left: 50%; top: -11px; width: 92px; height: 22px; margin-left: -46px; background: rgb(227 167 60 / 55%); transform: rotate(2deg); clip-path: polygon(0 8%, 6% 0, 12% 10%, 18% 0, 82% 0, 88% 8%, 94% 0, 100% 10%, 100% 92%, 94% 100%, 88% 90%, 82% 100%, 18% 100%, 12% 92%, 6% 100%, 0 90%); }
.gain-num { display: flex; align-items: baseline; justify-content: center; gap: 4px; color: var(--go-deep); }
.gain-num span { font: 600 28px/1 var(--sans); }
.gain-num strong { font: 600 56px/1 var(--sans); letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.gain-num em { font: 500 17px var(--sans); font-style: normal; margin-left: 4px; }
.gain-note { margin-top: 8px; font-size: 13px; color: #6b5640; }

/* Cut-here line with scissors */
.receipt[data-state="login"] .perforation, .receipt[data-state="loading"] .perforation, .receipt[data-state="error"] .perforation { display: none; }
.perforation { position: relative; height: 1px; margin: 30px -10px 8px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 7px, transparent 7px 13px); }
.perforation svg { position: absolute; left: 50%; top: -9px; width: 18px; height: 18px; margin-left: -9px; padding: 0 2px; box-sizing: content-box; background: var(--card); color: var(--ink-3); stroke-width: 1.5; transform: rotate(-90deg); }

.receipt-lines { margin: 0; text-align: left; }
.receipt-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 14px; animation: rise .7s var(--ease) both; }
.receipt-lines > div:nth-child(1) { animation-delay: .15s; } .receipt-lines > div:nth-child(2) { animation-delay: .2s; } .receipt-lines > div:nth-child(3) { animation-delay: .25s; } .receipt-lines > div:nth-child(4) { animation-delay: .3s; } .receipt-lines > div:nth-child(5) { animation-delay: .35s; } .receipt-lines > div:nth-child(6) { animation-delay: .4s; } .receipt-lines > div:nth-child(7) { animation-delay: .45s; }
.receipt-lines dt { flex-shrink: 0; color: var(--ink-3); }
.receipt-lines dd { min-width: 0; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.receipt-lines .alipay-word { font-size: 14px; }
.line-id dd { display: flex; align-items: center; gap: 6px; }
.line-id code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink-2); }
.copy-id { display: inline-flex; flex-shrink: 0; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; background: rgb(36 27 21 / 5%); color: var(--ink-2); font-size: 12px; transition: background .25s, color .25s; }
.copy-id:hover { background: rgb(36 27 21 / 9%); color: var(--ink); }
.copy-id.done { background: var(--jade-soft); color: var(--go-deep); }
.copy-id svg { width: 13px; height: 13px; }
.line-total { margin-top: 6px; padding-top: 16px !important; border-top: 1px solid var(--line); }
.line-total dt { color: var(--ink-2); }
.line-total dd { font: 600 28px/1 var(--sans); letter-spacing: -.5px; }

.receipt-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.receipt-actions > * { width: 100%; min-height: 50px; }
/* Paper-thick buttons: a solid edge underneath that presses in */
.receipt-actions .primary, .receipt-actions .secondary { box-shadow: 0 4px 0 var(--edge, #0f0b08), 0 12px 20px -12px rgb(60 40 24 / 60%); }
.receipt-actions .primary:hover, .receipt-actions .secondary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--edge, #0f0b08), 0 14px 22px -12px rgb(60 40 24 / 60%); }
.receipt-actions .primary:active, .receipt-actions .secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge, #0f0b08); }
.receipt-actions .secondary { --edge: rgb(140 100 60 / 35%); box-shadow: 0 3px 0 var(--edge), inset 0 0 0 1px var(--line-strong); }
.go-repair { --edge: #176b43; background: var(--go-deep); }
.receipt[data-state="loading"] .receipt-actions .secondary { display: none; }
.receipt[data-state="login"] #refresh-order, .pay-again { --edge: #0d55b8; background: #1677ff; }

.receipt-foot { max-width: 520px; margin-top: 22px; font-size: 13px; line-height: 1.9; color: var(--ink-3); text-align: center; }
.receipt-foot a[href^="mailto"] { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }

/* Records header */
.rec-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; width: min(1160px, 100%); }

/* Login prompt */
.login-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 40px; width: min(760px, 100%); margin-top: 44px; padding: 34px 40px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); }
.login-card h2 { margin: 0 0 8px; font: 600 24px var(--serif); letter-spacing: 1px; }
.login-card p { color: var(--ink-2); font-size: 14px; }
.login-card .pay-button { margin-top: 22px; width: auto; min-width: 220px; }
.login-photos { position: relative; width: 170px; height: 200px; }
.login-photos img { position: absolute; width: 120px; height: 160px; object-fit: cover; border: 6px solid #fff; border-bottom-width: 22px; border-radius: 4px; box-shadow: 0 10px 24px -6px rgb(60 40 24 / 35%); transition: transform .7s var(--spring); }
.login-photos img:first-child { left: 0; top: 10px; transform: rotate(-9deg); }
.login-photos img:last-child { right: 0; top: 24px; transform: rotate(7deg); }
.login-card:hover .login-photos img:first-child { transform: rotate(-14deg) translateX(-8px); }
.login-card:hover .login-photos img:last-child { transform: rotate(10deg) translateX(8px) translateY(-6px); }

/* Tabs */
#account-content { width: min(1160px, 100%); margin-top: 36px; }
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgb(36 27 21 / 6%); }
.tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: color .3s; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.tab-indicator { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); transition: transform .45s var(--ease), width .45s var(--ease); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); font-size: 12px; line-height: 18px; text-align: center; }
.tab-count:empty { display: none; }
.tab-panel { margin-top: 26px; animation: view-in .5s var(--ease) both; }

/* Gallery */
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); transition: background .25s, color .25s, transform .3s var(--spring); }
.icon-btn:hover { background: rgb(36 27 21 / 6%); color: var(--ink); transform: scale(1.06); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:disabled { opacity: .35; transform: none; }
/* A running job develops in its own little darkroom */
@keyframes develop { 50% { filter: grayscale(.6) sepia(.35) brightness(.78) blur(.6px); } }
.dev-scan { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.dev-scan::before { content: ''; position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: linear-gradient(180deg, transparent, rgb(255 150 120 / 25%) 50%, transparent); animation: sweep 3.2s var(--ease) infinite; }
.dev-label { position: absolute; left: 50%; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; transform: translateX(-50%); background: rgb(28 21 18 / 60%); color: #ffd9c9; font-size: 12px; white-space: nowrap; backdrop-filter: blur(8px); }
.dev-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--safelight); animation: pulse 1.6s ease-in-out infinite; }
/* Just finished: the print flashes into colour */
@keyframes pop { 40% { transform: scale(1.03); } }

/* Empty gallery */
.empty-card { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; border-radius: 28px; background: rgb(255 250 242 / 60%); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.empty-card h2 { margin: 26px 0 8px; font: 600 22px var(--serif); }
.empty-card p { color: var(--ink-2); font-size: 14px; margin-bottom: 24px; }
@keyframes float { 50% { transform: rotate(6deg) translateY(-6px); } }

/* Orders and ledger */
.records { margin: 0; padding: 4px 22px; list-style: none; font-size: 14px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.records li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.records li:last-child { border-bottom: 0; }
.records .when { flex-shrink: 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.records .what { flex: 1; min-width: 0; }
.records a { color: var(--accent); font-weight: 500; white-space: nowrap; }
.records .empty-row { color: var(--ink-3); justify-content: center; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--jade-soft); color: var(--jade); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.plus { color: var(--jade); font-weight: 600; font-variant-numeric: tabular-nums; }
.minus { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mini-stats { display: flex; gap: 10px; margin: 0 0 14px; }
.mini-stats div { display: flex; gap: 8px; align-items: baseline; padding: 8px 14px; border-radius: 999px; background: rgb(36 27 21 / 5%); font-size: 13px; }
.mini-stats dt { color: var(--ink-3); }
.mini-stats dd { margin: 0; font-weight: 600; }
.account-foot { margin-top: 44px; text-align: center; font-size: 13px; color: var(--ink-3); }
.account-foot .text-button { font-size: 13px; }

/* Viewer */
html.locked { overflow: hidden; }
.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(24 18 15 / 94%); color: #f3e7da; display: none; flex-direction: column; overscroll-behavior: contain; }
.viewer[open] { display: flex; animation: viewer-in .4s var(--ease) both; }
.viewer::backdrop { background: rgb(20 15 12 / 60%); backdrop-filter: blur(14px); animation: fade .4s var(--ease) both; }
.viewer.closing { animation: viewer-out .22s ease-in both; }
.viewer.closing::backdrop { animation: fade .22s ease-in reverse both; }
@keyframes viewer-in { from { opacity: 0; transform: scale(.97); } }
@keyframes viewer-out { to { opacity: 0; transform: scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.viewer-top, .viewer-bottom { display: flex; align-items: center; gap: 16px; padding: 14px max(20px, env(safe-area-inset-left)); }
.viewer-top { justify-content: space-between; }
.viewer-tools { display: flex; gap: 4px; }
.viewer-title { display: flex; flex-direction: column; min-width: 0; }
.viewer-title strong { font: 600 16px var(--serif); letter-spacing: 1px; }
.viewer-title time { font-size: 12px; color: rgb(243 231 218 / 55%); font-variant-numeric: tabular-nums; }
.viewer .icon-btn { color: rgb(243 231 218 / 80%); }
.viewer .icon-btn:hover { background: rgb(255 255 255 / 10%); color: #fff; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgb(255 255 255 / 8%); }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: rgb(243 231 218 / 65%); transition: background .3s, color .3s; }
.seg button[aria-pressed="true"] { background: rgb(255 255 255 / 14%); color: #fff; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 max(20px, env(safe-area-inset-left)); }
.viewer-stage .cmp { flex: none; width: 100%; height: 100%; border-radius: 14px; background: transparent; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 60%); animation: slide-in .5s var(--ease) both; transition: width .45s var(--ease), height .45s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateX(var(--from, 0)); } }
.viewer-bottom { justify-content: center; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.viewer-index { min-width: 54px; text-align: center; font-size: 13px; color: rgb(243 231 218 / 55%); font-variant-numeric: tabular-nums; }
.viewer-bottom .primary { min-width: 200px; }

/* Retention note and deleting photos */
.keep-note { display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 22px; padding: 10px 16px 10px 12px; border-radius: 12px; background: var(--card); color: var(--ink-2); font-size: 13px; line-height: 1.6; box-shadow: 0 2px 0 var(--kraft), inset 0 0 0 1px var(--line); transform: rotate(-.4deg); }
.keep-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--jade); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.keep-note b { color: var(--ink); font-weight: 600; }
.rec-keep { margin-left: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.rec-keep::before { content: '·'; margin-right: 6px; }
.rec-keep.soon { color: var(--accent); }
@keyframes leave { 30% { transform: rotate(-2deg) scale(1.02); } to { opacity: 0; transform: rotate(6deg) translateY(30px) scale(.86); } }
.delete-art { position: relative; width: 120px; height: 92px; margin: 4px auto 18px; }
.delete-art span { position: absolute; top: 4px; width: 66px; height: 82px; border: 4px solid #fff; border-bottom-width: 13px; border-radius: 3px; background: var(--paper-2) url(assets/portrait-old.jpg) center / cover; box-shadow: 0 6px 16px -6px rgb(60 40 24 / 35%); }
.delete-art span:first-child { left: 10px; transform: rotate(-9deg); }
.delete-art span:last-child { right: 10px; background-image: url(assets/portrait-new.jpg); transform: rotate(7deg); animation: drift 2.6s ease-in-out infinite; }
@keyframes drift { 50% { transform: rotate(13deg) translate(6px, 4px); opacity: .55; } }
.delete-sheet p:not(.login-sheet-status) { font-size: 14px; }
.delete-actions { display: flex; gap: 10px; margin-top: 24px; }
.delete-actions button { flex: 1; min-height: 50px; }
.primary.danger { background: var(--accent); box-shadow: 0 3px 0 var(--accent-edge), 0 10px 18px -10px rgb(148 64 26 / 60%); }
.primary.danger:hover { background: var(--accent-hover); }
.primary.danger:disabled { opacity: .7; }
.viewer #viewer-delete:hover { background: rgb(199 91 40 / 30%); }

@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 30px 22px; gap: 20px; }
}
@media (max-width: 600px) {
  .shop-sign { padding-top: 54px; }
  .sign-board { padding: 46px 18px 26px; }
  .sign-board h1 { letter-spacing: 1px; }
  .plans { grid-template-columns: 1fr; }
  .purchase-main, .records-main { padding-top: 30px; }
  .checkout { padding: 24px 18px; }
  .checkout dl > div { font-size: 13px; }
  .payment-method { gap: 10px; }
  .service-rules { padding: 18px; }
  .receipt { padding: 32px 20px calc(24px + var(--tooth)); }
  .receipt-head::before { left: -20px; right: -20px; }
  .receipt-wrap::before { transform: rotate(-1.6deg) translate(-4px, 8px); }
  .receipt-wrap::after { transform: rotate(1.4deg) translate(6px, 12px); }
  .gain-num strong { font-size: 48px; }
  .receipt-lines > div { font-size: 13px; }
  .keep-note { margin-bottom: 16px; transform: none; }
  .icon-btn { width: 34px; height: 34px; }
  .tabs button { padding: 7px 13px; font-size: 13px; }
  .records { padding: 2px 16px; }
  .records li { flex-wrap: wrap; row-gap: 2px; }
  .records .when { width: 100%; }
  .viewer-top { flex-wrap: wrap; gap: 8px; }
  .viewer-title { order: 1; flex: 1; }
  .viewer-top .viewer-tools { order: 2; }
  .seg { order: 3; width: 100%; justify-content: center; }
  .viewer-stage { padding: 0 8px; }
  .viewer-bottom { gap: 8px; }
  .viewer-bottom .primary { min-width: 0; flex: 1; }
}

/* Simple style: white and ink cards, no kraft, tags or tape. */
.purchase-main, .records-main { padding-top: 6vh; }
.intro h1, .page-title { margin-top: 0; font-weight: 500; font-size: clamp(28px, 4vw, 36px); letter-spacing: 2px; }
.subtitle, .page-sub { color: var(--ink-3); }
.price-head { text-align: center; }
.plans { gap: 24px; margin-top: 40px; }
.plan { padding: 28px; border-radius: 26px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.plan:hover { transform: translateY(-3px); }
.plan h2 { margin: 0; font-weight: 500; font-size: 19px; }
.plan-for { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.family { background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.family::before { content: none; }
.family .plan-for, .family .price span, .plan.family ul { color: rgb(255 255 255 / 72%); }
.family ul { border-color: rgb(255 255 255 / 16%) !important; }
.price { margin-top: 18px; }
.price strong { font: 500 46px/1.1 var(--serif); letter-spacing: 0; }
.plan ul { margin: 20px 0 24px; padding-top: 18px; border-top: 1px dashed var(--line-strong); line-height: 2.2; }
.plan li::before { color: inherit; font-weight: 400; opacity: .6; }
.family li::before { color: inherit; }
.plan .primary { min-height: 50px; }
.first-gift { top: 22px; right: 22px; filter: none; animation: none; }
.first-gift::before, .first-gift-tag::before, .first-gift-tag::after { content: none; }
.first-gift-tag { width: 62px; padding: 9px 0 7px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); clip-path: none; }
.first-gift small { font-size: 11px; letter-spacing: 0; color: var(--accent); }
.first-gift b { font: 500 22px/1.15 var(--serif); letter-spacing: 0; color: var(--accent); }
.family .first-gift-tag { background: rgb(255 255 255 / 12%); }
.family .first-gift small { color: #ffd9c2; }
.family .first-gift b { color: #fff; }
.bonus-line { margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); transform: none; box-shadow: none; }
.bonus-line::before { content: none; }
.bonus-line b { font-size: 13px; }
.family .bonus-line { background: rgb(255 255 255 / 12%); color: #ffd9c2; box-shadow: none; }
.price-notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 34px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-3); }
.checkout { border-radius: 26px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.order-heading h2 { font-weight: 500; }
.bonus-row dt::before { content: none; }
.receipt-wrap { filter: drop-shadow(0 18px 30px rgb(30 27 24 / 12%)); }
.receipt-wrap::before, .receipt-wrap::after { content: none; }
.receipt::after { content: none; }
.receipt h1 { font-weight: 500; }
.receipt-badge::before, .receipt-badge::after { content: none; }
.badge-cat { box-shadow: 0 0 0 3px var(--card); }
.badge-mark { box-shadow: 0 0 0 4px var(--card); }
.receipt-gain { margin: 26px 0 0; border-radius: 18px; background: var(--paper-2); box-shadow: none; transform: none; }
.receipt-gain::after, .receipt-gain .tape { display: none; }
.gain-note { color: var(--ink-2); }
.receipt-actions .primary, .receipt-actions .secondary, .receipt-actions .primary:hover, .receipt-actions .secondary:hover, .receipt-actions .primary:active, .receipt-actions .secondary:active { box-shadow: none; transform: none; }
.receipt-actions .secondary { box-shadow: inset 0 0 0 1px var(--line-strong); }
.go-repair { background: var(--accent); }
.tabs { background: var(--paper-2); box-shadow: none; }
.empty-card { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 26px; }
.records { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.login-card { background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); border-radius: 26px; }
@media (max-width: 600px) {
  .plans { gap: 16px; margin-top: 28px; }
  .plan { padding: 22px; }
  .price strong { font-size: 40px; }
}
