:root {
  --ink: #123142;
  --muted: #6c8490;
  --line: #d7e8eb;
  --surface: rgba(255, 255, 255, 0.82);
  --water: #1da8c7;
  --mint: #35c792;
  --coral: #ff7a6b;
  --sun: #f6b94d;
  --deep: #102a3a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(53, 199, 146, 0.16), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(29, 168, 199, 0.12), transparent 24%),
    linear-gradient(135deg, #f2fbfb 0%, #f8fcff 42%, #fff9ed 100%);
}

.app-shell {
  width: min(1680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar,
.panel-heading,
.status-card,
.metric-card,
.leaderboard li,
.feed li {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--water);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
}

h2 {
  font-size: 19px;
}

.subhead {
  margin-top: 10px;
  color: var(--muted);
}

.status-card,
.metric-card,
.panel,
.week-control-panel {
  border: 1px solid rgba(215, 232, 235, 0.85);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 60px rgba(16, 42, 58, 0.08);
  backdrop-filter: blur(14px);
}

.status-card {
  min-width: 230px;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
}

.auth-card {
  min-width: 260px;
  justify-content: space-between;
}

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

.auth-actions .ghost-button {
  height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.search-launch-button,
.search-close-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  cursor: pointer;
}

.search-launch-button {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  background: rgba(29, 168, 199, 0.14);
  box-shadow: 0 10px 28px rgba(29, 168, 199, 0.2);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.search-launch-button:hover,
.search-launch-button:focus-visible {
  border-color: var(--water);
  background: rgba(29, 168, 199, 0.24);
  box-shadow: 0 0 0 3px rgba(29, 168, 199, 0.12), 0 12px 32px rgba(29, 168, 199, 0.28);
  outline: none;
  transform: translateY(-1px);
}

.search-glyph {
  display: block;
  width: 26px;
  height: 26px;
  background: currentColor;
  -webkit-mask: url("./assets/search-icon-custom.png") center / contain no-repeat;
  mask: url("./assets/search-icon-custom.png") center / contain no-repeat;
}

.search-glyph::after {
  content: none;
}

.dashboard-main-tabs {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 6px;
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 16, 28, 0.96);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  padding: 6px;
  backdrop-filter: blur(16px);
}

.dashboard-tab-button {
  min-width: 120px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-tab-button:hover,
.dashboard-tab-button:focus-visible {
  border-color: rgba(29, 168, 199, 0.36);
  background: rgba(29, 168, 199, 0.1);
  color: var(--deep);
  outline: none;
}

.dashboard-tab-button.active {
  border-color: rgba(29, 168, 199, 0.54);
  background: rgba(29, 168, 199, 0.18);
  color: var(--deep);
  box-shadow: inset 0 0 0 1px rgba(29, 168, 199, 0.16);
}

.task-workspace-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.battle-workspace-tabs {
  margin-bottom: 16px;
}

.task-workspace-tab {
  min-width: 112px;
  height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.task-workspace-tab:hover,
.task-workspace-tab:focus-visible {
  color: var(--ink);
  outline: none;
}

.task-workspace-tab.active {
  border-bottom-color: var(--water);
  color: var(--ink);
}

.status-label,
.metric-card p,
.metric-card span,
small {
  color: var(--muted);
}

.pulse,
.drop-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 6px;
  background: var(--water);
  transform: rotate(45deg);
}

.pulse {
  box-shadow: 0 0 0 6px rgba(29, 168, 199, 0.13);
}

.metrics-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.overview-activity-panel {
  margin-bottom: 16px;
}

.overview-activity-heading {
  align-items: center;
}

.overview-activity-status {
  border: 1px solid rgba(255, 189, 92, 0.36);
  border-radius: 999px;
  background: rgba(255, 189, 92, 0.1);
  color: #ffe0a3;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
}

.overview-activity-pending {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.overview-activity-pending strong {
  color: var(--deep);
  font-size: 15px;
}

.metric-card,
.panel,
.week-control-panel {
  border-radius: 8px;
}

.week-control-panel {
  margin-bottom: 16px;
  padding: 18px;
}

.week-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.week-buttons {
  margin-bottom: 12px;
}

.battle-timeline-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.26fr) minmax(260px, 1fr) minmax(260px, 0.34fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 12px 14px;
  text-align: left;
}

.battle-timeline-meta,
.battle-timeline-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.battle-timeline-meta {
  flex-direction: column;
  align-items: flex-start;
}

.battle-timeline-meta strong {
  color: var(--deep);
  font-size: 15px;
}

.battle-timeline-meta small,
.battle-timeline-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.battle-timeline-track {
  position: relative;
  display: block;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(29, 168, 199, 0.18);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(16, 42, 58, 0.08) 0 1px, transparent 1px 14px),
    rgba(16, 42, 58, 0.05);
}

.battle-timeline-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--water), var(--mint));
  box-shadow: 0 0 18px rgba(29, 168, 199, 0.28);
}

.battle-timeline-row.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.18);
}

.week-buttons.battle-timeline-mode {
  display: block;
  overflow-x: auto;
  padding-bottom: 4px;
}

.battle-timeline-board {
  min-width: 720px;
}

.battle-timeline-axis {
  position: relative;
  height: 28px;
  margin: 0 8px 8px;
  border-bottom: 1px solid rgba(29, 168, 199, 0.2);
}

.battle-timeline-tick {
  position: absolute;
  bottom: -1px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  transform: translateX(-50%);
}

.battle-timeline-tick i {
  width: 1px;
  height: 8px;
  background: rgba(29, 168, 199, 0.4);
}

.battle-timeline-tick b {
  font: inherit;
}

.battle-overlap-timeline {
  position: relative;
  min-height: var(--timeline-height);
  overflow: hidden;
  border: 1px solid rgba(29, 168, 199, 0.18);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(16, 42, 58, 0.08) 0 1px, transparent 1px 44px),
    rgba(16, 42, 58, 0.04);
}

.battle-timeline-empty {
  display: grid;
  min-height: var(--timeline-height);
  place-items: center;
}

.battle-timeline-bar-button {
  position: absolute;
  top: var(--battle-top);
  left: var(--battle-left);
  z-index: var(--battle-z);
  display: grid;
  align-content: center;
  width: var(--battle-width);
  max-width: calc(100% - var(--battle-left));
  min-width: 96px;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid var(--battle-color);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--battle-color), rgba(18, 49, 66, 0.9));
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  padding: 6px 10px;
  text-align: left;
  box-shadow: 0 12px 24px rgba(16, 42, 58, 0.16);
  transition:
    box-shadow 0.18s ease,
    filter 0.18s ease,
    transform 0.18s ease;
}

.battle-timeline-bar-button strong,
.battle-timeline-bar-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-timeline-bar-button strong {
  font-size: 12px;
  line-height: 1.1;
}

.battle-timeline-bar-button span {
  font-size: 11px;
  font-weight: 900;
  opacity: 0.88;
}

.battle-bar-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.battle-bar-meta b {
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-bar-meta i {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.battle-timeline-bar-button.active {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
  z-index: 10;
}

.battle-timeline-bar-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(16, 42, 58, 0.2);
}

.week-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 8px 11px;
  text-align: left;
}

.week-button strong,
.week-button span {
  display: block;
}

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

.week-button.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.18);
}

.metric-card {
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
}

.metric-card-clickable {
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.metric-card-clickable:hover,
.metric-card-clickable:focus-visible,
.metric-card-clickable.is-expanded {
  border-color: rgba(29, 168, 199, 0.5);
  box-shadow: 0 18px 60px rgba(16, 42, 58, 0.08), inset 0 0 0 2px rgba(29, 168, 199, 0.14);
  outline: none;
}

.metric-card-clickable:hover {
  transform: translateY(-1px);
}

.metric-card strong {
  font-size: 34px;
}

.metric-value-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-pill {
  border-radius: 999px;
  background: rgba(246, 185, 77, 0.2);
  color: #7a5300;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.dashboard-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.panel {
  padding: 20px;
  overflow: hidden;
}

.panel.wide {
  grid-column: span 1;
}

.panel.popularity-browser,
.panel.category-browser,
.panel.task-archive-browser,
.panel.retention-browser,
.panel.analytics-snapshot,
.panel.battle-rate-browser,
.panel.interaction-browser,
.panel.explore-review-browser,
.panel.review-quality-browser,
.panel.water-economy-browser {
  grid-column: 1 / -1;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.ghost-button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.search-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.search-dialog::backdrop {
  background: rgba(0, 8, 16, 0.74);
  backdrop-filter: blur(5px);
}

.search-dialog-surface {
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 16, 28, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  padding: 20px;
}

.search-dialog .panel-heading {
  margin-bottom: 14px;
}

.search-dialog .search-tabs {
  margin-bottom: 12px;
}

.search-close-button {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.search-close-button:hover,
.search-close-button:focus-visible {
  border-color: var(--water);
  background: rgba(29, 168, 199, 0.14);
  outline: none;
}

.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.retention-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.search-tabs .ghost-button {
  padding: 0 14px;
}

.retention-mode-tabs .ghost-button,
.search-tabs .ghost-button {
  padding: 0 14px;
}

.retention-mode-tabs .ghost-button.active,
.search-tabs .ghost-button.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.18);
}

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

.retention-day-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.retention-day-search {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px) 38px 38px;
  align-items: center;
  gap: 8px;
}

.retention-day-search label {
  color: var(--deep);
  font-size: 12px;
  font-weight: 850;
}

.retention-day-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep);
  font: inherit;
  outline: none;
  padding: 0 11px;
}

.retention-day-search input:focus {
  border-color: rgba(29, 168, 199, 0.62);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.16);
}

.retention-day-search-button,
.retention-day-clear-button,
.retention-cohort-close-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 168, 199, 0.12);
  color: var(--deep);
  cursor: pointer;
}

.retention-day-search-button .search-glyph {
  width: 22px;
  height: 22px;
}

.retention-day-clear-button,
.retention-cohort-close-button {
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.retention-day-search-button:hover,
.retention-day-search-button:focus-visible,
.retention-day-clear-button:hover,
.retention-day-clear-button:focus-visible,
.retention-cohort-close-button:hover,
.retention-cohort-close-button:focus-visible {
  border-color: var(--water);
  outline: none;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.battle-timeline-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  margin: 0 0 14px;
}

#dashboardSearchInput {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 13px;
}

.battle-timeline-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 13px;
}

#dashboardSearchInput:focus,
.battle-timeline-search input:focus {
  border-color: rgba(29, 168, 199, 0.62);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.16);
}

#dashboardSearchInput::placeholder,
.battle-timeline-search input::placeholder {
  color: var(--muted);
}

.search-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.search-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.search-result-card strong,
.search-result-card small,
.search-result-card p {
  display: block;
  overflow-wrap: anywhere;
}

.search-result-card strong {
  color: var(--deep);
}

.search-result-card small,
.search-result-card p {
  color: var(--muted);
  font-size: 12px;
}

.search-result-card p {
  margin-top: 6px;
}

.user-search-result-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2.3fr);
  align-items: start;
}

.search-user-overview {
  min-width: 0;
}

.search-user-battles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.search-user-battle-button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 18, 31, 0.78);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 10px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.search-user-battle-button:hover,
.search-user-battle-button:focus-visible {
  border-color: rgba(40, 230, 255, 0.52);
  background: rgba(7, 38, 54, 0.86);
  box-shadow: var(--glow-cyan);
  outline: none;
  transform: translateY(-1px);
}

.search-user-battle-button strong,
.search-user-battle-button small,
.search-user-battle-button span {
  display: block;
  overflow-wrap: anywhere;
}

.search-user-battle-button small,
.search-user-battle-button span {
  color: var(--muted);
  font-size: 11px;
}

.search-result-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.search-result-actions .ghost-button {
  height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.analytics-snapshot {
  margin-bottom: 16px;
}

.retention-browser {
  margin-bottom: 16px;
}

.analytics-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.analytics-metric-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.analytics-metric-grid span,
.analytics-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analytics-metric-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--deep);
  font-size: 28px;
  line-height: 1;
}

.analytics-snapshot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 16px;
  margin-top: 16px;
}

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

.analytics-section-head h3 {
  margin: 0;
  color: var(--deep);
  font-size: 16px;
}

.analytics-dau-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  align-items: end;
  gap: 9px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.analytics-dau-day {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
  height: 166px;
}

.analytics-dau-bar {
  width: min(32px, 100%);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--water), var(--mint));
  box-shadow: 0 0 20px rgba(40, 230, 255, 0.2);
}

.analytics-dau-day strong {
  color: var(--deep);
  font-size: 12px;
}

.analytics-dau-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

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

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

.analytics-event-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-event-row strong {
  color: var(--water);
}

.bar-list,
.feed,
.leaderboard {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.popularity-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
}

.popular-list {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: 650px;
  overflow: auto;
  padding-right: 6px;
}

.popular-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
  padding: 10px;
  text-align: left;
}

.popular-button.active {
  border-color: rgba(29, 168, 199, 0.45);
  background: rgba(29, 168, 199, 0.13);
}

.popular-main {
  min-width: 0;
}

.popular-main strong,
.popular-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-button > b {
  color: var(--water);
  font-size: 22px;
}

.battle-rate-chart {
  display: grid;
  gap: 14px;
}

.battle-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.battle-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.battle-chart-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--battle-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3px rgba(16, 42, 58, 0.08);
}

.daily-battle-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 10px;
}

.daily-battle-plot {
  width: 100%;
}

.daily-battle-canvas {
  height: 282px;
}

.daily-battle-canvas {
  position: relative;
  margin-bottom: 0;
}

.daily-battle-columns {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  height: 100%;
}

.daily-battle-column {
  display: grid;
  grid-template-rows: 1fr 24px;
  gap: 8px;
  min-width: 0;
  height: 100%;
}

.daily-battle-column > strong {
  align-self: center;
  color: var(--deep);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.daily-battle-column-stage {
  display: flex;
  box-sizing: border-box;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  height: 250px;
  padding-top: 24px;
}

.daily-battle-vertical-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex: 1 1 0;
  justify-content: center;
  max-width: 42px;
  min-width: 18px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.daily-battle-vertical-bar > span {
  position: absolute;
  bottom: calc(var(--bar-height) + 7px);
  left: 50%;
  z-index: 2;
  color: var(--deep);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.daily-battle-vertical-bar.over-capacity > span {
  color: #ffb38a;
}

.daily-battle-vertical-bar.over-capacity > i {
  background: #ff7a6b;
  box-shadow: 0 0 18px rgba(255, 122, 107, 0.32);
}

.daily-battle-vertical-bar > i {
  display: block;
  width: min(28px, 78%);
  height: var(--bar-height);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: var(--battle-color);
  box-shadow: 0 0 18px rgba(40, 230, 255, 0.24);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.daily-battle-vertical-bar:hover > i,
.daily-battle-vertical-bar:focus-visible > i {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

.daily-battle-vertical-bar:focus-visible {
  outline: 2px solid rgba(40, 230, 255, 0.58);
  outline-offset: 2px;
}

.daily-battle-vertical-bar > .empty-slot {
  width: min(28px, 78%);
  height: 100%;
  min-height: 0;
  border: 1px dashed rgba(143, 182, 194, 0.25);
  border-radius: 6px 6px 2px 2px;
  background: transparent;
  box-shadow: none;
}

.daily-battle-vertical-bar.future > .empty-slot {
  border-color: rgba(143, 182, 194, 0.16);
}

.daily-battle-vertical-bar.unpublished > span,
.daily-battle-vertical-bar.unavailable > span {
  bottom: 8px;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.interaction-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.interaction-chart-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 15, 27, 0.6);
  padding: 3px;
}

.interaction-chart-mode {
  height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.interaction-chart-mode:hover,
.interaction-chart-mode:focus-visible,
.interaction-chart-mode.active {
  background: rgba(40, 230, 255, 0.14);
  color: var(--ink);
  outline: none;
}

.interaction-chart-mode.active {
  box-shadow: inset 0 0 0 1px rgba(40, 230, 255, 0.28);
}

.interaction-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.interaction-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.interaction-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.interaction-comparison-chart {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.interaction-comparison-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(260px, 1fr) 72px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.interaction-comparison-row > button {
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interaction-comparison-row > button:hover,
.interaction-comparison-row > button:focus-visible {
  color: var(--water);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.interaction-comparison-row > strong {
  color: var(--water);
  font-size: 14px;
  text-align: right;
}

.interaction-stack-track {
  height: 24px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(143, 182, 194, 0.12);
}

.interaction-stack {
  display: flex;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
  transition: width 0.2s ease;
}

.interaction-stack > span {
  display: block;
  height: 100%;
  min-width: 0;
}

.interaction-stack > span:hover {
  filter: brightness(1.2);
}

.interaction-segment-approve {
  background: #28dca4;
}

.interaction-segment-reject {
  background: #ff6d7a;
}

.interaction-segment-review {
  background: #ffd166;
}

.interaction-segment-comment {
  background: #28e6ff;
}

.interaction-segment-reaction {
  background: #8d79ff;
}

.interaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.explore-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  margin-bottom: 18px;
  border-block: 1px solid var(--line);
}

.explore-metric-grid > article {
  min-width: 0;
  min-height: 116px;
  border-right: 1px solid var(--line);
  padding: 18px 42px 18px 14px;
}

.explore-metric-grid > article:last-child {
  border-right: 0;
}

.explore-metric-grid span,
.explore-metric-grid strong {
  display: block;
}

.explore-metric-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.explore-metric-grid strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.explore-review-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 0.75fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
}

.explore-review-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.explore-review-controls input,
.explore-review-controls select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.explore-review-controls input:focus,
.explore-review-controls select:focus {
  border-color: rgba(40, 230, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(40, 230, 255, 0.1);
  outline: none;
}

.explore-scope-section {
  margin-bottom: 22px;
}

.explore-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.explore-section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.explore-section-heading strong {
  color: var(--water);
  font-size: 12px;
}

.explore-scope-comparison {
  display: grid;
  gap: 8px;
}

.explore-scope-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(260px, 1fr) 70px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 5px 0 10px;
}

.explore-scope-result-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.explore-scope-result-counts span {
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 5px;
}

.explore-scope-result-counts .is-approved {
  background: rgba(52, 211, 153, 0.12);
  color: #64e6b4;
}

.explore-scope-result-counts .is-rejected {
  background: rgba(251, 113, 133, 0.12);
  color: #ff8fa1;
}

.explore-scope-row > div:first-child strong,
.explore-scope-row > div:first-child small {
  display: block;
}

.explore-scope-row > div:first-child strong {
  color: var(--ink);
  font-size: 12px;
}

.explore-scope-row > div:first-child small {
  margin-top: 3px;
}

.explore-scope-row > strong {
  color: var(--water);
  font-size: 13px;
  text-align: right;
}

.explore-scope-track {
  height: 22px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(143, 182, 194, 0.12);
}

.explore-scope-stack {
  display: flex;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
}

.explore-scope-stack > span {
  display: block;
  min-width: 0;
}

.explore-review-table-wrap {
  max-height: 600px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.explore-review-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.explore-review-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(5, 24, 38, 0.98);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.explore-review-table th,
.explore-review-table td {
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 10px 12px;
  vertical-align: middle;
}

.explore-review-table tbody tr {
  background: rgba(4, 18, 31, 0.58);
}

.explore-review-table tbody tr:hover {
  background: rgba(7, 38, 54, 0.86);
}

.explore-review-table td:nth-child(2) {
  min-width: 250px;
}

.explore-review-table td:nth-child(2) strong,
.explore-review-table td:nth-child(2) small {
  display: block;
}

.explore-review-table td:nth-child(2) strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.explore-review-table td:nth-child(2) small {
  margin-top: 3px;
}

.explore-vote-pair {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

.explore-vote-number {
  min-width: 14px;
  font-size: 13px;
  text-align: center;
}

.explore-vote-number.approve {
  color: #28dca4;
}

.explore-vote-number.reject {
  color: #ff6d7a;
}

.explore-vote-divider {
  color: rgba(189, 212, 220, 0.42);
}

.explore-source-link {
  border: 0;
  background: transparent;
  color: var(--water);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.explore-source-link:hover,
.explore-source-link:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.review-quality-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border-block: 1px solid var(--line);
}

.review-quality-metric-grid > article {
  min-width: 0;
  min-height: 112px;
  border-right: 1px solid var(--line);
  padding: 18px 44px 18px 14px;
}

.review-quality-metric-grid > article:last-child {
  border-right: 0;
}

.review-quality-metric-grid span,
.review-quality-metric-grid strong {
  display: block;
}

.review-quality-metric-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.review-quality-metric-grid strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.review-quality-metric-card-clickable {
  cursor: pointer;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.review-quality-metric-card-clickable:hover,
.review-quality-metric-card-clickable:focus-visible {
  background: rgba(7, 35, 47, 0.98);
  box-shadow: inset 0 -3px 0 rgba(40, 230, 255, 0.72);
  outline: none;
}

.review-quality-notice {
  margin-bottom: 16px;
  border-left: 3px solid var(--sun);
  background: rgba(255, 209, 102, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  padding: 10px 12px;
}

.review-quality-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.review-quality-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.review-quality-controls input,
.review-quality-controls select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.review-quality-controls input:focus,
.review-quality-controls select:focus {
  border-color: rgba(40, 230, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(40, 230, 255, 0.1);
  outline: none;
}

.review-quality-table-wrap {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-quality-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 12px;
}

.review-quality-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(5, 24, 38, 0.98);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.review-quality-table th,
.review-quality-table td {
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 10px 12px;
  vertical-align: middle;
}

.review-quality-table tbody tr {
  background: rgba(4, 18, 31, 0.58);
}

.review-quality-table tbody tr:hover {
  background: rgba(7, 38, 54, 0.86);
}

.review-quality-table td:first-child {
  min-width: 150px;
}

.review-quality-table td:nth-child(5),
.review-quality-table td:last-child {
  min-width: 190px;
}

.review-quality-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
}

.review-quality-status.needs-review {
  border-color: rgba(255, 109, 122, 0.45);
  background: rgba(255, 109, 122, 0.14);
  color: #ffb1b8;
}

.review-quality-status.observing {
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.12);
  color: #ffe39b;
}

.review-quality-status.normal {
  border-color: rgba(40, 220, 164, 0.4);
  background: rgba(40, 220, 164, 0.12);
  color: #9ff3d5;
}

.review-quality-status.insufficient {
  border-color: rgba(143, 182, 194, 0.32);
  background: rgba(143, 182, 194, 0.1);
  color: #b9d0d8;
}

.review-quality-reason {
  display: block;
  max-width: 260px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.water-ledger-notice {
  margin-bottom: 18px;
  border-left: 3px solid var(--sun);
  background: rgba(255, 209, 102, 0.09);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 12px;
}

.water-ledger-notice[data-status="available"] {
  border-left-color: var(--mint);
  background: rgba(45, 210, 164, 0.08);
}

.water-economy-controls {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  align-items: end;
  justify-content: start;
  gap: 10px;
  margin-bottom: 20px;
}

.water-economy-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.water-economy-controls input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.water-economy-controls input:focus {
  border-color: rgba(40, 230, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(40, 230, 255, 0.1);
  outline: none;
}

.water-economy-section + .water-economy-section {
  margin-top: 24px;
}

.water-economy-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.water-economy-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}

.water-economy-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(5, 24, 38, 0.98);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.water-economy-table th,
.water-economy-table td {
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 10px 12px;
  vertical-align: middle;
}

.water-economy-table tbody tr {
  background: rgba(4, 18, 31, 0.58);
}

.water-economy-table tbody tr:hover {
  background: rgba(7, 38, 54, 0.86);
}

.water-balance-value,
.water-transaction-table td:nth-child(5) strong {
  color: var(--water);
  font-size: 15px;
}

.user-profile-water-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  margin-bottom: 18px;
}

.user-profile-water-summary article {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 14px;
}

.user-profile-water-summary article:last-child {
  border-right: 0;
}

.user-profile-water-summary span,
.user-profile-water-summary strong {
  display: block;
}

.user-profile-water-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.user-profile-water-summary strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 22px;
}

.user-profile-water-summary article > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.user-profile-water-summary [data-spend-source="ownership-estimate"] strong {
  color: #ffd166;
}

.user-profile-water-summary [data-spend-source="ledger"] strong {
  color: var(--water);
}

.user-profile-asset-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.user-profile-asset-group {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.user-profile-asset-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.user-profile-asset-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-profile-asset-group span {
  max-width: 100%;
  border: 1px solid rgba(40, 230, 255, 0.2);
  border-radius: 4px;
  background: rgba(40, 230, 255, 0.07);
  color: var(--ink);
  font-size: 11px;
  overflow-wrap: anywhere;
  padding: 5px 7px;
}

.user-profile-purchase-history {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.user-profile-purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 10px 0;
}

.user-profile-purchase-row strong,
.user-profile-purchase-row small {
  display: block;
}

.user-profile-purchase-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.user-profile-purchase-row b {
  color: var(--coral);
  white-space: nowrap;
}

.interaction-row {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(215, 232, 235, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

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

.interaction-head strong,
.interaction-head small {
  display: block;
  overflow-wrap: anywhere;
}

.interaction-head small,
.interaction-reviewers {
  color: var(--muted);
  font-size: 12px;
}

.interaction-reviewers,
.search-task-submitters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.user-profile-link {
  display: inline;
  border: 0;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0;
  line-height: inherit;
  padding: 0;
  text-align: left;
}

.user-profile-link:hover,
.user-profile-link:focus-visible {
  color: var(--water);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-profile-link.compact {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-user-profile-link {
  font-size: 17px;
}

.interaction-head b {
  color: var(--water);
  font-size: 28px;
  line-height: 1;
}

.interaction-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 42, 58, 0.08);
}

.interaction-meter span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sun), var(--coral));
}

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

.interaction-stats span {
  border-radius: 8px;
  background: rgba(16, 42, 58, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 8px;
}

.interaction-stats strong {
  display: block;
  color: var(--deep);
  font-size: 17px;
}

@media (max-width: 1100px) {
  .review-quality-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-quality-metric-grid > article:nth-child(2n) {
    border-right: 0;
  }

  .review-quality-metric-grid > article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .explore-metric-grid > article:nth-child(3n) {
    border-right: 0;
  }

  .explore-metric-grid > article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .explore-review-controls {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .explore-review-search {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .review-quality-metric-grid {
    grid-template-columns: 1fr;
  }

  .review-quality-metric-grid > article,
  .review-quality-metric-grid > article:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .review-quality-metric-grid > article:last-child {
    border-bottom: 0;
  }

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

  .interaction-chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .interaction-comparison-chart {
    overflow-x: auto;
  }

  .interaction-comparison-row {
    grid-template-columns: 110px minmax(260px, 1fr) 58px;
    min-width: 470px;
  }

  .explore-scope-comparison {
    overflow-x: auto;
  }

  .explore-scope-row {
    grid-template-columns: 110px minmax(240px, 1fr) 58px;
    min-width: 450px;
  }

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

  .explore-metric-grid > article:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .explore-metric-grid > article:nth-child(2n) {
    border-right: 0;
  }

  .explore-metric-grid > article:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

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

  .explore-review-search {
    grid-column: auto;
  }

  .water-economy-controls {
    grid-template-columns: 1fr;
  }

  .user-profile-water-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-profile-water-summary article {
    border-bottom: 1px solid var(--line);
  }

  .user-profile-water-summary article:nth-child(2n) {
    border-right: 0;
  }

  .user-profile-water-summary article:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .user-profile-water-summary article:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

/* Overview activity KPIs */
.panel.overview-activity-panel {
  overflow: visible;
}

.overview-activity-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.overview-activity-card {
  min-width: 0;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  background: rgba(3, 15, 27, 0.96);
  padding: 16px 42px 16px 16px;
}

.overview-activity-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-activity-card > strong {
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 0 22px rgba(40, 230, 255, 0.28);
}

.overview-activity-card > small {
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.overview-activity-card-clickable {
  cursor: pointer;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.overview-activity-card-clickable:hover,
.overview-activity-card-clickable:focus-visible,
.overview-activity-card-clickable.is-expanded {
  background: rgba(7, 35, 47, 0.98);
  box-shadow: inset 0 -3px 0 rgba(40, 230, 255, 0.72);
  outline: none;
}

.overview-activity-detail {
  border-bottom: 1px solid var(--line);
  background: rgba(2, 12, 23, 0.72);
  padding: 18px;
}

.overview-activity-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview-activity-detail-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
}

.overview-activity-detail-close {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(4, 18, 31, 0.88);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.overview-activity-detail-close:hover,
.overview-activity-detail-close:focus-visible {
  border-color: var(--water);
  outline: none;
}

.overview-activity-detail-summary {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.overview-activity-trend {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 52px;
  align-items: end;
  gap: 7px;
  min-height: 198px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}

.overview-activity-trend-day {
  display: grid;
  grid-template-rows: 24px 132px 18px;
  align-items: end;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.overview-activity-trend-day-clickable {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.overview-activity-trend-day-clickable:hover,
.overview-activity-trend-day-clickable:focus-visible {
  background: rgba(40, 230, 255, 0.08);
  outline: 1px solid rgba(40, 230, 255, 0.52);
}

.overview-activity-trend-day-clickable.is-selected {
  background: rgba(40, 230, 255, 0.12);
  box-shadow: inset 0 -2px 0 var(--water);
}

.overview-activity-trend-day-clickable.is-selected
  .overview-activity-trend-track
  span {
  background: linear-gradient(180deg, #ffffff, var(--water));
  box-shadow: 0 0 18px rgba(40, 230, 255, 0.45);
}

.overview-activity-trend-day strong {
  color: #ffffff;
  font-size: 12px;
}

.overview-activity-trend-track {
  position: relative;
  display: flex;
  height: 132px;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(40, 230, 255, 0.28);
}

.overview-activity-trend-track span {
  display: block;
  width: 26px;
  min-height: 5px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--mint), var(--water));
  box-shadow: 0 0 16px rgba(40, 230, 255, 0.2);
}

.overview-activity-trend-day small {
  color: var(--muted);
  font-size: 10px;
}

.overview-activity-users {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.overview-activity-users-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.overview-activity-users-heading div {
  display: grid;
  gap: 3px;
}

.overview-activity-users-heading h4 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

.overview-activity-users-heading small {
  color: var(--muted);
  font-size: 11px;
}

.overview-activity-users-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.overview-activity-users-actions > strong {
  color: var(--water);
  font-size: 14px;
  line-height: 34px;
  white-space: nowrap;
}

.overview-dau-date-picker {
  display: grid;
  gap: 4px;
}

.overview-dau-date-picker span {
  color: var(--muted);
  font-size: 10px;
}

.overview-dau-date-picker input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(4, 18, 31, 0.96);
  color: #ffffff;
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  color-scheme: dark;
}

.overview-dau-date-picker input:hover,
.overview-dau-date-picker input:focus-visible {
  border-color: var(--water);
  outline: none;
}

.overview-activity-user-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.overview-activity-user-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(3, 15, 27, 0.98);
  padding: 11px 12px;
}

.overview-activity-user-row .user-profile-link {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-activity-user-row > span {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  text-align: right;
}

.overview-activity-user-row > span strong {
  color: var(--ink);
  font-size: 11px;
}

.overview-activity-user-row > span small {
  color: var(--muted);
  font-size: 10px;
}

.overview-active-battle-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.overview-active-battle-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: rgba(3, 15, 27, 0.98);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 13px 14px;
  text-align: left;
}

.overview-active-battle-row:hover,
.overview-active-battle-row:focus-visible {
  background: rgba(7, 35, 47, 0.98);
  outline: 1px solid rgba(40, 230, 255, 0.55);
}

.overview-active-battle-row span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.overview-active-battle-row strong {
  color: #ffffff;
}

.overview-active-battle-row small {
  color: var(--muted);
}

.overview-active-battle-row b {
  color: var(--water);
  font-size: 12px;
}

.overview-activity-coverage {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .overview-activity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .overview-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-activity-card {
    min-height: 122px;
  }

  .overview-activity-detail {
    padding: 14px 12px;
  }

  .overview-activity-user-list {
    grid-template-columns: 1fr;
  }

  .overview-activity-users-heading {
    align-items: flex-start;
  }

  .overview-activity-users-actions {
    align-items: flex-end;
  }
}

@media (max-width: 420px) {
  .overview-activity-grid {
    grid-template-columns: 1fr;
  }
}

.back-button {
  margin-bottom: 16px;
}

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.detail-hero h1 {
  font-size: clamp(30px, 5vw, 50px);
}

.detail-hero > strong {
  color: var(--water);
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1;
}

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

.detail-stat-grid article {
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 14px;
}

.metric-explained {
  position: relative;
  z-index: 5;
}

.metric-explained.note-open {
  z-index: 60;
}

.metric-card.metric-explained {
  padding-right: 42px;
}

.metric-explained > .metric-info-button,
.battle-retention-heading-actions .metric-info-button,
.retention-matrix-heading-actions .metric-info-button {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  background-image: url("./assets/metric-note-icon.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.32));
  transition:
    filter 0.18s ease,
  transform 0.18s ease;
}

.battle-retention-panel {
  overflow: visible;
  margin-bottom: 16px;
}

.battle-detail-rate-panel {
  margin-bottom: 16px;
}

.battle-retention-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.battle-retention-heading-actions .metric-info-button {
  position: static;
  flex: 0 0 auto;
}

.retention-matrix-heading-actions .metric-info-button {
  position: static;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.battle-retention-panel > .metric-formula-note {
  top: 72px;
  right: 16px;
  left: auto;
}

.battle-retention-coverage {
  margin: -2px 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.battle-retention-table {
  --retention-zoom: 1;
}

.battle-retention-table .retention-row {
  min-width: 680px;
}

.metric-info-button:hover,
.metric-info-button:focus-visible,
.metric-info-button[aria-expanded="true"] {
  outline: none;
  filter: drop-shadow(0 4px 7px rgba(255, 88, 67, 0.48));
  transform: scale(1.1);
}

.metric-explained > .metric-formula-note {
  position: absolute;
  top: calc(100% - 4px);
  left: 8px;
  z-index: 50;
  display: grid;
  width: min(330px, calc(100vw - 52px));
  gap: 7px;
  border: 1px solid rgba(29, 168, 199, 0.5);
  border-radius: 8px;
  background: rgba(3, 17, 29, 0.98);
  color: #f5fdff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  padding: 12px;
}

.metric-formula-note-right {
  right: 8px;
  left: auto;
}

.metric-formula-note b {
  color: #ffffff;
  font-size: 13px;
}

.metric-formula-note code {
  display: block;
  color: #a9ffd6;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.metric-formula-note p,
.metric-formula-note small {
  margin: 0;
  color: #c7e4ec;
  font-size: 11px;
  line-height: 1.5;
}

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

.detail-stat-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-stat-grid strong {
  margin-top: 7px;
  color: var(--deep);
  font-size: 26px;
}

.battle-detail-submissions {
  max-height: none;
}

.battle-participant-panel {
  margin-bottom: 16px;
}

.battle-participant-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.battle-participant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.battle-participant-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.battle-participant-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--team-color, var(--water));
  content: "";
}

.battle-participant-missing {
  align-content: center;
  min-height: 92px;
  border-style: dashed;
  color: var(--muted);
}

.battle-participant-missing::before {
  background: var(--muted);
}

.battle-participant-missing strong {
  color: var(--deep);
}

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

.battle-participant-head strong {
  color: var(--deep);
}

.battle-participant-head b {
  flex: 0 0 auto;
  color: var(--water);
  font-size: 18px;
}

.battle-participant-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(29, 168, 199, 0.12);
}

.battle-participant-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--water), var(--mint));
}

.battle-participant-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

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

.battle-participant-stats strong {
  color: var(--deep);
}

.user-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.user-profile-avatar,
.user-profile-friend-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(40, 230, 255, 0.48);
  background: linear-gradient(145deg, rgba(14, 74, 92, 0.88), rgba(5, 29, 45, 0.96));
  color: #ffffff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(40, 230, 255, 0.16), var(--glow-cyan);
}

.user-profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  font-size: 30px;
}

.user-profile-identity {
  flex: 1 1 auto;
  min-width: 0;
}

.user-profile-identity h1 {
  overflow-wrap: anywhere;
  font-size: clamp(30px, 5vw, 48px);
}

.user-profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 14px 0;
  width: min(100%, 720px);
  margin: 14px 0 0;
}

.user-profile-meta-item {
  min-width: 0;
  border-left: 2px solid rgba(40, 230, 255, 0.34);
  padding: 1px 16px 2px 12px;
}

.user-profile-meta-item dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.user-profile-meta-item dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.user-profile-meta-item.is-rank-bronze {
  border-left-color: #d18a56;
}

.user-profile-meta-item.is-rank-silver {
  border-left-color: #aebec8;
}

.user-profile-meta-item.is-rank-gold {
  border-left-color: #ffd166;
}

.user-profile-meta-item.is-rank-platinum,
.user-profile-meta-item.is-rank-diamond {
  border-left-color: #64e8ff;
}

.user-profile-meta-item.is-status-alive,
.user-profile-meta-item.is-status-active {
  border-left-color: #28dca4;
}

.user-profile-meta-item.is-status-disabled,
.user-profile-meta-item.is-status-suspended {
  border-left-color: #ff6d7a;
}

.user-profile-email-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.user-profile-email-row span {
  font-weight: 900;
}

.user-profile-email-row a {
  color: var(--water);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.user-profile-email-row a[href]:hover,
.user-profile-email-row a[href]:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-profile-email-row a[aria-disabled="true"] {
  color: var(--muted);
}

.user-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.user-profile-stat-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.user-profile-stat-grid span,
.user-profile-stat-grid strong {
  display: block;
}

.user-profile-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.user-profile-stat-grid strong {
  margin-top: 6px;
  color: var(--deep);
  font-size: 24px;
}

.user-profile-stat-grid .user-profile-date-value {
  font-size: 17px;
}

.user-profile-section {
  margin-bottom: 16px;
}

.user-profile-battle-grid,
.user-profile-friend-grid {
  display: grid;
  gap: 10px;
}

.user-profile-task-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.user-profile-task-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  max-height: 760px;
  overflow: auto;
}

.user-profile-task-card {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

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

.user-profile-task-head > div {
  min-width: 0;
}

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

.user-profile-task-head h3 {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.user-profile-task-meta {
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.user-profile-task-source {
  border: 1px solid rgba(40, 230, 255, 0.36);
  border-radius: 6px;
  background: rgba(40, 230, 255, 0.08);
  color: var(--water);
  font: inherit;
  font-weight: 900;
  padding: 5px 8px;
}

button.user-profile-task-source {
  cursor: pointer;
}

button.user-profile-task-source:hover,
button.user-profile-task-source:focus-visible {
  border-color: var(--water);
  background: rgba(40, 230, 255, 0.16);
  outline: none;
}

.user-profile-task-source.is-explore {
  border-color: rgba(255, 207, 90, 0.4);
  background: rgba(255, 207, 90, 0.08);
  color: #ffcf5a;
}

.user-profile-task-proof-image {
  display: block;
  width: 100%;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(2, 18, 29, 0.8);
}

.user-profile-task-proof-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.user-profile-task-card .proof-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--deep);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.user-profile-battle-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.user-profile-battle-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--team-color, var(--water));
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 13px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.user-profile-battle-card:hover,
.user-profile-battle-card:focus-visible,
.user-profile-friend-card:hover,
.user-profile-friend-card:focus-visible {
  border-color: rgba(40, 230, 255, 0.58);
  background: rgba(7, 38, 54, 0.86);
  box-shadow: var(--glow-cyan);
  outline: none;
  transform: translateY(-1px);
}

.user-profile-battle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.user-profile-battle-head strong,
.user-profile-battle-head small {
  display: block;
  overflow-wrap: anywhere;
}

.user-profile-battle-head b {
  flex: 0 0 auto;
  color: var(--water);
  font-size: 22px;
}

.user-profile-battle-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.user-profile-battle-stats span {
  border-radius: 6px;
  background: rgba(143, 182, 194, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 7px;
}

.user-profile-friend-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.user-profile-friend-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 11px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.user-profile-friend-avatar {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 15px;
}

.user-profile-friend-card > span:last-child {
  min-width: 0;
}

.user-profile-friend-card strong,
.user-profile-friend-card small {
  display: block;
  overflow-wrap: anywhere;
}

.completion-day-list {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 780px;
  overflow: auto;
  padding-right: 6px;
}

.completion-day-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 14px;
}

.completion-day-head,
.completion-task-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.completion-day-head {
  margin-bottom: 12px;
}

.completion-day-head strong,
.completion-day-head span,
.completion-day-head small,
.completion-task-card strong,
.completion-task-card small,
.completion-task-card h3,
.completion-task-card p {
  overflow-wrap: anywhere;
}

.completion-day-head strong,
.completion-day-head span {
  display: block;
}

.completion-day-head span,
.completion-day-head small,
.completion-task-card small,
.completion-task-card footer {
  color: var(--muted);
  font-size: 12px;
}

.completion-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.battle-detail-submissions .completion-task-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.completion-task-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 8px;
  border: 1px solid rgba(215, 232, 235, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
}

.battle-detail-submissions .completion-task-card {
  grid-template-rows: auto 36px 40px auto auto;
  align-content: start;
  gap: 6px;
  padding: 8px;
}

.battle-detail-submissions .completion-task-card h3 {
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.battle-detail-submissions .completion-task-card .proof-text {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.battle-detail-submissions .proof-text-empty {
  visibility: hidden;
}

.battle-detail-submissions .completion-task-card small,
.battle-detail-submissions .completion-task-card footer {
  font-size: 10px;
}

.completion-task-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.completion-task-card p,
.proof-text {
  margin: 0;
  color: var(--deep);
  line-height: 1.5;
}

.team-card {
  position: relative;
  border-left: 5px solid var(--team-color, rgba(215, 232, 235, 0.95));
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.team-card:hover {
  box-shadow: 0 14px 34px rgba(16, 42, 58, 0.1);
  transform: translateY(-1px);
}

.meta-line {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-line span:not(.team-marker) {
  display: inline-flex;
}

.team-marker,
.team-marker-group .team-marker {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: var(--team-color, #8aa7b3);
  box-shadow: 0 0 0 1px rgba(16, 42, 58, 0.12);
}

.team-marker-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.popular-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.popular-stats span {
  border-radius: 999px;
  background: rgba(16, 42, 58, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.participant-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.participant-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px 10px;
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 13px;
}

.participant-card strong,
.participant-card small,
.participant-card p,
.participant-card footer {
  overflow-wrap: anywhere;
}

.participant-card small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.participant-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--deep);
  font-size: 13px;
  line-height: 1.5;
}

.proof-link {
  grid-column: 1 / -1;
  display: block;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: transparent;
  aspect-ratio: 4 / 3;
}

.proof-link img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

.battle-detail-submissions .proof-link {
  aspect-ratio: 4 / 5;
  background: rgba(1, 8, 16, 0.8);
}

.battle-detail-submissions .proof-link img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.task-kind-chip {
  justify-self: start;
  border-radius: 999px;
  background: rgba(29, 168, 199, 0.14);
  color: #0e6f84;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.participant-card footer {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-archive-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(142px, 0.7fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.task-archive-controls label,
.category-date-picker {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.task-archive-controls input,
.task-archive-controls select,
.category-date-picker select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.task-archive-controls input:focus,
.task-archive-controls select:focus,
.category-date-picker select:focus {
  border-color: rgba(40, 230, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(40, 230, 255, 0.1);
  outline: none;
}

.task-archive-table-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-archive-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.task-archive-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(5, 24, 38, 0.98);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.task-archive-table th,
.task-archive-table td {
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 11px 12px;
  vertical-align: middle;
}

.task-archive-table tbody tr {
  background: rgba(4, 18, 31, 0.58);
  cursor: pointer;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.task-archive-table tbody tr:hover,
.task-archive-table tbody tr:focus-visible {
  background: rgba(7, 38, 54, 0.86);
  outline: none;
}

.task-archive-table tbody tr.active {
  background: rgba(14, 74, 92, 0.58);
  box-shadow: inset 3px 0 0 var(--water);
}

.task-archive-table td:first-child {
  min-width: 240px;
}

.task-archive-table td b {
  color: var(--water);
}

.identity-review-chip {
  display: inline-flex;
  margin-left: 7px;
  border: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: #ffe2a3;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 6px;
  vertical-align: middle;
}

.task-archive-detail {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.task-archive-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
}

.task-publication-history {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.task-publication-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 18, 31, 0.72);
  padding: 11px;
}

.task-publication-row > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.task-publication-row small {
  grid-column: 1 / -1;
}

.task-publication-row b {
  color: var(--water);
}

.category-date-picker {
  width: min(240px, 100%);
}

.category-day-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.category-summary-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 18, 31, 0.72);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 9px 11px;
  text-align: left;
}

.category-summary-button strong {
  grid-row: 1 / span 2;
  color: var(--water);
  font-size: 22px;
}

.category-summary-button span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-summary-button small {
  font-size: 10px;
}

.category-summary-button:hover,
.category-summary-button:focus-visible,
.category-summary-button.active {
  border-color: rgba(40, 230, 255, 0.58);
  background: rgba(7, 38, 54, 0.86);
  outline: none;
}

.category-summary-button.active {
  box-shadow: inset 0 0 0 1px rgba(40, 230, 255, 0.24);
}

@media (max-width: 1180px) {
  .task-archive-controls {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .task-archive-search {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .task-archive-controls,
  .task-archive-detail-grid {
    grid-template-columns: 1fr;
  }

  .task-archive-search {
    grid-column: auto;
  }

  .task-workspace-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

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

  .task-workspace-tab {
    min-width: 0;
    font-size: 13px;
  }

  .category-date-picker {
    width: 100%;
  }
}

.category-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
}

.category-matrix {
  display: grid;
  grid-template-columns: 132px repeat(8, minmax(124px, 1fr));
  gap: 8px;
  min-width: 1120px;
}

.category-header,
.category-date-cell,
.category-cell {
  border-radius: 8px;
  padding: 9px;
}

.category-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-date-cell {
  display: grid;
  gap: 3px;
  background: rgba(16, 42, 58, 0.07);
}

.category-date-cell small,
.category-cell small {
  color: var(--muted);
  font-size: 11px;
}

.category-cell {
  min-height: 58px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.category-cell strong,
.category-cell small,
.category-cell span {
  display: block;
}

.category-cell strong {
  color: var(--water);
  font-size: 22px;
}

.category-cell.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.2);
}

.category-cell span {
  margin-top: 5px;
  color: var(--water);
  font-size: 11px;
  font-weight: 900;
}

.category-detail {
  margin-top: 18px;
  border-top: 1px solid rgba(215, 232, 235, 0.9);
  padding-top: 18px;
}

.category-drilldown {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
}

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

.category-task-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  width: 100%;
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 13px;
  text-align: left;
}

.category-task-button.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
  box-shadow: inset 0 0 0 2px rgba(29, 168, 199, 0.2);
}

.category-task-button strong,
.category-task-button small,
.category-task-button span,
.category-submission-card strong,
.category-submission-card small,
.category-submission-card p {
  overflow-wrap: anywhere;
}

.category-task-button small,
.category-submission-card small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.category-task-button b {
  color: var(--water);
  font-size: 24px;
}

.category-task-button > span:not(.task-kind-chip) {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.date-detail-head.compact {
  margin-bottom: 12px;
}

.category-submission-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.category-submission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px 10px;
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 13px;
}

.category-submission-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--deep);
  font-size: 13px;
  line-height: 1.5;
}

.retention-layout {
  --retention-zoom: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.retention-matrix-panel {
  display: grid;
  align-content: start;
  min-width: 0;
}

.retention-matrix-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.retention-matrix-panel > .retention-formula-note {
  top: 54px;
  right: auto;
  left: 0;
  width: min(520px, calc(100vw - 64px));
}

.retention-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

#onlineRetentionMatrix {
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
}

#onlineRetentionMatrix .retention-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 8px 14px rgba(3, 15, 27, 0.18);
}

.retention-row {
  display: grid;
  align-items: center;
  gap: 8px;
  min-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  font: inherit;
  padding: 10px;
  text-align: left;
  font-size: calc(14px * var(--retention-zoom));
  padding: calc(10px * var(--retention-zoom));
}

.retention-row:not(.retention-head) {
  cursor: pointer;
}

.retention-static-row:not(.retention-head) {
  cursor: default;
}

.retention-row.active {
  border-color: rgba(29, 168, 199, 0.5);
  background: rgba(29, 168, 199, 0.13);
}

.retention-head {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.retention-row small {
  margin-left: 4px;
  font-size: 11px;
}

.retention-row > span,
.retention-row > strong {
  overflow-wrap: anywhere;
}

.retention-row .retained {
  color: #0c6b4a;
  font-weight: 900;
}

.retention-rate-button {
  justify-self: stretch;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 5px 3px;
  text-align: left;
}

.retention-rate-button small {
  font-size: 10px;
}

.retention-rate-button:hover,
.retention-rate-button:focus-visible,
.retention-rate-button.active {
  border-color: rgba(40, 230, 255, 0.52);
  background: rgba(40, 230, 255, 0.1);
  color: var(--water);
  outline: none;
}

.retention-cohort-count {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--water);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  padding: 4px 2px;
  text-decoration: none;
}

.retention-cohort-count:hover,
.retention-cohort-count:focus-visible,
.retention-cohort-count.active {
  color: var(--deep);
  outline: none;
}

.retention-cohort-users {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.retention-cohort-users-head,
.retention-cohort-users-actions {
  display: flex;
  align-items: center;
}

.retention-cohort-users-head {
  justify-content: space-between;
  gap: 16px;
}

.retention-cohort-users-head h3 {
  margin: 0;
  color: var(--deep);
  font-size: 16px;
}

.retention-cohort-users-actions {
  gap: 10px;
}

.retention-cohort-users-actions > strong {
  color: var(--water);
  font-size: 12px;
}

.retention-cohort-close-button {
  width: 34px;
  height: 34px;
}

.retention-cohort-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.retention-cohort-user-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  padding: 9px;
  text-align: left;
}

.retention-cohort-user-card:hover,
.retention-cohort-user-card:focus-visible {
  border-color: var(--water);
  outline: none;
}

.retention-cohort-user-card > span:last-child {
  display: grid;
  min-width: 0;
}

.retention-cohort-user-card strong,
.retention-cohort-user-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.retention-cohort-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(29, 168, 199, 0.16);
  color: var(--water);
  font-size: 12px;
  font-weight: 900;
}

.retention-user-list {
  display: grid;
  gap: calc(10px * var(--retention-zoom));
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
  font-size: calc(14px * var(--retention-zoom));
}

.retention-user-card {
  display: grid;
  gap: calc(7px * var(--retention-zoom));
  border: 1px solid rgba(215, 232, 235, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: calc(12px * var(--retention-zoom));
}

.retention-user-card small {
  overflow-wrap: anywhere;
}

.retention-user-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.retention-user-card span {
  border-radius: 999px;
  background: rgba(16, 42, 58, 0.08);
  color: var(--muted);
  font-size: calc(12px * var(--retention-zoom));
  font-weight: 900;
  padding: 5px 8px;
}

.retention-user-card span.kept {
  background: rgba(53, 199, 146, 0.18);
  color: #0c6b4a;
}

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

.date-detail-head > strong {
  color: var(--water);
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e5f1f3;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--water), var(--mint));
}

.leaderboard,
.feed {
  list-style: none;
}

.leaderboard li,
.feed li {
  gap: 12px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(215, 232, 235, 0.8);
}

.leaderboard li:last-child,
.feed li:last-child {
  border-bottom: 0;
}

.rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: var(--deep);
  font-weight: 900;
}

.leaderboard div,
.feed div {
  min-width: 0;
  flex: 1;
}

.leaderboard strong,
.feed strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed em {
  display: block;
  margin-top: 4px;
  color: var(--deep);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard b {
  color: var(--water);
  font-size: 20px;
}

.badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.team-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(215, 232, 235, 0.8);
}

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

.team-row small {
  display: block;
  margin-top: 3px;
}

.team-row b {
  color: var(--water);
}

.team-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.approved {
  color: #0c6b4a;
  background: rgba(53, 199, 146, 0.18);
}

.pending {
  color: #7a5300;
  background: rgba(246, 185, 77, 0.2);
}

.rejected {
  color: #8d2c22;
  background: rgba(255, 122, 107, 0.18);
}

.trend {
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  align-items: end;
  min-height: 230px;
  gap: 14px;
  padding-top: 8px;
}

.trend-day {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  height: 210px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.trend-day strong {
  color: var(--deep);
}

.trend-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--sun), var(--coral));
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar > section:first-child {
    padding-right: 64px;
  }

  .topbar-controls {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .topbar-controls .search-launch-button {
    position: absolute;
    top: 18px;
    right: 18px;
  }

  .metrics-grid,
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .user-profile-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .popularity-layout,
  .retention-layout,
  .category-drilldown,
  .analytics-snapshot-layout,
  .interaction-stats,
  .category-submission-list,
  .search-results {
    grid-template-columns: 1fr;
  }

  .user-search-result-card {
    grid-template-columns: 1fr;
  }

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

  .battle-timeline-stats {
    justify-content: flex-start;
  }

  .battle-timeline-board {
    min-width: 640px;
  }

  .participant-list,
  .completion-task-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .retention-day-toolbar,
  .retention-cohort-users-head {
    align-items: stretch;
    flex-direction: column;
  }

  .retention-day-toolbar > span {
    white-space: normal;
  }

  .retention-day-search {
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    width: 100%;
  }

  .retention-day-search label {
    grid-column: 1 / -1;
  }

  .retention-cohort-users-actions {
    justify-content: space-between;
  }

  .dashboard-main-tabs {
    top: 6px;
    grid-template-columns: repeat(5, minmax(116px, 1fr));
    padding: 5px;
  }

  .dashboard-tab-button {
    min-width: 116px;
    height: 42px;
    font-size: 13px;
  }

  .metrics-grid,
  .dashboard-grid,
  .analytics-metric-grid {
    grid-template-columns: 1fr;
  }

  .status-card {
    width: 100%;
  }

  .auth-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-stat-grid {
    grid-template-columns: 1fr;
  }

  .user-profile-hero {
    align-items: flex-start;
  }

  .user-profile-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

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

  .participant-list,
  .completion-task-grid,
  .category-submission-list {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .search-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .search-dialog-surface {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .search-dialog .panel-heading {
    align-items: center;
    flex-direction: row;
  }

  .bar-meta,
  .panel-heading,
  .retention-mode-tabs,
  .battle-timeline-search,
  .search-bar {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .trend {
    gap: 8px;
    overflow-x: auto;
  }

  .trend-day {
    min-width: 48px;
  }
}

/* Futuristic operations theme */
:root {
  --ink: #fbfeff;
  --muted: #b6d4dd;
  --line: rgba(43, 244, 255, 0.22);
  --surface: rgba(7, 22, 34, 0.84);
  --water: #28e6ff;
  --mint: #28f5a7;
  --coral: #ff6d7a;
  --sun: #ffd166;
  --deep: #ffffff;
  --panel-dark: rgba(5, 18, 31, 0.88);
  --panel-darker: rgba(2, 10, 20, 0.94);
  --glow-cyan: 0 0 22px rgba(40, 230, 255, 0.24);
  --glow-mint: 0 0 20px rgba(40, 245, 167, 0.16);
}

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(40, 230, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(40, 230, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #06111c 0%, #071e2a 42%, #090f1f 100%);
  background-size: 44px 44px, 44px 44px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(40, 230, 255, 0.08) 22.2%, transparent 22.6% 54%, rgba(40, 245, 167, 0.06) 54.2%, transparent 54.7%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25));
}

.app-shell {
  width: min(1800px, calc(100% - 28px));
}

.topbar {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(4, 17, 31, 0.94), rgba(7, 35, 47, 0.72));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), var(--glow-cyan);
  padding: 22px;
}

.topbar::after,
.panel::after,
.week-control-panel::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 88px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--water), var(--mint));
  opacity: 0.8;
}

h1 {
  color: #f4feff;
  text-shadow: 0 0 28px rgba(40, 230, 255, 0.28);
}

h2,
.metric-card strong,
.leaderboard strong,
.feed strong,
.popular-main strong,
.detail-stat-grid strong,
.completion-day-head strong,
.completion-task-card h3 {
  color: var(--ink);
}

.eyebrow {
  color: var(--water);
  text-shadow: 0 0 12px rgba(40, 230, 255, 0.36);
}

.subhead,
.status-label,
.metric-card p,
.metric-card span,
small {
  color: var(--muted);
}

.status-card,
.metric-card,
.panel,
.week-control-panel,
.detail-stat-grid article {
  position: relative;
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(4, 16, 28, 0.96), rgba(2, 9, 19, 0.92));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

.panel,
.week-control-panel {
  overflow: hidden;
}

.panel::before,
.week-control-panel::before,
.metric-card::before,
.status-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(40, 230, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(40, 245, 167, 0.08), transparent 42%);
  opacity: 0.72;
}

.status-card > *,
.metric-card > *,
.panel > *,
.week-control-panel > * {
  position: relative;
}

.pulse,
.drop-icon {
  background: var(--water);
  box-shadow: 0 0 0 6px rgba(40, 230, 255, 0.13), 0 0 18px rgba(40, 230, 255, 0.55);
}

.metric-card {
  min-height: 138px;
}

.metric-card strong {
  color: #ffffff;
  text-shadow: 0 0 22px rgba(40, 230, 255, 0.28);
}

.status-card strong,
.panel-heading strong,
.date-detail-head h2,
.detail-hero h1,
.completion-day-head strong,
.interaction-head strong,
.category-task-button strong,
.retention-user-card strong,
.participant-card strong,
.category-submission-card strong,
.popular-detail h2,
.category-detail h2,
.retention-detail h2 {
  color: #ffffff;
}

.metric-pill,
.popular-stats span {
  border: 1px solid rgba(255, 209, 102, 0.24);
  background: rgba(255, 209, 102, 0.12);
  color: #ffe2a3;
}

.ghost-button,
.week-button,
.battle-timeline-row,
.popular-button,
.category-cell,
.category-task-button,
.retention-row,
.participant-card,
.category-submission-card,
.retention-user-card,
.retention-cohort-user-card,
.completion-day-group,
.completion-task-card,
.interaction-row,
.daily-battle-group {
  border-color: rgba(43, 244, 255, 0.2);
  background: rgba(4, 18, 31, 0.78);
  color: var(--ink);
}

.ghost-button,
.week-button,
.battle-timeline-row,
.popular-button,
.category-cell,
.category-task-button,
.retention-row:not(.retention-head),
.retention-cohort-user-card {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.ghost-button:hover,
.week-button:hover,
.battle-timeline-row:hover,
.popular-button:hover,
.category-cell:hover,
.category-task-button:hover,
.retention-row:not(.retention-head):hover,
.retention-cohort-user-card:hover,
.retention-cohort-user-card:focus-visible {
  border-color: rgba(40, 230, 255, 0.52);
  background: rgba(7, 38, 54, 0.86);
  box-shadow: var(--glow-cyan);
}

.retention-static-row:not(.retention-head):hover {
  border-color: rgba(43, 244, 255, 0.2);
  background: rgba(4, 18, 31, 0.78);
  box-shadow: none;
  transform: none;
}

.week-button.active,
.battle-timeline-row.active,
.popular-button.active,
.category-cell.active,
.category-task-button.active,
.retention-row.active,
.metric-card-clickable.is-expanded {
  border-color: rgba(40, 230, 255, 0.65);
  background: linear-gradient(145deg, rgba(14, 74, 92, 0.58), rgba(5, 29, 45, 0.78));
  box-shadow: inset 0 0 0 1px rgba(40, 230, 255, 0.32), var(--glow-cyan);
}

.rank {
  background: linear-gradient(135deg, var(--water), #0f4c7a);
  box-shadow: 0 0 18px rgba(40, 230, 255, 0.32);
}

.battle-chart-legend span,
.interaction-head small,
.interaction-reviewers,
.battle-rate-main small,
.daily-battle-bar small,
.category-date-cell small,
.category-cell small,
.category-task-button small,
.category-submission-card small,
.completion-day-head span,
.completion-day-head small,
.completion-task-card small,
.completion-task-card footer,
.participant-card small,
.participant-card footer,
.team-row small,
.feed em,
.bar-meta span {
  color: #c7e4ec;
}

.daily-battle-canvas {
  background:
    linear-gradient(180deg, rgba(9, 43, 61, 0.7), rgba(3, 13, 25, 0.9)),
    linear-gradient(90deg, rgba(40, 230, 255, 0.06) 1px, transparent 1px);
  background-size: auto, 28px 100%;
}

.daily-battle-vertical-bar > i:not(.empty-slot),
.battle-rate-track span,
.bar-track span {
  box-shadow: 0 0 20px rgba(40, 230, 255, 0.18);
}

.daily-battle-vertical-bar:hover > i:not(.empty-slot),
.daily-battle-vertical-bar:focus-visible > i:not(.empty-slot) {
  filter: brightness(1.2);
  box-shadow: 0 0 20px rgba(40, 230, 255, 0.32);
}

.battle-chart-legend i,
.team-marker,
.team-marker-group .team-marker {
  border-color: rgba(5, 18, 31, 0.92);
}

.interaction-meter,
.battle-rate-track,
.bar-track {
  background: rgba(143, 182, 194, 0.12);
}

.interaction-stats span,
.category-date-cell,
.retention-head {
  background: rgba(143, 182, 194, 0.08);
}

.interaction-stats strong,
.battle-rate-row b,
.team-row b,
.leaderboard b,
.popular-button > b,
.date-detail-head > strong,
.category-cell strong,
.category-task-button b {
  color: var(--water);
}

.proof-link {
  border-color: rgba(43, 244, 255, 0.24);
  background: rgba(1, 8, 16, 0.55);
}

.approved {
  color: #a9ffd6;
  background: rgba(40, 245, 167, 0.16);
}

.pending {
  color: #ffe2a3;
  background: rgba(255, 209, 102, 0.15);
}

.rejected {
  color: #ffbcc3;
  background: rgba(255, 109, 122, 0.16);
}

.task-kind-chip {
  background: rgba(40, 230, 255, 0.14);
  color: #bdf8ff;
}

.trend-bar {
  background: linear-gradient(180deg, var(--sun), var(--coral));
}

@media (max-width: 1500px) {
  .battle-detail-submissions .completion-task-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .battle-detail-submissions .completion-task-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .battle-detail-submissions .completion-task-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .battle-detail-submissions .completion-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .battle-detail-submissions .completion-task-grid {
    grid-template-columns: 1fr;
  }
}

.panel.product-catalog-browser {
  grid-column: 1 / -1;
}

.product-catalog-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.product-catalog-metrics article {
  min-width: 0;
  border: 1px solid rgba(43, 244, 255, 0.2);
  border-radius: 6px;
  background: rgba(4, 18, 31, 0.78);
  padding: 12px 14px;
}

.product-catalog-metrics span,
.product-catalog-metrics strong {
  display: block;
}

.product-catalog-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-catalog-metrics strong {
  margin-top: 4px;
  color: var(--water);
  font-size: 24px;
}

.product-catalog-notice {
  min-height: 42px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.09);
  color: #ffe2a3;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.product-catalog-notice[data-status="missing"] {
  border-color: rgba(255, 109, 122, 0.3);
  background: rgba(255, 109, 122, 0.1);
  color: #ffbcc3;
}

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

.product-catalog-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
}

.product-category-filter {
  display: inline-flex;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid rgba(43, 244, 255, 0.2);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.72);
  padding: 3px;
}

.product-category-button {
  min-width: 72px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.product-category-button:hover,
.product-category-button:focus-visible,
.product-category-button.active {
  border-color: rgba(40, 230, 255, 0.4);
  background: rgba(40, 230, 255, 0.14);
  color: var(--ink);
  outline: none;
}

.product-catalog-search {
  position: relative;
  display: block;
  flex: 0 1 320px;
}

.product-catalog-sort {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-catalog-sort select {
  height: 42px;
  border: 1px solid rgba(43, 244, 255, 0.24);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  padding: 0 30px 0 10px;
  font: inherit;
  font-weight: 800;
}

.product-catalog-sort select:focus {
  border-color: var(--water);
  outline: none;
}

.product-catalog-search .search-glyph {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.product-catalog-search input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(43, 244, 255, 0.24);
  border-radius: 6px;
  background: rgba(3, 15, 27, 0.88);
  color: var(--ink);
  padding: 0 12px 0 40px;
  font: inherit;
}

.product-catalog-search input:focus {
  border-color: var(--water);
  box-shadow: 0 0 0 3px rgba(40, 230, 255, 0.12);
  outline: none;
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(43, 244, 255, 0.2);
  border-radius: 6px;
  background: rgba(4, 18, 31, 0.78);
}

.product-image-frame {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid rgba(43, 244, 255, 0.16);
  background: rgba(1, 8, 16, 0.7);
}

.product-image-frame img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
}

.product-image-frame img + img {
  border-left: 1px solid rgba(4, 18, 31, 0.3);
}

.product-image-frame[data-image-count="3"] {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: initial;
}

.product-image-frame[data-image-count="3"] img:first-child {
  grid-row: 1 / 3;
}

.product-image-frame[data-image-count="3"] img:nth-child(3) {
  border-top: 1px solid rgba(4, 18, 31, 0.3);
}

.product-image-frame.no-image {
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-card-body {
  padding: 10px;
}

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.product-card-meta span,
.product-card-meta b {
  font-size: 11px;
  line-height: 1.3;
}

.product-card-meta span {
  color: var(--muted);
  font-weight: 800;
}

.product-card-meta b {
  border-radius: 4px;
  padding: 3px 5px;
  white-space: nowrap;
}

.product-card-meta .is-live {
  background: rgba(40, 245, 167, 0.16);
  color: #a9ffd6;
}

.product-card-meta .is-hidden {
  background: rgba(255, 209, 102, 0.15);
  color: #ffe2a3;
}

.product-card-meta .is-unknown {
  background: rgba(143, 182, 194, 0.12);
  color: #c7e4ec;
}

.product-card h3 {
  min-height: 38px;
  margin: 8px 0 4px;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

.product-card-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.product-card-purchase-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 9px;
}

.product-card-purchase-stats span {
  min-width: 0;
  border: 1px solid rgba(43, 244, 255, 0.14);
  border-radius: 4px;
  background: rgba(1, 8, 16, 0.38);
  color: var(--muted);
  padding: 6px;
  font-size: 9px;
  line-height: 1.25;
}

.product-card-purchase-stats b {
  display: block;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  color: var(--water);
  font-size: 14px;
}

.product-popularity-section {
  margin-bottom: 16px;
}

.product-popularity-chart {
  display: grid;
  gap: 5px;
}

.product-popularity-row {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(180px, 1fr) minmax(100px, auto);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid rgba(43, 244, 255, 0.12);
  padding: 6px 2px;
}

.product-popularity-row > div:first-child span,
.product-popularity-row > div:first-child strong,
.product-popularity-row > div:last-child strong,
.product-popularity-row > div:last-child small {
  display: block;
}

.product-popularity-row > div:first-child span,
.product-popularity-row > div:last-child small {
  color: var(--muted);
  font-size: 10px;
}

.product-popularity-row > div:first-child strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
}

.product-popularity-row > div:last-child {
  text-align: right;
}

.product-popularity-row > div:last-child strong {
  color: var(--water);
  font-size: 16px;
}

.product-popularity-track {
  height: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(143, 182, 194, 0.12);
}

.product-popularity-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--water), var(--mint));
}

.product-card-item-names {
  display: -webkit-box;
  margin-top: 5px !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-catalog-empty {
  grid-column: 1 / -1;
}

@media (max-width: 1500px) {
  .product-catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .product-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .product-catalog-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .product-catalog-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .product-catalog-sort {
    justify-content: space-between;
  }

  .product-catalog-sort select {
    flex: 1 1 auto;
  }

  .product-catalog-search {
    flex-basis: auto;
    max-width: none;
  }

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

  .product-popularity-row {
    grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) minmax(82px, auto);
  }
}

@media (max-width: 680px) {
  .product-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .product-catalog-grid {
    grid-template-columns: 1fr;
  }

  .product-popularity-row {
    grid-template-columns: 1fr auto;
  }

  .product-popularity-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
