/**
 * FBI Document Styling
 * Core visual styles for witness protection documents
 */

/* Base styles */

/* GLOBAL UI SCALE — the whole game reads best at what used to be
   125% browser zoom, so that IS the default now. ONE dial:
   --ui-zoom. Do NOT add per-system scale hacks on top of this.

   vh caveat: Chrome multiplies vh-derived lengths by zoom, so a
   full-screen container declared as 100vh renders 125% tall and
   the page grows a scrollbar. Every page-level container therefore
   sizes with var(--vh100) — 100vh pre-divided by the zoom — so the
   game always fits the screen exactly. The same applies to vw —
   anything that must fit the WINDOW (a lightbox, a full-bleed
   overlay) sizes off --vw100/--vh100, never raw vw/vh. */
:root {
  --ui-zoom: 1.25;
  --vh100: calc(100vh / var(--ui-zoom));
  --vw100: calc(100vw / var(--ui-zoom));
}
html {
  /* LITERAL on purpose — Chrome silently drops `zoom: var(...)`
     (invalid at computed-value time → zoom resets to 1), which
     un-zoomed the whole game there while Firefox obeyed. If you
     change the scale, change BOTH numbers: this one and --ui-zoom
     above — they must stay equal. */
  zoom: 1.25;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #3A3238;
  padding: 2rem;
  font-family: 'Courier New', Courier, monospace;
  color: #5F5449;
  margin: 0;
  /* QA P2-12 — border-box, or the 2rem padding rides ON TOP of
     the 100vh and every page is taller than the window by exactly
     the padding (137 real px at zoom 1.25): the map's bottom bar
     slid off-screen and any scroll dragged the fixed layer. */
  box-sizing: border-box;
  min-height: var(--vh100, 100vh);
}

/* File Document Container */
/* z-index keeps the whole case-file paper (header, title, TIME,
   PLACE, plus all dialog entries inside) above the insomnia
   dissolve veil (z-9) and any pool overlays (z 2-6). Without this
   the veil's backdrop-filter blurs the paper too. */
.file {
  background: #EBE6D8;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  z-index: 11;
  border: 1px solid #8E7F7F;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Travel Animation Overlay */
.travel-animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 50, 56, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.travel-animation-overlay.active {
  opacity: 1;
}

.travel-animation-container {
  background: #EBE6D8;
  border: 3px solid #8E7F7F;
  padding: 3rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  position: relative;
  text-align: center;
}

.travel-animation-container::before {
  content: 'CLASSIFIED';
  position: absolute;
  top: 10px;
  right: 10px;
  background: #8B4513;
  color: #EBE6D8;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.travel-title {
  font-size: 1.5rem;
  color: #3A3238;
  margin-bottom: 1rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.travel-route {
  font-size: 1.1rem;
  color: #5F5449;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.travel-location {
  font-weight: bold;
  color: #3A3238;
}

.travel-arrow {
  color: #8B4513;
  font-size: 1.5rem;
  animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(10px); opacity: 0.6; }
}

.travel-route-visual {
  position: relative;
  width: 100%;
  height: 80px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.travel-waypoint {
  width: 20px;
  height: 20px;
  background: #8E7F7F;
  border: 3px solid #3A3238;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.travel-waypoint.origin {
  background: #8B4513;
  box-shadow: 0 0 10px rgba(139, 69, 19, 0.5);
}

.travel-waypoint.destination {
  background: #8E7F7F;
  box-shadow: 0 0 10px rgba(142, 127, 127, 0.5);
}

.travel-path {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 60px;
  transform: translateY(-50%);
}

.travel-path svg {
  width: 100%;
  height: 100%;
}


.travel-agent {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: #3A3238;
  border: 2px solid #EBE6D8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  color: #EBE6D8;
  animation: agentMove 2s ease-out forwards;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 3;
}


@keyframes agentMove {
  0% {
    left: 10px;
    top: 50%;
  }
  25% {
    left: 30%;
    top: 35%;
  }
  50% {
    left: 50%;
    top: 50%;
  }
  75% {
    left: 70%;
    top: 35%;
  }
  100% {
    left: calc(100% - 10px);
    top: 50%;
  }
}

@keyframes agentPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}


.travel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #8E7F7F;
}

.travel-stat {
  text-align: center;
}

.travel-stat-label {
  font-size: 0.8rem;
  color: #8E7F7F;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.travel-stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #3A3238;
  animation: statFlicker 0.5s ease-in-out;
}

@keyframes statFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.travel-stat-value.negative {
  color: #8B4513;
}

.travel-stat-value.positive {
  color: #6b8e3d;
}

.travel-status {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #5F5449;
  font-style: italic;
  animation: statusBlink 1s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Travel Event Popup */
.travel-event-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 50, 56, 0.98);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.travel-event-overlay.active {
  opacity: 1;
}

.travel-event-container {
  background: #EBE6D8;
  border: 3px solid #8B4513;
  padding: 3rem;
  max-width: 700px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  position: relative;
  text-align: center;
  animation: eventShake 0.5s ease-out;
}

@keyframes eventShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.travel-event-container::before {
  content: 'INCIDENT REPORT';
  position: absolute;
  top: 10px;
  right: 10px;
  background: #8B4513;
  color: #EBE6D8;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.event-warning {
  font-size: 3rem;
  color: #8B4513;
  margin-bottom: 1rem;
  animation: warningPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.event-title {
  font-size: 1.8rem;
  color: #8B4513;
  margin-bottom: 1rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.event-description {
  font-size: 1.1rem;
  color: #3A3238;
  margin-bottom: 2rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(139, 69, 19, 0.1);
  border-left: 4px solid #8B4513;
  text-align: left;
}

.event-consequences {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f5f5dc;
  border: 2px solid #8B4513;
}

.event-consequences-title {
  font-size: 0.9rem;
  color: #8E7F7F;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.event-consequence-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #8E7F7F;
}

.event-consequence-item:last-child {
  border-bottom: none;
}

.event-consequence-label {
  font-size: 1rem;
  color: #3A3238;
}

.event-consequence-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #8B4513;
}

.event-consequence-value.positive {
  color: #5a7a8e;
}

.event-continue-button {
  background: #8B4513;
  color: #EBE6D8;
  border: 2px solid #5F5449;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.event-continue-button:hover {
  background: #5F5449;
  border-color: #3A3238;
}

/* Travel interruption animations */
.travel-animation-container.interrupted {
  animation: travelInterrupted 0.8s ease-out;
}

@keyframes travelInterrupted {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-15px) rotate(-2deg); }
  20%, 40%, 60%, 80% { transform: translateX(15px) rotate(2deg); }
}

.travel-agent.stopped {
  animation: agentStop 0.5s ease-out forwards;
}

@keyframes agentStop {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.travel-status.warning {
  color: #8B4513 !important;
  font-weight: bold;
  animation: warningFlash 0.5s ease-in-out infinite;
}

@keyframes warningFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.file::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(212,200,190,0.4) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(212,200,190,0.4) 0%, transparent 35%);
  pointer-events: none;
}

/* File Tab */
.folder-tab {
  position: absolute;
  width: 200px;
  height: 40px;
  background: #D4C8BE;
  top: -40px;
  left: 40px;
  border: 1px solid #8E7F7F;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3A3238;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Classification Elements - Only show when not in menu */
.protection-status:not(#menuSection *) {
  position: absolute;
  top: 40px;
  right: 40px;
  transform: rotate(15deg);
  color: #8E7F7F;
  border: 3px solid #8E7F7F;
  padding: 10px 20px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 2px;
  opacity: 0.7;
  z-index: 1;
}

.confidential-stamp:not(#menuSection *) {
  position: absolute;
  top: 20px;
  left: 40px;
  transform: rotate(-15deg);
  color: darkred;
  border: 2px solid darkred;
  padding: 5px 10px;
  font-size: 0.8rem;
  opacity: 0.7;
  font-weight: bold;
}

.protection-level:not(#menuSection *) {
  position: absolute;
  top: 120px;
  right: 40px;
  transform: rotate(15deg);
  background: #D4C8BE;
  padding: 5px 15px;
  font-size: 0.9rem;
  border: 1px solid #8E7F7F;
}

.classification-bar:not(#menuSection *) {
  background: darkred;
  color: #EBE6D8;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Hide these elements completely when menu is active */
#menuSection .protection-status,
#menuSection .confidential-stamp, 
#menuSection .protection-level,
#menuSection .classification-bar {
  display: none !important;
}

/* Document Header */
.header {
  padding: 2rem;
  border-bottom: 2px solid #8E7F7F;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.file-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #5F5449;
}

.date-stamp {
  background: #D4C8BE;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.title {
  font-size: 2rem;
  color: #3A3238;
  margin: 1rem 0 0 0;
  font-family: 'Courier New', Courier, monospace;
  border-bottom: 1px solid #8E7F7F;
  padding-bottom: 0.5rem;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.redacted {
  background: #3A3238;
  color: transparent;
  padding: 0 4px;
  border-radius: 2px;
  user-select: none;
}

.typewritten {
  font-family: 'Courier New', Courier, monospace;
}

/* Location Tooltip System */
.location-tooltip {
  position: fixed;
  background: #EBE6D8;
  border: 3px solid #8B4513;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  width: 400px;
  max-width: 90vw;
  font-family: 'Courier New', Courier, monospace;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.location-tooltip.active {
  opacity: 1;
}

.tooltip-header {
  background: #8B4513;
  color: #EBE6D8;
  padding: 0.75rem 1rem;
  position: relative;
  border-bottom: 2px solid #5F5449;
}

.tooltip-classified {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: darkred;
  color: #EBE6D8;
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.tooltip-title {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-right: 5rem;
}

.tooltip-content {
  padding: 1rem;
  max-height: 500px;
  overflow-y: auto;
}

.tooltip-image {
  width: 100%;
  margin-bottom: 1rem;
  border: 2px solid #8E7F7F;
}

.tooltip-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tooltip-image-placeholder {
  width: 100%;
  height: 150px;
  background: #D4C8BE;
  border: 2px solid #8E7F7F;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
}

.placeholder-text {
  font-size: 0.9rem;
  color: #5F5449;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.placeholder-stamp {
  background: #8E7F7F;
  color: #EBE6D8;
  padding: 3px 8px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  transform: rotate(-5deg);
}

.tooltip-section {
  margin-bottom: 1rem;
  border-left: 3px solid #8B4513;
  padding-left: 0.75rem;
}

.tooltip-section-header {
  font-size: 0.75rem;
  color: #8B4513;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  border-bottom: 1px solid #8E7F7F;
  padding-bottom: 0.25rem;
}

.tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tooltip-list-item {
  font-size: 0.85rem;
  color: #3A3238;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-number {
  color: #8E7F7F;
  font-weight: bold;
  font-size: 0.75rem;
}

.item-marker {
  color: #8B4513;
  font-size: 0.7rem;
}

.item-text {
  color: #3A3238;
}

.tooltip-description {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #8E7F7F;
  background: rgba(139, 69, 19, 0.05);
  padding: 0.75rem;
}

.description-label {
  font-size: 0.7rem;
  color: #8E7F7F;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.description-text {
  font-size: 0.85rem;
  color: #3A3238;
  line-height: 1.5;
  font-style: italic;
}

/* Scrollbar styling for tooltip */
.tooltip-content::-webkit-scrollbar {
  width: 8px;
}

.tooltip-content::-webkit-scrollbar-track {
  background: #D4C8BE;
}

.tooltip-content::-webkit-scrollbar-thumb {
  background: #8B4513;
  border-radius: 4px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
  background: #5F5449;
}

/* Location Info Popup System */
.location-info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 50, 56, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10003;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.location-info-overlay.active {
  opacity: 1 !important;
}

.location-info-popup {
  background: #EBE6D8;
  border: 3px solid #8B4513;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  width: 600px;
  max-width: 90vw;
  max-height: 85vh;
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.location-info-popup.active {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.location-info-header {
  background: #8B4513;
  color: #EBE6D8;
  padding: 1rem 1.5rem;
  position: relative;
  border-bottom: 2px solid #5F5449;
  display: flex;
  align-items: center;
}

.location-info-classified {
  position: absolute;
  top: 0.75rem;
  right: 3.5rem;
  background: darkred;
  color: #EBE6D8;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.location-info-title {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  flex: 1;
}

.location-info-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: #EBE6D8;
  font-size: 2rem;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.location-info-close:hover {
  background: rgba(0,0,0,0.2);
  transform: rotate(90deg);
}

.location-info-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.location-info-zone {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(139, 69, 19, 0.1);
  border-left: 4px solid #8B4513;
}

.location-info-image {
  width: 100%;
  margin-bottom: 1.5rem;
  border: 2px solid #8E7F7F;
}

.location-info-image img {
  width: 100%;
  height: auto;
  display: block;
}

.location-info-image-placeholder {
  width: 100%;
  height: 200px;
  background: #D4C8BE;
  border: 2px solid #8E7F7F;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.location-info-description {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(139, 69, 19, 0.05);
  border: 2px solid #8E7F7F;
}

.info-section-header {
  font-size: 0.75rem;
  color: #8B4513;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  border-bottom: 2px solid #8B4513;
  padding-bottom: 0.5rem;
}

.info-description-text {
  font-size: 0.9rem;
  color: #3A3238;
  line-height: 1.6;
  font-style: italic;
}

.location-info-section {
  margin-bottom: 1.5rem;
  border-left: 3px solid #8B4513;
  padding-left: 1rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.info-list-item {
  font-size: 0.9rem;
  color: #3A3238;
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-info-footer {
  padding: 1rem 1.5rem;
  background: #D4C8BE;
  border-top: 2px solid #8E7F7F;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.location-enter-button {
  background: #8B4513;
  color: #EBE6D8;
  border: 2px solid #5F5449;
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.location-enter-button:hover {
  background: #5F5449;
  border-color: #3A3238;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.location-cancel-button {
  background: #8E7F7F;
  color: #EBE6D8;
  border: 2px solid #5F5449;
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.location-cancel-button:hover {
  background: #5F5449;
  border-color: #3A3238;
}

/* Scrollbar for location info content */
.location-info-content::-webkit-scrollbar {
  width: 8px;
}

.location-info-content::-webkit-scrollbar-track {
  background: #D4C8BE;
}

.location-info-content::-webkit-scrollbar-thumb {
  background: #8B4513;
  border-radius: 4px;
}

.location-info-content::-webkit-scrollbar-thumb:hover {
  background: #5F5449;
}

/* Sublocation Buttons */
.sublocation-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sublocation-button {
  background: #D4C8BE;
  border: 2px solid #8B4513;
  border-left: 4px solid #8B4513;
  padding: 0.75rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #3A3238;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
}

.sublocation-button:hover {
  background: #C4B8AE;
  border-left-width: 6px;
  transform: translateX(3px);
}

.sublocation-button.closed {
  background: #E5E0D8;
  border-color: #8E7F7F;
  opacity: 0.6;
  cursor: not-allowed;
}

.sublocation-button.closed:hover {
  background: #E5E0D8;
  border-left-width: 4px;
  transform: none;
}

.subloc-number {
  color: #8E7F7F;
  font-weight: bold;
  font-size: 0.8rem;
}

.subloc-name {
  flex: 1;
  font-weight: bold;
  color: #3A3238;
}

.subloc-status {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 1px;
  margin-left: auto;
  margin-right: 0.5rem;
}

.subloc-status.open {
  background: rgba(107, 142, 61, 0.2);
  color: #5a7a3d;
  border: 1px solid #5a7a3d;
}

.subloc-status.closed {
  background: rgba(139, 69, 19, 0.2);
  color: #8B4513;
  border: 1px solid #8B4513;
}

.subloc-arrow {
  color: #8B4513;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.sublocation-button:hover .subloc-arrow {
  transform: translateX(5px);
}

/* People Grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}

.person-card {
  background: #D4C8BE;
  border: 2px solid #8E7F7F;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.person-card:hover {
  background: #C4B8AE;
  border-color: #8B4513;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.person-card::before {
  content: 'ID';
  position: absolute;
  top: 3px;
  right: 3px;
  background: #8B4513;
  color: #EBE6D8;
  padding: 1px 4px;
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.person-photo {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.75rem;
  background: #EBE6D8;
  border: 2px solid #8E7F7F;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.photo-placeholder {
  font-size: 2.5rem;
  color: #8E7F7F;
  opacity: 0.5;
}

/* Map people tooltip */
.map-people-tooltip {
  position: fixed;
  background: #EBE6D8;
  border: 3px solid #8B4513;
  padding: 0;
  z-index: 10005;
  pointer-events: all;
  opacity: 0;
  transform: translateY(-50%) translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.map-people-tooltip.active {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tooltip-header {
  background: #D4C8BE;
  border-bottom: 2px solid #8B4513;
}

.tooltip-classification {
  background: #8B4513;
  color: #EBE6D8;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 0.3rem 0.75rem;
  text-align: center;
}

.tooltip-title {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  color: #3A3238;
  padding: 0.5rem 0.75rem;
  text-align: center;
  letter-spacing: 1px;
}

.tooltip-people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.75rem;
  background: #EBE6D8;
}

.tooltip-person-card {
  background: #D4C8BE;
  border: 2px solid #8E7F7F;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tooltip-person-card:hover {
  background: #C4B8AE;
  border-color: #8B4513;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.tooltip-person-card::before {
  content: 'ID';
  position: absolute;
  top: 2px;
  right: 2px;
  background: #8B4513;
  color: #EBE6D8;
  padding: 1px 3px;
  font-size: 0.45rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.tooltip-person-photo {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.4rem;
  background: #EBE6D8;
  border: 2px solid #8E7F7F;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.tooltip-person-photo .photo-placeholder {
  font-size: 2rem;
}

.tooltip-person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tooltip-person-name {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: #3A3238;
  font-weight: bold;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.person-name {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #3A3238;
  font-weight: bold;
  line-height: 1.2;
  word-wrap: break-word;
}

/* Delivery order destination box */
.order-destination-box {
  background: #D4C8BE;
  border: 2px solid #8B4513;
  border-left: 6px solid #8B4513;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.destination-header {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #8B4513;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.destination-location {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  color: #3A3238;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.destination-zone {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #8E7F7F;
  font-style: italic;
}

/* Delivery notification */
.delivery-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #EBE6D8;
  border: 3px solid #8B4513;
  padding: 1rem 1.5rem;
  z-index: 10010;
  min-width: 300px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.delivery-notification.active {
  opacity: 1;
  transform: translateX(0);
}

.delivery-notif-header {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.delivery-notif-text {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #3A3238;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.delivery-notif-timer {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #8E7F7F;
  font-style: italic;
}

/* Delivery order markers on map */
/* Delivery markers — match the .dm vintage map style (emoji + sepia + soft glow) */
.delivery-order-marker {
  position: absolute;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 8;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, z-index 0s;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: order-spawn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Smooth pop-in entrance — scale up with bounce */
@keyframes order-spawn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}


.delivery-order-marker:hover {
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 16;
}

/* Bright cream halo — high contrast against beige paper map */
.order-pulse {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 250, 235, 0.95) 0%,
    rgba(250, 240, 215, 0.7) 30%,
    rgba(245, 230, 195, 0.35) 55%,
    rgba(235, 215, 175, 0) 75%
  );
  box-shadow: 0 0 14px 2px rgba(255, 245, 220, 0.55);
  animation: order-pulse-animation 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes order-pulse-animation {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.55;
  }
}

/* SVG silhouette icon — matches .dm-icon vintage map look */
.order-marker-icon {
  position: relative;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.order-marker-icon svg {
  width: 100%;
  height: 100%;
  fill: #3a3228;
}

.delivery-order-marker:hover .order-marker-icon {
  opacity: 1;
  transform: scale(1.05);
}

/* Difficulty stars — only on hover, below icon */
.order-difficulty {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: 0.6rem;
  line-height: 1;
  color: #5a4a3a;
  text-shadow: 0 1px 0 rgba(235, 230, 216, 0.8);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}

.delivery-order-marker:hover .order-difficulty {
  opacity: 1;
}

.order-marker-info {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 22, 18, 0.96);
  border: 1px solid #8b7355;
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.72rem;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.order-marker-info::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #8b7355;
}

.order-payment {
  color: #c4a87a;
  font-weight: bold;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.order-timer {
  color: rgba(196, 168, 122, 0.7);
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

/* Delivery route — dashed line from pickup (or player) to destination */
.delivery-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 7; /* between zones (5) and delivery markers (8-9) */
  overflow: visible;
}

.delivery-route line {
  stroke: rgba(255, 245, 220, 0.85);
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 3px rgba(255, 245, 220, 0.6));
  animation: delivery-route-flow 1.4s linear infinite;
}

@keyframes delivery-route-flow {
  to { stroke-dashoffset: -22; }
}

/* Order details popup overlay — fullscreen modal */
.order-details-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: order-overlay-fade 0.25s ease-out;
}

@keyframes order-overlay-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.order-details-overlay .order-details-container {
  position: relative;
  animation: order-popup-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes order-popup-rise {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Delivery destination marker */
.delivery-destination-marker {
  position: absolute;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 9;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, z-index 0s;
  display: flex;
  align-items: center;
  justify-content: center;
}


.delivery-destination-marker:hover {
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 17;
}

.destination-pulse {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 250, 235, 0.95) 0%,
    rgba(250, 240, 215, 0.7) 30%,
    rgba(245, 230, 195, 0.35) 55%,
    rgba(235, 215, 175, 0) 75%
  );
  box-shadow: 0 0 16px 3px rgba(255, 245, 220, 0.6);
  animation: destination-pulse-animation 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes destination-pulse-animation {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

.destination-icon {
  position: relative;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.destination-icon svg {
  width: 100%;
  height: 100%;
  fill: #3a3228;
}

.delivery-destination-marker:hover .destination-icon {
  opacity: 1;
  transform: scale(1.05);
}

/* Map zone markers */
.map-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #8B4513;
  border: 3px solid #EBE6D8;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.map-marker:hover {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 101;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

/* Current location marker - golden circle */
.map-marker.current-location {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: 3px solid #8B4513;
  width: 26px;
  height: 26px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.8);
  animation: current-location-glow 2s ease-in-out infinite;
  z-index: 150;
}

@keyframes current-location-glow {
  0%, 100% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.8);
  }
  50% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 215, 0, 1);
  }
}

/* Diary Entry Styles */
.diary-entry {
  border: 3px solid #8B4513;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #8E7F7F;
}

.entry-date {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #5F5449;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.75rem;
}

.entry-classification {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  border: 2px solid;
  background: #8B4513;
  color: #EBE6D8;
  border-color: #5F5449;
}

.entry-title {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: #3A3238;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.entry-content {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: #3A3238;
  line-height: 1.7;
  padding: 1rem;
}

/* Task list styles - bracketed/boxed format */
.task-list {
  margin-top: 1rem;
}

.task-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  position: relative;
  border: 2px solid #8B4513;
  background: rgba(139, 69, 19, 0.05);
  font-size: 0.9rem;
}

.task-item::before {
  content: '[ ';
  color: #8B4513;
  font-weight: bold;
  margin-right: 0.25rem;
}

.task-item::after {
  content: ' ]';
  color: #8B4513;
  font-weight: bold;
  margin-left: 0.25rem;
}

/* Diary panel specific styles */
.diary-entries-container {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.diary-entries-container::-webkit-scrollbar {
  width: 10px;
}

.diary-entries-container::-webkit-scrollbar-track {
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
}

.diary-entries-container::-webkit-scrollbar-thumb {
  background: #8B4513;
  border-radius: 5px;
}

.diary-entries-container::-webkit-scrollbar-thumb:hover {
  background: #5F5449;
}

/* Location Modal / Popup Styles */
.location-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.location-modal.active {
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 50, 56, 0.9);
  z-index: 1;
}

.modal-container {
  position: relative;
  z-index: 2;
  background: #EBE6D8;
  border: 3px solid #8E7F7F;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: rgba(139, 69, 19, 0.1);
  border-bottom: 2px solid #8E7F7F;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #3A3238;
  letter-spacing: 1px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #8B4513;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #3A3238;
}

.location-list {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* ===== HUD PANELS — FBI Document Style ===== */
.player-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f5f5dc;
  border-bottom: 3px solid #8B4513;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  /* Transition kept on the base rule so the slide-out on PC-open
     and the slide-back-in on PC-close share the same easing. */
  transition: transform 0.45s cubic-bezier(0.45, 0, 0.35, 1);
}

/* Computer is open — slide the HUD out of frame so the PC takes
   the screen, without touching any state classes (.tour-mode,
   .show-character, .show-map, .show-diary, .show-* etc.) on these
   elements. On PC close, the classes are unchanged so the panels
   slide back in with the same buttons revealed they had before. */
body.pc-hud-hidden .player-panel {
  transform: translateY(-110%);
}
body.pc-hud-hidden .bottom-panel {
  transform: translateY(110%);
}
body.pc-hud-hidden .floating-phone {
  /* Phone is at right:24px; bottom:90px; rotated -9deg — slide it
     down past the bottom edge alongside the bottom panel, keep
     the rotation so it looks like the same prop tipping off. */
  transform: rotate(-9deg) translate(0, 220px) !important;
}

/* Tour mode — strip the upper panel down to just Time + Calendar.
   visibility (not display) keeps the layout reserved so when MAP
   later reveals, it sits in its natural slot inside the nav-buttons
   row — same X position as in the full panel. */
.player-panel.tour-mode .panel-left > * {
  visibility: hidden;
}
/* The wallet surfaces with the card (Day-4 Thrust Bank, the
   revealMoneyHUD action): the money display alone, in its own
   slot, until the full HUD arrives. */
.player-panel.tour-mode.show-money .panel-left .money-display {
  visibility: visible;
}
.player-panel.tour-mode .panel-center .panel-nav-btn {
  /* QA P3-01 — visibility:hidden reserved a full-width slot for
     every not-yet-granted button, so the nav row wore button-sized
     holes (132px where DOSSIERS will one day be). display:none
     collapses them; a freshly revealed button still drops into the
     row where it belongs — the row just closes ranks until then. */
  display: none;
  pointer-events: none;
}
.player-panel.tour-mode .time-display {
  cursor: default !important;
  pointer-events: none;
}

/* After the player commits to going to Kitty's spot (clicking The
   Usual Spot in the tour), reveal the MAP nav button in its NATURAL
   position with an emergence animation — drops in, bounces past 1.0,
   settles. A soft gold pulse follows for 2 seconds to draw the eye. */
.player-panel.tour-mode.show-map .panel-center .panel-nav-btn[data-tour-keep="map"] {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  animation:
    tourMapReveal 0.75s cubic-bezier(0.34, 1.4, 0.5, 1) both,
    tourMapGlow   2.0s ease-out 0.75s 2;
  position: relative;
  z-index: 1;
}

/* Same reveal pattern for the APARTMENT nav button — surfaces in
   the PART XXV mirror beat (Status page, the grooming bar), the
   building switcher that later grows the furniture screen. */
.player-panel.tour-mode.show-apartment .panel-center .panel-nav-btn[data-tour-keep="apartment"] {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  animation:
    tourMapReveal 0.75s cubic-bezier(0.34, 1.4, 0.5, 1) both,
    tourMapGlow   2.0s ease-out 0.75s 2;
  position: relative;
  z-index: 1;
}

/* Same reveal pattern for the CHARACTER nav button — surfaces in
   PART XXIV after Kitty's first line. Sits in its natural panel
   slot (no shift); the rest of the nav buttons stay hidden until
   the world fully unlocks later. */
.player-panel.tour-mode.show-character .panel-center .panel-nav-btn[data-tour-keep="character"] {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  animation:
    tourMapReveal 0.75s cubic-bezier(0.34, 1.4, 0.5, 1) both,
    tourMapGlow   2.0s ease-out 0.75s 2;
  position: relative;
  z-index: 1;
}

/* DIARY nav button — surfaces in PART XXXI (Diary 3 AM) after MC
   types the first journal entries on the WitSec laptop. Same
   reveal pattern as MAP / CHARACTER. */
.player-panel.tour-mode.show-diary .panel-center .panel-nav-btn[data-tour-keep="diary"] {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  animation:
    tourMapReveal 0.75s cubic-bezier(0.34, 1.4, 0.5, 1) both,
    tourMapGlow   2.0s ease-out 0.75s 2;
  position: relative;
  z-index: 1;
}
/* DOSSIERS nav button — surfaces in PART XLII (Phil's briefing)
   when Kitty slides Dana's field file across the counter and the
   dossier tutorial asks the player to open it. Same reveal pattern
   as MAP / CHARACTER / DIARY. */
.player-panel.tour-mode.show-dossiers .panel-center .panel-nav-btn[data-tour-keep="dossiers"] {
  display: inline-block;
  visibility: visible;
  pointer-events: auto;
  animation:
    tourMapReveal 0.75s cubic-bezier(0.34, 1.4, 0.5, 1) both,
    tourMapGlow   2.0s ease-out 0.75s 2;
  position: relative;
  z-index: 1;
}
@keyframes tourMapReveal {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.7); filter: blur(4px); }
  60%  { opacity: 1; transform: translateY(2px)  scale(1.08); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0)   scale(1);    filter: blur(0); }
}
@keyframes tourMapGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 168, 122, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(196, 168, 122, 0.45),
                          0 0 22px rgba(196, 168, 122, 0.55); }
}

.player-panel::before,
.bottom-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.05) 0%, transparent 30%);
  pointer-events: none;
}

.panel-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: #f5f5dc;
  min-height: 50px;
  width: 100%;
}

.panel-left, .panel-center, .panel-right {
  display: flex;
  align-items: center;
}

.panel-left {
  flex: 1 1 0;
  justify-content: flex-start;
  min-width: 200px;
}

.panel-center {
  flex: 1 1 0;
  justify-content: center;
}

.panel-right {
  flex: 1 1 0;
  justify-content: flex-end;
  min-width: 150px;
}

.money-display {
  font-family: 'Courier New', monospace;
  color: #5F5449;
}

.currency-label {
  color: #8B4513;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.currency-amount {
  color: #006400;
  font-size: 1rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

.nav-buttons {
  display: flex;
  gap: 0.25rem;
}

.panel-nav-btn {
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  border-top: 2px solid #8E7F7F;
  border-bottom: none;
  color: #5F5449;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 80px;
  position: relative;
  border-radius: 4px 4px 0 0;
  margin-bottom: -2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.panel-nav-btn:hover {
  background: #EBE6D8;
  border-color: #654321;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.panel-nav-btn:active {
  background: #8B4513;
  color: #f5f5dc;
  transform: translateY(-1px);
}

.panel-nav-btn::before {
  content: '';
  position: absolute;
  top: -2px; left: -1px; right: -1px;
  height: 2px;
  background: #8E7F7F;
}

.time-display {
  font-family: 'Courier New', monospace;
  text-align: right;
  color: #5F5449;
}

.date-info {
  color: #8B4513;
  font-size: 0.75rem;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.time-info {
  color: #5F5449;
  font-size: 1rem;
  font-weight: bold;
}

/* Bottom Panel */
.bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f5f5dc;
  border-top: 3px solid #8B4513;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.45s cubic-bezier(0.45, 0, 0.35, 1);
}

.bottom-panel .panel-content {
  padding: 0.5rem 2rem;
  min-height: 40px;
}

.status-display {
  font-family: 'Courier New', monospace;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-label {
  color: #8B4513;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-bar {
  width: 120px;
  height: 20px;
  background: transparent;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  transition: width 0.5s ease;
}

.stamina-bar .status-bar-fill {
  background: repeating-linear-gradient(
    45deg,
    #5F5449, #5F5449 10px,
    #8E7F7F 10px, #8E7F7F 20px
  );
}

.stress-bar .status-bar-fill {
  background: repeating-linear-gradient(
    45deg,
    #8B4513, #8B4513 10px,
    #654321 10px, #654321 20px
  );
}

.status-value {
  color: #5F5449;
  font-size: 0.9rem;
  font-weight: bold;
  min-width: 30px;
}

.location-display {
  font-family: 'Courier New', monospace;
  text-align: center;
}

.location-label {
  color: #8B4513;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 0.5rem;
}

.location-value {
  color: #5F5449;
  font-size: 1rem;
  font-weight: bold;
}

/* Finance Dropdown */
.finance-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #f5f5dc;
  border: 2px solid #8B4513;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10001;
  font-family: 'Courier New', monospace;
  min-width: 300px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.finance-dropdown.active {
  max-height: 300px;
}

.finance-dropdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.05) 0%, transparent 30%);
  pointer-events: none;
}

.finance-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(142, 127, 127, 0.3);
}

.finance-dropdown-item:last-child {
  border-bottom: none;
}

.finance-dropdown-label {
  color: #8B4513;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.finance-dropdown-value {
  color: #5F5449;
  font-size: 0.9rem;
  font-weight: bold;
}

.finance-dropdown-value.positive {
  color: #006400;
}

.finance-dropdown-value.negative {
  color: #8B4513;
}

.finance-dropdown-separator {
  height: 1px;
  background: #8E7F7F;
  margin: 0.5rem 0;
}

.finance-see-all-btn {
  width: 100%;
  padding: 0.75rem;
  background: #8B4513;
  border: none;
  color: #EBE6D8;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 0.5rem;
}

.finance-see-all-btn:hover {
  background: #654321;
}

/* Body offset when panels active */
body.panel-active {
  padding-top: 60px;
  padding-bottom: 50px;
}

body.panel-active .section {
  margin-top: 0;
}

@media (max-width: 768px) {
  .panel-content {
    padding: 0.5rem 1rem;
  }
  .nav-buttons {
    gap: 0.25rem;
  }
  .panel-nav-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.6rem;
    min-width: 45px;
  }
  .currency-amount, .time-info {
    font-size: 0.85rem;
  }
  .currency-label, .date-info {
    font-size: 0.65rem;
  }
}
/* QA P1-04 — the config panel's close control. */
#protectionConfigOverlay .pc-header { position: relative; }
#protectionConfigOverlay .pc-close {
  position: absolute; top: 4px; right: 6px;
  width: 34px; height: 34px;
  background: transparent;
  border: 1px solid #8E7F7F;
  color: #5F5449;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
}
#protectionConfigOverlay .pc-close:hover { background: rgba(139, 0, 0, 0.1); color: #8B0000; }
