/* IRIS Artist Alignment, cloned from Dodd's HUD mockup (assets/art/hud-mockup.webp):
   a left menu with the big IRIS wordmark, a tally top right, one dark panel in the middle (the card + who they are +
   your message + the one red action), and three shelves along the bottom (To message, Messaged, Replied).
   Type (locked, type.css): Bodoni only for the IRIS wordmark, Libre Caslon Text for headings and names, Inter for UI.
   The cards are Dodd's card art (cards.js). The world behind is his scene art (bg.js). */
:root {
  --black: #070506;
  --panel: rgba(7, 5, 6, .86);
  --line: rgba(236, 228, 216, .14);
  --line-hi: rgba(236, 228, 216, .26);
  --bone: #ece4d8;
  --bone-2: #b9b0a5;
  --bone-3: #847b72;
  --red: #b3141d;
  --red-hi: #cf1c26;
  --t-mythic: #ff2a40; /* #167 the red tier above Titan (the Mythic pack's red, a touch lighter so it reads as text) */
  --t-mythic-deep: #9e0a1e;
  --t-titan: #f0c870;
  --t-demigod: #c9a2ff;
  --t-oracle: #8cbcff;
  --t-hero: #8fdcae;
  --t-mortal: #cfc6bb;
  --wordmark: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --serif: "Libre Caslon Text", "Times New Roman", Times, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
  /* ---- the one set of tokens every desk file uses (cohesion pass, 2026-10-25) ---- */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --dur-fast: 150ms;   /* hover, colour, press */
  --dur: 220ms;        /* small panels, tabs, toggles */
  --dur-slow: 380ms;   /* sheets, page swaps */
  --r-xs: 4px;         /* chips inside cards, kbd, dots */
  --r-sm: 6px;         /* inputs, calendar days, small tags */
  --r-md: 8px;         /* every button, segmented control, tab */
  --r-lg: 12px;        /* every plate, panel, sheet, menu */
  --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  /* ---- density (Dodd, 2026-10-25: "a bit less big but still easy to read ... feel less claustrophobic"). One scale
     for the desk's big type and its breathing room; density.css (loaded last) points the pages at these. Floors: body
     text never under --fs-body, labels never under --fs-label.
     #174 (Dodd, 10-26: "things are a little tiny, and Joe is half blind, so things bigger in general, but not too big
     where it's awkward"): the floors went up a notch, body 16 (15 on a phone is fine), labels 13.5, and nothing live
     under 12.5px; every small size in the page files moved up with them (body copy +1px, the smallest +1.5 to 2.5).
     The left menu and the top plate keep their own sizes (density.css #166). ---- */
  --fs-brand: clamp(56px, 5vw, 90px);     /* the IRIS wordmark over the menu */
  --fs-nav: clamp(19px, 1.55vw, 26px);    /* the left menu's words */
  --fs-page: clamp(34px, 3.1vw, 54px);    /* a page's title: Collection, Inventory, Stats, Shop, Account, the season */
  --fs-h2: clamp(22px, 1.8vw, 28px);      /* a panel's or a section's heading */
  --fs-hero-num: clamp(40px, 3.4vw, 58px); /* the big figures (Stats) */
  --fs-body: 16px;
  --fs-label: 13.5px;
  --page-gap: clamp(20px, 2.2vw, 34px);   /* between a page's title and its panels, and between panels */
  --pad-panel: clamp(18px, 1.7vw, 28px);  /* inside a panel */
  /* the panel material: dark oxblood-black stone glass with a warm hairline and a lit top edge */
  --surface: linear-gradient(180deg, rgba(15, 10, 11, .9), rgba(6, 4, 5, .88));
  --surface-solid: linear-gradient(180deg, rgba(19, 13, 14, .98), rgba(8, 6, 7, .98));
  --surface-sunk: rgba(0, 0, 0, .34);
  --edge: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 238, 214, .07);
  --edge-hi: inset 0 0 0 1px var(--line-hi), inset 0 1px 0 rgba(255, 238, 214, .08);
  --shadow-1: 0 16px 40px rgba(0, 0, 0, .45);
  --shadow-2: 0 30px 80px rgba(0, 0, 0, .55);
  --shadow-3: 0 40px 120px rgba(0, 0, 0, .7);
  --focus: #f3d3a3;
  /* the one print pass (art bible: 1-1.5px mono grain, ~4% on scenes, ~2-3% on panels) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .045'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* aliases the live layer (app/live/live.css) expects */
  --cream-dim: var(--bone-2); --rule-hi: var(--bone-3); --ok: #7ee0a2; --ground: var(--black);
  --rainbow: linear-gradient(115deg, #ff5fa2, #ffb347 16%, #fff36b 30%, #6dffb0 46%, #5fd2ff 62%, #9b7bff 78%, #ff5fa2);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--bone); }
body { font: 500 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---------- world ---------- */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
body.gl-ready .stage canvas { opacity: 1; }
body.no-gl .stage { background: url("assets/art/hall-atlas.webp") 62% 40% / cover; }
.stage-shade { position: absolute; inset: 0; pointer-events: none; transition: background 1s var(--ease);
  background: linear-gradient(90deg, rgba(7, 5, 6, .92) 0%, rgba(7, 5, 6, .6) 32%, transparent 58%); }
body[data-screen="desk"] .stage-shade { background:
  linear-gradient(90deg, rgba(7, 5, 6, .82) 0%, rgba(7, 5, 6, .35) 16%, transparent 30%),
  linear-gradient(180deg, transparent 52%, rgba(7, 5, 6, .7) 68%, rgba(7, 5, 6, .94) 86%); }
/* Artists and Stats are reading pages: the scene steps back so the page title, notes and controls never sit on the
   bright globe (the text test at 1440 and 1024 failed there) */
body[data-screen="desk"]:is([data-view="artists"], [data-view="stats"], [data-view="profile"]) .stage-shade { background:
  linear-gradient(90deg, rgba(7, 5, 6, .82) 0%, rgba(7, 5, 6, .35) 16%, transparent 30%),
  linear-gradient(180deg, rgba(7, 5, 6, .62) 0%, rgba(7, 5, 6, .5) 30%, rgba(7, 5, 6, .66) 62%, rgba(7, 5, 6, .94) 90%); }

/* ---------- buttons: one family, three weights ----------
   red   = the one main action on a screen: an engraved oxblood plate (same material as the title screen's Enter)
   bone  = confirm / done
   ghost = everything secondary.  All share one radius, height, press and focus. */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px;
  border-radius: var(--r-md); border: 0; font: 600 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) ease, filter var(--dur-fast) ease, box-shadow var(--dur) ease; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-red { background: linear-gradient(160deg, #b2272d, #7c1720 62%, #571019); color: #fff3e4;
  box-shadow: inset 0 0 0 1px rgba(214, 140, 118, .7), inset 0 1px 0 rgba(255, 226, 187, .32), 0 10px 28px rgba(60, 0, 8, .45); }
.btn-red::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(223, 173, 128, .26); border-radius: calc(var(--r-md) - 4px); pointer-events: none; }
.btn-bone { background: linear-gradient(180deg, #f4ede2, #e3d9ca); color: var(--black); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 22px rgba(0, 0, 0, .35); }
.btn-ghost { background: rgba(236, 228, 216, .05); color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-hi); }
@media (hover: hover) and (pointer: fine) {
  .btn-red:hover, .btn-bone:hover { filter: brightness(1.1); }
  .btn-ghost:hover { background-color: rgba(236, 228, 216, .1); }
}
/* a restrained foil glint that follows the mouse (stage.js sets --bx) */
.btn-red::after, .btn-bone::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: soft-light; transition: opacity var(--dur) ease;
  background: var(--rainbow); background-size: 300% 100%; background-position: calc(100% - var(--bx, 50%)) 0; }
.btn-red:hover::after, .btn-bone:hover::after { opacity: .28; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: default; filter: saturate(.4); }
.btn:disabled:active { transform: none; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--bone-2);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease); }
.icon-btn:hover { color: #fff; background: rgba(236, 228, 216, .08); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { color: #fff; }

/* ---------- title screen ---------- */
.intro { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 7vw; gap: 10px; }
.wordmark { margin: 0; font: 400 clamp(96px, 13vw, 200px)/.88 var(--serif); letter-spacing: .1em; color: #fff; animation: rise 1.4s .2s var(--ease) both; }
.intro-sub { margin: 0; font: 600 16px/1.3 var(--sans); letter-spacing: .42em; text-transform: uppercase; color: var(--bone); animation: rise 1.2s .45s var(--ease) both; }
.intro-line { margin: 26px 0 18px; font: 400 22px/1.3 var(--serif); color: var(--bone-2); animation: rise 1.2s .6s var(--ease) both; }
.intro .btn { min-width: 200px; animation: rise 1.2s .75s var(--ease) backwards; }
.intro-hint { margin: 6px 0 0; font-size: 14px; letter-spacing: .1em; color: var(--bone-3); animation: rise 1s 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.intro.leaving { animation: leave .8s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(-30px); filter: blur(10px); } }

/* ---------- the desk ---------- */
.desk { position: fixed; inset: 0; z-index: 5; display: grid; grid-template-columns: clamp(190px, 14vw, 250px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.desk.entering .side, .desk.entering .top { animation: rise .9s .05s var(--ease) both; }
.desk.entering .panel { animation: rise 1s .2s var(--ease) both; }
.side { grid-row: 1 / -1; display: flex; flex-direction: column; padding: 34px 0 34px clamp(24px, 2.4vw, 46px); }
.brand b { display: block; font: 400 clamp(64px, 5.8vw, 104px)/.86 var(--serif); letter-spacing: .06em; color: #fff; }
.brand span { display: block; margin-top: 14px; font: 600 11px/1.2 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--bone); }
.nav { display: grid; gap: 4px; margin-top: 18vh; }
.nav button { position: relative; text-align: left; padding: 9px 0 9px 20px; border: 0; background: none; font: 600 13px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--bone-3); transition: color .2s; }
.nav button:hover { color: var(--bone); }
.nav button[aria-current="true"] { color: #fff; }
.nav button[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); }

.top { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 30px clamp(24px, 2.6vw, 48px) 10px; }
.who-am-i { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--bone-2); }
.who-am-i:empty { display: none; }

.stagebox { grid-column: 2; min-height: 0; display: grid; place-items: center; padding: 6px clamp(20px, 2.6vw, 48px); }
.panel { width: min(1000px, 100%); max-height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); padding: clamp(16px, 1.6vw, 24px);
  background: var(--grain) 0 0 / 160px, var(--surface); box-shadow: var(--edge), var(--shadow-2); border-radius: var(--r-lg);
  /* no backdrop blur (#78): the panel is ~90% opaque, so the blur barely showed, but it had to be redone every frame over
     the moving scene. isolation + position keep the stacking and positioning the blur used to give */
  position: relative; isolation: isolate; }
.pcard { height: clamp(300px, 46vh, 460px); aspect-ratio: 1024 / 1536; cursor: zoom-in; }
.pcard .tc { height: 100%; }
.pinfo { display: flex; flex-direction: column; min-width: 0; padding: 10px 8px 4px 0; }
.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.phead h2 { margin: 0; font: 400 clamp(40px, 4.2vw, 72px)/1.02 var(--serif); color: #fff; overflow-wrap: anywhere; }
.fav { flex: none; margin-top: 6px; }
.fav svg { width: 22px; height: 22px; }
.fav[aria-pressed="true"] svg { fill: var(--bone); }
.pmeta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; font: 600 16px/1.2 var(--sans); letter-spacing: .02em; color: var(--bone); }
.pmeta a { color: inherit; text-decoration: none; } .pmeta a:hover { text-decoration: underline; }
.pmeta .fol { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.pmeta .fol b { font-size: 15px; color: #fff; }
.psub { margin-top: 8px; font: 500 16px/1.3 var(--sans); color: var(--bone); letter-spacing: .02em; }
.psub .tierword { color: var(--c); font-weight: 700; }
.prule { height: 1px; background: var(--line-hi); margin: 22px 0 20px; }
.pmsg-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 12px; }
.pmsg-head > span { margin-right: auto; } /* the label left, its two links together on the right */
.pmsg-head span { font: 500 16px/1 var(--serif); letter-spacing: .34em; text-transform: uppercase; color: var(--bone); }
.textlink { border: 0; background: none; padding: 0; font: 600 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--bone-3); text-underline-offset: 4px; transition: color var(--dur-fast) ease; }
.textlink:hover { color: #fff; text-decoration: underline; text-decoration-color: rgba(236, 228, 216, .4); }
.msgbox { position: relative; }
.msgbox textarea { display: block; width: 100%; min-height: 84px; max-height: 160px; resize: none; padding: 15px 18px 22px; border-radius: var(--r-md); border: 0;
  box-shadow: inset 0 0 0 1px var(--line-hi); background: var(--surface-sunk); font: 500 16px/1.6 var(--sans); color: var(--bone); field-sizing: content; transition: box-shadow var(--dur-fast) ease; }
.msgbox textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--focus), 0 0 0 3px rgba(243, 211, 163, .14); }
.msgbox .count { position: absolute; right: 14px; bottom: 8px; font-size: 12.5px; color: var(--bone-3); letter-spacing: .06em; }
.why { margin: 12px 0 0; display: grid; gap: 6px; font-size: 15px; color: var(--bone-2); }
.why b { color: var(--bone); font-weight: 600; }
.pacts { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.pacts .btn { flex: 1; }
.pnote { margin: 10px 0 0; font-size: 14px; color: var(--t-titan); }
.pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; font-size: 14px; color: var(--bone-3); letter-spacing: .06em; }
.pfoot .pager { display: flex; align-items: center; gap: 4px; }
.pfoot .pager span { margin-right: 8px; }

/* ---------- the trading card (cards.js) ---------- */
.tc { --ink: #efe4d2; --tierink: #d8d0c6; --glowc: rgba(220, 210, 200, .18); position: relative; aspect-ratio: 1024 / 1536; container-type: inline-size; border-radius: 3.6cqw; overflow: hidden;
  background: #000 var(--tpl) center / 100% 100% no-repeat; box-shadow: 0 2cqw 7cqw rgba(0, 0, 0, .65), 0 0 6cqw var(--glowc);
  transform: perspective(1200px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .5s var(--ease), box-shadow .4s; }
.tc:hover { transition: transform .12s linear, box-shadow .4s; }
.tc.titan { --ink: #f6e3b0; --tierink: #f3cf7c; --glowc: rgba(255, 196, 80, .38); }
.tc.demigod { --tierink: #dcbcff; --glowc: rgba(170, 110, 255, .32); }
.tc.oracle { --tierink: #b0d2ff; --glowc: rgba(90, 150, 255, .28); }
.tc.hero { --tierink: #a8e6c2; --glowc: rgba(80, 210, 140, .24); }
.tc-portrait { position: absolute; inset: 0; clip-path: url(#archClip); background-repeat: no-repeat; background-size: 74% auto; background-position: 50% 42%;
  mix-blend-mode: screen; filter: contrast(1.18) brightness(1.06); }
.tc-portrait::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, transparent 0 .25cqw, rgba(0, 0, 0, .55) .45cqw); background-size: .9cqw .9cqw; mix-blend-mode: multiply; opacity: .6; }
.tc-name { position: absolute; left: 11%; right: 11%; top: 70.8%; height: 6%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; line-height: 1; letter-spacing: .02em;
  color: var(--ink); white-space: nowrap; text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .7); }
.tc-tier { position: absolute; left: 32%; right: 32%; top: 78.4%; height: 2.8%; display: grid; place-items: center; font: 500 3.5cqw/1 var(--serif); letter-spacing: .42em; padding-left: .42em; color: var(--tierink);
  text-shadow: 0 0 2cqw color-mix(in srgb, var(--tierink) 50%, transparent); }
.tc-stat { position: absolute; top: 87%; height: 4.6%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--ink);
  font: 600 1.75cqw/1.15 var(--sans); letter-spacing: .1em; overflow: hidden; }
.tc-stat span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-stat .handle { letter-spacing: .04em; font-size: 1.7cqw; }
.tc-stat b { font: 600 3cqw/1 var(--serif); color: var(--ink); }
.tc-stat.s1 { left: 11.5%; width: 17.4%; } .tc-stat.s1 span { font-size: 1.5cqw; letter-spacing: .14em; margin-top: .4cqw; }
.tc-stat.s2 { left: 30.7%; width: 18.5%; } .tc-stat.s3 { left: 50.6%; width: 18.5%; } .tc-stat.s4 { left: 70.5%; width: 18.5%; }
.tc-num { position: absolute; left: 44%; right: 44%; top: 92.5%; height: 2.4%; display: grid; place-items: center; font: 600 1.5cqw/1 var(--sans); letter-spacing: .35em; padding-left: .35em; color: var(--bone-2); }
/* holo: a rainbow foil on the frame that follows the pointer, and a pearl sheen across the card */
.tc-holo { position: absolute; inset: 0; border-radius: inherit; padding: 6.6%; pointer-events: none; opacity: .32; mix-blend-mode: color-dodge; transition: opacity .35s;
  background: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, .7), transparent 32%), var(--rainbow);
  background-size: 100% 100%, 260% 260%; background-position: 0 0, var(--bx, 30%) var(--by, 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tc.titan .tc-holo { opacity: .5; } .tc.demigod .tc-holo { opacity: .45; }
.tc:hover .tc-holo { opacity: .85; }
.tc-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .35s;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 200, 225, .7) 42%, rgba(255, 240, 190, .75) 50%, rgba(190, 245, 235, .7) 58%, transparent 70%);
  background-size: 300% 100%; background-position: calc(100% - var(--bx, 50%)) 0; }
.tc:hover .tc-sheen { opacity: .9; }
.tc.titan .tc-sheen, .tc.demigod .tc-sheen { opacity: .5; animation: sheen 6s ease-in-out infinite; }
.tc.titan:hover .tc-sheen, .tc.demigod:hover .tc-sheen { animation: none; opacity: 1; }
@keyframes sheen { 0%, 45% { background-position: 110% 0; } 100% { background-position: -10% 0; } }

/* the pack and the card back */
.pack-face { position: relative; aspect-ratio: 1024 / 1536; container-type: inline-size; border-radius: 3cqw; overflow: hidden;
  background: #000 var(--tpl-holo) center / 100% 100% no-repeat; box-shadow: 0 3cqw 9cqw rgba(0, 0, 0, .7), 0 0 8cqw rgba(200, 30, 40, .35); }
.pack-face::before { content: ""; position: absolute; inset: 0; clip-path: url(#archClip); background: url("assets/art/hall-atlas.webp") 64% 30% / auto 72% no-repeat; filter: contrast(1.1); }
.pack-face .pf-title { position: absolute; left: 11%; right: 11%; top: 70.8%; height: 6%; display: grid; place-items: center; font: 600 8cqw/1 var(--serif); letter-spacing: .08em; color: #f2e7d6; }
.pack-face .pf-sub { position: absolute; left: 30%; right: 30%; top: 78.4%; height: 2.8%; display: grid; place-items: center; font: 500 3.2cqw/1 var(--serif); letter-spacing: .4em; padding-left: .4em; color: #d8cfc4; white-space: nowrap; }
.pack-face .pf-count { position: absolute; left: 11%; right: 11%; top: 87%; height: 4.6%; display: grid; place-items: center; font: 600 2cqw/1 var(--sans); letter-spacing: .3em; color: #d8cfc4; }
.pack-face .tc-holo { opacity: .55; } .pack-face:hover .tc-holo { opacity: .9; }
.pack { position: relative; display: block; height: 100%; aspect-ratio: 1024 / 1536; border: 0; padding: 0; background: none; cursor: pointer; animation: float 6s ease-in-out infinite;
  transform: perspective(1200px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .5s var(--ease); }
.pack .pack-face { height: 100%; }
.pack::before, .pack::after { content: ""; position: absolute; left: 4%; right: 4%; height: 10px; z-index: 2;
  background: repeating-linear-gradient(90deg, rgba(236, 228, 216, .45) 0 1.5px, transparent 1.5px 5px), linear-gradient(#3a3033, #151012);
  -webkit-mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 0 / 8px 100% repeat-x; mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 0 / 8px 100% repeat-x; }
.pack::before { top: -6px; } .pack::after { bottom: -6px; transform: scaleY(-1); }
@keyframes float { 50% { translate: 0 -8px; } }
.tiers-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tiers-legend span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; font: 600 13px/1 var(--sans); letter-spacing: .08em; color: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.tiers-legend span::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 8px var(--c); }
.pinfo p.lead-in { margin: 0; font-size: 17px; line-height: 1.55; color: var(--bone); max-width: 34em; }

/* ---------- inspect ---------- */
.inspect { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(4, 3, 4, .78); backdrop-filter: blur(6px); animation: fade .3s var(--ease); cursor: zoom-out; }
.inspect .tc { height: min(86vh, 900px); animation: pop .5s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: perspective(1200px) translateY(30px) scale(.9) rotateX(10deg); } }

/* ---------- pack opening ---------- */
.opening { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; padding: 18px 16px 24px;
  background: radial-gradient(70% 60% at 50% 45%, rgba(50, 8, 12, .55), rgba(4, 3, 4, .92)); backdrop-filter: blur(4px); animation: fade .5s var(--ease); }
.opening-top { width: min(1100px, 100%); display: flex; justify-content: space-between; align-items: center; min-height: 54px; }
.opening-top p { margin: 0; font: 400 22px/1 var(--serif); color: var(--bone); }
.opening-stage { position: relative; width: 100%; display: grid; place-items: center; perspective: 1400px; }
.opening-hint { margin: 0; text-align: center; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-2); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.tear-pack { --tear: 0; position: relative; height: min(64vh, 640px); aspect-ratio: 1024 / 1536; cursor: pointer; animation: packIn .9s var(--ease) both; }
@keyframes packIn { from { opacity: 0; transform: translateY(60px) scale(.86); } }
.tear-pack .pack-body { position: absolute; inset: 0; transition: transform .9s var(--ease), opacity .9s; }
.tear-pack .pack-strip { position: absolute; left: 0; right: 0; top: -2px; height: 12%; z-index: 6; display: grid; place-items: center; cursor: ew-resize; touch-action: none; border-radius: 10px 10px 0 0;
  background: linear-gradient(#2c2427, #120d0f); box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .25), 0 6px 18px rgba(0, 0, 0, .5);
  transform: rotate(calc(var(--tear) * -7deg)) translateY(calc(var(--tear) * -12px)); transform-origin: 0 100%; transition: transform .25s var(--ease), opacity .6s; }
.tear-pack .pack-strip span { font: 600 13px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--bone-2); }
.tear-line { position: absolute; left: 0; bottom: -1px; height: 3px; width: calc(var(--tear) * 100%); background: linear-gradient(90deg, rgba(255, 255, 255, .3), #fff); box-shadow: 0 0 14px #fff, 0 0 30px rgba(255, 210, 220, .9); }
.tear-pack.shake { animation: shake .4s ease-in-out; }
@keyframes shake { 20% { translate: -6px 0; rotate: -2deg; } 40% { translate: 6px 0; rotate: 2deg; } 60% { translate: -3px 0; } 80% { translate: 3px 0; } }
.tear-pack.torn .pack-strip { transform: translate(170px, -190px) rotate(34deg); opacity: 0; transition: transform .7s var(--ease), opacity .7s; }
.tear-pack.torn .pack-body { transform: translateY(70vh) rotate(5deg); opacity: 0; }
.tear-pack.gone { display: none; }
.reveal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.big-card { position: absolute; height: min(64vh, 640px); aspect-ratio: 1024 / 1536; cursor: pointer; pointer-events: auto; transform-style: preserve-3d; transition: transform .75s var(--ease), opacity .5s; }
.big-card.stacked { transform: translateY(calc(var(--i) * -3px)) translateX(calc(var(--i) * 1px)); }
.big-card.rising { animation: riseCard .7s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes riseCard { from { transform: translateY(40vh) scale(.6); opacity: 0; } }
.big-card .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.big-card .face .tc, .big-card .face .pack-face { height: 100%; }
.big-card .front { transform: rotateY(180deg); }
.big-card .front .tc { transform: none; }
.big-card.flipped { transform: rotateY(180deg) scale(1.03); }
.big-card.away { transform: translate(0, 45vh) rotateY(180deg) scale(.2); opacity: 0; }
.big-card.charging .back .pack-face { animation: charge var(--charge, .6s) ease-in forwards; }
.big-card.charge-demigod.charging, .big-card.charge-titan.charging { animation: rumble .09s linear infinite; }
@keyframes charge { to { box-shadow: 0 0 0 3px var(--c), 0 0 60px var(--c), 0 0 160px color-mix(in srgb, var(--c) 60%, transparent); } }
@keyframes rumble { 25% { translate: -2px 1px; } 50% { translate: 2px -1px; } 75% { translate: -1px -1px; } }
.burst { position: absolute; width: 10px; height: 10px; left: 50%; top: 50%; pointer-events: none; }
.burst i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); animation: spark 1s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.rays { position: absolute; left: 50%; top: 50%; width: 1000px; height: 1000px; margin: -500px; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 40%, transparent) 0 5deg, transparent 5deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 62%); mask: radial-gradient(circle, #000 10%, transparent 62%); animation: rays 2.4s var(--ease) forwards; }
@keyframes rays { from { opacity: 0; transform: rotate(0) scale(.4); } 25% { opacity: 1; } to { opacity: 0; transform: rotate(40deg) scale(1.1); } }
.flash-screen { position: fixed; inset: 0; z-index: 45; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff), transparent 70%); animation: flashOut .9s ease-out forwards; }
@keyframes flashOut { from { opacity: .8; } to { opacity: 0; } }
.pulled { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 52px; max-width: 900px; margin-top: 10px; }
.pulled span { width: 34px; height: 51px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--c), 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); animation: pop .4s var(--ease); background: #0d0a0b center 22% / cover; }
.opening-done { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 16px; animation: fade .6s var(--ease); }
.opening-done h2 { margin: 0; font: 400 clamp(40px, 5vw, 64px)/1.05 var(--serif); color: #fff; }
.opening-done p { margin: 0 0 8px; color: var(--bone-2); font-size: 17px; letter-spacing: .06em; }

/* ---------- sheets, toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 3, 4, .72); backdrop-filter: blur(6px); animation: fade var(--dur) ease-out; }
.sheet-box { width: min(640px, 100%); display: grid; gap: 14px; padding: 30px; border-radius: var(--r-lg); background: var(--grain) 0 0 / 160px, var(--surface-solid); box-shadow: var(--edge-hi), var(--shadow-3); animation: sheet-in var(--dur) var(--ease) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.sheet-box h2 { margin: 0; font: 400 34px/1.1 var(--serif); color: #fff; }
.sheet-box p { margin: 0; color: var(--bone-2); }
.sheet-box textarea { width: 100%; min-height: 180px; padding: 14px; border-radius: var(--r-md); border: 0; box-shadow: inset 0 0 0 1px var(--line-hi); background: rgba(0, 0, 0, .35); font: 500 15px/1.5 var(--sans); resize: vertical; }
.sheet-box .acts { display: flex; gap: 10px; justify-content: flex-end; }
.err { color: #ffb4b4; font-weight: 600; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; flex-wrap: wrap; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--line); }
.seg button, .toggle { padding: 8px 14px; border-radius: calc(var(--r-md) - 2px); border: 0; background: transparent; font-weight: 600; font-size: 15px; color: var(--bone-2); transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.seg button[aria-pressed="true"], .toggle[aria-pressed="true"] { background: var(--bone); color: var(--black); }
.toggle { box-shadow: inset 0 0 0 1px var(--line-hi); min-width: 64px; }
.toast { position: fixed; left: 50%; top: 26px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100vw - 32px)); padding: 13px 22px; border-radius: var(--r-md); background: linear-gradient(180deg, #f4ede2, #e3d9ca); color: var(--black); font-weight: 600; font-size: 15.5px; line-height: 1.4; letter-spacing: .01em; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--shadow-1); animation: toast-in var(--dur) var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ---------- smaller screens ---------- */
@media (max-height: 800px) { .side { padding-top: 24px; } .nav { margin-top: 10vh; } .pcard { height: clamp(280px, 44vh, 400px); } .phead h2 { font-size: clamp(36px, 3.6vw, 60px); } .prule { margin: 14px 0 12px; } }
@media (max-width: 860px) {
  body { overflow-y: auto; }
  .desk { position: relative; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; }
  .side { grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 16px; }
  .brand b { font-size: 46px; } .brand span { display: none; }
  .nav { margin: 0; display: flex; flex-wrap: wrap; gap: 0 10px; } .nav button { padding: 6px 0 6px 10px; font-size: 11px; }
  .top, .stagebox { grid-column: 1; }
  .panel { grid-template-columns: 1fr; justify-items: center; }
  .pinfo { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* tuning after the first look */
.tc-holo { mix-blend-mode: overlay; opacity: .3; }
.tc.titan .tc-holo { opacity: .45; } .tc.demigod .tc-holo { opacity: .4; }
.tc:hover .tc-holo { opacity: .75; }
.pack-face .tc-holo { opacity: .35; } .pack-face:hover .tc-holo { opacity: .7; }
.who-am-i .jl-status { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-3); }
.who-am-i i { font-style: normal; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 700 13px/1 var(--sans); }
.tc-portrait { background-size: 82% auto; background-position: 50% 46%; filter: contrast(1.35) brightness(1.04) sepia(.22); }
/* the arch interior glows in the card's colour, like the reference cards (sun rays on the gold one) */
.tc-arch { position: absolute; inset: 0; clip-path: url(#archClip); mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(42% 30% at 50% 44%, var(--archc, rgba(150, 20, 28, .55)), transparent 72%); }
.tc.titan .tc-arch { --archc: rgba(190, 30, 20, .75);
  background: radial-gradient(42% 30% at 50% 44%, var(--archc), transparent 72%),
    repeating-conic-gradient(from 0deg at 50% 44%, rgba(255, 190, 90, .22) 0 1.2deg, transparent 1.2deg 6deg);
  -webkit-mask: radial-gradient(60% 45% at 50% 44%, #000 30%, transparent 75%); mask: radial-gradient(60% 45% at 50% 44%, #000 30%, transparent 75%); }
.tc.demigod .tc-arch { --archc: rgba(150, 60, 230, .6); }
.tc.oracle .tc-arch { --archc: rgba(40, 90, 220, .6); }
.tc.hero .tc-arch { --archc: rgba(30, 150, 90, .55); }

/* ---------- simpler: two places, Today and Binders (Dodd, 2026-10-23) ---------- */
.desk { grid-template-rows: auto minmax(0, 1fr); }
.stagebox { grid-row: 2; padding-bottom: clamp(18px, 4vh, 44px); }
.nav { gap: 2px; }
.nav > button { font-size: 14px; color: var(--bone-2); }
.subnav { display: grid; gap: 0; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1px solid var(--line-hi); }
.subnav button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; padding: 7px 0; border: 0; background: none; text-align: left;
  font: 600 14.5px/1.2 var(--sans); letter-spacing: .04em; color: var(--bone-2); transition: color .2s; }
.subnav button em { font-style: normal; font-size: 13.5px; color: var(--bone-3); }
.subnav button:hover, .subnav button[aria-current="true"] { color: #fff; }
.subnav button[aria-current="true"] em { color: var(--red-hi); }
@media (max-width: 860px) {
  .subnav { margin: 0; padding: 0; border: 0; display: flex; gap: 12px; } .subnav button { width: auto; padding: 6px 0; font-size: 13px; }
}

/* ---------- readable text everywhere: bigger small text, brighter greys, a soft shadow over the scenes ---------- */
:root { --bone-2: #cfc6bb; --bone-3: #a39a90; }
.side, .top, .intro { text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 18px rgba(0, 0, 0, .6); }
.brand span { font-size: 12px; color: var(--bone); }
.nav > button { padding-top: 10px; padding-bottom: 10px; }
.who-am-i { gap: 10px; }
.who-am-i .jl-status { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(7, 5, 6, .72); box-shadow: inset 0 0 0 1px var(--line-hi);
  font: 600 14px/1 var(--sans); letter-spacing: .06em; text-transform: none; color: var(--bone); text-shadow: none; backdrop-filter: blur(6px); }
.who-am-i .jl-status::before { background: var(--bone-3); }
.who-am-i .jl-status[data-on="1"]::before { background: #7ee0a2; box-shadow: 0 0 10px #7ee0a2; }
.pmeta .fol { font-size: 14px; }
.pfoot, .pfoot .pager span { font-size: 15px; color: var(--bone-2); }
.textlink { font-size: 13.5px; color: var(--bone-2); }
.msgbox .count { font-size: 13px; color: var(--bone-3); }
.intro-hint { color: var(--bone-2); font-size: 15px; }
.tiers-legend span { font-size: 13.5px; }
.brand span { white-space: nowrap; letter-spacing: .26em; font-size: 11.5px; }
.nav button[aria-current="true"] { color: #fff; }
.subnav button[aria-current="true"] { color: #fff; }
.btn, .btn *, .who-am-i *, .chip-btn { text-shadow: none; }
.intro-hint { text-shadow: 0 1px 3px #000; }

/* ---------- #167 Mythic, the red tier above Titan (under 250 followers): the old portrait card style ----------
   INTERIM: it wears the gold portrait template (cards.js names) with red ink, glow and arch light until Codex paints a red one. */
.tc.mythic { --ink: #ffe1dc; --tierink: #ff6b78; --glowc: rgba(255, 30, 50, .5); }
.tc.mythic .tc-holo { opacity: .55; }
.tc.mythic .tc-sheen { opacity: .55; animation: sheen 5s ease-in-out infinite; }
.tc.mythic:hover .tc-sheen { animation: none; opacity: 1; }
.tc.mythic .tc-arch { --archc: rgba(230, 20, 40, .8);
  background: radial-gradient(42% 30% at 50% 44%, var(--archc), transparent 72%),
    repeating-conic-gradient(from 0deg at 50% 44%, rgba(255, 90, 90, .24) 0 1.2deg, transparent 1.2deg 6deg);
  -webkit-mask: radial-gradient(60% 45% at 50% 44%, #000 30%, transparent 75%); mask: radial-gradient(60% 45% at 50% 44%, #000 30%, transparent 75%); }
/* the artist panel's and the dossier's Bounty (bounty.js: messaging them earns Pass.CONFIG.xp.bountyDM) */
/* the same turning rainbow as the card (cards-mtg.css --bh); on the dossier's bone the words stay dark over a rainbow rule */
.ap-bounty { color: hsl(var(--bh, 0deg) 100% 70%); font-weight: 700; letter-spacing: .04em; animation: bounty-hue 1.6s linear infinite; }
.card-back .cb-bounty dd { color: #2b1e15; font-weight: 700; padding-bottom: .12em;
  background: linear-gradient(90deg, #ff3b4a, #ffb020, #e6d22a, #2fcf6a, #22b8d6, #4a6bff, #a64bff) 0 100% / 100% .14em no-repeat; }
@media (prefers-reduced-motion: reduce) { .ap-bounty { animation: none; } }
