.explore-discovery-tools{
  display:grid;gap:12px;margin:0 0 24px;padding:14px;
  border:1px solid rgba(211,204,255,.12);border-radius:16px;
  background:rgba(12,14,22,.62);backdrop-filter:blur(12px)
}
.explore-search{display:grid;gap:7px}
.explore-search>label{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.04em}
.explore-search-box{
  display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;
  border:1px solid rgba(211,204,255,.14);border-radius:12px;background:rgba(8,10,16,.78)
}
.explore-search-box>span{flex:0 0 auto;color:#b7adef;font-size:16px}
.explore-search-box input{
  min-width:0;flex:1;border:0!important;background:transparent!important;color:var(--text);
  padding:10px 0!important;outline:0!important;box-shadow:none!important;font:inherit
}
.explore-search-box input::placeholder{color:#777b8d}
.explore-search-clear{flex:0 0 auto;padding:5px 7px!important}
.explore-scope,.explore-capabilities{display:flex;align-items:center;gap:7px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.explore-scope::-webkit-scrollbar,.explore-capabilities::-webkit-scrollbar{display:none}
.explore-scope>span,.explore-capabilities>span{flex:0 0 auto;color:var(--muted);font-size:11px}
.explore-scope .filter,.explore-capabilities .filter{
  flex:0 0 auto;min-height:34px;padding:6px 11px;border-radius:999px;
  border:1px solid rgba(211,204,255,.13);background:rgba(18,20,31,.58);color:var(--text);
  font:inherit;font-size:11px;cursor:pointer
}
.explore-scope .filter.active,.explore-capabilities .filter.active{
  border-color:rgba(184,169,255,.46);background:rgba(111,87,190,.18);color:#efeaff
}
.explore-result-line{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px}
#explore-result-count{color:var(--muted);font-size:11px;line-height:1.5}
.explore-result-line .text-button{flex:0 0 auto}
.explore-search-empty{
  display:grid;gap:4px;padding:16px;border:1px dashed rgba(211,204,255,.17);
  border-radius:12px;background:rgba(255,255,255,.02)
}
.explore-search-empty[hidden]{display:none!important}
.explore-search-empty b{font-size:13px}
.explore-search-empty span{color:var(--muted);font-size:11px;line-height:1.6}
#character-list .bao-explore-filter-hidden{display:none!important}
.explore-card-capabilities{
  display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 0;max-height:26px;overflow:hidden
}
.explore-card-capabilities span{
  display:inline-flex;align-items:center;min-height:21px;padding:2px 7px;border-radius:999px;
  border:1px solid rgba(211,204,255,.15);background:rgba(9,11,18,.48);
  color:#cfc8ef;font-size:9px;font-weight:700;letter-spacing:.02em
}
@media(max-width:700px){
  .explore-discovery-tools{gap:10px;margin-bottom:18px;padding:11px;border-radius:14px}
  .explore-search-box{min-height:42px}
  .explore-capabilities{margin-inline:-2px}
  .explore-result-line{align-items:flex-start}
  #explore-result-count{font-size:10px}
  .explore-card-capabilities{margin-top:5px;max-height:22px;gap:4px}
  .explore-card-capabilities span{min-height:18px;padding:1px 6px;font-size:8px}
}
@media(max-width:430px){
  .explore-discovery-tools{margin-inline:-2px}
  .explore-search-box{padding-inline:9px}
  .explore-search-clear{font-size:10px}
}

.explore-favorite-button{
  position:absolute;top:10px;right:10px;z-index:3;display:grid;place-items:center;
  width:34px;height:34px;padding:0;border:1px solid rgba(255,255,255,.2);border-radius:999px;
  background:rgba(7,9,15,.72);color:#f5efff;font-size:19px;line-height:1;cursor:pointer;
  backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.2)
}
.explore-favorite-button:hover,.explore-favorite-button:focus-visible{
  border-color:rgba(255,217,128,.6);background:rgba(18,17,23,.9);outline:none
}
.explore-favorite-button.active{color:#ffd36f;border-color:rgba(255,211,111,.5);background:rgba(45,34,12,.82)}
.explore-card-continuity{
  display:flex;flex-wrap:wrap;gap:5px;margin:5px 0 0
}
.explore-card-continuity span{
  display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:999px;
  background:rgba(184,169,255,.1);border:1px solid rgba(184,169,255,.16);
  color:#dcd5ff;font-size:9px;font-weight:700;letter-spacing:.02em
}
#character-list .character-image-wrap{position:relative}
@media(max-width:700px){
  .explore-scope{margin-inline:-2px}
  .explore-favorite-button{top:8px;right:8px;width:32px;height:32px;font-size:17px}
  .explore-card-continuity{margin-top:4px}
  .explore-card-continuity span{min-height:18px;padding:1px 6px;font-size:8px}
}

.explore-update-badge{
  display:inline-flex;align-items:center;
  min-height:26px;padding:3px 8px;border-radius:999px;
  border:1px solid rgba(255,255,255,.18);background:rgba(11,13,20,.82);
  color:#f3efff;font-size:9px;font-weight:800;letter-spacing:.08em;
  backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.18)
}
.explore-update-badge[data-kind="new"]{
  border-color:rgba(128,232,203,.42);background:rgba(18,58,50,.78);color:#bff6e6
}
.explore-update-badge[data-kind="updated"]{
  border-color:rgba(191,174,255,.45);background:rgba(45,35,78,.8);color:#ddd2ff
}
.rating-badge{
  display:inline-flex;align-items:center;min-height:26px;padding:3px 8px;border-radius:999px;
  border:1px solid rgba(221,174,120,.34);background:rgba(58,39,24,.82);
  color:#f0c999;font-size:9px;font-weight:800;letter-spacing:.06em;
  backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.18)
}
#explore-view #character-list .explore-card-badge-row{
  position:absolute;left:10px;top:10px;z-index:3;
  display:flex;align-items:flex-start;gap:6px;max-width:calc(100% - 58px);
}
#explore-view #character-list .explore-card-badge-row>.category-badge,
#explore-view #character-list .explore-card-badge-row>.rating-badge,
#explore-view #character-list .explore-card-badge-row>.explore-update-badge{
  position:static!important;inset:auto!important;margin:0!important;
  flex:0 0 auto;white-space:nowrap;
}
@media(max-width:700px){
  .explore-update-badge,.rating-badge{min-height:24px;padding:2px 7px;font-size:8px}
  #explore-view #character-list .explore-card-badge-row{left:8px;top:8px;gap:5px;max-width:calc(100% - 50px)}
}

/* Context-aware work card hierarchy. */
#character-list .character-content>p{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;
  overflow:hidden;line-height:1.65
}
#explore-view[data-explore-scope="favorites"] #character-list .character-content>p,
#explore-view[data-explore-scope="recent"] #character-list .character-content>p,
#explore-view[data-explore-scope="updates"] #character-list .character-content>p{
  -webkit-line-clamp:2
}
.explore-card-context{
  margin:5px 0 0;color:#aaa5bd;font-size:9px;font-weight:700;letter-spacing:.02em;line-height:1.45
}
#explore-view[data-explore-scope="recent"] .explore-card-context,
#explore-view[data-explore-scope="updates"] .explore-card-context{
  color:#c9c2ec
}
#character-list .tags.explore-tags-condensed .tag:nth-of-type(-n+3){display:inline-flex!important}
#character-list .tags.explore-tags-condensed .tag:nth-of-type(n+4){display:none!important}
#character-list .tags.explore-tags-condensed[data-hidden-count]::after{
  content:"+" attr(data-hidden-count);
  display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:999px;
  border:1px solid rgba(211,204,255,.11);color:#8f8aa2;font-size:9px;font-weight:700
}
@media(max-width:700px){
  #character-list .character-content>p{-webkit-line-clamp:2}
  #explore-view[data-explore-scope="favorites"] #character-list .character-content>p,
  #explore-view[data-explore-scope="recent"] #character-list .character-content>p,
  #explore-view[data-explore-scope="updates"] #character-list .character-content>p{-webkit-line-clamp:2}
  .explore-card-context{font-size:8px}
  #character-list .tags.explore-tags-condensed[data-hidden-count]::after{
    min-height:18px;padding:1px 6px;font-size:8px
  }
}

.explore-detail-version{
  margin:-3px 0 9px;color:#aaa5bd;font-size:10px;font-weight:700;letter-spacing:.03em;line-height:1.45
}
@media(max-width:700px){
  .explore-detail-version{margin-top:-2px;margin-bottom:7px;font-size:9px}
}


/* Explore filter sheet: keep discovery powerful without keeping every control on-screen. */
.explore-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.explore-toolbar .explore-search{min-width:0}
.explore-filter-trigger{
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding-inline:14px;white-space:nowrap
}
.explore-filter-trigger>[data-explore-filter-count]{
  display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;
  background:rgba(156,140,255,.2);border:1px solid rgba(184,169,255,.35);
  color:#eee9ff;font-size:10px;line-height:1
}
.explore-filter-trigger>[data-explore-filter-count][hidden]{display:none!important}

.explore-active-filters{display:flex;gap:6px;overflow-x:auto;padding:1px 0 2px;scrollbar-width:none}
.explore-active-filters::-webkit-scrollbar{display:none}
.explore-active-filters[hidden]{display:none!important}
.explore-active-filters button{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 9px;
  border:1px solid rgba(184,169,255,.25);border-radius:999px;background:rgba(111,87,190,.12);
  color:#ddd6ff;font:inherit;font-size:10px;cursor:pointer
}
.explore-active-filters button span{font-size:13px;color:#aaa2cc}

.explore-filter-sheet{
  width:min(680px,calc(100vw - 28px));max-height:min(82vh,760px);margin:auto;padding:0;
  border:1px solid rgba(211,204,255,.18);border-radius:20px;background:#11131b;color:var(--text);
  box-shadow:0 28px 90px rgba(0,0,0,.6);overflow:hidden
}
.explore-filter-sheet::backdrop{background:rgba(4,5,9,.7);backdrop-filter:blur(5px)}
.explore-filter-panel{max-height:min(82vh,760px);overflow:auto;padding:20px}
.explore-filter-head{
  position:sticky;top:-20px;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  margin:-20px -20px 6px;padding:20px;background:rgba(17,19,27,.96);
  border-bottom:1px solid rgba(255,255,255,.055);backdrop-filter:blur(14px)
}
.explore-filter-head h3{margin:5px 0 0;font-size:21px}
.explore-filter-group{display:grid;gap:9px;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.055)}
.explore-filter-group[hidden]{display:none!important}
.explore-filter-group h4{margin:0;color:#a8a5b5;font-size:11px;letter-spacing:.08em}
.explore-segmented{
  display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;
  border:1px solid rgba(211,204,255,.12);border-radius:13px;background:rgba(7,9,14,.62)
}
.explore-segmented button,.explore-option-row button{
  min-height:38px;border:1px solid transparent;border-radius:10px;background:rgba(255,255,255,.035);
  color:#bbb8c7;padding:8px 11px;font:inherit;font-size:12px;cursor:pointer
}
.explore-segmented button.active,.explore-option-row button.active{
  border-color:rgba(184,169,255,.43);background:rgba(111,87,190,.22);color:#f4f0ff
}
.explore-option-row{display:flex;flex-wrap:wrap;gap:7px}
.explore-filter-actions{
  position:sticky;bottom:-20px;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:9px;
  margin:8px -20px -20px;padding:14px 20px 20px;background:linear-gradient(180deg,rgba(17,19,27,.88),#11131b 30%);
  border-top:1px solid rgba(255,255,255,.055);backdrop-filter:blur(14px)
}

@media(max-width:700px){
  .explore-toolbar{grid-template-columns:minmax(0,1fr) auto;align-items:end}
  .explore-filter-trigger{min-height:42px;padding-inline:12px}
  .explore-filter-sheet{
    width:100vw;max-width:none;max-height:88dvh;margin:auto 0 0;border-radius:20px 20px 0 0;
    border-left:0;border-right:0;border-bottom:0
  }
  .explore-filter-panel{max-height:88dvh;padding:18px 16px calc(16px + env(safe-area-inset-bottom))}
  .explore-filter-head{top:-18px;margin:-18px -16px 4px;padding:18px 16px 15px}
  .explore-filter-actions{bottom:calc(-16px - env(safe-area-inset-bottom));margin:8px -16px calc(-16px - env(safe-area-inset-bottom));padding:13px 16px calc(16px + env(safe-area-inset-bottom))}
}
@media(max-width:390px){
  .explore-toolbar{grid-template-columns:1fr}
  .explore-filter-trigger{width:100%}
}


/* Poster-first explore cards: discovery stays visual; details move into the lightweight preview. */
#character-list .character-card{cursor:pointer}
#character-list .character-card:focus-visible{
  outline:2px solid rgba(190,174,255,.78);outline-offset:3px
}
#explore-view #character-list .character-card .character-content>.eyebrow,
#explore-view #character-list .character-card .character-content>p,
#explore-view #character-list .character-card .character-content>.tags{display:none!important}
#character-list .character-content h3{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
  margin-bottom:0;line-height:1.35
}
#character-list .explore-card-context{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px
}
#character-list .explore-card-capabilities{
  flex-wrap:nowrap;max-height:21px;margin-top:6px;overflow:hidden
}
#character-list .explore-card-capabilities span:nth-child(n+3){display:none}
@media(max-width:700px){
  #character-list .character-content{padding-top:8px}
  #character-list .explore-card-capabilities{max-height:19px;margin-top:4px}
}

/* Catalog-only work preview. Opening this does not fetch the full character JSON. */
.explore-work-preview{
  width:min(920px,calc(100vw - 32px));max-width:none;max-height:min(86vh,780px);
  margin:auto;padding:0;border:1px solid rgba(211,204,255,.18);border-radius:22px;
  background:#11131b;color:var(--text);box-shadow:0 30px 100px rgba(0,0,0,.68);overflow:hidden
}
.explore-work-preview::backdrop{background:rgba(4,5,9,.76);backdrop-filter:blur(7px)}
.explore-work-preview-panel{
  display:grid;grid-template-columns:minmax(260px,.82fr) minmax(0,1.18fr);
  max-height:min(86vh,780px)
}
.explore-work-preview-media{position:relative;min-height:520px;background:#090b10;overflow:hidden}
.explore-work-preview-media img{display:block;width:100%;height:100%;object-fit:cover}
/* This cover keeps its idols left-of-center; preserve the intended focal crop in the portrait preview. */
.explore-work-preview-media img[src$="k-idol-survival-cover.webp"]{object-position:35% center}
.explore-work-preview-media>[data-explore-preview-rating]{
  position:absolute;left:14px;bottom:14px;display:inline-flex;align-items:center;min-height:27px;
  padding:4px 9px;border:1px solid rgba(255,255,255,.18);border-radius:999px;
  background:rgba(8,10,16,.76);backdrop-filter:blur(10px);font-size:10px;font-weight:800
}
.explore-work-preview-media>[data-kind="mature"]{color:#ffd6df;border-color:rgba(255,160,184,.34)}
.explore-work-preview-copy{min-width:0;overflow:auto;padding:24px}
.explore-work-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.explore-work-preview-head h3{margin:0;font-size:clamp(23px,3vw,34px);line-height:1.15}
.explore-work-preview-meta{margin-top:10px;color:#aaa5bd;font-size:10px;font-weight:700;line-height:1.6}
.explore-work-preview-description{margin:18px 0 0;color:#ddd9e8;font-size:14px;line-height:1.85;white-space:pre-line}
.explore-work-preview-capabilities{display:flex;flex-wrap:wrap;gap:7px;margin-top:17px}
.explore-work-preview-capabilities span{
  display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:999px;
  border:1px solid rgba(184,169,255,.22);background:rgba(111,87,190,.12);
  color:#ddd6ff;font-size:10px;font-weight:700
}
.explore-work-preview-tags{margin-top:12px}
.explore-work-preview-actions{
  position:sticky;bottom:-24px;display:grid;grid-template-columns:1fr 1.4fr;gap:9px;
  margin:22px -24px -24px;padding:16px 24px 24px;
  background:linear-gradient(180deg,rgba(17,19,27,.8),#11131b 35%);
  border-top:1px solid rgba(255,255,255,.055);backdrop-filter:blur(14px)
}
@media(max-width:700px){
  .explore-work-preview{
    width:100vw;max-height:90dvh;margin:auto 0 0;border-radius:20px 20px 0 0;
    border-left:0;border-right:0;border-bottom:0
  }
  .explore-work-preview-panel{display:block;max-height:90dvh;overflow:auto}
  .explore-work-preview-media{height:min(46dvh,430px);min-height:0}
  .explore-work-preview-copy{overflow:visible;padding:18px 16px calc(16px + env(safe-area-inset-bottom))}
  .explore-work-preview-head h3{font-size:24px}
  .explore-work-preview-description{font-size:13px;line-height:1.75}
  .explore-work-preview-actions{
    bottom:calc(-16px - env(safe-area-inset-bottom));margin:18px -16px calc(-16px - env(safe-area-inset-bottom));
    padding:14px 16px calc(16px + env(safe-area-inset-bottom))
  }
}

.explore-author-link{
  color:#d9d2ff;text-decoration:none;border-bottom:1px solid rgba(217,210,255,.24)
}
.explore-author-link:hover,.explore-author-link:focus-visible{
  color:#fff3c7;border-bottom-color:rgba(255,243,199,.7);outline:none
}
.explore-detail-author,.explore-detail-version{
  margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5
}
.explore-detail-author+.explore-detail-version{margin-top:2px}
