/* โปรไฟล์ตัวละคร (/profile): การ์ดสองฝั่งแบบหน้า login — ตัวละครซ้าย + ชื่อด้านล่าง · ไอเท็มในเกมขวา (rcstore.js rcProfileCard) */
.pf-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  min-height: 600px;
  border-radius: 22px;
  overflow: hidden;
  background: #0a0f1a;
  border: 1px solid rgba(92, 200, 255, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(14, 165, 255, 0.08);
}
.pf-loading { grid-column: 1 / -1; display: grid; place-items: center; color: #8fa3bd; }

/* ---- ซ้าย: ตัวละคร */
.pf-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 600px;
  background: radial-gradient(120% 90% at 50% 20%, #14356a 0%, #0a1528 55%, #060a13 100%); }
.pf-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/assets/images/hero-bg.jpg') center / cover no-repeat;
  filter: grayscale(1) sepia(0.45) hue-rotate(175deg) saturate(1.6) brightness(0.6);
  opacity: 0.45;
}
.pf-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 9, 18, 0.97) 0%, rgba(5, 9, 18, 0.55) 30%, transparent 55%);
}
.pf-model { position: absolute; inset: 0 0 18% 0; z-index: 1; display: grid; place-items: center; color: #8fa3bd; }
.pf-model model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.pf-art-man { position: absolute; left: 50%; bottom: 0; height: 94%; width: auto; transform: translateX(-50%); z-index: 0; filter: drop-shadow(0 0 30px rgba(14, 165, 255, 0.25)); }
.pf-body > .rc-buy { justify-self: start; }
.pf-id { position: relative; z-index: 2; padding: 0 2rem 2rem; display: grid; gap: 0.5rem; justify-items: start; }
.pf-id h2 {
  margin: 0;
  font-family: var(--font-display, 'Outfit', 'Kanit', sans-serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.pf-id p { margin: 0; color: #cfe8ff; }
.pf-select { min-height: 40px; padding: 0 0.8rem; border-radius: 999px; border: 1px solid rgba(92, 200, 255, 0.3); background: rgba(10, 18, 32, 0.8); color: #fff; font: inherit; }

/* ---- ขวา: ไอเท็มในเกม */
.pf-side { display: flex; flex-direction: column; padding: 2.2rem 2.4rem; background: linear-gradient(180deg, #0f1726 0%, #0a0f1a 100%); min-width: 0; }
.pf-kicker { margin: 0; font-size: 0.8rem; letter-spacing: 0.08em; color: #7fc4ff; }
.pf-title { margin: 0.25rem 0 1.2rem; font-size: 1.35rem; color: #fff; }
.pf-body { display: grid; gap: 1rem; align-content: start; flex: 1; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.pf-stats > div { display: grid; gap: 0.15rem; padding: 0.75rem 0.85rem; border-radius: 14px; background: rgba(4, 10, 20, 0.55); border: 1px solid rgba(92, 200, 255, 0.12); min-width: 0; }
.pf-stats small { color: #8fa3bd; font-size: 0.76rem; }
.pf-stats b { color: #fff; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-coins { display: inline-flex; align-items: center; gap: 0.3rem; }
.pf-coins svg { color: #ffc93c; }
.pf-tabs { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; }
.pf-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #a9b8cc;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.pf-tab[aria-selected='true'] { color: #fff; font-weight: 700; border-color: transparent; background: linear-gradient(135deg, #22b8ff, #2563eb); box-shadow: 0 6px 18px rgba(14, 165, 255, 0.3); }
.pf-count { font-size: 0.72rem; padding: 0 0.4rem; border-radius: 999px; background: rgba(0, 0, 0, 0.3); }
.pf-list { max-height: 420px; overflow-y: auto; scrollbar-width: thin; padding-right: 0.2rem; }
.pf-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 0.6rem; }
.pf-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: 14px; background: #121b2b; border: 1px solid rgba(255, 255, 255, 0.06); min-width: 0; }
.pf-item-ic {
  --tone-a: #1d7fe0;
  --tone-b: #0b2f6b;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tone-a), var(--tone-b));
}
.pf-item-ic[data-tone='green'] { --tone-a: #19b56f; --tone-b: #0b4b33; }
.pf-item-ic[data-tone='violet'] { --tone-a: #8b5cf6; --tone-b: #33166e; }
.pf-item-ic[data-tone='orange'] { --tone-a: #f08a24; --tone-b: #6b2a0b; }
.pf-item-ic[data-tone='slate'] { --tone-a: #475d7d; --tone-b: #1a2436; }
.pf-item-txt { display: grid; min-width: 0; }
.pf-item-txt b { color: #fff; font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-item-txt small { color: #8fa3bd; font-size: 0.78rem; }
.pf-car img { flex: none; width: 74px; height: 46px; object-fit: contain; border-radius: 10px; background: radial-gradient(80% 80% at 50% 70%, #1d3557, #0c1424); }
.pf-empty { margin: 0; padding: 1.4rem 0; color: #8fa3bd; }
.pf-sec-h { margin: 2rem 0 0.8rem; font-size: 1.3rem; color: #fff; }
.acc.cc-container > .pf-acc-grid { margin-top: 0; }

@media (max-width: 900px) {
  .pf-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pf-art { min-height: 420px; }
  .pf-side { padding: 1.6rem 1.2rem; }
  .pf-id { padding: 0 1.2rem 1.4rem; }
}
@media (max-width: 480px) {
  .pf-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* โครงรอโหลดของการ์ดโปรไฟล์ (กันหน้ากระพริบเป็นหัวข้อเก่า) */
.pf-skel { background: linear-gradient(100deg, #0e1626 30%, #16233a 50%, #0e1626 70%) 0 0 / 300% 100%; animation: pf-shimmer 1.4s linear infinite; }
@keyframes pf-shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .pf-skel { animation: none; } }

.pf-item-ic, .pf-item-ic[data-tone] { --tone-a: #1a1d24; --tone-b: #000; border: 1px solid rgba(255, 255, 255, 0.08); }
.pf-car img { background: #000; }
/* รีเฟรชโมเดลตัวละคร (ดึงชุดที่สวมล่าสุดจากเกม) */
.pf-refresh { position: absolute; top: 1rem; right: 1rem; z-index: 3; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.75rem; border-radius: 999px;
  border: 1px solid rgba(143, 163, 189, 0.35); background: rgba(10, 18, 30, 0.6); color: #cfe8ff; font: inherit; font-size: 0.85rem; cursor: pointer; }
.pf-refresh:hover { background: rgba(14, 165, 255, 0.18); }
.pf-refresh:disabled { opacity: 0.6; cursor: progress; }
