* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  min-height: 100%;
  margin: 0;
  color: #15201d;
  background: #f4f6f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior-y: contain;
}

.wechat-shell {
  width: 100%;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.mobile-page {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 16px 92px;
  background: #ffffff;
  overflow-x: hidden;
}

.mobile-page.pull-refresh-moving {
  transition: transform 120ms ease-out;
}

.pull-refresh-indicator {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #d9e9e4;
  border-radius: 999px;
  padding: 8px 14px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(24, 38, 34, 0.14);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -64px) scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease;
}

.pull-refresh-indicator.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.pull-refresh-indicator.is-ready {
  color: #ffffff;
  border-color: #0f766e;
  background: #0f766e;
}

.pull-refresh-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.78;
}

.pull-refresh-indicator.is-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 760ms linear infinite;
}

@keyframes pull-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

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

.page-title {
  margin: 0 0 16px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.section-title {
  margin: 24px 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.section-head .section-title {
  margin: 0;
}

.section-link,
.back-link {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.section-link:hover,
.section-link:focus,
.back-link:hover,
.back-link:focus {
  color: #0f766e;
  text-decoration: none;
}

.compact-section-title {
  margin: 14px 0 8px;
  font-size: 0.9375rem;
}

.task-filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: -4px 0 12px;
  border-radius: 8px;
  padding: 4px;
  background: #edf1ef;
}

.task-filter-tab {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  color: #66736f;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.task-filter-tab:hover,
.task-filter-tab:focus {
  color: #66736f;
  text-decoration: none;
}

.task-filter-tab.active {
  color: #ffffff;
  background: #0f766e;
}

.task-filter-tab.active:hover,
.task-filter-tab.active:focus {
  color: #ffffff;
}

.mobile-card {
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.page-header {
  margin-bottom: 16px;
}

.page-subtitle {
  margin: -8px 0 0;
  color: #66736f;
  font-size: 0.875rem;
  line-height: 1.6;
}

.notice-message {
  border: 1px solid #b9e7dc;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: #0f766e;
  background: #eef8f5;
  font-size: 0.875rem;
}

.notice-error {
  border-color: #f1b4ac;
  color: #b42318;
  background: #fff4f2;
}

.account-alert {
  display: grid;
  gap: 4px;
  border: 1px solid #f1b4ac;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 12px;
  color: #7a271a;
  background: #fff4f2;
  box-shadow: 0 8px 20px rgba(180, 35, 24, 0.1);
}

.account-alert strong {
  color: #b42318;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.account-alert span {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.restart-alert {
  border-color: #f4c76d;
  color: #713f12;
  background: #fff8e7;
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.08);
}

.restart-alert strong {
  color: #a16207;
}

.auth-panel {
  display: grid;
  align-content: center;
  min-height: calc(100dvh - 124px);
}

.auth-copy {
  margin: 0 0 24px;
  color: #66736f;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.bind-form {
  display: grid;
  gap: 10px;
}

.mobile-input {
  min-height: 48px;
  border-color: #d9e3df;
  border-radius: 8px;
}

.field-error {
  min-height: 20px;
  font-size: 0.8125rem;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  margin-top: 8px;
  color: #ffffff;
  background: #0f766e;
  font-weight: 700;
}

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

.compact-metrics {
  gap: 8px;
}

.metric-item {
  min-width: 0;
  border-radius: 8px;
  padding: 12px;
  background: #eef8f5;
}

.compact-metrics .metric-item {
  padding: 9px 10px;
}

.metric-label {
  display: block;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.compact-metrics .metric-label {
  font-size: 0.75rem;
}

.metric-value {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.compact-metrics .metric-value {
  margin-top: 2px;
  font-size: 1.0625rem;
}

.captain-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 8px;
  padding: 16px;
  color: #ffffff;
  background: #0f766e;
}

.captain-card.is-paused {
  background: #b42318;
  box-shadow: 0 10px 26px rgba(180, 35, 24, 0.22);
}

.captain-info {
  min-width: 0;
  flex: 1 1 auto;
}

.captain-card span,
.captain-card p {
  color: rgba(255, 255, 255, 0.76);
}

.captain-card span {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.captain-card h2 {
  margin: 4px 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.captain-card p {
  margin: 0;
  font-size: 0.8125rem;
}

.captain-state-stack {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.account-state-pill {
  border-radius: 999px;
  padding: 5px 10px;
  color: #0f766e;
  background: #ffffff;
  font-size: 0.8125rem;
}

.app-version-pill {
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.account-state-pill.is-paused {
  color: #b42318;
  background: #fff4f2;
}

.captain-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 12px;
}

.captain-code-row div {
  min-width: 0;
}

.captain-code-row b {
  display: block;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
}

.copy-code-button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}

.copy-code-button:disabled {
  opacity: 0.75;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.overview-strip div,
.overview-link {
  min-width: 0;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 10px;
  color: #15201d;
  background: #ffffff;
  text-decoration: none;
}

.overview-link:hover,
.overview-link:focus {
  color: #15201d;
  text-decoration: none;
}

.overview-link:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.overview-strip span {
  display: block;
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.4;
}

.overview-strip strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.dashboard-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-summary div + div {
  margin-top: 8px;
}

.dashboard-summary span {
  color: #66736f;
  font-size: 0.875rem;
}

.dashboard-summary strong {
  font-size: 1.25rem;
}

.dashboard-summary p {
  margin: 10px 0 0;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.risk-list {
  display: grid;
  gap: 8px;
}

.risk-card {
  display: grid;
  gap: 6px;
  border: 1px solid #f4c76d;
  border-radius: 8px;
  padding: 11px 12px;
  color: #15201d;
  background: #fff8e7;
  text-decoration: none;
}

.risk-card:hover,
.risk-card:focus {
  color: #15201d;
  text-decoration: none;
}

.risk-card.risk-danger {
  border-color: #f1b4ac;
  background: #fff4f2;
}

.risk-card-head,
.risk-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-card-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-card-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: #a16207;
  background: #fdecc8;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.risk-danger .risk-card-head span {
  color: #b42318;
  background: #ffe1dc;
}

.risk-card p {
  margin: 0;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.risk-card-meta span {
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.35;
}

.risk-card-meta span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

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

.todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 12px 14px;
  color: #15201d;
  background: #ffffff;
  text-decoration: none;
}

.todo-row:hover,
.todo-row:focus {
  color: #15201d;
  text-decoration: none;
}

.todo-row strong,
.todo-row span {
  display: block;
}

.todo-row strong {
  font-size: 0.9375rem;
}

.todo-row span {
  margin-top: 3px;
  color: #66736f;
  font-size: 0.8125rem;
}

.todo-row b {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 0.875rem;
}

.balance-card {
  border-radius: 8px;
  padding: 16px;
  color: #ffffff;
  background: #0f766e;
}

.balance-label {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.balance-card > strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
  line-height: 1.1;
}

.balance-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.balance-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.balance-subgrid div {
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.balance-subgrid span,
.balance-subgrid b {
  display: block;
}

.balance-subgrid span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.balance-subgrid b {
  margin-top: 2px;
  font-size: 0.9375rem;
}

.reward-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.reward-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reward-title-row .page-title {
  min-width: 0;
  margin-bottom: 0;
}

.withdraw-action {
  min-width: 76px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: #0f766e;
  font-size: 0.9375rem;
  font-weight: 700;
}

.reward-summary-green {
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #0f766e;
}

.reward-summary-green .metric-item {
  color: #ffffff;
  border-radius: 0;
  background: transparent;
}

.reward-summary-green .metric-item:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.reward-summary-green .metric-item:nth-child(n + 3) {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.reward-summary-green .metric-label {
  color: rgba(255, 255, 255, 0.74);
}

.reward-summary-green .metric-value {
  color: #ffffff;
}

.rule-list,
.record-list {
  display: grid;
  gap: 10px;
}

.rule-row,
.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.rule-row h3,
.record-row h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.rule-row p,
.record-row p {
  margin: 4px 0 0;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rule-row strong,
.record-row strong {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.9375rem;
}

.amount-positive {
  color: #0f766e;
}

.amount-negative {
  color: #b42318;
}

.detail-page-header {
  display: grid;
  gap: 8px;
}

.detail-page-header .page-title {
  margin-bottom: 0;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-title-row .page-title {
  min-width: 0;
}

.back-action {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: #0f766e;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.back-action:hover,
.back-action:focus {
  color: #ffffff;
  text-decoration: none;
}

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

.detail-record-card {
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.detail-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-record-head h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.detail-record-head p {
  margin: 4px 0 0;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.detail-record-head strong {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.9375rem;
}

.record-note {
  margin: 8px 0 0;
  border-top: 1px solid #edf1ef;
  padding-top: 8px;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.record-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  border-top: 1px solid #edf1ef;
  padding-top: 8px;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid #edf1ef;
  padding-top: 10px;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid span,
.detail-grid b {
  display: block;
}

.detail-grid span {
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.35;
}

.detail-grid b {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.detail-grid-wide {
  grid-column: 1 / -1;
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.pager span {
  color: #66736f;
  font-size: 0.8125rem;
  font-weight: 700;
}

.pager-button {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  color: #ffffff;
  background: #0f766e;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.pager-button:hover,
.pager-button:focus {
  color: #ffffff;
  text-decoration: none;
}

.pager-button.disabled {
  color: #95a09c;
  background: #edf1ef;
  pointer-events: none;
}

.compact-empty {
  padding: 18px 14px;
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-card {
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

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

.task-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.task-title-row h3 {
  min-width: 0;
}

.task-completed-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  color: #ffffff;
  background: #0f766e;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.task-exclusive-badge {
  flex: 0 0 auto;
  border: 1px solid #f4c7a1;
  border-radius: 999px;
  padding: 2px 7px;
  color: #9a4b13;
  background: #fff4e8;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.task-card-head p,
.task-desc {
  margin: 2px 0 0;
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.4;
}

.task-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.status-running {
  color: #0f766e;
  background: #dcf7ef;
}

.status-completed {
  color: #ffffff;
  background: #0f766e;
}

.status-waiting {
  color: #7c5a16;
  background: #fff2cc;
}

.status-ended {
  color: #66736f;
  background: #edf1ef;
}

.task-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #66736f;
  font-size: 0.75rem;
}

.task-progress-row strong {
  color: #15201d;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  margin-top: 5px;
  overflow: hidden;
  background: #edf1ef;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.task-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.task-chip-list span {
  max-width: 100%;
  min-height: 24px;
  border-radius: 8px;
  padding: 4px 7px;
  color: #4b5b56;
  background: #f2f6f4;
  font-size: 0.75rem;
  line-height: 1.3;
}

.task-note,
.task-audit {
  margin-top: 7px;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.75rem;
  line-height: 1.35;
}

.task-note {
  color: #4b5b56;
  background: #f2f6f4;
}

.task-audit {
  display: grid;
  gap: 3px;
}

.task-audit span,
.task-audit strong {
  display: block;
}

.task-audit strong {
  font-weight: 600;
}

.audit-pending {
  color: #7c5a16;
  background: #fff7df;
}

.audit-pass {
  color: #0f766e;
  background: #dcf7ef;
}

.audit-fail {
  color: #b42318;
  background: #fff1f0;
}

.task-deputy-list {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.task-deputy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  padding: 5px 7px;
  color: #66736f;
  background: #fafbfb;
  font-size: 0.75rem;
  line-height: 1.3;
}

.task-deputy-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-deputy-row strong {
  flex: 0 0 auto;
  color: #15201d;
}

.tier-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #edf1ef;
  padding-top: 5px;
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.3;
}

.tier-row strong {
  color: #15201d;
  text-align: right;
}

.task-action {
  min-height: 40px;
  margin-top: 8px;
}

.empty-state {
  border: 1px dashed #cfdad6;
  border-radius: 8px;
  padding: 28px 16px;
  text-align: center;
  background: #fafbfb;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.empty-state p {
  margin: 0;
  color: #66736f;
  font-size: 0.875rem;
}

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

.deputy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.deputy-card-action {
  cursor: pointer;
}

.deputy-card-action:active {
  transform: translateY(1px);
}

.deputy-card-action:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.deputy-card.no-code {
  cursor: default;
}

.deputy-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.deputy-card p {
  margin: 4px 0 0;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.deputy-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.deputy-code-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.deputy-code-row b {
  color: #15201d;
  font-weight: 700;
}

.deputy-copy-button {
  flex: 0 0 auto;
  border: 1px solid #b9e7dc;
  border-radius: 8px;
  padding: 5px 9px;
  color: #0f766e;
  background: #eef8f5;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.deputy-copy-button:disabled {
  opacity: 0.72;
}

.deputy-card > span {
  flex: 0 0 auto;
  color: #66736f;
  font-size: 0.8125rem;
}

.modal-open {
  overflow: hidden;
}

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

.qr-modal-backdrop[hidden] {
  display: none;
}

.qr-modal {
  position: relative;
  width: min(100%, 340px);
  border-radius: 8px;
  padding: 20px 18px 18px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 35, 29, 0.24);
  text-align: center;
}

.qr-modal h2 {
  margin: 0;
  color: #15201d;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.qr-modal-subtitle {
  margin: 6px 28px 14px;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #49615b;
  background: #eef3f1;
  font-size: 1.25rem;
  line-height: 1;
}

.qr-canvas-box {
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.qr-image {
  width: 240px;
  height: 240px;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.qr-code-display {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f8f6;
}

.qr-code-display span {
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.2;
}

.qr-code-display strong {
  color: #15201d;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.user-filter-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0 6px;
}

.user-range-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-radius: 8px;
  padding: 4px;
  background: #edf1ef;
}

.user-range-tab {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 8px;
  color: #66736f;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.user-range-tab:hover,
.user-range-tab:focus {
  color: #66736f;
  text-decoration: none;
}

.user-range-tab.active {
  color: #ffffff;
  background: #0f766e;
}

.user-range-tab.active:hover,
.user-range-tab.active:focus {
  color: #ffffff;
}

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

.mobile-select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d9e3df;
  border-radius: 8px;
  padding: 0 10px;
  color: #15201d;
  background: #ffffff;
  font-size: 0.8125rem;
}

.filter-submit {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: #0f766e;
  font-size: 0.8125rem;
  font-weight: 700;
}

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

.source-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 8px 10px;
  color: inherit;
  background: #ffffff;
  text-decoration: none;
}

.source-stat-row:hover,
.source-stat-row:focus {
  color: inherit;
  text-decoration: none;
}

.source-stat-row.active {
  border-color: #9ad6c9;
  background: #eef8f5;
}

.source-stat-row strong,
.source-stat-row span {
  display: block;
}

.source-stat-row strong {
  font-size: 0.8125rem;
  line-height: 1.25;
}

.source-stat-row span {
  margin-top: 2px;
  color: #66736f;
  font-size: 0.6875rem;
  line-height: 1.25;
}

.source-stat-row dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  margin: 0;
}

.source-stat-row dt,
.source-stat-row dd {
  margin: 0;
  text-align: right;
}

.source-stat-row dt {
  color: #66736f;
  font-size: 0.625rem;
  line-height: 1.2;
}

.source-stat-row dd {
  color: #15201d;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
}

.list-summary-text {
  margin: -8px 0 10px;
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.35;
}

.bound-user-list {
  display: grid;
  gap: 7px;
}

.bound-user-card {
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.bound-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bound-user-head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
}

.bound-user-head p {
  margin: 2px 0 0;
  color: #66736f;
  font-size: 0.75rem;
  line-height: 1.3;
}

.bound-user-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.05fr;
  gap: 6px;
  margin-top: 7px;
  border-top: 1px solid #edf1ef;
  padding-top: 7px;
}

.bound-user-grid div:last-child {
  grid-column: auto;
}

.bound-user-grid span,
.bound-user-grid b {
  display: block;
}

.bound-user-grid span {
  color: #66736f;
  font-size: 0.6875rem;
  line-height: 1.25;
}

.bound-user-grid b {
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.25;
}

.bottom-tabs {
  position: fixed;
  right: max(12px, calc((100vw - 430px) / 2 + 12px));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, calc((100vw - 430px) / 2 + 12px));
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  max-width: 406px;
  min-height: 64px;
  margin: 0 auto;
  border: 1px solid #e5ece9;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(24, 38, 34, 0.14);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.bottom-tab {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 48px;
  flex: 1;
  border-radius: 8px;
  color: #66736f;
  font-size: 0.8125rem;
  line-height: 1.2;
  text-decoration: none;
}

.bottom-tab:hover,
.bottom-tab:focus {
  color: #66736f;
  text-decoration: none;
}

.bottom-tab.active {
  color: #ffffff;
  background: #0f766e;
  font-weight: 700;
}

.bottom-tab.active:hover,
.bottom-tab.active:focus {
  color: #ffffff;
}

.bottom-tab-icon {
  width: 23px;
  height: 23px;
  margin-bottom: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 431px) {
  .mobile-page {
    min-height: 100vh;
    box-shadow: 0 0 32px rgba(24, 38, 34, 0.08);
  }
}
