/* Enamel frames share a warm palette with the characters, dialogue and table art. */
body[data-casinoir-build] {
  --lobby-pearl: url('./assets/ui/casinoir-lobby-v05900/frame-pearl.webp');
  --lobby-mint: url('./assets/ui/casinoir-lobby-v05900/frame-mint.webp');
  --lobby-violet: url('./assets/ui/casinoir-lobby-v05900/frame-violet.webp');
  --lobby-peach: url('./assets/ui/casinoir-lobby-v05900/frame-peach.webp');
  --lobby-entry: url('./assets/ui/casinoir-lobby-v05900/frame-entry.webp');
  --lobby-night-blue: url('./assets/ui/casinoir-lobby-v05900/frame-night-blue.webp');
  --lobby-ink: #382942;
  --lobby-muted: #62465c;
}

/* Small controls keep the same hit areas and stretch their illustrated rim. */
body[data-casinoir-build] #home :is(.account-entry--home, .account-entry__actions > button),
body[data-casinoir-build] #app #floor.screen.screen--grand-floor :is(.gf-enter, .gf-carousel-controls > button, .gf-room-link, .grand-floor-back, .casinoir-surface-wallet),
body[data-casinoir-build] .home-background-panel > footer button {
  border-color: transparent !important;
  border-radius: 11px !important;
  border-image: var(--lobby-surface, var(--lobby-pearl)) 24 fill / 16px stretch !important;
  background: var(--lobby-fallback, #fff4e8) !important;
  color: var(--lobby-ink) !important;
  text-shadow: none !important;
  box-shadow: 0 3px 8px #291d3935 !important;
}

body[data-casinoir-build] #app #floor.screen.screen--grand-floor .casinoir-surface-wallet {
  --lobby-surface: var(--lobby-peach);
  --lobby-fallback: #f8dfbd;
}
body[data-casinoir-build] #home [data-account-start="login"],
body[data-casinoir-build] #app #floor.screen.screen--grand-floor :is([id$="OnlineOpen"], #myCasinoOpen) {
  --lobby-surface: var(--lobby-mint);
  --lobby-fallback: #e1f1e6;
}
body[data-casinoir-build] #app #floor.screen.screen--grand-floor #nightChronicleOpen {
  --lobby-surface: var(--lobby-violet);
  --lobby-fallback: #f0e5fa;
}
body[data-casinoir-build] #home [data-account-start="register"] {
  --lobby-surface: var(--lobby-entry);
  --lobby-fallback: #ffcdb6;
}

body[data-casinoir-build] #home .account-entry--home p,
body[data-casinoir-build] #app #floor.screen.screen--grand-floor .casinoir-surface-wallet :is(strong, span) {
  color: var(--lobby-ink) !important;
  text-shadow: none !important;
}
body[data-casinoir-build] #landing .enter-button {
  border-image: var(--lobby-entry) 27 fill / 24px stretch !important;
  border-radius: 16px !important;
  background: #ffcdb6 !important;
  color: #441d37 !important;
  box-shadow: 0 6px 18px #291d3959 !important;
}
body[data-casinoir-build] #landing .enter-button strong {
  color: #441d37 !important;
  font-family: system-ui, "Hiragino Kaku Gothic ProN", sans-serif !important;
  font-weight: 850 !important;
  text-shadow: 0 1px #fff9e9 !important;
}

/* Full images preserve the curved, transparent edges of the home plates. */
body[data-casinoir-build] #home :is(#homeProfileButton, .home-currencies > .home-wallet, #homeCasinoFloorButton) {
  border: 0 !important;
  border-image: none !important;
  background:
    var(--home-plate) center / 100% 100% no-repeat,
    radial-gradient(ellipse at center, var(--neon-glass, #15101bea) 49%, transparent 76%) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 2px #11090ba6);
}
body[data-casinoir-build] #home #homeProfileButton {
  --home-plate: url('./assets/ui/casinoir-neon-v05903/profile.webp');
  width: clamp(120px, 15.2vw, 158px) !important;
  height: clamp(38px, 9.5vh, 42px) !important;
  left: max(9px, var(--safe-inline)) !important;
  grid-template-columns: 25px minmax(0, 1fr) !important;
  gap: 4px !important;
  padding: 1px 12px 0 9px !important;
}
body[data-casinoir-build] #home .home-avatar {
  width: 25px !important;
  height: 25px !important;
}
body[data-casinoir-build] #home .home-avatar:not([class*="profile-frame--"]) {
  border-color: #cdb079 !important;
}
body[data-casinoir-build] #home .home-profile__copy #homePlayerName {
  color: #fff4d8 !important;
  font-size: clamp(10px, 1.2vw, 13px) !important;
  line-height: 1.04 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
  letter-spacing: 0 !important;
}
body[data-casinoir-build] #home .home-profile__copy > .home-chip-rank {
  color: #efcd89 !important;
  font-size: clamp(9px, 1vw, 11px) !important;
}
body[data-casinoir-build] #home .home-chip-rank > img {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
}
body[data-casinoir-build] #home .home-currencies {
  top: clamp(5px, 1.6vh, 8px);
  left: 29%;
  right: max(37%, calc(240px + var(--safe-inline)));
  height: clamp(36px, 9.9vh, 42px);
  max-width: 328px;
}
body[data-casinoir-build] #home .home-wallet--chips { --home-plate: url('./assets/ui/casinoir-neon-v05903/chips.webp'); }
body[data-casinoir-build] #home .home-wallet--coin { --home-plate: url('./assets/ui/casinoir-neon-v05903/coin.webp'); }
body[data-casinoir-build] #home .home-wallet--premium { --home-plate: url('./assets/ui/casinoir-neon-v05903/gem.webp'); }
body[data-casinoir-build] #home .home-currencies > .home-wallet {
  grid-template-columns: minmax(0, 1fr) !important;
  padding: 3px clamp(7px, 1.05vw, 12px) !important;
  align-items: center !important;
}
body[data-casinoir-build] #home .home-currencies .home-currency-copy {
  grid-column: 1 !important;
  gap: 1px;
}
body[data-casinoir-build] #home .home-currencies #homeChipInfo {
  right: -1px !important;
  bottom: -13px !important;
}
body[data-casinoir-build] #home .home-currency-copy > small {
  display: flex !important;
  align-items: center;
  gap: 3px;
  color: #e8c98d !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px #100c08 !important;
}
body[data-casinoir-build] #home .home-currencies > .home-wallet .home-wallet__icon {
  width: 13px !important;
  height: 13px !important;
  padding: 0 !important;
}
body[data-casinoir-build] #home .home-currency-copy > strong {
  min-width: 0 !important;
  color: #fff7e4 !important;
  font-family: Arial, sans-serif !important;
  font-size: clamp(10px, 1.4vw, 14px) !important;
  line-height: 1.04 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-align: center !important;
  text-overflow: clip !important;
  text-shadow: 0 1px 3px #100c08 !important;
}
body[data-casinoir-build] #home .home-game-zone {
  right: max(2.05%, var(--safe-inline)) !important;
  bottom: max(5.2%, var(--safe-bottom)) !important;
  width: clamp(172px, 23vw, 234px) !important;
  height: clamp(44px, 11.4vh, 54px) !important;
}
body[data-casinoir-build] #home #homeCasinoFloorButton {
  --home-plate: url('./assets/ui/casinoir-neon-v05903/start.webp');
  --neon-glass: #260b20f0;
  grid-template-columns: clamp(23px, 3.25vw, 33px) auto !important;
  justify-content: center !important;
  gap: clamp(5px, .85vw, 11px) !important;
  padding: 0 16px !important;
}
body[data-casinoir-build] #home #homeCasinoFloorButton > .home-floor-button__icon {
  width: 100% !important;
  height: auto !important;
  padding: 0 !important;
}
body[data-casinoir-build] #home #homeCasinoFloorButton > span > strong {
  color: #fff0c5 !important;
  font-family: system-ui, "Hiragino Kaku Gothic ProN", sans-serif !important;
  font-size: clamp(13px, 1.85vw, 21px) !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  line-height: 1.15 !important;
  text-shadow: 0 1px 3px #18080a !important;
}
@media (max-width: 760px) {
  body[data-casinoir-build] #home .home-currencies {
    left: max(27%, calc(131px + var(--safe-inline)));
    right: max(35%, calc(190px + var(--safe-inline)));
  }
  body[data-casinoir-build] #home .home-currencies > .home-wallet {
    padding-inline: 6px !important;
  }
}
@media (max-width: 620px) {
  body[data-casinoir-build] #home .home-currencies {
    left: max(26.5%, calc(131px + var(--safe-inline)));
    right: max(34%, calc(190px + var(--safe-inline)));
    grid-template-columns: 1.13fr minmax(0, 1fr) minmax(0, .88fr);
  }
  body[data-casinoir-build] #home .home-currencies > .home-wallet {
    padding-inline: 4px !important;
  }
  body[data-casinoir-build] #home .home-currency-copy > strong {
    font-size: 10px !important;
    letter-spacing: -.015em !important;
  }
}

/* The artwork includes the Japanese label. Retain the whole button as its target. */
body[data-casinoir-build] #app #home .home-utility-row > button.home-utility-action--fullart,
body[data-casinoir-build] #app #home #homeBackgroundOpen,
body[data-casinoir-build] #app :is(#home, #floor, #character, #collection, #shop, #profile).screen > nav.home-bottom-nav > button,
body[data-casinoir-build] #app #floor.screen:not(#home).screen--grand-floor > nav.home-bottom-nav.grand-floor-bottom-nav > button {
  border: 0 !important;
  border-image: none !important;
  background: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  display: grid !important;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr) !important;
  place-items: center !important;
  gap: 0 !important;
  padding: 1px !important;
  position: relative;
}
body[data-casinoir-build] #home {
  --home-shortcuts-width: clamp(76px, 11vw, 112px);
}
body[data-casinoir-build] #app #home nav.home-bottom-nav.home-side-nav {
  width: var(--home-shortcuts-width) !important;
  gap: 5px !important;
}
@media (max-height: 430px) and (orientation: landscape) {
  body[data-casinoir-build] #home .home-game-zone {
    right: calc(max(8px, var(--safe-inline)) + var(--home-shortcuts-width) + 8px) !important;
  }
}
body[data-casinoir-build] #app #home #homeBackgroundOpen {
  position: absolute;
  height: clamp(44px, 11.5vh, 60px);
  min-height: 44px !important;
  z-index: 16 !important;
}
body[data-casinoir-build] #app .lobby-menu-art {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 68px;
  min-height: 0;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px #180d18ad);
  color: #fff5dc;
  font: 700 10px/1.15 system-ui, sans-serif;
}
body[data-casinoir-build] #app #floor.screen--grand-floor > nav.grand-floor-bottom-nav > button > .lobby-menu-art {
  max-width: 58px !important;
  max-height: 100% !important;
}
body[data-casinoir-build] #app #home .home-utility-row > button.home-utility-action--fullart > em {
  top: 3px !important;
  right: 1px !important;
}
body[data-casinoir-build] #app #home .home-utility-row > button.home-utility-action--fullart > em[hidden] {
  display: none !important;
}
body[data-casinoir-build] #app nav.home-bottom-nav > button:is(.is-active, [aria-current="page"]):has(> .lobby-menu-art) {
  padding-bottom: 4px !important;
}
body[data-casinoir-build] #app nav.home-bottom-nav > button:is(.is-active, [aria-current="page"]):has(> .lobby-menu-art)::after {
  display: block !important;
  content: '';
  position: absolute;
  inset: auto auto 1px 50% !important;
  width: 15px !important;
  height: 2px !important;
  transform: translateX(-50%) !important;
  border-radius: 2px;
  background: #ffd59d !important;
  pointer-events: none;
}
@media (min-width: 1100px) {
  body[data-casinoir-build] #app #home .home-utility-row {
    grid-template-columns: repeat(5, clamp(51px, 4.4vw, 68px)) !important;
  }
}

body[data-casinoir-build] #app #floor.screen.screen--grand-floor .gf-card {
  border-image: var(--lobby-pearl) 24 fill / 16px stretch !important;
  border-radius: 12px !important;
  background: #fff4e8 !important;
  color: var(--lobby-ink) !important;
  box-shadow: 0 4px 10px #291d393d !important;
}
body[data-casinoir-build] #app #floor.screen.screen--grand-floor .gf-emblem {
  border-radius: 8px 8px 3px 3px !important;
  overflow: hidden !important;
}
body[data-casinoir-build] #app #floor.screen.screen--grand-floor .gf-copy :is(h3, small, p) {
  color: var(--lobby-ink) !important;
  text-shadow: none !important;
}
body[data-casinoir-build] #app #floor.screen.screen--grand-floor .gf-copy small { color: var(--lobby-muted) !important; }

/* The home dialogs use an opaque blue enamel frame to retain contrast for their light text. */
body[data-casinoir-build] :is(.home-background-panel, .home-background-preview-panel, .daily-mission-panel,
  .today-board-panel, .live-inbox-panel, .system-menu-panel) {
  border-image: var(--lobby-night-blue) 24 fill / 21px stretch !important;
  border-radius: 15px !important;
  background: #304e62 !important;
  box-shadow: 0 10px 28px #19152965 !important;
}

body[data-casinoir-build] :is(#home, #floor, #landing) button:focus-visible,
body[data-casinoir-build] #app :is(#home, #floor, #character, #collection, #shop, #profile).screen > nav.home-bottom-nav > button:focus-visible {
  outline: 2px solid #fff6c1 !important;
  outline-offset: 2px !important;
}

/* Preview the neon artwork with a legible tonal label on each panel. */
body[data-casinoir-build] #home .home-wallet--chips { --neon-caption: #ffd1a4; --neon-glass: #230f18ef; }
body[data-casinoir-build] #home .home-wallet--coin { --neon-caption: #baf7e7; --neon-glass: #0c201cf0; }
body[data-casinoir-build] #home .home-wallet--premium { --neon-caption: #e4d4ff; --neon-glass: #1c1333f0; }
body[data-casinoir-build] #home .home-currency-copy > small { color: var(--neon-caption) !important; }
body[data-casinoir-build] #home #homeCasinoFloorButton > span > strong {
  color: #fff4f8 !important;
  text-shadow: 0 1px 3px #220b22 !important;
}

body[data-casinoir-build] #home .home-currencies .home-currency-copy,
body[data-casinoir-build] #home #homeCasinoFloorButton > :is(.home-floor-button__icon, span) {
  position: relative;
  top: -2px;
}
