.openrouter-page .ai-page-intro { padding-bottom: 25px; }
.openrouter-header { align-items: flex-start; }
.openrouter-avatar { font-size: 21px; font-weight: 700; }
.model-controls { display: flex; align-items: center; gap: 9px; min-width: min(62%, 620px); }
.model-controls label { color: var(--muted); font: 500 10px/1 Calibri, "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.model-controls select { min-width: 0; flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 30px 0 11px; color: var(--ink); background: #fff; font-size: 11px; outline: 0; }
.model-picker-button { display: inline-flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 10px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font: 600 11px/1 Calibri, "Segoe UI", system-ui, sans-serif; text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.model-picker-button:hover, .model-picker-button[aria-expanded="true"] { border-color: var(--gold-deep); background: #fffdf5; }
.model-picker-button:focus-visible { outline: 3px solid rgba(155, 108, 23, .2); outline-offset: 2px; }
.model-picker-button:disabled { color: #999b91; background: #f5f5f0; cursor: not-allowed; }
.model-picker-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-picker-icon { flex: 0 0 auto; color: var(--muted); font-size: 15px; line-height: 1; }
.model-controls select:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(155, 108, 23, .12); }
.model-controls select:disabled { color: #999b91; background: #f5f5f0; }
.model-controls .model-buy-button { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.model-controls .model-buy-button:hover { background: #2b2d27; }
.model-controls .model-buy-button:disabled { background: #73756d; color: #fff; cursor: not-allowed; opacity: .82; }
.model-info { min-height: 36px; padding: 10px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px/1.5 Calibri, "Segoe UI", system-ui, sans-serif; }
.model-library { padding: 10px 24px 11px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfbf7 0%, #f5f5ef 100%); }
.model-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.model-library-heading .eyebrow { margin: 0 0 4px; }
.model-library-heading h2 { margin: 0; color: var(--ink); font: 600 15px/1.15 Calibri, "Segoe UI", system-ui, sans-serif; }
.model-library-count { color: var(--muted); font: 600 10px/1 Calibri, "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.model-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; max-height: 185px; overflow-y: auto; padding: 1px 4px 1px 2px; scrollbar-color: #bfc0b7 transparent; }
.model-card-grid[hidden] { display: none; }
.model-card { display: flex; min-height: 0; flex-direction: column; align-items: stretch; gap: 3px; padding: 6px 8px; border: 1px solid #dedfd6; border-radius: 7px; background: rgba(255, 255, 252, .82); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.model-card:hover { border-color: #b6b7ad; background: #fff; box-shadow: 0 8px 18px rgba(16, 17, 15, .08); }
.model-card:focus-visible { outline: 3px solid rgba(155, 108, 23, .28); outline-offset: 2px; }
.model-card.is-selected { border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(155, 108, 23, .14), 0 8px 18px rgba(16, 17, 15, .07); background: #fffdf5; }
.model-card-top, .model-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-card-position { color: #8d8f86; font: 700 7px/1 Calibri, "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; }
.model-card-name { display: block; overflow: hidden; color: var(--ink); font: 600 10px/1.2 Calibri, "Segoe UI", system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.model-card-description, .model-card-bottom { display: none; }
.model-card-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 5px; font: 700 7px/1 Calibri, "Segoe UI", system-ui, sans-serif; letter-spacing: .03em; white-space: nowrap; }
.model-card-badge.free { background: #e2f0e4; color: #35643c; }
.model-card-badge.paid { background: #f3ead3; color: #7b5b16; }
.model-card-badge.owned { background: #e7e9e1; color: #4c5148; }
.model-card-empty { grid-column: 1 / -1; padding: 20px; border: 1px dashed #c9cac0; border-radius: 10px; color: var(--muted); text-align: center; font-size: 11px; }

@media (max-width: 780px) {
  .openrouter-header { gap: 15px; }
  .model-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; width: 100%; min-width: 0; gap: 7px; }
  .model-controls label { display: none; }
  .model-controls .model-picker-button { grid-column: 1 / -1; width: 100%; }
  .model-controls .text-button { min-height: 34px; padding-inline: 4px; font-size: 10px; white-space: nowrap; }
  .model-controls .model-buy-button { min-height: 34px; padding-inline: 9px; font-size: 10px; }
  .model-info { min-height: 34px; padding: 9px 15px; line-height: 1.4; }
  .model-library { padding: 9px 15px 10px; }
  .model-library-heading { align-items: flex-start; }
  .model-library-heading h2 { font-size: 14px; }
  .model-library-count { font-size: 9px; }
  .model-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 210px; }
}

@media (max-width: 480px) {
  .model-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 230px; }
}
