*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:#f6f5f2;color:#1d1d1f;touch-action:manipulation}
button,input,textarea{font-family:inherit}
.app{height:100vh;height:100dvh;display:flex;flex-direction:column;max-width:520px;margin:0 auto;background:#fff;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px 0}
.logo{font-weight:800;letter-spacing:-.02em;font-size:18px;color:#1d1d1f;text-decoration:none}.logo span{color:#d7263d}
.status{font-size:12px;color:#8a8a8a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.stage{flex:1 1 auto;min-height:0;position:relative;overflow:hidden;touch-action:pan-y}
.slide{position:absolute;top:50%;left:50%;height:97%;aspect-ratio:3/4;transition:transform .45s cubic-bezier(.2,.8,.2,1),opacity .45s,filter .45s;cursor:pointer;user-select:none}
.slide svg{width:100%;height:100%;display:block;filter:drop-shadow(0 10px 14px rgba(0,0,0,.15))}
.slide.side svg{filter:none}
.slide canvas.can{width:100%;height:100%;display:block}
.slide video.hero{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block;background:#fff;z-index:1;filter:brightness(1.01)}
.slide.pending svg .ink{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.45}}
.stage.init .slide{transition:none}
.slide.new{opacity:0!important}
.slide.gone{opacity:0!important;transform:translate(-50%,-50%) scale(.3) translateY(30%)!important}
.buy{position:absolute;right:-4%;bottom:2%;background:#d7263d;color:#fff;border:0;border-radius:10px;padding:7px 14px;font-weight:700;font-size:14px;box-shadow:0 4px 10px rgba(215,38,61,.35);transition:opacity .3s,transform .15s;z-index:2;cursor:pointer}
.buy:active{transform:scale(.92)}
.slide.side .buy,.slide.pending .buy{opacity:0;pointer-events:none}
.empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#b0b0b0;font-size:15px;opacity:0;transition:opacity .3s;pointer-events:none;text-align:center;padding:0 24px}
.empty small{font-size:13px;color:#c4c4c4}
.empty.show{opacity:1}
/* Create view (field focused): only one plain white sleeve on the can of the picked size. */
.blank{position:absolute;top:50%;left:50%;height:97%;aspect-ratio:3/4;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:opacity .3s}
.blank canvas{width:100%;height:100%;display:block}
.blank #exCan{position:absolute;inset:0;opacity:0}
.app.compose .blank{opacity:1}
.app.compose .slide{opacity:0!important;pointer-events:none!important}
.empty.show{pointer-events:auto;cursor:text}
.app.compose .empty,.app.compose .hpeek{opacity:0;pointer-events:none}
/* On touch screens the create view gives the logo bar, caption row and dots to the can. */
header{max-height:44px;transition:max-height .3s ease,padding .3s ease,opacity .2s}
.ctl{transition:opacity .25s,height .3s ease}
.dots{transition:height .3s ease,padding .3s ease,opacity .2s}
.actions{max-height:72px;transition:max-height .3s ease,padding .3s ease,opacity .2s}
/* Create view: no buying, so Köp alla goes too (it fades; on touch its row collapses). */
.app.compose .actions{opacity:0;pointer-events:none}
/* the front sleeve's name / qty row describes a hidden sleeve in the create view (and would call an as-is photo "Exempel") */
.app.compose .ctl{opacity:0!important;pointer-events:none}
@media (pointer: coarse){
  .app.compose header{max-height:0;padding-top:0;opacity:0;overflow:hidden;pointer-events:none}
  .app.compose .ctl{height:0;opacity:0;pointer-events:none}
  .app.compose .dots{height:0;padding:0;opacity:0}
  .app.compose .actions{max-height:0;padding-top:0;padding-bottom:0;overflow:hidden}
}
.ctl{flex:0 0 auto;display:flex;justify-content:center;align-items:center;gap:4px;font-size:13px;color:#8a8a8a;height:24px;padding:0 12px;transition:opacity .25s;white-space:nowrap;overflow:hidden}
.ctl b{color:#1d1d1f;font-weight:600;margin-right:6px;overflow:hidden;text-overflow:ellipsis;max-width:45%}
.ctl a{color:#8a8a8a;text-decoration:none;padding:4px 6px;cursor:pointer;user-select:none}
.ctl a:active{color:#1d1d1f}
.ctl .q{min-width:34px;text-align:center;color:#555}
.ctl .sep{color:#d0d0d0}
.ctl a.dim{color:#d8d8d8;pointer-events:none}
.dots{flex:0 0 auto;display:flex;justify-content:center;gap:6px;padding:6px 0 2px;height:14px}
.dots i{width:6px;height:6px;border-radius:50%;background:#ddd;transition:all .3s}.dots i.on{background:#1d1d1f;width:16px;border-radius:3px}
.actions{flex:0 0 auto;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:6px 16px 10px}
.all{background:#d7263d;color:#fff;border:0;border-radius:12px;padding:10px 18px;font-weight:800;font-size:15px;box-shadow:0 4px 12px rgba(215,38,61,.3);cursor:pointer}
.all:active{transform:scale(.96)}
.all.off{visibility:hidden;pointer-events:none}
hr{flex:0 0 auto;border:0;border-top:2px solid #1d1d1f;margin:0 16px;opacity:.85}
.bottom{flex:0 0 auto;min-height:0;display:flex;flex-direction:column;padding:12px 16px 14px;gap:8px}
.bottom label{font-size:13px;font-weight:600;color:#555}
.lbl{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}
.lbl label{flex:0 0 auto;white-space:nowrap}
.styles{display:flex;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none}.styles::-webkit-scrollbar{display:none}
.styles button{flex:0 0 auto;background:none;border:0;border-radius:999px;padding:3px 7px;font-size:12px;color:#9a9a9a;cursor:pointer;line-height:1.2}
.styles button[aria-checked="true"]{background:#1d1d1f;color:#fff}
.styles button:focus-visible{outline:2px solid #d7263d;outline-offset:1px}
textarea{flex:0 0 auto;height:clamp(76px,14dvh,150px);min-height:0;width:100%;resize:none;border:1.5px solid #e2e2e2;border-radius:14px;padding:12px 14px;font-size:16px;line-height:1.4;background:#fafafa;outline:none}
textarea:focus{border-color:#1d1d1f;background:#fff}
.foot{flex:0 0 auto;display:flex;justify-content:flex-end;align-items:center;gap:10px}
.foot .err{flex:1 1 auto;min-width:0;font-size:12px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.add{flex:0 0 auto;background:#1d1d1f;border:0;color:#fff;font-size:15px;font-weight:600;padding:11px 20px;border-radius:99px;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.add:active{background:#000;transform:scale(.97)}
.add:disabled{background:#c4c4c4;box-shadow:none;cursor:default}
.err{color:#b3261e;font-size:13px}
.err:empty{display:none}
.err.warn{color:#8a5a00}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,40px);opacity:0;background:#1d1d1f;color:#fff;padding:10px 16px;border-radius:99px;font-size:14px;transition:all .3s;pointer-events:none;white-space:nowrap;z-index:30;max-width:92vw;overflow:hidden;text-overflow:ellipsis}
.toast.show{transform:translate(-50%,0);opacity:1}
.ov{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:flex-end;justify-content:center;opacity:0;pointer-events:none;transition:opacity .25s;z-index:20}
.ov.open{opacity:1;pointer-events:auto}
.sheet{width:100%;max-width:520px;max-height:92dvh;background:#fff;border-radius:20px 20px 0 0;padding:18px 18px calc(14px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .3s;display:flex;flex-direction:column}
.ov.open .sheet{transform:none}
.sheet h2{font-size:17px;margin-bottom:8px}
.lines{overflow:auto;min-height:0;flex:0 1 auto}
.ln{display:flex;justify-content:space-between;gap:12px;font-size:15px;padding:7px 0;border-bottom:1px solid #f0f0f0}
.ln span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ln span:last-child{white-space:nowrap}
.ln.muted{color:#777}
.ln.tot{font-weight:800;font-size:17px;border:0;padding-top:10px}
.who{display:flex;gap:8px;margin-top:10px}
.who input{flex:1 1 0;min-width:0;border:1.5px solid #e2e2e2;border-radius:12px;padding:10px 12px;font-size:16px;background:#fafafa;outline:none}
.who input:focus{border-color:#1d1d1f;background:#fff}
.note{font-size:12px;color:#8a8a8a;margin-top:8px}
.sheet .err{margin-top:6px}
.pay{margin-top:12px;background:#d7263d;color:#fff;border:0;border-radius:14px;padding:14px;font-weight:800;font-size:16px;cursor:pointer}
.pay:active{transform:scale(.98)}
.pay:disabled{opacity:.6}
.close{margin-top:4px;background:none;border:0;color:#8a8a8a;font-size:14px;padding:10px;cursor:pointer}
/* own photo */
.vh{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
.cam{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;color:#6b6b6b;font-size:13px;padding:8px 6px;cursor:pointer;border-radius:10px;position:relative}
.cam svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.cam:active{color:#1d1d1f}
.cam:focus-within{outline:2px solid #1d1d1f;outline-offset:1px}
.cam.has{display:none}
.pic{flex:0 0 auto;position:relative;width:38px;height:38px}
.pic[hidden]{display:none}
.pic img{width:38px;height:38px;border-radius:50%;object-fit:cover;display:block;border:2px solid #1d1d1f}
.pic a{position:absolute;top:-6px;right:-8px;width:20px;height:20px;line-height:18px;text-align:center;border-radius:50%;background:#fff;color:#555;font-size:15px;box-shadow:0 1px 4px rgba(0,0,0,.25);cursor:pointer;text-decoration:none}
/* opened sleeve (closable with browser back) */
/* Full screen, nothing but the sleeve: it fills the safe area (contain-fit); the only chrome is two
   small see-through round buttons in the bottom corners (the AI label runs along the top edge). Tap, swipe down, Esc or back closes (basket.js). */
.zoom{position:fixed;inset:0;z-index:15;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);touch-action:none;animation:zin .25s ease-out}
.zoom[hidden]{display:none}
@keyframes zin{from{opacity:0}}
.zpic{position:relative;flex:0 0 auto;width:min(100%,calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * var(--ar,1)));aspect-ratio:var(--ar,1);overflow:hidden;background:#f2f2f2;container-type:inline-size}
/* the can wall (can3d.js wall(), set by basket.js): the art from --at down, --ah tall; below the wall it goes under the can */
.zpic img{position:absolute;left:0;top:calc(var(--at,0) * 100%);display:block;width:100%;height:calc(var(--ah,1) * 100%);object-fit:cover}
/* "AI-genererad av beersleeves.se": the same place, size and look as on the can and in the
   print file (can3d.js labelBox/drawLabel): starts --lx of the width in (the left edge of
   Printful's safe print area), centred in a band --lh of the wall height whose top is at
   --lt (the safe area's top); font --lf of the wall height, .3em tracking, no kerning (the
   can draws one letter at a time); white with a black outline (16 hard text-shadows, crisp
   on iOS Safari too). */
.zlabel{position:absolute;left:0;right:0;top:calc(var(--lt,.08) * 100%);height:calc(var(--lh,.028) * 100%);padding-left:calc(var(--lx,.03) * 100%);display:flex;align-items:center;justify-content:flex-start;color:#fff;font-weight:600;font-size:calc(100cqw / var(--ar,1) * var(--lf,.0185));line-height:1;white-space:nowrap;letter-spacing:.3em;font-kerning:none;font-feature-settings:"kern" 0;text-shadow:0.075em 0 0 #000,0.069em 0.029em 0 #000,0.053em 0.053em 0 #000,0.029em 0.069em 0 #000,0 0.075em 0 #000,-0.029em 0.069em 0 #000,-0.053em 0.053em 0 #000,-0.069em 0.029em 0 #000,-0.075em 0 0 #000,-0.069em -0.029em 0 #000,-0.053em -0.053em 0 #000,-0.029em -0.069em 0 #000,0 -0.075em 0 #000,0.029em -0.069em 0 #000,0.053em -0.053em 0 #000,0.069em -0.029em 0 #000;pointer-events:none;opacity:0;transition:opacity .3s ease}
.zlabel.on{opacity:1}
.zbtn{position:absolute;z-index:1;bottom:calc(8px + env(safe-area-inset-bottom));width:34px;height:34px;padding:0;border:0;border-radius:50%;background:rgba(0,0,0,.28);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.zbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.zclose{right:calc(8px + env(safe-area-inset-right))}
.zflat{left:calc(8px + env(safe-area-inset-left))}
.zpic[hidden],.zoom canvas[hidden],.zflat[hidden]{display:none}
.zcan{flex:1 1 auto;width:100%;height:100%;min-height:0;cursor:grab;user-select:none;-webkit-user-select:none}
.zcan:active{cursor:grabbing}
/* earlier designs */
.hist{flex:0 0 auto;margin-right:auto;display:inline-flex;align-items:center;gap:4px;background:none;border:0;color:#6b6b6b;font-size:13px;padding:8px 6px 8px 0;cursor:pointer;border-radius:10px}
.hist svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hist:active{color:#1d1d1f}
.hist:focus-visible{outline:2px solid #1d1d1f;outline-offset:1px}
.hsheet{max-height:86dvh;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.hhead{display:flex;align-items:center;justify-content:space-between;margin:-4px -6px 6px 0}
.hhead h2{margin:0}
.hx{background:none;border:0;font-size:28px;line-height:1;color:#8a8a8a;padding:4px 10px;cursor:pointer}
.hx:active{color:#1d1d1f}
.hgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px 12px;overflow-y:auto;min-height:0;flex:0 1 auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:2px 2px 8px}
.hcard{display:flex;flex-direction:column;gap:6px;min-width:0}
.hcard img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;background:#f2f2f2;display:block}
.hcard b{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hcard button{background:#d7263d;color:#fff;border:0;border-radius:10px;padding:8px 6px;font-weight:700;font-size:13px;cursor:pointer}
.hcard button:active{transform:scale(.97)}
.hcard button.in{background:#f1f1f1;color:#6b6b6b;font-weight:600;cursor:default}
.hcard[hidden]{display:none}
.hempty{color:#9a9a9a;font-size:14px;text-align:center;padding:36px 0 30px}
.hempty[hidden]{display:none}
.hcap{font-size:12px;line-height:1.35;color:#8a8a8a;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:-3px;overflow-wrap:anywhere}
.hcap i{font-style:normal;color:#b0b0b0}
.hcard button{margin-top:auto}
/* Remix: low-key button top-left on the front sleeve; attaches the sleeve like a photo */
.rmx{position:absolute;left:calc(-2% - 20px);top:calc(3% + 20px);z-index:2;display:inline-flex;align-items:center;gap:4px;background:none;border:0;color:#6b6b6b;font-size:13px;line-height:1.2;padding:8px 6px;cursor:pointer;border-radius:10px;transition:opacity .3s,color .15s}
.rmx svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rmx:active{color:#1d1d1f}
.rmx:focus-visible{outline:2px solid #1d1d1f;outline-offset:1px}
.rmx.on{color:#1d1d1f;font-weight:600}
.slide.side .rmx,.slide.pending .rmx{opacity:0;pointer-events:none}
/* iPhone keyboard: while typing, the app is pinned to the visual viewport (the
   part of the screen above the keyboard) so the field and submit button stay
   visible; the carousel shrinks and the buy row/dots step aside. */
.app.kb{position:fixed;left:0;right:0;top:0;height:var(--vvh,100%);transform:translateY(var(--vvt,0px));padding-bottom:0;z-index:5}
.app.kb .actions,.app.kb .dots,.app.kb .ctl,.app.kb .buy,.app.kb .rmx{display:none}
.app.kb textarea{height:76px}
.app.kb .bottom{padding-bottom:8px}
.app.kb .stage{min-height:0}
/* History entry: a small chevron tab on the right edge of the sleeves; the
   panel slides in from that side. */
.hpeek{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:12;width:26px;height:56px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:14px 0 0 14px;background:rgba(255,255,255,.78);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 1px 6px rgba(0,0,0,.08);color:#8a8a8a;cursor:pointer}
.hpeek svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hpeek:active{color:#1d1d1f}
.hpeek:focus-visible{outline:2px solid #1d1d1f;outline-offset:-2px}
.app.kb .hpeek,.hpeek[hidden]{display:none}
.hpeek.pulse{animation:hpulse .55s cubic-bezier(.3,1.6,.5,1)}
@keyframes hpulse{0%{transform:translateY(-50%) scale(1)}35%{transform:translateY(-50%) scale(1.4);color:#1d1d1f;box-shadow:0 2px 12px rgba(0,0,0,.18)}100%{transform:translateY(-50%) scale(1)}}
.slide.gone.tohist{transition:transform .4s cubic-bezier(.5,0,.75,0),opacity .4s cubic-bezier(.8,0,1,1);transform:translate(-50%,-50%) translateX(var(--fx)) scale(.08)!important}
@media (prefers-reduced-motion:reduce){.hpeek.pulse{animation:hcalm .6s}@keyframes hcalm{35%{color:#1d1d1f;background:#fff}}}
.hov{justify-content:flex-end;align-items:stretch}
.hov .hsheet{width:min(88vw,440px);max-width:none;max-height:none;height:100%;border-radius:20px 0 0 20px;padding:calc(18px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));transform:translateX(100%);transition:transform .32s cubic-bezier(.2,.8,.2,1)}
.hov.open .hsheet{transform:none}
.hov .hgrid{flex:1 1 auto;align-content:start;grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
/* Size toggle: one segmented pill with both cans (short wide = Vanlig, tall slim =
   Smal); the chosen segment is a white thumb with the dark can. */
.szb{flex:0 0 auto;margin-right:auto;display:inline-flex;align-items:stretch;gap:0;padding:2px;border-radius:999px;background:#f0f0f0}
.szb button{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;padding:3px 7px;cursor:pointer;border-radius:999px;color:#b3b3b3;transition:color .15s,background-color .15s,box-shadow .15s}
.szb svg{width:22px;height:22px;fill:currentColor}
.szb button[aria-checked="true"]{color:#1d1d1f;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.14)}
.szb button:focus-visible{outline:2px solid #1d1d1f;outline-offset:-1px}
.ctl a.sz{color:#9a9a9a;padding:4px 2px}
/* Sending from the create view (basket.js handoff): the white can turns into the sleeve
   being made in place; everything the create view hid fades back in, nothing slides. */
.app.handoff .slide{transition:opacity .3s ease,filter .3s ease!important}
.app.handoff .blank{transition:none;opacity:0}
/* Sharing: "Dela korgen" is a quiet text button left in the Köp alla row (hidden with an
   empty basket and in the create view, like the row). On /s/<token> a slim line above the
   sleeves says it is a shared basket; it only fades. */
.shr{flex:0 0 auto;margin-right:auto;display:inline-flex;align-items:center;gap:5px;background:none;border:0;color:#8a8a8a;font-size:13px;line-height:1.2;padding:8px 6px 8px 0;cursor:pointer;border-radius:10px;transition:color .15s,opacity .3s}
.shr svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.shr:active{color:#1d1d1f}
.shr:focus-visible{outline:2px solid #1d1d1f;outline-offset:1px}
.shr.off{visibility:hidden;pointer-events:none}
.sharedln{flex:0 0 auto;display:flex;justify-content:center;align-items:center;gap:10px;font-size:13px;color:#8a8a8a;padding:6px 16px 0;min-height:30px;opacity:0;transition:opacity .4s}
.sharedln[hidden]{display:none}
.sharedln.show{opacity:1}
.sharedln button{background:#1d1d1f;color:#fff;border:0;border-radius:999px;padding:4px 11px;font-size:12px;font-weight:600;cursor:pointer;line-height:1.3}
.sharedln button:active{background:#000}
.sharedln button:focus-visible{outline:2px solid #d7263d;outline-offset:1px}
.slide.shared .buy,.slide.shared .rmx{display:none}
.app.compose .sharedln{opacity:0;pointer-events:none}
@media (pointer: coarse){.app.compose .sharedln{display:none}}
.app.kb .sharedln{display:none}
@media (prefers-reduced-motion:reduce){.sharedln,.shr{transition:none}}
