/* Idris Book Bank — storefront layer (header, catalogue, cart, checkout, account).
   Builds on site.css tokens: --ink --paper --brand --vermillion --sun --muted --line --radius --ease */

[hidden]{display:none!important}
.page-home .hero{min-height:auto;padding:56px 0 40px}
.page-pad{padding:28px 0 90px}
section{padding:clamp(56px,9vw,120px) 0}
.page-pad section{padding:48px 0 0}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.lead-sm{max-width:60ch;font-size:1.05rem}
.btn-block{width:100%}
.link-btn{background:none;border:0;color:var(--accent-text);font:inherit;font-weight:700;cursor:pointer;padding:.3rem 0;text-decoration:underline;text-underline-offset:3px}
.link-more{font-weight:700;color:var(--accent-text)}
.js .js-hide{display:none}
.staging-bar{background:var(--sun);color:var(--ink);text-align:center;font-weight:700;font-size:.85rem;padding:.35rem 1rem}

/* ---------- header ---------- */
.store-header{position:sticky;top:0;z-index:50;background:rgba(247,241,230,.92);backdrop-filter:blur(14px) saturate(1.4);-webkit-backdrop-filter:blur(14px) saturate(1.4);border-bottom:1px solid var(--line)}
.sh-row{display:flex;align-items:center;gap:1.2rem;padding:.7rem 0}
.store-header .logo img{height:46px;width:auto}
.sh-search{flex:1;position:relative;display:flex;max-width:640px;margin-inline:auto}
.sh-search input{width:100%;min-height:48px;border-radius:999px;border:1.5px solid var(--line);background:#fff;padding:0 3.4rem 0 1.2rem;font:inherit;font-size:1rem;color:var(--ink)}
.sh-search input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px rgba(236,28,36,.12)}
.sh-search button{position:absolute;right:5px;top:5px;width:38px;height:38px;border-radius:50%;border:0;background:var(--vermillion);color:#fff;display:grid;place-items:center;cursor:pointer}
.sh-search button svg{width:18px;height:18px}
.suggest{position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border-radius:20px;box-shadow:0 30px 70px -25px rgba(22,23,27,.45),0 0 0 1px var(--line);padding:.5rem;z-index:80}
.suggest a{display:grid;grid-template-columns:40px 1fr auto;gap:.8rem;align-items:center;padding:.5rem .6rem;border-radius:12px}
.suggest a:hover,.suggest a[aria-selected=true]{background:var(--paper)}
.suggest img,.suggest .sg-ph{width:40px;height:54px;object-fit:cover;border-radius:6px;background:var(--paper-2)}
.suggest .sg-name{font-weight:600;font-size:.92rem;line-height:1.25}
.suggest .sg-by{display:block;font-size:.8rem;color:var(--muted);font-weight:400}
.suggest .sg-price{font-weight:700;font-size:.9rem}
.suggest .sg-all{display:block;text-align:center;padding:.7rem;font-weight:700;color:var(--accent-text)}
.sh-actions{display:flex;align-items:center;gap:.4rem}
.sh-icon{position:relative;display:flex;align-items:center;gap:.4rem;min-height:44px;padding:0 .7rem;border-radius:999px;font-weight:600;font-size:.92rem}
.sh-icon:hover{background:var(--paper-2)}
.sh-icon svg{width:22px;height:22px}
.cart-badge{position:absolute;top:2px;left:22px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--vermillion);color:#fff;font-size:.72rem;display:grid;place-items:center;transition:transform .3s var(--ease)}
.cart-badge.bump{transform:scale(1.35)}
.store-header .menu-btn{display:none}
.cat-nav{border-top:1px solid var(--line)}
.cat-nav>ul{display:flex;gap:.2rem;list-style:none;overflow-x:auto;scrollbar-width:none}
.cat-nav>ul::-webkit-scrollbar{display:none}
.cat-nav a{display:block;white-space:nowrap;padding:.7rem .9rem;font-weight:600;font-size:.9rem;border-radius:10px}
.cat-nav a:hover{background:var(--paper-2)}
.cat-nav a.hot{color:var(--accent-text)}
.cat-nav .has-sub{position:relative}
.cat-nav .sub{display:none}
@media(min-width:901px){
  .cat-nav>ul{overflow:visible}
  .cat-nav .has-sub:hover .sub,.cat-nav .has-sub:focus-within .sub{display:grid;position:absolute;top:100%;left:0;min-width:240px;list-style:none;background:#fff;border-radius:16px;padding:.5rem;box-shadow:0 30px 60px -25px rgba(22,23,27,.45),0 0 0 1px var(--line);z-index:60}
}
@media(max-width:900px){
  .sh-row{flex-wrap:wrap;gap:.6rem}
  .store-header .logo img{height:38px}
  .sh-search{order:3;flex-basis:100%;max-width:none}
  .sh-actions{margin-left:auto}
  .sh-label{display:none}
  .store-header .menu-btn{display:grid}
  .cat-nav{display:none}
  .store-header.open .cat-nav{display:block;max-height:70vh;overflow:auto}
  .store-header.open .cat-nav>ul{flex-direction:column;overflow:visible}
  .store-header.open .cat-nav .sub{display:block;list-style:none;padding-left:1rem}
  .store-header.open .cat-nav .sub a{font-weight:400}
}

.flashes{padding-top:1rem;display:grid;gap:.5rem}
.flash{padding:.9rem 1.1rem;border-radius:14px;font-weight:600;font-size:.95rem}
.flash-success{background:#DCEFE2;color:#14532D}
.flash-error{background:#FBE0DE;color:#8A1C14}
.flash-info{background:#F3E9CF;color:#5B4708}

/* ---------- breadcrumbs, listing ---------- */
.crumbs ol{display:flex;flex-wrap:wrap;gap:.3rem;list-style:none;font-size:.85rem;color:var(--muted);margin-bottom:1.2rem}
.crumbs li+li::before{content:"/";margin-right:.3rem;opacity:.5}
.crumbs a:hover{color:var(--ink);text-decoration:underline}
.list-head h1{font-size:clamp(2rem,4.5vw,3.2rem)}
.list-head p{margin-top:.4rem}
.list-head .eyebrow{margin-bottom:.6rem}
.subcats{display:flex;gap:.5rem;flex-wrap:wrap;margin:1.4rem 0 .4rem}
.subcats a{display:inline-flex;gap:.4rem;align-items:center;min-height:40px;padding:0 1rem;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--line);font-weight:600;font-size:.9rem}
.subcats a span{color:var(--muted);font-weight:400;font-size:.8rem}
.subcats a:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:1.4rem 0;padding:.8rem 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);flex-wrap:wrap}
.check{display:inline-flex;gap:.5rem;align-items:center;font-weight:600;cursor:pointer;min-height:44px}
.check input{width:18px;height:18px;accent-color:var(--vermillion)}
.sortby{display:inline-flex;gap:.6rem;align-items:center;font-weight:600}
.sortby select,.field select,.field input,.field textarea{min-height:48px;border-radius:14px;border:1.5px solid var(--line);background:#fff;padding:0 .9rem;font:inherit;color:var(--ink)}
.field textarea{padding:.7rem .9rem;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus,.sortby select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px rgba(236,28,36,.12)}
.field{display:grid;gap:.4rem;margin-bottom:1rem}
.field>label,.field>legend{font-weight:700;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.field-err{color:var(--accent-text);font-weight:700;font-size:.85rem}
[aria-invalid=true]{border-color:var(--brand)!important}
.empty{text-align:center;padding:4rem 1rem;max-width:620px;margin:0 auto}
.empty h1,.empty h2{font-size:clamp(1.6rem,3.5vw,2.4rem);margin-bottom:.6rem}
.empty p{color:var(--muted);margin-bottom:1.6rem}
.small-empty{padding:2rem 0;text-align:left}
.empty-note{color:var(--muted)}

/* ---------- product cards ---------- */
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:22px 18px}
.pcard{display:flex;flex-direction:column;background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 0 0 1px var(--line);transition:transform .45s var(--ease),box-shadow .45s var(--ease)}
.pcard:hover{transform:translateY(-4px);box-shadow:0 0 0 1px var(--line),0 24px 50px -28px rgba(22,23,27,.5)}
.pcard-media{position:relative;display:block;aspect-ratio:3/4;background:var(--paper-2);overflow:hidden}
.pcard-media img{width:100%;height:100%;object-fit:contain;padding:10px;transition:transform .6s var(--ease)}
.pcard:hover .pcard-media img{transform:scale(1.04)}
.pbadge{position:absolute;top:10px;left:10px;background:var(--vermillion);color:#fff;font-weight:700;font-size:.75rem;padding:.25rem .55rem;border-radius:999px}
.pbadge-pack{left:auto;right:10px;background:var(--ink)}
.pdp-price .pbadge{position:static}
.pcard-body{display:flex;flex-direction:column;gap:.3rem;padding:.9rem 1rem 1rem;flex:1}
.pcard-title{font-family:Manrope,system-ui,sans-serif;font-size:.95rem;font-weight:700;line-height:1.3;letter-spacing:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pcard-title a::after{content:"";position:absolute;inset:0}
.pcard{position:relative}
.pcard-by{font-size:.82rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcard-price{display:flex;gap:.5rem;align-items:baseline;margin-top:auto;padding-top:.4rem}
.pcard-price b{font-size:1.1rem}
.pcard-price s,.pdp-price s{color:var(--muted);font-size:.85rem}
.pcard-foot{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
.add-btn,.ask-btn{position:relative;z-index:2}
.add-btn{width:40px;height:40px;border-radius:50%;border:0;background:var(--ink);color:#fff;display:grid;place-items:center;cursor:pointer;transition:transform .3s var(--ease),background .3s}
.add-btn:hover{background:var(--vermillion);transform:rotate(90deg)}
.add-btn svg{width:18px;height:18px}
.add-btn.is-done{background:#1F7A44}
.ask-btn{font-weight:700;font-size:.85rem;color:var(--accent-text);padding:.5rem .2rem}
.stock{font-size:.8rem;font-weight:700}
.stock-in{color:#1F7A44}
.stock-low{color:#9A5B00}
.stock-out{color:var(--muted)}
.is-out .pcard-media{opacity:.6}

.cover-ph{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:14% 12%;background:var(--ph-bg,#16171B);color:var(--ph-fg,#F5B700);font-family:Fraunces,Georgia,serif;position:relative;overflow:hidden}
.cover-ph::before{content:"";position:absolute;left:8%;top:0;bottom:0;width:3px;background:currentColor;opacity:.25}
.ph-title{font-size:clamp(.9rem,1.6vw,1.2rem);font-weight:600;line-height:1.15}
.ph-by{font-family:Manrope,sans-serif;font-size:.75rem;opacity:.85}
.ph-brand{font-family:Manrope,sans-serif;font-size:.62rem;letter-spacing:.14em;text-transform:uppercase;opacity:.7}

/* rails */
.rail-section{padding:clamp(40px,6vw,80px) 0}
.rail-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:1.2rem;gap:1rem}
.rail-head h2{font-size:clamp(1.6rem,3.5vw,2.4rem)}
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(180px,210px);gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:12px;scrollbar-width:thin}
.rail>*{scroll-snap-align:start}

/* departments on home */
.dept-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;list-style:none}
.dept{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:.35rem;min-height:190px;padding:1.4rem;border-radius:var(--radius);overflow:hidden;transition:transform .5s var(--ease),box-shadow .5s var(--ease)}
.dept:hover{transform:translateY(-4px);box-shadow:0 30px 60px -30px rgba(22,23,27,.5)}
.dept-name{font-family:Fraunces,Georgia,serif;font-size:1.5rem;font-weight:600;line-height:1.05}
.dept-count{font-size:.78rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;opacity:.75}
.dept-subs{font-size:.85rem;opacity:.8}
.dept .arrow{position:absolute;top:1.2rem;right:1.2rem;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.55);transition:transform .4s var(--ease)}
.dept:hover .arrow{transform:rotate(-45deg)}
.dept-0{background:var(--ink);color:var(--paper)} .dept-0 .arrow{background:rgba(255,255,255,.14)}
.dept-1{background:#F3D9C9}.dept-2{background:#DCE7DD}.dept-3{background:var(--sun)}
.dept-4{background:#E6DEF2}.dept-5{background:#fff;box-shadow:inset 0 0 0 1px var(--line)}.dept-6{background:var(--vermillion);color:#fff}.dept-7{background:#D7E6F2}
@media(max-width:980px){.dept-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.dept{min-height:150px}.dept-name{font-size:1.25rem}}

/* pagination */
.pager{display:flex;justify-content:center;flex-wrap:wrap;gap:.4rem;margin-top:2.5rem}
.pager a,.pager span{min-width:44px;min-height:44px;display:grid;place-items:center;padding:0 .9rem;border-radius:999px;font-weight:600}
.pager a{background:#fff;box-shadow:inset 0 0 0 1.5px var(--line)}
.pager a:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.pager [aria-current]{background:var(--ink);color:var(--paper)}
.pager .gap{min-width:auto}

/* ---------- product page ---------- */
.pdp{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:clamp(1.5rem,5vw,4rem);align-items:start}
.pdp-media{position:sticky;top:150px}
.pdp-main{aspect-ratio:3/4;background:#fff;border-radius:28px;overflow:hidden;box-shadow:0 0 0 1px var(--line);display:grid;place-items:center}
.pdp-main img{width:100%;height:100%;object-fit:contain;padding:24px}
.pdp-thumbs{display:flex;gap:.6rem;margin-top:.8rem;overflow-x:auto}
.pdp-thumb{flex:none;width:64px;height:84px;border-radius:12px;border:0;padding:4px;background:#fff;box-shadow:0 0 0 1.5px var(--line);cursor:pointer}
.pdp-thumb.is-on{box-shadow:0 0 0 2px var(--ink)}
.pdp-thumb img{width:100%;height:100%;object-fit:contain}
.pdp-info h1{font-size:clamp(1.9rem,4vw,3rem);margin:.5rem 0 .4rem}
.pdp-by{font-size:1.05rem;color:var(--muted)}
.pdp-by a{color:var(--ink);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.pdp-price{display:flex;align-items:baseline;gap:.8rem;margin:1.4rem 0 .4rem;flex-wrap:wrap}
.pdp-price b{font-family:Fraunces,Georgia,serif;font-size:2.4rem;font-weight:600}
.pdp-stock{margin-bottom:1.4rem;font-size:.9rem}
.pdp-buy{display:flex;gap:.7rem;flex-wrap:wrap;align-items:center}
.qty{display:inline-flex;align-items:center;border-radius:999px;box-shadow:inset 0 0 0 1.5px var(--line);background:#fff}
.qty button{width:44px;height:52px;border:0;background:none;font-size:1.3rem;cursor:pointer;color:var(--ink)}
.qty input{width:46px;height:52px;border:0;text-align:center;font:inherit;font-weight:700;background:transparent;-moz-appearance:textfield}
.qty input::-webkit-inner-spin-button{-webkit-appearance:none}
.pdp-perks{list-style:none;margin:1.6rem 0;display:grid;gap:.6rem}
.pdp-perks li{display:flex;gap:.6rem;align-items:flex-start;font-size:.95rem}
.pdp-perks li::before{content:"✓";flex:none;width:22px;height:22px;border-radius:50%;background:var(--ink);color:var(--sun);display:grid;place-items:center;font-size:.7rem;font-weight:700;margin-top:2px}
.pdp-perks a{color:var(--accent-text);font-weight:700}
.pdp-facts{display:grid;grid-template-columns:1fr 1fr;gap:0;border-top:1px solid var(--line)}
.pdp-facts div{padding:.8rem 0;border-bottom:1px solid var(--line)}
.pdp-facts dt{font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.pdp-facts dd{font-weight:600;word-break:break-word}
.pdp-desc h2,.pack-list h2{font-size:1.8rem;margin-bottom:1rem}
.prose{max-width:70ch;color:#2A2B31;font-size:1.02rem}
.pack-list ol{display:grid;gap:.5rem;padding-left:1.2rem;max-width:760px}
.pack-list a{font-weight:600;text-decoration:underline;text-underline-offset:3px}
@media(max-width:860px){.pdp{grid-template-columns:1fr}.pdp-media{position:static;max-width:440px;margin:0 auto;width:100%}.pdp-buy .btn{flex:1}}

/* ---------- school packs ---------- */
.pack-result{border-radius:20px;background:var(--paper);padding:1.4rem;display:flex;gap:1.2rem;align-items:center;justify-content:space-between;flex-wrap:wrap}
.pack-result h3{font-size:1.4rem}
.pack-result .pr-price{font-family:Fraunces,serif;font-size:1.8rem;font-weight:600}
.pack-result .pr-price s{font-family:Manrope,sans-serif;font-size:.9rem;color:var(--muted);margin-left:.4rem}
.pack-result .ctas{gap:.6rem}
.school-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px;margin-top:1.2rem}
.school-card{background:#fff;border-radius:20px;padding:1.4rem;box-shadow:0 0 0 1px var(--line)}
.school-card h3{font-size:1.3rem;margin-bottom:.8rem}
.school-card ul{list-style:none;display:grid}
.school-card a{display:flex;justify-content:space-between;gap:1rem;padding:.55rem 0;border-top:1px solid var(--line);font-size:.95rem}
.school-card a:hover span{text-decoration:underline}
.school-index h2{font-size:2rem}

/* ---------- cart & checkout ---------- */
.cart-layout,.checkout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:2rem;align-items:start;margin-top:1.5rem}
.cline{display:grid;grid-template-columns:72px 1fr auto auto;gap:1rem;align-items:center;padding:1rem 0;border-bottom:1px solid var(--line)}
.cline.has-warn{background:linear-gradient(90deg,rgba(236,28,36,.05),transparent)}
.cline-img{width:72px;height:96px;border-radius:10px;overflow:hidden;background:var(--paper-2);display:block}
.cline-img img{width:100%;height:100%;object-fit:contain}
.cline-img .cover-ph{padding:10%}
.cline-img .ph-title{font-size:.6rem}
.cline-img .ph-brand,.cline-img .ph-by{display:none}
.cline-info{display:grid;gap:.15rem;min-width:0}
.cline-name{font-weight:700;line-height:1.3}
.cline-name:hover{text-decoration:underline}
.cline-qty{display:grid;justify-items:center;gap:.2rem}
.cline-qty input{width:70px;min-height:44px;border-radius:12px;border:1.5px solid var(--line);text-align:center;font:inherit;font-weight:700}
.cline-total{min-width:90px;text-align:right}
.warn{color:var(--accent-text);font-weight:700;font-size:.85rem}
.summary{background:#fff;border-radius:24px;padding:1.6rem;box-shadow:0 0 0 1px var(--line)}
.summary h2{font-size:1.5rem;margin-bottom:1rem}
.summary dl{display:grid;gap:.55rem;margin:1rem 0}
.summary dl div{display:flex;justify-content:space-between;gap:1rem}
.summary dt{color:var(--muted)}
.summary dd{font-weight:700;text-align:right}
.summary .total{border-top:1px solid var(--line);padding-top:.8rem;font-size:1.15rem}
.summary .total dt{color:var(--ink);font-weight:700}
.summary .save dd{color:#1F7A44}
.summary .btn{margin-top:.6rem}
.co-summary{position:sticky;top:150px}
.mini-lines{list-style:none;display:grid;gap:.55rem;max-height:280px;overflow:auto;font-size:.92rem}
.mini-lines li{display:flex;justify-content:space-between;gap:1rem}
.mini-lines em{font-style:normal;color:var(--muted)}
.co-step{padding:0 0 1.6rem;margin-bottom:1.6rem;border-bottom:1px solid var(--line)}
.co-step h2{font-size:1.5rem;display:flex;gap:.7rem;align-items:center;margin-bottom:1.1rem}
.co-step h2 span{width:32px;height:32px;border-radius:50%;background:var(--ink);color:var(--sun);display:grid;place-items:center;font-family:Manrope,sans-serif;font-size:.9rem}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem}
.choice-row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-bottom:1.2rem}
.choice-col,.courier-list{display:grid;gap:.6rem}
.choice{position:relative;display:flex;align-items:center;gap:.8rem;padding:1rem 1.1rem;border-radius:16px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--line);cursor:pointer;transition:box-shadow .2s}
.choice:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.choice input{width:20px;height:20px;accent-color:var(--vermillion);flex:none}
.choice:has(input:checked){box-shadow:inset 0 0 0 2px var(--vermillion);background:#FFF8F6}
.choice span{display:grid;gap:.1rem;flex:1}
.choice small{color:var(--muted);font-size:.85rem}
.choice em{font-style:normal;font-weight:700}
.choice.is-disabled{opacity:.55;cursor:not-allowed}
.note-box{background:var(--paper);border-radius:14px;padding:1rem 1.2rem}
@media(max-width:900px){.cart-layout,.checkout{grid-template-columns:1fr}.co-summary{position:static}}
@media(max-width:560px){.grid2,.choice-row{grid-template-columns:1fr}.cline{grid-template-columns:60px 1fr;grid-template-areas:"img info" "img qty" "img total"}.cline-img{grid-area:img;width:60px;height:80px}.cline-info{grid-area:info}.cline-qty{grid-area:qty;justify-items:start;grid-auto-flow:column;align-items:center;gap:1rem}.cline-total{grid-area:total;text-align:left}}

/* ---------- auth & account ---------- */
.auth-card{max-width:460px;margin:2rem auto;background:#fff;border-radius:28px;padding:clamp(1.6rem,5vw,2.6rem);box-shadow:0 30px 80px -40px rgba(22,23,27,.35),0 0 0 1px var(--line)}
.auth-card h1{font-size:2.2rem;margin-bottom:.4rem}
.auth-card>.muted{margin-bottom:1.4rem}
.stack{display:grid;gap:.6rem}
.social-btns{display:grid;gap:.6rem}
.btn-social{display:flex;align-items:center;justify-content:center;gap:.7rem;min-height:52px;border-radius:999px;box-shadow:inset 0 0 0 1.5px var(--line);font-weight:700;background:#fff;transition:box-shadow .2s}
.btn-social:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.btn-social svg{width:20px;height:20px}
.btn-fb{background:#1877F2;color:#fff;box-shadow:none}
.btn-fb:hover{box-shadow:0 10px 24px -10px rgba(24,119,242,.7)}
.or{display:flex;align-items:center;gap:1rem;color:var(--muted);font-size:.85rem;margin:1.4rem 0}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.code-input{font-size:1.6rem!important;letter-spacing:.4em;text-align:center;font-weight:700}
.row-links{display:flex;justify-content:space-between;margin:.8rem 0}
.acct-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.acct-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:2rem;margin-top:1.6rem;align-items:start}
.acct-grid h2{font-size:1.6rem;margin-bottom:1rem}
.order-list{list-style:none;display:grid;gap:.7rem}
.order-list a{display:grid;grid-template-columns:1fr auto;gap:.2rem 1rem;padding:1.1rem 1.2rem;border-radius:18px;background:#fff;box-shadow:0 0 0 1px var(--line);transition:box-shadow .2s}
.order-list a:hover{box-shadow:0 0 0 1.5px var(--ink)}
.ol-code{font-weight:700}
.ol-date{color:var(--muted);font-size:.85rem;grid-column:1}
.order-list .stage{grid-column:2;grid-row:1;justify-self:end}
.order-list b{grid-column:2;justify-self:end}
.stage{display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:.25rem .6rem;border-radius:999px;background:var(--paper-2)}
.stage-confirmed,.stage-packed{background:#F3E9CF;color:#5B4708}
.stage-shipped{background:#D7E6F2;color:#123A5E}
.stage-delivered{background:#DCEFE2;color:#14532D}
.stage-cancelled{background:#FBE0DE;color:#8A1C14}
@media(max-width:860px){.acct-grid{grid-template-columns:1fr}}

/* ---------- order page ---------- */
.placed{display:flex;gap:1.2rem;align-items:center;background:#fff;border-radius:24px;padding:1.6rem;box-shadow:0 0 0 1px var(--line);margin-bottom:1.4rem}
.placed h1{font-size:clamp(1.5rem,3.5vw,2.2rem);margin-bottom:.3rem}
.placed-tick{flex:none;width:64px;height:64px;border-radius:50%;background:#1F7A44;color:#fff;display:grid;place-items:center;font-size:2rem;animation:pop .6s var(--ease)}
@keyframes pop{from{transform:scale(.4);opacity:0}}
.order-actions{display:flex;gap:.7rem;flex-wrap:wrap;margin:1.2rem 0 2rem}
.btn-wa{background:#25D366;color:#063B1C;box-shadow:0 10px 30px -12px rgba(37,211,102,.8)}
.btn-wa:hover{transform:translateY(-3px)}
.btn-wa svg{width:22px;height:22px}
.timeline{list-style:none;display:grid;grid-template-columns:repeat(5,1fr);gap:.5rem;margin-bottom:2rem;counter-reset:t}
.timeline li{position:relative;padding-top:2.2rem;font-size:.9rem;color:var(--muted)}
.timeline li::before{content:"";position:absolute;top:.75rem;left:0;right:-.5rem;height:3px;background:var(--line)}
.timeline li:last-child::before{right:50%}
.timeline .dot{position:absolute;top:.25rem;left:0;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 2px var(--line);z-index:1}
.timeline li.done::before,.timeline li.now::before{background:var(--ink)}
.timeline li.done .dot{background:var(--ink);box-shadow:none}
.timeline li.now .dot{background:var(--vermillion);box-shadow:0 0 0 6px rgba(236,28,36,.18)}
.timeline li.done,.timeline li.now{color:var(--ink)}
.timeline b{display:block}
.timeline small{display:block;color:var(--muted);margin-top:.2rem}
.order-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:1.4rem;align-items:start}
.cancel-box{margin-top:1rem}
.cancel-box summary{cursor:pointer;font-weight:700;color:var(--accent-text)}
.dev-tools{margin-top:2rem;border-top:1px dashed var(--line);padding-top:1rem}
.dev-tools a{color:var(--accent-text);font-weight:700;margin-right:.5rem}
@media(max-width:760px){.order-grid{grid-template-columns:1fr}.timeline{grid-template-columns:1fr;gap:0}.timeline li{padding:0 0 1.1rem 2.2rem}.timeline li::before{top:0;bottom:0;left:10px;right:auto;width:3px;height:auto}.timeline li:last-child::before{display:none}.timeline .dot{top:0}}

/* toast */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:var(--ink);color:var(--paper);padding:.9rem 1.2rem;border-radius:999px;font-weight:600;box-shadow:0 20px 50px -20px rgba(0,0,0,.6);z-index:90;opacity:0;transition:opacity .3s,transform .4s var(--ease);display:flex;gap:1rem;align-items:center;max-width:calc(100% - 32px)}
.toast.show{opacity:1;transform:translateX(-50%)}
.toast a{color:var(--sun);font-weight:700;white-space:nowrap}
footer{padding-bottom:6rem}
.page-pad section.summary,.summary{padding:1.6rem}
.mini-lines b,.summary dd{white-space:nowrap}
.mini-lines span{min-width:0}

/* ---------- Story gallery (sideways posters that bend at the edges) ---------- */
.story{padding:clamp(3rem,7vw,6rem) 0 clamp(2rem,5vw,4rem);overflow:hidden}
.story-head{display:grid;grid-template-columns:1.2fr 1fr;gap:2rem;align-items:end;margin-bottom:clamp(1.4rem,3vw,2.4rem)}
.story-head h2{margin-top:.6rem}
.story-side p{color:var(--muted);max-width:34ch}
.story-nav{display:flex;gap:.6rem;margin-top:1rem}
.story-btn{width:48px;height:48px;border-radius:50%;border:2px solid var(--ink);background:transparent;color:var(--ink);font-size:1.2rem;cursor:pointer;transition:background .2s,color .2s}
.story-btn:hover{background:var(--ink);color:var(--paper)}
.story-btn:disabled{opacity:.3;cursor:default;background:transparent;color:var(--ink)}
.story-viewport{position:relative;--h:clamp(380px,64vh,620px)}
.story-gl{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;display:none}
.story-track{list-style:none;display:flex;gap:14px;align-items:stretch;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
  padding:24px max(16px,calc((100vw - 1200px)/2));height:calc(var(--h) + 48px);cursor:grab;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.story-track::-webkit-scrollbar{display:none}
.story-track.dragging{cursor:grabbing}
.story-track.dragging a{pointer-events:none}
.story-item{flex:0 0 auto;height:var(--h);aspect-ratio:var(--ar);border-radius:18px;overflow:hidden;background:var(--paper-2);will-change:transform;transform-origin:center}
.story-item a,.story-item img{display:block;width:100%;height:100%}
.story-item img{object-fit:cover;user-select:none;-webkit-user-drag:none}
.story-item a:focus-visible{outline:3px solid var(--sun);outline-offset:-3px;border-radius:18px}
.story-panel{flex:0 0 auto;width:min(300px,72vw);height:var(--h);display:flex;flex-direction:column;justify-content:center;gap:.8rem;padding:0 1.6rem}
.story-panel h3{font-size:clamp(1.5rem,2.4vw,2rem)}
.story-panel p{color:var(--muted);font-size:.98rem}
.story-panel.is-cta{background:var(--ink);color:var(--paper);border-radius:18px;padding:2rem}
.story-panel.is-cta p{color:rgba(247,241,230,.75)}
.story-panel .btn{align-self:flex-start;margin-top:.4rem}
/* WebGL on: the canvas draws the posters; the real links stay underneath for taps and screen readers */
.story-viewport.gl-on .story-gl{display:block}
.story-viewport.gl-on .story-item{background:transparent}
.story-viewport.gl-on .story-item img{opacity:0}
@media (max-width:760px){
  .story-head{grid-template-columns:1fr;gap:1rem}
  .story-viewport{--h:min(68vh,540px)}
  .story-nav{display:none}
}
@media (prefers-reduced-motion:reduce){.story-item{will-change:auto}}
