/* Profile record panels share the profile's jade and rose surfaces. */
#app #profile .profile-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#app #profile .profile-record-panel,
#app #profile .profile-panel--career {
  display: block;
  overflow: auto !important;
  padding: clamp(6px, 1.2vw, 16px);
  color: var(--neon-ink);
  scrollbar-gutter: stable;
}

#profile .profile-record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-bottom: 8px;
}

#profile :is(.profile-record-toolbar, .profile-game-career) h2 {
  margin: 0;
  color: var(--neon-ink);
  font: 750 clamp(14px, 1.75vw, 22px)/1.25 system-ui, sans-serif;
}

#profile .profile-record-toolbar h2 span {
  color: var(--neon-muted);
  margin-inline-start: 5px;
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 600;
}

#profile .profile-record-toolbar label { display: flex; align-items: center; gap: 6px; font: 600 11px/1.2 system-ui, sans-serif; }
#profile .profile-record-toolbar select {
  max-width: 100%;
  min-height: 34px;
  padding: 3px 5px;
  border: 1px solid #778c7b;
  border-radius: 5px;
  color: #fff4dc;
  background: #182d23;
  font: 600 clamp(11px, 1.45vw, 14px)/1.3 system-ui, sans-serif;
}

#profile .profile-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#profile .profile-record-list > p { grid-column: 1 / -1; margin: 4px 0; color: var(--neon-muted); font-size: 13px; }

#profile .profile-record-card {
  display: grid;
  grid-template-columns: clamp(26px, 4vw, 47px) minmax(0, 1fr);
  grid-template-areas: 'mark name' 'mark condition' 'rarity status';
  align-content: start;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  padding: clamp(6px, 1.1vw, 13px);
  border: 1px solid #49655b;
  border-radius: 9px;
  background: linear-gradient(145deg, #20362f, #131f22);
  color: var(--neon-ink);
  white-space: normal;
  text-align: start;
  cursor: pointer;
}

#profile .profile-record-card.is-owned {
  border-color: #ba9468;
  background: linear-gradient(145deg, #3c2928, #181c23);
}

#profile .profile-record-card > strong,
#profile .profile-record-card > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#profile .profile-record-card > strong {
  grid-area: name;
  font: 740 clamp(12px, 1.45vw, 16px)/1.3 system-ui, sans-serif;
}

#profile .profile-record-card > small {
  grid-area: condition;
  color: var(--neon-muted);
  font: 500 clamp(11px, 1.25vw, 13px)/1.4 system-ui, sans-serif;
}

#profile .profile-record-card > img {
  grid-area: mark;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  align-self: start;
}

#profile .profile-record-card__status { grid-area: status; color: #e6d2ad; font: 650 11px/1.25 system-ui, sans-serif; }
#profile .profile-record-card.is-owned .profile-record-card__status { color: #ffd580; }
#profile .profile-record-card__rarity { grid-area: rarity; color: #bbcdc4; font: 650 clamp(7px, 0.9vw, 10px)/1.2 system-ui, sans-serif; }

#profile .profile-record-card:focus-visible,
#profile .profile-record-toolbar select:focus-visible { outline: 2px solid #ffc980; outline-offset: -2px; }

#profile .profile-game-career > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

#profile .profile-game-career > header span,
#profile .profile-record-note { color: var(--neon-muted); font: 500 clamp(10px, 1.2vw, 13px)/1.45 system-ui, sans-serif; }

#profile .profile-game-career table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 7px;
  font: 600 clamp(11px, 1.4vw, 15px)/1.25 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

#profile .profile-game-career :is(th, td) {
  border-bottom: 1px solid #415d52;
  padding: clamp(4px, .7vw, 9px);
  text-align: end;
  overflow-wrap: anywhere;
}

#profile .profile-game-career th:first-child { width: 39%; text-align: start; }
#profile .profile-game-career th:nth-child(2) { width: 13%; }
#profile .profile-game-career th:last-child { width: 27%; }
#profile .profile-game-career thead { color: #f5dbab; background: #332923; }
#profile .profile-game-career tbody tr:nth-child(even) { background: #142b24; }
#profile .profile-game-career td small,
#profile .profile-game-career thead small {
  display: block;
  color: var(--neon-muted);
  font: 500 clamp(9px, 1vw, 12px)/1.2 system-ui, sans-serif;
}
#profile .profile-profit--gain { color: #92eac1; }
#profile .profile-profit--loss { color: #ffb0be; }
#profile .profile-record-note { margin: 6px 0 10px; }

#profile .profile-career-detail {
  border: 1px solid #486457;
  border-radius: 7px;
  margin-top: 6px;
  padding: 0 8px;
}
#profile .profile-career-detail summary { padding: 7px 2px; cursor: pointer; font: 700 12px/1.4 system-ui, sans-serif; }
#profile .profile-career-detail__body { display: grid; gap: 6px; padding-bottom: 8px; }

#profile .profile-detail-card {
  height: auto;
  max-height: calc(100% - 16px);
  overflow: auto;
  gap: 6px;
}
#profile .profile-detail-card__icon .casinoir-rarity-mark { width: 100%; height: 100%; object-fit: contain; }
#profile .profile-detail-card__head h2,
#profile .profile-detail-card__description,
#profile .profile-detail-card__meta strong { white-space: normal !important; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  #profile .profile-record-toolbar label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #profile .profile-record-list { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  #profile .profile-record-card {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas: 'mark name status' 'mark condition condition' 'rarity condition condition';
  }
  #profile .profile-record-card__status { font-size: 10px; }
}

@media (max-height: 480px) and (orientation: landscape) {
  #profile .profile-game-career table { margin-top: 4px; }
  #profile .profile-game-career :is(th, td) { padding-block: 3px; }
  #profile .profile-game-career thead small,
  #profile .profile-game-career td small { display: inline; margin-inline-start: 2px; }
  #profile .profile-game-career td:nth-child(3) small { display: none; }
}
