    html, body { height: 100%; height: 100dvh; margin: 0; overflow: hidden; background: #0E0E0D; color: #ECEAE4; font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; transition: background-color .18s ease, color .18s ease; }
    html[data-theme="light"], html[data-theme="light"] body { background: #F7F6F2; color: #141413; }
    canvas { touch-action: none; }
    .toolbar-glass { background: rgba(22, 22, 20, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.12); }
    html[data-theme="light"] .toolbar-glass { background: rgba(255, 255, 255, 0.96); border-color: rgba(20, 20, 19, 0.12); color: #141413; }
    html[data-perf-tier="efficiency"] .toolbar-glass,
    html[data-perf-tier="midrange"] .toolbar-glass,
    html[data-gpu-vendor="mali"] .toolbar-glass,
    html[data-gpu-vendor="powervr"] .toolbar-glass {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      background: #161614;
    }
    html[data-theme="light"][data-perf-tier="efficiency"] .toolbar-glass,
    html[data-theme="light"][data-perf-tier="midrange"] .toolbar-glass,
    html[data-theme="light"][data-gpu-vendor="mali"] .toolbar-glass,
    html[data-theme="light"][data-gpu-vendor="powervr"] .toolbar-glass {
      background: #FFFFFF;
    }
    html[data-theme="light"] .wb-title { color: #141413 !important; }
    html[data-theme="light"] .wb-input { background: #FFFFFF !important; border-color: rgba(20, 20, 19, 0.15) !important; color: #141413 !important; }
    .wb-btn-muted { background: rgba(255, 255, 255, 0.05); color: #C9C5BC; transition: background-color .13s ease, color .13s ease; }
    .wb-btn-muted:hover { background: rgba(255, 255, 255, 0.11); color: #ECEAE4; }
    html[data-theme="light"] .wb-btn-muted { background: rgba(20, 20, 19, 0.05) !important; color: #474540 !important; }
    html[data-theme="light"] .wb-btn-muted:hover { background: rgba(20, 20, 19, 0.10) !important; color: #141413 !important; }
    .wb-tool-active {
      background: var(--nx-primary-bg, #ECEAE4) !important;
      color: var(--nx-primary-fg, #0E0E0D) !important;
    }
    html[data-theme="light"] .wb-tool-active {
      background: #141413 !important;
      color: #F7F6F2 !important;
    }
    .wb-dock-sm-only { display: none; }
    .wb-more-mobile-only { display: flex; }
    @media (min-width: 640px) {
      .wb-dock-sm-only { display: flex; }
      .wb-more-mobile-only { display: none !important; }
    }
    .wb-more-popover {
      position: absolute;
      bottom: calc(68px + env(safe-area-inset-bottom, 0px));
      left: 50%;
      transform: translateX(-50%);
      z-index: 48;
      width: 320px;
      max-width: calc(100vw - 20px);
      padding: 10px;
      border-radius: 18px;
      box-shadow: 0 24px 52px -12px rgba(0, 0, 0, 0.5);
    }
    .wb-more-popover.hidden { display: none !important; }
    .wb-more-item {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 6px 9px;
      border-radius: 10px;
      font-size: 11.5px;
      font-weight: 500;
      text-align: left;
      cursor: pointer;
      transition: background-color .13s ease, color .13s ease;
    }
    .wb-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 500;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      color: #CBD5E1;
      cursor: pointer;
      transition: background-color .14s ease, border-color .14s ease;
    }
    .wb-chip:hover { background: rgba(255,255,255,0.12); }
    .wb-chip.is-active {
      background: var(--nx-primary-bg, #F3F0E8);
      color: var(--nx-primary-fg, #0E0E0D);
      border-color: transparent;
      font-weight: 600;
    }
    html[data-theme="light"] .wb-chip {
      background: rgba(15,23,42,0.05);
      border-color: rgba(15,23,42,0.12);
      color: #334155;
    }
    html[data-theme="light"] .wb-chip.is-active {
      background: #171614;
      color: #F6F4EE;
    }
    #wb-top-bar {
      position: absolute;
      top: calc(10px + env(safe-area-inset-top, 0px));
      left: 8px;
      right: 8px;
      max-width: calc(100vw - 16px);
      box-sizing: border-box;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      z-index: 30;
      pointer-events: none;
    }
    .wb-embedded-only { display: none; }
    body.is-embedded .wb-embedded-only { display: inline-flex; }
    body.is-embedded .wb-standalone-only { display: none !important; }
    .wb-embedded-title { display: none; }
    @media (min-width: 640px) {
      .wb-embedded-title { display: inline; }
    }
    .wb-flowchart-label { display: none; }
    @media (min-width: 768px) {
      .wb-flowchart-label { display: inline; }
    }
    .wb-home-desktop { display: none; }
    @media (min-width: 640px) {
      .wb-home-desktop { display: flex; }
    }
    .wb-grid-top-btn { display: none; }
    @media (min-width: 385px) {
      .wb-grid-top-btn { display: flex; }
    }
    .wb-top-menu-popover {
      position: absolute;
      top: calc(58px + env(safe-area-inset-top, 0px));
      right: 8px;
      z-index: 46;
      width: 284px;
      max-width: calc(100vw - 16px);
      max-height: calc(100dvh - 130px);
      overflow-y: auto;
      padding: 11px;
      border-radius: 18px;
      box-shadow: 0 24px 52px -12px rgba(0, 0, 0, 0.55);
    }
    body.is-embedded .wb-top-menu-popover { top: 54px; }
    .wb-top-menu-popover.hidden { display: none !important; }
    #wb-page-bar {
      top: calc(58px + env(safe-area-inset-top, 0px));
      width: max-content;
      max-width: calc(100vw - 16px);
      overflow-x: auto;
      overflow-y: hidden;
      flex-wrap: nowrap;
      justify-content: flex-start;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    #wb-page-bar::-webkit-scrollbar { display: none; }
    #wb-page-bar > * { flex-shrink: 0; }
    body.is-embedded #wb-page-bar { top: 54px; }
    #wb-page-bar.hidden { display: none !important; }
    #wb-bottom-dock {
      bottom: calc(12px + env(safe-area-inset-bottom, 0px));
      width: max-content;
      max-width: calc(100vw - 16px);
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    #wb-bottom-dock::-webkit-scrollbar { display: none; }
    #wb-bottom-dock > * { flex-shrink: 0; }
    body.is-embedded #wb-top-bar { top: 8px; }
    body.is-embedded #wb-bottom-dock { bottom: 10px; }
    @media (max-width: 480px) {
      #wb-canvas-popover,
      #wb-sessions-drawer {
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 130px);
        overflow-y: auto;
      }
    }
    @media (max-width: 420px) {
      #wb-bottom-dock { padding: 5px 6px !important; gap: 2px !important; }
      #wb-bottom-dock > button { width: 33px !important; height: 33px !important; }
    }
    @media (max-width: 400px) {
      #wb-standalone-brand > a { width: 30px !important; height: 30px !important; }
      #wb-sessions-btn { min-width: 30px; min-height: 30px; padding: 2px 4px !important; }
      #wb-actions-pill > button { width: 30px !important; height: 30px !important; padding: 0 !important; justify-content: center; }
      #mode-btn-infinite, #mode-btn-pages { padding: 4px 7px !important; min-height: 28px; }
    }
    @media (max-width: 767px) {
      #coords-readout { display: none; }
      #wb-standalone-brand { padding: 4px 6px !important; gap: 5px !important; flex-shrink: 0; }
      #wb-sessions-btn { min-width: 32px; min-height: 30px; }
      #wb-brand-title-text { display: none; }
      #ws-pill { font-size: 0 !important; width: 8px !important; height: 8px !important; padding: 0 !important; min-width: 0 !important; border-radius: 9999px !important; }
      #wb-actions-pill { flex: 0 0 auto; min-width: 0; max-width: 100%; padding: 4px 5px !important; gap: 4px !important; }
      #peer-name, #wb-rename-input, #wb-paper-tpl-select, #wb-page-size-select, #wb-oss-search-input, #wb-cover-title, #wb-cover-subtitle, #wb-cover-style, #wb-paper-color-select {
        font-size: 16px !important;
      }
    }
    /* Carbon & Paper Share Modal + Mobile Bottom Sheet */
    .wb-btn-primary {
      background: #F3F0E8;
      color: #0E0E0D;
      border: 1px solid transparent;
      font-weight: 600;
      transition: opacity .15s ease, transform .1s ease;
    }
    .wb-btn-primary:hover { opacity: 0.92; }
    html[data-theme="light"] .wb-btn-primary {
      background: #171614;
      color: #F6F4EE;
    }
    .wb-btn-danger-outline {
      background: rgba(244, 63, 94, 0.12);
      color: #FDA4AF;
      border: 1px solid rgba(244, 63, 94, 0.34);
      font-weight: 600;
      transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
    }
    .wb-btn-danger-outline:hover:not(:disabled) {
      background: rgba(244, 63, 94, 0.22);
      border-color: rgba(244, 63, 94, 0.55);
    }
    .wb-btn-danger-outline:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    html[data-theme="light"] .wb-btn-danger-outline {
      background: rgba(225, 29, 72, 0.08);
      color: #BE123C;
      border-color: rgba(225, 29, 72, 0.28);
    }
    .wb-pill-switch {
      appearance: none;
      -webkit-appearance: none;
      width: 42px;
      height: 24px;
      border-radius: 9999px;
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.2);
      position: relative;
      cursor: pointer;
      flex-shrink: 0;
      transition: background-color .18s ease, border-color .18s ease;
    }
    html[data-theme="light"] .wb-pill-switch {
      background: rgba(15, 23, 42, 0.14);
      border-color: rgba(15, 23, 42, 0.2);
    }
    .wb-pill-switch::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      border-radius: 9999px;
      background: #FFFFFF;
      box-shadow: 0 1px 3px rgba(0,0,0,0.35);
      transition: transform .18s cubic-bezier(0.22, 1, 0.36, 1), background-color .18s ease;
    }
    .wb-pill-switch:checked {
      background: #F3F0E8;
      border-color: #F3F0E8;
    }
    .wb-pill-switch:checked::after {
      transform: translateX(18px);
      background: #0E0E0D;
    }
    html[data-theme="light"] .wb-pill-switch:checked {
      background: #171614;
      border-color: #171614;
    }
    html[data-theme="light"] .wb-pill-switch:checked::after {
      background: #F6F4EE;
    }
    @media (max-width: 639px) {
      #wb-share-modal {
        align-items: flex-end !important;
        padding: 0 !important;
      }
      #wb-share-modal > .wb-share-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 22px 22px 0 0 !important;
        padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
        max-height: 90dvh;
        overflow-y: auto;
        overflow-x: hidden;
      }
    }
