/* Keep artwork landscape independently of the card's rules/frame layout. */
.experience-game .skill-card .card-art-window,
.experience-game .offer-card .card-art-window {
  inset: 4% 8% auto;
  width: 84%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.experience-game.page-shell--formation .skill-card .card-art-window {
  inset: 5% 12% auto;
  width: 76%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.experience-game .skill-card .card-art-window img,
.experience-game.page-shell--formation .skill-card .card-art-window img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain !important;
  object-position: center;
}
.skill-codex .codex-card .codex-art,
.manual-page .skill-codex .codex-card .codex-art {
  top: 50%;
  right: 0;
  width: 45%;
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translateY(-50%);
  object-fit: contain;
}
.card-detail-modal .card-detail-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: none;
}
.card-detail-modal .card-detail-hero img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain !important;
}

/* Place copy directly below the complete landscape image instead of leaving
   a portrait-sized blank area between the artwork and the name. */
.experience-game .skill-card { container-type: inline-size; }
.experience-game .skill-card .skill-body {
  top: calc(4% + 47.25cqw + 7px); bottom: 24%;
}
.experience-game .skill-card .skill-body strong,
.experience-game .skill-card .formation-card-info strong {
  display: block; white-space: nowrap !important; overflow: hidden;
  text-overflow: ellipsis; overflow-wrap: normal;
}
.experience-game.page-shell--formation .skill-card .formation-card-info {
  top: calc(5% + 42.75cqw + 5px);
}
.card-hover-tooltip {
  position: fixed; z-index: 10000; box-sizing: border-box;
  width: min(420px, calc(100vw - 16px)); padding: 16px 18px;
  border: 1px solid #cbb47f; border-radius: 10px;
  background: #102534f5; color: #f2e7d1; box-shadow: 0 10px 35px #0009;
  pointer-events: none; font-size: 14px; line-height: 1.65;
}
.card-hover-tooltip[hidden] { display: none; }
.card-hover-tooltip strong { color: #ffe0a3; font: 700 20px KaiTi, serif; }
.card-hover-tooltip p { margin: 9px 0 0; overflow-wrap: anywhere; }

/* Desktop combat cards have an image-first face; legacy faces remain mobile. */
.desktop-card-face{display:none}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card{border:0!important;background:#0b1727;overflow:hidden}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card:before{content:"";display:block!important;position:absolute;inset:0;z-index:4;pointer-events:none;background:url("/src/assets/ui-v8/ninjutsu-frame.webp") center/100% 100% no-repeat;opacity:1}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card:after{display:none!important}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card .card-art-window{inset:6% 11% auto;width:78%;height:60%;aspect-ratio:auto;border-radius:0;display:block}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card .card-art-window img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover!important;object-position:center}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.skill-icon,
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.skill-body,
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.skill-end,
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.formation-card-info,
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.card-protection-badge{display:none!important}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card>.desktop-card-face{display:block;position:absolute;inset:0;z-index:6;pointer-events:none}
html:not(.fixed-mobile-stage) .experience-game:not(.mobile-table) .skill-card .card-rank{top:9%;right:13%;z-index:8}
.desktop-card-element{position:absolute;top:9%;left:13%;width:clamp(23px,16cqw,34px);height:clamp(23px,16cqw,34px);border-radius:50%;background:#17222ae6;box-shadow:0 2px 5px #0008}
.desktop-card-element svg{display:block;width:100%;height:100%;fill:none;stroke:var(--emblem-color);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.desktop-card-element svg circle{stroke:#e4c47d;stroke-width:1.6}
.desktop-card-price{position:absolute;right:14%;top:calc(65% - 27px);min-width:23px;height:24px;display:grid;place-items:center;padding:0 4px;border:1px solid #cfb575;border-radius:5px;background:#11242ee8;color:#ffe7a6;font:700 18px Georgia,serif;box-shadow:0 2px 4px #0007}
.desktop-card-state{position:absolute;left:14%;top:calc(65% - 25px);font-size:12px;color:#ffe7a6;background:#11242ecc;border-radius:4px;padding:2px 5px;min-width:0}
.desktop-card-state:empty{padding:0;background:none}
.desktop-card-copy{position:absolute;inset:69% 14% 10%;display:flex;flex-direction:column;gap:3px;overflow:hidden;text-align:left}
.desktop-card-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#ffe3a8;font:700 clamp(15px,9cqw,23px)/1.2 KaiTi,serif}
.desktop-card-copy small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#e9dfcb;font:clamp(10px,5.5cqw,13px)/1.35 KaiTi,serif}
