/* =====================================================================
   Patch notes: lobby slider (right column) + detail popup. Markup: js/patchnotes.js
   Uses the menu tokens from menu.css (--hl, --lab, --pn, --bd, --cond, --ease).
   ===================================================================== */
.mm-news, #patchModal { --t-new: #d9d29a; --t-improved: #8fbfe0; --t-balance: #e6a65c; --t-fixed: #8fd3a0; }

/* ---------------------------------------------------------------- slider */
.mm-news { grid-area: news; justify-self: end; align-self: end; width: min(100%, 400px); min-width: 0; font-family: var(--cond); animation: csIn .5s var(--ease) both .2s; }
.pn-h { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 2px; }
.pn-h > b { font-size: .92rem; font-weight: 700; letter-spacing: .14em; color: #d8d4cb; }
.pn-dot { width: 7px; height: 7px; background: var(--hl); transform: rotate(45deg); animation: pnPulse 2.4s ease-in-out infinite; }
@keyframes pnPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(217,210,154,.5); } 50% { opacity: .55; box-shadow: 0 0 0 5px rgba(217,210,154,0); } }
.pn-new { font-style: normal; padding: 1px 6px; font-size: max(9.5px, .64rem); font-weight: 700; letter-spacing: .12em; color: #111; background: var(--hl); }
.pn-ct { margin-left: auto; font-size: .8rem; font-weight: 600; letter-spacing: .1em; color: var(--lab); font-variant-numeric: tabular-nums; }
.pn-ct b { color: #fff; font-weight: 700; }

.pn-view { position: relative; overflow: hidden; border: 1px solid var(--bd); background: #0b0b0a; transition: border-color .2s; }
.pn-view:hover { border-color: var(--bd2); }
/* corner ticks */
.pn-view::before, .pn-view::after { content: ''; position: absolute; z-index: 2; width: 12px; height: 12px; pointer-events: none; border: 2px solid var(--hl); opacity: .85; }
.pn-view::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.pn-view::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.pn-track { display: flex; transition: transform .65s var(--ease); }
.pn-s { position: relative; isolation: isolate; flex: 0 0 100%; min-width: 0; height: 218px; padding: 14px 16px 13px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 0;
  border: 0; background: none; color: #fff; text-align: left; font-family: var(--cond); cursor: pointer; overflow: hidden; }
.pn-s img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); filter: brightness(1.25); transition: transform 1.4s var(--ease), filter .35s; }
.pn-s::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,.35) 40%, rgba(8,8,8,.94) 78%); }
.pn-s:hover img, .pn-s:focus-visible img { transform: scale(1.1); filter: brightness(1.45); }
.pn-s:focus-visible { outline: 2px solid var(--hl); outline-offset: -2px; }
.pn-meta { text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.9); display: flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 700; letter-spacing: .12em; color: #cfcbc2; font-variant-numeric: tabular-nums; }
.pn-meta > span + span::before { content: ''; display: inline-block; width: 3px; height: 3px; margin-right: 8px; background: var(--lab); vertical-align: middle; }
.pn-tag { font-style: normal; padding: 2px 7px; font-size: .66rem; letter-spacing: .14em; color: #111; background: var(--hl); }
.pn-t { margin-top: 7px; font-size: 1.62rem; font-weight: 700; line-height: 1; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.pn-p { margin-top: 6px; font-size: .95rem; font-weight: 500; line-height: 1.22; color: #c9c5bc; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-go { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--hl); }
.pn-gi { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.pn-s:hover .pn-gi { transform: translateX(5px); }
.pn-s.on .pn-meta, .pn-s.on .pn-t, .pn-s.on .pn-p, .pn-s.on .pn-go { animation: pnUp .55s var(--ease) both; }
.pn-s.on .pn-t { animation-delay: .06s; } .pn-s.on .pn-p { animation-delay: .12s; } .pn-s.on .pn-go { animation-delay: .18s; }
@keyframes pnUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pn-ar { position: absolute; top: 12px; z-index: 3; width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--bd2); background: rgba(10,10,10,.6); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s, background .15s; }
.pn-ar.r { right: 12px; } .pn-ar.l { right: 44px; }
.pn-view:hover .pn-ar, .pn-ar:focus-visible { opacity: 1; }
.pn-ar:hover { background: var(--hl); color: #111; border-color: var(--hl); }
.pn-ai { width: 14px; height: 14px; }
.pn-segs { display: flex; gap: 4px; margin-top: 2px; }
.pn-seg { position: relative; flex: 1; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; }
.pn-seg::before, .pn-seg u { content: ''; position: absolute; left: 0; top: 6px; height: 3px; }
.pn-seg::before { right: 0; background: rgba(255,255,255,.16); transition: background .15s; }
.pn-seg:hover::before { background: rgba(255,255,255,.32); }
.pn-seg u { width: 0; background: var(--hl); }
.pn-seg.past u { width: 100%; background: rgba(255,255,255,.5); }
.pn-seg.on u { animation: pnFill var(--pn-dur, 7s) linear forwards; }
.mm-news:hover .pn-seg.on u, .mm-news:focus-within .pn-seg.on u, .mm-news.hold .pn-seg.on u { animation-play-state: paused; }
@keyframes pnFill { from { width: 0; } to { width: 100%; } }

/* the right column only exists on the wide lobby layout */
.op.pnrow { display: none; margin-top: 0; }
@media (max-width: 1240px), (max-height: 560px) and (orientation: landscape) { .mm-news { display: none; } .op.pnrow { display: flex; } }
@media (max-height: 780px) { .pn-s { height: 184px; } .pn-t { font-size: 1.4rem; } }
@media (max-height: 640px) { .pn-s { height: 150px; } .pn-p { display: none; } }

/* ---------------------------------------------------------------- popup */
.mm-modal.pnm { align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(10,10,10,.72), rgba(0,0,0,.9)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pnm-box { position: relative; width: min(1080px, 100%); height: min(700px, 100%); display: grid; grid-template-columns: 268px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; outline: 0;
  background: linear-gradient(180deg, rgba(30,30,28,.98), rgba(12,12,11,.99)); border: 1px solid var(--bd2); box-shadow: 0 40px 120px rgba(0,0,0,.8); animation: stIn .38s var(--ease) both; }
.pnm-box::before, .pnm-box::after { content: ''; position: absolute; z-index: 4; width: 18px; height: 18px; pointer-events: none; border: 2px solid var(--hl); }
.pnm-box::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.pnm-box::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.pnm-box > .st-x { z-index: 5; background: rgba(10,10,10,.55); }
.pnm-box > .st-x i { position: absolute; inset: 0; }

/* left: version timeline */
.pnm-side { grid-row: 1 / 3; display: flex; flex-direction: column; min-height: 0; padding: 24px 0 18px 22px; border-right: 1px solid var(--bd); background: rgba(0,0,0,.28); }
.pnm-side > small { font-size: .74rem; font-weight: 700; letter-spacing: .26em; color: var(--lab); }
.pnm-side > h3 { margin: 4px 0 22px; font-size: 1.9rem; font-weight: 700; line-height: 1; letter-spacing: .02em; color: #fff; }
.pnm-tl { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden auto; }
.pnm-tl::before { content: ''; position: absolute; left: 6px; top: 22px; bottom: 22px; width: 1px; background: linear-gradient(180deg, var(--bd2), var(--bd) 70%, transparent); }
.pnm-v { position: relative; isolation: isolate; display: grid; grid-template-columns: 30px minmax(0, 1fr); row-gap: 1px; padding: 13px 14px 13px 0; border: 0; background: none; color: #a9a59c; text-align: left; font-family: var(--cond); cursor: pointer; transition: color .15s; }
.pnm-v::before { content: ''; position: absolute; inset: 0 0 0 22px; z-index: -1; background: linear-gradient(90deg, rgba(217,210,154,.22), transparent); border-right: 2px solid var(--hl); opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .3s var(--ease); }
.pnm-v.on::before { opacity: 1; transform: none; }
.pnm-v:hover { color: #fff; }
.pnm-nd { grid-row: 1 / 4; align-self: start; margin: 5px 0 0 1px; width: 11px; height: 11px; background: #1a1a18; border: 2px solid #6d6a63; transform: rotate(45deg); transition: background .2s, border-color .2s, box-shadow .2s; }
.pnm-v.on .pnm-nd { background: var(--hl); border-color: var(--hl); box-shadow: 0 0 0 4px rgba(217,210,154,.18), 0 0 14px rgba(217,210,154,.6); }
.pnm-vv { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 700; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pnm-v.on .pnm-vv { color: #fff; }
.pnm-vv em { font-style: normal; padding: 1px 5px; font-size: max(9.5px, .6rem); letter-spacing: .14em; color: #111; background: var(--hl); }
.pnm-vt { font-size: .86rem; font-weight: 600; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnm-v.on .pnm-vt { color: var(--hl); }
.pnm-vd { font-size: .72rem; font-weight: 600; letter-spacing: .12em; color: #7d7a73; }
.pnm-keys { display: flex; align-items: center; gap: 5px; padding-top: 12px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; color: #7d7a73; }
.pnm-keys kbd { min-width: 20px; padding: 1px 5px; text-align: center; font-family: var(--cond); font-size: .7rem; font-weight: 700; color: #111; background: #bdb9b0; border-radius: 2px; }
.pnm-keys span { margin-right: 8px; }

/* right: hero + grouped notes */
.pnm-main { min-width: 0; min-height: 0; overflow: hidden auto; }
.pnm-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; min-height: 236px; padding: 26px 70px 20px 30px; border-bottom: 1px solid var(--bd); }
.pnm-hero img { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; filter: brightness(1.35); animation: pnmKen 14s ease-out both; }
@keyframes pnmKen { from { transform: scale(1.14); } to { transform: scale(1.02); } }
.pnm-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(12,12,11,.95) 0%, rgba(12,12,11,.86) 48%, rgba(12,12,11,.25) 92%), linear-gradient(0deg, rgba(12,12,11,.85), transparent 55%); }
.pnm-big { position: absolute; right: 18px; bottom: -22px; z-index: -1; font-size: 9.5rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.2); font-variant-numeric: tabular-nums; pointer-events: none; }
.pnm-hero h2 { margin: 10px 0 0; font-family: var(--cond); font-size: clamp(2.2rem, 4.4vw, 3.3rem); font-weight: 700; line-height: .95; letter-spacing: .01em; color: #fff; text-shadow: 0 3px 18px rgba(0,0,0,.7); }
.pnm-hero p { margin: 10px 0 0; max-width: 520px; font-size: 1.08rem; font-weight: 500; line-height: 1.3; color: #d0ccc3; }
.pnm-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pnm-sum span { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px 4px 8px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; color: #d8d4cb; background: rgba(10,10,10,.6); border: 1px solid var(--bd); border-left: 2px solid var(--c); }
.pnm-sum b { font-size: 1.05rem; line-height: 1; color: var(--c); }
.t-new { --c: var(--t-new); } .t-improved { --c: var(--t-improved); } .t-balance { --c: var(--t-balance); } .t-fixed { --c: var(--t-fixed); }

.pnm-body { padding: 8px 30px 22px; }
.pnm-sec { display: grid; grid-template-columns: 148px minmax(0, 1fr); column-gap: 18px; padding: 16px 0; }
.pnm-sec + .pnm-sec { border-top: 1px solid var(--bd); }
.pnm-sec h4 { position: sticky; top: 12px; align-self: start; display: grid; grid-template-columns: 28px 1fr; align-items: center; column-gap: 9px; margin: 3px 0 0; font-family: var(--cond); }
.pnm-si { grid-row: 1 / 3; width: 28px; height: 28px; padding: 6px; color: #111; background: var(--c); }
.pnm-sec h4 span { font-size: .98rem; font-weight: 700; letter-spacing: .14em; line-height: 1; color: var(--c); }
.pnm-sec h4 em { font-style: normal; font-size: .7rem; font-weight: 600; letter-spacing: .12em; color: #7d7a73; }
.pnm-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pnm-sec li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 9px 14px 10px 16px; background: rgba(255,255,255,.035); border-left: 2px solid var(--c); transition: background .15s, transform .2s var(--ease); animation: pnmLi .45s var(--ease) both; animation-delay: calc(120ms + var(--i) * 45ms); }
.pnm-sec li:hover { background: rgba(255,255,255,.07); transform: translateX(3px); }
.pnm-sec li b { font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; line-height: 1.1; color: #fff; text-transform: uppercase; }
.pnm-sec li span { font-size: 1rem; font-weight: 500; line-height: 1.3; color: #bdb9b0; }
@keyframes pnmLi { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.pnm-main.in-r .pnm-hero > :not(img), .pnm-main.in-l .pnm-hero > :not(img) { animation: pnmHead .45s var(--ease) both; }
.pnm-main.in-l .pnm-hero > :not(img) { --dx: -18px; }
@keyframes pnmHead { from { opacity: 0; transform: translateX(var(--dx, 18px)); } to { opacity: 1; transform: none; } }

.pnm-foot { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 50px; padding: 0 30px; border-top: 1px solid var(--bd); background: rgba(0,0,0,.3); font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--lab); font-variant-numeric: tabular-nums; }
.pnm-foot button { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--bd2); background: rgba(255,255,255,.05); color: #e8e4da; font-family: var(--cond); font-size: .78rem; font-weight: 700; letter-spacing: .14em; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pnm-foot button:hover:not(:disabled) { background: var(--hl); border-color: var(--hl); color: #111; }
.pnm-foot button:disabled { opacity: .3; cursor: default; }
.pnm-fi { width: 13px; height: 13px; }

@media (max-width: 860px) {
  .mm-modal.pnm { padding: 10px; }
  .pnm-box { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .pnm-side { grid-row: auto; padding: 12px 54px 0 14px; border-right: 0; border-bottom: 1px solid var(--bd); }
  .pnm-side > small, .pnm-side > h3, .pnm-keys, .pnm-tl::before, .pnm-nd, .pnm-vt { display: none; }
  .pnm-tl { flex-direction: row; overflow: auto hidden; }
  .pnm-v { display: flex; flex-direction: column; padding: 8px 14px; }
  .pnm-v::before { inset: 0; border-right: 0; border-bottom: 2px solid var(--hl); }
  .pnm-foot { grid-column: 1; padding: 0 14px; }
  .pnm-hero { min-height: 180px; padding: 18px 16px 14px; } .pnm-big { font-size: 6rem; bottom: -14px; }
  .pnm-body { padding: 4px 14px 16px; } .pnm-sec { grid-template-columns: minmax(0, 1fr); row-gap: 8px; } .pnm-sec h4 { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .pn-track { transition: none; } .pn-dot, .pnm-hero img, .pnm-sec li, .pn-s.on > * { animation: none !important; }
}

/* short landscape screens (phones): compact popup so the notes get the room */
@media (max-height: 560px) and (orientation: landscape) {
  .mm-modal.pnm { padding: calc(6px + var(--sat)) calc(6px + var(--sar)) calc(6px + var(--sab)) calc(6px + var(--sal)); }
  .pnm-box { grid-template-columns: 196px minmax(0, 1fr); }
  .pnm-side { padding: 12px 0 8px 14px; } .pnm-side > h3 { margin-bottom: 8px; font-size: 1.35rem; } .pnm-keys { display: none; }
  .pnm-v { padding: 7px 10px 7px 0; } .pnm-vv { font-size: 1.1rem; } .pnm-vt { font-size: .74rem; } .pnm-tl::before { top: 14px; bottom: 14px; }
  .pnm-hero { min-height: 0; padding: 12px 56px 10px 16px; } .pnm-hero h2 { margin-top: 6px; font-size: 1.7rem; } .pnm-hero p { display: none; } .pnm-sum { margin-top: 8px; } .pnm-big { font-size: 5rem; bottom: -12px; }
  .pnm-body { padding: 2px 16px 12px; } .pnm-sec { grid-template-columns: 112px minmax(0, 1fr); column-gap: 10px; padding: 10px 0; }
  .pnm-sec li { padding: 6px 10px 7px 12px; } .pnm-sec li b { font-size: 1rem; } .pnm-sec li span { font-size: .9rem; line-height: 1.22; }
  .pnm-foot { height: 40px; padding: 0 16px; }
}
@media (max-height: 560px) and (orientation: landscape) and (max-width: 860px) {
  .pnm-box { grid-template-columns: minmax(0, 1fr); } .pnm-side { padding: 6px 50px 0 10px; } .pnm-v { padding: 5px 12px; }
  .pnm-sec { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
}

.pn-meta .pn-tag { text-shadow: none; }
