/* ==========================================================================
   FLESHNOTE IDE — PENTIMENTO AMBIENT PLAYBACK SYSTEM
   Simulates real-time manuscript drafting, pauses, typo revisions,
   watercolor heatmaps, and strikethroughs beneath a soft blur.
   ========================================================================== */

.pentimento-bg-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  opacity: 0.22;
  filter: blur(2.2px);
  mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0.4) 65%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0.4) 65%, transparent 95%);
  transition: opacity 0.5s ease;
}

.pentimento-sheet {
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  padding: 40px 60px;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.95;
  color: #dfd8cb;
  position: relative;
  user-select: none;
}

.pentimento-header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-amber);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(212, 160, 82, 0.2);
  padding-bottom: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pentimento-chapter-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.pentimento-body {
  position: relative;
}

.p-paragraph {
  margin-bottom: 24px;
  position: relative;
}

.p-active-line {
  position: relative;
  display: inline;
}

.p-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background-color: var(--accent-amber);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: pCursorBlink 0.9s infinite;
  box-shadow: 0 0 8px var(--accent-amber);
}

@keyframes pCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Pentimento Heatmap Washes */
.p-wash {
  position: relative;
  display: inline;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.p-wash-calm {
  background: rgba(63, 160, 147, 0.18);
  color: #c9ede7;
  border-bottom: 1px solid rgba(63, 160, 147, 0.4);
}

.p-wash-amber {
  background: rgba(217, 151, 63, 0.22);
  color: #fae4c2;
  border-bottom: 1px solid rgba(217, 151, 63, 0.5);
}

.p-wash-fought {
  background: rgba(196, 84, 74, 0.25);
  color: #ffd2cf;
  border-bottom: 1px solid rgba(196, 84, 74, 0.6);
}

/* Crossed out / ghost revisions */
.p-deleted {
  display: inline;
  color: #e06c62;
  text-decoration: line-through;
  opacity: 0.65;
  background: rgba(196, 92, 92, 0.15);
  padding: 0 4px;
  margin-right: 4px;
  font-style: italic;
}

.p-ghost-annotation {
  position: absolute;
  right: -140px;
  width: 120px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-amber);
  opacity: 0.7;
  border-left: 1px solid var(--accent-amber);
  padding-left: 6px;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .p-ghost-annotation {
    display: none;
  }
}
