/* The drawing games' how-to demos (sketch-demo.js), in the how-to's box on both screens: the big screen's .tut-demo and the
   phone's .ptut-demo, both square and each a size container - so everything here is in cqw of that box, one layout for
   both, the type in --t (a bigger share of the phone's box: it is a few centimetres wide). The box is the dark simulated
   display (toy-stage.css); the paper on it is the round's own (.sk-canvas). */
.smd, .skd{ --ink:var(--toy-ink-color, #1E1E24); position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2.2cqw; font-family:'Lilita One',sans-serif; color:#fff; transition:opacity .45s; }
:is(.smd, .skd).fade{ opacity:0; }
.smd-canvas, .skd-canvas{ display:block; width:100%; aspect-ratio:1; box-sizing:border-box; background:#FFFDF5; border:calc(var(--t) * .14) solid var(--ink); }

/* SMEARGLE SKETCH: the picture and the copy side by side, the match stamped on the copy, its two halves under them, Smeargle
   at work in the corner */
.smd{ --sq:43cqw; --t:4.4cqw; gap:3cqw; padding-bottom:6cqw; }
.ptut-demo .smd{ --t:6cqw; }
.smd-pair{ display:flex; gap:calc(var(--sq) * .1); }
.smd-col{ display:flex; flex-direction:column; align-items:center; gap:calc(var(--t) * .45); }
.smd-ref{ width:var(--sq); height:var(--sq); border-radius:calc(var(--sq) * .09); --toy-art-scale:1; }
.smd-ref > img{ object-fit:cover; object-position:50% 100%; }
.smd-pad{ position:relative; width:var(--sq); }
.smd-canvas{ border-radius:calc(var(--sq) * .09); }
.smd-tag{ font-size:var(--t); line-height:1; letter-spacing:.05em; text-transform:uppercase; color:rgba(255,255,255,.78); }
/* the tool in hand: a chip on the paper's corner */
.smd-tool{ position:absolute; top:calc(var(--sq) * .05); left:calc(var(--sq) * .05); font-size:calc(var(--t) * .85); line-height:1; padding:.25em .6em .3em;
  border-radius:99px; color:var(--ink); background:var(--t-cream-d, #E4DAC0); border:calc(var(--t) * .12) solid var(--ink); opacity:0; transition:opacity .2s; }
.smd.drawing .smd-tool{ opacity:1; }
.smd-tool[data-t="pen"]::after{ content:'Pen'; }
.smd-tool[data-t="fill"]::after{ content:'Bucket'; }
.smd-tool[data-t="brush"]::after{ content:'Brush'; }
.smd-meter{ display:flex; align-items:center; gap:calc(var(--t) * .5); }
.smd-m{ font-size:var(--t); line-height:1; white-space:nowrap; padding:.3em .65em .35em; border-radius:99px;
  color:var(--ink); background:var(--t-cream-l, #FFFEEA); border:calc(var(--t) * .12) solid var(--ink); opacity:.4; transition:opacity .25s, transform .25s; }
.smd-m b{ font-weight:400; }
.smd-m.on{ opacity:1; }
/* the match: a gold stamp on the copy's top corner (the tool chip has the other) */
.smd-m.tot{ position:absolute; right:calc(var(--sq) * -.1); top:calc(var(--sq) * -.08); display:flex; flex-direction:column; align-items:center; padding:.35em .55em .3em; border-radius:.5em;
  font-size:calc(var(--t) * 1.5); background:var(--toy-gold, #FFE066); opacity:0; transform:rotate(-6deg) scale(.6); }
.smd-m.tot i{ font-style:normal; font-size:.5em; letter-spacing:.06em; text-transform:uppercase; }
.smd-m.tot.on{ opacity:1; transform:rotate(-6deg); }
.smd.won .smd-m.tot{ transform:rotate(-6deg) scale(1.15); }
.smd-mascot{ position:absolute; right:1.5cqw; bottom:1cqw; width:24cqw; height:auto; pointer-events:none; --toy-fx:drop-shadow(0 .6cqw 0 rgba(0,0,0,.35)); filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); transform-origin:50% 100%; }
.smd-meter{ align-self:flex-start; margin-left:5cqw; }
.smd.drawing .smd-mascot{ animation:smdPaint .7s ease-in-out infinite alternate; }
@keyframes smdPaint{ from{ transform:rotate(-4deg); } to{ transform:rotate(4deg); } }

/* SKETCH-OFF: the prompt, A-D two by two, the jury's votes on each, the fewest OUT */
.skd{ --t:4.2cqw; --tile:36cqw; gap:2.4cqw; }
.ptut-demo .skd{ --t:5.6cqw; --tile:35cqw; }
.skd-prompt{ display:flex; align-items:baseline; gap:.4em; max-width:92cqw; box-sizing:border-box; padding:.3em .7em .4em; font-size:var(--t); line-height:1.1;
  border-radius:.55em; color:var(--ink); background:var(--t-cream-l, #FFFEEA); border:calc(var(--t) * .12) solid var(--ink); }
.skd-prompt span{ font-size:.7em; letter-spacing:.06em; text-transform:uppercase; opacity:.6; }
.skd-prompt b{ font-weight:400; white-space:nowrap; }
.skd-grid{ display:grid; grid-template-columns:repeat(2, var(--tile)); gap:3cqw 5cqw; }
.skd-tile{ position:relative; transition:opacity .3s, filter .3s; }
.skd-canvas{ border-radius:calc(var(--tile) * .08); }
.skd-let{ position:absolute; top:calc(var(--t) * -.35); left:calc(var(--t) * -.35); width:1.45em; height:1.45em; display:grid; place-items:center; border-radius:50%;
  font-size:calc(var(--t) * .9); line-height:1; padding-bottom:.08em; box-sizing:border-box; color:var(--ink); background:linear-gradient(180deg, #FFE066, #FAB005);
  border:calc(var(--t) * .1) solid var(--ink); box-shadow:inset 0 -.12em 0 #C98A00; --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.skd-votes{ position:absolute; right:calc(var(--t) * -.35); bottom:calc(var(--t) * -.35); min-width:1.45em; height:1.45em; box-sizing:border-box; display:grid; place-items:center;
  padding:0 .3em; border-radius:99px; font-size:calc(var(--t) * .9); line-height:1; color:#fff; background:var(--t-blue, #1C7ED6); border:calc(var(--t) * .1) solid var(--ink);
  opacity:0; transform:scale(.6); transition:opacity .2s, transform .2s; }
.skd-votes b{ font-weight:400; }
.skd.voting .skd-votes{ opacity:1; transform:none; }
.skd-tile.hit .skd-votes{ animation:skdHit .3s ease-out; }
@keyframes skdHit{ 0%{ transform:scale(1.35); } 100%{ transform:none; } }
.skd-out{ position:absolute; left:50%; top:50%; font-size:calc(var(--t) * 1.2); line-height:1; padding:.15em .4em .2em; border-radius:.3em;
  color:#fff; background:linear-gradient(180deg, #FF6B7E, #E03131); border:calc(var(--t) * .12) solid var(--ink); box-shadow:inset 0 -.12em 0 #A51D1D; --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); transform:translate(-50%, -50%) rotate(-12deg) scale(.4); opacity:0; transition:opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.skd-tile.out .skd-canvas{ --toy-fx:grayscale(1) brightness(.75); filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.skd-tile.out .skd-out{ opacity:1; transform:translate(-50%, -50%) rotate(-12deg); }
.skd-cap{ font-size:var(--t); line-height:1; color:rgba(255,255,255,.85); }
