.npc-scroll {
  padding: 28px 12px 42px;
}

.npc-profile {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1.18fr);
  gap: 22px;
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px;

  color: #2d2119;
  background:
    linear-gradient(145deg, #fffaf2, #eee3d2);
  border: 1px solid #c9bdac;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.vampire-sheet-app .npc-profile {
  color: #ede6df;
  background:
    linear-gradient(
      145deg,
      rgba(34, 24, 24, 0.98),
      rgba(18, 14, 16, 0.98)
    );
  border-color: rgba(179, 144, 96, 0.38);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.npc-portrait-panel,
.npc-copy-panel {
  min-width: 0;
}

.npc-portrait-panel {
  display: grid;
  place-items: center;
  align-self: start;

  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 340px;
  max-height: 560px;
  overflow: hidden;

  background: #1d1715;
  border: 1px solid #8a6b32;
  border-radius: 8px;
}

.npc-portrait {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.character-sketch {
  object-position: top center;
}

.npc-portrait-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 340px;

  color: #dbc291;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 14px
    ),
    #171111;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.npc-copy-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.npc-kicker {
  color: #7a1f1f;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vampire-sheet-app .npc-kicker {
  color: #c19a62;
}

.npc-copy-panel h2 {
  margin: 0;

  color: #241716;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

.vampire-sheet-app .npc-copy-panel h2 {
  color: #f0d7b0;
}

.npc-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.npc-field span {
  color: #5b4a3b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vampire-sheet-app .npc-field span {
  color: #c9b9aa;
}

.npc-field input,
.npc-field textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #b7ab9b;
  border-radius: 6px;
}

.npc-upload-field {
  gap: 10px;
}

.npc-file-picker {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: max-content;
  min-width: min(100%, 220px);
  min-height: 42px;
  padding: 0 14px;

  color: #f7e8c2;
  background: #7a1f1f;
  border: 1px solid #561515;
  border-radius: 6px;

  font-weight: 850;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.npc-file-picker:hover {
  background: #561515;
}

.vampire-sheet-app .npc-file-picker {
  color: #21160f;
  background:
    linear-gradient(
      135deg,
      #e1b56c,
      #bd8441
    );
  border-color: #efc985;
}

.vampire-sheet-app .npc-file-picker:hover {
  filter: brightness(1.06);
}

.npc-file-picker input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;
}

.npc-url-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.npc-url-field span {
  color: #756553;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.npc-field textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.55;
  white-space: pre-wrap;
}

.npc-description {
  margin: 0;
  max-width: 72ch;

  color: #3f3329;
  font-size: 1.04rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.vampire-sheet-app .npc-description {
  color: #dfc8b8;
}

.character-chat-avatar-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;

  background: rgba(122, 31, 31, 0.08);
  border: 1px solid rgba(122, 31, 31, 0.18);
  border-radius: 8px;
}

.vampire-sheet-app .character-chat-avatar-panel {
  background: rgba(193, 154, 98, 0.08);
  border-color: rgba(193, 154, 98, 0.2);
}

.character-chat-avatar-preview {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  overflow: hidden;

  color: #f7e8c2;
  background: #7a1f1f;
  border: 2px solid rgba(122, 31, 31, 0.35);
  border-radius: 50%;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 900;
}

.vampire-sheet-app .character-chat-avatar-preview {
  color: #21160f;
  background: #c19a62;
  border-color: rgba(193, 154, 98, 0.5);
}

.character-chat-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.character-chat-avatar-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.character-chat-avatar-copy strong {
  color: #4a3326;
  font-size: 0.92rem;
  font-weight: 900;
}

.vampire-sheet-app .character-chat-avatar-copy strong {
  color: #f0d7b0;
}

.character-chat-avatar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: #5b4a3b;
  font-size: 0.86rem;
  font-weight: 800;
}

.vampire-sheet-app .character-chat-avatar-toggle {
  color: #c9b9aa;
}

.character-chat-avatar-toggle input {
  accent-color: #7a1f1f;
}

.vampire-sheet-app .character-chat-avatar-toggle input {
  accent-color: #c19a62;
}

.character-chat-avatar-crop {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 12px;

  background: rgba(255, 250, 242, 0.56);
  border: 1px dashed rgba(122, 31, 31, 0.24);
  border-radius: 8px;
}

.vampire-sheet-app .character-chat-avatar-crop {
  background: rgba(10, 8, 10, 0.42);
  border-color: rgba(193, 154, 98, 0.34);
}

.character-chat-avatar-crop-preview {
  display: grid;
  place-items: center;
  grid-row: span 3;
  width: 140px;
  height: 140px;
  min-height: 140px;
  padding: 0;
  overflow: hidden;

  background: #1d1715;
  border: 2px solid rgba(122, 31, 31, 0.36);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 250, 242, 0.42),
    0 12px 26px rgba(45, 33, 25, 0.18);

  cursor: crosshair;
  touch-action: none;
}

.character-chat-avatar-crop-preview:hover {
  background: #1d1715;
  border-color: rgba(122, 31, 31, 0.58);
}

.vampire-sheet-app .character-chat-avatar-crop-preview {
  background: #0d0909;
  border-color: rgba(193, 154, 98, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(241, 213, 171, 0.22),
    0 14px 30px rgba(0, 0, 0, 0.36);
}

.vampire-sheet-app .character-chat-avatar-crop-preview:hover {
  background: #0d0909;
  border-color: rgba(193, 154, 98, 0.7);
}

.character-chat-avatar-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.character-chat-avatar-slider {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.character-chat-avatar-slider span {
  color: #5b4a3b;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vampire-sheet-app .character-chat-avatar-slider span {
  color: #c9b9aa;
}

.character-chat-avatar-slider input {
  width: 100%;
  accent-color: #7a1f1f;
}

.vampire-sheet-app .character-chat-avatar-slider input {
  accent-color: #c19a62;
}

.npc-preview {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;

  min-width: 0;
  overflow: hidden;

  color: #ead8b8;
  background: #141010;
  border: 1px solid #5e4a31;
}

.npc-preview.compact {
  display: block;
  aspect-ratio: 4 / 3;
}

.npc-preview img,
.npc-preview-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  background: #0c0909;
}

.npc-preview.compact img,
.npc-preview.compact .npc-preview-placeholder {
  min-height: 0;
}

.npc-preview-placeholder {
  display: grid;
  place-items: center;

  color: #d4b36e;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.npc-preview-copy {
  min-width: 0;
  padding: 12px 12px 12px 0;
}

.npc-preview-copy strong {
  display: block;
  overflow-wrap: anywhere;

  color: #f2dfb5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  line-height: 1.08;
}

.npc-preview-copy p {
  margin: 8px 0 0;
  color: #b7a47f;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .npc-profile {
    grid-template-columns: 1fr;
    width: min(100%, calc(100vw - 20px));
    padding: 14px;
  }

  .npc-portrait-panel,
  .npc-portrait-placeholder {
    aspect-ratio: 4 / 3;
    min-height: 260px;
    max-height: 420px;
  }

  .npc-field textarea {
    min-height: 220px;
  }

  .npc-file-picker {
    width: 100%;
  }

  .character-chat-avatar-panel {
    align-items: flex-start;
  }

  .character-chat-avatar-crop {
    grid-template-columns: 1fr;
  }

  .character-chat-avatar-crop-preview {
    grid-row: auto;
    justify-self: center;
  }

  .character-chat-avatar-slider {
    grid-template-columns: 1fr;
  }

  .npc-preview {
    grid-template-columns: 1fr;
  }

  .npc-preview-copy {
    padding: 12px;
  }
}
