:root { --fp-accent: #f0c060; --fp-accent-light: #f7d68a; --fp-accent-rgb: 240,192,96; --cp-blue: #7fa8d9; }
html, body { background: #0e141b; }
.cp-page { max-width: clamp(1200px, 81.5vw, 2000px); margin: 0 auto; padding: 1.25rem 2rem 4rem; position: relative; }

.cp-back-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem;
  background: none; border: none; color: #fff; padding: 0;
  font-family: 'Lato', Arial, sans-serif; font-size: 1.35rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: color 0.2s;
}
.cp-back-btn svg { width: 28px; height: 28px; flex-shrink: 0; }
.cp-back-btn:hover { color: #a8c6e8; }

.fp-char-empty { color: #999; text-align: center; padding: 3rem 0; }

.cp-card { background: #0e141b; border: 1px solid rgba(255,255,255,0.1); padding: 1.75rem; color: #fff; }
.cp-title { font-family: 'Lato', Arial, sans-serif; font-size: 1.5rem; font-weight: 600; color: var(--cp-blue); margin: 0 0 0.5rem; }

.cp-main { display: grid; grid-template-columns: minmax(300px, 37%) minmax(0, 1fr); gap: 2rem; }
.cp-left { min-width: 0; }
.cp-ref { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: #0a0a0a; }
.cp-ref img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-ref-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; color: #8d9bb0; font-size: 1rem; }
.cp-ref-empty span:first-child { font-size: 2rem; }
.cp-id { padding-top: 0.45rem; }
.cp-name-row { display: flex; align-items: center; justify-content: center; gap: 0.7rem; }
.cp-name { font-family: 'Lato', Arial, sans-serif; font-size: 2.7rem; font-weight: 700; color: #fff; margin: 0; min-width: 0; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-byline { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0.75rem 0 0; color: #fff; font-size: 1rem; }
.cp-byline .fp-share-icon-btn { width: 28px; height: 28px; border-color: rgba(127,168,217,0.55); color: var(--cp-blue); }
.cp-byline .fp-share-icon-btn:hover { border-color: var(--cp-blue); color: #9dc0ea; background: rgba(127,168,217,0.1); }
.cp-byline .fp-share-icon-btn svg { width: 14px; height: 14px; }
.cp-byline a { color: var(--cp-blue); text-decoration: none; }
.cp-byline a:hover { text-decoration: underline; }

.cp-right { min-width: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.cp-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.cp-field { min-width: 0; }
.cp-field-val { font-size: 1.19rem; color: #fff; white-space: nowrap; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.5) transparent; }
.cp-field-val a, .cp-body a { color: var(--cp-blue); }
.cp-art-original { display: inline-flex; align-items: center; gap: 0.4rem; color: #2fbf5f; font-weight: 700; }
.cp-art-original svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }
.cp-field-val a.cp-art-ref, .cp-art-ref { color: #e0a63a; font-weight: 700; text-decoration: underline; }
.cp-field-val a.cp-art-ref:hover { color: #f2c46a; }
.cp-art-ref--plain { text-decoration: none; }
.cp-body { font-size: 1.19rem; line-height: 1.55; color: #fff; max-height: 7.75em; overflow-y: auto; padding-right: 0.6rem; scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.5) transparent; }
.cp-body p { margin: 0 0 0.5rem; }
.cp-body p:last-child { margin-bottom: 0; }
.cp-block--quote .cp-body { max-height: 4.7em; font-style: italic; }

.cp-lower { display: grid; grid-template-columns: 2fr 1fr; }
.cp-lore-col { min-width: 0; padding-right: 1.75rem; }
.cp-linked-col { min-width: 0; padding-left: 1.75rem; border-left: 1px solid rgba(255,255,255,0.1); }
.cp-lore-body { position: relative; height: 17rem; overflow: hidden; }
.cp-lore-body.revealed { height: auto; max-height: 19rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.5) transparent; }
.cp-lore-text { display: flex; flex-direction: column; gap: 0.65rem; filter: blur(13px); opacity: 0.85; user-select: none; pointer-events: none; transition: filter 0.3s ease; padding-right: 0.6rem; }
.cp-lore-body.revealed .cp-lore-text { filter: none; opacity: 1; user-select: auto; pointer-events: auto; }
.cp-lore-text p { margin: 0; font-size: 1.19rem; line-height: 1.7; color: #fff; }
.cp-lore-reveal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); border: none; color: var(--cp-blue); font-family: 'Lato', Arial, sans-serif; font-size: 1.4rem; cursor: pointer; transition: color 0.2s; }
.cp-lore-reveal:hover { color: #fff; }
.cp-lore-body.revealed .cp-lore-reveal { display: none; }

.cp-linked-sec + .cp-linked-sec { margin-top: 1.1rem; }
.cp-tiles { aspect-ratio: 3.2 / 1; overflow-y: auto; padding-right: 0.5rem; scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.5) transparent; }
.cp-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.cp-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #0e141b; border: 1px solid rgba(255,255,255,0.16); text-decoration: none; transition: border-color 0.15s ease; }
.cp-tile:hover { border-color: var(--cp-blue); }
.cp-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-tile-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.3rem 0.45rem; background: rgba(0,0,0,0.65); color: #fff; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-linked-empty { color: #fff; font-size: 1.3rem; line-height: 1.5; }
.cp-tile--plain:hover { border-color: rgba(255,255,255,0.16); }
.cp-tile-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; font-size: 0.95rem; line-height: 1.25; }

.char-detail-footer .cp-report-btn { width: 48px; height: 48px; border-color: rgba(127,168,217,0.55); }
.char-detail-footer .cp-report-btn:hover { border-color: #7fa8d9; color: #7fa8d9; background: rgba(127,168,217,0.08); }


@media (min-width: 1001px) {
  .cp-lore-col { display: flex; flex-direction: column; }
  .cp-lore-body, .cp-lore-body.revealed { flex: 1; height: auto; min-height: 17rem; max-height: none; overflow: hidden; }
  .cp-lore-text { position: absolute; inset: 0; overflow: hidden; }
  .cp-lore-body.revealed .cp-lore-text { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.5) transparent; }
}
@media (max-width: 1000px) {
  .cp-main { grid-template-columns: 1fr; }
  .cp-ref { max-width: 460px; }
  .cp-lower { grid-template-columns: 1fr; }
  .cp-lore-col { padding-right: 0; }
  .cp-linked-col { padding: 1.25rem 0 0; margin-top: 1.25rem; border-left: 0; border-top: 1px solid rgba(255,255,255,0.1); }
}
@media (max-width: 700px) {
  .cp-page { padding: 1rem 1rem 3rem; }
  .cp-card { padding: 1.1rem; }
  .cp-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-back-btn { font-size: 0.85rem; }
  .cp-back-btn svg { width: 18px; height: 18px; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .cp-page { padding-bottom: 1rem; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .cp-body, .cp-block--quote .cp-body { max-height: none; overflow: visible; }
}
