/* GCH V19.18: layer of design polish over V19.17. Keep portrait, vote API and
   localized routes intact. Loaded LAST in village.php. */
.gch-hybrid {
  --gch-polish-ink:#132640;
  --gch-polish-bright:#fffdf5;
}
/* Glass is behind the figure at z=2. Character artwork remains at z=3, and
   readable titles, tier/vote and biography above it. No clipping of long names. */
.gch-hybrid .gch-h-hero {
  border:5px solid #172b47;
  border-radius:12px;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.73),
    0 0 0 2px rgba(255,219,117,.62),10px 11px 0 #14233c,
    0 22px 35px rgba(9,20,38,.22);
}
.gch-hybrid .gch-h-hero .gch-h-glass {
  position:absolute;z-index:2;pointer-events:none;
  inset:clamp(45px,7%,88px) clamp(25px,6%,90px) clamp(48px,8%,94px);
  overflow:hidden;border-radius:25px 7px 27px 7px;
  border:1px solid rgba(255,255,255,.77);
  background:linear-gradient(137deg,
    rgba(255,255,255,.29) 0%,rgba(231,249,255,.09) 26%,
    rgba(253,253,255,.075) 48%,rgba(194,239,254,.25) 78%,
    rgba(255,255,255,.16) 100%);
  -webkit-backdrop-filter:blur(11px) saturate(1.45);
  backdrop-filter:blur(11px) saturate(1.45);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.16),
    inset 0 -24px 40px rgba(9,29,57,.14),
    0 0 0 4px rgba(13,35,56,.22),
    0 17px 45px rgba(13,24,45,.18),
    0 0 65px rgba(226,249,255,.27);
}
.gch-hybrid .gch-h-glass::before {
  content:"";position:absolute;inset:10px;border:1px solid rgba(255,255,255,.38);
  border-radius:19px 4px 21px 4px;
}
.gch-hybrid .gch-h-glass::after {
  content:"✦";position:absolute;left:18px;bottom:10px;
  color:rgba(255,255,255,.65);font-size:17px;text-shadow:0 0 9px rgba(255,255,255,.8);
}
.gch-hybrid .gch-h-glass-shine {
  display:block;position:absolute;width:72%;height:160%;left:-10%;top:-22%;
  transform:skewX(-17deg) rotate(-5deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.20) 43%,rgba(255,255,255,.025) 100%);
}
.gch-hybrid .gch-h-hero-art img {
  filter:drop-shadow(5px 10px 3px rgba(6,18,38,.49))
    drop-shadow(0 0 21px rgba(252,248,240,.29));
}
/* Region tag and profile card echo one another, without replacing the regional painting. */
.gch-hybrid .gch-h-hero .gch-h-region-label {
  border-radius:8px 3px 8px 3px;
  box-shadow:3px 5px 0 #152640,0 8px 16px rgba(12,21,40,.20);
}
.gch-hybrid .gch-h-identity,
.gch-hybrid .gch-h-picker-section {
  border-radius:8px;box-shadow:6px 8px 0 #162b44,0 20px 36px rgba(10,22,40,.16);
}
.gch-hybrid .gch-rec-card {
  border-radius:9px;overflow:visible;
  box-shadow:5px 7px 0 #172640,0 18px 32px rgba(10,23,41,.13);
}
.gch-hybrid .gch-rec-card-heading {border-radius:4px 4px 0 0;}
.gch-hybrid .gch-rec-weapon-detail:focus-visible,
.gch-hybrid .gch-rec-artifact-set:focus-visible,
.gch-hybrid .gch-vote-summary:focus-visible {
  outline:3px solid #2c89ae;outline-offset:4px;
}
/* Never reserve display space for closed artifact ballot. The sibling row only
   grows on open, and then its ballot occupies a full line under the item. */
.gch-hybrid .gch-rec-artifact-choice {
  display:grid;grid-template-columns:36px minmax(0,1fr) auto;
  align-items:center;column-gap:9px;row-gap:3px;min-height:0;
}
.gch-hybrid .gch-rec-artifact-choice .gch-rec-order {align-self:center;}
.gch-hybrid .gch-rec-artifact-choice .gch-rec-artifact-sets {min-width:0;}
.gch-hybrid .gch-rec-artifact-choice .gch-cav-side {
  display:block;flex:none;width:max-content;max-width:230px;
  align-self:center;justify-self:end;min-height:0;margin:0;padding:0;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-artifact.gch-cav-widget {
  display:block;flex:none;width:max-content;max-width:230px;
  min-width:0;margin:0;padding:0;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure,
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure > summary {
  min-height:0;margin:0;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure > summary {
  padding:1px 2px;min-height:32px;gap:4px;flex-wrap:nowrap;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure:not([open]) > .gch-vote-panel {
  display:none!important;
  visibility:hidden!important;
  height:0!important;min-height:0!important;
  overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;
}
.gch-hybrid .gch-rec-artifact-choice:has(.gch-vote-artifact .gch-vote-disclosure[open]) .gch-cav-side {
  grid-column:1/-1;grid-row:auto;
  width:100%;max-width:none;justify-self:stretch;
  padding:5px 0 3px;
}
.gch-hybrid .gch-rec-artifact-choice:has(.gch-vote-artifact .gch-vote-disclosure[open]) .gch-vote-artifact.gch-cav-widget {
  width:100%;max-width:none;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure[open] > summary {
  justify-content:flex-end;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure[open] > .gch-vote-panel {
  display:flex!important;width:100%;max-width:none;min-width:0;
  margin:8px 0 0;padding:13px 15px;
  background:linear-gradient(130deg,#fffdf7,#effaf7);
  border:2px solid #9eb5c4;border-left:4px solid #58b5ad;
}
.gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure[open] > .gch-vote-panel .gch-cav-question {
  max-width:none;font-size:13px;
}
/* Defense in depth: expansion has been removed in the template for equipment.
   Team expansion remains unaffected. */
.gch-hybrid #gch-v7-artifacts .gch-rec-artifact-choice,
.gch-hybrid #gch-v7-weapons .gch-rec-weapon {display:grid;}
.gch-hybrid #gch-v7-weapons .gch-rec-weapon {
  grid-template-columns:36px minmax(0,1fr) auto;
}
/* Use flex for the weapon detail link only, preserving its click target. */
.gch-hybrid #gch-v7-weapons .gch-rec-weapon-detail {
  min-width:0;display:flex;align-items:center;gap:10px;text-decoration:none;
}
/* Constellations now lead, then talents and ascension. No extra "Explore profile" title. */
.gch-hybrid .gch-h-chapters {padding-top:22px;}
.gch-hybrid .gch-h-chapter-stack > .gch-h-data-chapter:first-child {margin-top:0;}
/* One full-width row per talent-upgrade level, legible labels and quantities. */
.gch-hybrid #gcc-pane-talents .gcc-cost-level-grid {
  display:grid;grid-template-columns:minmax(0,1fr)!important;
  gap:14px;
}
.gch-hybrid #gcc-pane-talents .gcc-cost-level-grid > .gcc-cost-level {
  display:grid;grid-template-columns:minmax(115px,155px) minmax(0,1fr);
  align-items:center;gap:15px;padding:15px 17px;
  background:linear-gradient(110deg,#fff6de,#fffef9);
  border:2px solid #22344e;border-radius:9px;
}
.gch-hybrid #gcc-pane-talents .gcc-cost-level-grid > .gcc-cost-level > strong {
  display:grid;place-items:center;
  min-height:58px;margin:0;padding:9px 12px;
  background:#ffe4a4;border:2px solid #172b47;border-radius:7px;
  color:#152944;font-size:clamp(17px,1.28vw,21px);line-height:1.2;
}
.gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items {gap:11px;}
.gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items > span {
  width:auto;flex:1 1 120px;min-width:110px;max-width:none;
  background:rgba(255,255,255,.70);padding:9px;
  border:1px solid rgba(51,75,107,.12);border-radius:8px;
}
.gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items img {width:67px;height:67px;}
.gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items small {
  font-size:clamp(14px,1vw,16px)!important;line-height:1.35;font-weight:800;
  overflow-wrap:anywhere;
}
.gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items b {
  font-size:clamp(15px,1.05vw,18px);line-height:1.25;
}
@media(max-width:1000px){
  .gch-hybrid .gch-h-hero .gch-h-glass {inset:9% 6% 12%;}
  .gch-hybrid .gch-rec-artifact-choice .gch-cav-total {display:none;}
}
@media(max-width:700px){
  .gch-hybrid .gch-h-hero .gch-h-glass {inset:12% 8% 20%;border-radius:16px 5px;}
  .gch-hybrid .gch-h-hero {border-width:4px;border-radius:9px;}
  .gch-hybrid #gcc-pane-talents .gcc-cost-level-grid > .gcc-cost-level {
    grid-template-columns:1fr;gap:8px;padding:12px;
  }
  .gch-hybrid #gcc-pane-talents .gcc-cost-level-grid > .gcc-cost-level > strong {
    display:block;min-height:0;width:max-content;padding:6px 14px;
  }
  .gch-hybrid #gch-v7-weapons .gch-rec-weapon {
    grid-template-columns:28px minmax(0,1fr);gap:7px;
  }
  .gch-hybrid #gch-v7-weapons .gch-rec-weapon .gch-vote-weapon {
    grid-column:1/-1;justify-self:end;
  }
}
@media(max-width:550px){
  .gch-hybrid .gch-rec-artifact-choice {
    grid-template-columns:28px minmax(0,1fr) 34px;
    gap:6px;padding:9px 0;
  }
  .gch-hybrid .gch-rec-artifact-choice .gch-rec-artifact-set {gap:6px;}
  .gch-hybrid .gch-rec-artifact-choice .gch-vote-artifact.gch-cav-widget,
  .gch-hybrid .gch-rec-artifact-choice .gch-cav-side {
    min-width:0;max-width:34px;width:34px;
  }
  .gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure:not([open]) .gch-vote-summary :is(.gch-cav-total,.gch-cav-approval) {
    display:none;
  }
  .gch-hybrid .gch-rec-artifact-choice .gch-vote-disclosure[open] > .gch-vote-panel {
    padding:12px 10px;
  }
  .gch-hybrid .gch-rec-artifact-choice:has(.gch-vote-artifact .gch-vote-disclosure[open]) .gch-cav-side,
  .gch-hybrid .gch-rec-artifact-choice:has(.gch-vote-artifact .gch-vote-disclosure[open]) .gch-vote-artifact.gch-cav-widget {
    max-width:none;width:100%;
  }
  .gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items > span {
    min-width:105px;flex-basis:calc(50% - 8px);
  }
  .gch-hybrid #gcc-pane-talents .gcc-cost-card .gcc-cost-items small {font-size:14px!important;}
}
@media(prefers-reduced-motion:reduce){
  .gch-hybrid .gch-h-hero-art img {animation:none!important;}
}

/* V19.19: named combat talents. Text always comes from talentTypeUi language keys.
   Official, character-specific ability names still come from localized game data. */
.gch-hybrid #gcc-pane-talents .gch-talent-card h2 {
  display:flex; flex-wrap:wrap; align-items:center; gap:9px 12px;
  padding-block:11px 12px;
}
.gch-hybrid #gcc-pane-talents .gch-talent-card h2 > img {
  flex:0 0 60px;
}
.gch-hybrid #gcc-pane-talents .gch-talent-official-name {
  flex:1 1 160px; min-width:0; overflow-wrap:anywhere;
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind {
  display:inline-flex; align-items:center; gap:7px;
  flex:0 1 auto; max-width:100%; margin-left:auto;
  padding:6px 10px; border:2px solid #182942; border-radius:6px;
  box-shadow:2px 3px 0 #182942;
  background:#fff9ed; color:#14253c; text-shadow:none;
  line-height:1.25;
  font-family:inherit; font-size:clamp(11px,.83vw,13px);
  font-weight:900; text-transform:none; letter-spacing:.015em;
  overflow-wrap:anywhere; white-space:normal;
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind::before {
  content:""; width:22px; height:22px; flex:0 0 22px;
  background:center/contain no-repeat url('../comic/icons/star.svg');
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--normalAttack {
  background:#ffe3a4;
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--normalAttack::before {
  background-image:url('../comic/icons/sword.svg');
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--elementalSkill {
  background:#c7f2e7;
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--elementalSkill::before {
  background-image:url('../comic/icons/star.svg');
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--elementalBurst {
  background:#f1d8fd;
}
.gch-hybrid #gcc-pane-talents .gch-talent-kind--elementalBurst::before {
  background-image:url('../comic/ornaments/impact.svg');
}
@media (max-width:520px) {
  .gch-hybrid #gcc-pane-talents .gch-talent-card h2 {gap:7px 9px;}
  .gch-hybrid #gcc-pane-talents .gch-talent-card h2 > img {flex-basis:49px;}
  .gch-hybrid #gcc-pane-talents .gch-talent-official-name {flex-basis:calc(100% - 63px);}
  .gch-hybrid #gcc-pane-talents .gch-talent-kind {margin:2px 0 0;}
}
