/* The Horizon: a strip above the board (players near your rating + the gatekeepers) and the boss/gatekeeper fight scene. Scoped under #horizon. */
#horizon { --orange: #f26b2b; --ink: #172033; position: relative; height: var(--hzh, 140px); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(23,32,51,.18); isolation: isolate; background: #222;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#horizon[hidden] { display: none; }
#horizon svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .26s; }
#horizon .redsky { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(96,0,10,.66), rgba(170,18,14,.42) 55%, rgba(210,40,20,.2)); opacity: 0; transition: opacity .6s; }
#horizon.fightv .redsky, #horizon.bossin .redsky { opacity: 1; } #horizon.bossout .redsky { opacity: 0; }
#horizon.fightv { box-shadow: 0 0 0 2px rgba(226,28,28,.75), 0 0 18px 4px rgba(226,28,28,.55); }
#hzfigs { position: absolute; inset: 0; z-index: 2; transition: opacity .55s, transform .55s; }
#horizon.bossin #hzfigs { opacity: 0; transform: translateY(14px); } #horizon.bossin { animation: hzshake .5s; }
#horizon.fightv #hzfigs { opacity: 0; pointer-events: none; } #horizon.fightv .hzleg, #horizon.bossin .hzleg { opacity: 0; }
#horizon .fig { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; transition: opacity .4s; cursor: pointer; }
#horizon .fig.newf { opacity: 0; }
#horizon .fig .av { display: block; }
#horizon .fig .lbl { order: -1; position: relative; margin-bottom: calc(1px + var(--lift, 0px)); display: grid; justify-items: center; line-height: 1.1; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif; background: rgba(10,8,20,.42); border-radius: 5px; padding: 0 3px 1px; }
#horizon .fig .lbl::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--lift, 0px); background: rgba(255,255,255,.6); }
#horizon .fig .lbl .nm { display: flex; align-items: center; gap: 2px; max-width: var(--lw, 37px); white-space: nowrap; font-size: 9px; font-weight: 600; }
#horizon .fig .lbl .nm .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#horizon .fig .lbl .rt { display: flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 800; color: #ffe2b8; font-variant-numeric: tabular-nums; }
#horizon .on, #horizon .off, #hzcard .on, #hzcard .off { flex: none; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 0 2px rgba(0,0,0,.45); display: inline-block; }
#horizon .on, #hzcard .on { background: #22c55e; } #horizon .off, #hzcard .off { background: #e5484d; }
#horizon .lock { flex: none; font-size: 8px; line-height: 1; }
#horizon .mk { display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; font: 900 9px/1 "Segoe UI", sans-serif; color: #fff; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); flex: none; }
#horizon .mk.ok { background: #1f8a46; } #horizon .mk.no { background: #d1281f; } #horizon .mk.none { background: transparent; border-color: transparent; box-shadow: none; }
#horizon .fig.far { opacity: var(--o); }
#horizon .fig.you { z-index: 4; } #horizon .fig.you .av, #horizon .bme .av { filter: drop-shadow(0 0 1.2px #fff) drop-shadow(0 0 5px rgba(242,107,43,.95)); }
#horizon .fig.you .lbl { background: var(--orange); box-shadow: 0 0 0 1.5px #fff, 0 2px 8px rgba(0,0,0,.45); text-shadow: none; padding: 1px 5px 2px; }
#horizon .fig.you .lbl .nm { --lw: 70px; font-weight: 800; } #horizon .fig.you .lbl .rt { color: #fff; } #horizon .fig.you .lbl .rt small { font-size: 8px; font-weight: 800; letter-spacing: .06em; margin-left: 2px; }
#horizon .fig.gk { z-index: 3; } #horizon .fig.gk .lbl { background: rgba(30,24,40,.88); border: 1px solid #cfd6de; padding: 1px 4px; text-shadow: none; }
#horizon .fig.gk .lbl .nm { --lw: 62px; font-size: 8px; } #horizon .fig.gk .lbl .rt { color: #ffd27a; font-size: 9.5px; }
#horizon .fig.gk .tomb { filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
#horizon .fig.gk.dead .lbl { border-color: #9aa3ad; } #horizon .fig.gk.dead .lbl .rt { color: #c9ced6; }
#horizon .hzleg { position: absolute; bottom: 3px; right: 4px; left: 4px; font: 600 8px/1.25 "Segoe UI", sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9); z-index: 4; display: flex; gap: 4px; align-items: center; justify-content: space-between; pointer-events: none; white-space: nowrap; transition: opacity .4s; }
#horizon .hzleg > span { display: inline-flex; align-items: center; gap: 2px; background: rgba(10,8,20,.5); border-radius: 4px; padding: 0 3px; } #horizon .hzleg .mid { gap: 5px; } #horizon .hzleg .mid > span { display: inline-flex; align-items: center; gap: 2px; }
#horizon .hzleg .mk { width: 10px; height: 10px; font-size: 7px; border-width: 1px; }
#hznote { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); z-index: 3; font: 700 11px/1.3 "Segoe UI", sans-serif; color: #fff; background: rgba(10,8,20,.55); border-radius: 8px; padding: 3px 9px; white-space: nowrap; pointer-events: none; } #hznote[hidden] { display: none; }
/* fight scene */
#hzboss { position: absolute; inset: 0; z-index: 3; transition: opacity .6s; pointer-events: none; } #horizon.bossout #hzboss { opacity: 0; }
#horizon .boss2 { position: absolute; transform: translate(-50%, -100%); z-index: 3; display: flex; flex-direction: column; align-items: center; } #horizon .boss2 .bspr { display: block; transform-origin: 50% 100%; }
#horizon .boss2.gfoe .bspr { filter: drop-shadow(0 0 8px rgba(255,60,30,.7)); }
#horizon .boss2.drop .bspr { animation: hzbdrop .7s cubic-bezier(.3,1.5,.5,1); } @keyframes hzbdrop { from { transform: translateY(-80px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
#horizon .boss2.poof { animation: hzpoof 1.1s forwards; } @keyframes hzpoof { 0% { transform: translate(-50%,-100%); } 30% { transform: translate(-50%,-100%) scale(1.12) rotate(-6deg); filter: brightness(2); } 100% { transform: translate(-50%,-100%) scale(.05) rotate(40deg); opacity: 0; } }
#horizon .boss2.gloat .bspr { animation: hzgloat .3s ease-in-out 4 alternate; } @keyframes hzgloat { to { transform: translateY(-8px) scale(1.06); } }
#horizon .bgk { position: absolute; transform: translate(-50%, -100%); z-index: 4; display: flex; flex-direction: column; align-items: center; } #horizon .bgk .mon { display: block; }
#horizon .bgk .tag { position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; margin: 0 0 1px; white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.1; width: max-content;
  font: 800 7.5px/1.1 "Segoe UI", sans-serif; color: #fff; background: rgba(30,24,40,.88); border: 1px solid #cfd6de; border-radius: 6px; padding: 0 4px 1px; } #horizon .bgk .tag b { color: #ffd27a; white-space: nowrap; }
#horizon .bgk .tag .t { max-width: 62px; overflow: hidden; text-overflow: ellipsis; } #horizon .bgk.dead .tag { border-color: #9aa3ad; } #horizon .bgk.dead .tag b { color: #c9ced6; }
#horizon .tomb { display: block; transform-origin: 50% 100%; } #horizon .tomb.wob { animation: hzwob .9s ease-out; }
@keyframes hzwob { 0% { transform: rotate(0); } 15% { transform: rotate(18deg) translateX(3px); } 35% { transform: rotate(-12deg); } 55% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
#horizon .kickfx { position: absolute; bottom: 55%; left: 50%; transform: translateX(-50%); font: 900 13px/1 "Segoe UI", sans-serif; color: #ffe14a; -webkit-text-stroke: 1px #3a0a0a; text-shadow: 0 2px 0 #3a0a0a; animation: hzkpop .9s ease-out forwards; white-space: nowrap; z-index: 5; }
@keyframes hzkpop { 0% { transform: translateX(-50%) scale(.3); opacity: 0; } 20% { transform: translateX(-50%) scale(1.3); opacity: 1; } 100% { transform: translateX(-50%) translateY(-10px) scale(1); opacity: 0; } }
#horizon .dust { position: absolute; bottom: 0; left: 50%; width: 0; height: 0; } #horizon .dust i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: rgba(230,215,190,.85); animation: hzpuff .9s ease-out forwards; }
#horizon .dust i:nth-child(1) { --dx: -16px; } #horizon .dust i:nth-child(2) { --dx: -6px; animation-delay: .05s; } #horizon .dust i:nth-child(3) { --dx: 7px; animation-delay: .08s; } #horizon .dust i:nth-child(4) { --dx: 16px; }
@keyframes hzpuff { from { transform: translate(-4px, -4px) scale(.4); opacity: .9; } to { transform: translate(var(--dx), -14px) scale(2); opacity: 0; } }
#horizon .bme { position: absolute; left: 13%; bottom: -2px; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; align-items: center; }
#horizon .bme .lbl { order: -1; display: grid; justify-items: center; background: var(--orange); color: #fff; border-radius: 5px; padding: 1px 5px 2px; box-shadow: 0 0 0 1.5px #fff; font: 800 9px/1.1 "Segoe UI", sans-serif; margin-bottom: 2px; }
#horizon .bme .lbl .nm { display: flex; gap: 2px; align-items: center; } #horizon .bme .lbl .rt { font-size: 10.5px; } #horizon .bme .lbl small { font-size: 8px; margin-left: 2px; }
#hzres { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 8; white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; font: 900 14px/1.2 "Segoe UI", sans-serif; color: #fff; padding: 6px 12px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.5); animation: hzkpop2 .4s ease-out; }
#hzres.win { background: #1f8a46; } #hzres.lose { background: #7a0d14; } #hzres[hidden] { display: none; } @keyframes hzkpop2 { from { transform: translate(-50%,-50%) scale(.4); } to { transform: translate(-50%,-50%) scale(1); } }
#horizon .harr { position: absolute; top: 34%; z-index: 7; width: 22px; height: 30px; border: 0; border-radius: 8px; background: rgba(10,8,20,.5); color: #fff; font: 900 18px/1 "Segoe UI", sans-serif; cursor: pointer; padding: 0; }
#horizon .harr.l { left: 3px; } #horizon .harr.r { right: 3px; } #horizon .harr:disabled { opacity: .22; cursor: default; } #horizon.fightv .harr, #horizon.fightv .btm, #horizon.bossin .harr, #horizon.bossin .btm { display: none; }
#horizon .btm { position: absolute; left: 50%; top: 5px; transform: translateX(-50%); z-index: 7; border: 1.5px solid #fff; border-radius: 999px; background: var(--orange); color: #fff; font: 800 10.5px "Segoe UI", sans-serif; padding: 3px 9px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#horizon .btm[hidden] { display: none; }
/* player / gatekeeper info card (tap a figure): information only */
#hzcard { position: absolute; z-index: 50; width: 212px; background: #fff; color: #172033; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 9px 10px; font: 13px/1.3 "Segoe UI", sans-serif; }
#hzcard[hidden] { display: none; } #hzcard h4 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; } #hzcard h4 .on, #hzcard h4 .off { width: 8px; height: 8px; }
#hzcard .row { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; color: #4b5568; font-size: 12px; } #hzcard .row b { color: #172033; }
#hzcard .st-on { color: #15803d; font-weight: 700; } #hzcard .st-off { color: #b42318; font-weight: 700; }
#hzcard .ftag { margin-top: 5px; display: inline-block; background: #fdecea; color: #b42318; border: 1px solid #f5b5ae; border-radius: 6px; padding: 1px 6px; font-size: 11.5px; font-weight: 800; }
#hzcard .plink { display: block; margin-top: 7px; text-align: center; color: #d85a1e; font-weight: 700; font-size: 12.5px; text-decoration: none; }
#hzcard .x { position: absolute; top: 4px; right: 8px; border: 0; background: none; font-size: 16px; color: #4b5568; cursor: pointer; }
/* ambient scene motion */
#horizon .tw { animation: hztw 2.6s ease-in-out infinite alternate; } @keyframes hztw { from { opacity: .25; } to { opacity: 1; } }
#horizon .smk { animation: hzsmk 7s ease-in-out infinite alternate; } @keyframes hzsmk { from { transform: translate(0, 0); opacity: .45; } to { transform: translate(6px, -4px); opacity: .7; } }
#horizon .rise { animation: hzrise 3.2s linear infinite; } @keyframes hzrise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-26px); opacity: 0; } }
#horizon .fall { animation: hzfall 5s linear infinite; } @keyframes hzfall { from { transform: translate(0, -10px); } to { transform: translate(-6px, 40px); } }
#horizon .glowp { animation: hztw 1.4s ease-in-out infinite alternate; }
@keyframes hzshake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3px,1px); } 40% { transform: translate(3px,-1px); } 60% { transform: translate(-2px,0); } 80% { transform: translate(2px,1px); } }
@media (min-width: 900px), (min-aspect-ratio: 6/5) { #horizon .fig .lbl .nm { --lw: 90px; font-size: 11px; } #horizon .fig .lbl .rt { font-size: 12.5px; } #horizon .fig.gk .lbl .nm { --lw: 160px; font-size: 10.5px; } #horizon .mk { width: 14px; height: 14px; font-size: 10px; } #horizon .fig.you .lbl .nm { --lw: 110px; }
  #hzres { font-size: 18px; } #horizon .kickfx { font-size: 17px; } #horizon .bgk .tag { font-size: 9.5px; } #horizon .bgk .tag .t { max-width: 130px; } #horizon .bme .lbl { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { #hzfigs, #hzboss, #horizon .redsky, #horizon svg.scene, #horizon .fig { transition: none !important; } #horizon .tw, #horizon .smk, #horizon .rise, #horizon .fall, #horizon .glowp, #horizon .boss2, #horizon .boss2 *, #horizon .tomb, #horizon .kickfx, #horizon .dust i, #hzres, #horizon { animation: none !important; } }

/* Accuracy Goblin on the ridge (Oct 23 2026): same look as a gatekeeper figure, green label */
#horizon .fig.gob { z-index: 3; } #horizon .fig.gob .lbl { background: rgba(14,36,18,.9); border: 1px solid #a9e690; padding: 1px 4px; text-shadow: none; }
#horizon .fig.gob .lbl .nm { --lw: 62px; font-size: 8px; } #horizon .fig.gob .lbl .rt { color: #c9f5b0; font-size: 9.5px; } #horizon .fig.gob .av { filter: drop-shadow(0 0 3px rgba(120,235,100,.6)); }
@media (min-width: 900px), (min-aspect-ratio: 6/5) { #horizon .fig.gob .lbl .nm { --lw: 160px; font-size: 10.5px; } }

/* Top Dog Troll on the ridge (Oct 23 2026): same as the goblin figure, red label; a pulsing ring when he is hunting you */
#horizon .fig.troll { z-index: 3; } #horizon .fig.troll .lbl { background: rgba(48,10,10,.9); border: 1px solid #ff9c88; padding: 1px 4px; text-shadow: none; }
#horizon .fig.troll .lbl .nm { --lw: 62px; font-size: 8px; } #horizon .fig.troll .lbl .rt { color: #ffc9bd; font-size: 9.5px; } #horizon .fig.troll .av { filter: drop-shadow(0 0 3px rgba(255,90,70,.6)); }
#horizon .fig.troll.hunt .av { filter: drop-shadow(0 0 5px rgba(255,60,40,.95)); }
@media (min-width: 900px), (min-aspect-ratio: 6/5) { #horizon .fig.troll .lbl .nm { --lw: 160px; font-size: 10.5px; } }
