@font-face{font-family:Pixelify;src:url('/client/assets/9ba86cd010a4de309d26.ttf') format('truetype');font-weight:400 700;font-display:swap}
/* Keep cover scale and clamp offsets to the cropped area so no edge is exposed. */
:root{
  --castle-image-width:max(100vw,calc((100dvh - var(--menu-header-height,0px))*1.5));
  --castle-image-height:max(calc(100vw / 1.5),calc(100dvh - var(--menu-header-height,0px)));
  --castle-offset-left:max(calc(100vw - var(--castle-image-width)),calc(var(--castle-image-width)*-0.03));
  --castle-offset-bottom:max(calc(100dvh - var(--menu-header-height,0px) - var(--castle-image-height)),calc(var(--castle-image-height)*-0.05));
  --castle-backdrop:#201914 url('/client/assets/c791c79be29bbf394c1a.webp') left var(--castle-offset-left) bottom var(--castle-offset-bottom) / cover no-repeat;
}
.customization-screen{position:fixed;inset:0;z-index:220;background:var(--castle-backdrop);color:#dbd2c7;grid-template-columns:minmax(0,1fr);align-items:start;padding:0 var(--menu-page-gutter);overflow-x:hidden;overflow-y:auto;isolation:isolate}
.custom-layout{position:relative;display:grid;grid-template-columns:50% 50%;grid-template-rows:66px minmax(340px,1fr) 110px;width:100%;height:calc(100dvh - var(--menu-header-height) - var(--party-return-space,0px));min-height:calc(516px + var(--menu-content-inset-top) + var(--menu-content-inset-bottom));margin-inline:auto;padding-block:var(--menu-content-inset-top) var(--menu-content-inset-bottom)}
.customization-screen::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#170d0308,#0c0d114a),linear-gradient(#0003,transparent 35%,#0002)}
.customization-screen button,.customization-screen h1,.custom-count,.custom-card-label{font-family:Pixelify,monospace}
.customization-screen button{color:inherit;cursor:pointer;border:0;transition:background .12s,box-shadow .12s}
.customization-screen button:focus-visible{outline:3px solid #ffe19c;outline-offset:4px}
.customization-screen button:disabled{cursor:wait;opacity:.5}
.custom-header{grid-column:1/-1;display:flex;align-items:center;background:#111217c9;padding:0 2.8%;gap:2.6%;min-height:66px;z-index:2}
.custom-classes{display:flex;gap:12px;margin-left:0;align-self:stretch;align-items:center}
.custom-tab{position:relative;text-transform:uppercase;background:transparent;font-size:clamp(16px,1.5vw,24px);font-weight:600;letter-spacing:1px;padding:12px 26px;color:#8b8786!important;border-radius:5px}
.custom-tab[aria-selected=true]{background:#363537d9;color:#f8d991!important}
.custom-tab[aria-selected=true]::after{content:'';position:absolute;bottom:0;left:35%;right:35%;height:2px;background:linear-gradient(90deg,transparent,#f5d591,transparent)}
.custom-tab:hover{background:#39373780}
.custom-preview{grid-column:1;grid-row:2/4;position:relative;min-height:0;touch-action:none;cursor:grab;overflow:hidden;margin-top:-2%;padding-bottom:3%}
.custom-preview-stage{position:absolute;inset:0 0 36px}
.custom-preview:active{cursor:grabbing}
.custom-preview canvas{width:100%;height:100%;display:block;position:absolute;inset:0}
.custom-hint{position:absolute;left:12px;right:12px;bottom:6px;text-align:center;font-size:15px;white-space:pre-line;color:#c6b39cbb;pointer-events:none;line-height:2}
.custom-panel{grid-column:2;grid-row:2;margin:2.5% 5% 1.5% .6%;padding:2.6% 3.2%;background:linear-gradient(135deg,#202124f5,#181a1bf5);border:var(--menu-border-width,3px) solid #444343;border-radius:var(--menu-corner-radius,10px);box-shadow:inset 0 0 0 1px #171818,0 12px 40px #0005;display:flex;flex-direction:column;min-width:0;min-height:0}
.custom-panel.custom-cosmetic-panel,.custom-panel.custom-badge-panel{--custom-content-inset-bottom:2.6%;padding-bottom:0;overflow:hidden}
.custom-panel-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px}
.custom-slots{display:flex;flex-wrap:wrap;min-width:0;gap:10px}
.custom-slots .custom-tab{font-size:clamp(19px,1.8vw,28px);padding:5px 10px}
.custom-count{font-size:18px;color:#777577;white-space:nowrap}
.custom-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 14px;align-content:start;flex:1;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:3px 3px calc(3px + var(--custom-content-inset-bottom));scrollbar-gutter:stable;scrollbar-color:#65594b #1b1c1d}
.custom-card{padding:0;background:transparent!important;width:100%;min-width:0;text-align:center;align-self:start}
.custom-card-art{display:block;position:relative;width:100%;min-width:0;aspect-ratio:1;border:2px solid #3c3c40;border-radius:11px;background:radial-gradient(ellipse at 50% 80%,#454243,#28282c 80%);box-shadow:inset 0 1px 3px #ffffff09}
.custom-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.custom-card[aria-pressed=true] .custom-card-art{border-color:#f7dd9b;box-shadow:0 0 12px #e9c37877,inset 0 0 10px #e9c37828}
.custom-card:hover .custom-card-art{background:#3b3939}
.custom-check{position:absolute;right:-2px;top:-2px;background:#f8dea0;color:#3d3224;font:700 22px/30px Pixelify;width:29px;height:30px;border-radius:0 7px 0 5px}
.custom-card.is-locked{opacity:.4}
.custom-card-label{--custom-label-size:clamp(12px,1.13vw,18px);display:block;white-space:nowrap;overflow:hidden;margin-top:8px;font-size:var(--custom-label-size);letter-spacing:.3px;height:calc(var(--custom-label-size)*1.25);line-height:calc(var(--custom-label-size)*1.25)}
.custom-save{grid-row:3;grid-column:2;align-self:start;justify-self:end;width:66%;min-height:76px;margin:2% 5% 0 0;transform:scale(.6);transform-origin:top right;background:linear-gradient(120deg,#d3a367,#f1c986 45%,#cd9d61);border:var(--menu-border-width,3px) solid #ba935e!important;border-radius:var(--menu-corner-radius,10px);box-shadow:inset 0 0 0 2px #f9d697,0 6px 12px #0005;color:#33230e!important;font-size:clamp(21px,2vw,33px);font-weight:700;text-transform:uppercase;letter-spacing:1.7px;z-index:2}
.custom-save:hover{filter:brightness(1.08)}
.customization-screen .custom-save{transition:background .12s,box-shadow .12s,opacity .2s}
.custom-save[data-unsaved=false]:not(:disabled){opacity:.55}
.custom-save[data-state=saved]:disabled{cursor:default;opacity:1;background:linear-gradient(120deg,#6f9a52,#9fcb76 45%,#6a9550);border-color:#567a3f!important;box-shadow:inset 0 0 0 2px #c4e59c,0 6px 12px #0005;color:#14260b!important}
.custom-message{position:absolute;left:52%;right:3%;bottom:var(--menu-content-inset-bottom);font:14px/1.5 Barlow,sans-serif;color:#f4d6a8;margin:0;pointer-events:none}
@media(max-width:1100px){.custom-classes{gap:2px}.custom-tab{padding:10px 17px}.custom-save{width:84%;min-height:60px}.custom-hint{font-size:13px}.custom-panel{margin-top:5%}}
@media(max-width:760px){.custom-layout{grid-template-columns:1fr;grid-template-rows:66px minmax(180px,40dvh) minmax(230px,1fr) 94px;min-height:calc(390px + max(180px,40dvh) + var(--menu-content-inset-top) + var(--menu-content-inset-bottom))}.custom-header{justify-content:center;padding:8px 16px;min-height:0}.custom-classes{grid-column:1/-1;margin:0;justify-content:center}.custom-tab{font-size:17px;padding:8px 20px}.custom-preview{grid-column:1;grid-row:2;margin:-5% 0 0;padding:0}.custom-panel{grid-column:1;grid-row:3;margin:0 14px;padding:12px 15px}.custom-panel-header{margin-bottom:10px}.custom-cards{gap:12px}.custom-card-art{max-height:126px}.custom-card-label{--custom-label-size:16px}.custom-save{grid-column:1;grid-row:4;width:57%;margin:12px 14px 0 0;min-height:52px;font-size:20px}.custom-hint{font-size:12px}.custom-message{left:16px;right:16px;bottom:calc(var(--menu-content-inset-bottom) + 3px);font-size:11px}}
@media(prefers-reduced-motion:reduce){.customization-screen button,.customization-screen .custom-save{transition:none}}
.custom-buys{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.custom-buys:empty{display:none}
.custom-cosmetic-panel>.custom-buys:not(:empty){flex-shrink:0;padding-bottom:var(--custom-content-inset-bottom)}
@media(max-width:760px){.custom-panel.custom-cosmetic-panel,.custom-panel.custom-badge-panel{--custom-content-inset-bottom:12px}}
.custom-buys:has(.custom-earn-level){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.custom-earn-level{display:flex;align-items:center;justify-content:center;min-width:0;margin:0;padding:6px;text-align:center;line-height:1.4}
.custom-buys:has(.custom-earn-level)>.custom-buy{min-width:0}
.custom-buys:has(.custom-earn-level):not(:has(.custom-buy-set))>.custom-buy{grid-column:2/-1}
.custom-buys:has(.custom-earn-level)>.custom-terms{grid-column:1/-1}
.custom-buy{flex:1 1 180px;min-height:44px;padding:6px 14px;background:linear-gradient(120deg,#d3a367,#f1c986 45%,#cd9d61);border:3px solid #ba935e!important;box-shadow:inset 0 0 0 2px #f9d697,0 4px 8px #0005;color:#33230e!important;font-size:clamp(14px,1.3vw,19px);font-weight:700;text-transform:uppercase;letter-spacing:1px}
.custom-buy:hover{filter:brightness(1.08)}
.custom-buy-set{background:linear-gradient(120deg,#c78a54,#e8b277 45%,#c0824c)}
@media(max-width:760px){.custom-buy{flex-basis:100%;min-height:40px;font-size:14px}}
@media(max-width:760px){.custom-buys:has(.custom-earn-level)>.custom-buy{grid-column:2/-1}.custom-buys:has(.custom-earn-level):has(.custom-buy-set)>.custom-earn-level{grid-row:1/span 2}}

.custom-badge-panel{display:none}
.is-badges .custom-badge-panel{display:flex}
.is-badges .custom-cosmetic-panel{display:none}
.badge-header{align-items:flex-start}
.badge-heading{min-width:0;display:flex;flex-direction:column;gap:6px}
.badge-heading h2{font:600 clamp(19px,1.6vw,26px) Pixelify,monospace;margin:0}
.badge-none{flex:0 0 auto;min-height:40px;font-size:clamp(13px,1.2vw,17px);white-space:nowrap}
.badge-none[aria-pressed=true]{box-shadow:inset 0 0 0 2px #f9d697,0 0 10px #e9c37844}
.badge-loading .custom-buy{flex:0 0 auto;width:100%;max-width:220px;min-height:40px}
.achievement-badge-image{object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.badge-count{color:#b6aa95;margin:0;font:14px Barlow,sans-serif}
.badge-tab-note{color:#c6bca9;margin:10px 0 0;font:12px/1.4 Barlow,sans-serif}
.badge-route-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px;align-content:start;flex:1;overflow-x:hidden;overflow-y:auto;min-width:0;min-height:0;padding:4px 4px calc(4px + var(--custom-content-inset-bottom));scrollbar-color:#65594b #1b1c1d}
.badge-route{position:relative;display:flex;gap:10px;align-items:center;min-width:0;padding:14px 30px 20px 10px;text-align:left;background:#29292d;border:2px solid #49474a!important;border-radius:8px}
.badge-route>.achievement-badge-image{width:96px;height:96px;opacity:1}
.customization-screen .badge-route{cursor:pointer;opacity:1}
.customization-screen .badge-route:disabled{cursor:default;opacity:1}
.badge-route:not(:disabled):hover{background:#343238}
.badge-route[aria-pressed=true]{border-color:#f7dd9b!important;box-shadow:0 0 10px #e9c37844}
.badge-route[data-tier="4"]{border-color:#94733f!important}
.badge-route[data-tier="4"][aria-pressed=true]{border-color:#f7dd9b!important;box-shadow:0 0 12px #e9c37855}
.badge-route.is-locked>.achievement-badge-image{opacity:.3}
.badge-route.is-locked .badge-route-details>:not(.badge-progress){opacity:.94}
.badge-route-details{display:flex;flex-direction:column;gap:5px;min-width:0;width:100%;overflow-wrap:anywhere}
.badge-route strong{font-size:18px;line-height:1.1}
.badge-metric,.badge-progress-text{font:12px/1.3 Barlow,sans-serif;color:#bfb4a7}
.badge-tier{font-size:14px;color:#e1c99c}
.badge-progress{display:block;appearance:none;-webkit-appearance:none;width:100%;height:6px;background:rgba(255,255,255,.2);accent-color:#fff;color:#fff;border:0}
.badge-progress::-webkit-progress-bar{background:transparent}
.badge-progress::-webkit-progress-value{background:#fff}
.badge-progress::-moz-progress-bar{background:#fff}
.badge-equipped{position:absolute;bottom:3px;right:8px;font:11px Barlow,sans-serif;color:#f7dd9b}
.badge-loading{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:20px}
@media(max-width:760px){.custom-classes{width:100%;gap:0}.custom-classes .custom-tab{padding:8px 10px;font-size:15px;flex:1}.badge-route{gap:8px;padding:10px 24px 18px 8px}.badge-route>.achievement-badge-image{width:69px;height:69px}.badge-route strong{font-size:16px}.badge-metric,.badge-progress-text{font-size:11px}.badge-none{min-height:36px;padding:5px 10px}.badge-count{font-size:12px}}
.purchase-complete{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:#000a;animation:purchase-fade .18s ease-out}
.purchase-complete-card{width:min(520px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:24px;text-align:center;background:linear-gradient(#2a241c,#17130f);border:2px solid #ba935e;box-shadow:inset 0 0 0 2px #f9d69733,0 18px 40px #000c;color:#ead9b5;animation:purchase-pop .22s ease-out}
.purchase-complete-title{margin:0 0 16px;font:700 clamp(22px,3vw,30px)/1.1 Pixelify,sans-serif;letter-spacing:1.5px;text-transform:uppercase;color:#f7dd9b}
.purchase-complete-art{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-bottom:14px}
.purchase-complete-item{display:flex;flex-direction:column;align-items:center;gap:6px;width:112px;font-size:13px}
.purchase-complete-item img{width:112px;height:112px;object-fit:contain;background:radial-gradient(circle at 50% 60%,#3a3226,#15120e);border:1px solid #71634a;border-radius:4px}
.purchase-complete-more{align-self:center;font-size:14px;color:#c9b99a}
.purchase-complete-body{margin:0 0 18px;font-size:16px;line-height:1.45}
.purchase-complete-ok{min-width:140px;min-height:44px;padding:8px 24px;cursor:pointer;background:linear-gradient(120deg,#d3a367,#f1c986 45%,#cd9d61);border:3px solid #ba935e;color:#33230e;font:700 18px Pixelify,sans-serif;letter-spacing:1.5px;text-transform:uppercase}
.purchase-complete-ok:hover,.purchase-complete-ok:focus-visible{filter:brightness(1.08);outline:2px solid #f7dd9b;outline-offset:2px}
@keyframes purchase-fade{from{opacity:0}}
@keyframes purchase-pop{from{transform:scale(.94);opacity:0}}
@media(prefers-reduced-motion:reduce){.purchase-complete,.purchase-complete-card{animation:none}}
