/* HELL-MU V15.6 — targeted refinements based on Wygenerowany obraz 3.png.
   Only TOP 3 cards on /rankings and medal/emblem sizing on homepage.
   All game rankings, VIP status resolution, and AJAX logic remain unchanged. */

/* --- HOME: compact medal and readable guild mark without oversized artwork --- */
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-medal,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank img.hell-v153-medal,
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank .hell-v153-medal{
 width:30px!important; height:22px!important; min-width:30px!important;
 max-width:30px!important; object-fit:contain!important; image-rendering:auto!important;
 filter:none!important; vertical-align:middle!important;
}
body.hell-theme #hell-live-rank-panel .hell-v153-positionline {gap:3px!important;min-height:24px!important}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-plainrank{
 min-width:30px!important;font-size:12px!important;line-height:22px!important;
}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:not(:first-child) td,
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr:not(:first-child) td{
 height:39px!important; padding-top:3px!important; padding-bottom:3px!important;
 vertical-align:middle!important;
}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:first-child > th:first-child{
 width:22%!important;
}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr:first-child > th:first-child {width:24%!important;}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank img.hell-v155-guild-mark,
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank td:first-child img:not(.hell-v153-medal),
body.hell-theme #hell-live-rank-panel table.sidebar_rank td:first-child img[src*="rankings/get_mark/"]{
 width:26px!important;height:26px!important;min-width:26px!important;max-width:26px!important;
 object-fit:fill!important;image-rendering:pixelated!important;
 flex:0 0 26px!important;vertical-align:middle!important;
}
/* Fallback for an old Top Guilds EJS template served from browser / CMS cache.
   Works specifically on 3-column sidebar guilds, and never duplicates medals
   when the newer template is present. */
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(2) > td:first-child,
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(3) > td:first-child,
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(4) > td:first-child{
 font-size:0!important;text-align:center!important;white-space:nowrap!important;
}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(2) > td:first-child::before,
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(3) > td:first-child::before,
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(4) > td:first-child::before{
 content:"";display:inline-block;vertical-align:middle;width:30px;height:22px;
 background-position:center;background-size:contain;background-repeat:no-repeat;
 margin-right:4px;
}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(2) > td:first-child::before{background-image:url('../images/hell-v156-medal-1.svg')}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(3) > td:first-child::before{background-image:url('../images/hell-v156-medal-2.svg')}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(4) > td:first-child::before{background-image:url('../images/hell-v156-medal-3.svg')}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(2) > td {background:rgba(155,98,34,.15)!important}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(3) > td {background:rgba(140,156,174,.11)!important}
body.hell-theme #hell-live-rank-panel table.sidebar_rank:not(:has(img.hell-v153-medal)):has(tr:first-child > th:nth-child(3):last-child) tr:nth-child(4) > td {background:rgba(173,105,69,.11)!important}
/* --- /RANKINGS: 2–1–3 compact horizontal cards exactly as approved --- */
body.hell-v154-rankings .hell-rankings-page .hell-v154-podium {
 margin-bottom:9px!important;padding:10px 12px 10px!important;
 background:linear-gradient(180deg,rgba(12,7,8,.94),rgba(11,6,7,.94)),
 url('../images/hell-v154-legend-hall.webp') center center/cover no-repeat,#0d0708!important;
}
body.hell-v154-rankings .hell-v154-podium:before {opacity:.28!important}
body.hell-v154-rankings .hell-v154-podium-title {
 margin:0 auto 29px!important; padding:0 0 8px!important;
}
body.hell-v154-rankings .hell-v154-podium-title-icon {display:none!important}
body.hell-v154-rankings .hell-v154-podium-title h2{
 font-size:26px!important;letter-spacing:.13em!important;font-weight:500!important;
}
body.hell-v154-rankings .hell-v154-stage {
 max-width:100%!important;padding:18px 8px 9px!important;
 background:none!important;border-bottom:0!important;
}
body.hell-v154-rankings .hell-v154-stage:after {height:22px!important}
body.hell-v154-rankings .hell-v154-podium-row {
 width:100%!important;max-width:100%!important;gap:14px!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;
}
body.hell-v154-rankings .hell-v154-card,
body.hell-v154-rankings .hell-v154-card.hell-v154-place-1,
body.hell-v154-rankings .hell-v154-card.hell-v154-place-3 {
 height:136px!important;min-height:136px!important;
 border-radius:8px!important;border:1px solid var(--v154-c)!important;
 background:linear-gradient(115deg,rgba(44,19,11,.72),#080707 72%)!important;
 box-shadow:inset 0 0 0 2px #0a0607,0 4px 10px #000,0 0 13px var(--v154-glow)!important;
 overflow:visible!important;
}
body.hell-v154-rankings .hell-v154-card::before{
 inset:-4px!important;border:0!important;border-radius:0!important;clip-path:none!important;
 background:url('../images/hell-v156-frame-2.svg') center center/100% 100% no-repeat!important;
 box-shadow:none!important;z-index:9!important;
}
body.hell-v154-rankings .hell-v154-card.hell-v154-place-1::before{background-image:url('../images/hell-v156-frame-1.svg')!important}
body.hell-v154-rankings .hell-v154-card.hell-v154-place-3::before{background-image:url('../images/hell-v156-frame-3.svg')!important}
body.hell-v154-rankings .hell-v154-card::after{
 content:'✦'!important;bottom:-7px!important;width:15px!important;height:15px!important;
 font:11px/15px Georgia,serif!important;box-shadow:none!important;z-index:10!important;
}
body.hell-v154-rankings .hell-v154-portrait{
 inset:3px auto 3px 3px!important;left:3px!important;right:auto!important;
 width:50%!important;height:calc(100% - 6px)!important;max-width:none!important;
 border-radius:4px!important;object-fit:cover!important;object-position:20% center!important;
 mask-image:linear-gradient(to right,#000 0%,#000 70%,transparent 100%);
 opacity:.98!important;filter:contrast(1.08) saturate(1.04)!important;
}
body.hell-v154-rankings .hell-v154-card-caption{
 top:26%!important;bottom:auto!important;left:43%!important;right:5%!important;
 min-height:0!important;padding:12px 0!important;border-radius:0!important;
 background:transparent!important;display:flex!important;justify-content:center!important;
 gap:6px!important;align-items:center!important;z-index:7!important;
}
body.hell-v154-rankings .hell-v154-card-name{
 font:700 clamp(16px,1.6vw,24px)/1.12 Georgia,serif!important;
 color:#ffe2b2!important;white-space:nowrap!important;text-align:center!important;
}
body.hell-v154-rankings .hell-v154-card-class{
 font-size:12px!important;color:#ebcaac!important;text-align:center!important;
}
body.hell-v154-rankings .hell-v154-card .hell-v154-rank-medal,
body.hell-v154-rankings .hell-v154-card.hell-v154-place-1 .hell-v154-rank-medal{
 top:-41px!important;left:50%!important;width:83px!important;height:83px!important;
 transform:translateX(-50%)!important;filter:none!important;object-fit:contain!important;
 z-index:12!important;
}
body.hell-v154-rankings .hell-v154-banner,body.hell-v154-rankings .hell-v154-podium-footer {display:none!important}
body.hell-v154-rankings .hell-rankings-page #box1 > .box-style1{
 padding-top:16px!important;
}
@media (max-width:960px){
 body.hell-v154-rankings .hell-v154-podium-row{gap:8px!important}
 body.hell-v154-rankings .hell-v154-card,body.hell-v154-rankings .hell-v154-card.hell-v154-place-1{height:122px!important;min-height:122px!important}
 body.hell-v154-rankings .hell-v154-card .hell-v154-rank-medal,body.hell-v154-rankings .hell-v154-card.hell-v154-place-1 .hell-v154-rank-medal{height:66px!important;width:66px!important;top:-32px!important}
 body.hell-v154-rankings .hell-v154-card-caption{top:29%!important}
 body.hell-v154-rankings .hell-v154-card-name{font-size:16px!important}
}
@media (max-width:640px){
 body.hell-v154-rankings .hell-v154-stage{padding:8px 0 2px!important}
 body.hell-v154-rankings .hell-v154-podium-row{gap:5px!important}
 body.hell-v154-rankings .hell-v154-card,body.hell-v154-rankings .hell-v154-card.hell-v154-place-1{height:104px!important;min-height:104px!important}
 body.hell-v154-rankings .hell-v154-card .hell-v154-rank-medal,body.hell-v154-rankings .hell-v154-card.hell-v154-place-1 .hell-v154-rank-medal{height:43px!important;width:43px!important;top:-22px!important}
 body.hell-v154-rankings .hell-v154-card-caption{left:36%!important;right:1%!important;top:24%!important;gap:2px!important}
 body.hell-v154-rankings .hell-v154-card-name{font-size:12px!important}
 body.hell-v154-rankings .hell-v154-card-class{font-size:9px!important}
 body.hell-v154-rankings .hell-v154-podium-title h2{font-size:20px!important}
 body.hell-v154-rankings .hell-v154-portrait{width:56%!important}
}
@media (max-width:760px){
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank img.hell-v153-medal{width:27px!important;height:20px!important;min-width:27px!important;max-width:27px!important}
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-plainrank{min-width:27px!important}
}
@media(prefers-reduced-motion:reduce){body.hell-v154-rankings .hell-v154-card{transition:none!important}}

/* V15.8 — HOME ONLY: uniform graphite/silver laurels for positions 4 and 5.
   Places 1–3 keep gold/silver/bronze and exactly their V15.7 sizing. */
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-4 > td,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-5 > td {
 background-color:rgba(108,112,122,.055)!important;
 border-color:rgba(139,143,151,.12)!important;
}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-4:hover > td,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-5:hover > td {
 background-color:rgba(120,125,135,.11)!important;
}
/* Medal images are 30 × 22 desktop and 27 × 20 mobile; no row enlargement. */
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-4 img.hell-v153-medal,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-5 img.hell-v153-medal {
 width:30px!important;height:22px!important;min-width:30px!important;max-width:30px!important;
 object-fit:contain!important;filter:none!important;
}
@media(max-width:760px){
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-4 img.hell-v153-medal,
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-5 img.hell-v153-medal{
  width:27px!important;height:20px!important;min-width:27px!important;max-width:27px!important;
 }
}
