/* parts/swipe.css - /swipe/ (scope: .pg-swipe). Linked only there. B's money page on A's tokens:
   one hairline card per block (tier columns · ticket rows · price lists), gold only for prices,
   the drawn PokéCoin, category colour only on the event plates. Phones ≤ 639 px · tablet · desktop ≥ 1024. */

.pg-swipe {
  /* opaque hairline: the 1 px gaps between tier cells show it (works on any surface, both themes) */
  --sw-line: color-mix(in srgb, var(--text) 9%, var(--surface));
  --sw-coin-a: #ffe08a;
  --sw-coin-b: #e0a925;
}
.pg-swipe .sw-sec .sh { margin-bottom: 12px; }
.pg-swipe .sw-sec .sh-m { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- GO Pass switch: two-line segments (name + compact countdown) ---------- */
.pg-swipe .sw-seg { position: relative; width: max-content; margin: 0 0 14px; padding: 4px; border-radius: 15px; }
.pg-swipe .sw-seg .seg-b { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; height: auto; min-height: 50px; padding: 6px 16px; text-align: left; line-height: 1.25; border-radius: 11px; }
.pg-swipe .sw-sn { display: block; font-size: 14px; font-weight: 720; letter-spacing: -.01em; }
.pg-swipe .sw-sc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; }
.pg-swipe .seg-b[aria-selected="true"] .sw-sc { color: var(--text-2); }
.pg-swipe .sw-live { flex: none; width: 6px; height: 6px; background: var(--live); border-radius: 50%; box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--live) 20%, transparent); }
/* overflow (many passes / narrow phones): the strip scrolls; a soft edge says "more" (swipe.client.js sets is-l / is-r) */
.pg-swipe .sw-seg.is-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.pg-swipe .sw-seg.is-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.pg-swipe .sw-seg.is-l.is-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* one pass: the same name + countdown, as a plain line (no switch) */
.pg-swipe .sw-one { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -4px 0 14px; }
.pg-swipe .sw-one .sw-sn { font-size: 15px; }

/* ---------- tier card: hairline columns, rows shared across tiers ---------- */
.pg-swipe .sw-tiers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; overflow: hidden; background: var(--sw-line); border: 1px solid var(--sw-line); border-radius: var(--r-lg); }
/* phones: a tier is a row - head (name left · price + kr right), perks below */
.pg-swipe .sw-tier { min-width: 0; padding: 16px 18px; background: var(--surface); }
.pg-swipe .sw-th { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pg-swipe .sw-pc { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-align: right; }
.pg-swipe .sw-n { min-width: 0; margin: 0; padding-top: 3px; font-size: 15px; font-weight: 740; line-height: 1.3; letter-spacing: -.01em; }
.pg-swipe .sw-p { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.12; letter-spacing: -.03em; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-swipe .sw-k { margin: 2px 0 0; font-size: 13px; font-weight: 650; line-height: 1.3; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-swipe .sw-g { margin: 12px 0 0; padding: 0; list-style: none; }
.pg-swipe .sw-x { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--mute); }
.pg-swipe .sw-tier.is-free .sw-p, .pg-swipe .sw-tier.is-tba .sw-p { color: var(--mute); }
.pg-swipe .sw-tier.is-tba .sw-p { font-size: 18px; letter-spacing: -.01em; }
.pg-swipe .sw-tier.is-txt .sw-p { font-size: 17px; letter-spacing: -.01em; white-space: normal; }
.pg-swipe .sw-p .est { margin-left: 6px; vertical-align: middle; letter-spacing: 0; }
/* perks: a quiet dot; a line that names the pass's featured Pokémon carries its sprite */
.pg-swipe .sw-g li { position: relative; padding: 3px 0 3px 14px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.pg-swipe .sw-g li::before { content: ""; position: absolute; top: calc(3px + .72em - 2.5px); left: 1px; width: 5px; height: 5px; background: color-mix(in srgb, var(--mute) 55%, transparent); border-radius: 50%; }
.pg-swipe .sw-g li.has-mon { display: flex; align-items: center; gap: 8px; padding-left: 0; }
.pg-swipe .sw-g li.has-mon::before { display: none; }
.pg-swipe .sw-g .mon { width: 34px; height: 34px; margin: -4px 0 -4px -4px; }
/* a price whose missing part is explained in a tooltip (H.tipped): dotted underline as the only hint */
.pg-swipe .sw-tip { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

@media (min-width: 640px) {
  .pg-swipe .sw-tiers { grid-template-columns: repeat(var(--cb), minmax(0, 1fr)); }
  /* columns: name · price · kr · perks · footnote on the SAME rows across tiers (subgrid); the head
     wrappers dissolve so their parts land on rows 1-3 */
  .pg-swipe .sw-tier { display: grid; grid-column: span var(--sb); grid-row: span 5; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; padding: 20px 20px 22px; }
  .pg-swipe .sw-tier .sw-th, .pg-swipe .sw-tier .sw-pc { display: contents; }
  .pg-swipe .sw-tier > *, .pg-swipe .sw-tier .sw-th > *, .pg-swipe .sw-tier .sw-pc > * { min-width: 0; }
  .pg-swipe .sw-n { grid-row: 1; padding-top: 0; }
  .pg-swipe .sw-p { grid-row: 2; justify-self: start; margin-top: 12px; font-size: 30px; }
  .pg-swipe .sw-k { grid-row: 3; justify-self: start; text-align: left; }
  .pg-swipe .sw-g { grid-row: 4; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
  .pg-swipe .sw-x { grid-row: 5; }
  .pg-swipe .sw-tier.is-tba .sw-p { font-size: 22px; align-self: end; }
  .pg-swipe .sw-tier.is-txt .sw-p { font-size: 19px; }
}
@media (min-width: 1024px) {
  .pg-swipe .sw-tiers { grid-template-columns: repeat(var(--ca), minmax(0, 1fr)); }
  .pg-swipe .sw-tier { grid-column: span var(--sa); }
}

/* pass notes + the pass event (picture pill → the event dialog) */
.pg-swipe .sw-pf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 28px; margin-top: 14px; }
.pg-swipe .sw-notes { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0 0 0 2px; list-style: none; font-size: 13px; line-height: 1.45; color: var(--mute); }
.pg-swipe .sw-notes li { position: relative; padding: 3px 0 3px 20px; }
.pg-swipe .sw-notes li::before { content: "→"; content: "→" / ""; position: absolute; left: 0; top: 3px; color: color-mix(in srgb, var(--mute) 60%, transparent); }
.pg-swipe .sw-evb { display: inline-flex; flex: none; align-items: center; gap: 10px; max-width: 340px; min-height: 52px; padding: 5px 12px 5px 5px; font-size: 13.5px; font-weight: 680; line-height: 1.3; color: var(--text); text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; transition: border-color .15s ease, box-shadow .15s ease; }
.pg-swipe .sw-evb:hover { border-color: var(--hair-2); box-shadow: var(--lift); }
.pg-swipe .sw-evb .plate { width: 40px; height: 40px; border-radius: 11px; }
.pg-swipe .sw-evt { min-width: 0; }
.pg-swipe .sw-evb .chev { flex: none; width: 16px; height: 16px; color: var(--mute); }
@media (max-width: 639px) {
  .pg-swipe .sw-pf { flex-direction: column; align-items: stretch; }
  .pg-swipe .sw-evb { max-width: none; }
  .pg-swipe .sw-evt { flex: 1; }
}

/* ---------- tickets: event picture + hairline rows ---------- */
.pg-swipe .sw-tks { row-gap: 12px; }
.pg-swipe .sw-tks + .sw-tks { margin-top: 12px; }
.pg-swipe .sw-tg { display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 12px 18px 12px 12px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); }
.pg-swipe .sw-pic { flex: none; display: block; padding: 0; background: none; border: 0; border-radius: 14px; }
.pg-swipe button.sw-pic { cursor: pointer; transition: transform .15s ease; }
.pg-swipe button.sw-pic:hover { transform: translateY(-2px); }
.pg-swipe .sw-pic .plate { width: 60px; height: 60px; border-radius: 15px; }
.pg-swipe .sw-pic .plate.is-glyph > .glyph { width: 30px; }
.pg-swipe .sw-tl { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.pg-swipe .sw-tr { padding: 9px 0 10px; }
.pg-swipe .sw-tr:first-child { padding-top: 4px; }
.pg-swipe .sw-tr:last-child { padding-bottom: 2px; }
.pg-swipe .sw-tr + .sw-tr { border-top: 1px solid var(--hair); }
.pg-swipe .sw-tr .sw-th { gap: 14px; }
.pg-swipe .sw-tn { min-width: 0; padding-top: 2px; font-size: 14.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.pg-swipe .sw-td { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.pg-swipe .sw-tx { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--mute); overflow-wrap: anywhere; }
.pg-swipe .sw-tp { display: flex; flex: none; flex-direction: column; align-items: flex-end; max-width: 46%; text-align: right; }
.pg-swipe .sw-tp b { font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.pg-swipe .sw-tp > span { font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-swipe .sw-tp.is-tba b { padding-top: 2px; font-size: 15px; font-weight: 750; color: var(--mute); }
.pg-swipe .sw-tp.is-txt b { padding-top: 1px; font-size: 16px; letter-spacing: -.01em; }
/* a full-row card with two tickets: side by side, a hairline between (640 px up) */
@media (min-width: 640px) {
  .pg-swipe .sw-tg.is-pair .sw-tl { display: flex; }
  .pg-swipe .sw-tg.is-pair .sw-tr { flex: 1 1 0; min-width: 0; padding: 4px 0 2px; }
  .pg-swipe .sw-tg.is-pair .sw-tr + .sw-tr { margin-left: 24px; padding-left: 24px; border-top: 0; border-left: 1px solid var(--hair); }
}

/* ---------- price lists (shop, codes): one card, hairline rows, 2 columns from 640 px ---------- */
.pg-swipe .sw-list { padding: 2px 22px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); }
.pg-swipe .sw-lg { --g: 56px; row-gap: 0; }
.pg-swipe .sw-li { display: flex; align-items: center; gap: 16px; height: 100%; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--hair); }
.pg-swipe .sw-li.t-c { border-top: 0; }
@media (min-width: 640px) {
  .pg-swipe .sw-li.t-c { border-top: 1px solid var(--hair); }
  .pg-swipe .sw-li.t-b { border-top: 0; }
}
@media (min-width: 1024px) {
  .pg-swipe .sw-li.t-b { border-top: 1px solid var(--hair); }
  .pg-swipe .sw-li.t-a { border-top: 0; }
}
.pg-swipe .sw-st, .pg-swipe .sw-ct { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.pg-swipe .sw-st b, .pg-swipe .sw-ct b { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.pg-swipe .sw-st small, .pg-swipe .sw-ct small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--mute); }
.pg-swipe .sw-st small .sw-coin { width: 11px; height: 11px; margin-left: 1px; vertical-align: -1px; }
.pg-swipe .sw-sv { display: inline-flex; flex: none; align-items: center; gap: 7px; }
.pg-swipe .sw-sv b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pg-swipe .sw-sv .sw-usd { color: var(--gold); }
.pg-swipe .sw-sv .sw-usd.is-tba { font-size: 15px; color: var(--mute); }
.pg-swipe .sw-sk { font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-swipe .sw-coin { display: inline-block; flex: none; width: 15px; height: 15px; vertical-align: middle; background: radial-gradient(circle at 35% 32%, var(--sw-coin-a), var(--sw-coin-b) 72%); border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(150, 100, 0, .45); }
.pg-swipe .sh-m .sw-coin { width: 13px; height: 13px; }
/* codes: the code itself is the copy button (shell: [data-copy] → "Copied ✓") */
.pg-swipe .sw-cb { position: relative; flex: none; min-height: 42px; padding: 8px 14px 8px 36px; font: 700 13px/1.2 var(--mono); letter-spacing: .02em; color: var(--text); cursor: copy; background: var(--surface-2); border: 1px dashed var(--hair-2); border-radius: 11px; }
.pg-swipe .sw-cb::before { content: ""; position: absolute; top: 50%; left: 13px; width: 14px; height: 14px; margin-top: -7px; background: var(--mute); -webkit-mask: var(--sw-copy) center / contain no-repeat; mask: var(--sw-copy) center / contain no-repeat; }
.pg-swipe .sw-cb:hover { border-color: var(--mute); }
.pg-swipe { --sw-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2.5'/%3E%3Cpath d='M15 9V6.5A2.5 2.5 0 0 0 12.5 4h-6A2.5 2.5 0 0 0 4 6.5v6A2.5 2.5 0 0 0 6.5 15H9'/%3E%3C/svg%3E"); }
.pg-swipe .sw-ct a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }

/* nothing listed */
.pg-swipe .sw-none { margin-top: 28px; }

@media (max-width: 639px) {
  .pg-swipe .sw-seg .seg-b { padding: 6px 13px; }
  .pg-swipe .sw-list { padding: 2px 16px; }
  .pg-swipe .sw-tg { padding: 10px 14px 10px 10px; gap: 12px; }
  .pg-swipe .sw-pic .plate { width: 48px; height: 48px; border-radius: 13px; }
  .pg-swipe .sw-tp b { font-size: 18px; }
  /* a code on phones: what you get · the code (copy) · where + until, stacked at full width */
  .pg-swipe .sw-cr { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 0; }
  .pg-swipe .sw-cr .sw-ct { display: contents; }
  .pg-swipe .sw-cr .sw-ct b { order: 1; }
  .pg-swipe .sw-cr .sw-cb { order: 2; margin: 2px 0; }
  .pg-swipe .sw-cr .sw-ct small { order: 3; }
  .pg-swipe .sw-cr .sw-ct small + small { margin-top: -6px; } /* where + until read as one block */
}
