/* Новости: один утверждённый городской фон, без экспериментальных тем.
   Все правила ограничены .news; масштабом страницы владеет site-shell. */
.news {
  --news-hand: "Segoe Print", "Bradley Hand", cursive;
  --news-scene-color: #f0ede7;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--news-scene-color);
  color: #4c5067;
  font-family: "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.news::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: max(1024px, calc(100vw * .666667 / var(--site-scale, 1)));
  z-index: -1;
  pointer-events: none;
  opacity: .9;
  background: linear-gradient(180deg, transparent 76%, var(--news-scene-color)),
    url('../art/city-soft.png') center top / cover no-repeat;
}

.news *, .news *::before, .news *::after { box-sizing: border-box; }
.news button, .news a { -webkit-tap-highlight-color: transparent; }
.news button { font: inherit; cursor: pointer; }
.news button:disabled { cursor: default; }
.news a { color: inherit; }
.news a:focus-visible, .news button:focus-visible {
  outline: 3px solid #826097;
  outline-offset: 5px;
}

/* Компоновка: свежие новости слева, письмо справа. */
.news .news-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 30px 76px;
  align-items: start;
  max-width: 1240px;
  margin: auto;
  padding: 76px 56px 48px;
}

.news .news-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.news .news-reader { position: relative; min-width: 0; grid-column: 2; grid-row: 1 / 3; }
.news .news-sidebar { grid-column: 1; grid-row: 1; }

/* Открытое письмо. */
.news .news-paper-stack { position: relative; isolation: isolate; scroll-margin-top: 26px; }
.news .news-paper-under {
  position: absolute;
  inset: 5px 1px -1px -7px;
  z-index: -1;
  background: #f2f2f4;
  border: 1px solid #d5d5da;
  transform: rotate(-1.1deg);
  box-shadow: 2px 7px 12px #69577629;
}

.news .news-letter {
  position: relative;
  padding: 35px 43px 28px;
  transform: rotate(.55deg);
  background: #fff;
  box-shadow: 0 2px 2px #6353431a, 7px 17px 27px #6d604033;
  color: #555366;
}

.news .news-letter::before {
  content: "";
  position: absolute;
  inset: auto 0 -3px;
  height: 5px;
  background: #fff;
  clip-path: polygon(0 0,100% 0,100% 62%,97% 54%,94% 71%,91% 44%,87% 60%,82% 48%,78% 71%,74% 52%,69% 78%,65% 64%,60% 76%,56% 46%,52% 63%,48% 55%,43% 82%,39% 57%,34% 69%,30% 56%,25% 75%,21% 59%,17% 72%,13% 47%,9% 65%,5% 51%,0 69%);
}

.news .news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.news .news-meta time { font: 16px/1.5 Consolas, monospace; letter-spacing: .015em; color: #6b6571; }
.news .news-meta > span { font: 15px var(--news-hand); transform: rotate(4deg); color: #95828a; }
.news .news-hello { font: 21px/1.5 var(--news-hand); margin: 0 0 16px; color: #756576; }
.news .news-title {
  font: 400 36px/1.23 Georgia, serif;
  letter-spacing: -.022em;
  color: #474c62;
  margin: 0 0 26px;
  text-wrap: pretty;
  outline: none;
}
.news .news-body { font-size: 16px; line-height: 1.85; color: #535562; }
.news .news-body p { margin: 0 0 21px; }
.news .news-body a { color: #626486; text-decoration-color: #bab0bd; text-underline-offset: 3px; }
.news .news-body a:hover { text-decoration-color: #2b7280; }
.news .news-body strong { font-weight: 600; }
.news .news-body ul { padding-left: 20px; }
.news .news-body li { margin-bottom: 10px; }
.news .news-body h2 { font: 500 20px/1.4 "Segoe UI", sans-serif; margin: 25px 0 15px; }

.news .news-signature { padding: 17px 0 29px; }
.news .news-signature > span { font-size: 15px; line-height: 1.6; color: #716773; }
.news .news-signature p { font: 21px/1.6 var(--news-hand); letter-spacing: -.04em; color: #756576; margin: 7px 0 0; }
.news .news-signature svg { color: #ba9a83; margin-top: -8px; }
.news .news-letter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px dashed #d4c4bb;
  padding-top: 16px;
  font-size: 9px;
  letter-spacing: .08em;
  color: #8e7d83;
}
.news .news-letter-footer a { font-size: 12px; letter-spacing: 0; text-decoration: none; text-underline-offset: 3px; color: #7b7187; }

.news .news-paging { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 23px 0 0; }
.news .news-paging > * {
  text-decoration: none;
  min-height: 39px;
  padding: 9px 13px;
  border: 1px solid #d2ced5;
  border-radius: 2px;
  background: #f9f9fb;
  color: #746276;
  font-size: 11px;
  box-shadow: 1px 2px 3px #5a486620;
  transform: rotate(-2deg);
  transition: transform .2s, background .2s;
}
.news .news-paging > *:last-child { transform: rotate(2deg); }
.news .news-paging a:hover { transform: translateY(-2px); background: #fff; }
.news .news-paging [aria-disabled=true] { opacity: .48; }

/* Три свежие новости. Марки — три разных участка одного атласа. */
.news .news-fresh-label {
  display: block;
  margin: -34px 0 16px;
  padding-left: 5px;
  transform: rotate(-2deg);
  font: 13px var(--news-hand);
  color: #655f70;
}
.news .news-fresh-label > span { display: inline-block; background: #ffffffd9; padding: 3px 7px; }
.news .news-cards { padding: 0 5px; }
.news .news-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 11px 15px 12px;
  background: #fbf4ed;
  border: 1px solid #c9b8b3;
  box-shadow: 1px 3px 3px #57465d20, 3px 6px 9px #57465d26;
  text-decoration: none;
  transform: rotate(-3deg);
  transition: transform .22s, box-shadow .22s;
  isolation: isolate;
}
.news .news-card + .news-card { margin-top: 8px; }
.news .news-card--1 { transform: rotate(2.5deg); background: #f1eef5; }
.news .news-card--2 { transform: rotate(-1.5deg); background: #f6eeeb; }
.news .news-card:hover { transform: translateY(-5px) rotate(0); z-index: 3; }
.news .news-card.is-current { background: #fff8f1; transform: rotate(-1deg) translateX(3px); box-shadow: 1px 4px 5px #57465d24, 4px 7px 11px #57465d28; }
.news .news-card.is-current::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 47px;
  width: 24px;
  height: 13px;
  background: #bdabc8ba;
  transform: rotate(-17deg);
  z-index: -1;
  box-shadow: 0 1px 1px #5d75582b;
}
.news .news-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.news .news-card-top time { padding-top: 7px; font: 17px/1.5 var(--news-hand); color: #716773; }
.news .news-stamp { display: block; padding: 3px; border: 1px dashed #b9a8a1; background: #fff7e7; box-shadow: 1px 1px 2px #5f5a4e22; transform: rotate(4deg); }
.news .news-card--1 .news-stamp { transform: rotate(-5deg); }
.news .news-card--2 .news-stamp { transform: rotate(2deg); }
.news .news-stamp-art { display: block; width: 36px; height: 36px; background: url('../art/stamps.png') 0 center / 300% 100% no-repeat; }
.news .news-card--1 .news-stamp-art { background-position-x: 50%; }
.news .news-card--2 .news-stamp-art { background-position-x: 100%; }
.news .news-card-title { display: block; font: 15px/1.45 Georgia, serif; letter-spacing: -.01em; color: #5d5769; }
.news .news-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 8px; color: #867282; margin-top: 10px; }
.news .news-card-state { font-size: 8px; letter-spacing: .02em; }
.news .news-card.is-current .news-card-state { color: #77607b; border: 1px solid #ac94a8; letter-spacing: .025em; padding: 2px 4px; margin: -4px 0; transform: rotate(-2deg); font-size: 7px; }
.news .news-card.is-current .news-card-bottom > span:last-child { opacity: .35; }

.news .news-archive-button {
  display: flex;
  width: calc(100% - 4px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 23px 3px 0;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid #c8c7ce;
  border-radius: 2px;
  background: #fffffff0;
  box-shadow: 1px 2px 3px #554c6214;
  color: #625b70;
  text-align: left;
  transition: background .15s;
}
.news .news-archive-button > span { display: flex; align-items: center; gap: 9px; font: 12px "Segoe UI", sans-serif; letter-spacing: -.01em; }
.news .news-archive-button small { font: 10px "Segoe UI", sans-serif; color: #79717d; margin: 0; }
.news .news-archive-button:hover { background: #fff; }
.news .news-archive-tab { display: none; }

/* Открытка — отдельная лёгкая деталь, без влияния на чтение. */
.news .news-postcard-place { position: relative; grid-column: 1; grid-row: 2; justify-self: center; margin: 4px 0 32px; z-index: 0; }
.news .news-postcard {
  position: relative;
  display: block;
  width: 190px;
  height: 137px;
  padding: 9px;
  border: 0;
  background: #fff0dd;
  box-shadow: 1px 2px 3px #5b4b6726, 4px 8px 12px #5b4b6730;
  transform: rotate(-6deg);
  transition: transform .25s;
  perspective: 600px;
}
.news .news-postcard:enabled:hover { transform: rotate(3deg) translateY(-4px); }
.news .news-postcard::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 66px;
  width: 48px;
  height: 19px;
  z-index: 3;
  background: #efd1b1b0;
  transform: rotate(8deg);
  box-shadow: 0 1px 1px #4e4c2b12;
  clip-path: polygon(3% 0,98% 2%,100% 92%,0 100%);
}
.news .news-postcard-front, .news .news-postcard-back { position: absolute; inset: 9px; display: flex; flex-direction: column; align-items: center; backface-visibility: hidden; transition: transform .45s, opacity .35s; }
.news .news-postcard-front img { width: 100%; height: 92px; object-fit: cover; object-position: center 49%; }
.news .news-postcard-front > span { font: 9px var(--news-hand); padding-top: 8px; color: #7b677b; }
.news .news-postcard-back { opacity: 0; transform: rotateY(-180deg); justify-content: center; gap: 11px; color: #7b677b; font: 12px/1.6 var(--news-hand); background: repeating-linear-gradient(0deg,transparent 0 25px,#7c989b18 25px 26px); }
.news .news-postcard-back > span { text-align: center; }
.news .news-postcard[aria-pressed=true] .news-postcard-front { opacity: 0; transform: rotateY(180deg); }
.news .news-postcard[aria-pressed=true] .news-postcard-back { opacity: 1; transform: rotateY(0); }
.news .news-postcard-hint { position: absolute; bottom: -23px; right: 0; font: 9px var(--news-hand); color: #7b677b; transform: rotate(3deg); white-space: nowrap; padding: 2px 7px; }

/* Список всех новостей: нативный dialog сохраняет клавиатурную навигацию. */
.news .news-archive {
  position: fixed;
  inset: 0;
  width: min(620px, calc(100% - 36px));
  max-height: calc(100dvh / var(--site-scale, 1) - 64px);
  margin: auto;
  padding: 30px 35px 18px;
  border: 1px solid #d4d1d9;
  border-radius: 4px;
  background: #fdfdfd;
  box-shadow: 0 25px 85px #132f3480;
  color: #534b62;
  overflow: auto;
  overscroll-behavior: contain;
}
.news .news-archive::backdrop { background: #3c354c99; backdrop-filter: blur(4px); }
.news .news-archive-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 24px; }
.news .news-archive-heading p { font-size: 9px; letter-spacing: .15em; color: #8c7584; margin: 0 0 8px; }
.news .news-archive-heading h2 { font: italic 33px/1.2 Georgia, serif; letter-spacing: -.03em; margin: 0 0 10px; }
.news .news-archive-heading div > span { font-size: 12px; color: #8c7584; }
.news .news-archive-heading > button { width: 40px; height: 40px; border: 1px solid #d4bdc4; background: transparent; font: 25px/1 Georgia, serif; color: #775d7e; border-radius: 50%; }
.news .news-archive-item { display: grid; grid-template-columns: 23px minmax(0, 1fr) 17px; gap: 13px; padding: 17px 6px; border-top: 1px solid #e0cad0; text-decoration: none; }
.news .news-archive-item time { display: block; font-size: 10px; color: #8c7584; margin-bottom: 6px; }
.news .news-archive-item > span:nth-child(2) > span { font-size: 14px; line-height: 1.5; display: block; color: #65556e; }
.news .news-archive-number { font: 9px Consolas, monospace; color: #8b9b86; padding-top: 3px; }
.news .news-archive-item > span:last-child { color: #77927f; }
.news .news-archive-item:hover { background: #dfd2e466; }
.news .news-archive-item.is-current { background: #dfd2e499; box-shadow: inset 2px 0 #a083aa; }

/* Адаптивность: только изменения относительно базовой компоновки. */
@media (min-width: 1600px) {
  .news .news-layout { max-width: 1320px; grid-template-columns: 250px minmax(0, 1fr); column-gap: 88px; padding: 82px 64px 48px; }
  .news .news-letter { padding-inline: 47px; }
}

@media (max-width: 1120px) {
  .news .news-layout { max-width: 1150px; grid-template-columns: 210px minmax(0, 1fr); column-gap: 46px; padding: 65px 38px 48px; }
  .news .news-letter { padding: 29px 29px 25px; }
  .news .news-title { font-size: 32px; }
  .news .news-card { padding-inline: 13px; }
  .news .news-stamp-art { width: 34px; height: 34px; }
  .news .news-postcard { width: 175px; height: 127px; }
  .news .news-postcard-front img { height: 82px; }
  .news .news-postcard-front > span { font-size: 8px; }
}

@media (min-width: 761px) and (max-width: 860px) {
  .news .news-layout { grid-template-columns: 180px minmax(0, 1fr); column-gap: 32px; padding: 58px 30px 48px; }
  .news .news-letter { padding-inline: 26px; }
  .news .news-title { font-size: 29px; }
  .news .news-card-title { font-size: 14px; }
  .news .news-stamp-art { width: 30px; height: 30px; }
  .news .news-postcard { width: 157px; height: 118px; }
  .news .news-postcard-front img { height: 75px; }
}

@media (max-width: 760px) {
  .news::before { height: 1100px; background-position: 0 0, 46% top; background-size: auto, auto 1100px; }
  .news .news-layout { display: flex; flex-direction: column; gap: 0; padding: 0 18px 48px; }
  .news .news-heading { position: relative; isolation: isolate; align-self: flex-start; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; order: 0; font: 600 14px/1.4 "Segoe UI", sans-serif; color: #65566c; margin: 27px 0 0 3px; letter-spacing: .02em; }
  .news .news-heading::before { content: ""; position: absolute; inset: -3px -7px; background: #ffffffe6; border-radius: 1px; transform: rotate(-1deg); z-index: -1; }
  .news .news-reader { order: 1; width: 100%; margin-top: 35px; }
  .news .news-sidebar { display: contents; }
  .news .news-paper-stack { scroll-margin-top: 24px; z-index: 2; }
  .news .news-paper-under { inset: 5px 0 -1px -3px; transform: rotate(-.5deg); }
  .news .news-letter { padding: 26px 24px 24px; transform: rotate(.15deg); }
  .news .news-meta { margin-bottom: 22px; gap: 10px; }
  .news .news-meta time { font-size: 15px; }
  .news .news-meta > span { font-size: 12px; }
  .news .news-hello { font-size: 19px; margin-bottom: 12px; }
  .news .news-title { font-size: 29px; margin-bottom: 23px; }
  .news .news-body { line-height: 1.8; }
  .news .news-body p { margin-bottom: 18px; }
  .news .news-signature { padding: 12px 0 24px; }
  .news .news-signature p { font-size: 20px; }
  .news .news-letter-footer { font-size: 8px; gap: 10px; }
  .news .news-paging { padding-top: 21px; gap: 7px; }
  .news .news-paging > * { padding: 9px 12px; }
  .news .news-archive-button { display: none; }
  .news .news-archive-tab { display: flex; align-items: center; gap: 10px; position: absolute; right: 13px; top: -31px; height: 39px; padding: 5px 12px 6px; background: #f7f7fa; border: 1px solid #c8c7d0; border-radius: 2px 3px 0 0; color: #625b70; font: 500 11px "Segoe UI", sans-serif; transform: rotate(2deg); box-shadow: 1px 2px 3px #3d59342e; z-index: 3; }
  .news .news-archive-tab > span { font-size: 12px; margin-left: 1px; }
  .news .news-archive-tab:hover { transform: rotate(0); }
  .news .news-fresh-label { order: 2; width: 100%; margin: 31px 0 7px; }
  .news .news-cards { order: 3; display: flex; gap: 17px; width: calc(100% + 18px); margin: 0 -9px; padding: 10px 9px 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #54796b77 transparent; }
  .news .news-card { flex: 0 0 212px; min-height: 156px; padding: 13px 15px; scroll-snap-align: center; }
  .news .news-card + .news-card { margin-top: 0; }
  .news .news-card.is-current { transform: rotate(-1deg); }
  .news .news-card.is-current .news-card-state { font-size: 8px; }
  .news .news-stamp-art { width: 36px; height: 36px; }
  .news .news-postcard-place { order: 4; align-self: center; margin: 29px 0 30px; }
  .news .news-postcard { width: 142px; height: 117px; padding: 5px; transform: rotate(-5deg); }
  .news .news-postcard::before { left: 49px; width: 43px; height: 14px; }
  .news .news-postcard-front, .news .news-postcard-back { inset: 6px; }
  .news .news-postcard-front img { height: 81px; }
  .news .news-postcard-front > span { font-size: 8px; padding-top: 5px; }
  .news .news-postcard-back { font-size: 11px; gap: 3px; }
  .news .news-postcard-back svg { width: 32px; height: 26px; }
  .news .news-postcard-hint { font-size: 8px; padding: 2px 4px; }
  .news .news-archive { max-height: calc(100dvh - 34px); padding: 23px 20px 15px; }
  .news .news-archive-heading { gap: 10px; }
  .news .news-archive-heading h2 { font-size: 29px; }
  .news .news-archive-heading > button { width: 38px; height: 38px; }
  .news .news-archive-item { gap: 10px; grid-template-columns: 18px minmax(0, 1fr) 13px; padding: 15px 3px; }
  .news .news-archive-item > span:nth-child(2) > span { font-size: 13px; }
}

@media (min-width: 521px) and (max-width: 760px) {
  .news .news-letter { padding-inline: 32px; }
  .news .news-title { font-size: 33px; }
}

@media (max-width: 370px) {
  .news .news-layout { padding-inline: 16px; }
  .news .news-heading { font-size: 13px; margin-top: 24px; }
  .news .news-letter { padding-inline: 21px; }
  .news .news-title { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .news * { transition: none !important; scroll-behavior: auto !important; }
}


/* Ссылки сохраняют обычные переходы; без JS архив расположен под письмом. */
.news .news-archive-button, .news .news-archive-tab { text-decoration: none; }
.news .news-archive-fallback { max-width: 900px; margin: 0 auto; padding: 0 28px 48px; }
.news .news-archive-fallback h2 { font: 400 29px/1.3 Georgia, serif; }
.news[data-news-empty] .news-hello, .news[data-news-empty] .news-signature,
.news[data-news-empty] .news-letter-footer, .news[data-news-empty] .news-meta,
.news[data-news-empty] .news-paging { display: none; }

