*{box-sizing:border-box}
body{margin:0;font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; background:#f5f9ff; color:#0b2745;}
.app{max-width:780px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;}
.topbar{position:sticky;top:0;background:rgba(255,255,255,.92);backdrop-filter: blur(10px); border-bottom:1px solid rgba(21,101,192,.14); display:flex; align-items:center; padding:10px 12px; gap:10px; z-index:2}
.brand{font-weight:700;letter-spacing:.3px}
.progress{font-size:12px; opacity:.75; margin-top:2px}
.topbar-title{display:flex; flex-direction:column; flex:1}
.app-tabs{display:flex;gap:6px;align-items:center}
.app-tab{min-height:34px;display:grid;place-items:center;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#1565c0;text-decoration:none;font-size:12px;font-weight:800;padding:0 10px;white-space:nowrap}
.app-tab.active{background:#1565c0;color:#ffffff;border-color:#1565c0}
.icon-btn{width:42px;height:42px;border-radius:8px;border:1px solid rgba(21,101,192,.18); background:#ffffff; color:#1565c0; font-size:18px}
.icon-btn:disabled{opacity:.35}
.cart-top-btn{position:relative;flex:0 0 42px;width:42px;height:42px;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#1565c0;display:grid;place-items:center;cursor:pointer}
.cart-top-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cart-top-btn span{position:absolute;right:-6px;top:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#41536a;color:#ffffff;border:2px solid #ffffff;font-size:11px;font-weight:900;display:grid;place-items:center}
.cart-top-btn.has-items{background:#1565c0;color:#ffffff;border-color:#1565c0}
.cart-top-btn.has-items span{background:#2e7d32}
.account-top-link{flex:0 0 38px;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(21,101,192,.2);background:#fff;color:#1565c0;text-decoration:none;font-size:14px;font-weight:900;padding:0;overflow:hidden;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.account-top-link:hover{background:#eef6ff;border-color:#1565c0;transform:translateY(-1px)}
.account-top-link svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.account-top-link.signed-in,.account-top-link.active-account{background:#1565c0;color:#fff;border-color:#1565c0}
.cart-top-btn[href]{text-decoration:none}
.main{padding:18px 12px 28px; display:flex; flex-direction:column; gap:14px}
.card{border:1px solid rgba(21,101,192,.14); background:#ffffff; border-radius:8px; padding:16px; box-shadow:0 10px 30px rgba(21,101,192,.08)}
.h1{font-size:18px;font-weight:700;margin:0 0 8px}
.p{margin:0; opacity:.86; line-height:1.35}
.meter{height:6px;border-radius:999px;background:#d9eaff;overflow:hidden;margin:12px 0 2px}
.meter span{display:block;height:100%;background:#1565c0}
.options{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.onboarding-card{padding-bottom:18px}
.question-block{border-top:1px solid rgba(21,101,192,.12);padding-top:14px;margin-top:14px}
.question-title{font-size:14px;font-weight:800}
.question-subtitle{font-size:12px;opacity:.72;margin-top:3px;line-height:1.35}
.compact-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.metrics-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.metric-field{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:8px;min-width:0;font-size:12px;font-weight:800;color:#0b2745}
.metric-field span{min-width:0}
.metric-control{min-width:0;width:100%;height:40px;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#f8fbff;color:#0b2745;padding:0 10px;font:inherit;font-weight:600}
.extra-context{width:100%;min-height:78px;margin-top:10px;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#f8fbff;color:#0b2745;padding:10px 12px;font:inherit;line-height:1.35;resize:vertical}
.extra-context::placeholder{color:rgba(11,39,69,.48)}
.height-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%;min-width:0}
.field-warning{grid-column:1 / -1;color:#b42318;font-size:12px;font-weight:700;line-height:1.3;min-height:0}
.option{display:flex; align-items:center; gap:10px; min-height:52px; padding:12px 12px; border-radius:8px; border:1px solid rgba(21,101,192,.14); background:#f8fbff; cursor:pointer}
.option.selected{border-color:#1565c0; background:#e8f2ff}
.option.goal-primary{border-color:#00897b;background:#e7f8f4;box-shadow:inset 3px 0 0 #00897b}
.option.goal-secondary{border-color:#c77800;background:#fff6e6;box-shadow:inset 3px 0 0 #c77800}
.option .label{flex:1}
.goal-role{flex:0 0 auto;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;line-height:1;text-transform:uppercase;letter-spacing:0}
.goal-role.primary{background:#00897b;color:#ffffff}
.goal-role.secondary{background:#c77800;color:#ffffff}
.actions{display:flex; gap:10px; margin-top:14px}
.sticky-actions{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.82),#ffffff 38%);padding-top:12px;margin-left:-2px;margin-right:-2px}
.btn{flex:1; min-height:44px; padding:12px 14px; border-radius:8px; border:1px solid rgba(21,101,192,.18); background:#ffffff; color:#1565c0; font-weight:650; cursor:pointer}
.btn.primary{background:#1565c0;color:#ffffff;border-color:#1565c0}
.btn:disabled{opacity:.4; cursor:not-allowed}
.small{font-size:12px; opacity:.75; margin-top:10px}
.kv{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.pill{font-size:12px; border:1px solid rgba(21,101,192,.14); padding:6px 10px; border-radius:999px; background:#f8fbff; opacity:.9}
.section-title{font-size:13px; font-weight:700; opacity:.8; margin-top:2px}
.protocol{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.buy-stack-row{display:flex;margin-top:12px}
.buy-stack-btn{text-align:center;text-decoration:none}
.proto-item{border:1px solid rgba(21,101,192,.14); border-radius:8px; padding:12px; background:#f8fbff}
.stack-product-card{display:grid;grid-template-columns:116px minmax(0,1fr);gap:12px;align-items:start}
.stack-product-media{height:116px;border-radius:8px;background:#ffffff;border:1px solid rgba(21,101,192,.1);display:grid;place-items:center;overflow:hidden}
.stack-product-media img{max-width:100%;max-height:104px;object-fit:contain;display:block}
.stack-product-placeholder{width:100%;height:100%;display:grid;place-items:center;color:#1565c0;font-weight:900;background:#e8f2ff}
.stack-product-copy{min-width:0}
.stack-product-title{font-size:12px;opacity:.72;margin-top:3px;line-height:1.25}
.stack-product-price{font-size:13px;font-weight:900;white-space:nowrap;align-self:center}
.stack-add-cart{border:0;cursor:pointer;background:#2e7d32;min-width:92px}
.proto-top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.proto-name{font-weight:800}
.proto-side{display:flex;align-items:flex-start;justify-content:flex-end;gap:10px;margin-left:auto}
.proto-dose{opacity:.85; font-size:13px}
.proto-usage{display:block;margin-top:4px;font-size:13px;color:rgba(11,39,69,.82);line-height:1.35}
.proto-dose-inline{font-weight:400;color:rgba(11,39,69,.82);text-decoration:none}
.proto-usage-separator{display:inline-block;margin:0 8px;color:rgba(11,39,69,.42)}
.proto-timing-inline{display:inline}
.buy-btn{height:30px;min-width:46px;border-radius:8px;background:#1565c0;color:#fff;text-decoration:none;font-size:12px;font-weight:800;display:grid;place-items:center;padding:0 10px}
.wellness-buy{background:#2e7d32}
.trash-btn{width:30px;height:30px;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#1565c0;display:grid;place-items:center;cursor:pointer}
.trash-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.trash-btn:hover{background:#e8f2ff}
.proto-time{opacity:.75; font-size:12px; margin-top:4px}
.bullets{margin:10px 0 0; padding-left:18px; opacity:.88}
.safety-bullets{margin-top:6px}
.mini-section-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0;color:#1565c0;margin-top:10px}
.note{font-size:12px; opacity:.8; line-height:1.35}
.personal-note{margin-top:10px;color:#0b2745;opacity:.9}
.source-note{margin-top:10px;word-break:break-word}
.source-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.source-links a{font-size:11px;color:#1565c0;text-decoration:none;border:1px solid rgba(21,101,192,.18);background:#fff;border-radius:999px;padding:4px 8px}
.hr{height:1px; background:rgba(21,101,192,.12); margin:10px 0}
.item-editor-card{margin-top:2px}
.item-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;margin-top:12px}
.item-column .section-title{grid-column:1 / -1}
.available-only{max-width:none}
.wellness-card{margin-top:2px}
.wellness-products{margin-top:12px}
.mini-item{display:flex;align-items:flex-start;gap:10px;border:1px solid rgba(21,101,192,.14);background:#f8fbff;border-radius:8px;padding:10px}
.wellness-item{background:#fbfff8;border-color:rgba(46,125,50,.18)}
.mini-copy{flex:1;min-width:0}
.mini-name{font-weight:800;font-size:13px}
.mini-meta{font-size:12px;opacity:.75;margin-top:3px}
.mini-tagline{font-size:12px;line-height:1.35;opacity:.86;margin-top:6px}
.move-btn{flex:0 0 32px;width:32px;height:32px;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#1565c0;font-size:22px;line-height:1;cursor:pointer}
.move-btn.add{background:#1565c0;color:#ffffff;border-color:#1565c0}
.move-btn.remove:hover,.move-btn.add:hover{filter:brightness(.96)}
.chat-card{margin-top:2px}
.chat-log{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.bubble{max-width:86%;padding:10px 12px;border-radius:8px;font-size:13px;line-height:1.35}
.bubble.user{align-self:flex-end;background:#1565c0;color:#ffffff}
.bubble.assistant{align-self:flex-start;background:#e8f2ff;color:#0b2745}
.chat-form{display:flex;gap:8px;margin-top:12px}
.chat-select,.chat-input{flex:1;min-width:0;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#0b2745;padding:0 12px;font:inherit}
.chat-input::placeholder{color:rgba(11,39,69,.48)}
.chat-send{flex:0 0 96px}
.shop-back{display:grid;place-items:center;text-decoration:none}
.shop-category-tabs{display:flex;gap:8px;overflow-x:auto;padding:12px 0 2px;margin-top:12px;scrollbar-width:none}
.shop-category-tabs::-webkit-scrollbar{display:none}
.category-tab{flex:0 0 auto;display:flex;align-items:center;gap:7px;min-height:36px;border-radius:999px;border:1px solid rgba(21,101,192,.18);background:#ffffff;color:#1565c0;padding:0 11px;font-size:12px;font-weight:850;cursor:pointer}
.category-tab strong{min-width:20px;height:20px;border-radius:999px;background:#e8f2ff;color:#1565c0;display:grid;place-items:center;font-size:11px}
.category-tab.active{background:#1565c0;color:#ffffff;border-color:#1565c0}
.category-tab.active strong{background:#ffffff;color:#1565c0}
.product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.product-tile{display:flex;flex-direction:column;justify-content:space-between;gap:12px;border:1px solid rgba(21,101,192,.14);background:#f8fbff;border-radius:8px;padding:12px;min-width:0;cursor:pointer;text-decoration:none;color:inherit}
.product-tile:hover,.product-tile:focus{border-color:#1565c0;background:#eef6ff;outline:none}
.product-image-wrap{height:128px;border-radius:8px;background:#ffffff;border:1px solid rgba(21,101,192,.1);display:grid;place-items:center;overflow:hidden}
.product-image{max-width:100%;max-height:116px;object-fit:contain;display:block}
.product-image.placeholder,.product-detail-image.placeholder{width:100%;height:100%;display:grid;place-items:center;color:#1565c0;font-weight:800;background:#e8f2ff}
.product-copy{min-width:0}
.product-buy-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid rgba(21,101,192,.1);padding-top:10px}
.product-price{font-size:13px;font-weight:800}
.product-add{border:0;cursor:pointer}
.product-detail{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;align-items:start}
.featured-product-detail{margin-top:14px;border:1px solid rgba(21,101,192,.14);background:#f8fbff;border-radius:8px;padding:12px}
.product-detail-image-wrap{height:180px;border-radius:8px;background:#ffffff;border:1px solid rgba(21,101,192,.12);display:grid;place-items:center;overflow:hidden}
.product-detail-image{max-width:100%;max-height:164px;object-fit:contain}
.product-description{margin-top:10px}
.product-detail-actions{display:flex;align-items:center;gap:12px;margin-top:14px}
.product-detail-add{flex:0 0 150px}
.product-page-detail{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}
.product-page-image-wrap{min-height:280px;border-radius:8px;background:#ffffff;border:1px solid rgba(21,101,192,.12);display:grid;place-items:center;overflow:hidden}
.product-page-image{max-width:100%;max-height:250px;object-fit:contain;display:block}
.product-page-image.placeholder{width:100%;height:100%;display:grid;place-items:center;color:#1565c0;font-weight:900;background:#e8f2ff}
.product-page-copy{min-width:0}
.product-page-title{font-size:14px;opacity:.78;margin-top:-4px;margin-bottom:12px;line-height:1.35}
.product-page-actions{display:flex;align-items:center;gap:14px;margin-top:18px}
.product-page-price{font-size:18px;font-weight:900;white-space:nowrap}
.product-page-add{flex:0 0 180px}
.related-product-grid{margin-top:12px}
.shop-cart{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:10px;align-items:center;border:1px solid rgba(21,101,192,.14);background:#f8fbff;border-radius:8px;padding:10px}
.cart-copy{min-width:0}
.cart-name{font-weight:800;font-size:13px}
.cart-meta{font-size:12px;opacity:.72;margin-top:3px}
.qty-control{display:grid;grid-template-columns:28px 28px 28px;align-items:center;border:1px solid rgba(21,101,192,.14);border-radius:8px;overflow:hidden;background:#ffffff}
.qty-control button{height:30px;border:0;background:#ffffff;color:#1565c0;font-size:18px;font-weight:800;cursor:pointer}
.qty-control span{text-align:center;font-size:12px;font-weight:800}
.cart-price{font-size:13px;font-weight:800;white-space:nowrap}
.cart-trash{width:30px}
.cart-total{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(21,101,192,.12);margin-top:14px;padding-top:14px;font-size:14px}
.checkout-form{margin-top:14px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800}
.form-grid input,.form-grid textarea,.form-grid select{width:100%;border-radius:8px;border:1px solid rgba(21,101,192,.18);background:#f8fbff;color:#0b2745;padding:10px 12px;font:inherit;font-weight:500}
.form-grid label:last-child{grid-column:1 / -1}
.checkout-btn{width:100%;margin-top:12px}
.order-message{min-height:18px;margin-top:10px;font-size:12px;font-weight:800}
.order-message.success{color:#2e7d32}
.order-message.error{color:#b42318}
.empty-cart{border:1px dashed rgba(21,101,192,.24);border-radius:8px;padding:16px;text-align:center;font-size:13px;opacity:.75}
.checkout-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.continue-shopping-btn{flex:0 0 auto;text-decoration:none;min-height:36px;padding:9px 12px}
.secure-pill{flex:0 0 auto;border:1px solid rgba(46,125,50,.2);background:#edf8ee;color:#2e7d32;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800}
.checkout-summary{border-top:1px solid rgba(21,101,192,.12);border-bottom:1px solid rgba(21,101,192,.12);margin-top:14px;padding:12px 0;display:flex;flex-direction:column;gap:8px}
.checkout-summary div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.checkout-grand-total{font-size:16px!important;padding-top:8px;border-top:1px solid rgba(21,101,192,.12)}
.checkout-section-title{margin-top:14px;margin-bottom:8px;font-size:13px;font-weight:900;color:#0b2745}
.shipping-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.payment-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(21,101,192,.14);border-radius:8px;background:#f8fbff;margin-top:14px;padding:12px}
.payment-panel .checkout-section-title{margin:0 0 4px}
.card-icons{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.card-icons span{border:1px solid rgba(21,101,192,.18);background:#fff;border-radius:6px;padding:5px 7px;font-size:11px;font-weight:900;color:#41536a}
.checkout-banner{border-radius:8px;padding:12px 14px;margin-bottom:12px;font-size:13px;font-weight:800}
.checkout-banner.success{border:1px solid rgba(46,125,50,.2);background:#edf8ee;color:#2e7d32}
.checkout-banner.error{border:1px solid rgba(180,35,24,.22);background:#fff2f0;color:#b42318}
.account-main{padding-top:34px;gap:24px}
.auth-card,.profile-card{width:100%;max-width:560px;margin:0 auto;padding:28px}
.auth-kicker{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#1565c0;margin-bottom:8px}
.auth-title{font-size:26px;line-height:1.15;margin:0 0 8px;color:#0b2745}
.auth-subtitle{margin-bottom:22px}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:850}
.auth-field input{width:100%;height:44px;border-radius:8px;border:1px solid rgba(21,101,192,.2);background:#f8fbff;color:#0b2745;padding:0 12px;font:inherit;font-weight:500;outline:none}
.auth-field input:focus{border-color:#1565c0;box-shadow:0 0 0 3px rgba(21,101,192,.1);background:#fff}
.auth-message{min-height:18px;font-size:12px;font-weight:800;line-height:1.35;color:#2e7d32}
.auth-submit{width:100%;flex:auto}
.local-profile-note{margin:17px 0 0;color:#60758c;font-size:11px;line-height:1.45;text-align:center}
.profile-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;align-items:center}
.profile-card[hidden],.auth-card[hidden]{display:none}
.profile-avatar{width:64px;height:64px;border-radius:50%;background:linear-gradient(145deg,#1565c0,#00897b);color:#fff;display:grid;place-items:center;font-size:25px;font-weight:900}
.profile-copy{min-width:0}.profile-copy .auth-title{overflow-wrap:anywhere}
.saved-preferences{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.saved-preferences>div{border:1px solid rgba(21,101,192,.12);background:#f8fbff;border-radius:8px;padding:11px;min-width:0}
.saved-preferences span,.saved-preferences strong{display:block}.saved-preferences span{color:#60758c;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:800}.saved-preferences strong{margin-top:4px;font-size:12px;overflow-wrap:anywhere}
.saved-preferences>p{grid-column:1/-1;margin:0;color:#60758c;font-size:12px}
.profile-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:8px}
.profile-actions .btn{display:grid;place-items:center;text-align:center;text-decoration:none}
.danger-btn{color:#b42318;border-color:rgba(180,35,24,.2)}
.account-benefits{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.account-benefits div{border:1px solid rgba(21,101,192,.12);background:rgba(255,255,255,.7);border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:5px}
.account-benefits strong{font-size:12px;color:#0b2745}.account-benefits span{font-size:11px;line-height:1.4;color:#60758c}
@media (max-width:520px){
  .compact-options{grid-template-columns:1fr}
  .metrics-row{grid-template-columns:1fr}
  .topbar{align-items:flex-start}
  .app-tabs{flex-direction:column;align-items:stretch}
  .app-tab{min-height:32px}
  .cart-top-btn{width:38px;height:38px;flex-basis:38px}
  .account-top-link{width:36px;height:36px;flex-basis:36px}
  .product-grid{grid-template-columns:1fr}
  .product-detail{grid-template-columns:1fr}
  .product-page-detail{grid-template-columns:1fr}
  .product-page-image-wrap{min-height:210px}
  .product-page-image{max-height:190px}
  .product-page-actions{align-items:stretch;flex-direction:column}
  .product-page-add{flex:auto;width:100%}
  .product-detail-image-wrap{height:150px}
  .product-detail-actions{align-items:stretch;flex-direction:column}
  .product-detail-add{flex:auto;width:100%}
  .stack-product-card{grid-template-columns:86px minmax(0,1fr)}
  .stack-product-media{height:86px}
  .stack-product-media img{max-height:78px}
  .stack-product-card .proto-top{gap:8px}
  .stack-product-card .proto-side{flex-wrap:wrap}
  .checkout-heading,.payment-panel{flex-direction:column;align-items:stretch}
  .card-icons{justify-content:flex-start}
  .shipping-grid{grid-template-columns:1fr}
  .proto-top,.chat-form{flex-direction:column}
  .proto-side{width:100%;justify-content:space-between;flex-direction:row}
  .chat-send{flex:auto;width:100%}
  .cart-line{grid-template-columns:minmax(0,1fr) auto;align-items:start}
  .cart-price,.cart-trash{justify-self:end}
  .form-grid{grid-template-columns:1fr}
  .auth-card,.profile-card{padding:20px}
  .auth-title{font-size:23px}
  .account-benefits,.saved-preferences{grid-template-columns:1fr}
  .profile-actions{grid-template-columns:1fr}
}
