/* KD native shell (2026-12-03), see kd-native.js. Phone widths only; nothing inside the app (html.kd-app). */
  /* ---- bottom tabs: 4 + More, icon pill like a phone app ---- */
  nav.kd-nt {
    overflow: visible !important; white-space: normal !important; padding: 0 6px env(safe-area-inset-bottom) !important;
    height: calc(66px + env(safe-area-inset-bottom)) !important;
    background: color-mix(in oklch, var(--kd-panel, #fff) 90%, transparent) !important;
    backdrop-filter: blur(18px) saturate(1.5) !important; -webkit-backdrop-filter: blur(18px) saturate(1.5) !important;
  }
  .kd-nt-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; height: 66px; width: 100%; }
  .kd-nt-row .bottom-nav-item {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0 !important; width: auto !important; height: 100% !important; padding: 0 !important; margin: 0 !important;
    border: 0 !important; background: transparent !important; text-decoration: none; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent;
  }
  .kd-nt .bottom-nav-item.active::before { display: none !important; }
  .kd-nt-row .bottom-nav-item > :first-child {
    display: flex !important; align-items: center; justify-content: center; width: 58px; height: 32px; margin: 0 !important;
    border-radius: 16px; font-size: 1.2rem !important; transition: background .25s, transform .15s;
  }
  .kd-nt-row .bottom-nav-item.active > :first-child { background: color-mix(in oklch, var(--hub-accent, #2f5bff) 14%, transparent); }
  .kd-nt-row .bottom-nav-item:active > :first-child { transform: scale(.9); }
  .kd-nt .bottom-nav-item > span:not([id]):not(:first-child), .kd-nt-sheet .bottom-nav-item > span:not([id]):not(:first-child) {
    font-family: inherit !important; text-transform: none !important; letter-spacing: 0 !important;
    font-size: 11.5px !important; font-weight: 600 !important; line-height: 1.1 !important;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .kd-nt-row .bottom-nav-item.active > span:not([id]) { font-weight: 750 !important; }
  .kd-nt-more { color: var(--kd-muted, #67718a) !important; position: relative; }
  .kd-nt-more.kd-nt-dot > i::after { content: ""; position: absolute; top: 9px; left: calc(50% + 12px); width: 9px; height: 9px; border-radius: 50%; background: var(--kd-warn, #e5484d); box-shadow: 0 0 0 2px var(--kd-panel, #fff); }

  .kd-nt .bottom-nav-item > :first-child i, .kd-nt-sheet .bottom-nav-item > :first-child i { margin: 0 !important; font-size: inherit !important; }
  .kd-nt .bottom-nav-item > span:not([id]):not(:first-child), .kd-nt-sheet .bottom-nav-item > span:not([id]):not(:first-child) { margin-top: 0 !important; }
  .kd-nt-row .bottom-nav-item, .kd-nt-grid .bottom-nav-item { box-shadow: none !important; }
  .kd-nt-row .bottom-nav-item:not(.active) { color: var(--kd-muted, #67718a) !important; }
  .kd-nt-row .bottom-nav-item.active { color: var(--hub-accent, #2f5bff) !important; }
  .kd-nt-grid .bottom-nav-item { color: var(--kd-ink, #141a2e) !important; }
  nav.kd-nt > :not(.kd-nt-row) { display: none !important; }
  /* ---- the "More" sheet ---- */
  .kd-nt-sheet { position: fixed; inset: 0; z-index: 2147481000; visibility: hidden; transition: visibility 0s .32s; }
  .kd-nt-sheet.open { visibility: visible; transition: none; }
  .kd-nt-scrim { position: absolute; inset: 0; background: rgba(8, 12, 26, .42); opacity: 0; transition: opacity .28s; }
  .kd-nt-sheet.open .kd-nt-scrim { opacity: 1; }
  .kd-nt-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--kd-panel, #fff); color: var(--kd-ink, #141a2e); border-radius: 26px 26px 0 0;
    padding: 6px 14px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(8, 12, 26, .18);
    transform: translateY(105%); transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  }
  .kd-nt-sheet.open .kd-nt-panel { transform: none; }
  .kd-nt-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--kd-line, #dde2ec); margin: 6px auto 14px; }
  .kd-nt-title { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0 6px 14px; }
  .kd-nt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 2px; }
  .kd-nt-grid .bottom-nav-item {
    display: flex !important; flex-direction: column; align-items: center; gap: 7px; min-width: 0 !important; width: auto !important; height: auto !important;
    padding: 10px 2px 12px !important; margin: 0 !important; border-radius: 16px !important; background: transparent !important;
    color: var(--kd-ink, #141a2e) !important; text-decoration: none; text-align: center; white-space: normal !important; position: relative;
  }
  .kd-nt-grid .bottom-nav-item > :first-child {
    display: flex !important; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 !important; border-radius: 17px;
    background: var(--kd-bg, #f4f6fb); color: var(--hub-accent, #2f5bff) !important; font-size: 1.35rem !important; transition: transform .15s;
  }
  .kd-nt-grid .bottom-nav-item:active > :first-child { transform: scale(.9); }
  .kd-nt-grid .bottom-nav-item > span:not([id]):not(:first-child) { font-size: 12px !important; white-space: normal; line-height: 1.25 !important; overflow: visible; }
  .kd-nt-grid .bottom-nav-item.active > :first-child { background: var(--hub-accent, #2f5bff); color: #fff !important; }
  html.kd-nt-locked, html.kd-nt-locked body { overflow: hidden !important; }


@media (max-width: 768px) {
  /* ---- "Get the app" lives in More; the push box becomes one slim line ---- */
  html.kd-nt-on #pwa-wrap { display: none !important; }
  #push-prompt-banner {
    margin: .6rem .85rem .2rem !important; padding: .45rem .45rem .45rem .9rem !important; gap: .6rem !important;
    border-radius: 999px !important; background: var(--kd-panel, #fff) !important; border: 1px solid var(--kd-line, #dde2ec) !important; box-shadow: none !important;
  }
  #push-prompt-banner > span { font-size: 1.05rem !important; color: var(--hub-accent, #2f5bff); }
  #push-prompt-banner > div > div:first-child { color: var(--kd-ink, #141a2e) !important; font-size: .92rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #push-prompt-banner > div > div + div { display: none !important; }
  #push-prompt-enable-btn { border-radius: 999px !important; padding: .5rem .95rem !important; font-size: .85rem !important; }
  #push-prompt-banner > button:last-child { color: var(--kd-muted, #67718a) !important; }
  .kd-nt-getapp {
    display: flex; align-items: center; gap: .85rem; margin: 1.4rem .2rem .6rem; padding: .85rem 1rem; border-radius: 18px;
    background: var(--kd-panel, #fff); border: 1px solid var(--kd-line, #dde2ec); color: var(--kd-ink, #141a2e) !important; text-decoration: none !important;
  }
  .kd-nt-getapp > i { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in oklch, var(--hub-accent, #2f5bff) 12%, transparent); color: var(--hub-accent, #2f5bff); font-size: 1.15rem; flex-shrink: 0; }
  .kd-nt-getapp > span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
  .kd-nt-getapp b { font-size: .98rem; } .kd-nt-getapp small { font-size: .82rem; color: var(--kd-muted, #67718a); }
  .kd-nt-getapp > em { font-style: normal; font-size: 1.5rem; color: var(--kd-muted, #67718a); }
}
/* Admin & staff pages on phones: big plain titles, compact pill actions, round Back, calmer table labels */
@media (max-width: 768px) {
  html body .page-header.page-header, html body.ep-skin .page-header.page-header { background: none !important; background-image: none !important; border: 0 !important; box-shadow: none !important; padding: .35rem .2rem .85rem !important; margin-bottom: .35rem !important; }
  .page-header > div[style*="display:flex"], .page-header > div[style*="display: flex"] { flex-wrap: nowrap !important; align-items: flex-start !important; gap: .75rem !important; flex-direction: row !important; }
  html body .page-header.page-header .page-title { font-size: 1.8rem !important; line-height: 1.12 !important; letter-spacing: -.028em; margin: 0 !important; }
  .page-header .page-title > i:first-child, .page-header .page-title > .kd-ei:first-child { display: none !important; }
  html body .page-header.page-header .page-subtitle { font-size: .95rem !important; margin-top: .35rem !important; color: var(--kd-muted, #4b5568) !important; }
  .page-header a.btn-primary, .page-header a.btn, .page-header button.btn, .page-header a[style*="hub-accent"], .page-header .btn-primary {
    flex-shrink: 0; width: auto !important; min-height: 40px !important; padding: .5rem 1rem !important; border-radius: 999px !important;
    font-size: .9rem !important; line-height: 1.2 !important; white-space: nowrap !important; box-shadow: none !important; margin-top: .2rem;
    display: inline-flex !important; align-items: center; gap: .35rem;
  }
  .page-header a.kd-nt-back {
    display: inline-flex !important; align-items: center; justify-content: center; width: 40px !important; height: 40px !important; min-height: 0 !important;
    padding: 0 !important; margin: 0 0 .6rem -.2rem !important; border-radius: 50% !important; background: var(--kd-panel, #fff) !important;
    border: 1px solid var(--kd-line, #e5e8ef) !important; color: var(--kd-ink, #0f1729) !important; box-shadow: none !important;
  }
  .mobile-table tbody td::before { font-family: inherit !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; font-size: .86rem !important; color: var(--kd-muted, #64748b) !important; }
}
/* Dashboard stat cards (teacher / admin): two per row on phones, no double padding, phone-sized numbers */
@media (max-width: 768px) {
  div[style*="grid-template-columns"]:has(> .premium-card) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .75rem !important; margin-bottom: 1.25rem !important; }
  div[style*="grid-template-columns"] > .premium-card { padding: 0 !important; min-height: 0 !important; border-radius: 18px !important; }
  div[style*="grid-template-columns"] > .premium-card > div { padding: .95rem 1rem !important; }
  div[style*="grid-template-columns"] > .premium-card div[style*="font-size: 2.5rem"],
  div[style*="grid-template-columns"] > .premium-card div[style*="font-size:2.5rem"] { font-size: 1.85rem !important; line-height: 1.1; }
  div[style*="grid-template-columns"] > .premium-card div[style*="font-size: 0.875rem"] { font-size: .85rem !important; margin-bottom: .3rem !important; }
}
@media (min-width: 769px) { .kd-nt-getapp { display: none; } }
@media (prefers-reduced-motion: reduce) { .kd-nt-panel, .kd-nt-scrim { transition: none !important; } }
