/* ───────── $DOMINO · Line Card and the "Draw your card" section ───────── */

/* ───────── The card (sizes in cqw, so one layout works at any card width) ───────── */
.lc {
  --w: 300px;
  position: relative; flex: none; width: var(--w); max-width: 100%;
  container-type: inline-size;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
  filter: drop-shadow(0 10px 14px rgba(18, 16, 16, .3));
}
.lc.is-live { transition: transform .08s linear; }
.lc-frame {
  aspect-ratio: 5 / 7; padding: 3.1cqw; border-radius: 4.6cqw; overflow: hidden;
  background: linear-gradient(135deg, #f7e08a, #d7a534 24%, #fff3b6 45%, #c89a33 66%, #f2d46c);
  transition: filter .6s ease, transform .6s ease;
}
.lc-in {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 2.2cqw 3cqw 2cqw; border-radius: 2.6cqw;
  background: linear-gradient(170deg, #f7d64d, #efc536 55%, #f6d758);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif; color: #17120d;
}

/* Header: the tag sits on its own line, a slanted plate with a border on every side, then name + LP. */
.lc-top { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; column-gap: 1.6cqw; }
.lc-tag {
  grid-column: 1 / -1; justify-self: start; position: relative; z-index: 0;
  margin: .4cqw 0 1.6cqw 1.4cqw; padding: .9cqw 3.2cqw .8cqw;
  font-style: italic; font-weight: 800; font-size: 3.1cqw; line-height: 1; letter-spacing: .06em; color: #17120d;
}
.lc-tag::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: .35cqw solid rgba(0, 0, 0, .55); border-radius: 1.2cqw;
  background: linear-gradient(#ffffff, #cdcdcd);
  transform: skewX(-14deg);
}
.lc-name { min-width: 0; overflow: hidden; white-space: nowrap; font-weight: 800; font-size: 8.2cqw; line-height: .95; letter-spacing: -.01em; text-transform: uppercase; }
.lc-lp { display: flex; align-items: baseline; gap: .6cqw; white-space: nowrap; font-weight: 800; font-size: 9cqw; line-height: .9; }
.lc-lp small { font-size: 3.4cqw; }
.lc-type { align-self: center; width: 7.4cqw; height: 7.4cqw; padding: .9cqw; border-radius: 50%; border: .4cqw solid rgba(0, 0, 0, .35); background: #fff3e2; }

.lc-art {
  position: relative; flex: none; aspect-ratio: 16 / 10.4; margin-top: 1.8cqw; overflow: hidden;
  border: 1.1cqw solid transparent;
  background: linear-gradient(#1b1510, #1b1510) padding-box, linear-gradient(135deg, #fff6c4, #b9892c 40%, #fff1a6 60%, #a87a22) border-box;
  box-shadow: 0 .6cqw 1.2cqw rgba(0, 0, 0, .35);
}
.lc-art img, .lc-art svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.lc-art--ghost img { object-position: 50% 32%; }
.lc-stamp {
  position: absolute; white-space: nowrap;
  padding: 1.1cqw 1.8cqw; border: .7cqw solid #e8541a; border-radius: 1.2cqw;
  background: rgba(251, 246, 234, .92); color: #e8541a;
  font: 700 3.1cqw/1 "Martian Mono", ui-monospace, monospace; letter-spacing: .02em; text-transform: uppercase;
}
.lc-stamp--0 { right: 3%; bottom: 6%; transform: rotate(-8deg); }
.lc-stamp--1 { left: 4%; top: 7%; transform: rotate(6deg); }
.lc-id {
  flex: none; margin: 1.4cqw auto 0; padding: .9cqw 4cqw; white-space: nowrap; text-align: center;
  font-style: italic; font-weight: 600; font-size: 3cqw; line-height: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55) 15%, rgba(255, 255, 255, .55) 85%, transparent);
}
.lc-move { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 2cqw; margin-top: 2.2cqw; }
.lc-pips { display: flex; gap: .8cqw; }
.lc-pip { display: grid; place-items: center; width: 4.6cqw; height: 4.6cqw; border-radius: 50%; border: .45cqw solid #17120d; background: #fff; }
.lc-pip::after { content: ""; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #17120d; }
.lc-mname { font-weight: 700; font-size: 5.6cqw; line-height: 1; text-align: center; }
.lc-val { font-weight: 800; font-size: 6.4cqw; line-height: 1; font-variant-numeric: tabular-nums; }
.lc-move p { grid-column: 1 / -1; margin: .9cqw 0 0; font-weight: 500; font-size: 3.55cqw; line-height: 1.18; }
.lc-bar { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: auto; padding: 1cqw 0; border-block: .4cqw solid rgba(0, 0, 0, .35); }
.lc-bar span { text-align: center; font-weight: 800; font-size: 3.8cqw; line-height: 1.05; border-left: .3cqw solid rgba(0, 0, 0, .25); }
.lc-bar span:first-child { border-left: 0; }
.lc-bar i { display: block; margin-bottom: .5cqw; font-style: normal; font-weight: 600; font-size: 2.6cqw; line-height: 1; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.lc-flavor { flex: none; margin: 1.3cqw 0 0; font-style: italic; font-weight: 500; font-size: 3.2cqw; line-height: 1.2; }
.lc-foot { flex: none; display: flex; justify-content: space-between; gap: 2cqw; margin-top: .8cqw; white-space: nowrap; font-weight: 700; font-size: 2.7cqw; line-height: 1; }
.lc-glare {
  position: absolute; inset: 0; border-radius: 4.6cqw; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .6), transparent 42%); mix-blend-mode: overlay;
}
.lc.is-live .lc-glare { opacity: 1; }

/* finishes, set by Line Power */
.lc--holo .lc-in { background: linear-gradient(165deg, #f1f3f6, #d4d9e0 38%, #f7f8fa 55%, #c9d0d9); }
.lc--holo .lc-in::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-burn; opacity: .28;
  background: repeating-linear-gradient(115deg, #ff4fa0 0 5%, #ffd23f 5% 10%, #3fe0ff 10% 15%, #9b5cff 15% 20%);
  background-size: 220% 220%; background-position: var(--bx, 40%) var(--by, 40%);
}
.lc--holo .lc-in > * { position: relative; }
.lc--holo .lc-glare {
  opacity: .35; mix-blend-mode: color-dodge;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .7), transparent 40%),
    repeating-linear-gradient(115deg, rgba(255, 79, 160, .35) 0 5%, rgba(255, 210, 63, .35) 5% 10%, rgba(63, 224, 255, .35) 10% 15%, rgba(155, 92, 255, .35) 15% 20%);
  background-size: 100% 100%, 240% 240%; background-position: center, var(--bx, 40%) var(--by, 40%);
}
.lc--holo.is-live .lc-glare { opacity: .6; }
.lc--silver .lc-frame { background: linear-gradient(135deg, #eef0f2, #a9b1ba 26%, #f8f9fb 48%, #98a0aa 72%, #e3e6ea); }
.lc--silver .lc-in { background: linear-gradient(170deg, #e9ecf0, #d6dbe1 60%, #eef1f4); }
.lc--paper .lc-frame { background: #eadcbe; box-shadow: inset 0 0 0 .7cqw #121010; }
.lc--paper .lc-in { background: #f8f0de radial-gradient(rgba(18, 16, 16, .07) 1px, transparent 1.2px) 0 0 / 2.4cqw 2.4cqw; border: .4cqw solid #121010; }
.lc--paper .lc-art { background: linear-gradient(#1b1510, #1b1510) padding-box, linear-gradient(#121010, #121010) border-box; }
.lc--paper .lc-tag { color: #f4ebd8; }
.lc--paper .lc-tag::before { background: #121010; border-color: #121010; }
.lc--black .lc-frame { background: linear-gradient(135deg, #6b5327, #15110c 30%, #b88f3e 50%, #15110c 70%, #7a5f2c); }
.lc--black .lc-in { background: linear-gradient(170deg, #241c15, #15110d 60%, #2b2118); color: #f4ebd8; }
.lc--black .lc-tag { color: #15110d; }
.lc--black .lc-tag::before { background: linear-gradient(#f3d27a, #b58a33); }
.lc--black .lc-pip { background: #f4ebd8; border-color: #e9bc4a; }
.lc--black .lc-pip::after { background: #15110d; }
.lc--black .lc-lp, .lc--black .lc-val { color: #f3d27a; }

/* drawing: the card waits blurred, then snaps into focus */
.lc.is-drawing .lc-frame { filter: blur(12px) saturate(.5); transform: scale(.97); }

/* ───────── The card section (scene 2) ───────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cardsec { display: grid; grid-template-columns: minmax(0, 640px) auto; justify-content: space-evenly; gap: clamp(24px, 4vw, 64px); align-items: center; }
.cardsec__main { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 620px; }
.cardsec .eyebrow { margin: 0 0 8px; }
.draw-title {
  display: inline-block; margin: 0; padding: 8px 18px 6px; transform: rotate(-1.5deg);
  border: 3px solid var(--ink); border-radius: 10px; background: #fbf6ea; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 5vh, 52px); line-height: 1; text-transform: uppercase;
}
.via { margin: 0; padding: 9px 12px; border: 1.5px dashed #6d6052; border-radius: 10px; background: #ecdfc3; font-size: 14px; color: #463c33; }
.via b { color: var(--ink); font-family: var(--f-mono); font-size: 13px; }
.draw { display: grid; gap: clamp(8px, 1.3vh, 12px); padding: clamp(14px, 2vh, 18px); border: 2.5px solid var(--ink); border-radius: 16px; background: #fbf6ea; }
.draw__lead { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 17px; line-height: 1.35; }
.draw__lead svg { flex: none; width: 40px; height: 40px; }
.draw input {
  width: 100%; padding: 14px; border: 2.5px dashed var(--ink); border-radius: 12px;
  background: #f4ebd8; color: var(--ink); font: 400 15px/1.2 var(--f-mono);
}
.draw input:focus { outline: 3px solid var(--ember); outline-offset: 2px; border-style: solid; }
.draw__info { margin: 0; font-size: 14px; color: #463c33; }
.draw__info b { color: #e25a18; }
.draw .btn { width: 100%; }
.draw__steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: ds; }
.draw__steps li { counter-increment: ds; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 9px; background: #f4ebd8; font-size: 13px; }
.draw__steps li::before {
  content: counter(ds); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px;
  border: 1.5px solid var(--ink); border-radius: 50%; font: 700 11px/1 var(--f-mono);
}
.r-ghost { color: #7d7468; font-weight: 700; } .r-jeet { color: #e25a18; font-weight: 700; }
.r-trader { color: #2b7a4b; font-weight: 700; } .r-dh { color: #6a44b0; font-weight: 700; }
.draw__warn { margin: 0; padding-top: 10px; border-top: 1.5px solid var(--ink); font-size: 13px; }
.draw__err { margin: 0; padding: 10px 12px; border: 1.5px solid #a8321a; border-radius: 10px; background: #f7d9cc; color: #a8321a; font-size: 14px; }
.draw__err b { color: #a8321a; }

.draw-out { display: flex; flex-direction: column; align-items: center; gap: 14px; width: clamp(260px, 22vw, 320px); }
.draw-out .lc { --w: 100%; }
.draw-empty {
  display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 7; padding: 24px;
  border: 3px dashed #cbba97; border-radius: 16px; text-align: center; color: #6d6052; font-size: 14px;
}
.draw-empty b { display: block; margin-bottom: 8px; font-family: var(--f-display); font-weight: 900; font-size: 28px; color: #463c33; }
.draw-steps { align-self: stretch; margin: 0; padding: 0; list-style: none; font: 400 12px/1.7 var(--f-mono); color: #463c33; }
.draw-steps li::before { content: "○ "; color: #6d6052; }
.draw-steps li.done::before { content: "● "; color: #2b7a4b; }
.lp-break { margin: 0; text-align: center; font: 400 12px/1.5 var(--f-mono); color: #463c33; }
.lp-break b { color: var(--ink); }
.draw-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.draw-note { margin: 0; text-align: center; font-size: 13px; color: #6d6052; }

/* ───────── After a card is drawn: Line Power, sharing, verification ───────── */
.mine { display: flex; flex-direction: column; gap: 12px; }
.lp-box { margin: 0; align-self: flex-start; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; border: 2.5px solid var(--ink); border-radius: 14px; background: #fbf6ea; overflow: hidden; }
.lp-box div { padding: 10px 14px; border-left: 1.5px solid #cbba97; }
.lp-box div:first-child { border-left: 0; }
.lp-box dt { font: 600 10.5px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #6d6052; }
.lp-box dd { margin: 3px 0 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 3.4vh, 32px); line-height: 1; }
.lp-box small { display: block; margin-top: 3px; font: 400 11px/1.3 var(--f-mono); color: #6d6052; }
.lp-box .is-total { background: var(--ink); color: #f4ebd8; }
.lp-box .is-total dt, .lp-box .is-total small { color: #cbba97; }
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share-box code { padding: 9px 12px; border: 2px dashed var(--ink); border-radius: 10px; background: #fbf6ea; font: 600 13px/1.2 var(--f-mono); color: var(--ink); }
.share-box p { flex-basis: 100%; margin: 0; font-size: 13.5px; color: #463c33; }
.verify { display: grid; gap: 8px; padding: 14px 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fbf6ea; }
.verify__head { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(17px, 2.3vh, 20px); line-height: 1.15; }
.verify__why { margin: 0; font-size: 13.5px; color: #463c33; }
.verify__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.verify__wallet { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font: 700 14px/1 var(--f-body); cursor: pointer; }
.verify__wallet img { width: 22px; height: 22px; border-radius: 6px; }
.verify__status { margin: 0; font-size: 13.5px; color: #463c33; }
.verify__status.is-bad { color: #a8321a; }
.verify__status.is-good { color: #2b7a4b; font-weight: 700; }
.verify__msg { margin: 0; max-height: 140px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: #ede3cf; font: 400 11px/1.5 var(--f-mono); white-space: pre-wrap; }
.verify.is-done { border-color: #2b7a4b; background: #e6f0e1; }
.linkish { justify-self: start; align-self: flex-start; padding: 0; border: 0; background: none; font: 600 14px/1.2 var(--f-body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rules { font-size: 13.5px; color: #463c33; }
.rules summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.rules ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.rules b { color: var(--ink); }

@media (max-width: 900px) {
  .cardsec { grid-template-columns: 1fr; justify-items: stretch; }
  .draw-out { width: min(340px, 100%); justify-self: center; }
  .cardsec.is-drawn .draw-out { order: -1; }
  .lp-box { grid-template-columns: repeat(2, 1fr); }
  .lp-box div:nth-child(3) { border-left: 0; }
  .lp-box div:nth-child(n + 3) { border-top: 1.5px solid #cbba97; }
}
@media (prefers-reduced-motion: reduce) {
  .lc, .lc-frame { transition: none; }
}
