html, body {
  height: 100%;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.brand {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
}

.big-icon {
  font-size: 4rem;
  line-height: 1;
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin: 0;
}

/* ---- Join form ---- */
.join-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.code-input {
  width: 100%;
  min-height: 64px;
  font-size: 2rem;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: monospace;
}

.code-input:focus {
  outline: none;
  border-color: var(--accent);
}

.error-text {
  color: var(--danger);
  font-size: 0.9rem;
}

/* ---- Question prompt ---- */
.prompt {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
}

/* ---- MCQ ---- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.option-btn {
  min-height: 56px;
  width: 100%;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.option-btn:active {
  transform: scale(0.98);
}

.option-btn.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.option-btn:disabled {
  opacity: 0.55;
}

/* ---- Word cloud ---- */
.word-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.word-input {
  min-height: 56px;
  width: 100%;
  font-size: 1.3rem;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  padding: 0 16px;
}

.word-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- Rating ---- */
.rating-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.rating-btn {
  min-width: 56px;
  min-height: 56px;
  flex: 1;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

.rating-btn.selected {
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 22%, var(--surface));
}

.rating-scale-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---- Voted / closed ---- */
.checkmark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.4rem;
}

.your-choice {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  opacity: 0.85;
}
