/* Smeargle Sketch - the phone's stage (smeargle-stage.js). The pad, the palette, the tools and the clock are Sketch-Off's
   (sketch-stage.css .sk-*); this is the portrait to copy above them, and the last round's card. The portrait shows at
   --toy-art-scale 1: it is framed exactly as the canvas is, and that framing is what the outline is scored in. */
.sm-head { display:flex; align-items:center; gap:10px; min-width:0; }
.sm-ref { flex:none; width:104px; height:104px; border-radius:16px; --toy-art-scale:1; }
.sm-ask { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; line-height:1.05; }
.sm-kick { font-size:14px; font-weight:700; color:var(--toy-gold); letter-spacing:.04em; text-transform:uppercase; -webkit-text-stroke:3px var(--toy-ink-color); paint-order:stroke fill; }
.sm-mon { font-family:'Lilita One',sans-serif; font-size:30px; color:#fff; -webkit-text-stroke:2px var(--toy-ink-color); paint-order:stroke fill;
  text-shadow:0 3px 0 var(--toy-ink-color), 0 2px 0 var(--toy-ink-color), 0 1px 0 var(--toy-ink-color); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sm-rule { align-self:flex-start; white-space:nowrap; font-size:13px; font-weight:600; color:#fff; background:rgba(30,30,36,.6); border-radius:8px; padding:2px 8px 3px; margin-top:3px; }
.sm-draw .sk-clock { align-self:flex-start; }
/* SMEARGLE, painting away in a round porthole on the canvas's top edge, at the pad's right (Daniel, 2026-11-27: "shouldn't we
   have a smeargle somewhere showing during smeargle sketch?"): under the clock, clear of the name and its rule on an iPhone
   SE, and never over the paper. The pad is a size container with the canvas min(100cqw, 100cqh) in its middle, so the badge
   finds the canvas's top edge in both layouts */
.sm-draw .sk-pad .sm-mascot { position:absolute; right:0; bottom:calc(50% + min(50cqw, 50cqh) + 6px); width:clamp(50px, 15cqw, 96px); height:auto; aspect-ratio:1;
  pointer-events:none; z-index:1; --toy-art-scale:1.5; }
.sm-draw .sk-pad .sm-mascot img { transform-origin:45% 18%; animation:smPaint 1.1s ease-in-out infinite alternate; }
@keyframes smPaint { from { transform:scale(var(--toy-art-scale)) rotate(-5deg); } to { transform:scale(var(--toy-art-scale)) rotate(5deg); } }
@media (prefers-reduced-motion:reduce) { .sm-draw .sk-pad .sm-mascot img { animation:none; } }
@media (max-height:600px) { .sm-ref { width:84px; height:84px; } .sm-mon { font-size:26px; } }

/* THE LAST ROUND'S CARD: the portrait and your drawing side by side */
.smr-pair { display:flex; gap:10px; justify-content:center; margin:6px 0 4px; }
.smr-ref { width:112px; height:112px; border-radius:14px; --toy-art-scale:1; }
.smr-mine { width:112px; height:112px; border-width:3px; border-radius:14px; }
.smr-split { display:flex; justify-content:center; gap:14px; font-size:14px; font-weight:600; color:#4A4E63; }
.smr-split b { color:var(--toy-ink-color); }
.smr-name { font-family:'Lilita One',sans-serif; font-size:20px; text-align:center; }
@media (max-height:700px) { .smr-ref, .smr-mine { width:84px; height:84px; } .smr-pair { margin:2px 0; } .smr-name { font-size:17px; } }

/* THE TOOLS: pen, brush, bucket (one lit), Undo, Clear - icons, so the row fits an iPhone SE beside Done */
.sm-tools { gap:6px; }
.sm-tool { flex:0 0 auto; width:46px; padding:6px 0 8px; display:flex; align-items:center; justify-content:center; }
.sm-tool svg { width:24px; height:24px; display:block; }
.sm-tool.on { background:linear-gradient(180deg, #FFE066, #FAB005); box-shadow:inset 0 -4px 0 #C98A00; --toy-drop:3px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1); }
.sm-tools .sk-done { flex:1 1 auto; }

/* A COMPUTER'S WIDE WINDOW (play.html widens the scaled phone while this screen is up; pcbody is its scaled body): one bar
   across the top (COPY IT! Pikachu, the rule, the clock), then the portrait and the canvas side by side at the SAME size,
   level top and bottom - the copying is done across - and under them one tray of colours and tools (the ::before). Both
   squares wear the board's frame. The head's parts become the grid's own items (display:contents). Phones never match. */
@container pcbody (min-width:860px) {
  .sk-phone.sm-draw { --sq:min(calc(100cqh - 250px), calc(50cqw - 64px)); display:grid; justify-content:center; align-content:center; column-gap:36px; row-gap:22px;
    padding:12px 24px 18px; grid-template-columns:var(--sq) var(--sq); grid-template-rows:auto var(--sq) auto;
    grid-template-areas:"head head" "ref pad" "sw tools"; }
  .sm-draw .sm-head { display:contents; }
  .sm-draw .sm-ask { grid-area:head; flex-direction:row; align-items:baseline; gap:14px; align-self:center; }
  .sm-draw .sm-mon { font-size:36px; }
  .sm-draw .sm-rule { align-self:center; margin:0; font-size:15px; }
  .sm-draw .sk-clock { grid-area:head; justify-self:end; align-self:center; }
  .sm-draw .sm-ref { grid-area:ref; width:100%; height:100%; border:4px solid var(--toy-ink-color); border-radius:20px;
    box-shadow:0 6px 0 var(--toy-ink-color), 0 5.67px 0 var(--toy-ink-color), 0 5.33px 0 var(--toy-ink-color), 0 5px 0 var(--toy-ink-color), 0 4.67px 0 var(--toy-ink-color), 0 4.33px 0 var(--toy-ink-color), 0 4px 0 var(--toy-ink-color), 0 3.67px 0 var(--toy-ink-color), 0 3.33px 0 var(--toy-ink-color), 0 3px 0 var(--toy-ink-color), 0 2.67px 0 var(--toy-ink-color), 0 2.33px 0 var(--toy-ink-color), 0 2px 0 var(--toy-ink-color), 0 1.67px 0 var(--toy-ink-color), 0 1.33px 0 var(--toy-ink-color), 0 1px 0 var(--toy-ink-color), 0 0.67px 0 var(--toy-ink-color), 0 0.33px 0 var(--toy-ink-color); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }   /* it clips its picture: a filter would be clipped too */
  .sm-draw .sk-pad { grid-area:pad; }
  .sm-draw .sk-swatches { grid-area:sw; align-self:center; justify-content:space-between; padding:0; position:relative; z-index:1; }
  .sm-draw .sm-tools { grid-area:tools; position:relative; z-index:1; }
  .sk-phone.sm-draw::before { content:''; grid-column:1 / -1; grid-row:3; margin:-12px -16px; z-index:0; background:var(--toy-bg-eggshell);
    border:3px solid var(--toy-ink-color); border-radius:24px; box-shadow:inset 0 -5px 0 #E2D7B8; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
    filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
}
