#casing.sales-material-page { padding: 22px 39px 40px; }
.s-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.s-news-layout.s-news-solo { grid-template-columns: minmax(0, 1fr); }
.s-news-sidebar #sidebar { box-sizing: border-box; float: none; width: 100%; padding: 0; }
.s-material { min-width: 0; color: #102b23; }
.s-material-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3275fr) minmax(0, .7125fr);
  gap: clamp(16px, 2.4vw, 30px);
  padding: clamp(16px, 2.3vw, 28px);
  background: #fcfffd;
  border: 1px solid #d0e2d8;
  border-radius: 21px;
}
.s-material-identity { display: flex; align-items: center; gap: 16px; }
.s-material-identity > div { min-width: 0; }
.s-material-identity .s-material-icon { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 22%; }
.s-material-identity h1 {
  margin: 0;
  font: 760 clamp(1.8rem, 3.05vw, 2.65rem)/1.02 "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.058em;
  overflow-wrap: anywhere;
}
.s-material-identity p, .s-material-about p { margin: 8px 0 0; color: #405c52; line-height: 1.5; }
.s-material-about { margin-top: 21px; }
.s-material-about p { white-space: pre-line; }
.s-material h2 { margin: 0; color: #102b23; font: 700 1.15rem/1.24 "Segoe UI", system-ui, sans-serif; letter-spacing: -.02em; }
.s-material-price-panel {
  min-width: 0;
  padding: 14px 15px;
  background: #e4f2ea;
  border-radius: 14px;
}
.s-material-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.s-material-price strong { font: 750 clamp(2rem, 3.5vw, 3.4rem)/1 "Segoe UI", system-ui, sans-serif; letter-spacing: -.06em; }
.s-material-price del { color: #486258; white-space: nowrap; }
.s-material-off { border-radius: 7px; color: #086249; background: #fcfffd; padding: 3px 7px; font-weight: 700; white-space: nowrap; }
.s-material-buy {
  display: block;
  margin-top: 10px;
  padding: 11px 8px;
  border-radius: 10px;
  background: #086249;
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
}
#casing .s-material-buy:is(:link, :visited) { color: white; }
#casing .s-material-buy:hover, #casing .s-material-buy:focus-visible { color: white; background: #064e3a; }
.s-material-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid #badace; }
.s-material-history table { width: 100%; margin-top: 5px; border-collapse: separate; border-spacing: 0 3px; font-size: .9rem; }
.s-material-history th, .s-material-history td { padding: 8px; line-height: 1.35; }
.s-material-history th { text-align: left; font-weight: 400; color: #405c52; }
.s-material-history td { text-align: right; font-weight: 700; }
.s-material-latest tr:first-child > * { background: #d0ebdd; color: #154b38; }
.s-material-latest tr:first-child th { border-radius: 7px 0 0 7px; }
.s-material-latest tr:first-child td { border-radius: 0 7px 7px 0; }
.s-material-history summary { color: #086249; cursor: pointer; font-size: .875rem; }
.s-material-check { margin: 8px 0 0; color: #405c52; font-size: .875rem; }
.s-material-gallery { margin-top: 20px; }
.s-material-gallery > .s-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.s-gallery-grid a { display: block; min-width: 0; }
.s-gallery-grid img { display: block; width: 100%; height: auto; border-radius: 10px; }
.s-material .s-h2 { margin-top: 24px; }

@media (max-width: 1100px) {
  .s-news-layout { gap: 22px; grid-template-columns: minmax(0, 1fr) 280px; }
  #casing.sales-material-page { padding-inline: 24px; }
}
@media (max-width: 980px) {
  .s-news-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  #casing.sales-material-page { padding-inline: 12px; }
  .s-material-card { grid-template-columns: minmax(0, 1fr); }
  .s-material-identity .s-material-icon { width: 58px; height: 58px; flex-basis: 58px; }
  .s-material-gallery > .s-gallery-grid {
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 5px;
  }
}

.s-material-preview, .s-material-official { margin-top: 22px; }
.s-material-preview-frame {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 12px;
  background: #102b23;
}
.s-material-preview video {
  display: block;
  width: 100%;
  aspect-ratio: var(--preview-ratio, 16 / 9);
  max-height: 74vh;
}
.s-material-preview-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background: #102b2333;
  cursor: pointer;
}
.s-material-preview-play span {
  padding: 10px 18px;
  border-radius: 999px;
  background: #086249;
  color: white;
  font: 700 .95rem/1.3 "Segoe UI", system-ui, sans-serif;
}
.s-material-preview-play:hover span { background: #064e3a; }
.s-material-preview-play:focus-visible { outline: 3px solid white; outline-offset: -5px; }
.s-material-preview-play[hidden] { display: none; }
.s-material-preview p { margin: 6px 0 0; color: #405c52; font-size: .875rem; }
.s-material-preview [role="status"]:empty { display: none; }
.s-material-official h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.s-material-official h2::after { content: ""; flex: 1; height: 1px; background: #d0e2d8; }
.s-material-official p { margin: 12px 0 0; color: #405c52; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.s-gallery-grid a { overflow: hidden; border-radius: 10px; }
.s-gallery-grid img { transition: transform .2s ease, filter .2s ease; }
@media (hover: hover) {
  .s-gallery-grid a:hover img { transform: scale(1.035); filter: brightness(.88); }
}
html:has(.s-gallery-dialog[open]) { overflow: hidden; }
.s-gallery-dialog {
  box-sizing: border-box;
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #506057;
  border-radius: 18px;
  background: #13231e;
  color: #f5faf7;
  box-shadow: 0 24px 90px #0009;
  font: 500 1rem/1.35 "Segoe UI", system-ui, sans-serif;
}
.s-gallery-dialog::backdrop { background: #07100de0; backdrop-filter: blur(7px); }
.s-gallery-viewer { padding: 14px clamp(12px, 2.2vw, 24px); }
.s-gallery-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.s-gallery-toolbar p { display: flex; gap: 10px; align-items: center; margin: 0; font-weight: 700; }
.s-gallery-count { border-radius: 20px; padding: 3px 8px; background: #ffffff16; font-size: .85rem; font-weight: 600; color: #cfe5d9; }
.s-gallery-dialog button { cursor: pointer; }
.s-gallery-dialog button:focus-visible { outline: 2px solid #8ae3b4; outline-offset: 3px; }
.s-gallery-close, .s-gallery-prev, .s-gallery-next {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 1px solid #ffffff39;
  border-radius: 50%;
  background: #10251de8;
  color: #fff;
  font: 400 1.85rem/1 "Segoe UI", system-ui, sans-serif;
}
.s-gallery-close:hover, .s-gallery-prev:hover, .s-gallery-next:hover { background: #24523d; }
.s-gallery-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  grid-template-areas: "previous image next" ". caption .";
  align-items: center;
  gap: 8px 10px;
  margin: 11px 0;
}
.s-gallery-stage img {
  grid-area: image;
  display: block;
  width: 100%;
  max-height: min(64dvh, 630px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0a1411;
  border-radius: 10px;
  touch-action: pan-y pinch-zoom;
}
.s-gallery-prev { grid-area: previous; }
.s-gallery-next { grid-area: next; }
.s-gallery-stage figcaption { grid-area: caption; text-align: center; color: #d6e7df; font-size: .9rem; }
.s-gallery-thumbs { display: flex; justify-content: center; gap: 8px; padding: 3px 0; }
.s-gallery-thumbs button { width: clamp(54px, 12vw, 102px); padding: 2px; border: 2px solid transparent; border-radius: 8px; background: transparent; }
.s-gallery-thumbs button:not([aria-pressed="true"]) { opacity: .64; }
.s-gallery-thumbs button:hover, .s-gallery-thumbs button[aria-pressed="true"] { opacity: 1; border-color: #8ae3b4; }
.s-gallery-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
@media (max-width: 600px) {
  .s-gallery-dialog { width: calc(100vw - 16px); max-width: none; border-radius: 14px; }
  .s-gallery-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "image image" "previous next" "caption caption"; }
  .s-gallery-prev { justify-self: end; }
  .s-gallery-next { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .s-gallery-grid img { transition: none; } }

/* ---------- карточка каталога /apps/ios/ (26.11) ---------- */
/* Факты о приложении: пары «термин — значение», без таблицы — она тут визуально тяжелее. */
.s-facts { display: grid; gap: 6px; margin: 16px 0 0; font-size: .9rem; }
.s-facts > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.s-facts dt { color: #486258; }
.s-facts dd { margin: 0; min-width: 0; color: #102b23; overflow-wrap: anywhere; }
.s-facts a { color: #086249; }
.s-facts a:hover { text-decoration: none; }
.s-muted { color: #5a7268; font-weight: 400; }
/* Недоступное приложение: цена остаётся как исторический факт, но без кнопки покупки. */
.s-unavail-price { color: #486258; }
.s-unavail {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff4e5;
  border: 1px solid #f0d3a8;
  color: #6b4413;
  font-weight: 600;
  line-height: 1.35;
}
.s-material-price-panel .s-material-check + .s-material-check { margin-top: 4px; }
/* сетка «Похожие» — плотнее основной, карточки тут вторичны */
.s-grid-tight { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.s-material-similar { margin-top: 24px; }
.s-count { margin: 10px 0 0; color: #486258; font-size: .9rem; }
@media (max-width: 600px) {
  .s-facts > div { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .s-facts dt { font-size: .8rem; }
}
