/* KINO//DOSSIER v0.4.25 — canonical application shell. */

html {
  --kd-shell-bg: #101113;
  --kd-shell-surface: #18191c;
  --kd-shell-surface-strong: #222329;
  --kd-shell-ink: #f2f2f0;
  --kd-shell-muted: #a7a5a0;
  --kd-shell-line: #3a3b40;
  --kd-shell-accent: #8b80ff;
  --kd-shell-accent-soft: #2b284a;
  --kd-shell-success: #65c59f;
  --kd-shell-nav-height: 78px;
  background: var(--kd-shell-bg);
}

html body {
  background: var(--kd-shell-bg);
  color: var(--kd-shell-ink);
  font-family: var(--kd-font-ui);
}

html #view {
  min-height: 100dvh;
  padding-bottom: calc(var(--kd-shell-nav-height) + env(safe-area-inset-bottom, 0px));
  background: var(--kd-shell-bg);
}

html .kd-screen,
html .native-screen {
  min-height: calc(100dvh - var(--kd-shell-nav-height));
}

html .kd-shell-topbar {
  position: sticky;
  top: 0;
  z-index: 55;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid var(--kd-shell-line);
  background: color-mix(in srgb, var(--kd-shell-surface) 94%, transparent);
  color: var(--kd-shell-ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html .kd-shell-topbar-copy {
  min-width: 0;
  flex: 1;
}

html .kd-shell-topbar .kd-context {
  margin: 0 0 3px;
  color: var(--kd-shell-muted);
  font-family: var(--kd-font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html .kd-shell-topbar h1 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--kd-shell-ink);
  font-family: var(--kd-font-ui);
  font-size: 22px;
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -.018em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

html .kd-shell-icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--kd-shell-line);
  border-radius: 6px;
  background: var(--kd-shell-surface);
  color: var(--kd-shell-ink);
}

html .kd-shell-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html .kd-shell-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  min-height: calc(var(--kd-shell-nav-height) + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1fr 1fr 1.16fr 1fr 1fr;
  align-items: end;
  padding: 7px 5px max(8px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--kd-shell-line);
  background: color-mix(in srgb, var(--kd-shell-surface) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html .kd-shell-nav-item {
  min-width: 0;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--kd-shell-muted);
  font-family: var(--kd-font-ui);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

html .kd-shell-nav-item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html .kd-shell-nav-item.is-active {
  background: var(--kd-shell-accent-soft);
  color: var(--kd-shell-accent);
}

html .kd-shell-nav-item--register {
  transform: translateY(-12px);
  color: var(--kd-shell-ink);
}

html .kd-shell-register-disc {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--kd-shell-accent);
  color: #fff;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--kd-shell-accent) 32%, transparent);
}

html .kd-shell-nav-item--register:active .kd-shell-register-disc {
  transform: translateY(1px);
}

html .kd-global-log-dock,
html .kd-bottom-nav,
html .kd-system-status,
html .kd-page-status,
html .kd-home-system-status,
html .kd-scan-page-status {
  display: none !important;
}

html .kd-shell-library {
  padding-bottom: 24px;
  background: var(--kd-shell-bg);
}

html .kd-shell-library-intro {
  padding: 22px 16px 18px;
  border-bottom: 1px solid var(--kd-shell-line);
}

html .kd-shell-library-intro h2 {
  margin: 0 0 7px;
  color: var(--kd-shell-ink);
  font-size: 25px;
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -.022em;
  text-transform: none;
}

html .kd-shell-library-intro p {
  margin: 0;
  color: var(--kd-shell-muted);
  font-size: 13px;
  line-height: 1.55;
}

html .kd-shell-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}

html .kd-shell-library-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--kd-shell-line);
  border-radius: 6px;
  background: var(--kd-shell-surface);
  color: var(--kd-shell-ink);
  text-align: left;
}

html .kd-shell-library-card strong {
  color: var(--kd-shell-accent);
  font-size: 27px;
  font-weight: 750;
  line-height: 1;
}

html .kd-shell-library-card span {
  font-size: 14px;
  font-weight: 650;
}

html .kd-shell-library-card small {
  color: var(--kd-shell-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
}

html .kd-shell-library-list {
  margin: 0 16px;
  border-top: 1px solid var(--kd-shell-line);
}

html .kd-shell-library-row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--kd-shell-line);
  background: transparent;
  color: var(--kd-shell-ink);
  text-align: left;
}

html .kd-shell-library-row span {
  display: grid;
  gap: 3px;
}

html .kd-shell-library-row strong {
  font-size: 14px;
  font-weight: 650;
}

html .kd-shell-library-row small {
  color: var(--kd-shell-muted);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

html .kd-shell-library-row b {
  color: var(--kd-shell-accent);
  font-size: 20px;
  font-weight: 400;
}

@media (min-width: 700px) {
  html #view,
  html .kd-shell-bottom-nav {
    width: min(100%, 460px);
  }

  html .kd-shell-bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html .kd-shell-nav-item--register,
  html .kd-shell-register-disc {
    transition: none;
  }
}
