/* Published-page shell: one app, full pane. The desktop chrome (Window, rail,
   Home) never ships; these are the only boxes a published app renders in.
   Theme values come from the shared theme.css; the icon font from icons.css. */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;            /* the pane scrolls internally; the document never does */
  background: var(--ground, var(--surface, #101014));
  color: var(--fg, #e8e8ee);
  font-family: var(--font-ui, system-ui, sans-serif);
}

#public-root {
  position: fixed;
  inset: 0;                    /* viewport box: no document scroll, mobile-keyboard-resized like the shell */
  height: 100%;
  /* `viewport-fit=cover` lays the page under the notch and the iOS tab bar;
     the insets push content back into the safe area. Paint (ground color)
     stays full-bleed — only the layout box moves. */
  box-sizing: border-box;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

.public-app-pane {
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
}

.public-app-pane > * {
  max-width: 100%;
}

.public-child-loading,
.public-child-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted, #888);
}

/* A widget exported alone still wants to fill the pane its window used to
   size; percentage heights resolve against the pane because every box in the
   chain has a used height. */
.public-app-pane .widget-content,
.public-app-pane .window-content {
  height: 100%;
}

.public-banner {
  position: fixed;
  top: env(safe-area-inset-top, 0px);   /* below the notch/tab-bar, not under it */
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--error, #c33) 88%, black);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.public-toasts {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.public-toast {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface-raised, #1e1e26);
  border: 1px solid var(--border, #333);
  color: var(--fg, #eee);
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.public-toast.error {
  border-color: var(--error, #c33);
}
