/* Literature galaxy (components/pages/canvas.py tab 'literature_galaxy', lg_galaxy.js): lg- classes only.
   Tokens as the rest of the app: panels rgba(0,0,0,.6), text #e8e8e8, muted #9fb3c8, headings #cfefff,
   accent #f0a030, glow #4be9fa. */

.lg-root { position: relative; width: 100%; flex: 1 1 auto; height: 100%; min-height: 480px; overflow: hidden;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.07);
  background: radial-gradient(ellipse at 30% 20%, #0d1b2e 0%, #060a12 55%, #020308 100%);
  box-shadow: inset 0 0 120px rgba(0,0,0,0.8); color: #e8e8e8; font-size: .8rem; user-select: none; }
/* full screen: the same scene fixed over the whole window (lg_galaxy.js setMax) */
.lg-root.lg-max { position: fixed; inset: 0; width: 100vw; height: 100vh; min-height: 0; z-index: 5000;
  border-radius: 0; border: none; }
.lg-gl { position: absolute; inset: 0; }
.lg-gl canvas { display: block; outline: none; }
.lg-root.grab .lg-gl { cursor: grabbing; }
.lg-root.hovering .lg-gl { cursor: pointer; }

/* loading veil */
.lg-veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: #9fb3c8; z-index: 30; background: radial-gradient(circle, rgba(6,10,18,0.2), rgba(2,3,8,0.95));
  transition: opacity .9s ease; }
.lg-veil.gone { opacity: 0; pointer-events: none; }
.lg-orbit { width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(75,233,250,0.25); position: relative;
  animation: lg-spin 2.4s linear infinite; }
.lg-orbit::before, .lg-orbit::after { content: ''; position: absolute; border-radius: 50%; }
.lg-orbit::before { width: 10px; height: 10px; top: -5px; left: 27px; background: #4be9fa; box-shadow: 0 0 16px #4be9fa; }
.lg-orbit::after { width: 6px; height: 6px; bottom: 6px; right: 4px; background: #f0a030; box-shadow: 0 0 12px #f0a030; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* glass panels */
.lg-glass { background: rgba(4,8,14,0.62); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0,0,0,0.45); }

/* left control panel */
.lg-panel { position: absolute; top: 12px; left: 12px; bottom: 12px; width: 286px; z-index: 12; display: flex;
  flex-direction: column; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.lg-panel.closed { transform: translateX(-300px); opacity: 0; pointer-events: none; }
.lg-phead { padding: 12px 14px 8px; }
.lg-title { font-size: 1.02rem; color: #cfefff; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.lg-title i { color: #4be9fa; text-shadow: 0 0 12px #4be9fa; }
.lg-count { color: #7f93a8; font-size: .7rem; margin-top: 2px; }
.lg-pbody { overflow-y: auto; padding: 0 14px 14px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
.lg-sec { margin-top: 12px; }
.lg-sec-t { color: #7f93a8; font-size: .6rem; text-transform: uppercase; letter-spacing: 1.1px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between; }
.lg-lenses { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lg-lens { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); border-radius: 10px;
  padding: 7px 8px; cursor: pointer; color: #cfdcea; text-align: left; transition: all .2s; min-height: 50px; }
.lg-lens i { color: var(--c, #4be9fa); font-size: .9rem; display: block; margin-bottom: 3px; }
.lg-lens span { font-size: .68rem; line-height: 1.15; display: block; }
.lg-lens:hover { border-color: var(--c, #4be9fa); background: rgba(255,255,255,0.06); }
.lg-lens.on { border-color: var(--c, #4be9fa); background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(0,0,0,0));
  box-shadow: 0 0 18px -6px var(--c, #4be9fa), inset 0 0 12px -8px var(--c, #4be9fa); color: #fff; }
.lg-seg { display: flex; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 2px; }
.lg-seg button { flex: 1; border: none; background: transparent; color: #9fb3c8; font-size: .66rem; padding: 5px 4px;
  border-radius: 7px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.lg-seg button:hover { color: #fff; }
.lg-seg button.on { background: rgba(240,160,48,0.18); color: #f5d6a3; box-shadow: inset 0 0 0 1px rgba(240,160,48,0.45); }
.lg-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.lg-tg { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #cfdcea; font-size: .7rem; padding: 2px 0; }
.lg-tg input { display: none; }
.lg-tg .sw { width: 24px; height: 13px; border-radius: 7px; background: rgba(255,255,255,0.12); position: relative; transition: background .2s; flex: 0 0 24px; }
.lg-tg .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #9fb3c8; transition: all .2s; }
.lg-tg input:checked + .sw { background: rgba(75,233,250,0.35); }
.lg-tg input:checked + .sw::after { left: 13px; background: #4be9fa; box-shadow: 0 0 8px #4be9fa; }
.lg-search { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 9px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); color: #7f93a8; }
.lg-search:focus-within { border-color: rgba(240,160,48,0.7); }
.lg-search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #e8e8e8; font-size: .74rem; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lg-chip { border: 1px solid var(--c, rgba(255,255,255,0.2)); color: #cfdcea; background: transparent; border-radius: 999px;
  padding: 2px 9px; font-size: .64rem; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 5px; }
.lg-chip i.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.lg-chip.off { opacity: .35; border-style: dashed; }
.lg-years { display: flex; align-items: center; gap: 6px; color: #9fb3c8; font-size: .66rem; }
.lg-years input[type=range] { flex: 1; accent-color: #f0a030; }
.lg-hint { color: #7f93a8; font-size: .64rem; line-height: 1.4; margin-top: 6px; }

/* top-right: collapse + fullscreen buttons */
.lg-tools { position: absolute; top: 12px; right: 12px; z-index: 14; display: flex; gap: 6px;
  transition: transform .5s cubic-bezier(.2,.8,.2,1); }        /* slides left of the paper list (layoutCover) */
.lg-btn { height: 30px; min-width: 30px; padding: 0 9px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(4,8,14,0.62); color: #cfdcea; cursor: pointer; font-size: .72rem; display: inline-flex; align-items: center;
  gap: 6px; backdrop-filter: blur(8px); transition: all .2s; }
.lg-btn:hover { border-color: #f0a030; color: #f5d6a3; }
.lg-btn.on { border-color: #4be9fa; color: #4be9fa; }
.lg-open-panel { position: absolute; top: 12px; left: 12px; z-index: 11; }

/* legend (clusters of the current lens) */
.lg-legend { position: absolute; right: 12px; top: 52px; z-index: 12; width: 240px; max-height: calc(100% - 170px);
  overflow-y: auto; padding: 10px 12px; scrollbar-width: thin; transition: opacity .3s, transform .45s cubic-bezier(.2,.8,.2,1); }
.lg-legend.shifted { transform: translateX(calc(-1 * var(--lg-off, 0px))); }
.lg-leg-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer;
  color: #cfdcea; font-size: .7rem; transition: background .2s, opacity .2s; }
.lg-leg-row:hover { background: rgba(255,255,255,0.06); }
.lg-leg-row .dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.lg-leg-row .n { margin-left: auto; color: #7f93a8; font-size: .62rem; }
.lg-leg-row.off { opacity: .35; }
.lg-leg-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* lens caption (bottom centre) */
.lg-caption { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 10; max-width: min(720px, 60%);
  text-align: center; padding: 8px 16px; color: #cfdcea; font-size: .74rem; line-height: 1.4; pointer-events: none;
  transition: opacity .5s, left .5s cubic-bezier(.2,.8,.2,1); }
.lg-caption b { color: var(--c, #4be9fa); font-weight: 600; }
.lg-caption.lg-hide { opacity: 0; }

/* exploring around a paper (lg_galaxy.js focusOn): the bar in the caption's place, the labels of its neighbours */
.lg-focus { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 12px); z-index: 13; width: max-content;
  max-width: min(660px, 70%); display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; opacity: 0; pointer-events: none;
  border-color: color-mix(in srgb, var(--c, #4be9fa) 40%, transparent);
  transition: opacity .3s, transform .3s, left .5s cubic-bezier(.2,.8,.2,1); }
.lg-focus.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.lg-focus i.ic { color: var(--c, #4be9fa); text-shadow: 0 0 10px var(--c, #4be9fa); }
.lg-focus .tx { flex: 1; min-width: 0; line-height: 1.3; }
.lg-focus .tx .k { color: #7f93a8; font-size: .6rem; text-transform: uppercase; letter-spacing: .9px; }
.lg-focus .tx b { color: #fff; font-size: .76rem; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-focus .tx em { color: #9fb3c8; font-style: normal; font-size: .64rem; }
.lg-focus .lg-btn { flex: 0 0 auto; }
.lg-lbl.nb { display: flex; align-items: baseline; gap: 6px; max-width: 250px; padding: 2px 8px; border-radius: 8px; font-size: .64rem;
  color: #e8e8e8; background: rgba(4,8,14,0.7); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  text-shadow: 0 0 4px #000; pointer-events: auto; cursor: pointer; }
.lg-lbl.nb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lg-lbl.nb em { color: #7f93a8; font-style: normal; font-size: .58rem; flex: 0 0 auto; }
.lg-lbl.nb:hover { background: rgba(4,8,14,0.92); border-color: var(--c); color: #fff; }
.lg-lbl.nb.me { max-width: 320px; font-size: .7rem; font-weight: 600; color: #fff; border-color: #f0a030;
  box-shadow: 0 0 14px -4px #f0a030; }
.lg-lbl.nb.me i { color: #f0a030; align-self: center; }

/* HTML labels (clusters, axes, years, suns) */
.lg-labels { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lg-lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; will-change: transform, opacity;
  transition: opacity .35s; }
.lg-lbl.cl { font-size: .74rem; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--c);
  text-shadow: 0 0 14px var(--c), 0 0 3px rgba(0,0,0,0.9); padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.25); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); pointer-events: auto; cursor: pointer; }
.lg-lbl.cl:hover { background: rgba(0,0,0,0.55); }
.lg-lbl.ax { font-size: .64rem; color: #9fb3c8; letter-spacing: .4px; text-shadow: 0 0 6px #000; }
.lg-lbl.ax b { color: #cfefff; font-weight: 600; }
.lg-lbl.yr { font-size: .62rem; color: rgba(207,239,255,0.55); letter-spacing: 1px; }
.lg-lbl.sun { font-size: .66rem; color: #ffe8b0; text-shadow: 0 0 10px #f0a030; font-weight: 600; transform: translate(-50%, 16px); }
.lg-lbl.pt { font-size: .62rem; color: #e8e8e8; text-shadow: 0 0 6px #000, 0 0 2px #000; transform: translate(10px, -50%); max-width: 240px;
  overflow: hidden; text-overflow: ellipsis; opacity: .85; }

/* hover tooltip */
.lg-tip { position: absolute; z-index: 20; pointer-events: none; width: 330px; padding: 10px 12px; opacity: 0;
  transform: translateY(6px); transition: opacity .15s, transform .15s; }
.lg-tip.on { opacity: 1; transform: none; }
.lg-tip .tt { color: #fff; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.lg-tip .tm { color: #9fb3c8; font-size: .66rem; margin-top: 4px; }
.lg-tip .tk { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.lg-tip .tk span { font-size: .6rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--c, rgba(255,255,255,0.2)); color: #cfdcea; }
.lg-tip .tf { margin-top: 7px; font-size: .62rem; color: #7f93a8; display: flex; justify-content: space-between; gap: 8px; }
.lg-tip .tf b { color: #f5d6a3; font-weight: 600; }
.lg-tip .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); margin-top: 6px; overflow: hidden; }
.lg-tip .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--c, #4be9fa), #fff); }

/* details offcanvas (paper + PDF) */
.lg-oc { position: absolute; top: 0; right: 0; bottom: 0; width: min(62%, 980px); z-index: 25; display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .5s cubic-bezier(.2,.8,.2,1); border-radius: 14px 0 0 14px;
  background: rgba(5,9,15,0.93); border-left: 1px solid rgba(255,255,255,0.1); box-shadow: -20px 0 60px rgba(0,0,0,0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.lg-oc.on { transform: none; }
.lg-oc-h { padding: 14px 16px 10px; border-bottom: 1px solid rgba(255,255,255,0.07); position: relative; }
.lg-oc-x { position: absolute; top: 10px; right: 10px; }
.lg-oc-kind { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; padding-right: 90px; }
.lg-oc-kind span { font-size: .6rem; text-transform: uppercase; letter-spacing: .8px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--c, rgba(255,255,255,0.25)); color: var(--c, #cfdcea); }
.lg-oc-t { color: #fff; font-size: 1.02rem; font-weight: 600; line-height: 1.3; padding-right: 30px; user-select: text; }
.lg-oc-m { color: #9fb3c8; font-size: .72rem; margin-top: 4px; user-select: text; }
.lg-oc-kw { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.lg-oc-kw span { font-size: .62rem; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.05); color: #cfdcea; }
.lg-oc-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lg-oc-acts a { text-decoration: none; }
.lg-oc-abs { color: #cfdcea; font-size: .74rem; line-height: 1.5; margin-top: 10px; max-height: 150px; overflow-y: auto;
  user-select: text; padding-right: 6px; }
.lg-oc-abs.closed { display: none; }
.lg-oc-nn { margin-top: 10px; }
.lg-oc-nn .lg-sec-t { margin-bottom: 4px; }
.lg-nns { display: flex; flex-wrap: wrap; gap: 5px; }
.lg-nn { display: inline-flex; align-items: center; gap: 6px; max-width: 49%; padding: 3px 9px 3px 7px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: #cfdcea; font-size: .66rem; cursor: pointer;
  transition: all .2s; }
.lg-nn:hover { border-color: var(--c); background: rgba(255,255,255,0.07); color: #fff; }
.lg-nn i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.lg-nn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lg-nn em { color: #7f93a8; font-style: normal; font-size: .58rem; flex: 0 0 auto; }
.lg-oc-b { flex: 1; min-height: 0; position: relative; }
.lg-oc-b iframe { width: 100%; height: 100%; border: none; background: #1b1f24; border-radius: 0 0 0 14px; }
.lg-oc-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #7f93a8; text-align: center; padding: 24px; }
.lg-oc-none i.big { font-size: 2.2rem; color: rgba(75,233,250,0.35); }

/* the paper list: every cluster of the lens as an accordion, its papers one line each (lg_galaxy.js openList);
   it sits under the paper panel */
.lg-oc.lg-cp { width: min(440px, 100%); z-index: 24; }
.lg-cp-h { padding: 12px 16px 10px; border-bottom: 1px solid rgba(255,255,255,0.07); position: relative; }
.lg-cp-lenses { display: flex; gap: 5px; flex-wrap: wrap; padding-right: 40px; margin-bottom: 10px; }
.lg-cp-lenses .lg-btn { width: 32px; padding: 0; justify-content: center; }
.lg-cp-lenses .lg-btn i { color: var(--c); }
.lg-cp-lenses .lg-btn.on { border-color: var(--c); background: rgba(255,255,255,0.06); box-shadow: 0 0 14px -5px var(--c); }
.lg-cp-t { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.3; padding-right: 36px; }
.lg-cp-t i.lens { color: var(--c); text-shadow: 0 0 12px var(--c); }
.lg-cp-d { color: #9fb3c8; font-size: .68rem; line-height: 1.4; margin-top: 4px; }
.lg-cp-tools { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.lg-cp-tools .lg-search { flex: 1; min-width: 0; height: 30px; }
.lg-cp-sort { margin-top: 8px; }
.lg-cp-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 14px; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent; }
/* one cluster: header (opens / closes), then its lines */
.lg-acc { border-radius: 11px; margin-bottom: 4px; border: 1px solid transparent; transition: background .2s, border-color .2s, opacity .2s; }
.lg-acc.open { background: rgba(255,255,255,0.025); border-color: rgba(255,255,255,0.06); }
.lg-acc.off { opacity: .5; }
.lg-acc-h { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 10px; cursor: pointer; color: #cfdcea;
  font-size: .76rem; font-weight: 600; }
.lg-acc-h:hover { background: rgba(255,255,255,0.05); }
.lg-acc-h .chev { flex: 0 0 10px; font-size: .62rem; color: #7f93a8; transition: transform .2s; }
.lg-acc.open .lg-acc-h .chev { transform: rotate(90deg); color: var(--c); }
.lg-acc-h .dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.lg-acc-h .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-acc.open .lg-acc-h .nm { color: #fff; }
.lg-acc-h .n { color: #7f93a8; font-size: .64rem; font-weight: 400; white-space: nowrap; }
.lg-ib { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; border: 1px solid transparent; background: transparent;
  color: #7f93a8; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .66rem; transition: all .15s; }
.lg-ib:hover { color: #f5d6a3; border-color: rgba(240,160,48,0.6); background: rgba(240,160,48,0.08); }
.lg-ib.on { color: #4be9fa; border-color: rgba(75,233,250,0.5); }
.lg-acc-d { color: #7f93a8; font-size: .62rem; line-height: 1.4; padding: 0 10px 4px 38px; }
.lg-acc-b { padding: 0 2px 6px; }
/* one paper */
.lg-cp-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 8px 8px 10px; margin-bottom: 2px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: #cfdcea; text-align: left; cursor: pointer; font: inherit; outline: none;
  transition: background .15s, border-color .15s, opacity .2s; }
.lg-cp-row:hover, .lg-cp-row:focus-visible { background: rgba(255,255,255,0.05); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.lg-cp-row.on { background: rgba(255,255,255,0.07); border-color: var(--c); }
.lg-cp-row.nb { border-left: 2px solid #f0a030; }                /* a neighbour of the paper explored around */
.lg-cp-row.dim { opacity: .4; }
.lg-cp-row .dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.lg-cp-row .yr { display: none; flex: 0 0 34px; color: var(--c); font-size: .7rem; font-weight: 600; padding-top: 1px; }
.lg-cp-list.by-year .lg-cp-row .yr { display: block; }               /* sorted by year: the year leads the line, no dot */
.lg-cp-list.by-year .lg-cp-row .dot { display: none; }
.lg-cp-row .tx { flex: 1; min-width: 0; }
.lg-cp-row b { display: block; color: #fff; font-size: .76rem; font-weight: 600; line-height: 1.32; }
.lg-cp-row em { display: block; font-style: normal; color: #7f93a8; font-size: .64rem; margin-top: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.lg-cp-row .one { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #b9c7d6;
  font-size: .7rem; line-height: 1.42; margin-top: 3px; }
.lg-cp-row .ic { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: #7f93a8; font-size: .62rem;
  white-space: nowrap; }
.lg-cp-row .ic .fa-file-pdf { color: #4be9fa; font-size: .7rem; }

/* placing a document (lg_galaxy.js openPlace; components/literature_place.py): the panel, the user's stars, their panel */
.lg-pl-b { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 18px; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent; }
.lg-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed rgba(240,160,48,0.45); background: rgba(240,160,48,0.04); color: #cfdcea; text-align: center;
  transition: background .2s, border-color .2s; }
.lg-drop:hover, .lg-drop.over { background: rgba(240,160,48,0.1); border-color: #f0a030; }
.lg-drop input { display: none; }
.lg-drop > i { font-size: 1.3rem; color: #f0a030; }
.lg-drop b { color: #f5d6a3; font-weight: 600; }
.lg-drop em { font-style: normal; color: #7f93a8; font-size: .64rem; }
.lg-pl-note { color: #9fb3c8; font-size: .68rem; line-height: 1.4; margin: 8px 0 4px; }
.lg-pl-note i { color: #5fbf6a; }
.lg-fl { display: block; color: #7f93a8; font-size: .6rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }
.lg-fl input, .lg-fl textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border-radius: 9px; font: inherit;
  font-size: .76rem; text-transform: none; letter-spacing: 0; color: #e8e8e8; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); outline: none; resize: vertical; user-select: text; }
.lg-fl textarea { line-height: 1.45; min-height: 120px; }
.lg-fl input:focus, .lg-fl textarea:focus { border-color: rgba(240,160,48,0.7); }
.lg-fl input:disabled, .lg-fl textarea:disabled { opacity: .55; }
.lg-fl-yr input { width: 110px; }
.lg-go { margin-top: 12px; height: 34px; padding: 0 14px; border-color: rgba(240,160,48,0.6); color: #f5d6a3; background: rgba(240,160,48,0.12); }
.lg-go:disabled { opacity: .45; cursor: default; }
.lg-pl-st { margin-top: 10px; font-size: .7rem; }
.lg-pl-st .run { color: #cfefff; }
.lg-pl-st .err { color: #ffb4ac; line-height: 1.4; }
.lg-pl-st .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); margin-top: 6px; overflow: hidden; }
.lg-pl-st .bar i { display: block; height: 100%; background: linear-gradient(90deg, #f0a030, #fff); transition: width .6s; }
.lg-pl-off { color: #cfdcea; font-size: .72rem; line-height: 1.45; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.lg-pl-off i { color: #4be9fa; }
.lg-pl-doc { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; cursor: pointer; color: #cfdcea;
  border: 1px solid transparent; transition: background .15s, border-color .15s; outline: none; }
.lg-pl-doc:hover, .lg-pl-doc:focus-visible { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.lg-pl-doc > i { color: #fff; font-size: .72rem; }
.lg-pl-doc .tx { flex: 1; min-width: 0; }
.lg-pl-doc b { display: block; color: #fff; font-size: .74rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-pl-doc em { display: block; font-style: normal; color: #7f93a8; font-size: .62rem; margin-top: 1px; }
.lg-pl-doc.stale { cursor: default; }
.lg-pl-doc.stale em { color: #f5d6a3; }
.lg-cp-row .ic i.mine { color: #fff; }
.lg-lbl.mine { display: flex; align-items: center; gap: 5px; max-width: 220px; padding: 2px 8px; border-radius: 8px; font-size: .64rem;
  font-weight: 600; color: #fff; background: rgba(4,8,14,0.72); border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 0 12px -3px rgba(255,255,255,0.6); pointer-events: auto; cursor: pointer; }
.lg-lbl.mine span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lg-lbl.mine i { font-size: .6rem; }
.lg-mine { position: absolute; inset: 0; overflow-y: auto; padding: 14px 18px; }
.lg-mine-r { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin-bottom: 4px;
  border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.lg-mine-r.on { border-color: var(--c); background: rgba(255,255,255,0.05); }
.lg-mine-r .lg-btn { width: 32px; padding: 0; justify-content: center; flex: 0 0 32px; }
.lg-mine-r .lg-btn i { color: var(--c); }
.lg-mine-r .tx { flex: 1; min-width: 0; }
.lg-mine-r .tx b { display: block; color: #cfefff; font-size: .7rem; font-weight: 600; }
.lg-mine-r .cl { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: .76rem; margin-top: 2px; }
.lg-mine-r .cl i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); box-shadow: 0 0 8px var(--k); }
.lg-mine-r em { display: block; font-style: normal; color: #9fb3c8; font-size: .64rem; margin-top: 3px; }
.lg-mine-r .rl { color: #f5d6a3; font-size: .72rem; font-weight: 600; flex: 0 0 auto; }

/* stories (lg_galaxy.js startStory / paintStories; trajectories/stories.json): the left panel's list with a switch per
   path, the labels on the map, the card that reads a milestone */
.lg-st-all button { border: none; background: none; color: #f5d6a3; font-size: .6rem; cursor: pointer; text-transform: none;
  letter-spacing: 0; padding: 0; }
.lg-stories { display: flex; flex-direction: column; gap: 3px; }
.lg-story-r { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; border: 1px solid transparent;
  transition: background .2s, border-color .2s; }
.lg-story-r:hover { background: rgba(255,255,255,0.04); }
.lg-story-r.playing { border-color: var(--c); background: rgba(255,255,255,0.05); }
.lg-story-r .lg-tg { flex: 0 0 auto; padding: 0; }
.lg-story-r .lg-tg input:checked + .sw { background: color-mix(in srgb, var(--c) 45%, transparent); }
.lg-story-r .lg-tg input:checked + .sw::after { background: var(--c); box-shadow: 0 0 8px var(--c); }
.lg-story-r .tx { flex: 1; min-width: 0; border: none; background: none; text-align: left; cursor: pointer; padding: 0; font: inherit; }
.lg-story-r .tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #e8e8e8;
  font-size: .68rem; font-weight: 600; line-height: 1.3; }
.lg-story-r .tx:hover b { color: #fff; }
.lg-story-r .tx em { display: block; font-style: normal; color: #7f93a8; font-size: .6rem; margin-top: 1px; }
.lg-story-r .lg-ib { color: var(--c); }
.lg-lbl.stag { display: flex; align-items: center; gap: 5px; max-width: 230px; padding: 2px 8px; border-radius: 999px; font-size: .62rem;
  font-weight: 600; color: #fff; background: rgba(4,8,14,0.7); border: 1px solid var(--c); box-shadow: 0 0 12px -3px var(--c);
  pointer-events: auto; cursor: pointer; }
.lg-lbl.stag i { color: var(--c); font-size: .55rem; }
.lg-lbl.stag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lg-lbl.snum { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: var(--c); background: rgba(4,8,14,0.78); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  pointer-events: auto; cursor: pointer; transform-origin: center; }
.lg-lbl.snum.past { color: #04080e; background: color-mix(in srgb, var(--c) 75%, transparent); }
.lg-lbl.snum.on { width: 26px; height: 26px; font-size: .74rem; color: #04080e; background: var(--c); box-shadow: 0 0 16px var(--c); }
/* --lg-text = the reader's text size of the card (lg_galaxy.js setTextSize: the two "A" buttons of its head, kept in
   localStorage 'lg:text', 130% by default): the card's fonts, width and height grow with it; the buttons keep their own size */
.lg-story { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 14px); z-index: 13;
  width: calc(640px * var(--lg-text, 1)); max-width: 70%; max-height: min(64%, calc(46% * var(--lg-text, 1)));
  display: flex; flex-direction: column; opacity: 0; pointer-events: none;
  border-color: color-mix(in srgb, var(--c, #4be9fa) 45%, transparent);
  transition: opacity .3s, transform .3s, left .5s cubic-bezier(.2,.8,.2,1); }
.lg-story.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.lg-st-h { display: flex; align-items: center; gap: 8px; padding: 9px 10px 6px 14px; }
.lg-st-lens { flex: 0 0 auto; font-size: calc(.58rem * var(--lg-text, 1)); text-transform: uppercase; letter-spacing: .8px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--l); color: var(--l); }
.lg-st-h .tt { flex: 1; min-width: 0; color: #cfdcea; font-size: calc(.7rem * var(--lg-text, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-st-h .n { color: var(--c); font-size: calc(.68rem * var(--lg-text, 1)); font-weight: 700; flex: 0 0 auto; }
.lg-tsz { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.05); }
.lg-tsz button { width: 26px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #9fb3c8;
  font-family: Oxanium, "Segoe UI", sans-serif; font-weight: 700; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.lg-tsz button.s { font-size: 11px; } .lg-tsz button.l { font-size: 16px; }
.lg-tsz button:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.09); }
.lg-tsz button:disabled { opacity: .35; cursor: default; }
.lg-st-b { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
.lg-st-syn { color: #9fb3c8; font-size: calc(.7rem * var(--lg-text, 1)); line-height: 1.5; font-style: italic; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px;
  background: rgba(255,255,255,0.04); user-select: text; }
.lg-st-t { color: #fff; font-size: calc(.9rem * var(--lg-text, 1)); font-weight: 600; line-height: 1.3; }
.lg-st-p { color: #cfdcea; font-size: calc(.76rem * var(--lg-text, 1)); line-height: 1.6; margin-top: 5px; user-select: text; }
.lg-cite { display: inline; border: none; padding: 0 3px; margin: 0 -1px; border-radius: 4px; font: inherit; cursor: pointer;
  color: #cfefff; background: rgba(255,255,255,0.07); border-bottom: 1px dotted rgba(207,239,255,0.5); }
.lg-cite.f { color: #04080e; background: var(--c); border-bottom: none; font-weight: 600; }
.lg-cite:hover { background: rgba(240,160,48,0.35); color: #fff; }
.lg-st-f { display: flex; align-items: center; gap: 8px; padding: 6px 10px 9px; }
.lg-st-f .lg-btn:disabled { opacity: .35; cursor: default; }
.lg-st-f .dots { flex: 1; display: flex; justify-content: center; gap: 6px; }
.lg-st-f .dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--c); background: transparent; cursor: pointer; }
.lg-st-f .dot.past { background: color-mix(in srgb, var(--c) 55%, transparent); }
.lg-st-f .dot.on { background: var(--c); box-shadow: 0 0 8px var(--c); transform: scale(1.25); }
.lg-nn.lg-sv em { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
