/* A chronological feed, with the calendar card as the only visual container. */
body[data-active-page=updates] .topbar,body[data-active-page=updates] #add-event,body[data-active-page=updates] .page-footer{display:none}
#updates-page{max-width:820px;margin:18px auto 0;padding:0 0 32px;border:0;background:transparent;min-height:65vh}
.updates-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px}
.updates-header h1{font-size:20px;letter-spacing:-.5px;display:flex;align-items:center;gap:12px;margin:0}
#updates-new-count{font-size:11px;color:var(--theme-danger);font-weight:650;letter-spacing:0;white-space:nowrap}
.updates-actions{display:flex;align-items:center;gap:2px}
.updates-actions button,#updates-page #updates-refresh{width:42px;height:42px;display:grid;place-items:center;border:0;background:transparent;color:var(--muted);padding:10px;border-radius:8px}
.updates-actions button:hover{color:var(--accent);background:var(--accent-soft)}
.updates-actions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#updates-refresh[aria-busy=true] svg{animation:updates-spin 1.2s linear infinite}
.updates-context{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:11px;color:var(--muted)}
.updates-context button,#updates-filter-label{min-height:36px;text-align:left;padding:4px 0;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#updates-new-jump{flex-shrink:0;color:var(--theme-danger)}
#updates-error:empty{display:none}#updates-error{font-size:12px;color:var(--theme-danger);line-height:1.6}
#updates-pending{position:fixed;bottom:28px;left:calc(50% + 110px);transform:translateX(-50%);z-index:10;display:block;margin:8px auto;padding:10px 18px;background:var(--accent-soft);color:var(--accent);border-radius:24px;box-shadow:0 3px 15px #0002;font-size:12px}
#updates-page [hidden],#updates-picker [hidden]{display:none}
.updates-day{position:sticky;top:0;z-index:4;margin:12px 0 3px;padding:10px 0;background:var(--bg);font-size:13px;font-weight:650;letter-spacing:-.2px;color:var(--text)}
.update-feed-item{padding:10px 0 16px}
.update-feed-item.same-game{padding-top:4px}
.update-feed-meta{display:flex;align-items:center;gap:7px;min-height:20px;margin-bottom:6px;font-size:11px;color:var(--muted)}
.update-feed-meta img{border-radius:6px;flex:none}
.update-feed-meta time{margin-left:auto;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.update-tag{font-size:10px}.update-added{color:var(--theme-success)}.update-changed{color:var(--accent)}.update-removed{color:var(--theme-danger)}
.update-caption{display:flex;align-items:baseline;gap:10px;padding:0 2px;margin-top:7px;color:var(--muted);font-size:11px;line-height:1.65}
.update-caption p{margin:0;flex:1;min-width:0;overflow-wrap:anywhere}.update-extra{white-space:nowrap;opacity:.8}
.update-history-link{color:var(--accent);font-size:11px;white-space:nowrap;min-height:28px;padding:2px 0}
.update-calendar-card{min-width:0;display:flex;align-items:center;gap:10px}
.feed-reset-title{font-size:12px;color:var(--text)}
.update-calendar-card.version-calendar .timeline-event{width:100%;max-width:100%;margin:0;min-height:28px}
.update-calendar-card.version-calendar .timeline-event-content,.update-calendar-card.version-calendar .pickup-event .pickup-pair{position:relative;left:0}
.update-calendar-card.version-calendar .timeline-event.pickup-event{height:56px}
.update-calendar-card.version-calendar .timeline-event.story-event,.update-calendar-card.version-calendar .timeline-event.recurring-event{height:28px}
.update-calendar-card.version-calendar .timeline-event.reset-image-event{width:44px;height:44px;max-height:44px}
.update-calendar-card .feed-event-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.update-calendar-card .timed-copy{display:flex;align-items:center;gap:8px;color:var(--muted)}
.updates-new-line{display:flex;align-items:center;gap:9px;color:var(--theme-danger);margin:26px 0;scroll-margin-top:40px}
.updates-new-line:before{content:'';width:24px;height:1px;background:currentColor}.updates-new-line:after{content:'';flex:1;height:1px;background:currentColor}
.updates-new-line>span{font-size:11px;font-weight:800;letter-spacing:.1em}.updates-new-line>small{font-size:10px;white-space:nowrap}
.updates-read-line{display:flex;align-items:center;gap:10px;margin:24px 0;color:var(--muted);font-size:10px}.updates-read-line:after{content:'';height:1px;flex:1;background:var(--line)}
#updates-more{display:block;margin:18px auto;min-height:44px;background:transparent;color:var(--accent);border:0;padding:10px 20px;font-size:12px}
#updates-end{color:var(--muted);font-size:11px;text-align:center;padding:16px 0 30px}
.updates-empty{padding:65px 16px;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}
#updates-picker{width:min(520px,calc(100vw - 32px));max-height:85dvh;padding:20px 24px 22px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:20px;overflow:auto}
#updates-picker::backdrop,#update-detail::backdrop{background:#0008;backdrop-filter:blur(3px)}
.updates-sheet-handle{height:4px;width:36px;background:var(--muted);opacity:.4;border-radius:4px;margin:0 auto 12px}
.updates-picker-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.updates-picker-heading h2{font-size:17px;margin:0}.updates-picker-heading button{width:36px;height:36px;font-size:24px;color:var(--muted)}
#updates-picker #updates-search{width:100%;max-width:100%;padding:12px 0;color:var(--text);background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;font:inherit;font-size:14px;min-height:46px}
#updates-picker h3{font-size:12px;color:var(--muted);margin:24px 0 12px;font-weight:500}
#updates-picker #updates-games{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px 6px}
#updates-picker #updates-games button{height:auto;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:3px;background:transparent;border:0;color:var(--muted);font-size:10px;line-height:1.5}
#updates-games img,.updates-all-icon{width:36px;height:36px;border-radius:9px;display:grid;place-items:center;font-size:28px}
#updates-picker #updates-games button[aria-pressed=true]{color:var(--accent);font-weight:700}
#updates-games button[aria-pressed=true] img,#updates-games button[aria-pressed=true] .updates-all-icon{outline:2px solid var(--accent);outline-offset:3px}
#updates-kinds{display:flex;gap:10px;flex-wrap:wrap}
#updates-picker #updates-kinds button{background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 4px;min-height:40px;color:var(--muted);font-size:13px}
#updates-picker #updates-kinds button[aria-pressed=true]{color:var(--accent);border-bottom-color:var(--accent)}
.updates-picker-footer{display:flex;justify-content:space-between;align-items:center;margin-top:24px;gap:14px}.updates-picker-footer button{min-height:44px;font-size:13px;color:var(--muted)}
#updates-filter-apply{padding:10px 25px;background:var(--accent-soft);color:var(--accent);border-radius:10px}
#update-detail{padding:0;width:min(580px,calc(100vw - 28px));max-height:85dvh;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:18px}
.update-detail-body{padding:24px}.update-detail-body h2{font-size:20px;margin:6px 0;overflow-wrap:anywhere}.update-detail-body h3{font-size:12px;margin:18px 0 8px;color:var(--muted)}
.update-card-meta,.update-as-of{font-size:11px;color:var(--muted)}
.update-change-summary{font-size:14px;line-height:1.9;margin:20px 0;color:var(--text);overflow-wrap:anywhere}
.update-history{font-size:12px;margin:20px 0;color:var(--muted)}.update-history>summary{cursor:pointer;color:var(--accent);min-height:32px}.update-history section{padding:8px 0;border-bottom:1px solid var(--line)}
.update-diff{margin:8px 0}.update-diff>div{padding:10px 0}.update-diff dt{font-size:11px;color:var(--muted);margin-bottom:5px}.update-diff dd{margin:0;display:flex;gap:8px;flex-wrap:wrap;line-height:1.6;overflow-wrap:anywhere}.update-diff del{color:var(--muted)}.update-diff strong{color:var(--accent)}
.update-schedule{border-top:1px solid var(--line);margin-top:20px;padding-top:4px;font-size:12px;line-height:1.8;color:var(--muted)}
.update-current-status{color:var(--theme-danger);font-size:12px}.update-detail-body .detail-actions{margin-top:24px}
#updates-page button:focus-visible,#updates-picker button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.official-feed-status{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px}
@keyframes updates-spin{to{transform:rotate(360deg)}}@keyframes updates-rise{from{transform:translateY(36px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(max-width:700px){
 #updates-pending{bottom:calc(96px + env(safe-area-inset-bottom));left:50%;max-width:90vw;white-space:nowrap}
 #updates-page{margin-top:4px;padding:0 2px 24px}.updates-header h1{font-size:18px}.updates-header{min-height:46px}.updates-context{margin-bottom:0}
 .update-feed-item{padding-bottom:12px}.update-calendar-card.version-calendar .pickup-pair .pickup-copy{max-width:190px}
 #updates-picker,#update-detail{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:85dvh;border:0;border-top:1px solid var(--line);border-radius:20px 20px 0 0;padding-bottom:calc(22px + env(safe-area-inset-bottom))}
 #updates-picker[open],#update-detail[open]{animation:updates-rise .2s ease-out}.update-detail-body{padding:22px 20px 8px}
}
@media(prefers-reduced-motion:reduce){#updates-picker[open],#update-detail[open],#updates-refresh svg{animation:none}}

#updates-filter-label{min-width:0;display:flex;align-items:center;cursor:default}

.update-feed-item,.update-feed-item.same-game{padding:0;margin:0 0 4px}.update-group-meta{margin:18px 0 7px}.updates-day + .update-group-meta{margin-top:8px}
