/* Apple home-screen shell only. No worksheet renderer or ordinary browser skin changes. */
.apple-only { display: none; }
html[data-apple-app] {
  --apple-bg: #f3f7f8;
  --apple-surface: #fff;
  --apple-text: #17313c;
  --apple-muted: #526b75;
  --apple-blue: #006991;
  --apple-green: #1d624c;
  --apple-line: #d5e4e9;
  --apple-tint: #e5f3f8;
  --apple-glass: #ffffffad;
  --apple-nav-glass: #ffffff94;
  --apple-menu: #fffffff0;
  --apple-glass-edge: #ffffffd9;
  --apple-shadow: 0 8px 26px #00384a1a;
  --apple-header: calc(88px + env(safe-area-inset-top, 0px));
  --apple-toolbar: 0px;
  --apple-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  --apple-side: max(18px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  background: var(--apple-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[data-apple-app][data-apple-theme="dark"] {
  --apple-bg: #102027;
  --apple-surface: #1a303a;
  --apple-text: #e6f1f5;
  --apple-muted: #adc5cf;
  --apple-blue: #78cfee;
  --apple-green: #8bd1b9;
  --apple-line: #34505b;
  --apple-tint: #234452;
  --apple-glass: #1a303ab8;
  --apple-nav-glass: #1a303a9e;
  --apple-menu: #1a303af5;
  --apple-glass-edge: #afdbed45;
  --apple-shadow: 0 8px 26px #00000036;
}
html[data-apple-app] body {
  --shell-surface: var(--apple-surface);
  --shell-surface-muted: var(--apple-bg);
  --shell-text: var(--apple-text);
  --shell-blue-pale: var(--apple-tint);
  --shell-blue-dark: var(--apple-blue);
  --shell-line: var(--apple-line);
  margin: 0;
  color: var(--apple-text);
  background: var(--apple-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
html[data-apple-app] .apple-only { display: flex; }
html[data-apple-app] .shell-page { height: 100vh; height: 100dvh; overflow: hidden; }
html[data-apple-app] .shell-page .rail { display: none; }
html[data-apple-app] .shell-page .shell-content {
  position: relative;
  height: var(--apple-height, 100dvh);
  min-height: 0;
  margin-left: 0;
  padding: 0;
  display: block;
  transition: none;
}
html[data-apple-app] .shell-page .shell-footer { display: none; }
html[data-apple-app] .shell-page .shell-main {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--apple-header) + var(--apple-toolbar) + 8px) var(--apple-side) var(--apple-bottom);
  color: var(--apple-text);
  background: var(--apple-bg);
  scrollbar-width: thin;
}
html[data-apple-app] .shell-page .topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--apple-header);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 12px;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--apple-side) 10px;
  border: 0;
  background: var(--apple-bg);
  color: var(--apple-text);
  transition: background-color 220ms ease;
  pointer-events: none;
}
html[data-apple-app] .topbar > * { pointer-events: auto; }
html[data-apple-app] .topbar .brand { grid-column: 1; grid-row: 1; }
html[data-apple-app] .topbar .brand-path { gap: 0; width: 100%; }
html[data-apple-app] .topbar .brand-divider { display: none; }
html[data-apple-app] .topbar .heading-path,
html[data-apple-app] .topbar .heading-editable { display: none; }
html[data-apple-app] .topbar .product { display: flex; gap: 7px; height: 48px; color: var(--apple-blue); }
html[data-apple-app] .topbar .product-logo { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; }
html[data-apple-app] .topbar .product-wordmark { transition: opacity 200ms ease; }
html[data-apple-app] .topbar .product-name { color: var(--apple-blue); font-size: .78rem; }
html[data-apple-app] .topbar .product-subtitle { color: var(--apple-green); }
html[data-apple-app] .topbar .topbar-end { display: contents; }
html[data-apple-app] .topbar .topbar-end > .menu,
html[data-apple-app] .topbar .topbar-end > .status { display: none; }
html[data-apple-app] .topbar .notification-menu { display:block;grid-column:2;grid-row:1; }
html[data-apple-app] .topbar .user-menu { grid-column: 3; grid-row: 1; }
html[data-apple-app] .topbar .user-name { display: none; }
html[data-apple-app] .topbar .user-menu > summary,
html[data-apple-app] .topbar .notification-menu > summary,
html[data-apple-app] .apple-compact .product {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--apple-glass-edge);
  color: var(--apple-blue);
  background: var(--apple-glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 0 var(--apple-glass-edge), var(--apple-shadow);
}
html[data-apple-app] .topbar .notification-menu > summary svg { width:22px;height:22px; }
html[data-apple-app] .topbar .notification-menu[open] > summary { background:var(--apple-tint); }
html[data-apple-app] .topbar .notification-popover { max-height:calc(var(--apple-height,100dvh) - env(safe-area-inset-top,0px) - 110px);overflow-y:auto;overscroll-behavior:contain; }
html[data-apple-app] .topbar .avatar { width: 34px; height: 34px; background: var(--apple-tint); color: var(--apple-blue); }
html[data-apple-app] .apple-compact .topbar { background: transparent; }
html[data-apple-app] .apple-compact .product { position: relative; }
html[data-apple-app] .apple-compact .product-logo { width: 38px; height: 38px; }
html[data-apple-app] .apple-compact .product-wordmark { position: absolute; left: 51px; opacity: 0; pointer-events: none; }
html[data-apple-app] .apple-nav {
  position: absolute;
  z-index: 35;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  width: min(calc(100% - 2 * var(--apple-side)), 540px);
  height: 72px;
  padding: 6px;
  gap: 0;
  border: 1px solid var(--apple-glass-edge);
  border-radius: 27px;
  background: var(--apple-nav-glass);
  -webkit-backdrop-filter: blur(34px) saturate(1.7);
  backdrop-filter: blur(34px) saturate(1.7);
  box-shadow: inset 0 1px 0 var(--apple-glass-edge), var(--apple-shadow);
}
html[data-apple-app] .apple-nav a {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding-inline: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: 20px;
  color: var(--apple-muted);
  font-size: .72rem;
  text-decoration: none;
}
html[data-apple-app] .apple-nav a[aria-current="page"] { color: var(--apple-blue); font-weight: 650; }
html[data-apple-app] .apple-nav svg { width: 22px; height: 22px; flex-shrink: 0; }
html[data-apple-app] .apple-nav-selection { position: absolute; border-radius: 21px; background: var(--apple-tint); transition: left 280ms ease, width 280ms ease, background-color 280ms ease; pointer-events: none; }
html[data-apple-app] .apple-nav-selection[data-section="agile"] { background: #e4f0df; }
html[data-apple-app][data-apple-theme="dark"] .apple-nav-selection[data-section="agile"] { background: #203a2c; }
html[data-apple-app] .apple-keyboard .apple-nav { display: none; }
html[data-apple-app] .user-popover,
html[data-apple-app] .tile-menu-list {
  color: var(--apple-text);
  border: 1px solid var(--apple-glass-edge);
  border-radius: 20px;
  background: var(--apple-menu);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: var(--apple-shadow);
}
html[data-apple-app] .topbar .user-popover {
  position: fixed;
  right: var(--apple-side);
  top: calc(env(safe-area-inset-top, 0px) + 78px);
  width: min(200px, calc(100% - 2 * var(--apple-side)));
  max-height: calc(var(--apple-height, 100dvh) - env(safe-area-inset-top, 0px) - 110px);
  overflow: auto;
}
html[data-apple-app] .user-menu-nav a,
html[data-apple-app] .user-menu-nav button { min-height:44px;display:flex;align-items:center;justify-content:flex-start;line-height:1.4;color:var(--apple-text);transform:none;box-shadow:none; }
html[data-apple-app] .user-account strong,
html[data-apple-app] .user-account span { color: var(--apple-muted); }
html[data-apple-app] .user-menu-nav a:hover,
html[data-apple-app] .user-menu-nav button:hover { background:var(--apple-tint);transform:none;box-shadow:none; }
html[data-apple-app] .apple-title { margin: 0 0 20px; }
html[data-apple-app] .apple-title h1 { margin: 0 0 6px; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.15; color: var(--apple-text); }
html[data-apple-app] .apple-title .heading-path { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
html[data-apple-app] .apple-title .heading-path-link { max-width: 100%; color: var(--apple-blue); font-size: .9rem; }
html[data-apple-app] .apple-title .heading-editable { display: flex; align-items: center; min-width: 0; gap: 6px; }
html[data-apple-app] .apple-title .heading-edit-button { flex-shrink: 0; }
html[data-apple-app] .apple-title .heading-edit-input { max-width: 100%; min-width: 0; font-size: 16px; }
html[data-apple-app] .apple-page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
html[data-apple-app] .shell-page .page-actionbar {
  position: absolute;
  top: var(--apple-header);
  left: var(--apple-side);
  right: var(--apple-side);
  z-index: 30;
  padding: 8px;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid var(--apple-glass-edge);
  border-radius: 18px;
  background: var(--apple-menu);
  color: var(--apple-text);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
}
html[data-apple-app] .shell-page .page-actionbar .menu { flex-wrap: wrap; overflow: visible; gap: 4px; flex: 1 1 100%; }
html[data-apple-app] .page-actionbar .status { color: var(--apple-muted); font-size: .76rem; }
html[data-apple-app] .btn,
html[data-apple-app] button.secondary { min-height: 44px; border-radius: 13px; color: var(--apple-blue); border-color: var(--apple-line); background: var(--apple-surface); }
html[data-apple-app] .shell-page .page-actionbar .action-icon { width: 44px; height: 44px; padding: 0; }
html[data-apple-app] button svg { flex-shrink: 0; }
html[data-apple-app] input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(.theme-switch input):not(.profile-upload input),
html[data-apple-app] textarea,
html[data-apple-app] select { min-height: 44px; max-width: 100%; font-size: 16px; color: var(--apple-text); background-color: var(--apple-surface); border-color: var(--apple-line); border-radius: 13px; }
html[data-apple-app] input[type="search"] { -webkit-appearance: none; appearance: none; border-radius: 15px; }
html[data-apple-app] :focus-visible { outline: 3px solid #ffcd1c; outline-offset: 3px; }
/* Reuse the real project lists, titles, permissions and preview loading. */
html[data-apple-app] .projects-page .projects-shell { display: block; min-height: 0; background: transparent; }
html[data-apple-app] .projects-page .main { padding: 0; min-width: 0; }
html[data-apple-app] .projects-page #dashboard > .head { margin: 0 0 24px; padding: 0; background: transparent; flex-wrap: wrap; }
html[data-apple-app] .projects-page #dashboard .head h1 { font-size: 2rem; color: var(--apple-text); }
html[data-apple-app] .projects-page #dashboard .head p { color: var(--apple-muted); font-size: .95rem; }
html[data-apple-app] .projects-page #dashboard .head > div:first-child { min-width: 0; }
html[data-apple-app] .projects-page #dashboard .head > button { min-height: 44px; border-radius: 13px; font-size: .85rem; }
html[data-apple-app] .projects-page .side { padding: 0; margin: 0 0 26px; border: 0; background: transparent; overflow: visible; }
html[data-apple-app] .projects-page .side-head { margin: 22px 0 12px; color: var(--apple-muted); font-size: .8rem; letter-spacing: .07em; }
html[data-apple-app] .projects-page .side-head button { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; background: var(--apple-glass); border: 1px solid var(--apple-glass-edge); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
html[data-apple-app] .projects-page .side-head + .project-list { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-auto-columns: auto; gap: 10px; overflow: visible; padding: 0; }
html[data-apple-app] .projects-page .project-entry { border: 1px solid var(--apple-line); border-radius: 18px; background: var(--apple-surface); box-shadow: 0 3px 12px #00384a06; }
html[data-apple-app] .projects-page .project-entry .project { min-height: 86px; padding: 15px; border: 0; border-radius: 18px; background: transparent; color: var(--apple-text); gap: 12px; }
html[data-apple-app] .projects-page .project-entry .project[aria-current="true"] { background: var(--apple-tint); }
html[data-apple-app] .projects-page .project-entry.has-one-action .project { padding-right: 60px; }
html[data-apple-app] .projects-page .project-entry.has-two-actions .project { padding-right: 102px; }
html[data-apple-app] .projects-page .project-entry .mark { width: 44px; height: 44px; min-width: 44px; border-radius: 13px; background: var(--apple-tint); color: var(--apple-blue); }
html[data-apple-app] .projects-page .project-entry > .icon-button { width: 44px; height: 44px; }
html[data-apple-app] .projects-page .project-entry.has-two-actions > .archive-icon { right: 49px; }
html[data-apple-app] .projects-page .project-entry strong { font-size: .95rem; color: var(--apple-text); overflow-wrap: anywhere; }
html[data-apple-app] .projects-page .project-entry small { font-size: .77rem; color: var(--apple-muted); }
html[data-apple-app] .project-filter-disclosure { background: transparent; border-radius: 15px; }
html[data-apple-app] .project-filter-disclosure summary { min-height: 44px; padding: 12px; color: var(--apple-blue); }
html[data-apple-app] .project-list-filters { padding: 12px; background: var(--apple-surface); border-radius: 15px; }
html[data-apple-app] .projects-page .worksheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html[data-apple-app] .worksheet-tile { min-height: 0; border-radius: 18px; color: var(--apple-text); background: var(--apple-surface); border-color: var(--apple-line); box-shadow: none; }
html[data-apple-app] .worksheet-tile-open { border-radius: 18px; color: var(--apple-text); }
html[data-apple-app] .worksheet-copy { padding: 12px; }
html[data-apple-app] .worksheet-copy strong { font-size: .9rem; }
html[data-apple-app] .worksheet-copy small { color: var(--apple-muted); opacity: 1; }
html[data-apple-app] .worksheet-project { color: var(--apple-green); }
html[data-apple-app] .tile-menu summary { width: 44px; height: 44px; color: var(--apple-blue); border-color: var(--apple-glass-edge); background: var(--apple-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
html[data-apple-app] .tile-menu-list button { min-height: 44px; color: var(--apple-text); font-size: .86rem; }
html[data-apple-app] .projects-page #detail::before,
html[data-apple-app] .projects-page #detail > .head::before,
html[data-apple-app] .projects-page #detail > .tabs::before,
html[data-apple-app] .projects-page #detail > .tabs button.active::after { display: none; }
html[data-apple-app] .projects-page #detail > .head { padding: 0; background: transparent; }
html[data-apple-app] .projects-page #detail > .tabs { margin: 16px 0; gap: 7px; }
html[data-apple-app] .projects-page #detail > .tabs button { min-height: 44px; padding: 10px 12px; border-radius: 13px; border: 0; background: var(--apple-surface); color: var(--apple-blue); }
html[data-apple-app] .projects-page #detail > .tabs button.active { border: 0; border-radius: 13px; color: var(--apple-blue); background: var(--apple-tint); margin: 0; }
html[data-apple-app] .apple-back { min-height: 44px; align-items: center; gap: 8px; color: var(--apple-blue); text-decoration: none; margin-bottom: 12px; }
/* The embedded worksheet remains intact; its actions and viewport stay reachable. */
html[data-apple-app] .worksheet-page .worksheet-main {
  inset: calc(var(--apple-header) + var(--apple-toolbar) + 8px) 0 var(--apple-bottom);
  padding: 0;
  overflow: hidden;
}
html[data-apple-app] .worksheet-page .apple-title { display: none; }
html[data-apple-app] .worksheet-page .worksheet-workspace { height: 100%; }
html[data-apple-app] .worksheet-page .comment-sidebar { color: var(--apple-text); background: var(--apple-surface); }
html[data-apple-app] .worksheet-page .comments-open { grid-template-columns: minmax(0, 1fr); }
html[data-apple-app] .worksheet-page .comments-open .comment-sidebar { position: absolute; z-index: 20; inset: 0; border: 0; }
/* Native modal semantics remain responsible for focus, Escape and the inert backdrop. */
html[data-apple-app] dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  max-height: calc(var(--apple-height, 100dvh) - env(safe-area-inset-top, 0px) - 16px);
  padding: 22px var(--apple-side) max(22px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--apple-glass-edge);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: var(--apple-text);
  background: var(--apple-menu);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 -12px 40px #00384a24;
}
html[data-apple-app] dialog[open] { animation: apple-sheet-in 240ms ease; }
html[data-apple-app] dialog::backdrop { background: #031c365c; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
html[data-apple-app] dialog > .apple-sheet-handle { display: grid; place-items: center; width: 100%; height: 32px; margin: -14px auto 6px; touch-action: none; }
html[data-apple-app] dialog > .apple-sheet-handle::after { content: ''; width: 40px; height: 4px; border-radius: 10px; background: var(--apple-line); }
html[data-apple-app] dialog:has(> .apple-sheet-handle) .apple-sheet-heading { touch-action: none; }
html[data-apple-app] dialog.apple-sheet-interacted { animation: none; }
html[data-apple-app] dialog:has(> .apple-sheet-close) :is(.dialog-close,.icon-close) { display: none; }
html[data-apple-app] dialog > .apple-sheet-close { position: sticky; z-index: 10; top: 0; right: auto; float: right; margin: 0 0 6px 10px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--apple-glass-edge); border-radius: 50%; color: var(--apple-blue); background: var(--apple-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
html[data-apple-app] dialog .apple-sheet-heading { padding-right: 55px; }
html[data-apple-app] dialog .dialog-close,
html[data-apple-app] dialog .icon-close { min-width: 44px; min-height: 44px; }
html[data-apple-app] .feedback-tab { display: none; }
html[data-apple-app] .feedback-dialog:has(> .apple-sheet-close) .feedback-close { display: none; }
html[data-apple-app] .feedback-dialog form,
html[data-apple-app] dialog form { min-width: 0; }
html[data-apple-app] .login-page { min-height: 100vh; min-height: 100dvh; padding: max(22px, env(safe-area-inset-top, 0px)) var(--apple-side) max(22px, env(safe-area-inset-bottom, 0px)); }
html[data-apple-app] .login-card { color: var(--apple-text); background: var(--apple-surface); border-color: var(--apple-line); border-radius: 25px; }
html[data-apple-app] .standalone-footer { position: static; background: transparent; color: var(--apple-muted); }
@media (min-width: 600px) {
  html[data-apple-wide-app] { --apple-header: calc(92px + env(safe-area-inset-top, 0px)); --apple-bottom: 30px; --apple-tabs: 76px; }
  html[data-apple-wide-app] .apple-nav { top: var(--apple-header); bottom: auto; height: 60px; left: var(--apple-side); transform: none; width: max-content; min-width: 400px; border-radius: 23px; }
  html[data-apple-wide-app] .apple-nav a { flex: 1 1 auto; flex-direction: row; gap: 7px; font-size: .85rem; }
  html[data-apple-wide-app] .shell-page .shell-main { padding-top: calc(var(--apple-header) + var(--apple-tabs) + 8px); }
  html[data-apple-wide-app] .shell-page .page-actionbar { top: calc(var(--apple-header) + var(--apple-tabs)); }
  /* De inset reserveert de bovenbalken al; voeg die ruimte niet ook binnen het werkvel toe. */
  html[data-apple-wide-app] .worksheet-page .worksheet-main { inset: calc(var(--apple-header) + var(--apple-tabs) + var(--apple-toolbar) + 8px) 0 var(--apple-bottom); padding: 0; }
  html[data-apple-wide-app] .projects-page .side-head + .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-apple-wide-app] .projects-page .worksheet-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  html[data-apple-wide-app] dialog { inset: 0; margin: auto; width: min(680px, calc(100% - 48px)); max-width: 680px; max-height: calc(var(--apple-height, 100dvh) - 48px); border-radius: 25px; border-bottom: 1px solid var(--apple-glass-edge); }
  html[data-apple-wide-app] .worksheet-page .comments-open { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  html[data-apple-wide-app] .worksheet-page .comments-open .comment-sidebar { position: static; }
}
/* Broad Apple windows show project navigation beside recent worksheets. */
@media (min-width: 1024px) {
  html[data-apple-wide-app] .projects-page #dashboard {
    display: grid;
    grid-template-columns: clamp(300px, 30%, 420px) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 28px;
    align-items: start;
  }
  html[data-apple-wide-app] .projects-page #dashboard > .head { grid-column: 1 / -1; }
  html[data-apple-wide-app] .projects-page #dashboard > .side { grid-column: 1; grid-row: 2 / span 2; min-width: 0; }
  html[data-apple-wide-app] .projects-page #dashboard > .section-head { grid-column: 2; grid-row: 2; margin-top: 0; }
  html[data-apple-wide-app] .projects-page #dashboard > #recentAll { grid-column: 2; grid-row: 3; min-width: 0; }
  html[data-apple-wide-app] .projects-page #dashboard .side-head + .project-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 359px) {
  html[data-apple-app] .product-wordmark { display: none; }
  html[data-apple-app] .projects-page .worksheet-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-apple-app] *, html[data-apple-app] *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-apple-app] { --apple-glass: var(--apple-surface); --apple-menu: var(--apple-surface); }
  html[data-apple-app] .apple-nav { --apple-nav-glass: var(--apple-surface); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-apple-app] { --apple-glass: var(--apple-surface); --apple-menu: var(--apple-surface); --apple-glass-edge: var(--apple-line); }
  html[data-apple-app] .apple-nav { --apple-nav-glass: var(--apple-surface); }
  html[data-apple-app] dialog::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@keyframes apple-sheet-in { from { opacity: 0; transform: translateY(24px); } }
html[data-apple-app] .apple-title { flex-direction: column; align-items: flex-start; }
html[data-apple-app] .apple-title .heading-editable { width: 100%; }
html[data-apple-app] .apple-worksheet-heading { width: 100%; min-width: 0; flex: 1 1 100%; }
html[data-apple-app] .apple-worksheet-heading .heading-path { display: flex; gap: 5px; flex-wrap: wrap; }
html[data-apple-app] .apple-worksheet-heading .heading-path-link { font-size: .78rem; color: var(--apple-muted); max-width: 100%; }
html[data-apple-app] .apple-worksheet-heading .heading-editable { display: flex; gap: 5px; min-width: 0; }
html[data-apple-app] .apple-worksheet-heading h1 { margin: 6px 0 0; font-size: 1rem; overflow-wrap: anywhere; color: var(--apple-text); }
/* Geef in de werkvelweergave meer ruimte aan de template zelf. */
html[data-apple-app] .worksheet-page:not(.worksheet-fullscreen) { --apple-header: calc(64px + env(safe-area-inset-top, 0px)); }
@media (min-width: 600px) {
  html[data-apple-wide-app] .worksheet-page:not(.worksheet-fullscreen) { --apple-tabs: 56px; }
  html[data-apple-wide-app] .worksheet-page .apple-nav { height: 48px; padding: 1px; border-radius: 16px; }
}
@media (min-width: 900px) {
  html[data-apple-wide-app] .worksheet-page:not(.worksheet-fullscreen) { --apple-tabs: 0px; }
  html[data-apple-wide-app] .worksheet-page .apple-nav { top: calc(8px + env(safe-area-inset-top, 0px)); left: calc(var(--apple-side) + 172px); width: max-content; gap: 4px; z-index: 41; }
  html[data-apple-wide-app] .worksheet-page .apple-worksheet-heading { display: flex; align-items: center; gap: 8px; }
  html[data-apple-wide-app] .worksheet-page .apple-worksheet-heading .heading-path { max-width: 40%; }
  html[data-apple-wide-app] .worksheet-page .apple-worksheet-heading .heading-editable { flex: 1; }
  html[data-apple-wide-app] .worksheet-page .apple-worksheet-heading h1 { margin: 0; }
}
html[data-apple-app] .apple-refresh-status { position: absolute; z-index: 25; top: var(--apple-header); left: 0; right: 0; margin: 0; padding: 15px; color: var(--apple-blue); text-align: center; font-size: .85rem; }
html[data-apple-app] .projects-page:not(.apple-roadmaps) #roadmapList,
html[data-apple-app] .projects-page:not(.apple-roadmaps) .side-head:has(+ #roadmapList),
html[data-apple-app] .projects-page.apple-roadmaps #projectList,
html[data-apple-app] .projects-page.apple-roadmaps .side-head:has(+ #projectList) { display: none; }
html[data-apple-app] .project-list-filters label:has(#projectKindFilter) { display: none; }
html[data-apple-app] dialog:is(#worksheetShare, #templatePicker, #create, #feedbackDialog) { width: 100%; max-width: 100%; max-height: calc(var(--apple-height, 100dvh) - env(safe-area-inset-top, 0px) - 16px); }
@media (min-width: 600px) {
  html[data-apple-wide-app] dialog:is(#worksheetShare, #templatePicker, #create, #feedbackDialog) { width: min(680px, calc(100% - 48px)); max-width: 680px; max-height: calc(var(--apple-height, 100dvh) - 48px); }
}
html[data-apple-app] .apple-page-actions .menu { flex-wrap: wrap; }
html[data-apple-app] .apple-arriving .shell-main { animation: apple-arrive 220ms ease-out; }
@keyframes apple-arrive { from { opacity: .75; transform: translateX(var(--apple-arrival-x, 0px)); } }
@media (prefers-reduced-motion: reduce) { html[data-apple-app] .apple-arriving .shell-main { animation: none; } }
html[data-apple-app] .worksheet-page.worksheet-fullscreen { --apple-header: env(safe-area-inset-top, 0px); --apple-bottom: env(safe-area-inset-bottom, 0px); --apple-tabs: 0px; }
html[data-apple-app] .worksheet-page.worksheet-fullscreen .apple-nav { display: none; }
html[data-apple-app] .shell-page .shell-content { height: 100vh; height: var(--apple-height, 100dvh); }

/* Keep destinations available when the installed Apple shell hides the footer and rail. */
html[data-apple-app] .shell-page .user-menu-nav .user-menu-mobile-link,
html[data-apple-app] .shell-page .user-menu-nav .user-menu-apple-link:not([hidden]) { display:flex; }

/* Behoud verborgen velden en paginakeuzes in de geïnstalleerde app. */
html[data-apple-app] input[type="hidden"] { display: none; }
html[data-apple-app] .feedback-dialog { color: var(--apple-text); background: var(--apple-menu); }
html[data-apple-app] .feedback-dialog textarea { color: var(--apple-text); background: var(--apple-surface); border-color: var(--apple-line); }
html[data-apple-app] .feedback-dialog .feedback-actions .secondary { color: var(--apple-blue); background: var(--apple-surface); border-color: var(--apple-line); }
html[data-apple-app] .feedback-dialog :is(.feedback-rating-help, .feedback-comment-label span, .feedback-help-choice small) { color: var(--apple-muted); }
html[data-apple-app] .feedback-dialog .feedback-help-choice { background: var(--apple-tint); border-color: var(--apple-line); }
html[data-apple-app] .feedback-dialog .feedback-help-choice strong { color: var(--apple-blue); }
html[data-apple-app] .admin-page :is(.primary, .secondary, .danger, .icon-button, .admin-tabs button) { min-height: 44px; }
/* The installed app's scroll surface fills the window, including on wide displays. */
html[data-apple-app] .admin-page .shell-main { --radius: 13px; width: auto; max-width: none; margin-inline: 0; }
html[data-apple-app] .admin-page .rail + .shell-content { margin-left: 0; }
html[data-apple-app] .worksheet-page :is(.comment-sidebar, .version-dialog) { --white: var(--apple-surface); --light-blue-2: var(--apple-tint); --grey-3: var(--apple-line); --dark-blue: var(--apple-blue); }
html[data-apple-app][data-apple-theme="dark"] .worksheet-page .comment-thread-number,
html[data-apple-app][data-apple-theme="dark"] .worksheet-page .comment-filters button[aria-pressed="true"] { color: #102027; }

/* Worksheets keep the same two action groups in the installed app. */
html[data-apple-app] .worksheet-page .page-actionbar{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:8px 10px;border:0;background:var(--apple-surface)}
html[data-apple-app] .worksheet-page .apple-worksheet-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px;flex:initial}
html[data-apple-app] .worksheet-page .apple-worksheet-heading .heading-editable{width:max-content;max-width:100%;flex:0 0 auto}
html[data-apple-app] .worksheet-page .apple-worksheet-heading h1{width:max-content;flex:0 1 auto;margin:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
html[data-apple-app] .worksheet-page .apple-worksheet-heading .heading-edit-button{flex:0 0 26px}
html[data-apple-app] .worksheet-page .page-actionbar > .menu{display:flex;max-width:none;width:100%;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:6px;border:1px solid var(--apple-line);border-radius:12px;background:var(--apple-glass);overflow:visible}
html[data-apple-app] .worksheet-page .worksheet-meta{display:inline-flex;align-items:center;gap:6px}
html[data-apple-app] .worksheet-page .worksheet-meta .status{min-width:20px;width:20px;flex:0 0 20px;font-size:0}
html[data-apple-app] .worksheet-page.worksheet-fullscreen .apple-worksheet-heading{display:none}
html[data-apple-app] .worksheet-page .page-actionbar{padding:8px 0 0;gap:6px;background:transparent;border-radius:0;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-apple-app] .worksheet-page .page-actionbar > .menu{background:var(--apple-surface)}
html[data-apple-app] .worksheet-page .worksheet-heading{color:var(--apple-muted)}
html[data-apple-app] .worksheet-page .worksheet-heading h1{font-size:.95rem;font-weight:500;color:inherit}
html[data-apple-app] .worksheet-page .worksheet-main{inset-block-start:calc(var(--apple-header) + var(--apple-tabs,0px) + var(--apple-toolbar))}

/* Match the search/filter disclosure to the adjacent add action. */
html[data-apple-app] .projects-page .side-head{align-items:center}
html[data-apple-app] .projects-page .project-filter-disclosure>summary{width:44px;height:44px;min-height:44px;border-radius:50%;background:var(--apple-glass);border:1px solid var(--apple-glass-edge);color:var(--apple-blue)}
html[data-apple-app] .projects-page .project-filter-disclosure .project-list-filters{color:var(--apple-text);background:var(--apple-surface);border-color:var(--apple-line)}
html[data-apple-app] .projects-page .project-filter-disclosure>summary.has-filters,html[data-apple-app] .projects-page .project-filter-disclosure[open]>summary{background:var(--apple-tint);border-color:var(--apple-blue)}

/* Equal icon and label rows also align Agile werken when four destinations are shown. */
html[data-apple-app] .apple-nav a{display:grid;grid-template-rows:22px minmax(0,1fr);justify-items:center;align-items:start;align-content:center;gap:3px;padding:3px 3px}
html[data-apple-app] .apple-nav a>span{display:block;min-height:2.3em;line-height:1.15;text-align:center;white-space:normal}
@media(min-width:600px){html[data-apple-wide-app] .apple-nav a{display:flex;align-items:center;padding-inline:12px}html[data-apple-wide-app] .apple-nav a>span{min-height:0;white-space:nowrap}}
