/* Self-hosted fonts (latin subset) from Google Fonts. All SIL Open Font License 1.1. */
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-sans-0.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/ibm-plex-sans-0.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/ibm-plex-sans-0.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/inter-1.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/inter-1.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/inter-1.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Inter";font-style:normal;font-weight:800;font-display:swap;src:url(fonts/inter-1.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/jetbrains-mono-2.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/jetbrains-mono-2.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Roboto Slab";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/roboto-slab-3.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Roboto Slab";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/roboto-slab-3.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Source Sans 3";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/source-sans-3-4.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Source Sans 3";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/source-sans-3-4.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Source Sans 3";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/source-sans-3-4.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

#rsc { box-sizing: border-box; width: 100%; }
#rsc{
--bg: #0b0c10;
--bg-elev: #14161c;
--bg-elev-2: #1c1f28;
--border: #2a2e38;
--text: #f2f4f8;
--muted: #8b90a0;
--green: #3ee07a;
--green-dim: rgba(62, 224, 122, 0.18);
--red: #ff4b4b;
--red-dim: rgba(255, 75, 75, 0.18);
--amber: #ffcc4d;
--accent: #ff8a3d;
--blue: #7aa8ff;
}
#rsc *{ box-sizing: border-box; }
#rsc{
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
touch-action: manipulation;
}
#rsc{
display: flex;
flex-direction: column;
min-height: 100vh;
min-height: 100dvh;
overflow-x: hidden;
padding-top: env(safe-area-inset-top, 0px);
padding-right: env(safe-area-inset-right, 0px);
padding-bottom: env(safe-area-inset-bottom, 0px);
padding-left: env(safe-area-inset-left, 0px);
}
#rsc button, #rsc label{
font: inherit;
color: inherit;
}
#rsc button{
background: var(--bg-elev-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.45rem 0.85rem;
cursor: pointer;
color: var(--text);
touch-action: manipulation;
}
#rsc button:hover{ border-color: #4a5160; background: #222632; }
#rsc button:disabled{ opacity: 0.45; cursor: not-allowed; }
#rsc button.on{
background: var(--green-dim);
border-color: var(--green);
color: var(--green);
}
#rsc button.danger:hover{ border-color: var(--red); color: var(--red); }
#rsc button.tiny{
padding: 0.15rem 0.45rem;
font-size: 0.75rem;
border-radius: 6px;
}
#rsc button.tiny.on{ background: var(--green-dim); border-color: var(--green); color: var(--green); }
#rsc button.tiny.dnf.on{ background: var(--red-dim); border-color: var(--red); color: var(--red); }
#rsc #scramble span{ color: var(--muted); font-size: 0.7rem; letter-spacing: 0.12em; display: block; margin-bottom: 0.35rem; text-transform: uppercase; font-family: inherit; }
#rsc #time.holding{ color: var(--amber); }
#rsc #time.failed{ color: var(--red); }
#rsc #time.stopped{ color: var(--text); }
#rsc #time.ready, #rsc #time.running{ color: var(--green); }
#rsc #time.inspect{ color: var(--blue); }
#rsc #time.inspect.set, #rsc #time.inspect.holding{ color: var(--amber); }
#rsc #time.inspect.ready{ color: var(--green); }
#rsc .light-red{ background: #3a1515; }
#rsc .light-amber{ background: #3a2f10; }
#rsc .light-green{ background: #10351c; }
#rsc #stoplight.lit-red .light-red{
opacity: 1;
background: var(--red);
box-shadow: 0 0 26px var(--red), 0 0 8px #ff8a8a, inset 0 2px 8px rgba(255,255,255,0.25);
}
#rsc #stoplight.lit-amber .light-amber{
opacity: 1;
background: var(--amber);
box-shadow: 0 0 26px var(--amber), 0 0 8px #ffe08a, inset 0 2px 8px rgba(255,255,255,0.25);
}
#rsc #stoplight.lit-green .light-green{
opacity: 1;
background: var(--green);
box-shadow: 0 0 26px var(--green), 0 0 8px #9affc0, inset 0 2px 8px rgba(255,255,255,0.25);
}
#rsc.scramble-on #scramble{ display: block; }
#rsc .name-field{
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: var(--muted);
font-size: 0.85rem;
max-width: 100%;
min-height: 44px;
}
#rsc input, #rsc textarea, #rsc select{
font-size: 16px;
touch-action: manipulation;
}
#rsc .name-field input{
background: var(--bg-elev-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.5rem 0.7rem;
color: var(--text);
font-family: inherit;
font-size: 16px;
line-height: 1.2;
width: 12rem;
min-width: 8rem;
max-width: 100%;
min-height: 44px;
flex: 1 1 8rem;
-webkit-user-select: text;
user-select: text;
}
#rsc .name-field input:focus{
outline: none;
border-color: var(--blue);
}
#rsc #status-line .go{ color: var(--green); }
#rsc #status-line .bad{ color: var(--red); }
#rsc .toolbar{
display: flex;
flex-wrap: wrap;
gap: 0.5rem 0.6rem;
align-items: center;
justify-content: center;
padding: 0 1rem 0.75rem;
user-select: none;
max-width: 100%;
}
#rsc .mic{
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: var(--muted);
font-size: 0.85rem;
}
#rsc .dot{
width: 9px;
height: 9px;
border-radius: 50%;
background: #3a3f4c;
box-shadow: 0 0 0 0 transparent;
}
#rsc .dot.listening{
background: var(--green);
box-shadow: 0 0 0 4px var(--green-dim);
animation: rsc-pulse 1.4s ease-out infinite;
}
#rsc .dot.error{ background: var(--red); }
@keyframes rsc-pulse {
0% { box-shadow: 0 0 0 0 var(--green-dim); }
70% { box-shadow: 0 0 0 8px transparent; }
100% { box-shadow: 0 0 0 0 transparent; }
}
#rsc #voice-note, #rsc #voice-unsupported{
width: 100%;
text-align: center;
color: var(--muted);
font-size: 0.78rem;
margin: 0;
}
#rsc #voice-unsupported{ color: var(--amber); display: none; }
#rsc #voice-note{ display: none; }
#rsc .panel{
width: min(720px, 100%);
margin: 0 auto;
padding: 0 1rem 1.5rem;
}
#rsc #stats{
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 0.5rem;
margin-bottom: 0.9rem;
}
#rsc #stats div{
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.55rem 0.35rem 0.6rem;
text-align: center;
}
#rsc #stats span{
display: block;
color: var(--muted);
font-size: 0.68rem;
letter-spacing: 0.08em;
text-transform: uppercase;
margin-bottom: 0.2rem;
}
#rsc #stats b{
font-family: "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, ui-monospace, monospace;
font-size: 1.05rem;
font-weight: 650;
font-variant-numeric: tabular-nums;
}
#rsc .list-head{
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
margin: 0.2rem 0 0.45rem;
flex-wrap: wrap;
}
#rsc .list-head h2{
margin: 0;
font-size: 0.8rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--muted);
font-weight: 650;
}
#rsc .list-actions{ display: flex; gap: 0.4rem; }
#rsc #list{
max-height: 38vh;
overflow: auto;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--bg-elev);
}
#rsc .row{
display: grid;
grid-template-columns: 2.4rem minmax(5.5rem, auto) 1fr auto;
gap: 0.35rem 0.6rem;
align-items: start;
padding: 0.55rem 0.7rem;
border-bottom: 1px solid var(--border);
}
#rsc .row:last-child{ border-bottom: 0; }
#rsc .row .num{ color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
#rsc .row .res{
font-family: "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, ui-monospace, monospace;
font-weight: 650;
font-variant-numeric: tabular-nums;
font-size: 1.05rem;
padding-top: 0.08rem;
}
#rsc .row .res.dnf{ color: var(--red); }
#rsc .row .meta{ min-width: 0; }
#rsc .row .when{ color: var(--muted); font-size: 0.78rem; }
#rsc .row .scr{
color: #b7bcc8;
font-family: "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, ui-monospace, monospace;
font-size: 0.75rem;
line-height: 1.35;
margin-top: 0.15rem;
word-break: break-word;
}
#rsc .row .acts{ display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
#rsc .inspect-cluster{
display: inline-flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 0.4rem;
}
#rsc .seg{
display: inline-flex;
align-items: stretch;
border: 1px solid var(--border);
border-radius: 8px;
overflow: hidden;
background: var(--bg-elev-2);
}
#rsc .seg-btn{
border: 0;
border-radius: 0;
border-right: 1px solid var(--border);
padding: 0.45rem 0.5rem;
min-width: 2.45rem;
background: transparent;
}
#rsc .seg-btn:last-child{ border-right: 0; }
#rsc .seg-btn:hover{ background: #222632; }
#rsc .seg-btn.on{
background: var(--green-dim);
color: var(--green);
}
#rsc.solve-active .toolbar, #rsc.solve-active .panel, #rsc.solve-active header, #rsc.controls-locked .toolbar, #rsc.controls-locked .panel, #rsc.controls-locked header{
pointer-events: none;
}
#rsc.solve-active .toolbar > button, #rsc.solve-active .toolbar .mic, #rsc.solve-active .inspect-cluster, #rsc.solve-active .name-field, #rsc.solve-active .list-actions, #rsc.solve-active .row .acts{
opacity: 0.65;
}

/* v8-fx */
#rsc #pb-confetti{
position: fixed;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 40;
display: none;
}
#rsc #pb-badge{
position: fixed;
left: 50%;
top: max(1.15rem, calc(env(safe-area-inset-top, 0px) + 0.55rem));
transform: translateX(-50%);
background: var(--green-dim);
border: 1px solid var(--green);
color: var(--green);
padding: 0.45rem 0.95rem;
border-radius: 999px;
font-size: 0.92rem;
font-weight: 700;
letter-spacing: 0.04em;
pointer-events: none;
z-index: 50;
opacity: 0;
visibility: hidden;
transition: opacity 0.22s ease, visibility 0.22s ease;
white-space: nowrap;
}
#rsc #pb-badge.show{
opacity: 1;
visibility: visible;
}
#rsc #pb-badge.all-time{
background: rgba(255, 138, 61, 0.18);
border-color: var(--accent);
color: var(--accent);
}
#rsc #toast{
position: fixed;
left: 50%;
bottom: max(1.2rem, calc(env(safe-area-inset-bottom, 0px) + 0.8rem));
transform: translate(-50%, 8px);
background: var(--bg-elev-2);
border: 1px solid var(--border);
color: var(--text);
padding: 0.55rem 0.9rem;
border-radius: 999px;
font-size: 0.88rem;
pointer-events: none;
z-index: 50;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
max-width: calc(100% - 2rem);
text-align: center;
}
#rsc #toast.show{
opacity: 1;
visibility: visible;
transform: translate(-50%, 0);
}
/* v9-fx */
#rsc #comp-glow{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
min-height: 100lvh;
pointer-events: none;
z-index: 30;
display: none;
box-shadow: inset 0 0 90px 14px rgba(150, 90, 255, 0.35), inset 0 0 24px 2px rgba(150, 90, 255, 0.22);
}
#rsc.comp-on #comp-glow{
display: block;
animation: rscGlow 4s ease-in-out infinite;
}
@keyframes rscGlow {
0%, 100% { opacity: 0.7; }
50% { opacity: 1; }
}
#rsc #comp-btn.on{
background: rgba(150, 90, 255, 0.18);
border-color: #a77bff;
color: #c9adff;
}
#rsc.comp-on #inspect-btn, #rsc.comp-on .seg{ opacity: 0.45; }
#rsc #scramble .scr-tag{
display: inline-block;
margin-left: 0.5rem;
padding: 0.05rem 0.45rem;
border: 1px solid rgba(62, 224, 122, 0.45);
border-radius: 999px;
color: var(--green);
font-style: normal;
font-size: 0.62rem;
letter-spacing: 0.08em;
vertical-align: 0.05em;
}
#rsc .row .insp{ color: var(--muted); opacity: 0.75; }
#rsc #install-btn[hidden]{ display: none; }
#rsc .ch-sheet{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 60;
display: none;
align-items: flex-end;
justify-content: center;
background: rgba(0, 0, 0, 0.55);
padding: 1rem 1rem max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.8rem));
}
#rsc .ch-sheet.show{ display: flex; }
#rsc .ch-sheet .sheet-card{
width: 100%;
max-width: 26rem;
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.1rem 1.2rem 1rem;
text-align: left;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
#rsc .ch-sheet h3{ margin: 0 0 0.6rem; font-size: 1.05rem; }
#rsc .ch-sheet ol{
margin: 0 0 1rem;
padding-left: 1.25rem;
line-height: 1.55;
font-size: 0.95rem;
}
#rsc .ch-sheet li + li{ margin-top: 0.3rem; }
#rsc .ch-sheet .ico{ width: 1.1em; height: 1.1em; vertical-align: -0.18em; color: var(--blue); }
#rsc .ch-sheet .sheet-close{ width: 100%; }
#rsc .share-opts{ display: flex; flex-direction: column; gap: 8px; margin: 0.2rem 0 0.9rem; }
#rsc .share-opt{ display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label val" "why val"; align-items: center; width: 100%; min-height: 58px; padding: 10px 16px; border-radius: 14px; text-align: left; background: #1a1d24; border: 1px solid var(--border); color: var(--text, #f2f4f8); }
#rsc .share-opt .so-label{ grid-area: label; font-weight: 700; font-size: 1rem; }
#rsc .share-opt .so-why{ grid-area: why; font-size: 0.78rem; color: var(--muted); }
#rsc .share-opt .so-why:empty{ display: none; }
#rsc .share-opt .so-val{ grid-area: val; font-family: var(--font-mono, ui-monospace, monospace); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
#rsc .share-opt:not(:disabled):hover{ border-color: var(--green); }
#rsc .share-opt:disabled, #rsc .share-opt.off{ opacity: 0.42; cursor: not-allowed; }
#rsc #share-btn:disabled{ opacity: 0.45; cursor: not-allowed; }
#rsc .ch-sheet .fine{ margin: -0.4rem 0 0.9rem; color: var(--muted); font-size: 0.82rem; }
#rsc .comp-cluster{ display: inline-flex; align-items: center; gap: 0.3rem; }
#rsc #comp-help-btn{ padding: 0.45rem 0.7rem; font-weight: 700; color: var(--muted); }
#rsc #voice-comp-hint{
display: none;
width: 100%;
text-align: center;
color: #c9adff;
font-size: 0.78rem;
margin: 0;
}
#rsc.comp-on.voice-on #voice-comp-hint{ display: block; }
@media (max-width: 640px), (pointer: coarse) {
#rsc button, #rsc button.tiny, #rsc .seg-btn{
min-height: 44px;
min-width: 44px;
}
#rsc button.tiny{
padding: 0.35rem 0.7rem;
font-size: 0.85rem;
}
#rsc .seg-btn{
padding: 0.35rem 0.55rem;
}
}
@media (max-width: 640px) {
#rsc #stats{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rsc .row{ grid-template-columns: 2rem minmax(4.5rem, auto) 1fr; }
#rsc .row .acts{ grid-column: 1 / -1; justify-content: flex-start; }
#rsc .list-actions{ flex-wrap: wrap; }
}
@media (max-width: 420px) {
#rsc .toolbar{ padding: 0 0.6rem 0.75rem; gap: 0.4rem 0.45rem; }
#rsc button{ padding: 0.4rem 0.65rem; }
/* keep 44px tap targets; do not shrink .seg-btn below that */
#rsc .seg-btn{ padding: 0.4rem 0.42rem; min-width: 44px; }
#rsc .name-field input{ width: 8.2rem; min-width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) {
#rsc.comp-on #comp-glow{ animation: none; opacity: 0.85; }
}

/* ===== v11: page shell ===== */
html, body{ margin: 0; padding: 0; background: #0b0c10; color: #f2f4f8; }
body{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#rsc{
--font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
--font-time: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
--font-scr: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bg1: #14161c;
--bg2: #1c1f28;
margin: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-ui);
}
#rsc.layout-thumb{
--font-ui: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--font-time: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--font-scr: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, sans-serif;
}
#rsc.layout-hero{
--font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--font-time: "Roboto Slab", "Rockwell", Georgia, "Times New Roman", serif;
--font-scr: "JetBrains Mono", "SF Mono", Menlo, Consolas, ui-monospace, monospace;
}
#rsc button{ font-family: var(--font-ui); }

/* top bar */
#rsc .topbar{
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 10px 14px 0;
user-select: none;
-webkit-user-select: none;
width: 100%;
max-width: 1100px;
margin: 0 auto;
}
#rsc .brand{ display: flex; align-items: center; gap: 9px; min-width: 0; }
#rsc .brand-logo{ position: relative; width: 30px; height: 30px; min-width: 0 !important; min-height: 0 !important; flex: none; display: block; padding: 0 !important; margin: 0; background: none !important; border: 0 !important; border-radius: 6px; perspective: 160px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#rsc .brand-logo::before{ content: ""; position: absolute; inset: -7px; } /* bigger tap area */
#rsc .logo-cube{ position: absolute; inset: 0; display: block; transform-style: preserve-3d; }
#rsc .logo-v{ position: absolute; inset: 0; opacity: 0; transition: opacity 0.18s ease; }
#rsc .logo-v.on{ opacity: 1; }
#rsc .logo-v svg{ width: 100%; height: 100%; display: block; }
#rsc .brand-logo.spin-out .logo-cube{ animation: rscCubeOut 0.17s ease-in forwards; }
#rsc .brand-logo.spin-in .logo-cube{ animation: rscCubeIn 0.26s cubic-bezier(.2, 1.5, .5, 1) forwards; }
#rsc .brand-logo.spin-out .logo-v, #rsc .brand-logo.spin-in .logo-v{ transition: none; }
@keyframes rscCubeOut { from { transform: rotateY(0) rotateX(0) scale(1); } to { transform: rotateY(90deg) rotateX(18deg) scale(0.82); } }
@keyframes rscCubeIn { from { transform: rotateY(-90deg) rotateX(-18deg) scale(0.82); } to { transform: rotateY(0) rotateX(0) scale(1); } }
/* Time mask: while a solve runs, a pulsing all-green cube sits where the digits were (same footprint). */
#rsc #mask-cube{ position: absolute !important; left: 0; right: 0; top: 0; display: none; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 2; --mask-size: 200px; }
#rsc.hide-digits[data-state="running"] #mask-cube{ display: flex; }
#rsc #mask-cube .mask-icon{ position: relative; display: block; width: var(--mask-size); height: var(--mask-size); animation: rscMaskPulse 1.2s ease-in-out infinite; will-change: transform, filter; }
#rsc #mask-cube .mask-icon::before{ content: ""; position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(circle, rgba(62, 224, 122, 0.34) 0%, rgba(62, 224, 122, 0.12) 45%, rgba(62, 224, 122, 0) 70%); }
#rsc #mask-cube .logo-v{ position: absolute; inset: 0; opacity: 0; }
#rsc #mask-cube .logo-v.on{ opacity: 1; }
#rsc #mask-cube svg{ width: 100%; height: 100%; display: block; }
#rsc #mask-cube .mask-cap{ height: 18px; line-height: 18px; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--green); opacity: 0.75; white-space: nowrap; }
@keyframes rscMaskPulse {
0%, 100% { transform: scale(0.97); filter: drop-shadow(0 0 4px rgba(62, 224, 122, 0.25)); }
50% { transform: scale(1.03); filter: drop-shadow(0 0 16px rgba(62, 224, 122, 0.65)); }
}
@media (prefers-reduced-motion: reduce) {
#rsc #mask-cube .mask-icon{ animation: none; filter: drop-shadow(0 0 8px rgba(62, 224, 122, 0.4)); }
}
#rsc .brand h1{
margin: 0;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#rsc .top-actions{ display: flex; align-items: center; gap: 5px; flex: none; }
#rsc .top-actions > button, #rsc .comp-cluster > button{
height: 36px;
min-height: 36px;
padding: 0 11px;
border-radius: 18px;
font-size: 13px;
font-weight: 600;
white-space: nowrap;
}
#rsc #comp-help-btn{ width: 36px; min-width: 36px; padding: 0; display: none; }
#rsc.comp-on #comp-help-btn{ display: inline-block; }
#rsc .icon-btn{ width: 36px; min-width: 36px; padding: 0 !important; display: inline-grid; place-items: center; color: var(--muted); }
#rsc .comp-cluster{ gap: 4px; }
#rsc .voice-line{ display: none; flex-wrap: wrap; justify-content: center; gap: 4px 12px; padding: 6px 14px 0; }
#rsc.voice-on .voice-line{ display: flex; }
#rsc .voice-line p{ width: auto !important; }

/* stage: one grid, three layouts */
#rsc #stage{
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
justify-items: center;
column-gap: 10px;
width: 100%;
max-width: 760px;
margin: 0 auto;
padding: 10px 16px 12px;
min-height: calc(100vh - 58px);
min-height: calc(100svh - 58px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
text-align: center;
touch-action: pan-y; /* idle: scroll from anywhere, including the panel */
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
cursor: default;
}
#rsc.voice-on #stage{ min-height: calc(100svh - 92px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
#rsc #stage > *{ position: relative; z-index: 1; }
#rsc #stage > .pad-bg{ z-index: 0; }
#rsc .scr-box{ grid-area: scr; display: none; align-items: center; gap: 10px; width: 100%; touch-action: pan-y; cursor: default; }
#rsc.scramble-on .scr-box{ display: flex; }
#rsc:not(.scramble-on) #scramble{ display: none; }
#rsc #scramble{
display: block;
flex: 1;
min-width: 0;
font-family: var(--font-scr);
font-size: 19px;
font-weight: 600;
line-height: 1.4;
letter-spacing: 0.02em;
word-spacing: 4px;
color: var(--text);
min-height: 2.8em;
margin: 0;
}
#rsc #scramble span{ font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; margin-bottom: 4px; font-family: var(--font-ui); word-spacing: 0; }
#rsc #new-scramble-btn{
flex: none;
font-size: 13px;
font-weight: 700;
color: var(--muted);
background: transparent;
border: 0;
border-left: 1px solid var(--border);
border-radius: 0;
padding: 4px 4px 4px 12px;
min-width: 52px;
}
#rsc .pad-bg{ display: none; }
#rsc #pad-tag{ grid-area: tag; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: #5d6272; text-transform: uppercase; }
#rsc #time{
grid-area: time;
font-family: var(--font-time);
font-weight: 800;
font-variant-numeric: tabular-nums;
letter-spacing: -0.045em;
line-height: 1;
min-height: 1em;
max-width: 100%;
white-space: nowrap;
color: var(--text);
transition: color 0.08s linear;
-webkit-user-select: none;
user-select: none;
}
#rsc.hide-digits #time{ visibility: hidden; }
#rsc .last-acts{ grid-area: acts; display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
#rsc .last-acts[hidden]{ display: none; }
#rsc .last-acts .tiny{ min-height: 32px; min-width: 48px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #c9cdd8; }
#rsc.solve-active .last-acts, #rsc[data-state="holding"] .last-acts, #rsc[data-state="ready"] .last-acts{ visibility: hidden; }
#rsc .light-wrap{ grid-area: light; display: flex; justify-content: center; width: 100%; }
#rsc #stoplight{ touch-action: none; cursor: pointer; } /* only the light takes the press */
#rsc.solve-active, #rsc.solve-active *{ touch-action: none; } /* no accidental scroll mid-solve */
#rsc #stoplight{
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, #2a2d36 0%, #16181e 100%);
border: 3px solid #3a3f4c;
box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45), 0 8px 30px rgba(0, 0, 0, 0.35);
}
#rsc .light{
flex: 0 0 auto;
aspect-ratio: 1 / 1; /* lights are always perfect circles */
height: auto;
border-radius: 50%;
background: #1a1c22;
box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.65);
opacity: 0.35;
transition: background 0.08s linear, box-shadow 0.08s linear, opacity 0.08s linear;
}
#rsc #light-label{ display: none; }
#rsc #status-line{
grid-area: status;
color: var(--muted);
font-size: 16px;
font-weight: 600;
line-height: 1.35;
max-width: 92%;
min-height: 2.7em; /* room for two lines so the light never jumps */
overflow-wrap: anywhere;
}
#rsc[data-lit="green"] #status-line{ color: var(--green); }
#rsc .q{ display: flex; gap: 10px; width: 100%; touch-action: pan-y; cursor: default; }
#rsc .q-left{ grid-area: ql; }
#rsc .q-right{ grid-area: qr; }
#rsc .qs{ flex: 1; min-width: 0; text-align: center; }
#rsc .qs small{ display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
#rsc .qs b{ display: block; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 3px; white-space: nowrap; }
#rsc .qs.pb b{ color: var(--accent); }
#rsc .recent{ grid-area: recent; display: flex; align-items: center; gap: 8px; width: 100%; overflow: hidden; margin-top: 12px; touch-action: pan-y; cursor: default; }
#rsc #recent-times{ display: flex; gap: 8px; overflow: hidden; min-width: 0; }
#rsc .recent .t{ font-size: 14px; font-weight: 600; padding: 7px 11px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--border); font-variant-numeric: tabular-nums; color: #c9cdd8; white-space: nowrap; }
#rsc .recent .t.last{ color: var(--text); border-color: #3a3f4c; }
#rsc #all-times-link{ margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; padding: 8px 2px; }

/* --- 1. Centerpiece (default): time + stoplight in one big hold pad --- */
#rsc.layout-center #stage{
grid-template-areas: "scr scr" "tag tag" "time time" "acts acts" "light light" "status status" "ql qr" "recent recent";
grid-template-rows: auto minmax(44px, 1fr) auto auto auto minmax(36px, 1fr) auto auto;
}
#rsc.layout-center .pad-bg{
display: block;
grid-column: 1 / -1;
grid-row: 2 / 7;
align-self: stretch;
justify-self: stretch;
margin-top: 14px;
border-radius: 30px;
background: radial-gradient(120% 80% at 50% 30%, #1a1d26 0%, #111319 70%);
border: 1.5px solid var(--border);
transition: background 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
}
#rsc.layout-center #pad-tag{ align-self: start; margin-top: 30px; }
#rsc.layout-center #time{ font-size: clamp(64px, 28vw, 168px); align-self: end; }
#rsc.layout-center .light-wrap{ margin-top: 24px; }
#rsc.layout-center #stoplight, #rsc.layout-hero .pips-unused{ gap: 16px; padding: 14px 18px; border-radius: 60px; }
#rsc.layout-center .light{ width: min(clamp(56px, 18.6vw, 96px), 20vh); height: auto; }
#rsc.layout-center #status-line{ align-self: start; margin-top: 18px; }
#rsc.layout-center .q{ margin-top: 14px; }
#rsc.layout-center .qs, #rsc.layout-thumb .qs-card{ background: var(--bg1); border: 1px solid var(--border); border-radius: 16px; padding: 9px 0 10px; }
#rsc.layout-center[data-lit="green"] .pad-bg, #rsc.layout-thumb[data-lit="green"] .pad-bg{
border-color: var(--green);
background: radial-gradient(120% 80% at 50% 45%, rgba(62, 224, 122, 0.2) 0%, #0f1a14 75%);
box-shadow: 0 0 40px rgba(62, 224, 122, 0.25), inset 0 0 60px rgba(62, 224, 122, 0.08);
}
#rsc[data-state="running"] .pad-bg{ border-color: rgba(62, 224, 122, 0.45) !important; box-shadow: none !important; background: radial-gradient(120% 80% at 50% 45%, rgba(62, 224, 122, 0.07) 0%, #10141a 75%) !important; }
#rsc[data-lit="amber"] .pad-bg{ border-color: rgba(255, 204, 77, 0.55); }
#rsc[data-lit="green"] #pad-tag{ color: var(--green); }

/* --- 2. Thumb bar: time up top, full-width stoplight bar at the bottom --- */
#rsc.layout-thumb #stage{
grid-template-areas: "scr scr" ". ." "time time" "acts acts" ". ." "ql qr" "tag tag" "light light" "status status";
grid-template-rows: auto 1fr auto auto 1fr auto auto auto auto;
column-gap: 0;
}
#rsc.layout-thumb .scr-box{ background: var(--bg1); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
#rsc.layout-thumb #scramble{ font-size: 20px; text-align: left; }
#rsc.layout-thumb #time{ font-size: clamp(64px, 32vw, 180px); font-weight: 700; letter-spacing: -0.03em; }
#rsc.layout-thumb .q{ gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; margin: 14px 0 12px; }
#rsc.layout-thumb .qs small{ font-size: 12px; }
#rsc.layout-thumb .qs b{ font-size: 22px; }
#rsc.layout-thumb .pad-bg{
display: block;
grid-column: 1 / -1;
grid-row: 7 / 10;
align-self: stretch;
justify-self: stretch;
margin: 0 -4px;
border-radius: 34px;
background: linear-gradient(180deg, #2a2d36 0%, #16181e 100%);
border: 3px solid #3a3f4c;
box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45), 0 8px 30px rgba(0, 0, 0, 0.35);
}
#rsc.layout-thumb #pad-tag{ margin-top: 16px; }
#rsc.layout-thumb #stoplight{ width: 100%; gap: 14px; padding: 16px 22px 0; background: none; border: 0; box-shadow: none; justify-content: center; align-items: center; }
#rsc.layout-thumb .light{ flex: 0 0 auto; width: min(calc((100% - 28px) / 3), clamp(64px, 22vw, 104px), 20vh); height: auto; border-radius: 50%; }
#rsc.layout-thumb #status-line{ margin: 16px 0 26px; font-size: 20px; font-weight: 700; color: #c3c7d2; }
#rsc.layout-thumb .recent{ display: none; }

/* --- 3. Time hero: big slab digits, round GO button flanked by stats --- */
#rsc.layout-hero #stage{
grid-template-columns: 1fr auto 1fr;
grid-template-areas: "scr scr scr" "time time time" "acts acts acts" "ql light qr" "status status status" "recent recent recent";
grid-template-rows: auto auto auto 1fr auto auto;
}
#rsc.layout-hero #pad-tag{ display: none; }
#rsc.layout-hero .scr-box{ justify-content: center; }
#rsc.layout-hero #scramble{ font-size: 17px; font-weight: 500; color: #d9dce4; word-spacing: 0; }
#rsc.layout-hero #time{ font-size: clamp(60px, 30vw, 176px); font-weight: 700; letter-spacing: -0.03em; margin-top: 14px; }
#rsc.layout-hero .last-acts .tiny{ font-family: var(--font-scr); }
#rsc.layout-hero #stoplight{
position: relative;
width: clamp(190px, 58vw, 280px);
height: clamp(190px, 58vw, 280px);
border-radius: 50%;
border-width: 4px;
flex-wrap: wrap;
align-content: center;
gap: 8px;
padding: 16px;
}
#rsc.layout-hero #stoplight::before{
content: "";
position: absolute;
inset: 14px;
border-radius: 50%;
background: radial-gradient(circle at 50% 35%, #2b2f3a 0%, #15171d 72%);
box-shadow: inset 0 4px 16px rgba(255, 255, 255, 0.06), inset 0 -10px 30px rgba(0, 0, 0, 0.5);
transition: background 0.08s linear, box-shadow 0.08s linear;
}
#rsc.layout-hero .light{ position: relative; width: 14px; height: auto; box-shadow: none; }
#rsc.layout-hero #light-label{ display: block; position: relative; flex-basis: 100%; font-size: clamp(24px, 7vw, 32px); font-weight: 700; letter-spacing: 0.12em; color: #9aa0b0; margin-top: 4px; }
#rsc.layout-hero[data-lit="red"] #stoplight::before{ background: radial-gradient(circle at 50% 35%, #5a1d1d 0%, #2a0f10 70%); box-shadow: 0 0 30px rgba(255, 75, 75, 0.35), inset 0 4px 16px rgba(255, 255, 255, 0.08), inset 0 -10px 30px rgba(0, 0, 0, 0.5); }
#rsc.layout-hero[data-lit="red"] #light-label{ color: #ffb3b3; }
#rsc.layout-hero[data-lit="amber"] #stoplight::before{ background: radial-gradient(circle at 50% 35%, #ffe08a 0%, #ffcc4d 45%, #c99a22 100%); box-shadow: 0 0 50px rgba(255, 204, 77, 0.55); }
#rsc.layout-hero[data-lit="amber"] #light-label{ color: #3a2a00; }
#rsc.layout-hero[data-lit="green"] #stoplight::before{ background: radial-gradient(circle at 50% 35%, #6ff0a0 0%, #3ee07a 45%, #22a856 100%); box-shadow: 0 0 60px rgba(62, 224, 122, 0.7), 0 0 14px #9affc0, inset 0 4px 16px rgba(255, 255, 255, 0.35); }
#rsc.layout-hero[data-lit="green"] #light-label{ color: #06260f; }
#rsc.layout-hero[data-lit="amber"] .light, #rsc.layout-hero[data-lit="green"] .light{ background: rgba(0, 0, 0, 0.35); opacity: 0.5; }
#rsc.layout-hero[data-lit="amber"] .light-amber, #rsc.layout-hero[data-lit="green"] .light-green{ background: #fff; opacity: 0.9; box-shadow: none; }
#rsc.layout-hero .q{ flex-direction: column; gap: 14px; width: auto; align-self: center; }
#rsc.layout-hero .q-left{ justify-self: start; text-align: left; }
#rsc.layout-hero .q-right{ justify-self: end; }
#rsc.layout-hero .q-left .qs{ text-align: left; }
#rsc.layout-hero .q-right .qs{ text-align: right; }
#rsc.layout-hero .qs b{ font-family: var(--font-scr); font-size: 17px; }
#rsc.layout-hero #status-line{ margin-top: 14px; margin-bottom: 30px; font-size: 15px; }
#rsc.layout-hero .recent .t{ font-family: var(--font-scr); background: none; border: 0; padding: 4px 6px 4px 0; color: var(--muted); }
#rsc.layout-hero .recent .t.last{ color: #c9cdd8; }

/* settings, session, footer */
#rsc #settings{
width: min(720px, calc(100% - 2rem));
margin: 22px auto 16px;
padding: 14px 14px 16px;
background: var(--bg1);
border: 1px solid var(--border);
border-radius: 16px;
gap: 10px;
scroll-margin-top: 16px;
}
#rsc #settings h2, #rsc .list-head h2{ width: 100%; margin: 0 0 2px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; text-align: left; }
#rsc .list-head h2{ width: auto; }
#rsc .set-row{ display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; width: 100%; }
#rsc .set-label{ color: var(--muted); font-size: 0.85rem; font-weight: 600; }
#rsc #session{ scroll-margin-top: 16px; }
#rsc #list:empty::after{ content: "No solves yet. Hold until green, then let go."; display: block; padding: 1.1rem 1rem; color: var(--muted); font-size: 0.9rem; }
#rsc .foot{ text-align: center; padding: 6px 1rem 28px; color: var(--muted); font-size: 12px; }
#rsc .foot p{ margin: 10px 0 0; opacity: 0.8; }
#rsc .a2hs-btn{ background: transparent; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; color: #b7bcc8; padding: 0.45rem 1rem; }
#rsc .a2hs-btn[hidden]{ display: none; }
#rsc .ch-sheet .sheet-card{ max-height: calc(100svh - 2rem); overflow: auto; -webkit-overflow-scrolling: touch; }
#rsc .a2hs-group{ border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 2px; margin: 0 0 10px; }
#rsc .a2hs-group.mine{ border-color: rgba(122, 168, 255, 0.6); background: rgba(122, 168, 255, 0.06); }
#rsc .a2hs-group h4{ margin: 0 0 6px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: #c9cdd8; }
#rsc .a2hs-group .you{ margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; letter-spacing: 0.04em; background: rgba(122, 168, 255, 0.18); color: var(--blue); text-transform: none; }
#rsc .a2hs-group ol{ margin: 0 0 8px; font-size: 0.92rem; }
#rsc .a2hs-group:not(.mine) ol{ font-size: 0.85rem; color: #b7bcc8; }
#rsc .other-devices{ margin: 4px 0 8px !important; }
#rsc .install-now{ width: 100%; margin-bottom: 8px; background: var(--green-dim) !important; border-color: var(--green) !important; color: var(--green) !important; font-weight: 700; }
#rsc .install-now[hidden]{ display: none; }
#rsc #toast.has-act{ pointer-events: auto; }
#rsc .toast-act{ margin-left: 8px; padding: 2px 10px !important; min-height: 28px !important; border-radius: 999px; font-weight: 700; color: var(--accent); }
#rsc .keep-awake{ position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0.01; pointer-events: none; z-index: -1; }
#rsc.solve-active .foot, #rsc.controls-locked .foot, #rsc.solve-active .topbar, #rsc.controls-locked .topbar{ pointer-events: none; }
#rsc.solve-active .scr-box, #rsc.solve-active .recent, #rsc.solve-active .topbar{ opacity: 0.55; }

@media (max-width: 400px) {
#rsc .brand h1{ display: none; }
}
@media (max-width: 380px) {
#rsc #scramble{ font-size: 16px; }
#rsc .qs b{ font-size: 18px; }
}
@media (min-width: 900px) {
#rsc .topbar{ padding: 18px 28px 0; }
#rsc .brand-logo{ width: 36px; height: 36px; }
#rsc .brand h1{ font-size: 14px; }
#rsc #stage{ padding: 14px 24px 18px; min-height: calc(100vh - 70px); }
#rsc.layout-center #time{ font-size: 184px; }
#rsc.layout-thumb #time{ font-size: 196px; }
#rsc.layout-hero #time{ font-size: 184px; }
#rsc #scramble{ font-size: 22px; }
}
@media (max-height: 700px) and (max-width: 640px) {
#rsc.layout-center .light{ width: 52px; height: auto; }
#rsc.layout-center #time{ font-size: 22vw; }
#rsc.layout-thumb .light{ width: min(calc((100% - 28px) / 3), 56px); height: auto; }
#rsc.layout-hero #stoplight{ width: 170px; height: 170px; }
}
@media (pointer: coarse) {
#rsc .top-actions > button, #rsc .comp-cluster > button{ min-height: 44px; height: 44px; border-radius: 22px; }
#rsc .icon-btn{ width: 42px; min-width: 42px; }
#rsc #comp-help-btn{ width: 34px; min-width: 34px; }
}

/* Layout switcher on the timer panel: dots (+ desktop chevrons), swipe on phones. Placed by app.layoutNav(). */
#rsc #stage > #layout-nav{ position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#rsc .lay-dots{ position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); display: flex; gap: 2px; pointer-events: auto; transition: opacity 0.15s ease; }
#rsc .lay-dot{ width: 26px; height: 26px; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0; border: 0 !important; background: none !important; display: grid; place-items: center; cursor: pointer; }
#rsc .lay-dot::before{ content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3a3f4c; transition: background 0.15s ease, transform 0.15s ease, width 0.15s ease; }
#rsc .lay-dot.on::before{ background: #c9cdd8; width: 16px; border-radius: 4px; }
#rsc .lay-name{ position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); padding: 5px 12px; border-radius: 999px; background: rgba(20, 22, 28, 0.92); border: 1px solid var(--border); color: #e6e8ee; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
#rsc .lay-name.show{ opacity: 1; }
#rsc .lay-arrow{ position: absolute; top: 0; width: 40px; height: 64px; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0; border-radius: 14px !important; border: 0 !important; background: rgba(255, 255, 255, 0.04) !important; color: #8b90a0; display: none; place-items: center; transform: translateY(-50%); opacity: 0; transition: opacity 0.18s ease, color 0.15s ease, background 0.15s ease; pointer-events: auto; cursor: pointer; }
#rsc .lay-arrow:hover{ color: #f2f4f8; background: rgba(255, 255, 255, 0.09) !important; }
@media (hover: hover) and (pointer: fine) {
#rsc .lay-arrow{ display: grid; }
#rsc #stage:hover .lay-arrow, #rsc .lay-nav.arrows-on .lay-arrow{ opacity: 1; }
}
#rsc.mouse-seen .lay-arrow{ display: grid; }
#rsc.mouse-seen #stage:hover .lay-arrow{ opacity: 1; }
#rsc.lay-naming #pad-tag{ opacity: 0; }
#rsc:not([data-state="idle"]) .lay-nav, #rsc.solve-active .lay-nav{ opacity: 0; }
#rsc:not([data-state="idle"]) .lay-nav *, #rsc.solve-active .lay-nav *{ pointer-events: none !important; }
#rsc #stage.lay-in-next > :not(#layout-nav):not(.pad-bg){ animation: rscLayInNext 0.24s ease-out; }
#rsc #stage.lay-in-prev > :not(#layout-nav):not(.pad-bg){ animation: rscLayInPrev 0.24s ease-out; }
@keyframes rscLayInNext { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rscLayInPrev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
#rsc #stage.lay-in-next > :not(#layout-nav):not(.pad-bg), #rsc #stage.lay-in-prev > :not(#layout-nav):not(.pad-bg){ animation: rscLayFade 0.12s linear; }
}
@keyframes rscLayFade { from { opacity: 0.4; } to { opacity: 1; } }

/* ===== v12 cleanup: native-app chrome ===== */
#rsc{ --r-lg: 16px; --r-md: 12px; --sep: rgba(255, 255, 255, 0.07); --row-bg: #17191f; --accent-ink: #1a0d02; }
/* header: logo + wordmark + gear (chips only while Voice / Comp are on) */
#rsc .topbar{ padding-top: 8px; min-height: 52px; }
#rsc .top-actions{ gap: 6px; }
#rsc .top-actions > .icon-btn, #rsc #settings-btn{ width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; border-radius: 50% !important; background: transparent !important; border: 0 !important; color: #a3a8b6; }
#rsc #settings-btn:hover{ background: rgba(255, 255, 255, 0.06) !important; color: var(--text); }
#rsc .chip{ display: none; align-items: center; gap: 5px; height: 30px !important; min-height: 30px !important; min-width: 0 !important; padding: 0 10px !important; border-radius: 999px !important; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; position: relative; }
#rsc .chip::after{ content: ""; position: absolute; left: 0; right: 0; top: -7px; bottom: -7px; } /* 44px tap area */
#rsc.voice-on .chip-voice{ display: inline-flex; background: var(--green-dim) !important; border: 1px solid rgba(62, 224, 122, 0.5) !important; color: var(--green); width: 30px; padding: 0 !important; justify-content: center; }
#rsc.comp-on .chip-comp{ display: inline-flex; background: rgba(150, 90, 255, 0.16) !important; border: 1px solid rgba(167, 123, 255, 0.55) !important; color: #c9adff; }
#rsc .voice-line{ padding-top: 0; }

/* hints: short + faint after the first 3 solves */
#rsc #status-line .hint-short{ color: #6f7585; font-weight: 600; font-size: 0.92em; letter-spacing: 0.01em; }
#rsc[data-lit="green"] #status-line .hint-short{ color: inherit; }

/* idle space: faint scramble (Centerpiece moves it into the panel) or the last 3 solves */
#rsc .idle-recent{ display: none; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; font-family: var(--font-time); font-variant-numeric: tabular-nums; }
#rsc .idle-recent .ir-cap{ font-family: var(--font-ui); font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #4d5260; margin-bottom: 4px; }
#rsc .idle-recent .ir{ font-size: 19px; font-weight: 600; line-height: 1.3; color: #9aa0ae; }
#rsc .idle-recent .ir:nth-child(3){ opacity: 0.66; }
#rsc .idle-recent .ir:nth-child(4){ opacity: 0.4; }
#rsc .idle-recent .ir.dnf{ color: #c46a6a; }
#rsc.layout-center.has-solves:not(.scramble-on) .idle-recent, #rsc.layout-thumb.has-solves:not(.scramble-on) .idle-recent{ display: flex; }
#rsc.solve-active .idle-recent{ visibility: hidden; }
#rsc.layout-center .idle-recent{ grid-area: tag; align-self: center; margin-top: 56px; }
#rsc.layout-thumb .idle-recent{ grid-area: idle; align-self: center; }
#rsc.layout-center #stage{
grid-template-areas: "tag tag" "time time" "acts acts" "light light" "status status" "ql qr" "recent recent";
grid-template-rows: minmax(120px, 1fr) auto auto auto minmax(36px, 1fr) auto auto;
}
#rsc.layout-center .pad-bg{ grid-row: 1 / 6; }
#rsc.layout-center .scr-box{ grid-area: tag; align-self: center; margin-top: 56px; width: calc(100% - 48px); }
#rsc.layout-center #scramble, #rsc.layout-thumb #scramble{ color: #c4c8d2; font-weight: 500; }
#rsc.layout-center #scramble{ text-align: center; font-size: 18px; min-height: 0; }
#rsc.layout-center #new-scramble-btn{ border-left: 0; }
#rsc.layout-center #recent-times{ display: none; } /* the stack in the panel replaces the chips */
#rsc.layout-center .recent{ justify-content: flex-end; }
#rsc.layout-thumb #stage{ grid-template-areas: "scr scr" "idle idle" "time time" "acts acts" ". ." "ql qr" "tag tag" "light light" "status status"; }
#rsc #new-scramble-btn{ min-height: 44px; }
#rsc #all-times-link{ display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }

/* +2 / DNF / Delete and row actions: 44px targets */
#rsc button.tiny, #rsc .last-acts .tiny, #rsc .row .acts .tiny{ min-height: 44px !important; min-width: 52px !important; padding: 0 14px !important; border-radius: 22px !important; font-size: 14px !important; font-weight: 700; background: rgba(255, 255, 255, 0.04); }
#rsc .last-acts{ gap: 8px !important; }
#rsc button.tiny.danger{ color: #ff8f8f; }

/* settings sheet: iOS grouped list */
#rsc .set-sheet .set-card{ max-width: 30rem; padding: 0 16px 18px; background: #0f1015; border-radius: 22px 22px 18px 18px; }
#rsc .set-head{ position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; height: 56px; margin: 0 -16px 4px; padding: 0 16px; background: rgba(15, 16, 21, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#rsc .set-head::before{ content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: #3a3e48; }
#rsc #settings h2{ width: auto; margin: 0; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 700; text-align: center; }
#rsc .set-done{ position: absolute; right: 6px; top: 6px; height: 44px; min-height: 44px; padding: 0 12px !important; background: none !important; border: 0 !important; color: var(--green) !important; font-size: 17px; font-weight: 700; }
#rsc .set-cap{ margin: 18px 16px 7px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #7d8292; }
#rsc .set-group{ background: var(--row-bg); border-radius: var(--r-md); overflow: hidden; }
#rsc .srow{ position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 6px 12px 6px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#rsc .srow + .srow::before{ content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
#rsc .srow:active{ background: rgba(255, 255, 255, 0.03); }
#rsc .srow-l{ display: flex; flex-direction: column; min-width: 0; font-size: 16px; font-weight: 500; color: var(--text); text-align: left; line-height: 1.25; }
#rsc .srow-l small{ font-size: 12.5px; font-weight: 400; color: #7d8292; margin-top: 2px; }
#rsc .srow-l .info-btn{ display: inline-grid !important; place-items: center; width: 22px !important; height: 22px !important; min-width: 22px !important; min-height: 22px !important; margin-left: 6px; padding: 0 !important; border-radius: 50% !important; font-size: 12px; font-weight: 800; color: #9aa0ae; background: rgba(255, 255, 255, 0.08) !important; border: 0 !important; vertical-align: 1px; position: relative; }
#rsc .srow-l .info-btn::after{ content: ""; position: absolute; inset: -11px; }
#rsc .srow-l:has(.info-btn){ display: block; }
#rsc .srow-l:has(.info-btn) small{ display: block; }
/* switch (the button keeps its text for screen readers; the track is drawn) */
#rsc .switch{ position: relative; flex: none; width: 60px; height: 44px; min-width: 60px !important; min-height: 44px !important; padding: 0 !important; margin: 0; border: 0 !important; background: none !important; font-size: 0 !important; color: transparent !important; overflow: hidden; }
#rsc .switch::before{ content: ""; position: absolute; left: 4px; top: 6.5px; width: 51px; height: 31px; border-radius: 16px; background: #39393f; transition: background 0.2s ease; }
#rsc .switch::after{ content: ""; position: absolute; left: 6px; top: 8.5px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); transition: transform 0.22s cubic-bezier(.3, 1.3, .5, 1); }
#rsc .switch[aria-pressed="true"]::before{ background: var(--green); }
#rsc .switch[aria-pressed="true"]::after{ transform: translateX(20px); }
#rsc #comp-btn.switch[aria-pressed="true"]::before{ background: #9b6bff; }
#rsc .switch:disabled{ opacity: 0.4; }
@media (prefers-reduced-motion: reduce) { #rsc .switch::before, #rsc .switch::after{ transition: none; } }
/* segmented control */
#rsc .set-sheet .seg{ display: inline-flex; padding: 2px; gap: 2px; border: 0; border-radius: 10px; background: #2a2b31; overflow: visible; }
#rsc .set-sheet .seg-btn{ min-width: 46px !important; min-height: 44px !important; height: 44px; padding: 0 8px !important; border: 0 !important; border-radius: 8px !important; background: transparent; color: #c4c8d2; font-size: 14px; font-weight: 600; }
#rsc .set-sheet .seg-btn.on{ background: #5a5c66 !important; color: #fff !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
#rsc .srow-sub{ cursor: default; }
#rsc .set-group:has(#inspect-btn[aria-pressed="false"]) .srow-sub{ opacity: 0.45; }
#rsc.comp-on #inspect-btn, #rsc.comp-on .seg{ opacity: 1; }
#rsc.comp-on .set-group .srow:first-child, #rsc.comp-on .srow-sub{ opacity: 0.4; }
#rsc .set-sheet .name-field{ display: flex; width: 100%; min-height: 54px; color: var(--text); font-size: 16px; }
#rsc .set-sheet .name-field input{ flex: 1 1 auto; width: auto; min-width: 0; max-width: 60%; text-align: right; background: transparent; border: 0; padding: 0; color: #c4c8d2; min-height: 44px; }
#rsc .set-sheet .name-field input:focus{ color: var(--text); }
#rsc .set-note{ margin: 8px 16px 0; font-size: 12.5px; color: #7d8292; text-align: left; }
#rsc #voice-unsupported{ margin: 8px 16px 0; text-align: left; }
#rsc .ch-sheet.set-sheet{ padding-left: 0; padding-right: 0; padding-bottom: 0; }
#rsc .set-sheet .set-card{ max-height: 90svh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px)); border: 0; animation: rscSheetUp 0.28s cubic-bezier(.2, .9, .3, 1); }
@keyframes rscSheetUp { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
#rsc .ch-sheet.set-sheet{ align-items: center; padding: 1rem; }
#rsc .set-sheet .set-card{ border-radius: 18px; border: 1px solid var(--border); max-height: calc(100svh - 4rem); }
#rsc .set-head::before{ display: none; }
}
@media (prefers-reduced-motion: reduce) { #rsc .set-sheet .set-card{ animation: none; } }
#rsc .ch-sheet{ -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#rsc .ch-sheet .sheet-close{ min-height: 48px; border-radius: 14px; font-weight: 700; font-size: 16px; }

/* session: Share is the one primary action; the rest live behind ⋯ */
#rsc .list-head{ margin: 0 0 12px; align-items: center; }
#rsc .list-head h2{ font-size: 13px !important; }
#rsc .list-actions{ display: flex; align-items: center; gap: 8px; flex-wrap: nowrap !important; }
#rsc .btn-primary{ display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 20px !important; border-radius: 22px !important; background: var(--accent) !important; border: 0 !important; color: var(--accent-ink) !important; font-size: 15px; font-weight: 800; letter-spacing: 0.01em; box-shadow: 0 4px 18px rgba(255, 138, 61, 0.28); }
#rsc .btn-primary:hover{ background: #ff9b57 !important; }
#rsc #share-btn:disabled{ opacity: 1; background: #2a2d36 !important; color: #6f7585 !important; box-shadow: none; }
#rsc .more-wrap{ position: relative; }
#rsc .more-btn{ width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; border-radius: 50% !important; background: var(--bg2) !important; border: 1px solid var(--border) !important; color: #c4c8d2 !important; display: inline-grid; place-items: center; }
#rsc .menu{ position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; min-width: 220px; padding: 6px; border-radius: 14px; background: #1e2028; border: 1px solid #323642; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; animation: rscMenuIn 0.16s ease-out; transform-origin: top right; }
#rsc .menu[hidden]{ display: none; }
#rsc .menu button{ display: flex; align-items: center; width: 100%; min-height: 46px; padding: 0 14px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; text-align: left; font-size: 16px; font-weight: 500; color: var(--text); }
#rsc .menu button:hover{ background: rgba(255, 255, 255, 0.06) !important; }
#rsc .menu button + button{ border-top: 1px solid var(--sep) !important; border-radius: 0 !important; }
#rsc .menu #clear-btn{ color: #ff6b6b; font-weight: 600; margin-top: 4px; border-top: 1px solid #343846 !important; }
@keyframes rscMenuIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #rsc .menu{ animation: none; } }
#rsc .btn-destructive{ width: 100%; min-height: 48px; margin: 4px 0 8px; border-radius: 14px !important; background: var(--red) !important; border: 0 !important; color: #fff !important; font-size: 16px; font-weight: 800; }
#rsc .confirm-card{ text-align: center !important; }
#rsc .confirm-card .fine{ margin: 0 0 14px !important; font-size: 0.9rem; line-height: 1.45; }
#rsc #stats{ gap: 8px; margin-bottom: 12px; }
#rsc #stats div{ border-radius: var(--r-md); background: var(--bg1); }
#rsc #list{ border-radius: var(--r-md); max-height: none; overflow: visible; }
#rsc .panel{ padding-top: 8px; }
#rsc #session{ scroll-margin-top: 12px; margin-top: 8px; }

/* footer */
#rsc .foot{ color: #a3a8b6; padding-top: 18px; }
#rsc .foot p{ opacity: 1; }
#rsc .a2hs-btn{ min-height: 44px; color: #c4c8d2; }
@media (display-mode: standalone) { #rsc #install-btn{ display: none !important; } }
#rsc.sheet-open{ overflow: hidden; }
#rsc #settings.set-card{ width: 100%; margin: 0; display: block; gap: 0; background: #0f1015; }
@media (min-width: 700px) { #rsc #settings.set-card{ width: min(30rem, 100%); } }
#rsc.layout-center .idle-recent, #rsc.layout-center .scr-box{ margin-bottom: 18px; }
@media (min-width: 900px) {
#rsc.layout-center #stage{ grid-template-rows: minmax(190px, 1.6fr) auto auto auto minmax(36px, 1fr) auto auto; }
#rsc.layout-center .idle-recent, #rsc.layout-center .scr-box{ margin-top: 64px; }
}

/* ===== v12b: state-only top label, expandable rows, two clears ===== */
#rsc #pad-tag{ min-height: 14px; line-height: 14px; }
#rsc .row{ cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s ease; }
#rsc .row .acts{ display: none !important; }
#rsc .row.open{ background: rgba(255, 255, 255, 0.035); }
#rsc .row.open .acts{ display: flex !important; grid-column: 1 / -1; justify-content: flex-start; gap: 8px; padding-top: 4px; }
#rsc .row::after{ content: ""; grid-column: 4; grid-row: 1; justify-self: end; align-self: center; width: 8px; height: 8px; border-right: 2px solid #5d6272; border-bottom: 2px solid #5d6272; transform: rotate(45deg) translateY(-3px); transition: transform 0.18s ease; }
#rsc .row.open::after{ transform: rotate(225deg) translateY(-2px); }
@media (max-width: 640px) { #rsc .row{ grid-template-columns: 2rem minmax(4.5rem, auto) 1fr 16px; } }
#rsc .row{ grid-template-columns: 2.4rem minmax(5.5rem, auto) 1fr 16px; }
@media (max-width: 640px) { #rsc .row{ grid-template-columns: 2rem minmax(4.5rem, auto) 1fr 16px; } }
#rsc .menu button{ flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
#rsc .menu button small{ font-size: 12.5px; font-weight: 400; color: #7d8292; }
#rsc .menu button:disabled{ opacity: 0.5; cursor: not-allowed; }
#rsc .menu #clear-btn{ margin-top: 0; }
#rsc .menu #clear-today-btn{ margin-top: 4px; border-top: 1px solid #343846 !important; }
#rsc .btn-secondary{ width: 100%; min-height: 48px; margin: 4px 0 0; border-radius: 14px !important; background: var(--bg2) !important; border: 1px solid #3a3f4c !important; color: var(--text) !important; font-size: 16px; font-weight: 700; }
#rsc .btn-secondary.done{ color: var(--green) !important; border-color: rgba(62, 224, 122, 0.5) !important; }
#rsc .btn-secondary[hidden]{ display: none; }
#rsc .confirm-card .btn-destructive{ margin-top: 8px; }

/* ===== v12c: no-wobble timer digits ===== */
#rsc #time{ font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; font-kerning: none; }
#rsc #time .tg, #rsc #time .tp{ display: inline-block; text-align: center; letter-spacing: 0; }
#rsc #time .tg{ width: 0.94ch; }  /* fixed slot per digit (ch = width of "0" in this font, tabular) */
#rsc #time .tp{ width: 0.4ch; }
#rsc[data-state="running"] #time .th{ opacity: 0.55; } /* calmer hundredths while running; full precision kept */

/* Sandbox host only: a small header chip so a preview is never mistaken for live. */
#rsc .sandbox-badge{
display: none;
align-items: center;
margin-left: 8px;
padding: 2px 7px;
border-radius: 999px;
border: 1px solid rgba(230, 200, 106, 0.45);
background: rgba(230, 200, 106, 0.12);
color: #e6c86a;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
line-height: 1.4;
}
#rsc.is-sandbox .sandbox-badge, #rsc .sandbox-badge:not([hidden]){ display: inline-flex; }
