:root {
  --bg: #eef2f1;
  --panel: #ffffff;
  --ink: #172523;
  --muted: #5c6b68;
  --line: #d8e2e0;
  --primary: #0f766e;
  --primary-strong: #0b5f59;
  --primary-soft: #e0f2ef;
  --accent: #d97706;
  --accent-soft: #fdf0df;
  --danger: #dc2626;
  --danger-soft: #feecec;
  --blue: #2563eb;
  --blue-soft: #e9efff;
  --green: #15803d;
  --green-soft: #e6f5ec;
  --sidebar: #15211f;
  --sidebar-soft: #1d2d2a;
  --sidebar-ink: #dce8e5;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(18, 42, 38, 0.05), 0 8px 24px rgba(18, 42, 38, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

.mobile-pull-tip {
  position: fixed;
  left: 50%;
  top: max(10px, env(safe-area-inset-top));
  z-index: 1200;
  transform: translateX(-50%);
  min-width: 112px;
  padding: 7px 14px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(8, 20, 18, 0.14);
  color: var(--primary-strong);
  font-size: 13px;
  text-align: center;
  transition: opacity 120ms ease, transform 120ms ease;
}

.mobile-pull-tip[hidden] {
  display: none;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: "Bahnschrift", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

button:disabled {
  cursor: progress;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 252px;
  flex: none;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px 16px;
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
  border-radius: 11px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  color: #fff;
}

.brand-copy span {
  font-size: 11px;
  color: #8fa39f;
  letter-spacing: 0;
}

.mobile-brand-header {
  display: none;
}

.workspace-card {
  background: var(--sidebar-soft);
  border: 1px solid #30403d;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 18px;
}

.workspace-label {
  display: block;
  color: #8fa39f;
  font-size: 11px;
  margin-bottom: 6px;
}

.workspace-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f1f7f6;
  font-weight: 500;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #b6c7c3;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.22);
}

.nav-item span {
  flex: 1;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.18);
}

.nav-badge.warm {
  background: var(--accent);
}

.nav-badge.danger {
  background: var(--danger);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 6px 0;
  border-top: 1px solid #30403d;
  color: #9fb2ae;
  font-size: 12px;
}

.sidebar-foot strong {
  display: block;
  color: #eef6f4;
  font-weight: 500;
}

.sidebar-foot small {
  color: #7d928d;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 0 26px 40px;
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(238, 242, 241, 0.9);
  backdrop-filter: blur(10px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  height: 38px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.global-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  position: relative;
  transition: border-color 180ms ease, background 180ms ease;
}

.icon-wrap {
  position: relative;
}

.icon-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--bg);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
  z-index: 2;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 4px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #2dd4bf);
  color: #fff;
  font-weight: 600;
}

.avatar.large {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.user-chip strong {
  display: block;
  line-height: 1.2;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
}

.view {
  display: none;
  padding-top: 26px;
  animation: rise 320ms ease both;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  margin-bottom: 2px;
}

.view-desc {
  margin-bottom: 0;
  color: var(--muted);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 500;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

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

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn.tiny {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 4px;
}

.text-btn:hover {
  background: var(--primary-soft);
}

.text-btn.small {
  font-size: 12px;
  padding: 2px 5px;
}

.text-btn.danger {
  color: var(--danger);
}

.text-btn.danger:hover {
  background: var(--danger-soft);
}

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

.stat-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card > div {
  min-width: 0;
  flex: 1;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex: none;
}

.stat-icon.teal {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon.amber {
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
}

.stat-card-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card-clickable {
  position: relative;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.stat-card-clickable:hover {
  border-color: var(--danger);
  box-shadow: 0 8px 22px rgba(180, 70, 52, 0.12);
  transform: translateY(-1px);
}

.cycle-arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  color: var(--danger);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.stat-card-clickable:hover .cycle-arrow,
.review-stat-ready .cycle-arrow {
  opacity: 0.9;
}

.review-stat-ready {
  border-color: rgba(199, 81, 66, 0.28);
}

.stat-card-clickable.review-stat-pop {
  animation: reviewStatPop 0.18s ease-out;
}

.record-stat-card {
  overflow: hidden;
  border-color: rgba(46, 103, 196, 0.18);
}

.record-stat-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
}

.record-stat-card .stat-card-label {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  max-height: 2.5em;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
}

.record-stat-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(46, 103, 196, 0.12);
}

.record-stat-card .cycle-arrow {
  color: var(--blue);
}

.record-stat-card.record-stat-ready .cycle-arrow {
  opacity: 0.9;
}

.record-stat-card.record-stat-pop {
  animation: reviewStatPop 0.18s ease-out;
}

@keyframes reviewStatPop {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-2px) scale(1.015);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.content-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.content-grid.two-column {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  align-items: start;
}

.content-grid.two-column > * {
  min-width: 0;
  max-width: 100%;
}

.template-grid {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.chart-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  align-items: start;
}

.review-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
}

.notification-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  align-items: start;
}

.profile-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

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

.modal-backdrop {
  animation: osnFadeIn 0.16s ease-out;
}

.modal-card {
  animation: osnPopIn 0.18s ease-out;
}

@keyframes osnFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes osnPopIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.panel.stack {
  display: grid;
  gap: 0;
}

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

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-table {
  padding: 4px 0;
}

.project-list-panel {
  position: relative;
  z-index: 5;
  overflow: visible;
}

.project-list-panel .project-table,
.project-list-panel .project-forms,
.project-list-panel .project-forms.open {
  overflow: visible;
}

.project-list-panel .project-export-menu[open] {
  z-index: 320;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.project-row + .project-row {
  border-top: 1px solid var(--line);
}

.project-main {
  display: grid;
  gap: 4px;
}

.project-name {
  font-weight: 600;
  font-size: 15px;
}

.project-name em {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}

.project-meta {
  color: var(--muted);
  font-size: 12px;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrow-down {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

.form-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px 12px 34px;
  background: #f7faf9;
  border-top: 1px dashed var(--line);
}

.form-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-ops {
  display: flex;
  align-items: center;
  gap: 6px;
}

.op-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  height: 30px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
}

.op-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.todo-list {
  padding: 6px 18px 14px;
  display: grid;
  gap: 6px;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.todo-item:last-child {
  border-bottom: 0;
}

.todo-badge {
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.todo-badge.amber {
  background: var(--accent-soft);
  color: var(--accent);
}

.todo-badge.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.todo-badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-notify-project,
.dashboard-notify-form {
  display: grid;
  gap: 8px;
}

.dashboard-notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-notify-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-notify-row strong {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dashboard-notify-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
}

.dashboard-notify-title .review-count-badge {
  margin-left: 0;
}

.dashboard-notify-row .dashboard-notify-name {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-notify-row .btn {
  flex: none;
  white-space: nowrap;
}

.review-count-badge {
  white-space: nowrap;
}

.dashboard-notify-row span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-notify-forms {
  display: grid;
  gap: 6px;
  padding-left: 14px;
}

.dashboard-notify-form-row {
  background: #fbfdfc;
}

.dashboard-notify-records {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.dashboard-notify-record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.dashboard-notify-record > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-notify-record strong {
  font-size: 12px;
}

.dashboard-notify-record span {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .dashboard-notify-row {
    align-items: flex-start;
  }

  .dashboard-notify-row > div:first-child {
    flex: 1;
  }

  #view-dashboard .content-grid.two-column,
  #view-dashboard .content-grid.two-column > .panel,
  #view-dashboard .quick-chart {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #view-dashboard .content-grid.two-column {
    overflow-x: hidden;
  }

  #view-dashboard .quick-chart {
    overflow: hidden;
  }

  #view-dashboard .trend-bars {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  #view-dashboard .trend-bar {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
  }
}

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

.todo-item span {
  color: var(--muted);
  font-size: 12px;
}

.quick-chart {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.quick-chart-period {
  width: 100%;
  height: 34px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
}

.trend-bars {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  overflow-x: auto;
  padding: 0 2px 2px;
}

.trend-bar {
  display: grid;
  grid-template-rows: auto 74px auto;
  flex: 1 0 32px;
  height: 100%;
  min-width: 28px;
  text-align: center;
}

.trend-bar b {
  color: var(--primary-strong);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 3px;
}

.trend-bar-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 74px;
  margin-top: 2px;
}

.trend-bar-track i {
  display: block;
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, #2dd4bf, #0f766e);
  border-radius: 4px 4px 0 0;
}

.trend-bar span {
  overflow: hidden;
  max-width: 68px;
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-chart > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.mini-bars {
  height: 72px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.mini-bars i {
  flex: 1;
  min-width: 10px;
  background: linear-gradient(180deg, #2dd4bf, #0f766e);
  border-radius: 4px 4px 0 0;
}

.seg-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  box-shadow: var(--shadow);
}

.seg {
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
}

.seg:hover {
  color: var(--ink);
}

.seg.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.folder-list {
  display: grid;
  padding: 8px;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-align: left;
}

.folder-item:hover {
  background: var(--primary-soft);
}

.folder-item em {
  margin-left: auto;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.folder-icon {
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  position: relative;
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -4px;
  width: 6px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.table-panel {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.record-view-table.data-table th,
.record-view-table.data-table td {
  border: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  padding-right: 1ch;
  padding-left: 1ch;
}

.record-view-table.data-table {
  --select-width: 42px;
  --seq-width: 42px;
  --investigation-width: 132px;
  border-collapse: separate;
  border-spacing: 0;
}

.record-view-table.data-table thead th {
  height: 24px;
  padding: 4px 8px;
  background: #f0f6f4;
  color: var(--text);
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.record-view-table.data-table thead th {
  padding-right: 1ch;
  padding-left: 1ch;
}

.record-view-table.data-table tbody td {
  white-space: normal;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.record-view-table.data-table tbody td.data-nowrap-cell {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.record-view-table th[data-column-index] {
  position: sticky;
  top: 0;
}

.record-view-table .sticky-column {
  position: sticky;
  z-index: 3;
  background: #fff;
}

.record-view-table thead .sticky-column {
  z-index: 8;
  background: #f0f6f4;
}

.record-view-table:not(.record-export-table) .fixed-seq {
  left: 0;
}

.record-view-table:not(.record-export-table) .fixed-investigation {
  left: var(--seq-width);
}

.record-export-table .fixed-select {
  left: 0;
  padding-right: 0;
  padding-left: 0;
}

.record-export-table .fixed-seq {
  left: var(--select-width);
}

.record-export-table .fixed-investigation {
  left: calc(var(--select-width) + var(--seq-width));
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 12;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 1px;
  background: transparent;
}

.column-resize-handle:hover::after,
.column-resizing .column-resize-handle::after {
  background: var(--primary);
}

.column-resizing,
.column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.data-photo-cell {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
  scrollbar-color: #9aa8a4 transparent;
}

.data-photo-cell::-webkit-scrollbar {
  height: 8px;
}

.data-photo-cell::-webkit-scrollbar-track {
  background: transparent;
}

.data-photo-cell::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #9aa8a4;
  background-clip: padding-box;
}

.data-photo-thumb {
  width: 92px;
  height: 69px;
  flex: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #e8eeec;
  cursor: zoom-in;
}

.data-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.data-photo-viewer {
  display: grid;
  gap: 10px;
  min-height: 0;
  cursor: grab;
  user-select: none;
}

.data-photo-viewer.is-dragging {
  cursor: grabbing;
}

.data-photo-viewer.is-dragging .data-photo-frame img {
  transition: none;
}

.data-photo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  height: min(66vh, 620px);
  min-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(45deg, #e7ecea 25%, transparent 25%),
    linear-gradient(-45deg, #e7ecea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7ecea 75%),
    linear-gradient(-45deg, transparent 75%, #e7ecea 75%),
    #f4f7f6;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  touch-action: pan-x pan-y;
}

.data-photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 100%;
}

.data-photo-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(22, 36, 45, 0.16);
  transform-origin: center;
  transition: transform 160ms ease;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.data-photo-nav {
  flex: none;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(22, 36, 45, 0.12);
}

.data-photo-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.data-photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.data-photo-counter,
.data-photo-zoom-text {
  color: var(--muted);
  font-size: 13px;
  min-width: 42px;
  text-align: center;
}

.data-photo-toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.data-photo-counter {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 10px;
  min-width: 52px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(22, 36, 45, 0.14);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 820px) {
  body.map-data-mobile-active {
    padding-bottom: 0;
  }

  #osn-toast {
    left: 50%;
    right: auto;
    bottom: calc(58px + 2ch);
    transform: translateX(-50%);
    justify-items: center;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
  }

  #osn-toast .toast {
    width: max-content;
    min-width: 0;
    max-width: min(360px, calc(100vw - 24px));
    text-align: center;
  }

  #osn-toast .toast.toast-center {
    position: static;
    transform: none;
    bottom: auto;
    min-width: 0;
    max-width: min(360px, calc(100vw - 24px));
  }

  body.map-data-mobile-active #view-data {
    animation: none;
    transform: none;
  }

  .data-photo-viewer {
    min-height: 0;
  }

  .data-photo-stage {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #f6f8f7;
    touch-action: none;
  }

  .data-photo-stage .data-photo-nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.45);
    color: #26312e;
    border-color: rgba(38, 49, 46, 0.12);
    opacity: 0.3;
    transform: translateY(-50%);
  }

  .data-photo-stage .data-photo-nav[data-action="data-photo-prev"] {
    left: 8px;
  }

  .data-photo-stage .data-photo-nav[data-action="data-photo-next"] {
    right: 8px;
  }

  .data-photo-stage .data-photo-frame {
    width: 100%;
  }

  .data-photo-frame img {
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    box-shadow: none;
    cursor: grab;
    transition: none;
  }

  .data-photo-toolbar {
    display: none;
  }

  .data-photo-counter {
    bottom: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #26312e;
    box-shadow: none;
  }

  .data-photo-close {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(38, 49, 46, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    color: #26312e;
    font-size: 22px;
    line-height: 1;
    opacity: 0.45;
  }

  .modal-card.simple-photo-modal {
    max-width: min(92vw, 760px);
    max-height: min(88dvh, 820px);
    background: #fff;
    border-radius: 8px;
  }

  .modal-card.simple-photo-modal .modal-head,
  .modal-card.simple-photo-modal .modal-foot {
    display: none;
  }

  .modal-card.simple-photo-modal .modal-body {
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .modal-card.simple-photo-modal .data-photo-stage {
    height: min(78dvh, 720px);
    min-height: 0;
  }
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.review-record-table-wrap {
  overflow-x: auto;
}

.review-record-table {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
}

.review-record-table th,
.review-record-table td {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.review-record-table .review-check-col {
  width: 4%;
  padding-right: 6px;
  padding-left: 12px;
  text-align: center;
}

.review-record-table .review-no-col {
  width: 12%;
}

.review-record-table .review-filler-col {
  width: 10%;
}

.review-record-table .review-time-col {
  width: 15%;
}

.review-record-table .review-status-col {
  width: 8%;
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
}

.review-record-table .review-reviewer-col {
  width: 10%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reviewer-empty {
  color: var(--muted);
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: #f7faf9;
}

.data-table th.filterable-th {
  position: relative;
  padding-right: 26px !important;
}

.header-filter-btn {
  position: absolute;
  right: 5px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.header-filter-btn span {
  display: block;
  width: 0;
  height: 0;
  margin: 6px auto 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #7b8b87;
}

.header-filter-btn:hover span {
  border-top-color: var(--primary);
}

.data-filter-menu {
  position: fixed;
  z-index: 20000;
  width: min(260px, calc(100vw - 16px));
  max-height: min(360px, calc(100vh - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.data-filter-menu-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.data-filter-menu-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-size: 12px;
  cursor: pointer;
}

.data-filter-menu-list {
  display: grid;
  gap: 5px;
  max-height: 280px;
  overflow: auto;
}

.data-filter-menu-list label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.data-filter-menu-list input {
  margin-top: 2px;
  flex: none;
}

.data-filter-menu-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.data-table tbody tr:hover {
  background: #fbfdfc;
}

.data-table td strong {
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.chip.teal {
  background: var(--primary-soft);
  color: var(--primary);
}

.chip.amber {
  background: var(--accent-soft);
  color: var(--accent);
}

.chip.green {
  background: var(--green-soft);
  color: var(--green);
}

.center-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(120deg, #102826, #123f3a);
  color: #fff;
  border: 0;
}

.center-strip p {
  margin: 0;
  color: #a9c5bf;
}

.center-links {
  display: flex;
  gap: 8px;
}

.center-strip .btn.outline {
  border-color: #3c706a;
  color: #d8f1ed;
}

.center-strip .btn.outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.builder-shell {
  display: grid;
  gap: 12px;
  max-width: 1080px;
}

.builder-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.field.grow {
  flex: 1;
}

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

.field input,
.field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: -2px;
}

.help-tip:hover,
.help-tip:focus-visible,
.help-tip.active {
  background: var(--primary);
  color: #fff;
}

.help-popover {
  position: fixed;
  z-index: 3100;
  width: min(300px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(8, 20, 18, 0.18);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.problem-card.fixed-problem {
  border-color: #bfdcd7;
  background: linear-gradient(0deg, #f6fbfa, #ffffff);
}

.problem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.type-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.problem-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.problem-body {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.q-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4f3;
  color: var(--primary);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 12px;
  flex: none;
}

.q-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.q-main > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.q-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-title-row strong {
  font-size: 15px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf1f0;
  color: var(--muted);
  font-size: 11px;
}

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

.preview-field {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px dashed #b7c9c6;
  border-radius: var(--radius-sm);
  background: #fbfdfc;
  color: #9aa9a6;
  font-size: 13px;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.config-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.config-row input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.fake-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.fake-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

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

.photo-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  border: 1px dashed #9fbab5;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.04), rgba(217, 119, 6, 0.04)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(15, 118, 110, 0.06) 18px 19px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(15, 118, 110, 0.06) 18px 19px);
  color: var(--primary);
  font-weight: 500;
}

.photo-preview svg {
  width: 34px;
  height: 34px;
}

.config-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.builder-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.builder-note {
  color: var(--muted);
  font-size: 12px;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.filter-bar.column {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 220px;
  padding: 24px 18px 18px;
}

.bar-col {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  height: 100%;
  align-items: stretch;
}

.bar-track {
  display: flex;
  align-items: flex-end;
  min-height: 0;
  padding-top: 0;
  box-sizing: border-box;
}

.bar-track i {
  display: block;
  width: 100%;
  height: var(--bar-height, 0%);
  background: linear-gradient(180deg, #2dd4bf, #0f766e);
  border-radius: 5px 5px 2px 2px;
  min-height: 12px;
}

.bar-col > b {
  align-self: start;
  color: var(--primary-strong);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
}

.bar-col span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 18px;
}

.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(
    var(--primary) 0 var(--a),
    var(--accent) var(--a) calc(var(--a) + var(--b)),
    var(--blue) calc(var(--a) + var(--b)) calc(var(--a) + var(--b) + var(--c)),
    #d5e1df calc(var(--a) + var(--b) + var(--c)) 360deg
  );
  box-shadow: inset 0 0 0 18px #fff;
}

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

.legend-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.legend-dot.teal {
  background: var(--primary);
}

.legend-dot.amber {
  background: var(--accent);
}

.legend-dot.blue {
  background: var(--blue);
}

.legend-dot.gray {
  background: #d5e1df;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  text-align: left;
  color: var(--muted);
}

.matrix-check {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.matrix-check.checked {
  background: var(--primary);
  border-color: var(--primary);
  position: relative;
}

.matrix-check.checked::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  position: absolute;
  left: 4px;
  top: 1px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.check-label input {
  accent-color: var(--primary);
}

.state-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
}

.state-icon.done {
  background: var(--green-soft);
  color: var(--green);
}

.state-icon.wait {
  background: var(--accent-soft);
  color: var(--accent);
}

.state-icon.none {
  background: #f0f2f2;
  color: #8b9996;
}

.review-type-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.review-type-row .field {
  min-width: 180px;
}

.notice-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.notice-item.pinned {
  background: #f4faf8;
}

.notice-item strong,
.notice-item span {
  display: block;
}

.notice-item span {
  color: var(--muted);
  font-size: 12px;
}

.notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
}

.notice-icon.contact {
  background: var(--blue-soft);
}

.notice-icon.group {
  background: var(--primary-soft);
}

.notice-icon.review {
  background: var(--accent-soft);
}

.notice-icon.reply {
  background: var(--green-soft);
}

.chat-preview {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.chat-thread {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(0deg, transparent 0 20px, rgba(15, 118, 110, 0.06) 20px 21px);
}

.msg {
  max-width: 76%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.msg p {
  margin: 0 0 4px;
}

.msg span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.msg.mine {
  justify-self: end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg.mine span {
  color: rgba(255, 255, 255, 0.72);
}

.msg.theirs {
  justify-self: start;
  background: #eef3f2;
  border-bottom-left-radius: 3px;
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.chat-input input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.profile-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  text-align: center;
}

.profile-card[hidden] {
  display: none;
}

.profile-card h2 {
  margin: 6px 0 0;
  font-size: 20px;
}

.profile-card p {
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin: 8px 0;
}

.profile-stats span {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11px;
}

.profile-stats strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.panel-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .sidebar {
    width: 72px;
    padding: 14px 10px;
  }

  .brand-copy,
  .workspace-label,
  .workspace-name,
  .nav-item span,
  .sidebar-foot div {
    display: none;
  }

  .workspace-card {
    padding: 8px;
  }

  .workspace-name {
    justify-content: center;
  }

  .workspace-name svg {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .nav-badge {
    position: absolute;
    right: 6px;
    top: 6px;
    margin: 0;
  }

  .sidebar-foot {
    justify-content: center;
  }

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

  .template-grid,
  .chart-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-list {
    display: flex;
    flex: 1;
  }

  .nav-item {
    min-width: 46px;
  }

  .brand-copy {
    display: none;
  }

  .workspace-card,
  .sidebar-foot {
    display: none;
  }

  .main {
    padding: 0 14px 30px;
  }

  .topbar {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .global-search {
    width: 100%;
  }

  .view-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-grid.two-column,
  .notification-grid {
    grid-template-columns: 1fr;
  }

  .profile-form {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-wrap: wrap;
  }
}

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

/* Web 工作台登录、弹窗与动态表单 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(15, 118, 110, 0.20), transparent 32%),
    rgba(10, 26, 24, 0.72);
}

.login-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(216, 226, 224, 0.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 20, 18, 0.30);
  display: grid;
  gap: 16px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-weight: 700;
  font-size: 15px;
}

.login-brand .brand-logo {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
  border-radius: 13px;
}

.login-brand div {
  display: grid;
  gap: 2px;
}

.login-brand strong {
  font-size: 18px;
}

.login-brand small {
  color: var(--muted);
  font-size: 12px;
}

.login-card h1 {
  margin: 4px 0 0;
  font-size: 24px;
}

.login-sub {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field span {
  color: var(--muted);
  font-size: 13px;
}

.login-field input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.login-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.login-submit {
  width: 100%;
  height: 42px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.login-links button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  padding: 2px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 26, 24, 0.48);
}

.modal-backdrop.under-modal {
  z-index: 890;
}

.modal-backdrop.under-modal .modal-card {
  pointer-events: none;
}

.modal-card {
  width: min(620px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(216, 226, 224, 0.26);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 20, 18, 0.26);
}

.modal-card.mobile-sheet {
  height: 66vh;
  max-height: 66vh;
  border-radius: 16px 16px 0 0;
  transition: transform 0.18s ease;
}

.modal-card.mobile-sheet .modal-head h2 {
  flex: 1;
  text-align: center;
}

.modal-card.modal-wide {
  width: min(1040px, 100%);
}

.modal-card.record-editor-card,
.modal-card.self-record-card {
  height: min(86vh, 900px);
  max-height: min(86vh, 900px);
}

.modal-card.record-editor-card,
.modal-card.record-list-card {
  animation-duration: 25ms;
}

.modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 18px;
}

.modal-head h2.review-session-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-session-title {
  min-width: 0;
}

.review-session-counter {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 32px;
  padding: 0 10px;
  border: 2px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.review-session-counter[hidden] {
  display: none;
}

.review-session-switcher {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  vertical-align: middle;
}

.review-session-switcher .btn.tiny {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
}

.modal-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.modal-head .icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.form-grid [hidden],
.form-editor-add [hidden] {
  display: none !important;
}

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

.field > span {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  background: #fff;
}

.empty-state {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.project-forms[hidden] {
  display: none;
}

.project-forms {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  transition:
    max-height 0.24s ease,
    opacity 0.18s ease,
    padding 0.18s ease;
}

.project-forms.open {
  max-height: 900px;
  opacity: 1;
  padding: 0 0 12px;
  overflow: visible;
}

.form-subrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px 10px 22px;
  border-top: 1px dashed var(--line);
}

.form-subrow:hover,
.form-subrow:focus-within {
  z-index: 4;
}

.form-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.form-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.form-name-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  white-space: nowrap;
}

.form-ops {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.op-btn {
  min-width: 48px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.op-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.op-btn.danger {
  color: #b91c1c;
}

.op-btn.danger:hover {
  border-color: #b91c1c;
  color: #b91c1c;
  background: #fff5f5;
}

.record-editor {
  display: grid;
  gap: 14px;
}

.record-editor-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.record-editor-head-actions .review-export-preview-control > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.record-editor-question-target {
  animation: record-editor-question-pulse 1.6s ease;
}

@keyframes record-editor-question-pulse {
  0%,
  100% {
    box-shadow: none;
  }

  35% {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.32);
  }
}

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

.question-block {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.cascade-holder {
  display: grid;
  gap: 8px;
}

.cascade-level-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1ch;
}

.cascade-fill-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  max-width: min(46vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.cascade-fill-select {
  min-width: 0;
}

.cascade-fill-select select {
  width: 100%;
}

.fill-invite-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
}

.fill-invite-bar strong {
  white-space: nowrap;
}

.fill-invite-bar span {
  flex: 1;
  color: var(--muted);
}

.question-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.question-desc {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.record-input,
.record-file {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  background: #fff;
}

.record-editor input[type="date"],
.record-editor input[type="datetime-local"],
.record-editor input[type="time"],
.record-editor input[type="month"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  box-sizing: border-box;
  font: inherit;
}

.active-question-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.2);
  background: rgba(247, 251, 250, 0.96);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.active-question-bar[hidden] {
  display: none;
}

.unit-suffix {
  color: var(--muted);
  font-size: 12px;
}

.photo-hint {
  color: var(--muted);
  font-size: 12px;
}

.custom-answer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 2px 24px;
}

.custom-answer-row.hidden {
  display: none;
}

.custom-answer-row .other-input-label {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.custom-answer-row .other-input {
  flex: 1;
  min-width: 0;
}

.record-photo-manager {
  display: grid;
  gap: 10px;
}

.record-photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.record-photo-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.record-photo-preview {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #e8eeec;
}

.record-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.record-photo-preview .photo-thumb-empty {
  color: var(--muted);
  font-size: 12px;
}

.record-photo-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.record-photo-item .photo-save-btn,
.record-photo-item .photo-remove-btn {
  justify-self: end;
  border: 0;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.record-photo-item .photo-save-btn {
  color: var(--primary);
}

.record-photo-item .photo-remove-btn {
  color: var(--danger);
}

.record-photo-manager .record-file {
  width: auto;
  max-width: 420px;
}

.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-upload-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.photo-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-upload-actions[hidden],
.photo-upload-limit[hidden] {
  display: none !important;
}

.photo-upload-limit {
  color: var(--danger);
  font-size: 12px;
}

.photo-upload-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.photo-upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-empty-hint {
  padding: 6px 0;
}

.record-photo-preview.photo-view-btn {
  width: 100%;
  border: 0;
  padding: 0;
  background: #e8eeec;
  cursor: zoom-in;
}

.photo-viewer {
  display: grid;
  gap: 10px;
}

.photo-viewer img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #0f1720;
}

.photo-viewer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.dynamic-table {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.dynamic-table-head,
.dynamic-table-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: max-content;
}

.dynamic-table-head {
  min-width: max-content;
}

.combo-fill-scroll,
.combo-preview-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.combo-fill-table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ink);
}

.combo-table-preview {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ink);
}

.combo-fill-table th,
.combo-fill-table td {
  min-width: 0;
  width: auto;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.combo-fill-table th {
  background: #f7faf9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.combo-fill-table th.combo-legacy-title,
.self-table-view th.self-table-legacy-title {
  color: var(--muted);
  font-style: italic;
}

.combo-fill-table th:last-child,
.combo-fill-table td:last-child {
  border-right: 0;
}

.combo-fill-table .record-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
}

.combo-preview-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 140px;
}

.combo-preview-title > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-preview-add {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.mini-preview-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.combo-field-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.combo-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

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

.combo-field-row input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: #fff;
}

.combo-row-add {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 1px solid var(--primary);
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.self-table-records {
  display: block;
  margin-bottom: 10px;
  min-width: 0;
}

.self-table-view td.self-table-empty {
  min-width: 0;
  padding: 14px 10px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.self-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.self-table-view {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  color: var(--ink);
}

.self-table-view th,
.self-table-view td {
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.self-table-view.self-table-measuring {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}

.self-table-view.self-table-measuring th,
.self-table-view.self-table-measuring td {
  white-space: nowrap;
}

.self-table-view th:last-child,
.self-table-view td:last-child {
  border-right: 0;
}

.self-table-view tbody tr:last-child td {
  border-bottom: 0;
}

.self-table-view th {
  background: #f7faf9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.self-table-view .self-row-no,
.self-table-view .self-row-actions {
  width: 1px;
  min-width: 0;
  padding-right: 0.5ch;
  padding-left: 0.5ch;
  white-space: nowrap;
}

.self-table-view .self-row-actions {
  text-align: left;
}

.self-table-view .self-row-no {
  vertical-align: middle;
  text-align: center;
}

.self-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.self-record-row > span {
  flex: 1;
  min-width: 0;
}

.dynamic-table-head {
  color: var(--muted);
  font-size: 12px;
}

.dynamic-table-row input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
}

.dynamic-table-row select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.table-static-title {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}

.table-choice-group {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.table-choice-option {
  display: grid;
  justify-items: start;
  gap: 6px;
  width: 100%;
}

.table-choice-group .check-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-height: 38px;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.table-choice-group .check-label input[type="checkbox"],
.table-choice-group .check-label input[type="radio"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--primary);
}

.table-choice-group .check-label input[type="radio"] {
  border-radius: 50%;
}

.table-choice-group .check-label span {
  margin: 0;
  line-height: 1.35;
}

.self-table-question-list {
  display: grid;
  gap: 14px;
}

.self-table-question-block > input,
.self-table-question-block > select {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  background: #fff;
}

.self-table-question-block .record-photo-manager {
  width: 100%;
  min-width: 0;
}

.self-table-question-block .record-photo-list {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}

.table-other-answer {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.table-choice-option .table-other-answer {
  width: calc(100% - 23px);
  margin-top: 0;
  margin-left: 23px;
}

.table-other-answer.hidden {
  display: none;
}

.table-other-answer > span {
  color: var(--muted);
  font-size: 12px;
}

.table-other-answer input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  background: #fff;
}

.table-cascade {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.table-cascade select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

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

.record-list-filter {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0 -20px 14px;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.record-list-modal-body {
  padding-top: 0;
}

.record-list-filter .field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  margin: 0;
  gap: 8px;
}

.record-list-filter .field > span {
  flex: none;
  margin: 0;
  white-space: nowrap;
}

.record-list-filter select {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.record-list-count {
  flex: none;
  min-width: 24px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.record-loading {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.loading-spinner {
  width: 22px;
  height: 22px;
  flex: none;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: osnSpin 0.72s linear infinite;
}

@keyframes osnSpin {
  to {
    transform: rotate(360deg);
  }
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.record-row-enter {
  animation: osnRowIn 25ms ease-out both;
}

@keyframes osnRowIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.record-row > div:first-child {
  display: grid;
  gap: 3px;
}

.record-row span {
  color: var(--muted);
  font-size: 12px;
}

.record-row .record-time-nowrap {
  white-space: nowrap;
}

.record-row .record-row-meta {
  min-width: 0;
  white-space: nowrap;
}

.record-invest-no {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 15px;
}

.record-invest-no > span {
  flex: none;
  font-size: 11px;
  font-weight: 500;
}

.record-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.record-row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.record-row-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.record-row-action-btn.danger {
  color: var(--danger);
}

.record-row-action-btn.danger:hover {
  border-color: var(--danger);
  background: rgba(220, 38, 38, 0.05);
}

.review-records {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.admin-table {
  min-width: 1050px;
}

.admin-organization-table {
  min-width: 760px;
}

.admin-department-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 360px;
}

.admin-department-entry {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.admin-department-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #cfe6dc;
  border-radius: 999px;
  background: #f2faf6;
  color: #245b49;
  font-size: 12px;
  line-height: 1.3;
}

.admin-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.admin-icon-btn svg {
  width: 14px;
  height: 14px;
}

.admin-icon-btn:hover {
  border-color: var(--line);
  background: #f4f8f6;
  color: var(--primary);
}

.admin-icon-btn.danger:hover {
  border-color: #f1c6c6;
  background: var(--danger-soft);
  color: var(--danger);
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.invite-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.invite-code-box strong {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 20px;
  letter-spacing: 1px;
}

.billing-rules {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.billing-rules summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
}

.billing-rules div {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

.billing-rules p {
  margin: 7px 0;
}

.price-table-wrap {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.billing-groups {
  display: grid;
  gap: 12px;
}

.billing-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.billing-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.billing-form-row > div {
  display: grid;
  gap: 4px;
}

.billing-form-row span {
  color: var(--muted);
  font-size: 12px;
}

.wallet-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.wallet-summary > div:first-child {
  display: grid;
  gap: 2px;
}

.wallet-summary > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.wallet-summary strong {
  font-size: 28px;
  color: var(--primary-strong);
}

.redeem-box {
  display: flex;
  gap: 8px;
}

.redeem-box input {
  width: 220px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

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

.ledger-list h3 {
  margin: 0;
  font-size: 15px;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ledger-row > div {
  display: grid;
  gap: 2px;
}

.ledger-row span {
  color: var(--muted);
  font-size: 12px;
}

.ledger-row em {
  font-style: normal;
  font-weight: 700;
}

.ledger-row em.income {
  color: var(--green);
}

.ledger-row em.expense {
  color: var(--danger);
}

.field.compact {
  width: 170px;
}

.price-detail {
  display: grid;
  gap: 12px;
}

.price-detail-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.price-detail-total strong {
  color: var(--primary-strong);
  font-size: 24px;
}

.form-editor-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.form-editor-list .form-editor-add {
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 6px 18px rgba(8, 20, 18, 0.06);
  margin: 2px 0 6px;
}

.form-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.form-editor-row:hover,
.form-editor-row.editing {
  border-color: rgba(15, 118, 110, 0.5);
  background: var(--primary-soft);
}

.form-editor-row .q-index {
  position: relative;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
}

.form-editor-row .q-index.required-index::after {
  content: "*";
  position: absolute;
  top: -5px;
  right: -6px;
  color: var(--danger);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.form-editor-row > div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.form-editor-row span {
  color: var(--muted);
  font-size: 12px;
}

.form-editor-row .question-summary {
  min-width: 0;
}

.form-editor-row .question-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
}

.question-photo-icon {
  width: 20px;
  height: 20px;
  flex: none;
  padding: 2px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.form-editor-add {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-editor-add h3 {
  margin: 0;
  font-size: 15px;
}

.form-editor-add-head {
  display: flex;
  align-items: center;
  gap: 2ch;
}

.form-editor-add-head .btn {
  margin-left: 0;
}

.form-editor-add .question-type-mini {
  width: 92px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.form-editor-add .question-main-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.form-editor-add .question-main-row .field {
  flex: 1;
  min-width: 0;
}

.form-editor-add .question-main-row .question-type-mini {
  flex: none;
}

.form-editor-add .watermark-entry-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-editor-add .watermark-entry-field[hidden] {
  display: none;
}

.form-editor-add .form-grid.two > .field:first-child {
  margin-top: 12px;
}

.link-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 4px 0;
}

.form-grid.two > .field:has(#new-question-desc),
.form-grid.two > .field:has(#table-child-new-desc) {
  grid-column: 1 / -1;
}

.form-grid.two > .check-label:has(#new-question-required) {
  grid-column: 1 / -1;
  order: 99;
  margin-top: 8px;
}

.form-editor-add .question-check-row {
  display: flex;
  align-items: center;
  gap: 18px;
  grid-column: 1 / -1;
  order: 99;
  margin-top: 8px;
}

.form-editor-add .question-check-row .check-label {
  margin: 0;
}

.link-checkbox-list .check-label {
  white-space: nowrap;
}

.option-editor {
  display: grid;
  gap: 6px;
}

.option-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-edit-row .option-index {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
}

.option-edit-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.option-link-summary {
  color: var(--muted);
  font-size: 12px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-other-tag {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  flex: none;
}

.option-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.math-builder {
  display: grid;
  gap: 12px;
}

.math-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.math-question-picker {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.math-question-picker[hidden] {
  display: none;
}

.math-question-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.math-question-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--primary-strong);
  cursor: pointer;
}

.math-question-btn:hover {
  border-color: var(--primary);
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.calc-panel {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.calc-panel-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.calc-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.calc-operator-pad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.calc-key {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.calc-key.op {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.calc-key.fn {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

.cascade-builder-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.form-grid.two > .field:has(#new-cascade-editor) {
  grid-column: 1 / -1;
}

.cascade-column {
  min-width: 210px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.cascade-column-head {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.cascade-column-head > span {
  color: var(--muted);
  font-size: 11px;
}

.cascade-column h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.cascade-level-title {
  width: 100%;
  height: 34px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  font-weight: 600;
}

.cascade-options {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.cascade-option-row {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.cascade-option-row > span {
  flex: none;
  color: var(--muted);
  font-size: 11px;
}

.cascade-label-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
}

.cascade-child-arrow {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 24px;
  line-height: 1;
}

.cascade-parent {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.cascade-add-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.cascade-add-row input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
}

.table-column-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-builder-buttons {
  display: flex;
  gap: 8px;
}

.table-builder-buttons button {
  margin: 0;
}

.table-column-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
}

.mini-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.mini-table-preview {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

.mini-table-preview th,
.mini-table-preview td {
  min-width: 120px;
  height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.mini-table-preview .row-title-th {
  min-width: 90px;
}

.mini-table-preview th,
.mini-table-preview .row-title-cell {
  position: relative;
}

.table-x {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
}

.table-sub-editor-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.table-sub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.table-sub-main {
  display: grid;
  gap: 6px;
}

.table-sub-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.table-sub-row input,
.table-sub-row select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.watermark-editor {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.watermark-preview-pane {
  display: grid;
  gap: 8px;
}

.wm-pane-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.watermark-preview-frame {
  position: relative;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 6px;
  background:
    linear-gradient(118deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0.03)),
    #dbe4e8;
  touch-action: none;
  user-select: none;
}

.watermark-control {
  position: absolute;
  display: block;
  border: 1.5px dashed rgba(15, 118, 110, 0.9);
  border-radius: 5px;
  cursor: move;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  touch-action: none;
}

.watermark-preview-lines {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.wm-preview-line {
  color: inherit;
  font-size: var(--wm-font-size, 12px);
  font-weight: var(--wm-font-weight, 400);
  line-height: 1.25;
  text-align: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.watermark-preview-lines .mini-empty {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.wm-resize-handle {
  position: absolute;
  z-index: 5;
  width: 10px;
  height: 10px;
  border: 1px solid var(--primary-strong);
  border-radius: 2px;
  background: #fff;
}

.wm-resize-handle[data-handle="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.wm-resize-handle[data-handle="n"] { left: calc(50% - 5px); top: 0; cursor: ns-resize; }
.wm-resize-handle[data-handle="ne"] { right: 0; top: 0; cursor: nesw-resize; }
.wm-resize-handle[data-handle="e"] { right: 0; top: calc(50% - 5px); cursor: ew-resize; }
.wm-resize-handle[data-handle="se"] { right: 0; bottom: 0; cursor: nwse-resize; }
.wm-resize-handle[data-handle="s"] { left: calc(50% - 5px); bottom: 0; cursor: ns-resize; }
.wm-resize-handle[data-handle="sw"] { left: 0; bottom: 0; cursor: nesw-resize; }
.wm-resize-handle[data-handle="w"] { left: 0; top: calc(50% - 5px); cursor: ew-resize; }

.wm-opacity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.wm-opacity-row label {
  margin: 0;
}

.wm-opacity-row input[type="range"] {
  width: 100%;
}

.wm-typography-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.wm-typography-grid .field {
  margin: 0;
}

.wm-typography-grid input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 2px;
}

.wm-font-size-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 46px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.wm-font-size-row input[type="range"] {
  width: 100%;
}

.wm-font-size-row span {
  text-align: right;
  color: var(--ink);
}

.watermark-config-pane {
  display: grid;
  gap: 12px;
  min-width: 0;
}

#wm-custom-section {
  order: 1;
}

#wm-fixed-section {
  order: 2;
}

.wm-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.wm-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

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

.wm-fixed-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.wm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.wm-card-head strong {
  color: var(--ink);
  font-size: 14px;
}

.wm-location-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.wm-location-level-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.wm-location-level-field[hidden] {
  display: none;
}

.wm-location-level-field > span {
  color: var(--muted);
  font-size: 12px;
}

.wm-location-level-field .multi-check-select {
  max-width: 320px;
}

.wm-location-level-field .multi-check-select-menu {
  max-height: 230px;
}

.wm-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wm-custom-head h4 {
  margin: 0;
}

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

.watermark-custom-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.watermark-custom-row.dragging {
  opacity: 0.55;
  outline: 2px dashed var(--primary);
}

.wm-custom-drag {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: var(--muted);
  cursor: grab;
}

.wm-custom-drag:active {
  cursor: grabbing;
}

.wm-custom-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.wm-custom-fields .field {
  margin: 0;
}

.watermark-custom-row input,
.watermark-custom-row select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
}

.wm-bind-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.wm-bind-label {
  min-width: 80px;
  color: var(--primary-strong);
}

.wm-custom-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.wm-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.photo-naming-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-naming-row input {
  flex: 1;
  min-width: 0;
}

.form-editor-add textarea {
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

#osn-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(23, 37, 35, 0.94);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.error {
  background: rgba(185, 28, 28, 0.94);
}

.toast.toast-center {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(58px + 2ch);
  transform: translateX(-50%);
  min-width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  text-align: center;
}

@media (max-width: 820px) {
  #osn-toast {
    left: 50%;
    right: auto;
    bottom: calc(58px + 2ch);
    transform: translateX(-50%);
    justify-items: center;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
  }

  #osn-toast .toast {
    width: max-content;
    min-width: 0;
    max-width: min(360px, calc(100vw - 24px));
    text-align: center;
  }

  #osn-toast .toast.toast-center {
    position: static;
    transform: none;
    bottom: auto;
    min-width: 0;
    max-width: min(360px, calc(100vw - 24px));
  }
}

@media (max-width: 760px) {
  .modal-backdrop,
  .login-overlay {
    padding: 12px;
  }

  .form-grid.two,
  .profile-form {
    grid-template-columns: 1fr;
  }

  .project-edit-modal-body {
    width: 100%;
    overflow-x: hidden;
    touch-action: pan-y;
  }

  .project-edit-modal-body > *,
  .project-edit-modal-body .field,
  .project-edit-modal-body .form-grid.two,
  .project-edit-modal-body .project-consortium-section,
  .project-edit-modal-body .project-consortium-summary,
  .project-edit-modal-body .project-consortium-grid,
  .project-edit-modal-body .project-consortium-confirm-row,
  .project-edit-modal-body .project-member-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .project-edit-modal-body .field {
    overflow: hidden;
  }

  .project-edit-modal-body .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  .project-edit-modal-body .form-grid.two > .field:nth-child(3) {
    grid-column: 1 / -1;
  }

  .project-edit-modal-body .project-consortium-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-edit-modal-body .project-consortium-summary-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .project-edit-modal-body .project-consortium-summary-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .project-edit-modal-body .project-consortium-confirm-row {
    align-items: stretch;
    flex-direction: column;
  }

  .project-edit-modal-body .project-consortium-confirm-row .btn {
    width: 100%;
  }

  .project-edit-modal-body .field input,
  .project-edit-modal-body .field select,
  .project-edit-modal-body input[type="date"] {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    inline-size: 100%;
    box-sizing: border-box;
    padding: 0 6px;
    line-height: 38px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
  }

  .project-edit-modal-body input[type="date"]::-webkit-datetime-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    line-height: normal;
    text-align: center;
  }

  .project-edit-modal-body input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .project-edit-modal-body input[type="date"]::-webkit-date-and-time-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: center;
  }

  .project-edit-modal-body input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 6px;
    margin: 0;
    padding: 0;
  }

  .form-subrow,
  .record-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-subrow .form-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    align-items: start;
  }

  .form-subrow .form-title {
    align-self: start;
    min-width: 0;
  }

  .form-subrow .form-name-actions {
    align-self: start;
    justify-self: end;
    flex-wrap: nowrap;
  }

  .form-subrow .project-export-menu {
    display: none;
  }

  .project-list-panel .project-export-menu > div {
    left: auto;
    right: 0;
  }

  .record-row.record-row-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
  }

  .record-row.record-row-list > div:first-child {
    min-width: 0;
  }

  .record-row.record-row-list > .record-row-actions {
    align-self: start;
  }

  .record-list-filter {
    align-items: center;
    flex-direction: row;
  }

  .dynamic-table-head,
  .dynamic-table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-sub-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-sub-side {
    justify-content: flex-start;
  }

  .combo-field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .self-table-view th,
  .self-table-view td {
    min-width: 0;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 820px) {
  .mobile-brand-header.show {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .mobile-brand-header.show .brand-copy {
    display: grid;
    gap: 1px;
  }

  .mobile-brand-header .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .mobile-brand-header .brand-copy strong {
    color: var(--ink);
  }

  .mobile-brand-header .brand-copy span {
    color: var(--muted);
  }

  #view-dashboard .view-head {
    display: none;
  }

  #view-profile .view-head {
    display: none;
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100%;
    max-width: 100%;
    z-index: 850;
    border-top: 1px solid rgba(216, 226, 224, 0.28);
    background: rgba(21, 33, 31, 0.96);
    backdrop-filter: blur(12px);
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  .mobile-nav-item {
    height: 58px;
    border: 0;
    background: transparent;
    color: #a8bbb6;
    font-size: 13px;
  }

  .mobile-nav-item.active {
    color: #fff;
    box-shadow: inset 0 3px 0 var(--primary);
  }

  body {
    padding-bottom: 66px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 0 14px 28px;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    padding: 8px 0;
  }

  .content-grid.two-column,
  .content-grid.profile-grid,
  .content-grid.template-grid,
  .content-grid.chart-grid,
  .content-grid.notification-grid,
  .content-grid.review-grid {
    grid-template-columns: 1fr;
  }

  .form-grid.two,
  .profile-form {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
    overflow: hidden;
  }

  .modal-card {
    max-height: 92vh;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 12px 12px 0 0;
  }

  .modal-card.record-editor-card,
  .modal-card.self-record-card {
    height: 92vh;
    height: 92dvh;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-x: hidden;
  }

  .record-editor-modal-body {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  .record-editor,
  .record-editor > *,
  .record-editor .question-visibility,
  .record-editor .question-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .record-editor .dynamic-table,
  .record-editor .combo-fill-scroll,
  .record-editor .combo-preview-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .modal-card.record-editor-card .modal-foot,
  .modal-card.self-record-card .modal-foot {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .modal-card.mobile-sheet {
    height: 66vh;
    height: 66dvh;
    max-height: 66vh;
    max-height: 66dvh;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 16px 16px 0 0;
  }

  .modal-card.mobile-sheet .modal-body {
    min-height: 0;
  }

  .modal-card.mobile-sheet .price-table-wrap {
    overflow-x: auto;
  }

  .modal-card.mobile-sheet .wallet-summary {
    flex-wrap: wrap;
  }

  .modal-card.mobile-sheet .wallet-summary .redeem-box {
    width: 100%;
  }

  .modal-card.mobile-sheet .redeem-box input {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .modal-card.mobile-sheet .ledger-row {
    flex-wrap: wrap;
  }

  .dynamic-table-head,
  .dynamic-table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.header-side-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--sidebar-ink);
}

.sidebar .header-side-actions .icon-btn {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  color: #fff;
}

.sidebar .header-side-actions .icon-btn svg {
  stroke: #fff;
  stroke-width: 2.5;
}

.sidebar .header-side-actions .icon-badge {
  border-color: #15211f;
}

.sidebar .user-chip {
  color: #fff;
}

.sidebar .user-chip small {
  color: #8fa39f;
}

.sidebar .user-dropdown {
  color: var(--ink);
}

.topbar,
.breadcrumb,
.global-search {
  display: none !important;
}

.main {
  padding-top: 16px;
}

@media (max-width: 820px) {
  .sidebar .header-side-actions {
    display: none;
  }
}

.template-main-grid {
  display: grid;
  gap: 14px;
}

.template-my-panel,
.template-main-grid,
.my-template-area,
.template-column,
.template-list-table {
  overflow: visible;
}

.my-template-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 8px 14px;
}

.template-column {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 0 12px;
  min-width: 0;
  animation: templateFolderIn 0.22s ease-out;
}

@keyframes templateFolderIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.template-folder-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 0;
}

.template-folder-nav .icon-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  line-height: 1;
}

.template-folder-nav .icon-btn svg {
  width: 18px;
  height: 18px;
}

.template-folder-nav strong {
  font-size: 14px;
  font-weight: 600;
}

.template-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 37px;
  margin: 0 -12px;
  padding: 0 12px 6px;
  border-bottom: 1px solid var(--line);
}

.template-column-head h3 {
  margin: 0;
  font-size: 14px;
}

.template-column:first-child .template-column-head h3 {
  margin-left: 12px;
}

.template-folder-list,
.template-list-table,
.center-template-list {
  display: grid;
  gap: 8px;
}

.template-folder-row,
.template-list-row,
.center-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.template-folder-row > div,
.template-list-row > div:first-child,
.center-template-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.template-folder-row span,
.template-list-row span,
.center-template-row span {
  color: var(--muted);
  font-size: 12px;
}

.template-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px 8px;
  position: relative;
}

.export-template-main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.export-template-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-template-main span {
  color: var(--muted);
  font-size: 12px;
}

.export-template-main:hover strong {
  color: var(--primary);
}

.center-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.center-search input {
  width: 260px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.project-phase-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.project-phase-head:first-child {
  margin-top: 4px;
}

.project-phase-head strong {
  font-size: 14px;
}

.project-phase-head span {
  color: var(--muted);
  font-size: 12px;
}

.project-phase-head button {
  margin-left: auto;
}

.project-filter-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-filter-tools select {
  height: 32px;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: #fff;
}

.project-search input {
  width: 180px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.project-member-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.project-consortium-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.project-edit-modal-body .project-date-grid {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .project-edit-modal-body .form-grid.two.project-date-grid {
    margin-top: 14px;
  }
}

.project-consortium-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-consortium-head > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.project-consortium-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.project-consortium-toggle {
  margin: 0;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
}

.project-consortium-toggle .seg {
  height: 20px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
}

.project-consortium-summary {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.project-consortium-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.project-consortium-summary-head strong {
  color: var(--ink);
  font-size: 13px;
}

.project-consortium-summary-head span {
  color: var(--muted);
  font-size: 11px;
}

.project-consortium-summary-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.project-consortium-summary-row > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 23px;
}

.project-consortium-summary-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-consortium-summary-values em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 23px;
}

.consortium-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid #cfe6dc;
  border-radius: 999px;
  background: #f2faf6;
  color: #245b49;
  font-size: 12px;
  line-height: 1.3;
}

.consortium-summary-chip small {
  color: #6f8b80;
  font-size: 10px;
}

.consortium-summary-chip button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 0 -3px 0 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(36, 91, 73, 0.1);
  color: #245b49;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

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

.consortium-option-list {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.consortium-option-list .option-row {
  align-items: flex-start;
  min-height: 34px;
  gap: 7px;
  padding: 4px 2px;
  font-size: 13px;
  line-height: 1.3;
}

.consortium-option-list .option-row input[type="checkbox"] {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #9fb1ad;
  border-radius: 3px;
  background: #fff;
  color: #fff;
}

.consortium-option-list .option-row input[type="checkbox"]::after {
  content: "";
  width: 4px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}

.consortium-option-list .option-row input[type="checkbox"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.consortium-option-list .option-row input[type="checkbox"]:checked::after {
  opacity: 1;
}

.consortium-option-list .option-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.35;
  word-break: break-word;
}

.consortium-option-list .option-row small {
  color: var(--muted);
  font-size: 11px;
}

.project-consortium-confirm-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.project-consortium-confirm-row > span {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-consortium-confirm-row > span.is-dirty {
  color: #b45309;
}

.project-member-panel .panel-head {
  margin: -4px 0 0;
  padding: 0;
  border: 0;
}

.project-member-panel h3 {
  margin: 0;
  font-size: 15px;
}

.project-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.project-member-row > div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.project-member-row span {
  color: var(--muted);
  font-size: 12px;
}

.project-member-row select {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.member-search-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.member-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.member-search-count {
  color: var(--muted);
  font-size: 12px;
  padding: 0 2px;
}

.member-search-options {
  display: grid;
  gap: 6px;
}

@media (max-width: 900px) {
  .my-template-area {
    grid-template-columns: 1fr;
  }

  .review-work-area {
    grid-template-columns: 1fr;
  }

  .center-search {
    width: 100%;
  }

  .center-search input {
    width: 100%;
  }
}

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

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 10px 18px;
    overflow: visible;
    z-index: 700;
  }

  .sidebar .brand-row {
    padding: 0;
    margin-right: 6px;
  }

  .sidebar .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 12px;
  }

  .sidebar .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .sidebar .nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
  }

  .sidebar .nav-item {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    padding: 9px 12px;
  }

  .main {
    padding: 0 22px 34px;
  }

  .topbar {
    margin: 14px 0 6px;
    padding: 0;
    border-bottom: 0;
  }
}

.user-menu-wrap {
  position: relative;
}

.user-menu-wrap::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  text-align: left;
}

.user-chip:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 960;
  min-width: 150px;
  display: grid;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
}

.user-dropdown button {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.user-dropdown button:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.user-dropdown[hidden] {
  display: none;
}

.profile-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-stats span,
.profile-stat-toggle {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11px;
  background: #fff;
}

.profile-stat-toggle {
  cursor: pointer;
  width: 100%;
}

.profile-stat-toggle:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.profile-stats strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.profile-stats em {
  font-style: normal;
}

.sms-code-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.sms-code-row .field {
  flex: 1;
}

.sms-code-row button {
  height: 40px;
  white-space: nowrap;
}

.folder-open {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.folder-open .folder-copy {
  display: grid;
  gap: 2px;
}

.template-audit-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.template-audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.template-audit-row > div {
  display: grid;
  gap: 4px;
}

.template-audit-row span {
  color: var(--muted);
  font-size: 12px;
}

.template-audit-row > div:last-child {
  display: flex;
  gap: 8px;
}

.review-todo-panel {
  margin-bottom: 14px;
}

.review-work-area {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.review-panel {
  min-width: 0;
}

.review-pending-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.review-pending-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.review-pending-type select {
  height: 34px;
  min-width: 122px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.review-todo-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

.review-date-row input {
  width: 100%;
}

.review-todo-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.review-todo-row:hover {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.review-project-group {
  display: grid;
  gap: 6px;
}

.review-form-group {
  display: grid;
  gap: 6px;
  padding-left: 16px;
}

.review-form-row {
  background: #fbfdfc;
}

.review-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.review-form-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}

.review-dept-ratio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.review-dept-ratio select,
.review-dept-ratio .btn {
  height: 30px;
}

.review-dept-ratio select {
  min-width: 76px;
  padding: 0 28px 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.review-record-actions {
  display: inline-flex;
  gap: 6px;
}

.review-record-action-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.review-record-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.review-record-action-btn.danger {
  color: var(--danger);
}

.review-record-all {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.review-record-check-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.review-todo-row > div:first-child {
  display: grid;
  gap: 2px;
}

.review-work-area .review-todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-work-area .review-todo-row > div:first-child {
  flex: 1;
  min-width: 0;
}

.review-task-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.review-todo-row span {
  color: var(--muted);
  font-size: 12px;
}

.review-todo-records {
  display: grid;
  gap: 6px;
}

.review-todo-records > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.review-reply-row {
  margin-left: 28px;
  background: #f7faf9;
  border-left: 3px solid var(--primary);
}

.mini-menu {
  position: relative;
  flex: none;
}

.mini-menu summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  user-select: none;
}

.mini-menu summary::-webkit-details-marker {
  display: none;
}

.mini-menu[open] summary {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.mini-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 260;
  display: grid;
  min-width: 150px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: top right;
  animation: menuSlideIn 0.14s ease-out;
}

@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mini-menu > div button {
  white-space: nowrap;
}

.mini-menu > div .mini-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 8px;
  white-space: nowrap;
}

.mini-menu.export-menu > div {
  min-width: 220px;
}

.project-export-menu > div {
  right: auto;
  left: 0;
}

.template-list-row {
  position: relative;
  z-index: 1;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.template-list-row:hover {
  z-index: 4;
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.mini-menu > div button {
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 8px;
}

.mini-menu > div button:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.export-editor-placeholder {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

.data-table-wrap {
  overflow: auto;
}

.data-fixed-table-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 285px);
  overflow: hidden;
}

.data-table-fullscreen-btn {
  margin-left: 2ch;
  vertical-align: middle;
}

body.data-table-fullscreen-open {
  overflow: hidden;
}

.data-fixed-table-panel.data-table-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 890;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.data-fixed-table-panel.data-table-fullscreen > .panel-head {
  flex: 0 0 auto;
  padding-top: max(16px, env(safe-area-inset-top));
}

.data-fixed-table-panel.data-table-fullscreen .data-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.data-fixed-table-panel .panel-head {
  flex: none;
}

.data-fixed-table-panel .data-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 375px);
  overflow: auto;
}

.data-fixed-table-panel .data-table thead {
  position: sticky;
  top: 0;
  z-index: 6;
}

.data-fixed-table-panel .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.data-fixed-table-panel .record-view-table.data-table thead th.sticky-column {
  position: sticky;
  top: 0;
  z-index: 12;
}

.data-fixed-table-panel .record-view-table.data-table tbody td.sticky-column {
  z-index: 5;
}

.data-fixed-table-panel .data-table thead tr:nth-child(2) th {
  top: 24px;
}

.data-entry-panel {
  display: none;
}

.data-entry-panel.active {
  display: block;
}

.map-data-page {
  display: grid;
  gap: 12px;
}

.map-data-toolbar {
  position: relative;
  z-index: auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  overflow: visible;
  padding: 14px 16px;
}

.map-data-project-field {
  width: 210px;
  flex: 0 0 auto;
}

.map-data-forms-field {
  min-width: 280px;
  flex: 1 1 420px;
}

.map-data-forms-picker {
  position: relative;
  z-index: 920;
}

.map-data-forms-menu {
  z-index: 930;
  min-width: 280px;
  left: 0.5ch;
  right: 0.5ch;
  max-height: min(58vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.map-data-forms-picker .map-data-forms-menu {
  z-index: 930;
  left: 0.5ch;
  right: 0.5ch;
  min-width: 0;
}

.map-data-forms-menu-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px -4px 6px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.map-data-forms-menu-head .btn {
  flex: none;
  min-height: 28px;
  padding: 0 12px;
}

.map-data-forms-menu .check-label {
  min-height: 28px;
}

.map-data-forms-menu .check-label input[type="checkbox"] {
  display: inline-grid;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.map-data-map-shell {
  position: relative;
  min-height: 500px;
  height: clamp(500px, calc(100vh - 280px), 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #dbe5e5;
}

.map-data-map-host {
  position: absolute;
  inset: 0;
  touch-action: none !important;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.map-data-fullscreen-btn {
  position: absolute;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-strong);
  box-shadow: 0 5px 16px rgba(20, 43, 39, 0.2);
  cursor: pointer;
}

.map-data-type-switch {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1200;
  min-height: 36px;
  padding: 0 13px;
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-strong);
  box-shadow: 0 5px 16px rgba(20, 43, 39, 0.16);
}

.map-data-locate-button {
  position: absolute;
  left: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
  box-shadow: 0 5px 16px rgba(20, 43, 39, 0.2);
  cursor: pointer;
}

.map-data-locate-button svg {
  width: 21px;
  height: 21px;
}

.map-data-locate-button:hover {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.map-data-scale {
  position: absolute;
  right: 66px;
  bottom: max(19px, calc(env(safe-area-inset-bottom) + 5px));
  z-index: 1200;
  display: grid;
  gap: 3px;
  justify-items: end;
  color: #111827;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
}

.map-data-scale span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.map-data-scale i {
  position: relative;
  display: block;
  width: 1cm;
  max-width: 3cm;
  height: 7px;
  border-bottom: 2px solid currentColor;
}

.map-data-scale i::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 9px;
  background: currentColor;
}

.map-data-scale i::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 9px;
  background: currentColor;
}

.map-data-fullscreen-btn:hover {
  background: var(--primary-soft);
}

.map-data-fullscreen-btn svg {
  width: 19px;
  height: 19px;
}

.map-data-map-shell.is-fullscreen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.map-data-map-shell.is-fullscreen .map-data-fullscreen-btn {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1300;
}

.map-data-map-shell.is-fullscreen .map-data-type-switch {
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
}

.map-data-map-shell.is-fullscreen .map-data-locate-button {
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
}

.map-data-map-shell.is-fullscreen .map-data-scale {
  right: max(68px, calc(env(safe-area-inset-right) + 52px));
  bottom: max(21px, calc(env(safe-area-inset-bottom) + 7px));
}

body.map-data-fullscreen {
  overflow: hidden;
}

body.map-data-fullscreen #view-data {
  animation: none;
  transform: none;
  padding-top: 0;
}

.map-data-map-state {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 8;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(20, 43, 39, 0.12);
}

.map-data-map-state[hidden] {
  display: none;
}

.map-data-filter-page {
  display: grid;
  gap: 12px;
}

.map-data-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.map-data-filter-head h2 {
  margin: 0;
  font-size: 18px;
}

.map-data-filter-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.map-data-filter-scroll {
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 4px 0 18px;
}

.map-data-filter-list {
  display: grid;
  gap: 8px;
  padding-inline: 0.5ch;
}

.map-data-filter-question {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 43, 39, 0.05);
  overflow: hidden;
}

.map-data-filter-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.map-data-filter-details > summary::-webkit-details-marker {
  display: none;
}

.map-data-filter-details > summary::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.16s ease;
}

.map-data-filter-details[open] > summary::after {
  transform: rotate(180deg);
}

.map-data-filter-question-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.map-data-filter-selected {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.map-data-filter-selected-block {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #d9ebe7;
  border-radius: 9px;
  background: #f4faf8;
}

.map-data-filter-selected-block > b {
  color: #0f766e;
  font-size: 11px;
  font-weight: 600;
}

.map-data-filter-selected span {
  max-width: 180px;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f5f2;
  color: #0f766e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-data-filter-question-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.map-data-filter-question-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.map-data-filter-question-actions button {
  border: 0;
  background: transparent;
  color: #0f766e;
  cursor: pointer;
  font-size: 12px;
}

.map-data-filter-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 14px;
}

.map-data-filter-values label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
}

.map-data-filter-values label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-data-filter-empty {
  padding: 24px;
}

@media (max-width: 820px) {
  body.map-data-mobile-active {
    padding-bottom: 0;
  }

  body.map-data-mobile-active .main {
    padding-top: 0;
    padding-bottom: 0;
  }

  body.map-data-mobile-active #view-data {
    height: auto;
    overflow: visible;
  }

  body.map-data-mobile-active #view-data > .view-head,
  body.map-data-mobile-active #view-data > .data-entry-tabs {
    display: none;
  }

  body.map-data-mobile-active .map-data-map-shell {
    height: 75vh;
    height: 75dvh;
    min-height: 320px;
    border-radius: 0;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-data-toolbar {
    display: grid;
    min-height: auto;
    overflow: visible;
    padding: 12px;
  }

  .map-data-page {
    gap: 8px;
    height: auto;
    padding-bottom: 76px;
  }

  body.map-data-mobile-active .map-data-filter-page {
    height: 100%;
    overflow-y: auto;
  }

  .map-data-project-field,
  .map-data-forms-field {
    width: 100%;
    min-width: 0;
  }

  .map-data-map-shell {
    height: 75vh;
    height: 75dvh;
    min-height: 320px;
    border-radius: 0;
  }

  .map-data-filter-head {
    align-items: flex-start;
    padding: 12px;
  }

  .map-data-filter-scroll {
    max-height: none;
  }

  .map-data-filter-values {
    grid-template-columns: 1fr;
  }

  .map-data-forms-menu .check-label {
    justify-content: flex-start;
    gap: 6px;
    padding-right: 0;
    padding-left: 0;
    text-align: left;
  }

  .map-data-forms-menu .check-label input[type="checkbox"] {
    display: inline-grid;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
  }

  body.map-data-mobile-active .map-data-forms-menu {
    position: fixed;
    top: auto;
    right: calc(10px + 0.5ch);
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: calc(10px + 0.5ch);
    width: auto;
    min-width: 0;
    max-height: calc(100dvh - 92px);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(20, 43, 39, 0.24);
  }

  body.map-data-mobile-active #view-data {
    height: auto;
    overflow: visible;
  }

  body.map-data-mobile-active .map-data-page {
    display: grid;
    height: auto;
    padding-bottom: 76px;
  }

  body.map-data-mobile-active .map-data-map-shell {
    height: 75vh;
    height: 75dvh;
    min-height: 320px;
    border-radius: 0;
  }

  body.map-data-mobile-active .map-data-toolbar {
    position: relative;
    z-index: 10;
    height: auto;
    min-height: auto;
    overflow: visible;
    align-content: start;
    padding: 12px;
  }

  body.map-data-mobile-active .mobile-bottom-nav {
    bottom: 0;
    z-index: 2000;
  }

  body.modal-open .mobile-bottom-nav {
    display: none !important;
  }

  body.map-data-mobile-active .map-data-forms-menu {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

.recycle-filter-bar {
  padding: 14px 18px;
}

.recycle-tree {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.recycle-node {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.recycle-node > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.recycle-node > summary::-webkit-details-marker {
  display: none;
}

.recycle-node > summary::before {
  content: "›";
  flex: none;
  color: var(--muted);
  font-size: 18px;
  transform: rotate(0deg);
}

.recycle-node[open] > summary::before {
  transform: rotate(90deg);
}

.recycle-children {
  display: grid;
  gap: 7px;
  padding: 0 10px 10px 24px;
}

.recycle-node-name {
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.recycle-node-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.recycle-record-node {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
}

.recycle-record-node .recycle-node-meta {
  margin-left: 0;
}

.recycle-record-node .btn {
  margin-left: auto;
}

.export-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.export-uploaded-file {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.export-uploaded-file strong {
  color: var(--ink);
  font-weight: 600;
}

#export-code-table {
  margin: 12px 0;
  overflow-x: auto;
}

#export-code-table .data-table {
  min-width: 760px;
}

.export-image-preview {
  display: grid;
  gap: 12px;
}

.export-progress-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 16px 4px 10px;
  text-align: center;
}

.export-progress-card p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.export-progress-track {
  width: min(360px, 100%);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ecea;
}

.export-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #2e67c4);
  transition: width 0.25s ease;
}

#export-progress-percent {
  color: var(--muted);
  font-size: 12px;
}

.export-preview-toolbar {
  position: sticky;
  top: -18px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

#export-preview-zoom-label {
  min-width: 52px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.export-preview-viewport {
  max-height: 72vh;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #e8eeec;
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
}

.export-preview-viewport.is-dragging {
  cursor: grabbing;
}

.export-preview-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-width: 100%;
  transform-origin: center top;
  will-change: transform;
}

.export-preview-page {
  position: relative;
  width: 100%;
}

.export-preview-anchor {
  position: absolute;
  z-index: 2;
  min-width: 8px;
  min-height: 8px;
  padding: 0;
  border: 1px dashed transparent;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.export-preview-anchor:hover,
.export-preview-anchor:focus-visible {
  border-color: #e0a100;
  background: rgba(255, 214, 102, 0.3);
  outline: none;
}

.export-preview-image,
.export-preview-stage section {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 37, 34, 0.16);
  user-select: none;
  -webkit-user-drag: none;
}

.file-upload-btn {
  position: relative;
  overflow: hidden;
}

.file-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.matrix-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.matrix-check.checked::after {
  content: "√";
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  position: static;
  transform: none;
  margin: 0;
}

.state-icon {
  display: inline-grid;
  place-items: center;
  line-height: 1;
  padding: 0;
}

.state-icon.none {
  width: 24px;
  height: 24px;
  font-size: 13px;
  color: #dc2626;
  background: #feecec;
}

.state-icon.wait {
  display: inline-grid;
  place-items: center;
}

.icon-wrap {
  position: relative;
}

@media (max-width: 1000px) {
  .watermark-editor {
    grid-template-columns: 1fr;
  }

  .watermark-preview-frame {
    min-height: 170px;
    aspect-ratio: 16 / 9;
  }
}

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

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

  .wm-custom-drag {
    display: none;
  }

  .wm-custom-tools {
    justify-items: start;
  }

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

  .watermark-fixed-grid {
    grid-template-columns: 1fr;
  }
}

.data-filter-bar {
  flex-wrap: wrap;
}

.data-filter-bar .field {
  min-width: 150px;
}

.data-filter-bar .field:has(.link-checkbox-list) {
  min-width: 260px;
}

.data-filter-bar .field:has(.multi-check-select) {
  min-width: 240px;
}

#data-records-panel .data-filter-bar {
  display: grid;
  grid-template-columns:
    minmax(110px, 1.2fr)
    minmax(130px, 1.4fr)
    minmax(100px, 0.85fr)
    minmax(100px, 0.85fr)
    minmax(105px, 0.75fr)
    minmax(85px, 0.6fr)
    minmax(75px, 0.5fr)
    max-content;
  gap: 8px;
  align-items: end;
}

#data-records-panel .data-filter-bar .field {
  min-width: 0;
}

#data-records-panel .data-filter-bar .field:has(.multi-check-select) {
  min-width: 0;
}

#data-records-panel .data-filter-bar .btn {
  min-width: 64px;
  height: 38px;
}

@media (max-width: 820px) {
  #data-records-panel .data-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #data-records-panel .data-filter-bar .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.multi-check-select {
  position: relative;
  width: 100%;
}

.multi-check-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.multi-check-select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-check-select-trigger svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.multi-check-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.multi-check-select-menu .check-label {
  width: 100%;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
}

.multi-check-select-menu .check-label:hover {
  background: var(--primary-soft);
}

.multi-check-select-menu[hidden] {
  display: none;
}

#review-filler-dropdown {
  min-width: 300px;
}

#review-filler-dropdown .link-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 2px 10px;
  max-height: 180px;
  overflow: auto;
}

#review-filler-dropdown .check-label {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 3px 4px;
  text-align: left;
}

#review-filler-dropdown .check-label input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

#review-filler-dropdown .review-filler-all {
  margin-bottom: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.review-overview-head {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.review-overview-tools {
  display: flex;
  align-items: flex-end;
  gap: 6.4px;
  transform: translateY(-0.4ch);
}

.review-overview-tools .field {
  margin: 0;
  min-width: 120px;
  gap: 0.7ch;
}

.review-overview-tools .field > span {
  font-size: 80%;
  line-height: 1.1;
}

.review-overview-tools select,
.review-overview-tools .btn {
  height: calc(34px * 0.8);
  padding: 0 9px;
  font-size: 80%;
}

.overview-total-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.overview-total-row strong {
  color: var(--primary-strong);
}

.overview-total-row b {
  color: var(--primary-strong);
  font-size: 28px;
}

.overview-total-row span {
  color: var(--muted);
  font-size: 12px;
}

.data-bar-chart {
  min-height: 230px;
  padding-top: 0;
  overflow-x: auto;
}

.data-bar-chart-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.data-bar-chart-scroll > .data-bar-chart {
  min-width: 100%;
}

.pie-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.pie-ring {
  position: relative;
  width: 132px;
  height: 132px;
  flex: none;
  border-radius: 50%;
}

.pie-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
}

.pie-ring {
  overflow: visible;
}

.pie-segment {
  cursor: pointer;
  outline: none;
  will-change: filter;
  transition: filter 120ms ease;
}

.pie-segment.is-active {
  filter: brightness(1.06) drop-shadow(0 4px 5px rgba(15, 118, 110, 0.26));
}

.pie-segment:focus-visible {
  filter: brightness(1.06) drop-shadow(0 0 4px rgba(15, 118, 110, 0.55));
}

.legend-list i.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: none;
  border-radius: 3px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.legend-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: background-color 140ms ease, color 140ms ease,
    transform 140ms ease;
}

.pie-legend-item.is-active {
  padding: 3px 6px;
  margin: -3px -6px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
  transform: translateX(3px);
}

.pie-legend-item.is-active .legend-dot {
  transform: scale(1.16);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.data-double-panels {
  margin-top: 14px;
}

.overview-three-panels {
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr);
  align-items: stretch;
}

.overview-three-panels > .panel {
  min-width: 0;
  height: 100%;
}

.overview-three-panels .bar-chart {
  gap: 8px;
  padding-right: 10px;
  padding-bottom: 0;
  padding-left: 10px;
}

.trend-overview-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.trend-overview-panel > .panel-head {
  position: static;
  padding: 16px 18px;
  border-bottom: 0;
  background: var(--panel);
}

.trend-overview-panel .data-bar-chart {
  flex: 1;
  height: auto;
  min-height: 230px;
  padding-top: 0;
  transform: translateY(-1ch);
}

.data-trend-bars {
  flex: 1 1 auto;
  align-items: stretch;
  height: auto;
  min-height: 0;
  padding: 0 18px 14px;
}

.data-trend-bars .trend-bar {
  flex: 1 0 36px;
  height: 100%;
  min-width: 36px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.data-trend-bars .trend-bar b {
  margin-bottom: 0;
}

.data-trend-bars .trend-bar-track {
  height: 100%;
  margin-top: 0;
}

.data-trend-bars .trend-bar-track i {
  height: max(4px, calc((100% - 2ch) * var(--bar-ratio, 0)));
}

.data-trend-bars .trend-bar span {
  max-width: none;
  white-space: nowrap;
}

.trend-overview-head {
  align-items: flex-start;
}

.trend-overview-tools {
  display: flex;
  align-items: flex-end;
  gap: 6.4px;
  flex-wrap: wrap;
  transform: translateY(-0.4ch);
}

.trend-overview-tools .field {
  margin: 0;
  gap: 0.7ch;
}

.trend-overview-tools .field > span {
  font-size: 80%;
  line-height: 1.1;
}

.trend-overview-tools select,
.trend-overview-tools .btn {
  height: calc(34px * 0.8);
  padding: 0 9px;
  font-size: 80%;
}

.trend-overview-tools select {
  min-width: calc(82px * 0.8);
}

#overview-filler-select {
  min-width: calc(120px * 0.8);
}

.overview-three-panels .pie-wrap {
  flex-direction: row;
  align-items: flex-start;
  gap: 22px;
  padding: 18px;
}

.overview-three-panels .overview-filler-panel > .panel-head,
.overview-three-panels .overview-review-panel > .panel-head {
  min-height: 78px;
  box-sizing: border-box;
}

.overview-three-panels .pie-ring {
  width: 190px;
  height: 190px;
}

.overview-three-panels .pie-ring::after {
  display: block;
  inset: 39px;
}

.overview-three-panels .legend-list {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 9px;
}

.overview-three-panels .legend-list div,
.overview-three-panels .legend-list span {
  white-space: nowrap;
}

.overview-three-panels .review-overview-head {
  align-items: flex-start;
}

.overview-three-panels .review-overview-tools {
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .overview-three-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .overview-three-panels .pie-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .overview-three-panels .pie-ring {
    width: 170px;
    height: 170px;
  }

  .overview-three-panels .legend-list {
    width: 100%;
  }

  .trend-overview-panel .panel-head,
  .trend-overview-tools {
    width: 100%;
    min-width: 0;
  }

  .trend-overview-tools {
    justify-content: flex-start;
  }

  .trend-overview-tools .field {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .trend-overview-tools select {
    width: 100%;
    min-width: 0;
  }

  .trend-overview-panel .data-bar-chart-scroll {
    flex: 1;
    min-height: 230px;
  }

  .trend-overview-panel .data-bar-chart-scroll > .data-bar-chart {
    width: max-content;
    min-width: 100%;
  }

  .trend-overview-panel .data-bar-chart .bar-col {
    flex: 0 0 38px;
    min-width: 38px;
    max-width: 38px;
  }
}

.fixed-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  border-right: 1px solid var(--line);
}

.data-table thead th.fixed-cell {
  background: var(--primary-soft);
}

.analysis-question-picker {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.analysis-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.analysis-picker-head strong {
  color: var(--ink);
}

.analysis-chart-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.analysis-question-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.analysis-question-block h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
}

.analysis-question-block h3 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.analysis-answer-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(120px, 1.6fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.analysis-answer-label {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-answer-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--primary-soft);
}

.analysis-answer-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.analysis-answer-row b {
  color: var(--primary-strong);
  font-size: 12px;
  white-space: nowrap;
}

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

.export-module-grid .panel {
  padding: 14px;
}

.modal-body .export-module-grid {
  white-space: normal;
}

.modal-body .export-module-grid .panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
}

.modal-body .export-module-grid .panel-head {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.modal-body .export-module-grid .panel .field {
  margin: 0;
}

.modal-body .export-module-grid .panel > .btn {
  margin-top: auto;
}

.export-action-stack {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.export-action-stack .btn {
  width: 100%;
}

@media (max-width: 1100px) {
  .export-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pie-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .export-module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .project-filter-tools,
  #project-summary {
    display: none !important;
  }

  .project-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .project-main {
    width: 100%;
  }

  .project-actions {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
  }

  .project-actions .btn {
    writing-mode: initial;
    white-space: nowrap;
  }

  .content-grid.profile-grid {
    grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.4fr);
    overflow-x: auto;
  }

  #view-profile {
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .content-grid.profile-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes osnColumnIn {
  from {
    opacity: 0.35;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.template-column {
  animation: osnColumnIn 0.18s ease-out;
}

.profile-entry-menu {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-entry-menu[hidden],
.content-grid.profile-grid[hidden] {
  display: none !important;
}

.profile-entry-menu button {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}

.profile-entry-menu button[hidden] {
  display: none !important;
}

.mobile-profile-back {
  align-self: flex-start;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  min-height: 36px;
  padding: 0 14px;
}

.mobile-profile-back[hidden] {
  display: none;
}

@media (min-width: 821px) {
  .profile-entry-menu {
    display: none;
  }
}

@media (max-width: 820px) {
  #view-profile.active {
    display: flex;
    flex-direction: column;
  }

  #view-profile .content-grid.profile-grid {
    order: 1;
  }

  .profile-entry-menu {
    order: 2;
  }

  .mobile-profile-back {
    order: 0;
  }
}

/* 地图类问题 */
.map-decimals-field,
.map-count-field,
.map-fixed-field,
.map-opacity-field {
  min-width: 0;
}

.map-binding-field {
  grid-column: 1 / -1;
}

.range-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
}

.range-field-row input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.range-field-row output {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.map-maker-binding-area {
  display: grid;
  gap: 8px;
}

.map-maker-binding-list {
  display: grid;
  gap: 8px;
}

.map-maker-binding-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.map-maker-binding-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.map-maker-binding-head strong {
  flex: none;
  font-size: 13px;
}

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

.map-maker-binding-column {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.map-maker-binding-column > strong {
  font-size: 12px;
  color: var(--primary-strong);
}

.map-maker-binding-column .btn {
  justify-self: start;
}

@media (max-width: 760px) {
  .map-maker-binding-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-maker-binding-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-maker-binding-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-maker-binding-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
}

.map-maker-binding-chip .chip-remove {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  line-height: 1;
  cursor: pointer;
}

.map-fill-ui {
  display: grid;
  gap: 10px;
}

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

.map-fill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.map-fill-item-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.map-fill-item-head strong {
  font-size: 13px;
}

.map-fill-status {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-fill-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.danger-text {
  color: #b91c1c;
}

.vector-export-kind-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 2px 0 10px;
}

.vector-export-kind-list .check-label {
  font-size: 13px;
}

.review-record-viewer {
  display: grid;
  gap: 14px;
}

.review-record-modal-body {
  padding-top: 0;
}

.review-record-modal-body .review-record-meta {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -20px;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: 0 6px 14px rgba(23, 37, 34, 0.08);
}

.review-record-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.review-record-meta-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.review-record-meta strong {
  font-size: 15px;
}

.review-record-meta span {
  color: var(--muted);
  font-size: 12px;
}

.review-record-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: none;
}

.review-comment-navigator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf9;
}

.review-comment-navigator span {
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.review-comment-target {
  animation: review-comment-target-pulse 1.5s ease;
}

@keyframes review-comment-target-pulse {
  0%,
  100% {
    box-shadow: none;
  }
  35% {
    box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.45);
  }
}

.review-export-preview-control {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
}

.review-export-preview-control select {
  width: 190px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.review-export-preview-control select:disabled {
  color: var(--muted);
  background: #f6f8f7;
}

@media (max-width: 760px) {
  .modal-head:has(.record-editor-head-actions) {
    position: relative;
    flex-wrap: wrap;
    padding-right: 54px;
  }

  .modal-head:has(.record-editor-head-actions) h2 {
    flex: 1 1 calc(100% - 42px);
    max-width: calc(100% - 42px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal-head:has(.record-editor-head-actions) > [data-action="close-modal"] {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
  }

  .record-editor-head-actions {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }

  .record-editor-head-actions .review-export-preview-control {
    min-width: 0;
    flex: 1;
  }

  .record-editor-head-actions .review-export-preview-control select {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .review-record-meta {
    flex-direction: column;
  }

  .review-record-meta-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .review-export-preview-control {
    width: 100%;
  }

  .review-export-preview-control select {
    width: auto;
    min-width: 0;
    flex: 1;
  }
}

.review-lock-note {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
}

.review-record-questions {
  display: grid;
  gap: 14px;
}

.review-question-wrap {
  display: grid;
  gap: 10px;
}

.review-self-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-self-photo-btn {
  white-space: nowrap;
}

.review-question-wrap .question-title.review-title-hit {
  align-self: flex-start;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}

.review-question-wrap .question-title.review-title-hit:hover {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.05);
}

.review-question-wrap .question-title.review-question-selected {
  border-color: var(--primary);
  background: rgba(15, 118, 110, 0.1);
}

.review-record-viewer .question-block input:disabled,
.review-record-viewer .question-block select:disabled,
.review-record-viewer .question-block textarea:disabled,
.review-record-viewer .question-block input[readonly] {
  cursor: default;
  opacity: 0.86;
}

.review-record-viewer .question-block button:disabled {
  cursor: default;
  opacity: 0.55;
}

.review-comment-list {
  display: grid;
  gap: 7px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(234, 179, 8, 0.45);
}

.review-comment-list[hidden] {
  display: none;
}

.review-comment-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.review-comment-item {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.review-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-comment-head strong {
  font-size: 12px;
}

.review-comment-head span {
  color: var(--muted);
  font-size: 11px;
}

.review-comment-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.review-comment-item .text-btn {
  justify-self: end;
}

.review-comment-editor {
  display: grid;
  gap: 8px;
  margin-left: 8px;
  padding: 10px;
  border: 1px dashed rgba(202, 138, 4, 0.72);
  border-radius: var(--radius-sm);
  background: rgba(250, 204, 21, 0.14);
}

.review-comment-editor .field > span {
  color: #854d0e;
  font-weight: 600;
}

.review-comment-editor textarea,
.review-reply-editor textarea {
  min-height: calc(2 * 1.5em + 2em);
  padding: 1em;
  line-height: 1.5;
  overflow: hidden;
  resize: none;
}

.review-reply-editor {
  margin-top: 6px;
  padding: 9px;
  border: 1px dashed rgba(202, 138, 4, 0.72);
  border-radius: var(--radius-sm);
  background: rgba(250, 204, 21, 0.14);
}

.review-reply-editor .field > span {
  color: #854d0e;
  font-weight: 600;
}

.review-reply-editor .review-comment-actions {
  margin-top: 1em;
}

.review-comment-item.review-reply-item {
  margin-left: 18px;
}

.review-comment-item.review-type-survey,
.review-comment-editor.review-type-survey,
.review-reply-editor.review-type-survey {
  border-color: #3b82f6;
  background: #eff6ff;
}

.review-comment-item.review-type-project,
.review-comment-editor.review-type-project,
.review-reply-editor.review-type-project {
  border-color: #eab308;
  background: #fffbeb;
}

.review-comment-item.review-type-dept,
.review-comment-editor.review-type-dept,
.review-reply-editor.review-type-dept {
  border-color: #ef4444;
  background: #fef2f2;
}

.review-comment-item.review-type-survey .review-comment-head strong,
.review-comment-editor.review-type-survey .field > span,
.review-reply-editor.review-type-survey .field > span {
  color: #1d4ed8;
}

.review-comment-item.review-type-project .review-comment-head strong,
.review-comment-editor.review-type-project .field > span,
.review-reply-editor.review-type-project .field > span {
  color: #a16207;
}

.review-comment-item.review-type-dept .review-comment-head strong,
.review-comment-editor.review-type-dept .field > span,
.review-reply-editor.review-type-dept .field > span {
  color: #b91c1c;
}

.review-comment-editor[hidden] {
  display: none;
}

.review-comment-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-card.map-editor-card {
  width: min(1240px, 100%);
  height: min(94vh, 920px);
  max-height: 94vh;
}

.modal-card.map-editor-card .modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.modal-card.map-editor-card .modal-foot {
  display: none;
}

.map-editor-root {
  position: relative;
  width: 100%;
  height: calc(94vh - 64px);
  min-height: 520px;
  overflow: hidden;
  background: #dfe7e6;
}

.tianditu-map-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #dde5e3;
  touch-action: none !important;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.tianditu-map-host .tdt-label {
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap;
  border-radius: 0;
}

.map-center-cross {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.map-center-cross .map-cross-h {
  position: absolute;
  left: -18px;
  top: -1px;
  width: 36px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.55);
}

.map-center-cross .map-cross-v {
  position: absolute;
  left: -1px;
  top: -18px;
  width: 2px;
  height: 36px;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.55);
}

.map-coord-readout {
  position: static;
  z-index: auto;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 180px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  box-shadow: none;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-help-button {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.map-locate-button {
  position: static;
  z-index: auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
  box-shadow: none;
  flex: none;
  cursor: pointer;
}

.map-locate-button svg {
  width: 19px;
  height: 19px;
}

.map-locate-button:hover,
.map-locate-button.is-active {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.map-locate-map-button {
  position: absolute;
  top: auto;
  bottom: calc(50px + 5ch);
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  box-shadow: none;
}

.map-locate-map-button:hover {
  border: 0;
  background: transparent;
  color: #0f766e;
}

.map-locate-map-button svg {
  width: 24px;
  height: 24px;
}

.map-help-popover,
.map-remark-popover {
  position: absolute;
  z-index: 8;
  right: 12px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 24px));
  padding: 12px;
  border: 1px solid rgba(216, 226, 224, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
}

.map-help-popover {
  top: 48px;
}

.map-help-popover[hidden],
.map-remark-popover[hidden] {
  display: none;
}

.map-help-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.map-remark-popover {
  bottom: 58px;
}

.map-type-switch {
  position: absolute;
  z-index: 7;
  left: auto;
  right: 48px;
  top: 12px;
}

.map-type-switch .btn {
  min-height: 28px;
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.map-scale-bar {
  position: static;
  z-index: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111827;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  flex: 0 0 auto;
}

.map-scale-line {
  display: block;
  position: relative;
  width: 1cm;
  max-width: 3cm;
  height: 7px;
  border-bottom: 2px solid #111827;
}

.map-scale-line::before,
.map-scale-line::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 9px;
  background: #111827;
}

.map-scale-line::before {
  left: 0;
}

.map-scale-line::after {
  right: 0;
}

.map-scale-bar em {
  font-style: normal;
  white-space: nowrap;
}

.map-scale-bar[hidden] {
  display: none;
}

@media (min-width: 821px) {
  .map-data-project-field,
  .map-data-forms-field {
    width: 280px;
    min-width: 0;
    flex: 1 1 280px;
  }

  .map-data-page {
    display: flex;
    flex-direction: column;
  }

  .map-data-toolbar {
    order: 1;
  }

  .map-data-map-shell {
    order: 2;
  }
}

.map-editor-side {
  position: absolute;
  z-index: 6;
  right: 12px;
  top: 52px;
  display: grid;
  gap: 8px;
  width: min(270px, calc(100% - 280px));
  max-width: 290px;
}

.map-editor-side[hidden] {
  display: none;
}

.map-side-section {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(216, 226, 224, 0.8);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.14);
}

.map-side-label {
  color: var(--muted);
  font-size: 12px;
}

.map-side-actions {
  display: flex;
  justify-content: flex-end;
}

.map-side-tips {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.map-shared-point-source {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12px;
}

.map-shared-point-source strong {
  font-size: 13px;
}

.map-shared-point-source span {
  color: var(--muted);
  line-height: 1.45;
}

.map-shared-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn.tiny.danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.btn.tiny.danger:hover {
  border-color: #b91c1c;
  background: #fff5f5;
}

.map-editor-toolbar-wrap {
  position: absolute;
  z-index: 7;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.map-editor-toolbar {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid rgba(216, 226, 224, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
}

.map-tool-info {
  position: absolute;
  top: -17px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

.map-tool-actions {
  display: flex;
  flex-wrap: nowrap;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  gap: 6px;
  flex: none;
}

.map-editor-toolbar > .map-locate-button {
  position: absolute;
  top: -8px;
  left: 2px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.map-editor-toolbar > .map-locate-button:hover {
  border: 0;
  background: transparent;
  color: #0f766e;
}

.map-editor-toolbar .map-control-hint {
  display: none;
}

.map-tool-actions .btn {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.map-tool-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.map-tool-left {
  justify-self: start;
}

.map-tool-center {
  justify-self: center;
}

.map-tool-right {
  justify-self: end;
}

.map-color-control {
  position: relative;
}

.map-color-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.map-color-picker[hidden] {
  display: none;
}

.map-color-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
  cursor: pointer;
}

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

.map-marker-style-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.map-marker-style-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.18);
}

.map-marker-style-card img {
  width: 48px;
  height: 64px;
  object-fit: contain;
}

.map-marker-style-card strong {
  font-size: 14px;
}

.map-marker-style-card span {
  color: var(--muted);
  font-size: 12px;
}

.map-control-hint {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 820px) {
  .recycle-filter-bar {
    align-items: stretch;
  }

  .recycle-filter-bar .field {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
  }

  .recycle-filter-bar .btn {
    align-self: end;
  }

  .recycle-node > summary,
  .recycle-record-node {
    flex-wrap: wrap;
  }

  .recycle-node > summary .recycle-node-meta,
  .recycle-record-node .recycle-node-meta {
    width: 100%;
    margin-left: 0;
    white-space: normal;
  }

  .recycle-node > summary .btn,
  .recycle-record-node .btn {
    width: 100%;
    margin-left: 0;
  }

  .modal-card.map-editor-card {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .map-editor-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .map-editor-side {
    width: min(220px, calc(100% - 24px));
    right: 8px;
    top: 88px;
    max-height: 42%;
    overflow: auto;
  }

  .map-type-switch {
    left: auto;
    right: 44px;
    top: 10px;
  }

  .map-help-button {
    right: 8px;
    top: 12px;
  }

  .map-locate-button {
    left: auto;
    bottom: auto;
  }

  .map-help-popover {
    right: 8px;
    top: 48px;
    width: min(330px, calc(100% - 16px));
  }

  .map-remark-popover {
    right: 8px;
    bottom: 118px;
    width: min(360px, calc(100% - 16px));
  }

  .map-scale-bar {
    right: auto;
    bottom: auto;
  }

  .map-side-section {
    padding: 8px;
  }

  .map-editor-toolbar-wrap {
    position: relative;
    z-index: 8;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: auto;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  }

  .map-editor-toolbar {
    min-height: 36px;
    padding: 5px;
    gap: 5px;
  }

  .map-tool-info {
    gap: 5px;
    overflow: visible;
  }

  .map-tool-actions {
    gap: 4px;
    max-width: 66%;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-end;
    scrollbar-width: none;
  }

  .map-tool-actions::-webkit-scrollbar {
    display: none;
  }

  .map-tool-actions .btn {
    min-height: 27px;
    padding: 0 6px;
    font-size: 10px;
    flex: none;
  }

  .map-editor-toolbar > .map-locate-button {
    left: 1px;
    bottom: auto;
  }

  .map-locate-map-button {
    top: auto;
    bottom: calc(50px + 5ch);
    left: 10px;
  }

  .map-coord-readout {
    max-width: 96px;
    font-size: 9px;
  }

  .map-scale-bar {
    font-size: 9px;
  }

  .map-tool-center {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
  }

  .map-control-hint {
    display: none;
  }

  .map-fill-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-fill-item-actions {
    width: 100%;
  }
}

.function-center-preview-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
}

.function-center-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.function-center-sidebar {
  position: sticky;
  top: 14px;
}

.function-center-module-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.function-center-module-btn:hover {
  background: #f7faf9;
}

.function-center-module-btn.active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.function-center-module-btn svg {
  width: 21px;
  height: 21px;
  flex: none;
}

.function-center-module-btn span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.function-center-module-btn strong {
  font-size: 14px;
}

.function-center-module-btn small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.function-center-sidebar-note {
  padding: 14px 16px 16px;
  background: #f8faf9;
}

.function-center-sidebar-note strong {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-strong);
  font-size: 12px;
}

.function-center-sidebar-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.function-center-main {
  min-width: 0;
}

.function-center-module-panel {
  display: none;
}

.function-center-module-panel.active {
  display: block;
}

.function-center-panel-head {
  align-items: flex-start;
}

.function-center-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.function-center-status {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.function-center-status strong {
  color: var(--primary-strong);
  font-size: 13px;
}

.function-center-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.function-center-mode-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease,
    color 140ms ease;
}

.function-center-mode-tab:hover,
.function-center-mode-tab.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.function-center-mode-panel {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.function-center-mode-panel[hidden] {
  display: none !important;
}

.function-history-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 11px;
}

.function-history-toolbar .field {
  flex: 1 1 auto;
  max-width: 620px;
  margin: 0;
}

.function-history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.function-history-list button {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.function-history-list button.active,
.function-history-list button:hover {
  border-color: rgba(15, 118, 110, 0.36);
  background: var(--primary-soft);
}

.function-history-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.function-history-list span {
  color: var(--muted);
  font-size: 10px;
}

.function-evaluation-content[hidden] {
  display: none !important;
}

.function-new-evaluation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.18);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.function-new-evaluation-banner[hidden] {
  display: none !important;
}

.function-new-evaluation-banner span {
  color: #4f716c;
  font-size: 11px;
}

.function-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  scrollbar-width: thin;
}

.function-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 110px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.function-step:last-child {
  border-right: 0;
}

.function-step b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8eeee;
  color: #5f7370;
  font-size: 11px;
}

.function-step.active,
.function-step:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.function-step.active b {
  background: var(--primary);
  color: #fff;
}

.function-section {
  scroll-margin-top: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.function-section:last-child {
  border-bottom: 0;
}

.function-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.function-section-title > div {
  display: flex;
  align-items: center;
  gap: 1ch;
}

.function-section-title h3 {
  margin: 0;
  font-size: 15px;
}

.function-section-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.function-section-index {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.function-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.evaluation-basic-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.function-section-confirm {
  min-width: 48px;
  height: 25px;
  padding: 0 9px;
}

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

.standard-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  cursor: pointer;
}

.standard-choice.active {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--primary-soft);
}

.standard-choice input {
  margin-top: 2px;
  accent-color: var(--primary);
}

.standard-choice span {
  display: grid;
  gap: 3px;
}

.standard-choice strong {
  font-size: 12px;
}

.standard-choice small {
  color: var(--muted);
  font-size: 10px;
}

.function-library-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
}

.function-library-tree {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.function-library-tree button {
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.function-library-tree button.active,
.function-library-tree button:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.function-table-shell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.function-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.function-table-head strong {
  font-size: 13px;
}

.function-table-head span {
  color: var(--muted);
  font-size: 11px;
}

.function-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.function-data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}

.function-data-table th,
.function-data-table td {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.function-data-table th {
  background: #f5f8f7;
  color: #536764;
  font-size: 11px;
  font-weight: 700;
}

.function-data-table tr:last-child td {
  border-bottom: 0;
}

.function-data-table th:last-child,
.function-data-table td:last-child {
  border-right: 0;
}

.function-data-table .selected-limit {
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
}

.function-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 12px;
}

.function-toolbar .field {
  min-width: 230px;
  margin: 0;
}

.function-toolbar-note {
  align-self: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.function-toolbar-note strong {
  color: var(--primary-strong);
}

.function-indicator-list {
  max-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.function-point-shell {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.function-point-table {
  min-width: 560px;
}

.function-point-table input {
  width: 100%;
  min-width: 120px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
}

.function-import-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 11px;
}

.function-import-preview[hidden] {
  display: none !important;
}

.function-import-preview > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.function-import-preview > div span {
  color: var(--muted);
}

.function-import-preview p {
  margin: 0;
}

.function-import-errors {
  color: #b42318;
}

.function-import-ok {
  color: var(--primary-strong);
}

.function-result-detail-shell {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detection-entry-preview input {
  width: 100%;
  min-width: 90px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
}

.function-result-actions {
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
}

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

.function-summary-grid > div {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.function-summary-grid span {
  color: var(--muted);
  font-size: 11px;
}

.function-summary-grid strong {
  color: var(--primary-strong);
  font-size: 21px;
}

.label-settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.label-settings-grid input {
  background: #fbfcfc;
}

.sample-label-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sample-label-card {
  overflow: hidden;
  border: 1px solid #cad8d4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 60, 55, 0.05);
}

.sample-label-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-bottom: 1px dashed #cad8d4;
  background: #f5faf8;
  color: var(--primary-strong);
}

.sample-label-card header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.sample-label-card header b {
  flex: none;
  font-size: 10px;
}

.sample-label-card dl {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 7px 8px;
  margin: 0;
  padding: 11px;
  font-size: 11px;
}

.sample-label-card dt {
  color: var(--muted);
}

.sample-label-card dd {
  margin: 0;
  word-break: break-word;
}

.sample-label-card.accent header {
  background: #fff7ed;
  color: #a85c16;
}

.sample-label-card.muted header {
  background: #f4f6f7;
  color: #5d6d71;
}

@media (max-width: 1180px) {
  .function-center-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .function-form-grid,
  .label-settings-grid,
  .function-summary-grid,
  .sample-label-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .function-history-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .function-center-shell {
    grid-template-columns: 1fr;
  }

  .function-center-sidebar {
    position: static;
  }

  .function-library-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .function-center-nav-item {
    display: none !important;
  }

  .function-form-grid,
  .standard-choice-grid,
  .label-settings-grid,
  .function-summary-grid,
  .sample-label-preview-grid {
    grid-template-columns: 1fr;
  }

  .function-center-mode-tabs,
  .function-history-toolbar {
    grid-template-columns: 1fr;
  }

  .function-history-toolbar {
    display: grid;
  }

  .function-section-title {
    flex-direction: column;
    gap: 5px;
  }

  .function-section-title p {
    text-align: left;
  }
}
