/* RESPONSIVE PROPORTIONAL SCALING FOR MOBILE SCREENS */
@media (max-width: 640px) {
  .vinyl-stage {
    width: min(320px, 78vw);
    height: min(320px, 78vw);
  }

  .vinyl-orbit-platter {
    width: min(290px, 72vw);
    height: min(290px, 72vw);
  }

  .vinyl-disc {
    width: min(275px, 68vw);
    height: min(275px, 68vw);
  }

  .vinyl-floor-shadow {
    width: min(300px, 75vw);
    height: 160px;
  }

  .vinyl-center-label {
    width: 85px;
    height: 85px;
  }

  .label-note {
    font-size: 1.3rem;
  }

  .icon-graphic svg {
    width: 26px;
    height: 26px;
  }

  .icon-pos-1 { left: 50%; top: -5%; }
  .icon-pos-2 { left: 93%; top: 16%; }
  .icon-pos-3 { left: 103%; top: 62%; }
  .icon-pos-4 { left: 74%; top: 99%; }
  .icon-pos-5 { left: 26%; top: 99%; }
  .icon-pos-6 { left: -3%; top: 62%; }
  .icon-pos-7 { left: 7%; top: 16%; }
}

@media (max-width: 400px) {
  .vinyl-stage {
    width: min(270px, 74vw);
    height: min(270px, 74vw);
  }

  .vinyl-orbit-platter {
    width: min(245px, 68vw);
    height: min(245px, 68vw);
  }

  .vinyl-disc {
    width: min(230px, 64vw);
    height: min(230px, 64vw);
  }

  .icon-graphic svg {
    width: 22px;
    height: 22px;
  }

  .icon-pos-1 { left: 50%; top: -4%; }
  .icon-pos-2 { left: 92%; top: 17%; }
  .icon-pos-3 { left: 102%; top: 61%; }
  .icon-pos-4 { left: 73%; top: 98%; }
  .icon-pos-5 { left: 27%; top: 98%; }
  .icon-pos-6 { left: -2%; top: 61%; }
  .icon-pos-7 { left: 8%; top: 17%; }
}

/* RESPONSIVE SCALING FOR NOTE TAKING SIDEBAR & DOCUMENT WINDOW */
@media (max-width: 768px) {
  .annotation-sidebar {
    width: 52px;
    padding: 10px 4px;
    gap: 10px;
  }

  .annotation-sidebar.collapsed {
    margin-left: -52px;
  }

  .tool-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .tool-btn-secondary {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .swatch {
    width: 14px;
    height: 14px;
  }

  .stroke-picker-group {
    display: none;
  }

  .viewport-control-bar {
    height: auto;
    min-height: 42px;
    padding: 6px 12px;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
  }

  .page-nav-controls, .zoom-controls {
    gap: 6px;
    font-size: 0.8rem;
  }

  .leader-sync-banner {
    font-size: 0.75rem;
    padding: 3px 10px;
    gap: 6px;
  }

  .sheet-scalable-stage {
    width: min(800px, 96vw, calc((100vh - 70px) * (8.5 / 11)));
    max-height: calc(100vh - 70px);
    aspect-ratio: 8.5 / 11;
  }

  .sheet-canvas-wrapper {
    padding: 10px 6px;
  }
}

@media (max-width: 480px) {
  .annotation-sidebar {
    width: 46px;
    padding: 8px 2px;
    gap: 8px;
  }

  .annotation-sidebar.collapsed {
    margin-left: -46px;
  }

  .tool-btn {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .sheet-scalable-stage {
    width: min(800px, 98vw, calc((100vh - 60px) * (8.5 / 11)));
    max-height: calc(100vh - 60px);
    aspect-ratio: 8.5 / 11;
  }

  .viewport-control-bar {
    padding: 4px 8px;
  }

  .page-subtitle {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .floating-chat-trigger {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .chat-drawer-panel {
    right: 12px;
    bottom: 74px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 90px);
  }

  .calendar-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .month-calendar-card {
    padding: 10px;
    border-radius: 12px;
  }

  .cal-day-cell {
    font-size: 0.72rem;
    border-radius: 6px;
  }

  .calendar-days-header {
    font-size: 0.7rem;
  }
}


/* LANDSCAPE ORIENTATION FIXES FOR MOBILE */
@media screen and (max-height: 500px) and (orientation: landscape) {
  #vinyl-stage {
    transform: scale(0.6) translateY(20%);
  }
  
  .app-drawer-content {
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .sheet-canvas-wrapper {
    padding-top: 50px;
    padding-bottom: 20px;
  }
  
  .cascading-flyouts-container {
    top: 50px;
  }
  
  .frameless-hover-strip {
    max-height: 80vh;
    overflow-y: auto;
  }
}
