/* Generated by build.js. Edit client/styles/*.css instead. */

/* ---- client/styles/base.css ---- */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&family=Crimson+Pro:ital,wght@1,400&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
:root {
  --pb: #f8f9fc;
  --ps: #ffffff;
  --pbr: #e2e6ef;
  --pt: #1a1d2e;
  --pm: #6b7280;
  --pa: #3b6ef8;
  --pa2: #e8eeff;
  --ab: #0a0a0c;
  --abr: #1e1e2a;
  --ar: #8b1a1a;
  --ar2: #c0392b;
  --at: #c8c8d0;
  --ad: #5a5a6a;
  --ab2: #e8e8f0;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--pb);
  color: var(--pt);
  min-height: 600px;
  overflow: hidden;
}
body.pro-dark {
  --pb: #0f141e;
  --ps: #141b28;
  --pbr: #273347;
  --pt: #e7edf7;
  --pm: #95a4bc;
  --pa: #6ea3ff;
  --pa2: #1a2a44;
}
#arc-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#arc-bg.active {
  opacity: 0;
}
#arc-bg canvas {
  width: 100%;
  height: 100%;
  display: block;
}
#glo {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
#glo .sc {
  position: absolute;
  width: 100%;
  height: 2px;
  background: rgba(180, 30, 30, 0.5);
  animation: scl 0.12s infinite;
}
@keyframes scl {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}
.gb {
  position: absolute;
  width: 100%;
  height: 3px;
  background: rgba(220, 0, 0, 0.3);
  animation: gba 0.09s infinite;
}
@keyframes gba {
  0% {
    top: 10%;
  }
  25% {
    top: 45%;
    transform: translateX(-8px);
  }
  50% {
    top: 70%;
    transform: translateX(6px);
  }
  75% {
    top: 25%;
    transform: translateX(-4px);
  }
  100% {
    top: 10%;
  }
}


/* ---- client/styles/loading-screen.css ---- */
#lsc {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #050507;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  overflow: hidden;
}
#lsc-data-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  overflow: hidden;
}
#lsc-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      rgba(139, 26, 26, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(139, 26, 26, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
#lsc::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(5, 5, 7, 0.7) 100%
  );
}
#lsc-terminal {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 700px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}
#lsc-header {
  font-size: 11px;
  letter-spacing: 3px;
  color: #7f1b1b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}
#lsc-title-prefix {
  color: #2a0a0a;
}
#lsc-title-blink {
  color: #c0392b;
  animation: lsc-blink 1.1s step-end infinite;
}
@keyframes lsc-blink {
  50% {
    opacity: 0;
  }
}
#lsc-sep-top,
#lsc-sep-bot {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #7f1b1b 20%,
    #c0392b 50%,
    #7f1b1b 80%,
    transparent
  );
  margin: 12px 0;
}
#lsc-status-block {
  margin-bottom: 16px;
}
.lsc-status-main {
  font-size: 15px;
  letter-spacing: 2px;
  color: #c0392b;
  margin-bottom: 4px;
  min-height: 20px;
  text-shadow: 0 0 20px rgba(192, 57, 43, 0.5);
}
.lsc-status-sub {
  font-size: 10px;
  letter-spacing: 1px;
  color: #7f1b1b;
  line-height: 1.6;
  min-height: 16px;
}
#lsc-progress-wrap {
  margin-bottom: 16px;
}
#lsc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #7f1b1b;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
#lsc-prog-pct {
  color: #c0392b;
}
#lsc-progress-track {
  height: 4px;
  background: #1a0505;
  border: 1px solid #2a0808;
  position: relative;
  overflow: hidden;
}
#lsc-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7f1b1b, #c0392b, #ff4444);
  transition: width 0.12s linear;
  position: relative;
}
#lsc-progress-glow {
  position: absolute;
  top: -4px;
  left: 0;
  width: 20px;
  height: 12px;
  background: radial-gradient(
    ellipse,
    rgba(255, 68, 68, 0.8) 0%,
    transparent 70%
  );
  pointer-events: none;
}
#lsc-progress-segments {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}
#lsc-log-wrap {
  background: #0a0203;
  border: 1px solid #1a0505;
  padding: 10px 14px;
  height: 140px;
  overflow: hidden;
  position: relative;
}
#lsc-log-wrap::before {
  content: "SYSTEM LOG";
  position: absolute;
  top: -7px;
  left: 14px;
  background: #050507;
  padding: 0 6px;
  font-size: 9px;
  color: #3a0a0a;
  letter-spacing: 2px;
}
#lsc-log {
  font-size: 10px;
  line-height: 1.7;
  color: #7f1b1b;
  display: flex;
  flex-direction: column;
  gap: 0;
}
#lsc-log .log-line {
  opacity: 0;
  transition: opacity 0.3s;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
#lsc-log .log-line.ok {
  color: #1a6b1a;
}
#lsc-log .log-line.warn {
  color: #c0392b;
}
#lsc-log .log-line.dim {
  color: #2a0a0a;
}
#hack-stream {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.55;
  color: #3a0a0a;
  padding: 8px 20px;
  font-family: "JetBrains Mono", monospace;
  white-space: pre-wrap;
  border-top: 1px solid #1a0505;
  background: linear-gradient(0deg, #050507 0%, transparent 100%);
}
#lsc-corner-tl,
#lsc-corner-tr,
#lsc-corner-bl,
#lsc-corner-br {
  position: absolute;
  font-size: 9px;
  color: #2a0a0a;
  letter-spacing: 1px;
  font-family: "JetBrains Mono", monospace;
  z-index: 10;
}
#lsc-corner-tl {
  top: 16px;
  left: 20px;
}
#lsc-corner-tr {
  top: 16px;
  right: 20px;
  text-align: right;
}
#lsc-corner-bl {
  bottom: 130px;
  left: 20px;
}
#lsc-corner-br {
  bottom: 130px;
  right: 20px;
  text-align: right;
}
@keyframes dataRainCol {
  0% {
    transform: translateY(-20px);
    opacity: 0.3;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}
@media (max-width: 520px) {
  #lsc-terminal {
    padding: 0 14px;
  }
  #lsc-header {
    font-size: 10px;
    letter-spacing: 2px;
  }
  #lsc-status-main {
    font-size: 13px;
  }
}


/* ---- client/styles/shell.css ---- */
#nb {
  background: var(--ps);
  border-bottom: 1px solid var(--pbr);
  padding: 0 18px;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    background 0.8s,
    border-color 0.8s;
  gap: 8px;
}
.nl {
  font-size: 20px;
  font-weight: 600;
  color: var(--pa);
  transition: all 0.8s;
  cursor: default;
}

.nl {
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
}
.nl span {
  color: var(--pt);
}
.ni-wrap {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.ni-wrap::-webkit-scrollbar {
  display: none;
}
.ni {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pm);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  white-space: nowrap;
  font-family: "DM Sans", sans-serif;
}
.ni:hover,
.ni.active {
  background: var(--pa2);
  color: var(--pa);
}
.theme-btn {
  border: 1px solid var(--pbr);
  background: var(--ps);
  color: var(--pm);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  transition: all 0.2s;
}
.theme-btn:hover {
  color: var(--pa);
  border-color: var(--pa);
  background: var(--pa2);
}
.theme-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
  display: none;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}
.online-txt {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #c0392b;
  letter-spacing: 1px;
  display: none;
  white-space: nowrap;
}
.private-pill {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #3a1515;
  background: #14090a;
  color: #e08a8a;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.back-btn {
  display: none;
  background: #1a0a0a;
  color: #c0392b;
  border: 1px solid #2a1a1a;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.back-btn:hover {
  background: #2a0a0a;
  border-color: #c0392b;
}
#ac {
  display: flex;
  height: calc(100dvh - 60px);
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}
#sb {
  width: 240px;
  background: var(--ps);
  border-right: 1px solid var(--pbr);
  padding: 14px 10px;
  flex-shrink: 0;
  transition:
    background 0.8s,
    border-color 0.8s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sl {
  font-size: 12px;
  font-weight: 600;
  color: var(--pm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 8px;
  margin: 0 0 6px;
  transition: color 0.5s;
}
.si {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pm);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  margin-bottom: 4px;
}
.si:hover,
.si.active {
  background: var(--pa2);
  color: var(--pa);
}
.si svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}
.sbadge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  border-radius: 10px;
  padding: 1px 5px;
  font-weight: 600;
}
.sb-sec {
  margin-bottom: 18px;
}
#mc {
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.page {
  display: none;
}
.page.active {
  display: block;
}
.pt {
  font-size: 28px;
  font-weight: 600;
  color: var(--pt);
  margin-bottom: 3px;
  transition: color 0.5s;
}
.ps2 {
  font-size: 14px;
  color: var(--pm);
  margin-bottom: 20px;
  transition: color 0.5s;
}
.sg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .sg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.sc2 {
  background: var(--ps);
  border: 1px solid var(--pbr);
  border-radius: 10px;
  padding: 16px 18px;
  transition: all 0.6s;
}
.scl {
  font-size: 12px;
  color: var(--pm);
  margin-bottom: 5px;
  font-weight: 500;
  transition: color 0.5s;
}
.scv {
  font-size: 24px;
  font-weight: 600;
  color: var(--pt);
  transition: all 0.5s;
}
.scc {
  font-size: 10px;
  color: #16a34a;
  margin-top: 3px;
}
.tw {
  background: var(--ps);
  border: 1px solid var(--pbr);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.6s;
  margin-bottom: 18px;
}
.th2 {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pbr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  transition: border-color 0.5s;
}
.tt {
  font-size: 15px;
  font-weight: 600;
  color: var(--pt);
  transition: color 0.5s;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--pm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--pbr);
  background: var(--pb);
  transition: all 0.5s;
}
td {
  padding: 12px 12px;
  font-size: 13px;
  color: var(--pt);
  border-bottom: 1px solid var(--pbr);
  transition: all 0.4s;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: var(--pb);
}
.sb2 {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
}
.s-ok {
  background: #dcfce7;
  color: #16a34a;
}
.s-w {
  background: #fef3c7;
  color: #d97706;
}
.s-d {
  background: #e0e7ff;
  color: #4f46e5;
}
.s-r {
  background: #fee2e2;
  color: #991b1b;
}
.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--pm);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-icon {
  width: 36px;
  height: 36px;
  opacity: 0.2;
}
.ss {
  background: var(--ps);
  border: 1px solid var(--pbr);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  transition: all 0.6s;
}
.ss h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pbr);
}
.fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 500px) {
  .fr {
    grid-template-columns: 1fr;
  }
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fg label {
  font-size: 11px;
  font-weight: 500;
  color: var(--pm);
}
.fg input,
.fg select {
  background: var(--pb);
  border: 1px solid var(--pbr);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: "DM Sans", sans-serif;
  color: var(--pt);
  outline: none;
  transition: border-color 0.2s;
}
.fg input:focus {
  border-color: var(--pa);
}
.lic {
  background: var(--pb);
  border: 1px solid var(--pbr);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: "DM Sans", sans-serif;
  color: var(--pt);
  outline: none;
  width: 100%;
  transition: all 0.2s;
}
.fgf {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.fgf label {
  font-size: 11px;
  font-weight: 500;
  color: var(--pm);
}
.fh {
  font-size: 12px;
  line-height: 1.45;
  color: var(--pm);
  opacity: 0.9;
}
.bp {
  background: var(--pa);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: opacity 0.2s;
}
.bp:hover {
  opacity: 0.88;
}
.cw {
  background: var(--ps);
  border: 1px solid var(--pbr);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  transition: all 0.6s;
}
.ci {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 92px;
  margin-top: 12px;
}
.bc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}
.bar {
  border-radius: 3px 3px 0 0;
  width: 100%;
  transition:
    height 0.5s,
    background 1s;
  min-height: 2px;
}
.brl {
  font-size: 10px;
  color: var(--pm);
  transition: color 0.5s;
  text-align: center;
  line-height: 1.25;
}
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#stats-bars {
  height: 112px;
  gap: 10px;
  align-items: flex-end;
}
#stats-bars .bc {
  gap: 6px;
}
#stats-bars .bar {
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
#stats-bars .brl {
  font-size: 11px;
  letter-spacing: 0.5px;
}
@media (max-width: 760px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
body.glitch {
  animation: bgl 0.1s infinite;
}
@keyframes bgl {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 1px);
  }
  40% {
    transform: translate(2px, -1px);
  }
  60% {
    transform: translate(-1px, 2px);
  }
  80% {
    transform: translate(1px, -2px);
  }
  100% {
    transform: translate(0);
  }
}
.gtxt {
  animation: gtt 0.15s infinite;
}
@keyframes gtt {
  0% {
    clip-path: none;
  }
  30% {
    clip-path: inset(20% 0 60% 0);
    transform: translateX(-3px);
  }
  60% {
    clip-path: inset(50% 0 30% 0);
    transform: translateX(3px);
  }
  100% {
    clip-path: none;
  }
}


/* ---- client/styles/archives.css ---- */
body.arc {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-y: auto !important;
}

body.arc::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
  background: transparent !important;
}

body.arc {
  background: var(--ab);
}

body.arc .theme-btn {
  display: none;
}
body.arc #nb {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc .nl {
  color: #c8c8d0;
}
body.arc .private-pill {
  display: inline-flex;
}
body.arc .ni:hover,
body.arc .ni.active {
  background: #1a0a0a;
  color: var(--ar2);
}
body.arc #sb {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc .si {
  color: var(--ad);
}
body.arc .si:hover,
body.arc .si.active {
  background: #1a0a0a;
  color: var(--ar2);
}
body.arc .sl {
  color: #3a3a4a;
}
body.arc .sc2 {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc .scl {
  color: #4a4a5a;
}
body.arc .scv {
  color: var(--ab2);
}
body.arc .scc {
  color: #4a4a5a;
}
body.arc .tw {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc th {
  background: var(--ab);
  color: #4a4a5a;
  border-color: #1a1a24;
}
body.arc td {
  color: var(--at);
  border-color: #1a1a24;
}
body.arc tr:hover td {
  background: #0f0f13;
}
body.arc .tt {
  color: var(--ab2);
}
body.arc .ss {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc .ss h3 {
  color: var(--ab2);
  border-color: #1a1a24;
}
body.arc .cw {
  background: #0d0d10;
  border-color: #1a1a24;
}
body.arc .brl {
  color: #4a4a5a;
}
body.arc .pt {
  color: var(--ab2);
}
body.arc .ps2 {
  color: #4a4a5a;
}
body.arc .th2 {
  border-color: #1a1a24;
}
body.arc .bp {
  background: var(--ar);
  border: 1px solid var(--ar2);
}
body.arc .empty-state {
  color: #3a3a4a;
}
body.arc::after {
  content: none;
}
@keyframes flk {
  0%,
  100% {
    opacity: 1;
  }
  96% {
    opacity: 0.88;
  }
  97% {
    opacity: 1;
  }
}
.dg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 640px) {
  .dg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 400px) {
  .dg {
    grid-template-columns: 1fr;
  }
}
.dc {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
  overflow: hidden;
}
.dc {
  position: relative;
}

/* conteneur icône */
.mood {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  z-index: 5;
  pointer-events: none;
}

/* SVG */
.mood-icon {
  width: 100%;
  height: 100%;
  color: var(--mood-color, #9ca3af);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}

/* couleurs selon menace */
.mood-s { --mood-color: #16a34a; } /* vert */
.mood-i { --mood-color: #d97706; } /* orange */
.mood-p { --mood-color: #dc2626; } /* rouge */
.mood-a { --mood-color: #374151; } /* gris */
.dc:hover {
  border-color: #2a1a1a;
  background: #0f0f14;
}
.dc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.did {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ar2);
  letter-spacing: 2px;
  margin-bottom: 5px;
}
.dn {
  font-size: 16px;
  font-weight: 600;
  color: var(--ab2);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp {
  font-size: 12px;
  color: var(--ad);
  margin-bottom: 8px;
  line-height: 1.45;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dbadges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.db {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}
.dr {
  background: #2a0a0a;
  color: #c0392b;
  border: 1px solid #3a1a1a;
}
.da {
  background: #2a1a00;
  color: #d97706;
  border: 1px solid #3a2a00;
}
.dg2 {
  background: #001a0a;
  color: #16a34a;
  border: 1px solid #002a10;
}
.dgy {
  background: #1a1a1a;
  color: #6b7280;
  border: 1px solid #2a2a2a;
}
.db-btm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.tbw {
  height: 3px;
  background: #1a1a24;
  border-radius: 2px;
  flex: 1;
  margin-right: 8px;
  overflow: hidden;
}
.tb {
  height: 100%;
  border-radius: 2px;
}
.dns {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ad);
}
.obs-bar-wrap {
  margin-top: 6px;
}
.obs-bar-label {
  font-size: 10px;
  color: #3a3a4a;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.obs-bar-bg {
  height: 5px;
  background: #1d1215;
  border-radius: 3px;
  overflow: hidden;
}
.obs-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition:
    width 0.45s,
    background 0.35s,
    box-shadow 0.35s;
}
.last-seen {
  font-size: 10px;
  color: #2a2a3a;
  font-family: "JetBrains Mono", monospace;
  margin-top: 5px;
}
#mo {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  overflow: hidden;
}
#mb {
  background: #0d0d10;
  border: 1px solid #2a1a1a;
  border-radius: 12px;
  width: min(94vw, 1180px);
  max-width: 1180px;
  max-height: 92vh;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}
#mcon {
  overflow: auto;
  max-height: calc(92vh - 40px);
  padding-right: 4px;
}
.mh {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1a1a24;
  align-items: flex-start;
}
.mav {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #1a0a0a;
  border: 1px solid #2a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: var(--ad);
}
.mav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.mid2 {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ar2);
  letter-spacing: 2px;
  margin-bottom: 3px;
}
.mname {
  font-size: 16px;
  font-weight: 600;
  color: var(--ab2);
  margin-bottom: 3px;
}
.mmeta {
  font-size: 12px;
  color: var(--ad);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.avatar-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #2a1a1a;
  background: #0a0a0d;
  object-fit: cover;
  display: block;
}
.avatar-empty {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px dashed #2a2a34;
  background: #0a0a0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #4a4a5a;
  font-family: "JetBrains Mono", monospace;
}
.obs-media {
  margin-top: 6px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #1f1f2a;
  display: block;
}
.mav img,
.avatar-preview,
.obs-media {
  cursor: zoom-in;
}
#img-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(4, 4, 8, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
#img-zoom-overlay.active {
  display: flex;
}
#img-zoom-view {
  max-width: min(94vw, 1800px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #2a1a1a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.paste-zone {
  margin-top: 6px;
  padding: 10px;
  border: 1px dashed #3a2323;
  border-radius: 8px;
  background: #0d0d12;
  font-size: 12px;
  line-height: 1.45;
  color: #b1b5c4;
  font-family: "JetBrains Mono", monospace;
}
.obs-inline-preview {
  margin: 2px 0 6px;
}
.obs-inline-preview-box {
  position: relative;
  display: inline-block;
}
.obs-inline-preview-box img {
  max-height: 84px;
  max-width: 220px;
  border-radius: 6px;
  border: 1px solid #2a1a1a;
  object-fit: cover;
  display: block;
}
.obs-inline-preview-clear {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #1a0505;
  border: 1px solid #c0392b;
  color: #c0392b;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.obs-inline-preview-label {
  font-size: 9px;
  color: #5a5a6a;
  font-family: "JetBrains Mono", monospace;
  margin-top: 4px;
}
.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .mgrid {
    grid-template-columns: 1fr;
  }
}
.mf {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 9px;
}
.mf label {
  font-size: 10px;
  color: #4a4a5a;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}
.mf p {
  font-size: 13px;
  color: var(--at);
}
.mobs {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 12px;
}
.mobs h4 {
  font-size: 10px;
  color: #4a4a5a;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: "JetBrains Mono", monospace;
}
.oe {
  border-left: 2px solid #1a1a24;
  padding: 5px 0 5px 10px;
  margin-bottom: 7px;
}
.od {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: var(--ar2);
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ot {
  font-size: 14px;
  color: var(--ad);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.del-btn {
  background: none;
  color: #4a4a5a;
  border: 1px solid #2a2a2a;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  transition: all 0.2s;
  margin-top: 3px;
}
.del-btn:hover {
  background: #1a0505;
  color: #c0392b;
  border-color: #3a1515;
}
.mobs #obs-list {
  max-height: 42vh;
  overflow: auto;
  padding-right: 4px;
}
.mobs input {
  font-size: 13px !important;
}
.je {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-left: 2px solid var(--ar);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}
.jd {
  font-size: 15px;
  font-family: "JetBrains Mono", monospace;
  color: var(--ar2);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.jt2 {
  font-size: 22px;
  color: #8a8a9a;
  font-weight: 500;
  margin-bottom: 4px;
}
.jtxt {
  font-size: 28px;
  color: var(--ad);
  line-height: 1.8;
  font-family: "Crimson Pro", serif;
  font-style: italic;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.jsig {
  font-size: 10px;
  color: #2a2a3a;
  font-family: "JetBrains Mono", monospace;
}
.af {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.af h3 {
  font-size: 11px;
  color: var(--ab2);
  margin-bottom: 10px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 1px;
}
.afg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 480px) {
  .afg {
    grid-template-columns: 1fr;
  }
}
.af input,
.af select,
.af textarea {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 15px;
  font-family: "DM Sans", sans-serif;
  color: var(--at);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.af textarea {
  resize: vertical;
  min-height: 60px;
}
.af select option {
  background: #0d0d10;
}
.ba {
  background: #1a0a0a;
  color: var(--ar2);
  border: 1px solid #2a1a1a;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.ba:hover {
  background: #2a0a0a;
  border-color: var(--ar2);
}
.ba:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ba-can {
  background: #0a0a0d;
  color: #4a4a5a;
  border: 1px solid #1a1a24;
  margin-left: 6px;
}
#ns {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.notif {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-left: 3px solid var(--ar2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--ad);
  font-family: "JetBrains Mono", monospace;
  animation: nin 0.3s ease;
  min-width: 200px;
  max-width: 260px;
}
@keyframes nin {
  from {
    transform: translateX(14px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.nt {
  color: var(--at);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.global-admin-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9050;
  width: min(92vw, 620px);
  max-height: 82vh;
  overflow: auto;
  background: #0d0d10;
  border: 1px solid #1f1f2a;
  border-left: 4px solid #6ea3ff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  animation: gapIn 0.25s ease;
}
.global-admin-popup.info {
  border-left-color: #6ea3ff;
}
.global-admin-popup.alert {
  border-left-color: #d97706;
}
.global-admin-popup.urgent {
  border-left-color: #c0392b;
}
.global-admin-popup-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #d9e6ff;
  margin-bottom: 6px;
}
.global-admin-popup-msg {
  font-size: 14px;
  line-height: 1.45;
  color: #e8e8f0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.global-admin-popup-close {
  margin-top: 10px;
  background: #111722;
  border: 1px solid #2b3a55;
  color: #a9bee3;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
}
.global-admin-popup-close:hover {
  background: #16243b;
  color: #dce8ff;
  border-color: #4b6ea5;
}
body.arc .global-admin-popup {
  background: #120f14;
  border-color: #2a1a1a;
}
body.arc .global-admin-popup-title {
  color: #ffd9de;
}
body.arc .global-admin-popup-msg {
  color: #f3e8eb;
}
body.arc .global-admin-popup-close {
  background: #1a0e14;
  border-color: #3a1a25;
  color: #e1b7bf;
}
body.arc .global-admin-popup-close:hover {
  background: #2a1018;
  border-color: #8b1a1a;
  color: #ffdbe1;
}
@keyframes gapIn {
  from {
    opacity: 0;
    transform: translate(-50%, -52%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 80px;
    padding: 10px;

    border: 2px dashed #8b5cf6;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.upload-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    opacity: 0;
    cursor: pointer;
}


/* ---- client/styles/map-network.css ---- */
#page-map {
  position: absolute;
  inset: 0;
  display: none;
}

#page-map.active {
  display: block;
}

#mc.map-open {
  padding: 0 !important;
  overflow: hidden !important;
}

#gta-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #08080b;
  touch-action: none;
}
#gta-map .leaflet-image-layer {
  image-rendering: auto;
}

/* Floating toolbar */
.map-toolbar {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10, 10, 14, 0.88);
  border: 1px solid #2a2a36;
  border-radius: 10px;
  padding: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  max-height: calc(100% - 28px);
  overflow-y: auto;
  scrollbar-width: none;
}
.map-toolbar::-webkit-scrollbar {
  display: none;
}
.map-tool-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #6b7280;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.map-tool-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.map-tool-btn:hover {
  background: #1a1a24;
  color: #c8c8d0;
  border-color: #2a2a36;
}
.map-tool-btn.active {
  background: #1a0a0a;
  color: #c0392b;
  border-color: #3a1515;
}
.map-tool-sep {
  height: 1px;
  background: #2a2a36;
  margin: 2px 0;
}
.map-tool-btn.map-tool-finish {
  color: #16a34a;
  border-color: #1a3a1a;
  background: #0a1a0a;
}
.map-tool-btn.map-tool-finish:hover {
  background: #112a11;
  color: #22c55e;
  border-color: #22c55e;
}

/* Color palette - appears to the left of the toolbar */
.map-color-bar {
  position: absolute;
  top: 50%;
  right: 68px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(10, 10, 14, 0.88);
  border: 1px solid #2a2a36;
  border-radius: 10px;
  padding: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
}
.map-cdot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    transform 0.12s,
    border-color 0.12s;
  display: block;
}
.map-cdot:hover {
  transform: scale(1.18);
}
.map-cdot.active {
  border-color: #fff;
  transform: scale(1.1);
}

/* Status bar */
.map-status-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(10, 10, 14, 0.82);
  border: 1px solid #2a2a36;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 0.8px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.map-status-bar.mode-active {
  color: #c0392b;
  border-color: #3a1515;
}

/* Inline drawing hint */
.map-draw-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(10, 10, 14, 0.82);
  border: 1px solid #2a2a36;
  border-radius: 6px;
  padding: 4px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: #5a5a6a;
  letter-spacing: 0.8px;
  pointer-events: none;
}

/* Flag marker */
.map-flag-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.map-flag-marker svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* Sticky / post-it */
.map-sticky-marker {
  background: #1e1a0f;
  border: 1px solid #4a3a10;
  border-radius: 4px;
  padding: 5px 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #d4c070;
  max-width: 160px;
  min-width: 80px;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.5);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  cursor: pointer;
}
.map-sticky-marker::before {
  content: "";
  display: block;
  height: 3px;
  background: #6a5520;
  margin: -5px -7px 5px;
  border-radius: 3px 3px 0 0;
}

/* Popup dark overrides already in archives.css */
.map-controls {
  display: none;
}
.map-help,
.map-legend {
  display: none;
}
#map-mode-label {
  /* replaced by .map-status-bar */
}
.map-error {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  color: #8a8a98;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.map-error strong {
  color: #c0392b;
  font-size: 13px;
  letter-spacing: 1px;
}
.map-error small {
  max-width: 620px;
  color: #5a5a6a;
  font-size: 10px;
}
.dark-popup .leaflet-popup-content-wrapper {
  border: 1px solid #2a1a1a;
  border-radius: 8px;
  background: #0d0d10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  color: #c8c8d0;
  padding: 0;
}
.dark-popup .leaflet-popup-content {
  margin: 10px 14px;
}
.dark-popup .leaflet-popup-tip {
  background: #0d0d10;
}
.dark-popup .leaflet-popup-close-button {
  color: #5a5a6a !important;
}
.map-popup-card {
  min-width: 145px;
  color: #c8c8d0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.map-popup-id {
  margin-bottom: 3px;
  color: #c0392b;
  font-size: 10px;
}
.map-popup-name {
  margin-bottom: 5px;
  color: #e8e8f0;
  font-weight: 700;
}
.map-popup-meta {
  margin-bottom: 7px;
  color: #6a6a78;
  font-size: 10px;
}
.map-popup-open {
  width: 100%;
  border: 1px solid #c0392b;
  border-radius: 4px;
  padding: 5px 8px;
  background: #1a0a0a;
  color: #c0392b;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}
.map-popup-open:hover {
  background: #2a0d0d;
  color: #f06a5d;
}
.map-popup-remove {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #3a1a1a;
  border-radius: 4px;
  padding: 5px 8px;
  background: #120909;
  color: #9f6464;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}
.map-popup-remove:hover {
  border-color: #c0392b;
  color: #f06a5d;
}
.map-subject-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #c0392b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d12;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #e8e8f0;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  user-select: none;
}
.map-subject-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.map-free-pin {
  width: 14px;
  height: 14px;
  background: #6b7a9a;
  border: 2px solid #9aaac4;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.map-free-input {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0;
  padding: 5px 8px;
  background: #0a0a0d;
  border: 1px solid #2a2a3a;
  border-radius: 4px;
  color: #c8c8d0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  outline: none;
}
.map-free-input:focus {
  border-color: #6b7a9a;
}
.new-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #c0392b;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  animation: new-dot-blink 1.3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes new-dot-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.1;
  }
}
.jrn-photo {
  max-width: 100%;
  max-height: 320px;
  border-radius: 6px;
  border: 1px solid #1a1a24;
  margin-top: 8px;
  display: block;
  object-fit: contain;
}
.jrn-photo-preview-wrap {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}
.jrn-photo-preview-wrap img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 6px;
  border: 1px solid #2a1a1a;
  display: block;
  object-fit: contain;
}
.jrn-photo-clear {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #1a0505;
  border: 1px solid #c0392b;
  color: #c0392b;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.jrn-paste-hint {
  font-size: 10px;
  color: #3a3a4a;
  font-family: "JetBrains Mono", monospace;
  margin-top: 4px;
}
.dd-map-pin-btn {
  padding: 4px 10px;
  border-color: #3a1a1a;
  color: #c0392b;
  font-size: 10px;
}
.dd-map-remove-btn {
  border-color: #3a1a1a;
  color: #9f6464;
}
@media (max-width: 520px) {
  .map-toolbar {
    top: auto;
    bottom: 52px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    max-height: none;
    max-width: calc(100% - 28px);
    overflow-x: auto;
    overflow-y: visible;
  }
  .map-color-bar {
    top: auto;
    right: 50%;
    bottom: 106px;
    transform: translateX(50%);
    flex-direction: row;
  }
  .map-status-bar {
    bottom: 8px;
  }
}
#nc {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  width: 100%;
  height: 320px;
  cursor: grab;
  display: block;
  touch-action: none;
}
#nc:active {
  cursor: grabbing;
}
.net-help {
  color: #4a4a5a;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
}
.nc-controls {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  flex-wrap: wrap;
  align-items: center;
}
.nc-btn {
  background: #1a0a0a;
  color: var(--ad);
  border: 1px solid #1a1a24;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}
.nc-btn:hover {
  border-color: #8b1a1a;
  background: #240d0d;
  color: var(--ar2);
}
.nc-controls-note,
.nc-legend {
  color: #4a4a5a;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}
.nc-legend {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
#nc.net-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 4000;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}
body.net-full-open {
  overflow: hidden;
}
body.net-full-open .nc-controls {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4100;
  margin: 0;
  padding: 8px;
  border: 1px solid #2a1a1a;
  border-radius: 8px;
  background: rgba(10, 10, 13, 0.92);
}
body.net-full-open .nc-controls-note {
  display: none;
}
#net-tooltip {
  display: none;
  position: fixed;
  z-index: 4500;
  max-width: 220px;
  padding: 8px 12px;
  pointer-events: none;
  background: #0d0d10;
  border: 1px solid #2a1a1a;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.net-tooltip-id {
  margin-bottom: 2px;
  color: #c0392b;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}
.net-tooltip-name {
  margin-bottom: 2px;
  color: #e8e8f0;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.net-tooltip-meta {
  color: #8a8a98;
  font-size: 10px;
  line-height: 1.4;
}
#cdialog {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#cdbox {
  background: #0d0d10;
  border: 1px solid #2a1a1a;
  border-radius: 10px;
  padding: 20px;
  max-width: 300px;
  text-align: center;
  width: 100%;
}
#cdbox p {
  font-size: 12px;
  color: var(--at);
  margin-bottom: 16px;
  line-height: 1.6;
}
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.search-bar input {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
  color: var(--at);
  outline: none;
  flex: 1;
  min-width: 120px;
}
.search-bar select {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
  color: var(--ad);
  outline: none;
}
.search-bar select option {
  background: #0d0d10;
}


/* ---- client/styles/chronology.css ---- */
.chrono-list-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.chrono-row {
  width: 100%;
  text-align: left;
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 8px 10px;
  color: #c8c8d0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.chrono-row:hover {
  border-color: #3a1515;
  background: #110d12;
}
.chrono-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.chrono-row-date {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: #8b1a1a;
}
.chrono-row-id {
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  color: #a5a5b3;
  letter-spacing: 0.6px;
}
.chrono-row-name {
  font-size: 15px;
  font-weight: 600;
  color: #e8e8f0;
}
.chrono-row-sub {
  font-size: 12px;
  color: #8a8a98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chrono-day-header {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: #3a3a4a;
  letter-spacing: 2px;
  padding: 10px 4px 4px;
  border-bottom: 1px solid #1a1a24;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.chrono-row-loc {
  font-size: 11px;
  color: #6b7280;
  font-family: "JetBrains Mono", monospace;
}
#chrono-search,
#chrono-filter-dos,
#chrono-filter-period {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
}
#chrono-search:focus,
#chrono-filter-dos:focus,
#chrono-filter-period:focus {
  border-color: #3a1515;
}
#chrono-filter-dos option,
#chrono-filter-period option {
  background: #0d0d10;
}
.chrono-list-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
#chrono-subject-search {
  flex: 1;
  min-width: 220px;
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
}
#chrono-subject-search:focus {
  border-color: #3a1515;
}
.chrono-subject-card {
  display: block;
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  margin-bottom: 8px;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.chrono-subject-card:hover {
  border-color: #3a1515;
  background: #110d12;
}
.chrono-subject-id {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: #c0392b;
  letter-spacing: 2px;
  margin-bottom: 3px;
}
.chrono-subject-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #e8e8f0;
}
.chrono-subject-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chrono-subject-avatar-wrap {
  width: 48px;
  flex: 0 0 48px;
}
.chrono-subject-avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #2a2a36;
  background: #09090c;
}
.chrono-subject-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #1f1f2a;
  background: #121218;
  color: #c8c8d0;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}
.chrono-subject-content {
  min-width: 0;
  flex: 1;
}
.chrono-subject-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chrono-subject-identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.chrono-subject-meta {
  display: block;
  font-size: 11px;
  color: #7a7a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chrono-subject-count {
  display: block;
  font-size: 11px;
  color: #5a5a6a;
  font-family: "JetBrains Mono", monospace;
}
.chrono-subject-last {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #8a8ea0;
  font-family: "JetBrains Mono", monospace;
  margin-top: 4px;
}
.chrono-subject-actions {
  border-top: 1px solid #1a1a24;
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.chrono-mini-link {
  background: transparent;
  border: 1px solid #2a1a1a;
  color: #6b7a8a;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 9px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
}
.chrono-mini-link:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.chrono-detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.chrono-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f0f13;
  border: 1px solid #1a1a24;
  color: #c8c8d0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  margin-bottom: 0;
  transition: all 0.2s;
}
.chrono-detail-back:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.chrono-open-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a0a0a;
  border: 1px solid #2a1a1a;
  color: #c0392b;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  transition: all 0.2s;
}
.chrono-open-profile:hover {
  background: #2a0a0a;
  border-color: #c0392b;
}
.chrono-detail-title {
  margin-bottom: 16px;
}
.chrono-detail-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #c0392b;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.chrono-detail-name {
  font-size: 20px;
  font-weight: 700;
  color: #e8e8f0;
}
.chrono-obs-item {
  border-left: 2px solid #1a1a24;
  padding: 8px 0 8px 14px;
  margin-bottom: 10px;
}
.chrono-obs-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.chrono-obs-date {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: #c0392b;
}
.chrono-obs-loc {
  font-size: 10px;
  color: #5a5a6a;
  font-family: "JetBrains Mono", monospace;
}
.chrono-obs-text {
  font-size: 12px;
  color: #c8c8d0;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chrono-add-form {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chrono-add-form input,
.chrono-add-form textarea {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
  width: 100%;
}
.chrono-add-form textarea {
  min-height: 70px;
  resize: vertical;
}
.chrono-add-form input:focus,
.chrono-add-form textarea:focus {
  border-color: #c0392b;
}
#chrono-filter-loc {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
  width: 100%;
}
#chrono-filter-loc:focus {
  border-color: #c0392b;
}
.pager {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pager-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #6a6a7a;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
}
.pager-actions {
  display: flex;
  gap: 8px;
}
.pager-btn {
  background: #0a0a0d;
  color: #b9b9c8;
  border: 1px solid #242432;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  transition: all 0.2s;
}
.pager-btn:hover {
  background: #11111a;
  border-color: #3a3a4a;
  color: #e4e4ee;
}
.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#pro-footer {
  display: none;
}
#admin-open-link {
  display: none !important;
}
body.arc #pro-footer {
  display: none;
}


/* ---- client/styles/admin.css ---- */
.admin-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 14, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-auth-dialog {
  width: min(360px, 96vw);
  background: #fff;
  border: 1px solid #dde4ef;
  border-radius: 12px;
  padding: 16px;
}
.admin-auth-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1d2e;
  margin-bottom: 10px;
}
.admin-auth-dialog input {
  width: 100%;
  background: #f7f9fc;
  border: 1px solid #d7deeb;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: "DM Sans", sans-serif;
  color: #1a1d2e;
  outline: none;
}
.admin-auth-dialog input:focus {
  border-color: #3b6ef8;
}
.admin-auth-error {
  font-size: 11px;
  color: #c0392b;
  min-height: 16px;
  margin-top: 6px;
}
.admin-auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.admin-lite-btn {
  background: #fff !important;
  color: #5f6b7e !important;
  border: 1px solid #d7deeb !important;
}
.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 9001;
  background: #eef2f7;
  padding: 10px;
}
.admin-shell {
  height: 100%;
  border: 1px solid #d8e0ec;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3e9f3;
  background: #fff;
}
.admin-title {
  font-size: 18px;
  color: #1a1d2e;
  font-weight: 700;
}
.admin-subtitle {
  font-size: 11px;
  color: #6a7384;
  margin-top: 2px;
}
.admin-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-hamburger {
  display: none;
  border: 1px solid #d6deeb;
  background: #fff;
  color: #324056;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.admin-theme-btn {
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid #d6deeb !important;
}
.admin-logout-btn {
  background: #1a0a0a !important;
  color: #c0392b !important;
  border: 1px solid #3a1a1a !important;
}
.admin-body {
  display: flex;
  min-height: 0;
  flex: 1;
}
.admin-sidebar {
  width: 220px;
  background: #f8fbff;
  border-right: 1px solid #e3e9f3;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-nav-spacer {
  flex: 1 1 auto;
  min-height: 8px;
}
.admin-nav-btn {
  border: 1px solid #d8e2ef;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.admin-nav-btn.active,
.admin-nav-btn:hover {
  border-color: #3b6ef8;
  color: #1f4fd5;
  background: #edf3ff;
}
.admin-view {
  flex: 1;
  padding: 14px;
  overflow: auto;
  background: #fff;
}
.admin-card {
  background: #fff;
  border: 1px solid #e3e9f3;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.admin-card h3 {
  font-size: 14px;
  color: #1a1d2e;
  margin-bottom: 8px;
}
.admin-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-kv div {
  background: #f8fbff;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  padding: 8px;
}
.admin-kv label {
  display: block;
  font-size: 10px;
  color: #6a7384;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}
.admin-kv span {
  font-size: 12px;
  color: #1f2937;
  overflow-wrap: anywhere;
}
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  background: #f8fbff;
  border: 1px solid #d7deeb;
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 12px;
  color: #1f2937;
  outline: none;
  font-family: "DM Sans", sans-serif;
}
.admin-textarea {
  min-height: 70px;
  resize: vertical;
}
.admin-danger {
  background: #6b0f0f !important;
  border: 1px solid #8d1b1b !important;
  color: #fff !important;
}
.admin-muted {
  font-size: 11px;
  color: #6a7384;
}
.admin-log {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  padding: 8px;
  background: #f8fbff;
}

/* Administration dark mode */
.admin-log-line {
  font-size: 11px;
  color: #334155;
  padding: 4px 0;
  border-bottom: 1px dashed #d9e2ef;
}
.admin-log-line:last-child {
  border-bottom: none;
}
.admin-panel.admin-dark {
  background: #0f141e;
}
.admin-panel.admin-dark .admin-shell {
  background: #131a26;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-head {
  background: #131a26;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-title {
  color: #e7edf7;
}
.admin-panel.admin-dark .admin-subtitle {
  color: #95a4bc;
}
.admin-panel.admin-dark .admin-body {
  background: #131a26;
}
.admin-panel.admin-dark .admin-sidebar {
  background: #0f141e;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-nav-btn {
  background: #141b28;
  border-color: #273347;
  color: #95a4bc;
}
.admin-panel.admin-dark .admin-nav-btn.active,
.admin-panel.admin-dark .admin-nav-btn:hover {
  background: #1a2a44;
  border-color: #6ea3ff;
  color: #cfe0ff;
}
.admin-panel.admin-dark .admin-view {
  background: #131a26;
}
.admin-panel.admin-dark .admin-card {
  background: #141b28;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-card h3 {
  color: #e7edf7;
}
.admin-panel.admin-dark .admin-kv div {
  background: #0f141e;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-kv label {
  color: #95a4bc;
}
.admin-panel.admin-dark .admin-kv span {
  color: #e7edf7;
}
.admin-panel.admin-dark .admin-muted {
  color: #95a4bc;
}
.admin-panel.admin-dark .admin-log {
  background: #0f141e;
  border-color: #273347;
}
.admin-panel.admin-dark .admin-log-line {
  color: #c8d3e6;
  border-bottom-color: #273347;
}
.admin-panel.admin-dark .admin-input,
.admin-panel.admin-dark .admin-select,
.admin-panel.admin-dark .admin-textarea {
  background: #0f141e;
  border-color: #273347;
  color: #e7edf7;
}
.admin-panel.admin-dark .admin-theme-btn {
  background: #1a2a44 !important;
  border-color: #6ea3ff !important;
  color: #dbe7ff !important;
}
.admin-panel.admin-dark .admin-hamburger {
  background: #141b28;
  border-color: #273347;
  color: #c8d3e6;
}
@media (max-width: 900px) {
  .admin-hamburger {
    display: inline-flex;
  }
  .admin-sidebar {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 58px;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .admin-nav-spacer {
    display: none;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
}
@media (max-width: 640px) {
  .admin-kv {
    grid-template-columns: 1fr;
  }
}


/* ---- client/styles/subject-detail.css ---- */
.dd-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f0f13;
  border: 1px solid #1a1a24;
  color: #c8c8d0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  width: max-content;
  transition: all 0.2s;
}
.dd-back:hover {
  border-color: #3a1a1a;
  color: #c0392b;
}
.dd-block {
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-radius: 10px;
  padding: 14px;
}
.dd-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.dd-label-row-toggle {
  padding: 7px 10px;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  background: #0b0f16;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s;
  margin-bottom: 10px;
}
.dd-label-row-toggle:hover {
  border-color: #31425f;
  background: #111a2a;
}
.dd-label-row-toggle.open {
  border-color: #4b6ea5;
  background: #142236;
}
.dd-label-row-toggle:focus-visible {
  outline: 2px solid #6ea3ff;
  outline-offset: 1px;
}
.dd-section-toggle {
  background: #0f131b;
  border: 1px solid #243248;
  color: #90a5ca;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  transition: all 0.2s;
}
.dd-label-row-toggle .dd-section-toggle {
  pointer-events: none;
}
.dd-section-toggle:hover {
  background: #18253b;
  border-color: #4b6ea5;
  color: #d6e5ff;
}
.dd-section-toggle.active {
  background: #1e2d47;
  border-color: #6ea3ff;
  color: #ffffff;
}
body.arc .dd-label-row-toggle {
  background: #110d12;
  border-color: #2a1a1a;
}
body.arc .dd-label-row-toggle:hover {
  background: #1a1116;
  border-color: #3a222a;
}
body.arc .dd-label-row-toggle.open {
  background: #1f0f16;
  border-color: #8b1a1a;
}
body.arc .dd-label-row-toggle:focus-visible {
  outline-color: #c0392b;
}
body.arc .dd-section-toggle {
  background: #140f14;
  border-color: #2a1a1a;
  color: #b9a7ae;
}
body.arc .dd-section-toggle:hover {
  background: #1b1116;
  border-color: #3a222a;
  color: #f0dbe0;
}
body.arc .dd-section-toggle.active {
  background: #2a0e14;
  border-color: #8b1a1a;
  color: #ffd7dd;
}
.dd-quick-block {
  padding: 12px 14px;
}
.dd-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dd-quick-meta {
  margin-top: 8px;
  font-size: 11px;
  color: #6f7a90;
  line-height: 1.45;
}
.dd-quick-btn {
  background: #11141c;
  border-color: #283246;
  color: #9fb6de;
}
.dd-quick-btn:hover {
  background: #1a2538;
  border-color: #4b6ea5;
  color: #d6e5ff;
}
.dd-quick-btn.active {
  background: #1e2d47;
  border-color: #6ea3ff;
  color: #ffffff;
}
body.arc .dd-quick-btn {
  background: #120f14;
  border-color: #2a1a1a;
  color: #b9a7ae;
}
body.arc .dd-quick-btn:hover {
  background: #1b1116;
  border-color: #3a222a;
  color: #f0dbe0;
}
body.arc .dd-quick-btn.active {
  background: #2a0e14;
  border-color: #8b1a1a;
  color: #ffd7dd;
}
body.arc .dd-quick-meta {
  color: #7e7278;
}
.dd-compose-block {
  border-style: dashed;
}
.dd-compose-panel {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 10px;
}
.dd-compose-panel + .dd-compose-panel {
  margin-top: 8px;
}
.dd-label {
  font-size: 11px;
  color: #5a5a6a;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 1.4px;
  margin-bottom: 10px;
}
.dd-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.dd-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 19px;
  letter-spacing: 2px;
  color: #c0392b;
}
.dd-name {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #e8e8f0;
  margin-top: 4px;
}
.dd-inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.dd-last {
  font-size: 14px;
  line-height: 1.4;
  color: #c4c8d6;
  margin-top: 10px;
}
.dd-row {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 10px;
}
.dd-photo {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid #2a1a1a;
  background: #0a0a0d;
  object-fit: cover;
  display: block;
}
.dd-photo-empty {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px dashed #2a2a34;
  background: #0a0a0d;
  color: #4a4a5a;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dd-photo-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.dd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 520px) {
  .dd-grid {
    grid-template-columns: 1fr;
  }
  .dd-row {
    grid-template-columns: 1fr;
  }
}
.dd-field {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 8px;
}
.dd-field-lbl {
  font-size: 10px;
  color: #4a4a5a;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.dd-inline,
.dd-inline-ta,
.dd-inline-note {
  width: 100%;
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
}
.dd-inline:focus,
.dd-inline-ta:focus,
.dd-inline-note:focus {
  border-color: #c0392b;
}
.veh-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.veh-wrap .veh-input {
  width: 100%;
}
.veh-suggestions {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #3a1b20;
  border-radius: 7px;
  background: #0d0d12;
  box-shadow: 0 14px 30px rgb(0 0 0 / 55%);
  scrollbar-color: #3a1b20 transparent;
  scrollbar-width: thin;
}
.veh-suggestions[hidden] {
  display: none;
}
.veh-suggestion {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #1b1b25;
  padding: 8px 10px;
  background: transparent;
  color: #c8c8d0;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  text-align: left;
}
.veh-suggestion:last-child {
  border-bottom: 0;
}
.veh-suggestion:hover,
.veh-suggestion.active {
  background: #241013;
  color: #f0d8da;
}
.veh-suggestion-category {
  flex: 0 0 auto;
  color: #c0392b;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.dd-inline-ta {
  min-height: 84px;
  resize: vertical;
}
.dd-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dd-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1a0a0a;
  border: 1px solid #2a1a1a;
  color: #c8c8d0;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
}
.dd-tag:hover {
  color: #c0392b;
  border-color: #c0392b;
}
.dd-rel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dd-rel-row {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1.3fr auto auto;
  gap: 6px;
  align-items: center;
}
@media (max-width: 760px) {
  .dd-rel-row {
    grid-template-columns: 1fr;
  }
}
.dd-mini {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 15px;
  font-family: "DM Sans", sans-serif;
  color: #c8c8d0;
  outline: none;
  width: 100%;
}
.dd-mini:focus {
  border-color: #c0392b;
}
.dd-rel-auto {
  font-size: 9px;
  color: #6b7280;
  font-family: "JetBrains Mono", monospace;
  text-align: right;
  white-space: nowrap;
}
.dd-inverse {
  font-size: 12px;
  color: #9ea5b8;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.45;
}
.dd-obs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dd-obs-item {
  border-left: 2px solid #1a1a24;
  padding: 6px 0 6px 10px;
}
.dd-obs-head {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.dd-obs-date {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: #c0392b;
}
.dd-obs-loc {
  font-size: 11px;
  color: #6b7280;
  margin-left: 6px;
}
.dd-obs-text {
  margin-top: 4px;
  font-size: 14px;
  color: #c8c8d0;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.dd-obs-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #1a1a24;
  padding-top: 10px;
}
.dd-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.dd-media-item {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 8px;
  padding: 6px;
}
.dd-media-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #1f1f2a;
  cursor: zoom-in;
}
.dd-analysis-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dd-mbtn {
  background: #0a0a0d;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  color: #c8c8d0;
  cursor: pointer;
}
.dd-mbtn.active {
  border-color: #c0392b;
  box-shadow: 0 0 0 1px #c0392b33;
}
.dd-analysis-state {
  margin-top: 8px;
  font-size: 13px;
  color: #8d8d9c;
  line-height: 1.45;
}
.dd-analysis-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #2a2a36;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  margin-right: 6px;
}
/* Chrome / Edge / Safari */
#dd-obs-range::-webkit-slider-runnable-track,#nobs-range::-webkit-slider-runnable-track  {
    height: 10px;
    border-radius: 999px;
}

/* Firefox */
#dd-obs-range::-moz-range-track, #nobs-range::-moz-range-track {
    height: 10px;
    border-radius: 999px;
}
/* Chrome / Edge / Safari */
#dd-obs-range::-webkit-slider-thumb, #nobs-range::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #8b5cf6;
    margin-top: -6px; /* centrer sur une track de 10px */
    cursor: pointer;
}

/* Firefox */
#dd-obs-range::-moz-range-thumb, #nobs-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #8b5cf6;
    border: none;
    cursor: pointer;
}

#saved-tick {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 7000;
  background: #0d0d10;
  border: 1px solid #1a1a24;
  border-left: 3px solid #16a34a;
  color: #c8c8d0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
#dd-photo-zone {
  position: relative;
}

.dd-photo {
  display: block;
  width: 100%;
  height: auto;
}

.dd-photo-remove {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 1px;
  border-radius: 50%;
  z-index: 10;

  display: none;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  backdrop-filter: blur(3px);
}

#dd-photo-zone:has(.avatar-preview) .dd-photo-remove {
  display: flex;
}

/* ---- client/styles/themes-responsive.css ---- */
#saved-tick.show {
  opacity: 1;
  transform: translateY(0);
}
.range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.range-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: transparent;
}
.range-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d0f16 0%, #8b1a1a 100%);
  border: 1px solid #2c0f12;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4a58;
  border: 1px solid #ffd2d7;
  box-shadow: 0 0 10px #ff4a5888;
  margin-top: -4px;
}
.range-wrap input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d0f16 0%, #8b1a1a 100%);
  border: 1px solid #2c0f12;
}
.range-wrap input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4a58;
  border: 1px solid #ffd2d7;
  box-shadow: 0 0 10px #ff4a5888;
}
.range-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ar2);
  min-width: 34px;
}
.pro-add-form {
  background: var(--ps);
  border-top: 1px solid var(--pbr);
  padding: 16px;
}
.pro-add-form h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--pt);
}
.pro-add-form input,
.pro-add-form select {
  background: var(--pb);
  border: 1px solid var(--pbr);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: "DM Sans", sans-serif;
  color: var(--pt);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.pro-add-form input:focus {
  border-color: var(--pa);
}
.pro-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 480px) {
  .pro-form-grid {
    grid-template-columns: 1fr;
  }
}
.pro-form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--pm);
  display: block;
  margin-bottom: 4px;
}
body.pro-dark .dd-block {
  background: var(--ps);
  border-color: var(--pbr);
}
body.pro-dark .dd-label {
  color: var(--pm);
}
body.pro-dark .dd-id {
  color: var(--pa);
}
body.pro-dark .dd-name {
  color: var(--pt);
}
body.pro-dark .dd-last {
  color: #d6dfef;
}
body.pro-dark .dd-field {
  background: var(--pb);
  border-color: var(--pbr);
}
body.pro-dark .dd-field-lbl {
  color: var(--pm);
}
body.pro-dark .dd-inline,
body.pro-dark .dd-inline-ta,
body.pro-dark .dd-inline-note {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .dd-inline:focus,
body.pro-dark .dd-inline-ta:focus,
body.pro-dark .dd-inline-note:focus {
  border-color: var(--pa);
}
body.pro-dark .dd-tag {
  background: var(--pa2);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .dd-obs-item {
  border-left-color: var(--pbr);
}
body.pro-dark .dd-obs-date {
  color: var(--pa);
}
body.pro-dark .dd-obs-loc {
  color: var(--pm);
}
body.pro-dark .dd-obs-text {
  color: var(--pt);
}
body.pro-dark .dd-obs-form {
  border-top-color: var(--pbr);
}
body.pro-dark .dd-mini {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .dd-mini:focus {
  border-color: var(--pa);
}
body.pro-dark .dd-media-item {
  background: var(--pb);
  border-color: var(--pbr);
}
body.pro-dark .dd-media-thumb {
  border-color: var(--pbr);
}
body.pro-dark .dd-back {
  background: var(--ps);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .dd-back:hover {
  border-color: var(--pa);
  color: var(--pa);
}
body.pro-dark .dd-mbtn {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .dd-mbtn.active {
  border-color: var(--pa);
  box-shadow: 0 0 0 1px var(--pa2);
}
body.pro-dark .dd-analysis-state {
  color: var(--pm);
}
body.pro-dark .dd-analysis-pill {
  border-color: var(--pbr);
}
body.pro-dark .chrono-row {
  background: var(--ps);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .chrono-row:hover {
  border-color: var(--pa);
  background: var(--pa2);
}
body.pro-dark .chrono-row-date {
  color: var(--pa);
}
body.pro-dark .chrono-row-id {
  color: var(--pm);
}
body.pro-dark .chrono-row-name {
  color: var(--pt);
}
body.pro-dark .chrono-row-sub,
body.pro-dark .chrono-row-loc {
  color: var(--pm);
}
body.pro-dark .chrono-day-header {
  color: var(--pm);
  border-bottom-color: var(--pbr);
}
body.pro-dark #chrono-count {
  color: var(--pm);
}
body.pro-dark #chrono-search,
body.pro-dark #chrono-filter-dos,
body.pro-dark #chrono-filter-period {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark #chrono-subject-search {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark #chrono-subject-search:focus {
  border-color: var(--pa);
}
body.pro-dark .chrono-subject-card {
  background: var(--ps);
  border-color: var(--pbr);
}
body.pro-dark .chrono-subject-card:hover {
  border-color: var(--pa);
  background: var(--pa2);
}
body.pro-dark .chrono-subject-actions {
  border-top-color: var(--pbr);
}
body.pro-dark .chrono-subject-id {
  color: var(--pa);
}
body.pro-dark .chrono-subject-name {
  color: var(--pt);
}
body.pro-dark .chrono-subject-meta {
  color: var(--pm);
}
body.pro-dark .chrono-subject-count {
  color: var(--pm);
}
body.pro-dark .chrono-subject-last {
  color: #9eb2d3;
}
body.pro-dark .chrono-subject-avatar {
  border-color: var(--pbr);
  background: var(--pb);
}
body.pro-dark .chrono-subject-avatar-ph {
  border-color: var(--pbr);
  background: var(--pb);
  color: var(--pt);
}
body.pro-dark .chrono-mini-link {
  border-color: var(--pbr);
  color: var(--pm);
  background: var(--pb);
}
body.pro-dark .chrono-mini-link:hover {
  border-color: var(--pa);
  color: var(--pa);
  background: var(--pa2);
}
body.pro-dark .chrono-detail-back {
  background: var(--ps);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .chrono-detail-back:hover {
  border-color: var(--pa);
  color: var(--pa);
}
body.pro-dark .chrono-open-profile {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pa);
}
body.pro-dark .chrono-open-profile:hover {
  border-color: var(--pa);
  background: var(--pa2);
}
body.pro-dark .chrono-detail-id {
  color: var(--pa);
}
body.pro-dark .chrono-detail-name {
  color: var(--pt);
}
body.pro-dark .chrono-obs-item {
  border-left-color: var(--pbr);
}
body.pro-dark .chrono-obs-date {
  color: var(--pa);
}
body.pro-dark .chrono-obs-loc {
  color: var(--pm);
}
body.pro-dark .chrono-obs-text {
  color: var(--pt);
}
body.pro-dark .chrono-add-form {
  background: var(--pb);
  border-color: var(--pbr);
}
body.pro-dark .chrono-add-form input,
body.pro-dark .chrono-add-form textarea {
  background: var(--ps);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark .chrono-add-form input:focus,
body.pro-dark .chrono-add-form textarea:focus {
  border-color: var(--pa);
}
body.pro-dark #chrono-filter-loc {
  background: var(--pb);
  border-color: var(--pbr);
  color: var(--pt);
}
body.pro-dark #chrono-filter-loc:focus {
  border-color: var(--pa);
}
body.arc #dash-range,
body.arc #jrn-range {
  background: #0a0a0d !important;
  border-color: #1a1a24 !important;
  color: var(--ad) !important;
}
.input-error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 1px #c0392b33;
}

/* -------------------------------------------------
   Human-tuned UX / performance polish
   ------------------------------------------------- */
:root {
  --tr-fast: 0.18s;
  --tr-mid: 0.28s;
}

/* Smoother long-page scrolling */
#mc {
  overscroll-behavior: contain;
}
#mcon,
.admin-view,
.mobs #obs-list {
  overscroll-behavior: contain;
}

/* Replace broad "transition: all" behavior with targeted transitions */
.ni,
.theme-btn,
.back-btn,
.si,
.dc,
.del-btn,
.ba,
.dd-section-toggle,
.dd-label-row-toggle,
.chrono-row,
.chrono-subject-card,
.chrono-detail-back,
.chrono-open-profile,
.admin-nav-btn,
.admin-input,
.admin-select,
.admin-textarea {
  transition-property: background-color, border-color, color, box-shadow,
    opacity, transform;
  transition-duration: var(--tr-fast);
  transition-timing-function: ease;
}

.nl,
.sc2,
.tw,
.ss,
.cw,
.bar,
.obs-bar-fill {
  transition-property: background-color, border-color, color, box-shadow, height,
    width, opacity;
  transition-duration: var(--tr-mid);
  transition-timing-function: ease;
}

/* Safer rendering for very long user text */
.did,
.dn,
.dd-id,
.dd-name,
.mname,
.tt,
.pt,
.chrono-subject-name,
.chrono-detail-name,
.global-admin-popup-title,
.global-admin-popup-msg {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dd-obs-text,
.jtxt,
.ot,
.mmeta,
.dd-last,
.chrono-obs-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Faster initial paint for large list screens */
.dc,
.chrono-row,
.chrono-subject-card,
.je,
.dd-obs-item {
  content-visibility: auto;
  contain-intrinsic-size: 160px;
}
.dg .dc {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

/* Slightly larger sidebar labels for readability */
@media (max-width: 1400px) {
  .si {
    font-size: 16px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .sl {
    font-size: 13px;
  }
}

/* Tablet layout: larger touch targets and less duplicated navigation. */
@media (max-width: 1180px) {
  #nb {
    height: 64px;
    padding-inline: 12px;
  }
  #ac {
    height: calc(100dvh - 64px);
  }
  .ni-wrap {
    display: none;
  }
  .nl {
    margin-right: auto;
    font-size: 19px;
  }
  #sb {
    width: 210px;
    padding: 12px 8px;
  }
  #mc {
    padding: 18px 18px 24px;
  }
  .si {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 15px;
  }
  .si svg {
    width: 18px;
    height: 18px;
  }
  .pt {
    font-size: 26px;
  }
  .ps2 {
    margin-bottom: 16px;
    font-size: 13px;
  }
  .dg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tw {
    overflow-x: auto;
  }
  .tw table {
    min-width: 680px;
  }
  .bp,
  .ba,
  .nc-btn,
  .pager-btn,
  .dd-back,
  .dd-section-toggle,
  .chrono-detail-back,
  .chrono-open-profile {
    min-height: 40px;
  }
  .search-bar input,
  .search-bar select,
  #chrono-search,
  #chrono-filter-dos,
  #chrono-filter-period,
  #chrono-filter-loc,
  #chrono-subject-search,
  .fg input,
  .fg select,
  .af input,
  .af select,
  .af textarea,
  .pro-add-form input,
  .pro-add-form select,
  .dd-inline,
  .dd-inline-ta,
  .dd-inline-note,
  .dd-mini {
    min-height: 42px;
    font-size: 14px;
  }
  .map-controls {
    gap: 7px;
  }
  .map-controls .nc-btn {
    padding-inline: 12px;
  }
  .leaflet-touch .leaflet-bar a {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }
  #mb {
    width: min(96vw, 1180px);
    max-height: 95dvh;
  }
  #mcon {
    max-height: calc(95dvh - 40px);
  }
}

@media (max-width: 900px) {
  #sb {
    width: 184px;
  }
  #mc {
    padding: 14px 14px 20px;
  }
  .sg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dd-grid {
    grid-template-columns: 1fr;
  }
  .map-help,
  .map-legend,
  #map-mode-label {
    font-size: 11px;
    line-height: 1.5;
  }
}

@media (max-width: 680px) {
  #nb {
    height: 58px;
    gap: 6px;
    padding-inline: 9px;
  }
  #ac {
    height: calc(100dvh - 58px);
  }
  .nl {
    font-size: 17px;
  }
  .online-txt {
    display: none !important;
  }
  .private-pill {
    padding-inline: 7px;
    font-size: 9px;
  }
  .back-btn {
    padding-inline: 8px;
    font-size: 10px;
  }
  #sb {
    width: 66px;
    padding-inline: 6px;
  }
  .sl {
    display: none;
  }
  .sb-sec {
    margin-bottom: 10px;
  }
  .si {
    position: relative;
    justify-content: center;
    min-height: 48px;
    padding: 10px 7px;
  }
  .si span:not(.sbadge) {
    display: none;
  }
  .si svg {
    width: 20px;
    height: 20px;
  }
  .sbadge {
    position: absolute;
    top: 3px;
    right: 2px;
    margin-left: 0;
  }
  #mc {
    padding: 12px 10px 18px;
  }
  .pt {
    font-size: 23px;
  }
  .sc2 {
    padding: 13px;
  }
  .map-controls .nc-btn {
    flex: 1 1 calc(50% - 7px);
  }
  #map-mode-label {
    flex-basis: 100%;
  }
  .dd-row {
    grid-template-columns: 1fr;
  }
  .tw table {
    min-width: 620px;
  }
}

/* Accessibility: avoids heavy animation on reduced-motion setups */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

