/* ARDREAM62 v12 — rank-first, compact dashboard with twin live statistics */
body.a62-theme .ko62-middle .ko62-stats{display:flex!important;flex-direction:column!important;flex:0 0 auto!important;width:100%!important;min-height:126px!important;padding-bottom:4px!important}
body.a62-theme .ko62-middle .ko62-statlist{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;gap:12px!important;padding:12px!important;flex:none!important;height:auto!important;min-height:0!important}
body.a62-theme .ko62-middle .ko62-stat{min-height:58px!important;padding:11px 16px!important;min-width:0!important;flex:1!important;white-space:normal!important}
body.a62-theme .ko62-middle .ko62-stat-label{font-size:clamp(10px,.86vw,13px)!important}
body.a62-theme .ko62-middle .ko62-stat strong{font-size:clamp(22px,2vw,31px)!important}
body.a62-theme .ko62-middle .ko62-stat-note{padding:0 9px 6px!important;text-align:right!important}
body.a62-theme .ko62-middle .ko62-ranks{flex:0 0 auto!important;min-height:365px!important;max-height:none!important;overflow:visible!important}
body.a62-theme .ko62-middle{justify-content:flex-start!important;gap:14px!important}
body.a62-theme .ko62-right-news .ko62-core-top{display:block!important}
body.a62-theme .ko62-right-news .ko62-kingdom{padding-bottom:0!important;overflow:hidden!important}
body.a62-theme .ko62-right-news .ko62-factions{padding:0!important;gap:0!important;border-top:1px solid #68502f!important;min-height:0!important}
body.a62-theme .ko62-right-news .ko62-factions>a{padding:0 0 13px!important;margin:0!important;border:0!important;min-height:0!important;overflow:hidden!important}
body.a62-theme .ko62-right-news .ko62-factions>a:first-child{border-right:1px solid #906e3a!important}
body.a62-theme .ko62-right-news .ko62-king-art{display:block!important;height:clamp(185px,20vw,297px)!important;overflow:hidden!important;width:100%!important;margin:0!important;padding:0!important;flex:0 0 auto!important;border:0!important;position:relative!important}
body.a62-theme .ko62-right-news .ko62-king-art img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center 19%!important;display:block!important;transform:scale(1.095)!important;transform-origin:center top!important;border:0!important}
body.a62-theme .ko62-right-news .ko62-king-art:after{content:'';position:absolute;inset:auto 0 0;height:32%;background:linear-gradient(transparent,rgba(2,13,23,.68));pointer-events:none}
body.a62-theme .ko62-right-news .ko62-factions>a:nth-child(2) .ko62-king-art:after{background:linear-gradient(transparent,rgba(26,6,12,.72))}
body.a62-theme .ko62-right-news .ko62-factions strong{margin:8px 4px 0!important}
body.a62-theme .ko62-right-news .ko62-king-name{margin-top:5px!important}
body.a62-theme .ko62-right-news .ko62-king-crest{margin-top:8px!important}
/* Premium: keep only price and NP figures, with compatible premium note. */
.ko62-premium-simple{display:flex;flex-direction:column}
.ko62-premium-simple .ko62-premium-type-head{min-height:68px}
.ko62-premium-simple .ko62-premium-type-head h3{margin:0!important}
.ko62-premium-simple .ko62-premium-np{margin:0;padding:15px 16px}
.ko62-premium-simple .ko62-premium-np span{font-size:15px!important;font-weight:800;color:#fff0ad!important}
.ko62-premium-simple .ko62-premium-np strong{font-size:clamp(28px,2.7vw,41px)}
.ko62-premium-simple-note,.ko62-premium-stack-note{padding:12px 15px;margin:0;font-size:12px;line-height:1.55;color:#d4dbdf;background:linear-gradient(95deg,#1a2428,#10161c);border-top:1px solid #504531}
.ko62-premium-simple-note b{color:#ffda80}
.ko62-premium-stack-note{margin-top:auto;color:#ecd38e;font-weight:700}
/* Lightweight video: iframe lazy-loads and scales fluidly */
.a62-discord-video-guide{margin:18px 0;padding:14px;border:1px solid #997c42;background:linear-gradient(120deg,#182630,#070d13);box-shadow:inset 0 0 0 1px #111}
body.a62-theme .a62-discord-video-guide h2{font:700 16px 'Cinzel',Georgia,serif!important;color:#efce83!important;margin:0 0 12px!important}
.a62-video-ratio{width:100%;aspect-ratio:16/9;background:#03070a;position:relative;overflow:hidden}
.a62-video-ratio iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.a62-discord-video-guide p{margin:11px 0 0}.a62-discord-video-guide a{color:#ffdf91;text-decoration:underline}
@media(max-width:1150px){body.a62-theme .ko62-middle .ko62-statlist{gap:7px!important;padding:9px!important}body.a62-theme .ko62-middle .ko62-stat{padding:9px!important}body.a62-theme .ko62-right-news .ko62-king-art{height:198px!important}}
@media(max-width:900px){body.a62-theme .ko62-middle .ko62-ranks{min-height:365px!important}body.a62-theme .ko62-middle .ko62-stats{min-height:0!important}body.a62-theme .ko62-right-news .ko62-king-art{height:250px!important}}
@media(max-width:520px){body.a62-theme .ko62-middle .ko62-statlist{grid-template-columns:1fr!important;gap:7px!important}body.a62-theme .ko62-middle .ko62-stat{min-height:48px!important}body.a62-theme .ko62-right-news .ko62-king-art{height:210px!important}body.a62-theme .a62-discord-video-guide{padding:8px!important}}
@media(prefers-reduced-motion:reduce){body.a62-theme .ko62-king-art img{transform:none!important}}
/* Balanced product grid: four sale items form two equal rows on desktops */
@media(min-width:760px){body.a62-theme .ko62-premium-v8 .ko62-premium-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v14 – anchor side panels to the page edges, shrink ONLY the center.
   Keep the original left/right 24%/25% column widths and fill the spare
   horizontal space BETWEEN the three columns instead of narrowing the board. */
@media (min-width:1201px) {
  body.a62-theme.ko62-home .ko62-board {
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    grid-template-columns:minmax(215px,24%) minmax(0,min(560px,46%)) minmax(250px,25%)!important;
    justify-content:space-between!important;
    gap:16px!important;
  }
}
/* On narrow laptops, avoid the legacy 1080px grid overlap:
   keep the left sidebar pinned; place Kings below the middle as in the
   original tablet two-column presentation. */
@media (min-width:901px) and (max-width:1080px) {
  body.a62-theme.ko62-home .ko62-board {
    grid-template-columns:minmax(210px,27%) minmax(0,1fr)!important;
    justify-content:normal!important;
    gap:12px!important;
  }
  body.a62-theme.ko62-home .ko62-left {grid-column:1;grid-row:1 / span 2}
  body.a62-theme.ko62-home .ko62-middle {grid-column:2;grid-row:1}
  body.a62-theme.ko62-home .ko62-right-news {grid-column:2;grid-row:2}
}

/* A fixed, simple five-player ranking. No home Clan tab; class links remain available. */
body.a62-theme.ko62-home .ko62-middle .ko62-ranks {min-width:0!important;min-height:0!important}
body.a62-theme.ko62-home .ko62-ranks .ko62-tabs {
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:4px 8px!important;
  min-height:42px!important;
  height:auto!important;
  padding:4px 7px!important;
}
body.a62-theme.ko62-home .ko62-rank-heading {
  display:flex;align-items:center;gap:7px;white-space:nowrap;
  padding:3px 6px;color:#f0d184;
  font:800 13px/1.3 'Cinzel',Georgia,serif;
}
body.a62-theme.ko62-home .ko62-rank-heading .ko62-svg {width:17px;height:17px;flex:none}
body.a62-theme.ko62-home .ko62-class-links {
  display:flex!important;align-items:stretch;justify-content:flex-end;
  gap:3px!important;margin-left:auto!important;
}
body.a62-theme.ko62-home .ko62-class-links a {
  font-size:10px!important;line-height:1.25!important;
  padding:5px 5px!important;white-space:nowrap;
}
body.a62-theme.ko62-home .ko62-rankpane tbody tr {height:45px!important}
body.a62-theme.ko62-home .ko62-rankpane tbody tr .ko62-rank-number {
  font:800 18px/1.2 'Cinzel',Georgia,serif!important;
  text-align:center!important;letter-spacing:0!important;
  text-shadow:0 1px 4px rgba(0,0,0,.75)!important;
  font-variant-numeric:lining-nums tabular-nums;
}
body.a62-theme.ko62-home .ko62-rankpane tbody tr td:nth-child(2) a {
  font:800 15px/1.3 'Cinzel',Georgia,serif!important;
}
body.a62-theme.ko62-home .ko62-rankpane th:first-child {width:13%}
body.a62-theme.ko62-home .ko62-rankpane th:nth-child(2) {width:40%}
body.a62-theme.ko62-home .ko62-rankpane th:nth-child(3) {width:22%}
body.a62-theme.ko62-home .ko62-rankpane th:last-child {width:25%}
@media(max-width:1450px) and (min-width:901px) {
  body.a62-theme.ko62-home .ko62-ranks .ko62-tabs {padding:5px 6px!important}
  body.a62-theme.ko62-home .ko62-class-links {flex-wrap:wrap}
  body.a62-theme.ko62-home .ko62-class-links a {font-size:9px!important;padding:4px!important}
}
@media(max-width:600px) {
  body.a62-theme.ko62-home .ko62-rank-heading {font-size:12px}
  body.a62-theme.ko62-home .ko62-class-links {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important;margin-left:0!important}
  body.a62-theme.ko62-home .ko62-rankpane tbody tr td:nth-child(2) a {font-size:13px!important}
  body.a62-theme.ko62-home .ko62-rankpane tbody tr .ko62-rank-number {font-size:16px!important}
}


/* v15 – clearer and wider main navigation. Navigation only; board columns stay untouched. */
@media (min-width: 901px) {
  body.a62-theme .ko62-shell,
  body.a62-theme.ko62-inner .ko62-shell {
    grid-template-rows: var(--head-height) 58px auto auto!important;
  }
  body.a62-theme .ko62-nav {
    height:58px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
  body.a62-theme .ko62-nav>a,
  body.a62-theme .ko62-dropdown>summary {
    font-family:'Cinzel',Georgia,serif!important;
    font-size:clamp(16px,1.1vw,18px)!important;
    font-weight:900!important;
    letter-spacing:.085em!important;
    line-height:1.25!important;
    color:#f7e7bd!important;
    gap:11px!important;
    padding:0 8px!important;
    text-shadow:0 2px 3px #000,0 0 6px #cba64b33!important;
  }
  body.a62-theme .ko62-nav .ko62-svg {
    width:26px!important;
    height:26px!important;
    flex:none!important;
  }
  body.a62-theme .ko62-pus-menu>summary {letter-spacing:.17em!important;}
  body.a62-theme .ko62-nav>a[aria-current],
  body.a62-theme .ko62-nav>a:hover,
  body.a62-theme .ko62-dropdown>summary:hover,
  body.a62-theme .ko62-dropdown[open]>summary {color:#ffe9a5!important;}
}
/* Compact desktop widths retain the bigger hit areas without clipping long labels. */
@media (min-width:901px) and (max-width:1200px) {
  body.a62-theme .ko62-shell,
  body.a62-theme.ko62-inner .ko62-shell {
    grid-template-rows:var(--head-height) 54px auto auto!important;
  }
  body.a62-theme .ko62-nav {height:54px!important;}
  body.a62-theme .ko62-nav>a,
  body.a62-theme .ko62-dropdown>summary {
    font-size:clamp(12px,1.21vw,15px)!important;
    letter-spacing:.055em!important;
    gap:7px!important;
    padding:0 5px!important;
  }
  body.a62-theme .ko62-nav .ko62-svg {width:21px!important;height:21px!important;}
}
/* Keep the existing multi-row tablet/mobile layout; only improve legibility. */
@media (max-width:900px) {
  body.a62-theme .ko62-nav>a,
  body.a62-theme .ko62-dropdown>summary {
    font-weight:900!important;
    font-size:clamp(10px,1.4vw,12px)!important;
    letter-spacing:.035em!important;
    gap:5px!important;
    line-height:1.25!important;
    color:#f7e7bd!important;
  }
}
@media (max-width:520px) {
  body.a62-theme .ko62-nav>a,
  body.a62-theme .ko62-dropdown>summary {
    font-size:clamp(10px,2.05vw,11px)!important;
    letter-spacing:.012em!important;
    gap:4px!important;
  }
}

/* v16 – left-align the Discord call-to-action so it matches Download. */
body.a62-theme .ko62-join .ko62-discord {
  justify-content:flex-start!important;
  text-align:left!important;
  gap:18px!important;
  padding:8px 15px!important;
}
body.a62-theme .ko62-join .ko62-discord::before {
  width:34px!important;
  height:26px!important;
  margin:0!important;
  flex:0 0 34px!important;
}
@media (max-width:900px) {
  body.a62-theme .ko62-join .ko62-discord {
    padding:6px 10px!important;
    gap:10px!important;
  }
  body.a62-theme .ko62-join .ko62-discord::before {
    width:28px!important;
    height:22px!important;
    flex-basis:28px!important;
  }
}

/* v17 - subtle ambience, aligned actions, low-cost UI polish.
   Deliberately CSS-only: no extra assets, fonts, network requests or JS. */
@media (min-width:1201px) {
  body.a62-theme.ko62-home .ko62-home-main {
    background-image:
      radial-gradient(ellipse 130px 320px at 29% 38%,rgba(181,144,80,.075),transparent 84%),
      radial-gradient(ellipse 130px 320px at 71% 38%,rgba(181,144,80,.075),transparent 84%),
      repeating-linear-gradient(135deg,transparent 0,transparent 42px,rgba(173,143,86,.018) 43px,transparent 44px)!important;
  }
}
/* The Download icon is 35px wide with 18px gap and 15px padding.
   Match that geometry exactly, independent of the Discord icon asset. */
body.a62-theme.ko62-home .ko62-join .ko62-discord {
  justify-content:flex-start!important;
  gap:18px!important;
  padding:8px 15px!important;
  font-size:16px!important;
  font-weight:800!important;
  letter-spacing:.015em!important;
  text-align:left!important;
}
body.a62-theme.ko62-home .ko62-join .ko62-discord::before {
  width:35px!important;
  height:29px!important;
  flex:0 0 35px!important;
  margin:0!important;
}
@media (min-width:901px) and (max-width:1200px) {
  body.a62-theme.ko62-home .ko62-join .ko62-discord {font-size:14px!important}
}
@media (max-width:900px) {
  body.a62-theme.ko62-home .ko62-join .ko62-discord {
    gap:9px!important;
    padding:6px 9px!important;
    font-size:clamp(10px,1.5vw,13px)!important;
  }
  body.a62-theme.ko62-home .ko62-join .ko62-discord::before {
    width:35px!important;
    height:29px!important;
    flex-basis:35px!important;
  }
}
/* In shorter desktop windows Download has reduced spacing; match it. */
@media (max-height:850px) and (min-width:901px) {
  body.a62-theme.ko62-home .ko62-join .ko62-discord {
    padding:5px 10px!important;
    gap:12px!important;
  }
}
@media (max-width:520px) {
  body.a62-theme.ko62-home .ko62-join .ko62-discord {
    padding:6px 5px!important;
    gap:5px!important;
    font-size:10px!important;
    white-space:nowrap;
  }
  body.a62-theme.ko62-home .ko62-join .ko62-discord::before {
    width:25px!important;
    height:21px!important;
    flex-basis:25px!important;
  }
}
/* A pulsing halo only when the server is online. The animation changes
   compositable opacity/transform only; the existing dot itself stays fixed. */
body.a62-theme.ko62-home .ko62-server-health .ko62-health-badge {position:relative}
body.a62-theme.ko62-home .ko62-server-health[data-state=on] .ko62-health-badge::after {
  content:'';
  position:absolute;
  left:0;
  top:50%;
  box-sizing:border-box;
  width:13px;
  height:13px;
  border:2px solid rgba(67,231,122,.65);
  border-radius:50%;
  pointer-events:none;
  transform:translateY(-50%) scale(.85);
  animation:a62-online-halo 3.5s ease-out infinite;
}
@keyframes a62-online-halo {
  0%,18% {opacity:.64;transform:translateY(-50%) scale(.85)}
  72%,100% {opacity:0;transform:translateY(-50%) scale(2.35)}
}
/* Hover/focus feedback on the existing Tanitim and Forum links only. */
body.a62-theme.ko62-home .ko62-direct:focus-visible {
  outline:2px solid #f0d18a;
  outline-offset:3px;
}
@media (hover:hover) and (pointer:fine) {
  body.a62-theme.ko62-home .ko62-direct {
    transition:border-color .18s ease,box-shadow .18s ease!important;
  }
  body.a62-theme.ko62-home .ko62-direct:hover {
    transform:none!important;
    border-color:#d8b365!important;
    box-shadow:inset 0 0 0 1px rgba(221,181,91,.48),0 0 9px rgba(183,138,54,.24)!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  body.a62-theme.ko62-home .ko62-server-health .ko62-health-badge::after {animation:none!important;opacity:0!important}
  body.a62-theme.ko62-home .ko62-direct {transition:none!important}
}
