/* Catalog tools share the same quiet brass detailing as the compass. */
.catalog-helpers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
}
.catalog-helpers > .text-button { font-size: 11px; line-height: 1.5; text-align: right; }
.shortlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #4b4537;
  border-radius: 20px;
  background: #bd934b08;
  color: #c7b992;
  font-size: 11px;
}
.shortlist-toggle > span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #2a2b32;
  color: #d1bd8e;
  font-size: 10px;
}
.shortlist-toggle[aria-pressed="true"] { background: #bd934b20; border-color: #a38248; color: #e1c88f; }
.shortlist-toggle:hover { border-color: #a38248; }

/* Keep the large configure target beneath the card's independent actions. */
.game-card .card-arrow::after { z-index: 1; }
.card-save {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #c7b17a66;
  background: #0c1426e6;
  color: #ede5ce;
  font-size: 23px;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.card-save:hover { border-color: #dbc084; background: #272735; }
.card-save[aria-pressed="true"] { color: #d3b16d; border-color: #c09b53; background: #282537ee; }
.game-card .game-art .tag { max-width: calc(100% - 61px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-choice {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 15px;
  padding: 8px 5px;
  border: 1px solid #46506680;
  border-radius: 6px;
  background: #1c2335;
  color: #aebad0;
  font-size: 10px;
  transition: background 180ms ease, border-color 180ms ease;
}
.compare-choice:hover { background: #292c39; border-color: #968056; }
.compare-choice[aria-pressed="true"] { border-color: #957741; background: #bd934b15; color: #d9be82; }
.card-save:focus-visible, .compare-choice:focus-visible { outline-offset: -3px; }

.compare-tray {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1080px, calc(100% - 48px));
  padding: 15px 19px;
  border: 1px solid #8b713f;
  border-radius: 13px;
  background: #171d2ff5;
  box-shadow: 0 14px 60px #0008, inset 0 1px #e2c58512;
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.compare-picked {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #7c663e transparent;
}
.compare-picked > strong { flex-shrink: 0; margin-right: 4px; color: #d3b16d; font-size: 11px; font-weight: 500; }
.compare-picked > span {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 5px;
  border: 1px solid #3b4559;
  border-radius: 7px;
  background: #20283b;
  color: #d4d9e5;
  font-size: 10px;
  white-space: nowrap;
}
.compare-picked img { width: 32px; height: 27px; border-radius: 4px; object-fit: cover; }
.compare-picked button { width: 28px; height: 28px; padding: 0; border-radius: 4px; color: #bcc5d8; background: transparent; font-size: 18px; }
.compare-picked button:hover { color: #f0d195; background: #3d3b3d; }
.compare-tray-actions { display: flex; align-items: center; gap: 17px; flex-shrink: 0; }
.compare-tray-actions .text-button { font-size: 11px; }
.compare-tray-actions .primary { min-height: 39px; padding: 10px 15px; font-size: 11px; white-space: nowrap; }
.compare-tray-actions .primary:disabled { cursor: default; }
.has-compare-tray footer { padding-bottom: 205px; }
/* The full chat temporarily takes priority over the floating shortlist. */
body:has(.chat:not([hidden])) .compare-tray { display: none; }

dialog.wide-dialog { max-width: 1060px; }
.comparison-table-wrap { margin: 26px 0 18px; overflow: auto; border: 1px solid #41475a; border-radius: 10px; scrollbar-color: #927442 #12182a; }
.comparison-table { width: 100%; min-width: 660px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; line-height: 1.6; }
.comparison-table th, .comparison-table td { padding: 15px; text-align: left; vertical-align: top; border-bottom: 1px solid #343b4f; border-right: 1px solid #343b4f; overflow-wrap: anywhere; }
.comparison-table th:last-child, .comparison-table td:last-child { border-right: 0; }
.comparison-table tr:last-child th, .comparison-table tr:last-child td { border-bottom: 0; }
.comparison-table thead th { background: #20263a; color: #eee7d5; font-weight: 500; }
.comparison-table thead img { display: block; width: 100%; height: 85px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.comparison-table thead th:first-child, .comparison-table tbody th { position: sticky; left: 0; z-index: 1; width: 145px; background: #191f32; color: #bfc7d8; font-weight: 500; }
.comparison-table tbody td { color: #b2bed3; background: #141b2d; }
.comparison-table tbody tr:nth-child(even) td { background: #182034; }
.comparison-table .primary { padding: 10px 13px; gap: 8px; font-size: 11px; }
.finder-results { display: grid; gap: 15px; margin: 26px 0; }
.finder-results article { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px; border: 1px solid #40465a; border-radius: 11px; background: #192034; }
.finder-results article > img { display: block; width: 100%; height: 124px; border-radius: 7px; object-fit: cover; }
.finder-results h3 { font-size: 18px; line-height: 1.3; margin-bottom: 7px; }
.finder-results p { font-size: 11px; line-height: 1.6; margin-bottom: 12px; }
.finder-results .primary { padding: 10px 13px; font-size: 11px; }

.record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #343b4f; }
.record-actions button, .record-actions a { font-size: 11px; }
.record-actions .secondary, .record-actions .primary { min-height: 36px; padding: 8px 12px; }
.bubble .message-time { display: block; margin: 6px 0 0; color: #9eacc2; font-size: 9px; line-height: 1.4; }
.bubble.visitor .message-time { color: #c1ae88; }
.chat-launch .chat-unread {
  position: absolute;
  top: -6px;
  right: 1px;
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border: 2px solid #0b0e1e;
  border-radius: 12px;
  background: #7ed0c7;
  color: #13262b;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}
.inbox-refresh-note { margin: 14px 0 20px; color: #9faec4; font-size: 11px; line-height: 1.6; }
.panel-busy { cursor: progress; }
.panel-window.panel-busy { border-color: #927640; }
.panel-busy .panel-controls button { cursor: progress; opacity: .55; }
.panel-busy .server-line .dot { background: #c8a05c !important; animation: ethera-panel-working 1.2s ease-in-out infinite; }
@keyframes ethera-panel-working { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.chat-draft-status { color: #b9ab86; font-size: 9px; line-height: 1.5; }

@media (max-width: 900px) {
  .compare-tray { gap: 14px; padding: 13px; }
  .compare-picked > strong { display: none; }
  .compare-tray-actions { gap: 12px; }
}
@media (max-width: 700px) {
  .catalog-helpers { gap: 12px; align-items: center; }
  .catalog-helpers > .text-button { max-width: 185px; font-size: 10px; }
  .shortlist-toggle { padding: 7px 10px; gap: 6px; font-size: 10px; }
  .card-save { top: 6px; right: 6px; width: 32px; height: 32px; font-size: 21px; }
  .game-card .game-art .tag { max-width: calc(100% - 48px); }
  .compare-choice { min-height: 36px; margin-top: 12px; font-size: 9px; }
  .compare-tray { bottom: 82px; width: calc(100% - 24px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .compare-tray-actions { justify-content: space-between; }
  .compare-tray-actions .primary { min-height: 36px; padding: 9px 13px; }
  .compare-picked { padding-bottom: 3px; }
  .compare-picked img { width: 28px; height: 24px; }
  .has-compare-tray footer { padding-bottom: 255px; }
  .comparison-table { min-width: 630px; font-size: 11px; }
  .comparison-table th, .comparison-table td { padding: 12px; }
  .comparison-table thead th:first-child, .comparison-table tbody th { width: 115px; }
}
@media (max-width: 420px) {
  .finder-results article { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .finder-results article > img { height: auto; aspect-ratio: 460 / 215; }
  .finder-results h3 { font-size: 17px; }
  .catalog-helpers > .text-button { max-width: 145px; }
}

/* Preserve hidden controls and trays regardless of component display rules. */
[hidden] { display: none !important; }

/* Prepared support briefs keep their line breaks and remain editable. */
.chat-input { align-items: end; }
.chat-input textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 120px; resize: none; overflow-y: auto; padding: 11px 12px; font-size: 12px; line-height: 1.5; border-radius: 7px; }
#chat-keyboard-hint { display: block; font-size: 9px; color: #8b98b0; margin: 8px 0 3px; }
#chat-status { display: block; }
.featured-controls { flex-wrap: wrap; }
.featured-size select { max-width: 180px; }
