#fp-list,
#profile-panel .profile-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

/* -------------------------------------------------------------------------- */
/* BODY */
/* -------------------------------------------------------------------------- */

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Rows */

.profile-name-row,
.profile-id-row {
  display: grid;
  grid-template-columns: 60px 1fr 42px;
  column-gap: 6px;
  align-items: center;
}

.profile-name-label,
.profile-id-label {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
}

/* Values — JOURNAL INSET STYLE */

.profile-name-value,
.profile-id-value {
                      /* journal inset */
  border-radius: 6px;

  padding: 4px 6px;
  font-size: 13px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons — subdued, journal-appropriate */

.profile-edit-btn,
.profile-copy-btn,
.profile-choose-btn {
  padding: 4px 6px;

  border-radius: 6px;

  font-size: 12px;
  cursor: pointer;
}

.profile-edit-btn:hover,
.profile-copy-btn:hover,
.profile-choose-btn:hover {
}

/* -------------------------------------------------------------------------- */
/* FAVORITE CHAO — JOURNAL PREVIEW */
/* -------------------------------------------------------------------------- */

.profile-chao-header {
  margin-top: 6px;
  font-size: 14px;
  font-weight: bold;
}

/* This intentionally matches #journal-chao-preview */

.profile-favchao-box {
  width: 100%;
  height: 150px;

  background: #000;
  border: 2px solid #415a77;
  border-radius: 8px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-favchao-empty {
  font-size: 13px;
  color: #ffffff;
  opacity: 0.7;
}

.profile-favchao-img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.profile-favchao-name {
  margin-top: 2px;
  font-size: 13px;
  color: #ffffff;
}

/* ========================================================================== */
/* FAVORITE CHAO PICKER — JOURNAL ADJACENT */
/* ========================================================================== */

/* Picker entries = journal-style preview tiles */

.favpicker-entry {
  width: 90px;
  height: 90px;

  background: #000;
  border: 2px solid #415a77;
  border-radius: 8px;

  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.favpicker-entry:hover {
  background: #222;
}

.favpicker-entry img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

/* extracted from style.css: quest_log */
/* ============================================================
   Quest log module — normalized floating sidecard
   ============================================================ */
#quest-log-panel.panel {
  min-height: 112px;
}

#quest-log-panel > .panel-body.quest-log-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

#quest-log-panel.collapsed {
  height: auto;
  min-height: 112px;
}

#quest-log-panel.collapsed > .panel-body.quest-log-panel-body {
  max-height: 84px;
}

#quest-log-panel.collapsed .quest-log-list {
  display: none;
}

#quest-log-panel.expanded > .panel-body.quest-log-panel-body,
#quest-log-panel:not(.collapsed) > .panel-body.quest-log-panel-body {
  overflow: hidden;
}

.quest-log-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #d7e6ff;
  font-size: 11px;
  vertical-align: middle;
}

.quest-log-expand-btn,
.quest-board-open-log,
.quest-track-toggle {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
}

.quest-log-expand-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
}

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

.quest-board-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.quest-board-open-log {
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.quest-entry-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.quest-track-toggle {
  flex: 1 1 180px;
  min-height: 38px;
  padding: 8px 10px;
  cursor: pointer;
}

.quest-track-toggle.tracked {
  border-color: rgba(93,169,241,0.7);
  background: rgba(93,169,241,0.18);
}

.quest-track-toggle[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.quest-log-summary {
  color: #d7e6ff;
  font-size: 12px;
  opacity: 0.92;
}

.quest-log-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.quest-log-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(93,169,241,0.25);
  background: rgba(12,18,30,0.82);
}

.quest-log-entry.completed {
  border-color: rgba(76,175,80,0.45);
  background: rgba(28,44,30,0.88);
}

.quest-log-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.quest-log-entry-title {
  color: #e9fc4e;
  font-weight: 700;
  line-height: 1.2;
}

.quest-log-entry-objective,
.quest-log-entry-reward,
.quest-log-entry-progress {
  color: #d7e6ff;
  font-size: 12px;
  line-height: 1.35;
}

.quest-log-untrack-btn {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
}
.quest-entry-actions .quest-accept {
  flex: 1 1 180px;
  width: auto;
  margin-top: 0;
}

.quest-board-topbar #quest-board-tabs {
  justify-content: flex-start;
}

.quest-log-step-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.quest-log-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  font-size: 12px;
}

.quest-log-step.done {
  opacity: 0.85;
}

.quest-log-step-name {
  min-width: 0;
  flex: 1 1 auto;
}

.quest-log-step-meta {
  flex: 0 0 auto;
  font-weight: 700;
  color: #d7e6ff;
}

/* Tutorial NPC stand */
#tutorial-npc-panel {
  width: 420px;
  height: 520px;
}
#tutorial-npc-panel > .panel-body.tutorial-npc-panel-body {
  padding: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(158,220,255,0.22) 0%, rgba(119,170,98,0.18) 58%, rgba(94,65,33,0.14) 100%);
}
.tutorial-npc-options-section {
  margin-top: 14px;
}
.tutorial-stand-scene {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #b5ecff 0%, #dff7ff 38%, #78c765 39%, #68b056 100%);
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 1px rgba(34,52,27,0.25);
}
.tutorial-stand-scene::before {
  content: "";
  position: absolute;
  inset: auto 0 72px 0;
  height: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0));
}
.tutorial-stand-sign {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  min-width: 220px;
  text-align: center;
  padding: 10px 18px;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, #ffe7b8, #efbf6e);
  border: 3px solid #7b4b1d;
  color: #472608;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: 0 6px 0 rgba(92,54,18,0.6);
  z-index: 1;
}
