.first-pool{--sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--fp-text:#526746;--fp-muted:#8e9c82;--fp-line:#dfe5d6;--fp-card:#fcfcf7;--fp-soft:#eaf0e1;--fp-seal:#e7eddd;margin:24px 0 30px;padding:18px 20px 12px;background:var(--heat-paper);border:1px solid var(--heat-line);border-radius:10px;scroll-margin-top:24px}
.first-pool-heading{height:auto;min-height:0;padding:0;border:0;background:none;display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px}.first-pool-title{display:flex;align-items:baseline;gap:14px}.first-pool-title h2{margin:0;font:500 25px/1.3 var(--serif);letter-spacing:2px;color:var(--fp-text);scroll-margin-top:35px}.first-pool-total{font-size:11px;color:var(--fp-muted)}.first-pool-total b{font:400 15px Georgia,serif}.first-pool-heading p{margin:8px 0 0;font-size:10px;letter-spacing:.4px;color:var(--fp-muted)}
.first-pool-tools{display:flex;align-items:center;gap:26px}.first-pool-tools>time{font:17px/1 Georgia,serif;letter-spacing:.4px;color:var(--fp-muted);white-space:nowrap}.first-pool-search{display:flex;align-items:center;gap:7px;padding:7px 0;border-bottom:1px solid var(--fp-line);color:var(--fp-muted)}.first-pool-search svg{width:15px;height:15px;flex:none}.first-pool-search input{width:128px;min-width:0;border:0;outline:none;background:transparent;color:var(--fp-text);font:11px var(--sans)}.first-pool-search input::placeholder{color:var(--fp-muted)}.first-pool-search:focus-within{border-color:var(--fp-text)}
.first-pool-filters{display:flex;align-items:center;gap:5px 8px;flex-wrap:wrap;padding-bottom:13px;border-bottom:1px solid var(--fp-line)}.first-pool-filters button{display:flex;align-items:center;gap:7px;padding:6px 11px;border:0;border-radius:4px;background:transparent;color:var(--fp-muted);font:11px/1.4 var(--sans);cursor:pointer;white-space:nowrap}.first-pool-filters small{font:10px Georgia,serif;opacity:.75}.first-pool-filters button:hover,.first-pool-filters button[aria-pressed=true]{background:var(--fp-soft);color:var(--fp-text)}
.first-pool-caption{display:flex;justify-content:space-between;gap:14px;padding:15px 0 12px;color:var(--fp-muted);font-size:10px}.first-pool-scroll{overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--fp-line) transparent;padding-bottom:5px}.first-pool-grid{min-width:0}.first-column-head,.first-concept-lanes{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.first-column-head{padding:2px 0 12px}.first-column-head>div{display:flex;align-items:baseline;gap:12px}.first-column-head h3{font:500 17px var(--serif);letter-spacing:1px;color:var(--fp-text);margin:0;white-space:nowrap}.first-column-head b{font:13px Georgia,serif;color:var(--fp-muted);margin-left:5px;letter-spacing:0}.first-column-head small{font:10px var(--sans);color:var(--fp-muted)}
.first-concept-group{border-top:1px solid var(--fp-line);padding:12px 0 16px}.first-concept-group>header{height:auto;min-height:0;padding:0;border:0;background:none;display:flex;align-items:baseline;gap:11px;margin-bottom:8px}.first-concept-group>header h3{margin:0;color:var(--fp-text);font:500 18px/1.4 var(--serif);letter-spacing:1px}.first-concept-group>header small{font-size:10px;color:var(--fp-muted)}.first-lane{min-width:0;display:grid;grid-template-columns:repeat(auto-fill,160px);gap:8px;align-content:start;align-items:start}.first-lane-empty{grid-column:1/-1;color:var(--fp-muted);font-size:10px;padding:17px 0;opacity:.7}.first-lane-more{grid-column:1/-1;justify-self:start;border:0;background:transparent;color:var(--fp-muted);font:10px var(--sans);padding:5px 0;cursor:pointer;align-self:flex-start}.first-lane-more:hover{color:var(--fp-text)}
.first-stock-card{width:160px;max-width:100%;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 42px;grid-template-rows:1fr auto;height:128px;min-height:128px;min-width:0;border:1px solid var(--fp-line);border-radius:5px;background:var(--fp-card);overflow:hidden}.first-stock-summary{grid-column:1;grid-row:1;min-width:0;padding:10px 8px 0}.first-stock-top{display:flex;align-items:baseline;gap:4px;min-width:0}.first-stock-name{padding:0;border:0;background:transparent;color:var(--fp-text);font:500 12px/1.5 var(--sans);white-space:nowrap;cursor:pointer;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:left}.first-stock-name:hover{text-decoration:underline;text-underline-offset:3px}.first-stock-code{font:9px/1.8 var(--sans);letter-spacing:.3px;color:var(--fp-muted);flex-shrink:0}.first-stock-level{font:9px/1.4 var(--sans);color:var(--fp-muted);white-space:nowrap}.first-stock-add{position:absolute;top:2px;right:43px;display:grid;place-items:center;width:19px;height:19px;border:0;background:var(--fp-card);border-radius:50%;color:var(--fp-muted);opacity:0;cursor:pointer;padding:3px}.first-stock-add svg{width:13px;height:13px}.first-stock-card:hover .first-stock-add,.first-stock-card:focus-within .first-stock-add{opacity:1}.first-stock-add:hover{background:var(--fp-soft);color:var(--fp-text)}
.first-stock-quote{grid-column:1;grid-row:2;display:flex;align-items:center;justify-content:flex-start;padding:8px 8px 12px;font-variant-numeric:tabular-nums;white-space:nowrap}.first-stock-quote strong{font:500 20px/1.2 var(--sans);letter-spacing:-.4px}.first-stock-quote strong.up{color:var(--heat-red)}.first-stock-quote strong.down{color:var(--heat-down)}.first-stock-quote strong.flat{color:var(--fp-muted)}.first-stock-labels{margin:7px 0 0;color:var(--fp-muted);font:10px/1.4 var(--sans);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.first-seal{grid-column:2;grid-row:1/-1;border:0;border-radius:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 3px;background:var(--fp-seal);border-left:1px solid var(--fp-line);color:var(--fp-text);font-variant-numeric:tabular-nums}.first-seal time{font:13px/1.2 Georgia,serif;letter-spacing:.2px}.first-seal span{font:8px/1.4 var(--sans);opacity:.8;white-space:nowrap}.first-seal b{font:400 11px/1.5 var(--sans)}.first-seal.one-word{background:var(--fp-soft)}.first-seal.dropped,.first-seal.pending{background:transparent;color:var(--fp-muted);border-left-style:dashed}.first-rebound-mark{position:absolute;z-index:1;right:4px;top:5px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:34px;height:20px;padding:0 4px;border:1px solid #9c3f30;border-radius:2px 3px 2px 4px;background:#b24b37;color:#fffaf0;box-shadow:inset 0 0 0 1px rgba(255,250,240,.28);font:650 10px/1 var(--sans);letter-spacing:1px;white-space:nowrap;pointer-events:none}
.first-pool-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:33px;padding-top:10px;border-top:1px solid var(--fp-line);color:var(--fp-muted);font-size:9px}.first-pool-footer #firstPoolFoot{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.first-pool-footer button,.first-pool-empty button{border:0;background:transparent;color:var(--fp-text);padding:6px 0;font:11px var(--sans);cursor:pointer}.first-pool-footer button[hidden]{display:none}.first-pool-empty{min-height:135px;display:flex;align-items:center;justify-content:center;flex-direction:column;border-top:1px solid var(--fp-line);color:var(--fp-muted)}.first-pool-empty p{margin:12px;font:17px var(--serif)}.first-pool-empty small,.first-pool-wait{font-size:10px;color:var(--fp-muted)}.first-pool-wait{padding:30px 0}.first-pool button:focus-visible,.first-pool summary:focus-visible{outline:2px solid var(--fp-text);outline-offset:3px}
:root[data-theme=dark] .first-pool{--fp-text:var(--text)!important;--fp-muted:var(--muted)!important;--fp-line:var(--line)!important;--fp-card:var(--panel)!important;--fp-soft:var(--panel2)!important;--fp-seal:var(--panel2)!important}
@media(max-width:1150px){.first-pool{padding:18px}.first-column-head,.first-concept-lanes{gap:12px}.first-column-head>div{gap:8px}.first-column-head small{font-size:9px}}
@media(max-width:760px){.first-pool{padding:12px;margin-top:20px}.first-pool-heading{align-items:flex-start;gap:15px}.first-pool-tools{align-items:flex-end;flex-direction:column;gap:10px}.first-pool-tools>time{font-size:15px}.first-pool-search input{width:112px}.first-pool-title h2{font-size:23px}.first-pool-heading p{font-size:9px}.first-pool-caption>span+span{display:none}.first-pool-filters{gap:4px}.first-pool-filters button{padding:5px 8px}.first-stock-add{opacity:1}.first-pool-footer{align-items:flex-start;line-height:1.8}.first-pool-footer>button{white-space:nowrap}.first-pool-grid{min-width:0}}
@media(hover:none){.first-stock-add{opacity:1}}

.first-mobile-hint{display:none}@media(max-width:760px){.first-pool-caption>.first-desktop-hint{display:none}.first-pool-caption>.first-mobile-hint{display:block;white-space:nowrap}}

:root[data-theme=dark] .first-rebound-mark{border-color:#df9a83;box-shadow:inset 0 0 0 1px rgba(255,250,240,.2)}

.first-stock-add[aria-pressed="true"]{opacity:1;color:#b65449}.first-stock-add[aria-pressed="true"] svg{fill:currentColor}.first-stock-card{cursor:grab;touch-action:pan-y}.first-stock-card.is-dragging{user-select:none;opacity:.4;cursor:grabbing}.first-concept-group.is-drop-target{background:var(--fp-soft);outline:1px dashed var(--fp-muted);outline-offset:5px}.first-stock-card:focus-visible{outline:2px solid var(--fp-muted);outline-offset:2px}

.first-pool{position:relative}
.first-pool-collapse{position:absolute;left:18px;top:-12px;width:30px;height:24px;display:grid;place-items:center;border:1px solid var(--heat-line);border-radius:5px;background:var(--heat-paper);color:var(--fp-text);padding:2px;cursor:pointer}
.first-pool-collapse svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.first-pool-collapse:hover{background:var(--fp-soft)}
.first-pool-collapse[aria-expanded=false] svg{transform:rotate(180deg)}
#firstPoolBody[hidden]{display:none}
.first-pool.is-collapsed .first-pool-heading{margin-bottom:0}
.first-pool.is-collapsed #firstPoolMeta,.first-pool.is-collapsed .first-pool-search{display:none}

.first-category-tab{display:inline-flex;align-items:center;gap:0}.first-pool-filters .first-category-edit{display:grid;place-items:center;width:20px;height:24px;padding:3px;border:0;background:none;opacity:0}.first-category-edit svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.first-category-tab:hover .first-category-edit,.first-category-tab:focus-within .first-category-edit{opacity:.75}.first-category-editor{width:min(300px,calc(100vw - 32px));box-sizing:border-box;padding:18px;border:1px solid var(--heat-line,#dce3d2);border-radius:8px;background:var(--heat-paper,#fafaf4);color:var(--text,#344238);box-shadow:0 15px 45px #23352820}.first-category-editor::backdrop{background:#28342625}.first-category-editor label{display:grid;gap:10px;font-size:13px}.first-category-editor input{box-sizing:border-box;width:100%;padding:8px 10px;font:14px var(--sans,sans-serif);color:inherit;background:transparent;border:1px solid var(--heat-line,#dce3d2);border-radius:5px}.first-category-editor footer{display:flex;align-items:center;gap:12px;margin-top:14px}.first-category-editor footer span{flex:1}.first-category-editor button{border:0;background:transparent;color:var(--muted,#849078);font:12px var(--sans,sans-serif);padding:4px 0;cursor:pointer}.first-category-editor button[type=submit]{color:var(--text,#344238)}.first-category-editor [role=status]{margin:6px 0;font-size:11px;color:#b45145}@media(hover:none){.first-pool-filters .first-category-edit{opacity:.75}}

/* Compact card context menu shares the first-pool grouping and saved layout. */
.first-group-menu{position:fixed;z-index:10050;width:194px;max-width:calc(100vw - 16px);padding:7px;background:#fcfcf6;border:1px solid #d7decd;border-radius:9px;box-shadow:0 8px 28px #33472b1c;color:#3f543b;font:12px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.first-group-menu[hidden]{display:none}.first-group-menu-heading{padding:5px 9px 9px;border-bottom:1px solid #e2e6d9;margin-bottom:5px}.first-group-menu-heading strong{display:block;font-weight:500}.first-group-menu-heading>span{font-size:10px;color:#8c987f}.first-group-menu-options{max-height:min(300px,calc(100dvh - 110px));overflow-y:auto;overscroll-behavior:contain}.first-group-menu button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:8px 9px;border:0;border-radius:4px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.first-group-menu button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.first-group-menu button svg{width:14px;height:14px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;opacity:0}.first-group-menu button[aria-checked=true] svg{opacity:1}.first-group-menu button:hover,.first-group-menu button:focus-visible{background:#edf1e5;outline:none}.first-group-menu button[aria-checked=true]{color:#587247}
:root[data-theme=dark] .first-group-menu{background:#252b29;border-color:#434e43;color:#d1dbca;box-shadow:0 8px 28px #0004}:root[data-theme=dark] .first-group-menu-heading{border-color:#40483d}:root[data-theme=dark] .first-group-menu-heading>span{color:#9eac95}:root[data-theme=dark] .first-group-menu button:hover,:root[data-theme=dark] .first-group-menu button:focus-visible{background:#354132}:root[data-theme=dark] .first-group-menu button[aria-checked=true]{color:#c0d4b2}

.first-seal{position:relative}
.first-seal .first-stock-board,.first-seal .first-stock-bond:not([hidden]){
 position:absolute;
 inset-inline:0;
 top:12px;
 margin-inline:auto;
 display:grid;
 place-items:center;
 box-sizing:border-box;
 width:17px;
 height:17px;
 border:1px solid color-mix(in srgb,var(--fp-text) 34%,transparent);
 border-radius:4px;
 color:var(--fp-text);
 font:500 10px/1 var(--sans);
 opacity:1;
}

.first-seal .first-stock-bond:not([hidden]){
 color:#8a632c;
 border-color:#aa793e88;
 background:#f0e4ca;
}
.first-seal .first-stock-board + .first-stock-bond{top:31px}
:root[data-theme=dark] .first-seal .first-stock-bond:not([hidden]){
 color:#e3c48c;
 border-color:#a6814e;
 background:#423724;
}

.first-seal:has(.first-stock-board,.first-stock-bond:not([hidden])) ~ .first-rebound-mark{
 top:auto;
 bottom:10px;
}

.first-stock-remove {
 position:absolute;
 z-index:2;
 inset:1px 1px auto auto;
 display:grid;
 place-items:start end;
 width:22px;
 height:24px;
 padding:2px;
 border:0;
 border-radius:4px;
 color:var(--fp-text);
 background:transparent;
 opacity:0;
 cursor:pointer;
}
.first-stock-remove svg { width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round; }
.first-stock-card:is(:hover,:focus-within) .first-stock-remove { opacity:1; }
.first-stock-remove:hover { color:var(--heat-red); }
.first-pool .first-stock-remove:focus-visible { outline-offset:-2px; }
.first-stock-card:has(.first-rebound-mark):not(:has(.first-stock-board,.first-stock-bond:not([hidden]))) .first-stock-remove { top:27px; }
.first-pool-summary { display:flex;align-items:baseline;gap:10px; }
#firstPoolUndo { padding:0 2px;border:0;background:none;color:var(--fp-text);font:11px/1.5 var(--sans);white-space:nowrap;cursor:pointer; }
#firstPoolUndo:hover { text-decoration:underline;text-underline-offset:3px; }
@media (hover:none) { .first-stock-remove { opacity:1; } }
