/* rohin.me - page 10, Chazki (js/scenes/chazki.js, js/chazki-demo.js, js/chazki-views.js).
   One screen. Wide screens: the chooser and the way in | the phone. Phones: the chooser (a grid of equal pictures),
   the phone (it takes the room and scrolls inside itself), then the film and the way in in their own row. Nothing lies
   over anything; every tile does something when pressed (11-16: the More panel of pictures is gone).
   Everything outside the phone uses the site's tokens. INSIDE the phone (.cz-screen) the colours are Chazki's own and stay the same in every colour version, light and dark: they
   are pictures of a product, like a photograph. */

.cz { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(17rem, .9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr); gap: var(--s-4) var(--s-7); align-items: center; }
.cz-side { display: grid; gap: var(--s-4); align-content: center; min-width: 0; max-width: 31rem; }

/* the chooser: a picture and a word or two; the one in the phone is marked */
.cz-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: var(--s-2); min-width: 0; }
.cz-thing { display: grid; justify-items: center; align-content: center; gap: .3rem; min-height: 4.75rem; min-width: 0; padding: .55rem .3rem .5rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); font-size: var(--t-tiny); font-weight: 500; line-height: 1.2; text-align: center; transition: border-color var(--fast), background var(--fast), color var(--fast), transform var(--fast) var(--ease); }
.cz-thing span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-short { display: none; }      /* the one word of the phone's small tiles */
.cz-thing:hover { border-color: var(--line-strong); color: var(--ink); }
.cz-thing:active { transform: scale(.97); }
.cz-thing[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.cz-pic { width: 3.5rem; height: 2.2rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cz-pic .q { opacity: .5; }
.cz-pic .a { stroke: var(--accent); }
.cz-pic .af { fill: var(--accent); stroke: none; }
.cz-pic .dot { fill: currentColor; stroke: none; }

/* small: the film and the way in */
.cz-ways { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cz-way { min-height: var(--tap); padding: 0 .9rem; gap: .4rem; font-size: var(--t-tiny); white-space: nowrap; }
.cz-way .ico { color: currentColor; }
.cz-film-btn { padding: 0 1.15rem 0 1rem; }      /* the first, filled button: the film explains the app best */
/* the reel's ▶ / pause, in the title row */
.cz-reel { width: var(--tap); min-height: var(--tap); padding: 0; justify-content: center; }
.cz-reel .ico { color: var(--accent); }
.cz-qr { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.cz-qr-code { flex: none; width: 4.75rem; height: 4.75rem; border-radius: var(--r-1); overflow: hidden; background: var(--paper); }
.cz-qr-code svg { width: 100%; height: 100%; }
.cz-qr-text { display: grid; gap: .1rem; min-width: 0; font-size: var(--t-tiny); color: var(--ink-2); }
.cz-qr-text b { color: var(--ink); font-weight: 600; }
.cz-qr-text span { overflow-wrap: break-word; }

/* the phone: its body follows the site; its screen is Chazki */
.cz-stage { height: 100%; min-height: 0; min-width: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; perspective: 1700px; }
.cz-phone { position: relative; min-width: 0; height: 100%; max-height: 54rem; aspect-ratio: 10 / 19.5; max-width: 100%; padding: 9px; border-radius: 2.9rem; background: var(--bg-sunk); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 0 var(--line-strong); transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease); }
/* a touch of depth, desktops only: the phone stands slightly turned and lies flat once the pointer is over it or it has been used */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .cz-phone { transform: rotateY(-12deg) rotateX(2.5deg) scale(.94); box-shadow: var(--shadow), 7px 1px 0 0 var(--line-strong); }      /* a little smaller: the near edge grows in perspective and must stay on the page */
  .cz-stage:hover .cz-phone, .cz-stage.is-flat .cz-phone, .still .cz-phone { transform: none; box-shadow: var(--shadow), 0 0 0 0 var(--line-strong); }
}

.cz-screen {
  /* Chazki's own colours (dark brown, gold), measured from the app. Not site tokens on purpose: see the top of this file. */
  --cz-bg: #1c1710; --cz-card: #2a241a; --cz-raise: #383226; --cz-line: #4d4535;
  --cz-ink: #f3ecdc; --cz-ink-2: #c6bba5; --cz-ink-3: #a79c86;
  --cz-gold: #d9a23f; --cz-gold-hi: #fccc4f; --cz-gold-ink: #221a08;
  --cz-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  height: 100%; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 2.4rem; background: var(--cz-bg); color: var(--cz-ink); color-scheme: dark;
  font-size: 14px; line-height: 1.4; text-align: left;
}
.cz-screen.is-easy { font-size: 17px; }
.cz-screen button { color: inherit; }
.cz-screen :focus-visible { outline-color: var(--cz-gold-hi); outline-offset: 2px; }
.cz-screen ::selection { background: color-mix(in srgb, var(--cz-gold) 40%, transparent); color: var(--cz-ink); }

/* title row: the channel, the word Demo, the two switches */
.cz-top { flex: none; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 10px 6px 16px; border-bottom: 1px solid var(--cz-line); background: var(--cz-card); }
.cz-name { display: grid; gap: 2px; min-width: 0; margin-right: auto; justify-items: start; }
.cz-name b { max-width: 100%; font: 700 15px/1.15 var(--cz-serif); font-variant: small-caps; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-demo { padding: 0 .6em; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cz-gold-hi) 60%, transparent); color: var(--cz-gold-hi); font-size: 11px; font-weight: 600; letter-spacing: .07em; line-height: 1.55; text-transform: uppercase; }
.cz-switches { flex: none; display: flex; gap: 6px; }
.cz-back { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; padding: 0 10px 0 6px; border-radius: 999px; color: var(--cz-ink-2); font-size: 12px; font-weight: 500; }
.has-view .cz-switches, .has-view .cz-chat, .has-view .cz-easybar, .has-view .cz-box { display: none; }
.cz-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--cz-line); background: var(--cz-raise); color: var(--cz-ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; transition: background var(--fast), border-color var(--fast), color var(--fast); }
.cz-switch i { order: -1; flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--cz-ink-3); }
.cz-switch[aria-checked="true"] { background: var(--cz-gold-hi); border-color: var(--cz-gold-hi); color: var(--cz-gold-ink); font-weight: 600; }
.cz-switch[aria-checked="true"] i { background: var(--cz-gold-ink); box-shadow: none; }

/* the chat: the newest at the bottom; it scrolls inside the phone */
/* touch-action: a scrolling box starts a new touch context, so it has to repeat the deck's pan-y for a sideways drag on the chat to reach the page swipe */
.cz-chat { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; padding: 12px 12px 14px; scrollbar-width: thin; scrollbar-color: var(--cz-line) transparent; }
.cz-chat:focus-visible { outline-offset: -3px; }
.cz-msgs { margin-top: auto; display: grid; gap: .95em; }
.cz-day { display: flex; align-items: center; gap: .8em; font-size: 12px; color: var(--cz-ink-3); }
.cz-day::before, .cz-day::after { content: ''; flex: 1; height: 1px; background: var(--cz-line); }
.cz-msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; }
.cz-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--p); color: var(--cz-bg); font-size: 12px; font-weight: 700; letter-spacing: -.01em; }
.is-easy .cz-av { width: 40px; height: 40px; font-size: 13px; }
.cz-body { min-width: 0; }
.cz-who { display: flex; align-items: baseline; gap: .55em; min-width: 0; }
.cz-who b { color: var(--p); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-who time { flex: none; font-size: .82em; color: var(--cz-ink-3); }
.cz-text { margin-top: .1em; overflow-wrap: anywhere; }
.cz-note { display: block; margin-top: .2em; font-size: .82em; color: var(--cz-ink-3); }
.cz-p-0 { --p: #c792ea; } .cz-p-1 { --p: #f08ab8; } .cz-p-2 { --p: #f0a04b; } .cz-p-3 { --p: #4fd1b0; } .cz-p-4 { --p: #63b3ed; } .cz-p-5 { --p: #68d391; } .cz-p-6 { --p: #e8c66a; } .cz-p-7 { --p: #f29f8d; } .cz-p-you { --p: var(--cz-gold-hi); }

/* a tool's card */
.cz-card { margin-top: .55em; display: grid; gap: .55em; padding: .75em .8em .8em; border-radius: .7em; border: 1px solid var(--cz-line); border-left: 3px solid var(--cz-gold); background: var(--cz-card); }
.cz-msg.is-new .cz-card { animation: cz-arrive 1.1s var(--ease) 1; }
@keyframes cz-arrive { 0% { opacity: .2; transform: translateY(8px); box-shadow: 0 0 0 2px var(--cz-gold-hi); } 35% { opacity: 1; transform: none; } 100% { box-shadow: 0 0 0 2px transparent; } }
.cz-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; }
.cz-card-title { font: 700 1.1em/1.2 var(--cz-serif); font-variant: small-caps; letter-spacing: .04em; }
.cz-kind { font-size: .82em; color: var(--cz-ink-3); }
.cz-sub { color: var(--cz-ink); }
.cz-foot { font-size: .86em; color: var(--cz-ink-2); }
.cz-big { font-size: 2.2em; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cz-opts { display: grid; gap: .4em; }
.cz-opt { position: relative; display: flex; align-items: center; gap: .6em; width: 100%; min-height: 44px; padding: .3em .8em; border-radius: .55em; border: 1px solid transparent; background: var(--cz-raise); text-align: left; overflow: hidden; transition: background var(--fast), border-color var(--fast); }
button.cz-opt:active { background: color-mix(in srgb, var(--cz-gold) 18%, var(--cz-raise)); }
.cz-opt-main { position: relative; display: grid; min-width: 0; margin-right: auto; }
.cz-opt-main b { font-weight: 500; }
.cz-opt-main small { font-size: .82em; color: var(--cz-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-n { position: relative; flex: none; color: var(--cz-ink-2); font-variant-numeric: tabular-nums; }
.cz-opt[aria-pressed="true"] { background: color-mix(in srgb, var(--cz-gold) 36%, var(--cz-raise)); border-color: var(--cz-gold); }
.cz-opt[aria-pressed="true"] small, .cz-opt[aria-pressed="true"] .cz-n { color: var(--cz-ink); }
.cz-opt.is-best { border-color: var(--cz-gold-hi); }
.cz-best { position: relative; flex: none; padding: .1em .65em; border-radius: 999px; background: var(--cz-gold-hi); color: var(--cz-gold-ink); font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cz-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--cz-gold) 24%, transparent); }
.cz-opt.is-taken { background: none; border-color: var(--cz-line); }
.cz-claim { position: relative; flex: none; padding: .25em .85em; border-radius: 999px; background: var(--cz-bg); font-size: .86em; font-weight: 600; }
.cz-opt[aria-pressed="true"] .cz-claim { background: var(--cz-gold-hi); color: var(--cz-gold-ink); }
.cz-rows { display: grid; gap: .3em; }
.cz-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; color: var(--cz-ink-2); }
.cz-row b { color: var(--cz-ink); font-weight: 500; text-align: right; }
.cz-count { font-variant-numeric: tabular-nums; }
.cz-row .cz-count { color: var(--cz-gold-hi); }
.cz-actions { display: flex; flex-wrap: wrap; gap: .5em; }
.cz-btn { min-height: 44px; padding: 0 1.1em; border-radius: .55em; background: var(--cz-raise); font-size: 1em; font-weight: 500; transition: transform var(--fast) var(--ease), background var(--fast); }
.cz-btn.is-gold { background: var(--cz-gold-hi); color: var(--cz-gold-ink); font-weight: 600; }
.cz-btn:active { transform: scale(.96); }

/* dice */
.cz-dice-top { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.cz-dice { display: flex; gap: .5em; }
.cz-die { width: 3em; height: 3em; padding: .5em; border-radius: .6em; background: var(--cz-ink); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 2px; }
.cz-die i { border-radius: 50%; }
.cz-die i.on { background: var(--cz-bg); }
.cz-dice.is-rolling .cz-die { animation: cz-roll .5s var(--ease) 1; }
.cz-dice.is-rolling .cz-die + .cz-die { animation-direction: reverse; animation-timing-function: var(--ease-in-out); }
@keyframes cz-roll { 0% { transform: rotate(-200deg) scale(.7); } 60% { transform: rotate(12deg) scale(1.05); } 100% { transform: none; } }

/* the wheel: the one part of the miniature that takes a drag (data-swipe="off"), so a page swipe cannot start on it */
.cz-wheel-row { display: grid; justify-items: center; gap: .6em; }
.cz-wheel { width: min(100%, 13.5em); aspect-ratio: 1; border-radius: 50%; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.cz-wheel:active { cursor: grabbing; }
.cz-wheel-svg { width: 100%; height: 100%; overflow: visible; }
.cz-wheel-disc { transform-origin: 100px 100px; }
.cz-slice { fill: var(--cz-raise); stroke: var(--cz-gold); stroke-width: 1.2; }
.cz-slice:nth-of-type(even) { fill: var(--cz-bg); }
.cz-slice.is-win { fill: var(--cz-gold-hi); }
.cz-slice-text { font-size: 13px; font-weight: 600; fill: var(--cz-ink); pointer-events: none; }
.cz-slice-text.is-win { fill: var(--cz-gold-ink); }
.cz-hub { fill: var(--cz-gold); stroke: var(--cz-bg); stroke-width: 2; }
.cz-pointer { fill: var(--cz-ink); stroke: var(--cz-bg); stroke-width: 1.5; }
.cz-wheel-read { display: grid; justify-items: center; gap: .15em; min-height: 3.6em; align-content: end; }

/* under the chat: the four large buttons of Easy Mode, the message box (both part of the picture) */
.cz-easybar { flex: none; display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px 12px 0; }
.is-easy .cz-easybar { display: grid; }
.cz-easybar span { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: .7rem; border: 1px solid var(--cz-line); background: var(--cz-raise); font-size: 12px; white-space: nowrap; }
.cz-box { flex: none; display: flex; align-items: center; gap: 10px; min-height: 42px; margin: 8px 12px 12px; padding: 0 14px; border-radius: .9rem; border: 1px solid var(--cz-line); background: var(--cz-card); color: var(--cz-ink-3); font-size: 14px; white-space: nowrap; overflow: hidden; }
.cz-box span { color: var(--cz-ink-3); }

/* a shared list: tick, name, claim */
.cz-item { padding: 0 .5em 0 0; gap: .35em; }
.cz-tick { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.cz-tick i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--cz-ink-3); position: relative; }
.cz-tick[aria-checked="true"] i { background: var(--cz-gold-hi); border-color: var(--cz-gold-hi); }
.cz-tick[aria-checked="true"] i::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid var(--cz-gold-ink); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.cz-item.is-done .cz-opt-main b { text-decoration: line-through; color: var(--cz-ink-2); }
.cz-item.is-mine { background: color-mix(in srgb, var(--cz-gold) 36%, var(--cz-raise)); border-color: var(--cz-gold); }
/* a 44px button that looks like the small pill it is in the app */
button.cz-claim { min-height: 44px; display: inline-flex; align-items: center; padding: 0 .85em; border-radius: 999px; background: linear-gradient(var(--cz-bg), var(--cz-bg)) center / 100% 1.9em no-repeat; }
button.cz-claim[aria-pressed="true"] { background-image: linear-gradient(var(--cz-gold-hi), var(--cz-gold-hi)); color: var(--cz-gold-ink); }

/* a video in the chat: a drawn clip (a ferry crossing); --t runs 0 to 1 */
.cz-card-bare { padding: 0; border: 0; background: none; }
.cz-clip { position: relative; --t: 0; border-radius: .8em; overflow: hidden; border: 1px solid var(--cz-line); background: var(--cz-card); }
.cz-clip-pic { display: block; width: 100%; aspect-ratio: 16 / 9; }
.cz-clip-sky { fill: #3b2f1f; } .cz-clip-sun { fill: var(--cz-gold-hi); transform: translateY(calc(var(--t) * -9px)); }
.cz-clip-hill { fill: #2a241a; } .cz-clip-sea { fill: #20303a; }
.cz-clip-boat { transform: translateX(calc(8px + var(--t) * 118px)); }
.cz-clip-hull { fill: var(--cz-ink); } .cz-clip-cabin { fill: none; stroke: var(--cz-ink); stroke-width: 1.6; stroke-linejoin: round; }
.cz-clip-wake { fill: none; stroke: var(--cz-ink-2); stroke-width: 1.2; stroke-linecap: round; opacity: calc(.15 + var(--t) * .7); }
.cz-clip-wave { fill: none; stroke: #48606c; stroke-width: 1.2; stroke-linecap: round; transform: translateX(calc(var(--t) * -10px)); }
.cz-clip-play { position: absolute; left: 50%; top: calc(50% - 22px); width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--cz-bg) 72%, transparent); border: 1px solid var(--cz-gold-hi); color: var(--cz-gold-hi) !important; }
.cz-clip-row { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 0; }
.cz-clip-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.cz-clip-time { flex: none; min-width: 2.6em; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--cz-ink-2); }
.cz-clip-bar { flex: 1; min-width: 0; height: 44px; margin: 0; background: none; -webkit-appearance: none; appearance: none; --p: 0%; cursor: pointer; }
.cz-clip-bar::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cz-gold-hi) var(--p), var(--cz-line) var(--p)); }
.cz-clip-bar::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cz-gold-hi) var(--p), var(--cz-line) var(--p)); }
.cz-clip-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--cz-gold-hi); border: 0; }
.cz-clip-bar::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--cz-gold-hi); border: 0; }

/* a view fills the phone under the title row and scrolls inside itself */
.cz-view { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; padding: 12px; scrollbar-width: thin; scrollbar-color: var(--cz-line) transparent; }
.cz-wide { width: 100%; }
.cz-btn[disabled] { opacity: .55; }

/* the card scanner: the camera over an invented card, then what it is one card away from */
.cz-scan { min-height: 100%; display: grid; }
.cz-scan-live { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; min-height: 0; }
.cz-cam { position: relative; min-height: 15em; display: grid; place-items: center; overflow: hidden; border-radius: .9em; border: 1px solid var(--cz-line); background: radial-gradient(120% 90% at 30% 20%, #4a3a27, #2b2116 60%, #1d1710); }
.cz-cam-card { position: relative; font-size: 15px; transform: rotate(-4deg); border-radius: 9px; box-shadow: 0 10px 22px -8px #000; }
.cz-cam-corners { position: absolute; inset: 12px; pointer-events: none; background:
  linear-gradient(var(--cz-ink), var(--cz-ink)) left top / 18px 2px, linear-gradient(var(--cz-ink), var(--cz-ink)) left top / 2px 18px,
  linear-gradient(var(--cz-ink), var(--cz-ink)) right top / 18px 2px, linear-gradient(var(--cz-ink), var(--cz-ink)) right top / 2px 18px,
  linear-gradient(var(--cz-ink), var(--cz-ink)) left bottom / 18px 2px, linear-gradient(var(--cz-ink), var(--cz-ink)) left bottom / 2px 18px,
  linear-gradient(var(--cz-ink), var(--cz-ink)) right bottom / 18px 2px, linear-gradient(var(--cz-ink), var(--cz-ink)) right bottom / 2px 18px; background-repeat: no-repeat; opacity: .7; }
.cz-scanline { position: absolute; left: -8px; right: -8px; top: 0; height: 3px; border-radius: 2px; background: #7fe08f; box-shadow: 0 0 12px 3px rgba(127, 224, 143, .55); opacity: 0; }
.is-scanning .cz-scanline { opacity: 1; animation: cz-scan 1.6s var(--ease-in-out) 1 both; }
@keyframes cz-scan { 0% { top: 0; } 50% { top: calc(100% - 3px); } 100% { top: 0; } }
.is-found .cz-cam-card { outline: 2px solid #7fe08f; outline-offset: 3px; }
.cz-found { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .5em; padding: .35em .9em .35em .6em; border-radius: 999px; background: color-mix(in srgb, var(--cz-bg) 86%, transparent); border: 1px solid #7fe08f; font-weight: 600; white-space: nowrap; }
.cz-found i, .cz-done i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #7fe08f; }
.cz-tcg { width: 10.6em; display: grid; gap: .3em; padding: .5em; border-radius: 9px; background: #efe6d2; color: #241c10; border: 1px solid #b9a880; font-size: inherit; line-height: 1.25; }
.cz-pair .cz-tcg { font-size: 12px; }
.cz-tcg-name { font: 700 1em/1.2 var(--cz-serif); }
.cz-tcg-art { display: block; width: 100%; border-radius: 4px; }
.cz-tcg-art .a0 { fill: #3a3022; } .cz-tcg-art .a1 { fill: #fccc4f; opacity: .35; } .cz-tcg-art .a2 { fill: #d9a23f; stroke: #241c10; stroke-width: 1.2; stroke-linejoin: round; }
.cz-tcg-art .a3 { fill: none; stroke: #241c10; stroke-width: 1.4; stroke-linecap: round; } .cz-tcg-art .a4 { fill: #efe6d2; }
.cz-tcg-kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.cz-tcg-rules { display: grid; gap: .25em; font-size: 12px; }
.cz-tcg.is-small { width: 6.6em; padding: .4em; }
.cz-result { display: grid; gap: .55em; align-content: start; }
.cz-done { display: flex; align-items: center; gap: .5em; font-size: .86em; color: var(--cz-ink-2); }
.cz-result-title { font-size: 1.35em; }
.cz-combo { display: grid; gap: .6em; padding: .75em .8em; border-radius: .7em; border: 1px solid var(--cz-line); background: var(--cz-card); }
.cz-pair { display: flex; gap: .8em; }
.cz-pair figure { margin: 0; display: grid; gap: .3em; justify-items: center; }
.cz-pair figcaption { font-size: .82em; color: var(--cz-ink-2); }
.cz-pair .is-need .cz-tcg { opacity: .78; outline: 1.5px dashed var(--cz-gold-hi); outline-offset: 2px; }
.cz-tag { justify-self: start; padding: .1em .7em; border-radius: 999px; border: 1px solid #7fe08f; color: #9be8a8; font-size: .82em; font-weight: 600; }
.cz-steps { margin: 0; padding-left: 1.3em; display: grid; gap: .3em; list-style: decimal; }

/* the fantasy market (League Exchange) */
.cz-mkt { display: grid; gap: 10px; align-content: start; }
.cz-mkt-me { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; padding: .6em .8em; border-radius: .7em; border: 1px solid var(--cz-line); border-left: 3px solid var(--cz-gold); background: var(--cz-card); }
.cz-mkt-me div { display: grid; min-width: 0; }
.cz-mkt-me small, .cz-val span, .cz-quote small { font-size: 11.5px; color: var(--cz-ink-2); }
.cz-mkt-me b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cz-chg { font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cz-chg.is-up, .is-up > polyline { color: #8fdc9c; stroke: #8fdc9c; }
.cz-chg.is-down, .is-down > polyline { color: #f0957f; stroke: #f0957f; }
.cz-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 999px; background: var(--cz-card); border: 1px solid var(--cz-line); }
.cz-seg button { min-height: 44px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--cz-ink-2); }
.cz-seg button[aria-pressed="true"] { background: var(--cz-raise); color: var(--cz-ink); }
.cz-mkt-body { display: grid; gap: 10px; }
.cz-stock { gap: .55em; padding: .3em .65em; min-height: 52px; }
.cz-sym { flex: none; min-width: 3.6em; padding: .2em .35em; border-radius: .4em; background: var(--cz-bg); color: var(--cz-gold-hi); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-align: center; }
.cz-spark-box { flex: none; width: 46px; }
.cz-spark, .cz-chart-line { display: block; width: 100%; fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; overflow: visible; }
.cz-spark { height: 20px; } .cz-spark polyline, .cz-chart-line polyline { vector-effect: non-scaling-stroke; }
.cz-val { flex: none; display: grid; justify-items: end; }
.cz-val b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cz-feed { display: grid; gap: .25em; font-size: .86em; color: var(--cz-ink-2); }
.cz-feed p { display: flex; justify-content: space-between; gap: 1em; }
.cz-feed b { color: var(--cz-ink); font-weight: 500; }
.cz-feed small { flex: none; font-size: 11.5px; color: var(--cz-ink-3); }
.cz-none { padding: 1.2em 0; text-align: center; }
.cz-leaders .cz-row { padding: .45em 0; border-bottom: 1px solid var(--cz-line); white-space: pre; }
.cz-leaders .is-me span, .cz-leaders .is-me b { color: var(--cz-gold-hi); }
.cz-ticket { display: grid; gap: 10px; padding: .75em .8em .8em; border-radius: .7em; border: 1px solid var(--cz-line); border-left: 3px solid var(--cz-gold); background: var(--cz-card); }
.cz-ticket-head { display: flex; align-items: center; gap: .55em; }
.cz-quote { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1em .6em; }
.cz-chart { height: 64px; padding: 2px 0; border-bottom: 1px solid var(--cz-line); }
.cz-chart-line { height: 100%; }
.cz-amts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cz-amts button { min-height: 44px; border-radius: .55em; background: var(--cz-raise); border: 1px solid transparent; font-weight: 500; font-variant-numeric: tabular-nums; }
.cz-amts button[aria-pressed="true"] { border-color: var(--cz-gold-hi); background: color-mix(in srgb, var(--cz-gold) 36%, var(--cz-raise)); }
.cz-amts button[disabled] { opacity: .4; }
.cz-own { display: grid; gap: 8px; }
.cz-own:empty { display: none; }

/* a chat import */
.cz-import-pick { display: grid; gap: 10px; align-content: start; }
/* 11-16: on a short screen the start button and Import stay in view: the camera and the file's lines give up room first */
.cz-scan:has(> .cz-scan-live:not([hidden])), .cz-import:has(> .cz-import-pick:not([hidden])) { height: 100%; min-height: 0; }
.cz-import-pick { height: 100%; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.cz-import-pick .cz-raw { min-height: 0; overflow: hidden; }
.cz-cam { min-height: 0; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.cz-cam-card { transform: rotate(-4deg) scale(var(--fit, 1)); }      /* --fit: set by the scanner when the camera is short */
@media (max-height: 600px) { .cz-import-pick .cz-raw { display: none; } }
.cz-file { display: flex; align-items: center; gap: .7em; padding: .7em .8em; border-radius: .7em; border: 1px dashed var(--cz-gold); background: var(--cz-card); color: var(--cz-gold-hi); }
.cz-file .cz-opt-main b { color: var(--cz-ink); }
.cz-raw { margin: 0; padding: .7em .8em; border-radius: .7em; background: #15110b; color: var(--cz-ink-2); font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.cz-import-chat { display: grid; gap: 12px; align-content: start; }
.cz-import-chat .cz-msg.is-new { animation: cz-in .32s var(--ease) 1 both; }
@keyframes cz-in { from { opacity: 0; transform: translateY(8px); } }

/* a Group Board (inside the phone): two groups, each with its own board; Add Widget, the catalog, Half or Wide, Add to Board */
.cz-board { display: grid; gap: 10px; align-content: start; }
.cz-seg-2 { grid-template-columns: repeat(2, 1fr); }
.cz-seg button[aria-pressed="true"] { background: var(--cz-raise); color: var(--cz-ink); }
.cz-board-main, .cz-board-cat { display: grid; gap: 10px; align-content: start; }
.cz-board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cz-board-empty { padding: 1.4em 0; text-align: center; color: var(--cz-ink-3); border: 1px dashed var(--cz-line); border-radius: .7em; }
.cz-w { display: grid; gap: 6px; align-content: start; min-width: 0; padding: .6em .7em .7em; border-radius: .7em; border: 1px solid var(--cz-line); background: var(--cz-card); }
.cz-w.is-wide { grid-column: 1 / -1; }
.cz-w.is-new { animation: cz-arrive 1.1s var(--ease) 1; }
.cz-w-title { font-size: 12px; font-weight: 600; color: var(--cz-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-w-count { display: grid; gap: 2px; } .cz-w-count b { font-size: 1.45em; font-weight: 500; color: var(--cz-gold-hi); font-variant-numeric: tabular-nums; line-height: 1.1; } .cz-w-count small { font-size: 12px; color: var(--cz-ink-2); }
.cz-w-list { display: grid; gap: 3px; font-size: 12.5px; } .cz-w-list p { display: flex; align-items: center; gap: 6px; } .cz-w-list i { flex: none; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--cz-ink-3); }
.cz-w-list .is-done i { background: var(--cz-gold-hi); border-color: var(--cz-gold-hi); } .cz-w-list .is-done { color: var(--cz-ink-3); text-decoration: line-through; }
.cz-w-rows { display: grid; gap: 3px; font-size: 12.5px; color: var(--cz-ink-2); } .cz-w-rows b { color: var(--cz-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.cz-w-note { font-size: 13px; }
.cz-w-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; } .cz-w-photos i { aspect-ratio: 1; border-radius: 4px; }
.cz-w-photos .ph0 { background: linear-gradient(160deg, #6b8fa3, #2f4652); } .cz-w-photos .ph1 { background: linear-gradient(160deg, #d9a23f, #7a4b1c); }
.cz-w-photos .ph2 { background: linear-gradient(160deg, #8fae6b, #3e5a2c); } .cz-w-photos .ph3 { background: linear-gradient(160deg, #c792ea, #5a3a73); }
.cz-w-hike { display: grid; gap: 4px; } .cz-w-hike svg { width: 100%; height: 30px; } .cz-w-hike path { fill: #3e5a2c; stroke: #8fae6b; stroke-width: 1.2; stroke-linejoin: round; } .cz-w-hike small { font-size: 12px; color: var(--cz-ink-2); }

/* a video call (inside the phone): the lobby with one button, then everyone at once */
.cz-call { min-height: 100%; display: grid; }
.cz-call-lobby { display: grid; gap: 12px; align-content: center; justify-items: center; text-align: center; }
.cz-call-faces { display: flex; gap: 6px; }
.cz-call-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--p); color: var(--cz-bg); font-size: 13px; font-weight: 700; }
.cz-call-live { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; min-height: 0; }
.cz-call-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--cz-ink-2); }
.cz-call-clock { color: #8fdc9c; font-weight: 600; font-variant-numeric: tabular-nums; }
.cz-call-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(4.5em, 1fr); gap: 6px; min-height: 0; }
.cz-call-tile { position: relative; display: grid; place-items: center; border-radius: .8em; overflow: hidden; background: radial-gradient(120% 100% at 50% 20%, color-mix(in srgb, var(--p) 34%, var(--cz-card)), var(--cz-bg)); border: 1px solid var(--cz-line); }
.cz-call-tile .cz-call-av { background: var(--p); }
.cz-call-tile small { position: absolute; left: 7px; bottom: 5px; font-size: 11.5px; color: var(--cz-ink); }
.cz-call-tile.is-talking { border-color: #8fdc9c; box-shadow: inset 0 0 0 1px #8fdc9c; }
.cz-call.is-on:not(.is-still) .is-talking .cz-call-av { animation: cz-talk 1.4s var(--ease-in-out) infinite alternate; }
@keyframes cz-talk { to { box-shadow: 0 0 0 6px color-mix(in srgb, #8fdc9c 30%, transparent); } }
.cz-call-tile.is-cam-off { background: var(--cz-card); }
.cz-call-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cz-call-btn { min-height: 44px; border-radius: 999px; background: var(--cz-raise); font-size: 12.5px; font-weight: 500; }
.cz-call-btn[aria-pressed="true"] { background: var(--cz-ink); color: var(--cz-bg); }
.cz-call-btn.is-end { background: #c8553d; color: #fff; }
.cz-view:has(> .cz-call.is-on) { display: flex; flex-direction: column; } .cz-view > .cz-call.is-on { flex: 1; }

/* the reel: a soft ring where the next tap lands (it plays by itself until a visitor touches the page) */
.cz-screen { position: relative; }
.cz-tap { position: absolute; z-index: 5; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 2px solid var(--cz-gold-hi); background: color-mix(in srgb, var(--cz-gold-hi) 22%, transparent); pointer-events: none; animation: cz-tap .7s var(--ease) 1 both; }
@keyframes cz-tap { 0% { opacity: 0; transform: scale(1.6); } 40% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.85); } }



/* the film, over the page */
.cz-film { max-width: none; max-height: none; padding: var(--s-3); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--bg-raise); color: var(--ink); box-shadow: var(--shadow); }
.cz-film[open] { display: grid; gap: var(--s-2); animation: drop var(--med) var(--ease); }
.cz-film::backdrop { background: var(--shade); }
.cz-film .sheet-top h3 { padding-left: var(--s-2); }
.cz-video { display: block; max-width: none; border-radius: var(--r-2); background: var(--on-photo-shade); }
.cz-film[data-cut="wide"] .cz-video { aspect-ratio: 16 / 9; height: auto; width: min(72rem, 100vw - 2 * var(--gutter) - 2 * var(--s-3) - 2px, (100vh - 8.5rem) * 16 / 9); width: min(72rem, 100vw - 2 * var(--gutter) - 2 * var(--s-3) - 2px, (100dvh - 8.5rem) * 16 / 9); }
.cz-film[data-cut="tall"] .cz-video { aspect-ratio: 9 / 16; width: auto; height: min(100vh - 8.5rem, (100vw - 2 * var(--gutter) - 2 * var(--s-3) - 2px) * 16 / 9); height: min(100dvh - 8.5rem, (100vw - 2 * var(--gutter) - 2 * var(--s-3) - 2px) * 16 / 9); }

/* request an invite */
.cz-form { display: grid; gap: var(--s-3); }
.cz-field { display: grid; gap: .3rem; font-size: var(--t-small); color: var(--ink-2); }
.cz-field input { width: 100%; min-height: var(--tap); padding: 0 .9rem; border-radius: var(--r-2); border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.cz-field input:focus-visible { outline-offset: 1px; }
.cz-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.cz-send { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); }
.cz-send .btn { flex: none; min-width: 7rem; }
.cz-send .btn[disabled] { opacity: .55; cursor: default; }
.cz-status { display: grid; gap: .1rem; min-width: 0; font-size: var(--t-small); color: var(--ink-2); }
.cz-status-label { color: var(--ink); font-weight: 500; }
.cz-sent { padding: var(--s-4) 0 var(--s-5); font-family: var(--font-title); font-size: var(--t-title); letter-spacing: -.02em; }


/* phones: the chooser, the phone, then the film and the way in in a row of their own.
   11-16 UX round: the chooser is two rows of six small tiles (a picture and one word), so the miniature gets about 60 %
   of the screen; nothing below the phone but the three buttons, which nothing covers. */
@media (max-width: 720px) {
  .cz { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
  .cz-side { display: contents; }
  .cz-pick { grid-row: 1; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: .25rem; }
  .cz-thing { min-height: var(--tap); padding: .2rem 0 .15rem; gap: .1rem; border-radius: var(--r-1); font-size: .6875rem; line-height: 1.1; --ls: -.01em; }
  .cz-long { display: none; }
  .cz-short { display: block; }
  .cz-pic { width: 1.6rem; height: 1rem; }
  .cz-stage { grid-row: 2; }
  .cz-ways { grid-row: 3; flex-wrap: nowrap; gap: .4rem; }
  .cz-way { flex: 1 1 auto; min-width: 0; padding: 0 .4rem; gap: .3rem; }
  .cz-qr { display: none; }
  .cz-phone { aspect-ratio: auto; width: 100%; max-height: none; padding: 0; border-radius: var(--r-3); }
  .cz-screen { border-radius: inherit; }
  .cz-top { min-height: 50px; padding: 3px 8px 3px 12px; }
  .cz-box { display: none; }      /* the room goes to the chat */
  .sheet.cz-invite { inset: 0 0 auto 0; padding-top: calc(var(--s-4) + var(--safe-t)); padding-bottom: var(--s-4); border-top: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0 0 var(--r-3) var(--r-3); }
  .sheet.cz-invite[open] { animation: drop var(--med) var(--ease); }
}
/* a phone on its side (short and wide): two columns that fit the screen, the chooser small, the phone as a wide panel
   that scrolls inside itself, no code. Anything shorter or narrower still: the frame lets the page's own area scroll. */
@media (max-height: 520px) and (orientation: landscape) and (min-width: 600px) {
  .cz { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: .5rem var(--s-5); align-items: stretch; }
  .cz-side { display: grid; grid-row: auto; align-content: center; gap: .5rem; max-width: none; }
  .cz-pick { grid-row: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: .3rem; }
  .cz-thing { min-height: 44px; padding: .15rem .1rem; gap: 0; font-size: .6875rem; line-height: 1.12; }
  .cz-thing span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
  .cz-thing .cz-short { display: none; } .cz-thing .cz-long { display: -webkit-box; }
  .cz-pic { width: 1.9rem; height: 1.1rem; }
  .cz-stage { grid-row: auto; }
  .cz-ways { grid-row: auto; flex-wrap: nowrap; gap: .4rem; }
  .cz-way { flex: 1 1 auto; min-width: 0; padding: 0 .4rem; gap: .3rem; }
  .cz-qr { display: none; }
  .cz-phone { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; padding: 0; border-radius: var(--r-3); transform: none !important; }
  .cz-screen { border-radius: inherit; }
  .cz-top { min-height: 48px; padding: 2px 8px 2px 12px; }
  .cz-box { display: none; }
}
@media (max-height: 520px) and (not ((orientation: landscape) and (min-width: 600px))) { .cz { position: relative; inset: auto; min-height: 31rem; } }
/* a short phone (Safari's bars on a small iPhone): the chooser's pictures give their room to the miniature */
@media (max-width: 720px) and (max-height: 600px) and (orientation: portrait) {
  .cz-pic { display: none; }
  .cz-thing { min-height: 44px; }
}
@media (forced-colors: active) { .cz-thing, .cz-phone { border: 1px solid CanvasText; } }
/* QA 11-16: on a wide screen the chooser starts at the top of the page, beside the phone (no empty band over it) */
@media (min-width: 721px) { .cz-side { align-self: start; padding-top: var(--s-2); } }
@media (min-width: 721px) and (max-height: 520px) { .cz-side { align-self: auto; padding-top: 0; } }
