body { font-family: system-ui, sans-serif; margin: 0; display: grid; place-items: start center; min-height: 100vh; }
main { box-sizing: border-box; width: 100%; max-width: 40rem; padding: 16px; }
input { box-sizing: border-box; font: inherit; padding: 8px; max-width: 100%; }
button { font: inherit; padding: 8px 14px; }
form, .link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form label { flex-basis: 100%; }
form input, .link-row input { flex: 1 1 14rem; }
#roster { list-style: none; padding: 0; margin: 0; }
#roster li { padding: 8px 0; border-bottom: 1px solid #ddd; }
#roster li::before { content: "●"; margin-right: 8px; }
#roster .online::before { color: #1a9850; }
#roster .offline { color: #777; }
#roster .offline::before { color: #bbb; }
#phases { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0; }
#phases li { padding: 6px 12px; border: 1px solid #bbb; border-radius: 999px; color: #666; }
#phases li.current { background: #1a5fb4; border-color: #1a5fb4; color: #fff; font-weight: 600; }
#phase-controls { display: flex; gap: 8px; margin: 0 0 16px; }
[hidden] { display: none !important; }
#topics { list-style: none; padding: 0; margin: 0; }
#topics li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #ddd; }
#topics .topic-text { flex: 1 1 14rem; overflow-wrap: anywhere; }
#topics small { color: #666; }
#voting-panel { margin: 0 0 16px; }
#dots-left { font-weight: 600; }
#topics .votes { color: #1a5fb4; }
#topics .my-dots { color: #1a5fb4; letter-spacing: 2px; }
#topics button:disabled { opacity: 0.4; }
#topic-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
#topics input[type="checkbox"] { width: 1.25rem; height: 1.25rem; align-self: center; }
#timer-panel { margin: 0 0 16px; padding: 12px; border: 1px solid #bbb; border-radius: 8px; }
#timer-display { font: 600 3rem/1.1 ui-monospace, monospace; text-align: center; }
#timer-message { text-align: center; font-weight: 700; margin: 4px 0; min-height: 1.5em; }
#timer-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
#timer-controls input { width: 5rem; }
#timer-panel[data-state="paused"] #timer-display { color: #777; }
#timer-panel[data-state="finished"] { background: #c01c28; border-color: #c01c28; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  #timer-panel[data-state="finished"] { animation: times-up 1s ease-in-out infinite alternate; }
}
@keyframes times-up { from { opacity: 1; } to { opacity: 0.7; } }
#topics li.current { background: #eef4fc; border-left: 4px solid #1a5fb4; padding-left: 8px; }
#topics li.finished .topic-text { text-decoration: line-through; color: #777; }
.badge { font-size: 0.8rem; padding: 2px 8px; border-radius: 999px; background: #ddd; }
.discussion { flex-basis: 100%; }
#topics .notes { list-style: none; padding: 0 0 0 16px; margin: 4px 0; }
#topics .notes li { border: 0; padding: 4px 0; }
.note-form { display: flex; gap: 8px; margin: 6px 0; }
.note-form input { flex: 1 1 10rem; }
.timer-slot #timer-panel { margin: 8px 0; }
.timer-slot #timer-display { font-size: 2rem; }
#discuss-hint { color: #8a5a00; background: #fff6e0; padding: 8px 12px; border-radius: 6px; }
#export-panel { margin: 16px 0; }
#export-fallback { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; font: 0.9rem ui-monospace, monospace; }
