:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #637083;
  --line: #d9e1eb;
  --navy: #061c46;
  --navy-2: #0b3576;
  --blue: #2e99ff;
  --green: #18d990;
  --red: #d94040;
  --amber: #e7a51c;
  --shadow: 0 16px 40px rgba(8, 24, 54, 0.12);
  font-family:
    Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--navy-2);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    opacity 0.15s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.button.secondary,
button.secondary {
  color: var(--ink);
  background: #e5ecf5;
}

.button.success,
button.success {
  background: #0e9f68;
}

.button.danger,
button.danger {
  background: var(--red);
}

.button.ghost,
button.ghost {
  color: var(--navy-2);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.brand-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.polls-panel {
  grid-column: 1 / -1;
}

.mobile-section-tabs {
  display: none;
}

.mobile-section-tabs[hidden] {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.panel-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.panel-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.panel-body {
  padding: 20px;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row label {
  color: #29354a;
  font-weight: 700;
  font-size: 14px;
}

textarea,
input[type="text"],
input[type="number"],
input[type="password"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 153, 255, 0.14);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

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

.section-config {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.section-config-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section-config-header h3 {
  margin: 0;
  color: #172033;
  font-size: 16px;
  line-height: 1.25;
}

.sections-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

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

.section-name-input {
  min-height: 54px;
  resize: vertical;
}

.section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 10px;
  font-weight: 800;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 18px;
}

.switch-row input {
  width: 20px;
  height: 20px;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.stat-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.poll-list {
  display: grid;
  gap: 14px;
}

.poll-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.poll-item.open {
  border-color: rgba(24, 217, 144, 0.55);
  box-shadow: inset 4px 0 0 var(--green);
}

.poll-item.closed {
  opacity: 0.78;
}

.poll-question {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.poll-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  color: #29354a;
  background: #e8eef7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.badge.open {
  color: #064b32;
  background: rgba(24, 217, 144, 0.18);
}

.badge.closed {
  color: #5b6474;
  background: #e4e8ee;
}

.badge.draft {
  color: #6e4a00;
  background: rgba(231, 165, 28, 0.18);
}

.badge.section {
  color: #181083;
  background: rgba(46, 153, 255, 0.14);
}

.poll-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-actions {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.result-list {
  display: grid;
  gap: 14px;
}

.admin-result-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-result-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

.admin-result-table th,
.admin-result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-result-table th {
  color: #637083;
  background: #f4f7fb;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-result-table th:nth-child(2),
.admin-result-table th:nth-child(3),
.admin-result-table td:nth-child(2),
.admin-result-table td:nth-child(3) {
  width: 110px;
  text-align: right;
  white-space: nowrap;
}

.admin-result-table tr:last-child td {
  border-bottom: 0;
}

.admin-vote-total {
  margin: 10px 0 14px;
  color: #29354a;
  font-size: 14px;
  font-weight: 800;
}

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

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.result-title {
  font-weight: 750;
}

.result-number {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.bar-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef8;
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.35s ease;
}

.result-row.winner .bar-fill {
  background: var(--green);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #fbfdff;
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-line.error {
  color: var(--red);
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(229, 241, 255, 0.94) 54%, rgba(24, 16, 131, 0.2) 100%),
    #eef3f8;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  color: #ffffff;
  background: var(--navy);
}

.login-header img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.login-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.login-header p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.login-form label {
  color: #29354a;
  font-weight: 700;
}

.admin-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.admin-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.admin-section-group {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-header h3 {
  margin: 0;
  color: #181083;
  font-size: 18px;
  line-height: 1.25;
}

.screen-body {
  min-height: 100vh;
  color: #181083;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.96) 37%, rgba(219, 251, 224, 0.94) 57%, rgba(168, 209, 255, 0.96) 77%, rgba(83, 47, 235, 0.98) 100%),
    linear-gradient(20deg, rgba(255, 255, 255, 0) 0%, rgba(197, 244, 222, 0.78) 48%, rgba(79, 56, 232, 0.88) 100%);
  font-family:
    Roboto, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.screen-wrap {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.4vw, 64px);
}

.screen-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(100, 69, 236, 0.18) 100%),
    linear-gradient(100deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0) 58%);
  pointer-events: none;
}

.screen-hero-mark {
  position: absolute;
  right: clamp(18px, 1.2vw, 26px);
  bottom: clamp(22px, 3.8vw, 72px);
  z-index: 0;
  width: clamp(420px, 39vw, 760px);
  max-height: 75vh;
  object-fit: contain;
  opacity: 0.98;
  pointer-events: none;
  filter: drop-shadow(0 24px 48px rgba(67, 46, 190, 0.28));
}

.screen-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 780px) minmax(260px, 1fr);
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.screen-header::after {
  content: "";
}

.screen-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.screen-brand img {
  width: clamp(48px, 3.4vw, 66px);
  height: clamp(48px, 3.4vw, 66px);
  border-radius: 50%;
}

.screen-brand h1 {
  margin: 0;
  color: #181083;
  font-size: 2.875rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.screen-brand p {
  margin: 7px 0 0;
  color: rgba(24, 16, 131, 0.58);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
}

.conference-partners-lockup {
  display: block;
  justify-self: center;
  box-sizing: border-box;
  width: min(47vw, 780px);
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(24, 16, 131, 0.12);
  border-radius: 8px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.64);
  object-fit: contain;
  box-shadow: 0 14px 34px rgba(68, 52, 181, 0.08);
  backdrop-filter: blur(12px);
}

.screen-stat {
  min-width: 320px;
  border: 1px solid rgba(24, 16, 131, 0.12);
  border-radius: 8px;
  padding: 14px 20px;
  color: rgba(24, 16, 131, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 38px rgba(68, 52, 181, 0.12);
  font-size: 1.375rem;
  font-weight: 700;
  text-align: right;
  backdrop-filter: blur(16px);
}

.screen-main {
  display: grid;
  align-items: stretch;
  position: relative;
  z-index: 1;
  padding-top: clamp(18px, 2.4vh, 32px);
}

.screen-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) minmax(380px, 0.36fr);
  align-items: center;
  min-height: 100%;
  gap: clamp(28px, 4vw, 72px);
}

.screen-wrap.multi-active .screen-hero-mark {
  right: -4vw;
  bottom: -9vh;
  width: min(42vw, 660px);
  opacity: 0.18;
}

.screen-poll-grid {
  display: grid;
  align-items: stretch;
  gap: clamp(16px, 1.6vw, 28px);
  min-height: 100%;
}

.screen-poll-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-poll-grid.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screen-poll-grid.count-4 {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.screen-poll-card {
  display: grid;
  align-content: start;
  min-width: 0;
  border: 1px solid rgba(24, 16, 131, 0.12);
  border-radius: 8px;
  padding: clamp(18px, 1.8vw, 30px);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 42px rgba(68, 52, 181, 0.1);
  backdrop-filter: blur(14px);
}

.screen-card-kicker {
  margin: 0 0 10px;
  color: rgba(24, 16, 131, 0.62);
  font-size: clamp(1rem, 1.1vw, 1.25rem);
  font-weight: 700;
  line-height: 1.15;
}

.screen-poll-card h2 {
  margin: 0;
  color: #181083;
  font-size: clamp(1.8rem, 2.45vw, 3.25rem);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: 0;
}

.screen-poll-card h2.medium {
  font-size: clamp(1.55rem, 1.95vw, 2.45rem);
}

.screen-poll-card h2.compact {
  font-size: clamp(1.35rem, 1.65vw, 2rem);
}

.screen-card-results {
  display: grid;
  gap: clamp(8px, 0.8vw, 12px);
  margin-top: clamp(16px, 1.8vw, 26px);
}

.screen-result.compact {
  width: 100%;
  gap: 5px;
}

.screen-result.compact .screen-result-head {
  gap: 12px;
}

.screen-result.compact .screen-result-title {
  font-size: clamp(0.95rem, 1vw, 1.2rem);
  line-height: 1.12;
}

.screen-result.compact .screen-result-number {
  font-size: clamp(1rem, 1.1vw, 1.3rem);
}

.screen-result.compact .screen-bar-track {
  height: clamp(18px, 1.8vw, 28px);
}

.screen-card-waiting {
  border: 1px dashed rgba(24, 16, 131, 0.18);
  border-radius: 8px;
  padding: clamp(16px, 1.6vw, 24px);
  color: #181083;
  background: rgba(255, 255, 255, 0.5);
}

.screen-card-waiting p {
  margin: 0;
  color: rgba(24, 16, 131, 0.7);
  font-size: clamp(1rem, 1vw, 1.25rem);
  line-height: 1.25;
  font-weight: 500;
}

.screen-card-waiting .screen-waiting-title {
  margin-bottom: 6px;
  color: #181083;
  font-size: clamp(1.2rem, 1.4vw, 1.65rem);
  font-weight: 700;
}

.screen-copy {
  display: grid;
  align-content: start;
  max-width: 1240px;
  min-width: 0;
}

.screen-art-space {
  min-height: 440px;
}

.screen-kicker {
  margin: 0 0 clamp(10px, 1.4vw, 18px);
  color: #181083;
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0;
}

.qr-box {
  border-radius: 8px;
  padding: clamp(16px, 1.4vw, 26px);
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(48, 37, 151, 0.16);
}

.qr-box img {
  display: block;
  width: 100%;
  height: auto;
}

.connect-copy h2 {
  margin: 0;
}

.question-view h2 {
  margin: 0;
  max-width: 1120px;
  color: #181083;
  font-size: 4.25rem;
  line-height: 1.03;
  font-weight: 500;
  letter-spacing: 0;
}

.question-view h2.medium {
  font-size: 3.05rem;
}

.question-view h2.compact {
  font-size: 2.45rem;
}

.connect-view h2 {
  margin: 0;
  max-width: 1160px;
  color: #181083;
  font-size: 5.5rem;
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen-lead {
  max-width: 880px;
  margin: clamp(20px, 2.2vw, 34px) 0 0;
  color: rgba(24, 16, 131, 0.72);
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 500;
}

.screen-qr-row {
  display: grid;
  grid-template-columns: clamp(220px, 17vw, 330px) minmax(280px, 520px);
  align-items: center;
  gap: clamp(22px, 2.8vw, 44px);
  margin-top: clamp(34px, 4vw, 68px);
}

.screen-qr-row p {
  margin: 0;
  color: rgba(24, 16, 131, 0.76);
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
}

.screen-results {
  display: grid;
  gap: clamp(10px, 1vw, 16px);
  margin-top: clamp(18px, 2.4vw, 32px);
}

.screen-result {
  display: grid;
  gap: 8px;
  width: min(100%, 1120px);
}

.screen-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 24px;
}

.screen-result-title {
  color: #181083;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.16;
}

.screen-bar-track {
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(24, 16, 131, 0.1);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.screen-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #181083;
  transition: width 0.45s ease;
}

.screen-result.tone-violet .screen-bar-fill {
  background: #6b38de;
}

.screen-result.tone-blue .screen-bar-fill {
  background: #419cec;
}

.screen-result.tone-mint .screen-bar-fill {
  background: #72d7be;
}

.screen-result.tone-lilac .screen-bar-fill {
  background: #b962ea;
}

.screen-result.winner .screen-bar-fill {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.screen-result-number {
  color: #181083;
  font-size: 2rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.screen-waiting {
  display: grid;
  grid-template-columns: clamp(170px, 13vw, 250px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
  width: min(100%, 900px);
  border-radius: 8px;
  padding: clamp(18px, 2vw, 30px);
  color: #181083;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 22px 58px rgba(68, 52, 181, 0.12);
  backdrop-filter: blur(14px);
}

.compact-qr {
  padding: 12px;
}

.screen-waiting p {
  margin: 0;
  color: rgba(24, 16, 131, 0.72);
  font-size: 1.625rem;
  line-height: 1.28;
  font-weight: 500;
}

.screen-waiting .screen-waiting-title {
  margin-bottom: 8px;
  color: #181083;
  font-size: 2.625rem;
  font-weight: 700;
}

.join-body {
  min-height: 100vh;
  background: #f3f7fb;
}

.join-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 18px;
}

.join-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.join-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: #ffffff;
  background: var(--navy);
}

.join-header img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.join-header h1 {
  margin: 0;
  font-size: 26px;
}

.join-content {
  padding: 22px;
}

.join-question {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.25;
}

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

.vote-options button {
  min-height: 54px;
  justify-content: flex-start;
  padding: 14px 16px;
  color: var(--ink);
  background: #eef5ff;
  text-align: left;
}

.vote-options button.selected {
  color: #063f2b;
  background: rgba(24, 217, 144, 0.2);
  box-shadow: inset 0 0 0 2px var(--green);
}

.join-poll-menu {
  display: grid;
  gap: 12px;
}

.join-poll-menu button {
  display: grid;
  min-height: 64px;
  justify-content: stretch;
  justify-items: start;
  gap: 4px;
  padding: 14px 16px;
  color: var(--ink);
  background: #eef5ff;
  text-align: left;
}

.join-section {
  color: #181083;
  font-size: 14px;
  line-height: 1.2;
}

.join-poll-menu small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.join-back-button {
  margin-top: 14px;
}

@media (max-width: 1280px) {
  .screen-wrap {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .screen-brand h1 {
    font-size: 2.75rem;
  }

  .screen-poll-grid.count-3,
  .screen-poll-grid.count-4 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .screen-poll-card {
    padding: 18px;
  }

  .screen-results {
    gap: 6px;
    margin-top: 12px;
  }

  .screen-result {
    gap: 4px;
  }

  .screen-kicker {
    font-size: 1.2rem;
  }

  .connect-view h2 {
    font-size: 4rem;
  }

  .question-view h2 {
    font-size: 3rem;
  }

  .question-view h2.medium {
    font-size: 2.15rem;
  }

  .question-view h2.compact {
    font-size: 2rem;
  }

  .screen-lead,
  .screen-qr-row p {
    font-size: 1.75rem;
  }

  .screen-result-title {
    font-size: 1rem;
    line-height: 1.08;
  }

  .screen-bar-track {
    height: 24px;
  }

  .screen-result-number,
  .screen-waiting .screen-waiting-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  .admin-section-grid,
  .admin-active-grid {
    grid-template-columns: 1fr;
  }

  .screen-layout,
  .screen-qr-row,
  .screen-waiting,
  .screen-result-head {
    grid-template-columns: 1fr;
  }

  .screen-header {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .screen-header::after {
    display: none;
  }

  .screen-poll-grid,
  .screen-poll-grid.count-2,
  .screen-poll-grid.count-3,
  .screen-poll-grid.count-4 {
    grid-template-columns: 1fr;
  }

  .screen-stat {
    width: 100%;
    min-width: 0;
  }

  .conference-partners-lockup {
    justify-self: start;
    width: min(100%, 680px);
  }

  .screen-art-space {
    min-height: 220px;
  }

  .screen-hero-mark {
    right: -70px;
    bottom: -70px;
    width: min(78vw, 520px);
    opacity: 0.28;
  }

  .screen-result-number,
  .screen-stat {
    text-align: left;
  }

  .connect-view h2 {
    font-size: 4rem;
  }

  .question-view h2,
  .question-view h2.medium {
    font-size: 3.25rem;
  }

  .question-view h2.compact {
    font-size: 2.5rem;
  }
}

@media (max-width: 640px) {
  body {
    -webkit-text-size-adjust: 100%;
  }

  button,
  .button {
    min-height: 44px;
    padding: 11px 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  textarea,
  input[type="text"],
  input[type="number"],
  input[type="password"],
  select {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    min-height: 120px;
  }

  .topbar {
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
    gap: 10px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-subtitle {
    font-size: 12px;
    line-height: 1.25;
  }

  .topbar .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .topbar .actions .button,
  .topbar .actions button {
    width: 100%;
    min-height: 42px;
    padding: 10px 8px;
    font-size: 13px;
  }

  .layout {
    align-items: start;
    padding: 14px;
    gap: 14px;
  }

  .mobile-section-tabs {
    display: grid;
    grid-column: 1 / -1;
    gap: 8px;
  }

  .mobile-section-tabs button {
    width: 100%;
    min-height: 48px;
    color: #181083;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 0 0 1px rgba(24, 16, 131, 0.16);
    font-weight: 700;
  }

  .mobile-section-tabs button.active {
    color: #ffffff;
    background: #181083;
    box-shadow: none;
  }

  .mobile-tab-hidden {
    display: none;
  }

  .dashboard-panel {
    order: 1;
  }

  .polls-panel {
    order: 2;
  }

  .create-panel {
    order: 3;
  }

  .panel {
    overflow: hidden;
  }

  .panel-header,
  .panel-body {
    padding: 16px;
  }

  .panel-title {
    font-size: 17px;
  }

  .panel-note {
    font-size: 13px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stat {
    padding: 10px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
    line-height: 1.15;
  }

  .panel-header {
    flex-direction: column;
  }

  .dashboard-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-actions button {
    width: 100%;
    min-height: 50px;
    padding: 10px 8px;
    font-size: 13px;
  }

  .section-config-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-config-header button {
    width: 100%;
  }

  .sections-editor {
    padding: 12px;
  }

  .section-actions {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
  }

  .section-actions button {
    width: 100%;
  }

  .section-actions [data-disable-sections] {
    grid-column: 1 / -1;
  }

  .icon-button {
    width: 48px;
    min-width: 48px;
  }

  .admin-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-section-header h3 {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .admin-section-header .button {
    width: 100%;
  }

  .poll-item {
    padding: 14px;
  }

  .poll-question {
    font-size: 16px;
  }

  .poll-meta {
    gap: 6px;
  }

  .badge {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .poll-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .poll-actions button {
    width: 100%;
    min-height: 46px;
    padding: 10px 8px;
    font-size: 13px;
  }

  .poll-actions button[data-action="reset"],
  .poll-actions button[data-action="delete"] {
    display: none;
  }

  .admin-result-table-wrap {
    overflow-x: visible;
  }

  .admin-result-table {
    min-width: 0;
  }

  .admin-result-table thead {
    display: none;
  }

  .admin-result-table,
  .admin-result-table tbody,
  .admin-result-table tr,
  .admin-result-table td {
    display: block;
    width: 100%;
  }

  .admin-result-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .admin-result-table tr:last-child {
    border-bottom: 0;
  }

  .admin-result-table td {
    border-bottom: 0;
    padding: 0;
    text-align: left;
  }

  .admin-result-table td:first-child {
    margin-bottom: 8px;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .admin-result-table td:nth-child(2),
  .admin-result-table td:nth-child(3) {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 5px;
    margin-right: 14px;
    color: #172033;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
  }

  .admin-result-table td:nth-child(2)::before {
    content: "Доля";
  }

  .admin-result-table td:nth-child(3)::before {
    content: "Голоса";
  }

  .admin-result-table td:nth-child(2)::before,
  .admin-result-table td:nth-child(3)::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .admin-vote-total {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .empty {
    padding: 18px 14px;
  }

  .login-shell {
    padding: 14px;
  }

  .login-header {
    padding: 18px;
  }

  .login-header img {
    width: 50px;
    height: 50px;
  }

  .login-header h1 {
    font-size: 28px;
  }

  .login-form {
    padding: 18px;
  }

  .screen-wrap {
    padding: 22px;
  }

  .screen-main {
    padding-top: 34px;
  }

  .screen-qr-row {
    grid-template-columns: 1fr;
  }

  .screen-qr-row .qr-box {
    width: min(100%, 280px);
  }

  .screen-brand h1 {
    font-size: 2rem;
  }

  .screen-brand p,
  .screen-stat {
    font-size: 1rem;
  }

  .screen-kicker,
  .screen-lead,
  .screen-qr-row p,
  .screen-result-title,
  .screen-waiting p {
    font-size: 1.25rem;
  }

  .connect-view h2 {
    font-size: 2.75rem;
  }

  .question-view h2,
  .question-view h2.medium,
  .question-view h2.compact {
    font-size: 2.25rem;
  }

  .screen-result-number,
  .screen-waiting .screen-waiting-title {
    font-size: 1.75rem;
  }
}
