.mobile-v2-setting-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.mobile-v2-setting-title { font-size: 13px; font-weight: 600; color: var(--text); }
.mobile-v2-setting-copy { max-width: 190px; margin-top: 2px; font-size: 11px; line-height: 1.35; color: var(--muted); }
#mobile-v2-root { display: none; }

@media (max-width: 768px) and (orientation: portrait), (hover: none) and (pointer: coarse) and (orientation: portrait) {
  html.mobile-v2-enabled,
  html.mobile-v2-enabled body { width: 100%; height: 100%; height: 100dvh; overflow: hidden; background: #fafbf7; margin: 0; padding: 0; }
  html.mobile-v2-enabled body > #sidebar,
  html.mobile-v2-enabled body > .sidebar-overlay,
  html.mobile-v2-enabled body > #main { display: none !important; }
  html.mobile-v2-enabled #mobile-v2-root {
    --m2-green: #165b35;
    --m2-deep: #203b32;
    --m2-muted: #738174;
    --m2-line: #dfe6d9;
    --m2-soft: #eef3e7;
    position: fixed;
    inset: 0;
    top: var(--m2-viewport-top, 0px);
    bottom: var(--m2-keyboard-inset, 0px);
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 900;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    color: var(--m2-deep);
    background: #fafbf7;
    font-family: 'Instrument Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  html.mobile-v2-enabled.dark-mode,
  html.mobile-v2-enabled.dark-mode body {
    background: var(--app-bg, #14100d);
  }
  html.mobile-v2-enabled.dark-mode #mobile-v2-root,
  #mobile-v2-root.dark-mode {
    --m2-green: var(--green-forest, #f59e0b);
    --m2-deep: var(--text, #f7eee5);
    --m2-muted: var(--muted, #9c8b7b);
    --m2-line: var(--border, #2b221a);
    --m2-soft: var(--green-bg-card, #201812);
    background: var(--app-bg, #14100d);
  }
  .m2-header {
    flex: 0 0 auto;
    min-height: calc(66px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid color-mix(in srgb, var(--m2-line) 75%, transparent);
  }
  .m2-settings-meta { margin: 22px 0 8px; display: grid; justify-items: center; gap: 6px; text-align: center; }
  #m2-sync-status, #m2-update-status { color: var(--m2-muted); font-size: 11px; line-height: 1.35; }
  #m2-sync-status[hidden], #m2-update-status[hidden], #m2-update-status button[hidden] { display: none; }
  #m2-update-status button {
    display: block; margin: 6px auto 0; padding: 7px 10px;
    border: 1px solid var(--m2-line); border-radius: 7px;
    background: var(--m2-soft); color: var(--m2-deep); font: inherit; cursor: pointer;
  }
  #m2-sync-status[data-state="offline"],
  #m2-sync-status[data-state="error"] { color: #a45b25; }
  #m2-sync-status[data-state="ok"] { color: var(--m2-green); }
  .m2-favorite[data-offline="false"] .m2-fav-sub { opacity: .72; }
  .m2-favorite [data-offline-status] {
    display: block;
    margin-top: 2px;
    color: var(--m2-muted);
    font-size: 11px;
  }
  .m2-brand { position: relative; min-height: 59px; padding-left: 59px; display: flex; align-items: center; color: var(--m2-green); font: 700 19px/1 Georgia, Cambria, serif; white-space: nowrap; }
  .m2-brand img { position: absolute; left: -4px; top: 50%; width: 67px; height: 59px; object-fit: contain; transform: translateY(-48%) rotate(-4deg); }
  .m2-brand .logo-branch--light { display: block; }
  .m2-brand .logo-branch--dark { display: none; }
  html.mobile-v2-enabled.dark-mode .m2-brand .logo-branch--light,
  #mobile-v2-root.dark-mode .m2-brand .logo-branch--light { display: none !important; }
  html.mobile-v2-enabled.dark-mode .m2-brand .logo-branch--dark,
  #mobile-v2-root.dark-mode .m2-brand .logo-branch--dark { display: block !important; opacity: 0.95; }
  .m2-screen { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 24px; scrollbar-width: none; }
  .m2-screen.m2-calendar-screen { display: flex !important; flex-direction: column !important; overflow: hidden !important; padding: 6px 0 0 0 !important; }
  .m2-screen.m2-calendar-screen.has-day-focus { padding-top: 0 !important; }
  .m2-calendar-host { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; position: relative; background: var(--app-bg); }
  .m2-calendar-host #calendar { display: flex !important; flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; overflow: hidden; background: var(--app-bg); }
  .m2-screen::-webkit-scrollbar { display: none; }
  .m2-nav {
    flex: 0 0 auto;
    position: relative;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    min-height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 3px 8px env(safe-area-inset-bottom, 0px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    border-top: 1px solid var(--m2-line);
    background: #fafbf7;
  }
  html.mobile-v2-enabled.dark-mode .m2-nav,
  #mobile-v2-root.dark-mode .m2-nav {
    background: var(--app-bg, #14100d);
  }
  .m2-nav button {
    position: relative;
    z-index: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    color: var(--m2-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m2-nav button[aria-current="page"] { color: var(--m2-green); }
  .m2-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .m2-nav-icon {
    position: relative;
    height: 100%;
    max-height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.78;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .m2-nav button[aria-current="page"] .m2-nav-icon {
    opacity: 1;
    transform: scale(1.06);
  }
  .m2-nav-indicator-box {
    position: absolute;
    top: 3px;
    height: calc(100% - 6px - env(safe-area-inset-bottom, 0px));
    max-height: 50px;
    width: calc((100% - 16px) / 3);
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    transform: translate3d(calc(var(--m2-nav-idx, 0) * 100%), 0, 0);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .m2-nav[data-active-idx="0"] .m2-nav-indicator-box { transform: translate3d(0%, 0, 0); }
  .m2-nav[data-active-idx="1"] .m2-nav-indicator-box { transform: translate3d(100%, 0, 0); }
  .m2-nav[data-active-idx="2"] .m2-nav-indicator-box { transform: translate3d(200%, 0, 0); }

  .m2-nav-indicator {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(17, 56, 28, 0.08);
    transition: background 0.25s ease;
  }
  html.mobile-v2-enabled.dark-mode .m2-nav-indicator,
  #mobile-v2-root.dark-mode .m2-nav-indicator {
    background: rgba(245, 158, 11, 0.16);
  }
  .m2-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
  }
  .m2-nav-icon .m2-icon--light { display: block; }
  .m2-nav-icon .m2-icon--dark { display: none; }
  html.mobile-v2-enabled.dark-mode .m2-nav-icon .m2-icon--light,
  #mobile-v2-root.dark-mode .m2-nav-icon .m2-icon--light { display: none !important; }
  html.mobile-v2-enabled.dark-mode .m2-nav-icon .m2-icon--dark,
  #mobile-v2-root.dark-mode .m2-nav-icon .m2-icon--dark { display: block !important; }
  .m2-date, .m2-kicker { margin-bottom: 9px; color: var(--m2-muted); font-size: 11px; }
  .m2-title { margin: 0 0 17px; color: var(--m2-deep); font: 400 27px/1.08 Georgia, Cambria, serif; letter-spacing: -.025em; }
  .m2-next { width: 100%; min-height: 64px; margin: 0 0 22px; padding: 12px 14px; border: 1px solid #d3dfc9; border-radius: 15px; background: #e4eddc; color: #203b32; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; }
  .m2-next-time { font: 400 20px/1 Georgia, serif; }
  .m2-next small { display: block; margin-bottom: 5px; color: #56704e; font-size: 10px; }
  .m2-next strong { display: block; font-size: 12px; }
  .m2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 7px; }
  .m2-section-head h2 { margin: 0; font-size: 14px; display: flex; align-items: baseline; gap: 6px; }
  .m2-section-hint { font-size: 11px; font-weight: 400; color: var(--m2-muted); }
  .m2-section-head span { color: var(--m2-muted); font-size: 10px; }
  .m2-lesson { width: 100%; display: grid; grid-template-columns: 45px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 16px 0; border: 0; border-bottom: 1px solid var(--m2-line); background: none; color: var(--m2-deep); text-align: left; }
  .m2-lesson time { font-size: 12px; font-weight: 650; }
  .m2-lesson time small { display: block; margin-top: 4px; color: var(--m2-muted); font-size: 10px; font-weight: 400; }
  .m2-lesson strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .m2-lesson p { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; color: var(--m2-muted); font-size: 10px; }
  .m2-room { padding: 7px 8px; border-radius: 7px; background: var(--m2-soft); font-size: 11px; white-space: nowrap; }
  .m2-pause { margin: 11px 0 0 55px; color: var(--m2-muted); font-size: 10px; }
  .m2-week-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    margin: 0 10px 8px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--m2-line);
    box-shadow: 0 1px 3px rgba(20, 60, 36, 0.04);
    flex-shrink: 0;
    max-height: 52px;
    opacity: 1;
    transform: translateY(0) scale(1);
    overflow: hidden;
    transition: max-height 280ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity 200ms ease,
                transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
                margin 280ms cubic-bezier(0.4, 0, 0.2, 1),
                padding 280ms cubic-bezier(0.4, 0, 0.2, 1),
                border-width 280ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  html.mobile-v2-enabled.dark-mode .m2-week-bar,
  #mobile-v2-root.dark-mode .m2-week-bar {
    background: var(--sidebar-bg, #1a1510);
    border-color: var(--border, #2b221a);
    box-shadow: none;
  }
  .m2-week-bar.is-hidden,
  .m2-screen.has-day-focus .m2-week-bar,
  .m2-screen:has(#days-header.has-focus) .m2-week-bar {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    transform: translateY(-8px) scale(0.98) !important;
    pointer-events: none !important;
  }
  .m2-nav-arrow {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--m2-soft);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--m2-green);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    user-select: none;
  }
  .m2-nav-arrow:hover,
  .m2-nav-arrow:active {
    background: var(--m2-line);
    transform: scale(0.96);
  }
  .m2-week-date {
    flex: 1;
    min-width: 0;
    padding: 2px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--m2-deep);
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .m2-week-date strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--m2-deep);
  }
  .m2-week-date span {
    display: block;
    margin-top: 1px;
    color: var(--m2-muted);
    font-size: 10px;
  }

  .m2-day-heads { display: grid; grid-template-columns: var(--time-col-w, 48px) repeat(5,minmax(0,1fr)); gap: 0; }
  .m2-day-heads button { border: 0; border-radius: 11px; padding: 7px 0; background: none; color: var(--m2-deep); font-size: 10px; }
  .m2-day-heads button strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 500; }
  .m2-day-heads button.active { background: #234d3b; color: #fff; }
  .m2-week-grid { flex: 1 1 auto; display: grid; grid-template-columns: var(--time-col-w, 48px) repeat(5,minmax(0,1fr)); gap: 0; width: 100%; height: auto; min-height: 0; touch-action: pan-y; }
  .m2-week-grid.focused { grid-template-columns: var(--time-col-w, 48px) minmax(0,1fr); }
  .m2-axis, .m2-day-track { position: relative; min-height: 0; }
  .m2-axis span { position: absolute; right: 0; width: 100%; height: auto; transform: none; }
  .m2-day-track { overflow: hidden; }
  .m2-event { right: auto; min-width: 0; text-align: left; }
  .m2-search { width: 100%; min-height: 45px; margin: 11px 0; padding: 11px 13px; border: 1px solid var(--m2-line); border-radius: 12px; background: transparent; color: var(--m2-deep); font-size: 16px; }
  .m2-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--m2-soft); }
  .m2-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: none; color: var(--m2-deep); font-size: 11px; }
  .m2-tabs button.active { background: #fff; color: #165b35; font-weight: 700; box-shadow: 0 1px 4px #203b3212; }
  html.mobile-v2-enabled.dark-mode .m2-tabs button.active,
  #mobile-v2-root.dark-mode .m2-tabs button.active {
    background: var(--brown-bg-selected, #342318);
    color: var(--green-forest, #f59e0b);
  }
  .m2-result { width: 100%; min-height: 56px; padding: 14px 3px; border: 0; border-bottom: 1px solid var(--m2-line); background: none; color: var(--m2-deep); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
  .m2-result strong { display: block; font-size: 13px; }
  .m2-result small { display: block; margin-top: 4px; color: var(--m2-muted); font-size: 10px; line-height: 1.4; }

  /* Favoris compacts sur 1 seule ligne avec drag & drop */
  .m2-favorites-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
  .m2-favorite-add { width: 100%; min-height: 44px; padding: 0 12px; border: 1px dashed var(--m2-line); border-radius: 12px; background: transparent; color: var(--m2-green); display: flex; align-items: center; gap: 9px; font: 600 13px/1 'Instrument Sans', 'Inter', sans-serif; text-align: left; cursor: pointer; }
  .m2-favorite-add span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--m2-soft); font-size: 18px; font-weight: 400; }
  .m2-favorite-add:focus-visible { outline: 2px solid var(--m2-green); outline-offset: 2px; }
  .m2-result:disabled { opacity: .55; cursor: default; }
  .m2-favorite {
    position: relative;
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin-bottom: 0;
    padding: 0;
    border: 1px solid #d8e2d0;
    border-radius: 12px;
    background: var(--m2-soft);
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }
  html.mobile-v2-enabled.dark-mode .m2-favorite,
  #mobile-v2-root.dark-mode .m2-favorite {
    border-color: var(--border, #2b221a);
    background: var(--m2-soft, #201812);
  }
  .m2-favorite.is-dragging {
    opacity: 0.96;
    border-color: var(--m2-green);
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(20, 60, 36, 0.22);
    cursor: grabbing;
  }
  html.mobile-v2-enabled.dark-mode .m2-favorite.is-dragging,
  #mobile-v2-root.dark-mode .m2-favorite.is-dragging {
    background: var(--brown-bg-selected, #342318) !important;
    border-color: var(--green-forest, #f59e0b);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  }
  .m2-favorite-placeholder {
    height: 44px;
    min-height: 44px;
    border: 1px dashed var(--m2-green);
    border-radius: 12px;
    background: rgba(17, 56, 28, 0.05);
    box-sizing: border-box;
  }
  html.mobile-v2-enabled.dark-mode .m2-favorite-placeholder,
  #mobile-v2-root.dark-mode .m2-favorite-placeholder {
    border-color: var(--green-forest, #f59e0b);
    background: rgba(245, 158, 11, 0.08);
  }
  .m2-fav-handle {
    flex: 0 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--m2-muted);
    opacity: 0.55;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }
  .m2-favorite-open {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0 8px 0 2px;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
  }
  .m2-fav-name {
    flex: 0 1 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--m2-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m2-fav-sub {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    color: var(--m2-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m2-favorite-delete {
    flex: 0 0 38px;
    height: 100%;
    border: 0;
    border-left: 1px solid var(--m2-line);
    background: none;
    color: var(--m2-muted);
    font-size: 19px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, background 0.15s;
  }
  .m2-favorite-delete:hover,
  .m2-favorite-delete:active {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.08);
  }
  .m2-fav-menu {
    position: relative;
    flex: 0 0 38px;
    height: 100%;
  }
  .m2-fav-menu-toggle {
    height: 100%;
    width: 100%;
    border: 0;
    border-left: 1px solid var(--m2-line);
    background: none;
    color: var(--m2-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, background 0.15s;
  }
  .m2-fav-menu-toggle::-webkit-details-marker {
    display: none;
  }
  .m2-fav-menu-toggle:hover,
  .m2-fav-menu-toggle:active {
    color: var(--m2-deep);
    background: rgba(0, 0, 0, 0.04);
  }
  .m2-fav-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 175px;
    background: var(--col-bg, #ffffff);
    border: 1px solid var(--m2-line);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 6px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  html.mobile-v2-enabled.dark-mode .m2-fav-menu-dropdown,
  #mobile-v2-root.dark-mode .m2-fav-menu-dropdown {
    background: var(--m2-card, #261e17);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  .m2-fav-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--m2-deep);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s;
  }
  .m2-fav-menu-item:hover,
  .m2-fav-menu-item:active {
    background: var(--hover, rgba(0, 0, 0, 0.05));
  }
  .m2-fav-menu-item.is-danger {
    color: #c0392b;
  }
  .m2-fav-menu-item.is-danger:hover,
  .m2-fav-menu-item.is-danger:active {
    background: rgba(192, 57, 43, 0.08);
  }
  .m2-favorite:has(.m2-fav-menu[open]),
  .m2-favorite.menu-open {
    overflow: visible;
    z-index: 60;
  }

  .m2-field-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--m2-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 12px 0 6px;
  }

  .m2-export-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 20px;
  }
  .m2-export-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--m2-line);
    border-radius: 14px;
    background: var(--m2-soft);
    color: var(--m2-deep);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    width: 100%;
    box-sizing: border-box;
  }
  .m2-export-card:hover,
  .m2-export-card:active {
    background: var(--m2-card);
    border-color: var(--m2-green);
    transform: translateY(-1px);
  }
  .m2-export-card-icon {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(17, 56, 28, 0.08);
    color: var(--m2-green);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  html.mobile-v2-enabled.dark-mode .m2-export-card-icon,
  #mobile-v2-root.dark-mode .m2-export-card-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--green-forest, #f59e0b);
  }
  .m2-export-card-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
  }
  .m2-export-card-content strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--m2-deep);
  }
  .m2-export-card-content span {
    font-size: 11px;
    color: var(--m2-muted);
    line-height: 1.3;
  }
  .m2-export-card-arrow {
    flex: 0 0 auto;
    font-size: 16px;
    color: var(--m2-muted);
  }

  .m2-filter-shortcuts {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px;
  }
  .m2-filter-shortcut-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--m2-line);
    border-radius: 10px;
    background: var(--m2-soft);
    color: var(--m2-deep);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s, border-color 0.12s;
  }
  .m2-filter-shortcut-btn:hover,
  .m2-filter-shortcut-btn:active {
    background: var(--m2-card);
    border-color: var(--m2-green);
  }
  .m2-filter-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--m2-line);
  }
  .m2-filter-section-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--m2-muted);
  }
  .m2-filter-section-head span {
    font-size: 11px;
    font-weight: 600;
    color: var(--m2-muted);
  }
  .m2-presets-history {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  .m2-filter-empty-history {
    font-size: 11.5px;
    color: var(--m2-muted);
    margin: 4px 0 8px;
    font-style: italic;
  }
  .m2-preset-pill {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--m2-line);
    border-radius: 20px;
    background: var(--m2-soft);
    font-size: 11.5px;
    overflow: hidden;
    transition: border-color 0.12s, background 0.12s;
  }
  .m2-preset-pill.is-active {
    border-color: var(--m2-green);
    background: rgba(17, 56, 28, 0.08);
  }
  html.mobile-v2-enabled.dark-mode .m2-preset-pill.is-active,
  #mobile-v2-root.dark-mode .m2-preset-pill.is-active {
    border-color: var(--green-forest, #f59e0b);
    background: rgba(245, 158, 11, 0.12);
  }
  .m2-preset-pill-main {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px 5px 10px;
    border: 0;
    background: transparent;
    color: var(--m2-deep);
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m2-preset-pill.is-active .m2-preset-pill-main {
    color: var(--m2-green);
    font-weight: 600;
  }
  html.mobile-v2-enabled.dark-mode .m2-preset-pill.is-active .m2-preset-pill-main,
  #mobile-v2-root.dark-mode .m2-preset-pill.is-active .m2-preset-pill-main {
    color: var(--green-forest, #f59e0b);
  }
  .m2-preset-pill-check {
    font-weight: 700;
  }
  .m2-preset-pill-score {
    font-size: 10px;
    opacity: 0.7;
  }
  .m2-preset-pill-remove {
    padding: 0 8px 0 2px;
    border: 0;
    background: transparent;
    color: var(--m2-muted);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
  }
  .m2-preset-pill-remove:hover {
    color: #c0392b;
  }
  .m2-filter-subjects-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 12px;
  }
  .m2-filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    font-size: 13px;
    color: var(--m2-deep);
    cursor: pointer;
    user-select: none;
  }
  .m2-filter-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--m2-green);
  }
  html.mobile-v2-enabled.dark-mode .m2-filter-label input[type="checkbox"],
  #mobile-v2-root.dark-mode .m2-filter-label input[type="checkbox"] {
    accent-color: var(--green-forest, #f59e0b);
  }

  .m2-sheet-header-back {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .m2-sheet-header-back h2 {
    margin: 0;
  }
  .m2-back-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--m2-line);
    border-radius: 8px;
    background: var(--m2-soft);
    color: var(--m2-deep);
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m2-pub-preset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    max-height: 340px;
    overflow-y: auto;
  }
  .m2-pub-preset-card {
    padding: 12px;
    border: 1px solid var(--m2-line);
    border-radius: 12px;
    background: var(--m2-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .m2-pub-preset-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .m2-pub-preset-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--m2-deep);
  }
  .m2-pub-preset-score {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
  }
  .m2-pub-preset-score.pos {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
  }
  .m2-pub-preset-score.neg {
    background: rgba(192, 57, 43, 0.12);
    color: #c0392b;
  }
  .m2-pub-preset-score.zero {
    background: rgba(127, 140, 141, 0.12);
    color: var(--m2-muted);
  }
  .m2-pub-preset-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--m2-muted);
  }
  .m2-btn-sm {
    padding: 7px 12px;
    font-size: 12.5px;
    align-self: flex-start;
    margin-top: 2px;
  }
  .m2-preset-vote-row {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .m2-vote-btn {
    border: 0;
    background: none;
    color: var(--m2-muted);
    font-size: 10px;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: all .15s ease;
  }
  .m2-vote-btn:hover {
    color: var(--m2-deep);
    background: var(--m2-line);
  }
  .m2-vote-btn.active {
    color: var(--m2-green);
    font-weight: 700;
  }
  html.mobile-v2-enabled.dark-mode .m2-vote-btn.active,
  #mobile-v2-root.dark-mode .m2-vote-btn.active {
    color: var(--green-forest, #f59e0b);
  }
  .m2-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }
  .m2-active-badge {
    color: var(--m2-green);
    font-weight: 600;
    font-size: 10.5px;
  }
  html.mobile-v2-enabled.dark-mode .m2-active-badge,
  #mobile-v2-root.dark-mode .m2-active-badge {
    color: var(--green-forest, #f59e0b);
  }
  .m2-filter-head-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--m2-muted);
  }
  .m2-link-btn {
    border: 0;
    background: none;
    color: var(--m2-green);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
  }
  html.mobile-v2-enabled.dark-mode .m2-link-btn,
  #mobile-v2-root.dark-mode .m2-link-btn {
    color: var(--green-forest, #f59e0b);
  }
  .m2-create-options {
    margin: 14px 0 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .m2-profile-filter-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--m2-line);
    border-radius: 14px;
    background: var(--m2-soft);
    margin-bottom: 14px;
  }
  .m2-profile-filter-status-card.is-active {
    border-color: var(--m2-green);
    background: rgba(22, 91, 53, 0.08);
  }
  html.mobile-v2-enabled.dark-mode .m2-profile-filter-status-card.is-active,
  #mobile-v2-root.dark-mode .m2-profile-filter-status-card.is-active {
    border-color: var(--green-forest, #f59e0b);
    background: rgba(245, 158, 11, 0.12);
  }
  .m2-profile-filter-status-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--m2-line);
    color: var(--m2-deep);
    font-weight: 700;
    font-size: 13px;
    flex: none;
  }
  .m2-profile-filter-status-card.is-active .m2-profile-filter-status-icon {
    background: var(--m2-green);
    color: #fff;
  }
  html.mobile-v2-enabled.dark-mode .m2-profile-filter-status-card.is-active .m2-profile-filter-status-icon,
  #mobile-v2-root.dark-mode .m2-profile-filter-status-card.is-active .m2-profile-filter-status-icon {
    background: var(--green-forest, #f59e0b);
    color: #14100d;
  }
  .m2-profile-filter-status-info {
    flex: 1;
    min-width: 0;
  }
  .m2-profile-filter-status-info strong {
    display: block;
    font-size: 13px;
    color: var(--m2-deep);
  }
  .m2-profile-filter-status-info small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--m2-muted);
  }
  .m2-advanced-details {
    width: 100%;
    border-bottom: 1px solid var(--m2-line);
  }
  .m2-advanced-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 4px;
    color: var(--m2-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: color .15s ease;
  }
  .m2-advanced-summary:hover {
    color: var(--m2-deep);
  }
  .m2-advanced-summary::-webkit-details-marker {
    display: none;
  }
  .m2-advanced-summary::after {
    content: '›';
    font-size: 16px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .18s ease;
  }
  .m2-advanced-details[open] .m2-advanced-summary::after {
    transform: rotate(90deg);
  }
  .m2-advanced-details .m2-menu-item {
    border-bottom: 0;
    padding-left: 8px;
  }
  .m2-wizard-progress { display: flex; gap: 5px; margin: 10px 0 24px; }
  .m2-wizard-progress i { flex: 1; height: 3px; border-radius: 3px; background: var(--m2-line); }
  .m2-wizard-progress i.done { background: var(--m2-green); }
  .m2-option { width: 100%; margin: 8px 0; padding: 15px; border: 1px solid var(--m2-line); border-radius: 12px; background: transparent; color: var(--m2-deep); text-align: left; font-size: 14px; }
  .m2-view-tools {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 46px;
    margin: 4px 10px 8px;
  }
  .m2-view-heading {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .m2-view-tools .m2-title {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 21px;
    text-align: center;
  }
  .m2-view-heading small {
    display: block;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--m2-muted);
    font-size: 10px;
    text-align: center;
  }
  .m2-options {
    position: absolute;
    right: 0;
    top: calc(50% - 18px);
    z-index: 20;
  }
  .m2-options summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--m2-line);
    border-radius: 10px;
    background: transparent;
    color: var(--m2-deep);
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .m2-options summary:active {
    background: var(--m2-soft);
  }
  .m2-options summary::-webkit-details-marker { display: none; }
  .m2-options[open] summary {
    background: var(--m2-soft);
    border-color: var(--m2-green);
  }
  .m2-options summary svg {
    display: block;
    width: 20px;
    height: 20px;
  }
  .m2-options-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--m2-green, #165b35);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
  }
  html.mobile-v2-enabled.dark-mode .m2-options-badge,
  #mobile-v2-root.dark-mode .m2-options-badge {
    background: var(--green-forest, #f59e0b);
    color: var(--app-bg, #14100d);
  }
  .m2-options-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 235px;
    padding: 6px;
    border: 1px solid var(--m2-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 30px #203b3225;
  }
  html.mobile-v2-enabled.dark-mode .m2-options-panel,
  #mobile-v2-root.dark-mode .m2-options-panel {
    background: var(--sidebar-bg, #1a1510);
    border-color: var(--border, #2b221a);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  }
  .m2-options-panel button {
    width: 100%;
    min-height: 40px;
    padding: 10px 11px;
    border: 0;
    border-bottom: 1px solid var(--m2-line);
    background: none;
    color: var(--m2-deep);
    text-align: left;
    font-size: 12px;
  }
  .m2-options-panel button:last-child {
    border-bottom: none;
  }
  .m2-chips { display: flex; gap: 5px; overflow-x: auto; margin: 0 10px 7px; }
  .m2-chip { flex: 0 0 auto; max-width: 80%; padding: 0 0 0 9px; border: 1px solid var(--m2-line); border-radius: 8px; background: var(--m2-soft); overflow: hidden; display: inline-flex; align-items: center; font-size: 10px; }
  .m2-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 0; }
  .m2-chip button { width: 27px; height: 27px; margin-left: 5px; border: 0; border-left: 1px solid var(--m2-line); background: none; color: var(--m2-muted); font-size: 17px; line-height: 1; }
  .m2-actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; margin: 7px 0 10px; }
  .m2-btn { min-height: 38px; padding: 8px 10px; border: 1px solid #ccd8c2; border-radius: 11px; background: transparent; color: var(--m2-deep); font-size: 11px; }
  html.mobile-v2-enabled.dark-mode .m2-btn,
  #mobile-v2-root.dark-mode .m2-btn {
    border-color: var(--m2-line);
  }
  .m2-btn.primary { border-color: #234d3b; background: #234d3b; color: #fff; }
  html.mobile-v2-enabled.dark-mode .m2-btn.primary,
  #mobile-v2-root.dark-mode .m2-btn.primary {
    border-color: var(--green-forest, #f59e0b);
    background: var(--green-forest, #f59e0b);
    color: #14100d;
  }
  .m2-profile { margin: 23px 0 17px; }
  .m2-profile-hint { margin: 10px 2px 0; }
  .m2-profile-label { display: block; margin-bottom: 9px; color: var(--m2-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .m2-profile-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 14px; border: 1px solid var(--m2-line); border-radius: 16px; background: var(--m2-soft); color: var(--m2-deep); font: inherit; text-align: left; cursor: pointer; }
  .m2-profile-card:hover { border-color: var(--m2-green); }
  .m2-profile-card:focus-visible { outline: 2px solid var(--m2-green); outline-offset: 2px; }
  .m2-profile-avatar { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--m2-green); color: #fff; font-size: 13px; font-weight: 700; }
  html.mobile-v2-enabled.dark-mode .m2-profile-avatar,
  #mobile-v2-root.dark-mode .m2-profile-avatar {
    background: var(--green-forest, #f59e0b);
    color: var(--app-bg, #14100d);
  }
  .m2-profile-details { flex: 1; min-width: 0; }
  .m2-profile-details strong, .m2-profile-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m2-profile-details strong { color: var(--m2-deep); font-size: 14px; }
  .m2-profile-details small { margin-top: 4px; color: var(--m2-muted); font-size: 11px; }
  .m2-profile-card.is-multi .m2-profile-details small { overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
  .m2-profile-chevron { color: var(--m2-muted); font-size: 21px; line-height: 1; }
  .m2-menu-item { width: 100%; min-height: 56px; border: 0; border-bottom: 1px solid var(--m2-line); background: none; color: var(--m2-deep); display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .m2-menu-item strong { display: block; font-size: 13px; }
  .m2-menu-item small { display: block; margin-top: 4px; color: var(--m2-muted); font-size: 10px; }
  .m2-design-row {
    width: 100%;
    min-height: 56px;
    border-bottom: 1px solid var(--m2-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .m2-design-row strong { display: block; font-size: 13px; color: var(--m2-deep); }
  .m2-design-row small { display: block; margin-top: 4px; color: var(--m2-muted); font-size: 10px; }
  .m2-design-row .design-switcher {
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: 12px;
    background: var(--m2-soft);
  }
  .m2-design-row .design-opt-btn {
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--m2-deep);
    font-size: 11px;
    font-weight: 500;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
  }
  .m2-design-row .design-opt-btn.active {
    background: #fff;
    color: #165b35;
    font-weight: 700;
    box-shadow: 0 1px 4px #203b3212;
  }
  html.mobile-v2-enabled.dark-mode .m2-design-row .design-opt-btn.active,
  #mobile-v2-root.dark-mode .m2-design-row .design-opt-btn.active {
    background: var(--brown-bg-selected, #342318);
    color: var(--green-forest, #f59e0b);
  }
  .m2-build-number { color: var(--m2-muted); font-size: 10px; text-align: center; }
  .m2-room-entry { width: 100%; min-height: 58px; margin: -4px 0 15px; padding: 12px 13px; border: 1px solid var(--m2-line); border-radius: 14px; background: var(--m2-soft); color: var(--m2-deep); display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .m2-room-entry strong, .m2-room-entry small { display: block; }
  .m2-room-entry strong { font-size: 13px; }
  .m2-room-entry small { margin-top: 4px; color: var(--m2-muted); font-size: 10px; }
  .m2-empty { padding: 25px 8px; color: var(--m2-muted); text-align: center; }
  .m2-empty .m2-title { margin-bottom: 10px; color: var(--m2-deep); font-size: 25px; }
  .m2-empty p { margin: 0 0 17px; font-size: 13px; }
  .m2-empty-cta { width: 100%; }
  .m2-danger-action { width: 100%; margin-top: 18px; padding: 12px; border: 0; background: none; color: #a04740; font-size: 12px; }
  .m2-switch-track { width: 34px; height: 20px; padding: 2px; border-radius: 20px; background: var(--m2-line); }
  .m2-switch-track span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s ease; box-shadow: 0 1px 2px #0002; }
  .m2-switch-item[aria-checked="true"] .m2-switch-track { background: var(--m2-green); }
  .m2-switch-item[aria-checked="true"] .m2-switch-track span { transform: translateX(14px); }
  .m2-sheet { position: fixed; inset: 0; top: var(--m2-viewport-top, 0px); bottom: var(--m2-keyboard-inset, 0px); z-index: 950; display: none; align-items: end; background: rgba(0, 0, 0, 0.55); }
  .m2-sheet.open { display: flex; }
  .m2-sheet.m2-intro { align-items: center; justify-content: center; padding: 20px; }
  .m2-intro .m2-sheet-card { width: min(100%, 340px); padding: 30px 24px; border-radius: 24px; text-align: center; }
  .m2-intro .m2-sheet-card:focus { outline: none; }
  .m2-intro-brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 25px; color: var(--m2-green); }
  .m2-intro-brand strong { font: 600 38px/1 Georgia, Cambria, serif; letter-spacing: -.04em; }
  .m2-intro-logo { object-fit: contain; }
  .m2-intro-logo--dark { display: none; }
  .dark-mode .m2-intro-logo--light { display: none; }
  .dark-mode .m2-intro-logo--dark { display: block; }
  .m2-intro .m2-sheet-card h2 { margin: 0; color: var(--m2-deep); font: 600 19px/1.3 'Instrument Sans', 'Inter', sans-serif; }
  .m2-intro-subtitle { margin: 8px 0 0; color: var(--m2-muted); font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
  .m2-intro-continue { width: 100%; margin-top: 25px; min-height: 44px; }
  .m2-sheet-card { width: 100%; max-height: min(82dvh, calc(var(--m2-visible-height, 100dvh) - 12px)); overflow-y: auto; padding: 22px 18px calc(18px + env(safe-area-inset-bottom,0px)); border-radius: 23px 23px 0 0; background: #fafbf7; box-shadow: 0 -12px 40px #0002; }
  html.mobile-v2-enabled.dark-mode .m2-sheet-card,
  #mobile-v2-root.dark-mode .m2-sheet-card {
    background: var(--sidebar-bg, #1a1510);
    border-top: 1px solid var(--border, #2b221a);
  }
  .m2-sheet-card h2 { margin: 0 0 14px; font: 400 24px/1.1 Georgia, serif; }
  .m2-sheet-card label { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: 13px; }
  .m2-sheet-card input[type="text"], .m2-sheet-card input[type="date"] { width: 100%; padding: 12px; border: 1px solid var(--m2-line); border-radius: 10px; background: transparent; color: var(--m2-deep); font-size: 16px; }
  .m2-sheet-hint { margin: -5px 0 14px; color: var(--m2-muted); font-size: 12px; line-height: 1.45; }
  .m2-sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
  .m2-sheet-actions .m2-btn { flex: 1; }

  /* Week Picker (Planner inspired) */
  .m2-week-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .m2-week-picker-head h2 {
    margin: 0 0 4px;
    font: 400 22px/1.2 Georgia, serif;
    color: var(--m2-deep);
  }
  .m2-week-picker-nav {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 10px;
    margin: 2px 0 4px;
  }
  .m2-week-picker-label {
    text-align: center;
    text-transform: capitalize;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--m2-deep);
    letter-spacing: -0.01em;
  }
  .m2-week-picker-nav .m2-nav-arrow {
    width: 36px;
    height: 36px;
    background: var(--m2-soft);
    color: var(--m2-green);
    font-size: 19px;
  }
  .m2-week-picker-grid {
    display: grid;
    gap: 7px;
  }
  .m2-week-picker-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
  }
  .m2-week-picker-month {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    border: 1px solid var(--m2-line);
    border-radius: 9px;
    background: var(--m2-soft);
    color: var(--m2-deep);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m2-week-picker-weeks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .m2-week-picker-btn {
    position: relative;
    min-height: 44px;
    border: 1px solid var(--m2-line);
    border-radius: 9px;
    background: #ffffff;
    color: var(--m2-deep);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    padding: 0;
  }
  .m2-week-picker-btn:active {
    transform: scale(0.94);
  }
  .m2-week-picker-btn.available {
    border-color: var(--m2-green);
    background: var(--m2-green);
    color: #ffffff;
  }
  .m2-week-picker-btn.empty-week {
    border: 1px dashed var(--m2-line);
    background: transparent;
    color: var(--m2-muted);
    opacity: 0.72;
  }
  .m2-week-picker-btn.current {
    box-shadow: inset 0 0 0 2.5px #ffffff, 0 0 0 2px var(--m2-deep);
    font-weight: 850;
  }
  .m2-week-picker-btn.empty-week.current {
    border: 2px solid var(--m2-deep);
    box-shadow: none;
    opacity: 1;
    color: var(--m2-deep);
  }
  .m2-week-picker-btn .m2-plan-today-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
  }
  .m2-week-picker-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--m2-line);
  }
  .m2-week-picker-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--m2-muted);
    font-size: 11px;
    font-weight: 600;
  }
  .m2-week-picker-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .m2-week-picker-legend-swatch {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    border: 1px solid var(--m2-line);
  }
  .m2-week-picker-legend-swatch.available {
    border-color: var(--m2-green);
    background: var(--m2-green);
  }
  .m2-week-picker-legend-swatch.current {
    border-color: var(--m2-deep);
    background: #ffffff;
    box-shadow: inset 0 0 0 2px var(--m2-deep);
  }
  .m2-week-picker-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--m2-deep);
  }

  html.mobile-v2-enabled.dark-mode .m2-week-picker-btn,
  #mobile-v2-root.dark-mode .m2-week-picker-btn {
    background: var(--sidebar-bg, #1a1510);
    border-color: var(--m2-line);
    color: var(--m2-deep);
  }
  html.mobile-v2-enabled.dark-mode .m2-week-picker-btn.available,
  #mobile-v2-root.dark-mode .m2-week-picker-btn.available {
    border-color: var(--green-forest, #f59e0b);
    background: var(--green-forest, #f59e0b);
    color: #14100d;
  }
  html.mobile-v2-enabled.dark-mode .m2-week-picker-btn.current,
  #mobile-v2-root.dark-mode .m2-week-picker-btn.current {
    box-shadow: inset 0 0 0 2.5px #14100d, 0 0 0 2px var(--green-forest, #f59e0b);
  }
  html.mobile-v2-enabled.dark-mode .m2-week-picker-btn.empty-week.current,
  #mobile-v2-root.dark-mode .m2-week-picker-btn.empty-week.current {
    border-color: var(--green-forest, #f59e0b);
    color: var(--green-forest, #f59e0b);
    box-shadow: none;
  }
  html.mobile-v2-enabled.dark-mode .m2-week-picker-legend-swatch.current,
  #mobile-v2-root.dark-mode .m2-week-picker-legend-swatch.current {
    border-color: var(--green-forest, #f59e0b);
    background: var(--sidebar-bg, #1a1510);
    box-shadow: inset 0 0 0 2px var(--green-forest, #f59e0b);
  }
  html.mobile-v2-enabled.dark-mode .m2-week-picker-legend-dot,
  #mobile-v2-root.dark-mode .m2-week-picker-legend-dot {
    background: var(--green-forest, #f59e0b);
  }

  @media (max-width: 360px) {
    .m2-week-picker-row {
      grid-template-columns: 66px minmax(0, 1fr);
      gap: 4px;
    }
    .m2-week-picker-month {
      padding: 4px;
      font-size: 10.5px;
    }
    .m2-week-picker-btn {
      min-height: 40px;
      font-size: 12px;
    }
    .m2-week-picker-weeks {
      gap: 3px;
    }
    .m2-week-picker-legend {
      gap: 9px;
      font-size: 10px;
    }
  }
  #mobile-v2-root .willow-tree-loader { background: color-mix(in srgb, #fafbf7 91%, transparent); color: #165b35; }
  #mobile-v2-root .willow-tree-loader .wtl__canvas { opacity: .46; box-shadow: none; }
  html.mobile-v2-enabled.dark-mode #mobile-v2-root .willow-tree-loader,
  #mobile-v2-root.dark-mode .willow-tree-loader {
    background: rgba(20, 16, 13, 0.92);
    color: var(--green-forest, #f59e0b);
  }
  html.mobile-v2-enabled #group-picker-overlay,
  html.mobile-v2-enabled #modal-overlay,
  html.mobile-v2-enabled #room-finder-overlay { z-index: 1000; }
  html.mobile-v2-enabled #group-picker-overlay,
  html.mobile-v2-enabled #problem-modal-overlay,
  html.mobile-v2-enabled #preset-modal-overlay,
  html.mobile-v2-enabled #room-finder-overlay {
    top: var(--m2-viewport-top, 0px);
    bottom: var(--m2-keyboard-inset, 0px);
  }
  html.mobile-v2-enabled #group-picker,
  html.mobile-v2-enabled .problem-modal,
  html.mobile-v2-enabled .preset-modal-card { max-height: calc(var(--m2-visible-height, 100dvh) - 32px); }
  html.mobile-v2-enabled input:is([type="text"], [type="search"], [type="email"], [type="date"], [type="time"], [type="number"]),
  html.mobile-v2-enabled textarea { font-size: 16px; }
  html.mobile-v2-enabled #room-finder-overlay { align-items: flex-end; }
  html.mobile-v2-enabled #room-finder {
    width: 100%;
    max-width: none;
    max-height: calc(var(--m2-visible-height, 100dvh) - env(safe-area-inset-top, 0px) - 18px);
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html.mobile-v2-enabled #room-finder-head { padding: 18px 18px 14px; }
  html.mobile-v2-enabled #room-finder-body { padding: 16px 18px 20px; }
}

@media (max-width: 768px) and (orientation: portrait) and (prefers-reduced-motion: reduce), (hover: none) and (pointer: coarse) and (orientation: portrait) and (prefers-reduced-motion: reduce) {
  .m2-nav-indicator-box,
  .m2-nav-icon { transition: none; }
}

@media (min-width: 769px) {
  .mobile-v2-setting-copy::after { content: " · visible sur téléphone uniquement"; }
}
