*{box-sizing:border-box}body{margin:0;background:#f5f7fa;color:#1b293b;font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.4;cursor:default}header,main,nav{max-width:1000px;margin:auto;padding:22px}h1{font-size:28px;letter-spacing:-1px;font-weight:750;margin:0}p{line-height:1.6}.heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.heading p{color:#64748b;margin:4px 0}.count{font-size:13px;color:#64748b}.status{color:#23765a;font-size:14px;margin:14px 0 0}details{font-size:14px;margin-top:12px}summary{cursor:pointer;color:#53677f;min-height:32px}details p{max-width:660px}nav{position:sticky;top:0;background:#f5f7faf5;backdrop-filter:blur(12px);z-index:2;padding-top:10px;padding-bottom:0}.search{width:100%;height:54px;background:white;border:1px solid #ccd6e3;border-radius:14px;padding:0 16px;font-size:16px}.categories{display:flex;gap:8px;overflow:auto;padding:14px 0;scrollbar-width:none}.categories button{white-space:nowrap;background:white;border:1px solid #d9e1ea;border-radius:24px;padding:10px 16px;min-height:44px;font-size:14px;color:#516176}.categories .selected{background:#fff0f1;border-color:#c72f3b;color:#b72331;font-weight:700}main{padding-top:10px;padding-bottom:120px}.options{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#637287;margin:4px 0 22px}select{appearance:none;background:white;border:1px solid #d9e1ea;border-radius:8px;min-height:44px;padding:8px 14px;margin-left:5px}section{margin-bottom:30px}h2{font-size:19px;font-weight:700;margin:0 0 12px}h2 small{font-size:13px;color:#7b8796;margin-left:8px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}article{padding:20px;border:1px solid #dbe2ec;border-radius:17px;background:white;min-width:0}h3{font-size:16px;font-weight:650;line-height:1.45;margin:0;overflow-wrap:anywhere}.meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#708197;margin:10px 0 20px}.meta code{font-family:ui-monospace,monospace}.quantities{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quantities>div{min-width:0}.quantities label{display:block;font-size:14px;margin-bottom:8px;color:#5d6c80}.stepper{display:flex;border:1px solid #d6e0eb;border-radius:12px;background:#f5f8fc;overflow:hidden}.stepper.desired{background:#fff6f6;border-color:#f0d9dc}.stepper button{border:0;background:transparent;height:52px;flex:0 0 44px;font-size:23px;color:#8d2531}.stepper input{width:100%;min-width:0;border:0;background:transparent;text-align:center;font-size:18px;font-weight:600;outline:0;color:#21344c}.stepper input:focus{background:white;box-shadow:inset 0 -3px #b53c48}.stepper input[aria-invalid=true]{box-shadow:inset 0 -3px red}.error{color:#ae2331}footer{position:fixed;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px max(22px,calc((100vw - 956px)/2));padding-bottom:max(16px,env(safe-area-inset-bottom));border-top:1px solid #dbe3ed;background:white;z-index:3}footer>div{font-size:13px;color:#62748b}footer strong{font-size:17px;color:#21344c}progress{display:block;width:145px;height:5px;margin-top:8px;accent-color:#258062}.export{border:0;border-radius:12px;background:#bd2937;color:white;min-height:50px;padding:12px 21px;font-size:15px;font-weight:650}.empty{text-align:center;padding:40px;color:#637287}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8cb8ef;outline-offset:2px}@media(max-width:760px){header,main,nav{padding-left:16px;padding-right:16px}.grid{grid-template-columns:1fr}article{padding:17px}.count{display:none}h1{font-size:25px}footer{padding-left:16px;padding-right:16px}}@media(max-width:350px){article{padding:14px 10px}.quantities{gap:8px}.quantities label{font-size:14px}.stepper input{font-size:16px}.export{padding:12px}progress{width:120px}}
.alternatives{font-size:13px;color:#53677f;margin:-6px 0 20px}.alternatives strong{display:block;margin-bottom:8px;font-size:12px}.alternatives>div{padding:9px 0;border-top:1px solid #edf0f5;line-height:1.5}.alternatives code{display:block;font-size:11px;color:#708197}.remove{background:transparent;border:1px solid #d9e1ea;color:#637287;border-radius:9px;padding:10px 12px;min-height:44px;font-size:13px}article>.remove{margin-top:18px}.previous{display:block;margin-top:6px}.options{gap:8px;flex-wrap:wrap}

.purchase-history { padding-bottom: 48px; }
.purchase-history section { margin-top: 24px; }
.purchase-history label { display: block; margin: 18px 0 6px; }
.purchase-history select { width: 100%; margin-left: 0; }
.history-tabs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.history-tabs button { min-height: 44px; background: white; border: 1px solid #d9e1ea; border-radius: 10px; padding: 8px 14px; color: #21344c; }
.history-tabs button[aria-pressed=true] { background: #fff0f1; border-color: #bd2937; }
.history-import { background: white; border: 1px solid #dbe2ec; border-radius: 12px; padding: 14px; margin-bottom: 20px; }
.history-import input[type=file] { display: block; width: 100%; margin: 8px 0; }
.history-scroll { overflow: auto; border-radius: 12px; border: 1px solid #dbe2ec; }
.history-scroll table { border-collapse: collapse; width: 100%; background: white; }
.history-scroll th, .history-scroll td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e1e8ef; }
.history-scroll td:not(:first-child) { white-space: nowrap; }
.history-scroll small { display: block; color: #53677f; margin-top: 4px; }
.history-link { text-align: left; color: #8d2531; background: transparent; border: 0; padding: 4px 0; min-height: 36px; text-decoration: underline; }

.logout-form { margin-left: auto; }
.login-page { max-width: 460px; padding-top: 48px; }
.login-page label { display: block; margin: 16px 0 6px; }
.login-page form .export { width: 100%; margin-top: 20px; }
.login-error { color: #8d2531; }
