/*
 * App-shell skeleton shown before the JavaScript arrives (index.html) and while the
 * first screen loads (router pending UI, app/shell/BootSkeleton.tsx). External file
 * because the production CSP forbids inline <style> and style="" (style-src 'self').
 * Neutral tokens only, copied from src/styles/tokens.css (that file ships inside the
 * bundle, which is what we are waiting for). Never the estate accent.
 */
:root {
  --boot-canvas: #f3f6f5; /* neutral-50 */
  --boot-surface: #ffffff;
  --boot-sunken: #e8eeec; /* neutral-100 */
  --boot-line: #d6e0dd; /* neutral-200 */
  --boot-ink: #0d2a2f; /* ink-900 */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --boot-canvas: #0a101c; /* night-950 */
    --boot-surface: #0f1626; /* night-900 */
    --boot-sunken: #121b2e; /* night-850 */
    --boot-line: #1f2b45; /* night-700 */
    --boot-ink: #d5e7e8; /* ink-100 */
  }
}
:root[data-theme='dark'] {
  --boot-canvas: #0a101c;
  --boot-surface: #0f1626;
  --boot-sunken: #121b2e;
  --boot-line: #1f2b45;
  --boot-ink: #d5e7e8;
}

html,
body {
  margin: 0;
  background: var(--boot-canvas);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--boot-canvas);
  overflow: hidden;
}
.boot-header {
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(60px + env(safe-area-inset-top, 0px));
  padding: calc(4px + env(safe-area-inset-top, 0px)) 16px 0;
  border-bottom: 1px solid var(--boot-line);
  background: var(--boot-surface);
}
.boot-pin {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--boot-ink);
}
.boot-pin svg {
  display: block;
  width: 100%;
  height: 100%;
}
.boot-pin .boot-face {
  fill: var(--boot-surface);
}
.boot-pin .boot-smile {
  fill: none;
  stroke: var(--boot-surface);
  stroke-width: 7;
  stroke-linecap: round;
}
.boot-bar {
  display: block;
  height: 16px;
  border-radius: 8px;
  background: var(--boot-sunken);
}
.boot-main {
  flex: 1;
  min-height: 0;
  padding: 24px 16px;
}
.boot-main > * + * {
  margin-top: 16px;
}
.boot-title {
  width: 45%;
  height: 32px;
}
.boot-card {
  height: 96px;
  border-radius: 16px;
  background: var(--boot-surface);
  border: 1px solid var(--boot-line);
}
.boot-card.boot-short {
  width: 75%;
  height: 64px;
}
.boot-sidebar {
  display: none;
}
.boot-tabbar {
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--boot-line);
  background: var(--boot-surface);
}
.boot-tab {
  width: 56px;
  height: 32px;
  border-radius: 16px;
  background: var(--boot-sunken);
}
.boot-w40 {
  width: 40%;
}

@media (min-width: 1024px) {
  .boot {
    flex-direction: row;
  }
  .boot-header,
  .boot-tabbar {
    display: none;
  }
  .boot-sidebar {
    box-sizing: border-box;
    display: block;
    width: 272px;
    flex-shrink: 0;
    padding: 20px 16px;
    border-right: 1px solid var(--boot-line);
    background: var(--boot-surface);
  }
  .boot-sidebar > * + * {
    margin-top: 16px;
  }
  .boot-sidebar .boot-pin {
    width: 32px;
    height: 32px;
  }
  .boot-main {
    padding: 32px;
    max-width: 960px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .boot-bar,
  .boot-tab {
    animation: boot-pulse 1.4s ease-in-out infinite;
  }
}
@keyframes boot-pulse {
  50% {
    opacity: 0.55;
  }
}
