:root {
  color-scheme: dark;
  --bg: #080a0e;
  --bg-deep: #05070a;
  --surface: #10141a;
  --surface-raised: #151a22;
  --surface-soft: #0d1117;
  --surface-hover: #1a2029;
  --line: rgba(226, 238, 248, 0.09);
  --line-strong: rgba(226, 238, 248, 0.16);
  --text: #eef4f8;
  --muted: #929daa;
  --muted-strong: #b8c2cc;
  --ice: #b6dcf6;
  --ice-strong: #d9efff;
  --ice-soft: rgba(166, 215, 247, 0.1);
  --mint: #77d6a7;
  --mint-soft: rgba(119, 214, 167, 0.11);
  --amber: #e4b565;
  --amber-soft: rgba(228, 181, 101, 0.12);
  --red: #f07c87;
  --red-soft: rgba(240, 124, 135, 0.11);
  --blue: #7ebcea;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  --sidebar: 236px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 76% -10%, rgba(107, 157, 193, 0.09), transparent 31rem),
    var(--bg);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

[hidden] {
  display: none !important;
}

.noscript,
.offline-banner {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(228, 181, 101, 0.25);
  color: #f3d9a9;
  background: rgba(67, 49, 22, 0.96);
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(16px);
}

.offline-banner .status-dot {
  display: inline-block;
  margin-right: 6px;
  background: var(--amber);
}

body.is-offline .app-shell {
  padding-top: 35px;
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.9);
  padding: 26px 18px 20px;
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand img,
.mobile-brand img,
.login-mobile-logo img {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(207, 233, 250, 0.15);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 9px 30px rgba(0, 0, 0, 0.28);
}

.brand span,
.login-mobile-logo span {
  display: flex;
  flex-direction: column;
}

.brand strong,
.login-mobile-logo strong {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.brand small,
.login-mobile-logo small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.side-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding-top: 48px;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.is-active {
  color: var(--ice-strong);
  background: var(--ice-soft);
}

.side-nav .nav-item.is-active::before {
  position: absolute;
  left: -18px;
  width: 3px;
  height: 23px;
  border-radius: 0 4px 4px 0;
  background: var(--ice);
  content: "";
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-foot {
  display: grid;
  gap: 17px;
}

.utility-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted-strong);
  background: transparent;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
}

.utility-button:hover {
  border-color: var(--line);
  background: var(--surface);
}

.utility-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.sidebar-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 580;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(146, 157, 170, 0.08);
}

.is-healthy .status-dot,
.status-dot.is-healthy {
  background: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-soft), 0 0 12px rgba(119, 214, 167, 0.28);
}

.is-warning .status-dot,
.status-dot.is-warning {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.is-error .status-dot,
.status-dot.is-error {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.is-loading .status-dot {
  background: var(--ice);
  animation: pulse 1.7s ease-in-out infinite;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 238, 248, 0.055);
  background: rgba(8, 10, 14, 0.78);
  padding: 0 clamp(24px, 4vw, 58px);
  backdrop-filter: blur(22px) saturate(125%);
}

.mobile-brand {
  display: none;
}

.desktop-title h1,
.mobile-brand h1 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

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

.segmented {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(15, 19, 25, 0.75);
  padding: 3px;
}

.segmented button {
  min-width: 46px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  padding: 0 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
}

.segmented button.is-active {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.mobile-range {
  display: none;
}

.sync-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 19, 25, 0.72);
  padding: 0 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.sync-pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted-strong);
  background: rgba(15, 19, 25, 0.72);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-raised);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.view-content {
  width: min(100%, 1420px);
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 58px) 70px;
}

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

.section-head h2 {
  margin: 5px 0 0;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-head p {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-link,
.text-button {
  border: 0;
  color: var(--ice);
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20, 25, 33, 0.93), rgba(13, 17, 23, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.022);
}

.daily-card {
  min-height: 256px;
  padding: clamp(24px, 3.5vw, 38px);
}

.daily-card::before {
  position: absolute;
  top: -170px;
  right: -100px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149, 207, 245, 0.13), transparent 67%);
  content: "";
  pointer-events: none;
}

.daily-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.daily-number {
  margin: 13px 0 4px;
  font-size: clamp(48px, 8vw, 76px);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.daily-number span {
  color: var(--muted);
  font-size: 0.45em;
  font-weight: 560;
  letter-spacing: -0.04em;
}

.daily-copy {
  color: var(--muted-strong);
  font-size: 13px;
}

.daily-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(119, 214, 167, 0.17);
  border-radius: 999px;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-state.is-progress {
  border-color: rgba(166, 215, 247, 0.15);
  color: var(--ice);
  background: var(--ice-soft);
}

.fleet-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 34px;
}

.fleet-segment {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(222, 238, 248, 0.08);
}

.fleet-segment > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #80bde5, #c0e4fb);
  box-shadow: 0 0 16px rgba(166, 215, 247, 0.2);
}

.device-mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.device-mini {
  min-width: 0;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.device-mini span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-mini strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mission-card {
  display: flex;
  min-height: 256px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}

.mission-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(166, 215, 247, 0.13);
  border-radius: 13px;
  color: var(--ice);
  background: var(--ice-soft);
}

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

.mission-card h3 {
  margin: 18px 0 7px;
  font-size: 20px;
  letter-spacing: -0.035em;
}

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

.mission-freshness {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 17px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 610;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric-card {
  min-height: 128px;
  padding: 21px;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.metric-label svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 17px;
  font-size: clamp(25px, 3.5vw, 33px);
  font-weight: 740;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-change {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 610;
}

.metric-change.is-up {
  color: var(--mint);
}

.metric-change.is-down {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  gap: 16px;
  margin-top: 16px;
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.panel-head h3 {
  margin: 5px 0 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}

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

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

.post-tile {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: var(--surface-soft);
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.post-tile:hover,
.post-card:hover,
.account-row:hover {
  border-color: var(--line-strong);
  background-color: var(--surface-hover);
  transform: translateY(-1px);
}

.post-tile-cover {
  position: relative;
  height: 146px;
  overflow: hidden;
  background: linear-gradient(145deg, #25303b, #10151b);
}

.post-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-rank {
  position: absolute;
  top: 9px;
  left: 9px;
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  color: white;
  background: rgba(6, 8, 11, 0.7);
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.post-tile-body {
  padding: 13px;
}

.post-tile-body strong {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}

.post-tile-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-tile-meta b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.attention-list,
.account-list,
.post-list,
.winner-list,
.settings-list {
  display: grid;
  gap: 8px;
}

.attention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  padding: 13px;
}

.attention-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--amber);
  background: var(--amber-soft);
}

.attention-item.is-error .attention-icon {
  color: var(--red);
  background: var(--red-soft);
}

.attention-icon svg {
  width: 15px;
  height: 15px;
}

.attention-item strong {
  display: block;
  font-size: 11px;
}

.attention-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.all-clear {
  display: flex;
  min-height: 136px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.all-clear-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--mint);
  background: var(--mint-soft);
}

.all-clear-icon svg {
  width: 18px;
  height: 18px;
}

.all-clear strong {
  margin-top: 10px;
  color: var(--text);
  font-size: 12px;
}

.all-clear > span:not(.all-clear-icon) {
  margin-top: 3px;
  font-size: 10px;
}

.trend-panel {
  margin-top: 16px;
}

.trend-chart {
  position: relative;
  width: 100%;
  height: 175px;
  overflow: visible;
}

.trend-chart .grid-line {
  stroke: rgba(226, 238, 248, 0.06);
  stroke-width: 1;
}

.trend-chart .area {
  fill: url(#trendArea);
  stroke: none;
}

.trend-chart .line {
  fill: none;
  stroke: var(--ice);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.trend-chart .point {
  fill: var(--bg);
  stroke: var(--ice);
  stroke-width: 2;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.filter-chips {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 0 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.chip.is-active {
  border-color: rgba(166, 215, 247, 0.17);
  color: var(--ice-strong);
  background: var(--ice-soft);
}

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

.device-card {
  overflow: hidden;
  padding: 0;
}

.device-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 22px 18px;
}

.device-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.device-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(166, 215, 247, 0.2);
  border-radius: 12px;
  color: var(--ice-strong);
  background: linear-gradient(145deg, rgba(166, 215, 247, 0.16), rgba(126, 188, 234, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.device-icon > .ui-icon {
  width: 23px;
  height: 23px;
  stroke-width: 2.15;
}

.device-title strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-title > div > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.device-count {
  text-align: right;
}

.device-count strong {
  display: block;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.device-count span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.device-progress {
  height: 3px;
  background: rgba(226, 238, 248, 0.055);
}

.device-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7db8df, #bce3fc);
}

.progress-0 { width: 0 !important; }
.progress-5 { width: 5% !important; }
.progress-10 { width: 10% !important; }
.progress-15 { width: 15% !important; }
.progress-20 { width: 20% !important; }
.progress-25 { width: 25% !important; }
.progress-30 { width: 30% !important; }
.progress-35 { width: 35% !important; }
.progress-40 { width: 40% !important; }
.progress-45 { width: 45% !important; }
.progress-50 { width: 50% !important; }
.progress-55 { width: 55% !important; }
.progress-60 { width: 60% !important; }
.progress-65 { width: 65% !important; }
.progress-70 { width: 70% !important; }
.progress-75 { width: 75% !important; }
.progress-80 { width: 80% !important; }
.progress-85 { width: 85% !important; }
.progress-90 { width: 90% !important; }
.progress-95 { width: 95% !important; }
.progress-100 { width: 100% !important; }

.account-list {
  padding: 9px;
}

.account-row {
  display: grid;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: inherit;
  background: transparent;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.avatar {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ice);
  background: linear-gradient(145deg, #202a34, #11161c);
  font-size: 12px;
  font-weight: 730;
  text-transform: uppercase;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.avatar.is-active::after {
  background: var(--mint);
}

.avatar.is-warning::after {
  background: var(--amber);
}

.avatar.is-error::after {
  background: var(--red);
}

.account-copy {
  min-width: 0;
}

.account-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-result {
  text-align: right;
}

.account-result strong {
  display: block;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.account-result span {
  display: inline-flex;
  margin-top: 4px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 700;
}

.account-result span.is-up {
  color: var(--mint);
  background: var(--mint-soft);
}

.status-badge,
.maturity-badge,
.tag {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
  padding: 0 8px;
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.status-badge.is-active,
.status-badge.is-healthy,
.maturity-badge.is-winner {
  border-color: rgba(119, 214, 167, 0.17);
  color: var(--mint);
  background: var(--mint-soft);
}

.status-badge.is-warning,
.maturity-badge.is-early,
.maturity-badge.is-collecting {
  border-color: rgba(228, 181, 101, 0.16);
  color: var(--amber);
  background: var(--amber-soft);
}

.status-badge.is-error,
.maturity-badge.is-retire {
  border-color: rgba(240, 124, 135, 0.17);
  color: var(--red);
  background: var(--red-soft);
}

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

.select-wrap {
  position: relative;
  min-width: 145px;
}

.select-wrap select {
  width: 100%;
  min-height: 38px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  padding: 0 34px 0 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 620;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

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

.post-card {
  display: grid;
  min-width: 0;
  min-height: 182px;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  background: var(--surface-soft);
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.post-cover {
  position: relative;
  min-height: 182px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(164, 210, 241, 0.16), transparent),
    #151c23;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(220, 239, 251, 0.34);
}

.cover-placeholder svg {
  width: 28px;
  height: 28px;
}

.post-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 17px;
}

.post-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.post-account {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-hook {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0 11px;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-tags {
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.post-tags .tag {
  min-width: 0;
  max-width: calc(50% - 3px);
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-tags .tag:only-child {
  max-width: 100%;
  flex: 0 1 auto;
}

.tag {
  min-height: 20px;
  flex: 0 0 auto;
  border: 0;
  background: rgba(255, 255, 255, 0.035);
  padding: 0 7px;
  font-size: 7px;
}

.post-metrics {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 11px;
}

.post-views strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.post-views span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.lift {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.lift.is-up {
  color: var(--mint);
}

.lift.is-down {
  color: var(--red);
}

.winner-hero {
  display: grid;
  min-height: 264px;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 28px;
  align-items: center;
  padding: 29px;
}

.winner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.winner-kicker svg {
  width: 14px;
  height: 14px;
}

.winner-hero h3 {
  max-width: 680px;
  margin: 17px 0 10px;
  font-size: clamp(23px, 4vw, 36px);
  line-height: 1.13;
  letter-spacing: -0.05em;
}

.winner-hero p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.winner-stat-row {
  display: flex;
  gap: 28px;
  margin-top: 24px;
}

.winner-stat strong {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.winner-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.winner-cover {
  width: 138px;
  height: 210px;
  overflow: hidden;
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: #161c23;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), -12px 12px 0 rgba(166, 215, 247, 0.035);
  transform: rotate(2deg);
}

.winner-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 17px 0 12px;
}

.winner-list {
  gap: 9px;
}

.winner-row {
  display: grid;
  min-height: 82px;
  grid-template-columns: 32px minmax(0, 1fr) repeat(3, minmax(72px, auto));
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 12px 16px;
}

.winner-rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-weight: 750;
}

.winner-name {
  min-width: 0;
}

.winner-name strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.winner-metric {
  text-align: right;
}

.winner-metric strong {
  display: block;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.winner-metric span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.empty-state,
.error-state {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.012);
  padding: 35px;
  text-align: center;
}

.empty-state-icon,
.error-state-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--ice);
  background: var(--ice-soft);
}

.error-state-icon {
  color: var(--red);
  background: var(--red-soft);
}

.empty-state-icon svg,
.error-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state h3,
.error-state h3 {
  margin: 16px 0 5px;
  color: var(--text);
  font-size: 16px;
}

.empty-state p,
.error-state p {
  max-width: 420px;
  margin: 0;
  font-size: 11px;
}

.secondary-button,
.primary-button,
.danger-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-raised);
  padding: 0 15px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
  white-space: nowrap;
}

.secondary-button > svg,
.primary-button > svg,
.danger-button > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.primary-button {
  border-color: rgba(194, 227, 249, 0.22);
  color: #081018;
  background: linear-gradient(135deg, #c7e7fb, #8fc6e9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 26px rgba(82, 143, 185, 0.12);
}

.danger-button {
  border-color: rgba(240, 124, 135, 0.17);
  color: var(--red);
  background: var(--red-soft);
}

.secondary-button:hover,
.primary-button:hover,
.danger-button:hover {
  filter: brightness(1.08);
}

.secondary-button:disabled,
.primary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.error-state .secondary-button,
.empty-state .secondary-button {
  margin-top: 18px;
}

.bottom-nav {
  display: none;
}

.sheet-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(86vh, 850px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  color: var(--text);
  background: #0d1117;
  padding: 0;
  box-shadow: var(--shadow);
}

.sheet-dialog::backdrop {
  background: rgba(2, 4, 7, 0.72);
  backdrop-filter: blur(9px);
}

.sheet-dialog[open] {
  animation: dialog-in 200ms ease both;
}

.sheet-handle {
  display: none;
}

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

.dialog-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.dialog-close {
  border: 0;
  background: rgba(255, 255, 255, 0.035);
}

.dialog-content {
  max-height: calc(min(86vh, 850px) - 84px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 23px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 22px;
}

.detail-cover {
  width: 130px;
  height: 205px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.detail-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.detail-external {
  margin-top: 16px;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 21px;
}

.detail-stat {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 13px;
}

.detail-stat strong {
  display: block;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.detail-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-section {
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 20px;
}

.detail-section h4 {
  margin: 0 0 12px;
  font-size: 12px;
}

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

.metadata-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.metadata-row strong {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 620;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-section + .settings-section {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 23px;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.settings-section-head > div {
  min-width: 0;
  flex: 1 1 180px;
}

.settings-section-head > .secondary-button,
.settings-section-head > .primary-button,
.settings-section-head > .danger-button {
  flex: 0 0 auto;
}

.settings-section h3 {
  margin: 0;
  font-size: 13px;
}

.settings-section p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.settings-provider {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.provider-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  place-items: center;
  border-radius: 11px;
  color: var(--ice);
  background: var(--ice-soft);
}

.provider-icon svg {
  width: 17px;
  height: 17px;
}

.settings-provider > div {
  min-width: 0;
  flex: 1 1 auto;
}

.settings-provider > div > strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-provider > div > span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
}

.provider-status {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.settings-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  padding: 12px 13px;
}

.settings-account strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account > div:first-child {
  min-width: 0;
}

.settings-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.mini-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

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

.mini-button.is-danger:hover {
  border-color: rgba(240, 124, 135, 0.17);
  color: var(--red);
  background: var(--red-soft);
}

.mini-button svg {
  width: 14px;
  height: 14px;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  margin-bottom: 12px;
  padding: 15px;
}

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

.field.is-full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 660;
}

.field small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.field input[readonly] {
  color: var(--muted-strong);
  cursor: not-allowed;
}

.field input,
.field select,
.password-field input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #090c11;
  padding: 0 12px;
  font-size: 12px;
}

.field input::placeholder,
.password-field input::placeholder {
  color: #59636f;
}

.form-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.toast-region {
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(330px, calc(100% - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(17, 22, 29, 0.96);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 620;
  animation: toast-in 220ms ease both;
  backdrop-filter: blur(12px);
}

.toast.is-error {
  border-color: rgba(240, 124, 135, 0.22);
}

.toast .status-dot {
  background: var(--mint);
}

.toast.is-error .status-dot {
  background: var(--red);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 238, 248, 0.04);
  border-radius: var(--radius);
  background: #11151b;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(235, 246, 255, 0.045), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.6s infinite;
}

.skeleton-hero {
  height: 256px;
}

.skeleton-card {
  height: 128px;
}

.skeleton-row {
  height: 112px;
}

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

/* Login */
.login-page {
  overflow-x: hidden;
  background: var(--bg-deep);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(440px, 0.85fr);
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: flex-end;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 62% 27%, rgba(143, 199, 235, 0.14), transparent 17rem),
    radial-gradient(circle at 10% 100%, rgba(121, 177, 213, 0.08), transparent 24rem),
    linear-gradient(145deg, #0d1117, #07090d);
  padding: clamp(44px, 7vw, 90px);
}

.login-story::after {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to top, black, transparent 75%);
  content: "";
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(195, 228, 249, 0.09);
  border-radius: 50%;
}

.orbit-one {
  top: -12vw;
  right: -9vw;
  width: 48vw;
  height: 48vw;
}

.orbit-two {
  top: 2vw;
  right: 4vw;
  width: 22vw;
  height: 22vw;
  box-shadow: 0 0 90px rgba(137, 192, 228, 0.045), inset 0 0 80px rgba(137, 192, 228, 0.025);
}

.login-story-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.login-mark {
  width: 66px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(210, 235, 251, 0.13);
  border-radius: 19px;
  margin-bottom: 32px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.login-story h1 {
  margin: 12px 0 18px;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.login-story-copy > p:not(.eyebrow) {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 1.4vw, 16px);
}

.login-proof {
  display: flex;
  gap: 25px;
  margin-top: 38px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 620;
}

.login-proof span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-proof i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-soft);
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px;
}

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

.login-mobile-logo {
  display: none;
}

.login-card h2 {
  margin: 11px 0 8px;
  font-size: 31px;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.login-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.password-field {
  position: relative;
  margin-top: 7px;
}

.password-field input {
  min-height: 51px;
  border-color: var(--line-strong);
  padding-right: 50px;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.password-field input:focus {
  border-color: rgba(166, 215, 247, 0.36);
  outline: 0;
  box-shadow: 0 0 0 4px var(--ice-soft);
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-field button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.password-field svg {
  width: 18px;
  height: 18px;
}

.password-field.is-visible .eye-open,
.password-field:not(.is-visible) .eye-closed {
  display: none;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px 0 20px;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 11px;
}

.remember-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.remember-row input:focus-visible + .custom-check {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.custom-check {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.custom-check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  stroke-width: 2.5;
}

.remember-row input:checked + .custom-check {
  border-color: transparent;
  color: #071019;
  background: var(--ice);
}

.remember-row input:checked + .custom-check svg {
  opacity: 1;
}

.login-button {
  width: 100%;
  min-height: 50px;
  font-size: 12px;
}

.login-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-left: auto;
}

.login-button.is-loading span::after {
  content: "…";
}

.form-error {
  border: 1px solid rgba(240, 124, 135, 0.15);
  border-radius: 10px;
  color: #f4a4ac;
  background: var(--red-soft);
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 10px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 0;
  color: #626d79;
  font-size: 9px;
}

.privacy-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@media (max-width: 1050px) {
  :root { --sidebar: 210px; }
  .hero-grid { grid-template-columns: 1fr; }
  .mission-card { min-height: 190px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 84% -8%, rgba(107, 157, 193, 0.1), transparent 19rem),
      var(--bg);
  }

  body.is-offline .app-shell {
    padding-top: 34px;
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding-bottom: calc(76px + var(--safe-bottom));
  }

  .topbar {
    min-height: 70px;
    gap: 12px;
    padding: 10px 15px;
  }

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

  .mobile-brand img {
    width: 37px;
    height: 37px;
    border-radius: 11px;
  }

  .mobile-brand > div {
    min-width: 0;
  }

  .mobile-brand h1 {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-title,
  .range-control,
  .topbar .sync-pill {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .view-content {
    padding: 23px 15px 28px;
  }

  .mobile-range {
    display: inline-flex;
    width: 100%;
    margin-bottom: 18px;
  }

  .mobile-range button {
    min-height: 44px;
    flex: 1;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .secondary-button,
  .primary-button,
  .danger-button,
  .chip,
  .device-mini {
    min-height: 44px;
  }

  .mini-button {
    width: 44px;
    height: 44px;
  }

  .section-head {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .hero-grid,
  .content-grid {
    gap: 11px;
  }

  .daily-card {
    min-height: 246px;
    padding: 23px 20px;
  }

  .daily-number {
    margin-top: 17px;
    font-size: 58px;
  }

  .daily-state {
    padding: 6px 8px;
    font-size: 8px;
  }

  .fleet-progress {
    margin-top: 31px;
  }

  .device-mini-grid {
    gap: 5px;
  }

  .device-mini span {
    font-size: 10px;
  }

  .device-mini strong {
    font-size: 11px;
  }

  .mission-card {
    min-height: 172px;
    padding: 21px;
  }

  .mission-card h3 {
    margin-top: 12px;
    font-size: 17px;
  }

  .metric-grid {
    gap: 9px;
    margin-top: 11px;
  }

  .metric-card {
    min-height: 118px;
    padding: 17px;
  }

  .metric-value {
    margin-top: 15px;
    font-size: 28px;
  }

  .panel {
    padding: 19px;
  }

  .post-strip {
    display: flex;
    overflow-x: auto;
    margin-right: -19px;
    padding-right: 19px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .post-strip::-webkit-scrollbar { display: none; }

  .post-tile {
    width: 150px;
    flex: 0 0 150px;
    scroll-snap-align: start;
  }

  .post-tile-cover {
    height: 178px;
  }

  .trend-chart {
    height: 145px;
  }

  .device-stack {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .device-card-head {
    padding: 17px 18px 15px;
  }

  .post-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .post-list {
    gap: 9px;
  }

  .post-card {
    min-height: 170px;
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .post-cover {
    min-height: 170px;
  }

  .post-card-body {
    padding: 14px;
  }

  .winner-hero {
    min-height: 255px;
    grid-template-columns: minmax(0, 1fr) 97px;
    gap: 15px;
    padding: 22px;
  }

  .winner-cover {
    width: 90px;
    height: 150px;
    border-radius: 12px;
  }

  .winner-hero h3 {
    margin-top: 12px;
    font-size: 23px;
  }

  .winner-stat-row {
    gap: 16px;
    margin-top: 17px;
  }

  .winner-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .winner-row .winner-metric:nth-of-type(2),
  .winner-row .winner-metric:nth-of-type(3) {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(67px + var(--safe-bottom));
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(9, 12, 16, 0.92);
    padding: 5px 8px var(--safe-bottom);
    backdrop-filter: blur(24px) saturate(135%);
  }

  .bottom-nav .nav-item {
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: 10px;
    padding: 0;
    font-size: 10px;
  }

  .bottom-nav .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .bottom-nav .nav-item.is-active::after {
    position: absolute;
    top: 2px;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ice);
    content: "";
  }

  .sheet-dialog {
    width: 100%;
    max-width: none;
    max-height: 91vh;
    max-height: 91dvh;
    inset: auto 0 0;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    margin: auto 0 0;
  }

  .sheet-dialog[open] {
    animation: sheet-in 250ms ease both;
  }

  .sheet-handle {
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: rgba(230, 240, 247, 0.17);
    margin: 8px auto 0;
  }

  .dialog-head {
    padding: 15px 17px;
  }

  .dialog-content {
    max-height: calc(91vh - 76px);
    max-height: calc(91dvh - 76px);
    padding: 17px 17px calc(24px + var(--safe-bottom));
  }

  .detail-hero {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 15px;
  }

  .detail-cover {
    width: 98px;
    height: 163px;
  }

  .detail-copy h3 {
    font-size: 16px;
  }

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

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

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

  .settings-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .field.is-full,
  .form-actions {
    grid-column: auto;
  }

  .toast-region {
    right: 16px;
    bottom: calc(80px + var(--safe-bottom));
    left: 16px;
    width: auto;
  }

  .login-shell {
    display: block;
  }

  .login-story {
    display: none;
  }

  .login-panel {
    min-height: 100svh;
    align-items: center;
    padding: 28px 22px;
    background:
      radial-gradient(circle at 90% 4%, rgba(136, 191, 226, 0.12), transparent 18rem),
      var(--bg-deep);
  }

  .login-card {
    width: 100%;
    max-width: 390px;
  }

  .password-field button {
    right: 4px;
    width: 44px;
    height: 44px;
  }

  .remember-row {
    min-height: 44px;
  }

  .login-mobile-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 55px;
  }

  .login-card h2 {
    font-size: 30px;
  }
}

@media (max-width: 390px) {
  .daily-number { font-size: 52px; }
  .daily-state { display: none; }
  .metric-card { padding: 15px; }
  .metric-label { font-size: 9px; }
  .post-card { grid-template-columns: 92px minmax(0, 1fr); }
  .winner-hero { grid-template-columns: 1fr; }
  .winner-cover { display: none; }
  .settings-section-head [data-account-add],
  [data-logout] { width: 100%; }
  .form-actions > button { min-width: 0; flex: 1 1 0; }
}

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

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
