.sq-layout{grid-template-columns:320px minmax(0,1fr)}.sq #sqSQL{min-height:190px;font:14px/1.65 ui-monospace,Consolas,monospace}.sq #sqParams{min-height:85px;font:14px/1.5 ui-monospace,Consolas,monospace}.sq-workspace h2:not(:first-child){margin-top:26px}.sq-columns{display:grid;gap:10px;margin:20px 0}.sq-column{padding:13px;background:#191323;border:1px solid #59456c;border-radius:10px;overflow-wrap:anywhere}.sq-column strong{display:block;color:#f2e7ff;margin-bottom:6px}.sq-column span{font-size:13px;color:#cabcda;line-height:1.7}.sq details{border-top:1px solid #5e4878;margin-top:18px;padding-top:16px}.sq summary{cursor:pointer;font-weight:650;color:#e6d6fc}.sq label small{font-size:12px;font-weight:400}.sq #sqResults{min-height:180px}.sq #sqResults td button{display:block;max-height:100px;overflow:hidden;white-space:pre-wrap;min-width:80px}.sq #sqResults td button:hover{color:#d4b0ff;text-decoration:underline}.sq #sqSchema{max-height:300px;overflow:auto;font-size:12px}.sq #sqCell{max-height:350px;overflow:auto;font-size:13px}.sq .sq-workspace .lw-field-row{grid-template-columns:1fr 1.5fr}.sq #sqRun{font-weight:700;background:#9865db}@media(min-width:1600px){.sq-layout{grid-template-columns:350px minmax(0,1fr)}}@media(max-width:950px){.sq-layout{grid-template-columns:1fr}}@media(max-width:500px){.sq .sq-workspace .lw-field-row{grid-template-columns:1fr}.sq #sqSQL{min-height:200px}}

/* Explorer shell: database navigation stays beside the active workspace. */
.sq { max-width:1720px; }
.sq #sqDesk { border:1px solid #644c80; border-radius:18px; background:#171222; overflow:hidden; }
.sq .sq-deskbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 20px; background:#30213f; border-bottom:1px solid #59436e; }
.sq .sq-layout { grid-template-columns:270px minmax(0,1fr); gap:0; align-items:stretch; }
.sq .sq-layout>.lw-card { border:0; border-radius:0; padding:20px; }
.sq .sq-layout>aside { background:#20192d; border-right:1px solid #59436e; }
.sq .sq-workspace { background:#171222; }
.sq .sq-tabs { display:flex; gap:6px; flex-wrap:wrap; padding-bottom:16px; margin-bottom:20px; border-bottom:1px solid #57416d; }
.sq .sq-tabs button { background:transparent; border-color:transparent; padding:10px 14px; }
.sq .sq-tabs button[aria-pressed=true] { background:#56327c; border-color:#a16ad7; }
.sq [hidden] { display:none!important; }
.sq .sq-object-select { display:none; }
.sq .sq-object-list { display:grid; gap:6px; max-height:300px; overflow:auto; margin-top:14px; }
.sq .sq-object-list button { background:#2c223b; border:1px solid transparent; text-align:left; overflow-wrap:anywhere; padding:10px 12px; }
.sq .sq-object-list button[aria-pressed=true] { background:#48305e; border-color:#ad80e1; }
.sq .sq-object-list small { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.07em; }
.sq .sq-result-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.sq .sq-result-head h2 { margin:0; }
.sq .sq-result-head label { margin:0; font-size:12px; width:min(320px,60%); }
.sq #sqResults { min-height:280px; max-height:65vh; background:#1c1627; }
.sq #sqResults tbody tr:nth-child(even) { background:#251c32; }
.sq #sqResults tbody tr:hover { background:#38264c; }
.sq #sqResults td button { width:100%; }
.sq #sqResults:empty::after { content:'Open a database to explore its rows.'; display:block; padding:70px 24px; text-align:center; color:#b9a8cb; }
.sq #sqSQL { min-height:220px; padding:18px; border-left:3px solid #a77ae0; tab-size:2; }
.sq #sqHistory { display:grid; gap:10px; }
.sq #sqHistory button { text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; background:#2b203a; font:13px/1.6 ui-monospace,monospace; }
.sq #sqAllSchema { min-height:300px; max-height:65vh; overflow:auto; font:13px/1.7 ui-monospace,monospace; }
.sq .sq-column { padding:10px; }
#sqDesk.sq-expanded { position:fixed; inset:0; z-index:100000; border-radius:0; overflow:auto; background:#171222; }
#sqDesk.sq-expanded .sq-layout { min-height:calc(100dvh - 80px); }
@media(max-width:950px) {
 .sq .sq-layout { grid-template-columns:220px minmax(0,1fr); }
 .sq .sq-layout>.lw-card { padding:14px; }
}
@media(max-width:700px) {
 .sq .sq-layout { grid-template-columns:1fr; }
 .sq .sq-object-list { max-height:150px; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .sq .sq-column-details,.sq .sq-schema { max-height:220px; overflow:auto; }
 .sq .sq-tabs button { flex:1; padding:10px 6px; }
 .sq .sq-result-head { align-items:start; flex-direction:column; }
 .sq .sq-result-head label { width:100%; }
}
.sq .sq-columns { max-height:330px; overflow:auto; }
.sq .sq-feedback { display:flex; align-items:center; gap:16px; padding:10px 20px; border-bottom:1px solid #493657; flex-wrap:wrap; }
.sq .sq-feedback .lw-summary { margin:0; font-size:13px; }
.sq .sq-feedback .lw-status { flex:1; min-width:220px; margin:0; padding:10px 14px; font-size:13px; }
.sq #sqDesk { scroll-margin-top:100px; }
@media(min-width:951px) { .sq #sqDesk.sq-expanded .sq-layout>aside { max-height:calc(100dvh - 155px); overflow:auto; } }

/* Visual rhythm and file controls, scoped to the database explorer. */
.sq .lw-open { margin:0 0 24px; padding:24px; gap:24px; background:linear-gradient(125deg,#30223f,#211a30); }
.sq .lw-open label { line-height:1.5; }
.sq #sqFile { padding:8px; font-size:14px; font-weight:400; }
.sq #sqFile::file-selector-button {
  margin-right:14px;
  padding:11px 18px;
  border:1px solid #b98de9;
  border-radius:8px;
  background:#7045a5;
  color:#fff;
  font:600 14px system-ui,sans-serif;
  cursor:pointer;
}
.sq #sqFile::file-selector-button:hover { background:#8958c3; }
.sq .lw-open small { margin-top:10px; color:#bfaece; }
.sq #sqExample { background:#8554c6; font-weight:650; }
.sq .sq-deskbar { padding:18px 20px; }
.sq .sq-deskbar strong { font-size:17px; }
.sq .sq-info-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:28px 0 12px; }
.sq .sq-info-card { padding:22px; background:#211a2d; border:1px solid #514061; border-radius:14px; }
.sq .sq-info-card h2 { font-size:16px; color:#ddc6f5; margin:0 0 12px; }
.sq .sq-info-card p { margin:0; font-size:13px; line-height:1.85; color:#bfb3cf; }
.sq .sq-info-card a { color:#dab4ff; text-underline-offset:3px; }
.sq .sq-workspace>.lw-note,.sq #sqResultPanel>.lw-note { margin:20px 0; font-size:13px; line-height:1.8; color:#bfb3cf; }
.sq .sq-layout>aside>.lw-note { font-size:12px; line-height:1.8; }
.sq .sq-tabs button:hover { background:#3c2853; }
.sq button:disabled { opacity:.42; }
@media(max-width:850px) {
  .sq .sq-info-grid { grid-template-columns:1fr; gap:12px; margin-top:20px; }
  .sq .sq-info-card { padding:18px; }
  .sq .lw-open { padding:18px; margin-bottom:20px; }
}
