/* TOKEN CLUB v0.4 — standalone collectible page. Loaded after style.css; everything is scoped under body.tc
   so the older GoodCase-template rules stay as a fallback but lose on specificity. */
/* Ticket Tear type: Plus Jakarta Sans + JetBrains Mono, self-hosted Latin subsets (SIL OFL, licences in /fonts); Chinese falls back to PingFang */
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/plus-jakarta-sans-latin-600.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/plus-jakarta-sans-latin-700.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/plus-jakarta-sans-latin-800.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/jetbrains-mono-latin-500.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/jetbrains-mono-latin-700.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/jetbrains-mono-latin-800.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
body.tc{
  --paper:#f2f0e9;--ink:#16150f;--muted:#76736a;--line:#d9d5c9;--accent:#e4572e;
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --sun:hsl(2,100%,73%),hsl(53,100%,69%) 6%,hsl(93,100%,69%) 12%,hsl(176,100%,76%) 18%,hsl(228,100%,74%) 24%,hsl(283,100%,73%) 30%,hsl(2,100%,73%) 36%;
  background:var(--paper) radial-gradient(#cfcabc 1px,transparent 1.3px) 0 0/18px 18px;color:var(--ink);
}
body.tc main{max-width:1320px;margin:0 auto;padding:0 28px}

/* ---------- top bar: floating pills like a ticket console ---------- */
body.tc .topbar{position:sticky;top:12px;z-index:20;height:auto;margin:12px auto 0;max-width:1320px;padding:8px 10px 8px 14px;border:1px solid var(--line);border-radius:999px;background:#fbfaf6e6;backdrop-filter:blur(10px);box-shadow:0 6px 20px -14px #0006}
body.tc .brand{gap:12px}
body.tc .brand .back{font:11px var(--mono);letter-spacing:.6px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:#fff}
body.tc .brand .back:hover{color:var(--ink);border-color:var(--ink)}
body.tc .brand .wordmark{display:flex;align-items:center;gap:8px;font-weight:900;font-size:17px;letter-spacing:.5px}
body.tc .brand .wordmark i{width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px #e4572e2b;animation:tk-pulse 2.4s ease-in-out infinite}
body.tc .topbar nav button,body.tc .topbar>.text-button{border:1px solid var(--line);border-radius:999px;background:#fff;padding:8px 14px;font-size:12px}
body.tc .topbar nav button.active{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---------- hero ---------- */
body.tc .hero{border:0;padding:46px 0 30px;min-height:470px}
body.tc .hero .eyebrow{font:11px var(--mono);letter-spacing:1.4px;color:var(--muted)}
body.tc .hero h1{font-weight:900;letter-spacing:-1px}
body.tc .hero h1>span:not(.hero-star):before{background:linear-gradient(90deg,#ffb3a6,#ffe58f,#b8f5c8,#a8e6ff);opacity:.75}
body.tc .hero-caption{font:10px var(--mono);letter-spacing:1px}
body.tc .hero-cards{height:430px}
/* today's top three, spread out left to right (high to low) so each face reads; only a sliver overlaps */
/* today's top three, laid side by side left to right (high to low); the heading now stands alone, so the cards get the wider column */
body.tc .hero{grid-template-columns:1fr 1.15fr}
body.tc .hero-card{width:196px;height:auto;aspect-ratio:auto;box-shadow:none;border-radius:14px;background:none}
/* hero tickets size to their content like the grid ones (a fixed ratio squeezed the seal onto the name on dense cards) */
body.tc .hero-card .card-front{position:relative;inset:auto;height:auto}
body.tc .hero-card .tk{position:relative;inset:auto}
body.tc .hero-card .tk-emblem{flex:none;height:118px;grid-template-rows:auto auto;align-content:center}
body.tc .hero-card .tk-seal{height:72px}
body.tc .hero-card-0{transform:translateX(calc(-150% - 6px)) rotate(-3deg);top:24px}
body.tc .hero-card-1{transform:translateX(-50%);top:8px}
body.tc .hero-card-2{transform:translateX(calc(50% + 6px)) rotate(3deg);top:24px}
body.tc .hero-card:hover{z-index:4}
body.tc .summary-bar,body.tc .collection-bar{background:#fbfaf6;border:1px solid var(--line);border-radius:18px;padding:16px 22px;margin:14px 0}
body.tc .catalog{--paper:#fbfaf6;background:#fbfaf6;border:1px solid var(--line);border-radius:22px;padding:26px 26px 30px;margin:18px 0 30px}
body.tc .type-row button,body.tc .category-row button,body.tc .filters button,body.tc [data-layout]{border-radius:999px}

/* ---------- grid: smaller cards, more per row ---------- */
body.tc .card-grid{grid-template-columns:repeat(auto-fill,minmax(214px,1fr));gap:24px 16px}
/* height follows content (see grid cards below); a fixed ratio sized for the densest card left most tickets with a tall empty emblem */
body.tc .card-flip{aspect-ratio:auto;border-radius:14px;transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .35s cubic-bezier(.2,.8,.2,1);will-change:transform}
body.tc .card-flip:hover{transition-duration:.08s}
body.tc .card-front,body.tc .card-back{border:0;outline:0;border-radius:14px;box-shadow:0 1px 0 #fff inset,0 14px 24px -16px #0007,0 2px 5px -2px #0003;background:none;padding:0}
body.tc .card-caption{font:10px var(--mono);color:var(--muted);margin:9px 2px 6px}
body.tc .action-pair .collect-button{padding:7px 4px;font-size:10.5px}
/* actions read as ticket-console pills, not the old green blocks */
body.tc .collect-button{display:block;border:1px solid var(--ink);border-radius:999px;background:transparent;color:var(--ink);padding:8px 10px;min-height:0;font-size:11px;font-weight:600;text-align:center;text-decoration:none}
body.tc .collect-button:hover{background:#16150f0f}
body.tc .collect-button.record{background:var(--ink);color:#fbfaf6}
body.tc .collect-button.go-use{border-color:var(--ink)!important;color:var(--ink)!important}
body.tc .collect-button.record:hover{background:#34322a}
body.tc .collect-button:disabled{opacity:.4;cursor:not-allowed}
body.tc .claim-stamp{border:1.5px dashed var(--accent);border-radius:999px;color:var(--accent);background:#e4572e0d;transform:rotate(-1.5deg);min-height:34px}
body.tc .claim-stamp:hover{background:#e4572e1a}

/* ---------- the ticket ---------- */
.tk{--stock:linear-gradient(160deg,#fffefb 0%,#f7f5ef 55%,#efece4 100%);--tk-ink:#17160f;--tk-sub:#6d6a60;--tk-rule:#1716101f;--foil-op:0;--glare-op:0;--emblem-stroke:url(#tk-laser);
  position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;border-radius:14px;background:var(--stock);color:var(--tk-ink);
  border:1px solid #0000001a;font-family:'Plus Jakarta Sans','PingFang SC','Helvetica Neue',sans-serif;isolation:isolate}
.tk:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.55;mix-blend-mode:soft-light;
  background:conic-gradient(from calc(var(--seed,0) * 1deg) at 70% 20%,#ffd1dc,#fff3c4,#d2ffe6,#cfeeff,#ffd1dc)}
.tk>*{position:relative;z-index:1}
/* header line printed on the stock, no rainbow band (Carl 11-15: one surface, no laser strips top and bottom) */
.tk-strip{display:flex;justify-content:space-between;gap:6px;padding:10px 12px 0;font:7.5px/1.2 var(--mono);letter-spacing:.7px;text-transform:uppercase;color:var(--tk-sub);white-space:nowrap;overflow:hidden}
.tk-strip span{overflow:hidden;text-overflow:ellipsis}
/* content keeps its natural height; only the emblem gives way, so dense cards never clip text */
.tk>*{flex-shrink:0}
.tk-emblem{flex:1 1 0;min-height:28px;display:grid;grid-template-rows:minmax(0,1fr) auto;place-items:center;margin:6px 10px 0;border-bottom:1px dashed var(--tk-rule)}
/* platform name centred under the logo; wraps instead of truncating */
.tk-name{max-width:100%;padding:1px 14px 5px;font-size:11px;line-height:1.25;font-weight:800;letter-spacing:.2px;text-align:center;text-wrap:balance;color:var(--tk-ink)}
/* security-paper guilloche behind the seal, tinted per provider so every card has its own ink */
.tk-emblem:before{content:'';position:absolute;inset:0;pointer-events:none;
  background:repeating-radial-gradient(circle,hsl(calc(var(--seed,0) * 1deg) 80% 52% / .2) 0 .7px,transparent 1px 4.5px);
  -webkit-mask:radial-gradient(closest-side,#000 35%,transparent);mask:radial-gradient(closest-side,#000 35%,transparent)}
.tk-emblem .mark{position:absolute;font-size:8px;color:var(--tk-sub);opacity:.75}
.tk-emblem .m1{left:2px;top:4px}.tk-emblem .m2{right:2px;top:4px}.tk-emblem .m3{left:2px;bottom:4px}.tk-emblem .m4{right:2px;bottom:4px}
.tk-seal{position:relative;height:88%;min-height:0;max-height:150px;aspect-ratio:1;display:grid;place-items:center;container-type:inline-size}
.tk-seal:before{content:'';position:absolute;inset:-8%;border-radius:50%;background:radial-gradient(circle,#fff 0,#ffe7a8aa 30%,#a8f0ff55 55%,transparent 70%);
  animation:tk-breathe 4.2s ease-in-out infinite;animation-delay:calc(var(--seed,0) * -12ms)}
.tk-seal svg{position:relative;width:100%;height:100%;overflow:visible;animation:tk-spin 80s linear infinite;animation-delay:calc(var(--seed,0) * -220ms)}
.tk-seal svg .rose,.tk-seal svg .ticks,.tk-seal svg .ring{fill:none;stroke:var(--emblem-stroke)}
.tk-seal svg .core{fill:#fffdf8;stroke:var(--emblem-stroke);stroke-width:1.2}
/* real platform logo in the white core (r=27 → 54% of the seal); a square tile at 38% still fits inside that circle */
/* floor of 22px: on the densest cards the seal shrinks to ~36px and the logo takes over the core instead of vanishing */
.tk-seal .logo{position:absolute;width:clamp(22px,38%,64px);height:clamp(22px,38%,64px);object-fit:contain;border-radius:22%;background:#fffdf8;
  animation:tk-breathe-text 4.2s ease-in-out infinite;animation-delay:calc(var(--seed,0) * -12ms)}
.tk-seal:has(.logo) svg .core{stroke-width:2.4}
.tk-seal .mono{position:absolute;font-weight:900;font-size:clamp(13px,8cqi,22px);letter-spacing:-.5px;color:#17160f;
  animation:tk-breathe-text 4.2s ease-in-out infinite;animation-delay:calc(var(--seed,0) * -12ms)}
/* laser sweep across the seal */
.tk-seal:after{content:'';position:absolute;inset:4%;border-radius:50%;pointer-events:none;mix-blend-mode:overlay;
  background:linear-gradient(115deg,transparent 35%,#fffffff2 48%,#ffffff00 60%) 0 0/260% 100%;animation:tk-sweep 5.5s ease-in-out infinite;animation-delay:calc(var(--seed,0) * -15ms)}
.tk-eyebrow{margin:7px 10px 0;font:7.5px var(--mono);letter-spacing:.9px;color:var(--tk-sub);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-amount{margin:1px 10px 0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.tk-amount strong{font-size:21px;line-height:1.05;font-weight:900;letter-spacing:-.4px}
.tk-amount.pending strong{font-size:15px;color:var(--tk-sub)}
.tk-amount em{font:normal 9px var(--mono);padding:1px 5px;border:1px solid var(--tk-rule);border-radius:999px;background:#fff8}
.tk-title{margin:3px 10px 0;font-size:10.5px;line-height:1.35;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tk-grid{display:grid;grid-template-columns:1fr 1fr;margin:7px 10px 0;border:1px solid var(--tk-rule);border-radius:6px;overflow:hidden}
.tk-grid>div{padding:4px 6px 5px;min-width:0}
.tk-grid>div.wide{grid-column:1/-1;border-bottom:1px solid var(--tk-rule)}
.tk-grid>div.half.l{border-right:1px solid var(--tk-rule)}
.tk-grid dt{font:6.5px var(--mono);letter-spacing:.6px;color:var(--tk-sub);text-transform:uppercase;white-space:nowrap}
.tk-grid dd{margin:2px 0 0;font-size:9px;line-height:1.3;font-weight:650;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tk-grid>div.wide dd{-webkit-line-clamp:unset;display:block;font-weight:500}
.tk-grid>div.half dd{-webkit-line-clamp:unset;display:block}
.tk-grid dd.urgent{color:var(--tk-accent,var(--accent))}
.tk-grid dd.muted{color:var(--tk-sub);font-weight:500}
.tk-chips{display:flex;flex-wrap:wrap;gap:3px;margin:6px 10px 0;padding:0;list-style:none}
/* every condition stays on the front (acceptance: no flipping); extra rows take space from the emblem */
.tk-chips li{font-size:8px;line-height:1.15;padding:2px 5px;border:1px solid var(--tk-rule);border-radius:4px;background:#ffffff8c;max-width:100%}
.tk-chips li.more{font-family:var(--mono);background:var(--tk-ink);color:var(--stock-ink-inverse,#fff);border-color:var(--tk-ink)}
.tk-perf{height:12px;margin:auto 0 0;position:relative;background:radial-gradient(circle,var(--tk-rule) 1.1px,transparent 1.5px) 5px 50%/8px 100% repeat-x}
.tk-perf:before,.tk-perf:after{content:'';position:absolute;top:50%;width:14px;height:14px;border-radius:50%;background:var(--paper,#f2f0e9);transform:translateY(-50%);box-shadow:inset 0 0 0 1px #0000001a;z-index:3}
.tk-perf:before{left:-7px}.tk-perf:after{right:-7px}
.tk-stub{display:flex;gap:8px;align-items:center;padding:6px 12px 11px}
.tk-stub div{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}
/* serial number in place of a code block: big mono digits behind a dashed rule, like a ticket stub */
.tk-no{flex:none;align-self:stretch;display:grid;place-items:center;padding-left:9px;border-left:1px dashed var(--tk-rule);font:800 22px/1 var(--mono);letter-spacing:-1.5px;color:var(--tk-ink);opacity:.85}
.tk-stub small{font:6.5px var(--mono);letter-spacing:.5px;color:var(--tk-sub);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-stub b{font-size:11px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tk-stub b.go{color:var(--tk-accent,var(--accent))}

/* foil sits between the stock and the content so type never gets washed out; glare rides on top */
.tk-foil,.tk-glare{position:absolute!important;inset:0;pointer-events:none;border-radius:inherit}
.tk-foil{z-index:0!important;opacity:var(--foil-op);
  background:repeating-linear-gradient(45deg,#ffffff38 0 1px,transparent 1px 4px),repeating-linear-gradient(-45deg,#ffffff38 0 1px,transparent 1px 4px),
    radial-gradient(circle at 23% 31%,#fff 0 .8px,transparent 1.3px) 0 0/9px 11px,radial-gradient(circle at 70% 64%,#fff 0 .7px,transparent 1.2px) 0 0/13px 7px,
    repeating-linear-gradient(112deg,var(--sun));
  background-size:auto,auto,9px 11px,13px 7px,420% 420%;background-position:0 0,0 0,0 0,0 0,var(--mx,50%) var(--my,50%);transition:opacity .3s}
.tk-glare{z-index:3!important;opacity:var(--glare-op);mix-blend-mode:soft-light;background:radial-gradient(farthest-corner circle at var(--mx,50%) var(--my,30%),#fffffff2 6%,#ffffff55 26%,#0000002e 90%);transition:opacity .25s}
.card-flip:hover .tk,.hero-card:hover .tk{--glare-op:.7}

/* three editions, Ticket Tear style: the whole stock changes, and ink / rules / accent follow it.
   none + info = silver (not claimed yet, or not collectible); prism = claimed once (midnight navy); gold = claimed more than once. */
.tk.tier-none,.tk.tier-info,.tk-back{--stock:linear-gradient(160deg,#fdfdfc 0%,#eef0f2 48%,#e2e5e9 100%);--tk-ink:#15171b;--tk-sub:#575d67;--tk-rule:#1b22301f;--tk-accent:#a8330e;--foil-op:.12}
.tk.tier-none .tk-foil,.tk.tier-info .tk-foil{background-image:repeating-linear-gradient(112deg,#ffffff 0%,#d9dde3 6%,#f6f7f9 12%,#cfd4dc 18%,#ffffff 24%,#e4d9f2 30%,#d6eef2 36%)}
.tk.tier-info{--emblem-stroke:url(#tk-silver)}
.tk.tier-info .tk-seal:before{background:radial-gradient(circle,#ffffff 0,#e9e7df99 40%,transparent 70%)}
.tk.tier-info .tk-emblem:before{background:repeating-radial-gradient(circle,#8a887f33 0 .7px,transparent 1px 4.5px)}
/* prism: midnight-navy stock (matches the reference UV ticket), magenta-cyan dichroic foil screened on top so it glows without washing out the white type */
.tk.tier-prism,.tk-back.back-prism{--stock:radial-gradient(120% 70% at 18% 0%,#1d2852 0%,transparent 62%),linear-gradient(160deg,#151d3c 0%,#10152f 46%,#0a0d1e 100%);
  --tk-ink:#f5f7ff;--tk-sub:#b9c3f3;--stock-ink-inverse:#10152f;--tk-rule:#ffffff2e;--tk-accent:#ffa184;--foil-op:.1;--glare-op:.05}
.tk.tier-prism:before{opacity:.08}
.tk.tier-prism .tk-foil{mix-blend-mode:screen;background-image:repeating-linear-gradient(45deg,#ffffff1f 0 1px,transparent 1px 4px),repeating-linear-gradient(-45deg,#ffffff1f 0 1px,transparent 1px 4px),radial-gradient(circle at 23% 31%,#fff 0 .7px,transparent 1.2px),radial-gradient(circle at 70% 64%,#fff 0 .6px,transparent 1.1px),
  repeating-linear-gradient(112deg,#2fd9ff 0%,#2a6bff 9%,#7fe9ff 17%,#2a50e8 25%,#ff5fd0 31%,#2fd9ff 36%)}
.tk.tier-prism .type-dot{background:#f5f7ff}
.tk.tier-prism .tk-emblem:before{background:repeating-radial-gradient(circle,#9fb4ff38 0 .7px,transparent 1px 4.5px)}
.tk.tier-prism .tk-seal:before{background:radial-gradient(circle,#ffffffe6 0,#ff8ae866 30%,#5fe6ff44 54%,transparent 70%)}
.tk.tier-prism .tk-chips li,.tk.tier-prism .tk-amount em{background:#ffffff14;border-color:#ffffff38}
.tk.tier-prism .tk-grid{background:#0a134833}
/* the +N flip chip keeps its solid pill on navy (the translucent chip rule above made it dark-on-dark) */
.tk.tier-prism .tk-chips li.more{background:var(--tk-ink);border-color:var(--tk-ink)}
/* gold: champagne gold-leaf stock (no black-and-gold), darker brown ink so small labels stay readable on the deepest gold stop */
.tk.tier-gold,.tk-back.back-gold{--stock:linear-gradient(135deg,#fdf4d6 0%,#ecd28a 26%,#fff6d8 48%,#d9b45f 72%,#f7e8b8 100%);--tk-ink:#2a1d05;--tk-sub:#523d12;--tk-rule:#5a42103a;--tk-accent:#7a220a;--foil-op:.46;--glare-op:.12}
.tk.tier-gold .tk-foil{background-image:repeating-linear-gradient(45deg,#fff6 0 1px,transparent 1px 4px),repeating-linear-gradient(-45deg,#fff6 0 1px,transparent 1px 4px),radial-gradient(circle at 23% 31%,#fff 0 .9px,transparent 1.4px),radial-gradient(circle at 70% 64%,#fff 0 .8px,transparent 1.3px),
  repeating-linear-gradient(112deg,#ffd29a 0%,#fff1a0 7%,#ffb9c0 14%,#cdf7b8 21%,#ffeaa6 28%,#ffd29a 35%)}
.tk.tier-gold .tk-seal svg .core{fill:#fff6dc}
.tk.tier-gold .tk-chips li,.tk.tier-gold .tk-amount em{background:#fff8e080}
.tk.archived>*:not(.retired-stamp){filter:grayscale(.9) contrast(.92)}
/* style.css still carries the old flat-card tier rules (grayscale + fade on tier-none, stacked shadows,
   square border-image on holo); they match .tk too, so switch them off here */
body.tc .tk[class*=tier-]{filter:none;opacity:1;outline:0;box-shadow:none;border:1px solid #0000001a}
body.tc .tk[class*=tier-]:after{content:none}

/* type marks on the top strip so free/auto cards read differently at a glance */
.tk .type-dot{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px;vertical-align:0;background:#1b1a14}
.tk.type-auto_refresh .type-dot{background:#1f8a70}.tk.type-free_use .type-dot{background:#2c6fd1}
.tk.type-conditional .type-dot{background:#c98a14}.tk.type-paid_reward .type-dot{background:#9b9b9b}.tk.type-needs_review .type-dot{background:transparent;box-shadow:inset 0 0 0 1px #1b1a14}

/* stamps */
body.tc .stack-count{z-index:4;right:8px;bottom:auto;top:26px;background:#16150f;color:#fff;border:0;font:9px var(--mono)}
/* position:absolute restated: .tk>* (relative) outranks style.css here and put the stamp in the flow, making retired fronts 82px taller */
body.tc .retired-stamp{position:absolute;z-index:5;top:27%}
/* right/bottom:auto — style.css pins this badge bottom-right; with our left/top it stretched over the whole card */
body.tc .tk .stale-badge{position:absolute;left:8px;top:26px;right:auto;bottom:auto;z-index:4;font:7px var(--mono);border-radius:3px;white-space:nowrap}

/* ---------- back of the ticket: full facts ---------- */
/* The back takes its stock, ink, rule and accent from the same edition variables as the front (silver is the default,
   prism and gold are added to the tier rules above, archived is silver in grayscale). No foil, glare or animation here:
   it is the reading side. Body text 12px, labels 10px. */
body.tc .card-back{background:none;color:inherit;padding:0;display:flex;flex-direction:column}
.tk-back{display:flex;flex-direction:column;height:100%;padding:11px 12px 9px;overflow:auto;scrollbar-width:thin;border-radius:inherit;border:1px solid var(--tk-rule);
  background:var(--stock);color:var(--tk-ink);font:500 12px/1.4 'Plus Jakarta Sans','PingFang SC','Helvetica Neue',sans-serif;text-align:left}
body.tc .tk-back.back-archived{filter:grayscale(1)}
body.tc .tk-back>*{flex:none;margin:0}
body.tc .tk-back .eyebrow{font:10px/1.2 var(--mono);letter-spacing:.8px;color:var(--tk-sub)}
body.tc .tk-back h3{margin-top:2px;font-size:17px;line-height:1.2;font-weight:800}
body.tc .tk-back .h{margin-top:8px;padding-top:6px;border-top:1px dashed var(--tk-rule);font:700 10px/1.2 var(--mono);letter-spacing:.8px;color:var(--tk-sub)}
body.tc .tk-back .got,.tk-back .scope{margin-top:3px}
body.tc .tk-back .got strong{font-weight:800}
body.tc .tk-back ul{margin-top:3px;padding:0;list-style:none;columns:2;column-gap:8px}
body.tc .tk-back li{padding-left:11px;position:relative;break-inside:avoid}
body.tc .tk-back li:before{content:'';position:absolute;left:1px;top:.55em;width:4px;height:4px;border-radius:50%;background:var(--tk-accent)}
body.tc .tk-back dl{margin-top:3px;font-size:12px;line-height:1.4;display:grid;grid-template-columns:auto minmax(0,1fr);gap:1px 8px}
body.tc .tk-back dt{margin:0;font-size:10px;line-height:1.68;color:var(--tk-sub);white-space:nowrap}
body.tc .tk-back dd{margin:0}
body.tc .tk-back .back-hint{margin-top:auto;padding-top:6px;font:10px/1.2 var(--mono);color:var(--tk-sub)}
/* front: shown only when markClipped() finds the title or the model line clamped; absolute, so the fixed height is untouched */
.tk-grid>div.wide{position:relative}
.tk .flip-hint{display:none;position:absolute;right:4px;top:3px;font:normal 7.5px/1.15 var(--mono);letter-spacing:0;padding:1px 4px;border-radius:4px;background:var(--tk-ink);color:var(--stock-ink-inverse,#fff);text-transform:none}
.tk.clipped .flip-hint{display:block}

/* ---------- detail dialog: same paper + ink as the page, not the old green template ---------- */
body.tc dialog{border:1px solid var(--line);border-radius:22px;background:#fbfaf6}
body.tc dialog::backdrop{background:#16150fd0}
body.tc #detail-content{grid-template-columns:280px minmax(0,1fr)}
body.tc .detail-card{height:auto;aspect-ratio:.6}
body.tc .detail-info .eyebrow{font:11px var(--mono);letter-spacing:1.2px;color:var(--muted)}
body.tc .detail-amount{font:900 26px/1.1 'PingFang SC',sans-serif!important;color:var(--ink)!important;letter-spacing:-.4px}
body.tc .detail-info>p{color:var(--muted)}
body.tc .detail-info dt{font:10px var(--mono);letter-spacing:.6px;color:var(--muted)}
body.tc .condition-list span{border-color:var(--line);border-radius:999px;background:#fff;padding:4px 9px}
body.tc .level-hint{color:var(--ink)!important;background:#fff;border:1px dashed var(--accent);border-radius:12px}
body.tc .detail-actions .collect-button,body.tc .detail-actions a{border-radius:999px}

/* ---------- motion ---------- */
@keyframes tk-breathe{0%,100%{transform:scale(.9);opacity:.45}50%{transform:scale(1.06);opacity:1}}
@keyframes tk-breathe-text{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes tk-spin{to{transform:rotate(360deg)}}
@keyframes tk-sweep{0%,20%{background-position:120% 0}70%,100%{background-position:-60% 0}}
@keyframes tk-pulse{0%,100%{box-shadow:0 0 0 3px #e4572e2b}50%{box-shadow:0 0 0 6px #e4572e10}}
@keyframes tk-drift{0%,100%{background-position:0 0,0 0,0 0,0 0,10% 20%}50%{background-position:0 0,0 0,0 0,0 0,90% 80%}}
/* no pointer to chase the light on touch screens: let rare foils drift on their own */
@media (hover:none){.tk.tier-gold .tk-foil,.tk.tier-prism .tk-foil{animation:tk-drift 7s ease-in-out infinite}}
@media (prefers-reduced-motion:reduce){.tk *,.tk *:before,.tk *:after,.tk-seal:before,.tk-seal:after{animation:none!important}body.tc .card-flip{transform:none!important}}

/* centre the nav and keep the Token Ocean link beside the about button */
body.tc .topbar nav{margin:0 auto}

/* ---------- responsive ---------- */
@media (max-width:1100px){body.tc main{padding:0 18px}body.tc .card-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}
@media (max-width:760px){
  /* not sticky on phones: a three-row bar would cover a fifth of the screen */
  body.tc .topbar{position:relative;top:0;border-radius:18px;margin:8px 10px 0;padding:10px 12px;gap:10px}
  body.tc .topbar nav{height:auto;gap:6px;justify-content:flex-start}
  body.tc .topbar nav button{padding:6px 12px}
  body.tc .topbar nav button.active:after{display:none}
  /* brand gets its own row so the two right-side links wrap together instead of leaving one alone */
  body.tc .topbar .brand{width:100%}
  body.tc main{padding:0 14px}
  body.tc .catalog{padding:18px 14px 22px;border-radius:18px}
  body.tc .detail-card{width:240px;height:auto}
  /* keep the desktop ticket and zoom it, so text scales with the card instead of overflowing it */
  body.tc .hero-cards{zoom:.72;height:440px}
}
@media (max-width:520px){
  body.tc .brand{gap:8px}
  body.tc .brand .back{font-size:10px;padding:5px 8px}
  body.tc .brand .wordmark{font-size:14px}
  /* three tickets side by side still fit a 360px screen */
  body.tc .hero-cards{zoom:.56;height:520px}
  body.tc .topbar>.text-button{padding:6px 10px;font-size:11px}
  /* one ticket per row on phones: two 165px tickets make 7px text */
  body.tc .card-grid{grid-template-columns:minmax(0,300px);justify-content:center;gap:22px}
}
/* grid cards: the front's content sets the height, cards in a row share the tallest one, and the spare goes round a fixed-size seal */
/* subgrid: ticket, caption and buttons line up across a row even when one card has a single button */
body.tc .card-item{display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:0}
body.tc .card-item .card-flip{min-height:auto}
body.tc .card-item .card-inner{height:auto;min-height:100%}
body.tc .card-item .tk{position:relative;inset:auto;min-height:100%}
/* seal and name stay together as one block, centred in whatever height the row gives the emblem */
body.tc .card-item .tk-emblem{flex:none;height:140px;grid-template-rows:auto auto;align-content:center}
/* fixed-height front: every section gets the same box on every card, so a row of tickets lines up line for line;
   anything longer is clamped here and shown in full on the back (11-15 feedback) */
body.tc :is(.card-item,.hero-card) .tk-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;height:2.5em;padding-bottom:0}
body.tc :is(.card-item,.hero-card) .tk-amount{flex-wrap:nowrap;min-width:0;height:24px}
body.tc :is(.card-item,.hero-card) .tk-amount strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body.tc :is(.card-item,.hero-card) .tk-amount em{flex:none}
body.tc :is(.card-item,.hero-card) .tk-title{height:2.7em}
body.tc :is(.card-item,.hero-card) .tk-grid>div.wide dd,body.tc :is(.card-item,.hero-card) .tk-grid>div.half dd{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;height:2.6em}
body.tc :is(.card-item,.hero-card) .tk-chips{height:38px;overflow:hidden;align-content:flex-start}
body.tc :is(.card-item,.hero-card) .tk-perf{margin-top:8px}
body.tc .card-item .tk-seal{height:86px}
/* the back overlays the front and scrolls, so a long fact sheet never stretches the ticket */
body.tc .card-item .card-back{position:absolute;inset:0}
/* WebGL foil (src/foil.js, on by default, ?foil=off for CSS only): the canvas paints stock, frame, rosette and foil;
   the DOM keeps layout, tilt and all text on top */
.tk>canvas.tk-gl{position:absolute!important;inset:0;z-index:0!important;width:100%;height:100%;pointer-events:none;border-radius:inherit}
.tk.gl{background:none}
.tk.gl:before,.tk.gl .tk-foil,.tk.gl .tk-glare,.tk.gl .tk-emblem:before,.tk.gl .tk-emblem .mark,.tk.gl .tk-seal svg,.tk.gl .tk-seal:before,.tk.gl .tk-seal:after{display:none}
.tk.gl .tk-strip{background:none!important}
/* foil lab (?foil=lab): one card front at the reference ticket's on-screen width, three editions side by side */
body.foil-lab>*:not(#foil-lab){display:none!important}
#foil-lab{display:flex;gap:28px;justify-content:center;align-items:flex-start;padding:28px;min-height:100vh;box-sizing:border-box}
#foil-lab .lab-card{width:330px;flex:none;display:block;position:relative}
#foil-lab .card-front{position:relative;inset:auto;height:auto}
#foil-lab .tk{position:relative;inset:auto}
#foil-lab .tk-emblem{flex:none;min-height:150px;grid-template-rows:auto auto;align-content:center}
#foil-lab .tk-seal{height:120px}
.foil-measure,.foil-measure *{transform:none!important;translate:none!important;rotate:none!important;scale:none!important}
.foil-still,.foil-still *{transition:none!important}
.tk.gl .tk-name,.tk.gl .tk-amount strong,.tk.gl .tk-no{color:transparent}

/* ---------- v0.10 (Carl 11-15) ---------- */
/* upgrade preview sits second in the top bar; pressed = dashed accent so it never reads as a second active tab */
body.tc .topbar nav #demo{border-style:dashed;color:var(--muted)}
body.tc .topbar nav #demo[aria-pressed=true]{border-color:var(--accent);color:var(--accent);background:#e4572e0d}
/* API is one more pill at the end of the benefit-type row, a toggle rather than a stray checkbox */
body.tc .type-row .api-toggle{border-style:dashed}
body.tc .type-row .api-toggle[aria-pressed=true]{border-style:solid;background:var(--ink);border-color:var(--ink);color:#fbfaf6}
body.tc .type-row .api-toggle[aria-pressed=true]:before{content:'✓ '}
body.tc .topbar nav #nav-count{font:10px var(--mono);margin-left:4px;padding:2px 7px;border-radius:99px;background:#16150f12;color:inherit}
body.tc .topbar nav .active #nav-count{background:#ffffff2e}
/* list view: two pills side by side never wrap their label (11-15 live: 领到了，记录 broke onto two lines) */
body.tc .offer-row{grid-template-columns:128px minmax(0,1fr) 110px 236px}
body.tc .row-action .action-pair{grid-template-columns:auto 1fr}
body.tc .row-action .collect-button{white-space:nowrap;padding:9px 12px;font-size:11px}
@media (max-width:1100px){body.tc .offer-row{grid-template-columns:110px minmax(0,1fr) 90px 216px}}
@media (max-width:760px){body.tc .offer-row{grid-template-columns:minmax(0,1fr) auto}}
/* achievements: the same ticket as the cards (seal, foil, perforation, stub), silver while locked, gold when unlocked */
body.tc .badge-grid{grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:20px 16px}
body.tc .badge-card{position:relative;border-radius:14px;transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 1px 0 #fff inset,0 14px 24px -16px #0007,0 2px 5px -2px #0003}
body.tc .badge-card:hover{transition-duration:.08s}
body.tc .badge-card .tk{position:relative;inset:auto;min-height:100%}
body.tc .badge-card .tk-emblem{flex:none;min-height:128px;grid-template-rows:auto auto;align-content:center}
body.tc .badge-card .tk-seal{height:86px}
body.tc .badge-card .tk-seal .mono{font-size:26px;font-weight:400}
body.tc .badge-card .tk-name{font-size:13px}
body.tc .badge-card .tk-title{-webkit-line-clamp:unset;display:block;min-height:2.7em}
/* locked: muted (the WebGL seal lives in the canvas, so desaturate the whole ticket rather than just the seal) */
body.tc .badge-card:not(.unlocked) .tk{filter:saturate(.35)}
.tk-meter{height:6px;margin:9px 12px 10px;border-radius:99px;background:var(--tk-rule);overflow:hidden}
.tk-meter i{display:block;height:100%;border-radius:inherit;background:var(--tk-ink)}
.tk.tier-gold .tk-meter i{background:linear-gradient(90deg,#a87a24,#ffe9a6,#c89a3a)}
@media (prefers-reduced-motion:reduce){body.tc .badge-card{transform:none!important}}
@media (max-width:520px){body.tc .badge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
