/* The timer screen, following the layout of the earlier CubeTimer design:
     getting ready  the big logo, the scramble, how to start
     inspecting     a huge countdown and nothing else
     solving        a huge clock and nothing else
     reviewing      the time on top with its tick boxes and the session's numbers, then the logo and next scramble
   Type scales with the screen (3vmin, as the original did) so it reads the same on a phone and a wide monitor.
   Changes between states are short fades. The clock itself never animates: numbers appear the instant a key moves. */
:root{ --tm-ink:#111; --tm-ink2:#777; --tm-soft:#999; --tm-ready:#3bb54a; --tm-page:#fff; --tm-link:#36c; --tm-fast:.11s;
  --tm-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace; --tm-digits:Arial,Helvetica,"Liberation Sans",sans-serif }
/* Dark, twice, as in application.css: the device's choice, and dark picked by hand. */
@media (prefers-color-scheme: dark){ :root:not([data-theme]){ --tm-ink:#f4f4f4; --tm-ink2:#b0b0b0; --tm-soft:#909090; --tm-ready:#5fe07a; --tm-page:#121212; --tm-link:#7fb0ff } }
:root[data-theme="dark"]{ --tm-ink:#f4f4f4; --tm-ink2:#b0b0b0; --tm-soft:#909090; --tm-ready:#5fe07a; --tm-page:#121212; --tm-link:#7fb0ff }

main.bare{padding:0;min-height:0;background:var(--tm-page)}
body:has(main.bare) header.top .in{max-width:none}
body:has(main.bare) header.top .logo{display:none}

.tm{font-size:clamp(16px,3vmin,60px);line-height:1.25;min-height:calc(100vh - 3.2rem);min-height:calc(100dvh - 3.2rem);
  padding:.6em max(.6em,env(safe-area-inset-right,0px)) max(.8em,env(safe-area-inset-bottom,0px)) max(.6em,env(safe-area-inset-left,0px));
  display:flex;flex-direction:column;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;
  touch-action:manipulation}   /* scrolling and pinching still work; a quick stop-then-start is never taken for a double-tap zoom */
.tm-flash{font-size:.8em;margin:0 auto .5em;max-width:40em;text-align:center}
.tm-a{border:0;background:none;padding:0;font:inherit;color:var(--tm-link);text-decoration:underline;cursor:pointer}
.tm:not([data-state="review"]) #nudge{display:none}
.tm[data-state="inspect"] .tm-limit,.tm[data-state="solve"] .tm-limit{display:none}    /* never while a solve is being timed */
.tm-limit a{color:var(--tm-link)}
@media (pointer:coarse){ #keysBtn{display:none} }

/* ---- the corners: the timer's controls, out of the way of the middle ----
   The row lets touches and clicks through everywhere but on its buttons. On a wide desktop screen it takes up no
   height: the middle of the page never reaches the corners there, and the post-solve block starts a little lower
   so the numbers beside the time stay clear of the buttons. */
.tm-hud{display:flex;justify-content:space-between;align-items:center;gap:.6em;font-size:15px;line-height:1;min-height:2.6em;position:relative;z-index:2;pointer-events:none}
.tm-hud button{pointer-events:auto}
.tm-hudr{display:inline-flex;align-items:center;gap:.25em}
.tm-chip{display:inline-flex;align-items:center;gap:.4em;min-height:2.3em;padding:.25em .85em;border:1px solid var(--line);border-radius:999px;background:var(--tm-page);color:var(--tm-ink2);font:500 1em/1 var(--body);white-space:nowrap;cursor:pointer;transition:color .15s,background-color .15s,border-color .15s}
.tm-chip:hover,.tm-chip:focus-visible{color:var(--fg);background:var(--chip)}
.tm-chip svg{width:1.2em;height:1.2em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tm-chip b{font-weight:600;font-variant-numeric:tabular-nums}
.tm-chip b:empty{display:none}
.tm-hud .tm-tool{width:2.4em;height:2.4em;margin-top:0;color:var(--tm-ink2)}
@media (pointer:coarse){ .tm-chip{min-height:2.6em} .tm-hud .tm-tool{width:2.6em;height:2.6em} }
@media (min-aspect-ratio:16/10) and (min-width:1000px) and (min-height:481px){ .tm-hud{margin-bottom:-2.6em} .tm-review{padding-top:1.5em} }

/* ---- getting ready ---- */
.tm-prep{text-align:center;margin:auto 0;padding-bottom:1em;touch-action:manipulation}
.tm-hero{position:relative;margin:0 auto;width:min(80vw,150vh,1575px);aspect-ratio:1575/504;transition:width var(--tm-fast) ease-out}
/* The cube is lit at full strength on top and sinks into the page behind the lettering (which starts 41% of the way
   down the cube and ends at 73%), so the letters keep their punch. */
.tm-hero .cube{position:absolute;left:60.6%;top:1%;width:28.6%;height:auto;
  --fade:linear-gradient(to bottom,#000 0,#000 26%,rgba(0,0,0,.62) 40%,rgba(0,0,0,.3) 54%,rgba(0,0,0,.12) 70%,transparent 87%);
  -webkit-mask-image:var(--fade);mask-image:var(--fade)}
/* A soft halo in the page's own color lifts the lettering off the cube behind it. */
.tm-hero .word{position:absolute;left:0;top:48.6%;width:100%;height:auto;pointer-events:none;filter:drop-shadow(0 0 .1em var(--bg)) drop-shadow(0 0 .45em var(--bg))}
.tm-scrline{margin:.5em auto 0;color:var(--tm-soft);padding:0 .5em;max-width:min(96vw,60em);text-wrap:balance}
.tm-scr{font-size:clamp(16px,2.5vw,1.5em);overflow-wrap:anywhere;word-spacing:.35em}
.tm-scr.long{font-size:clamp(14px,1.7vw,1.05em);word-spacing:.2em}
.tm-scr.lines{white-space:pre-line;font-size:clamp(12px,1.5vw,.9em);word-spacing:.15em}
/* The two small tools after the scramble: a fresh scramble, and the picture of the scrambled cube. */
.tm-tools{white-space:nowrap;margin-left:.3em}
.tm-tool{display:inline-flex;align-items:center;justify-content:center;width:1.9em;height:1.9em;vertical-align:middle;margin-top:-.25em;border:0;padding:0;border-radius:50%;background:none;color:inherit;opacity:.75;cursor:pointer;transition:opacity .15s,background-color .15s}
.tm-tool[hidden]{display:none}
.tm-tool svg{width:1.25em;height:1.25em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .35s ease-out}
.tm-tool:hover,.tm-tool:focus-visible{opacity:1;background:var(--chip)}
.tm-tool[aria-pressed="true"]{opacity:1;color:var(--accent)}
.tm-tools .tm-tool{color:var(--tm-link);opacity:.9}
.tm-tools .tm-tool[aria-pressed="true"]{background:var(--chip);opacity:1}
#nextScramble:active svg{transform:rotate(200deg)}
.tm-scr{cursor:pointer}
.tm-pic{display:flex;justify-content:center;align-items:center;gap:1.2em;margin-top:.6em;cursor:pointer;animation:tm-in var(--tm-fast) ease-out}
.tm-pic[hidden]{display:none}
/* The two pictures of the scrambled cube are drawings (SVG), so they stay sharp at any size. */
.tm-cube3{width:clamp(88px,16vmin,200px);height:auto;display:block;overflow:visible}
.tm-net{height:clamp(112px,20vmin,250px);width:auto;display:block}
/* After a solve the screen is fuller, so the pictures give some height back. */
.tm[data-state="review"] .tm-cube3{width:clamp(72px,12.5vmin,160px)}
.tm[data-state="review"] .tm-net{height:clamp(88px,14.5vmin,190px)}
.tm-ready{margin:.5em 0 0;color:var(--tm-ready);font-weight:700;letter-spacing:.06em;min-height:1.25em}
.tm-prompt{margin:1.4em auto 0;max-width:36em;padding:0 .5em}
.tm-prompt a{color:var(--tm-link);white-space:nowrap}
.tm-prompt[hidden]{display:none}
.tm-gotit{font-size:.75em;margin-left:.5em;white-space:nowrap}
.tm-morelink{margin:0;font-size:max(13px,.56em);text-align:center}
.tm-morelink a{color:var(--tm-soft);text-decoration:none;display:inline-flex;flex-direction:column;align-items:center;gap:.1em;padding:.3em .8em}
.tm-morelink a:hover{color:var(--fg)}
.tm-morelink span{display:block;animation:tm-nudge 4s ease-in-out infinite}
@keyframes tm-nudge{ 0%,78%,100%{transform:none} 84%{transform:translateY(.28em)} 90%{transform:translateY(-.08em)} 95%{transform:translateY(.14em)} }
.tm[data-state="review"] .tm-morelink{display:none}
@media (prefers-reduced-motion: reduce){ .tm-morelink span{animation:none} }
.tm-sub{margin:.9em auto 0;color:var(--tm-soft);font-size:.72em;max-width:38em}
.tm-sub:empty{display:none}

/* ---- reviewing: the last solve sits above the logo ----
   Everything is on the page's center line and reads top to bottom: the time, what you can say about it, the logo,
   the next scramble. The session's numbers are the quiet part: two short tables under the time, or either side of
   it when the screen is wide enough (see the 16:10 rule below). */
.tm-review{display:none;container-type:inline-size;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"time time" "flags flags" "meta meta" "a b";
  column-gap:2em;align-items:center;justify-items:center;padding:.5em 0 .6em;-webkit-user-select:text;user-select:text}
.tm[data-state="review"] .tm-review{display:grid;animation:tm-in var(--tm-fast) ease-out}
/* The time is as big as --cap allows, and smaller when it has many characters: a character is about .55 of the font
   size wide, and --room is the width to leave for whatever stands beside it. */
.tm-rtime{--len:5;--cap:5.6em;--room:1em;grid-area:time;font:italic 400 min(var(--cap),20vw)/1 var(--tm-digits);text-align:center;white-space:nowrap;
  background:linear-gradient(to bottom,var(--tm-ink2),var(--tm-ink) 62%);-webkit-background-clip:text;background-clip:text;color:transparent;padding:0 .08em .06em}
@supports (width:1cqw){ .tm-rtime{font-size:min(var(--cap),calc((100cqw - var(--room)) / (var(--len) * .55)))} }
.tm-rtime.best{animation:tm-pop .45s ease-out}
.tm-rtime.off{opacity:.3;text-decoration:line-through;text-decoration-thickness:.04em}
.tm-flags{grid-area:flags;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:0 1.7em;margin-top:.15em;font-size:max(14px,.72em);color:var(--tm-ink2)}
.tm-flags label{display:inline-flex;align-items:center;gap:.45em;padding:.35em 0;cursor:pointer;white-space:nowrap}
.tm-flags label:has(input:disabled){opacity:.45;cursor:default}
.tm-flags input{width:1.05em;height:1.05em;margin:0;accent-color:var(--accent)}
.tm-flags i{font-style:normal}
.tm-metalinks{display:inline-flex;gap:1.7em;margin-left:.6em;white-space:nowrap}
.tm-metalinks .tm-a{padding:.35em 0}
.tm-metalinks .tm-a[hidden]{display:none}
.tm-meta{grid-area:meta;display:flex;flex-direction:column;align-items:center;min-width:0;width:min(100%,44em);font-size:max(14px,.72em);text-align:center}
.tm-used{margin:.3em 0 0;color:var(--tm-soft);overflow-wrap:anywhere;white-space:pre-line;word-spacing:.2em;text-wrap:balance}
.tm-noteacts{margin:.35em 0 0;display:flex;gap:1.6em;justify-content:center}
.tm-noteacts[hidden],.tm-used[hidden]{display:none}
.tm-used.off{text-decoration:line-through;opacity:.55}
.tm-usedtick{display:inline-flex;align-items:center;gap:.45em;cursor:pointer;color:var(--tm-ink2)}
.tm-usedtick[hidden]{display:none}
.tm-usedtick input{width:1.05em;height:1.05em;margin:0;accent-color:var(--accent)}
.tm-note{margin:.3em 0 0;font-style:italic;color:var(--tm-ink2);white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer}
.tm-notebox{display:block;width:min(100%,26em);margin-top:.5em;padding:.4em .5em;font:400 max(16px,1em)/1.35 var(--body);color:var(--fg);background:var(--surface);border:1px solid var(--line);border-radius:6px;resize:none;text-align:left;-webkit-user-select:text;user-select:text}
.tm-notebox[hidden]{display:none}
/* The session's numbers. Each table keeps a straight edge on the side that faces the time. */
.tm-sstats{margin:.7em 0 0;display:grid;grid-template-columns:auto auto;gap:.3em .8em;font-size:max(13px,.72em);line-height:1.25}
.tm-sstats.a{grid-area:a;justify-self:end}
.tm-sstats.b{grid-area:b;justify-self:start}
.tm-sstats div{display:contents}
.tm-sstats dt{font-weight:500;color:var(--tm-soft);white-space:nowrap}
.tm-sstats.a dt{text-align:right}
.tm-sstats dd{margin:0;text-align:right;white-space:nowrap;font-weight:600;color:var(--tm-ink);font-variant-numeric:tabular-nums}
.tm-sstats dd.none{color:var(--tm-soft);font-weight:400}
.tm-review.nostats .tm-sstats{visibility:hidden}
/* A wide screen has room to spare beside the time, so the two tables stand either side of it and cost no height. */
@media (min-aspect-ratio:16/10){
  .tm-review{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:"a time b" "flags flags flags" "meta meta meta";column-gap:2.2em}
  .tm-rtime{--cap:6em;--room:27em}
  .tm-sstats{margin-top:0}
}
.tm[data-state="review"] .tm-hero{width:min(44vw,78vh,1575px)}
.tm[data-state="review"] .tm-prompt{margin-top:.5em}
@keyframes tm-in{from{opacity:0;transform:translateY(-.35em)}to{opacity:1;transform:none}}
@keyframes tm-pop{0%{transform:scale(1)}40%{transform:scale(1.05)}100%{transform:scale(1)}}

/* ---- inspecting and solving: one number fills the screen ---- */
.tm-clock{position:fixed;inset:0;z-index:30;background:var(--tm-page);display:none;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  font-size:clamp(16px,3vmin,60px);container-type:inline-size;touch-action:none;-webkit-user-select:none;user-select:none;cursor:default}
body.tm-busy .tm-clock{display:flex}
body.tm-busy{overflow:hidden}
.tm-time{--len:6;font:italic 400 min(calc(150cqw / var(--len)),62vh)/1 var(--tm-digits);white-space:nowrap;font-variant-numeric:tabular-nums;
  background:linear-gradient(to bottom,var(--tm-ink2),var(--tm-ink) 62%);-webkit-background-clip:text;background-clip:text;color:transparent;padding:0 .08em .05em}
@supports not (width:1cqw){ .tm-time{font-size:min(calc(150vw / var(--len)),62vh)} }
.tm-clock .tm-prompt{margin-top:1.2em;color:var(--tm-soft)}
.tm-small-logo{display:block;height:2em;width:auto;margin:1.6em auto 0;opacity:.9}
@media (prefers-reduced-motion: reduce){ .tm[data-state="review"] .tm-review,.tm-rtime.best{animation:none} .tm-hero{transition:none} }

/* ---- narrow and upright screens (the original's portrait rules) ---- */
@media (orientation:portrait){
  .tm-hero{width:95vw}
  .tm-scrline{margin-top:1.4em}
  .tm-scr{font-size:1.15em}
  .tm-scr.long{font-size:.85em}
  .tm-rtime{--cap:5.5em}
  .tm-flags,.tm-meta{font-size:max(15px,.8em)}
  .tm[data-state="review"] .tm-hero{width:72vw}
  .tm-time{font-size:min(calc(132cqw / var(--len)),40vh)}
}
/* A narrow phone: short labels, so the three tick boxes stay on one line. */
@media (orientation:portrait) and (max-width:360px){
  .tm-flags{column-gap:1.3em}
  .tm-flags i{display:none}
  .tm-review{column-gap:1.2em}
}
/* A short upright phone: after a solve the wordmark alone, so the next scramble and the prompt stay on screen. */
@media (orientation:portrait) and (max-height:640px){
  .tm[data-state="review"] .tm-hero{width:62vw;aspect-ratio:1574/240;margin-top:.7em}
  .tm[data-state="review"] .tm-hero .cube{display:none}
  .tm[data-state="review"] .tm-hero .word{top:12%}
  .tm[data-state="review"] .tm-scrline{margin-top:.6em}
}
/* A phone on its side: very little height, so everything tightens and the scramble picture goes. */
@media (max-height:480px) and (orientation:landscape){
  .tm{padding-top:.2em}
  .tm-prep{padding-bottom:.3em}
  .tm-ready{margin-top:.2em}
  .tm-prompt{margin-top:.3em}
  .tm-hero{width:min(62vw,150vh)}
  .tm-review{padding-top:.2em}
  .tm-rtime{--cap:3.4em}
  .tm-flags{margin-top:0}
  .tm-flags label,.tm-metalinks .tm-a{padding:.2em 0}
  .tm-sstats{gap:.1em .8em;font-size:12px}
  .tm[data-state="review"] .tm-hero{width:min(34vw,60vh);aspect-ratio:1574/230}
  .tm[data-state="review"] .tm-hero .cube{display:none}
  .tm[data-state="review"] .tm-hero .word{top:10%}
}

/* ---- this session's times: a sheet that slides in when asked for ---- */
.tm-panel{position:fixed;z-index:25;top:0;right:0;bottom:0;width:min(22rem,92vw);background:var(--surface);border-left:1px solid var(--line);box-shadow:-12px 0 40px rgba(0,0,0,.18);
  display:flex;flex-direction:column;transform:translateX(105%);transition:transform .16s ease-out;visibility:hidden;font-size:16px}
.tm-panel.open{transform:none;visibility:visible}
.tm-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;padding:.9rem .6rem 0 1rem}
.tm-eyebrow{margin:0;font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-weight:500}
.tm-panel-head h2{margin:0;font:700 1.6rem/1.15 var(--display);color:var(--fg)}
.tm-panel-head .tm-tool{width:2.3em;height:2.3em;margin-top:0;color:var(--muted)}
.tm-sessrow{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.3rem .6rem;padding:.25rem 1rem .7rem;min-height:2.4rem}
.tm-sess{margin:0;font-size:.85rem;color:var(--muted)}
.tm-pbtn{border:1px solid var(--line);background:var(--bg);color:var(--fg);border-radius:999px;padding:.3rem .8rem;font-size:.82rem;font-weight:500;white-space:nowrap}
.tm-pbtn:hover{background:var(--chip)}
.tm-pbtn.arm,.tm-more .acts .del.arm{border-color:#d9534f;color:#d9534f;text-decoration:none}
.tm-pbtn[hidden]{display:none}
.tm-pstats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;margin:0 1rem .7rem}
.tm-pstats[hidden]{display:none}
.tm-pstats div{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:.4rem .5rem .45rem;min-width:0}
.tm-pstats dt{font-size:.66rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.tm-pstats dd{margin:.1rem 0 0;font-weight:600;font-size:.95rem;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-pstats dd.none{color:var(--muted);font-weight:400}
.tm-spark{margin:0 1rem .6rem}
.tm-spark[hidden]{display:none}
.tm-spark svg{display:block;width:100%;height:auto;overflow:visible}
.tm-spark polyline{fill:none;stroke:var(--muted);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round;opacity:.8}
.tm-spark circle.best{fill:#2fb561}
.tm-spark circle.last{fill:var(--accent)}
.tm-list{list-style:none;margin:0;padding:.3rem .4rem;overflow:auto;flex:1;min-height:0;border-top:1px solid var(--line)}
.tm-row{display:grid;grid-template-columns:1.7rem minmax(0,1fr) auto 4.6rem;gap:.5rem;align-items:baseline;width:100%;border:0;background:none;color:var(--fg);padding:.42rem .6rem;border-radius:8px;text-align:left;font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}
.tm-row:hover,.tm-list li.open .tm-row{background:var(--chip)}
.tm-row .n,.tm-row .a,.tm-row .w{color:var(--muted);font-size:.78rem;white-space:nowrap}
.tm-row .w{text-align:right}
.tm-row b{font-weight:600}
.tm-row b.dnf{color:var(--muted)}
.tm-row .tag{font-style:normal;font-size:.6rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:.1rem .35rem;border-radius:5px;margin-left:.45rem;vertical-align:.12em;background:rgba(47,181,97,.18);color:#2fb561}
.tm-row .tag.pb{background:#f7d417;color:#111}
.tm-row .tag.man{background:var(--chip);color:var(--muted)}
.tm-row .nt{font-style:normal;margin-left:.4rem;color:var(--muted);font-size:.8rem}
.tm-more{padding:.35rem .6rem .8rem 2.8rem;display:flex;flex-direction:column;gap:.5rem}
.tm-more .seg{display:inline-flex;align-self:flex-start;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.tm-more .seg button{border:0;border-right:1px solid var(--line);background:var(--surface);color:var(--fg);padding:.3rem .85rem;min-height:34px;font-weight:500;font-size:.86rem}
.tm-more .seg button:last-child{border-right:0}
.tm-more .seg button[aria-pressed="true"]{background:var(--accent);color:var(--on-accent)}
.tm-more input.note{width:100%;padding:.4rem .55rem;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--fg);font-size:16px}
.tm-more .scr{margin:0;font:400 .78rem/1.45 var(--tm-mono);color:var(--muted);overflow-wrap:anywhere;white-space:pre-line}
.tm-more .acts{display:flex;gap:1rem;justify-content:space-between;align-items:center}
.tm-more .acts button{border:0;border-bottom:1px solid transparent;background:none;padding:.15rem 0;color:var(--muted);font-size:.82rem;text-decoration:underline}
.tm-more .acts button:hover{color:var(--fg)}
.tm-more .acts .del.arm{font-weight:600}
.tm-empty{color:var(--muted);font-size:.9rem;padding:.9rem 1rem;margin:0;border-top:1px solid var(--line)}
.tm-empty[hidden]{display:none}
.tm-empty:not([hidden]) + .tm-list{border-top:0}
.tm-panel-foot{display:flex;justify-content:space-between;gap:.5rem;padding:.7rem 1rem .9rem;border-top:1px solid var(--line);font-size:.9rem}
.tm-panel-foot a{color:var(--fg);text-decoration:none;font-weight:500}
.tm-panel-foot a:hover{text-decoration:underline}

.tm-dlg h2:focus{outline:none}      /* the heading takes the focus when a dialog opens, so no field pops open on a phone */
.tm-dlg{border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--fg);padding:1.1rem;width:min(30rem,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}
.tm-dlg::backdrop{background:rgba(8,12,18,.55)}
.tm-dlg[open]{display:flex;flex-direction:column;gap:.8rem;animation:tm-in var(--tm-fast) ease-out}
.tm-puzzles{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.4rem}
.tm-puzzles button,.tm-acts button{border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:8px;padding:.5rem .7rem;font-weight:500;min-height:40px;text-align:left}
.tm-puzzles button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.tm-acts{display:flex;justify-content:flex-end}
.tm-opt{display:flex;gap:.6rem;align-items:flex-start}
.tm-opt input{margin-top:.25rem;width:1.1rem;height:1.1rem;flex:none}
.tm-opt span{display:flex;flex-direction:column;gap:.2rem}
.tm-opt small{color:var(--muted);font-size:.85rem}
.tm-opt select{align-self:flex-start;margin-top:.2rem}
.tm-fine{margin:0;font-size:.85rem}
.tm-colors summary{cursor:pointer;display:flex;flex-direction:column;gap:.2rem;list-style:none;padding-left:1.7rem;position:relative}
.tm-colors summary::-webkit-details-marker{display:none}
.tm-colors summary::before{content:"▸";position:absolute;left:.25rem;top:0;color:var(--muted)}
.tm-colors[open] summary::before{content:"▾"}
.tm-colors summary small{color:var(--muted);font-size:.85rem}
.tm-cgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem .8rem;margin:.7rem 0 .5rem 1.7rem}
.tm-cgrid label{display:flex;align-items:center;gap:.5rem;font-size:.88rem}
.tm-cgrid input{width:2.4rem;height:1.9rem;padding:0;border:1px solid var(--line);border-radius:7px;background:none;flex:none}
.tm-colors .tm-fine{margin-left:1.7rem}
.tm-keys{display:grid;grid-template-columns:auto 1fr;gap:.4rem 1rem;margin:0;align-items:baseline}
@media (min-width:720px){ #keysDlg{width:min(46rem,calc(100vw - 24px))} .tm-keys{grid-template-columns:auto 1fr auto 1fr} }
.tm-keys dt{text-align:right}
.tm-keys dd{margin:0;color:var(--fg);font-size:.95rem}
.tm-keys kbd{display:inline-block;min-width:1.7em;text-align:center;padding:.1rem .45rem;border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;background:var(--bg);font:500 .85rem/1.4 var(--tm-mono)}

.tm-about{border-top:1px solid var(--line);padding:2rem 0 1rem;background:var(--bg);scroll-margin-top:3.1rem}
.tm-about h2{font-size:1.3rem}
