.landscape-hint { display:none; }
body .topbar .display-btn {
  width:auto; min-width:36px; padding:0 6px; font-size:11px; white-space:nowrap;
}
@media (orientation:portrait) and (pointer:coarse) {
  .landscape-hint { display:block; margin:10px 0 0; color:var(--green); font-size:12px; line-height:1.5; }
  body .topbar #landscape { background:#c2dc9b; color:#152218; border-color:#c2dc9b; }
}
.pwa-entry{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:10px 0;border:0;border-top:1px solid var(--line,#dbe2dc);background:transparent;color:var(--green,#008650);font:inherit;font-size:12px;text-align:left;cursor:pointer;touch-action:manipulation}
.pwa-entry span{white-space:nowrap;font-weight:700}.pwa-entry small{max-width:70%;color:var(--muted,#64746a);text-align:right;font-size:10px;line-height:1.4}
.pwa-dialog{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 32px));max-height:calc(var(--page-height) - max(32px,var(--safe-top)) - var(--safe-bottom));padding:26px;border:1px solid #dbe2dc;border-top:4px solid #008650;border-radius:8px;background:#fff;color:#122b25;box-shadow:0 20px 70px #0004;font-family:inherit;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.pwa-dialog::backdrop{background:#13292380}.pwa-dialog h2{font-size:26px;margin:10px 0 14px}.pwa-dialog p,.pwa-dialog li{font-size:13px;line-height:1.7}.pwa-dialog ol{padding-left:21px}.pwa-dialog li+li{margin-top:7px}.pwa-eyebrow{color:#008650;font-size:11px;letter-spacing:1px}.pwa-note{color:#64746a}.pwa-cache-detail{padding:12px;background:#edf5ef;border-left:3px solid #008650}.pwa-actions{display:flex;gap:10px;flex-wrap:wrap}.pwa-actions button{min-height:44px;padding:10px 16px;border:1px solid #bac9c0;border-radius:4px;background:#f6f7f2;color:#122b25;font:inherit;font-size:13px;touch-action:manipulation}.pwa-actions #pwa-install{color:#fff;background:#008650;border-color:#008650}.pwa-close{position:absolute;right:10px;top:8px;min-width:44px;min-height:44px;border:0;background:transparent;color:#64746a;font-size:26px;touch-action:manipulation}.pwa-dialog button:focus-visible,.pwa-entry:focus-visible{outline:3px solid #0756b0;outline-offset:2px}.pwa-dialog button:disabled{opacity:.5}.pwa-dialog [hidden]{display:none!important}
@media(max-height:500px) and (orientation:landscape){.pwa-dialog{width:min(600px,calc(100vw - 48px));padding:18px 24px}.pwa-dialog h2{font-size:23px;margin:6px 0}.pwa-dialog p,.pwa-dialog li{font-size:12px}.pwa-dialog ol{margin:9px 0}.pwa-entry{padding:8px 0}}
.release-dialog{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 32px));max-height:calc(var(--page-height) - max(32px,var(--safe-top)) - var(--safe-bottom));padding:26px;border:1px solid #dbe2dc;border-top:4px solid #008650;border-radius:8px;background:#fff;color:#122b25;box-shadow:0 20px 70px #0004;font-family:inherit;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.release-dialog::backdrop{background:#13292380}.release-dialog h2{font-size:26px;margin:10px 0 14px}.release-dialog p,.release-dialog li{font-size:13px;line-height:1.7}.release-dialog ul{padding-left:21px;margin:12px 0 22px}.release-dialog li+li{margin-top:8px}.release-dialog .release-dismiss{min-height:44px;padding:10px 16px;border:1px solid #008650;border-radius:4px;background:#008650;color:#fff;font:inherit;font-size:13px;touch-action:manipulation}.release-dialog .release-close{position:absolute;right:10px;top:8px;min-width:44px;min-height:44px;border:0;background:transparent;color:#64746a;font-size:26px;touch-action:manipulation}.release-dialog button:focus-visible{outline:3px solid #0756b0;outline-offset:2px}
@media(max-height:500px) and (orientation:landscape){.release-dialog{width:min(600px,calc(100vw - 48px));padding:18px 24px}.release-dialog h2{font-size:23px;margin:6px 0}.release-dialog p,.release-dialog li{font-size:12px}.release-dialog ul{margin:9px 0 14px}}

/* Install sheet: installation and resource readiness are separate steps. */
body[data-screen="menu"] #menu .menu-foot-actions #install-app { color:#176345; font-weight:700; gap:6px; }
.pwa-dialog .pwa-benefits { display:flex; flex-wrap:wrap; gap:6px; margin:14px 0; }
.pwa-dialog .pwa-benefits span { padding:5px 9px; border-radius:4px; background:#edf5ef; color:#286046; font-size:11px; }
.pwa-resource { margin-top:18px; padding:15px; border:1px solid #dbe7dd; border-radius:6px; background:#f3f7f2; }
.pwa-resource h3 { margin:0 0 7px; color:#637268; font-size:11px; font-weight:500; }
.pwa-resource strong { display:block; font-size:15px; line-height:1.5; }
.pwa-resource .pwa-cache-detail { margin:6px 0 10px; padding:0; border:0; background:none; color:#56665c; font-size:12px; }
.pwa-resource progress { display:block; width:100%; height:5px; margin:10px 0; accent-color:#008650; }
.pwa-resource button { min-height:44px; padding:7px 12px; border:1px solid #b5cabc; border-radius:4px; background:white; color:#176345; font:inherit; font-size:12px; cursor:pointer; touch-action:manipulation; }
.pwa-dialog .pwa-update-note { margin:16px 0 8px; font-size:12px; }
.pwa-dialog .pwa-note { font-size:11px; margin-bottom:0; }
@media(max-height:500px) and (orientation:landscape) {
  .pwa-dialog .pwa-benefits { margin:9px 0; }
  .pwa-resource { margin-top:12px; padding:12px; }
}
/* Follow the current dark court palette. */
body[data-screen="menu"] #menu .menu-foot-actions #install-app { color:#c2dc9b; }
body .pwa-dialog .pwa-benefits span { background:#25392d; color:#c2dc9b; }
body .pwa-dialog .pwa-resource { background:#1d3026; border-color:#40544a; }
body .pwa-resource h3,body .pwa-resource .pwa-cache-detail { color:#afbeb1; }
body .pwa-resource .pwa-cache-detail { background:none; }
body .pwa-resource button { background:#25392d; color:#e3eadc; border-color:#4b6451; }

#release-notice-dialog {
  inset:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  box-sizing:border-box;
  width:min(36rem, calc(100% - var(--safe-left) - var(--safe-right) - 24px));
  height:min(34rem, calc(100vh - var(--safe-top) - var(--safe-bottom) - 24px));
  height:min(34rem, calc(var(--page-height) - var(--safe-top) - var(--safe-bottom) - 24px));
  max-height:none;
  padding:0;
  overflow:hidden;
  border-radius:12px;
}
#release-notice-dialog[open] { display:flex; flex-direction:column; }
.release-header {
  flex:none; display:flex; align-items:center; justify-content:space-between;
  padding:4px 12px 4px 18px; border-bottom:1px solid #40544a;
}
#release-notice-title { margin:0; font-size:20px; }
#release-notice-dialog .release-close {
  position:static; width:44px; height:44px; padding:0;
  color:#d6e3d9; border:0; background:transparent;
}
.release-history {
  flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  touch-action:pan-y; padding:0 18px 12px; scrollbar-color:#758d79 transparent;
}
.release-history details + details { border-top:1px solid #35463e; }
.release-history summary { cursor:pointer; padding:12px 0; line-height:1.5; overflow-wrap:anywhere; }
.release-history summary::marker { color:#b8d88e; }
.release-history summary strong { margin-right:10px; color:#daedbb; font-variant-numeric:tabular-nums; }
.release-history summary span { color:#c1cec4; font-size:12px; }
.release-history ul { margin:0 0 14px; padding-left:20px; }
.release-history li { color:#e0e7e2; font-size:13px; line-height:1.65; }
.release-history li::marker { color:#87a18c; }
