:root {
  --jke-platform-height: 52px;
  --jke-platform-ink: #31264e;
  --jke-platform-muted: #6d627d;
  --jke-platform-focus: #7b4ed8;
}

.jke-platform-bar {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: calc(var(--jke-platform-height) + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding:
    12px
    max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  border-top: 1px solid rgb(49 38 78 / 14%);
  color: var(--jke-platform-ink);
  background: rgb(255 252 244 / 98%);
  box-shadow: 0 -4px 18px rgb(49 38 78 / 8%);
  font-family:
    ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Arial Rounded MT Bold",
    system-ui, sans-serif;
  line-height: 1;
  margin-top: 28px;
}

.jke-platform-home {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.jke-platform-home:hover {
  color: #8f3158;
}

.jke-platform-home:focus-visible,
.jke-platform-clear:focus-visible {
  outline: 3px solid var(--jke-platform-focus);
  outline-offset: 3px;
}

.jke-platform-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgb(49 38 78 / 10%);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #e84473, #8056c7);
  box-shadow: 0 4px 10px rgb(93 55 133 / 20%);
  font-family: system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
}

.jke-platform-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.jke-platform-copy strong {
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jke-platform-copy small {
  color: var(--jke-platform-muted);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.jke-platform-current {
  overflow: hidden;
  padding: 7px 11px;
  border: 1px solid rgb(49 38 78 / 10%);
  border-radius: 999px;
  color: var(--jke-platform-muted);
  background: rgb(255 255 255 / 65%);
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jke-platform-privacy {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jke-platform-privacy:focus-visible {
  outline: 3px solid var(--jke-platform-focus);
  outline-offset: 3px;
}

.jke-platform-page > .topbar,
.jke-platform-page > .world-bar,
.jke-platform-page .sidebar {
  top: 0;
}

.jke-platform-page .sidebar {
  height: 100vh;
  height: 100dvh;
}

@media (max-width: 520px) {
  .jke-platform-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    margin-top: 18px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .jke-platform-copy strong {
    font-size: 0.82rem;
  }

  .jke-platform-current {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    text-align: center;
    font-size: 0.7rem;
  }

  .jke-platform-privacy {
    font-size: 0.7rem;
  }
}

@media (max-width: 920px) {
  .jke-platform-page .sidebar {
    height: auto;
  }
}

@media print {
  .jke-platform-bar {
    display: none !important;
  }
}
