/* Artwork frames the objects and portrait. Keep labels on opaque surfaces. */
:root {
  --rooms-ink: #f8f1de;
  --rooms-muted: #d0ddd1;
  --rooms-surface: #10251d;
  --rooms-line: #8e7d54;
  --rooms-gold: #ecd09a;
  --rooms-on-gold: #23190b;
  --rooms-tray: url('./assets/ui/casinoir-rooms-v05700/display-tray.webp');
  --rooms-membership: url('./assets/ui/casinoir-rooms-v05700/membership-card.webp');
}

#app #collection.inventory-screen {
  background: #0a1914 !important;
  color: var(--rooms-ink);
}
#collection .inventory-heading,
#profile .profile-brand { display: flex; align-items: center; gap: 8px; }
#collection .inventory-heading img,
#profile .profile-brand img { width: clamp(30px, 4.2vw, 44px); height: clamp(30px, 4.2vw, 44px); object-fit: contain; }
#collection .inventory-header h1,
#profile .profile-topbar h1 { font-size: clamp(17px, 2.25vw, 25px) !important; color: var(--rooms-ink); overflow-wrap: anywhere; }
#collection .inventory-header { gap: 9px; }
#collection .inventory-counters > span { color: var(--rooms-muted); font-size: 12px; }
#collection .inventory-counters strong { color: var(--rooms-gold); font-variant-numeric: tabular-nums; }
#collection .inventory-counters small { font-size: 11px; }
#app #collection :is(.inventory-main-tabs, .inventory-categories) button,
#collection #collectionMyCasinoOpen {
  min-height: 36px;
  border: 1px solid #758678;
  border-radius: 6px;
  background: var(--rooms-surface);
  color: var(--rooms-ink);
  white-space: nowrap;
  font-size: 13px;
}
#app #collection :is(.inventory-main-tabs, .inventory-categories) button:is(.is-active,[aria-pressed="true"]) {
  border-color: #ffe5ac;
  background: var(--rooms-gold) !important;
  color: var(--rooms-on-gold) !important;
}
#collection .inventory-purpose { color: var(--rooms-muted); }
#collection .inventory-navigation { display: flex; align-items: center; flex: 0 0 auto; gap: 7px; min-width: 0; }
#collection .inventory-search--collection { flex: 0 0 clamp(116px, 19vw, 230px); }
#collection:not([data-noir-cabinet-mode="cosmetics"]) .inventory-search--collection { display: none; }
#collection .inventory-toolbar .inventory-categories {
  flex: 1 1 0;
  width: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #bba271 #0a1914;
}
#collection .inventory-categories button { flex: 0 0 auto; }
#collection .inventory-categories small { font-size: 11px; opacity: 1; }
#app #collection #collectionGrid {
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)) !important;
  scrollbar-color: #bba271 #0a1914;
}
#app #collection #collectionGrid > .collection-item {
  border: 1px solid #687d6d !important;
  border-radius: 8px !important;
  background: #11251e !important;
}
#app #collection #collectionGrid > .is-equipped { border-color: #e9ca90 !important; }
#collection .inventory-card {
  grid-template-columns: clamp(65px, 10vw, 108px) minmax(0, 1fr) 10px;
  gap: 8px;
  padding: 7px;
  color: var(--rooms-ink);
}
#collection .inventory-card__visual { width: 100%; height: auto; aspect-ratio: 4 / 5; min-width: 0; overflow: hidden; border-radius: 5px; }
#collection .inventory-card__visual,
body:has(#collection.is-active) #itemDetailModal .item-detail-art { background: #112a21 var(--rooms-tray) center bottom / 100% 100%; }
#collection .inventory-card__copy { align-items: flex-start; }
#collection .inventory-card__copy strong { font-size: clamp(14px, 1.4vw, 17px); color: var(--rooms-ink); }
#collection .inventory-card__copy > :is(small, span) { font-size: 12px; color: var(--rooms-muted); }
#collection .inventory-card__copy .inventory-card__state {
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 4px;
  background: #214a37;
  color: #e2fbe9;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#collection .is-locked .inventory-card__state { background: #333d3b; color: #f1f5f2; }
#collection .is-equipped .inventory-card__state { background: var(--rooms-gold); color: var(--rooms-on-gold); }
body:has(#collection.is-active) #itemDetailModal .item-detail-panel { background: #11251e; color: var(--rooms-ink); border-color: var(--rooms-line); }
body:has(#collection.is-active) #itemDetailModal .item-detail-copy :is(dt, dd, p) { font-size: 13px; line-height: 1.4; color: var(--rooms-muted); }
body:has(#collection.is-active) #itemDetailModal #itemDetailState { font-size: 14px; color: #ffdea0; }

#app #profile.screen--profile { background: #091813 !important; color: var(--rooms-ink); overflow: hidden; }
#app #profile.screen--profile.is-active { display: flex !important; flex-direction: column; }
#profile .profile-ambient { display: none !important; }
#app #profile .profile-topbar {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: auto !important;
  min-height: 50px;
  padding: 3px max(10px, var(--safe-inline, 0px)) !important;
  background: #11271f;
  box-shadow: none;
}
#profile .profile-brand { margin-right: auto; min-width: 0; }
#app #profile .char-close {
  position: static !important;
  width: 42px !important;
  min-width: 42px;
  height: 42px !important;
  margin: 0 !important;
  transform: none !important;
}
#app #profile .profile-stage {
  position: static !important;
  box-sizing: border-box;
  flex: 1 1 0;
  display: grid !important;
  grid-template-columns: minmax(146px, 29%) minmax(0, 1fr) !important;
  width: min(100%, 1280px) !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: clamp(6px, 1.1vw, 14px) max(10px, var(--safe-inline, 0px)) !important;
  gap: clamp(6px, 1.1vw, 14px) !important;
}
#app #profile .profile-identity {
  min-height: 0;
  grid-template: minmax(52px, 1fr) auto auto auto / minmax(0, 1fr) !important;
  align-content: stretch !important;
  gap: 5px !important;
  padding: clamp(8px, 1.25vw, 18px) !important;
  overflow: auto;
  background: #13110e var(--rooms-membership) center / 100% 100% !important;
  border: 1px solid var(--rooms-line);
  border-radius: 8px;
}
#profile .profile-identity::before { display: none; }
#app #profile .profile-identity > * { grid-column: 1 !important; grid-row: auto !important; }
#app #profile .profile-avatar { min-width: 0; width: 100%; min-height: 52px; height: auto !important; margin: 0; }
#app #profile .profile-name-edit {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 3px 5px;
  min-width: 0;
}
#profile .profile-name-edit label { grid-column: 1 / -1; color: var(--rooms-muted); font-size: 12px; }
#app #profile .profile-name-edit :is(input, button) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 4px 6px !important;
  border: 1px solid #a88d58;
  border-radius: 5px;
}
#app #profile .profile-name-edit button { color: var(--rooms-on-gold); background: var(--rooms-gold); font-size: 13px; }
#profile #profileNameStatus { color: #f8d693; font-size: 12px; min-height: 0; }
#app #profile #profileEquippedTitle { color: #ffdfa5; font-size: clamp(12px, 1.4vw, 15px); min-width: 0; padding-inline: 6px; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
#app #profile .profile-badge-strip {
  width: auto !important;
  height: auto !important;
  min-width: 0;
  overflow: visible;
  color: var(--rooms-ink);
}
#app #profile .profile-badge-strip__head :is(b,small) { color: var(--rooms-muted); font-size: 12px !important; }
#profile .profile-main { min-height: 0; border-radius: 8px; background: #10231b; }
#app #profile .profile-tabs { height: auto; min-height: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
#app #profile .profile-tabs button {
  min-width: 0;
  min-height: 38px;
  padding: 4px 1px;
  border-radius: 5px;
  border: 1px solid #708475;
  font: 700 clamp(11px, 1.45vw, 15px)/1.25 system-ui, sans-serif;
  background: #152f24;
  color: var(--rooms-ink);
  overflow-wrap: anywhere;
}
#app #profile .profile-tabs button[aria-selected="true"] { color: var(--rooms-on-gold); border-color: #ffe5b1; background: var(--rooms-gold); }
#app #profile :is(.profile-summary-cards article, .profile-overview-detail, .profile-appearance) { background: var(--rooms-surface) !important; }
#app #profile .profile-summary-cards :is(small,span),
#profile :is(.profile-overview-note, #profileGameBreakdownStatus),
#app #profile :is(.profile-stat-grid, .profile-game-breakdown, #profileAppearanceItems) :is(small, span),
#app #profile .profile-appearance p { font-size: 12px !important; line-height: 1.4; color: var(--rooms-muted); }
#app #profile .profile-summary-cards strong { font-size: clamp(16px, 2.15vw, 30px); font-variant-numeric: tabular-nums; }
#app #profile #profileFavoriteGame { font-size: clamp(14px, 1.6vw, 22px); }
#app #profile :is(.profile-overview-detail summary,.profile-appearance h3,.profile-cabinet-link) { font-size: 14px !important; }
#app #profile .profile-overview-detail summary { min-height: 36px; }
#app #profile #profileAppearanceItems strong { font-size: 13px !important; }
#app #profile :is(.career-record-grid,.career-stat-grid,.achievement-card,.profile-title-card,.rival-grid,.rival-dashboard) :is(small,p) { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
#app #profile .profile-panels { min-height: 0; }
#app #profile .profile-panel { overscroll-behavior: contain; scrollbar-color: #bba271 #0a1914; }
#app #profile.screen:not(#home) > nav.profile-bottom-nav {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  flex: 0 0 44px !important;
  grid-template: 1fr / repeat(5, minmax(0, 1fr)) !important;
  width: 100% !important;
  height: 44px !important;
  padding: 0 max(10px, var(--safe-inline,0px)) !important;
  margin: 0 !important;
  gap: 3px !important;
}
#app #profile.screen:not(#home) > nav.profile-bottom-nav > button {
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 4px !important;
  width: auto !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
#app #profile.screen:not(#home) > nav.profile-bottom-nav > button > .nav-icon {
  position: static !important;
  inset: auto !important;
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 25px !important;
  margin: 0 !important;
  transform: none !important;
}
#app #profile > nav.profile-bottom-nav .nav-icon > img { max-width: 24px !important; max-height: 25px !important; }
#app #profile.screen:not(#home) > nav.profile-bottom-nav > button > strong {
  position: static !important;
  inset: auto !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  color: var(--rooms-ink);
  font-size: clamp(10px, 1.4vw, 14px) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:is(#profile, #collection, #itemDetailModal) :is(button, input, select, summary):focus-visible {
  outline: 2px solid #ffe5ad !important;
  outline-offset: -2px;
}

@media (min-width: 1050px) and (min-height: 620px) {
  #app #collection #collectionGrid { grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)) !important; }
  #collection .inventory-card { grid-template-columns: minmax(0, 1fr); align-content: start; }
  #collection .inventory-card__visual { aspect-ratio: 4 / 3; }
  #collection .inventory-card__arrow { display: none; }
}
@media (max-width: 720px) and (orientation: landscape) {
  #collection .inventory-counters { gap: 5px; }
  #collection .inventory-counters > span { font-size: 11px; }
  #collection .inventory-counters small { display: none; }
  #collection .inventory-counters strong { margin: 0 1px; font-size: 15px; }
  #app #collection .inventory-main-tabs button { padding-inline: 10px; }
  #collection .inventory-header > button:not(.char-close) { padding-inline: 5px; }
  #app #profile .profile-stage { grid-template-columns: minmax(138px, 31%) minmax(0, 1fr) !important; }
  #app #profile .profile-name-edit :is(input, button) { min-height: 32px; height: 32px; }
  #app #profile .profile-summary-cards article { padding: 5px; }
  #app #profile .profile-tabs button { min-height: 34px; }
}
@media (max-height: 440px) {
  #collection[data-noir-cabinet-mode="cosmetics"] .inventory-purpose-bar { display: none; }
}
