/* Courier Prime, self-hosted (SIL OFL, see app/assets/fonts/OFL.txt).
   Full character set, so no unicode-range splitting is needed. */
@font-face{
  font-family:'Courier Prime';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url("/assets/CourierPrime-Regular-d987c46f.woff2") format('woff2');
}
@font-face{
  font-family:'Courier Prime';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url("/assets/CourierPrime-Bold-3274248a.woff2") format('woff2');
}
/* Built by script/icon_font/build.py. The glyphs sit on a 16px pixel grid, so
   the icon is only sharp at 16px and its multiples. */
@font-face{
  font-family:'Piskoviste Icons';
  font-style:normal;
  font-weight:400;
  font-display:block;
  src:url("/assets/piskoviste-icons-16630daf.woff2") format('woff2');
}

:root{
  --paper:#F0F0EB;
  --white:#FFFFFF;
  --ink:#000000;
  --rule:#C9C9C1;
  --dim:#6B6B64;
  --ghost:#DEDED7;
  --teal:#336666;
  --red:#FF3300;
  --red-ink:#C42700;
  --yellow:#FFE800;
  --yellow-tint:#FFF8B2;
  --dot:#D6D6CE;
  --veil:rgb(107 107 100 / .15);
  --lift:#A8A8A0;
  --mono:'Courier Prime','Courier New',ui-monospace,monospace;
  --cell:1px;--thumb-cell:.5px;--stage-w:384;--stage-h:384;--grid-w:384;--grid-h:384;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  background-color:var(--paper);
  background-image:radial-gradient(var(--dot) 1px,transparent 1px);
  background-size:8px 8px;
  color:var(--ink);
  font-family:var(--mono);
  font-size:15px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}

.shell{max-width:804px;margin:0 auto;padding:0 18px 90px}

/* uppercase micro labels - the load-bearing typographic element */
.micro{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.micro .hot{color:var(--red-ink)}

.head{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:20px 0 10px;border-bottom:1px solid var(--ink);
  background:var(--paper);
}
.head{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.wordmark{font-size:19px;letter-spacing:.02em}
.wordmark a{color:inherit;text-decoration:none}
.wordmark strong{font-weight:700}
.volcano-icon{
  display:inline-block;vertical-align:middle;
  width:16px;height:16px;
  font-family:'Piskoviste Icons';font-size:16px;font-weight:400;font-style:normal;
  line-height:1;letter-spacing:0;color:var(--ink);
}

.name-icon{
  display:inline-block;vertical-align:middle;flex:0 0 auto;
  width:16px;height:16px;
  font-family:'Piskoviste Icons';font-size:16px;font-weight:400;font-style:normal;
  line-height:1;letter-spacing:0;color:var(--ink);
}

/* presence list - fixed outside the document flow, so a change in the
   number of people never shifts the content */
.sidebar{
  display:none;
  position:fixed;
  top:22px;
  left:calc(50% + 420px);
  width:150px;
  z-index:5;
}
.sidebar-head{padding-bottom:6px;border-bottom:1px solid var(--rule)}
.presence-list{
  margin-top:7px;
  display:flex;flex-direction:column;
  max-height:calc(100vh - 130px);
  overflow-y:auto;
}
.who{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1;padding:2px 4px}
.who .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who.me{background:var(--yellow-tint);color:var(--ink)}
.sidebar-foot{margin-top:7px;padding-top:6px;border-top:1px solid var(--rule)}
.sidebar .txtbtn{font-size:12px;letter-spacing:0;text-transform:none}

.locale-switch{margin-left:auto;flex:none;align-self:center}
.locale-switch button{
  min-height:40px;min-width:40px;padding:0 8px;
  font:inherit;font-size:14px;letter-spacing:.14em;color:var(--dim);
  background:none;border:0;cursor:pointer;
}
.head > .locale-switch button{min-height:40px;min-width:40px;padding:0 8px;font-size:14px;letter-spacing:.14em}
/* the button padding and the trailing letter spacing would indent the last letter from the rule */
.head > .locale-switch{margin-right:-10px}
.locale-switch button:hover:not(:disabled){color:var(--ink)}
.locale-switch button:disabled{color:var(--ink);font-weight:700;cursor:default}

/* below the width of the list the icons lie in the header */
.presence-mini{display:flex;align-items:center;gap:5px;flex:none;align-self:flex-end;font-size:13px;color:var(--dim)}
.presence-mini .me{background:var(--yellow-tint);outline:2px solid var(--yellow-tint)}

@media (min-width:1180px){
  .sidebar{display:block}
  .presence-mini,.status{display:none}
}

/* task ticket */
.ticket{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:9px 0;border-bottom:1px solid var(--rule);
}
.serial{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--teal)}

.prompt{padding:26px 0 20px}
.prompt h1,.draw h1.instruction{margin:0;font-size:40px;font-weight:700;line-height:1.1;letter-spacing:-.02em;overflow-wrap:anywhere}
.prompt p{margin:8px 0 0;color:var(--dim);font-size:17px;line-height:1.35}
.intro{padding:26px 0 0}
.intro p{margin:0 0 10px;font-size:17px;line-height:1.35}
.intro .disclaimer{display:block;font-size:11px;line-height:1.4;color:var(--dim)}
.intro + .prompt{padding-top:14px}
.quit{margin:26px 0 0}
.quit a{color:var(--dim)}

/* game screen - the panel holds the task and the send form. In the stacked layout
   the panel dissolves into the grid, so its parts can lie above and below the scene.
   The fixed rows keep the stage in the same place in every game */
.draw{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;margin-top:10px;
  grid-template-areas:"line clock" "title title" "scene scene" "tools tools" "hint hint" "send send" "alt alt" "quit quit";
  grid-template-rows:36px 100px auto auto auto auto auto auto;
}
.draw::before{content:"";grid-row:1;grid-column:1/-1;align-self:stretch;border-bottom:1px solid var(--rule)}
.panel{display:contents}
.draw p.instruction{
  grid-area:line;align-self:center;margin:0;color:var(--dim);font-size:17px;line-height:1.35;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
.draw .prompt{grid-area:title;margin-top:12px;padding:0}
.draw h1.instruction{grid-area:title;margin-top:calc(12px - .1em)}
/* the padding keeps the carons of capitals inside the clip of a tight line height */
.draw .prompt h1{margin-top:-.1em}
.draw .prompt h1,.draw h1.instruction{padding-top:.1em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.mark{
  background:linear-gradient(transparent 58%,var(--yellow) 58%);padding:0 .06em;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
}
.clock{grid-area:clock;align-self:center;display:flex;align-items:baseline;gap:4px;padding-left:12px}
.clock .micro{display:none}
.clock b{font-size:28px;line-height:1;letter-spacing:-.02em}
.clock.low b{color:var(--red-ink)}
.scene{grid-area:scene;container-type:inline-size;margin-top:16px}
.panel .hint{grid-area:hint;margin:16px 0 0;color:var(--dim);font-size:17px;line-height:1.35}
.send-form,.panel > a.send{grid-area:send;margin-top:16px}
.panel .err:not(:empty){margin-bottom:8px;color:var(--red-ink);font-size:12px}
.panel .send{
  display:flex;align-items:center;justify-content:center;
  width:100%;height:52px;padding:0 12px;
  font-size:15px;letter-spacing:0;text-transform:none;text-decoration:none;
  box-shadow:3px 3px 0 var(--rule);
}
.skip,.panel > a.alt{grid-area:alt;margin-top:12px}
.alt{
  display:flex;align-items:center;justify-content:center;
  width:100%;min-height:36px;padding:6px 12px;
  border:1px solid var(--ink);background:var(--white);color:var(--ink);
  font:inherit;text-decoration:none;cursor:pointer;
}
.alt:not(:disabled):hover{background:var(--ink);color:var(--paper)}
.alt:disabled{opacity:.35;cursor:default}
.panel .quit{grid-area:quit;margin:12px 0 0}
.panel .quit a{
  display:inline-flex;align-items:center;min-height:24px;font-size:13px;
  text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px;
}
.panel .quit a:hover{color:var(--ink);text-decoration-color:var(--ink)}

/* stage - fixed size for the largest active grid; the plate sits in its center.
   --cell is a whole number of px, so every grid cell is an exact pixel block,
   except in a column narrower than the grid */
.stage{
  position:relative;display:grid;place-items:center;margin:0 auto;
  width:calc(var(--stage-w) * var(--cell));height:calc(var(--stage-h) * var(--cell));
}
@supports (width:round(down,10px,1px)) and (width:1cqw){
  .stage{
    /* whole px from 1px up; a column narrower than the grid gets the exact fraction */
    --cell:min(8px,100cqw / var(--stage-w),max(1px,round(down,100cqw / var(--stage-w),1px)));
    --thumb-cell:min(var(--cell) / 2,max(1px,round(down,var(--cell) / 2,1px)));
  }
}

/* desk - drawings and slips sent in this run of tasks, under the next plate */
#desk{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}

/* canvas - two layers, the lower one for the phase 2 underlay */
.plate,.sheet{
  position:relative;box-sizing:content-box;
  width:calc(var(--grid-w) * var(--cell));height:calc(var(--grid-h) * var(--cell));
  border:1px solid var(--ink);box-shadow:3px 3px 0 var(--rule);
  background:var(--white);line-height:0;
}
/* the 1px border lies outside the content box; the negative margin makes the
   margin box exactly grid * --cell, so the plate centers on the stage */
.stage > .plate,#desk > .sheet{margin:-1px}
/* isolate, so a flash on a sheet never paints over the next plate */
.sheet{grid-area:1/1;isolation:isolate}
/* the veil hides only while the sent drawing is held; a page without a plate,
   such as no task, keeps the desk veiled */
.stage:not(:has(> .plate.is-lifted)) .sheet::after{
  content:"";position:absolute;inset:0;z-index:2;background:var(--veil);
}
/* a plate that covers the stage empties the desk only after the drop */
[data-desk-covers-value=false] .stage:has(> #desk > .sheet) > .plate{box-shadow:9px 9px 0 var(--lift)}
.sheet img{
  display:block;width:100%;height:100%;
  image-rendering:pixelated;image-rendering:crisp-edges;
}
.plate.is-lifted{visibility:hidden}
.plate.is-dropping{animation:plate-drop .26s cubic-bezier(.2,.9,.25,1) both}
@keyframes plate-drop{from{transform:translateY(-18px);opacity:0}}
/* iOS selects the nearest selectable text after a long press or double tap on
   a non-selectable spot, so the whole game page is non-selectable. The .draw
   rule is separate, because a browser without :has() drops the whole rule */
.draw{
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
body:has(.draw){
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
/* a stroke that starts just off a small plate must not pan or zoom the page;
   touch-action applies to all descendants, so the sent dialog lifts it */
.stage:has(.layer-draw):not(:has(dialog.sent)){touch-action:none}
.draw img,.draw canvas{-webkit-user-drag:none;user-drag:none}
.draw input,.draw textarea{user-select:text;-webkit-user-select:text}
.plate{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.plate canvas{
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
  display:block;width:100%;height:100%;
  image-rendering:pixelated;image-rendering:crisp-edges;
}
.plate .layer-bg{
  position:absolute;inset:0;z-index:0;
  background-size:100% 100%;
  background-repeat:no-repeat;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}
.plate .layer-bg.has-underlay{
  opacity:var(--underlay-opacity, .35);
  filter:grayscale(var(--underlay-gray, 1));
}
/* the last frame is an inline background-image, so !important is needed to keep
   it from showing under the frames drawn while the playback runs */
.plate .layer-bg.is-playing{background-image:none !important}
.plate .layer-draw{
  position:relative;z-index:1;
  cursor:crosshair;touch-action:none;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
/* speed drawing fuse - reaches 8px past the plate, so the line axis sits 4px
   outside the frame; the controller sizes the rects to the plate */
.fuse{
  position:absolute;left:-8px;top:-8px;
  width:calc(100% + 16px);height:calc(100% + 16px);
  overflow:visible;pointer-events:none;z-index:2;
}
.fuse .ash{fill:none;stroke:var(--rule);stroke-width:1;stroke-dasharray:1 3}
.fuse .live{fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:butt}
.fuse.low .live{stroke:var(--red)}
.fuse .core-o{fill:var(--ink)}
.fuse .core{fill:var(--yellow)}
.fuse .bits rect{fill:var(--red)}
.fuse .bits.a{animation:fuse-flicker .2s steps(1) infinite}
.fuse .bits.b{animation:fuse-flicker .2s steps(1) infinite reverse}
.fuse.frozen .bits{animation:none}
.fuse.done .spark{display:none}
@keyframes fuse-flicker{0%{opacity:1}50%{opacity:0}}
/* flashes - centered over the plate, the slip or the desk */
.flashes,.countdown{
  position:absolute;inset:0;z-index:3;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  padding:12px;pointer-events:none;
}
.flash{
  width:max-content;max-width:100%;margin:0;
  background:var(--ink);color:var(--paper);font-size:14px;line-height:1.45;padding:8px 14px;
}
.flash p{margin:0}
.flash.is-fading{animation:strip-out .3s ease 3s forwards}
/* countdown - the speed task before the drawing start */
.countdown[hidden]{display:none}
.countdown .flash{text-align:center}
/* the card matches the sent dialog over the plate */
.countdown-card{display:flex;flex-direction:column;gap:8px;width:min(500px,100%);padding:16px;font-size:15px}
.countdown-title{margin:0;font-size:17px;font-weight:700;animation:countdown-blink 1s steps(1) infinite}
@keyframes countdown-blink{50%{opacity:0}}
.countdown-prompt{font-size:24px;font-weight:700;line-height:1.2;overflow-wrap:anywhere}
.countdown-number{font-size:48px;font-weight:700;line-height:1.1}
.countdown .send{pointer-events:auto;margin-top:6px}
/* the desk shows this flash; the new page keeps it for screen readers */
.flash.is-carried{
  position:absolute;width:1px;height:1px;padding:0;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;animation:none;
}

/* slip - the pot guess over the desk: the previous drawing at half cell and a text field */
.slip{
  box-sizing:border-box;height:100%;
  display:flex;flex-direction:column;gap:8px;
  padding:12px;line-height:1.45;overflow-x:hidden;overflow-y:auto;
}
.slip img.pixel{
  flex:none;width:calc(var(--grid-w) * var(--thumb-cell));height:auto;
  border:1px solid var(--rule);
}
.slip .field{flex:1;display:flex;flex-direction:column;min-height:0}
.slip .field label{margin:0}
/* the slip is already a white sheet, so a second frame would only double it */
.slip .field textarea{
  flex:1;min-height:3em;resize:none;padding:8px 0;
  background:none;border:0;border-bottom:1px solid var(--ink);box-shadow:none;
}
.slip .field textarea:focus{box-shadow:inset 0 -1px 0 var(--ink)}
.slip .field:has(.err:not(:empty)) textarea,.slip .field:has(.err:not(:empty)) textarea:focus{box-shadow:inset 0 -1px 0 var(--red)}
.slip .actions{margin-top:8px}
.sheet .slip{overflow-y:hidden}
.sheet .slip .actions,.sheet .slip .err{display:none}
.slip-text{
  flex:1;min-height:0;margin:0;font-size:15px;
  white-space:pre-wrap;overflow-wrap:anywhere;
  border-bottom:1px solid var(--ink);padding:8px 0;
}

/* invite offer in the dialog after a solo drawing */
.invite{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;margin:0 0 20px}
.invite .micro{flex:1 0 100%;margin:0;color:inherit;opacity:.75}
.invite-link{flex:1 0 100%;display:flex;align-items:stretch;border:1px solid var(--paper);background:var(--white)}
/* the whole address must stay readable, so it wraps instead of scrolling */
.invite textarea{
  flex:1;min-width:0;font:inherit;font-size:13px;line-height:1.4;padding:8px 10px;
  border:0;background:none;color:var(--ink);resize:none;word-break:break-all;field-sizing:content;
}
.copy{
  display:flex;align-items:center;justify-content:center;width:40px;flex:none;
  border:0;border-left:1px solid var(--ink);background:var(--white);color:var(--ink);cursor:pointer;
}
.copy svg{fill:currentColor}
.copy:hover{background:var(--teal);color:var(--paper)}
.invite .txtbtn{color:inherit;border-bottom-color:currentColor}

/* tools */
.tools{
  grid-area:tools;justify-self:start;display:flex;flex-wrap:wrap;align-items:center;gap:5px;
  margin-top:16px;padding:7px;
  background:var(--white);border:1px solid var(--ink);box-shadow:3px 3px 0 var(--rule);
}
.group{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tools .group + .group{padding-left:5px;border-left:1px solid var(--rule)}
.tools.is-off{opacity:.35}
.tools.is-off button{cursor:default}

.swatch{
  width:36px;height:36px;padding:0;position:relative;
  border:1px solid var(--ink);background:var(--white);cursor:pointer;
}
.swatch i{position:absolute;inset:6px;display:block}
.swatch[data-c="black"] i{background:var(--ink)}
.swatch[data-c="erase"] i{background:var(--white);border:1px solid var(--rule)}
.swatch[aria-pressed="true"]{outline:2px solid var(--ink);outline-offset:2px}

.nib{
  width:36px;height:36px;display:flex;align-items:center;justify-content:center;
  padding:0;border:1px solid var(--ink);background:var(--white);cursor:pointer;
}
.nib i{background:var(--ink);display:block}
.nib[data-s="1"] i{width:3px;height:3px}
.nib[data-s="2"] i{width:6px;height:6px}
.nib[data-s="3"] i{width:10px;height:10px}
.nib[data-s="4"] i{width:13px;height:13px}
.nib[aria-pressed="true"]{outline:2px solid var(--ink);outline-offset:2px}
.tools:not(.is-off) .nib:disabled{opacity:.35;cursor:default}

.undo,.tool{
  width:36px;height:36px;display:flex;align-items:center;justify-content:center;
  padding:0;border:1px solid var(--ink);background:var(--white);color:var(--ink);cursor:pointer;
}
.tools:not(.is-off) .undo:disabled{opacity:.35;cursor:default}
.tool[aria-pressed="true"]{outline:2px solid var(--ink);outline-offset:2px}
.tool-icon{
  display:block;font-family:'Piskoviste Icons';font-size:32px;font-weight:400;font-style:normal;
  line-height:1;letter-spacing:0;
}

.txtbtn{
  border:0;background:none;padding:0;font:inherit;
  font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--dim);cursor:pointer;border-bottom:1px solid var(--rule);
}
.txtbtn:hover{color:var(--ink);border-bottom-color:var(--ink)}

.send{
  border:1px solid var(--ink);background:var(--ink);color:var(--paper);
  font:inherit;font-weight:700;font-size:12px;
  letter-spacing:.16em;text-transform:uppercase;
  padding:9px 20px;cursor:pointer;
}
.send:hover{background:var(--teal);border-color:var(--teal)}

.reservation{
  width:min(360px,calc(100vw - 32px));padding:20px;
  border:1px solid var(--ink);background:var(--white);color:var(--ink);
  box-shadow:3px 3px 0 var(--rule);
}
.reservation::backdrop{background:rgb(0 0 0 / .35)}
/* sent dialog - a black strip like the speed countdown, centered over the plate;
   it may be wider than the plate so a full address fits on one line */
.sent{
  position:absolute;top:50%;left:50%;z-index:4;transform:translate(-50%,-50%);
  width:min(500px,calc(100vw - 32px));margin:0;padding:16px;
  border:0;background:var(--ink);color:var(--paper);line-height:1.45;
}
.sent-heading{margin:0 0 14px;font-size:17px;font-weight:700}
.sent .send,.countdown .send{
  display:flex;align-items:center;justify-content:center;width:100%;height:48px;
  border-color:var(--paper);background:var(--paper);color:var(--ink);
  font-size:15px;letter-spacing:0;text-transform:none;text-decoration:none;
}
.sent .send:hover,.countdown .send:hover{border-color:var(--teal);background:var(--teal);color:var(--paper)}
.sent .alt{margin-top:12px;border-color:var(--paper);background:none;color:var(--paper)}
.sent .alt:hover{background:var(--paper);color:var(--ink)}
.reservation p{margin:0 0 16px;font-size:17px;line-height:1.35}
.reservation .send{width:100%}

/* text field (name, guessing in the pot game) */
/* a white sheet like the plate, so the text never lies on the dots of the desk */
.field input,.field textarea{
  width:100%;font:inherit;font-size:17px;color:var(--ink);
  padding:10px 12px;appearance:none;
  background:var(--white);border:1px solid var(--ink);border-radius:0;
  box-shadow:3px 3px 0 var(--rule);
}
.field input::placeholder,.field textarea::placeholder{color:var(--dim);opacity:1}
.field input:focus,.field textarea:focus{outline:0;box-shadow:3px 3px 0 var(--ink)}
.field:has(.err:not(:empty)) input,.field:has(.err:not(:empty)) textarea{
  border-color:var(--red);box-shadow:3px 3px 0 var(--red);
}
.field:has(.err:not(:empty)) input:focus,.field:has(.err:not(:empty)) textarea:focus{box-shadow:3px 3px 0 var(--ink)}
.field .err{color:var(--red-ink);font-size:12px;margin-top:8px;min-height:1em}
.field textarea{min-height:4.5em;resize:vertical}
.field textarea.write{min-height:12em}
.counter{text-align:right;margin-top:6px}
.field label{display:block;margin:18px 0 6px}
.field p{margin:16px 0 0}
/* fixed, so fading out never shifts the canvas below */
.strip{
  position:fixed;top:12px;left:50%;z-index:20;transform:translateX(-50%);
  width:max-content;max-width:calc(100% - 32px);margin:0;
  background:var(--ink);color:var(--paper);font-size:14px;padding:8px 14px;
  pointer-events:none;animation:strip-out .3s ease 3s forwards;
}
.strip.is-alert,.flash.is-alert{background:var(--red-ink)}
@keyframes strip-out{to{opacity:0;visibility:hidden}}

.actions{display:flex;justify-content:flex-end;margin-top:22px}

/* main buttons on the home screen */
.hero{
  width:100%;margin:22px 0 4px;
  border:1px solid var(--ink);background:var(--white);color:var(--ink);
  font:inherit;font-weight:700;font-size:20px;
  letter-spacing:.06em;text-transform:uppercase;
  padding:26px 20px;cursor:pointer;
}
.hero:hover{background:var(--ink);color:var(--paper)}
.hero small{
  display:block;margin-top:7px;font-size:10px;font-weight:400;
  letter-spacing:.16em;color:var(--dim);
}
.hero:hover small{color:var(--ghost)}
a.hero{display:block;text-align:center;text-decoration:none}

/* status bar */
.status{position:fixed;left:0;right:0;bottom:0;background:var(--paper);border-top:1px solid var(--ink)}
.signout{display:inline;margin:0}
.status,.sidebar{
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
/* a 24px touch target; the underline moves to the text so it does not hang below the box */
.signout .txtbtn{
  min-height:24px;border-bottom:0;
  text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px;
}
.signout .txtbtn:hover{text-decoration-color:var(--ink)}
.status-in{max-width:804px;margin:0 auto;padding:9px 18px}
.sidebar-foot,.status-in .micro{display:flex;align-items:center;gap:12px}

:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

@media (max-width:520px){
  /* the countdown card has to fit a plate about 290 px tall */
  .countdown-card{gap:4px;padding:12px;font-size:14px}
  .countdown-prompt{font-size:20px}
  .countdown-number{font-size:32px}
  .countdown .send{height:40px;margin-top:4px}
  .prompt h1,.draw h1.instruction{font-size:28px}
  .prompt p,.intro p{font-size:15px}
  .draw p.instruction{font-size:15px}
  .draw{grid-template-rows:36px 72px auto auto auto auto auto auto;margin-top:6px}
  .draw .prompt{margin-top:10px}
  .draw h1.instruction{margin-top:calc(10px - .1em)}
  .scene{margin-top:12px}
  .panel .send{height:48px}
}
/* the frame and twelve 36 px buttons need 529 px */
@media (max-width:567px){
  .tools{flex-direction:column;align-items:flex-start}
  .tools .group + .group{align-self:stretch;padding:5px 0 0;border-left:0;border-top:1px solid var(--rule)}
}
/* the game column has 1130 px and the list 150 px with a 24 px gap; together they
   have 1304 px, so the column starts at 50% - 652 px, minus the 18 px of the shell */
@media (min-width:1360px){
  .shell:has(.draw){max-width:none;width:1166px;margin:0 0 0 calc(50% - 670px)}
  body:has(.draw) .sidebar{left:calc(50% + 502px)}
  .draw{
    grid-template-columns:58px 768px 256px;column-gap:24px;
    grid-template-areas:"tools scene panel";grid-template-rows:auto;
    margin-top:24px;
  }
  .draw::before{display:none}
  /* -1 px, because the frame of a plate that fills the scene lies 1 px above it */
  .panel{display:block;grid-area:panel;margin-top:-1px;padding-top:10px;border-top:1px solid var(--ink)}
  .scene{margin-top:0}
  .draw p.instruction{white-space:normal;overflow:visible;overflow-wrap:anywhere}
  .draw .prompt{margin-top:0}
  .draw p.instruction + .prompt{margin-top:6px}
  .draw h1.instruction{margin-top:-.1em}
  .draw .prompt h1,.draw h1.instruction{display:block;overflow:visible}
  .clock{flex-wrap:wrap;gap:10px;margin-top:34px;padding:10px 0 0;border-top:1px solid var(--rule)}
  .clock .micro{display:inline}
  .clock b{font-size:40px}
  .panel .hint{margin-top:12px}
  .send-form,.panel > a.send{margin-top:28px}
  .panel .quit{margin-top:20px}
  .tools{flex-direction:column;width:58px;margin-top:-1px;padding:8px;gap:6px}
  .group{flex-direction:column}
  .tools .group + .group{padding:6px 0 0;border-left:0;border-top:1px solid var(--rule)}
  .swatch,.nib,.undo,.tool{width:40px;height:40px}
  .swatch i{inset:7px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none !important;animation:none !important}
  .strip,.flash.is-fading:not(.is-carried){animation:strip-out 0s 3s forwards !important}
}

img.pixel{
  display:block;width:100%;height:auto;
  image-rendering:pixelated;image-rendering:crisp-edges;
}
