/* ART — the library grid and the three editors (pixel, drawing, 3D model).
   Uses the tokens app.css defines; the fallbacks are the hub's values.
   Phone first: one column with the tools under your thumb. From 760px of
   ROOM (a container query, not the window) the editor spreads out: tools left,
   stage centre, colours right. On a phone-width window the open editor goes
   full screen. */

.art-lib, .art-ed, .art-sheet-back {
  --a-bg: var(--bg, #0a0810);
  --a-card: var(--card, #16131f);
  --a-card2: var(--card-2, #1d1929);
  --a-ink: var(--ink, #f6f2ea);
  --a-soft: var(--soft, #b0aabd);
  --a-dim: var(--dim, #7c768b);
  --a-line: var(--line, rgba(255,255,255,.09));
  --a-hot: var(--hot, #ff5b3d);
  --a-gold: var(--gold, #ffb53d);
  --a-art: #a98bff;
  --a-r: 14px;
  font-family: "Work Sans", "WorkSans", system-ui, sans-serif;
  color: var(--a-ink);
  -webkit-tap-highlight-color: transparent;
}
.art-lib *, .art-ed *, .art-sheet-back * { box-sizing: border-box; }
.art-ico { display: block; flex: none; }

/* ---------- library ---------- */
.art-lib { position: relative; height: 100%; min-height: 0; overflow: hidden; background: var(--a-bg); }
.art-lib-page { height: 100%; overflow-y: auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
.art-lib.editing .art-lib-page { visibility: hidden; }
.art-lib-head h2 { margin: 0; font: 800 28px/1.1 "Bricolage Grotesque", "Bricolage", "Work Sans", system-ui, sans-serif; letter-spacing: -.01em; }
.art-lib-head p { margin: 6px 0 16px; color: var(--a-soft); font-size: 15px; line-height: 1.45; max-width: 60ch; }
.art-lib-head code { font: 600 14px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--a-art); background: rgba(169,139,255,.12);
  padding: 3px 7px; border-radius: 7px; white-space: nowrap; }

.art-new { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
.art-new-btn { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; text-align: left; cursor: pointer;
  color: var(--a-ink); background: var(--a-card); border: 1.5px solid var(--a-line); border-radius: var(--a-r);
  transition: border-color .15s, transform .15s, background .15s; }
.art-new-btn:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--a-card)); }
.art-new-btn:active { transform: scale(.98); }
.art-new-btn[data-type="pixel"] { --c: #3bb8f5; }
.art-new-btn[data-type="drawing"] { --c: #f06bb5; }
.art-new-btn[data-type="model"] { --c: #33d17a; }
.art-new-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.art-new-txt b { display: block; font: 700 17px/1.2 "Bricolage Grotesque", "Work Sans", system-ui, sans-serif; }
.art-new-txt small { display: block; margin-top: 3px; color: var(--a-soft); font-size: 14px; line-height: 1.35; }
@media (min-width: 640px) { .art-new { grid-template-columns: repeat(3, 1fr); } .art-new-btn { align-items: flex-start; flex-direction: column; } }
.art-new.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.art-new.compact .art-new-btn { flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; min-height: 0; text-align: center; }
.art-new.compact .art-new-ico { width: 44px; height: 44px; }
.art-new.compact .art-new-txt b { font-size: 15px; }
.art-new.compact .art-new-txt small { display: none; }
@media (min-width: 640px) { .art-new.compact .art-new-btn { flex-direction: row; justify-content: flex-start; padding: 10px 14px; text-align: left; }
  .art-new.compact .art-new-txt small { display: block; } }

.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (min-width: 900px) { .art-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; } }
.art-card { position: relative; border-radius: var(--a-r); background: var(--a-card); border: 1.5px solid var(--a-line); transition: border-color .15s, transform .15s; }
.art-card:hover { border-color: rgba(255,255,255,.22); }
.art-card-open { display: block; width: 100%; padding: 8px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; border-radius: var(--a-r); }
.art-card-open:active { transform: scale(.98); }
.art-card-thumb { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: repeating-conic-gradient(#2a2536 0 25%, #211d2b 0 50%) 0 0 / 16px 16px; }
.art-card-thumb img { width: 86%; height: 86%; object-fit: contain; }
.art-card-cv { display: block; width: 100%; height: 100%; }
.art-card-thumb.crisp img, .art-card-thumb.crisp .art-card-cv { image-rendering: pixelated; }
.art-card-blank { color: var(--a-dim); }
.art-card-name { display: flex; align-items: baseline; gap: 8px; margin: 9px 4px 3px; min-width: 0; }
.art-card-name > span { flex: 1; min-width: 0; font: 700 15px/1.2 ui-monospace, "SF Mono", Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-nframes { flex: none; font: 500 14px/1.2 "Work Sans", system-ui, sans-serif; color: var(--a-dim); }
.art-badge { position: absolute; top: 14px; left: 14px; padding: 3px 8px; border-radius: 8px; font: 700 14px/1.15 "Work Sans", system-ui, sans-serif;
  letter-spacing: .02em; color: #0d0b12; background: #3bb8f5; pointer-events: none; }
.art-card[data-type="drawing"] .art-badge { background: #f06bb5; }
.art-card[data-type="model"] .art-badge { background: #33d17a; }
.art-card-more { position: absolute; top: 8px; right: 8px; background: rgba(10,8,16,.7) !important; }
.art-empty { display: grid; justify-items: center; gap: 4px; padding: 36px 20px; text-align: center; color: var(--a-dim);
  border: 1.5px dashed var(--a-line); border-radius: var(--a-r); }
.art-empty p { margin: 0; max-width: 46ch; color: var(--a-soft); font-size: 15px; line-height: 1.5; }

/* the open editor fills the library; on a phone-width window, the whole screen */
.art-host { position: absolute; inset: 0; z-index: 5; background: var(--a-bg); }
@media (max-width: 759px) {
  .art-host { position: fixed; z-index: 60; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
}
.art-host > .art-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--a-soft); font-size: 16px; }

/* ---------- buttons ---------- */
.art-ib { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 12px; cursor: pointer;
  color: var(--a-ink); background: rgba(255,255,255,.05); border: 1.5px solid transparent; transition: background .12s, border-color .12s, color .12s, transform .1s; }
.art-ib:hover { background: rgba(255,255,255,.1); }
.art-ib:active { transform: scale(.93); }
.art-ib:disabled { opacity: .3; cursor: default; transform: none; }
.art-ib:focus-visible, .art-sw:focus-visible, .art-btn:focus-visible, .art-card-open:focus-visible, .art-new-btn:focus-visible,
.art-choice:focus-visible, .art-done:focus-visible, .art-thumb:focus-visible, .art-size:focus-visible, .art-fps:focus-visible { outline: 3px solid var(--a-gold); outline-offset: 2px; }
.art-tool.on { color: #0d0b12; background: var(--a-gold); border-color: var(--a-gold); }
.art-toggle.on { color: var(--a-gold); background: rgba(255,181,61,.14); border-color: rgba(255,181,61,.6); }
.art-tool.art-toggle.on { color: var(--a-gold); background: rgba(255,181,61,.14); }

/* ---------- editor frame ---------- */
.art-ed { container: arted / inline-size; position: relative; height: 100%; }
.art-ed-in { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.art-top { display: flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 58px; border-bottom: 1px solid var(--a-line);
  background: linear-gradient(var(--a-card), color-mix(in srgb, var(--a-card) 70%, var(--a-bg))); }
.art-namebox { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 0 4px; }
.art-name { width: 100%; min-width: 0; max-width: 340px; height: 30px; padding: 0 8px; margin-left: -8px; border-radius: 8px; border: 1.5px solid transparent;
  background: transparent; color: var(--a-ink); font: 700 17px/1 ui-monospace, "SF Mono", Menlo, monospace; text-overflow: ellipsis; }
.art-name:hover { border-color: var(--a-line); }
.art-name:focus { outline: none; border-color: var(--a-gold); background: rgba(0,0,0,.25); }
.art-saved { font-size: 14px; color: var(--a-dim); line-height: 1.1; }
.art-saved::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #3ee08f; vertical-align: 1px; }
.art-saved.busy::before { background: var(--a-gold); }
.art-done { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; margin-left: 2px; border: 0; border-radius: 12px; cursor: pointer;
  color: #0d0b12; background: var(--a-gold); font: 800 16px/1 "Bricolage Grotesque", "Work Sans", system-ui, sans-serif; }
.art-done:active { transform: scale(.96); }
@container arted (max-width: 520px) { .art-done span { display: none; } .art-done { width: 48px; padding: 0; justify-content: center; } .art-top { gap: 4px; padding: 6px 8px; } }

.art-body { flex: 1; min-height: 0; display: grid; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  grid-template: "stage" minmax(160px, 1fr) "frames" auto "opts" auto "tools" auto "side" auto / minmax(0, 1fr); }
.art-stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; border-radius: var(--a-r); touch-action: none;
  background: radial-gradient(120% 90% at 50% 40%, #1a1625, #0f0c16); border: 1px solid var(--a-line); user-select: none; -webkit-user-select: none; }
.art-cv { position: absolute; inset: 0; display: block; touch-action: none; }
.art-stage[data-tool="pick"] .art-cv { cursor: crosshair; }
.art-raster .art-stage .art-cv { cursor: crosshair; }
.art-stage3d .art-cv { cursor: pointer; }
.art-stage3d[data-tool="look"] .art-cv { cursor: grab; }
.art-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--a-soft); font-size: 16px; pointer-events: none; }
.art-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 999px;
  background: rgba(10,8,16,.78); color: var(--a-ink); font-size: 15px; text-align: center; pointer-events: none; }
.art-hint[hidden] { display: none; }
.art-count { position: absolute; right: 10px; bottom: 8px; padding: 3px 9px; border-radius: 8px; background: rgba(10,8,16,.7); color: var(--a-soft); font-size: 14px; pointer-events: none; }
.art-ed.playing .art-stage { box-shadow: inset 0 0 0 2px var(--a-gold); }
.art-preview { position: absolute; top: 8px; right: 8px; z-index: 2; width: 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(255,255,255,.18); background: #211d2b; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.art-preview canvas { display: block; width: 100%; height: 100%; }
.art-preview[hidden], .art-ed.playing .art-preview { display: none; }
@container arted (min-width: 760px) { .art-preview { width: 120px; height: 120px; top: 12px; right: 12px; } }

/* tools */
.art-tools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.art-sizes { display: flex; gap: 4px; }
.art-size { display: grid; place-items: center; width: 40px; height: 44px; padding: 0; border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.04); }
.art-size i { display: block; width: var(--d); height: var(--d); border-radius: 50%; background: var(--a-soft); }
.art-size.on { border-color: var(--a-gold); background: rgba(255,181,61,.12); }
.art-size.on i { background: var(--a-gold); }

/* the selected tool's options: size, shape, mirror, opacity... */
.art-opts { grid-area: opts; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 0; }
.art-opts:empty { display: none; }
.art-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 44px; min-width: 44px; padding: 0 9px;
  border-radius: 12px; border: 1.5px solid transparent; background: rgba(255,255,255,.05); color: var(--a-ink); cursor: pointer;
  font: 600 14px/1 "Work Sans", system-ui, sans-serif; transition: background .12s, border-color .12s, color .12s, transform .1s; }
.art-chip.text { padding: 0 12px 0 9px; }
.art-chip:hover { background: rgba(255,255,255,.1); }
.art-chip:active { transform: scale(.94); }
.art-chip.on { color: var(--a-gold); background: rgba(255,181,61,.14); border-color: rgba(255,181,61,.6); }
.art-chip:disabled { opacity: .3; cursor: default; transform: none; }
.art-chip:focus-visible, .art-slider:focus-within { outline: 3px solid var(--a-gold); outline-offset: 2px; }
.art-slider { display: flex; align-items: center; gap: 6px; flex: 1 1 140px; min-width: 128px; max-width: 230px; height: 44px; padding: 0 10px;
  border-radius: 12px; background: rgba(255,255,255,.04); color: var(--a-soft); cursor: pointer; }
.art-slider input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--a-gold); cursor: pointer; }
.art-slider-v { flex: none; min-width: 3.1em; text-align: right; font: 600 14px/1 "Work Sans", system-ui, sans-serif; color: var(--a-ink); }
.art-opt-hint { color: var(--a-soft); font-size: 14px; line-height: 1.25; padding: 0 2px; }
.art-opt-sw { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }

/* palette: 4 rows of 8 on a phone */
.art-side { grid-area: side; min-width: 0; }
.art-pal-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.art-sw { position: relative; height: 44px; min-width: 0; padding: 0; border-radius: 9px; cursor: pointer; background: var(--c);
  border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .1s; }
.art-sw:active { transform: scale(.9); }
.art-sw.on { box-shadow: 0 0 0 2.5px var(--a-bg), 0 0 0 5px var(--a-ink); z-index: 1; }
.art-sw.recent::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.art-sw-own { display: block; overflow: hidden; background: conic-gradient(from 90deg, #ff5b5b, #ffd23f, #4ade80, #2ec4b6, #3b9bff, #a98bff, #ff7ac6, #ff5b5b); }
.art-sw-own::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 0 2px rgba(10,8,16,.75); }
.art-pal-own-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.art-sw-pals { display: grid; place-items: center; color: var(--a-ink); background: rgba(255,255,255,.07); }
.art-pal-head { display: none; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 10px; }
.art-pal-head b { font: 700 15px/1 "Bricolage Grotesque", "Work Sans", system-ui, sans-serif; color: var(--a-soft); }
.art-pal-name { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 9px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--a-line); background: rgba(255,255,255,.04); color: var(--a-ink); font: 600 14px/1 "Work Sans", system-ui, sans-serif; }
.art-pal-name:hover { background: rgba(255,255,255,.09); }

/* frames strip (pixel + drawing) and the baked sprites strip (3D) */
.art-frames { grid-area: frames; display: flex; align-items: center; gap: 6px; min-width: 0; }
.art-thumbs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 3px 2px; scrollbar-width: none; }
.art-thumbs::-webkit-scrollbar { display: none; }
.art-thumb { position: relative; flex: none; width: 46px; height: 46px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--a-line); background: #211d2b; }
.art-thumb canvas { width: 100%; height: 100%; display: block; }
.art-thumb span { position: absolute; right: 2px; bottom: 1px; font: 700 14px/1 "Work Sans", system-ui, sans-serif; color: var(--a-ink); text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.art-thumb.on { border-color: var(--a-gold); }
.art-play.on { color: #0d0b12; background: var(--a-gold); }
.art-fps { flex: none; height: 44px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--a-line); background: rgba(255,255,255,.04);
  color: var(--a-soft); font: 600 14px/1 "Work Sans", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.art-frames [hidden] { display: none; }
.art-sprites-label { flex: none; display: flex; flex-direction: column; line-height: 1.1; padding-right: 2px; }
.art-sprites-label b { font: 700 14px/1.1 "Bricolage Grotesque", "Work Sans", system-ui, sans-serif; color: var(--a-ink); }
.art-sprites-label small { font-size: 14px; color: var(--a-dim); }
.art-sprites .art-thumbs { gap: 4px; }
.art-sprite { flex: 1 1 0; min-width: 0; max-width: 52px; aspect-ratio: 1; border-radius: 8px; object-fit: contain;
  background: repeating-conic-gradient(#2a2536 0 25%, #211d2b 0 50%) 0 0 / 10px 10px; border: 1.5px solid var(--a-line); }

/* ---------- wide: tools left, stage centre, colours right ---------- */
@container arted (min-width: 760px) {
  .art-body { gap: 12px; padding: 12px;
    grid-template: "tools opts side" auto "tools stage side" minmax(0, 1fr) "tools frames side" auto / 60px minmax(0, 1fr) clamp(240px, 24vw, 300px); }
  .art-tools { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-self: start; padding: 8px; border-radius: var(--a-r);
    background: var(--a-card); border: 1px solid var(--a-line); }
  .art-opts { justify-content: flex-start; padding: 6px; border-radius: var(--a-r); background: var(--a-card); border: 1px solid var(--a-line); }
  .art-side { align-self: start; padding: 12px; border-radius: var(--a-r); background: var(--a-card); border: 1px solid var(--a-line); }
  .art-pal-head { display: flex; }
  .art-sw-pals { display: none; }
  .art-pal-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .art-sw { height: auto; aspect-ratio: 1; }
  .art-thumb { width: 54px; height: 54px; }
  .art-frames { padding: 6px; border-radius: var(--a-r); background: var(--a-card); border: 1px solid var(--a-line); }
}

/* ---------- sheets + toast ---------- */
.art-sheet-back { position: absolute; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5,4,9,.6); animation: art-fade .15s ease-out; }
@media (max-width: 759px) { .art-sheet-back { position: fixed; } }
.art-sheet { width: min(520px, 100%); max-height: 88%; overflow-y: auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--a-card); border: 1px solid rgba(255,255,255,.12); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.5);
  animation: art-up .2s cubic-bezier(.2,.9,.3,1.1); }
@media (min-width: 640px) { .art-sheet-back { align-items: center; } .art-sheet { border-radius: 20px; } }
.art-sheet h3 { margin: 0 0 8px; font: 800 21px/1.2 "Bricolage Grotesque", "Work Sans", system-ui, sans-serif; overflow-wrap: anywhere; }
.art-sheet p { margin: 0 0 12px; color: var(--a-soft); font-size: 15px; line-height: 1.5; }
.art-uses p { color: var(--a-ink); }
.art-sheet-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.art-btn { min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
  color: var(--a-ink); font: 700 16px/1 "Work Sans", system-ui, sans-serif; cursor: pointer; }
.art-btn.go { background: var(--a-gold); color: #0d0b12; border-color: var(--a-gold); }
.art-btn.danger { background: var(--a-hot); color: #fff; border-color: var(--a-hot); }
.art-choices { display: grid; gap: 6px; }
.art-choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; text-align: left; border-radius: 12px; cursor: pointer;
  color: var(--a-ink); background: rgba(255,255,255,.04); border: 1.5px solid var(--a-line); }
.art-choice:hover { background: rgba(255,255,255,.08); }
.art-choice b { display: block; font-size: 16px; }
.art-choice small { display: block; margin-top: 2px; color: var(--a-soft); font-size: 14px; }
.art-choice.danger { color: #ff8a73; }
.art-choice.current { border-color: rgba(255,181,61,.7); background: rgba(255,181,61,.08); }
.art-choice > span { flex: 1; min-width: 0; }
.art-choice-sw { display: flex; gap: 2px; margin-top: 7px; }
.art-choice-sw i { flex: 1 1 0; min-width: 0; height: 14px; border-radius: 3px; background: var(--c); }
.art-choice.danger b { color: #ff8a73; }
.art-input { width: 100%; height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(0,0,0,.3);
  color: var(--a-ink); font: 600 18px/1 ui-monospace, "SF Mono", Menlo, monospace; }
.art-input:focus { outline: none; border-color: var(--a-gold); }
.art-note { margin-top: 8px !important; font: 600 15px/1.3 ui-monospace, "SF Mono", Menlo, monospace !important; color: var(--a-art) !important; }
.art-toast { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%);
  width: max-content; max-width: min(460px, calc(100% - 32px)); padding: 10px 16px; border-radius: 12px; background: #2a2438; color: var(--a-ink); font-size: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); animation: art-up .2s ease-out; transition: opacity .35s, transform .35s;
  pointer-events: none; text-align: center; line-height: 1.35; }
.art-toast.bye { opacity: 0; transform: translate(-50%, 8px); }
@keyframes art-fade { from { opacity: 0; } }
@keyframes art-up { from { opacity: 0; transform: translateY(16px); } }
.art-toast { animation-name: art-toast-in; }
@keyframes art-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  .art-lib *, .art-ed *, .art-sheet-back, .art-sheet-back * { animation: none !important; transition: none !important; }
}

/* BUG HUNT: touch screens get 44px targets in the art editors too (the name box was 30px tall,
   and on an iPad's wide layout the 6-across colours were 38px) */
@media (pointer: coarse) {
  .art-name { height: 44px; }
  @container arted (min-width: 760px) {
    .art-pal-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .art-sw { min-height: 44px; }
  }
}
