body.screener-view .workspace{display:flex;flex-direction:column;height:100dvh;min-height:0}
body.screener-view .topbar{height:40px;flex:none;padding:0 18px}
body.screener-view main{padding:24px 28px 12px;flex:1;min-height:0;width:100%;max-width:none;display:flex}
#screener{display:flex;flex-direction:column;min-height:0;min-width:0;width:100%;max-width:1100px;margin-inline:auto}
.screener-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex:none;flex-wrap:wrap}
.screener-intro .text-button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 0;font-size:12px;white-space:nowrap}
.screener-intro .screener-description{color:var(--muted);font-size:11px;text-align:left;white-space:normal}
.screener-actions{display:flex;align-items:center;gap:18px;margin-left:auto;flex:none}
.screener-intro .text-button:hover:not(:disabled){color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.screener-intro .text-button:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
#screener-state{display:inline-flex;align-items:center;gap:7px}
#screener-state.is-updating{color:#27644a}
#screener-state.is-warning{color:#8c5429}
#screener-result-label{background:#f3f3f3;color:#737373;padding:0 5px;height:20px;display:inline-flex;align-items:center;white-space:nowrap}
.screener-spinner{width:12px;height:12px;border:1.5px solid #dceadf;border-top-color:currentColor;border-radius:50%;animation:screener-spin .85s linear infinite;flex:none;order:-1}
@keyframes screener-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.screener-spinner{animation:none}}
#screener .screener-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);flex:none;flex-wrap:wrap}
#screener .screener-period-tabs{display:flex;gap:18px;flex-shrink:0}
#screener .screener-period-tab{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:14px;height:40px;padding:0 2px;min-width:58px;white-space:nowrap;transform:none}
#screener .screener-period-tab:hover{color:var(--ink);background:#fafafa}
#screener .screener-period-tab[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink);font-weight:650}
#screener .screener-period-tab:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
#screener .screener-filter{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;margin-left:auto}
#screener .screener-filter input{width:66px;min-height:30px;padding:3px 8px}
#screener .screener-filter .button{min-height:30px;padding:3px 10px;font-size:12px}
#screener-content{display:flex;flex-direction:column;flex:1;min-height:0}
#screener .screener-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;padding:8px 0;margin:0;border:0;flex:none}
#screener .screener-meta>div{display:flex;gap:6px;align-items:center;padding:0;flex:none;border:0}
#screener .screener-meta span{font-size:11px}
#screener .screener-meta strong{font-size:11px;font-weight:500;letter-spacing:0;margin:0;line-height:20px}
#screener-count{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
#screener-feedback{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px;flex:none;margin:0 0 8px;min-width:0}
#screener-feedback.is-warning{background:#fff8ef;color:#8c5429;padding:10px 14px}
#screener-feedback.is-info{background:#f6f6f4;color:#666;padding:10px 14px}
#screener-notice{grid-column:1/-1;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7;margin:0}
#screener-retry{grid-column:2;grid-row:2;min-height:40px;padding:8px 0;font-size:12px;color:inherit;align-self:start}
#screener-feedback #screener-details{grid-column:1;grid-row:2;margin:0;min-width:0}
#screener-feedback #screener-details>summary{min-height:40px;padding:8px 0;font-size:12px;color:inherit;line-height:24px}
#screener-feedback #screener-details[open]{grid-column:1/-1}
#screener-feedback:has(#screener-details[open]) #screener-retry{grid-row:3}
#screener-retry:focus-visible,#screener-details>summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
#screener-threshold-error{flex-basis:100%;text-align:right;font-size:12px;margin:0 0 6px}
#screener .table-scroll{min-height:0;flex:1;overflow:auto;border-top:1px solid var(--line)}
#screener table{display:grid;grid-template-columns:repeat(8,max-content);justify-content:space-between;column-gap:16px;width:max-content;min-width:max(100%,900px);white-space:nowrap}
#screener colgroup{display:none}
#screener thead,#screener tbody{display:contents}
#screener tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;border-bottom:1px solid #ededed}
#screener thead tr{position:sticky;top:0;z-index:1;background:#fafafa;border-bottom:0}
#screener th{padding:7px 14px}
#screener th:has(.screener-sort-button){padding:0}
#screener .screener-sort-button{display:block;width:100%;min-height:40px;padding:7px 14px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:inherit;white-space:nowrap;transform:none;cursor:pointer}
#screener .screener-sort-button:hover{background:#f0f0f0;color:var(--ink)}
#screener .screener-sort-button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
#screener th[aria-sort=ascending],#screener th[aria-sort=descending]{color:var(--ink)}
#screener .screener-mobile-sort{display:none}
#screener td{padding:8px 14px;border-bottom:0;font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums}
#screener td[colspan]{grid-column:1/-1}
#screener td:first-child{font-weight:600}
#screener th,#screener td{text-align:left}
#screener th:nth-child(3),#screener td:nth-child(3),#screener th:nth-child(7),#screener td:nth-child(7),#screener th:nth-child(8),#screener td:nth-child(8){text-align:right}
#screener .other-periods{white-space:normal;color:var(--muted)}
#screener .gain{color:#27644a;font-weight:600}
#screener .negative{color:#8c5429}
#screener .empty{text-align:center;color:var(--muted);padding:36px}
#screener details{margin:6px 0 0;flex:none}
#screener summary{cursor:pointer;font-size:11px;color:var(--muted);min-height:18px;font-weight:400}
#screener details[open] summary{margin-bottom:5px}
#screener .footnote{margin:0;font-size:11px}
#screener-issues{max-height:250px;overflow:auto;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
#screener-issues p{margin:0 0 8px}
#watchlist-summary,#watchlist-gaps{font-size:12px;line-height:1.7;white-space:pre-wrap;color:var(--muted)}
#watchlist-status-error,#watchlist-feedback{font-size:12px;margin:3px 0;flex:none}
#watchlist-status-error:empty,#watchlist-feedback:empty{display:none}
.watchlist-period{font-size:12px;line-height:1.7;white-space:pre-wrap;border-top:1px solid var(--line);padding-top:8px}
.watchlist-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:520px;max-width:100%;height:100dvh;max-height:100dvh;padding:24px;border:0;border-left:1px solid var(--line);border-radius:0;background:white;color:var(--ink);overflow:auto}
.watchlist-dialog::backdrop{background:rgb(0 0 0 / .18)}
.watchlist-dialog h2{font-size:20px;margin:0}
.watchlist-dialog h3{font-size:15px}
.watchlist-dialog fieldset{margin:0;padding:0;border:0;min-width:0}
.watchlist-switch{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.watchlist-switch input{width:16px;min-height:16px;margin:0;accent-color:var(--ink)}
.watchlist-rule{display:grid;grid-template-columns:1fr auto;gap:4px 10px;border-bottom:1px solid var(--line);padding:14px 0;font-size:12px}
.watchlist-rule>label:nth-child(2){display:flex;align-items:center;gap:6px;font-size:12px}
.watchlist-rule input[type=number]{width:66px;min-height:32px;padding:4px 8px}
.watchlist-rule p{grid-column:1/-1;margin:0;color:var(--muted)}
.watchlist-connections{border-top:1px solid var(--line);margin-top:22px;padding-top:6px;font-size:13px}
#watchlist-connection,#watchlist-auth{line-height:1.6;white-space:pre-wrap}
#watchlist-message{font-size:13px;line-height:1.6}
#screener .screener-mobile-detail{display:none}
@media(max-width:720px){
 .watchlist-dialog{inset:0;width:100%;padding:18px;border:0}
 .screener-intro{gap:2px}
 .screener-intro .screener-description{width:100%;line-height:1.6}
 .screener-actions{width:100%;justify-content:flex-end}
 body.screener-view .shell{display:flex;flex-direction:column;height:100dvh}
 body.screener-view .sidebar{padding:8px 12px;flex:none}
 body.screener-view .brand{display:none}
 body.screener-view .sidebar nav{margin:0;gap:4px}
 body.screener-view .nav-item{height:30px;min-width:0}
 body.screener-view .workspace{height:auto;flex:1;min-height:0}
 body.screener-view .topbar{height:34px;padding:0 12px}
 body.screener-view main{padding:12px}
 #screener .screener-controls{gap:4px;padding-bottom:6px}
 #screener .screener-period-tabs{width:100%;gap:0;justify-content:space-between}
 #screener .screener-period-tab{height:36px;min-width:0;padding:0 8px;font-size:13px}
 #screener .screener-meta{gap:3px 12px;padding:6px 0}
 #screener .screener-meta span,#screener .screener-meta strong{font-size:11px}
 #screener-count{font-size:11px}
 #screener table{min-width:max(100%,900px)}
}

/* Read the same publication as compact entries on a phone. */
@media(max-width:720px),(max-width:960px) and (max-height:540px){
 body.screener-view .shell{display:block;height:auto;min-height:100dvh}
 body.screener-view .workspace{height:auto;min-height:0}
 body.screener-view main{display:block;padding:16px 16px 32px}
 #screener{max-width:none}
 .screener-intro{gap:8px;margin-bottom:14px}
 .screener-intro .screener-description{width:100%;font-size:12px;min-height:44px;line-height:1.6}
 .screener-actions{width:100%;justify-content:space-between;gap:8px;margin:0}
 .screener-intro .text-button:not(.screener-description){font-size:14px;min-height:44px;padding:8px 2px}
 #screener .screener-controls{display:block;padding:0;border:0}
 #screener .screener-period-tabs{width:100%;gap:0;border-bottom:1px solid var(--line)}
 #screener .screener-period-tab{flex:1;height:48px;padding:0 4px;font-size:14px;min-width:0}
 #screener .screener-filter{display:flex;gap:8px;margin:0;padding:14px 0;font-size:14px}
 #screener .screener-filter input{width:76px;min-height:44px;font-size:16px;padding:8px}
 #screener .screener-filter .button{min-height:44px;font-size:14px;margin-left:auto;padding:8px 14px}
 #screener .screener-meta{gap:6px 12px;padding:12px 0;border-top:1px solid var(--line)}
 #screener .screener-meta span,#screener .screener-meta strong{font-size:12px}
 #screener .screener-meta>div:first-of-type{flex-basis:100%}
 #screener-count{width:100%;margin:2px 0 0;font-size:12px}
 #screener-notice{font-size:13px}
 #screener-feedback.is-warning,#screener-feedback.is-info{padding:12px}
 #screener-feedback #screener-details>summary,#screener-retry{min-height:44px;font-size:14px;padding:10px 0}
 #screener-issues{font-size:13px}
 #screener .table-scroll{overflow:visible;flex:none}
 #screener table{display:block;width:100%;min-width:0;white-space:normal}
 #screener thead{display:none}
 #screener .screener-mobile-sort{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:13px;color:var(--muted)}
 #screener-sort{width:auto;max-width:100%;min-height:44px;padding:8px 10px;font-size:14px}
 #screener thead tr{position:static}
 #screener tbody{display:block}
 #screener tbody tr{display:block;padding:0}
 #screener td{padding:0;font-size:14px;min-width:0;overflow-wrap:anywhere;white-space:normal}
 #screener tbody td:nth-child(-n+8):not([colspan]){display:none}
 #screener tbody .screener-mobile-detail{display:block;text-align:left}
 #screener .screener-mobile-detail details{margin:0}
 #screener .screener-mobile-detail summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;min-height:56px;padding:12px 0;font-size:16px;color:var(--ink);list-style:none}
 #screener .screener-mobile-detail summary::-webkit-details-marker{display:none}
 #screener .screener-mobile-symbol{font-weight:600;overflow-wrap:anywhere;min-width:0}
 #screener .screener-mobile-detail summary .gain{text-align:right}
 #screener .screener-mobile-periods{grid-column:1;font-size:12px;color:var(--muted);line-height:1.8}
 #screener .screener-mobile-periods:empty{display:none}
 #screener .screener-mobile-periods:not(:empty)::before{content:"其他周期 · "}
 #screener .screener-mobile-duration{grid-column:2;grid-row:2;text-align:right;font-size:12px;color:var(--muted);white-space:nowrap}
 #screener .screener-mobile-duration::before{content:"持续 · "}
 #screener .screener-mobile-detail dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;margin:0;padding:12px 0 16px;border-top:1px solid var(--line);font-size:13px}
 #screener .screener-mobile-detail dt{color:var(--muted)}
 #screener .screener-mobile-detail dd{margin:0;text-align:right;overflow-wrap:anywhere}
 #screener td[colspan]{font-size:14px;text-align:center;padding:24px 0}
 #screener-details>summary{min-height:44px;font-size:14px;padding:10px 0}
 .watchlist-dialog{inset:0;width:100%;padding:16px;border:0}
 .watchlist-dialog .source-dialog-heading{position:sticky;top:-16px;background:white;padding:16px 0;z-index:1}
 .watchlist-dialog .button{min-height:44px;font-size:14px}
 .watchlist-rule{grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 0;font-size:13px}
 .watchlist-rule>label:nth-child(2){font-size:14px}
 .watchlist-rule input[type=number]{width:90px;min-height:44px;font-size:16px}
 .watchlist-switch{min-height:44px;font-size:16px}
 .watchlist-dialog .form-actions{position:sticky;bottom:-16px;background:#fff;padding:16px 0;gap:8px}
 #watchlist-summary,#watchlist-gaps,.watchlist-period{font-size:14px;overflow-wrap:anywhere}
}

.watchlist-gap-filter{display:flex;align-items:center;gap:12px;font-size:14px}
.watchlist-gap-filter select{min-height:44px;padding:8px 12px}
.watchlist-gap-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.watchlist-gap-choice{display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:44px;cursor:pointer}
.watchlist-gap-choice input{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--ink);flex:none}
.watchlist-gap-time{white-space:pre-wrap;font-size:13px;line-height:1.6;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#watchlist-gap-manager .button,#watchlist-gap-back{min-height:44px}
#watchlist-gap-message{font-size:13px;line-height:1.6}
#watchlist-gap-confirm{border-top:1px solid var(--line);margin-top:16px;padding-top:8px}
#watchlist-gap-confirm-text{white-space:pre-wrap;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
#watchlist-gap-manager .form-actions{position:static;flex-wrap:wrap}
