:root{--bg:#f0ede5;--surface:#fffdf7;--surface-2:#e8e8df;--text:#143e46;--muted:#668086;--line:#cbd1c9;--accent:#c54730;--accent-ink:#fffaf0;--good:#2e7563;--warning:#a36823;--danger:#ba4134;--radius:3px;--font:Vazirmatn,system-ui,sans-serif;--petrol:#153f48;--postage-ink:#fcf8eb;--receipt:#fffcf4;color-scheme:light}
:root[data-theme="dark"]{--bg:#152c30;--surface:#213f43;--surface-2:#2a4c50;--text:#eceddf;--muted:#adc1bf;--line:#476361;--accent:#f59472;--accent-ink:#30251e;--good:#a1d2b7;--warning:#e9c080;--danger:#f0a18a;--petrol:#b1d0c7;--postage-ink:#163a3e;--receipt:#243f43;color-scheme:dark}
body{letter-spacing:-.2px}.app-shell{min-height:100dvh;max-width:540px;padding:0 0 96px;background:var(--bg)}.app-header{position:relative;display:flex;align-items:center;justify-content:space-between;border:0;padding:24px 22px 14px;background:none;min-height:80px}.stamp-brand{display:flex;align-items:center;gap:10px;color:var(--accent)}.stamp-brand>svg{width:30px;height:30px}.stamp-brand strong{font-size:17px;font-weight:750}.stamp-tools{display:flex;align-items:center;gap:5px}.stamp-tools button{border:0;min-width:38px;min-height:42px;padding:7px;background:none;font-size:11px}.icon-only span{display:none}.app-main{padding:0 19px}.stamp-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 3px 18px}.stamp-intro p{font-size:9px;color:var(--muted);letter-spacing:1px;margin-bottom:8px}.stamp-intro h1{font-size:31px;font-weight:800;letter-spacing:-1px}.stamp-count{width:69px;height:69px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid var(--accent);outline:1px solid var(--accent);outline-offset:-5px;border-radius:50%;color:var(--accent);transform:rotate(-12deg)}.stamp-count strong{font-size:26px;line-height:1.2;font-weight:500}.stamp-count span{font-size:8px}.stamp-collection-bar{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:8px 0 10px;border-top:1px solid var(--line);margin:8px 0 18px;font-size:9px}.stamp-collection-bar>span{display:flex;align-items:center;gap:6px;color:var(--muted)}.stamp-collection-bar i{width:3px;height:3px;border-radius:50%;background:currentColor}.stamp-find{display:flex;align-items:center;gap:5px;min-height:38px;border:0;background:none;padding:4px 0;font-size:10px}.stamp-find .icon{width:16px;height:16px}.stamp-filters{padding:13px;border:1px dashed var(--line);margin:0 0 20px;background:var(--surface)}.stamp-filters .list-controls{margin:0}.search-box,.segmented,.segmented button{border-radius:2px}.stamp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px 15px}.postage-stamp{position:relative;min-width:0;content-visibility:visible!important;contain:none!important;filter:drop-shadow(0 4px 4px #1c444314)}.postage-stamp:nth-child(even){margin-top:42px}.stamp-paper{background:var(--surface);padding:11px;position:relative;color:var(--text);mask:radial-gradient(circle at 5px 5px,transparent 0 3px,#000 3.5px) -5px -5px/10px 10px;mask-composite:add;clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}.stamp-paper:before{content:"";position:absolute;inset:7px;border:1px solid var(--line);pointer-events:none}.postage-stamp.is-selected .stamp-paper{background:var(--petrol);color:var(--postage-ink)}.postage-stamp.is-selected .stamp-paper:before{border-color:currentColor;opacity:.4}.stamp-front{display:flex;flex-direction:column;width:100%;min-height:273px;align-items:stretch;text-align:start;background:none;border:0;padding:7px 6px 0;min-width:0}.stamp-selected-head{padding:7px 6px 0}.stamp-card-status{font-size:8px;display:flex;align-items:center;gap:5px;margin-bottom:12px;color:var(--good)}.stamp-card-status i{height:4px;width:4px;border-radius:50%;background:currentColor;flex-shrink:0}.needs-attention .stamp-card-status{color:var(--danger)}.is-selected .stamp-card-status{color:inherit;opacity:.9}.stamp-card-name{font-size:13px;line-height:1.8;display:block;overflow-wrap:anywhere;font-weight:650;text-align:start}.stamp-technical{display:block;font-size:8px;opacity:.7;overflow-wrap:anywhere;text-align:start;margin-top:4px}.stamp-face-category{display:block;font-size:8px;opacity:.65;margin-top:16px}.stamp-selected-body{padding:0 6px}.stamp-value{display:flex;align-items:baseline;justify-content:flex-start;gap:3px;margin-top:7px;flex-wrap:wrap}.stamp-value strong{font-size:35px;font-weight:650;letter-spacing:-1.5px;line-height:1.5}.stamp-value>span{font-size:8px}.stamp-value-label{display:block;font-size:8px;opacity:.8}.stamp-data-line{height:5px;border:1px solid currentColor;margin:15px 0 10px;direction:ltr;opacity:.85}.stamp-data-line>span{display:block;height:100%;background:currentColor;transform-origin:left}.stamp-date{display:block;font-size:9px;line-height:1.7;margin-top:4px}.stamp-flip-hint{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:8px;color:var(--accent);border-top:1px dashed var(--line);margin-top:18px;padding-top:12px;min-height:37px}.stamp-access-actions{display:flex;flex-direction:column;gap:6px;padding:12px 6px 0}.stamp-access-actions button{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:39px;border:1px solid currentColor;background:none;color:inherit;font-size:10px;border-radius:1px;padding:7px 4px}.stamp-access-actions .stamp-copy{background:var(--postage-ink);color:var(--petrol);border-color:var(--postage-ink)}.stamp-access-actions .icon{width:15px;height:15px}.stamp-permit{display:flex;justify-content:space-between;gap:4px;border-top:1px dashed currentColor;margin:12px 6px 0;padding:9px 0 5px;font-size:7px;opacity:.7;align-items:center}.stamp-permit>span:first-child{overflow-wrap:anywhere;max-width:65%}.stamp-permit>span:last-child{font-size:6px;letter-spacing:.4px}.postage-stamp:not(.is-selected).needs-attention .stamp-value{color:var(--accent)}.stamp-more{margin-top:22px}.stamp-more:empty{display:none}.stamp-collection-note{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--muted);font-size:9px;text-align:center;margin:28px 0 0}.app-nav{position:fixed;inset:auto 0 0;margin:auto;width:min(100% - 26px,514px);height:72px;padding:8px 8px calc(10px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--surface);border:1px solid var(--line);border-bottom:0;border-radius:0;box-shadow:0 -4px 20px #0a343612;z-index:20;backdrop-filter:none}.app-nav:before{content:"";position:absolute;top:-4px;left:0;right:0;height:6px;background:radial-gradient(circle at 5px 0,var(--bg) 0 3px,transparent 3.5px) 0 0/10px 6px repeat-x;pointer-events:none}.app-nav button{background:none;border:0;border-radius:1px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;padding:6px 4px;color:var(--muted);font-size:10px;min-height:49px}.app-nav button[aria-current="page"]{background:var(--accent);color:var(--accent-ink)}.app-nav .icon{width:18px;height:18px}.btn,.icon-btn{border-radius:2px;box-shadow:none}.notice,.technical-value,.field input,.field select,.field textarea{border-radius:2px}.stamp-secondary{padding:15px 0}.page-title h1{font-size:30px;font-weight:750}.page-title p{font-size:11px}.wallet-card{border-radius:0;padding:24px;background:var(--petrol);color:var(--postage-ink);border:6px solid var(--surface);outline:1px dashed var(--line);box-shadow:none}.wallet-card:after{display:none}.wallet-card .balance{font-weight:600;font-size:37px}.wallet-card .balance small{font-size:11px}.wallet-card .btn{font-size:10px;border:1px solid currentColor;background:none;color:inherit}.transaction-list{border:0;border-radius:0;background:var(--surface);padding:0 12px}.transaction{background:none;padding:18px 0;gap:8px;grid-template-columns:26px minmax(0,1fr) auto;border-bottom:1px dashed var(--line)}.tx-icon{width:26px;height:30px;background:none;border-radius:0}.tx-title{font-size:11px}.tx-meta{font-size:8px}.tx-amount{font-size:11px}.category-list{display:grid;grid-template-columns:1fr 1fr;gap:15px}.category-card{border:7px solid var(--surface);outline:1px dashed var(--line);border-radius:0;background:var(--surface);display:flex;flex-direction:column;align-items:start;gap:13px;min-height:192px;padding:8px}.category-card:nth-child(even){transform:translateY(18px)}.category-symbol{background:none;border-radius:0;width:35px;height:35px;color:var(--accent)}.category-card h3{font-size:14px;line-height:1.6}.category-card p{font-size:9px}.category-card>.icon{align-self:end;color:var(--accent)}.stamp-shop>.notice{margin-top:40px!important}.toast{border-radius:2px;background:var(--accent);color:var(--accent-ink)}
/* A centered perforated receipt roll: compact printed content and a tear-off footer. */
.sheet{inset:0;margin:auto;width:min(calc(100% - 32px),328px);max-width:328px;max-height:calc(100dvh - 40px - env(safe-area-inset-top));height:fit-content;border:0;border-radius:0;padding:10px 0;background:var(--receipt);color:var(--text);overflow:hidden;box-shadow:0 20px 75px #001c344d;clip-path:polygon(0 6px,3% 0,6% 6px,9% 0,12% 6px,15% 0,18% 6px,21% 0,24% 6px,27% 0,30% 6px,33% 0,36% 6px,39% 0,42% 6px,45% 0,48% 6px,51% 0,54% 6px,57% 0,60% 6px,63% 0,66% 6px,69% 0,72% 6px,75% 0,78% 6px,81% 0,84% 6px,87% 0,90% 6px,93% 0,96% 6px,100% 0,100% calc(100% - 6px),97% 100%,94% calc(100% - 6px),91% 100%,88% calc(100% - 6px),85% 100%,82% calc(100% - 6px),79% 100%,76% calc(100% - 6px),73% 100%,70% calc(100% - 6px),67% 100%,64% calc(100% - 6px),61% 100%,58% calc(100% - 6px),55% 100%,52% calc(100% - 6px),49% 100%,46% calc(100% - 6px),43% 100%,40% calc(100% - 6px),37% 100%,34% calc(100% - 6px),31% 100%,28% calc(100% - 6px),25% 100%,22% calc(100% - 6px),19% 100%,16% calc(100% - 6px),13% 100%,10% calc(100% - 6px),7% 100%,4% calc(100% - 6px),0 100%)}.sheet[open]{display:flex;flex-direction:column;animation:none}.sheet::backdrop{background:#0a343bb8;backdrop-filter:blur(3px) saturate(.7)}.sheet-header{display:block;text-align:center;padding:10px 20px 17px;border-bottom:1px dashed var(--text);flex-shrink:0}.receipt-controls{display:flex;justify-content:space-between;align-items:center;gap:8px;direction:ltr}.receipt-controls .icon-btn{width:31px;height:31px;min-width:31px;min-height:31px;background:none;border:1px solid var(--line);border-radius:50%;padding:5px}.receipt-controls .icon{width:16px;height:16px}.receipt-spacer{width:31px}.receipt-brand{font:700 11px/1.4 ui-monospace,monospace;letter-spacing:3px;color:var(--accent)}.receipt-stars{font-size:20px;color:var(--accent);letter-spacing:2px;margin:4px 0 6px}.sheet-header h2{font-size:20px;font-weight:700;line-height:1.6;overflow-wrap:anywhere}.sheet-header>p{font-size:7px;letter-spacing:1px;color:var(--muted);margin-top:7px}.sheet-body{padding:20px 21px;overflow:auto;overscroll-behavior:contain;min-height:0;font-size:12px;flex:1}.receipt-entry{padding-bottom:18px;margin-bottom:18px;border-bottom:1px dashed var(--line);min-width:0}.receipt-entry:last-child{margin-bottom:0;border-bottom:0;padding-bottom:0}.receipt-identity{text-align:center;padding-bottom:17px;border-bottom:1px dashed var(--line)}.detail-title{font-size:20px;font-weight:700;text-align:center;overflow-wrap:anywhere;margin-bottom:7px}.receipt-identity>.row{flex-direction:column;gap:8px}.detail-identity{font-size:10px;margin:0}.badge{font-size:9px;border-radius:0;border:1px solid currentColor;background:none;padding:2px 7px;font-weight:450}.receipt-reading{border-bottom:1px dashed var(--line);padding-bottom:19px;margin-bottom:19px}.detail-usage{background:none;border:0;border-radius:0;padding:17px 0 0;margin:0}.detail-usage .big{font-size:28px;font-weight:650;line-height:1.7;text-align:center;padding:7px 0}.detail-usage .small{font-size:9px}.progress,.progress>span{height:4px;border-radius:0}.receipt-tools{padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed var(--line)}.receipt-tools>h3,.receipt-record>h3{font-size:9px;letter-spacing:1px;font-weight:650;color:var(--muted);text-align:center;margin-bottom:12px}.action-grid{gap:6px}.action-grid .btn{font-size:10px;min-height:43px;padding:8px 6px;gap:5px}.action-grid .icon{width:16px;height:16px}.fact-list{margin-top:0!important}.fact-list>div{border-bottom:1px dotted var(--line);padding:10px 0;gap:10px;font-size:10px;align-items:baseline}.fact-list dt{flex-shrink:1;max-width:48%}.fact-list dd{font-size:10px;overflow-wrap:anywhere;line-height:1.8;font-weight:550}.fact-list>div:last-child{border-bottom:1px dotted var(--line)}.receipt-record{padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed var(--line)}.receipt-management>.action-row{font-size:11px}.action-row p{font-size:9px}.receipt-tearoff{position:relative;flex-shrink:0;border-top:2px dashed var(--text);padding:0 21px;background:var(--receipt)}.receipt-tearoff:before,.receipt-tearoff:after{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:var(--bg);top:-9px}.receipt-tearoff:before{left:-8px}.receipt-tearoff:after{right:-8px}.sheet-actions{padding:14px 0 4px;border:0;background:none;gap:7px}.sheet-actions>.btn{min-height:44px;font-size:12px;padding:10px}.receipt-end{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--muted);font-size:7px;letter-spacing:.6px;padding:12px 0 10px}.receipt-end>span:last-child{color:var(--accent);font-size:16px}.sheet .notice{font-size:11px;line-height:1.85;padding:12px;border:1px dashed currentColor;background:color-mix(in srgb,currentColor 4%,var(--receipt))}.receipt-identity+.notice{margin-top:15px}.sheet .plan-list{display:block}.plan-card{position:relative;border:1px dashed var(--muted);border-radius:0;background:var(--surface-2);padding:16px;margin:0 0 16px;display:flex;gap:10px}.plan-card:last-child{margin-bottom:0}.plan-card:before,.plan-card:after{content:"";position:absolute;top:45%;width:12px;height:12px;border-radius:50%;background:var(--receipt);border:1px dashed var(--muted)}.plan-card:before{left:-7px}.plan-card:after{right:-7px}.receipt-coupon-label{font-size:8px;letter-spacing:1px;color:var(--accent);display:block;text-align:center}.plan-card>.row{justify-content:center;flex-wrap:wrap;gap:5px}.plan-card h3{font-size:16px;text-align:center}.plan-card .price{font-size:26px;font-weight:650;text-align:center}.plan-card .price small{font-size:9px}.plan-card .plan-meta{justify-content:center;gap:12px;font-size:10px}.plan-card .plan-meta .icon{width:13px}.plan-card .btn{font-size:11px;min-height:43px}.plan-card .plan-trial{font-size:10px}.renew-summary,.purchase-summary{border-radius:0;border-top:1px dashed var(--text);border-bottom:3px double var(--text);padding:17px 0;background:none;text-align:center}.renew-summary h3{font-size:15px}.summary-amount{font-size:28px;font-weight:700;margin:10px 0}.sheet .renew-summary p{font-size:11px}.sheet .qr-frame{border-radius:0;border:0;box-shadow:none;background:white;padding:7px;width:100%;max-width:252px;margin:0 auto}.qr-frame svg{width:100%;height:auto}.sheet .technical-value{background:none;border:1px dashed var(--line);border-radius:0;font-size:9px;line-height:1.8;padding:10px}.sheet .field{font-size:11px}.sheet .field input,.sheet .field select,.sheet .field textarea{border:1px solid var(--line);background:var(--receipt);font-size:12px;min-height:43px;border-radius:0}.sheet .qty-control{gap:6px}.sheet .qty-control .btn{min-width:38px;padding:8px}.sheet .qty-control input{width:100%;min-width:0}.sheet .settings-section{margin-top:0}.sheet .settings-section h3{font-size:13px}.sheet .account-options,.sheet .concept-options{gap:6px}.sheet .account-options .btn,.sheet .concept-options .btn{font-size:9px;min-height:43px;padding:9px 5px}.sheet .small{font-size:10px}.sheet .action-row{font-size:11px}.sheet .switch{width:43px;height:26px}.sheet .switch:before{width:18px;height:18px}.sheet .switch[aria-checked="true"]:before{inset-inline-start:21px}.sheet-error{font-size:11px;border-radius:0}.sheet .empty{padding:27px 5px}.sheet .copy-fallback{user-select:all}.sheet[data-kind="settings"] .receipt-stars{display:none}.sheet[data-kind="settings"] .sheet-header h2{font-size:17px;margin-top:10px}.sheet[data-kind="settings"] .receipt-entry{padding-bottom:15px;margin-bottom:15px}.receipt-tearoff .btn:active{transform:translateY(1px)}
.stamp-paper{mask:none}.stamp-paper:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 0 5px,var(--bg) 0 3px,transparent 3.5px) left top/7px 10px repeat-y,radial-gradient(circle at 7px 5px,var(--bg) 0 3px,transparent 3.5px) right top/7px 10px repeat-y,radial-gradient(circle at 5px 0,var(--bg) 0 3px,transparent 3.5px) left top/10px 7px repeat-x,radial-gradient(circle at 5px 7px,var(--bg) 0 3px,transparent 3.5px) left bottom/10px 7px repeat-x}
@media(min-width:480px){.app-header{padding:26px 30px 18px}.app-main{padding-inline:29px}.stamp-intro h1{font-size:38px}.stamp-grid{gap:25px}.stamp-front{min-height:295px}.stamp-card-name{font-size:16px}.stamp-value strong{font-size:43px}.stamp-technical{font-size:9px}.stamp-face-category,.stamp-date{font-size:10px}.stamp-selected-head,.stamp-selected-body{padding-inline:11px}.stamp-access-actions{padding-inline:11px}.stamp-permit{margin-inline:11px}.stamp-paper{padding:13px}.app-shell{border-inline:1px solid var(--line)}}
@media(max-width:374px){.app-main{padding-inline:15px}.app-header{padding:20px 18px 10px}.stamp-intro{padding-top:15px}.stamp-intro h1{font-size:27px}.stamp-intro p{font-size:8px;letter-spacing:.4px}.stamp-count{width:62px;height:62px}.stamp-grid{gap:19px 11px}.stamp-paper{padding:10px}.stamp-card-name{font-size:12px}.stamp-value strong{font-size:31px}.stamp-collection-bar{font-size:8px}.stamp-find{font-size:9px}.stamp-access-actions button{font-size:9px}.stamp-front{padding-inline:4px}.stamp-selected-head,.stamp-selected-body{padding-inline:4px}.stamp-permit{font-size:6px}.sheet{width:calc(100% - 24px);max-width:328px}.sheet-body{padding-inline:19px}.sheet-header{padding-inline:19px}.receipt-tearoff{padding-inline:19px}.sheet-header h2{font-size:18px}.app-nav button{font-size:9px;gap:5px}}
.receipt-controls .icon-btn{position:relative;width:44px;height:44px;min-width:44px;min-height:44px;padding:14px;border:0;border-radius:0}.receipt-controls .icon-btn:before{content:"";position:absolute;inset:6px;border:1px solid var(--line);border-radius:50%;pointer-events:none}.receipt-spacer{width:44px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
