/* Approved phone composition, scoped away from desktop and admin. */
.mobile-control, .mobile-brand, .mobile-desktop-guidance, .mobile-scrim { display: none; }
@media (max-width: 900px) {
  html[data-shell="refined"] body:not(.admin-page) .mobile-control { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); cursor: pointer; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none; margin-right: auto; }
  html[data-shell="refined"] body:not(.admin-page) .rfd-toolbar__left { gap: 8px; }
  html[data-shell="refined"] body:not(.admin-page) :is(.rfd-mobile-tools, [data-mobile-search-close], .rfd-searchbox:not(.mobile-search-open)) { display: none !important; }
  html[data-shell="refined"] body:not(.admin-page) .rfd-sidebar .rfd-nav [data-page="home"],
  html[data-shell="refined"] body:not(.admin-page) .rfd-sidebar .rfd-nav [data-page="agent-hotel"],
  html[data-shell="refined"] body:not(.admin-page) .rfd-sidebar .rfd-nav [data-page="skills"] { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .rfd-sidebar { z-index: 151; }
  /* Only colours ease inside the More sheet. With reduced motion every element gets a 0.01 ms transition of all
     properties (prompt-library.css), and an inherited visibility would then still be hidden when More moves focus into
     the sheet, leaving focus on More. Admin's sheet does the same (admin-shell.css). */
  html[data-shell="refined"] body:not(.admin-page) .rfd-sidebar * { transition-property: color, background-color, border-color; }
  html[data-shell="refined"] body:not(.admin-page) [data-mobile-more-close] { float: right; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 150; background: rgba(33,34,36,.35); }
  html[data-shell="refined"] body:not(.admin-page) .hub-page :is(.agent-hotel-grid, .skills-list, .apps-grid, .howto-grid) { grid-template-columns: repeat(auto-fill, minmax(min(272px, 100%), 1fr)); gap: 12px; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.agent-hotel-card--empty):not(.mobile-sheet-open) { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 6px 12px; padding: 16px; min-height: 112px; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__header { grid-column: 1; grid-row: 1 / 4; display: block; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__logo { width: 40px; height: 40px; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) :is(.agent-hotel-card__title, .agent-hotel-card__description, .agent-hotel-card__availability) { grid-column: 2; margin: 0; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__title { font-size: 15px; padding-right: 16px; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__description { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) :is(.agent-hotel-card__footer, .agent-hotel-card__evidence, .agent-hotel-card__governance, .agent-hotel-card__prompts, .agent-hotel-card__details, .agent-access-card, [data-agent-launch-restriction], [data-mobile-agent-close], .agent-hotel-card__badges) { display: none; }
  html[data-shell="refined"] body:not(.admin-page) [data-mobile-agent-open] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 3; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:has([data-mobile-agent-open]:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open { position: fixed !important; inset: auto 0 0 !important; width: auto; max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain; z-index: 151 !important; border-radius: 18px 18px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom,0px)); display: flex; flex-direction: column; gap: 16px; background: var(--surface); color: var(--text); box-shadow: 0 -12px 40px #21222424; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open [data-mobile-agent-open] { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open [data-mobile-agent-close] { align-self: flex-end; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open .agent-hotel-card__launch::after { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open .agent-hotel-card__footer { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom,0px)); padding: 12px 0 calc(12px + env(safe-area-inset-bottom,0px)); background: var(--surface); z-index: 1; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open .agent-hotel-card__info-btn { pointer-events: none; display: contents; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open .agent-hotel-card__info-icon { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open .agent-hotel-card__info-tooltip { position: static; display: block; visibility: visible; opacity: 1; transform: none; width: 100%; background: transparent; color: var(--text2); box-shadow: none; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-search-open { position: fixed; inset: 0; z-index: 151; width: 100%; padding: max(12px, env(safe-area-inset-top,0px)) 16px max(16px, env(safe-area-inset-bottom,0px)); display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
  html[data-shell="refined"] body:not(.admin-page) .mobile-search-open [data-mobile-search-close] { display: inline-flex !important; align-self: flex-end; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-search-open .rfd-searchresults { position: static; width: 100%; max-height: none; min-height: 0; flex: 1; overflow-y: auto; box-shadow: none; border: 0; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-desktop-guidance { display: block; color: var(--text2); font-size: 13px; }
  html[data-shell="refined"] body:not(.admin-page) :is([data-skills-submit], [data-use-case-submit]) { display: none; }
  html[data-shell="refined"] body:not(.admin-page) :is(.agent-hotel-card__description, .agent-hotel-card__availability, .agent-hotel-card__vendor) { color: var(--text2); }
  html[data-shell="refined"] body:not(.admin-page) :is(button, a, input, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
}
@media (max-width: 900px) {
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__header { display: contents; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__logo { grid-column: 1; grid-row: 1 / 4; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__badges { display: flex; grid-column: 2; grid-row: 2; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__source { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__title { grid-row: 1; }
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) .agent-hotel-card__description { grid-row: 3; }
  html[data-shell="refined"] body:not(.admin-page) [data-skill-submit-scroll] { display: none; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open[hidden] { display: none; }
}
@media (max-width: 900px) {
  html[data-shell="refined"] body:not(.admin-page) .agent-hotel-card:not(.catalog-v4-card):not(.mobile-sheet-open) > p.visually-hidden { position: static; width: auto; height: auto; margin: 0; clip: auto; clip-path: none; white-space: normal; grid-column: 2; font-size: 12px; color: var(--text2); }
  html[data-shell="refined"] body:not(.admin-page) [data-mobile-view-help] summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
}
@media (max-width: 900px) {
  html[data-shell="refined"] body:not(.admin-page) .rfd-toolbar:has(.mobile-search-open) { z-index: 151; }
  html[data-shell="refined"] body:not(.admin-page).mobile-overlay-open #main-content { overflow: hidden; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-sheet-open:hover { transform: none; }
}
@media (max-width: 900px) {
  html[data-shell="refined"] body:not(.admin-page) { --text3: var(--text2); }
  html[data-shell="refined"] body:not(.admin-page) .mobile-search-open .rfd-search { flex: 0 0 auto; width: 100%; min-height: 48px; height: auto; }
  html[data-shell="refined"] body:not(.admin-page) .mobile-search-open .rfd-search input { min-width: 0; width: 100%; }
}
