.position-shift-toolbar,.position-shift-month { display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px; }
.position-shift-month h2 { margin:0;font-size:18px; }
#positionShiftPage button { cursor:pointer; }
.position-shift-toolbar button { padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:white;color:#243b53; }
.position-shift-toolbar [aria-pressed="true"] { background:#243b53;color:white; }
.position-shift-scroll { overflow:auto;max-width:100%;margin:0; }
.position-shift-table { border-collapse:collapse;min-width:100%;font-size:12px;white-space:nowrap; }
.position-shift-table th,.position-shift-table td { border:1px solid #d8e0e8;padding:2px 3px;text-align:center;min-width:30px; }
.position-shift-table th { background:#f2f5f8;color:#243b53; }
.position-shift-table th:first-child { position:sticky;left:0;z-index:1;min-width:48px;width:52px;text-align:left; }
.position-shift-table td button { border:0;background:transparent;color:#243b53;padding:1px;width:100%;min-height:20px;font:inherit;line-height:1.3; }
.position-shift-table .changed { background:#e3f3eb; }
.position-shift-table .past { background:#f0f1f3; }
.position-shift-table .today { background:#fff0df; }
.position-shift-table .outside-month { background:#e9edf1;color:#98a2ad; }
.position-shift-table .limit { background:#fde8e8;color:#a32929; }
.position-shift-chip { display:inline-block;padding:1px 3px;margin:1px;border-radius:3px;background:#e2e8f0;color:#42536a;white-space:nowrap;font-weight:800;font-size:10px;line-height:1.4; }
.position-shift-chip[data-tone="0"] { background:#cde6ff;color:#095fb7; }
.position-shift-chip[data-tone="1"] { background:#ffd0df;color:#a51b50; }
.position-shift-chip[data-tone="2"] { background:#c5f0d3;color:#12633a; }
.position-shift-chip[data-tone="3"] { background:#ffe7ab;color:#8b5100; }
.position-shift-chip[data-tone="4"] { background:#e8d4ff;color:#65249b; }
.position-shift-chip[data-tone="5"] { background:#e4c8ff;color:#70219c; }
.position-shift-table .past .position-shift-chip { background:#e2e8f0;color:#42536a; }
.position-shift-chip.periodic { background:white;color:#222;border:1px solid #333; }
.position-shift-legend { display:flex;flex-wrap:wrap;gap:8px;font-size:12px; }
#positionSaving::backdrop { background:#172b4d66; }
#positionRoles { margin:14px 0; }
#positionSaving { border:0;border-radius:12px;text-align:center;padding:24px; }
.position-shift-spinner { display:inline-block;width:28px;height:28px;border:3px solid #dbe3eb;border-top-color:#243b53;border-radius:50%;animation:position-spin 1s linear infinite; }
.position-shift-table th button { border:0;background:transparent;color:inherit;font:inherit;padding:2px;cursor:pointer; }
@keyframes position-spin { to { transform:rotate(360deg); } }
.position-compact-page { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
.position-compact-page header .inner { padding-top:4px;padding-bottom:4px; }
.position-header-home { color:inherit;text-decoration:none; }
.position-header-home:focus-visible { outline:2px solid currentColor;outline-offset:3px; }
.position-compact-page #positionShiftPage { padding:0;max-width:100%; }
.position-compact-page #positionShiftPage>.card { padding:0;border:0;border-radius:0;box-shadow:none; }
.position-compact-page .position-shift-toolbar { margin-bottom:6px; }
.position-compact-page .card>.position-shift-toolbar { padding:0 12px; }
.position-compact-page .card>.position-shift-toolbar:first-child { border-bottom:1px solid #dce3eb;padding:10px 12px;margin-bottom:8px; }
.position-compact-page .position-visible-range,.position-compact-page #positionStatus { margin-left:12px;margin-right:12px; }
.position-compact-page .position-shift-table tbody th,.position-compact-page .position-shift-table tbody td { height:36px;box-sizing:border-box; }
.position-compact-page .position-shift-legend { display:none; }
.position-visible-range { margin:6px 0;font-size:11px;color:#5c7085; }
.position-bottom-nav { position:fixed;bottom:0;left:0;right:0;z-index:30;background:#fff;border-top:1px solid #d5dfeb;padding:10px 14px calc(10px + env(safe-area-inset-bottom)); }
.position-bottom-nav>div { display:flex;gap:8px;max-width:640px;margin:auto; }
.position-bottom-nav button { flex:1;padding:11px;border:1px solid #bdcbdc;border-radius:9px;color:#243b53;background:#fff;font:inherit;cursor:pointer; }
.position-bottom-nav [aria-pressed="true"] { background:#203e5a;color:#fff;border-color:#203e5a; }
.position-compact-page #positionHalfControls { margin-left:auto; }
.position-compact-page #positionSave:not([hidden]) { position:sticky;bottom:calc(76px + env(safe-area-inset-bottom));z-index:3;width:100%; }
#positionShiftPage,#positionShiftPage>.card { min-width:0;box-sizing:border-box;max-width:100%; }
@media(max-width:600px) {
  #positionShiftPage { padding:8px; }
  #positionShiftPage>.card { padding:10px; }
  .position-shift-table { font-size:10px;line-height:1.25; }
  .position-shift-table th,.position-shift-table td { padding:1px 2px;min-width:27px; }
  .position-shift-table th:first-child { min-width:46px;width:48px;padding-left:5px;padding-right:3px; }
  .position-shift-table td button { min-height:18px;padding:0; }
  .position-shift-table .position-shift-chip { font-size:9px;padding:0 2px;margin:0 1px; }
  .position-shift-toolbar { gap:6px;margin-bottom:8px; }
  .position-shift-toolbar button { padding:6px 9px;font-size:12px; }
  .position-shift-month h2 { font-size:16px; }
  .position-shift-legend { gap:4px; }
  .position-shift-scroll { overscroll-behavior-x:contain; }
}
.position-compact-page .position-shift-scroll { container-type:inline-size; }
.position-compact-page .position-shift-table { --position-cell:max(32px,calc(100cqw / var(--position-columns)));table-layout:fixed;width:100%;min-width:calc(var(--position-columns) * 32px); }
.position-compact-page .position-shift-table th,
.position-compact-page .position-shift-table td,
.position-compact-page .position-shift-table th:first-child { width:calc(100% / var(--position-columns));min-width:0;padding:0;text-align:center;box-sizing:border-box; }
.position-compact-page .position-shift-table thead tr:not(:first-child) th,
.position-compact-page .position-shift-table thead tr:not(:first-child) td,
.position-compact-page .position-shift-table tbody th,
.position-compact-page .position-shift-table tbody td { height:var(--position-cell); }
.position-compact-page .position-shift-table tbody th { white-space:normal;overflow-wrap:anywhere;font-size:10px;line-height:1.15; }
.position-compact-page .position-shift-table td button { display:flex;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:0;height:calc(var(--position-cell) - 1px);padding:0; }
.position-compact-page .position-shift-table .position-shift-chip { flex:0 1 auto;min-width:0;margin:0;padding:1px 2px;font-size:12px;line-height:1.2;overflow:hidden;text-overflow:clip; }
.position-compact-page .position-shift-table td button:has(.position-shift-chip ~ .position-shift-chip) .position-shift-chip { flex:1 1 0;padding:1px 0;font-size:10px;letter-spacing:-.5px; }
.position-compact-page .position-shift-table th:first-child { width:72px;min-width:72px;white-space:nowrap;overflow-wrap:normal;padding:0 4px;text-align:left; }
.position-compact-page .position-shift-table { --position-cell:max(32px,calc((100cqw - 72px) / (var(--position-columns) - 1)));min-width:calc(72px + (var(--position-columns) - 1) * 32px); }
.position-compact-page .position-shift-table td,
.position-compact-page .position-shift-table th:not(:first-child) { width:auto; }
.position-compact-page .position-shift-table { --position-cell:32px;width:calc(72px + (var(--position-columns) - 1) * 32px);min-width:calc(72px + (var(--position-columns) - 1) * 32px); }
.position-compact-page .position-shift-table td,
.position-compact-page .position-shift-table th:not(:first-child) { width:32px; }
.position-compact-page .position-shift-month { width:100%;margin:0;flex-wrap:nowrap; }
.position-compact-page .position-shift-month h2 { flex:1;text-align:center; }
.position-compact-page .position-shift-month button { border:0;background:transparent;min-width:34px;padding:6px;font-size:22px; }
.position-period-navigation { max-width:360px;margin:8px auto 12px;padding:0 12px;box-sizing:border-box;text-align:center; }
.position-period-navigation p { font-size:14px;margin:0 0 8px;color:#203e5a; }
.position-period-navigation>div { display:flex;border:1px solid #bdcbdc;border-radius:10px;overflow:hidden; }
.position-period-navigation button { flex:1;min-height:42px;margin:0;padding:7px;border:0;border-radius:0;background:#fff;color:#203e5a;font:inherit;font-size:13px;cursor:pointer; }
.position-period-navigation #positionPeriodToday { background:#203e5a;color:#fff; }
.position-period-navigation button:disabled { opacity:.35;cursor:default; }
.position-compact-page #positionVisibleRange { display:none; }
.position-compact-page .position-shift-table.is-week { width:100%;min-width:296px; }
.position-compact-page .position-shift-table.is-week th:not(:first-child),
.position-compact-page .position-shift-table.is-week td { width:calc((100% - 72px) / 7); }
.position-shift-table thead tr:first-child th span { display:block;line-height:1.4; }
.position-shift-table thead tr:first-child th button { display:block;width:100%;padding:3px 0; }
.position-period-navigation:not([hidden]) { display:flex;align-items:center;gap:8px;max-width:none;margin:8px 12px;padding:3px;background:#edf2f7;border-radius:28px; }
.position-period-navigation #positionRange { flex:1;min-width:0;text-align:center;font-size:12px;font-weight:700;color:#203e5a; }
.position-period-navigation button { flex:0 0 42px;width:42px;height:42px;min-height:42px;border:1px solid #d4dfea;border-radius:50%;font-size:22px;background:#fff; }
.position-compact-page .position-shift-legend:not([hidden]) { display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 12px;border-top:1px solid #e0e6ed;border-bottom:1px solid #e0e6ed; }
.position-legend-entry { display:inline-flex;align-items:center;gap:3px;color:#526980;font-size:9px;white-space:nowrap; }
.position-legend-entry .position-shift-chip { padding:2px 5px;margin:0;font-size:10px;font-weight:500; }
.position-compact-page .position-shift-table { width:100%;min-width:0; }
.position-compact-page .position-shift-table td,
.position-compact-page .position-shift-table th:not(:first-child) { width:calc((100% - 72px) / (var(--position-columns) - 1)); }
.position-compact-page .position-shift-table.is-week { min-width:0; }
.position-bottom-nav #positionToday { flex:0 0 72px;background:#fff;color:#203e5a; }
.position-view-segments { display:flex;flex:1;min-width:0;padding:3px;border-radius:14px;background:#edf2f7; }
.position-view-segments button { border:0;background:transparent;padding:9px 4px;border-radius:10px; }
.position-view-segments button[aria-pressed="true"] { background:#203e5a;color:#fff; }
.position-bottom-nav #positionGrouping { flex:0 0 60px;padding:9px 4px;font-size:12px; }
.position-bottom-nav #positionToday { flex-basis:60px;padding:9px 4px;font-size:13px; }
.position-compact-page .position-shift-table.is-grouped td .position-group-members { height:auto;min-height:31px;flex-direction:column;flex-wrap:nowrap;align-items:center;gap:2px;padding:2px 0; }
.position-group-name { display:block;max-width:100%;padding:0;border-radius:0;background:transparent;color:#243b53;font-size:inherit;font-weight:700;line-height:1.4;overflow-wrap:anywhere;white-space:normal; }
.position-compact-page .position-shift-table.is-grouped tbody th { font-size:inherit; }
.position-compact-page .position-shift-table.is-grouped th:first-child { white-space:normal;overflow-wrap:anywhere; }
.position-bottom-nav #positionGrouping { order:-1; }
.position-bottom-nav #positionGrouping[hidden] { display:none; }
