/* jupiter.art – the two bars fixed at the bottom of every page (components/lunaris/JupiterDock.tsx)
   and the shared design tokens of the jupiter.art look (light + dark). */

:root {
  --jx-page: #faf9fd;
  --jx-text: #18151d;
  --jx-muted: #625d69;
  --jx-glass: rgba(255, 255, 255, .73);
  --jx-border: rgba(85, 75, 105, .20);
  --jx-gold: #b39462;
  --jx-gold-text: #a8854f;
  --jx-accent: #d9582d;
  --jx-shadow: 0 7px 20px rgba(36, 24, 44, .09);
  --jx-bg: url('/lunaris/jupiter/light/background.jpg');
  --jx-serif: Georgia, 'Times New Roman', serif;
}
html[data-theme='dark'] {
  --jx-page: #0c0b13;
  --jx-text: #f3efec;
  --jx-muted: #c1bbc8;
  --jx-glass: rgba(34, 33, 43, .80);
  --jx-border: rgba(218, 213, 230, .22);
  --jx-gold-text: #e9c46a;
  --jx-accent: #f0c24b;
  --jx-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  --jx-bg: url('/lunaris/jupiter/dark/background.jpg');
}

/* the wordmark everywhere (LunarisLogo / .lx-logo text) in the jupiter.art serif */
.lx-logo { font-family: var(--jx-serif) !important; font-weight: 400 !important; letter-spacing: -.03em !important; }
.jx-mark { display: block; width: 100%; height: auto; color: var(--jx-text); overflow: visible; }

.jx-glass { background: var(--jx-glass); border: 1px solid var(--jx-border); box-shadow: var(--jx-shadow); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }

/* room for the bars at the end of every page */
.jx-dock-space { height: calc(150px + env(safe-area-inset-bottom)); }

.jx-dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 960; transform: translateX(-50%); width: min(calc(100% - 24px), 600px); display: grid; justify-items: center; gap: 8px; color: var(--jx-text); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; pointer-events: none; }
.jx-dock > * { pointer-events: auto; }
.jx-dock button { font: inherit; color: inherit; cursor: pointer; }

/* ---- tools: light/dark · Change · share ---- */
.jx-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(67%, 400px); padding: 7px 16px 7px 10px; border-radius: 30px; }
.jx-mode { display: inline-flex; align-items: center; gap: 4px; }
.jx-mode button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; opacity: .75; transition: background-color .25s, opacity .25s; }
.jx-mode button.is-on { opacity: 1; background: color-mix(in srgb, var(--jx-text) 12%, transparent); box-shadow: inset 0 0 0 1px var(--jx-border); }
/* light mode in the mockup shows just the moon to switch – the sun is the active state */
.jx-change, .jx-share { display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; font-size: 15px; }
.jx-sep { width: 1px; height: 24px; background: var(--jx-border); flex: none; }
.jx-icon { flex: none; }

/* ---- navigation ---- */
.jx-nav { display: flex; align-items: center; gap: 4px; width: 100%; padding: 12px 10px 10px 16px; border-radius: 24px; }
.jx-brand { flex: 0 0 27%; max-width: 150px; display: block; color: var(--jx-text); }
.jx-sep--nav { height: 40px; margin: 0 4px; }
.jx-item { flex: 1; display: grid; justify-items: center; gap: 5px; padding: 2px 0; color: var(--jx-text) !important; text-decoration: none !important; font-size: clamp(11px, 3.2vw, 14px); line-height: 1.1; opacity: .9; }
.jx-item.is-on { color: var(--jx-gold-text) !important; opacity: 1; }
.jx-item:hover { opacity: 1; }
@media (max-width: 380px) { .jx-nav { padding-left: 10px; } .jx-sep--nav { display: none; } }

.jx-toast { position: absolute; bottom: calc(100% + 10px); padding: 8px 16px; border-radius: 99px; background: var(--jx-text); color: var(--jx-page); font-size: 13px; font-weight: 600; }

/* the old floating "Vorschau zu deinem Profil" button gives way to the bars */
.ps-area { display: none !important; }
/* the profile's save bar (edit mode) sits above the bars */
.apf-savebar { bottom: calc(150px + env(safe-area-inset-bottom)) !important; }

/* ===================== v2: legible bars + soft fade (mockup) ===================== */
:root { --jx-bar: rgba(255, 255, 255, .93); --jx-bar-border: rgba(120, 100, 140, .18); --jx-bar-shadow: 0 14px 36px rgba(60, 40, 90, .18), 0 2px 6px rgba(60, 40, 90, .08); --jx-pill: #f4e4c6; --jx-pill-ink: #8a6430; --jx-fade-to: #f6f1fb; }
html[data-theme='dark'] { --jx-bar: rgba(26, 24, 32, .94); --jx-bar-border: rgba(255, 255, 255, .16); --jx-bar-shadow: 0 16px 40px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .07); --jx-pill: rgba(255, 255, 255, .12); --jx-pill-ink: #e9c46a; --jx-fade-to: #0c0b13; }

/* the page fades out behind the bars */
.jx-fade { position: fixed; left: 0; right: 0; bottom: 0; z-index: 955; height: calc(210px + env(safe-area-inset-bottom)); pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--jx-fade-to) 0%, transparent) 0%, color-mix(in srgb, var(--jx-fade-to) 70%, transparent) 45%, var(--jx-fade-to) 82%); }

.jx-dock { gap: 10px; width: min(calc(100% - 20px), 640px); }
.jx-dock .jx-glass { background: var(--jx-bar); border: 1px solid var(--jx-bar-border); box-shadow: var(--jx-bar-shadow); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }

/* tools: light/dark · Change · share */
.jx-tools { width: min(78%, 470px); padding: 7px 18px 7px 8px; border-radius: 99px; }
.jx-mode { gap: 6px; }
.jx-mode button { width: 50px; height: 50px; opacity: .85; }
.jx-mode button.is-on { opacity: 1; background: var(--jx-pill); box-shadow: inset 0 0 0 1px var(--jx-bar-border); }
html:not([data-theme='dark']) .jx-mode button.is-on { color: var(--jx-pill-ink); }
.jx-mode .jx-icon, .jx-share .jx-icon, .jx-change .jx-icon { width: 28px; height: 28px; }
.jx-change { font-size: clamp(16px, 4.6vw, 19px); gap: 10px; }
.jx-sep { height: 32px; }

/* navigation */
.jx-nav { gap: 2px; padding: 12px 12px 12px 18px; border-radius: 30px; }
.jx-brand { flex: 0 0 26%; max-width: 160px; }
.jx-sep--nav { height: 52px; margin: 0 6px; }
.jx-item { gap: 6px; padding: 8px 2px 7px; border-radius: 18px; font-size: clamp(12px, 3.6vw, 15px); opacity: 1; transition: background-color .25s, color .25s; }
.jx-item .jx-icon { width: 28px; height: 28px; }
.jx-item.is-on { background: var(--jx-pill); color: var(--jx-pill-ink) !important; box-shadow: inset 0 0 0 1px var(--jx-bar-border); }
@media (max-width: 380px) { .jx-nav { padding-left: 12px; } .jx-item { font-size: 11.5px; } }
.jx-dock-space { height: calc(200px + env(safe-area-inset-bottom)); }
.apf-savebar { bottom: calc(190px + env(safe-area-inset-bottom)) !important; }
.jsc-logo, .jsc-title, .jsc-slide, .jsc-end, .jsw-body { bottom: calc(185px + env(safe-area-inset-bottom)) !important; }

/* ===================== desktop: the sidebar on the left (JupiterSidebar) ===================== */
:root { --jx-side: 300px; --jx-side-bg: rgba(250, 248, 252, .96); --jx-side-line: rgba(80, 70, 100, .12); --jx-side-on: #f5e8d2; --jx-side-on-ink: #1d1913; }
html[data-theme='dark'] { --jx-side-bg: rgba(18, 16, 24, .97); --jx-side-line: rgba(255, 255, 255, .1); --jx-side-on: rgba(233, 196, 106, .14); --jx-side-on-ink: #f3e3bd; }
html.jx-slim { --jx-side: 84px; }
.jx-side { display: none; }

@media (min-width: 1100px) {
  html.jx-has-side body { padding-left: var(--jx-side); transition: padding-left .3s ease; }
  .jx-dock, .jx-fade, .jx-dock-space { display: none !important; }
  .jx-side { position: fixed; z-index: 950; left: 0; top: 0; bottom: 0; width: var(--jx-side); display: flex; flex-direction: column; gap: 6px; padding: 22px 18px 16px; overflow-y: auto; scrollbar-width: none;
    background: var(--jx-side-bg); border-right: 1px solid var(--jx-side-line); color: var(--jx-text); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; transition: width .3s ease; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .jx-side a { color: inherit; text-decoration: none; }
  .jx-side button { font: inherit; color: inherit; cursor: pointer; }
  .jx-side__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px 10px 12px; }
  .jx-side__logo { display: block; width: 168px; }
  .jx-side__fold { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--jx-text) 6%, transparent); font-size: 18px; }
  .jx-side__search { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; padding: 10px 14px; border: 1px solid var(--jx-side-line); border-radius: 14px; background: color-mix(in srgb, var(--jx-page) 70%, white 30%); }
  html[data-theme='dark'] .jx-side__search { background: rgba(255, 255, 255, .05); }
  .jx-side__search input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 15px; outline: none; }
  .jx-side__label { margin: 16px 0 6px 12px; font-family: var(--jx-serif); font-size: 13px; letter-spacing: .22em; text-transform: uppercase; opacity: .85; }
  .jx-side__nav { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--jx-side-line); }
  .jx-side__item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: 16px; transition: background-color .2s; }
  .jx-side__item:hover { background: color-mix(in srgb, var(--jx-text) 5%, transparent); }
  .jx-side__item.is-on { background: var(--jx-side-on); color: var(--jx-side-on-ink); font-weight: 700; }
  .jx-side__item.is-on::before { content: ""; position: absolute; left: -18px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; background: var(--jx-accent); }
  .jx-side__actions { display: grid; gap: 10px; margin: 14px 0 4px; }
  .jx-side__btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--jx-text); border-radius: 12px; font-family: var(--jx-serif); font-size: 17px; }
  .jx-side__btn--dark { background: var(--jx-text); color: var(--jx-page) !important; }
  .jx-side__look { display: grid; gap: 2px; padding: 4px 0 12px; border-bottom: 1px solid var(--jx-side-line); }
  .jx-side__mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 2px 0 8px; padding: 4px; border-radius: 99px; background: color-mix(in srgb, var(--jx-text) 6%, transparent); }
  .jx-side__mode button { height: 38px; border: 0; border-radius: 99px; background: none; display: grid; place-items: center; opacity: .75; }
  .jx-side__mode button.is-on { opacity: 1; background: var(--jx-side-on); color: var(--jx-side-on-ink); }
  .jx-side__foot { margin-top: auto; display: grid; gap: 12px; padding-top: 14px; }
  .jx-side__join { display: grid; gap: 12px; }
  .jx-side__join p { margin: 0 4px; font-family: var(--jx-serif); font-style: italic; font-size: 15px; line-height: 1.45; opacity: .85; }
  .jx-side__link { justify-self: center; text-decoration: underline !important; font-size: 15px; }
  .jx-side__me { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--jx-side-line); }
  .jx-side__avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--jx-side-on); border: 1.5px solid var(--jx-gold); }
  .jx-side__avatar img { width: 100%; height: 100%; object-fit: cover; }
  .jx-side__who { display: grid; min-width: 0; }
  .jx-side__who strong { font-family: var(--jx-serif); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jx-side__who small { font-size: 13px; opacity: .75; }
  .jx-side__help { display: flex; align-items: center; gap: 12px; padding: 12px 6px 0; border-top: 1px solid var(--jx-side-line); font-size: 15px; }
  .jx-side__help span { flex: 1; }

  /* slim: icons only */
  html.jx-slim .jx-side { padding-left: 12px; padding-right: 12px; }
  html.jx-slim .jx-side__logo, html.jx-slim .jx-side__search, html.jx-slim .jx-side__label, html.jx-slim .jx-side__item span, html.jx-slim .jx-side__btn span:last-child,
  html.jx-slim .jx-side__join, html.jx-slim .jx-side__who, html.jx-slim .jx-side__help span, html.jx-slim .jx-side__me > svg { display: none; }
  html.jx-slim .jx-side__head { justify-content: center; padding: 0 0 10px; }
  html.jx-slim .jx-side__item { justify-content: center; padding: 10px 0; }
  html.jx-slim .jx-side__mode { grid-template-columns: 1fr; border-radius: 16px; }
  html.jx-slim .jx-side__me { grid-template-columns: 1fr; justify-items: center; }

  /* fixed overlays of the page start right of the sidebar */
  html.jx-has-side .jsc { left: var(--jx-side); }
  .apf-savebar { bottom: 18px !important; left: calc(50% + var(--jx-side) / 2) !important; }
}
.jx-side, .jx-side * { box-sizing: border-box; }

/* ===================== pages next to the sidebar (desktop) ===================== */
/* the artwork page: no logo of its own (the sidebar carries it) */
html body .sm-top .sm-logo { display: none !important; }


@media (min-width: 1100px) {
  /* grids may shrink to the space next to the sidebar (no column wider than its share) */
  html body .sm { overflow-x: clip; }
  html body .sm-ch__inner { box-sizing: border-box; max-width: min(1200px, 100%); padding-left: clamp(28px, 3.4vw, 56px) !important; padding-right: clamp(28px, 3.4vw, 56px) !important; }
  html body .sm-hero .sm-ch__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); column-gap: clamp(30px, 3.6vw, 70px); }
  html body .sm-ch--2 .sm-ch__inner > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: clamp(30px, 4vw, 80px); }
  html body .sm-ch--3 .sm-ch__inner > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(28px, 3.4vw, 64px); }
  html body .sm-ch--4 .sm-ch__inner > div { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: clamp(30px, 4vw, 80px); }
  html body .sm-ch--5 .sm-ch__inner > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); column-gap: clamp(30px, 4vw, 80px); }
  html body .sm-ch--6 .sm-ch__inner > div { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: clamp(30px, 4vw, 80px); }
  html body .sm-hero__art, .sm-hero__text, .sm-hero__buy, .sm-thumbs { min-width: 0; }
  /* type follows the space beside the sidebar, long titles break instead of running out */
  html body .sm-h1 { font-size: clamp(40px, calc((100vw - var(--jx-side)) * .05), 76px); overflow-wrap: anywhere; hyphens: auto; }
  html body .sm-h2 { font-size: clamp(36px, calc((100vw - var(--jx-side)) * .042), 64px); overflow-wrap: anywhere; }
  html body .sm-nav { gap: clamp(16px, 2vw, 30px); flex-wrap: wrap; }
}

/* content containers measure the room next to the sidebar, not the whole window */
@media (min-width: 1100px) {
  html.jx-has-side { --jx-room: calc(100vw - var(--jx-side) - 16px); }
  html.jx-has-side .lunaris-shell, html.jx-has-side .lx-shell, html.jx-has-side .lx .lunaris-shell, html.jx-has-side .lunaris-ft .lunaris-shell { width: min(calc(var(--jx-room) * .92), 1440px); }
  html.jx-has-side .la-shell, html.jx-has-side .la-page .lunaris-shell, html.jx-has-side .lg-shell, html.jx-has-side .lg .lunaris-shell { width: min(calc(var(--jx-room) * .9), 1240px); }
  html.jx-has-side .lx-shell--narrow { max-width: 1180px; }
}

/* ===================== showcase open (ShowcasePlayer): no bottom bars, the film uses the full height ===================== */
html.jsc-open .jx-dock, html.jsc-open .jx-fade { display: none !important; }
html.jsc-open .jsc-logo, html.jsc-open .jsc-title, html.jsc-open .jsc-slide, html.jsc-open .jsc-end, html.jsc-open .jsw-body { bottom: calc(28px + env(safe-area-inset-bottom)) !important; }
html.jsc-open .jsx { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
