/* Syndicate player: page basics and the shared widget shell. Widget designs live in widgets.js. */
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body.transparent, body.transparent #stage { background: transparent; }
#stage { width: 1920px; height: 1080px; position: relative; overflow: hidden; transform-origin: 0 0;
         font-family: 'Montserrat', Arial, sans-serif; color: #141a21; background: #e4e7eb; }
#ver { position: fixed; right: 16px; top: 16px; font: 700 13px/1 'Montserrat', Arial, sans-serif; letter-spacing: 1px; color: #fff; background: rgba(217, 38, 47, .9); padding: 8px 12px; border-radius: 8px; z-index: 9; }
#msg { position: fixed; left: 16px; bottom: 16px; font: 600 14px/1.4 'Montserrat', Arial, sans-serif;
       color: #fff; background: rgba(20, 26, 33, .85); padding: 8px 12px; border-radius: 8px; max-width: 60vw; }

.widget { position: absolute; box-sizing: border-box; overflow: hidden; }
.card { background: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.head { height: 50px; flex: 0 0 50px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 1px;
        display: flex; align-items: center; gap: 12px; padding: 0 20px; background: #1d3557; white-space: nowrap; }
.head .ttl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.head.red { background: #d7262f; }
.head .ico { width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,.25); flex: 0 0 24px; }
.head .count { margin-left: auto; font-size: 13px; font-weight: 700; opacity: .9; white-space: nowrap; }
.pips { display: flex; gap: 6px; align-items: center; }
.pips span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.45); }
.pips span.on { width: 22px; background: #fff; }
.pips.dark span { background: #c9d0d8; } .pips.dark span.on { background: #1d3557; }
.bar { height: 4px; flex: 0 0 4px; background: rgba(0,0,0,.12); }
.bar > div { height: 4px; width: 0; background: #1d3557; transition: width .2s linear; }
.body { flex: 1; min-height: 0; position: relative; }
.fade { transition: opacity .4s; } .fade.out { opacity: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph { background: #1e2a2e; color: #8a9aa1; display: flex; align-items: center; justify-content: center;
      font-size: 20px; letter-spacing: 2px; text-align: center; }
.cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.contain { width: 100%; height: 100%; object-fit: contain; display: block; }
.tag { background: #1a8a3c; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1px; padding: 6px 12px;
       border-radius: 6px; white-space: nowrap; }

/* header */
.hdr { background: #fff; border-radius: 12px; height: 100%; display: flex; align-items: center; padding: 0 20px;
       box-sizing: border-box; gap: 18px; }
.hdr .logo { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.hdr .word { font-size: 42px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.hdr .sub { margin-top: 2px; background: #141a21; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; padding: 2px 8px; }
.hdr .qr { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 auto; }
.hdr .qr svg { width: 58px; height: 58px; display: block; }
.hdr .qr div { font-size: 9px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.hdr .sep { width: 2px; height: 48px; background: #e4e7eb; flex: 0 0 2px; }
.hdr .temp { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.hdr .temp img { width: 56px; height: 56px; }
.hdr .temp .t { font-size: 40px; font-weight: 800; line-height: 1; }
.hdr .temp .d { font-size: 13px; font-weight: 700; color: #4b5a66; margin-top: 2px; white-space: nowrap; }
.hdr .tiles { display: flex; gap: 10px; flex: 1; min-width: 0; }
.tile { flex: 1; height: 56px; background: #eef2f6; border-radius: 8px; display: flex; flex-direction: column;
        justify-content: center; padding: 0 14px; min-width: 0; }
.tile .l { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #4b5a66; }
.tile .v { font-size: 24px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.hdr .clock { text-align: right; flex: 0 0 auto; }
.hdr .clock .c { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.hdr .clock .d { font-size: 14px; font-weight: 700; color: #4b5a66; margin-top: 3px; white-space: nowrap; }
.hdr .logo img { max-width: 190px; max-height: 64px; display: block; object-fit: contain; }
.hdr .qr img { width: 58px; height: 58px; display: block; object-fit: contain; }
.hdr .wx { flex: 1; min-width: 0; display: flex; align-items: center; gap: 18px; transition: opacity .3s; }
.hdr .wx.out { opacity: 0; }
.hdr .wx[hidden], .hdr .alert[hidden] { display: none; }
.hdr .alertsep { width: 2px; height: 48px; background: #e4e7eb; flex: 0 0 2px; }   /* the separator before an alert when there is no weather */
.hdr .fill { flex: 1; }
.hdr .alertsep[hidden], .hdr .fill[hidden] { display: none; }
.hdr .alert { flex: 1; min-width: 0; height: 60px; background: #c8102e; border-radius: 10px; display: flex; align-items: center;
              gap: 16px; padding: 0 18px; box-sizing: border-box; color: #fff; position: relative; overflow: hidden; transition: opacity .3s; }
.hdr .alert.out { opacity: 0; }
.hdr .alert .tag { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; background: #fff; color: #c8102e; font-size: 13px;
                   font-weight: 900; letter-spacing: 2px; padding: 6px 12px; border-radius: 6px; }
.hdr .alert .tag span { width: 10px; height: 10px; border-radius: 50%; background: #c8102e; display: inline-block; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hdr .alert .tx { min-width: 0; flex: 1; }
.hdr .alert .h { font-size: 24px; font-weight: 800; line-height: 1.1; }
.hdr .alert .s { font-size: 13px; font-weight: 700; opacity: .9; margin-top: 3px; }
.hdr .alert .bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: transparent; }
.hdr .alert .bar > div { height: 100%; width: 0; background: rgba(255,255,255,.75); }
.hdr .partner { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.hdr .partner .cap { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #8a98a6; text-align: right; line-height: 1.3; max-width: 110px; }
.hdr .partner img { width: 72px; height: 72px; object-fit: contain; display: block; }
.hdr.compact { padding: 0 16px; gap: 14px; }
.hdr.compact .word { font-size: 32px; } .hdr.compact .clock .c { font-size: 32px; } .hdr.compact .temp .t { font-size: 32px; }
.hdr.compact .tiles { display: none; }

/* ferry */
.route { margin: 14px 20px 0; background: #5b6470; color: #fff; font-size: 20px; font-weight: 800; text-align: center;
         padding: 6px 0; border-radius: 10px; }
.sails { margin: 14px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.sail { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.sail .t { font-size: 22px; font-weight: 700; line-height: 1.05; }
.sail .t small { font-size: 20px; font-weight: 600; color: #2b353d; display: block; }
.proute { font-size: 16px; margin: 12px 16px 0; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.psails { margin: 8px 16px 0; display: flex; flex-direction: column; }
.psail { display: flex; align-items: center; gap: 12px; height: 52px; border-top: 1px solid #eef2f6; }
.psail img, .psail .ini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 40px; background: #eef2f6; }
.psail .ini { color: #fff; background: #1d3557; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.psail .t { flex: 1; min-width: 0; }
.psail .b { font-size: 18px; font-weight: 700; line-height: 1.05; }
.psail .b small { font-size: 11px; font-weight: 700; color: #8a98a6; margin-left: 6px; }
.psail .w { font-size: 17px; font-weight: 600; color: #2b353d; margin-top: 2px; }
.psail .st { color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
.sail .st { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1px; padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.next1 { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.next1 .r { font-size: 14px; font-weight: 800; letter-spacing: 1px; color: #4b5a66; }
.next1 .t { font-size: 44px; font-weight: 900; line-height: 1; }
.next1 .b { font-size: 18px; font-weight: 700; }

/* notices */
.nflyer { padding: 16px 20px 0; display: flex; gap: 18px; height: 100%; box-sizing: border-box; }
.nflyer .img { width: 170px; height: 170px; flex: 0 0 170px; background: #eef2f6; border-radius: 8px; overflow: hidden; }
.nflyer .img img { width: 100%; height: 100%; object-fit: contain; }
.nflyer .tx { min-width: 0; }
.ntitle { font-size: 22px; font-weight: 800; line-height: 1.2; }
.ntext { margin-top: 8px; font-size: 17px; font-weight: 600; line-height: 1.4; color: #2b353d;
         display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ntext-only { padding: 18px 22px 0; }
.ntext-only .ntitle { font-size: 24px; } .ntext-only .ntext { font-size: 19px; -webkit-line-clamp: 6; }
.ticker { height: 100%; display: flex; align-items: center; background: #141a21; color: #fff; border-radius: 12px; overflow: hidden; }
.ticker .lab { height: 100%; background: #d7262f; display: flex; align-items: center; padding: 0 18px; font-size: 14px; font-weight: 800; letter-spacing: 1.5px; white-space: nowrap; flex: 0 0 auto; }
.ticker .tx { padding: 0 18px; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; }
.ticker .tx b { color: #ffd166; font-weight: 800; }

/* events */
.poster { margin: 14px 16px 0; height: 440px; border-radius: 8px; overflow: hidden; background: #1e2a2e; flex: 0 0 auto; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.evmeta { padding: 12px 16px 0; display: flex; align-items: center; gap: 12px; }
.evtitle { font-size: 16px; font-weight: 800; line-height: 1.2; }
.evblurb { padding: 6px 16px 0; font-size: 14px; font-weight: 600; color: #4b5a66; line-height: 1.3;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.evlist { padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
.evrow { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #e4e7eb; }
.evrow img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: 0 0 64px; background: #eef2f6; }
.evrow .t { font-size: 16px; font-weight: 800; line-height: 1.2; }
.evrow .d { font-size: 13px; font-weight: 700; color: #1a8a3c; margin-top: 2px; }
.feature { position: relative; height: 100%; background: #1e2a2e; }
.feature img { width: 100%; height: 100%; object-fit: cover; }
.feature .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 18px; color: #fff;
                background: linear-gradient(to top, rgba(10,14,18,.92), rgba(10,14,18,0)); }
.feature .cap .t { font-size: 24px; font-weight: 800; line-height: 1.15; }
.feature .cap .d { font-size: 14px; font-weight: 700; color: #cbd5dd; margin-top: 4px; }

/* now / next */
.strip { height: 100%; border-radius: 12px; background: #141a21; color: #fff; display: flex; align-items: center; overflow: hidden; }
.strip .tag2 { height: 100%; background: #e63946; display: flex; align-items: center; padding: 0 18px; font-size: 14px; font-weight: 800; letter-spacing: 1.5px; white-space: nowrap; flex: 0 0 auto; }
.strip .now { padding: 0 18px; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; }
.strip .now span { color: #9fb0bd; font-weight: 600; }
.strip .nx { padding: 0 18px; font-size: 16px; font-weight: 700; color: #9fb0bd; border-left: 2px solid #2b353d; height: 100%; display: flex; align-items: center; max-width: 40%; flex: 0 0 auto; }
.lower { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; pointer-events: none; }
.lower .grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,14,18,.92), rgba(10,14,18,0)); }
.lower .tx { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; color: #fff; }
.lower .row { display: flex; align-items: center; gap: 12px; }
.lower .tag2 { background: #e63946; font-size: 13px; font-weight: 800; letter-spacing: 1.5px; padding: 5px 10px; border-radius: 4px; }
.lower .when { font-size: 16px; font-weight: 700; color: #cbd5dd; }
.lower .title { font-size: 28px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.lower .nx { font-size: 16px; font-weight: 700; color: #cbd5dd; }
.nncard { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.nncard .k { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: #e63946; }
.nncard .t { font-size: 22px; font-weight: 800; line-height: 1.2; }
.nncard .w { font-size: 14px; font-weight: 700; color: #4b5a66; }

/* live video */
.video { width: 100%; height: 100%; background: #000; position: relative; }
.video video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video.framed { border-radius: 12px; overflow: hidden; }

/* image / text */
.imgtext { height: 100%; position: relative; background: #1746a2; color: #fff; border-radius: 12px; overflow: hidden;
           display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; box-sizing: border-box; }
.imgtext .tx { font-size: 26px; font-weight: 800; line-height: 1.25; }
.imgtext img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgtext .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px; background: rgba(10,14,18,.8); font-size: 16px; font-weight: 700; text-align: left; }

/* advert */
.ad { height: 100%; border-radius: 12px; overflow: hidden; background: #1e2a2e; position: relative; }
.ad .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px; background: rgba(10,14,18,.8); color: #fff; font-size: 14px; font-weight: 700; }

/* weather card */
.wcard { padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wcard .big { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.wcard .big img { width: 72px; height: 72px; }
.wcard .big .t { font-size: 48px; font-weight: 900; line-height: 1; }
.wcard .big .d { font-size: 15px; font-weight: 700; color: #4b5a66; }
