:root{--bg:#100d0b;--bg-2:#18120f;--panel:#201813;--panel-2:#302219;--panel-3:#392920;--line:#483624;--line-strong:#88603b;--text:#f4e6cc;--muted:#c9b698;--dim:#ac987a;--red:#aa3022;--red-dark:#650e10}
:root { --avlu-width: 1075px; }
body {
  background: #191410;
  isolation: isolate;
}
html:not(.embedded) body {
  background:
    linear-gradient(180deg, #17120f40, transparent 180px, #191410a0 390px, #191410 610px),
    url('../avlu/avlu-dusk.webp') center top / max(100%, 1440px) auto no-repeat,
    #191410;
}
.topbar .topbar-inner {
  width: min(calc(100% - 28px), var(--avlu-width));
  justify-content: flex-end;
}
.court-shell {
  width: min(calc(100% - 64px), var(--avlu-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  container-type: inline-size;
}
.court { grid-area: 1 / 1; position: relative; width: 100%; padding-block-end: clamp(12px, 1.6cqw, 20px); z-index: 1; }
.court-shell > main, .court-shell > #item-modal {
  grid-area: 2 / 1;
  min-width: 0;
  margin: 0;
}
.court-shell > main:not(.court-main), .court-shell > #item-modal {
  border-inline: 1px solid #78552e;
  background: #16100c;
}
.court-shell > main > .section { padding-block: clamp(20px, 3cqw, 38px); }
.court-shell .container { width: calc(100% - 2 * clamp(10px, 2.65cqw, 42px)); }
.court-shell .page-hero { border-bottom: 1px solid #775332; }
.court-shell .page-hero-inner h1 {
  font-size: clamp(27px, 4.2cqw, 54px);
  line-height: 1.07;
  overflow-wrap: anywhere;
}
.court,.court-main,.court-foot{font-family:Georgia,serif}
.court img,.court-main img{display:block;width:100%}
.court-tabs,.court-bottom,.classes{display:flex;align-items:center;justify-content:space-between;gap:6px}
.bronze,.court-tabs a,.auth-card{background:linear-gradient(125deg,#322217,#130e0b 54%,#25180e);border:7px solid #986b38;border-image:url('../avlu/frame.png') 10 stretch}
.court nav {
  /* Align the rail's inner shoulders with the page edges. */
  --menu-cap: 2.75%;
  display: grid;
  width: calc(100% + 2 * var(--menu-cap));
  margin-inline: calc(-1 * var(--menu-cap));
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  min-height: 80px;
  padding: 0 4.5%;
  align-items: stretch;
  text-align: center;
  text-transform: uppercase;
  background: url('../avlu/nav-dusk-rail.webp') center / 100% 100% no-repeat;
}
.court nav a {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 3px 2px;
  color: #dec098;
  font: 700 clamp(12px, 1.57cqw, 16px)/1.15 Georgia, serif;
  letter-spacing: .015em;
  text-shadow: 0 2px 2px #100904, 0 0 5px #21130d;
  transition: color .2s ease;
}
.court nav a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18% 0 18%;
  pointer-events: none;
  opacity: 0;
  background: url('../avlu/nav-great-hall-hover.webp') center / 100% 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8% 92%, transparent);
  transition: opacity .22s ease-out;
}
.court nav a:not(.download, :nth-child(3), :last-child)::after {
  content: "";
  position: absolute;
  inset: 20% 0 20% auto;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(transparent, #8d6a3b80, transparent);
  box-shadow: 1px 0 #100905a0;
}
.court nav a:is(:hover, :focus-visible) { color: #ffdc9e; }
.court nav a[aria-current="page"] { color: #ffe3b1; }
.court nav a:is(:hover, :focus-visible)::before { opacity: 1; }
.court nav .download {
  gap: .24em;
  color: #ffdfa0;
  background: url('../avlu/nav-great-hall-download.webp') center / 100% 76% no-repeat;
  font-size: clamp(10px, 1.2cqw, 12px);
  letter-spacing: 0;
  white-space: nowrap;
  transition: color .2s ease, filter .22s ease-out;
}
.court nav .download::before { content: none; }
.court nav .download:is(:hover, :focus-visible) { filter: brightness(1.18) saturate(1.08); }
.court nav .download .download-label {
  max-width: 78%;
  white-space: nowrap;
  line-height: 1.1;
}
.art { position: relative; }
.art img { transition: filter .22s ease; }
.art:is(:hover,:focus-visible) img { filter: saturate(1.13) contrast(1.07); }
.court a:hover,.court-main a:hover,.court-foot a:hover{color:#ffd47d}
.court-banner{position:relative;margin:0 0 10px}
.court-grid,.shortcuts,.journal{display:grid;gap:10px;grid-template-columns:minmax(0,7fr) minmax(0,3fr)}
.shortcuts{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.shortcuts img,.court-bottom img{height:100%}
.bronze{padding:12px;margin-block:10px}
.court-grid aside>.bronze:first-child{margin-top:0}
.bronze h2,.bronze h1{font: bold clamp(17px,1.65vw,24px) Georgia;color:#efc57f;margin-bottom:10px;text-transform:uppercase}
.bronze>a,.journal a,#court-news a,.court-status-row{display:block;padding:10px 5px;border-top:1px solid #65462e}
.bronze small{color:#dab982;font:13px system-ui;margin-right:14px}
#court-status small{float:right;margin:0}
.meter{display:block;height:16px;margin-top:5px;background:repeating-linear-gradient(90deg,transparent 0 calc(8.333% - 3px),#16100c calc(8.333% - 3px) 8.333%),linear-gradient(#ffffff32,transparent 55%,#0005),linear-gradient(90deg,#ffac24 var(--fill),#493729 var(--fill))}
.court-tabs{margin-top:10px}.court-tabs a,.court-bottom a,.classes figure{flex:1;text-align:center;min-width:0;margin:0}
.court-tabs a:first-child,.btn-primary{background:linear-gradient(#932919,#49090a);border-color:#ce9b52;color:#ffe7a8}
.journal{grid-template-columns:55% auto;align-items:center}
.classes img{height:210px;object-fit:contain}
.court-foot {
  margin-top: clamp(26px, 4vw, 54px);
  padding: clamp(25px, 4vw, 48px) 0 28px;
  border-top: 1px solid #644f3b;
  background: #302720;
  color: #d4bfa6;
}
.court-foot-inner { width: min(calc(100% - 28px), var(--avlu-width)); margin-inline: auto; }
.court-foot-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 20px;
}
.court-foot-links section { display: grid; align-content: start; justify-items: start; gap: 6px; }
.court-foot-links h2 { font: 700 14.4px/1.2 Georgia, serif; color: #efd5b2; margin-bottom: 5px; }
.court-foot-links a { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.court-foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.court-foot-links a:focus-visible { outline: 2px solid #e8bd85; outline-offset: 3px; }
.court-foot-brands {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #66523d;
}
.court-foot-brands p { font-size: 10.4px; color: #bdab98; }
.court-brand-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 27px; margin-top: 10px; }
.court-brand-logos img { width: auto; height: auto; max-width: 100%; max-height: 34px; object-fit: contain; }
.court-brand-logos img:first-child { width: min(180px, 100%); }
.court-brand-logos img:last-child { width: min(115px, 100%); }
@media (max-width: 560px) {
  .court-foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .court-brand-logos img:first-child { width: min(150px, 100%); }
  .court-brand-logos img:last-child { width: min(96px, 100%); }
}
#article p{white-space:pre-wrap;margin:18px 0}
.page-hero,.page-hero-bg{background:linear-gradient(110deg,#351e14,#140f0c)}
.page-hero-inner{padding-block:24px!important}
.market-page main,.section{background-color:var(--bg)}
#account-popup{margin:auto;width:min(610px,96vw);padding:0;background:var(--bg);color:var(--text);border:2px solid #ae8048}
#account-popup::backdrop{background:#090605cf}
#account-popup button{display:block;margin-left:auto;padding:8px 16px;color:var(--gold)}
#account-popup iframe{display:block;width:100%;height:min(75dvh,760px);border:0}
.embedded :is(.topbar,.court,.court-foot,.page-hero,.auth-side){display:none}
.embedded .court-shell { display: block; width: 100%; }
.embedded .court-shell > main:not(.court-main) { border: 0; background: none; }
.embedded main,.embedded .container{width:100%!important;padding:0}
.embedded .court-shell > main > .section{padding:0}.embedded .auth-layout{display:block}
.item-view #item-modal{position:static;display:block;overflow:visible;z-index:auto;padding:clamp(10px,3.4cqw,28px)}
.item-view .modal-panel{margin:auto;max-height:none;width:100%}
.item-view .modal-body{max-height:none}
.item-view #item-modal-title { overflow-wrap: anywhere; }
.item-view #item-modal .modal-head > div { min-width: 0; }
.item-view #item-modal .modal-close { flex-shrink: 0; }
.market-detail-list {
  margin-block: 10px;
  max-height: min(56vh, 34rem);
  overflow: auto;
  border: 1px solid var(--line);
  scrollbar-color: #805730 #21150f;
}
.market-detail-list .session-row > div { min-width: 0; overflow-wrap: anywhere; }

.court-shell .ranking-panel,
.court-shell .market-table {
  margin-top: 16px;
  min-width: 0;
  border: 1px solid #6c4930;
  background: linear-gradient(120deg, #261a12, #17100d 64%);
  box-shadow: inset 0 0 0 1px #140c08;
}
.court-shell .ranking-toolbar { padding: 12px; flex-wrap: wrap; gap: 6px 12px; }
.court-shell .ranking-toolbar .tabs { flex-wrap: wrap; }
.rank-table-wrap { overflow-x: auto; scrollbar-color: #805730 #21150f; }
.rank-table-wrap:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.court-shell .rank-table th, .court-shell .rank-table td { padding: 9px clamp(6px, 1.3cqw, 16px); }
.court-shell .rank-table th { color: #e3bf88; background: #36261a; }
.court-shell .rank-table td { border-bottom-color: #aa7d4930; }
.court-shell .rank-table .player-cell > :last-child { min-width: 0; overflow-wrap: anywhere; }
.court-shell .rank-table .class-tag { white-space: normal; overflow-wrap: anywhere; }
.court-shell .rank-table .ranking-empty { text-align: center; padding-block: 20px; color: var(--muted); }
.court-shell .ranking-pager { padding: 8px 12px; gap: 6px 12px; }
.ranking-page-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ranking-page-links .ranking-page { min-width: 34px; min-height: 34px; }
.court-shell .rank-legend { margin-top: 26px; }

.market-page .court-shell .market-table { padding: 0 6px 6px; }
.market-page .court-shell .market-head { color: #e3bf88; background: #36261a; }
.market-page .court-shell .market-row {
  min-width: 0;
  padding-block: 8px;
  border-color: #604430;
  background: linear-gradient(110deg, #2b1e16, #1b1511 70%);
}
.market-page .court-shell .market-row:hover { background: #39281a; border-color: #a2784b; }
.court-shell .market-row :is(.price-cell,.coord-cell,.date-cell,.session-row) { min-width: 0; overflow-wrap: anywhere; }
.court-shell .market-row .market-price-amount { white-space: normal; overflow-wrap: anywhere; }
.court-shell .market-search-dock { background: #211710; border-color: #785332; }
.court-shell .market-search-dock .input { background: #15100e; }
.court-shell .pagination { flex-wrap: wrap; }
@container (max-width: 540px) {
  .court-shell .ranking-pager { justify-content: flex-start; }
  .court-shell .rank-table { min-width: 460px; }
  .court-shell .rank-table :is(th, td):is(:nth-child(3), :nth-child(4)) { display: table-cell; }
  .court-shell .rank-table :is(.np,.clan-points) { white-space: normal; overflow-wrap: anywhere; }
  .court-shell .rank-table .rank-no { width: auto; }
  .court-shell .rank-table .player-cell { gap: 5px; }
  .market-page .court-shell .market-row { grid-template-columns: minmax(0, 1fr) minmax(64px, 32%); }
  .court-shell .market-sort { max-width: 100%; }
}
@media (width < 1000px) {
.court-shell { width: min(calc(100% - 28px), var(--avlu-width)); }
.court nav{
  width: 100%;
  margin-inline: 0;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(41px, auto);
  grid-template-rows: none;
  padding: 0;
  border: 1px solid #916536;
  background: #21140c url('../avlu/nav-great-hall-stone.webp') center / 170px auto;
}
.court nav a { border-bottom: 1px solid #553722; padding-block: 7px; }
.court nav a::before { inset: 0; }
.court nav .download {
  grid-area: 1 / 1 / 2 / 4;
  min-height: 50px;
  font-size: 14px;
  background-size: auto 100%;
}
}
@media(max-width:800px){
.court-grid,.journal{grid-template-columns:1fr}.classes{display:grid;grid-template-columns:1fr 1fr}
.court-tabs{gap:2px;font-size:13px}.court-tabs a{border-width:4px}
.court-bottom{flex-direction:column}.court-bottom a{width:100%}
}

@media(min-width:801px){
.court-banner{margin-top:0}
.court-tabs{background:url('../avlu/tabbar.webp') center/100% 100%;aspect-ratio:668/44;gap:0}
.court-tabs a,.court-tabs a:first-child{height:100%;color:transparent;border:0;background:transparent}
}
.court-grid #court-news a{display:grid;grid-template-columns:23% auto 1fr;align-items:center;gap:10px;min-height:46px;padding:4px}
.court-grid #court-news a:before{content:'';aspect-ratio:3.5;background:var(--thumb) center/cover;border:1px solid #80643c}
#court-news a:nth-child(4n+1){--thumb:url('../avlu/news1.webp')}
#court-news a:nth-child(4n+2){--thumb:url('../avlu/news2.webp')}
#court-news a:nth-child(4n+3){--thumb:url('../avlu/news3.webp')}
#court-news a:nth-child(4n){--thumb:url('../avlu/news4.webp')}
.court-grid #court-news small{padding:3px 5px;border:1px solid #805b32;color:#f3d29e;background:#402014;margin:0}
.court-grid .bronze h2{padding:5px 10px;background:linear-gradient(90deg,#52351d99,transparent);border-bottom:1px solid #96682e}
#account-popup{color-scheme:dark;width:min(520px,96vw);max-height:95dvh;overflow:hidden;border:2px solid #b78c53;box-shadow:0 18px 90px #000,0 0 0 3px #23150b}
#account-popup .account-cap{position:relative;height:62px;background:#17110d url('../avlu/kgame-white.png') center / auto 30px no-repeat;border-bottom:2px solid #966c38}
#account-popup .account-cap button{position:absolute;right:12px;top:12px;width:34px;height:34px;padding:0;background:linear-gradient(#51301d,#21130d);color:#ffdda6;border:1px solid #b58a52;font:24px Georgia;cursor:pointer}
#account-popup iframe{height:380px;max-height:calc(95dvh - 70px)}
.embedded body,.embedded main{min-height:0!important;background:#19110c}
.embedded .auth-card{padding:clamp(18px,4vw,28px);background:radial-gradient(ellipse at top left,#372317,#19120e 75%);border:0}
.auth-card h2{font-family:Georgia,serif;color:#f4d18e}
.auth-card .input{background:#18110d;color:#fae7c7;border:1px solid #815c38;box-shadow:inset 0 2px 6px #0008;color-scheme:dark}
.auth-card .input:-webkit-autofill{-webkit-box-shadow:0 0 0 60px #261b13 inset;-webkit-text-fill-color:#fae7c7}
.auth-card .input:focus{outline:2px solid #dcaa5c;outline-offset:1px}
.auth-card button[type=submit]{background:linear-gradient(#90301e,#600f0c 48%,#390908);border:2px ridge #d0a15d;color:#ffe1a4;box-shadow:inset 0 0 0 2px #391907;font:bold 16px Georgia;padding:12px;text-shadow:0 2px 2px #201008}

/* Desktop news-tab labels are part of the artwork. */
@media (min-width: 801px) {
  .court-tabs a {
    font-size: 0;
    text-shadow: none;
  }
  .court-tabs a:is(:hover, :focus-visible) {
    color: transparent;
    background-color: transparent;
  }
}
.court nav a:focus-visible,
.court-tabs a:focus-visible,
.court-main .art:focus-visible {
  outline: 2px solid #ffdf91;
  outline-offset: -3px;
}

@media (max-width: 800px) {
  .court-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .court-tabs a { padding: 5px 3px; }
  .court-grid #court-news a { grid-template-columns: minmax(48px, 20%) auto minmax(0, 1fr); gap: 6px; }
  .court-grid #court-news small { font-size: 11px; }
}

/* The logo sits on the panoramic artwork instead of a second illustrated strip. */
.court .mast {
  display: grid;
  place-items: center;
  height: clamp(72px, 10cqw, 100px);
  padding-block: 8px;
}
.court .mast img { width: clamp(130px, 18cqw, 180px); height: auto; filter: drop-shadow(0 3px 7px #0d0806); }

/* The gold rule opens from the center along the lower edge of each menu item. */
.court-tabs a { position: relative; }
.court-tabs a::after, .court-main .art::after {
  content: "";
  position: absolute;
  inset: auto 10% 8%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #a86c32 20%, #ffe0a6 50%, #a86c32 80%, transparent);
  box-shadow: 0 1px 6px #dc7d3659;
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .22s ease, transform .28s ease-out;
}
.court-tabs a:is(:hover,:focus-visible)::after,
.court-main .art:is(:hover,:focus-visible)::after {
  opacity: 1;
  transform: scaleX(1);
}

.court-banner {
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1924 / 612;
  background: #1a130f;
  --banner-rim: clamp(3px, .58cqw, 6px);
}
.court-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    url('../avlu/banner-bronze-edge.webp') top left / auto var(--banner-rim) repeat-x,
    url('../avlu/banner-bronze-edge.webp') bottom left / auto var(--banner-rim) repeat-x,
    url('../avlu/banner-bronze-side.webp') top left / var(--banner-rim) auto repeat-y,
    url('../avlu/banner-bronze-side.webp') top right / var(--banner-rim) auto repeat-y;
  box-shadow: inset 0 0 0 1px #543923a6, inset 0 0 9px 2px #10070365;
}
.court-slide { position: absolute; inset: var(--banner-rim); }
.court-slide[hidden], .court-carousel-controls[hidden] { display: none; }
.court-slide img { height: 100%; object-fit: cover; }
.court-slide-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #130d08a0, transparent 72%);
}
.court-slide-placeholder p {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  padding: 0 15% 4%;
  margin: 0;
  text-align: center;
  color: #ffe7b6;
  text-shadow: 0 2px 8px #100704, 0 1px 3px #100704;
}
.court-slide-placeholder small {
  font: 700 clamp(9px, 1.1vw, 13px) system-ui;
  letter-spacing: .12em;
  color: #f4c983;
  text-transform: uppercase;
}
.court-slide-placeholder strong { font-size: clamp(20px, 4.2vw, 49px); }
.court-carousel-controls button {
  padding: 0;
  cursor: pointer;
  color: #ffe2a1;
  border: 1px solid #9d773e;
  background: linear-gradient(#332417ed, #120d09f5);
}
.court-carousel-controls button:is(:hover,:focus-visible) {
  border-color: #ffe0a1;
  color: #fff4d8;
}
.court-carousel-controls button:focus-visible { outline: 2px solid #ffe0a1; outline-offset: 2px; }
.court-carousel-controls .court-carousel-arrow {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 2;
  width: clamp(32px, 4.2vw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 2px 8px #0e0807b8, inset 0 0 0 2px #2a1b11;
}
.court-carousel-arrow { top: 50%; translate: 0 -50%; }
.court-carousel-prev { left: 1.4%; }
.court-carousel-next { right: 1.4%; }
.court-carousel-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  rotate: 45deg;
  translate: -2px 0;
}
.court-carousel-prev::before { rotate: -135deg; translate: 2px 0; }
.court-carousel-pagination {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(1px, 2%);
  translate: -50% 0;
  display: flex;
}
.court-carousel-pagination button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
}
.court-carousel-pagination button::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid #c29a60;
  border-radius: 50%;
  background: #1c120bd9;
  box-shadow: 0 1px 4px #050302;
}
.court-carousel-pagination button:is([aria-current=true],:hover)::before {
  background: #f5bb65;
  box-shadow: 0 0 7px #ec9e5290;
}
@media (prefers-reduced-motion: no-preference) {
  .court-slide:not([hidden]) { animation: court-slide-enter .32s ease-out; }
  @keyframes court-slide-enter {
    from { opacity: .55; }
    to { opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .art img, .court nav a, .court nav .download, .court nav a::before, .court-tabs a::after, .court-main .art::after { transition: none; }
}
