/* extracted from style.css: friends_panel */
/* ============================================================
   FRIENDS PANEL (Local Friend List)
   ============================================================ */

#friends-panel > .panel-header.fp-header {
  position: relative;
  flex: 0 0 auto;
  min-height: var(--panel-header-h, 46px);
  height: var(--panel-header-h, 46px);
  margin: 0;
  padding: 0 var(--panel-header-pad-x, 10px);
  display: flex;
  align-items: center;
  gap: var(--panel-header-gap, 12px);
  box-sizing: border-box;
}

#friends-panel > .panel-header.fp-header .fp-title,
#friends-panel > .panel-header.fp-header .panel-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1;
}

#friends-panel > .panel-header.fp-header > .panel-header-controls {
  position: static;
  transform: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* ============================================================
   SELF INFO BLOCK (Name + ID + Copy buttons)
   ============================================================ */

#fp-self {
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: 2px solid #ffffff22;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-self-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fp-self-label {
  font-size: 14px;
  color: #cfe3ff;
  width: 50px;
}

.fp-self-value {
  font-size: 14px;
  color: #fff;
  font-weight: bold;
  flex-grow: 1;
  word-break: break-word;
}

.fp-copy-btn {
  padding: 4px 6px;
  background: #3d79ff;
  border: 1px solid #2c62dd;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
}

.fp-copy-btn:hover {
  background: #538aff;
}

/* ============================================================
   ADD FRIEND INPUT
   ============================================================ */

.fp-add-row {
  display: flex;
  gap: 8px;
}

.fp-input {
  flex-grow: 1;
  padding: 8px;
  background: #0e1a29;
  border: 1px solid #39526d;
  color: #fff;
  border-radius: 6px;
}

.fp-add-btn {
  padding: 8px 10px;
  background: #3d79ff;
  border: 1px solid #2c62dd;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
}

.fp-add-btn:hover {
  background: #538aff;
}

/* ============================================================
   FRIEND LIST SECTION
   ============================================================ */

.fp-section-title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: bold;
  color: #d0e1ff;
}

.fp-list {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid #2f4560;
  background: #162636;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fp-row {
  display: flex;
  align-items: center;
  background: #1a2d3e;
  border: 1px solid #344a63;
  border-radius: 6px;
  padding: 6px 10px;
  gap: 10px;
}

.fp-row-name {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  flex-grow: 1;
}

.fp-row-id {
  font-size: 12px;
  color: #a8c2d9;
  word-break: break-word;
  max-width: 100px;
}

/* Invite button */
.fp-invite-btn {
  background: #3d79ff;
  border: 1px solid #2c62dd;
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.fp-invite-btn:hover {
  background: #538aff;
}

.fp-invite-btn:disabled {
  background: #2f3f57;
  border-color: #44556d;
  cursor: default;
  opacity: 0.6;
}

/* Remove button */
.fp-remove-btn {
  background: #8c2f2f;
  border: 1px solid #b44646;
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.fp-remove-btn:hover {
  background: #a83b3b;
}

.fp-dm-btn {
  background:#3d79ff;
  border:1px solid #2c62dd;
  color:#fff;
  font-size:12px;
  padding:4px 6px;
  border-radius:6px;
  cursor:pointer;
}

.fp-dm-btn:hover {
  background:#538aff;
}

/* extracted from style.css: dm_panel */
/* ============================================================
   DIRECT MESSAGE PANEL
============================================================ */

.dm-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  background:#0d1c2b;
  border-bottom:2px solid #2a3d57;
}

.dm-title {
  font-size:20px;
  font-weight:bold;
}

.dm-close {
  width:30px;
  height:30px;
  background:#2b3e55;
  border:1px solid #3e587b;
  color:#eee;
  font-size:18px;
  border-radius:6px;
  cursor:pointer;
}

#dm-log {
  flex-grow:1;
  overflow-y:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  background:#10202e;
}

.dm-row {
  padding:6px 8px;
  background:#1a2d3e;
  border-radius:6px;
  border:1px solid #2f4560;
}

.dm-row-incoming {
  background:#243447;
  border-color:#3d5a7d;
}

.dm-author {
  font-size:13px;
  font-weight:bold;
}

.dm-content {
  font-size:14px;
  margin-top:2px;
}

.dm-time {
  font-size:10px;
  opacity:0.6;
  margin-top:4px;
}

.dm-input-row {
  display:flex;
  padding:10px;
  gap:8px;
  background:#0d1c2b;
}

.dm-input {
  flex-grow:1;
  padding:8px;
  border:1px solid #39526d;
  border-radius:6px;
  background:#0e1a29;
  color:#fff;
}

.dm-send {
  padding:8px 12px;
  border-radius:6px;
  background:#3d79ff;
  border:1px solid #2c62dd;
  cursor:pointer;
  color:#fff;
}

#lp-chat-btn {
  margin-left: 6px;
  padding: 6px 10px;
}

/* extracted from style.css: profile_panel */
/* ========================================================================== */
/* PROFILE PANEL — JOURNAL STYLE */
/* ========================================================================== */

#profile-panel.panel {
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;

  background: #1b263b;                 /* journal shell */
  border: 2px solid #415a77;
  border-radius: 8px;

  color: #ffffff;
  display: none;
  position: absolute;
  z-index: 9999;
  flex-direction: column;
}

/* -------------------------------------------------------------------------- */
/* HEADER */
/* -------------------------------------------------------------------------- */

.profile-header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px;
  box-sizing: border-box;
  border-bottom: 2px solid #415a77;
  margin-bottom: 0;
}

.profile-title {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 110px;
  font-size: 15px;
  font-weight: bold;
  color: #ffd60a;                      /* journal highlight */
  text-align: left;
}

#profile-panel .panel-header-controls {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
}

#friends-panel > .panel-header.fp-header .panel-pin-btn,
#friends-panel > .panel-header.fp-header .panel-close-x,
#profile-panel .panel-header-controls .panel-pin-btn,
#profile-panel .panel-header-controls .panel-close-x {
  position: static !important;
  top: auto !important;
  right: auto !important;
}

#profile-panel .profile-body {
  padding: 10px;
  box-sizing: border-box;
}

/* -------------------------------------------------------------------------- */
/* 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 {
  background: #000;                    /* journal inset */
  border: 2px solid #415a77;
  border-radius: 6px;

  padding: 4px 6px;
  font-size: 13px;
  color: #ffffff;

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

/* Buttons — subdued, journal-appropriate */

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

  background: #1b263b;
  border: 2px solid #415a77;
  border-radius: 6px;

  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.profile-edit-btn:hover,
.profile-copy-btn:hover,
.profile-choose-btn:hover {
  background: #22314d;
}

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

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

/* 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;
}
.tutorial-npc-walkzone {
  position: absolute;
  left: 56px;
  right: 56px;
  top: 112px;
  height: 150px;
  z-index: 2;
}
.tutorial-npc {
  position: absolute;
  left: 50px;
  bottom: 0;
  width: 48px;
  height: 48px;
  transform: scale(2);
  transform-origin: center bottom;
  image-rendering: pixelated;
  cursor: pointer;
}
.tutorial-npc-body,
.tutorial-npc-face,
.tutorial-npc-dot {
  position: absolute;
  image-rendering: pixelated;
  background-repeat: no-repeat;
}
.tutorial-npc-body {
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  background-image: url('../assets/chao/base/sapp_idle.png');
}
.tutorial-npc-face {
  left: 10px;
  top: 10px;
  width: 48px;
  height: 48px;
  transform-origin: top left;
}
.tutorial-npc-eyes {
  transform: scale(0.54);
  background-image: url('../assets/chao/eyes/eyes_neutral.png');
}
.tutorial-npc-mouth {
  transform: translate(10px, 14px) scale(0.24);
  background-image: url('../assets/chao/mouth/mouth1.png');
}
.tutorial-npc-dot {
  left: 50%;
  top: -31px;
  width: 48px;
  height: 48px;
  display: block;
  transform: translateX(-50%) translateX(-3px) scale(0.75);
  transform-origin: top center;
  background-image: url('../assets/dots/dot_default.png');
}
.tutorial-stand-counter {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 132px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7d492, #ca8643);
  border: 3px solid #804b1b;
  z-index: 4;
}
.tutorial-stand-front {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 26px;
  height: 132px;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f5d39d, #d1914d);
  border: 4px solid #7d481a;
  box-shadow: 0 8px 0 rgba(77, 42, 12, 0.45);
  color: #402108;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tutorial-stand-front-title {
  margin-top: 8px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
}
.tutorial-stand-front-sub {
  margin-top: 0;
  text-align: center;
  font-size: 24px;
  opacity: 0.9;
  font-weight: 900;
  letter-spacing: 1px;
}

#tutorial-npc-dialog-panel > .panel-body.tutorial-npc-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.tutorial-npc-speech-bubble {
  position: relative;
  padding: 14px 16px;
  border: 3px solid #4f2b0d;
  border-radius: 18px;
  background: #fff6e6;
  color: #3c2109;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(79, 43, 13, 0.28);
}
.tutorial-npc-speech-bubble::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: #fff6e6;
  border-right: 3px solid #4f2b0d;
  border-bottom: 3px solid #4f2b0d;
  transform: rotate(45deg);
}
.tutorial-npc-speech-text {
  position: relative;
  z-index: 1;
  font-size: 16px;
  line-height: 1.35;
}
.tutorial-npc-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tutorial-npc-menu button {
  min-height: 42px;
  border-radius: 10px;
  border: 2px solid #7d481a;
  background: linear-gradient(180deg, #f7dfb1, #dfac63);
  color: #402108;
  font-weight: 800;
  cursor: pointer;
}
.tutorial-npc-menu button:hover,
.tutorial-info-tab:hover {
  filter: brightness(1.03);
}

#tutorial-info-panel.panel {
  width: 860px;
  height: 620px;
  max-width: calc(var(--app-authored-width) - 32px);
  max-height: calc(var(--app-authored-height) - 32px);
}
#tutorial-info-panel > .panel-body.tutorial-info-body {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(172,229,255,0.18) 0%, rgba(245,214,163,0.18) 100%);
}
.tutorial-info-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.tutorial-info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-right: 2px solid rgba(73, 43, 18, 0.18);
  background: linear-gradient(180deg, rgba(255,241,212,0.96), rgba(232,198,143,0.96));
}
.tutorial-info-tab {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #7d481a;
  background: linear-gradient(180deg, #fff2d6, #e6b66e);
  color: #402108;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.tutorial-info-tab.active {
  background: linear-gradient(180deg, #ffe8b3, #f29a47);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.34);
}
.tutorial-info-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 18px 20px 20px;
  overflow: auto;
}
.tutorial-info-kicker {
  color: #8a4f18;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.tutorial-info-title {
  margin: 0;
  color: #341b07;
  font-size: 30px;
  line-height: 1.05;
}
.tutorial-info-summary {
  color: #4b2a0d;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}
.tutorial-info-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tutorial-info-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 2px solid rgba(125,72,26,0.55);
  color: #5a300d;
  font-weight: 800;
  font-size: 13px;
}
.tutorial-info-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}
.tutorial-info-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(125,72,26,0.35);
  background: rgba(255,249,239,0.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}
.tutorial-info-card-title {
  margin-bottom: 10px;
  color: #6a390f;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tutorial-info-list {
  margin: 0;
  padding-left: 20px;
  color: #3d220a;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}
.tutorial-info-bullets {
  list-style: disc;
}
.tutorial-info-list li + li {
  margin-top: 8px;
}


/* ============================================================
   Display pass patch51 — Friends/Profile owner migration
   Purpose: move the remaining social card shell/theme authority out
   of 99-legacy-overrides-b.css into the actual social owner file.
   ============================================================ */

/* Friends + Profile social cards */
#profile-panel > .panel-body.profile-body {
  background:
    radial-gradient(circle at top center, rgba(58, 95, 132, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(14, 22, 35, 0.94), rgba(8, 13, 21, 0.97));
}

#profile-panel .profile-section,
#profile-panel .profile-favchao-box,
#profile-panel .profile-favchao-box2,
#profile-panel .profile-scroll {
  border-radius: 18px;
  border: 1px solid rgba(112, 151, 193, 0.18);
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.9), rgba(10, 16, 26, 0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#profile-panel .profile-section,
#profile-panel .profile-scroll {
  padding: 14px;
}

.profile-name-row,
.profile-id-row {
  border-radius: 14px;
}

.profile-name-value,
.profile-id-value,
#profile-panel button {
  border-radius: 12px;
}

.profile-name-value,
.profile-id-value {
  border: 1px solid rgba(117, 156, 198, 0.24);
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.88), rgba(5, 9, 14, 0.94));
  color: #eef6ff;
}

.profile-edit-btn,
.profile-copy-btn,
.profile-choose-btn {
  border: 1px solid rgba(122, 165, 210, 0.32);
  background: linear-gradient(180deg, rgba(49, 72, 103, 0.95), rgba(24, 39, 59, 0.96));
  color: #eff5ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.profile-edit-btn:hover,
.profile-copy-btn:hover,
.profile-choose-btn:hover {
  background: linear-gradient(180deg, rgba(63, 92, 129, 0.96), rgba(28, 46, 68, 0.98));
}

.profile-chao-header {
  color: #eef6ff;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

/* ============================================================
   Panel polish follow-up
   - finish Friends panel restyle
   - stop legacy arena top strips/body X buttons from fighting normalized headers
   ============================================================ */

/* Friends panel: bring it fully onto the new shell instead of the older local box styling */
#friends-panel > .panel-header.fp-header {
  min-height: var(--panel-header-h, 52px) !important;
  height: auto !important;
  padding: 10px 14px 11px !important;
  gap: 12px !important;
}

#friends-panel > .panel-header.fp-header .fp-title,
#friends-panel > .panel-header.fp-header .panel-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #f2f7ff !important;
  text-transform: none !important;
}

#friends-panel .fp-self-row,
#friends-panel .fp-item {
  border-radius: 16px !important;
}

#friends-panel #fp-self,
#friends-panel .fp-list {
  border-radius: 18px !important;
  border: 1px solid rgba(112, 151, 193, 0.18) !important;
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.9), rgba(10, 16, 26, 0.95)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

#friends-panel #fp-self {
  padding: 14px !important;
  gap: 10px !important;
}

#friends-panel .fp-self-row,
#friends-panel .fp-item {
  border: 1px solid rgba(116, 156, 198, 0.18);
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.66), rgba(9, 15, 24, 0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

#friends-panel .fp-self-row {
  padding: 10px 12px;
}

#friends-panel input {
  border: 1px solid rgba(117, 156, 198, 0.24) !important;
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.9), rgba(5, 9, 14, 0.96)) !important;
  color: #eef6ff !important;
  border-radius: 12px !important;
}

#friends-panel button {
  border: 1px solid rgba(122, 165, 210, 0.32);
  background: linear-gradient(180deg, rgba(49, 72, 103, 0.95), rgba(24, 39, 59, 0.96));
  color: #eff5ff;
  border-radius: 12px !important;
}

#friends-panel button:hover {
  filter: brightness(1.06);
}
