/* Scripturewell preview V15: the "What's New / What's to Come" box. Uses the theme's own colours, so it follows
   light, dark and high contrast. Scrolls inside itself on small phones; header and Close stay in view. */
#sw-whatsnew { width: min(560px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--sw12-r, 14px); background: var(--bg-card); color: var(--ink); box-shadow: 0 18px 50px rgba(30, 22, 12, 0.22); font-family: var(--sans); overflow: hidden; }
#sw-whatsnew[open] { display: flex; flex-direction: column; }
#sw-whatsnew::backdrop { background: rgba(20, 14, 8, 0.5); }
#sw-whatsnew .swn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 14px 12px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#sw-whatsnew h2 { margin: 6px 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
#sw-whatsnew .swn-close { flex-shrink: 0; width: 48px; height: 48px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
#sw-whatsnew .swn-close:hover { background: var(--bg-warm, transparent); }
#sw-whatsnew .swn-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 22px 8px; flex: 1 1 auto; min-height: 0; }
#sw-whatsnew h3 { margin: 16px 0 8px; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
#sw-whatsnew ul { list-style: none; margin: 0; padding: 0; }
#sw-whatsnew .swn-new li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 1rem; line-height: 1.55; color: var(--ink); }
#sw-whatsnew .swn-new li:first-child { border-top: 0; }
#sw-whatsnew .swn-new strong { font-weight: 700; color: var(--ink); }
#sw-whatsnew .swn-plan li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 1rem; line-height: 1.45; color: var(--ink); }
#sw-whatsnew .swn-plan li:first-child { border-top: 0; }
#sw-whatsnew .swn-goal { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
#sw-whatsnew .swn-foot { display: flex; justify-content: flex-end; padding: 12px 22px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
#sw-whatsnew .swn-done { min-height: 48px; min-width: 120px; padding: 10px 22px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg-card); font: 600 1rem/1.2 var(--sans); cursor: pointer; }
#sw-whatsnew :is(.swn-close, .swn-done, .swn-body):focus-visible { outline: 3px solid var(--gold, var(--accent)); outline-offset: 2px; }
html[data-contrast='high'] #sw-whatsnew :is(.swn-close, .swn-done, .swn-body):focus-visible { outline-color: var(--ink); }
@media (max-width: 480px) {
  #sw-whatsnew .swn-head { padding: 14px 10px 10px 16px; }
  #sw-whatsnew h2 { font-size: 1.25rem; }
  #sw-whatsnew .swn-body { padding: 4px 16px 8px; }
  #sw-whatsnew .swn-foot { padding: 10px 16px 14px; }
  #sw-whatsnew .swn-done { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduce-motion]) #sw-whatsnew[open] { animation: swn-in 0.18s ease-out; }
  @keyframes swn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
/* App menu entry. */
.app-menu-whatsnew { border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 0 0; }
.app-menu-whatsnew-btn { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 16px; border: 0; background: transparent; color: var(--ink); font: 500 .95rem/1.3 var(--sans); text-align: left; cursor: pointer; }
.app-menu-whatsnew-btn small { display: block; color: var(--ink-soft); font-size: .8rem; font-weight: 400; }
.app-menu-whatsnew-btn:hover { background: var(--accent-bg, var(--bg-warm)); }
.app-menu-whatsnew-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
