/* "What's new" dialog (public/whatsnew.js), shared by all pages. Everything is scoped to .wn-*
   and uses its own colours so it looks the same whichever page stylesheet is loaded. */
.wn-dialog { --wn-bg: #fbfaf5; --wn-ink: #14161a; --wn-ink2: #4b4f56; --wn-rule: #c8c1ae; --wn-hi: #f5c400; --wn-acc: #0b3d91;
  padding: 0; border: 2px solid var(--wn-ink); background: var(--wn-bg); color: var(--wn-ink); max-width: min(560px, calc(100vw - 24px));
  width: 100%; max-height: min(86vh, 760px); box-shadow: 6px 6px 0 var(--wn-ink); font: 15px/1.55 "IBM Plex Sans Thai", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) {
  .wn-dialog { --wn-bg: #13181c; --wn-ink: #ece7da; --wn-ink2: #b3ad9f; --wn-rule: #2e353d; --wn-acc: #8fbfff; box-shadow: 6px 6px 0 #000; }
}
.wn-dialog::backdrop { background: rgba(10, 12, 14, .55); }
.wn-box { display: flex; flex-direction: column; max-height: inherit; }
.wn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; border-bottom: 3px double var(--wn-ink); }
.wn-head h2 { margin: 0; font: 800 21px/1.3 "Noto Serif Thai", Georgia, serif; }
.wn-x { border: 1px solid var(--wn-ink); background: transparent; color: var(--wn-ink); width: 32px; height: 32px; font-size: 15px; cursor: pointer; }
.wn-x:hover { background: var(--wn-hi); color: #14161a; }
.wn-list { list-style: none; margin: 0; padding: 4px 18px; overflow-y: auto; }
.wn-list li { padding: 10px 0; border-bottom: 1px solid var(--wn-rule); }
.wn-list li:last-child { border-bottom: 0; }
.wn-list li:not(.wn-new) { opacity: .78; }
.wn-meta { display: flex; gap: 8px; align-items: center; font: 600 11.5px "IBM Plex Mono", monospace; color: var(--wn-ink2); }
.wn-badge { background: var(--wn-hi); color: #14161a; padding: 1px 7px; }
.wn-t { display: inline-block; margin-top: 3px; font: 700 16.5px/1.4 "Noto Serif Thai", Georgia, serif; color: var(--wn-ink); text-decoration-color: var(--wn-rule); }
.wn-t:hover { text-decoration-color: var(--wn-ink); }
.wn-list p { margin: 3px 0 0; font-size: 14px; color: var(--wn-ink2); }
.wn-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px 4px; border-top: 1px solid var(--wn-ink); }
.wn-hide { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.wn-hide select { font: inherit; padding: 3px 4px; border: 1px solid var(--wn-ink); background: var(--wn-bg); color: var(--wn-ink); }
.wn-ok { font: 600 14px "IBM Plex Sans Thai", system-ui, sans-serif; padding: 7px 22px; border: 1px solid var(--wn-ink); background: var(--wn-ink); color: var(--wn-bg); cursor: pointer; }
.wn-ok:hover { background: var(--wn-hi); color: #14161a; }
.wn-note { margin: 0; padding: 2px 18px 12px; font-size: 12px; color: var(--wn-ink2); }

/* the small bar that replaces the auto-opening dialog; sits above each page's bottom tab bar */
.wn-bar { --wn-bg: #fbfaf5; --wn-ink: #14161a; --wn-hi: #f5c400;
  position: fixed; z-index: 950; left: 12px; bottom: calc(var(--bottom, 0px) + 12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: stretch; max-width: min(460px, calc(100vw - 24px)); border: 2px solid var(--wn-ink); background: var(--wn-bg);
  color: var(--wn-ink); box-shadow: 4px 4px 0 var(--wn-ink); font: 14px/1.4 "IBM Plex Sans Thai", system-ui, sans-serif; animation: wn-in .25s ease-out; }
@media (prefers-color-scheme: dark) { .wn-bar { --wn-bg: #13181c; --wn-ink: #ece7da; box-shadow: 4px 4px 0 #000; } }
.wn-open { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 8px 10px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wn-open:hover .wn-bt { text-decoration: underline; }
.wn-bt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wn-more { flex: none; font: 600 12px "IBM Plex Mono", monospace; opacity: .75; }
.wn-bar .wn-badge { flex: none; font: 600 11.5px "IBM Plex Mono", monospace; }
.wn-bx { flex: none; width: 40px; border: 0; border-left: 1px solid var(--wn-ink); background: transparent; color: inherit; font-size: 14px; cursor: pointer; }
.wn-bx:hover { background: var(--wn-hi); color: #14161a; }
@keyframes wn-in { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wn-bar { animation: none; } }
