@import url('../assets/fonts/jke/typography.css?jke-css=2026.10.29.1&jke-font=3.300-clear2');
: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:
    var(--jke-font-ui),ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Arial Rounded MT Bold",
    system-ui, sans-serif;
  line-height: 1.3;
  margin-top: 28px;
}

/* App-specific compact landscape rules may hide their old top bar. The shared
   footer is a required escape route, so it always wins once the runtime has
   moved the bar to document flow. */
body.jke-platform-has-footer .jke-platform-footer { display: flex !important; }
body.jke-device-embed .jke-platform-footer { display: none !important; }
.jke-platform-footer .jke-platform-copy small { display: block !important; }

@media (max-height: 540px) and (orientation: landscape) {
  body.jke-platform-has-footer { overflow-y: auto !important; }
}

.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: var(--jke-font-ui),system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

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

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

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

.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: var(--jke-font-ui),system-ui, sans-serif;
  font-size: var(--jke-text-small);
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.jke-platform-parents { margin-left: auto; }

.jke-music {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font: 400 .875rem/1.4 var(--jke-font-ui),system-ui, sans-serif;
}

.jke-platform-with-music { flex-wrap: wrap; }

.jke-music-label {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jke-music button {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgb(49 38 78 / 20%);
  border-radius: 10px;
  color: var(--jke-platform-ink);
  background: white;
  font: inherit;
  cursor: pointer;
}

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

.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-footer .jke-music {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
  }

  .jke-platform-footer .jke-music-label { max-width: min(45vw, 15rem); }

  body.jke-platform-has-footer .jke-platform-bar {
    display: grid !important;
    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: .9375rem;
  }

  .jke-platform-current {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    text-align: center;
    font-size: var(--jke-text-small);
  }

  .jke-platform-privacy {
    font-size: var(--jke-text-small);
  }

  .jke-platform-parents { margin-left: 0; }
}

/* Tablet footers retain readable destination links instead of compressing four
   controls into one row. Phone rules above use the same structure with tighter
   safe-area insets. */
@media (min-width: 521px) and (max-width: 920px) {
  .jke-platform-footer .jke-music { grid-column: 1 / -1; grid-row: 3; justify-content: center; }
  .jke-platform-with-music .jke-platform-privacy { grid-row: 4; }
  .jke-platform-with-music .jke-platform-parents { grid-row: 4; }
  body.jke-platform-has-footer .jke-platform-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
  }

  .jke-platform-footer .jke-platform-home { grid-column: 1; }
  .jke-platform-footer .jke-platform-current { grid-column: 1 / -1; grid-row: 2; max-width: none; text-align: center; }
  .jke-platform-footer .jke-platform-privacy { grid-column: 1; grid-row: 3; }
  .jke-platform-footer .jke-platform-parents { grid-column: 2; grid-row: 3; margin-left: 0; }
}

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

@media print {
  .jke-platform-bar {
    display: none !important;
  }
}
/* Keep the additional legal link in its own row in compact footer grids. */
.jke-platform-footer .jke-platform-legal { grid-column: 1 / -1; grid-row: 4; justify-self: center; }
.jke-platform-with-music .jke-platform-legal { grid-row: 5; }
