/* HELL-MU V15.3 | Ranking position medals. Styles isolated to ranking tables. */
/* The Home Top Players / Top Guilds panels are left structurally intact. */
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank {
 width:100%!important;border-collapse:separate!important;border-spacing:0!important;
 font-size:12px!important;table-layout:fixed;
}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank thead th:first-child,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank > tbody > tr:first-child > th:first-child,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:first-child > th:first-child{width:26%!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:not(:first-child) td {
 height:41px!important;box-sizing:border-box;vertical-align:middle!important;
 border-bottom:1px solid rgba(172,108,71,.21)!important;
 padding:3px 7px!important;line-height:1.2!important;
}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank td.hell-v153-rank-column {padding-left:7px!important;text-align:left!important;}
body.hell-theme .hell-v153-positionline {
 display:inline-flex;align-items:center;gap:3px;vertical-align:middle;
 white-space:nowrap;min-height:32px;line-height:1!important;
}
body.hell-theme .hell-v153-positionline .f16 {display:inline-flex;align-items:center;flex:none;line-height:1!important;}
body.hell-theme .hell-v153-positionline .flag {flex:none;}
body.hell-theme .hell-v153-medal {display:inline-block;vertical-align:middle;object-fit:contain;
 width:53px;height:39px;max-width:none!important;flex:none;
 filter:drop-shadow(0 1px 3px rgba(0,0,0,.95));}
body.hell-theme .hell-v153-plainrank {display:inline-block;min-width:53px;text-align:center;color:#dbcfc2;font-size:12px;line-height:25px;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-1 > td {background:linear-gradient(90deg,rgba(117,76,13,.33),rgba(26,17,13,.05) 85%)!important;border-top:1px solid rgba(233,176,76,.53)!important;border-bottom:1px solid rgba(203,143,53,.58)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-2 > td {background:linear-gradient(90deg,rgba(146,157,175,.18),rgba(23,22,25,.03) 85%)!important;border-top:1px solid rgba(198,211,226,.38)!important;border-bottom:1px solid rgba(153,165,186,.36)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-3 > td {background:linear-gradient(90deg,rgba(140,72,38,.22),rgba(22,15,13,.06) 85%)!important;border-top:1px solid rgba(209,134,85,.36)!important;border-bottom:1px solid rgba(180,98,59,.39)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-1 td:first-child {border-left:2px solid #d2a14a!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-2 td:first-child {border-left:2px solid #afb9c9!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-3 td:first-child {border-left:2px solid #b97c5e!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-1 td:last-child {border-right:1px solid rgba(242,176,71,.45)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-2 td:last-child {border-right:1px solid rgba(202,213,229,.3)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-3 td:last-child {border-right:1px solid rgba(208,135,90,.31)!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-1 a,
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr.hell-v153-rank-1 td:nth-child(2){color:#ffe1a4!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:hover td{filter:brightness(1.14)}
/* On the full Rankings page: exactly the same medals in the existing table. */
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank {table-layout:auto!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank th:first-child{min-width:91px!important;width:98px!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank td.hell-v153-rank-column{padding:2px 7px!important;min-width:91px!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank .hell-v153-medal{width:52px!important;height:38px!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank tr.hell-v153-rank-1 td {box-shadow:inset 0 1px rgba(215,159,62,.52),inset 0 -1px rgba(215,159,62,.38)!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank tr.hell-v153-rank-2 td {box-shadow:inset 0 1px rgba(178,193,213,.42),inset 0 -1px rgba(178,193,213,.26)!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank tr.hell-v153-rank-3 td {box-shadow:inset 0 1px rgba(192,112,72,.48),inset 0 -1px rgba(192,112,72,.31)!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank tr td.hell-v153-rank-column .hell-v153-plainrank {font-size:12px;min-width:52px;}
/* Replace the plain number-circle on the existing V15.2 podium with matching laurels. */
body.hell-theme .hell-rankings-page .hell-v15-card .hell-v15-card-number {
 position:absolute!important;z-index:9!important;top:2px!important;left:50%!important;
 transform:translateX(-50%)!important;width:80px!important;height:63px!important;
 font-size:0!important;color:transparent!important;text-shadow:none!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 background:transparent url('../images/hell-v155-rank-2.svg') center center / contain no-repeat!important;
}
body.hell-theme .hell-rankings-page .hell-v15-card.rank-1 .hell-v15-card-number {background-image:url('../images/hell-v155-rank-1.svg')!important;}
body.hell-theme .hell-rankings-page .hell-v15-card.rank-3 .hell-v15-card-number {background-image:url('../images/hell-v155-rank-3.svg')!important;}
body.hell-theme .hell-rankings-page .hell-v15-card .hell-v15-card-number::before,
body.hell-theme .hell-rankings-page .hell-v15-card .hell-v15-card-number::after{content:none!important;}
/* Keep Account Level subordinate to names / rank medals. The API supplies actual status. */
body.hell-theme .hell-rankings-page .hell-v15-accounttag{font-size:10px!important;opacity:.76!important;box-shadow:none!important;}
body.hell-theme .hell-rankings-page .hell-v15-accounttag.level-unknown {opacity:.5!important;}
@media(max-width:760px){
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:not(:first-child) td{padding:3px 4px!important;}
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-medal{width:42px;height:34px;}
 body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-plainrank{min-width:42px;}
 body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank th:first-child,
 body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank td.hell-v153-rank-column{min-width:75px!important;width:75px!important;}
 body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank .hell-v153-medal{width:43px!important;height:33px!important;}
}
@media(prefers-reduced-motion:reduce){body.hell-theme #hell-live-rank-panel .hell-v153-home-rank tr:hover td{filter:none}}


/* V15.5 — high-clarity medal and guild emblem refinements.
   No client data changes. CSS scoped to actual ranking tables / new medallions. */
body.hell-theme .hell-v155-rank-medal,
body.hell-theme .hell-v153-medal {
  display:block!important; width:58px!important;height:42px!important;
  max-width:none!important; object-fit:contain!important; flex:none!important;
  filter:none!important; opacity:1!important;
}
body.hell-theme .hell-v153-positionline {gap:6px!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank img.hell-v153-medal {width:58px!important;height:42px!important;filter:none!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank .hell-v153-rank-column {min-width:95px!important;}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-rank-column {
  white-space:nowrap!important; text-align:left!important;
}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank .hell-v153-rank-column {
  padding:4px 4px 4px 7px!important;
}
body.hell-theme .hell-v155-guild-mark,
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank img.hell-v155-guild-mark {
  display:inline-block!important; width:28px!important; height:28px!important;
  min-width:28px!important; max-width:28px!important;
  flex:0 0 28px!important; padding:0!important; margin:0!important;
  vertical-align:middle!important; object-fit:fill!important;
  image-rendering:crisp-edges!important; image-rendering:pixelated!important;
  border:1px solid rgba(182,119,72,.35)!important;
  background:rgba(10,8,10,.9)!important; box-sizing:border-box!important;
}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr:not(:first-child) td {
  height:49px!important; padding-top:5px!important; padding-bottom:5px!important;
}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr th:first-child {width:30%!important;}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr.hell-v153-rank-1 td{background:linear-gradient(90deg,rgba(126,83,15,.28),rgba(24,13,11,.03))!important}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr.hell-v153-rank-2 td{background:linear-gradient(90deg,rgba(132,151,175,.17),rgba(24,13,11,.03))!important}
body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank tr.hell-v153-rank-3 td{background:linear-gradient(90deg,rgba(166,87,47,.2),rgba(24,13,11,.03))!important}
/* Full TOP GUILDS receives the same medals as TOP PLAYERS */
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild > thead th:first-child,
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild td.hell-v155-guild-place {
  width:82px!important; min-width:82px!important; padding:3px 6px!important;
  box-sizing:border-box!important; text-align:center!important;vertical-align:middle!important;
}
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild td.hell-v155-guild-place .hell-v155-rank-medal {margin:0 auto!important;}
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild tr.hell-v153-rank-1 td {box-shadow:inset 0 1px rgba(238,184,81,.6),inset 0 -1px rgba(213,149,59,.55)!important}
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild tr.hell-v153-rank-2 td {box-shadow:inset 0 1px rgba(201,215,230,.48),inset 0 -1px rgba(178,194,210,.38)!important}
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild tr.hell-v153-rank-3 td {box-shadow:inset 0 1px rgba(221,141,91,.5),inset 0 -1px rgba(192,112,76,.36)!important}
body.hell-theme .hell-rankings-page img.hell-v155-guild-mark-full {
  width:32px!important; height:32px!important;
  image-rendering:crisp-edges!important; image-rendering:pixelated!important;
  object-fit:fill!important; border:1px solid rgba(178,116,71,.32)!important;
  background:rgba(5,4,5,.8)!important;
}
/* The full Top Players table uses the same sharp illustrations */
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank img.hell-v153-medal {
 width:58px!important;height:42px!important;filter:none!important;
}
/* Increased contrast on first three places rather than bloomy low-res glow */
body.hell-theme .hell-rankings-page .ranking-table.hell-v153-full-rank .hell-v153-rank-1 .hell-v153-medal,
body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild .hell-v153-rank-1 .hell-v155-rank-medal {filter:none!important;}
/* Replace the old medal on V15.4 top podium without touching card art or content. */
body.hell-v154-rankings .hell-rankings-page .hell-v154-card .hell-v154-rank-medal {
 filter:none!important;width:103px!important;height:103px!important;
 top:-38px!important; image-rendering:auto!important;
}
body.hell-v154-rankings .hell-rankings-page .hell-v154-card.hell-v154-place-1 .hell-v154-rank-medal {
 width:118px!important;height:118px!important;top:-47px!important;filter:none!important;
}
@media(max-width:900px){
 body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank .hell-v153-rank-column {padding-left:3px!important}
 body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank .hell-v153-medal {width:48px!important;height:36px!important;}
 body.hell-theme #hell-live-rank-panel .hell-v155-home-guild-rank img.hell-v155-guild-mark {width:25px!important;height:25px!important;min-width:25px!important;max-width:25px!important;flex-basis:25px!important;}
 body.hell-theme .hell-rankings-page .ranking-table.hell-v155-full-guild td.hell-v155-guild-place{min-width:72px!important;width:72px!important}
}

/* V15.6 HOME backward compatibility */
/* 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:39px!important; height:29px!important; min-width:39px!important;
 max-width:39px!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:27px!important}
body.hell-theme #hell-live-rank-panel .hell-v153-home-rank .hell-v153-plainrank{
 min-width:39px!important;font-size:12px!important;line-height:28px!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:24px!important;height:24px!important;min-width:24px!important;max-width:24px!important;
 object-fit:fill!important;image-rendering:pixelated!important;
 flex:0 0 24px!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:39px;height:29px;
 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}
