/* Chama Club: shared postcard look for chamamama.com/club and the member screens.
   Design preview v6, 1 Dec 2026. Not live.

   The idea: Chama Club is mail from a Georgian table. A postcard you can turn over, sheets of perforated stamps
   with hand drawn motifs (khinkali, wine, grapes, churchkhela, a Tbilisi balcony), Batumi blue postmarks that
   land as you scroll, a wax seal on the envelope, and for members a stamp album: every 100 points is a $5 stamp.
   Drawing style follows the brand book: hand drawn line in coal over a solid offset colour block.
   Colours are the brand book's (Dusty Rose, Batumi Blue, Tkemali Green, Cream, Coal) plus the site's red.
   Fonts are the website's own: Blackford (display), Athelas Italic (text), Amatic SC (handwriting).

   Everything sits inside .cc, a size container: layouts follow the width of .cc, not the screen.
   Motion: one landing per screen, stamps pressing in, a little confetti; all of it off under reduced motion. */

@font-face{font-family:"Blackford";src:url("fonts/Blackford.woff2") format("woff2");font-display:swap}
@font-face{font-family:"Athelas";font-style:italic;src:url("fonts/Athelas-Italic.woff2") format("woff2");font-display:swap}
@font-face{font-family:"Amatic SC";font-weight:700;src:url("fonts/AmaticSC-700.woff2") format("woff2");font-display:swap}

:root{
  --paper:#FBF7EF; --cream:#F7F2E9; --desk:#E8D2C7; --rose:#D3AA9F; --blush:#F4E2DA;
  --red:#B63525; --red-deep:#8A2621; --blue:#415B77; --sky:#A9B8C8; --green:#5A6D39; --sage:#B9C49A;
  --coal:#222525; --muted:#5D554F; --rule:rgba(34,37,37,.16);
  --display:"Blackford",Georgia,"Times New Roman",serif;
  --text:"Athelas",Georgia,"Times New Roman",serif;
  --hand:"Amatic SC","Bradley Hand","Segoe Print",cursive;
  --ui:system-ui,-apple-system,"Segoe UI",sans-serif;
  --gl:max(20px, env(safe-area-inset-left, 0px));
  --gr:max(20px, env(safe-area-inset-right, 0px));
  --airmail:repeating-linear-gradient(135deg,var(--red) 0 12px,var(--paper) 12px 20px,var(--blue) 20px 32px,var(--paper) 32px 40px);
  color-scheme:light;
}

.cc{container-type:inline-size;background:var(--cream);color:var(--coal);font-family:var(--text);font-style:italic;font-size:18px;line-height:1.55;-webkit-font-smoothing:antialiased;overflow-x:clip}
.cc *,.cc *::before,.cc *::after{box-sizing:border-box}
.cc p{margin:0}
.cc img{max-width:100%;display:block}
.cc h1,.cc h2,.cc h3{margin:0;font-family:var(--display);font-style:normal;font-weight:400;line-height:1.02;text-wrap:balance}
.cc a{color:inherit}
.cc :focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.cc .wrap{max-width:1180px;margin:0 auto;padding-left:var(--gl);padding-right:var(--gr)}
.cc .hand{font-family:var(--hand);font-style:normal;font-weight:700;letter-spacing:.01em;line-height:1}
.cc .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- buttons ---------- */
.cc .btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 32px;border-radius:999px;border:1.5px solid var(--red);font-family:var(--hand);font-style:normal;font-weight:700;font-size:27px;line-height:1;text-decoration:none;cursor:pointer;transition:background .2s,color .2s,translate .15s,box-shadow .2s}
.cc .btn:hover{translate:0 -2px}
.cc .btn:active{translate:0 1px}
.cc .btn-solid{background:var(--red);color:#fff;box-shadow:0 4px 0 var(--red-deep)}
.cc .btn-solid:hover{background:var(--red-deep);border-color:var(--red-deep);box-shadow:0 6px 0 #5f1a16}
.cc .btn-line{background:var(--paper);color:var(--red)}
.cc .btn-line:hover{background:var(--red);color:#fff}
.cc .btn-wide{width:100%}
.cc .acts{display:flex;flex-wrap:wrap;gap:14px}
.cc .link{color:var(--red);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}

/* ---------- paper ---------- */
.cc .card{background:var(--paper);border-radius:3px;box-shadow:0 1px 0 rgba(34,37,37,.06),0 16px 36px -14px rgba(80,40,30,.32)}

/* ---------- stamp: perforated edge cut with a mask ---------- */
.cc .stamp{--hole:5px;--step:13px;display:inline-grid;padding:11px;background:var(--paper);
  -webkit-mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle,#0000 var(--hole),#000 calc(var(--hole) + .5px)) calc(var(--step) / -2) calc(var(--step) / -2) / var(--step) var(--step) round;
          mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle,#0000 var(--hole),#000 calc(var(--hole) + .5px)) calc(var(--step) / -2) calc(var(--step) / -2) / var(--step) var(--step) round;
  filter:drop-shadow(0 6px 10px rgba(80,40,30,.22))}
.cc .stamp > .face{position:relative;display:grid;align-content:center;justify-items:center;text-align:center;gap:4px;background:var(--red);color:var(--paper);padding:16px 14px;outline:1.5px solid rgba(251,247,239,.55);outline-offset:-7px}
.cc .stamp > .face{background-image:repeating-radial-gradient(circle at 50% 46%,rgba(251,247,239,.06) 0 1px,transparent 1.2px 9px)}
.cc .stamp.blue > .face{background-color:var(--blue)}
.cc .stamp.green > .face{background-color:var(--green)}
.cc .stamp.rose > .face{background-color:var(--rose);color:var(--coal);outline-color:rgba(34,37,37,.35)}
.cc .stamp.coal > .face{background-color:var(--coal)}
.cc .stamp.paper > .face{background-color:var(--paper);color:var(--coal);outline-color:rgba(34,37,37,.3)}
.cc .stamp .v{font-family:var(--display);font-style:normal;line-height:.9}
.cc .stamp .u{font-family:var(--hand);font-style:normal;font-weight:700;font-size:22px;line-height:1}
.cc .stamp .art{width:72px;height:auto;aspect-ratio:5/6;object-fit:cover;border-radius:2px;box-shadow:0 0 0 2px rgba(251,247,239,.55)}

/* ---------- postmark: a round cancellation in blue ink ---------- */
.cc .postmark{color:var(--blue);opacity:.8;pointer-events:none;mix-blend-mode:multiply;-webkit-mask:url("img/grain.svg") 0 0/170px 170px;mask:url("img/grain.svg") 0 0/170px 170px}
.cc .postmark svg{display:block;width:100%;height:auto;overflow:visible}

/* ---------- motion helpers (all inside no-preference) ---------- */
@keyframes cc-press{0%{scale:1.7;opacity:0}55%{scale:.92;opacity:1}75%{scale:1.04}100%{scale:1;opacity:1}}
@keyframes cc-land{from{translate:0 26px;rotate:-4deg;opacity:0}}
@keyframes cc-pop{0%{scale:1.35}60%{scale:.94}100%{scale:1}}
@keyframes cc-fall{0%{translate:0 -40px;rotate:0deg;opacity:0}15%{opacity:1}100%{translate:var(--dx,0) 120px;rotate:var(--spin,200deg);opacity:0}}
@media (prefers-reduced-motion:no-preference){
  .cc .lands{animation:cc-land .9s cubic-bezier(.2,.75,.25,1) both}
  @supports (animation-timeline:view()){
    .cc .presses{animation:cc-press linear both;animation-timeline:view();animation-range:entry 0% entry 100%}
  }
}

/* ---------- site header stand-in (Toast draws the real one) ---------- */
.cc .site{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--cream);border-bottom:1px solid var(--rule)}
.cc .site .wrap{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:68px}
.cc .site .logo img{width:140px;height:auto}
.cc .site nav{display:none;gap:24px;font-size:16px}
.cc .site nav a,.cc .site .oo{text-decoration:none;display:inline-flex;align-items:center;min-height:44px}
.cc .site .oo{color:var(--red);font-size:16px}
@container (min-width:1000px){.cc .site nav{display:flex}}

/* =====================================================================
   /club
   ===================================================================== */

/* hero: a postcard you can turn over, beside the invitation */
.club-hero{position:relative;background:var(--desk);padding-block:clamp(26px,5cqi,72px) clamp(48px,7cqi,96px);overflow:hidden}
.club-hero::before{content:"";position:absolute;inset:auto -10% -40% auto;width:70cqi;aspect-ratio:1;border-radius:50%;background:var(--blush);opacity:.7}
.club-hero .wrap{position:relative;display:grid;gap:34px;align-items:center}
.club-hero .msg{display:grid;gap:18px;min-width:0}
.club-hero h1{font-size:clamp(64px,17cqi,140px);color:var(--red);line-height:.84;letter-spacing:-.01em}
.club-hero .lead{font-size:clamp(19px,2.2cqi,23px);line-height:1.5;color:#3A3430;max-width:28em}
.club-hero .start{display:inline-flex;align-items:center;gap:12px;font-family:var(--display);font-style:normal;font-size:clamp(23px,2.8cqi,30px);line-height:1.1}
.club-hero .start img{width:46px;height:46px;rotate:-8deg}
@container (min-width:860px){.club-hero .wrap{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:56px}.club-hero .flip{order:2}}

.flip{position:relative;perspective:1400px;display:grid;gap:12px;justify-items:center}
.flip input{position:absolute;opacity:0;width:1px;height:1px}
.flip .inner{position:relative;width:min(100%,520px);aspect-ratio:3/2;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.3,.7,.2,1);rotate:-2.5deg}
.flip .side{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:4px;overflow:hidden}
.flip .back{transform:rotateY(180deg)}
.flip input:checked ~ .inner{transform:rotateY(180deg)}
@media (hover:hover) and (pointer:fine){.flip .inner:hover{transform:rotateY(180deg)}}
.flip .turn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;border:1.5px dashed var(--blue);color:var(--blue);font-family:var(--hand);font-style:normal;font-weight:700;font-size:22px;cursor:pointer;background:rgba(251,247,239,.6)}
.flip input:focus-visible + .turn{outline:3px solid var(--blue);outline-offset:3px}
.flip .turn svg{width:20px;height:20px}

/* front: "Greetings from" art */
.front{background:var(--paper);padding:10px 10px 0;box-shadow:0 18px 40px -14px rgba(80,40,30,.4);display:grid;grid-template-rows:minmax(0,1fr) auto}
.front .scene{display:block;width:100%;height:100%;object-fit:cover;object-position:center 18%;border-radius:2px}
.front .greet{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:0 12px;padding:6px 8px 8px;text-align:center}
.front .greet .hand{font-size:clamp(20px,4cqi,28px);color:var(--blue)}
.front .greet b{font-family:var(--display);font-weight:400;font-style:normal;font-size:clamp(30px,6.4cqi,46px);line-height:1;color:var(--red);text-shadow:2px 2px 0 var(--rose)}

/* back: the address side */
.back{background:var(--paper);box-shadow:0 18px 40px -14px rgba(80,40,30,.4);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:18px}
.back .note{border-right:1px solid var(--rule);padding:6px 16px 6px 4px;display:grid;align-content:center;gap:6px}
.back .note .hand{font-size:clamp(22px,4.4cqi,30px);color:var(--blue);line-height:1.05}
.back .addr{position:relative;display:grid;align-content:end;gap:0;padding-left:16px}
.back .addr .stamp{position:absolute;top:0;right:0;rotate:4deg}
.back .addr .stamp .face{width:72px;height:86px;padding:6px}
.back .addr .stamp .v{font-size:34px}
.back .addr .stamp .u{font-size:15px}
.back .addr .postmark{position:absolute;top:10px;right:38px;width:min(190px,78%);rotate:-7deg}
.back .addr span{display:block;border-bottom:1px solid rgba(65,91,119,.35);padding:4px 2px 1px;font-size:clamp(17px,3.2cqi,22px);color:var(--blue)}
.back .addr small{font-family:var(--text);font-size:13px;color:var(--muted)}

/* section heading */
.cc .sec{padding-block:clamp(56px,9cqi,104px)}
.cc .sec-head{display:grid;gap:10px;margin-bottom:clamp(28px,5cqi,48px);max-width:720px}
.cc .sec-head h2{font-size:clamp(36px,6.4cqi,58px)}
.cc .sec-head p{font-size:20px;color:#3A3430}

/* the rules: a perforated sheet of stamps with drawings */
.rules{background:var(--cream)}
.sheet{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px;justify-items:center;padding:24px 14px;border:2px dashed rgba(34,37,37,.18);border-radius:6px;background:repeating-linear-gradient(0deg,transparent 0 31px,rgba(65,91,119,.06) 31px 32px)}
.sheet .stamp{width:100%;max-width:220px;transition:rotate .3s,translate .3s}
.sheet .stamp .face{min-height:250px;padding-inline:10px;gap:6px}
.sheet .stamp .v{font-size:clamp(44px,8cqi,58px)}
.sheet .stamp .art{width:100%;height:auto;aspect-ratio:1;object-fit:cover;object-position:center 40%;border-radius:2px;padding:0;background:none;box-shadow:0 0 0 2px rgba(251,247,239,.55)}
.sheet .stamp .cap{font-family:var(--text);font-style:italic;font-size:15.5px;line-height:1.3;max-width:12em}
.sheet > :nth-child(odd){rotate:-2deg}
.sheet > :nth-child(even){rotate:1.8deg}
.sheet > :last-child:nth-child(odd){grid-column:1 / -1}
@media (hover:hover){.sheet .stamp:hover{rotate:0deg;translate:0 -6px}}
@container (min-width:900px){.sheet{grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;padding:34px 24px}.sheet > :last-child:nth-child(odd){grid-column:auto}}

/* how it works: a dashed postal route */
.how{background:var(--paper);border-block:1px solid var(--rule)}
.how ol{list-style:none;margin:0;padding:0;display:grid;gap:30px;position:relative}
.how li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:18px;align-items:start}
.how .num{position:relative;z-index:1;width:72px;height:72px;display:grid;place-items:center}
.how .num svg{position:absolute;inset:0;color:var(--blue)}
.how .num b{font-family:var(--display);font-weight:400;font-style:normal;font-size:30px;color:var(--blue)}
.how h3{font-size:26px;line-height:1.15;margin-bottom:6px}
.how p{color:#3A3430}
.how ol::before{content:"";position:absolute;left:35px;top:36px;bottom:36px;border-left:2px dashed rgba(65,91,119,.45)}
@container (min-width:860px){
  .how ol{grid-template-columns:repeat(3,minmax(0,1fr));gap:40px}
  .how li{grid-template-columns:minmax(0,1fr);gap:16px}
  .how ol::before{left:36px;right:36px;top:35px;bottom:auto;border-left:0;border-top:2px dashed rgba(65,91,119,.45)}
}

/* $5 stamps: the unit of the points-worth rows and the member album.
   --fill is 0 to 1: how much of the stamp is inked (bottom up). */
.cc .five{--fill:1;position:relative;width:var(--w,74px);aspect-ratio:5/6;padding:7px;background:var(--paper);
  -webkit-mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle,#0000 4px,#000 4.5px) -5px -5px / 10px 10px round;
          mask:linear-gradient(#000 0 0) content-box,radial-gradient(circle,#0000 4px,#000 4.5px) -5px -5px / 10px 10px round;
  filter:drop-shadow(0 4px 6px rgba(80,40,30,.2))}
.cc .five::before{content:"";position:absolute;inset:7px;border:1.5px dashed rgba(34,37,37,.3);background:var(--cream)}
.cc .five .ink{position:absolute;inset:7px;display:grid;place-items:center;align-content:center;gap:2px;background:var(--red);color:var(--paper);clip-path:inset(calc((1 - var(--fill)) * 100%) 0 0 0);outline:1.5px solid rgba(251,247,239,.55);outline-offset:-5px}
.cc .five .ink b{font-family:var(--display);font-weight:400;font-style:normal;font-size:calc(var(--w,74px) * .34);line-height:.9}
.cc .five .ink i{width:66%;aspect-ratio:1;border-radius:3px;background:var(--paper) var(--art,url("img/stamp-khinkali.png")) center/cover no-repeat;box-shadow:0 0 0 2px rgba(251,247,239,.5)}
.cc .five .ghost{position:absolute;inset:7px;display:grid;place-items:center;font-family:var(--display);font-style:normal;font-size:calc(var(--w,74px) * .3);color:rgba(34,37,37,.22)}
.cc .five:nth-child(4n+2){--art:url("img/stamp-khachapuri.png")}
.cc .five:nth-child(4n+2) .ink{background:var(--blue)}
.cc .five:nth-child(4n+3){--art:url("img/stamp-qvevri.png")}
.cc .five:nth-child(4n+3) .ink{background:var(--green)}
.cc .five:nth-child(4n+4){--art:url("img/stamp-horn.png")}
.cc .five:nth-child(4n+4) .ink{background:var(--rose);color:var(--coal);outline-color:rgba(34,37,37,.35)}
/* an empty or part-inked stamp shows its drawing faintly, so a part-inked one reads as a stamp half printed;
   the edge of the ink is a dashed line */
.cc .five::before{background:linear-gradient(rgba(247,242,233,.72),rgba(247,242,233,.72)),var(--art,url("img/stamp-khinkali.png")) center 30% / 50% auto no-repeat,var(--cream)}
.cc .five .ink::before{content:"";position:absolute;left:0;right:0;top:calc((1 - var(--fill)) * 100%);border-top:2px dashed rgba(251,247,239,.9);opacity:calc(clamp(0,(.99 - var(--fill)) * 1000,1))}

/* what points are worth: rows of $5 stamps */
.worth .grid{display:grid;gap:34px}
.worth .grid > .sec-head{margin-bottom:0}
.worth .rows{padding:24px 20px;display:grid;gap:22px;min-width:0;background:var(--paper)}
.worth .row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;align-items:center;padding-bottom:18px;border-bottom:1px dashed var(--rule)}
.worth .row:last-of-type{border-bottom:0;padding-bottom:0}
.worth .row .stamps{display:flex;flex-wrap:wrap;gap:8px;--w:64px}
.worth .row .stamps .five:nth-child(odd){rotate:-3deg}
.worth .row .stamps .five:nth-child(even){rotate:2deg}
.worth .pts{grid-column:1 / -1;font-family:var(--display);font-style:normal;font-size:22px;font-variant-numeric:tabular-nums}
.worth .pts small{font-family:var(--text);font-style:italic;font-size:15px;color:var(--muted);margin-left:4px}
.worth .usd{font-family:var(--display);font-style:normal;font-size:46px;line-height:.9;color:var(--red);font-variant-numeric:tabular-nums}
.worth .key{font-size:15px;color:var(--muted)}
@container (min-width:860px){.worth .grid{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:center;gap:64px}.worth .row .stamps{--w:76px}}

/* birthday: a party postcard */
.bday{background:var(--desk);overflow:hidden}
.bday .card{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:36px 26px 32px;max-width:880px;margin-inline:auto;rotate:-1deg;border:2px solid var(--paper);outline:2px dashed var(--red);outline-offset:-12px}
.bday .cake{width:96px;height:96px}
.bday h2{font-size:clamp(38px,7cqi,60px);color:var(--red)}
.bday p{font-size:21px;color:#3A3430;max-width:30em}
.bday .sign{font-size:clamp(34px,5.4cqi,48px);color:var(--blue);rotate:-2deg;justify-self:start}
.bday .flourish{width:min(260px,70%);height:auto;color:var(--blue);margin-top:-8px}
.bday .stamp{position:absolute;top:-24px;right:18px;rotate:7deg}
.bday .stamp .face{width:104px;height:124px}
.bday .stamp .v{font-size:50px}
.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.confetti i{position:absolute;top:var(--y);left:var(--x);width:9px;height:14px;background:var(--c,var(--red));border-radius:2px;rotate:var(--r,20deg);opacity:.85}
.confetti i:nth-child(3n){--c:var(--blue);border-radius:50%;width:10px;height:10px}
.confetti i:nth-child(3n+1){--c:var(--green)}
@media (prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()){
    .bday .confetti i{animation:cc-fall linear both;animation-timeline:view();animation-range:entry 20% cover 50%}
  }
}
@container (min-width:780px){.bday .card{grid-template-columns:120px minmax(0,1fr);column-gap:30px;padding:56px 60px 50px}.bday .cake{grid-row:span 4;width:120px;height:120px}.bday .stamp{right:44px;top:-32px}.bday .stamp .face{width:126px;height:150px}.bday .stamp .v{font-size:62px}}

/* questions: accordion */
.faq{display:grid;max-width:860px;border-top:1px solid var(--rule)}
.faq details{border-bottom:1px solid var(--rule)}
.faq summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:16px;align-items:center;padding:20px 2px;font-family:var(--display);font-style:normal;font-size:clamp(20px,2.6cqi,24px);line-height:1.2;min-height:56px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"";width:36px;height:36px;border-radius:50%;border:1.5px solid var(--blue);background:linear-gradient(var(--blue) 0 0) center/14px 1.5px no-repeat,linear-gradient(var(--blue) 0 0) center/1.5px 14px no-repeat;transition:rotate .25s,background-color .25s}
.faq details[open] summary::after{rotate:45deg;background-color:var(--blush)}
.faq details p{padding:0 52px 22px 2px;color:#3A3430}
.faq a{color:var(--red);text-underline-offset:3px}

/* closing: an airmail envelope sealed with wax */
.closing{background:var(--desk);padding-block:clamp(56px,8cqi,96px)}
.envelope{position:relative;max-width:820px;margin:0 auto;background:var(--paper);border:10px solid transparent;border-image:var(--airmail) 10;padding:clamp(70px,11cqi,96px) 24px clamp(36px,6cqi,56px);display:grid;justify-items:center;text-align:center;gap:22px;box-shadow:0 22px 44px -16px rgba(80,40,30,.4)}
.envelope::before{content:"";position:absolute;inset:0 0 auto;height:clamp(64px,11cqi,96px);background:var(--blush);clip-path:polygon(0 0,100% 0,50% 100%)}
.envelope .seal{position:absolute;top:clamp(30px,6cqi,52px);left:50%;width:76px;translate:-50% 0;rotate:-8deg;filter:drop-shadow(0 4px 6px rgba(80,40,30,.35))}
.envelope p{position:relative;font-family:var(--display);font-style:normal;font-size:clamp(32px,6cqi,54px);line-height:1.05;max-width:14em;color:var(--coal);margin-top:24px}

/* site footer stand-in */
.cc .sitefoot{background:#EFE7DA;border-top:1px solid var(--rule);font-size:15px}
.cc .sitefoot .wrap{padding-block:30px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;color:var(--muted)}

/* =====================================================================
   Member screens: sign in, code, member page
   ===================================================================== */
.mb{min-height:100%;background:var(--desk)}
.mb-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:14px;padding-left:var(--gl);padding-right:var(--gr);background:var(--cream);border-bottom:1px solid var(--rule)}
.mb-top img{width:118px;height:auto}
.mb-top .club{font-family:var(--hand);font-style:normal;font-weight:700;font-size:24px;color:var(--red)}
.mb-top a{font-size:15px;min-height:44px;display:inline-flex;align-items:center}
.mb-body{max-width:1040px;margin:0 auto;padding-block:28px 56px;padding-left:var(--gl);padding-right:var(--gr);display:grid;gap:22px}

/* sign in: an airmail envelope with its flap open and a wax seal */
.mb-auth{position:relative;max-width:520px;width:100%;margin:12px auto 0;padding:96px 24px 28px;display:grid;gap:18px;background:var(--paper);border:9px solid transparent;border-image:var(--airmail) 9;box-shadow:0 18px 40px -16px rgba(80,40,30,.4)}
.mb-auth::before{content:"";position:absolute;inset:0 0 auto;height:78px;background:var(--blush);clip-path:polygon(0 0,100% 0,50% 100%)}
.mb-auth .seal{position:absolute;top:44px;left:50%;width:62px;translate:-50% 0;rotate:-10deg;filter:drop-shadow(0 3px 5px rgba(80,40,30,.35))}
.mb-auth .stamp{position:absolute;top:10px;right:12px;rotate:6deg}
.mb-auth .stamp .face{width:64px;height:76px;padding:6px}
.mb-auth .stamp .art{width:40px;height:40px;padding:3px}
.mb-auth h1{font-size:clamp(40px,10cqi,54px);color:var(--red)}
.mb-auth .sub{color:#3A3430}
.mb-auth label{font-family:var(--hand);font-style:normal;font-weight:700;font-size:24px;color:var(--blue)}
.mb-auth .field{display:grid;gap:4px}
.mb-auth input[type=email]{width:100%;min-height:54px;border:0;border-bottom:2px solid var(--blue);background:repeating-linear-gradient(0deg,transparent 0 26px,rgba(65,91,119,.12) 26px 27px);font-family:var(--text);font-style:italic;font-size:22px;color:var(--coal);padding:6px 2px;border-radius:0}
.mb-auth input[type=email]:focus{outline:none;border-bottom-color:var(--red)}
.mb-auth .fine{font-size:15px;color:var(--muted)}
.mb-auth .alt{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:16px}
.mb-auth .alt a{min-height:44px;display:inline-flex;align-items:center}
.mb-phone{max-width:520px;width:100%;margin:0 auto;font-size:16px;color:#3A3430;text-align:center}

/* code: a telegram slip */
.mb-auth.telegram{padding-top:30px;border-image:none;border:0;background:#FFFCF3;rotate:-.6deg}
.mb-auth.telegram::before{display:none}
.mb-auth .tape{justify-self:start;display:inline-flex;align-items:center;gap:10px;margin-left:-34px;padding:6px 18px 6px 34px;background:var(--blue);color:var(--paper);font-family:var(--hand);font-style:normal;font-weight:700;font-size:22px;letter-spacing:.06em;clip-path:polygon(0 0,100% 0,96% 50%,100% 100%,0 100%)}
.mb-auth .codeset{border:0;margin:0;padding:0;min-width:0}
.mb-auth .codeset legend{font-size:24px;color:var(--blue);padding:0;margin-bottom:6px}
.mb-auth .code{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.mb-auth .code input{width:100%;min-height:62px;text-align:center;border:0;border-bottom:3px solid var(--blue);border-radius:4px 4px 0 0;background:#F1ECE1;font-family:var(--display);font-style:normal;font-size:32px;color:var(--coal);font-variant-numeric:tabular-nums}
.mb-auth .code input:focus{outline:none;border-bottom-color:var(--red);background:#fff}

/* a message under a form: errors from the service, shown as given */
.mb-msg{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;align-items:start;padding:12px 14px;border-radius:4px;font-size:16px;line-height:1.4;background:#F8E3DE;color:var(--red-deep);border:1px solid rgba(182,53,37,.35)}
.mb-msg::before{content:"!";width:22px;height:22px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font:700 13px var(--ui);font-style:normal}
.mb-msg[hidden]{display:none}

/* member page */
.mb-hello{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px}
.mb-hello h1{font-size:clamp(38px,9cqi,56px)}
.mb-hello .asof{font-size:16px;color:var(--blue);max-width:34em}
.mb-grid{display:grid;gap:22px}
.mb-grid > *{min-width:0}
.mb-grid .col{display:grid;gap:22px;align-content:start}

/* the balance: the big stamp, postmarked "as of" */
.bal{position:relative;padding:26px 22px 24px;display:grid;gap:18px;justify-items:center;text-align:center;overflow:hidden}
.bal .stamp{rotate:-2.5deg}
.bal .stamp .face{width:min(58cqi,230px);aspect-ratio:5/6;gap:6px}
.bal .stamp .v{font-size:clamp(72px,22cqi,104px);font-variant-numeric:tabular-nums}
.bal .stamp .u{font-size:28px}
.bal .postmark{position:absolute;width:236px;top:20px;left:calc(50% + min(29cqi,115px) - 66px);rotate:-9deg}
.bal .worth-block{display:grid;gap:6px;justify-items:center;width:100%;max-width:360px}
.bal .worth-caption{font-family:var(--hand);font-style:normal;font-weight:700;font-size:26px;color:var(--blue);line-height:1}
.bal .worth-title{font-family:var(--display);font-style:normal;font-size:clamp(36px,9cqi,48px);line-height:1;color:var(--red)}
.bal .rate{font-size:16px;color:var(--muted)}
.bal .track{width:100%;margin-block:6px 2px;height:16px;border-radius:999px;background:repeating-linear-gradient(90deg,rgba(34,37,37,.10) 0 calc(10% - 3px),transparent calc(10% - 3px) 10%);position:relative;overflow:hidden}
.bal .fill{position:absolute;inset:0 auto 0 0;width:calc(var(--have) * 1%);background:repeating-linear-gradient(90deg,var(--green) 0 calc(var(--seg) - 3px),transparent calc(var(--seg) - 3px) var(--seg));--seg:calc(10 / var(--have) * 100%)}

/* the stamp album: one $5 stamp per 100 points, the next one inked as far as the points reach.
   The page sets --pts on [data-f="album"] and the class show-album on .mb. */
.album-card{display:none;padding:24px 20px 22px;gap:14px}
.mb.show-album .album-card{display:grid}
.album-card .head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px}
.album-card h2{font-size:28px}
.album-card .head p{font-family:var(--hand);font-style:normal;font-weight:700;font-size:21px;color:var(--blue)}
.album{--pts:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 10px;justify-items:center;padding:16px 10px;background:#F1ECE1;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(34,37,37,.08)}
.album .five{--w:100%;width:100%;max-width:86px;--fill:clamp(0,(var(--pts) - (var(--i) - 1) * 100) / 100,1)}
.album .five .ink b{font-size:clamp(18px,6cqi,28px)}
.album .five .ghost{font-size:clamp(16px,5cqi,24px)}
.album .five:nth-child(odd){rotate:-2deg}
.album .five:nth-child(even){rotate:2deg}
.album .five .pm{position:absolute;inset:-10px -26px auto auto;width:104%;aspect-ratio:3/2;background:url("img/cancel.svg") center/contain no-repeat;opacity:calc(clamp(0,(var(--fill) - .99) * 100,1) * .85);mix-blend-mode:multiply;rotate:-14deg;pointer-events:none}
@media (prefers-reduced-motion:no-preference){
  .mb.show-album .album .five{animation:cc-pop .6s cubic-bezier(.2,.8,.25,1) backwards;animation-delay:calc(var(--i) * 90ms + 150ms)}
}

/* ways to earn */
.use{padding:24px 22px;display:grid;gap:16px}
.use h2,.hist h2{font-size:28px}
.use ul{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.use li{display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;align-items:center}
.use .ic{width:68px;height:68px}
.use b{font-family:var(--display);font-style:normal;font-weight:400;font-size:20px;display:block;line-height:1.2}

/* history: a ledger of postmarked lines */
.hist{padding:24px 22px 18px;display:grid;gap:8px}
.hist ol{list-style:none;margin:0;padding:0}
.hist li{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px dashed var(--rule)}
.hist li:last-child{border-bottom:0}
.hist .date{width:56px;height:56px;border-radius:50%;border:1.5px solid var(--blue);box-shadow:inset 0 0 0 4px var(--paper),inset 0 0 0 5px rgba(65,91,119,.5);color:var(--blue);display:grid;place-content:center;text-align:center;line-height:1;rotate:-8deg;mix-blend-mode:multiply;-webkit-mask:url("img/grain.svg") 0 0/120px 120px;mask:url("img/grain.svg") 0 0/120px 120px}
.hist .date .d{font-family:var(--display);font-style:normal;font-size:20px}
.hist .date .m{font-family:var(--hand);font-style:normal;font-weight:700;font-size:16px}
.hist .what{font-size:17px;line-height:1.3}
.hist .what small{display:block;font-size:14.5px;color:var(--muted)}
.hist .pts{font-family:var(--display);font-style:normal;font-size:22px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.hist .pts.plus{color:var(--green)}
.hist .pts.minus{color:var(--red)}
.hist-note{font-size:15px;color:var(--blue);border:1px dashed rgba(65,91,119,.45);border-radius:4px;padding:10px 12px}
.hist-note[hidden]{display:none}

/* points being updated (me() answered 503) */
.mb-updating{position:relative;max-width:560px;width:100%;margin:8px auto 0;padding:30px 24px 26px;display:grid;gap:12px}
.mb-updating .stamp{position:absolute;top:-16px;right:16px;rotate:5deg}
.mb-updating .stamp .face{width:78px;height:92px;padding:8px}
.mb-updating .stamp .v{font-size:30px}
.mb-updating h2{font-size:clamp(30px,8cqi,40px);color:var(--blue);padding-right:92px}

.mb-foot{display:grid;gap:8px;text-align:center;font-size:15px;color:#3A3430}

@container (min-width:820px){
  .mb-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
  .mb-auth{padding:104px 44px 36px;margin-top:40px}
  .mb-auth.telegram{padding-top:40px}
}

/* member page states: the page sets these classes on .mb
   .is-under-100  worth.unlocked is false: shows the progress track
   .is-loading    me() has not answered yet
   .is-updating   me() answered 503: the message card replaces the balance and history
   .show-album    --pts is set on [data-f="album"]: shows the stamp album */
.mb .when-under-100,.mb .when-updating{display:none}
.mb.is-under-100 .when-under-100{display:block}
.mb.is-updating .when-updating{display:grid}
.mb.is-updating .when-ready,.mb.is-updating .mb-hello .asof{display:none}
.mb.is-loading .when-ready{opacity:.45}
.mb.is-loading .bal .v,.mb.is-loading .worth-block,.mb.is-loading .hist ol,.mb.is-loading .album{visibility:hidden}

@media (prefers-reduced-motion:reduce){.cc *,.cc *::before,.cc *::after{animation:none!important;transition:none!important}}
