/* Wave 4 of the Korean, Japanese and Chinese pages (18 Nov 2026). Markup: zjk-wave4-build.mjs. Loaded after
   best-l10n/best-l10n.css and zjk-wave2/zjk-wave2.css (bands, tables, meters, code), which it does not change.
   1. The rotation panel (.zw4-rot, script zw4-rotator.js): six request rows of fixed height whose text changes; the
      exit address is violet when it is new and grey when it is the same as the request before; a bar shows the ttl.
   2. Small CJK/Hangul type fixes for the bands of these pages (phrase breaking in headings, keep-all for Korean). */

main.ig.zw4 .zw4-rot{margin:28px 0 0;padding:20px 22px 18px;background:#fff;border:1px solid var(--ig-line);border-radius:20px;box-shadow:var(--bl-card-shadow);max-width:100%;contain:layout paint}
main.ig.zw4 .zw4-rot-top{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;justify-content:space-between}
main.ig.zw4 .zw4-rot-modes{display:flex;flex-wrap:wrap;gap:6px;padding:4px;border-radius:14px;background:rgba(75,63,214,.07)}
html.qd-fresh main.ig.zw4 .zw4-rot-modes button{min-height:40px;padding:8px 14px;border:0;border-radius:10px;background:transparent;color:var(--ig-ink);font:inherit;font-size:14.5px;font-weight:600;line-height:1.3;cursor:pointer;transition:background .2s,color .2s,box-shadow .2s}
html.qd-fresh main.ig.zw4 .zw4-rot-modes button[aria-pressed="true"]{background:#fff;color:var(--bl-violet);box-shadow:0 1px 3px rgba(17,24,39,.12)}
main.ig.zw4 .zw4-rot-modes button:focus-visible,main.ig.zw4 .zw4-rot-btns button:focus-visible{outline:2px solid var(--bl-violet);outline-offset:2px}
html.qd-fresh main.ig.zw4 .zw4-rot-user{margin:0;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;font-size:13.5px;color:var(--ig-muted);min-width:0}
main.ig.zw4 .zw4-rot-user code{font:13.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--ig-ink);background:rgba(17,24,39,.05);padding:3px 8px;border-radius:8px;overflow-wrap:anywhere;word-break:break-all}
main.ig.zw4 .zw4-rot-user code b{font-weight:600;color:var(--bl-violet)}
main.ig.zw4 .zw4-rot-head,main.ig.zw4 .zw4-rot-log li{display:grid;grid-template-columns:84px minmax(150px,190px) minmax(0,1fr) 52px;gap:12px;align-items:center}
html.qd-fresh main.ig.zw4 .zw4-rot-head{margin:18px 0 0;padding:0 12px 8px;font-size:12.5px;font-weight:600;letter-spacing:.02em;color:var(--ig-muted);border-bottom:1px solid var(--ig-line)}
main.ig.zw4 .zw4-rot-head span:last-child{text-align:right}
main.ig.zw4 .zw4-rot-log{list-style:none;margin:0;padding:0}
html.qd-fresh main.ig.zw4 .zw4-rot-log li{height:44px;margin:0;padding:0 12px;border-bottom:1px solid var(--ig-line);font-size:14.5px;line-height:1.3;color:var(--ig-text);overflow:hidden;transition:background-color .6s ease}
main.ig.zw4 .zw4-rot-log li:last-child{border-bottom:0}
main.ig.zw4 .zw4-rot-log li > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main.ig.zw4 .zw4-n{color:var(--ig-muted);font-variant-numeric:tabular-nums}
main.ig.zw4 .zw4-ip{font:600 14px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--bl-violet);font-variant-numeric:tabular-nums}
main.ig.zw4 .zw4-rot-log li.is-same .zw4-ip{color:#6B7280}
main.ig.zw4 .zw4-ok{justify-self:end;font:600 13px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#047857;background:rgba(16,185,129,.12);padding:4px 7px;border-radius:7px}
main.ig.zw4 .zw4-rot-log li.is-empty .zw4-ok{background:none}
main.ig.zw4 .zw4-rot-log li.is-flash{background-color:rgba(75,63,214,.07)}
main.ig.zw4 .zw4-rot-bar{position:relative;height:6px;margin:12px 12px 0;border-radius:99px;background:rgba(75,63,214,.10);overflow:hidden}
main.ig.zw4 .zw4-rot-bar i{position:absolute;inset:0;border-radius:inherit;background:var(--bl-violet);transform-origin:0 50%;transform:scaleX(var(--f,0));transition:transform .6s cubic-bezier(.2,.8,.2,1)}
main.ig.zw4 .zw4-rot-bar[data-m="sticky"] i{background:#10B981}
main.ig.zw4 .zw4-rot-foot{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;margin:12px 0 0}
html.qd-fresh main.ig.zw4 .zw4-rot-cap{flex:1 1 22em;margin:0;min-height:3.1em;font-size:14.5px;line-height:1.6;color:var(--ig-text)}
main.ig.zw4 .zw4-rot-btns{display:flex;flex-wrap:wrap;gap:8px}
html.qd-fresh main.ig.zw4 .zw4-rot-btns button{min-height:44px;padding:9px 16px;border-radius:12px;border:1px solid var(--ig-line);background:#fff;color:var(--ig-ink);font:inherit;font-size:14.5px;font-weight:600;cursor:pointer;transition:border-color .2s,color .2s}
html.qd-fresh main.ig.zw4 .zw4-rot-btns button:hover:not(:disabled){border-color:var(--bl-violet);color:var(--bl-violet)}
main.ig.zw4 .zw4-rot-btns button:disabled{opacity:.45;cursor:default}
html.qd-fresh main.ig.zw4 .zw4-rot-note{margin:12px 0 0;font-size:13px;line-height:1.55;color:var(--ig-muted)}
main.ig.zw4 .zw4-rot:not(.is-live) .zw4-rot-btns{visibility:hidden}

@media (prefers-reduced-motion:reduce){
  main.ig.zw4 .zw4-rot-log li,main.ig.zw4 .zw4-rot-bar i,html.qd-fresh main.ig.zw4 .zw4-rot-modes button{transition:none}
}
@media (max-width:720px){
  main.ig.zw4 .zw4-rot{padding:16px 14px 14px;border-radius:16px}
  main.ig.zw4 .zw4-rot-modes{width:100%}
  html.qd-fresh main.ig.zw4 .zw4-rot-modes button{flex:1 1 0;padding:8px 6px;font-size:13.5px}
  main.ig.zw4 .zw4-rot-head{display:none}
  main.ig.zw4 .zw4-rot-log li{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:2px 10px;height:58px;padding:0 4px}
  main.ig.zw4 .zw4-n{grid-column:1;grid-row:1;font-size:12.5px}
  main.ig.zw4 .zw4-ip{grid-column:1;grid-row:2}
  main.ig.zw4 .zw4-at{grid-column:2;grid-row:1;justify-self:end;font-size:13px;color:var(--ig-muted);max-width:11em}
  main.ig.zw4 .zw4-ok{grid-column:2;grid-row:2}
  main.ig.zw4 .zw4-rot-bar{margin:10px 4px 0}
  html.qd-fresh main.ig.zw4 .zw4-rot-cap{min-height:4.8em;font-size:14px}
  main.ig.zw4 .zw4-rot-btns{width:100%}
  main.ig.zw4 .zw4-rot-btns button{flex:1 1 0}
}

/* 2. type: headings break between phrases (.nw), Korean keeps words whole, a figure stays with its unit (.zw4-nw) */
main.ig.zw4 .zw4-nw{white-space:nowrap}
@media (min-width:380px){main.ig.zw4 :is(h1,h2) .nw{display:inline-block}}
html:lang(ko) main.ig.zw4 :is(h2,h3,p,li,td,th,dt,dd,figcaption){word-break:keep-all;overflow-wrap:break-word}
html:lang(ja) main.ig.zw4 :is(h2,h3){word-break:auto-phrase}
html:is(:lang(zh),:lang(ja),:lang(ko)) main.ig.zw4 .zw4-rot-cap{line-height:1.7}
/* the Japanese trust row of the residential hero keeps "5日間" whole; on a phone it can take three lines before the
   web font has loaded and two after: its height is reserved so that nothing under it moves */
@media (max-width:720px){html:lang(ja) main.ig.zw4 #rhb .rhb-trust{min-height:4.35em}}
/* Japanese hero titles are three phrases on a desktop; before the Latin web font has loaded they can sit on two lines, so
   the three lines are reserved (no shift of the price block and the scene when the font arrives) */
@media (min-width:960px){html:lang(ja) main.ig.zw4 #rhb h1{min-height:3.72em}}
