91 lines
6.3 KiB
CSS
91 lines
6.3 KiB
CSS
body.screen {
|
|
height: 100vh; height: 100dvh; overflow: hidden;
|
|
display: grid; grid-template-rows: auto 1fr auto;
|
|
background: var(--bg);
|
|
}
|
|
.s-head, .s-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2vh 3vw; }
|
|
.s-title { font: 700 clamp(1rem, 2vw, 2rem) var(--round); text-align: center; flex: 1; color: var(--ink-2); }
|
|
.s-tools { display: flex; gap: 10px; align-items: center; }
|
|
:fullscreen .s-tools button { display: none; }
|
|
|
|
.s-main { min-height: 0; display: grid; padding: 1vh 4vw; }
|
|
|
|
.s-enroll { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; min-height: 0; }
|
|
.qr-wrap {
|
|
height: 100%; max-height: 74vh; aspect-ratio: 1; display: grid; grid-template-rows: 1fr auto;
|
|
background: #fff; border-radius: 28px; padding: 2vh; gap: 1.4vh;
|
|
}
|
|
.qr-wrap.ring { background: transparent; padding: 0; }
|
|
.entry { display: flex; align-items: center; gap: 1.2vw; margin-top: 3vh; background: var(--surface); border-radius: 18px; padding: 1.2vh 1.2vw; width: fit-content; }
|
|
.entry canvas { width: clamp(140px, min(21vw, 34vh), 420px); height: auto; aspect-ratio: 1; image-rendering: pixelated; flex: none; }
|
|
.entry div { display: grid; gap: .3vh; font-size: clamp(.8rem, 1.1vw, 1.2rem); color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
|
|
.entry b { color: var(--ink); font-weight: 700; }
|
|
#qr { width: 100%; height: 100%; min-height: 0; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: contain; }
|
|
.tick { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 0 1vh; }
|
|
#tick-bar { height: 100%; width: 0; background: var(--mark); border-radius: 99px; }
|
|
.s-steps h2 { font-size: clamp(2rem, 4.6vw, 5rem); letter-spacing: -.03em; margin-bottom: .5em; }
|
|
.s-steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2vh; counter-reset: s; }
|
|
.s-steps li {
|
|
counter-increment: s; display: flex; align-items: center; gap: 1.2vw;
|
|
font: 600 clamp(1.1rem, 2.3vw, 2.5rem) var(--round); color: var(--ink-2);
|
|
}
|
|
.s-steps li::before {
|
|
content: counter(s); flex: none; display: grid; place-items: center;
|
|
width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--surface); color: var(--ink);
|
|
font-weight: 700; font-size: .8em;
|
|
}
|
|
|
|
/* enrollment + a question at the same time: qr shrinks to the side */
|
|
.s-main.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 5vw; }
|
|
.s-main.split .s-enroll { grid-template-columns: 1fr; justify-items: center; gap: 3vh; }
|
|
.s-main.split .s-enroll { grid-template-rows: minmax(0, 1fr) auto; gap: 2vh; height: 100%; }
|
|
.s-main.split .qr-wrap { height: 100%; width: auto; max-width: 100%; max-height: none; }
|
|
.s-main.split .entry { margin-top: 1.5vh; }
|
|
/* the question owns the screen, the ring keeps the room the step list would take */
|
|
.s-main.split #qr-steps { display: none; }
|
|
.s-main.split .entry canvas { width: clamp(90px, min(10vw, 15vh), 220px); }
|
|
.s-main.split .s-steps h2 { font-size: clamp(1.4rem, 2.4vw, 2.6rem); }
|
|
.s-main.split .s-steps li { font-size: clamp(1rem, 1.5vw, 1.6rem); }
|
|
|
|
.s-focus { align-self: center; max-width: 1400px; width: 100%; margin: 0 auto; }
|
|
.s-focus .q-text { font-size: clamp(1.8rem, 3.8vw, 4rem); letter-spacing: -.025em; line-height: 1.1; margin-bottom: 4vh; }
|
|
.s-focus .opts { list-style: none; padding: 0; margin: 0 0 4vh; display: grid; gap: 1.4vh; }
|
|
.s-focus .opts li { font: 600 clamp(1.1rem, 2.2vw, 2.3rem) var(--round); background: var(--surface); border-radius: 20px; padding: 1.6vh 2vw; }
|
|
.s-focus .turnout { font: 600 clamp(1rem, 1.8vw, 1.9rem) var(--round); color: var(--ink-2); }
|
|
.s-focus .turnout b { color: var(--ink); font-size: 1.5em; }
|
|
.s-focus .turnout .progress { height: 14px; margin-top: 1.2vh; background: var(--surface); }
|
|
.s-focus .results .bar-row { font-size: clamp(1rem, 2.1vw, 2.2rem); grid-template-columns: minmax(120px, 32%) 1fr auto; gap: 2vw; margin: 2vh 0; }
|
|
.s-focus .results .bar-track { height: clamp(16px, 3vh, 40px); background: var(--surface); }
|
|
.s-focus .results .bar-num { min-width: 7ch; font-size: 1em; }
|
|
.s-focus .results-foot { font-size: clamp(.9rem, 1.3vw, 1.3rem); }
|
|
.s-focus .status { font: 600 clamp(1rem, 1.8vw, 1.9rem) var(--round); color: var(--ink-2); }
|
|
|
|
.s-idle { place-self: center; text-align: center; }
|
|
.s-idle h1 { font-size: clamp(2.4rem, 5.5vw, 6rem); letter-spacing: -.03em; }
|
|
.s-idle img { width: clamp(64px, 9vw, 140px); margin-bottom: 3vh; animation: spin 14s linear infinite; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
@media (prefers-reduced-motion: reduce) { .s-idle img { animation: none; } }
|
|
|
|
.s-count { font: 600 clamp(.95rem, 1.5vw, 1.5rem) var(--round); color: var(--ink-2); display: flex; align-items: baseline; gap: .4em; }
|
|
.s-count b { font-size: 2.2em; line-height: 1; color: var(--ink); letter-spacing: -.03em; }
|
|
.screen-center { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 10; padding: 16px; }
|
|
|
|
@media (max-aspect-ratio: 1/1) {
|
|
.s-enroll, .s-main.split { grid-template-columns: 1fr; }
|
|
.qr-wrap { max-height: 50vh; justify-self: center; }
|
|
/* upright screen: the ring takes what the text leaves, the entry qr sits next to the steps */
|
|
.s-main:not(.split) .s-enroll { grid-template-rows: minmax(0, 1fr) auto; gap: 3vh; height: 100%; }
|
|
.s-main:not(.split) .qr-wrap { height: 100%; width: auto; max-width: 100%; max-height: none; }
|
|
.s-steps { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 4vw; align-items: center; }
|
|
.s-steps > * { grid-column: 1; }
|
|
.s-steps .entry { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; gap: .8vh; margin: 0; padding: 1.2vh; text-align: center; }
|
|
.s-steps .entry div { font-size: clamp(.7rem, 2.2vw, 1.1rem); overflow-wrap: normal; white-space: nowrap; }
|
|
.s-steps .entry canvas { width: clamp(110px, min(30vw, 17vh), 300px); }
|
|
/* upright + question: ring and entry share one row above the question */
|
|
.s-main.split .s-enroll { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; height: auto; align-items: center; justify-items: stretch; }
|
|
.s-main.split .qr-wrap { height: auto; width: 100%; max-height: 38vh; justify-self: center; }
|
|
.s-main.split .s-steps { grid-template-columns: auto; justify-items: center; row-gap: 1vh; }
|
|
.s-main.split .s-steps .entry { grid-column: 1; grid-row: auto; }
|
|
}
|
|
.qr-wrap.ring .tick { display: none; }
|