:root {
  --bg: #0b0c10;
  --panel: #111824;
  --panel2: #0f141e;
  --ink: #e9eef6;
  --muted: rgba(233, 238, 246, .72);
  --line: rgba(233, 238, 246, .12);
  --accent: #7c3aed;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 18px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  /* Pozadí s obrázkem stolu a tmavým překryvem pro čitelnost */
  background:
    linear-gradient(to bottom, rgba(11, 12, 16, 0.85), rgba(11, 12, 16, 0.95)),
    url('../img/bg_desk.jpg') center top / cover no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: inherit
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(34, 197, 94, .55));
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand h1 {
  font-size: 16px;
  margin: 0;
  letter-spacing: .08em;
  text-transform: uppercase
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

.nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.nav a:hover {
  border-color: rgba(233, 238, 246, .2)
}

.hero {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.08
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55
}

/* Hero Badge for Special Crimes */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.08);
  /* Red tint for danger/serious crimes */
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 10px 16px 10px 20px;
  border-radius: 0 12px 12px 0;
  /* Flat left edge */
  margin: 12px 0 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 0 20px rgba(239, 68, 68, 0.05);
  max-width: fit-content;
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.hero-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.2), transparent);
  transform: translateX(-100%);
  animation: badgeScan 4s ease-in-out infinite;
}

@keyframes badgeScan {

  0%,
  80%,
  100% {
    transform: translateX(-100%);
  }

  45% {
    transform: translateX(200%);
  }
}

.hero-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.6));
}

.hero-badge-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
}

.hero-badge-access {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ef4444;
  font-weight: 700;
  opacity: 0.9;
}

.hero-badge-role {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- REAL DETECTIVE BOARD STYLES --- */

/* Background Texture for Board View */
.view[data-view="board"] {
  /* background removed to use global dark body */
  background: none;
  box-shadow: inset 0 0 100px #000;
  border: 8px solid #1a1510;
  border-radius: 4px;
  padding: 20px;
  min-height: 80vh;
}

.view[data-view="board"] .viewhead {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.viewtitle {
  font-family: 'Special Elite', monospace;
  font-size: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #e9eef6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Suspect "Polaroids" */
.suspect {
  background: #fdfdfd;
  color: #111;
  padding: 12px 12px 25px 12px !important;
  /* Polaroid bottom padding */
  border-radius: 2px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
  position: relative;
  border: 1px solid #ddd;
  max-width: 320px;
  margin: 15px;
  display: inline-block;
  vertical-align: top;
}

/* Random rotations for realism */
.suspect:nth-child(2n) {
  transform: rotate(1.5deg);
}

.suspect:nth-child(3n) {
  transform: rotate(-1deg);
}

.suspect:nth-child(5n) {
  transform: rotate(2deg);
}

.suspect:hover {
  transform: scale(1.02) rotate(0deg) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.suspect.assign-mode {
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
}

.suspect.assign-mode:hover {
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.8), 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: scale(1.03) rotate(0deg) !important;
}

/* Pin effect */
.suspect::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #e74c3c, #922b21);
  border-radius: 50%;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
  z-index: 20;
}

/* Tape effect for evidence links */
.chip {
  background: #fef9c3;
  /* Yellow sticky note color */
  color: #333;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
  transform: rotate(-1deg);
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex !important;
  align-items: center;
  margin-top: 6px;
}

.chip:nth-child(even) {
  transform: rotate(1.5deg);
}

.chip .x {
  color: #ad2e24;
  font-weight: bold;
  font-family: monospace;
}

.suspect-name {
  font-family: 'Special Elite', monospace;
  /* Typewriter */
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  margin-top: 10px;
  text-align: center;
  color: #222;
  letter-spacing: 0.5px;
}

.suspect-meta {
  font-family: 'Caveat', cursive;
  /* Handwriting */
  color: #666;
  font-size: 18px;
  text-align: center;
  margin-top: 0px;
}

.suspect img {
  filter: sepia(0.2) contrast(1.1);
  /* Slight photo effect */
  border: 1px solid #ccc;
}

/* Tasks as "Case Files" */
.panel[data-task-id] {
  background: #fffafa;
  /* Off-white paper */
  color: #222;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: 'Special Elite', monospace;
  position: relative;
  margin-bottom: 20px;
  background-size: 20px 20px;
  transition: all 0.3s ease;
}

.panel.is-locked {
  background: repeating-linear-gradient(45deg,
      rgba(20, 20, 20, 0.9),
      rgba(20, 20, 20, 0.9) 10px,
      rgba(50, 50, 50, 0.9) 10px,
      rgba(50, 50, 50, 0.9) 20px);
  color: #aaa;
  border-color: #666;
  opacity: 0.8;
  display: block !important;
}

.panel.is-locked .tasktext,
.panel.is-locked .task-input,
.panel.is-locked .btn {
  opacity: 0.3;
  pointer-events: none;
}

.panel[data-task-id]::before {
  /* Paper clip or stamp */
  content: '';
  position: absolute;
  top: 10px;
  right: -5px;
  width: 5px;
  height: 100%;
  border-right: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  display: none;
  /* simple for now */
}

.tasktext {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  /* Keep readable for body */
  font-size: 14px;
  color: #333 !important;
}

.pill.js-status-pill {
  font-family: 'Special Elite', monospace;
  text-transform: uppercase;
  border-radius: 2px;
  letter-spacing: 1px;
}

/* Handwritten Notes Input */
.task-note-input {
  font-family: 'Caveat', cursive !important;
  font-size: 20px !important;
  color: #2c3e50 !important;
  background: #fef9e7 !important;
  /* Yellow notepad */
  background-image: linear-gradient(#fef9e7 96%, #dcdcdc 96%, #dcdcdc);
  background-size: 100% 30px;
  line-height: 30px !important;
  border: 1px solid #d1d5db !important;
  padding: 0 10px !important;
}

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

.card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: rgba(233, 238, 246, .2)
}

.card .cover {
  position: relative;
  aspect-ratio: 16/9;
  background: #0d1117 center/cover no-repeat;
}

.badge-progress {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.badge-note {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 200, 0, 0.9);
  color: #000;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  z-index: 2;
}

.card .body {
  padding: 16px
}

.card .title {
  font-weight: 900
}

.card .tagline {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35
}

.meta {
  margin-top: 10px;
  color: rgba(233, 238, 246, .66);
  font-size: 12px
}

.case-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(17, 24, 36, .82);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: .03em
}

hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0
}

.list {
  display: grid;
  gap: 5px
}

.item-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, .02);
  color: var(--ink);
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
}

.item-btn:hover {
  border-color: rgba(233, 238, 246, .22)
}

.item-btn.active {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.15);
  box-shadow: 0 0 0 1px var(--accent);
}

.item-btn.active[data-attached="true"] {
  border-width: 2px;
  border-bottom-color: #0b0c10;
  /* Match background or transparent if z-index handles it? Using bg color effectively hides it if body pulls up. OR transparent. */
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

@keyframes pulseReady {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.pulse-ready {
  animation: pulseReady 2s infinite;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  font-weight: 900;
}

.item-btn {
  position: relative;
}

.item-btn.is-new::after {
  content: "NOVÉ";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #ef4444;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
  animation: pulseNew 2s infinite;
  pointer-events: none;
}

@keyframes pulseWhite {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
    transform: scale(1.05);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
  }
}

/* Pulse effect for the "Go to Board" action button */
.js-evidence-select-btn {
  /* Default: No pulse */
}

.js-evidence-select-btn.pulse-white {
  animation: pulseWhite 2s infinite;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: inherit;
  /* Keep button color (secondary/white) */
  font-weight: 900 !important;
}

@keyframes pulseNew {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.item-btn .small {
  font-size: 12px;
  color: rgba(233, 238, 246, .68);
  margin-top: 6px
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  color: rgba(233, 238, 246, .78);
}

.pill.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

select {
  background-color: #111;
  color: #fff;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

select option {
  background-color: #111 !important;
  color: #fff !important;
  padding: 4px;
}

.btn.secondary {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
  color: var(--ink);
}

.btn.good {
  background: var(--good);
  color: #06130a
}

.btn.warn {
  background: var(--warn);
  color: #1a1102
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed
}

/* Primary CTA Button (Purple) - High Specificity */
/* Primary CTA Button (Purple) - High Specificity */
.nav a.btn-cta,
a.btn-cta {
  background: #7c3aed !important;
  color: #fff !important;
  border: 1px solid #7c3aed !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4) !important;
  opacity: 1 !important;
}

.btn-cta:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

.evidence-note {
  margin-top: 15px;
  padding: 12px 16px;
  background: #fef9e7;
  color: #2c3e50;
  font-family: 'Caveat', cursive;
  font-size: 24px;
  line-height: 1.4;
  border-radius: 2px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  position: relative;
  /* Diary line decoration */
  background-image: repeating-linear-gradient(transparent, transparent 29px, rgba(0, 0, 0, 0.05) 30px);
  background-attachment: local;
  /* Scrolls with content */
}

.viewer {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .20);
  border-radius: 16px;
  overflow: hidden;
}

.viewer .viewer-head {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

.viewer .viewer-title {
  font-weight: 900
}

.viewer .viewer-body {
  padding: 0
}

.viewer iframe,
.viewer img,
.viewer video {
  width: 100%;
  display: block
}

.viewer iframe {
  height: 520px;
  border: 0
}

.viewer .pad {
  padding: 12px;
  color: var(--muted);
  line-height: 1.55
}

.textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .22);
  color: var(--ink);
}

.input {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .22);
  color: var(--ink);
}

.select {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #1a1a1a;
  color: #e9eef6;
  appearance: none;
  /* Uniform look */
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23e9eef6%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 10px auto;
  cursor: pointer;
}

/* Detective board */
.board {
  display: grid;
  gap: 12px
}

.board-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center
}

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

.suspect {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .10));
  border-radius: 16px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.board-strings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .92;
}

.board-strings path {
  fill: none;
  stroke-linecap: round
}

.board-strings .pin {
  opacity: .95
}

.board-strings .glow {
  filter: blur(1.4px);
  opacity: .35
}

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

.suspect-name {
  font-weight: 900
}

.suspect-meta {
  font-size: 12px;
  color: rgba(233, 238, 246, .65);
  margin-top: 4px
}

.suspect-links {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 238, 246, .16);
  background: rgba(255, 255, 255, .03);
  color: rgba(233, 238, 246, .85);
  font-size: 12px;
  cursor: pointer;
}

.chip:hover {
  border-color: rgba(233, 238, 246, .28)
}

.chip .x {
  opacity: .7;
  font-weight: 900
}

.chip .meta {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.chip .tags {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(233, 238, 246, .14);
  background: rgba(0, 0, 0, .18);
  color: rgba(233, 238, 246, .78);
  font-size: 11px;
}

.strength {
  display: inline-flex;
  gap: 4px;
  align-items: center
}

.dotp {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(233, 238, 246, .22)
}

.dotp.on {
  background: rgba(245, 158, 11, .95)
}

.board-editor {
  margin-top: 12px;
  border: 1px dashed rgba(233, 238, 246, .22);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, .16);
}

.board-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center
}

.board-editor-title {
  font-weight: 900
}

.board-editor-meta {
  margin-top: 4px;
  color: rgba(233, 238, 246, .65);
  font-size: 12px
}

.board-editor-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  margin-top: 12px
}

.label {
  color: rgba(233, 238, 246, .75);
  font-size: 12px;
  margin-bottom: 6px
}

.tag-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.tag-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(233, 238, 246, .12);
  background: rgba(255, 255, 255, .02);
  font-size: 13px;
  color: rgba(233, 238, 246, .85)
}

.tag-check input {
  accent-color: #f59e0b
}

.muted {
  color: rgba(233, 238, 246, .65);
  font-size: 13px
}


/* Timeline */
.timeline {
  display: grid;
  gap: 12px
}

.timeline-form {
  border: 1px dashed rgba(233, 238, 246, .22);
  background: rgba(0, 0, 0, .14);
  border-radius: 16px;
  padding: 12px
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

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

.tl-attached {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.tl-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 238, 246, .16);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
  color: rgba(233, 238, 246, .85)
}

.tl-pill .x {
  opacity: .75;
  font-weight: 900;
  cursor: pointer
}

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

.tl-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  border-radius: 16px;
  padding: 12px
}

.tl-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap
}

.tl-time {
  font-weight: 900
}

.tl-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.tl-desc {
  margin-top: 8px;
  color: rgba(233, 238, 246, .85);
  line-height: 1.45;
  white-space: pre-wrap
}

.tl-links {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}


.footer {
  padding: 24px 0 10px;
  color: rgba(233, 238, 246, .55);
  font-size: 12px;
}

@media (max-width: 960px) {
  .case-layout {
    grid-template-columns: 1fr
  }

  .hero h2 {
    font-size: 28px
  }

  .viewer iframe {
    height: 460px
  }

  .board-editor-grid {
    grid-template-columns: 1fr
  }

  .timeline-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width: 520px) {
  .container {
    padding: 14px
  }

  .badge {
    width: 40px;
    height: 40px
  }

  .nav a {
    padding: 9px 10px;
    border-radius: 12px
  }

  .item-btn {
    padding: 11px;
    border-radius: 14px
  }

  .viewer iframe {
    height: 420px
  }
}

/* --------- Hints (Iterace 2D) --------- */
.hints {
  display: grid;
  gap: 12px;
}

.hints-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.hint-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: 18px;
  padding: 12px;
}

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

.hint-title {
  font-weight: 900;
}

.hint-meta {
  margin-top: 4px;
  color: rgba(233, 238, 246, .65);
  font-size: 12px;
}

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

.hint-body {
  margin-top: 10px;
  white-space: pre-wrap;
  color: rgba(233, 238, 246, .9);
}

.hint-foot {
  margin-top: 10px;
  color: rgba(233, 238, 246, .65);
  font-size: 12px;
}

/* --------- Accusation result (Iterace 2E) --------- */
.acc-result {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: 18px;
  padding: 12px;
}

.acc-result.good {
  border-color: rgba(34, 197, 94, .35);
  background: rgba(34, 197, 94, .06);
}

.acc-result.bad {
  border-color: rgba(244, 63, 94, .35);
  background: rgba(244, 63, 94, .06);
}

.acc-result .acc-title {
  font-weight: 900;
}

.acc-result .acc-text {
  margin-top: 8px;
  color: rgba(233, 238, 246, .9);
  line-height: 1.55;
  white-space: pre-wrap;
}

.acc-result .acc-sub {
  margin-top: 6px;
  color: rgba(233, 238, 246, .65);
  font-size: 12px;
}

/* --------- Sub-files / Groups (Iterace: Dílčí spis) --------- */
details.group {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  border-radius: 16px;
  overflow: hidden;
  transition: background .2s;
}

details.group[open] {
  background: rgba(0, 0, 0, .15);
}

summary.group-head {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  color: rgba(233, 238, 246, .9);
}

summary.group-head:hover {
  background: rgba(255, 255, 255, .02);
}

summary.group-head::marker {
  color: rgba(233, 238, 246, .4);
}

.group-items {
  padding: 0 12px 12px 12px;
  display: grid;
  gap: 8px;
  margin-top: -4px;
  /* visually tighter to header */
}

/* Locked elements logic (Single Path) */
.is-locked {
  display: none !important;
}

[data-locked='true'] {
  display: none !important;
}

/* High Contrast Overrides */
.pill {
  background: #222 !important;
  color: #fff !important;
  border: 1px solid #444 !important;
  font-weight: 700 !important;
}

.pill.dot::before {
  background: #fff !important;
  opacity: 1 !important;
}

.panel[data-unlocked="0"] .js-status-pill {
  background: #b71c1c !important;
  border-color: #fff !important;
  color: #fff !important;
}

.panel[data-unlocked="1"] .js-status-pill {
  background: #1b5e20 !important;
  color: #fff !important;
}

.btn {
  background: #f0f0f0 !important;
  color: #000 !important;
  border: 1px solid #555 !important;
  font-weight: bold !important;
}

.btn.primary {
  background: #222 !important;
  color: #fff !important;
}

.btn.warn {
  background: #c62828 !important;
  color: #fff !important;
}

.btn.good {
  background: #2e7d32 !important;
  color: #fff !important;
}

.task-input {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
}

.task-note-input {
  background: #fef9e7 !important;
  color: #000 !important;
}

#viewer_title,
#viewer_body {
  color: #000 !important;
}

.btn.secondary {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
}

/* RESPONSIVE OPTIMIZATIONS (ADDED) */
.suspect {
  margin: 0 !important;
  /* Reset margin in favor of grid gap */
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .view[data-view="board"] {
    padding: 10px;
  }

  .board-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero {
    padding: 15px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .brand {
    margin-right: 0;
    margin-bottom: 5px;
  }

  .nav {
    justify-content: center;
    width: 100%;
  }

  .nav a {
    padding: 8px 10px;
    font-size: 14px;
    flex: 1;
    text-align: center;
  }

  /* Timeline adjustments */
  .timeline-form .timeline-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile font size fix for inputs */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* PERFORMANCE FIXES FOR MOBILE SCROLLING */
  /* Disable heavy fixed background painting on mobile */
  body {
    background: #0b0c10 !important;
    background-image: none !important;
    background-attachment: scroll !important;
  }

  /* Disable heavy blur filter */
  .view[data-view="board"] .viewhead {
    backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.85) !important;
    /* solid fallback */
  }

  /* Reduce shadow complexity */
  .view[data-view="board"] {
    box-shadow: none !important;
    border-width: 2px !important;
  }

  .suspect {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
    transform: none !important;
    /* Remove rotation to save GPU */
  }

  .suspect:hover {
    transform: none !important;
  }

  /* Hide desktop sidebar if somehow visible (though ui.css handles it) */
  .sidebar {
    display: none;
  }

  /* FIX FOR MISSING NAVBAR AND OVERLAYS */
  .mobilebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: #000 !important;
    /* Pure black for contrast */
    border-top: 2px solid #3b82f6 !important;
    /* Blue highlight border */
    padding: 12px 10px !important;
    /* Slightly larger padding */
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: space-around;
    /* Better spacing */
  }

  /* Pulse Animation for Timeline Highlight */
  @keyframes navPulse {
    0% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }

    70% {
      transform: scale(1.05);
      box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }

    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
  }

  .nav-highlight {
    animation: navPulse 2s infinite;
    background: #2563eb !important;
    /* Blue background */
    color: #fff !important;
    border-color: #3b82f6 !important;
    font-weight: bold;
    border-radius: 4px;
    /* Optional rounded */
  }

  .nav-highlight .txt {
    color: #fff !important;
  }

  /* Ensure content is not hidden behind fixed navbar */
  body {
    padding-bottom: 80px !important;
  }

  /* Better board top adjustment */
  /* Better board top adjustment */
  .board-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    background: #fff !important;
    color: #000 !important;
    border-bottom: 1px solid #ddd;
    padding: 10px !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    transform: none !important;
    transition: top 0.3s ease;
  }

  body.is-sticky-active .board-top {
    top: 60px !important;
  }
}

/* Progress Widget Styles */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 900px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }
}

/* Global Pulse Animation for Timeline Highlight (Desktop & Mobile) */
@keyframes navPulseGlobal {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.nav-highlight {
  animation: navPulseGlobal 2s infinite !important;
  background: #2563eb !important;
  /* Blue background */
  color: #fff !important;
  border-color: #3b82f6 !important;
  font-weight: bold !important;
  border-radius: 4px !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.nav-highlight .txt {
  color: #fff !important;
}

/* Investigator Hero Image */
.hero-investigator {
  position: absolute;
  right: 0px;
  bottom: 0px;
  height: auto;
  min-height: 80%;
  max-height: 92%;
  width: auto;
  max-width: 40%;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  filter: drop-shadow(-5px 0 15px rgba(0, 0, 0, 0.6));
  z-index: 1;
  /* Lower than text/progress */
  transition: all 0.3s ease;
  opacity: 0.95;
}

@media (min-width: 769px) {
  .hero {
    position: relative;
    overflow: hidden;
  }

  /* Removed global max-width to respect inline styles and default behavior */
  .hero p,
  .hero h2 {
    position: relative;
    z-index: 10;
  }

  .progress-hero {
    width: 100%;
    /* Full width requested */
    max-width: 100%;
    position: relative;
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  }
}

@media (max-width: 768px) {
  .hero-investigator {
    display: none !important;
  }

  .hero p,
  .hero h2,
  .progress-hero {
    max-width: 100% !important;
    /* Force full width on mobile overridden inline styles */
  }
}

/* Bank Statement Table Responsive Styles */
.bank-table {
  width: 100%;
  border-collapse: collapse;
}

.bank-table th,
.bank-table td {
  padding: 12px 15px;
  /* Desktop padding */
  text-align: left;
}

.bank-table .amount {
  white-space: nowrap;
  text-align: right;
}

.bank-table .date {
  white-space: nowrap;
}

/* Mobile adjustments */
@media (max-width: 768px) {

  .bank-table th,
  .bank-table td {
    padding: 8px 4px !important;
    /* Smaller padding on mobile */
    font-size: 11px !important;
    /* Smaller font on mobile */
  }

  .bank-table th:first-child,
  .bank-table td:first-child {
    padding-left: 2px !important;
  }

  .bank-table th:last-child,
  .bank-table td:last-child {
    padding-right: 2px !important;
  }

  /* Wrap text in specific columns */
  .bank-table td:nth-child(2) {
    /* Description */
    white-space: normal !important;
    word-wrap: break-word;
    max-width: 100px;
    /* Allow wrapping */
    min-width: 80px;
  }

  .bank-table td:nth-child(4) {
    /* Notes */
    white-space: normal !important;
    word-wrap: break-word;
    max-width: 80px;
    min-width: 60px;
  }
}

/* VIP Badge Shake Animation */
@keyframes shakeBadge {
  0% {
    transform: rotate(10deg);
  }

  25% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(20deg);
  }

  75% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(10deg);
  }
}

/* Trigger shake on button hover */
.btn:hover .vip-badge {
  animation: shakeBadge 0.4s ease-in-out infinite;
}

/* HIDING NUMBER SPINNERS FOR ALL BROWSERS */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* Unseen Evidence - Transparent Red Background */
.evidence-item.unseen-evidence {
  background-color: rgba(239, 68, 68, 0.15) !important;
  /* Red 500 with opacity */
  transition: background-color 0.5s ease;
}

/* Ensure consistent spacing/padding if not already present */
.evidence-item {
  transition: background-color 0.5s ease, border-left 0.3s ease;
}

/* Footer Link Styles */
.footer-link {
  color: #ccc !important;
  text-decoration: underline !important;
  border-bottom: none !important;
}

.footer-link:hover {
  text-decoration: none !important;
  border-bottom: none !important;
  color: #ccc !important;
}

.footer {
  font-size: 18px;
  padding: 20px 0;
}