Spaces:
Running
Running
File size: 11,559 Bytes
75c683a 26ac47e 75c683a 26ac47e 75c683a 26ac47e 75c683a 26ac47e 75c683a 26ac47e 75c683a 26ac47e 75c683a c20af42 75c683a c20af42 75c683a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | /* Opa Traint — big, calm, warm UI.
Principles: min tap target 80x80, base font >= 22px, high contrast,
one primary action per screen, no mid-exercise scrolling, warm colors,
color-blind-safe (meaning never by color alone). */
:root {
--bg: #fdf6ec;
--card: #ffffff;
--ink: #3d332a;
--ink-soft: #6b5d4f;
--accent: #e8a33d; /* warm amber */
--accent-dark: #c77f1a;
--calm: #7fa8a0; /* soft teal */
--calm-dark: #5d867e;
--sun-empty: #e8ddcc;
--sun-full: #f6b93b;
--shadow: 0 4px 14px rgba(90, 70, 40, 0.15);
--radius: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 22px;
line-height: 1.5;
height: 100%;
overscroll-behavior: none;
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
min-height: 100dvh;
}
.hidden { display: none !important; }
/* ---------- Sun progress bar ---------- */
#progress-bar {
display: flex;
justify-content: center;
gap: 10px;
padding: 14px 8px 6px;
font-size: 30px;
user-select: none;
}
#progress-bar .sun { opacity: 0.35; filter: grayscale(0.9); transition: all 0.6s ease; }
#progress-bar .sun.filled { opacity: 1; filter: none; transform: scale(1.15); }
/* ---------- Stop door ---------- */
#stop-btn {
position: fixed;
top: 10px;
right: 12px;
width: 64px;
height: 64px;
font-size: 30px;
border: none;
border-radius: 18px;
background: rgba(255, 255, 255, 0.75);
box-shadow: var(--shadow);
cursor: pointer;
z-index: 50;
}
#stop-btn:active { transform: scale(0.94); }
/* ---------- Skip (next module) button ---------- */
#skip-btn {
position: fixed;
top: 10px;
right: 88px;
height: 64px;
padding: 0 20px;
font-size: 22px;
font-family: inherit;
color: var(--ink);
border: none;
border-radius: 18px;
background: rgba(255, 255, 255, 0.75);
box-shadow: var(--shadow);
cursor: pointer;
z-index: 50;
}
#skip-btn:active { transform: scale(0.94); }
/* ---------- Screen container ---------- */
#screen {
flex: 1;
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: 16px 20px 40px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
text-align: center;
}
h1 { font-size: 42px; margin: 0.4em 0; }
h2 { font-size: 34px; margin: 0.4em 0; }
p { font-size: 24px; margin: 0.5em 0; }
.big-text { font-size: 30px; line-height: 1.55; }
.soft { color: var(--ink-soft); }
/* ---------- Buttons ---------- */
button { font-family: inherit; color: var(--ink); }
.btn {
min-width: 120px;
min-height: 84px;
padding: 18px 36px;
font-size: 28px;
font-weight: 600;
border: none;
border-radius: var(--radius);
background: var(--card);
box-shadow: var(--shadow);
cursor: pointer;
margin: 10px;
transition: transform 0.12s ease, opacity 0.5s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
background: var(--accent);
color: #fff;
font-size: 34px;
min-height: 96px;
padding: 22px 56px;
}
.btn-primary:active { background: var(--accent-dark); }
.btn-secondary {
background: transparent;
box-shadow: none;
color: var(--ink-soft);
text-decoration: underline;
font-size: 22px;
min-height: 64px;
}
.btn-giant {
font-size: 40px;
min-height: 130px;
padding: 30px 60px;
background: var(--calm);
color: #fff;
}
.btn-giant:active { background: var(--calm-dark); }
.btn.fade-out {
opacity: 0;
pointer-events: none;
}
.btn.wiggle { animation: wiggle 0.5s ease; }
@keyframes wiggle {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-8px); }
75% { transform: translateX(8px); }
}
.btn.pulse-hint { animation: pulsehint 1.6s ease infinite; }
@keyframes pulsehint {
0%, 100% { box-shadow: var(--shadow); transform: scale(1); }
50% { box-shadow: 0 0 24px rgba(232, 163, 61, 0.8); transform: scale(1.05); }
}
/* TTS speaker button */
.tts-btn {
width: 84px;
height: 84px;
font-size: 38px;
border: none;
border-radius: 50%;
background: var(--card);
box-shadow: var(--shadow);
cursor: pointer;
margin: 8px;
}
.tts-btn:active { transform: scale(0.94); }
/* ---------- Cards / photos ---------- */
.photo-frame {
width: min(88vw, 480px);
max-height: 46vh;
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
background: var(--card);
margin: 12px auto;
display: flex;
align-items: center;
justify-content: center;
}
/* The photo is always shown whole — never cropped. max-height: inherit picks
up the frame's cap (including inline overrides like 34vh in wie_is_dit),
so the image scales down to fit instead of being clipped by the frame. */
.photo-frame img {
display: block;
width: auto;
height: auto;
max-width: 100%;
max-height: inherit;
object-fit: contain;
}
.video-frame {
width: min(88vw, 720px);
aspect-ratio: 16 / 9;
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
background: #000;
margin: 12px auto;
}
.video-frame iframe {
width: 100%;
height: 100%;
border: 0;
display: block;
}
.choice-row {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
margin-top: 10px;
}
/* ---------- Name letters (type mode) ---------- */
.letters {
display: flex;
justify-content: center;
gap: 12px;
font-size: 44px;
font-weight: 700;
letter-spacing: 2px;
margin: 18px 0;
min-height: 66px;
flex-wrap: wrap;
}
.letters .slot {
min-width: 44px;
border-bottom: 5px solid var(--accent);
color: var(--ink);
}
.letters .slot.empty { color: transparent; }
/* ---------- On-screen keyboard ---------- */
.osk { width: 100%; max-width: 860px; margin-top: 8px; user-select: none; }
.osk-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 6px; }
.osk-key {
flex: 1;
max-width: 84px;
min-height: 80px;
font-size: 30px;
font-weight: 600;
border: none;
border-radius: 14px;
background: var(--card);
box-shadow: var(--shadow);
cursor: pointer;
text-transform: uppercase;
}
.osk-key:active { background: var(--accent); color: #fff; }
/* ---------- Stars ---------- */
#star-float {
position: fixed;
font-size: 70px;
pointer-events: none;
z-index: 90;
animation: starfly 1.2s ease forwards;
}
@keyframes starfly {
0% { transform: scale(0.4); opacity: 0; }
30% { transform: scale(1.3); opacity: 1; }
100% { transform: scale(1) translateY(-120px); opacity: 0; }
}
/* ---------- Snelkijker ---------- */
.flash-arena {
position: relative;
width: min(86vw, 560px);
height: min(60vh, 560px);
margin: 8px auto;
background: var(--card);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.flash-center {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
font-size: 90px;
}
.flash-dot {
position: absolute;
width: 34px; height: 34px;
background: var(--calm-dark);
border-radius: 50%;
}
.grid8 {
position: relative;
width: min(86vw, 560px);
height: min(50vh, 460px);
margin: 8px auto;
}
.grid8 button {
position: absolute;
width: 84px; height: 84px;
font-size: 30px;
border: none;
border-radius: 50%;
background: var(--card);
box-shadow: var(--shadow);
cursor: pointer;
transform: translate(-50%, -50%);
}
.grid8 button:active { background: var(--accent); color: #fff; }
/* ---------- Garden (categorie) ---------- */
.garden {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: flex-start;
gap: 6px;
width: min(90vw, 700px);
min-height: 180px;
margin: 10px auto;
padding: 14px;
background: linear-gradient(#eaf5e2, #d8ecc8);
border-radius: var(--radius);
box-shadow: var(--shadow);
font-size: 44px;
}
.garden .flower { animation: bloom 0.7s ease; }
@keyframes bloom {
0% { transform: scale(0); }
70% { transform: scale(1.3); }
100% { transform: scale(1); }
}
/* ---------- Stappenplan cards ---------- */
.seq-done-row, .seq-pool {
display: flex;
flex-direction: column;
gap: 10px;
width: min(92vw, 700px);
margin: 6px auto;
}
.seq-card {
min-height: 84px;
padding: 16px 22px;
font-size: 25px;
font-weight: 600;
border: none;
border-radius: 18px;
background: var(--card);
box-shadow: var(--shadow);
cursor: pointer;
text-align: left;
}
.seq-card:active { transform: scale(0.98); }
.seq-card.done {
background: #e7f2e3;
cursor: default;
color: var(--ink-soft);
}
.seq-card.done::before { content: "✓ "; color: var(--calm-dark); }
/* ---------- Chess ---------- */
.chessboard {
display: grid;
grid-template-columns: repeat(8, 1fr);
/* Explicit rows: implicit (auto) rows size to the piece glyphs, overflow
the square container and get clipped — the board must always be whole. */
grid-template-rows: repeat(8, 1fr);
width: min(92vw, 60vh, 560px);
aspect-ratio: 1;
margin: 8px auto;
border-radius: 12px;
overflow: hidden;
box-shadow: var(--shadow);
touch-action: manipulation;
}
.sq {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: clamp(28px, 6.4vmin, 52px);
line-height: 1;
cursor: pointer;
user-select: none;
min-height: 0;
min-width: 0;
}
.sq.light { background: #f0d9b5; }
.sq.dark { background: #b58863; }
.sq.selected { outline: 4px solid var(--accent); outline-offset: -4px; }
.sq.hint-glow { animation: pulsehint 1.4s ease infinite; }
.sq .dot {
position: absolute;
width: 26%; height: 26%;
border-radius: 50%;
background: rgba(90, 70, 40, 0.4);
}
/* Filled glyphs for both colors; the color is painted here so white pieces
read as solid white with a dark outline instead of thin hollow outlines. */
.sq .piece.white {
color: #fdfdfd;
text-shadow: 0 0 2px #3a2f25, 0 1px 2px #3a2f25, 0 -1px 2px #3a2f25,
1px 0 2px #3a2f25, -1px 0 2px #3a2f25;
}
.sq .piece.black {
color: #26201a;
text-shadow: 0 1px 2px rgba(255, 248, 235, 0.45);
}
.sq .piece.returning { animation: pieceback 0.4s ease; }
@keyframes pieceback {
0% { transform: scale(1.25); }
100% { transform: scale(1); }
}
/* ---------- Go (daily problem) ---------- */
.goboard-wrap {
width: min(92vw, 62vh, 560px);
margin: 8px auto;
border-radius: 14px;
overflow: hidden;
box-shadow: var(--shadow);
background: #e9c37f; /* warm wood */
touch-action: manipulation;
}
.goboard-wrap svg { display: block; width: 100%; height: auto; }
.go-stone-fade { animation: gostonefade 0.9s ease forwards; }
@keyframes gostonefade {
0% { opacity: 1; }
100% { opacity: 0; }
}
.go-hint { animation: gohint 1.4s ease infinite; }
@keyframes gohint {
0%, 100% { opacity: 0.25; }
50% { opacity: 0.75; }
}
/* ---------- Welcome / finish ---------- */
.streak-flame { font-size: 28px; margin-top: 14px; }
.center-fill {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
#confetti {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 80;
}
/* Recording indicator: a gentle breathing mic, NOT a timer */
.rec-live { font-size: 80px; animation: breathe 1.6s ease infinite; }
@keyframes breathe {
0%, 100% { transform: scale(1); opacity: 0.85; }
50% { transform: scale(1.15); opacity: 1; }
}
@media (max-width: 820px) {
h1 { font-size: 34px; }
.btn-primary { font-size: 30px; }
.osk-key { min-height: 68px; font-size: 26px; }
}
|