@font-face {
  font-family: "EclipsisMechano";
  src: url("/assets/v1/CAMechano_v1010-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050609;
  --bg-2: #090b12;
  --panel: rgba(15, 18, 28, 0.66);
  --panel-strong: rgba(18, 22, 34, 0.84);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(180, 209, 255, 0.26);
  --text: #f6f0ff;
  --muted: #a9afc0;
  --soft: #d6d9e6;
  --accent: #98f5d1;
  --accent-2: #c69cff;
  --danger: #ff7777;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --display-font: "EclipsisMechano", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(95, 255, 192, 0.12), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(198, 156, 255, 0.12), transparent 30%),
    linear-gradient(160deg, #050609, #0c0e16 48%, #050609);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100%;
  padding: 14px;
}

.glass {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
}

.topbar {
  position: fixed;
  z-index: 600;
  inset: 14px 14px auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: var(--radius);
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border: 0;
  color: var(--text);
  background: transparent;
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 28px rgba(152, 245, 209, 0.28);
}

.nav-tabs,
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.nav-tab,
.segmented button {
  position: relative;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}

.nav-tab.active,
.segmented button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  padding: 0 5px;
  color: #12080a;
  background: #ff5f76;
  box-shadow: 0 0 16px rgba(255, 95, 118, 0.42);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.nav-badge[hidden] {
  display: none;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.v1-action-rail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.v1-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.v1-action:hover,
.v1-action:focus-visible {
  border-color: rgba(152, 245, 209, 0.38);
  color: var(--text);
  background: rgba(152, 245, 209, 0.1);
  transform: translateY(-1px);
}

.v1-action img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(1) contrast(1.45) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.v1-action span {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  z-index: 20;
  max-width: 92px;
  transform: translateX(-50%) translateY(-4px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--text);
  background: rgba(5, 6, 9, 0.92);
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  white-space: nowrap;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.v1-action:hover span,
.v1-action:focus-visible span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.profile-menu-shell {
  position: relative;
  display: flex;
  min-width: 0;
}

.auth-trigger {
  gap: 8px;
}

.auth-trigger-user {
  min-width: 0;
  width: 52px;
  padding: 0;
  justify-content: center;
}

.auth-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(5, 6, 9, 0.5);
  overflow: hidden;
  font-family: var(--display-font);
  font-size: 13px;
}

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

.auth-avatar i {
  font-style: normal;
}

.profile-menu {
  position: absolute;
  z-index: 680;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 7px;
  width: min(282px, calc(100vw - 28px));
  padding: 10px;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

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

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-menu-orbit {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(5, 6, 9, 0.54);
  box-shadow: 0 0 24px rgba(152, 245, 209, 0.24);
}

.profile-menu-orbit img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.profile-menu-head > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-menu-head strong,
.profile-menu-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-head small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-menu button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 7px 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.profile-menu button:hover,
.profile-menu button:focus-visible {
  border-color: rgba(152, 245, 209, 0.36);
  background: rgba(152, 245, 209, 0.08);
  outline: none;
}

.profile-menu button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.9) drop-shadow(0 0 8px rgba(255, 255, 255, 0.14));
}
.profile-menu button .nav-badge {
  justify-self: end;
  margin-left: 0;
}


.primary-btn,
.ghost-btn,
.google-btn,
.icon-btn {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.primary-btn {
  padding: 0 16px;
  border-color: rgba(152, 245, 209, 0.42);
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.94), rgba(198, 156, 255, 0.9));
  color: #07100d;
  font-weight: 700;
}

.ghost-btn,
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn {
  width: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  line-height: 1;
}

.icon-btn img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.9) drop-shadow(0 0 8px rgba(255, 255, 255, 0.14));
}

.guide-button img {
  width: 22px;
  height: 22px;
}


.view {
  display: none;
}

.view.active {
  display: block;
}

#mapView {
  position: fixed;
  inset: 0;
}

#map {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(152, 245, 209, 0.11), transparent 30%),
    radial-gradient(circle at 74% 38%, rgba(198, 156, 255, 0.12), transparent 32%),
    radial-gradient(circle at 50% 82%, rgba(255, 255, 255, 0.04), transparent 34%),
    #050609;
}

.leaflet-container {
  background: #050609;
  font-family: Inter, sans-serif;
}

.eclipsis-atlas-canvas {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.leaflet-control-attribution {
  background: rgba(5, 6, 9, 0.74) !important;
  color: var(--muted) !important;
}

.osm-dark-tiles {
  filter: invert(1) hue-rotate(180deg) brightness(0.56) contrast(1.18) saturate(0.72);
}

.carto-dark-tiles {
  filter: brightness(0.86) contrast(1.08) saturate(0.88);
}

.eclipsis-marker {
  display: grid !important;
  place-items: center;
  width: 30px !important;
  height: 30px !important;
  margin-left: -15px !important;
  margin-top: -15px !important;
  border: 1px solid rgba(255, 255, 255, 0.72);
  position: relative;
  border-radius: 50%;
  background: rgba(5, 6, 9, 0.78);
  box-shadow: 0 0 0 5px rgba(152, 245, 209, 0.1), 0 0 25px rgba(152, 245, 209, 0.54);
  overflow: visible;
}

.eclipsis-marker img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55));
}

.eclipsis-marker.marker-status-true,
.eclipsis-marker.marker-status-unknown {
  border-color: rgba(255, 93, 112, 0.88);
  box-shadow: 0 0 0 5px rgba(255, 93, 112, 0.1), 0 0 24px rgba(255, 93, 112, 0.52);
}

.eclipsis-marker.marker-status-fiction {
  border-color: rgba(198, 156, 255, 0.9);
  box-shadow: 0 0 0 5px rgba(198, 156, 255, 0.12), 0 0 24px rgba(198, 156, 255, 0.58);
}

.eclipsis-marker.marker-status-resolved {
  border-color: rgba(152, 245, 209, 0.95);
  box-shadow: 0 0 0 5px rgba(152, 245, 209, 0.12), 0 0 28px rgba(152, 245, 209, 0.7);
}

.eclipsis-marker.marker-followed {
  box-shadow: 0 0 0 5px rgba(152, 245, 209, 0.16), 0 0 0 9px rgba(198, 156, 255, 0.1), 0 0 34px rgba(152, 245, 209, 0.64);
}

.marker-followed-badge {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(5, 6, 9, 0.92);
  border-radius: 50%;
  background: rgba(152, 245, 209, 0.96);
  box-shadow: 0 0 14px rgba(152, 245, 209, 0.82);
}

.eclipsis-marker.marker-focus {
  transform: scale(1.55);
  box-shadow: 0 0 0 8px rgba(152, 245, 209, 0.16), 0 0 42px rgba(198, 156, 255, 0.86);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.eclipsis-tooltip.leaflet-tooltip {
  width: min(324px, calc(100vw - 40px));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: rgba(8, 10, 16, 0.72);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
}

.eclipsis-tooltip.leaflet-tooltip::before {
  border-top-color: rgba(8, 10, 16, 0.72);
}

.map-tooltip-card {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.map-tooltip-head,
.map-tooltip-flags,
.map-tooltip-author {
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-tooltip-head {
  justify-content: space-between;
}

.map-tooltip-head span,
.map-tooltip-flags span,
.map-tooltip-author small,
.map-tooltip-cue {
  color: var(--muted);
  font-size: 11px;
}

.map-tooltip-head span {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

.map-tooltip-head strong {
  min-width: 48px;
  border: 1px solid rgba(152, 245, 209, 0.34);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent);
  text-align: center;
  background: rgba(152, 245, 209, 0.1);
}

.map-tooltip-media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
}

.map-tooltip-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.map-tooltip-cover-fallback img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(228, 80, 95, 0.46));
}

.map-tooltip-status {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--text);
  background: rgba(5, 6, 9, 0.76);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.map-tooltip-author {
  min-width: 0;
}

.map-tooltip-author > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.map-tooltip-author strong,
.map-tooltip-author small,
.map-tooltip-card h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tooltip-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(5, 6, 9, 0.5);
  overflow: hidden;
  font-family: var(--display-font);
}

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

.map-tooltip-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.map-tooltip-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0;
  overflow: hidden;
  color: rgba(235, 238, 245, 0.86);
  font-size: 12px;
  line-height: 1.45;
}

.map-tooltip-flags {
  flex-wrap: wrap;
}

.map-tooltip-ratings {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.map-tooltip-ratings span {
  display: grid;
  grid-template-columns: 72px 1fr 34px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.map-tooltip-ratings i,
.map-tooltip-ratings strong {
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.map-tooltip-ratings i {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tooltip-ratings b {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.map-tooltip-ratings b::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rating);
  border-radius: inherit;
  background: linear-gradient(90deg, #e4505f, #98f5d1);
  box-shadow: 0 0 12px rgba(152, 245, 209, 0.3);
}

.map-tooltip-ratings strong {
  color: var(--soft);
  text-align: right;
}

.map-tooltip-ratings span.is-empty b::before {
  opacity: 0.22;
}

.map-tooltip-flags span {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.05);
}

.map-tooltip-cue {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  text-align: center;
  text-transform: uppercase;
}

.map-panel {
  position: absolute;
  z-index: 500;
  top: 96px;
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
}

.panel-head,
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.content-header.compact {
  align-items: flex-start;
}

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

.notification-actions .ghost-btn:disabled {
  color: rgba(244, 247, 255, 0.48);
  border-color: rgba(223, 236, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  cursor: default;
}

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

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

h1,
h2 {
  margin-bottom: 0;
  font-family: var(--display-font);
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 30px;
}

h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

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

.filters,
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  outline: none;
}

textarea {
  min-height: 124px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(152, 245, 209, 0.09);
}

.story-list,
.stack-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 3px;
}

.story-card,
.contest-card,
.profile-card,
.detail-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 9, 0.34);
}

.story-card {
  padding: 13px;
  text-align: left;
}

.story-card button {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.story-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.story-card.has-cover {
  padding: 10px;
}

.story-card h3,
.contest-card h3 {
  margin: 0 0 8px;
}

.contest-card-v1 {
  display: grid;
  gap: 13px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

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

.contest-filter-row {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(160px, 210px);
  gap: 9px;
  align-items: center;
}

.contest-filter-row select {
  min-height: 38px;
  font-size: 13px;
}

.contest-leader {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(152, 245, 209, 0.32);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.12), rgba(228, 80, 95, 0.07));
  text-align: left;
  cursor: pointer;
}

.contest-leader-rank,
.contest-entry-rank {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: var(--display-font);
  border: 1px solid rgba(152, 245, 209, 0.3);
  background: rgba(5, 6, 9, 0.46);
}

.contest-leader-rank {
  width: 52px;
  height: 52px;
  font-size: 22px;
}

.contest-leader small,
.contest-leader em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contest-leader strong {
  display: block;
  overflow: hidden;
  margin: 2px 0;
  font-family: var(--display-font);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contest-entry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.contest-entry-strip button {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  cursor: pointer;
}

.contest-entry-rank {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.contest-entry-strip img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
}

.contest-entry-strip .contest-entry-icon {
  padding: 12px;
  object-fit: contain;
}

.contest-entry-strip strong,
.contest-entry-strip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contest-entry-strip small,
.contest-empty-entry,
.contest-entry-state {
  color: var(--muted);
  font-size: 12px;
}

.contest-empty-entry,
.contest-entry-state {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.contest-entry-state {
  color: var(--accent);
  border-color: rgba(152, 245, 209, 0.28);
  background: rgba(152, 245, 209, 0.07);
}

.contest-entry-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.content-view {
  min-height: calc(100vh - 28px);
  padding: 112px min(5vw, 64px) 40px;
  overflow: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.featured-leaderboard {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.featured-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  position: static;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.featured-summary h3 {
  margin: 0;
}

.featured-summary > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent);
  background: rgba(152, 245, 209, 0.07);
  font-size: 12px;
}

.featured-rank-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(5, 6, 9, 0.34);
  overflow: hidden;
}

.featured-rank-card.podium {
  border-color: rgba(228, 80, 95, 0.3);
  background:
    linear-gradient(135deg, rgba(228, 80, 95, 0.12), rgba(152, 245, 209, 0.045)),
    rgba(5, 6, 9, 0.42);
}

.featured-rank-card button {
  display: grid;
  grid-template-columns: 74px 116px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  width: 100%;
  min-height: 118px;
  border: 0;
  padding: 10px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.featured-rank-card button:hover {
  background: rgba(152, 245, 209, 0.06);
}

.featured-rank-number {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  background: rgba(5, 6, 9, 0.44);
  font-family: var(--display-font);
  font-size: 28px;
}

.featured-rank-cover {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

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

.featured-rank-cover .featured-rank-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(228, 80, 95, 0.36));
}

.featured-rank-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.featured-rank-topline,
.featured-rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.featured-rank-topline {
  justify-content: space-between;
}

.featured-rank-topline small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-rank-topline strong {
  color: var(--accent);
  font-family: var(--display-font);
}

.featured-rank-body h3,
.featured-rank-body p {
  margin: 0;
}

.featured-rank-body p {
  color: var(--muted);
  line-height: 1.45;
}

.featured-rank-meta b,
.featured-rank-meta i {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-style: normal;
}

.featured-rank-meta b {
  color: var(--text);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.form-card,
.contest-card,
.profile-card,
.detail-block {
  padding: 16px;
}

.form-card {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 112px;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 24px;
  border-radius: var(--radius);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(4px);
}

.guide-modal {
  position: fixed;
  inset: auto 22px 22px auto;
  z-index: 900;
  width: min(390px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 28px));
  margin: 0;
  padding: 22px;
}

.guide-modal::backdrop {
  background: transparent;
  backdrop-filter: none;
}


.guide-shell {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.guide-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 32px rgba(152, 245, 209, 0.24);
}

.guide-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.guide-shell h2 {
  margin: 0;
}

.guide-meter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14px, 1fr));
  gap: 5px;
  margin: 4px 0;
}

.guide-meter span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.guide-meter span.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(152, 245, 209, 0.28);
}

.guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-focus {
  position: relative;
  z-index: 850 !important;
  outline: 2px solid rgba(152, 245, 209, 0.78);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(152, 245, 209, 0.12), 0 0 38px rgba(198, 156, 255, 0.45) !important;
}

.wide-modal {
  width: min(980px, calc(100vw - 28px));
}

.dialog-close-form {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: flex-end;
  height: 0;
}

.auth-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.auth-form,
.story-form {
  display: grid;
  gap: 10px;
}

.auth-form[data-mode="login"] input[name="username"] {
  display: none;
}

.story-v1-left-start,
.story-v1-source-row {
  position: relative;
  padding-top: 28px;
}

.story-v1-left-start::before,
.story-v1-source-row::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-v1-left-start::before {
  content: "Share your story";
}

.story-v1-source-row::before {
  content: "Sources V1";
}

@media (min-width: 780px) {
  .wide-modal .story-form {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    column-gap: 18px;
    align-items: start;
  }

  .story-v1-head {
    grid-column: 1 / -1;
  }

  .story-v1-left-row,
  .story-v1-body {
    grid-column: 1;
  }

  .story-v1-source-row,
  .story-form #storyVideoPreview,
  .story-v1-cover-preview,
  .story-v1-source-drop,
  .story-v1-source-help,
  .story-v1-source-preview,
  .story-v1-submit {
    grid-column: 2;
  }

  .story-v1-source-row {
    grid-row: 2;
  }

  .story-form #storyVideoPreview {
    grid-row: 3;
  }

  .story-v1-cover-preview {
    grid-row: 4;
  }

  .story-v1-source-drop {
    grid-row: 5;
  }

  .story-v1-source-help {
    grid-row: 6;
    margin: 0;
  }

  .story-v1-source-preview {
    grid-row: 7 / span 3;
  }

  .story-v1-submit {
    grid-row: 10;
  }

  .story-v1-body {
    min-height: 230px;
  }
}

.file-drop {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 98px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.file-drop span {
  color: var(--text);
  font-weight: 700;
}

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

.file-drop.dragging,
.file-drop:focus-visible {
  border-color: rgba(152, 245, 209, 0.72);
  background: rgba(152, 245, 209, 0.09);
  box-shadow: 0 0 24px rgba(152, 245, 209, 0.16);
  transform: translateY(-1px);
}

.file-drop.uploading {
  border-color: rgba(198, 156, 255, 0.72);
  background: rgba(198, 156, 255, 0.09);
  cursor: wait;
}

.file-drop input {
  display: none;
}

.drop-lite {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.drop-lite input {
  display: none;
}

.evidence-panel {
  border-color: rgba(152, 245, 209, 0.22);
  background: rgba(152, 245, 209, 0.045);
}

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

.evidence-preview:empty {
  display: none;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.media-tile {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  overflow-wrap: anywhere;
}

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

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

.media-preview textarea {
  min-height: 76px;
  margin-top: 8px;
}

.media-help {
  margin: 0;
  font-size: 13px;
}

.media-cover-preview {
  min-height: 104px;
}

.media-cover-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  border: 1px solid rgba(152, 245, 209, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.08), rgba(198, 156, 255, 0.08)), rgba(5, 6, 9, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.media-cover-card.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

.media-cover-visual {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.42);
}

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

.media-cover-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.media-cover-empty img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.76;
}

.media-cover-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-cover-copy strong {
  color: var(--text);
  font-size: 14px;
}

.media-cover-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .media-cover-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .media-cover-card .compact-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .media-cover-visual {
    width: 78px;
  }
}

.media-preview-tile {
  position: relative;
}

.media-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.media-preview-visual {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  background: #000;
}

.cover-tile {
  border-color: rgba(152, 245, 209, 0.34);
  box-shadow: inset 0 0 0 1px rgba(152, 245, 209, 0.08), 0 0 22px rgba(152, 245, 209, 0.08);
}

.cover-badge {
  position: absolute;
  top: 52px;
  left: 18px;
  padding: 4px 7px;
  border: 1px solid rgba(152, 245, 209, 0.42);
  border-radius: 999px;
  color: #06100c;
  background: rgba(152, 245, 209, 0.92);
  font-size: 11px;
  font-weight: 700;
}

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

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.detail-body {
  color: var(--soft);
  line-height: 1.65;
  white-space: pre-wrap;
}
.linked-text a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(152, 245, 209, 0.42);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.linked-text a:hover {
  color: var(--soft);
  text-decoration-color: var(--soft);
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.media-strip img,
.media-strip video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}

.media-figure {
  display: grid;
  gap: 8px;
  margin: 0;
}

.media-figure figcaption,
.audio-tile figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.story-video-preview {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 6, 9, 0.34);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.story-video-preview[hidden] {
  display: none !important;
}

.story-video-preview .video-source-head {
  margin: 0;
}

.story-video-preview .video-frame {
  margin: 0;
}
.video-source-panel {
  display: grid;
  gap: 12px;
  border-color: rgba(198, 156, 255, 0.24);
  background: rgba(198, 156, 255, 0.045);
}

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

.video-source-head h3 {
  margin: 0;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.32);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.audio-tile,
.audio-preview-tile {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(5, 6, 9, 0.42);
}

.audio-tile audio,
.audio-preview-tile audio {
  width: 100%;
}

.audio-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.proof-ledger {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(152, 245, 209, 0.06), rgba(198, 156, 255, 0.04)),
    rgba(5, 6, 9, 0.34);
}

.proof-ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.proof-ledger-head h3 {
  margin: 0;
}

.proof-ledger-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(152, 245, 209, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent);
  background: rgba(152, 245, 209, 0.08);
  font-size: 12px;
}

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

.proof-ledger-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.86fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  position: relative;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.proof-ledger-item.is-right .proof-ledger-visual {
  order: 2;
}

.proof-ledger-item.is-right .proof-ledger-copy {
  order: 1;
}

.proof-ledger-visual {
  position: relative;
  min-height: 154px;
}

.proof-ledger-media,
.proof-ledger-audio,
.proof-ledger-document {
  width: 100%;
  min-height: 154px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #000;
}

.proof-ledger-media {
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.proof-ledger-audio,
.proof-ledger-document {
  display: grid;
  place-items: center;
  padding: 14px;
}

.proof-ledger-audio audio {
  width: 100%;
}

.proof-ledger-document {
  color: var(--accent);
  text-align: center;
}

.proof-index {
  position: absolute;
  left: 10px;
  top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.66);
  font-family: var(--display-font);
  font-size: 12px;
}

.proof-ledger-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.proof-kind {
  width: max-content;
  max-width: 100%;
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  color: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
}

.proof-ledger-copy p {
  max-height: 180px;
  margin: 0;
  overflow: auto;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .qna-card-v1 {
    grid-template-columns: 1fr;
  }

  .qna-divider {
    width: 100%;
    min-height: 1px;
  }
}
@media (max-width: 680px) {
  .proof-ledger {
    padding: 10px;
  }

  .proof-ledger-head {
    display: grid;
  }

  .proof-ledger-item {
    grid-template-columns: 1fr;
  }

  .proof-ledger-item.is-right .proof-ledger-visual,
  .proof-ledger-item.is-right .proof-ledger-copy {
    order: initial;
  }
}

.comment-form,
.thread-form,
.profile-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.profile-upload {
  display: grid;
  gap: 7px;
  min-height: 104px;
  border: 1px dashed rgba(152, 245, 209, 0.34);
  border-radius: 8px;
  padding: 12px;
  background: rgba(152, 245, 209, 0.055);
}

.profile-upload span {
  color: var(--text);
  font-weight: 700;
}

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

.profile-upload input {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-bio-field {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(198, 156, 255, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(198, 156, 255, 0.075), rgba(152, 245, 209, 0.045));
}

.profile-bio-field span {
  color: var(--text);
  font-weight: 700;
}

.profile-bio-field textarea {
  min-height: 112px;
  resize: vertical;
}

.profile-bio-meter {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.profile-bio-meter.near-limit {
  color: var(--accent-2);
}

.profile-advanced-links {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-advanced-links summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-advanced-links[open] summary {
  color: var(--accent);
  margin-bottom: 2px;
}

.profile-advanced-links input + input {
  margin-top: 8px;
}
.thread-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.question-card {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.qna-card-v1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
}

.qna-side {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.qna-answer {
  grid-template-columns: minmax(0, 1fr);
}

.qna-divider {
  width: 1px;
  min-height: 100%;
  background: linear-gradient(transparent, rgba(152, 245, 209, 0.42), transparent);
}

.qa-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  background-position: center;
  background-size: cover;
  color: var(--accent);
  font-family: var(--display-font);
}

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

.qna-copy p {
  margin: 7px 0 0;
  color: var(--soft);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.qna-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.qna-section-head strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1;
}

.answer-empty {
  border: 1px dashed rgba(198, 156, 255, 0.24);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(198, 156, 255, 0.055);
}

.comment {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.comment-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.comment-card.is-reply {
  margin-left: 22px;
}

.comment-card.comment-focus {
  border-radius: 8px;
  background: rgba(152, 245, 209, 0.08);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  background-position: center;
  background-size: cover;
  color: var(--accent);
  font-family: var(--display-font);
}

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

.comment-main p {
  margin: 6px 0 0;
  color: var(--soft);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-main a {
  color: var(--accent);
}

.comment-parent,
.comment-reply-preview,
.thread-reply-parent,
.thread-reply-preview {
  width: 100%;
  border: 1px solid rgba(198, 156, 255, 0.24);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(198, 156, 255, 0.07);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.comment-parent {
  margin-top: 8px;
}

.comment-reply-preview,
.thread-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-reply-preview[hidden],
.thread-reply-preview[hidden] {
  display: none;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  opacity: 0.72;
}

.comment-card:hover .comment-actions,
.comment-actions:focus-within {
  opacity: 1;
}

.thread-card {
  border-top: 1px solid var(--line);
}

.thread-card .thread-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-top: 0;
}

.thread-expanded {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.thread-expanded[hidden] {
  display: none;
}

.thread-messages {
  display: grid;
  gap: 8px;
}

.thread-message {
  border-left: 2px solid rgba(198, 156, 255, 0.78);
  border-radius: 0 7px 7px 0;
  padding: 9px 10px;
  background: rgba(198, 156, 255, 0.06);
}

.thread-message p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.thread-reply-parent {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  cursor: pointer;
}

.thread-reply-parent strong,
.thread-reply-parent span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-reply-parent strong {
  color: var(--soft);
}

.thread-reply-parent span {
  color: var(--muted);
}

.thread-message-focus {
  border-left-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(152, 245, 209, 0.12), 0 0 22px rgba(152, 245, 209, 0.18);
}

.thread-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.thread-message-form {
  display: grid;
  gap: 8px;
}

.thread-message-form textarea {
  min-height: 88px;
}

.qna-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid rgba(152, 245, 209, 0.22);
  border-radius: 6px;
  color: var(--text);
  background: rgba(152, 245, 209, 0.07);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.qna-toggle:hover,
.qna-toggle:focus-visible {
  border-color: rgba(152, 245, 209, 0.45);
  background: rgba(152, 245, 209, 0.12);
  outline: none;
}

.qna-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qna-toggle strong {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(5, 6, 9, 0.54);
  font-size: 11px;
}

.qna-answer-panel[hidden] {
  display: none;
}
.answer-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.answer-card {
  margin-left: 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  border-radius: 0 7px 7px 0;
  background: rgba(152, 245, 209, 0.055);
}

.answer-card-v1 {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  margin-left: 0;
  border: 1px solid rgba(152, 245, 209, 0.18);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
}

.answer-card-v1 .qa-avatar {
  width: 42px;
  height: 42px;
}

.answer-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.answer-form textarea {
  min-height: 86px;
}

.profile-hero {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(5, 6, 9, 0.2), rgba(5, 6, 9, 0.86)),
    var(--banner, linear-gradient(135deg, rgba(152, 245, 209, 0.18), rgba(198, 156, 255, 0.18)));
  background-size: cover;
  background-position: center;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.avatar {
  width: 74px;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  object-fit: cover;
}

.profile-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-signal-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 93, 112, 0.9);
  box-shadow: 0 0 12px rgba(255, 93, 112, 0.55);
}

.profile-status.online i {
  background: rgba(152, 245, 209, 0.95);
  box-shadow: 0 0 14px rgba(152, 245, 209, 0.7);
}

.profile-agent {
  color: var(--text);
  font-family: var(--display-font);
}

.profile-rank-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(228, 80, 95, 0.13), rgba(152, 245, 209, 0.055)),
    rgba(5, 6, 9, 0.34);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px));
}

.profile-rank-main {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(228, 80, 95, 0.26);
  background: rgba(228, 80, 95, 0.08);
}

.profile-rank-main span,
.profile-rank-main small,
.profile-rank-grid small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-rank-main strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: clamp(36px, 7vw, 58px);
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(228, 80, 95, 0.3);
}

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

.profile-rank-grid span {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-rank-grid strong {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1;
  text-overflow: ellipsis;
}

.profile-actions {
  margin-bottom: 12px;
}

.profile-tabs-shell {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
  overflow: hidden;
}

.profile-v1-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.24);
}

.profile-v1-tabs button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
}

.profile-v1-tabs button span,
.profile-tab-title {
  overflow: hidden;
  font-family: var(--display-font);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-v1-tabs button strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 18px;
  line-height: 1;
}

.profile-v1-tabs button.active {
  border-color: rgba(152, 245, 209, 0.42);
  color: var(--text);
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.15), rgba(228, 80, 95, 0.08));
  box-shadow: inset 0 0 22px rgba(152, 245, 209, 0.08);
}

.profile-tab-panel {
  display: grid;
  gap: 12px;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-tab-title {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-left: 4px solid var(--accent);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 14px 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.profile-v1-card-grid,
.profile-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 12px;
}

.profile-v1-story-card {
  min-width: 0;
}

.profile-v1-story-card button {
  position: relative;
  display: grid;
  align-items: end;
  width: 100%;
  min-height: 210px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  color: var(--text);
  background: rgba(5, 6, 9, 0.74);
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.profile-v1-story-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 180ms ease, filter 180ms ease;
}

.profile-v1-story-card button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.profile-v1-story-card:not(.has-cover) .profile-v1-story-bg {
  padding: 48px;
  object-fit: contain;
  filter: saturate(0.78);
  opacity: 0.72;
}

.profile-v1-story-card button:hover .profile-v1-story-bg,
.profile-v1-story-card button:focus-visible .profile-v1-story-bg {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.04);
}

.profile-v1-story-card .v1-corner {
  z-index: 3;
}
.profile-v1-story-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 44px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.profile-v1-story-copy small,
.profile-v1-story-copy strong,
.profile-v1-story-copy em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-v1-story-copy small {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-v1-story-copy strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-v1-story-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}
.profile-people-grid .empty,
.profile-v1-card-grid .empty {
  grid-column: 1 / -1;
}

.profile-v1-person-card {
  min-height: 76px;
}
.profile-network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px;
  margin: 16px 0;
}

.profile-network-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  position: static;
}

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

.profile-person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.profile-person-card:hover {
  border-color: rgba(152, 245, 209, 0.34);
  background: rgba(152, 245, 209, 0.07);
}

.profile-person-card strong,
.profile-person-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-person-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.profile-person-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-style: normal;
}

.profile-person-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 93, 112, 0.9);
  box-shadow: 0 0 10px rgba(255, 93, 112, 0.48);
}

.profile-person-status.online {
  border-color: rgba(152, 245, 209, 0.32);
  color: var(--accent);
  background: rgba(152, 245, 209, 0.07);
}

.profile-person-status.online i {
  background: rgba(152, 245, 209, 0.95);
  box-shadow: 0 0 12px rgba(152, 245, 209, 0.68);
}

#toast {
  position: fixed;
  z-index: 800;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(520px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 10, 15, 0.92);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .featured-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-rank-card button {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .featured-rank-cover {
    display: none;
  }

  .featured-rank-number {
    min-height: 72px;
    font-size: 20px;
  }

  .app-shell {
    padding: 10px;
  }

  .topbar {
    position: sticky;
    inset: 10px auto auto;
    grid-template-columns: 1fr;
  }

  .nav-tabs,
  .top-actions {
    width: 100%;
  }

  .nav-tabs {
    grid-auto-flow: initial;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-tab {
    padding: 0 8px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1;
  }
  .guide-button {
    flex: 0 0 46px;
  }

  .v1-action-rail {
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .v1-action-rail::-webkit-scrollbar {
    display: none;
  }

  .v1-action {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
  }

  .v1-action span {
    display: none;
  }

  .auth-trigger-user {
    min-width: 0;
    justify-content: center;
  }

  .profile-menu {
    right: 0;
    width: min(282px, calc(100vw - 20px));
  }

  #mapView {
    position: relative;
    display: none;
    min-height: calc(100vh - 20px);
  }

  #mapView.active {
    display: block;
  }

  #map {
    position: relative;
    height: 54vh;
    min-height: 360px;
    border-radius: var(--radius);
    overflow: hidden;
  }

  .map-panel {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 10px;
  }

  .content-view {
    min-height: auto;
    padding: 18px 0 32px;
  }

  .guide-modal {
    inset: auto 10px 10px;
    width: calc(100vw - 20px);
  }

  .split-layout,
  .auth-grid,
  .filters,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    position: static;
  }
}

.map-control-panel {
  left: 14px;
  right: auto;
  bottom: auto;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100vh - 110px);
}

.map-instructions {
  overflow: visible;
}

.map-hint {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 9, 0.32);
  color: var(--muted);
}

.map-search-row,
.map-filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.map-filter-row {
  grid-template-columns: 1fr auto;
}

.filter-select-state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.map-button-filters {
  display: grid;
  gap: 14px;
}

.map-button-filter-group {
  display: grid;
  gap: 8px;
}

.map-button-filter-group > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-icon-filter-grid,
.map-quick-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}

.map-icon-filter-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.map-icon-filter-grid button,
.map-quick-filters button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 6px 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.map-icon-filter-grid button:hover,
.map-icon-filter-grid button.active,
.map-quick-filters button:hover,
.map-quick-filters button.active {
  border-color: rgba(255, 64, 72, 0.7);
  color: var(--text);
  background: rgba(255, 64, 72, 0.12);
  box-shadow: 0 0 18px rgba(255, 64, 72, 0.2);
  transform: translateY(-1px);
}

.map-icon-filter-grid img,
.map-quick-filters img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.9) drop-shadow(0 0 8px rgba(255, 255, 255, 0.14));
}

.map-icon-filter-grid small,
.map-quick-filters small {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-year-slider-shell {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 11px 12px 10px;
  background: rgba(255, 255, 255, 0.055);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.map-year-slider-shell[hidden] {
  display: none !important;
}

.map-year-slider-head,
.map-year-slider-ticks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-year-slider-head span,
.map-year-slider-ticks span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.map-year-slider-head strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 15px;
  letter-spacing: 0;
}

#mapYearSlider {
  width: 100%;
  min-height: 22px;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
}

#mapYearSlider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(152, 245, 209, 0.25), rgba(198, 156, 255, 0.45));
}

#mapYearSlider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: #05070d;
  box-shadow: 0 0 18px rgba(152, 245, 209, 0.45);
}

.map-legend {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 6, 9, 0.28);
}

.map-legend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.map-legend-head span {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 13px;
  text-transform: uppercase;
}

.map-legend-head small {
  max-width: 160px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

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

.map-legend-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.map-legend-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.map-legend-item span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.map-legend-item strong,
.map-legend-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend-item strong {
  color: var(--soft);
  font-size: 11px;
}

.map-legend-item small {
  color: var(--muted);
  font-size: 10px;
}

.map-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-stat-row span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
}
.map-stat-row .map-search-chip {
  max-width: 100%;
  border-color: rgba(198, 156, 255, 0.3);
  color: var(--text);
  background: rgba(198, 156, 255, 0.1);
}

.map-readout {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.map-readout span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.map-readout strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 14px;
  letter-spacing: 0;
}

.map-year-chart-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px 8px;
  background: rgba(5, 7, 13, 0.42);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.map-year-chart-card[hidden] {
  display: none !important;
}

.map-year-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-year-chart-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.map-year-chart-head strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 14px;
  letter-spacing: 0;
}

#mapYearChart {
  width: 100%;
  height: 116px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.18);
  cursor: crosshair;
}
.map-year-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 7px;
  align-items: end;
  min-height: 86px;
  padding-top: 6px;
}

.map-year-bars button {
  display: grid;
  gap: 5px;
  justify-items: center;
  align-items: end;
  min-width: 0;
  border: 0;
  border-radius: 7px;
  padding: 6px 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.map-year-bars button:hover {
  color: var(--text);
  background: rgba(152, 245, 209, 0.09);
}

.map-year-bars span {
  width: 9px;
  min-height: 12px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, var(--accent), rgba(152, 245, 209, 0.14));
  box-shadow: 0 0 18px rgba(152, 245, 209, 0.22);
}

.map-year-bars small {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  text-overflow: ellipsis;
}

.map-feed {
  min-height: 0;
  overflow: auto;
}

.map-feed-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 6, 9, 0.42);
  backdrop-filter: blur(18px);
}

.map-feed-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.map-feed-tabs button.active,
.map-feed-tabs button:hover,
.map-feed-tabs button:focus-visible {
  border-color: rgba(152, 245, 209, 0.34);
  color: var(--text);
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.12), rgba(198, 156, 255, 0.1));
  outline: none;
}

.map-feed-tabs span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-feed-tabs strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
}
.map-feed-grid {
  display: grid;
  gap: 10px;
}

.map-feed-column {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 9, 0.28);
}

.map-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.map-feed-head span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.map-feed-head small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-feed-head h3 {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.map-feed-head strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(152, 245, 209, 0.08);
}

.mini-story {
  position: relative;
  display: grid;
  grid-template-columns: 26px 54px minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 8px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.mini-story:hover {
  border-color: rgba(152, 245, 209, 0.38);
  background: rgba(152, 245, 209, 0.075);
}

.mini-story-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(5, 6, 9, 0.44);
  font-family: var(--display-font);
  font-size: 13px;
}

.mini-story-preview {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(5, 6, 9, 0.46);
  overflow: hidden;
}

.mini-story-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-story-preview .mini-story-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(228, 80, 95, 0.48));
}

.mini-story-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mini-story strong,
.mini-story small,
.mini-story em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-story small,
.mini-story em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-story i {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-style: normal;
}

.mini-story b {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--accent-2);
  background: rgba(198, 156, 255, 0.08);
  font-size: 10px;
  font-weight: 600;
}

.empty.compact {
  padding: 6px 0;
  font-size: 13px;
}

.map-story-panel {
  position: absolute;
  z-index: 520;
  top: 96px;
  right: 14px;
  bottom: 14px;
  width: min(470px, calc(100vw - 28px));
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.map-story-panel[hidden] {
  display: none;
}

.story-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.story-panel-close {
  flex: 0 0 auto;
}

.auth-modal {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(5, 6, 9, 0.86)),
    rgba(5, 6, 9, 0.9);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% calc(100% - 26px), calc(100% - 26px) 100%, 26px 100%, 0 calc(100% - 26px));
}

.auth-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.auth-intro {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 28px 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(228, 80, 95, 0.16), rgba(255, 255, 255, 0.035));
}

.auth-mark {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px;
  background: rgba(5, 6, 9, 0.48);
  box-shadow: 0 0 32px rgba(228, 80, 95, 0.28);
}

.auth-intro h2 {
  margin: 0;
}

.auth-intro .muted {
  margin: 0;
}

.auth-signal-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  width: 100%;
}

.auth-signal-list span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(5, 6, 9, 0.32);
  font-size: 11px;
  text-align: left;
}

.auth-signal-list strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 14px;
  border: 1px solid rgba(152, 245, 209, 0.24);
  border-radius: 7px;
  background: rgba(152, 245, 209, 0.07);
}

.auth-referral {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(152, 245, 209, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--soft);
  background: rgba(152, 245, 209, 0.07);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.auth-referral[hidden] {
  display: none !important;
}

.auth-referral span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.auth-referral strong {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.auth-referral small {
  color: var(--muted);
  line-height: 1.4;
}

.auth-form {
  padding: 18px 24px 24px;
}

.auth-stack .segmented {
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 0;
  background: transparent;
}

.auth-stack .segmented button {
  min-height: 42px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.auth-stack .google-btn,
.auth-stack .primary-btn {
  width: 100%;
}
.auth-stack .primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  filter: grayscale(0.35) saturate(0.7);
  box-shadow: none;
}

.auth-status.ready {
  border-color: rgba(152, 245, 209, 0.2);
}

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

.auth-field[hidden],
.auth-form [hidden] {
  display: none !important;
}

.auth-field span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-reset-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.auth-field input,
.auth-field select {
  border-radius: 0;
  background: rgba(255, 255, 255, 0.09);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.auth-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 0;
}

.auth-status span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.auth-status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(228, 80, 95, 0.72);
  box-shadow: 0 0 12px rgba(228, 80, 95, 0.28);
}

.auth-status .ok {
  color: var(--text);
  border-color: rgba(152, 245, 209, 0.28);
}

.auth-status .ok i {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(152, 245, 209, 0.36);
}
.auth-strength {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.auth-strength[hidden] {
  display: none !important;
}

.auth-strength-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.auth-strength-head strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 18px;
  line-height: 1;
}

.auth-strength-meter {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
}

.auth-strength-meter i {
  display: block;
  width: var(--strength, 20%);
  height: 100%;
  border-radius: inherit;
  background: rgba(228, 80, 95, 0.88);
  box-shadow: 0 0 14px rgba(228, 80, 95, 0.32);
}

.auth-strength[data-level="medium"] .auth-strength-meter i {
  background: rgba(255, 196, 94, 0.92);
  box-shadow: 0 0 14px rgba(255, 196, 94, 0.28);
}

.auth-strength[data-level="strong"] .auth-strength-meter i {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(152, 245, 209, 0.36);
}

.auth-strength-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.auth-strength-rules span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.auth-strength-rules i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(228, 80, 95, 0.72);
}

.auth-strength-rules .ok {
  color: var(--soft);
}

.auth-strength-rules .ok i {
  background: var(--accent);
}

@media (max-width: 520px) {
  .auth-modal {
    width: calc(100vw - 18px);
  }

  .auth-intro {
    gap: 10px;
    padding: 22px 18px 14px;
  }

  .auth-mark {
    width: 54px;
    height: 54px;
  }

  .auth-form {
    padding: 16px 18px 20px;
  }

  .auth-stack .segmented button {
    min-height: 38px;
  }

  .auth-status span {
    font-size: 11px;
  }

  .auth-strength-rules {
    grid-template-columns: 1fr;
  }
}

.password-reset-form {
  gap: 12px;
}

.reset-progress {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reset-progress span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  text-align: center;
}

.reset-progress span.active {
  color: var(--text);
  border-color: rgba(152, 245, 209, 0.34);
  background: rgba(152, 245, 209, 0.09);
}

.reset-stage {
  display: grid;
  gap: 10px;
}

.reset-stage[hidden] {
  display: none;
}

.reset-hint {
  min-height: 18px;
}

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

.checks-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 13px;
}

.checks-row input {
  width: auto;
  min-height: auto;
}

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

.fiction-note,
.rating-context {
  border: 1px solid rgba(198, 156, 255, 0.26);
  border-radius: 8px;
  background: rgba(198, 156, 255, 0.08);
}

.fiction-note {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 11px 12px;
}

.fiction-note strong {
  color: var(--accent-2);
}

.fiction-note span,
.rating-context {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rating-context {
  margin: 0;
  padding: 9px 10px;
}

.fiction-rating .rating-row {
  grid-template-columns: 96px 1fr 42px;
}

.rating-gauge-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 6, 9, 0.32);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

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

.rating-gauge {
  --gauge-color: #e4505f;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.gauge-strangeness {
  --gauge-color: #c69cff;
}

.gauge-originality {
  --gauge-color: #f4a63d;
}

.gauge-like_score {
  --gauge-color: #79f2be;
}

.rating-gauge-arc {
  position: relative;
  width: 104px;
  height: 58px;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}

.rating-gauge-arc::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(from 270deg, var(--gauge-color) 0 var(--arc), rgba(255, 255, 255, 0.16) var(--arc) 180deg, transparent 180deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gauge-color), transparent 50%));
}

.rating-gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 49px;
  background: rgba(255, 255, 255, 0.88);
  transform: translateX(-50%) rotate(var(--needle));
  transform-origin: bottom;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.rating-gauge-arc::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--text);
  transform: translateX(-50%);
}

.rating-gauge strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1;
}

.rating-gauge span {
  overflow-wrap: anywhere;
}

.resolve-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px;
  border: 1px solid rgba(152, 245, 209, 0.3);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(152, 245, 209, 0.07);
}

.resolve-panel div {
  display: grid;
  gap: 4px;
}

.resolve-panel strong {
  color: var(--accent);
}

.resolve-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.story-admin-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 107, 107, 0.06);
}

.story-admin-panel div {
  display: grid;
  gap: 4px;
}

.story-admin-panel strong {
  color: #ff8d8d;
}

.story-admin-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.story-author-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(152, 245, 209, 0.2);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(152, 245, 209, 0.07), rgba(198, 156, 255, 0.06));
}

.story-author-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 28px;
}

.story-author-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.story-author-name {
  width: fit-content;
  max-width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: transparent;
  font-family: var(--display-font);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-author-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.story-author-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.story-author-stats span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
}

.rating-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.rating-row input {
  padding: 0;
}

.story-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-v1-feature-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  aspect-ratio: 16 / 9;
  margin: 2px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at 50% 25%, rgba(228, 80, 95, 0.12), rgba(5, 6, 9, 0.82) 46%, rgba(0, 0, 0, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 18px 50px rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.story-v1-feature-frame iframe,
.story-v1-feature-frame > img,
.story-v1-feature-frame > video {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.story-v1-feature-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.story-v1-feature-empty img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: invert(1) drop-shadow(0 0 16px rgba(228, 80, 95, 0.35));
  opacity: 0.82;
}

.story-v1-feature-empty p {
  margin: 0;
  color: var(--text);
  font-family: var(--display-font);
  font-size: 22px;
}

.story-v1-feature-empty audio {
  width: min(360px, 100%);
}

.v1-corner {
  position: absolute;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.v1-corner.top-left {
  top: 12px;
  left: 12px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.v1-corner.top-right {
  top: 12px;
  right: 12px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.v1-corner.bottom-left {
  bottom: 12px;
  left: 12px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.v1-corner.bottom-right {
  right: 12px;
  bottom: 12px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.map-story-panel .story-v1-feature-frame {
  min-height: 170px;
  margin-top: 0;
}
.story-v1-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: 0 0 2px;
}

.story-v1-meta span {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.story-v1-meta i,
.story-v1-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-v1-meta i {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-v1-meta strong {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.2;
}

.story-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.story-tabs button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--display-font);
  font-size: 12px;
  text-align: left;
}

.story-tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-tabs button strong {
  min-width: 24px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.055);
  font-family: var(--display-font);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.story-tabs button.active,
.story-tabs button[aria-selected="true"] {
  color: var(--text);
  border-color: rgba(152, 245, 209, 0.36);
  background: rgba(152, 245, 209, 0.09);
}

.story-tabs button.active strong,
.story-tabs button[aria-selected="true"] strong {
  border-color: rgba(152, 245, 209, 0.42);
  color: var(--accent);
  background: rgba(152, 245, 209, 0.1);
}

.story-tab-panel {
  display: grid;
  gap: 12px;
}

.story-tab-panel[hidden] {
  display: none;
}
.btn-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -4px;
  margin-right: 6px;
  filter: invert(1);
}


/* V1 profile/story frame corners */
.profile-card,
.story-card,
.profile-network-card,
.profile-person-card {
  position: relative;
  isolation: isolate;
}

.profile-card::before,
.story-card::before,
.profile-network-card::before,
.profile-person-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px 22px no-repeat;
  opacity: 0.34;
  filter: drop-shadow(0 0 10px rgba(152, 245, 209, 0.18));
}

.story-card:hover::before,
.profile-person-card:hover::before {
  opacity: 0.72;
}

.profile-card .profile-hero,
.story-card button,
.profile-network-card > *,
.profile-person-card > * {
  position: relative;
  z-index: 1;
}

.profile-person-card::before {
  inset: 5px;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px 14px no-repeat;
}

.follow-author-action.is-active {
  border-color: rgba(152, 245, 209, 0.42);
  color: var(--accent);
  background: rgba(152, 245, 209, 0.09);
}

.follow-author-action.is-active .btn-icon {
  filter: drop-shadow(0 0 12px rgba(152, 245, 209, 0.48));
}
.favorite-action.is-active {
  border-color: rgba(152, 245, 209, 0.42);
  color: var(--accent);
  background: rgba(152, 245, 209, 0.09);
}

.favorite-action.is-active .btn-icon {
  filter: drop-shadow(0 0 12px rgba(152, 245, 209, 0.48));
}

@media (max-width: 860px) {
  .map-control-panel,
  .map-story-panel {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 10px;
  }

  .map-story-panel {
    max-height: none;
    overflow: visible;
  }

  .checks-row,
  .resolve-panel,
  .story-admin-panel {
    grid-template-columns: 1fr;
  }

  .rating-row {
    grid-template-columns: 92px 1fr 38px;
  }

  .rating-gauge-panel,
  .fiction-gauges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-author-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .story-author-card .ghost-btn {
    grid-column: 1 / -1;
  }

  .story-author-avatar {
    width: 52px;
    height: 52px;
  }

  .story-v1-meta,
  .story-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.social-list {
  gap: 12px;
}

.social-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(5, 6, 9, 0.36));
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.notification-filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.notification-filter-row button {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.notification-filter-row button:hover,
.notification-filter-row button.active,
.notification-filter-row button[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(152, 245, 209, 0.36);
  background: rgba(152, 245, 209, 0.09);
  box-shadow: 0 0 18px rgba(152, 245, 209, 0.1);
}

.notification-filter-row span,
.notification-filter-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-filter-row span {
  font-size: 11px;
  text-transform: uppercase;
}

.notification-filter-row strong {
  color: var(--soft);
  font-family: var(--display-font);
  font-size: 16px;
}

.notification-summary-v1 {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.notification-summary-v1:empty {
  display: none;
}

.notification-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

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

.notification-summary-tab {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.notification-summary-tab:hover,
.notification-summary-tab.active,
.notification-summary-tab[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(228, 80, 95, 0.42);
  background: rgba(228, 80, 95, 0.16);
}

.notification-summary-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
}

.notification-summary-tab strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 24px;
  line-height: 1;
}
.notification-count-v1 {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 34px;
  min-height: 30px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(228, 80, 95, 0.9);
  box-shadow: 0 0 18px rgba(228, 80, 95, 0.24);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.notification-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.notification-card-v1 {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  position: relative;
}

.notification-avatar-v1 {
  display: grid;
  place-items: center;
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 6, 9, 0.46);
  overflow: visible;
}

.notification-avatar-v1 img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.notification-avatar-v1 b {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 400;
}

.notification-avatar-v1 i {
  display: grid;
  place-items: center;
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: #910f0f;
  font-family: var(--display-font);
  font-size: 12px;
  font-style: normal;
}

.notification-copy-v1 {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.notification-copy-v1 h3 {
  margin: 0;
}

.notification-story-chip {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  color: #fff;
  background: rgba(145, 15, 15, 0.9);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-card.unread {
  border-color: rgba(255, 95, 118, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 95, 118, 0.11), rgba(5, 6, 9, 0.36)),
    rgba(255, 255, 255, 0.04);
}

.notification-card h3,
.project-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lab-layout {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.lab-forms,
.lab-results {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.project-slots {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.project-slot {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  background-position: center;
  background-size: cover;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.project-slot.filled {
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}

.project-slot.filled:hover {
  border-color: rgba(152, 245, 209, 0.55);
  box-shadow: 0 0 18px rgba(152, 245, 209, 0.14);
}

.project-slot.empty {
  border-style: dashed;
  opacity: 0.55;
}

.project-slot-count,
.project-slot-overflow {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

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

.small-body {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .brand,
  .top-actions {
    justify-self: stretch;
  }

  .nav-tabs {
    justify-content: stretch;
    overflow-x: auto;
  }
}

@media (max-width: 860px) {
  .notification-card,
  .lab-layout {
    grid-template-columns: 1fr;
  }
  .notification-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-card-v1 {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-card-v1 .ghost-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.messages-layout {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.message-sidebar,
.message-thread-card {
  position: static;
}

.message-search,
.message-compose {
  display: grid;
  gap: 10px;
}

.conversation-card {
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  color: var(--text);
  text-align: left;
}

.conversation-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card.is-contact {
  border-color: rgba(152, 245, 209, 0.22);
  background: rgba(152, 245, 209, 0.045);
}

.user-result-card {
  cursor: default;
}

.user-result-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.conversation-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.contact-pill {
  color: #06100c;
  background: rgba(152, 245, 209, 0.88);
}

.conversation-time-pill {
  color: #d9e6ff;
  border-color: rgba(223, 236, 255, 0.12);
  background: rgba(223, 236, 255, 0.075);
}

.mini-avatar {
  width: 42px;
  height: 42px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.message-thread {
  display: grid;
  gap: 14px;
  min-height: 420px;
}

.message-thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.message-thread-head h3 {
  margin: 0;
}

.message-bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.message-bubble {
  max-width: min(560px, 86%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.message-bubble.sent {
  align-self: flex-end;
  border-color: rgba(152, 245, 209, 0.32);
  background: rgba(152, 245, 209, 0.12);
}

.message-bubble.received {
  align-self: flex-start;
}

.message-bubble p {
  margin: 0;
  color: var(--soft);
  line-height: 1.5;
  white-space: pre-wrap;
}

.message-bubble span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.message-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.message-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.message-bubble:hover .message-actions,
.message-bubble:focus-within .message-actions {
  opacity: 1;
}

@media (max-width: 860px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .message-bubbles {
    max-height: none;
  }
}

.settings-layout {
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
}

.settings-forms {
  display: grid;
  gap: 14px;
  align-content: start;
}

.settings-account-card {
  gap: 12px;
}

.settings-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(223, 236, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-edit-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-edit-row input,
.settings-edit-row select {
  width: 100%;
}

.settings-edit-row input[readonly],
.settings-edit-row select:disabled,
.settings-edit-row input:disabled {
  color: rgba(244, 247, 255, 0.72);
  border-color: rgba(223, 236, 255, 0.1);
  background: rgba(5, 8, 14, 0.34);
  cursor: default;
  opacity: 1;
}

.settings-edit-row.is-unlocked {
  border-color: rgba(157, 117, 255, 0.45);
  background: rgba(157, 117, 255, 0.08);
}

.settings-edit-toggle {
  min-width: 96px;
  white-space: nowrap;
}

.settings-password-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.story-admin-card {
  position: static;
}

.settings-story-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.settings-story-row h3 {
  margin: 0 0 8px;
}

.support-history-card {
  position: static;
}

.support-request-card {
  display: grid;
  gap: 8px;
}

.support-request-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.support-request-card h3,
.support-request-card p {
  margin: 0;
}

.support-status {
  flex: 0 0 auto;
  border: 1px solid rgba(223, 236, 255, 0.16);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text);
  background: rgba(223, 236, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.support-status-open {
  border-color: rgba(157, 117, 255, 0.42);
  color: #e8dcff;
  background: rgba(157, 117, 255, 0.14);
}

.support-status-reviewed {
  border-color: rgba(95, 203, 255, 0.42);
  color: #d9f4ff;
  background: rgba(95, 203, 255, 0.13);
}

.support-status-closed {
  border-color: rgba(120, 230, 170, 0.36);
  color: #dcffe9;
  background: rgba(120, 230, 170, 0.12);
}

.danger-btn {
  border-color: rgba(255, 119, 119, 0.38);
  color: #ffd9d9;
  background: rgba(255, 119, 119, 0.08);
}

@media (max-width: 860px) {
  .settings-layout,
  .settings-story-row,
  .settings-edit-row,
  .settings-password-row,
  .profile-upload-grid,
  .profile-rank-panel {
    grid-template-columns: 1fr;
  }

  .profile-rank-grid,
  .profile-v1-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.membership-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.membership-main,
.membership-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.plan-card h3 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: 0;
}

.plan-price {
  margin: 0;
  font-size: 30px;
  color: var(--text);
}

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

.plan-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 14px;
}

.referral-card input[readonly] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.idea-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  position: relative;
}

.idea-card-top {
  border-color: rgba(198, 156, 255, 0.32);
  background: linear-gradient(145deg, rgba(198, 156, 255, 0.11), rgba(5, 6, 9, 0.38));
}

.idea-card-voted {
  border-color: rgba(152, 245, 209, 0.32);
  background: linear-gradient(145deg, rgba(152, 245, 209, 0.11), rgba(5, 6, 9, 0.38));
}

.idea-vote-button {
  display: grid;
  place-items: center;
  gap: 3px;
  width: 58px;
  min-height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 8px 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.idea-vote-button:hover,
.idea-vote-button[aria-pressed="true"] {
  border-color: rgba(152, 245, 209, 0.42);
  background: rgba(152, 245, 209, 0.08);
}

.idea-vote-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.idea-vote-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(1) drop-shadow(0 0 8px rgba(152, 245, 209, 0.28));
}

.idea-vote-button strong {
  font-size: 18px;
  line-height: 1;
}

.idea-vote-button span {
  color: var(--muted);
  font-size: 11px;
}

.idea-content {
  min-width: 0;
}

.idea-rank-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.idea-rank-line span {
  flex: 0 0 auto;
  border: 1px solid rgba(198, 156, 255, 0.34);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-2);
  background: rgba(198, 156, 255, 0.08);
  font-family: var(--display-font);
  font-size: 12px;
  line-height: 1;
}

.idea-rank-line .eyebrow {
  margin: 0;
}

@media (max-width: 1180px) {
  .plan-grid,
  .membership-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .idea-card {
    grid-template-columns: 1fr;
  }

  .idea-vote-button {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    width: 100%;
    min-height: 42px;
  }
}

.cloudflare-status-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(5, 6, 9, 0.34);
}

.cloudflare-status-panel:empty {
  display: none;
}

.cloudflare-status-loading {
  color: var(--muted);
  font-size: 13px;
}

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

.cloudflare-status-head h3 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: 0;
}

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

.cloudflare-status-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.cloudflare-status-card.ok {
  border-color: rgba(152, 245, 209, 0.34);
  background: rgba(152, 245, 209, 0.07);
}

.cloudflare-status-card.danger {
  border-color: rgba(255, 119, 119, 0.36);
  background: rgba(255, 119, 119, 0.07);
}

.cloudflare-status-card strong {
  color: var(--text);
  font-family: var(--display-font);
  letter-spacing: 0;
}

.cloudflare-status-card span {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.cloudflare-status-card small,
.cloudflare-status-card em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.history-timeline {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.history-live-panel {
  display: grid;
  gap: 18px;
  max-width: 980px;
  padding: 22px;
  margin-bottom: 16px;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.history-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.history-live-head h3 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: 0;
}

.history-story-timeline {
  min-height: 150px;
}

.history-year-chart {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 6, 9, 0.3);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

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

.history-year-chart-head h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--display-font);
  font-size: 18px;
  letter-spacing: 0;
}

.history-year-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 152px;
}

.history-year-bars button {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 152px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.history-year-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(38px, 100%);
  height: var(--height);
  min-height: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.38), 0 0 18px rgba(228, 80, 95, 0.14);
}

.history-year-stack .segment {
  display: block;
  width: 100%;
  min-height: 3px;
}

.history-year-stack .segment.resolved {
  height: var(--resolved);
  background: rgba(121, 242, 190, 0.9);
}

.history-year-stack .segment.fiction {
  height: var(--fiction);
  background: rgba(244, 166, 61, 0.9);
}

.history-year-stack .segment.true {
  height: var(--true);
  background: rgba(228, 80, 95, 0.9);
}

.history-year-bars button:hover .history-year-stack,
.history-year-bars button:focus-visible .history-year-stack {
  border-color: rgba(152, 245, 209, 0.52);
  box-shadow: 0 0 0 3px rgba(152, 245, 209, 0.08), 0 0 26px rgba(152, 245, 209, 0.2);
}

.history-year-bars strong,
.history-year-bars small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-year-bars strong {
  font-family: var(--display-font);
  font-size: 13px;
}

.history-year-bars small,
.history-year-note {
  color: var(--muted);
  font-size: 12px;
}

.history-year-note {
  margin: 0;
  line-height: 1.45;
}

.history-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.history-rail {
  position: relative;
  height: 158px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(177, 34, 47, 0.2), rgba(255, 255, 255, 0.05)),
    rgba(5, 6, 9, 0.42);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  overflow: visible;
}

.history-rail::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 20px rgba(177, 34, 47, 0.42);
}

.history-point {
  position: absolute;
  left: var(--x);
  top: calc(50% + ((var(--lane) - 1) * 22px));
  display: grid;
  place-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.history-point-dot,
.history-story-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #e4505f;
  box-shadow: 0 0 16px rgba(228, 80, 95, 0.7);
}

.history-point.fiction .history-point-dot,
.history-story-dot.fiction {
  background: #f4a63d;
  box-shadow: 0 0 16px rgba(244, 166, 61, 0.65);
}

.history-point.resolved .history-point-dot,
.history-story-dot.resolved {
  background: #79f2be;
  box-shadow: 0 0 16px rgba(121, 242, 190, 0.65);
}

.history-point small {
  color: var(--muted);
  font-size: 10px;
}

.history-point-popup {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 5px;
  width: min(230px, 78vw);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(5, 6, 9, 0.9);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 26px rgba(228, 80, 95, 0.18);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease;
}

.history-point:hover .history-point-popup,
.history-point:focus-visible .history-point-popup {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.history-point-popup b,
.history-point-popup em,
.history-point-popup i,
.history-point-popup u {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-decoration: none;
}

.history-point-popup strong {
  color: var(--text);
  font-family: var(--display-font);
  font-size: 15px;
  line-height: 1.15;
}
.history-story-list {
  display: grid;
  gap: 10px;
}

.history-story-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 6, 9, 0.28);
}

.history-story-row > button:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.history-story-row strong,
.history-story-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-story-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-release {
  display: grid;
  gap: 16px;
  padding: 22px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.timeline-release-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timeline-release h3 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: 0;
}

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

.timeline-feature {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 9, 0.3);
}

.timeline-feature strong {
  color: var(--text);
}

.timeline-feature span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.release-note-block {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(228, 80, 95, 0.1), rgba(5, 6, 9, 0.36)),
    rgba(255, 255, 255, 0.045);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.release-note-block strong {
  color: var(--text);
  font-family: var(--display-font);
  letter-spacing: 0;
}

.release-note-block span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .map-search-row,
  .map-filter-row,
  .history-live-head,
  .timeline-feature-grid,
  .release-note-grid,
  .cloudflare-status-grid,
  .timeline-release-head {
    grid-template-columns: 1fr;
  }

  .history-live-head,
  .timeline-release-head {
    display: grid;
  }

  .history-story-row {
    grid-template-columns: 1fr;
  }
}

.survey-v1-card {
  gap: 14px;
}

.survey-v1-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.survey-v1-panel h3,
.survey-v1-panel p {
  margin: 0;
}

.survey-compose textarea {
  min-height: 112px;
}

.survey-response-card {
  gap: 8px;
}

.survey-response-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 680px) {
  .survey-v1-panel {
    grid-template-columns: 1fr;
  }
}

#mapView.active .map-readout {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 560;
  min-width: 210px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(5, 7, 13, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(140%);
}

#mapView.active .map-search-row {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 570;
  width: min(560px, calc(100vw - 44px));
  transform: translateX(-50%);
  grid-template-columns: minmax(0, 1fr);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(140%);
}

#mapView.active #mapSearchInput {
  min-height: 42px;
}

@media (max-width: 860px) {
  #mapView.active .map-search-row {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    transform: none;
    grid-template-columns: minmax(0, 1fr);
  }

  #mapView.active .map-readout {
    right: 12px;
    bottom: 76px;
    min-width: 0;
    max-width: calc(100vw - 24px);
  }
}

/* Home map target layout */
#mapView.active {
  background: #03070b;
}

#mapView.active .topbar,
.topbar {
  min-height: 80px;
  padding: 12px 18px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 9, 14, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.brand {
  gap: 16px;
  font-size: 28px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 73, 73, 0.88);
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 0 0 2px rgba(255, 73, 73, 0.18), 0 0 28px rgba(255, 73, 73, 0.72);
}

.nav-tabs {
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  padding: 0 28px;
  font-size: 15px;
}

.nav-tab:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-tab img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.9) drop-shadow(0 0 8px rgba(255, 255, 255, 0.14));
}

.nav-tab.active {
  color: var(--text);
  background: transparent;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -12px;
  left: 18px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #ff4048;
  box-shadow: 0 0 18px rgba(255, 64, 72, 0.8);
}

.top-actions {
  align-items: center;
}

.v1-action-rail {
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
}

.v1-action,
.guide-button {
  width: 44px;
  height: 44px;
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
}

.v1-action:hover,
.v1-action:focus-visible,
.guide-button:hover,
.guide-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.v1-action span {
  display: none;
}

.auth-trigger-user {
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

#mapView.active .map-panel {
  top: 112px;
  bottom: 24px;
  left: 14px;
  right: auto;
  width: min(372px, calc(100vw - 28px));
  max-height: none;
  gap: 18px;
  padding: 24px;
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 10, 15, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(20px) saturate(130%);
}

#mapView.active .panel-head {
  align-items: flex-start;
}

#mapView.active .panel-head .eyebrow,
#mapView.active .map-year-slider-head span,
#mapView.active .map-legend-head span {
  color: #ff4048;
}

#mapView.active .panel-head h1 {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.15;
}

#mapView.active .map-button-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

#mapView.active #mapSearchInput {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

#mapView.active .map-quick-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#mapView.active .map-quick-filters button {
  width: 100%;
  border-radius: 8px;
}

#mapView.active .map-icon-filter-grid button.active,
#mapView.active .map-quick-filters button.active {
  border-color: rgba(255, 64, 72, 0.78);
  background: rgba(255, 64, 72, 0.12);
  box-shadow: 0 0 22px rgba(255, 64, 72, 0.26);
}

#mapView.active .map-legend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#mapView.active .map-feed,
#mapView.active .map-instructions,
#mapView.active .map-year-chart-card {
  display: none;
}

#mapView.active .leaflet-control-zoom {
  margin-right: 26px;
  margin-bottom: 118px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(140%);
}

#mapView.active .leaflet-control-zoom a {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  background: transparent;
  font-size: 26px;
  line-height: 48px;
}

#mapView.active #locateButton {
  position: fixed;
  right: 226px;
  bottom: 26px;
  z-index: 570;
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(140%);
}

#mapView.active .map-readout {
  right: 26px;
  bottom: 26px;
  width: 190px;
  min-width: 0;
  text-align: right;
}

#mapView.active .map-year-slider-shell {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 560;
  width: min(520px, calc(100vw - 420px));
  min-width: 320px;
  transform: translateX(-50%);
  background: rgba(5, 8, 12, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(140%);
}

#mapView.active .map-search-row {
  left: 50%;
  bottom: 26px;
  width: min(520px, calc(100vw - 420px));
  min-width: 320px;
  transform: translateX(-50%);
}

#mapView.active .nav-tab img,
#mapView.active .guide-button img,
#mapView.active .v1-action img,
#mapView.active #locateButton img,
#mapView.active .map-icon-filter-grid img,
#mapView.active .map-quick-filters img,
#mapView.active .map-legend-item img,
#mapView.active .profile-menu button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.88) drop-shadow(0 0 8px rgba(255, 255, 255, 0.14));
}

#mapView.active .map-icon-filter-grid button.active img,
#mapView.active .map-quick-filters button.active img,
#mapView.active .nav-tab.active img {
  filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.22));
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .nav-tabs {
    justify-content: stretch;
    overflow-x: auto;
  }

  .nav-tab {
    padding: 0 18px;
  }
}

@media (max-width: 860px) {
  #mapView.active .map-panel {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: none;
    margin-top: 10px;
  }

  #mapView.active .map-readout {
    right: 12px;
    bottom: 76px;
    width: min(190px, calc(100vw - 24px));
  }

  #mapView.active #locateButton {
    right: min(214px, calc(100vw - 72px));
    bottom: 76px;
  }

  #mapView.active .map-search-row,
  #mapView.active .map-year-slider-shell {
    width: calc(100vw - 32px);
    min-width: 0;
  }

  #mapView.active .map-year-slider-shell {
    bottom: 82px;
  }
}
.direct-refresh-pill {
  justify-self: end;
  color: #98f5d1;
  border-color: rgba(152, 245, 209, 0.24);
  background: rgba(152, 245, 209, 0.08);
}

.studio-layout {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px;align-items:start}
.studio-layout .form-card {display:grid;gap:12px;min-width:0;position:static}
.studio-layout h3,.studio-story-tools h3,.studio-story-tools h4 {margin:0}
.studio-layout form {display:grid;gap:10px}
.studio-layout input,.studio-layout select,.studio-layout textarea,.studio-story-tools input,.studio-story-tools textarea {max-width:100%;min-width:0}
.studio-layout label {display:grid;gap:6px}
.studio-layout label:has(input[type="checkbox"]){display:flex;align-items:center;gap:8px}
.studio-layout input[type="checkbox"]{width:18px;height:18px;flex:0 0 auto}
.studio-list {display:grid;gap:10px;max-height:340px;overflow:auto}
.studio-list>div,.studio-evidence [data-events]>div,.studio-versions>div {display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px;border:1px solid rgba(255,255,255,.12);border-radius:8px}
.studio-inline,.studio-form-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.studio-inline>* {flex:1 1 100px}
.studio-story-tools {display:grid;gap:12px;margin:18px 0;padding:16px;border:1px solid rgba(255,255,255,.15);border-radius:12px;background:rgba(10,16,28,.7)}
.studio-story-tools [hidden]{display:none}
.studio-evidence {display:grid;gap:10px}
.studio-evidence form {display:flex;flex-wrap:wrap;gap:8px}
.studio-evidence details {border:1px solid rgba(255,255,255,.14);border-radius:8px;padding:10px}
.studio-evidence summary {cursor:pointer}
.studio-compare {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.studio-compare article {min-width:0;overflow-wrap:anywhere;border:1px solid rgba(255,255,255,.14);padding:12px;border-radius:8px}
.studio-report {padding:10px;border:1px solid rgba(255,255,255,.14);border-radius:8px}
.studio-publish-date {display:grid;gap:5px}
#draftStatus {font-size:.85rem;color:#98f5d1}
#densityToggle[aria-pressed="true"]{border-color:#ff4048;color:#fff;background:rgba(255,64,72,.16)}
@media(max-width:640px){.studio-compare{grid-template-columns:1fr}.studio-layout{grid-template-columns:1fr}.studio-story-tools{padding:10px}}
@media(max-width:980px){.nav-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:12px}.nav-tab{flex:0 0 auto}}
@media(min-width:861px) and (max-width:1120px){.content-view{padding-top:250px}#mapView.active .map-panel{top:250px}}

.fieldkit-map{padding:12px;border-radius:10px}
.osm-dark-tiles{filter:invert(1) hue-rotate(180deg) saturate(.65) brightness(.78)}
.fieldkit-map>summary,.fieldkit-results>summary{cursor:pointer;font-weight:700}
.fieldkit-map>summary{display:flex;justify-content:space-between;gap:8px}
.fieldkit-map output{color:#98f5d1;font-variant-numeric:tabular-nums}
.fieldkit-map-body{display:grid;gap:12px;margin-top:12px}
.fieldkit-map-body label{display:grid;gap:5px;min-width:0}
.fieldkit-map-body input,.fieldkit-map-body select{width:100%;min-width:0}
.fieldkit-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fieldkit-radius{min-width:0;margin:0;padding:8px;border:1px solid var(--line);border-radius:8px}
.fieldkit-radius legend{padding:0 4px}
.fieldkit-radius .fieldkit-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.fieldkit-radius button{margin-top:8px;width:100%}
.fieldkit-actions{display:flex;flex-wrap:wrap;gap:8px}
.fieldkit-actions>*{flex:1 1 auto}
.fieldkit-results{border-top:1px solid var(--line);padding-top:10px}
#fieldkitResults{display:grid;gap:6px;margin-top:8px;max-height:320px;overflow:auto}
.fieldkit-result{display:grid;gap:3px;width:100%;padding:9px;text-align:left;color:var(--text);background:rgba(255,255,255,.05);border:1px solid var(--line);border-radius:7px}
.fieldkit-result small{color:var(--muted)}
#fieldkitResults.compact .fieldkit-result{display:flex;justify-content:space-between;gap:6px;padding:5px 8px}
#fieldkitResults.compact .fieldkit-result small{display:none}
.fieldkit-story{display:grid;gap:11px;margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.045)}
.fieldkit-story-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.fieldkit-story-heading h3{margin:0}
.fieldkit-story-heading span{color:var(--muted)}
.fieldkit-progress{height:6px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.12)}
.fieldkit-progress span{display:block;height:100%;width:0;background:#98f5d1;transition:width .15s}
.fieldkit-note{display:grid;gap:8px}
.fieldkit-note label{display:grid;gap:6px}
.fieldkit-note textarea{width:100%;min-height:90px;resize:vertical}
.fieldkit-note small{color:#98f5d1}
#mapStoryContent .detail-body{font-size:calc(1rem * var(--fk-scale,1));line-height:1.65}
#mapStoryContent.fieldkit-focus .story-author-card,#mapStoryContent.fieldkit-focus .studio-story-tools,#mapStoryContent.fieldkit-focus .story-v1-feature-frame,#mapStoryContent.fieldkit-focus .story-v1-meta,#mapStoryContent.fieldkit-focus .story-flags{display:none}
#mapStoryContent.fieldkit-focus .detail-body{font-size:calc(1.13rem * var(--fk-scale,1));line-height:1.85}
@media(max-width:640px){.fieldkit-actions>*{flex:1 1 44%}.fieldkit-story{padding:10px}}
@media(max-width:860px){#mapView.active .map-story-panel:not([hidden]){position:fixed;z-index:650;inset:10px!important;width:auto!important;max-height:none;margin:0;overflow:auto;clip-path:none;padding:16px}}
@media print{
  body.fieldkit-print{overflow:visible;background:#fff;color:#111}
  .fieldkit-print .topbar,.fieldkit-print #map,.fieldkit-print .map-panel,.fieldkit-print .map-search-row,.fieldkit-print .map-readout,.fieldkit-print .map-year-slider-shell,.fieldkit-print .story-panel-top,.fieldkit-print .story-tabs,.fieldkit-print .fieldkit-story,.fieldkit-print .studio-story-tools,.fieldkit-print .detail-actions{display:none!important}
  .fieldkit-print #mapView{display:block!important;position:static!important}
  .fieldkit-print #mapStoryPanel{display:block!important;position:static!important;inset:auto!important;width:100%!important;max-height:none!important;overflow:visible!important;background:#fff!important;color:#111!important;box-shadow:none!important}
  .fieldkit-print .story-tab-panel[data-story-tab-panel="story"]{display:block!important}
  .fieldkit-print .story-tab-panel:not([data-story-tab-panel="story"]){display:none!important}
}
/* Investigation extensions */
.investigation-story,.investigation-overview,.investigation-map-tools{display:grid;gap:12px;min-width:0}
.investigation-story details,.investigation-overview details,.investigation-map-tools{padding:12px;border:1px solid rgba(255,255,255,.15);border-radius:12px}
.investigation-story summary,.investigation-overview summary,.investigation-map-tools summary{cursor:pointer;font-weight:700}
.investigation-story form,.investigation-overview form{display:grid;gap:9px;margin:12px 0}
.investigation-story input,.investigation-story textarea,.investigation-story select,.investigation-overview input{max-width:100%;min-width:0}
.investigation-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.1);overflow-wrap:anywhere}
.investigation-row span{flex:1 1 180px}.investigation-row blockquote{flex-basis:100%;margin:0 0 0 12px}
.investigation-media{padding:10px 0;border-bottom:1px solid rgba(255,255,255,.1)}
.investigation-duplicates{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0}
.investigation-overview pre{white-space:pre-wrap;overflow-wrap:anywhere;user-select:all}
.investigation-cluster{background:#d6ae62;color:#191716;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 12px #0008;text-align:center;line-height:34px;font-weight:800}
.investigation-map-tools [data-map-year]{width:min(100%,280px)}
@media(max-width:600px){.investigation-row{align-items:stretch}.investigation-story,.investigation-overview{padding:12px}.investigation-story button,.investigation-overview button{max-width:100%}}
.investigation-redact{width:min(96vw,800px);max-height:94vh;overflow:auto;padding:20px}
.investigation-redact canvas{display:block;width:100%;height:auto;max-height:55vh;object-fit:contain;touch-action:none;cursor:crosshair;background:#111}
.investigation-redact form{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.investigation-redact form input{width:90px;max-width:100%}
.workspace-story,.workspace-overview,.workspace-map-tools{display:grid;gap:12px;min-width:0}
.workspace-story form{display:grid;gap:10px}.workspace-story details,.workspace-overview details,.workspace-map-tools{padding:12px;border:1px solid rgba(255,255,255,.15);border-radius:12px}
.workspace-story summary,.workspace-overview summary,.workspace-map-tools summary{cursor:pointer;font-weight:700}
.workspace-story label,.workspace-overview label{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.workspace-story label input[type="range"]{min-width:140px;flex:1}.workspace-story input,.workspace-story textarea,.workspace-story select{max-width:100%;min-width:0}
.workspace-checks,.workspace-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.workspace-row{padding:8px 0;border-bottom:1px solid rgba(255,255,255,.1);overflow-wrap:anywhere}.workspace-row blockquote{margin:0;flex:1 1 200px}
.workspace-overview details>div{display:grid;gap:7px;padding-top:8px}.workspace-overview details button{text-align:left}
.workspace-lightbox{width:min(96vw,1100px);max-height:96vh;background:#08090e;color:#fff;border:1px solid #d6ae62;border-radius:12px;padding:12px}.workspace-lightbox img{display:block;max-width:100%;max-height:82vh;margin:auto}.workspace-lightbox button{margin-bottom:8px}
.workspace-contrast{filter:contrast(1.28)}.workspace-contrast .leaflet-tile-pane{filter:none}
@media(max-width:600px){.workspace-story,.workspace-overview{padding:12px}.workspace-shortcuts-button{display:none}}
