:root {
  color-scheme: light;
  --accent: #0f5fb8;
  --accent-dark: #0a3f82;
  --accent-soft: #e8f1fb;
  --ink: #172033;
  --muted: #647084;
  --line: #d7dfeb;
  --surface: #ffffff;
  --surface-raised: #f7faff;
  --page: #f3f7fb;
  --success: #147a55;
  --warning: #9a6700;
  --danger: #c93535;
  --shadow: 0 18px 36px rgba(29, 57, 91, 0.08);
  --shadow-soft: 0 1px 2px rgba(29, 57, 91, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo",
    sans-serif;
  line-height: 1.45;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

.app-shell,
.public-shell,
.login-shell {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--page);
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 26px 20px;
  background: var(--surface-raised);
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 850;
}

.sidebar-brand svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.account-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5fc;
}

.account-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin-top: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-weight: 750;
}

.sidebar-logout:hover {
  background: #eef5fc;
}

.sidebar-logout svg {
  width: 22px;
  height: 22px;
}

.app-workspace {
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 34px;
  background: rgba(241, 243, 238, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.app-topbar div {
  display: grid;
  gap: 2px;
}

.app-topbar strong {
  font-size: 19px;
}

.topbar-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.app-header,
.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-weight: 800;
  font-size: clamp(21px, 2.5vw, 31px);
  white-space: nowrap;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 7px;
  background: linear-gradient(145deg, #ffffff, var(--accent-soft));
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px rgba(24, 59, 55, 0.08);
}

.sidebar-brand .brand-mark,
.brand .brand-mark {
  color: var(--accent-dark);
}

.admin-chip,
.state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 700;
}

.header-left,
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.icon-button,
.plain-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.icon-button:hover,
.plain-icon:hover {
  background: #eef4fa;
}

.icon-button svg,
.plain-icon svg,
.button svg,
.tab svg {
  width: 20px;
  height: 20px;
}

.tabbar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 32px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}

.app-sidebar .tabbar {
  flex-direction: column;
  gap: 8px;
  overflow: visible;
  padding: 0;
  background: transparent;
  border-bottom: 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: clamp(17px, 2.2vw, 25px);
  font-weight: 750;
  white-space: nowrap;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.app-sidebar .tab {
  justify-content: flex-start;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 95, 184, 0.22);
}

.tab:not(.active):hover {
  background: #eef4fa;
}

.app-sidebar .tab.active {
  background: #102844;
  color: white;
  box-shadow: none;
}

.app-sidebar .tab:not(.active):hover {
  background: #eef5fc;
  color: var(--ink);
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 38px 32px 76px;
}

.dashboard-view {
  display: grid;
  gap: 20px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.hero-copy span,
.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-action {
  display: flex;
  justify-content: flex-end;
}

.section-label {
  margin-top: 4px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(34px, 4.3vw, 50px);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 25px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-weight: 750;
  white-space: nowrap;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.button:hover {
  border-color: #bdcad8;
  box-shadow: 0 8px 20px rgba(16, 31, 51, 0.1);
}

.button.primary {
  min-height: 56px;
  padding: 0 24px;
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-size: clamp(17px, 2.2vw, 24px);
  box-shadow: 0 10px 24px rgba(15, 95, 184, 0.22);
}

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

.button.compact {
  min-height: 44px;
  font-size: 16px;
}

.button.ghost {
  box-shadow: none;
  background: transparent;
}

.button.danger,
.plain-icon.danger {
  color: var(--danger);
}

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

.pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.stat-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.link-card,
.template-card {
  display: grid;
  gap: 18px;
  padding: 28px 30px;
}

.link-card {
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--accent);
}

.link-card-header,
.template-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.link-title,
.template-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
}

.link-title svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.link-url,
.template-desc,
.muted {
  color: var(--muted);
}

.link-url {
  overflow-wrap: anywhere;
  font-size: clamp(15px, 1.8vw, 21px);
}

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

.template-actions {
  justify-content: flex-end;
}

.template-meta {
  min-width: 0;
}

.state-chip.active {
  background: #e7f7ef;
  color: var(--success);
}

.state-chip.inactive {
  background: #fff2db;
  color: var(--warning);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin-bottom: 26px;
  padding: 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

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

.response-summary article {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.response-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.response-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.response-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.response-toolbar .search-box {
  margin-bottom: 0;
}

.response-list {
  display: grid;
  gap: 16px;
}

.response-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.response-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.response-time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.response-card h2 {
  margin: 0;
  font-size: clamp(23px, 2.8vw, 32px);
  line-height: 1.15;
}

.response-contact {
  display: grid;
  gap: 3px;
  justify-items: end;
  min-width: 150px;
  color: var(--ink);
}

.response-contact strong {
  font-size: 18px;
}

.response-contact span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.response-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.response-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f9fd;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

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

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-row h2 {
  margin: 4px 0;
  font-size: clamp(22px, 2.5vw, 30px);
}

.account-row p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

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

.answer-board {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.answer-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.36fr) minmax(0, 1fr);
  min-height: 52px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.answer-row:last-child {
  border-bottom: 0;
}

.answer-row dt,
.answer-row dd {
  margin: 0;
  padding: 14px 16px;
}

.answer-row dt {
  background: #f6f9fd;
  color: var(--ink);
  font-weight: 850;
}

.answer-row dd {
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: clamp(18px, 2.8vw, 27px);
}

.search-box svg,
.drag-handle svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.table-card {
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f6f9fd;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

td {
  color: var(--muted);
  font-size: 17px;
}

td strong {
  color: var(--ink);
}

.answer-list {
  display: grid;
  gap: 6px;
}

.answer-list div {
  overflow-wrap: anywhere;
}

.back-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 750;
}

.form-card {
  padding: 34px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-soft);
}

.form-card h2,
.question-head h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 3.8vw, 42px);
}

.field-grid {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 10px;
}

.field.inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field label,
.label {
  font-size: clamp(18px, 2.3vw, 25px);
  font-weight: 780;
}

.field input,
.field select,
.field textarea,
.modal-body input,
.modal-body select,
.modal-body textarea,
.public-form input,
.public-form textarea {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: 0;
  box-shadow: inset 0 1px 3px rgba(18, 32, 47, 0.06);
  font-size: clamp(17px, 2.3vw, 23px);
}

.field textarea,
.modal-body textarea,
.public-form textarea {
  min-height: 120px;
  resize: vertical;
}

.question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 20px;
}

.question-count {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.question-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: 28px;
  margin-bottom: 20px;
}

.drag-handle {
  color: var(--muted);
  padding-top: 42px;
}

.question-tools {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 34px;
}

.question-fields {
  display: grid;
  gap: 18px;
}

.two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.4fr);
  gap: 18px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.switch input {
  width: 22px;
  height: 22px;
}

.editor-actions,
.public-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 20, 30, 0.38);
}

.modal {
  width: min(680px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(12, 20, 30, 0.24);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 28px;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 18px;
  border-radius: 8px;
  background: #172230;
  color: white;
  box-shadow: 0 12px 28px rgba(12, 20, 30, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page);
}

.login-card {
  width: min(520px, 100%);
  padding: 34px;
}

.login-card .brand {
  margin-bottom: 28px;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 46px);
}

.login-card p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 26px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f7;
}

.auth-tabs button {
  min-height: 42px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.public-main {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.public-card {
  padding: 34px;
}

.public-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
}

.public-desc {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 24px);
}

.public-form {
  display: grid;
  gap: 24px;
}

.question-block {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.respondent-block {
  background: #f8fbff;
}

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

.privacy-block {
  background: #f8fbff;
}

.privacy-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.consent-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.question-label {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 800;
}

.required {
  color: var(--danger);
}

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

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 18px;
}

.choice input {
  width: 20px;
  height: 20px;
}

.segmented-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-pill {
  position: relative;
  display: inline-flex;
}

.option-pill input,
.rating-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option-pill span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.option-pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 95, 184, 0.16);
}

.yesno-options .option-pill {
  flex: 1 1 140px;
}

.yesno-options .option-pill span {
  width: 100%;
  border-radius: 8px;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rating-choice {
  position: relative;
  display: inline-flex;
}

.rating-choice span {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #536173;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.rating-choice svg {
  width: 25px;
  height: 25px;
}

.rating-choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 95, 184, 0.14);
}

.nps-control {
  display: grid;
  gap: 8px;
}

.nps-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty-state,
.success-state {
  padding: 42px 34px;
  text-align: center;
}

.empty-state h2,
.success-state h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
}

.empty-state p,
.success-state p {
  margin: 0 auto;
  max-width: 460px;
  color: var(--muted);
  font-size: 17px;
}

.empty-state .button {
  margin-top: 24px;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-icon svg {
  width: 30px;
  height: 30px;
}

.empty-icon .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 17px;
  box-shadow: none;
}

.error-box {
  padding: 14px 16px;
  border: 1px solid #ffd1d1;
  border-radius: 8px;
  background: #fff3f3;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    gap: 14px;
    padding: 16px 18px 14px;
  }

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

  .account-card {
    display: none;
  }

  .sidebar-logout {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    min-height: 44px;
    font-size: 0;
  }

  .app-sidebar .tabbar {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
  }

  .app-sidebar .tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
  }

  .app-topbar {
    display: none;
  }

  .app-header,
  .public-header {
    padding: 16px 18px;
  }

  .brand {
    gap: 8px;
  }

  .admin-chip {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 14px;
  }

  .header-actions {
    gap: 4px;
  }

  .tabbar {
    padding: 14px 18px;
  }

  .tab {
    min-height: 48px;
    padding: 0 16px;
  }

  .main {
    padding: 28px 18px 64px;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero-action,
  .hero-action .button {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: -8px 0 22px;
  }

  .response-summary,
  .response-toolbar {
    grid-template-columns: 1fr;
  }

  .response-card {
    padding: 20px;
  }

  .response-card-head {
    display: grid;
  }

  .response-contact {
    justify-items: start;
    min-width: 0;
  }

  .response-toolbar .button {
    width: 100%;
  }

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

  .answer-row dt {
    padding-bottom: 6px;
  }

  .answer-row dd {
    padding-top: 6px;
  }

  .stat-card {
    min-height: 78px;
    padding: 16px;
  }

  .page-head,
  .question-head {
    align-items: stretch;
    flex-direction: column;
  }

  .button.primary {
    width: 100%;
  }

  .link-card,
  .template-card,
  .form-card,
  .public-card,
  .login-card {
    padding: 22px;
  }

  .link-card-header,
  .template-card,
  .account-row,
  .respondent-grid {
    grid-template-columns: 1fr;
  }

  .account-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .template-actions,
  .link-actions {
    justify-content: flex-start;
  }

  .question-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }

  .drag-handle,
  .question-tools {
    display: flex;
    padding-top: 0;
  }

  .question-tools {
    justify-content: space-between;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .modal-head,
  .modal-body,
  .modal-actions {
    padding: 20px;
  }

  .empty-state {
    padding: 34px 22px;
  }

  .empty-state .button {
    width: 100%;
  }

  .table-scroll {
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }

  tr:last-child {
    border-bottom: 0;
  }

  td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 0;
    font-size: 16px;
  }

  td::before {
    content: attr(data-label);
    color: var(--ink);
    font-weight: 800;
  }
}
