/* 紙面だけを合成レイヤーで動かす。街のカメラ・描画は変更しない。 */
#news-overlay {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 32px;
  border: 0; overflow: hidden; background: transparent; color: var(--ink);
  perspective: 1800px;
}
#news-overlay[open] { display: grid; place-items: center; }
#news-overlay::backdrop { background: rgba(4, 25, 46, .26); animation: citynews-backdrop-in 480ms ease both; }
#news-overlay[data-state="closing"]::backdrop { animation: citynews-backdrop-out 480ms ease both; }
.news-paper {
  position: relative; display: flex; flex-direction: column;
  width: min(1080px, 100%); height: 100%; max-height: 1120px;
  background: #f5f3ed; border: 1px solid #dedbd0;
  box-shadow: 0 32px 90px rgba(4, 25, 46, .3), 0 3px 8px rgba(4, 25, 46, .16);
  transform-origin: 20% 8%;
}
/* 薄い折り筋とめくれる角。内容・操作の上を塞がない。 */
.news-paper::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent 49.5%, rgba(119, 100, 64, .05) 50%, rgba(255, 255, 255, .3) 50.3%, transparent 51%);
}
.news-paper::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 28px; height: 28px;
  pointer-events: none; z-index: 2; transform-origin: bottom right;
  background: linear-gradient(135deg, #e6e0d0 0%, #fffdf7 48%, #c9c3b5 50%, #eeeae0 53%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.news-paper-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex: 0 0 auto; min-height: 48px; padding: 6px 24px; border-bottom: 1px solid #d5d4cb;
}
.news-paper-toolbar > span { font: 700 10px/1.4 Georgia, serif; letter-spacing: .16em; color: #4d6480; }
.news-paper-close { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 4px 12px; font-size: 12px; border-radius: 4px; }
.news-paper-close span { font-size: 26px; line-height: 1; }
.news-paper-close:hover { background: #e5e1d6; }
.news-paper-content { flex: 1; min-height: 0; }
.news-paper-content iframe { display: block; width: 100%; height: 100%; border: 0; background: #f5f3ed; }
#news-overlay[data-state="opening"] .news-paper { animation: citynews-attach 720ms cubic-bezier(.18, .7, .2, 1) both; }
#news-overlay[data-state="opening"] .news-paper::after { animation: citynews-corner-settle 720ms ease-out both; }
#news-overlay[data-state="closing"] .news-paper { animation: citynews-peel-away 480ms cubic-bezier(.5, 0, .8, .45) both; pointer-events: none; }
#news-overlay[data-state="closing"] .news-paper::after { animation: citynews-corner-lift 480ms ease-in both; }
@keyframes citynews-attach {
  0% { opacity: 0; transform: translate3d(30px, -70px, 180px) rotateX(32deg) rotateY(-16deg) rotateZ(-7deg) scale(.94); }
  46% { opacity: 1; }
  72% { transform: translate3d(0, 4px, 0) rotateX(-3deg) rotateY(2deg) rotateZ(.6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes citynews-peel-away {
  0% { opacity: 1; transform: none; }
  35% { opacity: .96; transform: translate3d(4px, -8px, 30px) rotateX(8deg) rotateY(-7deg) rotateZ(-2deg); }
  100% { opacity: 0; transform: translate3d(55px, -100px, 220px) rotateX(38deg) rotateY(-28deg) rotateZ(-10deg) scale(.94); }
}
@keyframes citynews-corner-settle { from { transform: scale(3.5); opacity: .8; } to { transform: scale(1); opacity: 1; } }
@keyframes citynews-corner-lift { to { transform: scale(5); opacity: .5; } }
@keyframes citynews-backdrop-in { from { background: transparent; } }
@keyframes citynews-backdrop-out { to { background: transparent; } }
@keyframes citynews-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes citynews-fade-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 680px) {
  #news-overlay { padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)); }
  .news-paper-toolbar { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #news-overlay[data-state="opening"] .news-paper { animation: citynews-fade-in 100ms ease-out both; }
  #news-overlay[data-state="closing"] .news-paper { animation: citynews-fade-out 100ms ease-in both; }
  #news-overlay[data-state] .news-paper::after { animation: none; }
  #news-overlay[data-state]::backdrop { animation-duration: 100ms; }
}
