:root {
  --bg: #f3f7fa;
  --panel: #ffffff;
  --panel-2: #f8fbf9;
  --text: #162019;
  --muted: #66736b;
  --line: #dce5df;
  --brand: #257c39;
  --brand-dark: #155b27;
  --danger: #b93838;
  --danger-dark: #8d2626;
  --danger-soft: #fff1f1;
  --focus: #c5d9cb;
  --warning: #936512;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

[data-screen-heading]:focus {
  outline: none;
}

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

.surface {
  width: min(100%, 680px);
  min-height: min(640px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.surface--negative,
.surface--positive {
  width: min(100%, 960px);
}

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

.brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand__logo--fallback {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-weight: 820;
  font-size: 24px;
  line-height: 1;
}

.brand__name,
.admin-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: 0;
}

.brand__branch {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.stack {
  display: grid;
  gap: 18px;
}

.question {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: 0;
}

.lead {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 17px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.field label,
.field__label {
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.field--wide {
  grid-column: span 2;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.textarea {
  min-height: 118px;
  resize: vertical;
}

.textarea--small {
  min-height: 96px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid--compact {
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.filters--tickets {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.choice {
  min-height: 112px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease;
}

.choice--good {
  background: #f2f8f3;
  border-color: #cfe2d3;
}

.choice--bad {
  background: #fff5f2;
  border-color: #e8d3cc;
}

.choice--good:active {
  background: #e8f3ea;
  border-color: #9fc6a8;
}

.choice--bad:active {
  background: #fdebe6;
  border-color: #d8afa5;
}

@media (hover: hover) {
  .choice--good:hover {
    background: #edf6ef;
    border-color: #a8ccb0;
  }

  .choice--bad:hover {
    background: #fff0ec;
    border-color: #dcb9b0;
  }
}

.choice__icon {
  width: 64px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.choice__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.choice__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.choice__title {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
}

.choice--good .choice__title {
  color: #257c39;
}

.choice--bad .choice__title {
  color: #914a40;
}

.choice__subtitle {
  color: #5f6c64;
  font-size: 14px;
  font-weight: 540;
  line-height: 1.4;
}

.feedback-hero {
  display: grid;
  gap: 2px;
  max-width: 780px;
}

.feedback-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 44px rgba(25, 43, 32, 0.07);
}

.feedback-panel .field--wide,
.feedback-message,
.feedback-contact,
.checkbox--panel,
.feedback-actions {
  grid-column: 1 / -1;
}

.feedback-panel .input,
.feedback-panel .textarea {
  background: #ffffff;
}

.feedback-panel .textarea {
  min-height: 148px;
}

.feedback-panel--positive {
  border-color: #cfe2d3;
  background: linear-gradient(180deg, rgba(242, 248, 243, 0.94), rgba(255, 255, 255, 0.86));
}

.feedback-contact {
  display: grid;
  gap: 4px;
  padding: 2px;
}

.feedback-contact strong {
  font-size: 17px;
  line-height: 1.3;
}

.feedback-contact span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field .field-error,
.feedback-contact .field-error,
.consent-block .field-error {
  color: #8d2626;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.4;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: #c86d62;
  box-shadow: 0 0 0 3px rgba(200, 109, 98, 0.12);
}

.checkbox input[aria-invalid="true"] {
  outline: 2px solid #c86d62;
  outline-offset: 2px;
}

.checkbox--panel {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.checkbox--panel .checkbox {
  align-items: flex-start;
}

.consent-policy {
  width: fit-content;
  min-height: 44px;
  margin: 2px 0 -6px;
  color: var(--brand);
  font-size: inherit;
  display: inline-flex;
  align-items: center;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.checkbox--panel > .consent-policy {
  margin-left: 32px;
}

.feedback-actions {
  padding-top: 2px;
}

.feedback-actions .button {
  min-width: 128px;
}

.button.button--text {
  min-height: 44px;
  min-width: 0;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
}

.button.button--text:hover {
  color: var(--text);
  background: transparent;
}

.button.button--archive {
  color: #914a40;
}

.button.button--archive:hover {
  color: #71372f;
}

.completion-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.settings-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.settings-panel--compact {
  margin-top: 0;
}

.settings-warning {
  margin: 8px 0 0;
  color: #7a5510;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.settings-form__url {
  width: min(420px, 100%);
}

.privacy-settings {
  display: grid;
  gap: 20px;
}

.settings-page {
  display: grid;
  gap: 14px;
}

.flow-settings {
  display: grid;
  gap: 18px;
}

.flow-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.flow-fieldset legend {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 720;
}

.flow-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.flow-option {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  cursor: pointer;
}

.flow-option:hover {
  border-color: #b7c9bd;
}

.flow-option:has(input:checked) {
  border-color: #91bd9c;
  background: #f2f8f3;
  box-shadow: 0 0 0 3px rgba(54, 135, 70, 0.08);
}

.flow-option input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.flow-option span {
  display: grid;
  gap: 5px;
}

.flow-option strong {
  line-height: 1.35;
}

.flow-option small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.privacy-settings__heading {
  margin-bottom: 0;
}

.settings-form--stacked {
  display: grid;
  justify-content: stretch;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.settings-form--stacked .settings-form__url {
  width: 100%;
}

.settings-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-status--active {
  color: #256a36;
  background: #e8f3ea;
  border: 1px solid #cfe2d3;
}

.settings-status--inactive {
  color: #7a5510;
  background: #fff7e5;
  border: 1px solid #ebd9ab;
}

.settings-status--neutral {
  color: #375042;
  background: #eef4f0;
  border: 1px solid var(--line);
}

.settings-save {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #b9cec0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(25, 43, 32, 0.12);
  backdrop-filter: blur(10px);
}

.settings-save > div {
  display: grid;
  gap: 2px;
}

.settings-save span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.consent-preview {
  display: grid;
  gap: 10px;
}

.consent-preview__row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  line-height: 1.45;
}

.consent-preview__check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
}

.consent-preview a {
  color: var(--brand-dark);
  text-underline-offset: 3px;
}

.consent-preview em {
  color: #7a5510;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: var(--panel);
  background: var(--brand);
  font-weight: 730;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.button:hover {
  background: var(--brand-dark);
}

.button:disabled {
  cursor: not-allowed;
  background: #cfdad3;
  color: #718078;
}

.button--ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.button--ghost:hover {
  background: var(--panel);
}

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

.button--danger:hover {
  background: var(--danger-dark);
}

.notice {
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.notice--loading {
  border-color: #cbded0;
  background: #f4faf6;
}

.startup-notice {
  width: min(100%, 360px);
  text-align: center;
}

.fatal-panel {
  width: min(100%, 520px);
  display: grid;
  justify-items: start;
  gap: 14px;
}

.error {
  border-color: #f0bbbb;
  background: var(--danger-soft);
  color: #7b1e1e;
}

.footer {
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--brand-dark);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

.branch-picker,
.branch-list,
.tickets {
  display: grid;
  gap: 10px;
}

.branch-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  display: grid;
  gap: 5px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
}

.branch-card:hover {
  border-color: var(--brand);
}

.branch-card span {
  color: var(--muted);
}

.admin-shell {
  min-height: 100vh;
  padding: 20px;
}

.admin-layout {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

#admin-main {
  display: grid;
  gap: 18px;
  outline: none;
}

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

.login-panel {
  width: min(100%, 440px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 22px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.tab {
  min-height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  border-color: var(--brand);
  color: var(--text);
}

.tab:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading .section-title {
  margin-bottom: 0;
}

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

.stats--wide {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.stats--analytics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.stat--positive {
  background: #f3faf5;
  border-color: #cce2d1;
}

.stat--negative {
  background: #fff6f5;
  border-color: #edcfca;
}

.stat--warning {
  background: #fffaf0;
  border-color: #ead9b3;
}

.stat__context {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.stat--positive .stat__context {
  color: var(--brand-dark);
}

.stat--negative .stat__context {
  color: var(--danger-dark);
}

.stat--warning .stat__context {
  color: var(--warning);
}

.stat__value {
  font-size: 28px;
  font-weight: 780;
}

.stat__label {
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
}

.stat__detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ticket {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.ticket--positive {
  border-color: #cfe2d3;
  background: linear-gradient(90deg, #f7fbf8 0, var(--panel) 32%);
}

.ticket__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ticket__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.ticket__branch {
  margin: 5px 0 12px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef4f0;
  color: #375042;
  font-size: 13px;
  font-weight: 650;
}

.branch-code {
  background: #edf2ff;
  color: #344d7b;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ticket__message {
  margin: 0 0 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.ticket__contacts div {
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.ticket__contacts dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.ticket__contacts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ticket__controls {
  display: grid;
  gap: 10px;
  align-content: start;
}

.consent-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.consent-summary a {
  color: var(--brand-dark);
}

.history {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.history__item {
  display: grid;
  grid-template-columns: 120px 140px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.history__item span {
  color: var(--text);
  font-weight: 650;
}

.history__item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.branch-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(460px, 1.35fr);
  gap: 12px;
  align-items: center;
}

.branch-row--card {
  align-items: start;
}

.branch-row--archived {
  background: #f5f1ee;
}

.branch-row__main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.branch-row__main span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.branch-actions {
  display: grid;
  gap: 10px;
}

.branch-link-actions {
  display: grid;
  gap: 5px;
}

.copy-feedback {
  min-height: 18px;
  color: var(--brand-dark);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 0 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pagination .button {
  min-height: 44px;
}

.branch-editor {
  display: grid;
  gap: 12px;
}

.branch-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.branch-form__active {
  grid-column: span 2;
}

.public-link-input {
  min-height: 44px;
  font-size: 13px;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.25;
}

.table-like {
  display: grid;
  gap: 8px;
}

.table-row,
.health-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(6, minmax(140px, 0.75fr));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  color: var(--muted);
  font-size: 14px;
}

.table-row strong,
.health-row strong {
  color: var(--text);
}

.analytics-note {
  margin: -4px 0 14px;
}

.analytics-cell {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.analytics-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.analytics-cell b {
  color: var(--text);
  font-weight: 780;
}

.analytics-cell--positive small {
  color: var(--brand-dark);
}

.analytics-cell--negative small {
  color: var(--danger-dark);
}

.health-row {
  grid-template-columns: minmax(170px, 0.7fr) minmax(260px, 1.2fr) minmax(110px, 0.4fr);
}

.health-row--critical {
  border-color: #f0bbbb;
  background: var(--danger-soft);
}

.health-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .filters,
  .branch-form,
  .feedback-panel,
  .settings-panel,
  .stats,
  .ticket,
  .branch-row,
  .ticket__contacts,
  .table-row,
  .health-row {
    grid-template-columns: 1fr;
  }

  .flow-options {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: span 1;
  }

  .branch-form__active {
    grid-column: span 1;
  }

  .settings-form {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
    place-items: stretch;
  }

  .surface {
    min-height: calc(100vh - 36px);
  }

  .surface--rating .main {
    justify-content: flex-start;
    padding-top: 44px;
  }

  .surface--negative .main,
  .surface--positive .main {
    justify-content: flex-start;
    padding-top: 24px;
  }

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

  .choice {
    min-height: 104px;
    padding: 14px;
    gap: 12px;
  }

  .choice__icon {
    width: 64px;
    height: 64px;
  }

  .feedback-panel {
    padding: 16px;
    gap: 14px;
  }

  .feedback-panel .textarea {
    min-height: 132px;
  }

  .feedback-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .feedback-actions .button:not(.button--text) {
    width: 100%;
    min-height: 52px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.3;
    white-space: normal;
  }

  .feedback-actions .button--text {
    justify-self: start;
  }

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

  .admin-shell {
    padding: 14px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading .button {
    width: 100%;
  }

  .settings-save {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .settings-save .button {
    width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination span {
    order: -1;
    flex-basis: 100%;
  }

  .history__item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .brand__name,
  .admin-title {
    font-size: 24px;
  }
}

@media (max-width: 390px) {
  .shell {
    padding: 16px;
  }

  .surface {
    min-height: calc(100vh - 32px);
  }

  .question {
    font-size: 30px;
  }
}

@media (min-width: 640px) {
  .rating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
