.scroll-main{max-width:1480px;margin:auto;padding:24px clamp(14px,4vw,72px) 40px}
.scroll-main h1,dialog h2,.spine,.stock-name-label{font-family:var(--serif,"Songti SC","STSong",serif);font-weight:500}
.scroll-main h1{font-size:clamp(28px,3vw,44px);letter-spacing:.12em;margin:24px 0}
#volumes{display:grid;gap:26px}.volume{position:relative;display:grid;grid-template-columns:66px minmax(0,1fr);border:1px solid #d9ddce;border-radius:6px 12px 12px 6px;background:linear-gradient(90deg,#dedfce 0,#f6f5e9 6%,#fcfbf4 36%,#f8f8ef 97%,#e9e8d8);box-shadow:0 4px 12px #35483909}
.spine{display:flex;align-items:center;justify-content:center;gap:9px;writing-mode:vertical-rl;text-orientation:upright;position:relative;justify-self:stretch;width:100%;border:0;border-right:1px solid #babfa8;border-radius:5px;background:linear-gradient(90deg,#b9bda4,#e7e9d8 20%,#f1f1df 44%,#d0d5bd 88%,#bcc3a9);color:#384b39;letter-spacing:.14em;font-size:20px;overflow-wrap:anywhere}
.spine:before,.spine:after{content:"";position:absolute;left:6px;right:6px;height:3px;background:#858f7545;top:5px;border-radius:50%}.spine:after{top:auto;bottom:5px}
.spine small{font:12px serif;letter-spacing:.14em;color:#647057}
.slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(10px,1.6vw,25px);padding:18px clamp(12px,2vw,30px)}
.slot{min-width:0}.slot-tools,dialog header{display:flex;gap:8px;align-items:center}
.slot-tools{border-bottom:1px solid #d8ddcd;padding-bottom:6px;flex-wrap:wrap}
.role{font:14px serif;letter-spacing:.1em;color:#596950;margin-right:auto}.slot button,dialog button{cursor:pointer}
.slot button,.period button,dialog .close{border:0;background:transparent;color:#50644e;font:inherit}.slot .role-action,.period button{font-size:13px;padding:4px}
.period{display:inline-flex;gap:2px}.period [aria-pressed=true]{background:#e3e9d8;color:#324a34;border-radius:4px}
.stock-row{display:flex;align-items:center;padding:8px 0;gap:6px}.stock-name-label{font-size:18px}.stock-row small{color:#78836e}.note-trigger{margin-left:auto;min-width:32px;min-height:32px}.note-trigger:before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#b54c3c}.note-trigger.has-note:before{outline:1px solid #b54c3c;outline-offset:3px}
iframe{border:0;width:100%;height:100%;display:block}.empty{width:100%;min-height:116px}.empty b{display:block;font:24px serif;color:#809176}.empty small{font-size:13px;color:#69765f}.scroll-main footer{text-align:right;margin-top:18px}
dialog{position:fixed;inset:0;margin:auto;width:min(390px,92vw);max-height:90dvh;border:1px solid #cbd3c0;border-radius:10px;padding:20px;background:#faf9f1;color:#344438;box-shadow:0 14px 60px #24332126}
dialog::backdrop{background:#2f402d55}dialog header{margin-bottom:16px}dialog h2{font-size:22px;margin:0;flex:1}dialog .close{font-size:24px}dialog label{display:grid;gap:8px;font-size:14px}dialog input,dialog textarea{width:100%;padding:10px;font:inherit;color:inherit;background:#fffef8;border:1px solid #c7cfbe;border-radius:5px}dialog button.save,#remove{margin-top:12px;padding:6px 14px}#stockSuggestions button{display:flex;justify-content:space-between;width:100%;padding:9px;background:none;border:0;border-bottom:1px solid #dce1d4;color:inherit}#stockSuggestions small{margin-left:8px}#stockSuggestions{max-height:48vh;overflow:auto}#error{color:#a33d33}#error:empty,#searchStatus:empty{display:none}#large{width:var(--large-stock-chart-width,96vw);height:var(--large-stock-chart-height,96dvh);max-width:none;max-height:none;padding:14px}#large[open]{display:flex;flex-direction:column}#largeChart{flex:1 1 0;min-height:0}
@media(max-width:780px){.volume{grid-template-columns:46px minmax(0,1fr)}.slots{display:flex;overflow-x:auto;scroll-snap-type:x proximity}.slot{flex:0 0 min(82%,340px);scroll-snap-align:start}.spine{font-size:17px}}

#stockSuggestions [aria-selected=true],#stockSuggestions button:hover{background:#e8eedf}

.spine-latin{ text-combine-upright:all; letter-spacing:0; }

.volume{border-color:#a6b099;box-shadow:0 3px 8px #303e2e13}
.slots{align-items:stretch;gap:clamp(12px,1.5vw,22px)}
.slot{border:1px solid #b9c2ae;border-top:2px solid #829376;border-radius:5px;background:#fcfbf5;padding:12px;box-sizing:border-box;color:#354635}
.slot-tools{padding:6px 0;border-block:1px solid #d9dece}
.slot-tools:first-child{border-top:0}
.stock-row{padding:0;min-height:32px}
.stock-concepts-line{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;margin:3px 0 10px;font-size:13px;color:#63705e}
.main-tag{background:#e8ecdf;color:#455d40;border-radius:4px;padding:2px 6px}
.slot .empty{min-height:150px}

.slots{gap:clamp(10px,1.2vw,18px);padding:12px clamp(10px,1.4vw,22px)}
.slot{container-type:inline-size;padding:8px 10px 6px;border-color:var(--line);border-top:1px solid #9aa78e;border-radius:3px;background:var(--panel);color:var(--text)}
.stock-row{gap:6px;min-height:26px}
.stock-name-label{line-height:1.25}
.stock-row .role{margin:0 0 0 auto;font:11px var(--serif);letter-spacing:.08em;color:var(--muted);white-space:nowrap}
.note-trigger{margin-left:0;min-width:22px;min-height:24px}
.stock-concepts-line{flex-wrap:nowrap;overflow:hidden;white-space:nowrap;margin:1px 0 5px;font-size:12px;line-height:1.4;color:var(--muted)}
.main-tag{flex:none;padding:0 5px}
.sub-tags{overflow:hidden;text-overflow:ellipsis}
.slot-tools{border:0;border-top:1px solid var(--line);gap:3px 5px;padding:4px 0;min-height:27px}
.slot-tools .period{margin-left:auto}
.slot .role-action,.slot .period button{font-size:12px;padding:2px 4px;color:var(--blue)}
.slot-quote{display:flex;align-items:baseline;gap:6px;white-space:nowrap;font-variant-numeric:tabular-nums}
.slot-quote strong{font-size:19px;font-weight:550}
.slot-quote .quote-pct{font:500 15px Georgia,serif;letter-spacing:-.03em}
.slot-quote.up{color:var(--up)}.slot-quote.down{color:var(--down)}
.slot-quote small{font-size:11px}
.slot:has(.slot-chart):hover,.slot:has(:focus-visible){border-color:#c6a354}
.slot-chart{position:relative;height:clamp(144px,13vw,188px);min-height:120px;max-height:75vh;box-sizing:border-box;overflow:hidden}
.slot .chart-open{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:26px;height:26px;padding:4px;color:var(--muted);background:var(--panel);border-radius:3px}
.slot .chart-height{position:absolute;right:0;bottom:0;width:18px;height:18px;padding:2px;background:var(--panel);color:var(--muted);cursor:ns-resize;touch-action:none}
.slot-chart.is-resizing iframe{pointer-events:none}
.chart-height svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-linecap:round;pointer-events:none}
.chart-open svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
@media(hover:hover){.slot:not(:hover):not(:focus-within) :is(.chart-open,.chart-height){opacity:0}.chart-open:hover{color:var(--text)}}
.slot .empty{min-height:132px;color:var(--muted)}
@container(max-width:320px){.slot-quote small{display:none}.stock-row{flex-wrap:wrap}.slot-tools{gap:3px}.slot-quote strong{font-size:17px}}
@media(max-width:780px){.slot{flex-basis:min(90%,380px)}.slot-chart{height:165px}}
