/* Shared game lobby header. Existing Liquid controls and controllers own behavior. */
:root {
  --yuyi-header-height: var(--hdr-top, 64px);
  
  --yuyi-z-header: 1000;
  --yuyi-z-header-open: 10001;
  --yuyi-z-right-drawer: 10002;
  --yuyi-z-mega: 10003;
  --yuyi-z-modal: 100000;
  --yuyi-hud-type-step: 0px;
}
body.yb-game-theme { padding-top: var(--yuyi-header-height); }
:is(#easystore-section-header,.yb-world-turn-source-header) {
  --hud-ink: #102b43;
  --hud-blue: #087cad;
  
  --hud-yellow: #ffe05b;
  --hud-line: #bfd7e5;
  --yuyi-ui-icon-box: 42px;
  --yuyi-ui-icon-glyph: 25px;
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--yuyi-z-header);
  color: var(--hud-ink);
  transition: top .2s ease;
}
:is(#easystore-section-header,.yb-world-turn-source-header), :is(#easystore-section-header,.yb-world-turn-source-header) * { box-sizing: border-box; }
:is(#easystore-section-header,.yb-world-turn-source-header).easystore-section-header-hidden { top: calc(-1 * var(--yuyi-header-height)); }
html.pc-menu-open :is(#easystore-section-header,.yb-world-turn-source-header) { z-index: var(--yuyi-z-header-open); }
:is(#easystore-section-header,.yb-world-turn-source-header) .header-wrapper {
  display: block;
  position: relative;
  overflow: visible;
  border: 0;
  background: linear-gradient(115deg, #142b3e 0%, #0d1e2d 58%, #152f43 100%);
  box-shadow: inset 0 1px 0 #ffffff0d, 0 6px 20px #020a142e;
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header {
  position: relative;
  display: grid;
  grid-template-columns: auto var(--yuyi-ui-icon-box) minmax(0, 1fr) auto;
  grid-template-areas: none;
  grid-template-rows: var(--hud-brand-height, 44px);
  align-items: center;
  gap: var(--hud-tool-gap, 10px);
  width: var(--hud-layout-width, 100%);
  max-width: 2240px;
  min-height: 0;
  margin: 0 auto;
  padding: var(--hud-pad-top, 9px) var(--hud-pad-x, 24px) var(--hud-pad-bottom, 7px);
  color: var(--hud-ink);
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header a { color: inherit; text-decoration: none; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header :is(a, button, summary):focus-visible,
.yb-game-theme .yuyi-currency-overlay :is(button, select):focus-visible {
  outline: 3px solid #087cad;
  outline-offset: 3px;
}
:is(#easystore-section-header,.yb-world-turn-source-header) button { font: inherit; cursor: var(--yb-game-action-cursor, pointer); }
:is(#easystore-section-header,.yb-world-turn-source-header) summary { list-style: none; cursor: var(--yb-game-action-cursor, pointer); }
:is(#easystore-section-header,.yb-world-turn-source-header) summary::-webkit-details-marker { display: none; }
:is(#easystore-section-header,.yb-world-turn-source-header) header-drawer, :is(#easystore-section-header,.yb-world-turn-source-header) .yuyi-right-drawer-container { display: none; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-link,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: start;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  height: var(--hud-brand-height, 44px);
  max-width: 100%;
  margin: 0;
  padding: 4px 16px 4px 10px;
  isolation: isolate;
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-link::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, #f3f9fd, #d5e4ee 55%, #b9d0e0);
  border-left: 3px solid var(--hud-yellow);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8faebe;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-logo { display: block; width: var(--hud-logo-width, 104px); max-width: 100%; height: auto; max-height: var(--hud-logo-height, 38px); object-fit: contain; padding: 2px 4px; border-radius: 2px; }
:is(#easystore-section-header,.yb-world-turn-source-header) .yuyi-nav-icons-row { display: contents; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__icons { display: flex; align-items: center; justify-content: flex-end; gap: var(--hud-tool-gap, 8px); grid-column: 4; grid-row: 1; margin: 0; padding: 0; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu { display: block; grid-column: 3; grid-row: 1; justify-self: center; margin: 0; min-width: 0; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > .list-menu--inline { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0; padding: 0; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li { flex: 0 0 auto; min-width: 0; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details > summary {
  --hex-fill: linear-gradient(110deg, #d6882e 0%, #bc5933 50%, #933942 100%);
  --hex-border: linear-gradient(145deg, #f9dc9f, #ce9877 65%);
  --hex-shine: #ffe3c866;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 48px;
  min-height: 0;
  min-width: 66px;
  padding: 0 calc(var(--hud-menu-pad-x, 10px) + 8px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff8f6;
  font-size: var(--hud-menu-size, 13px);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateY(-3px);
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li:nth-child(even) > a,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li:nth-child(even) > details-disclosure > details > summary { transform: translateY(3px); }
/* Shape only the trigger decoration; the fixed Mega Menu stays outside it. */
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a::before,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details > summary::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: var(--hex-border); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a::after,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details > summary::after { content: ""; position: absolute; inset: 1px; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent, var(--hex-shine), transparent) center 2px / calc(100% - 36px) 1px no-repeat, var(--hex-fill); clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 13px 100%, 0 50%); }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu .yuyi-menu-label { padding: 0; font: inherit; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a[aria-current="page"] { --hex-fill: linear-gradient(110deg, #e5ab4d, #d5783d 55%, #b14e3c); --hex-border: linear-gradient(130deg, #ffedb8, #edbd89); --hex-shine: #fff0ce; color: #fffaf0; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a:hover,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details > summary:hover { --hex-fill: linear-gradient(110deg, #e49b41, #d16b39 55%, #a34842); --hex-border: #ffe4ce; color: #fff; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details[open] > summary,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > a:focus-visible,
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu > ul > li > details-disclosure > details > summary:focus-visible { --hex-fill: linear-gradient(110deg, #dfa64b, #ce783e 55%, #a94d3b); --hex-border: #ffe2b7; color: #fff8e8; outline-color: #ffe2b7; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu .icon-caret { position: static; width: calc(9px + var(--yuyi-hud-type-step)); height: calc(9px + var(--yuyi-hud-type-step)); margin: 0; }
:is(#easystore-section-header,.yb-world-turn-source-header) details[open] > summary .icon-caret { transform: rotate(180deg); }

/* Tool group: decoration belongs to each tile, never to the dialog ancestors. */
:is(#easystore-section-header,.yb-world-turn-source-header) .header__icon,
:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--yuyi-ui-icon-box);
  width: var(--yuyi-ui-icon-box);
  min-width: var(--yuyi-ui-icon-box);
  height: var(--yuyi-ui-icon-box);
  margin: 0;
  padding: 0;
  border: 1px solid var(--hud-line);
  border-radius: 3px;
  background: #fff;
  color: var(--hud-ink);
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
:is(#easystore-section-header,.yb-world-turn-source-header) .header__icon:hover,
:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-btn:hover { border-color: var(--hud-blue); background: #eaf8ff; box-shadow: 0 3px 0 rgba(8,124,173,.16); }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__icon--account { border: 0; background: none; }
:is(#easystore-section-header,.yb-world-turn-source-header) .header__link-label { display: none; }
:is(#easystore-section-header,.yb-world-turn-source-header) a.yuyi-mobile-search { grid-column: 2; grid-row: 1; }
:is(#easystore-section-header,.yb-world-turn-source-header) :is(.yuyi-left-menu-icons, .yuyi-right-menu-icons, .yuyi-currency-globe, .header__icon--cart, .yuyi-header-icon-glyph, .yb-notify-icon) { display: inline-flex; align-items: center; justify-content: center; }
:is(#easystore-section-header,.yb-world-turn-source-header) .yuyi-ui-svg,
:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-icon svg { display: block; width: var(--yuyi-ui-icon-glyph); height: var(--yuyi-ui-icon-glyph); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:is(#easystore-section-header,.yb-world-turn-source-header) :is(.yuyi-ui-svg, .yb-notify-icon svg) :is(path, circle, line, polyline) { vector-effect: non-scaling-stroke; }
:is(#easystore-section-header,.yb-world-turn-source-header) :is(#cart-icon-bubble,.yb-world-turn-source-cart) { background: var(--hud-yellow); border-color: #ebca49; }
:is(#easystore-section-header,.yb-world-turn-source-header) .cart-count-bubble,
:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-count { position: absolute; top: -6px; right: -5px; bottom: auto; left: auto; display: flex; align-items: center; justify-content: center; min-width: calc(19px + var(--yuyi-hud-type-step)); height: calc(19px + var(--yuyi-hud-type-step)); margin: 0; padding: 0 4px; border: 2px solid white; border-radius: calc(9px + var(--yuyi-hud-type-step)); background: #087cad; color: white; font-size: calc(10px + var(--yuyi-hud-type-step)); font-weight: 800; line-height: 1; }
:is(#easystore-section-header,.yb-world-turn-source-header) .cart-count-bubble.hidden,
:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-count[hidden] { display: none; }

:is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify { position: relative; display: inline-flex; width: var(--yuyi-ui-icon-box); height: var(--yuyi-ui-icon-box); }
/* Keep the brand, navigation and tools on one desktop row. */
@media (min-width: 1090px) {
  :root { --yuyi-header-height: var(--hdr-top, calc(clamp(44px, 2.8vw, 54px) + 20px)); --yuyi-hud-type-step: clamp(1px, calc(.25vw - 1.8px), 4px); }
  :is(#easystore-section-header,.yb-world-turn-source-header) {
    --hud-layout-width: 96%;
    --hud-pad-x: 0px;
    --hud-pad-top: 10px;
    --hud-pad-bottom: 10px;
    --hud-brand-height: clamp(44px, 2.8vw, 54px);
    --hud-logo-width: clamp(88px, 7vw, 124px);
    --hud-logo-height: clamp(34px, 2.3vw, 44px);
    
    --hud-menu-size: clamp(14px, calc(.58vw + 7.65px), 16px);
    
    --hud-menu-pad-x: clamp(4px, calc(1.15vw - 8.5px), 10px);
    --hud-tool-gap: clamp(5px, .4vw, 9px);
    --yuyi-ui-icon-box: clamp(36px, 2.3vw, 48px);
    --yuyi-ui-icon-glyph: clamp(23px, 1.5vw, 29px);
  }
}
@media (max-width: 1089px) {
  :is(#easystore-section-header,.yb-world-turn-source-header) { --yuyi-ui-icon-box: 40px; --yuyi-ui-icon-glyph: 23px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header { display: flex; flex-wrap: nowrap; gap: 7px; min-height: 64px; padding: 10px 14px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) header-drawer { display: flex; flex: 0 0 auto; order: 0; margin: 0; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-link, :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading { flex: 0 0 auto; width: fit-content; min-width: 0; order: 1; height: 40px; padding: 3px 8px; margin-right: auto; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-logo { width: 94px; max-height: 34px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__inline-menu { display: none; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .yuyi-mobile-search { order: 3; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons { order: 2; gap: 7px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons > .yuyi-currency-pop,
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons > .header__icon--account,
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons > :is(#cart-icon-bubble,.yb-world-turn-source-cart) { display: none; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .yuyi-right-drawer-container { display: flex; order: 4; margin: 0; padding: 0; }
}
@media (max-width: 480px) {
  :root { --yuyi-header-height: var(--hdr-top, 62px); }
  :is(#easystore-section-header,.yb-world-turn-source-header) { --yuyi-ui-icon-box: 36px; --yuyi-ui-icon-glyph: 22px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header { min-height: 62px; gap: 5px; padding: 10px 8px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons { gap: 5px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-logo { width: 84px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-link { padding-inline: 6px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icon::after,
  :is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-btn::after { content: ""; position: absolute; inset: -4px -2px; }
}
@media (max-width: 360px) {
  :is(#easystore-section-header,.yb-world-turn-source-header) .header { gap: 4px; padding-inline: 6px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icons { gap: 4px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-logo { width: 66px; }
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__heading-link { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#easystore-section-header,.yb-world-turn-source-header), :is(#easystore-section-header,.yb-world-turn-source-header) *, .yb-game-theme .yuyi-currency-overlay *, .yb-game-theme .yuyi-currency-overlay::before { animation-duration: .01ms!important; transition-duration: .01ms; scroll-behavior: auto; }
}
@media (forced-colors: active) {
  :is(#easystore-section-header,.yb-world-turn-source-header) .header__icon, :is(#easystore-section-header,.yb-world-turn-source-header) .yb-notify-btn { border-color: ButtonText; }
}


/* Category artwork has its own right-hand space; labels stay clear on the left. */
:is(#easystore-section-header, .yb-world-turn-source-header)
  :is(.yuyi-drill__items > li > a, .yuyi-drill__items > li > button,
      #menu-drawer .menu-drawer__menu-item):has(> .yb-menu-category-image) {
  position: relative;
  isolation: isolate;
  min-height: 64px;
  padding-right: calc(36% + 20px);
  color: #092633;
  font-weight: 800;
  text-shadow: none;
}
:is(#easystore-section-header, .yb-world-turn-source-header) .yb-menu-category-image {
  position: absolute;
  inset: 8px 10px 8px auto;
  display: block;
  width: 36%;
  height: calc(100% - 16px);
  max-width: 140px;
  max-height: 48px;
  margin: auto 0;
  object-fit: contain;
  object-position: right center;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  z-index: 0;
  pointer-events: none;
}

/* Drawn category buttons: the complete artwork replaces the old button chrome.
   Category names and destinations still come from the admin taxonomy. */
:is(#easystore-section-header, .yb-world-turn-source-header)
  :is(.yuyi-drill__items > li > a, .yuyi-drill__items > li > button,
      #menu-drawer .menu-drawer__menu-item):has(> .yb-menu-category-image[src*="/yb-menu-art-"]) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 84px;
  aspect-ratio: 4 / 1;
  padding: 12px 46% 12px 7%;
  border: 0;
  border-radius: 0;
  background: none;
  clip-path: none;
  box-shadow: none;
  color: #050609;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: 0;
  text-shadow: none;
}
:is(#easystore-section-header, .yb-world-turn-source-header)
  .yb-menu-category-image[src*="/yb-menu-art-"] {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  z-index: -1;
}

/* Mobile artwork follows the row width; only spare transparent canvas is cropped vertically. */
@media (max-width: 1089px) {
  :is(#easystore-section-header, .yb-world-turn-source-header)
    #menu-drawer .menu-drawer__menu-item:has(> .yb-menu-category-image[src*="/yb-menu-art-"]) {
    height: auto;
    min-height: 0;
    aspect-ratio: 3.5 / 1;
    font-size: clamp(19px, 6vw, 24px);
    overflow-wrap: anywhere;
  }
  :is(#easystore-section-header, .yb-world-turn-source-header)
    #menu-drawer .yb-menu-category-image[src*="/yb-menu-art-"] {
    object-fit: cover;
  }
}

