.field-group {
  min-width: 0;
  margin-top: 18px;
}

.choices-field {
  margin-top: 22px;
}

.choices-list {
  display: grid;
  gap: 10px;
}

input {
  width: 100%;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 0.9375rem;
  padding: 14px 16px;
  min-height: 52px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
}

.btn--compact {
  margin-top: 10px;
  min-height: 44px;
  padding-inline: 16px;
}

.qr-preview {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  text-align: center;
}

.admin-qr-preview {
  margin-top: 20px;
}

#admin-qr-code {
  display: flex;
  justify-content: center;
  margin: 0 auto 12px;
}

#admin-qr-code img,
#admin-qr-code canvas {
  display: block;
  width: 220px;
  height: 220px;
  max-width: 100%;
}

.qr-preview p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}

.qr-actions {
  justify-content: center;
  margin-top: 14px;
}

.room-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-pill {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 12%, var(--md-sys-color-surface));
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 700;
}

.status-pill.is-finished {
  background: var(--danger-container);
  color: var(--danger);
}

.btn--finish {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
}

.room-question {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.45;
}

.admin-vote-area,
.new-vote-area {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.admin-vote-area h3,
.new-vote-area h3 {
  margin: 0 0 6px;
  color: var(--md-sys-color-on-surface);
  font-size: 1rem;
}

.admin-vote-area__desc,
.new-vote-area p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.summary-box {
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  text-align: center;
}

.summary-box span {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 700;
}

.summary-box strong {
  display: block;
  margin-top: 4px;
  color: var(--md-sys-color-on-surface);
  font-size: 1.6rem;
  line-height: 1.2;
}

.result-area {
  margin-top: 18px;
}

.result-area h3 {
  margin: 0 0 12px;
  color: var(--md-sys-color-on-surface);
  font-size: 1rem;
}

.vote-results {
  display: grid;
  gap: 12px;
}

.vote-result {
  display: grid;
  gap: 7px;
}

.vote-result__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--md-sys-color-on-surface);
  font-size: 0.9rem;
}

.vote-result__head strong {
  overflow-wrap: anywhere;
}

.vote-result__bar {
  height: 14px;
  border-radius: 999px;
  background: var(--md-sys-color-outline-variant);
  overflow: hidden;
}

.vote-result__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--md-sys-color-primary);
  transition: width 0.25s ease;
}

.room-choices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  cursor: pointer;
}

.choice-card input {
  width: 18px;
  min-height: auto;
  height: 18px;
  padding: 0;
}

.thanks-area {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-primary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 24%, transparent);
}

.thanks-area h3 {
  margin: 0 0 6px;
  color: var(--md-sys-color-on-primary-container);
  font-size: 1rem;
}

.thanks-area p {
  margin: 0;
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  input {
    min-height: 48px;
    padding: 12px 10px;
    font-size: 0.875rem;
  }

  .room-header {
    display: block;
  }

  .room-header .btn {
    margin-top: 14px;
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .qr-actions .btn,
  .new-vote-area .btn {
    width: 100%;
  }
}