/* 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 .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); } }
#rsc.hide-digits[data-state="running"] #time::after{
content: "time hidden";
visibility: visible;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
white-space: nowrap;
font-family: var(--font-ui);
font-size: 13px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--muted);
opacity: 0.55;
}
#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: none;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
cursor: pointer;
}
#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{
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: none;
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: 1.35em;
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: clamp(56px, 18.6vw, 96px); height: clamp(56px, 18.6vw, 96px); }
#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; }
#rsc.layout-thumb .light{ flex: 1; width: auto; height: clamp(64px, 22vw, 104px); border-radius: 999px; }
#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: 14px; 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; 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 .layout-seg .seg-btn{ padding: 0.45rem 0.8rem; 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: 52px; }
#rsc.layout-center #time{ font-size: 22vw; }
#rsc.layout-thumb .light{ height: 56px; }
#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; }
}
