/* /sell — "the presentation": full-stage scenes, one advantage each, where
   windows pop up, notifications fly in, numbers run and confetti bursts.
   Every element's resting state is its FINAL look; the movement lives only in
   animations (so "reduce motion" / "עצירת אנימציות", which switch animations
   off, simply show each scene complete). Each scene's picture is drawn on a
   fixed 560×460 canvas that sell.js scales to the space (--s). */

/* dark olive like the rough line under the logo (#897741, a shade darker so white
   text keeps its contrast), with soft white tears over it (owner, 2026-10-29):
   img/rough-tex.png = sparse white worn patches on transparency, tiling seamlessly */
.deck { position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 520px at 85% 0%, #8a7a4466 0%, transparent 60%), linear-gradient(140deg, #4f4522 0%, #665a2c 45%, #5a4f26 100%); }
.deck::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url(/img/rough-tex.png) 0 0 / 640px 640px repeat; opacity: .6; }
.deck .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; z-index: -1; pointer-events: none; }
.deck .blob.a { width: 420px; height: 420px; background: #a8955a; top: -120px; left: -80px; }
.deck .blob.b { width: 380px; height: 380px; background: #ffe08a; bottom: -140px; right: 10%; opacity: .14; }
.deck .blob.c { width: 300px; height: 300px; background: #897741; top: 30%; left: 40%; opacity: .3; }

.deck .stage { position: relative; min-height: min(640px, 86svh); }
.deck .sc { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; align-items: center; padding: 34px clamp(16px, 4vw, 48px) 18px; visibility: hidden; opacity: 0; transition: opacity .45s ease, visibility 0s .45s; }
.deck .sc.on { visibility: visible; opacity: 1; transition: opacity .45s ease; }
.deck .txt { position: relative; z-index: 2; }
.deck .eb { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 15px; letter-spacing: .3px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); }
.deck h2 { font-family: var(--font-head); font-size: clamp(32px, 4.8vw, 60px); line-height: 1.03; margin: 14px 0 12px; }
.deck .txt p { font-size: clamp(17px, 2vw, 21px); line-height: 1.5; margin: 0; opacity: .95; max-width: 480px; }
.deck .vis { position: relative; height: calc(460px * var(--s, 1)); }
.deck .cv { position: absolute; top: 0; left: 50%; width: 560px; height: 460px; transform: translateX(-50%) scale(var(--s, 1)); transform-origin: top center; direction: rtl; }

/* golden words: <em> in the markup, each word a .w.g once sell.js splits them */
.deck h2 em { font-style: normal; color: #ffe08a; }
.deck h2 .w { display: inline-block; }
.deck h2 .w.g { background-image: linear-gradient(90deg, #ffe08a, #fff1c2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; padding-bottom: .06em; }
/* the camera's flash */
.deck .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.deck .sc.on .flash { animation: dkFlash .6s ease .8s both; }
@keyframes dkFlash { 0% { opacity: 0; } 15% { opacity: .95; } 100% { opacity: 0; } }

/* text comes in word by word */
.deck .sc.on .eb { animation: dkUp .5s var(--ease) both; }
.deck .sc.on h2 .w { display: inline-block; animation: dkWord .7s var(--bounce) both; animation-delay: calc(.12s + var(--i, 0) * .09s); }
.deck .sc.on .txt p { animation: dkUp .6s var(--ease) .55s both; }
.deck .sc.on .txt .dk-btn { animation: dkUp .6s var(--ease) .75s both; }
@keyframes dkUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes dkWord { from { opacity: 0; transform: translateY(40px) rotate(-6deg) scale(.8); } }

/* ---- the pieces on a canvas ----------------------------------------------------- */
.deck .win { position: absolute; background: #fff; color: #3a2530; border-radius: 16px; box-shadow: 0 24px 60px rgba(25, 20, 5, .45), 0 2px 0 rgba(255, 255, 255, .6) inset; overflow: hidden; }
.deck .win .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #fdeef4; border-bottom: 1px solid #f6dfe8; font-size: 13px; font-weight: 700; color: #6b5862; }
.deck .win .bar i { width: 10px; height: 10px; border-radius: 50%; background: #f4a7c4; }
.deck .win .bar i:nth-child(2) { background: #ffd27a; } .deck .win .bar i:nth-child(3) { background: #9fe0b5; }
.deck .win .bar span { margin-inline-start: 6px; }
.deck .win .bd { padding: 14px; }
.deck .tst { position: absolute; display: flex; gap: 10px; align-items: center; background: #fff; color: #3a2530; border-radius: 14px; padding: 10px 14px; font-weight: 800; font-size: 15px; box-shadow: 0 16px 40px rgba(25, 20, 5, .4); white-space: nowrap; }
.deck .tst .e { font-size: 22px; }
.deck .tst small { display: block; font-weight: 500; color: #6b5862; font-size: 12px; }
.deck .chip { position: absolute; display: grid; place-items: center; gap: 2px; width: 104px; padding: 10px 8px; background: #fff; color: #3a2530; border-radius: 16px; font-weight: 800; box-shadow: 0 16px 36px rgba(25, 20, 5, .4); }
.deck .chip .e { font-size: 40px; line-height: 1.1; }
.deck .chip b { color: #b8336a; }
.deck .big { position: absolute; font-family: var(--font-head); line-height: 1; color: #ffe08a; text-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* entrances (each piece sets --d = its delay) */
.deck .sc.on .pop { animation: dkPop .7s var(--bounce) var(--d, 0s) both; }
.deck .sc.on .fr { animation: dkFromR .7s var(--ease) var(--d, 0s) both; }
.deck .sc.on .fl { animation: dkFromL .7s var(--ease) var(--d, 0s) both; }
.deck .sc.on .fu { animation: dkFromU .7s var(--bounce) var(--d, 0s) both; }
.deck .sc.on .slam { animation: dkSlam .8s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both; }
.deck .sc.on .spin { animation: dkSpin 1.1s var(--bounce) var(--d, 0s) both; }
@keyframes dkPop { 0% { opacity: 0; transform: translateY(30px) scale(.5); } 70% { opacity: 1; transform: translateY(-4px) scale(1.06); } }
@keyframes dkFromR { from { opacity: 0; transform: translateX(160px) rotate(6deg); } }
@keyframes dkFromL { from { opacity: 0; transform: translateX(-160px) rotate(-6deg); } }
@keyframes dkFromU { from { opacity: 0; transform: translateY(-120px); } }
@keyframes dkSlam { 0% { opacity: 0; transform: scale(3.2); } 60% { opacity: 1; transform: scale(.92); } }
@keyframes dkSpin { from { opacity: 0; transform: rotate(-200deg) scale(.2); } }
/* after coming in, some pieces keep floating */
.deck .sc.on .fl8 { animation: dkPop .7s var(--bounce) var(--d, 0s) both, dkFloat 4s ease-in-out calc(var(--d, 0s) + .7s) infinite; }
@keyframes dkFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.deck .sc.on .pulse { animation: dkPop .7s var(--bounce) var(--d, 0s) both, dkPulse 1.6s ease-in-out calc(var(--d, 0s) + .7s) infinite; }
@keyframes dkPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(255, 224, 138, .25), 0 16px 40px rgba(25, 20, 5, .4); } }

/* typed text: grows letter by letter */
.deck .typed { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.deck .sc.on .typed { animation: dkType 1s steps(22) var(--d, 0s) both; }
@keyframes dkType { from { max-width: 0; } to { max-width: 100%; } }
.deck .fld { border: 1.5px solid #e2c3d1; border-radius: 9px; padding: 8px 10px; margin-top: 4px; min-height: 38px; font-weight: 700; font-size: 14px; }
.deck .fk { font-size: 11px; font-weight: 700; color: #8a6b79; margin-top: 10px; }

/* strike-through drawn across */
.deck .strike { position: relative; }
.deck .strike::after { content: ''; position: absolute; inset-inline: -4px; top: 52%; height: 3px; background: #c2372b; border-radius: 2px; transform-origin: right; }
.deck .sc.on .strike::after { animation: dkDraw .5s ease var(--d, 0s) both; }
@keyframes dkDraw { from { transform: scaleX(0); } }

/* falling coins / confetti / sparkles (made in sell.js) */
.deck .coin { position: absolute; top: -40px; font-family: var(--font-head); font-size: 26px; color: #ffd257; text-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.deck .sc.on .coin { animation: dkFall 2.6s linear var(--d, 0s) infinite; }
@keyframes dkFall { from { transform: translateY(0) rotate(0); } to { transform: translateY(540px) rotate(360deg); } }
.deck .cf { position: absolute; width: 9px; height: 14px; border-radius: 2px; top: 46%; left: 50%; opacity: 0; }
.deck .sc.on .cf { animation: dkBurst 1.6s cubic-bezier(.1, .7, .3, 1) var(--d, 0s) both; }
@keyframes dkBurst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(540deg); } }
.deck .spk { position: absolute; color: #ffe08a; font-size: 22px; }
.deck .sc.on .spk { animation: dkTw 1.4s ease-in-out var(--d, 0s) infinite; }
@keyframes dkTw { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }

/* numbers that tick (sell.js changes the text, the class makes it bump) */
.deck .bump { animation: dkBump .35s var(--bounce); }
@keyframes dkBump { 40% { transform: scale(1.25); } }

/* scene: design — the shop changes its look */
.deck .shopw .bn { height: 64px; transition: background .5s; }
.deck .shopw .hd { display: flex; gap: 10px; align-items: flex-end; padding: 0 14px; margin-top: -24px; }
.deck .shopw .lg { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 24px; border: 3px solid #fff; transition: background .5s; }
.deck .shopw .nm { font-size: 22px; transition: color .5s; padding-bottom: 4px; }
.deck .shopw .gr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 14px; }
.deck .shopw .it { border-radius: 10px; aspect-ratio: 1; display: grid; place-items: center; font-size: 34px; transition: background .5s; }
.deck .shopw.t0 .bn { background: linear-gradient(120deg, #f7c6d9, #fde4ee); } .deck .shopw.t0 .lg { background: #b8336a; } .deck .shopw.t0 .it { background: #fdeef4; } .deck .shopw.t0 .nm { font-family: 'Secular One', sans-serif; color: #b8336a; }
.deck .shopw.t1 .bn { background: linear-gradient(120deg, #bfe6f0, #e8f7fb); } .deck .shopw.t1 .lg { background: #0f6e8c; } .deck .shopw.t1 .it { background: #e3f4f9; } .deck .shopw.t1 .nm { font-family: 'Suez One', serif; color: #0f6e8c; }
.deck .shopw.t2 .bn { background: linear-gradient(120deg, #dfe8c8, #f4f8ea); } .deck .shopw.t2 .lg { background: #556b2f; } .deck .shopw.t2 .it { background: #eef3e0; } .deck .shopw.t2 .nm { font-family: 'Karantina', sans-serif; font-size: 30px; color: #556b2f; }
.deck .shopw.t3 .bn { background: linear-gradient(120deg, #ddd3f7, #f2eefe); } .deck .shopw.t3 .lg { background: #5b3fa8; } .deck .shopw.t3 .it { background: #efe9fd; } .deck .shopw.t3 .nm { font-family: 'Frank Ruhl Libre', serif; color: #5b3fa8; }
.deck .sw { display: flex; gap: 8px; }
.deck .sw i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #e2c3d1; transition: box-shadow .3s, transform .3s; }
.deck .sw i.sel { box-shadow: 0 0 0 3px #3a2530; transform: scale(1.12); }

/* scene: offers — a chat */
.deck .bub { max-width: 230px; padding: 10px 14px; border-radius: 16px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.deck .bub.me { background: #fdeef4; border-bottom-right-radius: 4px; }
.deck .bub.them { background: #e2f5ea; color: #18733f; margin-inline-start: auto; border-bottom-left-radius: 4px; }
.deck .dots { display: inline-flex; gap: 4px; padding: 12px 14px; background: #f2eef0; border-radius: 16px; margin-bottom: 10px; }
.deck .dots i { width: 7px; height: 7px; border-radius: 50%; background: #a8798d; }
.deck .sc.on .dots i { animation: dkDot 1s ease-in-out infinite; }
.deck .dots i:nth-child(2) { animation-delay: .15s !important; } .deck .dots i:nth-child(3) { animation-delay: .3s !important; }
@keyframes dkDot { 50% { transform: translateY(-5px); opacity: .5; } }
.deck .btnr { display: flex; gap: 8px; margin-top: 4px; }
.deck .btnr span { flex: 1; text-align: center; padding: 9px; border-radius: 6px; font-weight: 800; font-size: 14px; }
.deck .btnr .ok { background: #18733f; color: #fff; }
.deck .btnr .no { border: 1.5px solid #e2c3d1; }
.deck .sc.on .press { animation: dkPress .5s ease var(--d, 0s) both; }
@keyframes dkPress { 50% { transform: scale(.88); box-shadow: 0 0 0 8px rgba(24, 115, 63, .25); } }

/* scene: auction */
.deck .aucp { font-family: var(--font-head); font-size: 64px; color: #b8336a; line-height: 1; display: inline-block; }
.deck .bids { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.deck .bids li { display: flex; justify-content: space-between; padding: 7px 10px; background: #fdf0f5; border-radius: 8px; animation: dkUp .35s var(--ease) both; }
.deck .clock { font-family: var(--font-head); font-size: 22px; color: #c2372b; }
.deck .sold { position: absolute; padding: 10px 22px; border: 5px solid #18733f; color: #18733f; background: #fff; font-family: var(--font-head); font-size: 34px; border-radius: 10px; transform: rotate(-12deg); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.deck .sc.on .sold { animation: dkStamp .5s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both; }
@keyframes dkStamp { from { opacity: 0; transform: rotate(-12deg) scale(3); } }

/* scene: price drops */
.deck .tag { position: absolute; background: #fff; color: #3a2530; border-radius: 18px 18px 18px 18px; padding: 22px 30px; box-shadow: 0 24px 60px rgba(25, 20, 5, .45); text-align: center; }
.deck .tag .now { font-family: var(--font-head); font-size: 76px; color: #b8336a; line-height: 1; display: inline-block; }
.deck .tag .tm { margin-top: 8px; font-weight: 800; color: #18733f; font-size: 18px; }
.deck .days { position: absolute; display: flex; gap: 8px; }
.deck .days span { width: 62px; padding: 8px 0; text-align: center; border-radius: 10px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); font-weight: 800; font-size: 13px; }
.deck .days span b { display: block; font-size: 17px; color: #ffe08a; }

/* scene: money */
.deck .wallet { position: absolute; width: 170px; height: 150px; border-radius: 26px; background: linear-gradient(150deg, #ffe08a, #ffb347); display: grid; place-items: center; font-size: 76px; box-shadow: 0 24px 60px rgba(25, 20, 5, .45); }
.deck .pay { position: absolute; padding: 10px 16px; border-radius: 12px; background: #fff; color: #3a2530; font-weight: 800; box-shadow: 0 12px 30px rgba(25, 20, 5, .4); }
.deck .sc.on .into { animation: dkInto 1.4s var(--ease) var(--d, 0s) both; }
@keyframes dkInto { 0% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.6); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* scene: numbers */
.deck .bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding: 6px 4px 0; border-bottom: 2px solid #f6dfe8; }
.deck .bars i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #e0559a, #b8336a); height: var(--h); transform-origin: bottom; }
.deck .sc.on .bars i { animation: dkGrow .9s var(--bounce) var(--d, 0s) both; }
@keyframes dkGrow { from { transform: scaleY(0); } }
.deck .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.deck .kpis div { background: #fdf0f5; border-radius: 10px; padding: 8px 4px; font-size: 12px; font-weight: 700; color: #6b5862; }
.deck .kpis b { display: block; font-family: var(--font-head); font-size: 26px; color: #b8336a; }

/* the call */
.dk-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 12px 26px; border-radius: 4px; font-weight: 800; font-size: 19px; text-decoration: none; color: #4a1a30; background: linear-gradient(135deg, #ffe08a, #ffc857); box-shadow: 0 10px 30px rgba(255, 200, 87, .35); }
.dk-btn:hover { transform: translateY(-2px); }
.dk-btn.huge { min-height: 66px; font-size: 22px; padding: 16px 36px; }

/* ---- the player ------------------------------------------------------------------ */
.deck .player { position: relative; z-index: 3; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px clamp(16px, 4vw, 48px) 18px; }
.deck .segs { display: flex; gap: 5px; flex: 1 1 260px; min-width: 0; }
.deck .seg { flex: 1; min-width: 10px; height: 30px; padding: 12px 0; border: 0; background: none; cursor: pointer; }
.deck .seg span { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.deck .seg span i { display: block; height: 100%; width: 0; background: #ffe08a; transform-origin: right; }
.deck .seg.done span i { width: 100%; }
.deck .seg.cur span i { width: calc(var(--p, 0) * 100%); }
.deck .seg:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; border-radius: 4px; }
.deck .ctl { min-width: 46px; min-height: 46px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; display: grid; place-items: center; }
.deck .ctl:hover { background: rgba(255, 255, 255, .22); }
.deck .ctl:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
.deck .count { font-weight: 800; font-size: 14px; opacity: .9; min-width: 48px; text-align: center; }
.deck .player .dk-btn { min-height: 46px; font-size: 16px; padding: 8px 18px; }

/* the narrator (sell.js): her button, and the subtitles of what she says */
.deck .ctl.narr { width: auto; border-radius: 999px; padding: 0 16px; gap: 6px; display: inline-flex; font-size: 15px; background: rgba(255, 224, 138, .18); border-color: #ffe08a; }
.deck .ctl.narr[aria-pressed="true"] { background: #ffe08a; color: #3a2e0e; }
.deck .cap { position: relative; z-index: 3; margin: 0 auto; max-width: min(860px, calc(100% - 32px)); text-align: center; font-size: clamp(16px, 1.9vw, 20px); font-weight: 700; line-height: 1.45; padding: 10px 18px; border-radius: 12px; background: rgba(20, 16, 4, .62); color: #fff; }
.deck .cap[hidden] { display: none; }
.deck .vsrc { position: relative; z-index: 3; margin: 6px auto 0; text-align: center; font-size: 14px; font-weight: 600; color: #fff; opacity: .9; }
.deck .vsrc[hidden] { display: none; }

/* phones: the words on top, the picture under them */
@media (max-width: 820px) {
  .deck .stage { min-height: 0; height: var(--stageh, 720px); }
  .deck .sc { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding-top: 22px; }
  .deck h2 { margin: 10px 0 8px; }
  .deck .txt p { font-size: 16px; }
  .deck .player .dk-btn { flex: 1 1 100%; justify-content: center; order: 5; }
}

/* the background keeps moving only for people who want movement */
@media (prefers-reduced-motion: no-preference) {
  html:not(.a11y-still) .deck .blob.a { animation: dkDrift 14s ease-in-out infinite; }
  html:not(.a11y-still) .deck .blob.b { animation: dkDrift 18s ease-in-out -6s infinite reverse; }
  html:not(.a11y-still) .deck .blob.c { animation: dkDrift 22s ease-in-out -3s infinite; }
}
@keyframes dkDrift { 50% { transform: translate(120px, 60px) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .deck *, .deck *::before, .deck *::after { animation: none !important; transition: none !important; }
}
.deck .ctl[hidden] { display: none; }
.deck .ctl.narr:disabled { opacity: .75; cursor: wait; }
.deck .tapnote { position: relative; z-index: 3; margin: 8px auto 0; width: fit-content; max-width: calc(100% - 32px); text-align: center; font-size: 16px; font-weight: 700; padding: 8px 16px; border-radius: 999px; background: #ffd166; color: #2b2210; }
.deck .tapnote[hidden] { display: none; }

/* the daily item: three little reels, and a page of the book */
.deck .reels { display: flex; justify-content: center; gap: 10px; }
.deck .reels span { width: 78px; height: 78px; display: grid; place-items: center; font-size: 46px; border-radius: 12px; background: linear-gradient(180deg, #fff, #fdeef4); box-shadow: inset 0 0 0 2px #f6dfe8; }
.deck .dkbook { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 10px; background: #efdfbb url(/img/book-page.webp) center / cover; }
.deck .dkbook .pg { min-height: 120px; display: grid; place-items: center; font-size: 56px; }
.deck .dkbook .pg + .pg { border-inline-start: 2px solid rgba(70, 35, 8, .25); }
.deck .dkbook .tx { font: 600 15px/1.4 'Frank Ruhl Libre', serif; color: #3a1a06; padding: 6px 8px; text-align: center; }
