/* Resource detail: the approved mobile layout, with the existing desktop sidebar. */
.resource-page { min-width: 0; }
.resource-desktop-only { display: none; }
.resource-page .resource-title-section {
  display: block;
  padding: 0 0 18px;
  margin-bottom: 22px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.resource-prefix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 7px 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.resource-prefix-row .resource-title-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.resource-price-prefix { background: #1b4937; color: #c3f3dc; border-radius: 5px; padding: 2px 9px; font-size: 14px; font-weight: 600; }
.resource-price-prefix.is-paid { background: #443a26; color: #ebd29a; }
.resource-version-label { color: var(--muted); font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.resource-title-identity { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 20px; row-gap: 7px; align-items: start; }
.resource-title-identity > .resource-icon { grid-column: 1; grid-row: 1 / 4; width: 88px; height: 88px; border-radius: 9px; }
.resource-page .resource-title-identity h1 { grid-column: 2; font-size: 32px; line-height: 1.2; letter-spacing: -.4px; margin: 0; overflow-wrap: anywhere; }
.resource-page .resource-title-identity > .resource-summary { grid-column: 2; margin: 0; font-size: 16px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.resource-page .resource-title-meta { grid-column: 2; gap: 8px; margin: 0; font-size: 14px; line-height: 1.5; min-width: 0; }
.resource-title-meta .avatar { width: 26px; height: 26px; flex: 0 0 26px; font-size: 10px; }
.resource-title-meta .user-link { overflow-wrap: anywhere; }
.resource-updated { color: var(--muted); }
.resource-statistics { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-top: 17px; min-height: 44px; }
.resource-rating-link, .resource-download-count { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 15px; }
.resource-rating-link { padding: 0 18px 0 0; color: var(--text); text-align: left; }
.resource-rating-link > svg { color: #e8bd5b; flex-shrink: 0; }
.resource-rating-link > span { color: var(--muted); font-size: 14px; }
.resource-download-count { color: var(--muted); padding-left: 18px; border-left: 1px solid var(--border); }
.resource-statistics b { font-variant-numeric: tabular-nums; font-weight: 600; }
/* Desktop: flexible content + 300px sidebar + 24px gutter. Mobile: one full-width column. */
.resource-page .resource-detail-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: 'content download' 'content sidebar'; grid-template-rows: auto 1fr; gap: 20px 24px; align-items: start; }
.resource-content { grid-area: content; min-width: 0; }
.resource-download-section { grid-area: download; min-width: 0; }
.resource-page .resource-aside { grid-area: sidebar; min-width: 0; padding-top: 0; gap: 16px; }
.resource-compatibility { padding: 17px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
.resource-compatibility h2 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 0 0 15px; }
.resource-compatibility dl { margin: 0; display: grid; gap: 13px; font-size: 14px; }
.resource-compatibility dl > div { display: grid; grid-template-columns: 85px minmax(0, 1fr); align-items: start; gap: 10px; }
.resource-compatibility dt { padding-top: 4px; color: var(--muted); }
.resource-compatibility dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; min-width: 0; }
.resource-compatibility-chip { display: inline-block; max-width: 100%; padding: 3px 8px; line-height: 1.5; border: 1px solid #484e58; border-radius: 5px; overflow-wrap: anywhere; }
.resource-download-offer { margin-top: 16px; }
.resource-page .resource-download-section .download-button { min-height: 50px; font-size: 16px; padding: 12px 14px; border-radius: 7px; background: #218d63; border-color: #218d63; }
.resource-page .download-caption { font-size: 13px; text-align: center; overflow-wrap: anywhere; color: var(--muted); margin: 9px 0 0; }
.resource-download-unavailable { display: flex; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--muted); }
.resource-download-unavailable > svg { flex: 0 0 auto; }
.resource-download-unavailable p { margin: 0; font-size: 14px; }
.resource-page .resource-saving { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; border: 0; padding: 0; margin-top: 16px; }
.resource-page .resource-saving > button { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 46px; padding: 8px; border: 1px solid #484e58; border-radius: 7px; color: var(--text); font-size: 14px; }
.resource-page .resource-saving > button.active { color: var(--green); border-color: var(--green); }
.resource-page .resource-saving > button > svg { flex-shrink: 0; }
.resource-page .resource-saving > button:disabled { opacity: .6; }
.resource-page .detail-tabs { padding: 0; background: transparent; gap: 25px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.resource-page .detail-tabs::-webkit-scrollbar { display: none; }
.resource-page .detail-tabs > button { min-height: 50px; flex: 0 0 auto; padding: 12px 4px; white-space: nowrap; font-size: 15px; }
.resource-page .detail-tabs > button.active { color: var(--text); border-bottom-color: var(--green); font-weight: 600; }
.resource-page .detail-panel { padding: 22px; min-height: 220px; margin-top: 18px; border: 1px solid var(--border); border-radius: 9px; }
.resource-gallery { min-width: 0; margin-bottom: 22px; }
.resource-gallery-track { position: relative; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0; scrollbar-width: thin; border-radius: 7px; }
.resource-gallery-slide { flex: 0 0 94%; display: flex; justify-content: center; align-items: center; min-width: 0; aspect-ratio: 16 / 9; scroll-snap-align: start; background: var(--input); border-radius: 7px; overflow: hidden; }
.resource-gallery-slide:only-child { flex-basis: 100%; }
.resource-gallery-slide > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.resource-gallery-dots { display: flex; justify-content: center; align-items: center; }
.resource-gallery-dots > button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; }
.resource-gallery-dots > button > span { width: 7px; height: 7px; border-radius: 50%; background: #6c737f; }
.resource-gallery-dots > button[aria-pressed=true] > span { background: var(--green); }
.resource-information { padding: 18px; }
.resource-page .resource-information .resource-facts { margin: 0; display: block; font-size: 14px; }
.resource-page .resource-information .resource-facts > div { display: flex; flex-direction: row; justify-content: space-between; }
.resource-page .resource-information .resource-facts dd { text-align: right; max-width: none; }
.resource-information .dependencies { margin-top: 18px; overflow-wrap: anywhere; }
.resource-follow-button { margin-top: 16px; min-height: 44px; }
.resource-follow-button[aria-pressed=true] { color: var(--green); }
.resource-page :is(button, .button, [role=tab]) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.resource-page :is(button, a, [role=tabpanel]):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.resource-page :is(button, .button):active { opacity: .8; }
.resource-page :is(input, textarea, select) { font-size: 16px; }
.resource-page .version-row-bottom { flex-wrap: wrap; gap: 12px; }
.resource-page .version-row-bottom > span { min-width: 0; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .resource-page .resource-saving > button:hover { background: var(--panel-raised); }
  .resource-page .resource-download-section .download-button:hover { background: #25a171; border-color: #25a171; }
}
@media (max-width: 1000px) {
  .resource-page .resource-detail-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
  .resource-compatibility { padding: 14px; }
  .resource-compatibility dl > div { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 760px) {
  .resource-page .breadcrumbs { font-size: 13px; margin-bottom: 16px; }
  .resource-page .resource-detail-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'download' 'content' 'sidebar'; grid-template-rows: auto; gap: 24px; }
  .resource-page .resource-title-section { margin-bottom: 18px; padding-bottom: 12px; }
  .resource-prefix-row { margin-bottom: 18px; padding: 6px 9px; gap: 12px; }
  .resource-price-prefix { font-size: 13px; }
  .resource-version-label { font-size: 13px; }
  .resource-title-identity { grid-template-columns: 72px minmax(0, 1fr); column-gap: 13px; row-gap: 8px; }
  .resource-title-identity > .resource-icon { width: 72px; height: 72px; grid-row: 1 / 3; }
  .resource-page .resource-title-identity h1 { font-size: 27px; line-height: 1.2; }
  .resource-page .resource-title-identity > .resource-summary { font-size: 15px; }
  .resource-page .resource-title-meta { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; gap: 7px; }
  .resource-title-meta .avatar { width: 25px; height: 25px; flex-basis: 25px; }
  .resource-statistics { margin-top: 9px; }
  .resource-compatibility { padding: 15px; }
  .resource-compatibility dl > div { grid-template-columns: 85px minmax(0, 1fr); gap: 10px; }
  .resource-page .detail-tabs { gap: 22px; }
  .resource-page .detail-tabs > button { font-size: 14px; }
  .resource-page .detail-panel { padding: 16px; }
  .resource-gallery { margin: -1px -1px 18px; }
  .resource-page .resource-description { font-size: 16px; line-height: 1.75; }
  .resource-page .resource-aside { gap: 16px; }
}
@media (max-width: 360px) {
  .resource-title-identity { grid-template-columns: 60px minmax(0, 1fr); column-gap: 11px; }
  .resource-title-identity > .resource-icon { width: 60px; height: 60px; }
  .resource-page .resource-title-identity h1 { font-size: 24px; }
  .resource-page .resource-saving > button { gap: 5px; font-size: 13px; }
  .resource-compatibility dl > div { grid-template-columns: 78px minmax(0, 1fr); gap: 7px; }
  .resource-page .detail-panel { padding: 13px; }
}

/* The compact desktop resource view follows the supplied forum reference.
   Mobile keeps the approved stacked layout above; desktop uses 1 flexible column + a 240px facts rail. */
@media (min-width: 1001px) {
  .resource-page { display: flex; flex-direction: column; max-width: 1280px; margin: 0 auto; --resource-accent: var(--green); }
  .resource-page .resource-desktop-only { display: block; }
  .resource-page .resource-mobile-only { display: none; }
  .resource-page > .resource-title-section {
    order: 1; position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr);
    gap: 5px 13px; padding: 0 185px 0 0; margin: 0 0 17px; border: 0; min-height: 76px;
  }
  .resource-page .resource-prefix-row, .resource-page .resource-title-identity { display: contents; }
  .resource-page .resource-title-flags { display: none; grid-column: 2; gap: 6px; }
  .resource-page .resource-title-flags.has-status { display: flex; }
  .resource-page .resource-price-prefix, .resource-page .resource-version-label { display: none; }
  .resource-page .resource-title-identity > .resource-icon { grid-column: 1; grid-row: 1 / 4; width: 46px; height: 46px; border-radius: 6px; }
  .resource-page .resource-title-identity > .resource-icon svg { width: 27px; height: 27px; }
  .resource-page .resource-title-identity h1 {
    grid-column: 2; grid-row: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px;
    font-size: 22px; line-height: 1.35; letter-spacing: 0; font-weight: 600;
  }
  .resource-page .resource-category-prefix { display: inline-flex; align-self: center; padding: 2px 7px; background: #246b9b; color: #fff; border-radius: 3px; font-size: 12px; font-weight: 500; line-height: 1.5; }
  .resource-page .resource-heading-version { display: inline; font-size: 16px; font-weight: 400; color: var(--muted); }
  .resource-page .resource-title-identity > .resource-summary { grid-row: 2; font-size: 14px; line-height: 1.4; }
  .resource-page .resource-title-meta { grid-row: 3; font-size: 12px; gap: 7px; line-height: 1.6; }
  .resource-page .resource-title-meta .avatar { width: 17px; height: 17px; flex-basis: 17px; font-size: 8px; }
  .resource-page .resource-header-tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
  .resource-header-tags > a { display: inline-block; padding: 1px 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 2px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
  .resource-page .resource-statistics { display: none; }
  .resource-page .resource-desktop-download { display: block; position: absolute; top: 0; right: 0; max-width: 175px; }
  .resource-page .resource-desktop-download .button { display: inline-flex; min-height: 50px; padding: 12px 14px; gap: 7px; border-radius: 7px; font-size: 16px; }
  .resource-page .resource-desktop-download .download-button { background: #218d63; border-color: #218d63; color: #fff; font-weight: 700; }
  .resource-page > .breadcrumbs { order: 2; margin: 0 0 11px; font-size: 12px; line-height: 1.6; }
  .resource-page > .notice { order: 2; margin-bottom: 15px; }
  .resource-page .resource-detail-grid { order: 3; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: 'tabs tabs' 'actions actions' 'panel sidebar'; grid-template-rows: auto auto 1fr; gap: 0; }
  .resource-page .resource-content, .resource-page .resource-download-section { display: contents; }
  .resource-page .resource-download-section > .resource-compatibility, .resource-page .resource-download-offer { display: none; }
  .resource-page .detail-tabs { grid-area: tabs; gap: 25px; padding: 0 10px; margin: 0; border-radius: 0; border-bottom: 1px solid var(--border); }
  .resource-page .detail-tabs > button { min-height: 50px; padding: 12px 4px; font-size: 15px; }
  .resource-page .detail-tabs > button.active { color: var(--text); border-bottom-color: var(--green); }
  .resource-page .resource-saving { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin: 0; padding: 9px 0; }
  .resource-page .resource-saving > button { display: inline-flex; flex: 0 1 auto; width: auto; }
  .resource-page .detail-panel { grid-area: panel; min-width: 0; padding: 18px; margin: 0; border: 0; border-radius: 0; min-height: 470px; background: var(--panel); }
  .resource-page .resource-panel-description { display: flex; flex-direction: column; }
  .resource-page .resource-desktop-compatibility { display: block; order: 1; padding: 0 0 14px; margin: 0 0 16px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
  .resource-page .resource-desktop-compatibility h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .resource-page .resource-desktop-compatibility dl { gap: 6px; font-size: 13px; }
  .resource-page .resource-desktop-compatibility dl > div { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
  .resource-page .resource-desktop-compatibility dt { padding: 0; }
  .resource-page .resource-desktop-compatibility dd { gap: 0 5px; }
  .resource-page .resource-desktop-compatibility .resource-compatibility-chip { padding: 0; border: 0; font-weight: 500; line-height: 1.6; }
  .resource-page .resource-desktop-compatibility .resource-compatibility-chip:not(:last-child)::after { content: ','; }
  .resource-page .resource-description { order: 3; font-size: 16px; line-height: 1.75; }
  .resource-page .resource-description > :first-child { margin-top: 0; }
  .resource-page .resource-gallery { order: 2; margin: 0 0 20px; }
  .resource-page .resource-gallery-track { scrollbar-width: none; }
  .resource-page .resource-gallery-track::-webkit-scrollbar { display: none; }
  .resource-page .resource-gallery-slide { flex-basis: 100%; max-height: 380px; aspect-ratio: 2.2; }
  .resource-page .resource-gallery-slide:only-child { flex-basis: 100%; }
  .resource-page .detail-panel > .tags { display: none; }
  .resource-page .resource-aside { grid-area: sidebar; align-self: stretch; gap: 12px; padding: 15px 13px; border-left: 1px solid var(--border); background: var(--panel); }
  .resource-page .resource-aside > .panel { border: 0; border-radius: 0; padding: 0; background: transparent; }
  .resource-page .resource-information .resource-facts { display: flex; flex-direction: column; gap: 7px; }
  .resource-page .resource-information .resource-facts > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; font-size: 12px; line-height: 1.5; }
  .resource-page .resource-information .resource-facts dd { margin: 0; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
  .resource-page .resource-information .resource-facts .user-link { color: var(--resource-accent); }
  .resource-page .resource-information .resource-facts .stars { justify-content: flex-end; gap: 4px; font-size: 12px; }
  .resource-page .resource-information .dependencies { margin-top: 14px; font-size: 12px; line-height: 1.6; }
  .resource-page .resource-information > .resource-follow-button { display: none; }
  .resource-page .resource-discuss-button { display: flex; justify-content: center; margin-top: 18px; }
  .resource-page .author-panel > .eyebrow, .resource-page .author-panel > div { display: none; } /* taste-skill-ignore: hides the old author heading in the compact desktop rail. */
  .resource-page .author-panel > .button { margin: 0; }
  .resource-page .author-tools { border-top: 1px solid var(--border) !important; padding-top: 13px !important; }
  .resource-page .author-tools h3 { font-size: 13px; margin-bottom: 10px; }
  .resource-page .author-tools .quiet-button { font-size: 12px; line-height: 1.5; }
  .resource-page.has-paid-offer .resource-detail-grid { grid-template-areas: 'tabs tabs' 'actions actions' 'panel offer' 'panel sidebar'; grid-template-rows: auto auto auto 1fr; }
  .resource-page.has-paid-offer .resource-download-offer { display: block; grid-area: offer; margin: 0; padding: 15px 13px; border-left: 1px solid var(--border); background: var(--panel); }
  .resource-page.has-paid-offer .paid-resource-offer { margin: 0; }
}
@media (min-width: 1001px) and (hover: hover) and (pointer: fine) {
  .resource-page .resource-desktop-download .download-button:hover { background: #25a171; border-color: #25a171; color: #fff; }
}
@media (max-width: 1000px) {
  .resource-page .resource-desktop-only { display: none !important; }
}

/* Catalogue rows: the requested free/paid resource presentation. */
.resource-row {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding: 17px 18px;
  min-height: 108px;
}
.resource-row .resource-row-thumb { position: relative; display: block; width: 54px; margin-top: 1px; line-height: 0; }
.resource-row .resource-row-thumb > .resource-icon { width: 54px; height: 54px; border-radius: 7px; }
.resource-row .resource-row-thumb > .resource-row-author-avatar {
  position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px;
  border: 2px solid var(--panel); border-radius: 50%; font-size: 8px; line-height: 1;
}
.resource-row .resource-row-thumb > .resource-row-author-avatar > img { border-radius: 50%; }
.resource-row .resource-row-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
.resource-row .resource-row-title > .resource-row-category,
.resource-row .resource-row-paid-label { display: inline-flex; align-items: center; align-self: center; flex: 0 0 auto; padding: 1px 6px; border-radius: 3px; font-size: 12px; line-height: 1.5; font-weight: 500; }
.resource-row .resource-row-title > .resource-row-category { background: #246b9b; color: #fff; }
.resource-row .resource-row-paid-label { background: #b72f3b; color: #fff; }
.resource-row .resource-row-title > .resource-row-name { min-width: 0; color: var(--text); font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.resource-row .resource-row-name > .version-tag { margin: 0; padding: 0; background: transparent; border: 0; color: var(--muted); font-size: 14px; font-weight: 400; white-space: normal; }
.resource-row .resource-row-price-line { margin: 2px 0; line-height: 1.5; }
.resource-row .resource-row-price { display: inline-block; padding: 1px 6px; border-radius: 3px; background: #f1a52b; color: #191b1f; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.resource-row .resource-row-meta { gap: 4px; margin-top: 2px; font-size: 12px; line-height: 1.6; }
.resource-row .resource-row-meta .user-link { font-size: 12px; }
.resource-row .resource-row-summary { margin: 4px 0 0; color: var(--text); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.resource-row .resource-row-stats { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 5px 13px; margin-top: 8px; text-align: left; color: var(--muted); font-size: 12px; line-height: 1.5; }
.resource-row .resource-row-stats > span { min-width: 0; overflow-wrap: anywhere; }
.resource-row .resource-row-stats .stars { font-size: 12px; }
.resource-row .resource-row-stats .compatibility { display: block; }
.resource-row .resource-row-platform { display: block; }
.resource-row .resource-row-thumb:focus-visible, .resource-row .resource-row-title > a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .resource-row .resource-row-title > .resource-row-name:hover { color: var(--green); }
  .resource-row .resource-row-title > .resource-row-category:hover { background: #2a7aad; color: #fff; }
}
@media (max-width: 640px) {
  .resource-row { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 15px 13px; }
  .resource-row .resource-row-thumb, .resource-row .resource-row-thumb > .resource-icon { width: 46px; height: 46px; }
  .resource-row .resource-row-thumb > .resource-row-author-avatar { width: 20px; height: 20px; right: -4px; bottom: -4px; font-size: 7px; }
  .resource-row .resource-row-title, .resource-row .resource-row-title > .resource-row-name { font-size: 15px; }
  .resource-row .resource-row-name > .version-tag { font-size: 13px; }
  .resource-row .resource-row-stats { gap: 5px 10px; }
}
