.spreadsheet-module{width:620px;height:420px;min-width:340px;min-height:260px;padding:24px 16px 48px;display:flex;flex-direction:column;gap:9px;color:var(--module-text,var(--text));font-family:var(--module-font,Inter,sans-serif)}
.sheet-heading{margin:0;padding-right:90px;font-size:21px;font-weight:600}
.sheet-toolbar{display:flex;gap:6px;flex-wrap:wrap}.sheet-toolbar button{font:inherit;font-size:11px;padding:5px 9px;border:1px solid var(--border);border-radius:7px;background:var(--surface-soft);color:inherit;cursor:pointer}
.sheet-formula-row{display:flex;align-items:center;gap:8px;flex:none;font-size:12px}.sheet-cell-name{min-width:32px;text-align:center;font-weight:700}.sheet-formula{flex:1;min-width:0;border:1px solid var(--border);border-radius:7px;padding:6px 8px;background:var(--surface-solid);color:var(--text);font:inherit}
.sheet-grid{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--border);border-radius:9px;scrollbar-width:thin;background:var(--surface-solid);color:var(--text)}
.sheet-grid table{border-collapse:separate;border-spacing:0;min-width:100%;font-size:12px;table-layout:fixed}
.sheet-grid th{background:var(--surface-soft);font-weight:600;position:sticky;z-index:2;top:0;height:25px;padding:3px 8px;text-align:center}
.sheet-grid tbody th{left:0;z-index:1;min-width:26px}.sheet-grid td{padding:0;border-right:1px solid var(--border);border-top:1px solid var(--border)}
.sheet-grid input{display:block;width:100%;min-width:86px;height:29px;border:0;background:transparent;color:inherit;font:inherit;padding:4px 7px;box-sizing:border-box;border-radius:0}
.sheet-grid input:focus,.sheet-grid input.is-selected{outline:2px solid #6f8ed6;outline-offset:-2px;background:#7896e010}.sheet-grid input.has-error{color:#bc414e}
.sheet-status{font-size:10px;opacity:.65;margin:0}.sheet-help{font-size:10px;opacity:.65;margin:0}
.sheet-grid table{min-width:0}.sheet-grid input{min-width:0}.sheet-grid tbody th{top:auto}.sheet-grid th{position:relative}.sheet-grid thead th{position:sticky;top:0}.sheet-grid tbody th{position:sticky;left:0}
.sheet-resizer{position:absolute;padding:0;border:0;background:transparent;z-index:4;touch-action:none}.sheet-resizer--column{right:-3px;top:0;bottom:0;width:7px;cursor:col-resize}.sheet-resizer--row{bottom:-3px;left:0;right:0;height:7px;width:100%;cursor:row-resize}.sheet-resizer:hover,.sheet-resizer:focus-visible{background:#7896e077}
.sheet-context-menu{position:fixed;inset:auto;margin:0;padding:6px;width:190px;border:1px solid var(--border);border-radius:12px;background:var(--surface-solid);color:var(--text);box-shadow:0 8px 28px #15243a25}.sheet-context-menu button{display:block;width:100%;padding:9px 11px;text-align:left;border:0;border-radius:7px;background:transparent;color:inherit;font:12px Inter,sans-serif;cursor:pointer}.sheet-context-menu button:hover,.sheet-context-menu button:focus-visible{background:var(--surface-soft)}.sheet-context-menu button:disabled{opacity:.4;cursor:default}.sheet-context-menu button:nth-child(3){margin-bottom:5px;border-bottom:1px solid var(--border)}
.sheet-resizer--column{right:0}.sheet-resizer--row{bottom:0}
.sheet-status,.sheet-help{display:none}.spreadsheet-module{padding-bottom:16px;gap:8px;transition:padding .2s}.spreadsheet-module:not(:hover):not(:has(:focus-visible)) .sheet-toolbar,.spreadsheet-module:not(:hover):not(:has(:focus-visible)) .sheet-formula-row{display:none}.spreadsheet-module:not(:hover):not(:has(:focus-visible)) .sheet-resizer{opacity:0;pointer-events:none}.spreadsheet-module:hover,.spreadsheet-module:has(:focus-visible){padding-bottom:46px}
.spreadsheet-module:not(:hover){padding-bottom:16px}.spreadsheet-module:not(:hover) .sheet-toolbar,.spreadsheet-module:not(:hover) .sheet-formula-row{display:none}.spreadsheet-module:not(:hover) .sheet-resizer{opacity:0;pointer-events:none}
.spreadsheet-module .sheet-grid textarea{display:block;width:100%;min-width:0;min-height:0;resize:none;border:0;border-radius:0;padding:4px 7px;box-sizing:border-box;font:12px var(--module-font,Inter,sans-serif);background:transparent;color:inherit;overflow:auto;scrollbar-width:none;position:relative;z-index:1;line-height:1.35}.sheet-grid td{position:relative}.sheet-grid textarea:focus,.sheet-grid textarea.is-selected{outline:2px solid #6f8ed6;outline-offset:-2px;background-color:#7896e010}.sheet-grid textarea.has-error{color:#bc414e}.sheet-cell-image{position:absolute;left:4px;top:4px;width:calc(100% - 8px);height:calc(100% - 32px);object-fit:contain;pointer-events:none}.sheet-grid thead th,.sheet-grid tbody th{cursor:cell}

.spreadsheet-module .sheet-format-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex:none;min-height:46px;max-height:min(126px,35cqh);margin:0;padding:7px;border:1px solid var(--border);border-radius:12px;background:var(--surface-solid);box-shadow:0 3px 10px #1720330c;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;white-space:nowrap;opacity:1;visibility:visible;pointer-events:auto;transform:none;z-index:3}
.spreadsheet-module:not(:hover) .sheet-format-toolbar{display:none}
.sheet-format-toolbar select{flex:none}.sheet-format-toolbar .sheet-color-control{position:relative;display:grid;place-items:center;flex:none;width:34px;height:30px;border:1px solid var(--border);border-radius:9px;background:var(--surface-solid);box-shadow:0 1px 3px #1720330c;cursor:pointer}.sheet-color-control input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.sheet-color-control:focus-within{outline:2px solid #60a5fa;outline-offset:2px}.sheet-format-notice:empty{display:none}

.sheet-cell-image{pointer-events:auto;z-index:2;cursor:pointer}.sheet-cell-image:focus{outline:2px solid #6f8ed6;outline-offset:-2px}.spreadsheet-module .sheet-grid textarea{white-space:pre-wrap;overflow-wrap:anywhere}
