CakePHP 5.4 app for live polls: create via email without login, manage via secret admin link, join via code. Includes slide types (choice, wordcloud, open, scale, content), presenter mode, CSV export, captcha, throttling, tests and Gitea CI/deploy workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
336 lines
19 KiB
CSS
336 lines
19 KiB
CSS
/*
|
||
* Plenario stylesheet – no framework, no build step.
|
||
* Sections: tokens · base · layout · components · forms · admin · participant · results · presenter
|
||
*/
|
||
|
||
/* ---------------------------------------------------------------- tokens */
|
||
:root {
|
||
--bg: #f5f6fb;
|
||
--surface: #ffffff;
|
||
--surface-2: #eef0f8;
|
||
--text: #1d1f33;
|
||
--muted: #5d6280;
|
||
--border: #dde0ee;
|
||
--primary: #4b3fe0;
|
||
--primary-ink: #ffffff;
|
||
--primary-soft: #ebe9fd;
|
||
--danger: #c42b4b;
|
||
--ok: #18865a;
|
||
--warn: #a86400;
|
||
--radius: 12px;
|
||
--shadow: 0 1px 2px rgba(20, 22, 50, .06), 0 4px 16px rgba(20, 22, 50, .05);
|
||
--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||
|
||
--c0: #4b3fe0;
|
||
--c1: #e0457b;
|
||
--c2: #12a08a;
|
||
--c3: #f29a1f;
|
||
--c4: #2f8fe0;
|
||
--c5: #8e44c9;
|
||
}
|
||
|
||
@media (prefers-color-scheme: dark) {
|
||
:root:not(.present) {
|
||
--bg: #12131d;
|
||
--surface: #1b1d2b;
|
||
--surface-2: #24263a;
|
||
--text: #eceefa;
|
||
--muted: #a1a6c3;
|
||
--border: #30334a;
|
||
--primary: #7f75ff;
|
||
--primary-soft: #2a2752;
|
||
--shadow: none;
|
||
}
|
||
}
|
||
|
||
/* ---------------------------------------------------------------- base */
|
||
*, *::before, *::after { box-sizing: border-box; }
|
||
|
||
html { font-size: 16px; }
|
||
|
||
body {
|
||
margin: 0;
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
font-family: var(--font);
|
||
line-height: 1.55;
|
||
-webkit-font-smoothing: antialiased;
|
||
}
|
||
|
||
a { color: var(--primary); }
|
||
a:hover { text-decoration-thickness: 2px; }
|
||
|
||
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
|
||
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
|
||
h2 { font-size: 1.25rem; }
|
||
h3 { font-size: 1.05rem; margin-top: 1.6em; }
|
||
|
||
.muted { color: var(--muted); }
|
||
.center { text-align: center; }
|
||
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--primary); margin: 0 0 .4em; }
|
||
.lead { font-size: 1.15rem; color: var(--muted); }
|
||
.hint { font-size: .875rem; color: var(--muted); margin: .25em 0 1em; }
|
||
.hint--error { color: var(--danger); }
|
||
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
||
[hidden] { display: none !important; }
|
||
|
||
/* ---------------------------------------------------------------- layout */
|
||
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
|
||
.main { padding-top: 32px; padding-bottom: 48px; min-height: calc(100vh - 140px); }
|
||
|
||
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
|
||
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
|
||
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
|
||
.brand__mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(var(--c0) 0 40%, var(--c1) 0 65%, var(--c2) 0 85%, var(--c3) 0); }
|
||
.site-nav { display: flex; gap: 20px; font-size: .95rem; }
|
||
.site-nav a { color: var(--muted); text-decoration: none; }
|
||
.site-nav a:hover { color: var(--text); }
|
||
.site-footer { padding: 24px 16px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }
|
||
|
||
.grid { display: grid; gap: 24px; }
|
||
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
|
||
.grid--tight { gap: 0 16px; }
|
||
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
|
||
@media (max-width: 900px) {
|
||
.grid--sidebar { grid-template-columns: 1fr; }
|
||
}
|
||
|
||
/* ---------------------------------------------------------------- components */
|
||
.card {
|
||
background: var(--surface);
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius);
|
||
padding: 24px;
|
||
box-shadow: var(--shadow);
|
||
margin-bottom: 24px;
|
||
}
|
||
.card--narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
|
||
.card--form { max-width: 720px; }
|
||
.card--accent { background: var(--primary-soft); border-color: transparent; }
|
||
.card--danger h2 { color: var(--danger); }
|
||
|
||
.hero { text-align: center; max-width: 760px; margin: 16px auto 40px; }
|
||
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
|
||
|
||
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
|
||
.features div { padding: 16px; border-radius: var(--radius); background: var(--surface-2); }
|
||
.features strong { display: block; }
|
||
.features span { color: var(--muted); font-size: .9rem; }
|
||
|
||
.button {
|
||
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
||
padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border);
|
||
background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
|
||
text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap;
|
||
}
|
||
.button:hover { border-color: var(--primary); }
|
||
.button:disabled { opacity: .6; cursor: wait; }
|
||
.button--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
|
||
.button--primary:hover { filter: brightness(1.08); }
|
||
.button--danger { color: var(--danger); }
|
||
.button--danger:hover { border-color: var(--danger); }
|
||
.button--ghost { border-color: transparent; background: transparent; }
|
||
.button--small { padding: 6px 10px; font-size: .85rem; }
|
||
.button--icon { min-width: 32px; }
|
||
.button--block { width: 100%; padding: 14px; font-size: 1.05rem; }
|
||
|
||
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
|
||
.badge--ok { background: #dff5ea; color: var(--ok); }
|
||
.badge--off { background: #fbe3e8; color: var(--danger); }
|
||
.badge--live { background: var(--c1); color: #fff; }
|
||
.badge--type-choice { background: #e9e7ff; color: #3a2fc4; }
|
||
.badge--type-wordcloud { background: #fde4ee; color: #b12a5d; }
|
||
.badge--type-open { background: #dcf5f0; color: #0b7766; }
|
||
.badge--type-scale { background: #fdeed8; color: #9a5a00; }
|
||
.badge--type-content { background: #e3eefb; color: #1f6bb0; }
|
||
|
||
.message { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; cursor: pointer; background: var(--surface-2); border-left: 4px solid var(--muted); }
|
||
.message.success { border-color: var(--ok); }
|
||
.message.error { border-color: var(--danger); }
|
||
.message.warning { border-color: var(--warn); }
|
||
.message.hidden { display: none; }
|
||
|
||
.notice { padding: 12px 16px; border-radius: 8px; background: #fff6e0; color: #6b4a00; margin-bottom: 24px; font-size: .95rem; }
|
||
@media (prefers-color-scheme: dark) { .notice { background: #3a2f12; color: #f3d98f; } }
|
||
|
||
.devnote { margin-top: 24px; padding: 16px; border: 2px dashed var(--warn); border-radius: var(--radius); }
|
||
.icon-circle { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--primary-soft); color: var(--primary); }
|
||
.empty { padding: 24px; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }
|
||
|
||
/* ---------------------------------------------------------------- forms */
|
||
form .input { margin-bottom: 16px; }
|
||
form .input label { display: block; font-weight: 600; margin-bottom: 6px; }
|
||
form .input.checkbox label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
|
||
form .input.checkbox input { margin-top: 5px; }
|
||
|
||
input[type=text], input[type=email], input[type=number], input[type=url], select, textarea {
|
||
width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
|
||
background: var(--surface); color: var(--text); font: inherit;
|
||
}
|
||
input:focus, select:focus, textarea:focus, .button:focus-visible { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
|
||
textarea { resize: vertical; }
|
||
.input-short { max-width: 160px; }
|
||
.input-code { text-transform: uppercase; letter-spacing: .15em; font-weight: 700; }
|
||
.input-code--big { font-size: 2rem; text-align: center; padding: 16px; }
|
||
.error-message { color: var(--danger); font-size: .875rem; margin-top: 4px; }
|
||
.input.error input, .input.error textarea { border-color: var(--danger); }
|
||
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
|
||
|
||
/* ---------------------------------------------------------------- admin */
|
||
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
|
||
.admin-head h1 { margin-bottom: .2em; word-break: break-word; }
|
||
.admin-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
|
||
|
||
.slide-list { list-style: none; padding: 0; margin: 0 0 16px; }
|
||
.slide-item {
|
||
display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center;
|
||
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
||
padding: 14px 16px; margin-bottom: 10px;
|
||
}
|
||
.slide-item--current { border-color: var(--c1); box-shadow: 0 0 0 2px rgba(224, 69, 123, .15); }
|
||
.slide-item__pos { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
|
||
.slide-item__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; margin-bottom: 4px; }
|
||
.slide-item__title { font-weight: 600; color: var(--text); text-decoration: none; word-break: break-word; }
|
||
.slide-item__options { margin: 4px 0 0; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.slide-item__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
|
||
@media (max-width: 700px) {
|
||
.slide-item { grid-template-columns: 32px minmax(0, 1fr); }
|
||
.slide-item__actions { grid-column: 1 / -1; justify-content: flex-start; }
|
||
}
|
||
|
||
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
|
||
.type-card { display: block; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); border-top: 4px solid var(--c0); }
|
||
.type-card:hover { border-color: var(--primary); }
|
||
.type-card strong { display: block; }
|
||
.type-card span { font-size: .85rem; color: var(--muted); }
|
||
.type-card--wordcloud { border-top-color: var(--c1); }
|
||
.type-card--open { border-top-color: var(--c2); }
|
||
.type-card--scale { border-top-color: var(--c3); }
|
||
.type-card--content { border-top-color: var(--c4); }
|
||
|
||
.join-code { font-size: 2rem; font-weight: 800; letter-spacing: .12em; text-align: center; margin: 0 0 12px; }
|
||
.qr { display: block; margin: 0 auto 16px; background: #fff; border-radius: 8px; padding: 6px; }
|
||
.copy-field { display: flex; gap: 8px; }
|
||
.copy-field input { font-size: .85rem; }
|
||
|
||
/* ---------------------------------------------------------------- participant */
|
||
.participant .main { max-width: 640px; }
|
||
.participant .site-nav { display: none; }
|
||
.question { font-size: 1.5rem; }
|
||
.choices { display: grid; gap: 10px; margin: 16px 0 20px; }
|
||
.choice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 500; }
|
||
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
|
||
.choice input { width: 20px; height: 20px; accent-color: var(--primary); }
|
||
.word-input { margin-bottom: 10px; }
|
||
.word-entry .word-input { margin-bottom: 0; }
|
||
/* In the flow (not absolute) so it pushes message and button down instead of covering them. */
|
||
.suggestions { margin: 4px 0 0; padding: 4px; max-height: 50vh; overflow-y: auto; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
|
||
.suggestion { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
|
||
.suggestion:hover, .suggestion.is-active { background: var(--primary-soft); }
|
||
.suggestion.is-mine { cursor: default; opacity: .6; }
|
||
.suggestion__text { font-weight: 600; word-break: break-word; }
|
||
.suggestion__meta { font-size: .8rem; color: var(--muted); white-space: nowrap; align-self: center; }
|
||
.word-message { min-height: 1.4em; margin: 8px 0 0; font-size: .9rem; color: var(--ok); }
|
||
.word-message.is-error { color: var(--danger); }
|
||
.vote-form textarea { margin: 12px 0 16px; }
|
||
.vote-form .button { margin-top: 12px; }
|
||
.scale { display: flex; gap: 6px; margin: 20px 0 6px; }
|
||
.scale__step { flex: 1; }
|
||
.scale__step input { position: absolute; opacity: 0; }
|
||
.scale__step span { display: block; text-align: center; padding: 14px 0; border: 2px solid var(--border); border-radius: 8px; font-weight: 700; cursor: pointer; }
|
||
.scale__step input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
|
||
.scale__step input:focus-visible + span { outline: 3px solid var(--primary-soft); }
|
||
.scale__labels { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
|
||
.done { font-size: 1.1rem; font-weight: 600; color: var(--ok); }
|
||
.waiting { padding: 48px 24px; }
|
||
.pulse { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); margin: 0 auto 24px; animation: pulse 1.6s infinite; }
|
||
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(75, 63, 224, .5); } 100% { box-shadow: 0 0 0 24px rgba(75, 63, 224, 0); } }
|
||
.prose { font-size: 1.1rem; }
|
||
|
||
/* ---------------------------------------------------------------- results (shared) */
|
||
.results-empty { color: var(--muted); font-style: italic; }
|
||
.is-hidden { visibility: hidden; }
|
||
|
||
.bars { display: grid; gap: 14px; }
|
||
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; gap: 4px 12px; }
|
||
.bar__label { grid-area: label; font-weight: 600; word-break: break-word; }
|
||
.bar__value { grid-area: value; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||
.bar__track { grid-area: track; height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
|
||
.bar__fill { height: 100%; border-radius: 99px; background: var(--c0); transition: width .6s ease; min-width: 2px; }
|
||
.bar--c1 .bar__fill { background: var(--c1); }
|
||
.bar--c2 .bar__fill { background: var(--c2); }
|
||
.bar--c3 .bar__fill { background: var(--c3); }
|
||
.bar--c4 .bar__fill { background: var(--c4); }
|
||
.bar--c5 .bar__fill { background: var(--c5); }
|
||
|
||
.columns { display: flex; gap: 8px; align-items: stretch; height: 180px; }
|
||
.column { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
|
||
.column__count { font-size: .85rem; color: var(--muted); }
|
||
.column__track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
|
||
.column__fill { width: 100%; background: var(--c3); transition: height .6s ease; }
|
||
.column__label { font-weight: 700; }
|
||
.average { font-size: 1.1rem; margin: 0 0 12px; }
|
||
.average strong { font-size: 1.6em; }
|
||
|
||
.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2em .6em; line-height: 1.15; padding: 8px; }
|
||
.cloud__word { font-weight: 800; color: var(--c0); transition: font-size .6s ease; }
|
||
.cloud__word--c1 { color: var(--c1); }
|
||
.cloud__word--c2 { color: var(--c2); }
|
||
.cloud__word--c3 { color: var(--c3); }
|
||
.cloud__word--c4 { color: var(--c4); }
|
||
.cloud__word--c5 { color: var(--c5); }
|
||
.cloud__word { display: inline-flex; align-items: baseline; gap: .25em; }
|
||
.cloud__count { font-size: max(.75rem, .4em); font-weight: 600; color: var(--muted); white-space: nowrap; }
|
||
.cloud__count--up { color: var(--ok); }
|
||
.cloud__count--down { color: var(--danger); }
|
||
.stage .cloud__count { font-size: max(.9rem, .4em); }
|
||
/* Participant cloud: word (+) and − are separate buttons */
|
||
.cloud--interactive .cloud__word { gap: .1em; }
|
||
.cloud__vote { font: inherit; font-weight: inherit; color: inherit; line-height: 1.15; background: none; border: 2px solid transparent; border-radius: 10px; padding: .05em .3em; cursor: pointer; display: inline-flex; align-items: baseline; gap: .25em; }
|
||
.cloud__vote:hover:not(:disabled), .cloud__vote:focus-visible { border-color: currentColor; }
|
||
.cloud__vote:disabled { cursor: default; }
|
||
.cloud__vote--down { padding: .05em .25em; }
|
||
.cloud__word.is-mine .cloud__vote--up, .cloud__word.is-down .cloud__vote--down { background: var(--surface-2); }
|
||
.cloud__word.is-down .cloud__vote--up { opacity: .55; }
|
||
|
||
.answers { list-style: none; padding: 0; margin: 0; columns: 280px; column-gap: 12px; }
|
||
.answer { break-inside: avoid; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; word-break: break-word; }
|
||
|
||
/* ---------------------------------------------------------------- presenter */
|
||
body.present {
|
||
--bg: #0f1020;
|
||
--surface-2: #1f2140;
|
||
--text: #f3f4ff;
|
||
--muted: #a3a7cf;
|
||
background: radial-gradient(1200px 600px at 10% -10%, #2a1f6e 0%, transparent 60%), var(--bg);
|
||
color: var(--text);
|
||
overflow: hidden;
|
||
}
|
||
.stage { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; padding: 20px 4vw; }
|
||
.stage__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: clamp(1rem, 1.6vw, 1.4rem); color: var(--muted); }
|
||
.stage__top strong { color: var(--text); }
|
||
.stage__code { letter-spacing: .12em; background: rgba(255, 255, 255, .1); padding: 2px 10px; border-radius: 8px; }
|
||
.stage__qr { border: 0; padding: 4px; background: #fff; border-radius: 8px; cursor: zoom-in; }
|
||
.stage__qr img { display: block; width: 72px; height: 72px; }
|
||
.stage__main { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: auto; padding: 2vh 0; }
|
||
.stage__type { text-transform: uppercase; letter-spacing: .12em; color: var(--c1); font-weight: 700; margin: 0 0 .6em; }
|
||
.stage__question { font-size: clamp(2rem, 4.5vw, 4rem); margin-bottom: .3em; }
|
||
.stage__description { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--muted); white-space: pre-line; margin-top: 0; }
|
||
.stage--content .stage__description { color: var(--text); font-size: clamp(1.3rem, 2.6vw, 2.2rem); }
|
||
.stage__results { font-size: clamp(1rem, 1.8vw, 1.5rem); margin-top: 2vh; }
|
||
.stage--closed .stage__type::after { content: " · Abstimmung geschlossen"; color: var(--muted); }
|
||
.stage .bar__track { height: 1.1em; }
|
||
.stage .columns { height: 34vh; }
|
||
.stage .cloud { font-size: clamp(1.4rem, 2.6vw, 2.6rem); }
|
||
.stage .answers { columns: 340px; }
|
||
|
||
.stage__controls { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; opacity: .35; transition: opacity .2s; padding-top: 12px; }
|
||
.stage__controls:hover, .stage__controls:focus-within { opacity: 1; }
|
||
.ctrl { min-width: 44px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
|
||
.ctrl:hover { background: rgba(255, 255, 255, .15); }
|
||
.ctrl-counter { color: var(--muted); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
|
||
|
||
.qr-overlay { position: fixed; inset: 0; background: rgba(8, 9, 20, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; cursor: zoom-out; z-index: 10; }
|
||
.qr-overlay img { width: min(70vh, 80vw); height: auto; background: #fff; border-radius: 16px; padding: 16px; }
|
||
.qr-overlay p { font-size: 1.4rem; }
|