:root {
  --bg: #f4f5f8;
  --bg-deep: #e8ebf1;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-muted: #f4f7fc;
  --text: #172033;
  --muted: #74829b;
  --line: rgba(126, 145, 178, 0.18);
  --brand: #3a8bff;
  --brand-deep: #2067e3;
  --green: #46c07a;
  --amber: #f3af3d;
  --red: #e26363;
  --shadow: 0 24px 60px rgba(39, 71, 123, 0.18);
  --shadow-soft: 0 14px 35px rgba(63, 91, 139, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Outfit", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #eef0f4;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 0 calc(34px + env(safe-area-inset-bottom));
  background: #f5f6fa;
  overflow-x: hidden;
}

.topbar,
.page,
.tabbar,
.modal-root {
  position: relative;
  z-index: 1;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero-card h2,
.panel h3,
.sheet h3,
.dialog h3 {
  margin: 0;
}

.topbar__actions,
.panel__actions,
.hero-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
}

.icon-button--soft {
  width: 34px;
  height: 34px;
  background: var(--surface-muted);
  box-shadow: none;
}

.icon {
  font-size: 18px;
  line-height: 1;
}

.ios-frame {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(126, 145, 178, 0.12);
  backdrop-filter: blur(18px);
}

.ios-statusbar,
.ios-navbar,
.ios-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-statusbar {
  padding: 10px 16px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.ios-statusbar__icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ios-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.ios-signal i {
  display: block;
  width: 2px;
  border-radius: 999px;
  background: #111827;
}

.ios-signal i:nth-child(1) { height: 4px; }
.ios-signal i:nth-child(2) { height: 6px; }
.ios-signal i:nth-child(3) { height: 8px; }
.ios-signal i:nth-child(4) { height: 10px; }

.ios-wifi {
  width: 14px;
  height: 10px;
  border: 2px solid #111827;
  border-top-color: #111827;
  border-left-color: transparent;
  border-right-color: transparent;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  transform: translateY(-1px);
}

.ios-battery {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1.8px solid #111827;
  border-radius: 3px;
}

.ios-battery::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -3.6px;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: #111827;
}

.ios-battery b {
  position: absolute;
  inset: 1.6px;
  border-radius: 1.5px;
  background: #111827;
}

.ios-navbar {
  min-height: 48px;
  padding: 0 12px;
}

.ios-navbar h1 {
  margin: 0;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.ios-navbar__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #222b3a;
  font-size: 28px;
  line-height: 1;
}

.ios-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(126, 145, 178, 0.08);
}

.ios-subnav__group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ios-subnav__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f6777;
  font-size: 14px;
  text-decoration: none;
}

.ios-subnav__action--icon {
  gap: 0;
}

.ios-subnav__icon {
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

.ios-grid-icon {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 3px;
}

.ios-grid-icon i {
  display: block;
  width: 7px;
  height: 7px;
  border: 1.5px solid #5f6777;
  border-radius: 2px;
}

.ios-subnav__title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ios-subnav__placeholder {
  width: 52px;
  flex: 0 0 52px;
}

.ios-navbar__icon--link {
  text-decoration: none;
}

.ios-home-indicator {
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: #111827;
  opacity: 0.92;
  z-index: 2;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px 0;
}

.control-panel {
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.control-panel__row,
.control-panel__filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-panel__row {
  justify-content: space-between;
}

.control-panel__filters {
  flex: 1;
  min-width: 0;
}

.reveal {
  animation: reveal-up 560ms ease both;
}

.reveal:nth-child(2) {
  animation-delay: 50ms;
}

.reveal:nth-child(3) {
  animation-delay: 100ms;
}

.reveal:nth-child(4) {
  animation-delay: 150ms;
}

.reveal:nth-child(5) {
  animation-delay: 200ms;
}

.hero-card,
.panel,
.dialog,
.sheet {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 18px;
  border-radius: 30px;
  overflow: hidden;
}

.hero-card[data-section="brief"] {
  background: #ffffff;
}

.hero-card__backdrop {
  position: absolute;
  top: -42px;
  right: -34px;
  width: 180px;
  height: 180px;
  background:
    radial-gradient(circle at 42% 42%, rgba(58, 139, 255, 0.32), transparent 42%),
    radial-gradient(circle at 72% 70%, rgba(70, 192, 122, 0.18), transparent 38%);
  filter: blur(10px);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

.filter-pill--primary {
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
}

.filter-pill--ghost {
  background: rgba(245, 248, 253, 0.92);
}

.caret {
  color: var(--muted);
}

.hero-card__summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 20px;
}

.hero-card__summary h2 {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
}

.hero-card[data-section="brief"] .hero-card__summary {
  gap: 4px;
  margin: 0 0 18px;
}

.hero-card[data-section="brief"] .hero-card__summary h2 {
  font-size: 21px;
  line-height: 1.15;
}

.hero-card__copy {
  margin: 10px 0 0;
  color: #55637e;
  line-height: 1.5;
}

.primary-action,
.secondary-action,
.mini-action {
  border-radius: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-action {
  align-self: flex-start;
  padding: 12px 16px;
  background: linear-gradient(135deg, #418eff 0%, #2e69ff 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(58, 139, 255, 0.28);
}

.primary-action--compact {
  padding: 11px 18px;
}

.secondary-action {
  padding: 11px 16px;
  background: #edf2fa;
  color: var(--text);
}

.mini-action {
  padding: 9px 12px;
  background: var(--surface-muted);
  color: #5a6b89;
  font-size: 12px;
}

.mini-action--select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mini-action--link {
  text-decoration: none;
}

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

.summary-carousel {
  overflow-x: auto;
  margin-inline: -2px;
  padding-inline: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.summary-carousel::-webkit-scrollbar {
  display: none;
}

.summary-carousel__track {
  display: flex;
  gap: 14px;
  background: #ffffff;
}

.summary-grid--slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  background: #ffffff;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  text-align: left;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(63, 91, 139, 0.08);
}

.summary-card--link {
  text-decoration: none;
  color: inherit;
}

.summary-card__label {
  color: #5d6a84;
  font-size: 13px;
}

.summary-card strong {
  font-size: 28px;
  font-weight: 700;
}

.summary-card__meta {
  font-size: 12px;
}

.summary-card__meta.up {
  color: var(--red);
}

.summary-card__meta.down {
  color: var(--green);
}

.summary-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.summary-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(111, 128, 158, 0.28);
}

.summary-carousel__dot.is-active {
  width: 22px;
  background: linear-gradient(90deg, #3b90ff, #74a8ff);
}

.panel {
  padding: 18px;
  border-radius: var(--radius-xl);
}

.panel--chart {
  margin-bottom: 8px;
}

.panel__header,
.sheet__header,
.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel__header h3,
.sheet__header h3,
.dialog__header h3 {
  margin-top: 4px;
  font-size: 21px;
}

.text-link {
  align-self: center;
  color: var(--brand);
  text-decoration: none;
  font-size: 13px;
}

.target-board {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.target-summary {
  display: grid;
}

.gauge-card {
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fcfdff 0%, #eff5ff 100%);
}

.gauge {
  --progress-angle: calc(var(--progress) * 3.6deg);
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0 52%, transparent 52% 100%),
    conic-gradient(from -205deg, var(--brand) 0 var(--progress-angle), #dbe4f1 var(--progress-angle) 100%);
  display: grid;
  place-items: center;
}

.gauge::before {
  content: "";
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 11px solid rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(105, 130, 180, 0.08);
}

.gauge__inner {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 4px;
}

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

.gauge__inner strong {
  font-size: 30px;
}

.gauge-legend {
  display: grid;
  gap: 10px;
  color: #5d6d89;
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: middle;
}

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

.dot--green {
  background: var(--green);
}

.dot--gray {
  background: #aeb7c8;
}

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

.progress-stack {
  display: grid;
  gap: 12px;
}

.progress-stack--overview {
  gap: 14px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.target-overview {
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fcfdff 0%, #eff5ff 100%);
}

.target-overview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #5d6d89;
  font-size: 13px;
}

.target-overview__header p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.app-shell--detail {
  padding: env(safe-area-inset-top) 0 calc(34px + env(safe-area-inset-bottom));
  background: #f5f6fa;
}

.page--detail {
  gap: 14px;
  padding: 16px 16px 0;
}

.panel--detail-plain {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.panel--detail-plain .panel__header {
  padding: 0 2px;
}

.detail-toolbar,
.detail-filters {
  display: flex;
  gap: 8px;
}

.detail-toolbar {
  align-items: center;
  justify-content: flex-end;
}

.detail-toolbar--split {
  justify-content: space-between;
}

.detail-toolbar--split .detail-filters {
  justify-content: flex-start;
}

.detail-toolbar--triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.detail-toolbar--triple .filter-pill,
.detail-toolbar--triple .mini-action--select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  justify-content: space-between;
  padding: 11px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.mini-action--primary {
  min-height: 34px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #418eff 0%, #2e69ff 100%);
  color: #fff;
  font-size: 12px;
}

.panel__actions .mini-action,
.panel__actions .mini-action--primary {
  min-height: 34px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1;
}

.goal-card-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.goal-person-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 254, 0.95));
  box-shadow: var(--shadow-soft);
}

.goal-person-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-person-card__head strong {
  font-size: 15px;
}

.goal-person-card__head span {
  color: var(--muted);
  font-size: 11px;
}

.goal-person-card__rate {
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
}

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

.goal-person-card__metric {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 245, 252, 0.88);
}

.goal-person-card__metric span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.goal-person-card__metric strong {
  font-size: 14px;
  text-align: right;
}

.ranking-card-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ranking-person-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 254, 0.95));
  box-shadow: var(--shadow-soft);
}

.ranking-person-card__head {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
}

.ranking-person-card__rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: #eef3fb;
  color: #53627d;
  font-size: 12px;
  font-weight: 700;
}

.ranking-person-card__head strong {
  font-size: 15px;
}

.ranking-person-card__head span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.ranking-person-card__sub {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chart-detail-card__month {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.chart-detail-card__metrics {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chart-detail-card__metrics--actions {
  align-items: center;
}

.ranking-loadmore {
  margin-top: 14px;
  text-align: center;
  color: #7a89a4;
  font-size: 12px;
}

.progress-card,
.goal-row {
  display: grid;
  gap: 8px;
}

.progress-card__head,
.goal-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #61718d;
  font-size: 13px;
}

.bar {
  position: relative;
  height: 30px;
  border-radius: 999px;
  overflow: hidden;
  background: #ecf1f8;
}

.bar span {
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 42%;
  padding-inline: 12px;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b90ff 0%, #74a8ff 100%);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.ranking-list,
.product-list,
.goal-list,
.toggle-list {
  display: grid;
  gap: 12px;
}

.ranking-list,
.product-list {
  margin-top: 18px;
}

.ranking-item,
.product-item,
.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 254, 0.95));
}

.ranking-item--top {
  background: linear-gradient(135deg, rgba(255, 244, 214, 0.92), rgba(255, 255, 255, 0.96));
}

.ranking-item__left,
.product-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ranking-item__left strong,
.product-item__info strong {
  display: block;
  font-size: 15px;
}

.ranking-item__left p,
.product-item__info p,
.ranking-item__right span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ranking-item__right {
  text-align: right;
}

.medal,
.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.medal {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #1f2740;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.medal--silver {
  background: #8391a8;
}

.medal--bronze {
  background: #cb8d4c;
}

.medal--plain {
  background: #d7dfec;
  color: #55637e;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #4b5d84 0%, #1f2940 100%);
}

.avatar--gold {
  background: linear-gradient(135deg, #f2b247 0%, #e17d2d 100%);
}

.avatar--silver {
  background: linear-gradient(135deg, #cfd8ea 0%, #8a9db9 100%);
}

.avatar--bronze {
  background: linear-gradient(135deg, #ed9f61 0%, #c56e34 100%);
}

.product-item {
  min-height: 72px;
}

.product-item__info--ranking {
  width: 100%;
  justify-content: flex-start;
}

.product-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #1f2740;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.product-rank--silver {
  background: #8391a8;
}

.product-rank--bronze {
  background: #cb8d4c;
}

.group-sheet {
  display: grid;
  gap: 18px;
}

.group-sheet__tree {
  display: grid;
  gap: 8px;
}

.group-sheet__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.group-sheet__item {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #f4f7fc;
  color: var(--text);
  text-align: left;
  font-size: 14px;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.group-sheet__item--child {
  min-height: 40px;
  padding-left: 18px;
  font-size: 13px;
}

.group-sheet__item--active {
  background: linear-gradient(135deg, rgba(59, 144, 255, 0.16), rgba(116, 168, 255, 0.2));
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(59, 144, 255, 0.18);
}

.group-sheet__toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f4f7fc;
  color: #7585a0;
  font-size: 14px;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.group-sheet__toggle--expanded {
  transform: rotate(180deg);
  background: rgba(59, 144, 255, 0.12);
  color: var(--brand);
}

.group-sheet__children {
  display: grid;
  gap: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(59, 144, 255, 0.14);
}

.chart-card {
  position: relative;
  margin-top: 18px;
  padding: 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.chart-tooltip {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 4px;
  min-width: 128px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(17, 28, 48, 0.92);
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 26, 44, 0.28);
  z-index: 4;
  pointer-events: none;
}

.chart-tooltip strong {
  font-size: 13px;
}

.chart-tooltip span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
}

.line-chart {
  position: relative;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(76, 141, 255, 0.05), transparent 40%),
    linear-gradient(180deg, transparent 0 24%, rgba(126, 145, 178, 0.08) 24% 25%, transparent 25% 49%, rgba(126, 145, 178, 0.08) 49% 50%, transparent 50% 74%, rgba(126, 145, 178, 0.08) 74% 75%, transparent 75% 100%);
}

.line-chart__y-axis {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 38px;
  width: 28px;
  display: grid;
  align-content: space-between;
  z-index: 1;
  color: #7c8ba5;
  font-size: 10px;
  text-align: left;
}

.line-chart__y-axis--right {
  left: auto;
  right: 0;
  text-align: right;
}

.line-chart__grid {
  position: absolute;
  top: 12px;
  right: 24px;
  bottom: 38px;
  left: 24px;
  background-image:
    linear-gradient(180deg, rgba(126, 145, 178, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 145, 178, 0.07) 1px, transparent 1px);
  background-size: 100% 27px, 56px 100%;
}

.line-chart__guide-line {
  position: absolute;
  top: 12px;
  bottom: 38px;
  width: 0;
  border-left: 1.5px dashed rgba(59, 144, 255, 0.46);
  z-index: 1;
  pointer-events: none;
}

.line-chart__scroll {
  position: absolute;
  top: 0;
  right: 24px;
  bottom: 0;
  left: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.line-chart__scroll::-webkit-scrollbar {
  display: none;
}

.line-chart__plot {
  position: relative;
  width: var(--chart-plot-width, 648px);
  min-width: var(--chart-plot-width, 648px);
  height: 100%;
}

.line-chart__svg {
  width: 100%;
  height: 100%;
}

.line-chart__dots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.line-chart__point-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.line-chart__axis {
  stroke: rgba(126, 145, 178, 0.22);
  stroke-width: 1.2;
}

.line-chart__path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.line-chart__path--blue {
  stroke: var(--brand);
}

.line-chart__path--amber {
  stroke: var(--amber);
}

.line-chart__dot {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  fill: #fff;
  background: #fff;
  border: 2px solid var(--brand);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.line-chart__dot--amber {
  border-color: var(--amber);
}

.line-chart__dot.is-active {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--brand);
}

.line-chart__dot--amber.is-active {
  background: var(--amber);
}

.line-chart__point-hit {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: transparent;
}

.line-chart__x-axis {
  position: absolute;
  left: 0;
  width: var(--chart-plot-width, 648px);
  bottom: 8px;
  height: 14px;
}

.line-chart__month {
  position: absolute;
  color: #7c8ba5;
  font-size: 10px;
  line-height: 1;
  transform: translateX(-50%);
  border-radius: 999px;
}

.line-chart__month.is-active {
  color: var(--brand);
  background: rgba(59, 144, 255, 0.12);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.pie-card {
  margin-top: 18px;
  display: grid;
  grid-template-rows: 210px auto;
  gap: 10px;
}

.pie-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px;
  min-height: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.pie-chart {
  width: 192px;
  height: 192px;
  display: grid;
  place-items: center;
}

.pie-chart__svg {
  width: 192px;
  height: 192px;
  overflow: visible;
}

.pie-chart__slice {
  cursor: pointer;
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 0;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    opacity 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
  transform-origin: 100px 100px;
}

.pie-chart__slice.is-active {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 6;
  filter: drop-shadow(0 10px 18px rgba(43, 88, 167, 0.22));
}

.pie-legend {
  display: grid;
  gap: 10px;
  max-height: 130px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.pie-legend__item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 254, 0.95));
  color: var(--muted);
  font-size: 12px;
}

.pie-legend__item--selected {
  align-content: start;
}

.pie-legend__summary,
.pie-legend__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pie-legend__head span:last-child {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.pie-legend__item strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.pie-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.map-card {
  margin-top: 18px;
  display: grid;
  grid-template-rows: 220px auto;
  gap: 10px;
}

.map-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-control-button {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(63, 91, 139, 0.12);
  color: #52627d;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.map-control-button--reset {
  min-width: 28px;
  font-size: 14px;
  font-weight: 600;
}

.map-chart {
  width: 100%;
  height: 208px;
  display: grid;
  place-items: center;
}

.map-chart__svg {
  width: min(100%, 314px);
  height: 208px;
  overflow: visible;
}

.map-chart__region {
  cursor: pointer;
  stroke-width: 2;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    opacity 180ms ease;
  transform-origin: center;
}

.map-chart__region--static {
  cursor: default;
}

.map-chart__region.is-active {
  filter: drop-shadow(0 6px 10px rgba(255, 215, 61, 0.24));
  stroke-width: 2.5;
}

.map-chart__inset {
  opacity: 0.92;
}

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

.bar-card {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.bar-chart-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.bar-chart__y-axis {
  position: absolute;
  top: 18px;
  bottom: 26px;
  width: 28px;
  display: grid;
  align-content: space-between;
  z-index: 2;
  color: #7c8ba5;
  font-size: 10px;
}

.bar-chart__y-axis--right {
  right: 0;
  text-align: right;
}

.bar-chart__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin-right: 24px;
}

.bar-chart {
  min-width: 100%;
  height: 248px;
  overflow: hidden;
}

.table-card--bar {
  margin-top: 18px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(calc(100% - 24px), 398px);
  padding: 10px;
  border-radius: 24px;
  background: rgba(17, 28, 48, 0.9);
  box-shadow: 0 20px 40px rgba(15, 26, 44, 0.32);
  backdrop-filter: blur(18px);
}

.tabbar__item {
  padding: 12px 8px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.tabbar__item--active {
  background: linear-gradient(135deg, rgba(65, 142, 255, 0.22), rgba(45, 93, 242, 0.45));
  color: #fff;
}

[hidden] {
  display: none !important;
}

.modal-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.modal-sheet {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(12, 19, 32, 0);
  opacity: 0;
  transition: opacity 220ms ease, background-color 220ms ease;
}

.modal-sheet--center {
  align-items: center;
}

.modal-sheet--settings {
  align-items: flex-end;
  padding: 0;
}

.modal-sheet.is-visible {
  pointer-events: auto;
  opacity: 1;
  background: rgba(12, 19, 32, 0.42);
}

.sheet,
.dialog {
  width: min(100%, 398px);
  transform: translateY(24px);
  transition: transform 220ms ease;
}

.modal-sheet.is-visible .sheet,
.modal-sheet.is-visible .dialog {
  transform: translateY(0);
}

.sheet {
  padding: 14px 16px 18px;
  border-radius: 28px 28px 18px 18px;
  max-height: min(82vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sheet--settings {
  width: min(100%, 430px);
  max-height: min(84vh, 780px);
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  transform: translateY(56px);
}

.sheet__grab {
  width: 52px;
  height: 5px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: rgba(124, 140, 171, 0.28);
}

.sheet__body {
  margin-top: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.sheet__body--settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.year-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #edf4ff, #f8fbff);
  color: #61718d;
}

.year-switch__control {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.year-switch__button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding: 6px;
  border-radius: 18px;
  background: #eff4fb;
}

.segmented__item {
  padding: 11px 0;
  border-radius: 14px;
  color: #60708c;
}

.segmented__item--active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 18px rgba(99, 125, 170, 0.14);
}

.filter-panel {
  display: none;
}

.filter-panel--active {
  display: block;
}

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

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

.option-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card,
.field input {
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: center;
}

.option-card--active {
  border-color: rgba(58, 139, 255, 0.45);
  background: linear-gradient(180deg, rgba(236, 244, 255, 0.96), rgba(255, 255, 255, 0.98));
  color: var(--brand);
  box-shadow: 0 12px 26px rgba(58, 139, 255, 0.12);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.field--range {
  margin-top: 16px;
}

.field input {
  text-align: left;
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f4f8fd;
  color: var(--text);
  font-size: 14px;
}

.field__select-wrap {
  position: relative;
}

.field__select {
  width: 100%;
  min-height: 48px;
  padding: 13px 40px 13px 14px;
  border: 0;
  border-radius: 14px;
  background: #f4f8fd;
  color: var(--text);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
}

.field__caret {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

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

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

.field__range em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.tip-box {
  margin: 18px 0 16px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #edf4ff, #f8fbff);
  color: #5b6c88;
  line-height: 1.6;
}

.toggle-card {
  position: relative;
}

.toggle-card__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.drag-handle {
  color: #91a0bb;
  font-weight: 600;
  letter-spacing: -0.08em;
}

.toggle-card.is-dragging {
  opacity: 0.6;
  transform: scale(0.98);
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card i {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #ced7e7;
  transition: background-color 180ms ease;
}

.toggle-card i::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease;
}

.toggle-card input:checked + i {
  background: linear-gradient(135deg, #3a8bff, #71a9ff);
}

.toggle-card input:checked + i::before {
  transform: translateX(16px);
}

.sheet__footer,
.dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-shrink: 0;
}

.toggle-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.dialog {
  max-height: min(84vh, 760px);
  padding: 18px;
  border-radius: 28px;
  overflow: hidden;
}

.goal-list,
.table-card {
  margin-top: 18px;
}

.goal-list {
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.table-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(126, 145, 178, 0.16);
}

.table-card__head,
.table-card__body div {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 12px;
  padding: 13px 14px;
}

.table-card__head {
  background: #eff4fb;
  color: #6d7d98;
  font-size: 12px;
}

.table-card__body div {
  align-items: center;
  border-top: 1px solid rgba(126, 145, 178, 0.12);
  font-size: 13px;
}

.table-card__body span:first-child {
  color: var(--brand);
}

.panel__header--subsection {
  margin-top: 18px;
}

.table-card--map {
  margin-top: 14px;
}

.panel--table-summary .panel__header {
  align-items: center;
  gap: 8px;
}

.panel--table-summary .panel__header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel--table-summary .section-kicker {
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.panel--table-summary .panel__header h3 {
  margin-top: 0;
  font-size: 18px;
  line-height: 1.15;
}

.panel--table-summary .panel__actions {
  gap: 8px;
}

.panel--table-summary .mini-action {
  min-width: 54px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.panel--table-summary .table-card--map {
  margin-top: 12px;
}

.panel--table-summary .table-card__head {
  font-size: 11px;
  padding: 11px 12px;
}

.panel--table-summary .table-card__body div {
  font-size: 12px;
  padding: 11px 12px;
}

.table-card__body--scroll {
  max-height: 220px;
  overflow-y: auto;
}

.table-card__body--modal-scroll {
  max-height: min(68vh, 520px);
  overflow-y: auto;
}

.table-card__body--page-scroll {
  max-height: min(68vh, 560px);
  overflow-y: auto;
}

.dialog--wide {
  width: min(100%, 420px);
}

body.modal-open {
  overflow: hidden;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 431px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100vh - 36px);
    border-radius: 36px;
    box-shadow: 0 34px 100px rgba(25, 39, 72, 0.28);
  }
}
