/* 移民溜 共用頁首／頁尾／搜尋（也套用在工具頁、週報頁；全部用 sx- 開頭避免和工具頁樣式打架） */
.sx,.sx *,.sx *::before,.sx *::after{box-sizing:border-box}
.sx{--ink:#EEF1FF;--edge:#D9E0FF;--shadow:#6A5AE0;--paper:#0D1333;--surface:#121A40;--surface-3:#232E66;--blue:#FFD84A;--orange:#F2A23A;--yellow:#FFD84A;--muted:#8E97C0;--soft:#C3CAE8;--line:#2C3770;--sky:#232E66;
  font-family:'Noto Sans TC',system-ui,-apple-system,'PingFang TC','Microsoft JhengHei',sans-serif;line-height:1.5;color:var(--ink);text-align:left;letter-spacing:0}
.sx a{text-decoration:none}
.sx ul{list-style:none;margin:0;padding:0}
.sx-wrap{max-width:1200px;margin:0 auto;padding-left:24px;padding-right:24px;width:100%}
.sx-tag{font-family:'Silkscreen',ui-monospace,monospace;font-size:13px;letter-spacing:1px;text-transform:uppercase;line-height:1.4;font-weight:400}
.sx-skip{position:absolute;left:-9999px;top:8px;z-index:1000;background:#FFD84A;color:#0A0E27!important;padding:10px 14px}
.sx-skip:focus{left:8px}
header.sx-header{display:block;position:sticky;top:0;z-index:50;background:rgba(10,14,39,.92);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:var(--ink);border:0;border-bottom:3px solid var(--edge);padding:0;margin:0;box-shadow:none;border-radius:0;text-align:left}
.sx-bar{display:flex;align-items:center;justify-content:space-between;gap:12px 28px;padding-top:12px;padding-bottom:12px}
.sx-brand{display:flex;align-items:center;gap:12px;color:var(--ink)!important;flex:0 0 auto;opacity:1;font-size:inherit;text-transform:none;margin:0}
.sx-brand img{width:46px;height:auto;display:block;border:0;margin:0}
.sx-brand-text{display:flex;flex-direction:column;line-height:1.1}
.sx-word{font-weight:900;font-size:28px;letter-spacing:4px;line-height:1.15;text-shadow:2px 2px 0 var(--orange)}
.sx-sub{font-size:12px;font-weight:500;color:var(--muted);letter-spacing:2px;margin-top:2px}
.sx-nav{display:flex;align-items:center}
.sx-nav ul{display:flex;flex-wrap:wrap;gap:4px 20px}
.sx-nav li{margin:0;padding:0}
.sx-link{display:block;color:var(--ink)!important;font-weight:700;font-size:16px;padding:10px 2px;border-bottom:3px solid transparent;line-height:1.3;white-space:nowrap;background:none}
.sx-link:hover,.sx-link[aria-current]{color:var(--blue)!important;border-bottom-color:var(--blue)}
.sx-tools{display:flex;gap:10px;align-items:center}
.sx-icon{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);border:3px solid var(--edge);border-radius:0;cursor:pointer;color:var(--ink);padding:0;margin:0;flex:0 0 auto;box-shadow:none;font-size:18px;line-height:1}
.sx-icon:hover{background:var(--yellow);color:#0A0E27}
.sx-menu{display:none}
.sx-btn{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 22px;border:3px solid var(--yellow);box-shadow:4px 4px 0 var(--shadow);font-weight:700;font-size:16px;background:var(--yellow);color:#0A0E27;cursor:pointer;font-family:inherit;border-radius:0;margin:0}
.sx-btn:hover{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--shadow)}
@media (max-width:1040px){
  .sx-menu{display:inline-flex}
  .sx-nav{position:absolute;left:0;right:0;top:100%;background:#0D1333;border-bottom:3px solid var(--edge);display:none;padding:8px 24px 18px;box-shadow:0 6px 0 rgba(31,42,68,.12)}
  .sx-header.open .sx-nav{display:block}
  .sx-nav ul{flex-direction:column;gap:0}
  .sx-link{padding:13px 4px;border-bottom:2px solid var(--line);font-size:17px}
  .sx-link[aria-current]{border-bottom-color:var(--blue)}
  .sx-word{font-size:24px;letter-spacing:3px}
  .sx-brand img{width:40px}
}
@media (max-width:640px){.sx-wrap{padding-left:16px;padding-right:16px}}
dialog.sx-dialog{border:0;padding:0;background:transparent;max-width:none;width:100%;margin:0;max-height:none;height:100%}
dialog.sx-dialog::backdrop{background:rgba(4,6,20,.7)}
.sx-panel{max-width:680px;margin:10vh auto 0;background:var(--paper);border:3px solid var(--edge);box-shadow:8px 8px 0 var(--shadow);padding:22px;width:calc(100% - 32px)}
.sx-panel form{display:flex;gap:10px;margin:0}
.sx-panel input{flex:1;min-width:0;height:52px;border:3px solid var(--edge);padding:0 14px;font-size:18px;font-family:inherit;background:#080C22;color:var(--ink);border-radius:0;margin:0}
.sx-ptop{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.sx-results{margin:14px 0 0!important;max-height:55vh;overflow:auto}
.sx-results li a{display:flex;gap:12px;align-items:center;padding:10px;color:var(--ink);border-bottom:2px dashed var(--line);font-weight:700;line-height:1.5;font-size:16px}
.sx-results li a:hover,.sx-results li a:focus{background:var(--sky)}
.sx-results img{width:56px;height:56px;object-fit:cover;border:2px solid var(--edge);flex:0 0 auto}
.sx-status{font-size:14px;color:var(--muted);margin:10px 0 0}
.sx-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
footer.sx-footer{display:block;background:#05081A;color:#EEF1FF;border-top:3px solid #D9E0FF!important;margin:0;padding:0;border:0;text-align:left}
.sx-ftop{display:flex;flex-wrap:wrap;justify-content:space-between;gap:32px;padding-top:48px;padding-bottom:32px}
.sx-fbrand{display:flex;align-items:center;gap:14px;flex:1 1 320px}
.sx-fbrand img{width:58px;height:auto}
.sx-footer .sx-word{text-shadow:2px 2px 0 #6A5AE0;color:#EEF1FF}
.sx-tagline{font-size:14px;color:var(--soft);margin-top:6px}
.sx-cols{display:flex;flex-wrap:wrap;gap:40px;flex:1 1 480px;justify-content:flex-end}
.sx-col{display:flex;flex-direction:column;gap:8px}
.sx-col .sx-tag{color:var(--orange);margin-bottom:4px}
.sx-col a{color:#EEF1FF!important;font-size:15px}
.sx-col a:hover{color:var(--yellow)!important;text-decoration:underline}
.sx-copy{border-top:1px solid #2C3770;padding-top:16px;padding-bottom:28px;font-size:13px;color:var(--soft)}
@media (max-width:640px){.sx-cols{justify-content:flex-start}}
html.in-frame .sx-header,html.in-frame .sx-footer,html.in-frame .sx-skip{display:none}
