/* 世界ゾンビ化計画（/zombie/・2026-11-11）: 入口はサイトの明るい地のまま、遊ぶ画面（.zb-game）は暗い地で画面全体を使う
   色: ゾンビ＝赤 --zr・血清＝青緑 --zc・ノウミソ＝桃 --zp・号令＝金 --zg。ニュースの映像は .zb-tv（テレビの画面の形） */
:root { --zr: #ff3b4a; --zr2: #c21a2a; --zc: #3fd0c0; --zp: #ff8fbf; --zg: #ffcf5a; --zbg: #070c15; --zpanel: #111a29; --zline: #24324a; --zink: #e8eef8; --zmut: #93a1b8; }

/* ── 入口 ── */
.zb-top { display: grid; gap: 16px; padding-top: 8px; }
.zb-hero { position: relative; margin: 0; border-radius: 20px; overflow: hidden; background: #0a0f18; aspect-ratio: 16 / 9; box-shadow: 0 18px 40px -24px rgba(10, 14, 24, .9); }
.zb-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.zb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 14, 0) 35%, rgba(5, 8, 14, .85)); }
.zb-hero-cap { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: grid; gap: 2px; color: #fff; }
.zb-eb { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #ff8f96; }
.zb-hero-cap b { font-family: var(--f-round); font-size: clamp(26px, 8vw, 40px); line-height: 1.15; letter-spacing: .02em; text-shadow: 0 2px 18px rgba(255, 40, 60, .55); }
.zb-top .lead b { color: var(--zr2); }
.zb-start { display: grid; gap: 10px; }
.zb-start .btn.go { --go: #d9232f; --go-step: #8f1019; --go-soft: rgba(143, 16, 25, .5); }
.zb-note { font-size: 13px; color: var(--muted); }
.zb-h2 { font-size: 20px; margin-top: 12px; }
.zb-how { margin: 0; padding: 0; list-style: none; counter-reset: zb; display: grid; gap: 10px; }
.zb-how li { counter-increment: zb; position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 50px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.zb-how li::before { content: counter(zb); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1a2333; color: #fff; font: 800 14px/1 var(--f-round); }
.zb-how b { font-size: 15.5px; }
.zb-how span { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }
.zb-shot { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zb-shot img { width: 100%; height: auto; border-radius: 12px; display: block; }
.zb-faq details { border-bottom: 1px solid var(--line); padding: 10px 2px; }
.zb-faq summary { cursor: pointer; font-weight: 700; }
.zb-faq p { margin-top: 6px; font-size: 14px; color: var(--ink2); }

/* ── 遊ぶ画面 ── */
html.zb-lock, html.zb-lock body { overflow: hidden; overscroll-behavior: none; }
.zb-game { position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; background: var(--zbg); color: var(--zink); font-family: var(--f-body); line-height: 1.5; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.zb-game[hidden] { display: none; }
.zb-game button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.zb-hud { display: flex; align-items: center; gap: 8px; padding: max(6px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px)); background: #0b1220; border-bottom: 1px solid var(--zline); }
.zb-hud-l { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.zb-day { font: 800 17px/1.2 var(--f-round); font-variant-numeric: tabular-nums; }
.zb-sname { font-size: 11.5px; color: var(--zmut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zb-brains { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid #5a2f45; background: #2a1522; }
.zb-brains b { font: 800 16px/1 var(--f-round); color: var(--zp); font-variant-numeric: tabular-nums; min-width: 1.4em; text-align: left; }
.zb-speed { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--zline); }
.zb-speed button { border: 0; background: #0f1828; padding: 7px 7px; font-size: 10.5px; letter-spacing: -.12em; min-width: 30px; color: var(--zmut); }
.zb-speed button[aria-checked="true"] { background: #e8eef8; color: #0b1220; }
.zb-menu-btn { display: grid; gap: 3px; place-content: center; width: 36px; height: 34px; border: 1px solid var(--zline); border-radius: 10px; background: #0f1828; }
.zb-menu-btn i { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--zink); }
.zb-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 12px; background: #0a101c; border-bottom: 1px solid var(--zline); font-size: 12px; }
.zb-cure { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.zb-cure span { color: var(--zc); font-weight: 800; }
.zb-cure i { position: relative; height: 8px; border-radius: 8px; background: #16243a; overflow: hidden; }
.zb-cure i b { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #2aa596, var(--zc)); border-radius: 8px; transition: width .4s; }
.zb-cure em { font: 800 13px/1 var(--f-round); font-style: normal; color: var(--zc); min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.zb-stats.done .zb-cure i b { background: linear-gradient(90deg, #6ae3ff, #b6f4ff); animation: zb-blink 1.4s infinite; }
.zb-nums { display: flex; justify-content: space-between; gap: 6px; color: var(--zmut); }
.zb-nums b { margin-left: 4px; font: 800 13px/1 var(--f-round); color: var(--zink); font-variant-numeric: tabular-nums; }
.zb-nums .z b { color: #ff7b85; }
/* ゾンビの能力の位（stats.js の E〜S）。上の帯・進化の画面・世界・おわりで同じ色 */
.rk { display: inline-grid; place-items: center; min-width: 1.4em; padding: 0 .2em; border-radius: 5px; font: 900 11.5px/1.4 var(--f-round); color: #0b1220; background: #4a5568; }
.rk-S { background: linear-gradient(180deg, #ffe993, #f0b12c); }
.rk-A { background: #ff6670; }
.rk-B { background: #ffa04a; }
.rk-C { background: #d6e06a; }
.rk-D { background: #8094b2; }
.rk-E { background: #334055; color: #b9c6da; }
.zb-abl { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 1px 0 0; border: 0; background: none; text-align: left; }
.zb-abl-c { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--zmut); white-space: nowrap; }
.zb-abl-c.tot { padding-right: 6px; border-right: 1px solid var(--zline); color: var(--zink); font-weight: 800; }
.zb-abl-c.up .rk { animation: zb-rkup 1.4s ease-out 3; }
@keyframes zb-rkup { 0% { transform: scale(1.4); box-shadow: 0 0 0 0 rgba(255, 255, 255, .9); } 100% { transform: none; box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.zb-mapbox { position: relative; min-height: 0; overflow: hidden; }
#zb-map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; cursor: grab; }
.zb-mapbtns { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.zb-mapbtns button { border: 1px solid var(--zline); background: rgba(10, 16, 28, .85); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.zb-banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 90px); padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(255, 207, 90, .96); color: #1b1405; font-weight: 800; font-size: 13.5px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .8); animation: zb-pop .25s ease-out; }
.zb-banner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zb-banner button { flex: none; border: 0; border-radius: 999px; padding: 4px 10px; background: #1b1405; color: #fff !important; font-size: 12px; }
.zb-banner button[hidden] { display: none; }
.zb-toast { position: absolute; left: 50%; top: 54px; /* 下は地域のカードが出るので、上の帯（.zb-banner）のすぐ下に */ transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 9px 14px; border-radius: 12px; background: rgba(232, 238, 248, .96); color: #0b1220; font-size: 13.5px; font-weight: 700; text-align: center; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9); pointer-events: none; }
.zb-toast.in { animation: zb-pop .25s ease-out; }
.zb-card { position: absolute; left: 10px; right: 10px; bottom: 10px; max-width: 420px; margin-inline: auto; padding: 12px 14px; border-radius: 16px; background: rgba(17, 26, 41, .97); border: 1px solid var(--zline); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .9); display: grid; gap: 6px; animation: zb-up .2s ease-out; }
.zb-cd-t { font: 800 17px/1.3 var(--f-round); }
.zb-cd-s { font-size: 12.5px; color: var(--zmut); }
.zb-cd-p { font-size: 12.5px; color: #c4cfe0; }
.zb-cd-p b { color: var(--zg); }
.zb-cd-dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0; }
.zb-cd-dl div { display: grid; padding: 6px 4px; border-radius: 10px; background: #0b1322; text-align: center; }
.zb-cd-dl dt { font-size: 11px; color: var(--zmut); }
.zb-cd-dl dd { margin: 0; font: 800 14px/1.3 var(--f-round); }
.zb-cd-dl dd.z { color: #ff7b85; }
.zb-cd-btns { display: grid; gap: 6px; margin-top: 2px; }
.zb-lv { justify-self: start; display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: #1d2a40; color: #b9c6da; }
.zb-lv.a1 { background: #3b3410; color: #ffe27a; }
.zb-lv.a2 { background: #4a2a0c; color: #ffb35c; }
.zb-lv.a3 { background: #4d1414; color: #ff8a8a; }
.zb-lv.collapsed { background: #5d0e1a; color: #fff; }
.zb-lv.fallen { background: #000; color: #ff5a64; border: 1px solid #5d0e1a; }
.zb-ticker { display: flex; align-items: stretch; height: 32px; background: #0e1726; border-top: 1px solid var(--zline); overflow: hidden; }
.zb-tk-tag { flex: none; display: grid; place-items: center; padding: 0 10px; background: var(--zr2); color: #fff; font: 800 11px/1 var(--f-round); letter-spacing: .12em; }
.zb-tk-in { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; padding-left: 10px; }
#zb-tk { white-space: nowrap; font-size: 13px; font-weight: 600; color: #f1f5fb; }
/* テロップの速報（映像にしなかった大きなできごと） */
.zb-ticker.alert { background: #3a0d15; }
.zb-ticker.alert .zb-tk-tag { background: #ff2a3a; animation: zb-blink .7s 3; }
.zb-ticker.alert #zb-tk { color: #fff; font-weight: 800; }
@keyframes zb-tk-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes zb-tk-scroll { from { transform: translateX(0); } to { transform: translateX(var(--tk-x)); } }
.zb-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px max(8px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: #0b1220; border-top: 1px solid var(--zline); }
.zb-nav button { position: relative; display: grid; justify-items: center; gap: 0; padding: 6px 2px; border: 1px solid var(--zline); border-radius: 12px; background: #111b2c; min-height: 52px; }
.zb-nav button:active { transform: translateY(1px); }
.zb-ic { font-size: 19px; line-height: 1.2; }
.zb-nav b { font-size: 12.5px; }
.zb-nav small { position: absolute; top: 4px; right: 6px; font: 700 10px/1 var(--f-round); color: var(--zg); }
.zb-dot { position: absolute; top: 6px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--zp); box-shadow: 0 0 0 3px rgba(255, 143, 191, .25); animation: zb-blink 1.2s infinite; }
.zb-dot[hidden] { display: none; }
#zb-stance[data-st="hide"] { border-color: #4b3f86; }
#zb-stance[data-st="rage"] { border-color: #8c2530; background: #2a1016; }

/* ── 下から出る画面 ── */
.zb-sheet { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 5, 10, .6); animation: zb-fade .15s ease-out; }
.zb-sheet[hidden] { display: none; }
.zb-sheet-in { width: 100%; max-width: 600px; max-height: 90%; overflow: auto; overscroll-behavior: contain; padding: 14px 16px max(18px, env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--zpanel); border: 1px solid var(--zline); border-bottom: 0; animation: zb-up .22s ease-out; user-select: text; -webkit-user-select: text; }
.zb-sh-head { position: sticky; top: -14px; z-index: 2; display: flex; align-items: center; gap: 10px; margin: -14px -16px 10px; padding: 14px 16px 10px; background: var(--zpanel); border-bottom: 1px solid var(--zline); }
.zb-sh-head h2 { flex: 1; font-size: 19px; }
.zb-sh-bn { font-size: 14px; color: var(--zp); }
.zb-sh-bn b { font: 800 18px/1 var(--f-round); }
.zb-x { border: 0; background: #1c2840; border-radius: 50%; width: 34px; height: 34px; font-size: 14px; }
.zb-h3 { font-size: 13px; color: var(--zmut); margin: 14px 0 6px; font-weight: 800; letter-spacing: .04em; }
.zb-b { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid #33445f; background: #1a2539; font-weight: 800; font-size: 14.5px; text-decoration: none; color: var(--zink); }
.zb-b.red { background: linear-gradient(180deg, #e2333f, #b81d2a); border-color: #ff6670; color: #fff; }
.zb-b.big { min-height: 52px; font-size: 16px; }
.zb-b.sm { width: auto; min-height: 36px; padding: 4px 12px; font-size: 13px; }
.zb-b[disabled] { opacity: .45; cursor: default; }
.zb-b.x { background: #000; border-color: #333; }
.zb-b.line { background: #06c755; border-color: #06c755; color: #fff; }
.zb-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.zb-seg button { display: grid; gap: 2px; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--zline); background: #0d1626; text-align: center; }
.zb-seg button small { font-size: 11px; color: var(--zmut); line-height: 1.35; }
.zb-seg button[aria-checked="true"] { border-color: #fff; background: #1d2a42; }
.zb-seg.sm button { padding: 7px 6px; font-size: 13px; font-weight: 700; }
.zb-seg.st3 button[data-id="rage"][aria-checked="true"] { border-color: var(--zr); background: #3a1118; }
.zb-seg.st3 button[data-id="hide"][aria-checked="true"] { border-color: #a596ff; background: #231d45; }
.zb-tip { font-size: 12.5px; color: var(--zmut); margin: 8px 0; }
.zb-tip b.r { color: #ff7b85; }
.zb-empty { font-size: 13px; color: var(--zmut); }

/* はじめ方 */
.zb-strains { display: grid; gap: 8px; }
.zb-strain { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--zline); background: #0d1626; }
.zb-strain-ic { grid-row: span 3; font-size: 30px; text-align: center; }
.zb-strain b { font-size: 16px; color: var(--sc); filter: brightness(1.35); }
.zb-strain small { font-size: 12.5px; color: #c4cfe0; line-height: 1.5; }
.zb-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.zb-tags i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #1a2539; color: #b9c6da; }
.zb-strain[aria-checked="true"] { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 16%, #0d1626); }
.zb-namebox { display: flex; gap: 6px; }
.zb-namebox input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--zline); background: #0b1322; color: var(--zink); font-size: 16px; }
.zb-namebox button { width: 44px; border-radius: 12px; border: 1.5px solid var(--zline); background: #1a2539; font-size: 18px; }
.setup .btn.go { margin-top: 16px; --go: #d9232f; --go-step: #8f1019; --go-soft: rgba(0, 0, 0, .6); }

/* 進化 */
.zb-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zb-tabs button { padding: 8px; border-radius: 12px; border: 1.5px solid var(--zline); background: #0d1626; font-weight: 800; }
.zb-tabs button[aria-selected="true"] { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 22%, #0d1626); }
.zb-br-lead { font-size: 12.5px; color: var(--zmut); margin: 8px 2px; }
.zb-tree { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), auto); gap: 18px 12px; padding: 6px 2px 10px; }
.zb-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.zb-lines .ln { fill: none; stroke: #2c3a52; stroke-width: 3; }
.zb-lines .ln.own { stroke: var(--bc); }
.zb-node { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 80px; padding: 8px 4px; border-radius: 16px; border: 2px solid #2c3a52; background: #131d2e; text-align: center; }
.zb-node-ic { font-size: 24px; line-height: 1.2; }
.zb-node b { font-size: 12px; line-height: 1.3; }
.zb-node small { font: 700 11px/1.2 var(--f-round); color: var(--zp); }
.zb-node.own { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 30%, #131d2e); }
.zb-node.own small { color: #fff; }
.zb-node.can { border-color: #e8eef8; box-shadow: 0 0 0 0 rgba(255, 143, 191, .6); animation: zb-glow 1.6s infinite; }
.zb-node.lock { opacity: .45; }
.zb-node.sel { outline: 3px solid #fff; outline-offset: 2px; }
.zb-detail { position: sticky; z-index: 3; /* 進化のボタン（z-index 1）より前に */ bottom: calc(-1 * max(18px, env(safe-area-inset-bottom, 0px))); display: grid; gap: 6px; margin: 4px -16px calc(-1 * max(18px, env(safe-area-inset-bottom, 0px))); padding: 12px 16px max(14px, env(safe-area-inset-bottom, 0px)); background: #0c1422; border-top: 1px solid var(--zline); }
.zb-dt-h { display: flex; align-items: center; gap: 8px; }
.zb-dt-ic { font-size: 22px; }
.zb-dt-h b { font-size: 16px; }
.zb-act { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #3b2f0b; color: var(--zg); }
.zb-detail p { font-size: 13.5px; color: #c4cfe0; }
.zb-detail .zb-dt-up { font-size: 12.5px; color: var(--zmut); }
.zb-detail .zb-dt-up b { color: var(--zg); }
.zb-node-up { font-style: normal; font-size: 10px; line-height: 1.25; color: #ffd98a; }
.zb-node.lock .zb-node-up { color: var(--zmut); }
/* 能力の6本の棒（進化の画面の上・おわり）。黄色＝えらんだ進化で上がる分 */
.zb-ablp { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; border-radius: 14px; background: #0b1322; border: 1px solid var(--zline); text-align: left; }
.zb-ablp-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.zb-ablp-h span { display: flex; align-items: center; gap: 5px; color: var(--zmut); font-size: 12px; font-weight: 700; }
.zb-ablp-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.zb-ar { display: grid; grid-template-columns: 4.9em minmax(0, 1fr) 3.5em; align-items: center; gap: 6px; font-size: 11.5px; }
.zb-ar-n { white-space: nowrap; color: #c4cfe0; font-weight: 700; }
.zb-ar-n i { font-style: normal; margin-right: 2px; }
.zb-ar.on .zb-ar-n { color: var(--zg); }
.zb-ar-bar { position: relative; height: 7px; border-radius: 6px; background: #1a2539; overflow: hidden; }
.zb-ar-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #b8213a, var(--zr)); }
.zb-ar-bar i.up { border-radius: 0 6px 6px 0; background: var(--zg); animation: zb-blink 1.2s infinite; }
.zb-ar.got .zb-ar-bar { animation: zb-barup 1.1s ease-out 2; }
@keyframes zb-barup { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 90, .95); } 100% { box-shadow: 0 0 0 6px rgba(255, 207, 90, 0); } }
.zb-ar-r { display: flex; align-items: center; gap: 2px; }
.zb-ar-r em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--zg); }

/* 号令 */
.zb-orders { display: grid; gap: 6px; }
.zb-order { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #0b1322; border: 1px solid #4a3c12; }
.zb-order span { display: grid; font-size: 13.5px; }
.zb-order b { color: var(--zg); }
.zb-order small { color: var(--zmut); font-size: 11.5px; }
.zb-abil { display: grid; gap: 6px; }
.zb-ab { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #0b1322; border: 1px solid var(--zline); }
.zb-ab.lock { opacity: .5; }
.zb-ab-ic { font-size: 22px; text-align: center; }
.zb-ab-t { display: grid; }
.zb-ab-t b { font-size: 14px; }
.zb-ab-t small { font-size: 11.5px; color: var(--zmut); line-height: 1.45; }
.zb-cd { font-size: 11.5px; color: var(--zmut); white-space: nowrap; }

/* 世界 */
.zb-wsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.zb-wsum span { display: grid; justify-items: center; padding: 6px 2px; border-radius: 10px; background: #0b1322; font-size: 11.5px; color: var(--zmut); }
.zb-wsum b { font: 800 17px/1.25 var(--f-round); color: var(--zink); }
.zb-wsum small { font-size: 10px; }
.zb-rkguide { margin: 0 0 8px; font-size: 12.5px; line-height: 1.9; color: #c4cfe0; }
.zb-rkguide small { color: var(--zmut); font-size: 12px; }
.zb-wlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.zb-wlist button { width: 100%; display: grid; grid-template-columns: minmax(0, 7.5em) auto minmax(40px, 1fr) minmax(0, 4.8em); align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; background: #0b1322; text-align: left; font-size: 12.5px; }
.zb-wlist button:active { border-color: #fff; }
.zb-wn { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zb-wbar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: #000; }
.zb-wbar i, .lg { display: block; height: 100%; }
.zb-wbar .a, .lg.a { background: #8fb0d4; }
.zb-wbar .z, .lg.z { background: var(--zr); }
.zb-wbar .d, .lg.d { background: #3b3540; }
.lg.c { background: var(--zc); }
.zb-wz { font: 700 11.5px/1 var(--f-round); color: #ff9aa2; text-align: right; white-space: nowrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin: 0 3px 0 0; }

/* メニュー */
.zb-menu { display: grid; gap: 8px; }
.zb-hints { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 13px; color: #c4cfe0; }
.zb-hints b { color: var(--zg); }

/* おわり */
.zb-end { display: grid; gap: 10px; text-align: center; padding-top: 6px; }
.zb-end-eb { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--zr); }
.zb-end.lose .zb-end-eb { color: var(--zc); }
.zb-end h2 { font-size: 22px; }
.zb-rank { display: flex; align-items: center; justify-content: center; gap: 10px; }
.zb-rank b { font: 900 56px/1 var(--f-round); color: var(--zr); text-shadow: 0 0 24px rgba(255, 59, 74, .6); }
.zb-rank span { display: grid; text-align: left; font-weight: 800; }
.zb-rank small { font-size: 12px; color: var(--zmut); font-weight: 600; }
.zb-end-lead { font-size: 14px; color: #c4cfe0; }
.zb-end-lead b { font-size: 20px; color: var(--zr); }
.zb-end-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.zb-end-dl div { display: grid; gap: 2px; padding: 8px 4px; border-radius: 12px; background: #0b1322; }
.zb-end-dl dt { font-size: 11px; color: var(--zmut); }
.zb-end-dl dd { margin: 0; font: 800 14px/1.3 var(--f-round); }
.zb-chart { margin: 4px 0; display: grid; gap: 4px; }
.zb-chart svg { width: 100%; height: auto; background: #0b1322; border-radius: 12px; }
.zb-chart path { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.zb-chart .a { stroke: #8fb0d4; }
.zb-chart .z { stroke: var(--zr); }
.zb-chart .c { stroke: var(--zc); stroke-dasharray: 4 4; }
.zb-chart figcaption { font-size: 11.5px; color: var(--zmut); }
.zb-best { font-size: 13px; color: var(--zg); font-weight: 800; }
.zb-share { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.zb-share .zb-b { font-size: 13px; padding: 6px; }

/* ── ニュースの速報（テレビの画面）── */
.zb-tv { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(1, 3, 7, .88); cursor: pointer; }
.zb-tv[hidden] { display: none; }
.zb-tv-frame { position: relative; width: min(100%, 920px, calc((100dvh - 190px) * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000; box-shadow: 0 0 0 1px #2a3446, 0 30px 80px -30px rgba(0, 0, 0, 1); container-type: inline-size; }
.zb-tv-pic { position: absolute; inset: 0; overflow: hidden; }
.zb-tv-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: var(--kb-x, 50%) var(--kb-y, 50%); }
.zb-tv.on .zb-tv-pic img { animation: zb-kb 9s ease-out both; }
.zb-tv-fx { position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); mix-blend-mode: normal; }
.zb-tv-frame.dire .zb-tv-fx { background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, rgba(120, 0, 10, .05) 40%, rgba(90, 0, 10, .6) 100%); }
.zb-tv.on .zb-tv-fx { animation: zb-flicker .6s steps(6) both; }
.zb-tv-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 1.2cqi; padding: 1.6cqi 2cqi; background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); font-size: max(10px, 1.9cqi); color: #fff; }
.zb-tv-logo { padding: .3em .55em; border-radius: 4px; background: var(--zr2); font: 900 1.05em/1 var(--f-round); letter-spacing: .06em; }
.zb-tv-ch { font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zb-live { margin-left: auto; font-style: normal; font-weight: 900; color: #ff4b57; animation: zb-blink 1s infinite; }
.zb-tv-day { font: 700 1em/1 var(--f-round); color: #dbe4f2; }
.zb-tv-inset { position: absolute; right: 2cqi; top: 8.5cqi; width: 24cqi; height: auto; aspect-ratio: 12 / 7; border: 2px solid rgba(255, 255, 255, .85); border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .6); }
.zb-tv-inset[hidden] { display: none; }
.zb-tv-lower { position: absolute; left: 0; right: 0; bottom: 6.4cqi; display: flex; align-items: stretch; gap: 0; padding: 0 2cqi; }
.zb-tv-tag { flex: none; display: grid; place-items: center; padding: 0 1.4cqi; background: #e01f2e; color: #fff; font: 900 max(11px, 2.6cqi)/1 var(--f-round); letter-spacing: .1em; }
.zb-tv-head { flex: 1; min-width: 0; padding: 1cqi 1.6cqi; background: linear-gradient(90deg, rgba(8, 14, 26, .95), rgba(8, 14, 26, .78)); color: #fff; font-size: max(14px, 3.7cqi); line-height: 1.3; font-weight: 800; text-wrap: balance; }
.zb-tv.on .zb-tv-lower { animation: zb-wipe .5s .25s cubic-bezier(.2, .8, .2, 1) both; }
.zb-tv-crawl { position: absolute; left: 0; right: 0; bottom: 0; height: 5.2cqi; min-height: 18px; display: flex; align-items: center; overflow: hidden; background: #0d1b2e; color: #dbe4f2; font-size: max(10px, 2cqi); font-weight: 700; white-space: nowrap; }
.zb-tv-crawl span { padding-left: 100%; animation: zb-crawl 16s linear infinite; }
.zb-tv-sub { width: min(100%, 920px); color: #d7deea; font-size: 14.5px; line-height: 1.7; }
.zb-tv.on .zb-tv-sub { animation: zb-fade .6s .5s both; }
.zb-tv-close { border: 1px solid #3a475e; background: transparent; color: #aab6c8 !important; border-radius: 999px; padding: 6px 18px; font-size: 13px; }

@keyframes zb-kb { from { transform: scale(1.03); } to { transform: scale(1.16); } }
@keyframes zb-flicker { 0% { background-color: rgba(255, 255, 255, .5); } 40% { background-color: rgba(255, 255, 255, .08); } 100% { background-color: transparent; } }
@keyframes zb-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes zb-crawl { to { transform: translateX(-100%); } }
@keyframes zb-blink { 50% { opacity: .35; } }
@keyframes zb-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 191, .55); } 50% { box-shadow: 0 0 0 6px rgba(255, 143, 191, 0); } }
@keyframes zb-pop { from { opacity: 0; transform: translateX(-50%) scale(.92); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes zb-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zb-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zb-tv.on .zb-tv-pic img, .zb-tv-crawl span, .zb-live, .zb-dot, .zb-node.can, .zb-abl-c.up .rk, .zb-ar-bar i.up, .zb-ar.got .zb-ar-bar, .zb-ticker.alert .zb-tk-tag { animation: none !important; } }

/* 横に広い画面: 数字を1行に、パネルを右に寄せる */
@media (min-width: 760px) {
  .zb-stats { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; column-gap: 18px; }
  .zb-abl { gap: 8px; }
  .zb-nav { grid-template-columns: repeat(4, minmax(0, 150px)); justify-content: center; }
  .zb-sheet { justify-content: flex-end; align-items: stretch; }
  .zb-sheet-in { max-width: 460px; max-height: 100%; border-radius: 0; border-bottom: 1px solid var(--zline); border-right: 0; animation: zb-left .22s ease-out; }
  .zb-sheet-in.setup, .zb-sheet-in.end { max-width: 560px; margin: auto; max-height: 94%; border-radius: 20px; border: 1px solid var(--zline); animation: zb-up .22s ease-out; }
  .zb-sheet:has(.setup, .end) { align-items: center; justify-content: center; }
  .zb-speed button { padding: 7px 10px; min-width: 36px; }
}
@keyframes zb-left { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
/* 低い窓（スマホの横向き）: 数字の段と下のボタンを薄く */
@media (max-height: 500px) {
  .zb-stats { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 3px 12px; }
  .zb-abl { grid-column: 1 / -1; justify-content: flex-start; gap: 16px; }
  .zb-nav button { min-height: 40px; display: flex; justify-content: center; align-items: center; gap: 6px; }
  .zb-ic { font-size: 16px; }
  .zb-ticker { height: 26px; }
  .zb-hud { padding-top: max(3px, env(safe-area-inset-top, 0px)); padding-bottom: 3px; }
  .zb-tv { padding: 8px; gap: 6px; }
  .zb-tv-frame { width: min(100%, calc((100dvh - 110px) * 16 / 9)); }
  .zb-tv-sub { font-size: 13px; }
}
