/* Color games (15 Oct 2026): /games/, Color Memory and Find the Color with a picker. Its own file, so it never collides with
   the tools' work in site.css. Uses site.css's tokens, buttons, .seg and type; light only, like the rest of the site.
   Wide screens: the game's title and scores on the left, its card on the right. Phones: one column, the card edge to
   edge; Color Memory's make screen and Find the Color's round (color, painting, score) each fit a 390 x 844 screen. */
main.games>.games-hd{display:grid;gap:14px;justify-items:start;margin-top:clamp(28px,4vw,56px);}
.games-hd .kicker{color:var(--ink-2);}
.games-hd h1 em{font-style:italic;}
.gpick{margin-top:6px;}
.gpick button{min-height:38px;padding:0 18px;font-size:15px;}
main.games>.mem{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,460px);grid-template-areas:"hd game" "stats game";grid-template-rows:auto 1fr;
  gap:28px clamp(40px,7vw,120px);align-items:start;margin-top:clamp(24px,3vw,40px);padding-top:clamp(20px,2.5vw,32px);border-top:1px solid var(--ink);}
.mem-hd{grid-area:hd;display:grid;gap:16px;align-content:start;}
.mem-hd h2{font-size:clamp(28px,2.4vw + 12px,40px);line-height:1.05;letter-spacing:-.035em;}
.mem-hd .lede{margin:0;}
/* the Color-blind friendly switch (15 Oct 2026): site.css's .switch, filled ink when on */
.mem-cb{position:relative;display:inline-flex;align-items:center;gap:10px;justify-self:start;min-height:44px;font:500 15px/1.3 var(--sans);cursor:pointer;}
.mem-cb input{position:absolute;left:0;top:50%;width:1px;height:1px;opacity:0;margin:0;}
.mem-cb input:checked+.switch{background:var(--action);}
.mem-cb input:checked+.switch::after{transform:translateX(18px);}
.mem-cb input:focus-visible+.switch{outline:2px solid var(--ink);outline-offset:3px;}
.mem-cb input:disabled+.switch,.mem-cb input:disabled~.mem-cb-t{opacity:.45;}
.mem-cb:has(input:disabled){cursor:default;}
.mem-cbnote{margin:-8px 0 0;font-size:14px;line-height:1.45;color:var(--ink-2);max-width:46ch;}
.mwords{margin:0;font-size:16px;font-weight:600;line-height:1.35;}
.mhues{position:relative;height:16px;font-size:11px;line-height:16px;color:var(--ink-2);}
.mhues span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap;}
.msplit small{display:block;font-size:13px;color:var(--ink-2);margin-top:2px;}
@media (max-width:480px){.mhues .opt{display:none;}}
.mem-side{grid-area:stats;display:grid;gap:16px;align-content:start;}
.mem-stats{display:flex;flex-wrap:wrap;gap:12px 32px;margin:0;padding:14px 0 0;border-top:1px solid var(--line);list-style:none;font-size:14px;color:var(--ink-2);}
.mem-stats b{display:block;font:500 30px/1.1 var(--sans);letter-spacing:-.03em;color:var(--ink);font-variant-numeric:tabular-nums;}
.mem-note{margin:0;font-size:14px;color:var(--ink-3);max-width:46ch;}

/* the game card (both games) */
.mgame{grid-area:game;display:grid;gap:16px;align-content:start;border:1px solid var(--line);padding:20px;scroll-margin-top:12px;min-width:0;}
.mtop{display:flex;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line);
  font:600 11px/1.3 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--ink-2);}
.mtop span{white-space:nowrap;font-variant-numeric:tabular-nums;}
.pk{-webkit-mask:conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) 50%/10px 100%;
          mask:conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) 50%/10px 100%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.07);}
.mfield{width:100%;aspect-ratio:3/2;}
.mfield.blank{background:var(--soft);display:flex;align-items:flex-end;padding:20px;}
.mfield.blank p{margin:0;font-weight:500;font-size:32px;line-height:1;letter-spacing:-.035em;}
.mfield.blank em{font-style:italic;}
/* the start screen (16 Oct 2026, Neli's pick 1 "Show the art"): Color Memory shows yesterday's painting and its five colors,
   Find the Color today's three paintings side by side; a small white "Yesterday" / "Today" tag top left */
.mfield.art{position:relative;overflow:hidden;background:var(--soft);}
.mfield.art img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 30%;}
.mtrip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;height:100%;}
.mtrip img{object-position:center;}
.mtag{position:absolute;left:10px;top:10px;background:#FFFFFF;color:var(--ink);font:600 11px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;padding:6px 8px;}
.mchips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:-4px;}
.mchips i{display:block;height:30px;}
.cap b{font-weight:600;color:var(--ink);}
.msay{margin:0;font-size:16px;line-height:1.45;}
.cap{margin:0;font-size:14px;line-height:1.4;color:var(--ink-2);}
.mbtns{display:flex;flex-wrap:wrap;gap:8px;}
.mbtns.more{padding-top:4px;}
.mtimer{height:4px;background:var(--line);overflow:hidden;}
.mtimer i{display:block;height:100%;background:var(--ink);transform-origin:left center;transform:scaleX(1);transition:transform 3s linear;}   /* the three seconds: information, so it runs with reduced motion too */
/* sliders: the track shows the colors that slider gives; the thumb is a ring so the color shows through */
.msls{display:grid;gap:12px;}
.msl{display:grid;gap:6px;}
.msl label{font-size:14px;font-weight:600;}
.msl input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:32px;margin:0;background:transparent;cursor:pointer;touch-action:pan-y;}
.msl input[type=range]::-webkit-slider-runnable-track{height:32px;border-radius:var(--radius-ctl);background:var(--trk,var(--line));box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);}
.msl input[type=range]::-moz-range-track{height:32px;border-radius:var(--radius-ctl);background:var(--trk,var(--line));box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);}
.msl input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:32px;height:32px;border-radius:50%;background:transparent;border:3px solid #FFFFFF;box-shadow:0 0 0 1.5px var(--ink);}
.msl input[type=range]::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:transparent;border:3px solid #FFFFFF;box-shadow:0 0 0 1.5px var(--ink);}
.msl input[type=range]:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:var(--radius-ctl);}
/* a round's result */
.msplit{display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.msplit div{display:grid;gap:6px;align-content:start;}
.msplit i{display:block;width:100%;aspect-ratio:1/1;}
.msplit span{font-size:14px;color:var(--ink-2);}
.mscorerow{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:center;}
.mscore{margin:0;font-weight:500;font-size:46px;line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums;white-space:nowrap;}
.mscore small{font-size:17px;letter-spacing:0;color:var(--ink-3);font-weight:400;}
/* the end: the painting, yours beside its, the total */
.mpaint{margin:0;display:flex;justify-content:center;background:var(--soft);}
.mpaint img{display:block;max-width:100%;max-height:420px;width:auto;height:auto;}
.mcredit{margin:0;font-size:13px;line-height:1.45;color:var(--ink-2);}
.mrows{display:grid;gap:8px;}
.ml{margin:0;font:600 11px/1.3 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--ink-2);}
.ml:not(:first-child){margin-top:6px;}
.m5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;}
.m5 div{display:grid;gap:4px;align-content:start;min-width:0;}
.m5 i{display:block;height:48px;}
.m5 span{font-size:12px;line-height:1.25;color:var(--ink-2);overflow-wrap:anywhere;}
.m5 .mv{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums;}
.mnext{margin:0;font-size:14px;color:var(--ink-3);}

/* Find the Color: the color to find, the painting (its height capped so tall and wide ones both fit a phone screen with
   the score under them), the tap ring and the dashed ring at the closest spot, and the end's rows */
.ffind{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;align-items:center;}
.ffind>i{display:block;width:56px;height:64px;}
.fnm{margin:0;font-weight:600;font-size:18px;line-height:1.2;}
.fpic{display:flex;justify-content:center;background:var(--soft);}
.fpw{position:relative;display:inline-block;line-height:0;max-width:100%;}
.fpw img{display:block;max-width:100%;width:auto;height:auto;max-height:420px;max-height:clamp(220px,calc(100vh - 400px),460px);max-height:clamp(220px,calc(100svh - 400px),460px);
  cursor:crosshair;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
.fring{position:absolute;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;border:2.5px solid #FFFFFF;box-shadow:0 0 0 2px var(--ink);pointer-events:none;}
.fring.best{width:40px;height:40px;margin:-20px 0 0 -20px;border:2px dashed var(--ink);box-shadow:0 0 0 2px #FFFFFF;}
.fchips{display:grid;grid-template-columns:48px 48px minmax(0,1fr);gap:6px 8px;align-items:start;}
.fchips div{display:grid;gap:4px;}
.fchips i{display:block;width:48px;height:48px;}
.fchips span{font-size:11px;line-height:1.2;color:var(--ink-2);overflow-wrap:anywhere;}
.fchips .msay{padding-left:6px;align-self:center;}
.frows{display:grid;gap:12px;}
.frow{display:grid;grid-template-columns:64px 40px 40px minmax(0,1fr);gap:8px;align-items:start;}
.frow .fth{display:block;width:64px;height:64px;overflow:hidden;background:var(--soft);}
.frow .fth img{display:block;width:100%;height:100%;object-fit:cover;}
.frow>i{display:block;height:64px;}
.frow p{margin:0;}
.fsc{font:500 24px/1.1 var(--sans);letter-spacing:-.02em;font-variant-numeric:tabular-nums;}
.fcr{font-size:12px;line-height:1.35;color:var(--ink-2);}

@media (max-width:900px){
  main.games>.mem{grid-template-columns:minmax(0,1fr);grid-template-areas:"hd" "game" "stats";gap:24px;}
  .mgame{max-width:520px;}
}
@media (max-width:600px){
  main.games>.games-hd{margin-top:20px;gap:10px;}
  main.games>.mem{margin-top:18px;padding-top:18px;}
  .mem-hd{gap:12px;}
  .mem-hd .lede{font-size:17px;}
  .mgame{border:0;padding:0;min-height:0;gap:14px;}
  .mfield{aspect-ratio:5/4;}
}
