
:root {
  /* Shell theme palette. These values are replaced by the selected theme. */
  --shell-theme-bg: #0a0a0a;
  --shell-theme-panel: #111111;
  --shell-theme-card-bg: #0f0f0f;
  --shell-theme-icon-bg: #151515;
  --shell-theme-icon-border: #2a2a2a;
  --shell-theme-text: #ffe8f0;
  --shell-theme-lead: #fce7ee;
  --shell-theme-muted: #fbd1dd;
  --shell-theme-soft: #ffd3df;
  --shell-theme-accent: #f78fb3;
  --shell-theme-accent-strong: #e74c3c;
  --shell-theme-gradient: linear-gradient(180deg, #ff6f91, #ff3a66);
  --shell-theme-ring: linear-gradient(135deg, rgba(231, 76, 60, .25), rgba(247, 143, 179, .18));
  --shell-theme-shadow: rgba(231, 76, 60, .34);
  --shell-theme-shadow-soft: rgba(192, 57, 43, .20);
  --shell-theme-header-bg: rgba(0, 0, 0, .60);
  --shell-theme-header-shadow: rgba(0, 0, 0, .40);
  --shell-theme-toolbar-bg: rgba(9, 5, 7, .88);
  --shell-theme-footer: #555555;

  --shell-header-base-height: 76px;
  --shell-header-height: calc(var(--shell-header-base-height) + env(safe-area-inset-top));
  --shell-header-offset: var(--shell-header-height);
  --shell-mobile-toolbar-height: 56px;
  --shell-gap: 12px;
  --shell-left-track-width: 220px;
  --shell-right-track-width: 305px;
  --shell-radius: 17px;
  --shell-center-radius: 21px;

  /* Shell component palette, changed together with the theme variables above. */
  --shell-accent: #f78fb3;
  --shell-accent-strong: #ff3a66;
  --shell-accent-soft: #ffd3df;
  --shell-surface: rgba(13, 8, 11, .76);
  --shell-surface-strong: rgba(18, 10, 14, .88);
  --shell-surface-soft: rgba(28, 14, 20, .62);
  --shell-border: rgba(247, 143, 179, .22);
  --shell-border-active: rgba(255, 111, 145, .72);
  --shell-shadow: rgba(231, 76, 60, .18);
  --shell-glow: rgba(247, 143, 179, .13);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--shell-theme-bg); }
body {
  --shell-main-min-height: calc(100dvh - var(--shell-header-offset) - 22px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--shell-theme-bg);
  color: var(--shell-theme-text);
  font-family: var(--shell-font-site, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
a, button, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

body, .shell-stars, .shell-header, .shell-header-toggle, .shell-nav-link,
.shell-left, .shell-right, .shell-main-stage, .shell-column-header, .shell-navigation-item,
.shell-mobile-toolbar, .shell-mobile-button {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-duration: 220ms;
  transition-timing-function: ease;
}

.shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 14000;
  min-height: var(--shell-header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  background: var(--shell-theme-header-bg);
  box-shadow: 0 2px 12px var(--shell-theme-header-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 280ms cubic-bezier(.2,.75,.25,1), opacity 200ms ease;
}
.shell-header-toggle {
  position: fixed;
  z-index: 14020;
  top: calc(env(safe-area-inset-top) + 29px);
  right: clamp(14px, 2.2vw, 30px);
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--shell-theme-muted) 72%, transparent);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: top 280ms cubic-bezier(.2,.75,.25,1), color 160ms ease, opacity 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.shell-header-toggle:hover,
.shell-header-toggle:focus-visible { color: var(--shell-theme-accent); outline: none; }
body.shell-header-hidden { --shell-header-offset: 0px; }
body.shell-header-hidden .shell-header { transform: translateY(-105%); opacity: 0; pointer-events: none; }
body.shell-header-hidden .shell-header-toggle {
  top: env(safe-area-inset-top);
  padding: 8px 12px 9px;
  border: 1px solid color-mix(in srgb, var(--shell-theme-accent) 34%, transparent);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: color-mix(in srgb, var(--shell-theme-header-bg) 94%, transparent);
  color: color-mix(in srgb, var(--shell-theme-text) 78%, transparent);
  box-shadow:
    0 7px 20px color-mix(in srgb, var(--shell-theme-header-shadow) 76%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--shell-theme-accent) 12%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.shell-header-hidden .shell-header-toggle:hover,
body.shell-header-hidden .shell-header-toggle:focus-visible {
  color: var(--shell-theme-accent);
  border-color: color-mix(in srgb, var(--shell-theme-accent) 68%, transparent);
  background: color-mix(in srgb, var(--shell-theme-header-bg) 97%, var(--shell-theme-accent) 3%);
  box-shadow:
    0 8px 24px color-mix(in srgb, var(--shell-theme-header-shadow) 86%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--shell-theme-accent) 25%, transparent);
}
.shell-nav {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
}
.shell-nav-link {
  position: relative;
  padding: .5rem 0;
  color: var(--shell-theme-text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.shell-nav-link:hover,
.shell-nav-link.shell-is-active { color: var(--shell-theme-accent); }
.shell-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--shell-theme-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.shell-nav-link:hover::after,
.shell-nav-link.shell-is-active::after { transform: scaleX(1); }

.shell-content {
  position: relative;
  z-index: 1;
  padding-top: var(--shell-header-offset);
  transition: padding-top 280ms cubic-bezier(.2,.75,.25,1);
}

/* Shell geometry and theme-derived surface treatment. */
.shell-app {
  width: 100%;
  min-height: var(--shell-main-min-height);
  display: grid;
  grid-template-columns: var(--shell-left-track-width) minmax(0, 1fr) var(--shell-right-track-width);
  align-items: start;
  gap: var(--shell-gap);
  color: var(--shell-theme-text);
  transition: grid-template-columns 340ms cubic-bezier(.2,.75,.25,1), gap 340ms cubic-bezier(.2,.75,.25,1);
}
.shell-left,
.shell-right {
  position: sticky;
  top: calc(var(--shell-header-offset) + 14px);
  height: calc(100dvh - var(--shell-header-offset) - 22px);
  min-height: calc(100dvh - var(--shell-header-offset) - 22px);
  max-height: calc(100dvh - var(--shell-header-offset) - 22px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius);
  background:
    radial-gradient(circle at top left, var(--shell-glow), transparent 47%),
    var(--shell-surface);
  box-shadow: 0 16px 44px var(--shell-shadow);
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--shell-accent) 38%, transparent) transparent;
  transition:
    opacity 220ms ease,
    transform 320ms cubic-bezier(.2,.75,.25,1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    visibility 0s linear 0s;
}
.shell-main {
  width: 100%;
  max-width: 2000px;
  min-width: 0;
  justify-self: center;
  transition: max-width 320ms cubic-bezier(.2,.75,.25,1);
}
.shell-main-stage {
  min-height: var(--shell-main-min-height);
  height: auto;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.shell-column-header {
  min-height: 76px;
  border-bottom: 1px solid var(--shell-border);
  background:
    radial-gradient(circle at top left, var(--shell-glow), transparent 55%),
    var(--shell-surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.shell-left-header { position: relative; top: auto; z-index: 3; display: grid; place-items: center; padding: 17px 18px; text-align: center; flex: 0 0 auto; }
.shell-brand { min-width: 0; width: 100%; display: grid; place-items: center; }
.shell-brand strong { color: var(--shell-accent-soft); font-size: 16px; letter-spacing: .01em; }
.shell-brand strong span { display: block; margin-top: 3px; color: var(--shell-theme-muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
.shell-profile-link { margin-top: 9px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--shell-border); background: transparent; color: var(--shell-accent); font-size: 12px; font-weight: 800; cursor: pointer; }
.shell-navigation {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--shell-accent) 38%, transparent) transparent;
}
.shell-navigation-item {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--shell-border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--shell-surface-soft) 78%, transparent);
  color: var(--shell-theme-text);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 90ms ease, border-color 90ms ease, background 90ms ease;
}
.shell-navigation-item:hover,
.shell-navigation-item:focus-visible { transform: translateY(-1px); border-color: color-mix(in srgb, var(--shell-accent) 55%, transparent); background: color-mix(in srgb, var(--shell-accent) 10%, var(--shell-surface-soft)); outline: none; }
.shell-navigation-item.shell-is-active { border-color: var(--shell-border-active); background: linear-gradient(180deg, color-mix(in srgb, var(--shell-accent) 18%, transparent), color-mix(in srgb, var(--shell-accent-strong) 10%, var(--shell-surface-soft))); color: var(--shell-theme-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shell-accent) 12%, transparent), 0 0 18px var(--shell-shadow); }
.shell-navigation-item small { color: var(--shell-theme-muted); font-size: 10px; opacity: .68; text-transform: uppercase; letter-spacing: .08em; }
.shell-navigation-item.shell-is-active small { color: var(--shell-accent-soft); opacity: .9; }
.shell-left-footer { flex: 0 0 auto; margin-top: auto; padding: 13px; border-top: 1px solid var(--shell-border); background: color-mix(in srgb, var(--shell-theme-bg) 48%, transparent); color: var(--shell-theme-muted); font-size: 11px; text-align: center; opacity: .7; }

.shell-main-content { min-height: var(--shell-main-min-height); padding: 0; background: transparent; overflow: visible; }
.shell-route-pane[hidden] { display: none !important; }
.shell-route-loading {
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--shell-theme-muted);
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}
.shell-route-loading[hidden] { display: none !important; }

.shell-mobile-toolbar,
.shell-backdrop { display: none; }

@media (max-width: 860px) {
  .shell-nav-link { font-size: .8rem; }
}
@media (max-width: 720px) {
  :root { --shell-header-base-height: 70px; }
  .shell-header { padding: 1rem; }
  .shell-nav { gap: clamp(1.8rem, 10vw, 3.5rem); }
}
@media (pointer: coarse) {
  .shell-nav-link { min-height: 44px; display: inline-flex; align-items: center; }
  .shell-navigation-item, .shell-mobile-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shell-stars::before, .shell-stars::after { animation: none; }
  .shell-left, .shell-right, .shell-backdrop, .shell-navigation-item, body, .shell-stars, .shell-header, .shell-main-stage, .shell-column-header, .shell-mobile-toolbar { transition: none; }
}

/* Unified shell canvas. Included page output occupies the center track. */
.shell-unified-view {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - var(--shell-header-offset));
  padding: 14px 14px 8px;
}


/* Existing desktop widths stay fixed. Beyond Full HD, both shell wings scale
   together from the same 1920px baseline while the center remains flexible. */
@media (min-width: 120.001rem) {
  :root {
    --shell-left-track-width: 11.4583333333vw;
    --shell-right-track-width: 15.8854166667vw;
  }
}

/* Site Home view collapses the shell side tracks. */
.shell-app.shell-is-home {
  grid-template-columns: 0 minmax(0, 1fr) 0;
  gap: 0;
}
.shell-app.shell-is-home .shell-main {
  max-width: 1100px;
}
.shell-app.shell-is-home .shell-left,
.shell-app.shell-is-home .shell-right {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  box-shadow: none;
}
.shell-app.shell-is-home .shell-left { transform: translateX(-20px) scale(.985); }
.shell-app.shell-is-home .shell-right { transform: translateX(20px) scale(.985); }

/* Site Home keeps the center track structural but visually transparent. */
.shell-app.shell-is-home .shell-main-stage {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Hosted view reveals the shell side tracks around the center canvas. */
.shell-app.shell-is-fan .shell-left,
.shell-app.shell-is-fan .shell-right {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

/* Site Home view does not expose hosted-view mobile chrome. */
.shell-content.shell-is-home .shell-mobile-toolbar,
.shell-content.shell-is-home .shell-backdrop {
  display: none !important;
}

@media (max-width: 71.999rem) {
  .shell-unified-view { padding: 0 10px 8px; }

  .shell-app.shell-is-home {
    grid-template-columns: minmax(0, 1fr) 0;
    gap: 0;
  }
  .shell-app.shell-is-home .shell-main {
    grid-column: 1;
    grid-row: 1;
    max-width: 1100px;
  }
  /* In top-level HOME, collapsed side columns must leave the grid entirely.
     Visibility/opacity alone still lets the left column create an implicit
     mobile grid row below HOME. */
  .shell-app.shell-is-home .shell-left,
  .shell-app.shell-is-home .shell-right {
    display: none;
  }
}

@media (max-width: 57.999rem) {
  .shell-app.shell-is-home { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .shell-unified-view { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 35.999rem) {
  .shell-unified-view { padding-left: 6px; padding-right: 6px; }
}



@media (prefers-reduced-motion: reduce) {
  .shell-app,
  .shell-main,
  .shell-left,
  .shell-right { transition: none; }
}







/* Shell-owned compact select appearance used by the top language control. */
.shell-theme-select { position: relative; width: 100%; min-width: 0; }
.shell-theme-select-field {
  width: 100%; min-height: 39px; margin: 0; border: 1px solid var(--shell-border); border-radius: 13px;
  background: color-mix(in srgb, var(--shell-theme-bg) 82%, transparent); color: var(--shell-theme-text);
  padding: 10px 36px 10px 11px; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.2;
  text-align: left; cursor: pointer; display: block; position: relative; box-shadow: none;
}
.shell-theme-select-field::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--shell-theme-muted); border-bottom: 2px solid var(--shell-theme-muted);
  transform: translateY(-68%) rotate(45deg); pointer-events: none;
}
.shell-theme-select-field:hover, .shell-theme-select-field:focus-visible, .shell-theme-select.shell-is-open .shell-theme-select-field { border-color: var(--shell-border-active); outline: none; }
.shell-theme-select-menu {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 7px); z-index: 30000; max-height: 230px;
  overflow-y: auto; overflow-x: hidden; padding: 6px; border: 1px solid var(--shell-border); border-radius: 14px;
  background: var(--shell-surface-strong); box-shadow: 0 18px 34px var(--shell-shadow);
  scrollbar-width: thin; scrollbar-color: var(--shell-accent) color-mix(in srgb, var(--shell-accent) 12%, transparent);
}
.shell-theme-select.shell-is-open .shell-theme-select-menu { display: block; }
.shell-theme-select-menu::-webkit-scrollbar { width: 8px; }
.shell-theme-select-menu::-webkit-scrollbar-track { background: color-mix(in srgb, var(--shell-accent) 10%, transparent); border-radius: 999px; }
.shell-theme-select-menu::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--shell-accent), var(--shell-accent-strong)); border-radius: 999px; }
.shell-theme-option {
  width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--shell-theme-text);
  padding: 9px 11px; font: inherit; font-size: 13px; line-height: 1.15; text-align: left; cursor: pointer; margin: 0 0 4px;
}
.shell-theme-option:last-child { margin-bottom: 0; }
.shell-theme-option:hover, .shell-theme-option:focus-visible, .shell-theme-option.shell-is-active {
  background: color-mix(in srgb, var(--shell-accent) 7%, transparent); border-color: var(--shell-border-active); color: var(--shell-theme-text); outline: none;
}

/* The shell permanently owns three tracks. The right track is a transparent host; its mounted module owns the visible surface. */
.shell-right.shell-is-module-slot {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.shell-page-state { padding: 22px; color: var(--shell-theme-muted); text-align: center; }

/* Right-slot ownership is authoritative. Modules may use their own display
   model (including display:contents/flex), but an inactive owner must never
   remain rendered in the persistent shell slot. */
.shell-right [data-shell-right-module][hidden] {
  display: none !important;
}
